LEFT | RIGHT |
(no file at all) | |
1 #!/bin/sh | 1 #!/bin/sh |
2 # Run this to generate configure and initial GNUmakefiles | 2 # Run this to generate configure and initial GNUmakefiles |
3 | 3 |
4 srcdir=`dirname $0` | 4 srcdir=`dirname $0` |
5 | 5 |
6 case $1 in | 6 case $1 in |
7 --noconf*) NOCONFIGURE=true;; | 7 --noconf*) NOCONFIGURE=true;; |
8 esac | 8 esac |
9 | 9 |
10 if test -w "$srcdir"; then | 10 if test -w "$srcdir"; then |
11 configure="$srcdir/configure" | 11 configure="$srcdir/configure" |
12 ( | 12 ( |
13 cd "$srcdir" | 13 cd "$srcdir" |
14 echo "Running autoconf ..." | 14 echo "Running autoconf ..." |
15 autoconf || exit 1 | 15 autoconf || exit 1 |
16 ) | 16 ) |
17 else | 17 else |
18 configure=./configure | 18 configure=./configure |
19 conf_flags="--srcdir $srcdir $conf_flags" | 19 conf_flags="--srcdir $srcdir $conf_flags" |
20 echo "Running autoconf for read-only source directory ..." | 20 echo "Running autoconf for read-only source directory ..." |
21 autoconf -I "$srcdir" -o "$configure" "$srcdir/configure.ac" || exit 1 | 21 SRCDIR="$srcdir" autoconf -I "$srcdir" -o "$configure" "$srcdir/configure.ac"
|| exit 1 |
22 fi | 22 fi |
23 # Autoconf automatically checks its own minimum required | 23 # Autoconf automatically checks its own minimum required |
24 # version, and it aborts when the check fails. | 24 # version, and it aborts when the check fails. |
25 test "$?" -eq 1 && exit 1 | 25 test "$?" -eq 1 && exit 1 |
26 | 26 |
27 if test -n "$NOCONFIGURE"; then | 27 if test -n "$NOCONFIGURE"; then |
28 echo Skipping configure process. | 28 echo Skipping configure process. |
29 exit 0 | 29 exit 0 |
30 fi | 30 fi |
31 | 31 |
32 if test -z "$*"; then | 32 if test -z "$*"; then |
33 cat <<EOF | 33 cat <<EOF |
34 Warning: about to run \`configure' without arguments. | 34 Warning: about to run \`configure' without arguments. |
35 arguments on the \`$0' command line | 35 arguments on the \`$0' command line |
36 will be passed to \`configure'. | 36 will be passed to \`configure'. |
37 | 37 |
38 Invoke with --noconfigure to skip configure step. | 38 Invoke with --noconfigure to skip configure step. |
39 EOF | 39 EOF |
40 fi | 40 fi |
41 | 41 |
42 echo Running $configure $conf_flags "$@" ... | 42 echo Running $configure $conf_flags "$@" ... |
43 "$configure" $conf_flags "$@" | 43 "$configure" $conf_flags "$@" |
LEFT | RIGHT |