3 |
# This file builds the configure script and copies all needed files |
# This file builds the configure script and copies all needed files |
4 |
# provided by automake/libtoolize |
# provided by automake/libtoolize |
5 |
# |
# |
6 |
# $Id: bootstrap.sh,v 1.2 2003-02-20 18:39:23 edgomez Exp $ |
# $Id: bootstrap.sh,v 1.5 2004-03-22 22:36:23 edgomez Exp $ |
7 |
|
|
8 |
|
|
9 |
############################################################################## |
############################################################################## |
10 |
# Detect the right autoconf script |
# Detect the right autoconf script |
11 |
############################################################################## |
############################################################################## |
12 |
|
|
13 |
# we first test Debian GNU/Linux autoconf for 2.50 series |
# Find a suitable autoconf |
14 |
AUTOCONF=`which autoconf2.50` |
AUTOCONF="autoconf2.50" |
15 |
|
$AUTOCONF --version 2>/dev/null 1>/dev/null |
16 |
|
|
17 |
|
if [ $? -ne 0 ] ; then |
18 |
|
AUTOCONF="autoconf" |
19 |
|
$AUTOCONF --version 2>/dev/null 1>/dev/null |
20 |
|
|
21 |
if [ ! -x "$AUTOCONF" ] ; then |
if [ $? -ne 0 ] ; then |
22 |
|
echo "'autoconf' not found" |
|
# Test failed, testing generic name -- many distros are shipping 2.13 with |
|
|
# that name, that's why we have to perform an additional test for version. |
|
|
AUTOCONF=`which autoconf` |
|
|
|
|
|
if [ ! -x "$AUTOCONF" ] ; then |
|
|
echo "No autoconf binary found in PATH" |
|
23 |
exit -1 |
exit -1 |
24 |
fi |
fi |
25 |
|
fi |
26 |
|
|
27 |
# Tests the autoconf version |
# Tests the autoconf version |
28 |
AC_VER=`$AUTOCONF --version | head -1 | sed 's/^[^0-9]*//i'` |
AC_VER=`$AUTOCONF --version | head -1 | sed 's/'^[^0-9]*'/''/'` |
29 |
AC_MAJORVER=`echo $AC_VER | cut -f1 -d'.'` |
AC_MAJORVER=`echo $AC_VER | cut -f1 -d'.'` |
30 |
AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'` |
AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'` |
31 |
|
|
39 |
exit -1 |
exit -1 |
40 |
fi |
fi |
41 |
|
|
42 |
|
LIBTOOLIZE="libtoolize" |
43 |
|
$LIBTOOLIZE --version 1>/dev/null 2>/dev/null |
44 |
|
|
45 |
|
if [ $? -ne 0 ] ; then |
46 |
|
LIBTOOLIZE="glibtoolize" |
47 |
|
$LIBTOOLIZE --version 1>/dev/null 2>/dev/null |
48 |
|
|
49 |
|
if [ $? -ne 0 ] ; then |
50 |
|
echo "'libtoolize' not found" |
51 |
|
exit -1 |
52 |
|
fi |
53 |
fi |
fi |
54 |
|
|
55 |
############################################################################## |
############################################################################## |
63 |
automake -c -a 1>/dev/null 2>/dev/null |
automake -c -a 1>/dev/null 2>/dev/null |
64 |
|
|
65 |
echo "Copying files provided by libtool" |
echo "Copying files provided by libtool" |
66 |
libtoolize -f -c 1>/dev/null 2>/dev/null |
$LIBTOOLIZE -f -c 1>/dev/null 2>/dev/null |
67 |
|
|
68 |
echo "Removing files that are not needed" |
echo "Removing files that are not needed" |
69 |
rm -rf autom4* |
rm -rf autom4* |