[vlc-commits] Updated autotools stuff
Cheng Sun
git at videolan.org
Wed Dec 21 12:54:08 CET 2011
npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sat Dec 3 23:12:17 2011 +0000| [9f7cd62344d7f51ca4c63e2db007a16fe72495f8] | committer: Jean-Baptiste Kempf
Updated autotools stuff
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=9f7cd62344d7f51ca4c63e2db007a16fe72495f8
---
configure.ac | 24 ++++++++++++++++--------
npapi/Makefile.am | 36 ++++++++++++++++++++++++++----------
2 files changed, 42 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index a055d12..0374d24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_SUBST(COPYRIGHT_YEARS)
COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
AC_SUBST(COPYRIGHT_MESSAGE)
-AC_CONFIG_SRCDIR(npapi/vlcplugin.cpp)
+AC_CONFIG_SRCDIR(npapi/vlcshell.cpp)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_MACRO_DIR(m4)
AC_CANONICAL_BUILD
@@ -180,13 +180,22 @@ test "$found" = 0 && AC_MSG_RESULT([no])
CPPFLAGS="${CPPFLAGS} ${MOZILLA_CFLAGS}"
+AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ interface [default=yes]]),, [with_gtk=yes])
+AM_CONDITIONAL(USE_GTK, [ test "x$with_gtk" = "xyes" ])
AC_CHECK_HEADERS(npapi.h)
AC_CHECK_HEADERS(npruntime.h, [
dnl if found
- AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"],[
- PKG_CHECK_MODULES(XPM, [xpm xt],, [
- AC_MSG_ERROR([Please install the libXpm and libXt development files.])
- ])
+ AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
+ AM_COND_IF(USE_GTK,
+ [
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0],, [
+ AC_MSG_ERROR([GTK+ >=2 not found. Re-run configure with --without-gtk.])
+ ])
+ ], [
+ PKG_CHECK_MODULES(XPM, [xpm xt],, [
+ AC_MSG_ERROR([Please install the libXpm and libXt development files, or re-run configure with --with-gtk])
+ ])
+ ])
])],[
dnl if not found
AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
@@ -213,15 +222,14 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
const char *NPP_GetMIMEDescription(void);
])],[
AC_MSG_RESULT(yes)
- AC_DEFINE(NPP_GET_MIME_CONST, [const], [Wether NPP_GetMIMEDescription returns const])
+ AC_DEFINE(NPP_GET_MIME_CONST, [const], [Whether NPP_GetMIMEDescription returns const])
],[
AC_MSG_RESULT(no)
- AC_DEFINE(NPP_GET_MIME_CONST, [], [Wether NPP_GetMIMEDescription returns const])
+ AC_DEFINE(NPP_GET_MIME_CONST, [], [Whether NPP_GetMIMEDescription returns const])
])
AC_LANG_POP(C++)
-
AM_COND_IF([HAVE_WIN32], [
ACTIVEX_CPPFLAGS="${CPPFLAGS} -DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_"
ACTIVEX_CXXFLAGS="${CXXFLAGS} -fno-exceptions"
diff --git a/npapi/Makefile.am b/npapi/Makefile.am
index 5aeddc7..1b59eb4 100644
--- a/npapi/Makefile.am
+++ b/npapi/Makefile.am
@@ -12,8 +12,9 @@ AM_CPPFLAGS = $(LIBVLC_CFLAGS)
libvlcplugin_la_SOURCES = \
vlcshell.cpp \
vlcshell.h \
- vlcplugin.cpp \
vlcplugin.h \
+ vlcplugin_base.cpp \
+ vlcplugin_base.h \
control/npolibvlc.cpp \
control/npolibvlc.h \
control/nporuntime.cpp \
@@ -41,16 +42,28 @@ if !HAVE_WIN32
# Unix (x11) platforms
#
-AM_CPPFLAGS += -DXP_UNIX $(X_CFLAGS) \
- $(XPM_CFLAGS) \
- -DDATA_PATH=\"$(pkgdatadir)\"
-libvlcplugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) \
- $(XT_LIBS) -lX11 -lSM -lICE -lXpm \
- $(XPM_LIBS) $(MOZILLA_LIBS)
-
npvlc_LTLIBRARIES = libvlcplugin.la
-SOURCES_support = support/npunix.cpp
+AM_CPPFLAGS += -DXP_UNIX -DDATA_PATH=\"$(pkgdatadir)\"
+libvlcplugin_la_LIBADD += $(MOZILLA_LIBS)
+
+if USE_GTK
+AM_CPPFLAGS += $(GTK_CFLAGS) -DUSE_GTK
+libvlcplugin_la_LIBADD += $(GTK_LIBS)
+SOURCES_support = \
+ support/npunix.cpp \
+ vlcplugin_gtk.cpp \
+ vlcplugin_gtk.h
+else # !USE_GTK
+AM_CPPFLAGS += $(X_CFLAGS) $(XPM_CFLAGS)
+libvlcplugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) \
+ $(XT_LIBS) -lX11 -lSM -lICE -lXpm \
+ $(XPM_LIBS)
+SOURCES_support = \
+ support/npunix.cpp \
+ vlcplugin_xlib.cpp \
+ vlcplugin_xlib.h
+endif # !USE_GTK
else # Win32
@@ -61,7 +74,10 @@ lib_LTLIBRARIES = npvlc.la
AM_CPPFLAGS += -DXP_WIN -DXP_WIN32 \
-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX
-SOURCES_support = support/npwin.cpp \
+SOURCES_support = \
+ support/npwin.cpp \
+ vlcplugin_win.cpp \
+ vlcplugin_win.h \
../common/win32_fullscreen.cpp \
../common/win32_fullscreen.h
More information about the vlc-commits
mailing list