]>
git.ipfire.org Git - thirdparty/squid.git/blob - bootstrap.sh
2 # Used to setup the configure.in, autoheader and Makefile.in's if configure
3 # has not been generated. This script is only needed for developers when
4 # configure has not been run, or if a Makefile.am in a non-configured directory
7 # Autotool versions preferred. To override either edit the script
8 # to match the versions you want to use, or set the variables on
9 # the command line like "env acver=.. amver=... ./bootstrap.sh"
10 acversions
="${acver:-2.63 2.62 2.61}"
11 amversions
="${amver:-1.10 1.9 1.7 1.6 1.5}"
12 ltversions
="${ltver:-1.5 1.4}"
16 eval $2 --version 2>/dev
/null |
grep -i "$1.*$3" >/dev
/null
25 for version
in $versions; do
26 for variant
in "" "-${version}" "`echo $version | sed -e 's/\.//g'`"; do
27 if check_version
$tool ${tool}${variant} $version; then
32 if [ "x$found" != "xNOT_FOUND" ]; then
36 if [ "x$found" = "xNOT_FOUND" ]; then
37 echo "WARNING: Cannot find $tool version $versions" >&2
38 echo "Trying `$tool --version | head -1`" >&2
49 echo "Autotool bootstrapping failed. You will need to investigate and correct" ;
50 echo "before you can develop on this source tree"
55 bootstrap_libtoolize
() {
58 # TODO: when we have libtool2, tell libtoolize where to put its files
59 # instead of manualy moving files from ltdl to lib/libLtdl
60 if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.
in
62 if libtoolize
$ltver --help |
grep -q -- --ltdl.
=; then
63 ltdl
="--ltdl=lib/libLtdl"
72 bootstrap libtoolize
$ltver $ltdl --force --copy --automake
74 # customize generated libltdl, if any
75 if test -d libltdl
&& [ $copy_libltdl ]
79 # do not bundle with the huge standard license text
80 rm -fv $src/COPYING.LIB
81 makefile
=$src/Makefile.
in
82 sed 's/COPYING.LIB/ /g' $makefile > $makefile.new
;
84 mv $makefile.new
$makefile
89 if test -d $dest # already exists
91 echo "Updating $dest from $src."
96 echo "Creating $dest from $src."
102 # Adjust paths of required autool packages
103 amver
=`find_version automake ${amversions}`
104 acver
=`find_version autoconf ${acversions}`
105 ltver
=`find_version libtool ${ltversions}`
107 # Set environment variable to tell automake which autoconf to use.
108 AUTOCONF
="autoconf${acver}" ; export AUTOCONF
110 echo "automake : $amver"
111 echo "autoconfg: $acver"
112 echo "libtool : $ltver"
117 helpers
/negotiate_auth
/squid_kerb_auth
119 if [ -z "$dir" ] ||
[ -d $dir ]; then
121 echo "Bootstrapping $dir"
123 if [ -n "$dir" ] && [ -f bootstrap.sh
]; then
125 elif [ ! -f $dir/configure
]; then
126 # Make sure cfgaux exists
129 # Bootstrap the autotool subsystems
130 bootstrap aclocal
$amver
131 bootstrap autoheader
$acver
132 bootstrap_libtoolize
$ltver
133 bootstrap automake
$amver --foreign --add-missing --copy -f
134 bootstrap autoconf
$acver --force
143 # Fixup autoconf recursion using --silent/--quiet option
144 # autoconf should inherit this option whe recursing into subdirectories
145 # but it currently doesn't for some reason.
146 if ! grep "configure_args --quiet" configure
>/dev
/null
; then
147 echo "Fixing configure recursion"
148 ed
-s configure
<<'EOS' >/dev/null || true
149 /ac_sub_configure_args=/
152 # Add --quiet option if used
153 test "$silent" = yes &&
154 ac_sub_configure_args="$ac_sub_configure_args --quiet"
160 echo "Autotool bootstrapping complete."