-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·44 lines (37 loc) · 842 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
#!/bin/bash
#This produces the makefiles and the configure-script.
SOURCE=.
ACLOCAL=aclocal
AUTOHEADER=autoheader
AUTOCONF=autoconf
AUTOMAKE="automake --add-missing --copy"
GENERATE="$SOURCE/generate.sh"
CONFIGURE="$SOURCE/configure"
VERSIONFILE="$SOURCE/version"
CONFIGURE_IN="${CONFIGURE}.in"
#test if help is desired
for beta in $*
do
if test $beta == "--help" && test -a $CONFIGURE; then
$CONFIGURE $*
exit 0;
fi
done
#reading the version information
. $VERSIONFILE
sed -i -e "s/AC_INIT.*/AC_INIT($NAME,$VERSION,$MAINTAINER)/" $CONFIGURE_IN
echo "Creating required files.."
#$GENERATE
echo "Executing.."
for cmd in "$ACLOCAL" "$AUTOHEADER" "$AUTOCONF" "$AUTOMAKE"
do
echo " $cmd"
$cmd
if test $? != 0; then
echo "return value: $?";
exit 1
fi
done
#exec the configure
echo "Configuring.."
$CONFIGURE $*