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