1 #! /bin/sh
3 cd `dirname $0`
5 # on some platforms, you have "g" versions of some of these tools instead,
6 # ie glibtoolize instead of libtoolize..
7 find_tool() {
8 which $1 2> /dev/null || which g$1 2> /dev/null
9 }
11 aclocal=`find_tool aclocal`
12 libtoolize=`find_tool libtoolize`
13 automake=`find_tool automake`
14 autoconf=`find_tool autoconf`
16 mkdir -p config && $aclocal && $libtoolize --copy --force && $automake --copy --add-missing --foreign && $autoconf
18 test -n "$NOCONFIGURE" && {
19 echo "skipping configure stage as requested."
20 echo "autogen.sh done."
21 exit 0
22 }
24 CONFIGURE_DEF_OPT="--enable-maintainer-mode"
25 echo ./configure $CONFIGURE_DEF_OPT $*
26 ./configure $CONFIGURE_DEF_OPT $* || {
27 echo " configure failed"
28 exit 1
29 }
31 echo "Now type 'make' to compile"