[vlc-devel] commit: Add a --disable-vlc configure flag to not build VLC. (Sam Hocevar )

git version control git at videolan.org
Wed Mar 19 14:28:01 CET 2008


vlc | branch: master | Sam Hocevar <sam at zoy.org> | Wed Mar 19 13:18:09 2008 +0000| [16c69ade84edabaf8c861f1e4f478ae815f94970]

Add a --disable-vlc configure flag to not build VLC.

In some cases (eg. when building binary packages) one only needs libvlc
and libvlc-control and does not wish to build or install VLC binaries.
This --disable-vlc flag saves us from manually removing the unwanted
binaries after "make install".

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

 Makefile.am     |    6 ++++++
 configure.ac    |   23 ++++++++++++++++++-----
 src/Makefile.am |    6 +++++-
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 498d5cd..870250f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -289,7 +289,9 @@ endif
 ALL_ALIASES = cvlc rvlc svlc wxvlc qvlc nvlc
 bin_SCRIPTS += $(ALIASES)
 CLEANFILES += $(ALIASES)
+if BUILD_VLC
 EXTRA_SCRIPTS = $(ALL_ALIASES)
+endif
 
 dist_noinst_SCRIPTS += make-alias
 
@@ -313,7 +315,9 @@ qvlc: make-alias
 nvlc: make-alias
 	$(MKALIAS) ncurses
 
+if BUILD_VLC
 noinst_SCRIPTS = vlc$(EXEEXT)
+endif
 
 vlc$(EXEEXT): core
 	rm -f vlc$(EXEEXT)
@@ -326,7 +330,9 @@ vlc$(EXEEXT): core
 
 if HAVE_DARWIN
 # Create the MacOS X app
+if BUILD_VLC
 noinst_DATA = VLC.app
+endif
 # VLC-release.app is the old VLC.app target
 VLC-release.app: vlc
 	( cd src && make install )
diff --git a/configure.ac b/configure.ac
index 9c495a8..d62ff27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5721,6 +5721,15 @@ AS_IF([test "${enable_loader}" = "yes"],
     VLC_ADD_LIBS([realaudio],[../../libs/loader/libloader.la])
   ])
 
+AC_ARG_WITH(,[Components:])
+
+dnl
+dnl  the VLC binary
+dnl
+AC_ARG_ENABLE(vlc,
+  [  --enable-vlc            build the VLC media player (default enabled)])
+AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
+
 dnl
 dnl  Microsoft ActiveX support
 dnl
@@ -6300,9 +6309,9 @@ echo exit \$ERROR >>compile
 chmod a+x compile
 
 printf "
-vlc configuration
+libvlc configuration
 --------------------
-vlc version           : ${VERSION}
+version               : ${VERSION}
 system                : ${SYS}
 architecture          : ${ARCH}
 build flavour         : "
@@ -6311,9 +6320,13 @@ test "${enable_cprof}" = "yes" && printf "cprof "
 test "${enable_gprof}" = "yes" && printf "gprof "
 test "${enable_optimizations}" = "yes" && printf "optim "
 test "${enable_release}" = "yes" && printf "release " || printf "devel "
-echo "
-vlc aliases           :${ALIASES}
-plugins/bindings      :${PLUGINS_BINDINGS}
+echo ""
+if test "${enable_vlc}" != "no"; then
+echo "vlc aliases           :${ALIASES}"
+else
+echo "build vlc executable  : no"
+fi
+echo "plugins/bindings      :${PLUGINS_BINDINGS}
 
 You can check which modules have been enabled 
 with \`./vlc-config --list plugin'.
diff --git a/src/Makefile.am b/src/Makefile.am
index dae043e..f640277 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -388,8 +388,10 @@ misc/revision.c:
 # Building vlc
 ###############################################################################
 
+if BUILD_VLC
 bin_PROGRAMS = vlc
-# 
+endif
+
 vlc_SOURCES = vlc.c
 vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
 
@@ -397,6 +399,7 @@ vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
 vlc_LDADD = $(DATA_win32_rc) libvlc.la $(LTLIBINTL) `$(VLC_CONFIG) -libs vlc`
 
+if BUILD_VLC
 vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
 	@rm -f vlc$(EXEEXT)
 	@case `$(VLC_CONFIG) --linkage vlc builtin` in \
@@ -415,6 +418,7 @@ noinst_DATA = vlc_win32_rc.$(OBJEXT)
 vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
 	$(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(top_srcdir)/share -i $< -o $@
 endif
+endif
 
 ###############################################################################
 # Unit/regression test




More information about the vlc-devel mailing list