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
="GIMP Liquid Rescale Plug-In"
15 AUTOCONF_REQUIRED_VERSION
=2.54
16 AUTOMAKE_REQUIRED_VERSION
=1.6
17 GLIB_REQUIRED_VERSION
=2.0.0
18 INTLTOOL_REQUIRED_VERSION
=0.17
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, glib-gettextize and intltoolize..."
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.11
--version) < /dev
/null
> /dev
/null
2>&1; then
69 AUTOMAKE
=automake-1.11
71 elif (automake-1.6
--version) < /dev
/null
> /dev
/null
2>&1; then
76 echo " You must have automake 1.6 or newer installed to compile $PROJECT."
77 echo " Download the appropriate package for your distribution,"
78 echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/"
82 if test x
$AUTOMAKE != x
; then
83 VER
=`$AUTOMAKE --version \
84 | grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
85 check_version
$VER $AUTOMAKE_REQUIRED_VERSION
88 echo -n "checking for glib-gettextize >= $GLIB_REQUIRED_VERSION ... "
89 if (glib-gettextize
--version) < /dev
/null
> /dev
/null
2>&1; then
90 VER
=`glib-gettextize --version \
91 | grep glib-gettextize | sed "s/.* \([0-9.]*\)/\1/"`
92 check_version
$VER $GLIB_REQUIRED_VERSION
95 echo " You must have glib-gettextize installed to compile $PROJECT."
96 echo " glib-gettextize is part of glib-2.0, so you should already"
97 echo " have it. Make sure it is in your PATH."
101 echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... "
102 if (intltoolize
--version) < /dev
/null
> /dev
/null
2>&1; then
103 VER
=`intltoolize --version \
104 | grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
105 check_version
$VER $INTLTOOL_REQUIRED_VERSION
108 echo " You must have intltool installed to compile $PROJECT."
109 echo " Get the latest version from"
110 echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/"
114 if test "$DIE" -eq 1; then
116 echo "Please install/upgrade the missing tools and call me again."
122 test $TEST_TYPE $FILE ||
{
124 echo "You must run this script in the top-level $PROJECT directory."
131 echo "I am going to run ./configure with the following arguments:"
133 echo " --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS $@"
136 if test -z "$*"; then
137 echo "If you wish to pass additional arguments, please specify them "
138 echo "on the $0 command line or set the AUTOGEN_CONFIGURE_ARGS "
139 echo "environment variable."
143 if test -z "$ACLOCAL_FLAGS"; then
145 acdir
=`$ACLOCAL --print-ac-dir`
146 m4list
="glib-gettext.m4 intltool.m4"
150 if [ ! -f "$acdir/$file" ]; then
152 echo "WARNING: aclocal's directory is $acdir, but..."
153 echo " no file $acdir/$file"
154 echo " You may see fatal macro warnings below."
155 echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
156 echo " environment variable to \"-I /some/dir\", or install"
157 echo " $acdir/$file."
163 rm -rf autom4te.cache
165 $ACLOCAL $ACLOCAL_FLAGS
167 if test $RC -ne 0; then
168 echo "$ACLOCAL gave errors. Please fix the error conditions and try again."
172 # optionally feature autoheader
173 (autoheader
--version) < /dev
/null
> /dev
/null
2>&1 && autoheader ||
exit 1
175 $AUTOMAKE --add-missing ||
exit 1
178 glib-gettextize
--copy --force ||
exit 1
179 intltoolize
--copy --force --automake ||
exit 1
183 $srcdir/configure
--enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@"
185 if test $RC -ne 0; then
187 echo "Configure failed or did not finish!"
192 echo "Now type 'make' to compile $PROJECT."