[vlc-commits] Compile ActiveX on Win32 too

Jean-Baptiste Kempf git at videolan.org
Tue Nov 8 01:30:02 CET 2011


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Nov  8 01:24:57 2011 +0100| [bf92a6a26caab989e1ad780439243da3f6ee6ecc] | committer: Jean-Baptiste Kempf

Compile ActiveX on Win32 too

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

 Makefile.am  |    5 ++++-
 configure.ac |   38 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b1b68ba..42b29fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,11 @@ AUTOMAKE_OPTIONS = \
 	dist-xz \
 	no-dist-gzip
 
-DIST_SUBDIRS= share npapi
+DIST_SUBDIRS= share npapi activex
 SUBDIRS = npapi
+if HAVE_WIN32
+SUBDIRS += activex
+endif
 
 EXTRA_DIST = \
 	autogen.sh \
diff --git a/configure.ac b/configure.ac
index e1e5cfd..e16f812 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Autoconf settings for npapi-vlc
 
-AC_COPYRIGHT([Copyright 2002-2010 the VideoLAN team])
+AC_COPYRIGHT([Copyright 2002-2011 the VideoLAN team])
 
 AC_INIT(npapi-vlc, 1.2.0-git)
 VERSION_MAJOR="1"
@@ -44,6 +44,12 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to '2' to get glibc warnings.])
 AC_PROG_CXX
 
+dnl override platform specific check for dependent libraries
+dnl otherwise libtool linking of shared libraries will
+dnl fail on anything other than pass_all.
+AC_CACHE_VAL(lt_cv_deplibs_check_method,
+    [lt_cv_deplibs_check_method=pass_all])
+
 AC_DISABLE_STATIC
 AC_LIBTOOL_DLOPEN
 AC_LIBTOOL_WIN32_DLL
@@ -119,6 +125,24 @@ glibc run-time.])
 AC_PATH_XTRA
 PKG_CHECK_MODULES([LIBVLC], [libvlc >= 1.1.0])
 
+AS_IF([test "${SYS}" = "mingw32"],[
+    AC_CHECK_PROGS(MIDL, [midl], no)
+
+    dnl FIXME
+    dnl AC_CHECK_PROGS(WIDL, [widl], no)
+    dnl
+    WIDL="no"
+
+    AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
+    AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
+
+    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])])
+    AC_CHECK_HEADERS(objsafe.h,,,[#include <ole2.h>])
+    AC_LANG_POP(C++)
+])
+
 
 AC_ARG_WITH(mozilla-sdk-path,
   [  --with-mozilla-sdk-path=PATH path to mozilla sdk])
@@ -207,6 +231,14 @@ AS_IF([test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"
 ])
 AC_LANG_POP(C++)
 
+AM_COND_IF([HAVE_WIN32], [
+  ACTIVEX_CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_"
+  ACTIVEX_CXXFLAGS="${CXXFLAGS} -fno-exceptions"
+
+  AC_ARG_VAR([ACTIVEX_LIBS], [linker flags for Activex])
+  ACTIVEX_LIBS="${ACTIVEX_LIBS} -lole32 -loleaut32 -luuid -lshlwapi -lgdi32"
+])
+
 AC_CONFIG_FILES([
   Makefile
   share/Makefile
@@ -215,9 +247,13 @@ AC_CONFIG_FILES([
   npapi/install.rdf
   npapi/manifest.json
 ])
+
 AM_COND_IF([HAVE_WIN32], [
   AC_CONFIG_FILES([
     npapi/npvlc_rc.rc
+    activex/Makefile
+    activex/axvlc.inf
+    activex/axvlc_rc.rc
   ])
 ])
 AM_COND_IF([HAVE_DARWIN], [



More information about the vlc-commits mailing list