-
Notifications
You must be signed in to change notification settings - Fork 11
/
autogen.sh
executable file
·33 lines (25 loc) · 823 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
#! /bin/sh
cd `dirname $0`
# on some platforms, you have "g" versions of some of these tools instead,
# ie glibtoolize instead of libtoolize..
find_tool() {
which $1 2> /dev/null || which g$1 2> /dev/null
}
aclocal=`find_tool aclocal`
libtoolize=`find_tool libtoolize`
automake=`find_tool automake`
autoconf=`find_tool autoconf`
autoheader=`find_tool autoheader`
mkdir -p config && $aclocal && $autoheader && $libtoolize --copy --force && $automake --copy --add-missing --foreign && $autoconf
test -n "$NOCONFIGURE" && {
echo "skipping configure stage as requested."
echo "autogen.sh done."
exit 0
}
CONFIGURE_DEF_OPT="--enable-maintainer-mode"
echo ./configure $CONFIGURE_DEF_OPT $*
./configure $CONFIGURE_DEF_OPT $* || {
echo " configure failed"
exit 1
}
echo "Now type 'make' to compile"