chiark / gitweb /
Merge pull request #4 from xantares/py3k
[nlopt.git] / autogen.sh
1 #!/bin/sh
2
3 configure_args=""
4
5 while test $# -ge 1; do
6     case $1 in
7         --verbose) verbose=yes ;;
8         --enable-*) configure_args="$configure_args $1" ;;
9         --disable-*) configure_args="$configure_args $1" ;;
10         --with-*) configure_args="$configure_args $1" ;;
11         --without-*) configure_args="$configure_args $1" ;;
12         *) echo "unknown argument $1"; exit 1 ;;
13     esac
14     shift
15 done
16
17 touch swig/nlopt.scm.in
18
19 cp README.md README
20
21 # paranoia: sometimes autoconf doesn't get things right the first time
22 autoreconf --verbose --install --symlink --force
23 autoreconf --verbose --install --symlink --force
24 autoreconf --verbose --install --symlink --force
25
26 config=good # hackery so darcs_test still outputs config.log w/failed configure
27
28 ./configure --enable-maintainer-mode $configure_args || config=bad
29
30 if test x$verbose = xyes; then
31     cat config.log
32 fi
33
34 test $config = bad && exit 1