summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2013-06-29 09:45:29 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2013-06-29 09:45:29 +0000
commitcad44cbb185b173312203f46fd9d73171a04ceaa (patch)
tree9a03967f259eb17bc895a81cd736e92185975b48
parent07f334eef464f219bd20377f02662d4a43df4a0d (diff)
downloadlighttpd-cad44cbb185b173312203f46fd9d73171a04ceaa.tar.gz
[auto* build] simplify autogen.sh, handle automake 1.13 test running (fixes #2490)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2878 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--NEWS1
-rwxr-xr-xautogen.sh97
-rw-r--r--configure.ac12
3 files changed, 29 insertions, 81 deletions
diff --git a/NEWS b/NEWS
index cd634c10..e9acde9b 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ NEWS
* fix undefined stuff found with clang
* [cmake] Use TARGET_LINK_LIBRARIES instead of LINK_FLAGS for library dependencies, also add -Wl,--as-needed to extra warnings (fixes #2448)
* [mod_auth] fix invalid read in digest qop=auth-int handling (fixes #2478)
+ * [auto* build] simplify autogen.sh, handle automake 1.13 test running (fixes #2490)
- 1.4.32 - 2012-11-21
* Code cleanup with clang/sparse (fixes #2437, thx kibi)
diff --git a/autogen.sh b/autogen.sh
index 3bdb6b2d..89008a9b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,92 +1,29 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-LIBTOOLIZE_FLAGS="--copy --force"
-AUTOMAKE_FLAGS="--add-missing --copy --foreign"
+if which glibtoolize >/dev/null 2>&1; then
+ LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}
+else
+ LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
+fi
+ACLOCAL=${ACLOCAL:-aclocal}
+AUTOHEADER=${AUTOHEADER:-autoheader}
+AUTOMAKE=${AUTOMAKE:-automake}
+AUTOCONF=${AUTOCONF:-autoconf}
ARGV0=$0
-ARGS="$@"
-
-
-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 2> /dev/null | grep -v '^no'`" = x; then
- LIBTOOLIZE=glibtoolize
- elif test \! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x; then
- LIBTOOLIZE=libtoolize-1.5
- elif test \! "x`which libtoolize 2> /dev/null | grep -v '^no'`" = x; then
- LIBTOOLIZE=libtoolize
- else
- echo "libtoolize 1.5.x wasn't found, exiting"; exit 0
- fi
-fi
-
-## suse has aclocal and aclocal-1.9
-if test x$ACLOCAL = x; then
- if test \! "x`which aclocal-1.9 2> /dev/null | grep -v '^no'`" = x; then
- ACLOCAL=aclocal-1.9
- elif test \! "x`which aclocal19 2> /dev/null | grep -v '^no'`" = x; then
- ACLOCAL=aclocal19
- elif test \! "x`which aclocal 2> /dev/null | grep -v '^no'`" = x; then
- ACLOCAL=aclocal
- else
- echo "automake 1.9.x (aclocal) wasn't found, exiting"; exit 0
- fi
-fi
-
-if test x$AUTOMAKE = x; then
- if test \! "x`which automake-1.9 2> /dev/null | grep -v '^no'`" = x; then
- AUTOMAKE=automake-1.9
- elif test \! "x`which automake19 2> /dev/null | grep -v '^no'`" = x; then
- AUTOMAKE=automake19
- elif test \! "x`which automake 2> /dev/null | grep -v '^no'`" = x; then
- AUTOMAKE=automake
- else
- echo "automake 1.9.x wasn't found, exiting"; exit 0
- fi
-fi
-
-## macosx has autoconf-2.59 and autoconf-2.60
-if test x$AUTOCONF = x; then
- if test \! "x`which autoconf-2.59 2> /dev/null | grep -v '^no'`" = x; then
- AUTOCONF=autoconf-2.59
- elif test \! "x`which autoconf259 2> /dev/null | grep -v '^no'`" = x; then
- AUTOCONF=autoconf259
- elif test \! "x`which autoconf 2> /dev/null | grep -v '^no'`" = x; then
- AUTOCONF=autoconf
- else
- echo "autoconf 2.59+ wasn't found, exiting"; exit 0
- fi
-fi
-
-if test x$AUTOHEADER = x; then
- if test \! "x`which autoheader-2.59 2> /dev/null | grep -v '^no'`" = x; then
- AUTOHEADER=autoheader-2.59
- elif test \! "x`which autoheader259 2> /dev/null | grep -v '^no'`" = x; then
- AUTOHEADER=autoheader259
- elif test \! "x`which autoheader 2> /dev/null | grep -v '^no'`" = x; then
- AUTOHEADER=autoheader
- else
- echo "autoconf 2.59+ (autoheader) wasn't found, exiting"; exit 0
- fi
-fi
+run() {
+ echo "$ARGV0: running \`$@'"
+ "$@"
+}
-mkdir -p m4
-run $LIBTOOLIZE $LIBTOOLIZE_FLAGS
-run $ACLOCAL $ACLOCAL_FLAGS -I m4
+run $LIBTOOLIZE --copy --force
+run $ACLOCAL $ACLOCAL_FLAGS
run $AUTOHEADER
-run $AUTOMAKE $AUTOMAKE_FLAGS
+run $AUTOMAKE --add-missing --copy --foreign --force-missing
run $AUTOCONF
-
-if test "$ARGS" = "" ; then
- echo "Now type './configure ...' and 'make' to compile."
-fi
+echo "Now type './configure ...' and 'make' to compile."
diff --git a/configure.ac b/configure.ac
index 5c27fc3b..5c636fa0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,17 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE([-Wall -Wportability -Wno-override foreign dist-bzip2 tar-ustar])
+dnl HOW FUCKING BROKEN IS AUTOMAKE...
+dnl serial-tests is not recognized before 1.12, and required for serial tests with 1.13, sane version checks "impossible"
+dnl if you don't use the default (symlinked) automake on your box, set AUTOMAKE to the path you're using
+m4_define([serial_tests], [
+ m4_esyscmd([case `${AUTOMAKE:-automake} --version | head -n 1` in
+ *1.11.*|*1.10.*|*1.9.*);;
+ *) echo serial-tests;;
+ esac])
+])
+
+AM_INIT_AUTOMAKE([-Wall -Wno-portability -Wno-override foreign dist-bzip2 tar-ustar] serial_tests)
dnl enable with --enable-silent-rules or make V=0 (needs automake >= 1.11)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])