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
|
|
|
|
2002-03-27 08:18:20 +08:00
|
|
|
PROJECT="The GIMP"
|
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
|
2002-11-07 06:51:45 +08:00
|
|
|
AUTOMAKE_REQUIRED_VERSION=1.6
|
2004-01-22 11:51:46 +08:00
|
|
|
GLIB_REQUIRED_VERSION=2.2.0
|
2002-05-28 07:13:40 +08:00
|
|
|
INTLTOOL_REQUIRED_VERSION=0.17
|
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
|
|
|
|
|
2004-07-29 02:52:40 +08:00
|
|
|
|
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 ... "
|
2004-01-26 19:24:11 +08:00
|
|
|
if (automake-1.7 --version) < /dev/null > /dev/null 2>&1; then
|
2002-11-18 20:23:05 +08:00
|
|
|
AUTOMAKE=automake-1.7
|
|
|
|
ACLOCAL=aclocal-1.7
|
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
|
2004-07-13 07:51:38 +08:00
|
|
|
AUTOMAKE_REQUIRED_VERSION=1.8.3
|
2004-10-17 02:20:23 +08:00
|
|
|
elif (automake-1.9 --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
AUTOMAKE=automake-1.9
|
|
|
|
ACLOCAL=aclocal-1.9
|
2003-02-25 06:49:45 +08:00
|
|
|
elif (automake-1.6 --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
AUTOMAKE=automake-1.6
|
|
|
|
ACLOCAL=aclocal-1.6
|
2002-05-28 07:13:40 +08:00
|
|
|
else
|
|
|
|
echo
|
2004-01-25 21:53:23 +08:00
|
|
|
echo " You must have automake 1.6 or newer installed to compile $PROJECT."
|
|
|
|
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-03-22 14:47:50 +08:00
|
|
|
# Special test for problematic versions of intltool. Details at:
|
|
|
|
# http://bugzilla.gnome.org/show_bug.cgi?id=137502
|
|
|
|
# Print a warning message, but do not exit.
|
|
|
|
INTLTOOL_BUG_MIN_VERSION=0.28
|
|
|
|
INTLTOOL_BUG_MAX_VERSION=0.31
|
|
|
|
echo -n "checking for intltool < $INTLTOOL_BUG_MIN_VERSION or > $INTLTOOL_BUG_MAX_VERSION ... "
|
|
|
|
if (intltoolize --version) < /dev/null > /dev/null 2>&1; then
|
|
|
|
VER=`intltoolize --version \
|
|
|
|
| grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
|
|
|
|
if expr $VER \>= $INTLTOOL_BUG_MIN_VERSION > /dev/null; then
|
|
|
|
if expr $VER \<= $INTLTOOL_BUG_MAX_VERSION > /dev/null; then
|
2004-07-29 02:52:40 +08:00
|
|
|
echo "no"
|
2004-03-22 14:47:50 +08:00
|
|
|
echo
|
|
|
|
echo " Versions of intltool between 0.28 and 0.31 are known to"
|
|
|
|
echo " generate incorrect XML output. Please consider using an"
|
|
|
|
echo " earlier version of intltool in order to avoid these"
|
|
|
|
echo " problems until a newer version of intltool is released."
|
2004-06-17 22:33:29 +08:00
|
|
|
echo
|
|
|
|
echo " This problem is harmless, you may continue the build."
|
2004-07-20 18:06:46 +08:00
|
|
|
echo
|
2004-03-22 14:47:50 +08:00
|
|
|
else
|
|
|
|
echo "yes"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "yes"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "not found"
|
|
|
|
fi
|
|
|
|
|
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`
|
2002-05-28 07:13:40 +08:00
|
|
|
m4list="glib-2.0.m4 glib-gettext.m4 gtk-2.0.m4 intltool.m4 pkg.m4"
|
|
|
|
|
|
|
|
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."
|
|
|
|
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
|
|
|
echo " environment variable to \"-I /some/dir\", or install"
|
|
|
|
echo " $acdir/$file."
|
|
|
|
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 $?
|
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
|
|
|
|
echo "Now type 'make' to compile $PROJECT."
|