Commit fe17002d authored by Sam Hocevar's avatar Sam Hocevar

* bootstrap:

    + New build system, using recursive makefiles. Due to the amount of code
      in VLC, this had become unavoidable.
    + Removed the check for OS X's stack size, since our automake targets are
      a lot less hungry now.
    + Ditto for Solaris's sed.
    + Since automake-1.6 is faster than 1.7, use it first if both are present.
  * m4/vlc.m4:
    + New AX_ADD_CPPFLAGS, AX_ADD_CFLAGS, AX_ADD_CXXFLAGS, AX_ADD_OBJCFLAGS
      and AX_ADD_LDFLAGS macros that do all the magic to detect possible
      modules and register their flags.
    + New AX_ADD_BUILTINS and AX_ADD_PLUGINS macros.
    + Some magic to generate vlc-config.
  * configure.ac:
    + Moved most code to the AX_ADD_* macros.
    + Explicitely added all target Makefiles.
  * modules/**/Modules.am:
    + Path to sources are now relative to Modules.am's directory level.
parent e3c317c2
...@@ -15,10 +15,11 @@ config.status ...@@ -15,10 +15,11 @@ config.status
confdefs.h confdefs.h
conftest.cc conftest.cc
autom4te.cache autom4te.cache
Makefile
Makefile.in Makefile.in
Makefile
Modules.am Modules.am
build-stamp build-stamp
configure-stamp
stamp-h* stamp-h*
aclocal.m4 aclocal.m4
vlc-debug.* vlc-debug.*
......
$Id: HACKING,v 1.7 2003/06/21 17:04:20 sam Exp $ $Id: HACKING,v 1.8 2003/06/27 13:50:07 sam Exp $
Hacking vlc Hacking vlc
=========== ===========
...@@ -35,16 +35,19 @@ The bootstrap sequence ...@@ -35,16 +35,19 @@ The bootstrap sequence
The bootstrap script does the following actions: The bootstrap script does the following actions:
- browse the modules/ directory for all available modules. A module "foo" - parse configure.ac for all Makefiles in the modules/ directory that need
exists if there is a Modules.am file in the modules/ directory which to be generated, and look for available modules in the corresponding
defines SOURCES_foo. Modules.am file. A module "foo" exists if there is a Modules.am file in
the modules/ directory which defines SOURCES_foo.
- create a top-level Modules.am file (which will be included by Makefile.am) - create a top-level Modules.am file (which will be included by Makefile.am)
which contains additional build rules for modules, and includes all the which contains additional build rules for modules, and includes all the
Modules.am files that were found in modules/ Modules.am files that were found in modules/
- create an m4/vlc.m4 from configure.ac, generating the AC_SUBST and - create an m4/private.m4 from configure.ac, generating m4 macros that will
AM_CONDITIONAL rules that will be needed by configure.ac. be needed by configure.ac.
- create a Makefile.am file for each Modules.am file found in modules/ .
- run autopoint (previously gettextize) to create an intl/ directory, - run autopoint (previously gettextize) to create an intl/ directory,
needed when libgettext is not available. needed when libgettext is not available.
......
...@@ -7,7 +7,7 @@ NULL = ...@@ -7,7 +7,7 @@ NULL =
# SUBDIRS stores the directories where a "make" is required when building # SUBDIRS stores the directories where a "make" is required when building
# something. DIST_SUBDIRS stores the directories where nothing is built but # something. DIST_SUBDIRS stores the directories where nothing is built but
# which have makefiles with distribution information. # which have makefiles with distribution information.
SUBDIRS = po intl m4 share SUBDIRS = intl . share po m4
DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib autotools DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib autotools
EXTRA_DIST = \ EXTRA_DIST = \
...@@ -20,25 +20,15 @@ EXTRA_DIST = \ ...@@ -20,25 +20,15 @@ EXTRA_DIST = \
install-win32 \ install-win32 \
src/extras/COPYING \ src/extras/COPYING \
toolbox \ toolbox \
vlc-config.in.in \
vlc.ebuild \ vlc.ebuild \
vlc.spec \ vlc.spec \
vlc.spec.redhat \ vlc.spec.redhat \
$(NULL) $(NULL)
MOSTLYCLEANFILES =
BUILT_SOURCES = BUILT_SOURCES =
SUFFIXES = SUFFIXES =
# List of programs, libraries and headers that need to be built and/or
# distributed. Initialized to empty because we'll use += later.
bin_PROGRAMS =
lib_LIBRARIES =
libvlc_LIBRARIES =
noinst_LIBRARIES =
noinst_HEADERS =
# Tell aclocal to use -I m4. Wonder if it really works. # Tell aclocal to use -I m4. Wonder if it really works.
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
...@@ -46,103 +36,8 @@ ACLOCAL_AMFLAGS = -I m4 ...@@ -46,103 +36,8 @@ ACLOCAL_AMFLAGS = -I m4
# because old versions of automake don't support them in configure.ac. # because old versions of automake don't support them in configure.ac.
AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
############################################################################### # Don't forget to build plugins
# Compilation flags for debug mode, profiling, and others all: plugins
###############################################################################
# Standard flags used everywhere to build things in the distribution. Some
# of them are empty but might be extended later in the Makefile. *_default
# is the default flag list for all files in the distribution, for instance
# the vlc code. *_pic is for PIC code, such as the Mozilla plugin. *_plugin
# is for plugin code, *_builtin is for builtin code, and *_builtin_pic is
# for PIC builtin code, for instance builtin modules in the mozilla plugin.
CPPFLAGS_default = -I$(top_srcdir)/include
CFLAGS_default =
CXXFLAGS_default =
OBJCFLAGS_default =
LDFLAGS_default = $(LDFLAGS_gprof)
CPPFLAGS_pic = $(CPPFLAGS_default)
CFLAGS_pic = $(CFLAGS_default) @CFLAGS_pics@
CXXFLAGS_pic = $(CXXFLAGS_default) @CFLAGS_pics@
OBJCFLAGS_pic = $(OBJCFLAGS_default) @CFLAGS_pics@
LDFLAGS_pic = $(LDFLAGS_default)
CPPFLAGS_plugin = $(CPPFLAGS_default) -D__VLC__ -D__PLUGIN__
CFLAGS_plugin = $(CFLAGS_default) @CFLAGS_plugins@
CXXFLAGS_plugin = $(CXXFLAGS_default) @CFLAGS_plugins@
OBJCFLAGS_plugin = $(OBJCFLAGS_default) @CFLAGS_plugins@
LDFLAGS_plugin = @LDFLAGS_plugins@
CPPFLAGS_builtin = $(CPPFLAGS_default) -D__VLC__ -D__BUILTIN__
CFLAGS_builtin = $(CFLAGS_default) @CFLAGS_builtins@
CXXFLAGS_builtin = $(CXXFLAGS_default) @CFLAGS_builtins@
OBJCFLAGS_builtin = $(OBJCFLAGS_default) @CFLAGS_builtins@
LDFLAGS_builtin =
L_builtin =
CPPFLAGS_builtin_pic = $(CPPFLAGS_builtin) $(CPPFLAGS_pic)
CFLAGS_builtin_pic = $(CFLAGS_builtin) $(CFLAGS_pic)
CXXFLAGS_builtin_pic = $(CXXFLAGS_builtin) $(CXXFLAGS_pic)
OBJCFLAGS_builtin_pic = $(OBJCFLAGS_builtin) $(OBJCFLAGS_pic)
LDFLAGS_builtin_pic = $(LDFLAGS_builtin) $(LDFLAGS_pic)
L_builtin_pic =
# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
CPPFLAGS_default += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
CPPFLAGS_default += -D_REENTRANT -D_THREAD_SAFE
CPPFLAGS_default += -D_GNU_SOURCE
# Gettext support
CPPFLAGS_default += -DLOCALEDIR=\"$(datadir)/locale\"
# Data and plugin location
CPPFLAGS_default += -DDATA_PATH=\"@prefix@/share/vlc\"
CPPFLAGS_default += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
# Conditional flags that get added to *FLAGS_default
if RELEASE
CPPFLAGS_release = -DHAVE_RELEASE
endif
if DEBUG
CPPFLAGS_debug = -DDEBUG
CFLAGS_debug = -g
endif
if GPROF
CPPFLAGS_gprof = -DGPROF
CFLAGS_gprof = -pg
LDFLAGS_gprof = -pg
endif
if CPROF
CPPFLAGS_cprof = -DCPROF
CFLAGS_cprof = -finstrument-functions
endif
if OPTIM
CFLAGS_optim = @CFLAGS_OPTIM@ @CFLAGS_TUNING@
if DEBUG
else
if GPROF
else
if CPROF
else
CFLAGS_nodebug = @CFLAGS_OPTIM_NODEBUG@
endif
endif
endif
else
# !OPTIM
CFLAGS_optim = @CFLAGS_NOOPTIM@
endif
CPPFLAGS_default += $(CPPFLAGS_release) \
$(CPPFLAGS_debug) $(CPPFLAGS_gprof) $(CPPFLAGS_cprof)
CFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
$(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
CXXFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
$(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
OBJCFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
$(CFLAGS_debug) $(CFLAGS_gprof) $(CFLAGS_cprof)
############################################################################### ###############################################################################
# Headers # Headers
...@@ -166,7 +61,7 @@ dist_pkginclude_HEADERS = \ ...@@ -166,7 +61,7 @@ dist_pkginclude_HEADERS = \
include/vlc/intf.h \ include/vlc/intf.h \
$(NULL) $(NULL)
noinst_HEADERS += $(HEADERS_include) $(HEADERS_include_built) noinst_HEADERS = $(HEADERS_include) $(HEADERS_include_built)
HEADERS_include = \ HEADERS_include = \
include/aout_internal.h \ include/aout_internal.h \
...@@ -215,13 +110,13 @@ HEADERS_include_built = \ ...@@ -215,13 +110,13 @@ HEADERS_include_built = \
$(NULL) $(NULL)
include/vlc_symbols.h: Makefile $(HEADERS_include) include/vlc_symbols.h: Makefile $(HEADERS_include)
cd $(srcdir) && ./toolbox --update-includes $(BUILTINS) cd $(srcdir) && $(srcdir)/toolbox --update-includes
src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include) src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
cd $(srcdir) && ./toolbox --update-includes $(BUILTINS) cd $(srcdir) && $(srcdir)/toolbox --update-includes
src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
cd $(srcdir) && ./toolbox --update-includes $(BUILTINS) cd $(srcdir) && $(srcdir)/toolbox --update-includes
# These dependencies are mandatory # These dependencies are mandatory
$(SOURCES): include/vlc_symbols.h $(SOURCES): include/vlc_symbols.h
...@@ -325,18 +220,18 @@ dist-hook: ...@@ -325,18 +220,18 @@ dist-hook:
bin_SCRIPTS = vlc-config bin_SCRIPTS = vlc-config
lib_LIBRARIES += lib/libvlc.a $(LIBRARIES_libvlc_pic) lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
lib_libvlc_a_SOURCES = $(SOURCES_libvlc) lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h dist_lib_libvlc_a_SOURCES = src/misc/modules_plugin.h
lib_libvlc_a_CFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CFLAGS_default) @CFLAGS_vlc@ lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
lib_libvlc_a_CXXFLAGS = $(CPPFLAGS_default) -D__VLC__ $(CXXFLAGS_default) lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
lib_libvlc_a_OBJCFLAGS = $(CPPFLAGS_default) -D__VLC__ $(OBJCFLAGS_default) lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc) lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@ lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic) lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
lib_libvlc_pic_a_OBJCFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(OBJCFLAGS_pic) lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
if HAVE_BEOS if HAVE_BEOS
OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos) OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
...@@ -445,32 +340,25 @@ SOURCES_libvlc = \ ...@@ -445,32 +340,25 @@ SOURCES_libvlc = \
# Building vlc # Building vlc
############################################################################### ###############################################################################
bin_PROGRAMS += vlc bin_PROGRAMS = vlc
vlc_SOURCES = src/vlc.c vlc_SOURCES = src/vlc.c
# @AUTOMAKE_SUCKS@ gets expanded to $(L_builtin) $(LDFLAGS_builtin) vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin`
# but we don't write it directly, otherwise automake will go amok and eat all vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
# the memory because of its 2^N crap algorithm. So we fool him. Nuahaha. vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
vlc_LDADD = lib/libvlc.a $(LDFLAGS_vlc) \
$(DATA_win32_rc) $(LIB_intl) @AUTOMAKE_SUCKS@
vlc_CFLAGS = $(CPPFLAGS_default) $(CFLAGS_default)
# We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
# old automake-1.5 bug (automake/279). # old automake-1.5 bug (automake/279).
DEPENDENCIES_vlc = lib/libvlc.a $(L_builtin) $(DATA_win32_rc) $(LIB_intl) DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl) builtins
vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
@rm -f $(srcdir)/vlc$(EXEEXT) @rm -f $(srcdir)/vlc$(EXEEXT)
if HAVE_BEOS case `$(VLC_CONFIG) --linkage vlc builtin` in \
$(CXXLINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS) c++) $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
else objc) $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
if HAVE_DARWIN c|*) $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) ;; \
$(CXXLINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS) esac
else
$(LINK) $(vlc_LDFLAGS) $(vlc_OBJECTS) $(vlc_LDADD) $(LIBS)
endif
endif
if HAVE_BEOS if HAVE_BEOS
xres -o $@ $(srcdir)/share/vlc_beos.rsrc xres -o $@ $(srcdir)/share/vlc_beos.rsrc
...@@ -483,26 +371,32 @@ if HAVE_BEOS ...@@ -483,26 +371,32 @@ if HAVE_BEOS
done done
endif endif
# Install the symlinks # Install the modules and the symlinks
install-exec-local: install-exec-local:
for i in dummy `$(srcdir)/vlc-config --target plugin` ; do if test "x$$i" != "xdummy" ; then \
$(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | cut -f2 -d/`/" ; \
fi ; done
for i in dummy `$(srcdir)/vlc-config --target builtin` `$(srcdir)/vlc-config --target builtin pic` ; do if test "x$$i" != "xdummy" ; then \
$(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc/" ; \
fi ; done
for i in dummy $(ALIASES) ; do if test "x$$i" != "xdummy" ; then \ for i in dummy $(ALIASES) ; do if test "x$$i" != "xdummy" ; then \
rm -f $(DESTDIR)$(bindir)/$$i && \ rm -f "$(DESTDIR)$(bindir)/$$i" && \
ln -s vlc $(DESTDIR)$(bindir)/$$i ; \ ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
fi ; done fi ; done
if HAVE_DARWIN if HAVE_DARWIN
# Create the MacOS X app # Create the MacOS X app
vlc_app_DATA = VLC.app vlc_app_DATA = VLC.app
vlc_appdir = $(bindir) vlc_appdir = $(bindir)
VLC.app: vlc $(PLUGIN_FILES) VLC.app: vlc plugins
rm -Rf VLC.app rm -Rf VLC.app
cd $(srcdir)/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)' cd $(srcdir)/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
cp -r $(srcdir)/extras/MacOSX/build/vlc.bundle $(srcdir)/VLC.app cp -r $(srcdir)/extras/MacOSX/build/vlc.bundle $(srcdir)/VLC.app
$(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS
$(INSTALL) vlc $(srcdir)/VLC.app/Contents/MacOS/VLC $(INSTALL) vlc $(srcdir)/VLC.app/Contents/MacOS/VLC
$(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/modules $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/modules
for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \ for i in dummy `$(srcdir)/vlc-config --target plugin` ; do \
$(INSTALL) $(srcdir)/$$i \ if test "x$$i" != "xdummy" ; then $(INSTALL) $(srcdir)/$$i$(LIBEXT) \
$(srcdir)/VLC.app/Contents/MacOS/modules/ ; \ $(srcdir)/VLC.app/Contents/MacOS/modules/ ; \
fi ; done fi ; done
$(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share $(INSTALL) -d $(srcdir)/VLC.app/Contents/MacOS/share
...@@ -528,6 +422,18 @@ share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc ...@@ -528,6 +422,18 @@ share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
$(WINDRES) --include-dir $(srcdir)/share -i $< -o $@ $(WINDRES) --include-dir $(srcdir)/share -i $< -o $@
endif endif
###############################################################################
# Building modules
###############################################################################
plugins: FORCE
$(MAKE) `$(VLC_CONFIG) --target plugin` FORCE
builtins: FORCE
$(MAKE) `$(VLC_CONFIG) --target builtin` FORCE
builtins_pic: FORCE
$(MAKE) `$(VLC_CONFIG) --target builtin pic` FORCE
############################################################################### ###############################################################################
# Building architecture-specific binary packages # Building architecture-specific binary packages
############################################################################### ###############################################################################
...@@ -555,8 +461,9 @@ package-win32: ...@@ -555,8 +461,9 @@ package-win32:
unix2dos $(srcdir)/tmp/$${file}.txt ; done unix2dos $(srcdir)/tmp/$${file}.txt ; done
mkdir $(srcdir)/tmp/plugins mkdir $(srcdir)/tmp/plugins
for i in dummy $(PLUGIN_FILES) ; do if test "x$$i" != "xdummy" ; then \ for i in dummy `$(srcdir)/vlc-config --target plugin` ; do \
$(INSTALL) $(srcdir)/$$i $(srcdir)/tmp/plugins/ ; \ if test "x$$i" != "xdummy" ; then \
$(INSTALL) $(srcdir)/$$i$(LIBEXT) $(srcdir)/tmp/plugins/ ; \
fi ; done fi ; done
for i in dummy $(srcdir)/tmp/plugins/*$(LIBEXT) ; \ for i in dummy $(srcdir)/tmp/plugins/*$(LIBEXT) ; \
...@@ -652,9 +559,9 @@ package-macosx: ...@@ -652,9 +559,9 @@ package-macosx:
# Building the Mozilla plugin # Building the Mozilla plugin
############################################################################### ###############################################################################
noinst_LIBRARIES += $(noinst_LIBRARIES_mozilla) noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla)
MOSTLYCLEANFILES += $(LIBRARIES_mozilla) MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl EXTRA_DIST += $(SOURCES_mozilla) mozilla/vlcintf.idl
...@@ -695,13 +602,11 @@ noinst_LIBRARIES_mozilla = mozilla/libplugin.a ...@@ -695,13 +602,11 @@ noinst_LIBRARIES_mozilla = mozilla/libplugin.a
endif endif
mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla) mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla)
mozilla_libplugin_a_CFLAGS = $(CPPFLAGS_pic) $(CFLAGS_pic) \ mozilla_libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla pic` \
$(CPPFLAGS_mozilla) $(CFLAGS_mozilla) \
$(CPPFLAGS_mozilla_EXTRA) $(CPPFLAGS_mozilla_EXTRA)
mozilla_libplugin_a_CXXFLAGS = $(CPPFLAGS_pic) $(CXXFLAGS_pic) \ mozilla_libplugin_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla pic` \
$(CPPFLAGS_mozilla) $(CXXFLAGS_mozilla) \
$(CPPFLAGS_mozilla_EXTRA) $(CPPFLAGS_mozilla_EXTRA)
mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(L_builtin_pic) $(DATA_npvlc_rc) mozilla_libplugin_a_DEPENDENCIES = lib/libvlc_pic.a $(DATA_npvlc_rc) builtins_pic
BUILT_SOURCES_mozilla = mozilla/vlcintf.h BUILT_SOURCES_mozilla = mozilla/vlcintf.h
$(SOURCES_mozilla): mozilla/vlcintf.h $(SOURCES_mozilla): mozilla/vlcintf.h
...@@ -709,11 +614,10 @@ $(SOURCES_mozilla): mozilla/vlcintf.h ...@@ -709,11 +614,10 @@ $(SOURCES_mozilla): mozilla/vlcintf.h
mozilla_plugin_DATA = $(LIBRARIES_mozilla) mozilla_plugin_DATA = $(LIBRARIES_mozilla)
mozilla_plugindir = $(libdir)/mozilla/plugins mozilla_plugindir = $(libdir)/mozilla/plugins
$(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \ $(LIBRARIES_mozilla): $(mozilla_libplugin_a_OBJECTS) \
$(mozilla_libplugin_a_DEPENDENCIES) \ $(mozilla_libplugin_a_DEPENDENCIES)
$(L_builtin_pic)
$(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \ $(CXXLINK) $(mozilla_libplugin_a_OBJECTS) $(DATA_npvlc_rc) \
lib/libvlc_pic.a $(L_builtin_pic) -shared $(LDFLAGS) \ lib/libvlc_pic.a -shared \
$(LDFLAGS_vlc) $(LDFLAGS_mozilla) $(LDFLAGS_builtin_pic) `$(VLC_CONFIG) --libs vlc mozilla builtin pic`
mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt mozilla_vlcintf_xpt_DATA = mozilla/vlcintf.xpt
mozilla_vlcintf_xptdir = $(libdir)/mozilla/components mozilla_vlcintf_xptdir = $(libdir)/mozilla/components
...@@ -737,11 +641,6 @@ endif ...@@ -737,11 +641,6 @@ endif
############################################################################### ###############################################################################
# Modules # Modules
############################################################################### ###############################################################################
MOSTLYCLEANFILES += $(PLUGIN_FILES)
PLUGIN_FILES =
libvlcdir = $(libdir)/vlc
include Modules.am include Modules.am
############################################################################### ###############################################################################
......
#! /bin/sh #! /bin/sh
## bootstrap file for the VLC media player ## bootstrap file for the VLC media player
## $Id: bootstrap,v 1.51 2003/06/23 10:21:25 sam Exp $ ## $Id: bootstrap,v 1.52 2003/06/27 13:50:07 sam Exp $
## ##
## Authors: Samuel Hocevar <sam@zoy.org> ## Authors: Sam Hocevar <sam@zoy.org>
if test x$# != x0; then if test "$#" != "0"; then
echo "Usage: ./bootstrap" echo "Usage: $0"
echo " Calls automake, autoconf, autoheader, autopoint and other auto* to build" echo " Calls automake, autoconf, autoheader, autopoint and other auto* to generate"
echo " Makefiles." echo " m4 macros and prepare Makefiles."
exit 1 exit 1
fi fi
...@@ -23,147 +23,203 @@ export CYGWIN ...@@ -23,147 +23,203 @@ export CYGWIN
## ##
## Naively assume our system doesn't suck. Unfortunately it seldom doesn't. ## Naively assume our system doesn't suck. Unfortunately it seldom doesn't.
## ##
SEDSUCKS=no
PERLSUCKS=no
AUTOMAKESUCKS=no AUTOMAKESUCKS=no
INSTALLSUCKS=no INSTALLSUCKS=no
## ##
## Check that our tools don't suck ## Check that our tools don't suck
## ##
if test ! 20000 -eq `perl -e 'printf "%s\n","a"x20000' | sed -e 's/.//' 2>/dev/null | wc -c`
then
SEDSUCKS=yes
fi
# Mac OS X stacksize sucks
if test x`uname -s` = xDarwin; then ulimit -s 20000; fi
## ##
## Generate the modules makefile, by parsing modules/**/Modules.am ## Generate the modules makefile, by parsing modules/**/Modules.am
## ##
printf "generating Modules.am and vlc.m4" printf "generating modules/**/Makefile.am and m4/private.m4"
# Prepare Modules.am and m4/vlc.m4 # Prepare Modules.am and m4/private.m4
rm -f Modules.am && echo > Modules.am rm -f Modules.am && echo > Modules.am
rm -f m4/vlc.m4 && cat > m4/vlc.m4 << EOF rm -f m4/private.m4 && cat > m4/private.m4 << EOF
dnl Private VLC macros - generated by bootstrap dnl Private VLC macros - generated by bootstrap
dnl The required AM_CONDITIONAL an AC_SUBST calls
AC_DEFUN([VLC_VARIABLES], [
EOF EOF
rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
ALL_FLAGS="`sed -n -e '/^[^=A-Z]*[A-Z]*FLAGS_[^=]*=/s/[^=A-Z]*\([A-Z]*FLAGS_[^=]*=\).*/\1/p' < configure.ac | sort | uniq`" dnl The required AM_CONDITIONAL calls
dnl XXX: too many conditionals make the build very slow, disabled them
AC_DEFUN([AX_VLC_CONDITIONALS], [
EOF
rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
dnl The required AC_SUBST calls
AC_DEFUN([AX_VLC_SUBSTS], [
EOF
rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
dnl The required AC_OUTPUT calls
dnl XXX: this feature is only supported starting from automake-1.7
AC_DEFUN([AX_VLC_MAKEFILES], [AC_OUTPUT([
EOF
rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
dnl Helper macro for vlc-config generation
AC_DEFUN([AX_VLC_CONFIG_HELPER], [
cat >> vlc-config.in << BLAH
EOF
modules="" modules=""
for mf in `sed -ne 's@[^a-z]*\([^ ]*\)am.*@modules/\1am@p' < modules/Makefile.am` count=0
do
printf "."
dir=`echo ${mf} | sed -e 's@\(.*\)/.*@\1@'`
topdir=`echo ${dir} | cut -f2 -d/`
sym=`echo ${dir} | sed -e 'y@/@_@'`
cat >> Modules.am << EOF
# Directory ${dir}
include ${dir}/Modules.am rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT
EXTRA_DIST = LIST
SUBDIRS = .
DIST_SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
EOF