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