Commit f005f06a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Pass -m32/-m64 to WIDL

Should close #9464
parent 50faeb01
......@@ -100,10 +100,10 @@ if HAS_WIDL_COMPILER
WINE_SDK_PATH ?= /usr/include/wine/windows
stdole2.tlb stdole2_idl.c stdole2_idl.h: $(WINE_SDK_PATH)/stdole2.idl
$(WIDL) -I$(WINE_SDK_PATH) -t -u -h -T stdole2.tlb -U stdole2_idl.c -H stdole2_idl.h $<
$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -t -u -h -T stdole2.tlb -U stdole2_idl.c -H stdole2_idl.h $<
axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl stdole2.tlb
$(WIDL) -I$(WINE_SDK_PATH) -I. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h axvlc.idl
$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -I. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h axvlc.idl
clean-tlb:
rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h stdole2.tlb stdole2_idl.c stdole2_idl.h
......
......@@ -63,6 +63,7 @@ AC_CHECK_TOOL(DLLTOOL, dlltool, :)
dnl Check for compiler properties
AC_C_CONST
WIDLFLAGS=""
dnl
dnl Check the operating system
dnl
......@@ -114,6 +115,14 @@ AS_IF([test "${SYS}" = "mingw32"],[
AC_CHECK_PROGS(MIDL, [midl], no)
AC_CHECK_TOOL(WIDL, [widl], no)
case "${host}" in
amd64*|x86_64*)
WIDLFLAGS=" -m64"
;;
*)
WIDLFLAGS=" -m32"
;;
esac
AC_LANG_PUSH(C++)
AC_CHECK_HEADER(ole2.h,,[AC_MSG_ERROR([required OLE header ole2.h is missing from your system])])
AC_CHECK_HEADER(olectl.h,,[AC_MSG_ERROR([required OLE header olectl.h is missing from your system])])
......@@ -124,6 +133,7 @@ AS_IF([test "${SYS}" = "mingw32"],[
WIDL="no"
])
AC_SUBST(WIDLFLAGS)
AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment