forked from IBMSpectrumComputing/lsf-drmaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·49 lines (41 loc) · 1.05 KB
/
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
#!/bin/sh
# $Id: autogen.sh 1655 2008-11-18 17:08:10Z lukasz $
run() {
echo "running $@ ($PWD)"
eval "$@"
}
check()
{
printf "checking for $1... "
if ($1 --version < /dev/null > /dev/null 2>&1); then
echo "yes"
else
echo "no"
exit 1
fi
}
ACLOCAL=${ACLOCAL:=aclocal}
AUTOHEADER=${AUTOHEADER:=autoheader}
AUTOCONF=${AUTOCONF:=autoconf}
LIBTOOLIZE=${LIBTOOLIZE:=libtoolize}
AUTOMAKE=${AUTOMAKE:=automake}
check $ACLOCAL
check $AUTOHEADER
check $AUTOCONF
check $LIBTOOLIZE
check $AUTOMAKE
mkdir -p scripts
run ${ACLOCAL} -I m4 | grep -v ^/usr/share/aclocal || exit 1
run ${LIBTOOLIZE} --automake --copy --force || exit 1
run ${AUTOHEADER} --warnings=all || exit 1
run ${AUTOMAKE} --foreign --add-missing --copy --warnings=all || exit 1
run ${AUTOCONF} --warnings=all -Wno-obsolete || exit 1
if [ -n "$*" ]; then
args="$*"
elif [ -f config.log ]; then
args=`grep '\$ *\./configure ' config.log \
| sed 's:^ *\$ *\./configure ::;s:--no-create::;s:--no-recursion::' \
2>/dev/null`
fi
(cd drmaa_utils && run sh autogen.sh "$@")
run ./configure ${args}