[cairo] patch for autogen
Bryce Harrington
bryce at osdl.org
Mon Aug 16 16:19:03 PDT 2004
Hi Carl,
I ran into kind of an oddball problem configuring cairo on my gentoo
system. When I ran ./autogen.sh for cairo it indicated that my autoconf
and automake versions were too old, however:
$ ls /usr/bin/auto[cm]*
/usr/bin/autoconf /usr/bin/autom4te-2.59 /usr/bin/automake-1.6
/usr/bin/autoconf-2.13 /usr/bin/automake /usr/bin/automake-1.7
/usr/bin/autoconf-2.59 /usr/bin/automake-1.4 /usr/bin/automake-1.8
/usr/bin/autom4te /usr/bin/automake-1.5
`autoconf` and `automake` were actually wrappers that tried to figure
out which versions were desired based on various heuristics. For
autoconf I was able to get it to work via this change to configure.in:
Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.58
diff -u -p -u -r1.58 configure.in
--- configure.in 21 Jun 2004 22:13:52 -0000 1.58
+++ configure.in 16 Aug 2004 23:15:03 -0000
@@ -1,3 +1,5 @@
+
+AC_PREREQ(2.50)
AC_INIT(src/cairo.h)
dnl ===========================================================================
For automake, I could not figure out a simple way to satisfy the
heuristics so instead added this to autogen.sh:
Index: autogen.sh
===================================================================
RCS file: /cvs/cairo/cairo/autogen.sh,v
retrieving revision 1.6
diff -u -p -u -r1.6 autogen.sh
--- autogen.sh 14 Aug 2004 13:35:30 -0000 1.6
+++ autogen.sh 16 Aug 2004 23:16:33 -0000
@@ -41,6 +41,13 @@ else
DIE="yes"
fi
+# Use automake-1.7 if available. Some automake installations will try to
+# provide an earlier version of automake if run without specifying
+if (automake-1.7 --version) < /dev/null > /dev/null 2>&1 ; then
+ AUTOMAKE=automake-1.7
+ ACLOCAL=aclocal-1.7
+fi
+
if ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 ; then
if ($AUTOMAKE --version | head -1 | awk 'NR==1 { if( $(NF) >= '$automake_min_vers') \
exit 1; exit 0; }');
FWIW, here are some other ways for getting it to use automake 1.7:
# - runs automake-1.7 if it exists and...
# - envvar WANT_AUTOMAKE is set to `1.7'
# -or-
# - `Makefile.in' was generated by automake-1.7 or superior, which
# specifically needs automake-1.7
# -or-
# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.7
# -or-
Bryce
More information about the cairo
mailing list