diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-17 10:59:34 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-17 10:59:34 +0200 |
commit | b30ffe08194f5b1573ba7ce101dea356bb9fdb54 (patch) | |
tree | ac53b1e725aa41ee81489c3aa0053f897f8106f8 /autogen.sh |
Initial skeleton of libvisio
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..02903a2 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,60 @@ +#!/bin/sh +TESTLIBTOOLIZE="glibtoolize libtoolize" + +LIBTOOLIZEFOUND="0" + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +olddir=`pwd` +cd $srcdir + +aclocal --version > /dev/null 2> /dev/null || { + echo "error: aclocal not found" + exit 1 +} +automake --version > /dev/null 2> /dev/null || { + echo "error: automake not found" + exit 1 +} + +for i in $TESTLIBTOOLIZE; do + if which $i > /dev/null 2>&1; then + LIBTOOLIZE=$i + LIBTOOLIZEFOUND="1" + break + fi +done + +if [ "$LIBTOOLIZEFOUND" = "0" ]; then + echo "$0: need libtoolize tool to build libvisio" >&2 + exit 1 +fi + +amcheck=`automake --version | grep 'automake (GNU automake) 1.5'` +if test "x$amcheck" = "xautomake (GNU automake) 1.5"; then + echo "warning: you appear to be using automake 1.5" + echo " this version has a bug - GNUmakefile.am dependencies are not generated" +fi + +rm -rf autom4te*.cache + +$LIBTOOLIZE --force --copy || { + echo "error: libtoolize failed" + exit 1 +} +aclocal $ACLOCAL_FLAGS || { + echo "error: aclocal $ACLOCAL_FLAGS failed" + exit 1 +} +autoheader || { + echo "error: autoheader failed" + exit 1 +} +automake -a -c --foreign || { + echo "warning: automake failed" +} +autoconf || { + echo "error: autoconf failed" + exit 1 +} |