-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·72 lines (61 loc) · 2.15 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
#
# Simple wrapper script around autoreconf and configure, with some
# standard developer flags set.
#
# To just run autoreconf and not configure, set NOCONFIGURE=1
# To just run configure and not autoreconf, set NORECONF=1
#
package_name="rnumber"
# Default configure flags: Enable makefile dependency rules
# and disable optimization.
conf_flags="--enable-maintainer-mode --disable-opt"
#MAKE=`which gnumake 2>/dev/null`
MAKE=`which gmake 2>/dev/null`
if test ! -x "$MAKE" ; then MAKE=`which gmake` ; fi
if test ! -x "$MAKE" ; then MAKE=`which make` ; fi
HAVE_GNU_MAKE=`$MAKE --version|grep -c "Free Software Foundation"`
if test "$HAVE_GNU_MAKE" != "1"; then
echo !!!! ERROR: You need GNU make to build $package_name;
echo !!!! $MAKE is not GNU make;
exit 1;
fi
echo Found GNU Make at $MAKE ... good.
echo This script runs autoreconf and configure.
echo To skip the reconfigure step, set NORECONF=1.
echo To skip the configure step, set NOCONFIGURE=1.
echo Put necessary arguments for configure on the command line.
srcdir=`dirname $0`
echo "Source dir (srcdir): $srcdir"
test -z "$srcdir" && srcdir=.
(test -f $srcdir/configure.ac) || {
echo "Error: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
(autoreconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "Error: You must have \`autoreconf' installed to compile $package_name."
echo "It is available at ftp://ftp.gnu.org/pub/gnu"
exit 1;
}
if test -z "$*"; then
echo "Running \`configure' with no arguments."
echo "Arguments may be passed on the \`$0\` command line."
fi
if [ x$NORECONF = x ]; then
echo "Running autoreconf. To skip this step, prefix script with NORECONF=1"
autoreconf --install --force || exit 1
else
echo "Skipping autoreconf process."
fi
echo "Done with automake processing."
# Run configure unless NOCONFIGURE is set.
if [ x$NOCONFIGURE = x ]; then
echo Running $srcdir/configure $conf_flags "$@" ...
echo "To not run configure, run this script prefixed with NOCONFIGURE=1"
$srcdir/configure $conf_flags "$@" \
&& echo "Now type \'make\' to compile $package_name" || exit 1
else
echo "Skipping configure process."
fi