blob: 2ca7e5dfacdb44930b11fec6f7b033e98d3830d7 [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
Rob Clark4ee1e192011-09-21 17:20:18 -050017mkdir -p config && $aclocal && $autoheader && $libtoolize --copy --force && $automake --copy --add-missing --foreign && $autoconf
Rob Clark487687e2011-07-17 17:29:02 -050018
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