remove a bunch of explicit uses of '/' as a directory separator; use Glib::build_file...
[ardour2.git] / libs / sigc++2 / autogen.sh
blob3eadcdcd6ed00a51899954a41f5033ca3a690a7a
1 #! /bin/sh
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
22 emulate sh
23 NULLCMD=:
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
28 set -o posix
31 PROJECT=libsigc++2
32 MIN_AUTOMAKE_VERSION=1.9
34 srcdir=`dirname "$0"`
35 test -n "$srcdir" || srcdir=.
37 origdir=`pwd`
38 cd "$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
45 then
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."
50 libtoolize=libtoolize
51 autoconf=autoconf
52 autoheader=autoheader
53 aclocal=
54 automake=
55 auto_version=0
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
68 then
69 auto_version=$automake_version
70 aclocal=aclocal$suffix
71 automake=automake$suffix
73 done
75 min_version=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"`
77 if test "$auto_version" -ge "$min_version" 2>/dev/null
78 then :; else
79 echo "Sorry, at least automake $MIN_AUTOMAKE_VERSION is required to configure $PROJECT."
80 exit 1
83 rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs
84 rm -f config.cache acconfig.h
85 rm -rf autom4te.cache
87 #WARNINGS=all
88 #export WARNINGS
90 if (set -x && set +x) >/dev/null 2>&1
91 then
92 set_xtrace=set
93 else
94 set_xtrace=:
97 $set_xtrace -x
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"
107 then
108 "$srcdir/configure" --enable-maintainer-mode ${1+"$@"} || exit 1
109 $set_xtrace +x
110 echo
111 echo "Now type 'make' to compile $PROJECT."
114 exit 0