[vlc-commits] [Git][videolan/npapi-vlc][3.0.x] 3 commits: don't build stdole2.tlb if it already exists

Jean-Baptiste Kempf gitlab at videolan.org
Sun May 16 21:18:52 UTC 2021



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC Browser Plugins


Commits:
76abef0a by Steve Lhomme at 2021-05-16T21:18:42+00:00
don't build stdole2.tlb if it already exists

(cherry picked from commit 4c7155f3f155dbb6bb90788b80d3b85572cde3b4)

- - - - -
e461596a by Steve Lhomme at 2021-05-16T21:18:42+00:00
test WIDL with the WIDLFLAGS

(cherry picked from commit eb385fa562969526631d502beb73324efc5a2e6b)

- - - - -
d8ea33e4 by Steve Lhomme at 2021-05-16T21:18:42+00:00
fix stdole2.tlb dependency

(cherry picked from commit 1d7d0288fa03c22e5c01d790dbaa1ac48ddc2b45)

- - - - -


2 changed files:

- activex/Makefile.am
- configure.ac


Changes:

=====================================
activex/Makefile.am
=====================================
@@ -107,8 +107,13 @@ WINE_SDK_PATH ?= /usr/include/wine/windows
 stdole2.tlb stdole2_idl.c stdole2_idl.h: $(WINE_SDK_PATH)/stdole2.idl
 	$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -t -u -h -T stdole2.tlb -U stdole2_idl.c -H stdole2_idl.h $<
 
+if HAS_STDOLE2_TLB
+axvlc.tlb axvlc_idl.c 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 $<
+else
 axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl stdole2.tlb
 	$(WIDL) $(WIDLFLAGS) -I$(WINE_SDK_PATH) -I. -t -u -h -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h $<
+endif
 
 clean-tlb:
 	rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h stdole2.tlb stdole2_idl.c stdole2_idl.h


=====================================
configure.ac
=====================================
@@ -134,15 +134,33 @@ AS_IF([test "${SYS}" = "mingw32"],[
     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])])
     AC_CHECK_HEADERS(objsafe.h,,,[#include <ole2.h>])
+    AS_IF([test "${WIDL}" != "no"],[
+      ac_ext=idl
+      ac_objext=tlb
+      ac_compile='$WIDL $WIDLFLAGS -t conftest.$ac_ext -o conftest.$ac_objext'
+      cat <<_ACEOF >conftest.idl
+import "ocidl.idl";
+[[
+  uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
+]]
+library AXVLC
+{
+  importlib("stdole2.tlb");
+}
+_ACEOF
+AS_IF([ac_fn_cxx_try_compile "$LINENO"],[has_stdole2_tlb=yes],[has_stdole2_tlb=no])
+    ],[has_stdole2_tlb=no])
     AC_LANG_POP(C++)
 ],[
     MIDL="no"
     WIDL="no"
+    has_stdole2_tlb="no"
 ])
 
 AC_SUBST(WIDLFLAGS)
 AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
 AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
+AM_CONDITIONAL(HAS_STDOLE2_TLB, test "${has_stdole2_tlb}" = "yes")
 
 dnl
 dnl Buggy glibc prevention. Purposedly not cached.



View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/b291c99ef80c76206456858fb7916da69047f079...d8ea33e4a7554d12a96242738ad7e478339d6f47

-- 
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/-/compare/b291c99ef80c76206456858fb7916da69047f079...d8ea33e4a7554d12a96242738ad7e478339d6f47
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list