[vlc-commits] Add USE_GTK to config.h, so that reconfiguring with a change in --with(out) -gtk correctly triggers a rebuild
Cheng Sun
git at videolan.org
Sat Jan 21 23:12:16 CET 2012
npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sat Jan 21 12:41:29 2012 +0000| [1f18a4a8cfffefb92580494f471f4ef1d9cd50f6] | committer: Cheng Sun
Add USE_GTK to config.h, so that reconfiguring with a change in --with(out)-gtk correctly triggers a rebuild
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=1f18a4a8cfffefb92580494f471f4ef1d9cd50f6
---
configure.ac | 5 +++--
npapi/Makefile.am | 6 +++---
npapi/vlcplugin.h | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 09ae046..1b04d39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -254,8 +254,9 @@ AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
])
])
])
-AM_CONDITIONAL(USE_GTK, [ test "x$gtk_found" = "xyes" ])
-
+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" ])
dnl
dnl final flags for ActiveX
diff --git a/npapi/Makefile.am b/npapi/Makefile.am
index 03ae2d1..dc9a958 100644
--- a/npapi/Makefile.am
+++ b/npapi/Makefile.am
@@ -47,14 +47,14 @@ npvlc_LTLIBRARIES = libvlcplugin.la
AM_CPPFLAGS += -DXP_UNIX -DDATA_PATH=\"$(pkgdatadir)\"
libvlcplugin_la_LIBADD += $(MOZILLA_LIBS)
-if USE_GTK
-AM_CPPFLAGS += $(GTK_CFLAGS) -DUSE_GTK
+if WITH_GTK
+AM_CPPFLAGS += $(GTK_CFLAGS)
libvlcplugin_la_LIBADD += $(GTK_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lX11
SOURCES_support = \
support/npunix.cpp \
vlcplugin_gtk.cpp \
vlcplugin_gtk.h
-else # !USE_GTK
+else # !WITH_GTK
AM_CPPFLAGS += $(XCB_CFLAGS)
libvlcplugin_la_LIBADD += $(XCB_LIBS)
SOURCES_support = \
diff --git a/npapi/vlcplugin.h b/npapi/vlcplugin.h
index c8a0def..154f5e7 100644
--- a/npapi/vlcplugin.h
+++ b/npapi/vlcplugin.h
@@ -1,6 +1,7 @@
#ifndef __VLCPLUGIN_H__
#define __VLCPLUGIN_H__
+#include "config.h"
#include "vlcplugin_base.h"
#if defined(XP_UNIX)
More information about the vlc-commits
mailing list