6
libtoolize=`conftools/PrintPath glibtoolize libtoolize libtoolize15 libtoolize14`
7
if [ "x$libtoolize" = "x" ]; then
8
echo "libtoolize not found in path"
13
# Create the libtool helper files
15
# Note: we copy (rather than link) the files.
17
# Note: This bundled version of expat will not always replace the
18
# files since we have a special config.guess/config.sub that we
19
# want to ensure is used.
20
echo "Copying libtool helper files ..."
22
# Remove any m4 cache and libtool files so one can switch between
23
# autoconf and libtool versions by simply rerunning the buildconf script.
25
(cd conftools ; rm -f ltconfig ltmain.sh)
26
rm -rf aclocal.m4 libtool.m4 ltsugar.m4 autom4te*.cache
28
$libtoolize --copy --automake
31
# Build aclocal.m4 from libtool's libtool.m4
33
if [ -f libtool.m4 ]; then
36
ltpath=`dirname $libtoolize`
37
ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
39
echo "Incorporating $ltfile into aclocal.m4 ..."
40
echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4
41
echo "dnl edits here will be lost" >> aclocal.m4
42
cat $ltfile >> aclocal.m4
44
if [ -f ltsugar.m4 ]; then
45
echo "Incorporating ltsugar.m4 into aclocal.m4 ..."
46
cat ltsugar.m4 >> aclocal.m4
50
rm -f libtool.m4 ltsugar.m4
52
cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
55
# Generate the autoconf header template (config.h.in) and ./configure
57
echo "Creating config.h.in ..."
58
${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
60
echo "Creating configure ..."
61
### do some work to toss config.cache?
62
${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
64
# Remove autoconf caches
65
rm -rf autom4te*.cache