[vlc-commits] build: Explicitly check for XCB in the Makefile
Luca Barbato
git at videolan.org
Thu Feb 13 20:02:24 CET 2014
npapi-vlc | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Feb 13 09:32:28 2014 +0100| [d30a123eebf6e022cae93417357dcb74471bd7d1] | committer: Felix Paul Kühne
build: Explicitly check for XCB in the Makefile
And thus simplify the conditional blocks.
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=d30a123eebf6e022cae93417357dcb74471bd7d1
---
configure.ac | 3 ++-
npapi/Makefile.am | 10 ++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index b4b4ae2..95e120c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,7 @@ dnl GTK+ for linux toolbar
AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ toolbars in NPAPI plugin [default=auto]]),, [with_gtk=yes])
gtk_found=no
AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
- PKG_CHECK_MODULES(XCB, [xcb x11-xcb],[], [
+ PKG_CHECK_MODULES(XCB, [xcb x11-xcb],[xcb_found=yes], [
AC_MSG_ERROR([Please install the libxcb and x11-xcb development files])
])
AS_IF([ test "x$with_gtk" != "xno" ],
@@ -261,6 +261,7 @@ AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
AS_IF([ test "x$gtk_found" = "xyes" ],
AC_DEFINE([USE_GTK], [1], [Define to 1 if using GTK+]))
AM_CONDITIONAL(WITH_GTK, [ test "x$gtk_found" = "xyes" ])
+AM_CONDITIONAL(HAVE_XCB, [ test "x$xcb_found" = "xyes" ])
dnl
dnl final flags for ActiveX
diff --git a/npapi/Makefile.am b/npapi/Makefile.am
index 9877f9b..8bc4a18 100644
--- a/npapi/Makefile.am
+++ b/npapi/Makefile.am
@@ -52,8 +52,7 @@ npapi-sdk:
svn export http://npapi-sdk.googlecode.com/svn/trunk/headers npapi-sdk-svn -r HEAD
mv npapi-sdk-svn npapi-sdk
-if !HAVE_DARWIN
-if !HAVE_WIN32
+if HAVE_XCB
# Unix (x11) platforms
#
@@ -85,7 +84,9 @@ SOURCES_support += \
vlcplugin_xcb.h
endif # !USE_GTK
-else # Win32
+endif
+
+if HAVE_WIN32
# Under Win32|Mac, Mozilla plugins need to be named NP******.DLL, but under Unix
# the common naming scheme is lib******plugin.so.
@@ -122,7 +123,8 @@ npvlc_rc.$(OBJEXT): package/npvlc_rc.rc
$(WINDRES) --include-dir $(srcdir) -i $< -o $@
endif
-else
+
+if HAVE_DARWIN
if FETCH_NPAPI
$(npvlc_la_OBJECTS): npapi-sdk
More information about the vlc-commits
mailing list