-
Notifications
You must be signed in to change notification settings - Fork 8
/
autogen.sh
executable file
·33 lines (29 loc) · 776 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
#!/bin/sh
#
# autogen.sh
#
# Usage: ../path/to/autogen.sh [args for configure]
#
# (Re)constructs the configure script using the appropriate invocations
# of autoconf etc.
#
# It is strongly recommended to build in a separate directory
# for easy cleanup.
#
# When this is done, it runs configure with the given arguments.
srcdir=$(dirname $0)
test -z "$srcdir" && srcdir=.
builddir=$(pwd)
cd "$srcdir"
srcdir=$(pwd)
aclocal # creates aclocal.m4 from configure.ac
autoconf # creates configure from configure.ac
autoheader # creates src/config.h.in from configure.ac
if [ "$srcdir" != "$builddir" ]
then
echo "Now running configure $@ in $builddir"
cd "$builddir"
$srcdir/configure "$@"
else
echo "Not running configure in the source directory."
fi