bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr-util / xml / expat / buildconf.sh
1 #! /bin/sh
2
3 #
4 # Find libtoolize. Prefer 1.x versions.
5 #
6 libtoolize=`conftools/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14`
7 if [ "x$libtoolize" = "x" ]; then
8     echo "libtoolize not found in path"
9     exit 1
10 fi
11
12 #
13 # Create the libtool helper files
14 #
15 # Note: we copy (rather than link) the files.
16 #
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 ..."
21
22 # Remove any m4 cache and libtool files so one can switch between 
23 # autoconf and libtool versions by simply rerunning the buildconf script.
24 #
25 m4files='lt~obsolete.m4 ltversion.m4 ltoptions.m4 argz.m4 ltsugar.m4 libtool.m4'
26
27 (cd conftools ; rm -f ltconfig ltmain.sh aclocal.m4 $m4files)
28 rm -rf autom4te*.cache aclocal.m4
29
30 $libtoolize --copy --automake
31
32 #
33 # find libtool.m4
34 #
35 if [ ! -f libtool.m4 ]; then
36   ltpath=`dirname $libtoolize`
37   ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
38   if [ -f $ltfile ]; then
39     echo "libtool.m4 found at $ltfile"
40     cp $ltfile conftools/libtool.m4
41   else
42     echo "libtool.m4 not found - aborting!"
43     exit 1
44   fi
45 fi
46
47 #
48 # Build aclocal.m4 from libtool's m4 files
49 #
50 echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4
51 echo "dnl edits here will be lost" >> aclocal.m4
52
53 for m4file in $m4files
54 do
55   m4file=conftools/$m4file
56   if [ -f $m4file ]; then
57     echo "Incorporating $m4file into aclocal.m4 ..."
58     cat $m4file >> aclocal.m4
59     rm -f $m4file
60   fi
61 done
62
63 cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
64
65 #
66 # Generate the autoconf header template (config.h.in) and ./configure
67 #
68 echo "Creating config.h.in ..."
69 ${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
70
71 echo "Creating configure ..."
72 ### do some work to toss config.cache?
73 ${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
74
75 # Remove autoconf caches
76 rm -rf autom4te*.cache aclocal.m4
77
78 exit 0