summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-08 14:45:55 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-08 14:45:55 +0000
commitfdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090 (patch)
tree81d199b6fbbb11d3f310668e5bdabf9129e5f41f /autogen.sh
parent232dbc756390d30a86ae6de0cc84600eddb1c0b2 (diff)
downloadlibrcc-fdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090.tar.gz
librcc-fdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090.tar.bz2
librcc-fdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090.tar.xz
librcc-fdfe5b42f687fbf3d4537541cc1b0bd9b8c2c090.zip
08.07.2005
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh76
1 files changed, 69 insertions, 7 deletions
diff --git a/autogen.sh b/autogen.sh
index 917a587..2aa7001 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,9 +1,71 @@
-#!/bin/bash
+#!/bin/sh
+PROG=`basename $0`
+
+KEYFILE=src/librcc.c
+
+# Some OS's have multiple versions (autoconf259, etc.) and don't have an
+# autoconf binary
+
+AUTOCONF=`which autoconf`
+if test x"${AUTOCONF}" != x -a -f ${AUTOCONF}
+then
+ AUTOCONF=autoconf
+ AUTOMAKE=automake
+ ACLOCAL=aclocal
+ LIBTOOLIZE=libtoolize
+ AUTOHEADER=autoheader
+else
+ FINDPATH=`echo ${PATH}|sed -e 's,:, ,g'`
+ AUTOCONF=`find ${FINDPATH} -name "autoconf*"|sort -r|head -1`
+ AUTOMAKE=`find ${FINDPATH} -name "automake*"|sort -r|head -1`
+ ACLOCAL=`find ${FINDPATH} -name "aclocal*"|sort -r|head -1`
+ LIBTOOLIZE=`find ${FINDPATH} -name "libtoolize*"|sort -r|head -1`
+ AUTOHEADER=`find /usr/bin /usr/local/bin -name "autoheader*"|sort -r|head -1`
+ echo "$0: autoconf: using ${AUTOCONF}"
+ echo "$0: automake: using ${AUTOMAKE}"
+ echo "$0: aclocal: using ${ACLOCAL}"
+ echo "$0: libtoolize: using ${LIBTOOLIZE}"
+ echo "$0: autoheader: using ${AUTOHEADER}"
+fi
+
+GETTEXTIZE_FLAGS=--no-changelog
+AUTOPOINT_FLAGS=
+LIBTOOLIZE_FLAGS=
+
+# Some OS's require /usr/local/share/aclocal
+
+if test ! -d /usr/local/share/aclocal
+then
+ ACLOCAL_FLAGS='-I m4'
+else
+ ACLOCAL_FLAGS='-I m4 -I /usr/local/share/aclocal'
+fi
+AUTOHEADER_FLAGS=-Wall
+AUTOMAKE_FLAGS='--add-missing -Wall'
+AUTOCONF_FLAGS=-Wno-obsolete
+
+die()
+{
+ err=$?
+ echo "$PROG: exited by previous error(s), return code was $err" >&2
+ exit 1
+}
+
+if [ ! -f $KEYFILE ]
+then
+ echo "$PROG: key-file \`$KEYFILE' not found, exiting." >&2
+ echo "$PROG: hint: you should run $PROG from top-level sourse directory." >&2
+ exit 1
+fi
+
+# gettextize ${GETTEXTIZE_FLAGS}
+# autopoint ${AUTOPOINT_FLAGS}
+# xml-i18n-toolize || die
+# intltoolize || die
+${LIBTOOLIZE} ${LIBTOOLIZE_FLAGS} --force || die
+${ACLOCAL} ${ACLOCAL_FLAGS} || die
+${AUTOHEADER} ${AUTOHEADER_FLAGS} || die
+${AUTOMAKE} ${AUTOMAKE_FLAGS} || die
+${AUTOCONF} ${AUTOCONF_FLAGS} || die
-rm -f configure
-aclocal
-autoheader
-libtoolize --force
-automake
-autoconf \ No newline at end of file