diff options
author | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-04-17 17:02:14 +0000 |
---|---|---|
committer | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-04-17 17:02:14 +0000 |
commit | c317525246973d32a1eb1a1002ee05d1351234d0 (patch) | |
tree | 26e62b513316ed79da23183fe6857915060aa40d /autogen.sh | |
parent | 824fce8647bb7eba61772662c1b84a26d5bd76fe (diff) | |
download | lighttpd-c317525246973d32a1eb1a1002ee05d1351234d0.tar.gz |
improved the detection of the autoconf/automake versions on different OSes (fixes #973)
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@1783 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'autogen.sh')
-rw-r--r-- | autogen.sh | 65 |
1 files changed, 58 insertions, 7 deletions
@@ -1,28 +1,79 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. -LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} +# LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} LIBTOOLIZE_FLAGS="--copy --force" -ACLOCAL=${ACLOCAL:-aclocal} -AUTOHEADER=${AUTOHEADER:-autoheader} -AUTOMAKE=${AUTOMAKE:-automake} +# ACLOCAL=${ACLOCAL:-aclocal} +# AUTOHEADER=${AUTOHEADER:-autoheader} +# AUTOMAKE=${AUTOMAKE:-automake} AUTOMAKE_FLAGS="--add-missing --copy" -AUTOCONF=${AUTOCONF:-autoconf} +# AUTOCONF=${AUTOCONF:-autoconf} ARGV0=$0 ARGS="$@" -set -e - run() { echo "$ARGV0: running \`$@' $ARGS" $@ $ARGS } +## jump out if one of the programs returns 'false' +set -e + +## on macosx glibtoolize, others have libtool +if test x$LIBTOOLIZE = x; then + if test \! x`which glibtoolize` = x; then + LIBTOOLIZE=glibtoolize + elif test \! x`which libtoolize-1.5` = x; then + LIBTOOLIZE=libtoolize-1.5 + elif test \! x`which libtoolize` = x; then + LIBTOOLIZE=libtoolize + fi +fi + +## suse has aclocal and aclocal-1.9 +if test x$ACLOCAL = x; then + if test \! x`which aclocal-1.9` = x; then + ACLOCAL=aclocal-1.9 + AUTOMAKE=automake-1.9 + elif test \! x`which aclocal` = x; then + ACLOCAL=aclocal + AUTOMAKE=automake + fi +fi + +if test x$AUTOMAKE = x; then + if test \! x`which automake-1.9` = x; then + AUTOMAKE=automake-1.9 + elif test \! x`which automake` = x; then + AUTOMAKE=automake + fi +fi + + +## macosx has autoconf-2.59 and autoconf-2.60 +if test x$AUTOCONF = x; then + if test \! x`which autoconf-2.59` = x; then + AUTOCONF=autoconf-2.59 + elif test \! x`which autoconf` = x; then + AUTOCONF=autoconf + fi +fi + +if test x$AUTOHEADER = x; then + if test \! x`which autoheader-2.59` = x; then + AUTOHEADER=autoheader-2.59 + elif test \! x`which autoheader` = x; then + AUTOHEADER=autoheader + fi +fi + + run $LIBTOOLIZE $LIBTOOLIZE_FLAGS run $ACLOCAL $ACLOCAL_FLAGS run $AUTOHEADER run $AUTOMAKE $AUTOMAKE_FLAGS run $AUTOCONF test "$ARGS" = "" && echo "Now type './configure ...' and 'make' to compile." + |