#!/bin/sh
+#
+## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
+#
# Used to setup the configure.ac, autoheader and Makefile.in's if configure
# has not been generated. This script is only needed for developers when
# configure has not been run, or if a Makefile.am in a non-configured directory
}
bootstrap_libtoolize() {
- ltver=$1
-
- # TODO: when we have libtool2, tell libtoolize where to put its files
- # instead of manualy moving files from ltdl to lib/libLtdl
- if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.ac
- then
- ltdl="--ltdl"
- else
- ltdl=""
- fi
-
- bootstrap libtoolize$ltver $ltdl --force --copy --automake
+ tool=$1
- # customize generated libltdl, if any
- if test -d libltdl
- then
- src=libltdl
+ ltdl="--ltdl"
- # do not bundle with the huge standard license text
- rm -f $src/COPYING.LIB
- makefile=$src/Makefile.in
- sed 's/COPYING.LIB/ /g' $makefile > $makefile.new;
- chmod u+w $makefile
- mv $makefile.new $makefile
- chmod u-w $makefile
- fi
+ bootstrap $tool $ltdl --force --copy --automake
}
+# On MAC OS X, GNU libtool is named 'glibtool':
+if [ `uname -s 2>/dev/null` = 'Darwin' ]
+then
+ LIBTOOL_BIN="glibtool"
+else
+ LIBTOOL_BIN="libtool"
+fi
+
# Adjust paths of required autool packages
amver=`find_variant automake ${amversions}`
acver=`find_variant autoconf ${acversions}`
-ltver=`find_variant libtool ${ltversions}`
+ltver=`find_variant ${LIBTOOL_BIN} ${ltversions}`
# Produce debug output about what version actually found.
amversion=`show_version automake "${amver}"`
acversion=`show_version autoconf "${acver}"`
-ltversion=`show_version libtool "${ltver}"`
+ltversion=`show_version ${LIBTOOL_BIN} "${ltver}"`
# Find the libtool path to get the right aclocal includes
-ltpath=`find_path libtool$ltver`
+ltpath=`find_path ${LIBTOOL_BIN}${ltver}`
# Set environment variable to tell automake which autoconf to use.
AUTOCONF="autoconf${acver}" ; export AUTOCONF
echo "automake ($amversion) : automake$amver"
echo "autoconf ($acversion) : autoconf$acver"
-echo "libtool ($ltversion) : libtool$ltver"
+echo "libtool ($ltversion) : ${LIBTOOL_BIN}${ltver}"
echo "libtool path : $ltpath"
for dir in \
- "" \
- lib/libTrie
+ ""
do
if [ -z "$dir" ] || [ -d $dir ]; then
if (
elif [ ! -f $dir/configure ]; then
# Make sure cfgaux exists
mkdir -p cfgaux
-
+
if test -n "$ltpath"; then
acincludeflag="-I $ltpath/../share/aclocal"
else
# Bootstrap the autotool subsystems
bootstrap aclocal$amver $acincludeflag
bootstrap autoheader$acver
- bootstrap_libtoolize $ltver
+ bootstrap_libtoolize ${LIBTOOL_BIN}ize${ltver}
bootstrap automake$amver --foreign --add-missing --copy -f
bootstrap autoconf$acver --force
fi ); then
fi
done
+# Make a copy of SPONSORS we can package
+if test -f SPONSORS.list; then
+ sed -e 's/@Squid-[0-9\.]*://' <SPONSORS.list > SPONSORS || (rm -f SPONSORS && exit 1)
+fi
+
# Fixup autoconf recursion using --silent/--quiet option
# autoconf should inherit this option whe recursing into subdirectories
# but it currently doesn't for some reason.