summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2004-07-02 18:41:52 +0000
committerMichael Jennings <mej@kainx.org>2004-07-02 18:41:52 +0000
commitd83cddee164324035ba85962a9cc353b52c00430 (patch)
treeedb76500e126c6aa4893553c3c5fb06729b89e61 /autogen.sh
parente7902d6c77234cfdcfd06e2ca17f3802aa43fd43 (diff)
downloadimlib2-d83cddee164324035ba85962a9cc353b52c00430.tar.gz
Fri Jul 2 14:41:17 2004 Michael Jennings (mej)
Now builds properly on Vermillion, cAos, and CentOS. Hopefully others too. :-) ---------------------------------------------------------------------- SVN revision: 10667
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh64
1 files changed, 55 insertions, 9 deletions
diff --git a/autogen.sh b/autogen.sh
index 88ee7f3..4483cd2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,13 +1,59 @@
#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+# $Id$
-rm -rf autom4te.cache
-rm -f aclocal.m4
+broken() {
+ echo
+ echo "You need libtool, autoconf, and automake. Install them"
+ echo "and try again. Get source at ftp://ftp.gnu.org/pub/gnu/"
+ echo "ERROR: $1 not found."
+ exit -1
+}
-echo "Running aclocal..."; aclocal $ACLOCAL_FLAGS -I m4 \
-&& echo "Running autoheader..."; autoheader \
-&& echo "Running autoconf..."; autoconf \
-&& echo "Running libtoolize..."; libtoolize --automake \
-&& echo "Running automake..."; automake --add-missing --copy --gnu
+DIE=0
-### If you want this, uncomment it.
-./configure "$@"
+echo "Generating configuration files for Imlib2, please wait...."
+
+LIBTOOLIZE_CHOICES="$LIBTOOLIZE libtoolize"
+AUTOHEADER_CHOICES="$AUTOHEADER autoheader213 autoheader-2.13 autoheader"
+ACLOCAL_CHOICES="$ACLOCAL aclocal14 aclocal-1.4 aclocal"
+AUTOMAKE_CHOICES="$AUTOMAKE automake14 automake-1.4 automake"
+AUTOCONF_CHOICES="$AUTOCONF autoconf213 autoconf-2.13 autoconf"
+
+for i in $LIBTOOLIZE_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && LIBTOOLIZE=$i && break
+done
+[ "x$LIBTOOLIZE" = "x" ] && broken libtool
+
+for i in $AUTOHEADER_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOHEADER=$i && break
+done
+[ "x$AUTOHEADER" = "x" ] && broken autoconf
+
+for i in $ACLOCAL_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && ACLOCAL=$i && break
+done
+[ "x$ACLOCAL" = "x" ] && broken automake
+
+for i in $AUTOMAKE_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOMAKE=$i && break
+done
+[ "x$AUTOMAKE" = "x" ] && broken automake
+
+for i in $AUTOCONF_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOCONF=$i && break
+done
+[ "x$AUTOCONF" = "x" ] && broken autoconf
+
+# Export them so configure can AC_SUBST() them.
+export LIBTOOLIZE AUTOHEADER ACLOCAL AUTOMAKE AUTOCONF
+
+# Run the stuff.
+(set -x && $LIBTOOLIZE -c -f --ltdl)
+(set -x && $AUTOHEADER)
+(set -x && $ACLOCAL $ACLOCAL_FLAGS -I m4)
+(set -x && $AUTOMAKE -a -c)
+(set -x && $AUTOCONF)
+
+# Run configure.
+./configure `sh config.guess` "$@"