3 # This script does all the magic calls to automake/autoconf and
4 # friends that are needed to configure a cvs checkout. You need a
5 # couple of extra tools to run this script successfully.
7 # If you are compiling from a released tarball you don't need these
8 # tools and you shouldn't use this script. Just call ./configure
11 PROJECT
="LiquidRescale library"
15 AUTOCONF_REQUIRED_VERSION
=2.54
16 AUTOMAKE_REQUIRED_VERSION
=1.6
17 GLIB_REQUIRED_VERSION
=2.0.0
18 LIBTOOL_REQUIRED_VERSION
=1.5.24
21 test -z "$srcdir" && srcdir
=.
27 if expr $1 \
>= $2 > /dev
/null
; then
28 echo "yes (version $1)"
30 echo "Too old (found version $1)!"
36 echo "I am testing that you have the required versions of autoconf,"
37 echo "automake and libtoolize..."
42 echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
43 if (autoconf
--version) < /dev
/null
> /dev
/null
2>&1; then
44 VER
=`autoconf --version \
45 | grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
46 check_version
$VER $AUTOCONF_REQUIRED_VERSION
49 echo " You must have autoconf installed to compile $PROJECT."
50 echo " Download the appropriate package for your distribution,"
51 echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
55 echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
56 if (automake-1.7
--version) < /dev
/null
> /dev
/null
2>&1; then
59 elif (automake-1.8
--version) < /dev
/null
> /dev
/null
2>&1; then
62 elif (automake-1.9
--version) < /dev
/null
> /dev
/null
2>&1; then
65 elif (automake-1.10
--version) < /dev
/null
> /dev
/null
2>&1; then
66 AUTOMAKE
=automake-1.10
68 elif (automake-1.6
--version) < /dev
/null
> /dev
/null
2>&1; then
73 echo " You must have automake 1.6 or newer installed to compile $PROJECT."
74 echo " Download the appropriate package for your distribution,"
75 echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
79 if test x
$AUTOMAKE != x
; then
80 VER
=`$AUTOMAKE --version \
81 | grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
82 check_version
$VER $AUTOMAKE_REQUIRED_VERSION
85 echo -n "checking for libtool >= $LIBTOOL_REQUIRED_VERSION ... "
86 if (libtoolize
--version) < /dev
/null
> /dev
/null
2>&1; then
87 VER
=`libtoolize --version \
88 | grep libtoolize | sed "s/.* \([0-9.]*\)/\1/"`
89 check_version
$VER $LIBTOOL_REQUIRED_VERSION
92 echo " You must have libtool installed to compile $PROJECT."
93 echo " Get the latest version from"
99 if test "$DIE" -eq 1; then
101 echo "Please install/upgrade the missing tools and call me again."
107 test $TEST_TYPE $FILE ||
{
109 echo "You must run this script in the top-level $PROJECT directory."
116 echo "I am going to run ./configure with the following arguments:"
118 echo " --enable-maintainer-mode --enable-install-man $AUTOGEN_CONFIGURE_ARGS $@"
121 if test -z "$*"; then
122 echo "If you wish to pass additional arguments, please specify them "
123 echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
124 echo "environment variable."
128 if test -z "$ACLOCAL_FLAGS"; then
130 acdir
=`$ACLOCAL --print-ac-dir`
131 m4list
="glib-gettext.m4 intltool.m4"
135 if [ ! -f "$acdir/$file" ]; then
137 echo "WARNING: aclocal's directory is $acdir, but..."
138 echo " no file $acdir/$file"
139 echo " You may see fatal macro warnings below."
140 echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
141 echo " environment variable to \"-I /some/dir\", or install"
142 echo " $acdir/$file."
148 rm -rf autom4te.cache
150 $ACLOCAL $ACLOCAL_FLAGS
152 if test $RC -ne 0; then
153 echo "$ACLOCAL gave errors. Please fix the error conditions and try again."
157 # optionally feature autoheader
158 (autoheader
--version) < /dev
/null
> /dev
/null
2>&1 && autoheader ||
exit 1
160 $AUTOMAKE --add-missing --copy ||
exit 1
163 libtoolize
--force --copy --install ||
exit 1
167 $srcdir/configure
--enable-maintainer-mode --enable-install-man $AUTOGEN_CONFIGURE_ARGS "$@"
169 if test $RC -ne 0; then
171 echo "Configure failed or did not finish!"
176 echo "Now type 'make' to compile $PROJECT."