fi
if [ "$LEX" != "" ]; then
- flexver=`$LEX --version|sed "s/.* //"`
+ flexver=`$LEX --version|awk '{print $2}'`
else
- flexver=`flex --version|sed "s/.* //"`
+ flexver=`flex --version|awk '{print $2}'`
fi
if [ "$flexver" = "" ]; then
fi
fi
-aclocal -I m4 \
- && libtoolize --force --copy \
+case `uname` in
+ Darwin*)
+ if [ "`glibtoolize --version`" = "" ]; then
+ echo MacOS requires glibtool from either Macport or brew
+ exit 1
+ fi
+ LIBTOOL="glibtoolize --force --copy"
+ ;;
+ *)
+ LIBTOOL="libtoolize --force --copy"
+ ;;
+esac
+
+${LIBTOOL} \
+ && aclocal -I m4 \
+ && autoconf \
&& autoheader \
- && automake --add-missing --foreign --copy \
- && autoconf
+ && automake --add-missing --foreign --copy
if test -z "$NOCONFIGURE"; then
-exec ./configure --enable-maintainer-mode $@
+exec ./configure --enable-maintainer-mode "$@"
fi