2002-05-28 07:13:40 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This script does all the magic calls to automake/autoconf and
|
|
|
|
# friends that are needed to configure a cvs checkout. As described in
|
|
|
|
# the file HACKING you need a couple of extra tools to run this script
|
|
|
|
# successfully.
|
|
|
|
#
|
|
|
|
# If you are compiling from a released tarball you don't need these
|
|
|
|
# tools and you shouldn't use this script. Just call ./configure
|
|
|
|
# directly.
|
1998-02-26 19:55:07 +08:00
|
|
|
|
1998-12-15 11:13:46 +08:00
|
|
|
|
2005-09-19 21:15:31 +08:00
|
|
|
PROJECT="GNU Image Manipulation Program"
|
1998-12-15 11:13:46 +08:00
|
|
|
TEST_TYPE=-d
|
|
|
|
FILE=plug-ins
|
|
|
|
|
2004-01-22 11:51:46 +08:00
|
|
|
LIBTOOL_REQUIRED_VERSION=1.4
|
2003-09-05 02:44:08 +08:00
|
|
|
LIBTOOL_WIN32=1.5
|
2003-08-17 06:54:37 +08:00
|
|
|
AUTOCONF_REQUIRED_VERSION=2.54
|
2005-06-12 05:10:43 +08:00
|
|
|
AUTOMAKE_REQUIRED_VERSION=1.8.3
|
2004-01-22 11:51:46 +08:00
|
|
|
GLIB_REQUIRED_VERSION=2.2.0
|
2004-12-18 00:29:27 +08:00
|
|
|
INTLTOOL_REQUIRED_VERSION=0.31
|
1998-02-26 19:55:07 +08:00
|
|
|
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
srcdir=`dirname $0`
|
|
|
|
test -z "$srcdir" && srcdir=.
|
|
|
|
ORIGDIR=`pwd`
|
|
|
|
cd $srcdir
|
|
|
|
|
2002-03-27 08:18:20 +08:00
|
|
|
|
2002-08-19 11:35:20 +08:00
|
|
|
check_version ()
|
2002-05-28 23:43:24 +08:00
|
|
|
{
|
|
|
|
if expr $1 \>= $2 > /dev/null; then
|
|
|
|
echo "yes (version $1)"
|
|
|
|
else
|
|
|
|
echo "Too old (found version $1)!"
|
|
|
|
DIE=1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
2002-02-23 01:35:07 +08:00
|
|
|
echo "I am testing that you have the required versions of libtool, autoconf,"
|
|
|
|
echo "automake, glib-gettextize and intltoolize. This test is not foolproof,"
|
|
|
|
echo "so if anything goes wrong, see the file HACKING for more information..."
|
1999-11-13 06:31:57 +08:00
|
|
|
echo
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
DIE=0
|
|
|
|
|
2003-09-04 01:36:49 +08:00
|
|
|
|
|
|
|
OS=`uname -s`
|
|
|
|
case $OS in
|
2003-09-04 01:46:16 +08:00
|
|
|
*YGWIN* | *INGW*)
|
2003-09-04 01:36:49 +08:00
|
|
|
echo "Looks like Win32, you will need libtool $LIBTOOL_WIN32 or newer."
|
|
|
|
echo
|
|
|
|
LIBTOOL_REQUIRED_VERSION=$LIBTOOL_WIN32
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for libtool >= $LIBTOOL_REQUIRED_VERSION ... "
|
2002-08-27 06:25:53 +08:00
|
|
|
if (libtoolize --version) < /dev/null > /dev/null 2>&1; then
|
2004-07-29 02:52:40 +08:00
|
|
|
LIBTOOLIZE=libtoolize
|
|
|
|
elif (glibtoolize --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
LIBTOOLIZE=glibtoolize
|
2002-05-28 07:13:40 +08:00
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo " You must have libtool installed to compile $PROJECT."
|
|
|
|
echo " Install the appropriate package for your distribution,"
|
|
|
|
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2004-07-29 02:52:40 +08:00
|
|
|
DIE=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$LIBTOOLIZE != x; then
|
|
|
|
VER=`$LIBTOOLIZE --version \
|
|
|
|
| grep libtool | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
|
|
|
|
check_version $VER $LIBTOOL_REQUIRED_VERSION
|
2001-08-28 22:59:42 +08:00
|
|
|
fi
|
|
|
|
|
2005-01-21 02:21:41 +08:00
|
|
|
# check if gtk-doc is explicitely disabled
|
|
|
|
for ag_option in $AUTOGEN_CONFIGURE_ARGS $@
|
|
|
|
do
|
|
|
|
case $ag_option in
|
|
|
|
-disable-gtk-doc | --disable-gtk-doc)
|
|
|
|
enable_gtk_doc=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if test x$enable_gtk_doc = xno; then
|
|
|
|
echo "skipping test for gtkdocize"
|
2004-12-14 06:51:55 +08:00
|
|
|
else
|
2005-01-21 02:21:41 +08:00
|
|
|
echo -n "checking for gtkdocize ... "
|
|
|
|
if (gtkdocize --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
echo "yes"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo " You must have gtk-doc installed to compile $PROJECT."
|
|
|
|
echo " Install the appropriate package for your distribution,"
|
|
|
|
echo " or get the source tarball at"
|
|
|
|
echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
|
|
|
|
echo " You can also use the option --disable-gtk-doc to skip"
|
|
|
|
echo " this test but then you will not be able to generate a"
|
|
|
|
echo " configure script that can build the API documentation."
|
|
|
|
DIE=1
|
|
|
|
fi
|
2004-12-14 06:51:55 +08:00
|
|
|
fi
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
|
|
|
|
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
VER=`autoconf --version \
|
|
|
|
| grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
|
2002-05-28 23:43:24 +08:00
|
|
|
check_version $VER $AUTOCONF_REQUIRED_VERSION
|
2002-05-28 07:13:40 +08:00
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo " You must have autoconf installed to compile $PROJECT."
|
|
|
|
echo " Download the appropriate package for your distribution,"
|
2004-01-25 21:53:23 +08:00
|
|
|
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2002-05-28 07:13:40 +08:00
|
|
|
DIE=1;
|
1999-11-13 06:31:57 +08:00
|
|
|
fi
|
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
|
2005-06-12 05:10:43 +08:00
|
|
|
if (automake-1.9 --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
AUTOMAKE=automake-1.9
|
|
|
|
ACLOCAL=aclocal-1.9
|
2004-01-26 19:24:11 +08:00
|
|
|
elif (automake-1.8 --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
AUTOMAKE=automake-1.8
|
|
|
|
ACLOCAL=aclocal-1.8
|
2002-05-28 07:13:40 +08:00
|
|
|
else
|
|
|
|
echo
|
2005-06-12 05:10:43 +08:00
|
|
|
echo " You must have automake $AUTOMAKE_REQUIRED_VERSION or newer installed to compile $PROJECT."
|
2004-01-25 21:53:23 +08:00
|
|
|
echo " Download the appropriate package for your distribution,"
|
|
|
|
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2002-05-28 07:13:40 +08:00
|
|
|
DIE=1
|
1999-11-13 06:31:57 +08:00
|
|
|
fi
|
|
|
|
|
2002-11-18 20:23:05 +08:00
|
|
|
if test x$AUTOMAKE != x; then
|
|
|
|
VER=`$AUTOMAKE --version \
|
|
|
|
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
|
|
|
|
check_version $VER $AUTOMAKE_REQUIRED_VERSION
|
|
|
|
fi
|
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for glib-gettextize >= $GLIB_REQUIRED_VERSION ... "
|
|
|
|
if (glib-gettextize --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
VER=`glib-gettextize --version \
|
|
|
|
| grep glib-gettextize | sed "s/.* \([0-9.]*\)/\1/"`
|
2002-05-28 23:43:24 +08:00
|
|
|
check_version $VER $GLIB_REQUIRED_VERSION
|
2002-02-23 01:35:07 +08:00
|
|
|
else
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
|
|
|
echo " You must have glib-gettextize installed to compile $PROJECT."
|
|
|
|
echo " glib-gettextize is part of glib-2.0, so you should already"
|
|
|
|
echo " have it. Make sure it is in your PATH."
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2002-05-28 07:13:40 +08:00
|
|
|
DIE=1
|
2002-02-23 01:35:07 +08:00
|
|
|
fi
|
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... "
|
|
|
|
if (intltoolize --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
VER=`intltoolize --version \
|
|
|
|
| grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
|
2002-05-28 23:43:24 +08:00
|
|
|
check_version $VER $INTLTOOL_REQUIRED_VERSION
|
2002-05-28 07:13:40 +08:00
|
|
|
else
|
|
|
|
echo
|
2002-11-18 20:23:05 +08:00
|
|
|
echo " You must have intltool installed to compile $PROJECT."
|
|
|
|
echo " Get the latest version from"
|
|
|
|
echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/"
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2002-05-28 07:13:40 +08:00
|
|
|
DIE=1
|
2002-02-23 01:35:07 +08:00
|
|
|
fi
|
2002-05-06 19:04:39 +08:00
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
2004-06-17 22:33:29 +08:00
|
|
|
echo -n "checking for xsltproc ... "
|
|
|
|
if (xsltproc --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
echo "yes"
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo " You must have xsltproc installed to compile $PROJECT."
|
|
|
|
echo " Get the latest version from"
|
|
|
|
echo " ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/"
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2004-06-17 22:33:29 +08:00
|
|
|
DIE=1
|
|
|
|
fi
|
2004-03-22 14:47:50 +08:00
|
|
|
|
1998-02-26 19:55:07 +08:00
|
|
|
if test "$DIE" -eq 1; then
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
|
|
|
echo "Please install/upgrade the missing tools and call me again."
|
|
|
|
echo
|
|
|
|
exit 1
|
1998-02-26 19:55:07 +08:00
|
|
|
fi
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
|
1998-12-15 11:13:46 +08:00
|
|
|
test $TEST_TYPE $FILE || {
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
|
|
|
echo "You must run this script in the top-level $PROJECT directory."
|
|
|
|
echo
|
|
|
|
exit 1
|
1998-02-26 19:55:07 +08:00
|
|
|
}
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
|
2004-10-23 19:02:07 +08:00
|
|
|
echo
|
|
|
|
echo "I am going to run ./configure with the following arguments:"
|
|
|
|
echo
|
|
|
|
echo " --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS $@"
|
|
|
|
echo
|
|
|
|
|
1998-02-26 19:55:07 +08:00
|
|
|
if test -z "$*"; then
|
2004-10-23 19:02:07 +08:00
|
|
|
echo "If you wish to pass additional arguments, please specify them "
|
|
|
|
echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
|
|
|
|
echo "environment variable."
|
|
|
|
echo
|
1998-02-26 19:55:07 +08:00
|
|
|
fi
|
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
1998-12-24 09:11:03 +08:00
|
|
|
if test -z "$ACLOCAL_FLAGS"; then
|
|
|
|
|
2002-11-18 20:23:05 +08:00
|
|
|
acdir=`$ACLOCAL --print-ac-dir`
|
2005-01-21 02:21:41 +08:00
|
|
|
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
|
2002-05-28 07:13:40 +08:00
|
|
|
|
|
|
|
for file in $m4list
|
|
|
|
do
|
|
|
|
if [ ! -f "$acdir/$file" ]; then
|
|
|
|
echo
|
|
|
|
echo "WARNING: aclocal's directory is $acdir, but..."
|
|
|
|
echo " no file $acdir/$file"
|
|
|
|
echo " You may see fatal macro warnings below."
|
2005-01-21 02:21:41 +08:00
|
|
|
echo " If these files are installed in /some/dir, set the "
|
|
|
|
echo " ACLOCAL_FLAGS environment variable to \"-I /some/dir\""
|
|
|
|
echo " or install $acdir/$file."
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
|
|
|
fi
|
|
|
|
done
|
1998-12-24 09:11:03 +08:00
|
|
|
fi
|
1998-12-15 11:13:46 +08:00
|
|
|
|
2004-10-17 02:20:23 +08:00
|
|
|
rm -rf autom4te.cache
|
2004-07-29 02:52:40 +08:00
|
|
|
|
2003-07-22 00:47:52 +08:00
|
|
|
$ACLOCAL $ACLOCAL_FLAGS
|
|
|
|
RC=$?
|
|
|
|
if test $RC -ne 0; then
|
2002-09-06 09:00:33 +08:00
|
|
|
echo "$ACLOCAL gave errors. Please fix the error conditions and try again."
|
2004-03-04 22:47:37 +08:00
|
|
|
exit $RC
|
2002-09-06 09:00:33 +08:00
|
|
|
fi
|
1998-09-07 03:52:22 +08:00
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
$LIBTOOLIZE --force || exit $?
|
2005-01-21 02:21:41 +08:00
|
|
|
|
|
|
|
if test x$enable_gtk_doc = xno; then
|
|
|
|
if test -f gtk-doc.make; then :; else
|
|
|
|
echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
|
|
|
|
fi
|
|
|
|
echo "WARNING: You have disabled gtk-doc."
|
|
|
|
echo " As a result, you will not be able to generate the API"
|
|
|
|
echo " documentation and 'make dist' will not work."
|
|
|
|
echo
|
|
|
|
else
|
|
|
|
gtkdocize || exit $?
|
|
|
|
fi
|
2003-02-26 20:48:48 +08:00
|
|
|
|
2001-08-28 21:04:47 +08:00
|
|
|
# optionally feature autoheader
|
2003-11-28 00:14:07 +08:00
|
|
|
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader || exit 1
|
1999-01-10 14:53:30 +08:00
|
|
|
|
2004-03-04 22:47:37 +08:00
|
|
|
$AUTOMAKE --add-missing || exit $?
|
|
|
|
autoconf || exit $?
|
1999-01-10 14:53:30 +08:00
|
|
|
|
2004-10-23 20:13:39 +08:00
|
|
|
glib-gettextize --force || exit $?
|
|
|
|
intltoolize --force --automake || exit $?
|
2002-02-23 01:35:07 +08:00
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
1999-01-10 14:53:30 +08:00
|
|
|
cd $ORIGDIR
|
1999-01-08 03:54:45 +08:00
|
|
|
|
2004-03-04 22:47:37 +08:00
|
|
|
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@"
|
|
|
|
RC=$?
|
|
|
|
if test $RC -ne 0; then
|
2002-11-12 11:34:11 +08:00
|
|
|
echo
|
|
|
|
echo "Configure failed or did not finish!"
|
2004-03-04 22:47:37 +08:00
|
|
|
exit $RC
|
2002-11-12 11:34:11 +08:00
|
|
|
fi
|
1998-02-26 19:55:07 +08:00
|
|
|
|
2004-03-04 22:47:37 +08:00
|
|
|
echo
|
2005-09-19 21:15:31 +08:00
|
|
|
echo "Now type 'make' to compile the $PROJECT."
|