X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bootstrap;h=a5f3dcd5896b869d1f215bd344709eee339c7618;hb=d56426974d40b11baf38c5b641b5c7f83462b759;hp=28f2edaf5d81a450c2c66a5483ccba1f5dad7162;hpb=e2d69c725e4f1f869a60288364f42b14cb7c3fe0;p=vlc diff --git a/bootstrap b/bootstrap index 28f2edaf5d..a5f3dcd589 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #! /bin/sh ## bootstrap file for the VLC media player -## $Id: bootstrap,v 1.56 2003/07/01 16:25:24 sam Exp $ +## $Id: bootstrap,v 1.71 2003/07/24 20:34:47 sam Exp $ ## ## Authors: Sam Hocevar @@ -20,16 +20,14 @@ export LANG CYGWIN=binmode export CYGWIN +set -e + ## ## Naively assume our system doesn't suck. Unfortunately it seldom doesn't. ## AUTOMAKESUCKS=no INSTALLSUCKS=no -## -## Check that our tools don't suck -## - ## ## Generate the modules makefile, by parsing modules/**/Modules.am ## @@ -62,7 +60,6 @@ AC_DEFUN([AX_VLC_CONFIG_HELPER], [ EOF modules="" -count=0 rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF # Autogenerated by bootstrap - DO NOT EDIT @@ -75,11 +72,9 @@ for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac` do printf "." mf="modules/${dir}/Modules.am" - basedir="`echo ${dir} | cut -f1 -d/`" + basedir="${dir%%\/*}" # 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`" - #parent=`echo ${dir} | sed -e 's@[^/]*@..@g'` - #echo " modules/${dir}/Makefile" >> m4/private.m4-tmp3 rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF # Autogenerated by bootstrap - DO NOT EDIT - edit Modules.am instead @@ -94,10 +89,14 @@ SUBDIRS = ${subdirs} #DIST_SUBDIRS = \$(SUBDIRS) libvlcdir = \$(libdir)/vlc/${basedir} include Modules.am + +clean: clean-local +clean-local: + -rm -f *.a *.so *.dll *.sl *.dylib + EOF for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` do - count="`expr ${count} + 1`" if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then PRIVATE='#'; else PRIVATE=''; fi @@ -120,25 +119,54 @@ 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-${mod}: + -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod}) + +EOF + fi + cat >> modules/${dir}/Makefile.am << EOF all-${mod}: - if \$(VLC_CONFIG) --target plugin | grep "${dir}/lib${mod}_plugin" >/dev/null 2>&1 ; then \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}_plugin\$(LIBEXT); fi - if \$(VLC_CONFIG) --target builtin | grep "${dir}/lib${mod}\\.a" >/dev/null 2>&1 ; then \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}.a; fi if BUILD_MOZILLA - if \$(VLC_CONFIG) --target builtin pic | grep "${dir}/lib${mod}_pic\\.a" >/dev/null 2>&1 ; then \$(MAKE) \$(AM_MAKEFLAGS) lib${mod}_pic.a; fi + @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${count}p = lib${mod}_plugin.a -D${count}p = lib${mod}_plugin\$(LIBEXT) -L${count}b = lib${mod}.a -L${count}pic = lib${mod}_pic.a +L${mod}p = lib${mod}_plugin.a +D${mod}p = lib${mod}_plugin\$(LIBEXT) +L${mod}b = lib${mod}.a +L${mod}pic = lib${mod}_pic.a EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF -B${count}p = \$(nodist_SOURCES_${mod}) -B${count}b = \$(nodist_SOURCES_${mod}) +B${mod} = \$(nodist_SOURCES_${mod}) EOF fi cat >> modules/${dir}/Makefile.am << EOF @@ -146,7 +174,7 @@ endif EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF -${PRIVATE}BUILT_SOURCES += \$(B${count}p) \$(B${count}b) +${PRIVATE}BUILT_SOURCES += \$(B${mod}) EOF fi cat >> modules/${dir}/Makefile.am << EOF @@ -183,16 +211,16 @@ lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` -libvlc_LIBRARIES += \$(L${count}b) \$(L${count}pic) -lib${mod}_DATA = \$(D${count}p) +libvlc_LIBRARIES += \$(L${mod}b) \$(L${mod}pic) +lib${mod}_DATA = \$(D${mod}p) lib${mod}dir = \$(libdir)/vlc/${topdir} -${PRIVATE}noinst_LIBRARIES += \$(L${count}p) +${PRIVATE}noinst_LIBRARIES += \$(L${mod}p) ${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS) -${PRIVATE} case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\ -${PRIVATE} c++) \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ -${PRIVATE} objc) \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ -${PRIVATE} c|*) \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ +${PRIVATE} @case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\ +${PRIVATE} c++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ +${PRIVATE} objc) echo \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(OBJCLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ +${PRIVATE} c|*) echo \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(LINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ ${PRIVATE} esac @@ -227,7 +255,7 @@ echo "done." set -x # remove autotools cruft -rm -f aclocal.m4 configure configure.ac.in config.log Modules.am +rm -f aclocal.m4 configure config.log config.h config.h.in # remove old autotools extra cruft rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh # remove new autotools extra cruft @@ -235,8 +263,12 @@ rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh # remove libtool cruft rm -f ltmain.sh libtool ltconfig # remove gettext cruft -rm -f m4/oldgettext.m4 ABOUT-NLS +rm -f ABOUT-NLS rm -Rf intl +# remove old vlc cruft +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 # Check for gettext if gettextize --version >/dev/null 2>&1; then @@ -244,7 +276,7 @@ if gettextize --version >/dev/null 2>&1; then if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \ '>=' 0.11.5 >/dev/null 2>&1; then # We have gettext, and a recent version! Everything is cool. - autopoint || exit 1 + autopoint=autopoint GETTEXT=yes else # User's gettext is too old. try to continue anyway. @@ -256,6 +288,7 @@ 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. @@ -267,6 +300,7 @@ dnl User does not have gettext, so this is a no-op AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) EOF + autopoint=: GETTEXT=no fi @@ -290,14 +324,14 @@ if automake-1.7 --version >/dev/null 2>&1; then amvers="-1.7" # If we also have 1.6, use it instead because it is faster if automake-1.6 --version >/dev/null 2>&1; then - if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" ">" "1.6.1" > /dev/null 2>&1 - then amvers="-1.6" + if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" ">" "1.6.1" > /dev/null 2>&1; then + amvers="-1.6" fi fi elif automake-1.6 --version >/dev/null 2>&1; then amvers="-1.6" - if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1 - then AUTOMAKESUCKS=yes + if expr "`automake-1.6 --version | sed -e '1s/[^0-9]*//' -e q`" "<=" "1.6.1" > /dev/null 2>&1; then + AUTOMAKESUCKS=yes fi elif automake-1.5 --version >/dev/null 2>&1; then INSTALLSUCKS=yes @@ -305,7 +339,7 @@ elif automake-1.5 --version >/dev/null 2>&1; then elif automake --version > /dev/null 2>&1; then amvers="" case "`automake --version | sed -e '1s/[^0-9]*//' -e q`" in - 0|0.*|1|1.[01234]|1.[01234].*) + 0|0.*|1|1.[01234]|1.[01234][-.]*) amvers="none" ;; 1.5|1.5.*) INSTALLSUCKS=yes ;; @@ -320,16 +354,20 @@ if test "${amvers}" = "none"; then exit 1 fi +aclocal=aclocal${amvers} +automake=automake${amvers} +autoconf=autoconf +autoheader=autoheader + # Automake complains if this is not present rm -f vlc-config.in && printf "" > vlc-config.in # Do the rest -aclocal${amvers} -I m4 || exit 1 -autoheader || exit 1 - -automake${amvers} --add-missing --copy - -autoconf || exit 1 +${autopoint} -f +${aclocal} -I m4 +${autoconf} +${autoheader} +${automake} --add-missing --copy ## ## files which need to be regenerated @@ -339,19 +377,15 @@ rm -f src/misc/modules_builtin.h src/misc/modules_plugin.h rm -f include/vlc_symbols.h rm -f mozilla/vlcintf.h -## -## Shut up -## +# Shut up set +x ## ## Tell the user about gettext, pkg-config and sed ## case "${GETTEXT}" in - yes) - ;; - no) - cat << EOF + yes) ;; + no) cat << EOF =========================================================== IMPORTANT NOTE: you do not have gettext installed on your @@ -359,8 +393,7 @@ system. The vlc build will work, but you will not have internationalization support. We suggest installing gettext. EOF ;; - old) - cat << EOF + old) cat << EOF ========================================================== NOTE: you have an old version of gettext installed on your @@ -372,10 +405,8 @@ EOF esac case "$PKGCONFIG" in - yes) - ;; - no) - cat << EOF + yes) ;; + no) cat << EOF ============================================================== NOTE: you do not have the "pkg-config" utility on your system; @@ -386,10 +417,8 @@ EOF esac case "$AUTOMAKESUCKS" in - no) - ;; - yes) - cat << EOF + no) ;; + yes) cat << EOF ============================================================= IMPORTANT NOTE: your version of automake has a bug which will @@ -401,10 +430,8 @@ EOF esac case "$INSTALLSUCKS" in - no) - ;; - yes) - cat << EOF + no) ;; + yes) cat << EOF ============================================================= IMPORTANT NOTE: your version of automake has a bug which will