[cairo-commit] 2 commits - acinclude.m4 build/aclocal.cairo.m4

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Sep 18 00:12:26 PDT 2008


 acinclude.m4           |   40 ++++++++++++++++++++++++++++++++++++++--
 build/aclocal.cairo.m4 |    3 ---
 2 files changed, 38 insertions(+), 5 deletions(-)

New commits:
commit 24c51ee177436190d691507ab84aae6a70fc2962
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Sep 18 03:12:03 2008 -0400

    [acinclude.m4] Add compat macros for autoconf 2.59

diff --git a/acinclude.m4 b/acinclude.m4
index 9ae1b8f..c45b4d2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -4,10 +4,30 @@ dnl [m4_newline] didn't appear until autoconf 2.62
 m4_ifdef([m4_newline],,[m4_define([m4_newline],[
 ])])
 
-dnl [m4_foreach_w] wasn't available in 2.59
+dnl These are not available in autoconf 2.59
+
 m4_ifdef([m4_foreach_w],,[m4_define([m4_foreach_w],
 [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
 
+m4_ifdef([AS_CASE],,[
+m4_define([_AS_CASE],
+[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
+       [$#], 1, [  *) $1 ;;],
+       [$#], 2, [  $1) m4_default([$2], [:]) ;;],
+       [  $1) m4_default([$2], [:]) ;;
+$0(m4_shift2($@))])dnl
+])
+m4_defun([AS_CASE],
+[m4_ifval([$2$3],
+[case $1 in
+_AS_CASE(m4_shift($@))
+esac
+])dnl
+])# AS_CASE
+])
+
+m4_ifdef([m4_shift2],, [m4_define([m4_shift2], [m4_shift(m4_shift($@))])])
+
 
 dnl ==========================================================================
 
@@ -22,3 +42,14 @@ m4_define([CAIRO_PARSE_VERSION],dnl
 			    [A-Z], [a-z])dnl
 )dnl
 
+dnl ==========================================================================
+
+m4_pattern_forbid([^cr_])
+
+dnl AC_AUTOCONF_VERSION was introduced in 2.62, so its definition works as
+dnl a conditional on version >= 2.62.  Older versions did not call
+dnl m4_pattern_allow from AC_DEFINE and friends.  To avoid lots of warnings we
+dnl only forbid CAIRO_ if autoconf is recent enough.
+m4_ifdef([AC_AUTOCONF_VERSION],
+[m4_pattern_forbid([CAIRO])],
+[m4_pattern_forbid([_CAIRO])])
diff --git a/build/aclocal.cairo.m4 b/build/aclocal.cairo.m4
index 73a64f6..2187e4e 100644
--- a/build/aclocal.cairo.m4
+++ b/build/aclocal.cairo.m4
@@ -1,10 +1,7 @@
-
 dnl ==========================================================================
 dnl
 dnl Cairo-specific macros
 dnl
-m4_pattern_forbid([CAIRO])
-m4_pattern_forbid([^cr_])
 
 dnl ==========================================================================
 
commit 61317dac18a78b7b8420f354a59be896d60dd05c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Sep 18 02:42:38 2008 -0400

    [acinclude.m4] Define m4_foreach_w if not available
    
    Has been missing at least as of autoconf 2.59.

diff --git a/acinclude.m4 b/acinclude.m4
index fdafe0b..9ae1b8f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,8 +1,13 @@
 dnl -*- mode: autoconf -*-
 
 dnl [m4_newline] didn't appear until autoconf 2.62
-m4_ifdef([m4_newline],,m4_define([m4_newline],[
-]))
+m4_ifdef([m4_newline],,[m4_define([m4_newline],[
+])])
+
+dnl [m4_foreach_w] wasn't available in 2.59
+m4_ifdef([m4_foreach_w],,[m4_define([m4_foreach_w],
+[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+
 
 dnl ==========================================================================
 


More information about the cairo-commit mailing list