removed old libs
[TestXSLT.git] / libexpat / buildconf.sh
1 #! /bin/sh
2
3 #--------------------------------------------------------------------------
4 # autoconf 2.52 or newer
5 #
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."
10   exit 1
11 fi
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."
16   exit 1
17 fi
18
19 echo "found: autoconf version $ac_version (ok)"
20
21 #--------------------------------------------------------------------------
22 # libtool 1.4 or newer
23 #
24
25 #
26 # find libtoolize, or glibtoolize on MacOS X
27 #
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"
32   exit 1
33 fi
34
35 lt_pversion="`$libtoolize --version 2> /dev/null | sed -e 's/^[^0-9]*//'`"
36
37 # convert something like 1.4p1 to 1.4.p1
38 lt_version="`echo $lt_pversion | sed -e 's/\([a-z]*\)$/.\1/'`"
39
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"
44   exit 1
45 fi
46
47 echo "found: libtool version $lt_pversion (ok)"
48
49 #--------------------------------------------------------------------------
50
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)
54
55 #
56 # Create the libtool helper files
57 #
58 echo "Copying libtool helper files ..."
59
60 #
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.
63 #
64 # --copy to avoid symlinks; we want originals for the distro
65 # --automake to make it shut up about "things to do"
66 #
67 $libtoolize --copy --automake
68
69 ltpath=`dirname $libtoolize`
70 ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
71 cp $ltfile conftools/libtool.m4
72
73 #--------------------------------------------------------------------------
74
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)
78 rm -f aclocal.m4
79
80 #
81 # Generate the autoconf header template (expat_config.h.in) and ./configure
82 #
83 echo "Creating expat_config.h.in ..."
84 ${AUTOHEADER:-autoheader}
85
86 echo "Creating configure ..."
87 ### do some work to toss config.cache?
88 ${AUTOCONF:-autoconf}
89
90 # toss this; it gets created by autoconf on some systems
91 rm -rf autom4te*.cache
92
93 # exit with the right value, so any calling script can continue
94 exit 0