From 717d32019cf9b5097c1935c0ee93957217efcc4b Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 17 May 2014 06:38:59 +0800 Subject: [PATCH] Add autogen.sh script --- autogen.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 autogen.sh diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..2dd51ed --- /dev/null +++ b/autogen.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +set -ex +rm -rf autom4te.cache Makefile.in aclocal.m4 +aclocal --force + +# GNU libtool is named differently on some systems. This code tries several +# variants like glibtoolize (MacOSX) and libtoolize1x (FreeBSD) + +set +ex +echo "Looking for a version of libtoolize (which can have different names)..." +libtoolize="" +for l in glibtoolize libtoolize15 libtoolize14 libtoolize ; do + $l --version > /dev/null 2>&1 + if [ $? = 0 ]; then + libtoolize=$l + echo "Found $l" + break + fi + echo "Did not find $l" +done + +if [ "x$libtoolize" == "x" ]; then + echo "Can't find libtoolize on your system" + exit 1 +fi + +set -ex +$libtoolize -c -f +autoconf -f -W all,no-obsolete +autoheader -f -W all +automake -a -c -f -W all + +rm -rf autom4te.cache +exit 0 + +# end autogen.sh