Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | cd `dirname $0` |
| 4 | |
| 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 | } |
| 10 | |
| 11 | aclocal=`find_tool aclocal` |
| 12 | libtoolize=`find_tool libtoolize` |
| 13 | automake=`find_tool automake` |
| 14 | autoconf=`find_tool autoconf` |
| 15 | autoheader=`find_tool autoheader` |
| 16 | |
Rob Clark | 4ee1e19 | 2011-09-21 17:20:18 -0500 | [diff] [blame] | 17 | mkdir -p config && $aclocal && $autoheader && $libtoolize --copy --force && $automake --copy --add-missing --foreign && $autoconf |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 18 | |
| 19 | test -n "$NOCONFIGURE" && { |
| 20 | echo "skipping configure stage as requested." |
| 21 | echo "autogen.sh done." |
| 22 | exit 0 |
| 23 | } |
| 24 | |
| 25 | CONFIGURE_DEF_OPT="--enable-maintainer-mode" |
| 26 | echo ./configure $CONFIGURE_DEF_OPT $* |
| 27 | ./configure $CONFIGURE_DEF_OPT $* || { |
| 28 | echo " configure failed" |
| 29 | exit 1 |
| 30 | } |
| 31 | |
| 32 | echo "Now type 'make' to compile" |
| 33 | |