]> git.meshlink.io Git - catta/blobdiff - autogen.sh
Ignore macro files added by libtool 2.2.
[catta] / autogen.sh
index 1514221467493e9f8e1142a5d564ec0ad9c32063..78f26c9d632c0cdc5a5e17d9712d31d47add7b2b 100755 (executable)
@@ -24,14 +24,16 @@ run_versioned() {
     local P
     local V
 
-    V=$(echo "$VERSION" | sed -e 's,\.,,g')
+    V=$(echo "$2" | sed -e 's,\.,,g')
     
-    if type -p "$1$V" &> /dev/null ; then
+    if [ -e "`which $1$V`" ] ; then
        P="$1$V" 
-    elif type -p "$1-$2" &> /dev/null ; then
-       P="$1-$2" 
     else
-       P="$1"
+       if [ -e "`which $1-$2`" ] ; then
+           P="$1-$2" 
+       else
+           P="$1"
+       fi
     fi
 
     shift 2
@@ -47,10 +49,19 @@ else
     rm -rf autom4te.cache
     rm -f config.cache
 
-    libtoolize -c --force
+    rm -f Makefile.am~ configure.ac~
+    # Evil, evil, evil, evil hack
+    sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force
+    test -f Makefile.am~ && mv Makefile.am~ Makefile.am
+    test -f configure.ac~ && mv configure.ac~ configure.ac
+
+    test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize
+
+    intltoolize --copy --force --automake
+    "$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
 
     if test "x$NOCONFIGURE" = "x"; then