]> err.no Git - varnish/commitdiff
Adapt for use on MacOS X / Darwin, which has GNU libtool installed as
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 19 Jul 2007 11:17:59 +0000 (11:17 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 19 Jul 2007 11:17:59 +0000 (11:17 +0000)
glibtool, and has a version of automake 1.6 which does not exhibit the
bug I've observed on other platforms.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1720 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/autogen.sh

index 034c95b5fd954bb21958faf5f455c2d0ba85f915..457a7d000f96b7f5b18207b2dc47fce6cb6ab1bb 100755 (executable)
@@ -3,22 +3,34 @@
 # $Id$
 #
 
-if [ -d /usr/local/gnu-autotools/bin ] ; then
-       PATH=/usr/local/gnu-autotools/bin:${PATH}
-       export PATH
-       FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
-fi
+warn() {
+       echo "WARNING: $@" 1>&2
+}
+
+case `uname -s` in
+Darwin)
+       LIBTOOLIZE=glibtoolize
+       ;;
+FreeBSD)
+       LIBTOOLIZE=libtoolize
+       if [ -d /usr/local/gnu-autotools/bin ] ; then
+               PATH=/usr/local/gnu-autotools/bin:${PATH}
+               export PATH
+               FIX_BROKEN_FREEBSD_PORTS="-I /usr/local/share/aclocal"
+       fi
+       ;;
+Linux)
+       LIBTOOLIZE=libtoolize
+       ;;
+esac
 
 automake_version=$(automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+')
 if [ -z "$automake_version" ] ; then
-    echo "unable to determine automake version"
-    exit 1
+    warn "unable to determine automake version"
 else
     case $automake_version in
        0.*|1.[0-8]|1.[0-8][.-]*)
-           echo "your version of automake ($automake_version) is too old;" \
-               "you need 1.9 or newer."
-           exit 1
+           warn "automake ($automake_version) detected; 1.9 or newer recommended"
            ;;
        *)
            ;;
@@ -28,7 +40,7 @@ fi
 set -ex
 
 aclocal ${FIX_BROKEN_FREEBSD_PORTS}
-libtoolize --copy --force
+$LIBTOOLIZE --copy --force
 autoheader
 automake --add-missing --copy --foreign
 autoconf