X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=autogen.sh;h=f75ad605a66f2474943afb8fdc78fffa1d12f6e9;hb=e326958e7cca604e73c56c51a87fbc366d6ab725;hp=a416dbe78eabc9d8a4e9b47e18ebebabbd327b35;hpb=2251c8b21a639a6edd8b513c80ae6daafecf41ac;p=catta diff --git a/autogen.sh b/autogen.sh index a416dbe..f75ad60 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,7 +22,19 @@ VERSION=1.9 run_versioned() { local P - type -p "$1-$2" &> /dev/null && P="$1-$2" || local P="$1" + local V + + V=$(echo "$2" | sed -e 's,\.,,g') + + if [ -e "`which $1$V`" ] ; then + P="$1$V" + else + if [ -e "`which $1-$2`" ] ; then + P="$1-$2" + else + P="$1" + fi + fi shift 2 "$P" "$@" @@ -37,13 +49,16 @@ else rm -rf autom4te.cache rm -f config.cache - libtoolize -c --force + test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize + + "$LIBTOOLIZE" -c --force run_versioned aclocal "$VERSION" -I common - autoconf -Wall - autoheader + run_versioned autoconf 2.59 -Wall + run_versioned autoheader 2.59 run_versioned automake "$VERSION" -a -c --foreign - ./configure "$@" - - make clean + if test "x$NOCONFIGURE" = "x"; then + ./configure "$@" + make clean + fi fi