X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=autogen.sh;h=e6884fba6ec79b074662e3bd994b6e6701f54d0a;hb=3ec08ba7cff9553baaa0e9793ac19ca1c4345538;hp=aabc44039dc7c7458fc6ce298b9515e0a771d012;hpb=8de7c68cdf4973945ff9fd56c0348ca923325d28;p=obnox%2Fwireshark%2Fwip.git diff --git a/autogen.sh b/autogen.sh index aabc44039d..e6884fba6e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,61 +2,124 @@ # # Run this to generate all the initial makefiles. # -# $Id: autogen.sh,v 1.7 1999/12/30 21:34:58 guy Exp $ +# $Id$ -DIE=0 -PROJECT="Ethereal" +DIE=true +PROJECT="Wireshark" +# If you are going to use the non-default name for automake becase your OS +# installaion has multiple versions, you need to call both aclocal and automake +# with that version number, as they come from the same package. +#AM_VERSION='-1.8' + +ACLOCAL=aclocal$AM_VERSION +AUTOHEADER=autoheader +AUTOMAKE=automake$AM_VERSION +AUTOCONF=autoconf + +# Check for python. There's no "--version" option! +python -c "print 'Checking for python.'" +if [ $? != 0 ] ; then + cat >&2 <<_EOF_ + + You must have Python in order to compile $PROJECT. + Download the appropriate package for your distribution/OS, + or get the source tarball at http://www.python.org/ +_EOF_ + DIE="exit 1" +fi + + +ACVER=`$AUTOCONF --version | grep '^autoconf' | sed 's/.*) *//'` +case "$ACVER" in +'' | 0.* | 1.* | 2.[0-5]* ) + cat >&2 <<_EOF_ + + You must have autoconf 2.60 or later installed to compile $PROJECT. + Download the appropriate package for your distribution/OS, + or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/ +_EOF_ + DIE="exit 1" + ;; +esac + + +AMVER=`$AUTOMAKE --version | grep '^automake' | sed 's/.*) *//'` +case "$AMVER" in +1.9* | 1.[1][0-9]*) + ;; + +*) + + cat >&2 <<_EOF_ + + You must have automake 1.9 or later installed to compile $PROJECT. + Download the appropriate package for your distribution/OS, + or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/ +_EOF_ + DIE="exit 1" + ;; +esac + + +# +# Apple's Developer Tools have a "libtool" that has nothing to do with +# the GNU libtool; they call the latter "glibtool". They also call +# libtoolize "glibtoolize". # -# XXX - we should really get the version numbers into variables, and -# check to make sure they have a recent enough version, but I'm -# not sure that the version strings you get are amenable to ordered -# comparisons (e.g., I think some versions of Red Hat Linux may have -# version numbers such as "1.4a"); that may be soluble, but it might -# take some work. +# Check for "glibtool" first. # -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf 2.13 or later installed to compile $PROJECT." - echo "Download the appropriate package for your distribution/OS," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/" - DIE=1 -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have automake 1.4 or later installed to compile $PROJECT." - echo "Download the appropriate package for your distribution/OS," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/" - DIE=1 -} - -(libtool --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have libtool 1.3.4 or later installed to compile $PROJECT." - echo "Download the appropriate package for your distribution/OS," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/" - DIE=1 -} - -if test "$DIE" -eq 1 ; then - exit 1 +LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \ + sed 's/.*libtool) \([0-9][0-9.]*\)[^ ]* .*/\1/'` +if test -z "$LTVER" +then + LTVER=`libtool --version | grep ' libtool)' | \ + sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/' ` + LIBTOOLIZE=libtoolize +else + LIBTOOLIZE=glibtoolize fi +case "$LTVER" in +'' | 0.* | 1.[0-3]* ) -if test -z "$*"; then - echo "Running ./configure with no arguments. If you wish to pass any," - echo "please specify them on the $0 command line." -fi + cat >&2 <<_EOF_ + + You must have libtool 1.4 or later installed to compile $PROJECT. + Download the appropriate package for your distribution/OS, + or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/ +_EOF_ + DIE="exit 1" + ;; +esac + +$DIE -for dir in . wiretap ; do - echo processing $dir - (cd $dir; \ - aclocalinclude="$ACLOCAL_FLAGS"; \ - aclocal $aclocalinclude; \ - autoheader; automake --add-missing --gnu $am_opt; autoconf) -done +aclocal_flags=`./aclocal-flags` +aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags"; +echo $ACLOCAL $aclocalinclude +$ACLOCAL $aclocalinclude || exit 1 +# +# We do NOT want libtoolize overwriting our versions of config.guess and +# config.sub, so move them away and then move them back. +# We don't omit "--force", as we want libtoolize to install other files +# without whining. +# +mv config.guess config.guess.save-libtool +mv config.sub config.sub.save-libtool +LTARGS=" --copy --force" +echo $LIBTOOLIZE $LTARGS +$LIBTOOLIZE $LTARGS || exit 1 +rm -f config.guess config.sub +mv config.guess.save-libtool config.guess +mv config.sub.save-libtool config.sub +echo $AUTOHEADER +$AUTOHEADER || exit 1 +echo $AUTOMAKE --add-missing --gnu $am_opt +$AUTOMAKE --add-missing --gnu $am_opt || exit 1 +echo $AUTOCONF +$AUTOCONF || exit 1 -./configure "$@" +#./configure "$@" || exit 1 echo -echo "Now type 'make' to compile $PROJECT." +echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."