]> git.sesse.net Git - vlc/blobdiff - bootstrap
* all: added a i_ttl field in network_socket_t to allow per connection ttl
[vlc] / bootstrap
index f9d884bd8558f6e7b0e05f8bf13b9d118a0cbfc4..a5f3dcd5896b869d1f215bd344709eee339c7618 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 ##  bootstrap file for the VLC media player
-##  $Id: bootstrap,v 1.65 2003/07/05 14:47:53 sam Exp $
+##  $Id: bootstrap,v 1.71 2003/07/24 20:34:47 sam Exp $
 ##
 ##  Authors: Sam Hocevar <sam@zoy.org>
 
@@ -60,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
@@ -73,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
@@ -93,13 +90,13 @@ SUBDIRS = ${subdirs}
 libvlcdir = \$(libdir)/vlc/${basedir}
 include Modules.am
 
-clean:
-       rm -f *.a *.so *.dll *.sl *.dylib
+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
@@ -122,9 +119,17 @@ 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 BUILD_MOZILLA
        @set fnord \$\$MAKEFLAGS; amf=\$\$2; \\
@@ -155,13 +160,13 @@ else
 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} = \$(nodist_SOURCES_${mod})
+B${mod} = \$(nodist_SOURCES_${mod})
 EOF
     fi
     cat >> modules/${dir}/Makefile.am << EOF
@@ -169,7 +174,7 @@ endif
 
 EOF
     if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
-${PRIVATE}BUILT_SOURCES += \$(B${count})
+${PRIVATE}BUILT_SOURCES += \$(B${mod})
 EOF
     fi
     cat >> modules/${dir}/Makefile.am << EOF
@@ -206,11 +211,11 @@ 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++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
@@ -250,7 +255,7 @@ echo "done."
 set -x
 
 # remove autotools cruft
-rm -f aclocal.m4 configure configure.ac.in config.log Modules.am config.h config.h.in
+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
@@ -258,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
@@ -267,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
+  autopoint=autopoint
   GETTEXT=yes
 else
   # User's gettext is too old. try to continue anyway.
@@ -279,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.
@@ -290,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
 
@@ -313,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
@@ -343,14 +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
-autoconf
-autoheader
-automake${amvers} --add-missing --copy
+${autopoint} -f
+${aclocal} -I m4
+${autoconf}
+${autoheader}
+${automake} --add-missing --copy
 
 ##
 ##  files which need to be regenerated