0
|
1 |
# autogen.sh
|
|
2 |
#
|
|
3 |
# invoke the auto* tools to create the configureation system
|
|
4 |
|
|
5 |
# move out configure.in
|
|
6 |
if ! test -f configure.in; then
|
|
7 |
echo "copying configure.in"
|
|
8 |
ln -s makefiles/configure.in .
|
|
9 |
fi
|
|
10 |
|
|
11 |
# move out the macros and run aclocal
|
|
12 |
if test ! -f acinclude.m4 -a -r makefiles/acinclude.m4; then
|
|
13 |
echo "copying configure macros"
|
|
14 |
ln -s makefiles/acinclude.m4 .
|
|
15 |
fi
|
|
16 |
|
|
17 |
# copy up our Makefile template
|
|
18 |
if ! test -f Makefile.am; then
|
|
19 |
echo "copying automake template"
|
|
20 |
ln -s makefiles/Makefile.am .
|
|
21 |
fi
|
|
22 |
|
|
23 |
echo "running aclocal"
|
|
24 |
aclocal
|
|
25 |
|
|
26 |
# libtool is named glibtool on MacOS X
|
|
27 |
for LIBTOOLIZE in libtoolize glibtoolize nope; do
|
|
28 |
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
|
|
29 |
done
|
|
30 |
if test x$LIBTOOLIZE = xnope; then
|
|
31 |
echo "error: Could not find libtoolize in the path!"
|
|
32 |
echo " You'll need to install a copy of libtool before continuing"
|
|
33 |
echo " with the generation of the build system."
|
|
34 |
echo
|
|
35 |
exit 1
|
|
36 |
fi
|
|
37 |
|
|
38 |
echo "running $LIBTOOLIZE"
|
|
39 |
$LIBTOOLIZE --automake
|
|
40 |
|
|
41 |
echo "running automake"
|
|
42 |
automake --foreign --add-missing
|
|
43 |
|
|
44 |
echo "building configure script"
|
|
45 |
autoconf
|
|
46 |
|
|
47 |
# and finally invoke our new configure
|
|
48 |
./configure $*
|
|
49 |
|
|
50 |
# end
|