3 #--------------------------------------------------------------------------
4 # autoconf 2.52 or newer
6 ac_version
="`${AUTOCONF:-autoconf} --version 2> /dev/null | head -1 | sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`"
7 if test -z "$ac_version"; then
8 echo "ERROR: autoconf not found."
9 echo " You need autoconf version 2.52 or newer installed."
12 IFS
=.
; set $ac_version; IFS
=' '
13 if test "$1" = "2" -a "$2" -lt "52" ||
test "$1" -lt "2"; then
14 echo "ERROR: autoconf version $ac_version found."
15 echo " You need autoconf version 2.52 or newer installed."
19 echo "found: autoconf version $ac_version (ok)"
21 #--------------------------------------------------------------------------
22 # libtool 1.4 or newer
26 # find libtoolize, or glibtoolize on MacOS X
28 libtoolize
=`conftools/PrintPath glibtoolize libtoolize`
29 if [ "x$libtoolize" = "x" ]; then
30 echo "ERROR: libtoolize not found."
31 echo " You need libtool version 1.4 or newer installed"
35 lt_pversion
="`$libtoolize --version 2> /dev/null | sed -e 's/^[^0-9]*//'`"
37 # convert something like 1.4p1 to 1.4.p1
38 lt_version
="`echo $lt_pversion | sed -e 's/\([a-z]*\)$/.\1/'`"
40 IFS
=.
; set $lt_version; IFS
=' '
41 if test "$1" = "1" -a "$2" -lt "4"; then
42 echo "ERROR: libtool version $lt_pversion found."
43 echo " You need libtool version 1.4 or newer installed"
47 echo "found: libtool version $lt_pversion (ok)"
49 #--------------------------------------------------------------------------
51 # Remove any libtool files so one can switch between libtool 1.3
52 # and libtool 1.4 by simply rerunning the buildconf script.
53 (cd conftools
/; rm -f ltmain.sh ltconfig
)
56 # Create the libtool helper files
58 echo "Copying libtool helper files ..."
61 # Note: we don't use --force (any more) since we have a special
62 # config.guess/config.sub that we want to ensure is used.
64 # --copy to avoid symlinks; we want originals for the distro
65 # --automake to make it shut up about "things to do"
67 $libtoolize --copy --automake
69 ltpath
=`dirname $libtoolize`
70 ltfile
=`cd $ltpath/../share/aclocal ; pwd`/libtool.
m4
71 cp $ltfile conftools
/libtool.
m4
73 #--------------------------------------------------------------------------
75 ### for a little while... remove stray aclocal.m4 files from
76 ### developers' working copies. we no longer use it. (nothing else
77 ### will remove it, and leaving it creates big problems)
81 # Generate the autoconf header template (expat_config.h.in) and ./configure
83 echo "Creating expat_config.h.in ..."
84 ${AUTOHEADER:-autoheader}
86 echo "Creating configure ..."
87 ### do some work to toss config.cache?
90 # toss this; it gets created by autoconf on some systems
91 rm -rf autom4te
*.cache
93 # exit with the right value, so any calling script can continue