1 |
#!/bin/sh |
#!/bin/sh |
2 |
# |
# |
3 |
|
# - Bootstrap script - |
4 |
|
# |
5 |
|
# Copyright(C) 2003-2004 Edouard Gomez <ed.gomez@free.fr> |
6 |
|
# |
7 |
# This file builds the configure script and copies all needed files |
# This file builds the configure script and copies all needed files |
8 |
# provided by automake/libtoolize |
# provided by automake/libtoolize |
9 |
# |
# |
16 |
|
|
17 |
# Find a suitable autoconf |
# Find a suitable autoconf |
18 |
AUTOCONF="autoconf2.50" |
AUTOCONF="autoconf2.50" |
19 |
$AUTOCONF --version 2>/dev/null 1>/dev/null |
$AUTOCONF --version 1>/dev/null 2>&1 |
20 |
|
|
21 |
if [ $? -ne 0 ] ; then |
if [ $? -ne 0 ] ; then |
22 |
AUTOCONF="autoconf" |
AUTOCONF="autoconf" |
23 |
$AUTOCONF --version 2>/dev/null 1>/dev/null |
$AUTOCONF --version 1>/dev/null 2>&1 |
24 |
|
|
25 |
if [ $? -ne 0 ] ; then |
if [ $? -ne 0 ] ; then |
26 |
echo "Autoconf not found" |
echo "ERROR: 'autoconf' not found" |
27 |
exit -1 |
exit -1 |
28 |
fi |
fi |
29 |
fi |
fi |
34 |
AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'` |
AC_MINORVER=`echo $AC_VER | cut -f2 -d'.'` |
35 |
|
|
36 |
if [ "$AC_MAJORVER" -lt "2" ]; then |
if [ "$AC_MAJORVER" -lt "2" ]; then |
37 |
echo "This bootstrapper needs Autoconf >= 2.50 (detected $AC_VER)" |
echo "ERROR: This bootstrapper requires Autoconf >= 2.50 (detected $AC_VER)" |
38 |
exit -1 |
exit -1 |
39 |
fi |
fi |
40 |
|
|
41 |
if [ "$AC_MINORVER" -lt "50" ]; then |
if [ "$AC_MINORVER" -lt "50" ]; then |
42 |
echo "This bootstrapper needs Autoconf >= 2.50 (detected $AC_VER)" |
echo "ERROR: This bootstrapper requires Autoconf >= 2.50 (detected $AC_VER)" |
43 |
|
exit -1 |
44 |
|
fi |
45 |
|
|
46 |
|
LIBTOOLIZE="libtoolize" |
47 |
|
$LIBTOOLIZE --version 1>/dev/null 2>&1 |
48 |
|
|
49 |
|
if [ $? -ne 0 ] ; then |
50 |
|
LIBTOOLIZE="glibtoolize" |
51 |
|
$LIBTOOLIZE --version 1>/dev/null 2>&1 |
52 |
|
|
53 |
|
if [ $? -ne 0 ] ; then |
54 |
|
echo "ERROR: 'libtoolize' not found" |
55 |
|
exit -1 |
56 |
|
fi |
57 |
|
fi |
58 |
|
|
59 |
|
AUTOMAKE="automake" |
60 |
|
$AUTOMAKE --version 1>/dev/null 2>&1 |
61 |
|
|
62 |
|
if [ $? -ne 0 ] ; then |
63 |
|
echo "ERROR: 'automake' not found" |
64 |
exit -1 |
exit -1 |
65 |
fi |
fi |
66 |
|
|
72 |
$AUTOCONF |
$AUTOCONF |
73 |
|
|
74 |
echo "Copying files provided by automake" |
echo "Copying files provided by automake" |
75 |
automake -c -a 1>/dev/null 2>/dev/null |
$AUTOMAKE -c -a 1>/dev/null 2>&1 |
76 |
|
|
77 |
echo "Copying files provided by libtool" |
echo "Copying files provided by libtool" |
78 |
libtoolize -f -c 1>/dev/null 2>/dev/null |
$LIBTOOLIZE -f -c 1>/dev/null 2>&1 |
79 |
|
|
80 |
echo "Removing files that are not needed" |
echo "Removing files that are not needed" |
81 |
rm -rf autom4* |
rm -rf autom4* 1>/dev/null 2>&1 |
82 |
rm -rf ltmain.sh |
rm -rf ltmain.sh 1>/dev/null 2>&1 |