3 # Copyright (c) 2006, The libsigc++ Development Team
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # Be Bourne compatible. (stolen from autoconf)
21 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then
24 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 elif test -n "${BASH_VERSION+set}" && (set -o posix
) >/dev
/null
2>&1; then
32 MIN_AUTOMAKE_VERSION
=1.9
35 test -n "$srcdir" || srcdir
=.
40 LIBTOOLIZE_FLAGS
="--automake --copy --force $LIBTOOLIZE_FLAGS"
41 ACLOCAL_FLAGS
="-I scripts $ACLOCAL_FLAGS"
42 AUTOMAKE_FLAGS
="--add-missing --copy $AUTOMAKE_FLAGS"
44 if test "x$*$AUTOGEN_SUBDIR_MODE" = x
46 echo "I am going to run ./configure with no arguments -- if you wish"
47 echo "to pass any to it, please specify them on the $0 command line."
57 # awk program to transform the output of automake --version
58 # into an integer value suitable for numeric comparison.
59 extract_version
='{ printf "%.0f", 1000000 * v[split($1, v, " ")] + 1000 * $2 + $3; exit }'
61 for suffix
in -1.7
-1.8
-1.9
""
63 aclocal_version
=`aclocal$suffix --version </dev/null 2>/dev/null | awk -F. "$extract_version"`
64 automake_version
=`automake$suffix --version </dev/null 2>/dev/null | awk -F. "$extract_version"`
66 if test "$aclocal_version" -eq "$automake_version" 2>/dev
/null \
67 && test "$automake_version" -ge "$auto_version" 2>/dev
/null
69 auto_version
=$automake_version
70 aclocal
=aclocal
$suffix
71 automake
=automake
$suffix
75 min_version
=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"`
77 if test "$auto_version" -ge "$min_version" 2>/dev
/null
79 echo "Sorry, at least automake $MIN_AUTOMAKE_VERSION is required to configure $PROJECT."
83 rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs
84 rm -f config.cache acconfig.h
90 if (set -x && set +x
) >/dev
/null
2>&1
99 "$libtoolize" $LIBTOOLIZE_FLAGS ||
exit 1
100 "$aclocal" $ACLOCAL_FLAGS ||
exit 1
101 #"$autoheader" || exit 1
102 "$automake" $AUTOMAKE_FLAGS ||
exit 1
103 "$autoconf" ||
exit 1
104 cd "$origdir" ||
exit 1
106 if test -z "$AUTOGEN_SUBDIR_MODE"
108 "$srcdir/configure" --enable-maintainer-mode ${1+"$@"} ||
exit 1
111 echo "Now type 'make' to compile $PROJECT."