]> git.sesse.net Git - vlc/blobdiff - bootstrap
* Makefile.old: Fixed BeOS compilation.
[vlc] / bootstrap
index c9f8e02842b1dec096c633b744d9523b22c871ea..0ac4fbc7ebec9619eaad720787d4718fccc73fce 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,14 +1,15 @@
 #! /bin/sh
 
 ##  bootstrap.sh file for vlc, the VideoLAN Client
-##  $Id: bootstrap,v 1.9 2002/08/28 13:38:14 sam Exp $
+##  $Id: bootstrap,v 1.13 2002/08/29 23:53:22 massiot Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
 ###
 ###  get a sane environment
 ###
-export LANG=C
+LANG=C
+export LANG
 
 ###
 ###  argument check
@@ -33,44 +34,65 @@ set -x
 rm -f aclocal.m4 configure config.guess config.log config.sub ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh
 
 # Check for gettext
-if which gettextize >/dev/null 2>&1
+if gettextize --version >/dev/null 2>&1
 then
 if expr `gettextize --version | sed -e '1s/[^0-9]*//' -e q` \
         '>' 0.11.3 >/dev/null 2>&1
 then
   # We have gettext, and a recent version! Everything is cool.
   autopoint --force
-  rm -f m4/Makefile.am
-  echo 'EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4' > m4/Makefile.am
   GETTEXT=yes
 else
   # What?! User is not using a recent version of gettext? We'll have to
   # cheat a bit, then.
   rm -f po/ChangeLog~
-  aclocaldir=`gettextize --copy --force | grep '^from the' | cut -f3 -d' '`
+  gettextize --copy --force | grep '^from the' | cut -f3 -d' '
   # Yuck!
   test -f po/ChangeLog~ && mv po/ChangeLog~ po/ChangeLog
-  mkdir -p m4
-  # Yuck! - don't copy anything, it makes old autoconf barf.
-  #for file in codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 \
-  #            lcmessage.m4 progtest.m4
-  #  do cp ${aclocaldir}/${file} m4/
-  #done
   # Yuck!
-  echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/gettext.m4
+  echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/oldgettext.m4
   GETTEXT=old
 fi;else
   # we don't have gettext. grmbl. try to continue anyway.
-  mkdir -p m4
-  echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/gettext.m4
-  echo 'AC_DEFUN([AM_GNU_GETTEXT], [])' >> m4/gettext.m4
+  mkdir -p intl
+  echo > intl/Makefile.am
+  echo 'AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])' > m4/oldgettext.m4
   GETTEXT=no
 fi
 
-`which automake-1.6 >/dev/null 2>&1` && amvers=1.6 || amvers=1.5
-aclocal-${amvers} -I m4
+# Check for automake
+amvers="none"
+if automake-1.6 --version >/dev/null 2>&1
+then
+  amvers="-1.6"
+else
+  if automake-1.5 --version >/dev/null 2>&1
+  then
+    amvers="-1.5"
+  else
+    if automake --version > /dev/null 2>&1
+    then
+      amvers=`automake --version | head -1 | cut -d\  -f 4`
+
+      if expr "$amvers" "<" "1.5" > /dev/null 2>&1
+      then amvers="none"
+      else amvers=""
+      fi
+    fi
+  fi
+fi
+
+if test x$amvers = xnone
+then
+  set +x
+  echo "you need automake version 1.5 or later"
+  exit 1
+fi
+
+# Do the rest
+aclocal${amvers} -I m4
 autoheader
-automake-${amvers} --foreign --add-missing --copy
+automake${amvers} --foreign --add-missing --copy
 autoconf
 
 # nuahahahahaha !! overwriting Makefile.in with what *I* want!