| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
# Running aclocal here first (as happened for a while) caused the macros that
|
| 4 |
# libtoolize puts in the m4 directory to be newer than the aclocal.m4 file that
|
| 5 |
# aclocal creates. This meant that the next "make" cause aclocal to be run
|
| 6 |
# again. Moving aclocal to after libtoolize does not seem to cause any
|
| 7 |
# problems, and it fixes this issue.
|
| 8 |
|
| 9 |
# GNU libtool is named differently on some systems. This code tries several
|
| 10 |
# variants like glibtoolize (MacOSX) and libtoolize1x (FreeBSD)
|
| 11 |
|
| 12 |
set +ex
|
| 13 |
echo "Looking for a version of libtoolize (which can have different names)..."
|
| 14 |
libtoolize=""
|
| 15 |
for l in glibtoolize libtoolize15 libtoolize14 libtoolize ; do
|
| 16 |
$l --version > /dev/null 2>&1
|
| 17 |
if [ $? = 0 ]; then
|
| 18 |
libtoolize=$l
|
| 19 |
echo "Found $l"
|
| 20 |
break
|
| 21 |
fi
|
| 22 |
echo "Did not find $l"
|
| 23 |
done
|
| 24 |
|
| 25 |
if [ "x$libtoolize" = "x" ]; then
|
| 26 |
echo "Can't find libtoolize on your system"
|
| 27 |
exit 1
|
| 28 |
fi
|
| 29 |
|
| 30 |
set -ex
|
| 31 |
$libtoolize -c -f
|
| 32 |
rm -rf autom4te.cache Makefile.in aclocal.m4
|
| 33 |
aclocal --force -I m4
|
| 34 |
autoconf -f -W all,no-obsolete
|
| 35 |
autoheader -f -W all
|
| 36 |
|
| 37 |
# Added no-portability to suppress automake 1.12's warning about the use
|
| 38 |
# of recursive variables.
|
| 39 |
|
| 40 |
automake -a -c -f -W all,no-portability
|
| 41 |
|
| 42 |
rm -rf autom4te.cache
|
| 43 |
exit 0
|
| 44 |
|
| 45 |
# end autogen.sh
|