forked from cfengine/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogen.sh
executable file
·53 lines (45 loc) · 954 Bytes
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
try_exec() {
type "$1" > /dev/null 2>&1 && exec "$@"
}
unset foo
(: ${foo%%bar}) 2> /dev/null
T1="$?"
if test "$T1" != 0; then
try_exec /usr/xpg4/bin/sh "$0" "$@"
echo "No compatible shell script interpreter found."
echo "Please find a POSIX shell for your system."
exit 42
fi
#
# Do not set -e before switching to POSIX shell, as it will break the test
# above.
#
set -e
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
if [ -z "$NO_SUBPROJECTS" ]; then
#
# Include nova
#
for s in nova; do
if [ -d ${srcdir}/../${s} ]; then
if [ -h ${srcdir}/${s} ]; then
rm -f ${srcdir}/${s}
fi
ln -sf ${srcdir}/../${s} ${srcdir}/${s}
fi
done
else
#
# Clean up just in case
#
rm -f ${srcdir}/nova
fi
autoreconf -Wno-portability --force --install -I m4 || exit 1
cd $ORIGDIR || exit $?
if [ -z "$NO_CONFIGURE" ]; then
$srcdir/configure --enable-maintainer-mode "$@"
fi