~ubuntu-branches/ubuntu/feisty/apache2/feisty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /bin/sh

#
# Find libtoolize
#
libtoolize=`conftools/PrintPath glibtoolize libtoolize libtoolize15 libtoolize14`
if [ "x$libtoolize" = "x" ]; then
    echo "libtoolize not found in path"
    exit 1
fi

#
# Create the libtool helper files
#
# Note: we copy (rather than link) the files.
#
# Note: This bundled version of expat will not always replace the
# files since we have a special config.guess/config.sub that we
# want to ensure is used.
echo "Copying libtool helper files ..."

# Remove any m4 cache and libtool files so one can switch between
# autoconf and libtool versions by simply rerunning the buildconf script.
#
(cd conftools ; rm -f ltconfig ltmain.sh)
rm -rf aclocal.m4 libtool.m4 ltsugar.m4 autom4te*.cache

$libtoolize --copy --automake

#
# Build aclocal.m4 from libtool's libtool.m4
#
if [ -f libtool.m4 ]; then
  ltfile=libtool.m4
else
  ltpath=`dirname $libtoolize`
  ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
fi
echo "Incorporating $ltfile into aclocal.m4 ..."
echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4
echo "dnl edits here will be lost" >> aclocal.m4
cat $ltfile >> aclocal.m4

if [ -f ltsugar.m4 ]; then
  echo "Incorporating ltsugar.m4 into aclocal.m4 ..."
  cat ltsugar.m4 >> aclocal.m4
fi

# Clean up again
rm -f libtool.m4 ltsugar.m4

cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"

#
# Generate the autoconf header template (config.h.in) and ./configure
#
echo "Creating config.h.in ..."
${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"

echo "Creating configure ..."
### do some work to toss config.cache?
${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"

# Remove autoconf caches
rm -rf autom4te*.cache

exit 0