[vlc-commits] Build plugins statically if --disable-shared is used

Rafaël Carré git at videolan.org
Mon Aug 29 15:05:18 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Mon Aug 29 08:51:05 2011 -0400| [18925e8fdb40c6c137e5de750af3b932e4d71a4c] | committer: Rafaël Carré

Build plugins statically if --disable-shared is used

Only allow static plugins if vlc binary is not built

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

 configure.ac      |    4 +++-
 modules/common.am |    6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index c484481..9812a53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -461,10 +461,12 @@ m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
 
 lt_cv_deplibs_check_method=pass_all
 
-AS_IF([test "${enable_shared}" = "no"], [
+AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
   AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
 ])
 
+AM_CONDITIONAL(HAVE_SHARED_PLUGINS, [test "${enable_shared}" != "no"])
+
 dnl
 dnl Gettext stuff
 dnl
diff --git a/modules/common.am b/modules/common.am
index d0b2d0e..e2b21bf 100644
--- a/modules/common.am
+++ b/modules/common.am
@@ -19,8 +19,10 @@ MODULE_NAME = `p="$@"; p="$${p\#\#*/}"; p="$${p\#lib}"; echo "$${p%_plugin*}"`
 AM_CPPFLAGS = \
 	-DMODULE_NAME=$(MODULE_NAME) \
 	-DMODULE_NAME_IS_$(MODULE_NAME) \
-	-DMODULE_STRING=\"$(MODULE_NAME)\" \
-	-D__PLUGIN__
+	-DMODULE_STRING=\"$(MODULE_NAME)\"
+if HAVE_SHARED_PLUGINS
+AM_CPPFLAGS += -D__PLUGIN__
+endif
 AM_CFLAGS =
 AM_CXXFLAGS =
 AM_OBJCFLAGS =



More information about the vlc-commits mailing list