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
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
LIBTOOL_REQUIRED_VERSION=1.3.4
|
2003-09-04 01:36:49 +08:00
|
|
|
LIBTOOL_WIN32=1.5.0
|
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
|
2002-05-28 07:13:40 +08:00
|
|
|
GLIB_REQUIRED_VERSION=2.0.0
|
|
|
|
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
|
2002-05-28 07:13:40 +08:00
|
|
|
VER=`libtoolize --version \
|
|
|
|
| grep libtool | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
|
2002-05-28 23:43:24 +08:00
|
|
|
check_version $VER $LIBTOOL_REQUIRED_VERSION
|
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/"
|
|
|
|
DIE=1;
|
2001-08-28 22:59:42 +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,"
|
|
|
|
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
|
|
|
DIE=1;
|
1999-11-13 06:31:57 +08:00
|
|
|
fi
|
|
|
|
|
2002-05-28 07:13:40 +08:00
|
|
|
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
|
2003-02-25 06:49:45 +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
|
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
|
2003-02-25 06:49:45 +08:00
|
|
|
echo " You must have automake 1.6 or 1.7 installed to compile $PROJECT."
|
|
|
|
echo " Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.3.tar.gz"
|
2002-05-28 07:13:40 +08:00
|
|
|
echo " (or a newer version if it is available)"
|
|
|
|
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
|
|
|
|
|
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."
|
|
|
|
DIE=1
|
2002-02-23 01:35:07 +08:00
|
|
|
fi
|
|
|
|
|
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/"
|
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
|
|
|
|
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
|
|
|
|
1998-02-26 19:55:07 +08:00
|
|
|
if test -z "$*"; then
|
2002-05-28 07:13:40 +08:00
|
|
|
echo
|
|
|
|
echo "I am going to run ./configure with no arguments - if you wish "
|
|
|
|
echo "to pass any to it, please specify them on the $0 command line."
|
|
|
|
echo
|
1998-02-26 19:55:07 +08:00
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
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."
|
|
|
|
exit 1
|
|
|
|
fi
|
1998-09-07 03:52:22 +08:00
|
|
|
|
2003-02-26 20:48:48 +08:00
|
|
|
libtoolize --copy --force
|
|
|
|
|
2001-08-28 21:04:47 +08:00
|
|
|
# optionally feature autoheader
|
|
|
|
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
1999-01-10 14:53:30 +08:00
|
|
|
|
2002-11-18 20:23:05 +08:00
|
|
|
$AUTOMAKE --add-missing
|
2001-08-28 21:04:47 +08:00
|
|
|
autoconf
|
1999-01-10 14:53:30 +08:00
|
|
|
|
2002-02-23 01:35:07 +08:00
|
|
|
glib-gettextize --copy --force
|
|
|
|
intltoolize --copy --force --automake
|
|
|
|
|
1999-01-10 14:53:30 +08:00
|
|
|
cd $ORIGDIR
|
1999-01-08 03:54:45 +08:00
|
|
|
|
2002-11-12 11:34:11 +08:00
|
|
|
if $srcdir/configure --enable-maintainer-mode --enable-gtk-doc "$@"; then
|
|
|
|
echo
|
|
|
|
echo "Now type 'make' to compile $PROJECT."
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
echo "Configure failed or did not finish!"
|
|
|
|
fi
|
1998-02-26 19:55:07 +08:00
|
|
|
|