X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bootstrap;h=48e51e928998da0b73a8b796945ddc25a790858f;hb=d82e9eb79e465ccd04206f998bce9bc76f4fdef6;hp=d2bc5cfbe08dce8e9bef219f318dba2586260be5;hpb=edad4b8a0f412b28a2c7c6bc455ccbb027879301;p=vlc diff --git a/bootstrap b/bootstrap index d2bc5cfbe0..48e51e9289 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #! /bin/sh ## bootstrap file for the VLC media player -## $Id: bootstrap,v 1.74 2003/10/23 15:30:22 sam Exp $ +## $Id$ ## ## Authors: Sam Hocevar @@ -29,6 +29,13 @@ set -x AUTOMAKESUCKS=no INSTALLSUCKS=no +# Check for contrib directory +if test -d extras/contrib/bin; then + export PATH=./extras/contrib/bin:$PATH + export LD_LIBRARY_PATH=./extras/contrib/lib:$LD_LIBRARY_PATH + export DYLD_LIBRARY_PATH=./extras/contrib/lib:$DYLD_LIBRARY_PATH +fi + # Check for automake amvers="none" if automake-1.7 --version >/dev/null 2>&1; then @@ -75,26 +82,10 @@ if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \ GETTEXT=yes else # User's gettext is too old. try to continue anyway. - echo > ABOUT-NLS - mkdir -p intl - echo > intl/Makefile.am - cat >> m4/private.m4 << EOF -dnl User's gettext is too old, so this is a no-op -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) - -EOF autopoint=: GETTEXT=old fi;else # we don't have gettext. grmbl. try to continue anyway. - echo > ABOUT-NLS - mkdir -p intl - echo > intl/Makefile.am - cat >> m4/private.m4 << EOF -dnl User does not have gettext, so this is a no-op -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) - -EOF autopoint=: GETTEXT=no fi @@ -104,12 +95,6 @@ if pkg-config --version >/dev/null 2>&1; then # We have pkg-config, everything is cool. PKGCONFIG=yes else - # Not present, use a workaround. - cat >> m4/private.m4 << EOF -dnl User does not have pkg-config, so this is a no-op -AC_DEFUN([PKG_CHECK_MODULES], [:]) - -EOF PKGCONFIG=no fi @@ -123,13 +108,28 @@ autoheader=autoheader ## set +x -printf "generating modules/**/Makefile.am and m4/private.m4" +echo "generating modules/**/Makefile.am and m4/private.m4" # Prepare m4/private.m4 rm -f m4/private.m4 && cat > m4/private.m4 << EOF dnl Private VLC macros - generated by bootstrap EOF + +if [ "${PKGCONFIG}" = "no" ]; then cat >> m4/private.m4 << EOF +dnl User does not have pkg-config, so this is a no-op +AC_DEFUN([PKG_CHECK_MODULES], [:], [], [], []) + +EOF +fi + +if [ "${GETTEXT}" != "yes" ]; then cat >> m4/private.m4 << EOF +dnl User does not have gettext, so this is a no-op +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + +EOF +fi + rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF dnl The required AM_CONDITIONAL calls dnl XXX: too many conditionals make the build very slow, disabled them @@ -163,7 +163,7 @@ for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac` do printf "." mf="modules/${dir}/Modules.am" - basedir="${dir%%\/*}" + basedir="`echo "${dir}" | cut -f1 -d/`" # automake will not recurse for make dist if we don't define SUBDIRS = . subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`" rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF @@ -181,16 +181,28 @@ SUBDIRS = ${subdirs} libvlcdir = \$(libdir)/vlc/${basedir} include Modules.am +if BUILD_MOZILLA if HAVE_WIN32 # There's no need for pic code on win32 so get rid of this to substantially # reduce the compilation time. pic = no endif +else +pic = no +endif -clean: clean-local clean-local: -rm -f *.a *.so *.dll *.sl *.dylib +all: all-modules +all-modules: + @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ + if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target plugin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}_plugin*) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\ + if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target builtin); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}.a*) echo lib\$\${mod}.a;; esac; done; fi; \\ + if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --target builtin pic); for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z" in */lib\$\${mod}_pic.a*) echo lib\$\${mod}_pic.a;; esac; done; fi; \\ + \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ + test -z "\$\$fail" + EOF for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` do @@ -216,46 +228,16 @@ EOF # work properly with any automake version I tested. cat >> modules/${dir}/Makefile.am << EOF # The ${mod} plugin -clean: clean-${mod} -all: all-${mod} EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF +clean-local: clean-${mod} clean-${mod}: -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod}) EOF fi cat >> modules/${dir}/Makefile.am << EOF -all-${mod}: -if BUILD_MOZILLA - @set fnord \$\$MAKEFLAGS; amf=\$\$2; \\ - if test "\$(plugin)" != "no" \\ - && \$(VLC_CONFIG) --target plugin | grep "${dir}/lib${mod}_plugin" >/dev/null 2>&1; then \\ - \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}_plugin\$(LIBEXT) || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \\ - fi; \\ - if test "\$(builtin)" != "no" \\ - && \$(VLC_CONFIG) --target builtin | grep "${dir}/lib${mod}\\.a" >/dev/null 2>&1; then \\ - \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}.a || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \\ - fi; \\ - if test "\$(pic)" != "no" \\ - && \$(VLC_CONFIG) --target builtin pic | grep "${dir}/lib${mod}_pic\\.a" >/dev/null 2>&1; then \\ - \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}_pic.a || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \\ - fi; \\ - test -z "\$\$fail" -else - @set fnord \$\$MAKEFLAGS; amf=\$\$2; \\ - if test "\$(plugin)" != "no" \\ - && \$(VLC_CONFIG) --target plugin | grep "${dir}/lib${mod}_plugin" >/dev/null 2>&1; then \\ - \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}_plugin\$(LIBEXT) || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \\ - fi; \\ - if test "\$(builtin)" != "no" \\ - && \$(VLC_CONFIG) --target builtin | grep "${dir}/lib${mod}\\.a" >/dev/null 2>&1; then \\ - \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}.a || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \\ - fi; \\ - test -z "\$\$fail" -endif - if UNTRUE L${mod}p = lib${mod}_plugin.a D${mod}p = lib${mod}_plugin\$(LIBEXT) @@ -344,7 +326,7 @@ BLAH EOF cat m4/private.m4-tmp4 >> m4/private.m4 && rm -f m4/private.m4-tmp4 -echo "done." +echo " done." ### ### classic bootstrap stuff @@ -353,6 +335,7 @@ set -x # remove autotools cruft rm -f aclocal.m4 configure config.log config.h config.h.in +rm -Rf autom4te.cache # remove old autotools extra cruft rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh # remove new autotools extra cruft @@ -367,8 +350,13 @@ rm -f m4/oldgettext.m4 stamp-pic configure.ac.in Modules.am # remove new vlc cruft rm -f stamp-builtin stamp-h* mozilla/stamp-pic -# Automake complains if this is not present +# Automake complains if these are not present rm -f vlc-config.in && printf "" > vlc-config.in +if [ "$GETTEXT" != "yes" ]; then + test -d intl || mkdir intl + printf "" > intl/Makefile.am + printf "" > ABOUT-NLS +fi # Do the rest ${autopoint} -f