[vlc-commits] Pass -m32/-m64 to WIDL

Jean-Baptiste Kempf git at videolan.org
Thu Sep 11 00:50:35 CEST 2014


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Sep 11 00:49:02 2014 +0200| [f005f06a09bdf5e37740c156041010d05a6051cd] | committer: Jean-Baptiste Kempf

Pass -m32/-m64 to WIDL

Should close #9464

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=f005f06a09bdf5e37740c156041010d05a6051cd
---

 activex/Makefile.am |    4 ++--
 configure.ac        |   10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/activex/Makefile.am b/activex/Makefile.am
index 252acff..5eb721a 100644
--- a/activex/Makefile.am
+++ b/activex/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index c119620..cbf1821 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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")
 



More information about the vlc-commits mailing list