autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quick divert() 2.13/2.6x portability macro


From: Rasmus Lerdorf
Subject: Quick divert() 2.13/2.6x portability macro
Date: Fri, 27 Nov 2009 23:35:01 -0800
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Having plenty of problems getting our old 2.13-based autoconf setup
working under the new diversions in 2.6

I tried an initial naiive approach of simply wrapping divert in a
version check like this:

AC_DEFUN([PHP_DIVERT],[
   ifdef([AC_AUTOCONF_VERSION],
     [
       m4_case([$1],
         [1],[divert(1001)],
         [2],[divert(1002)],
         [3],[divert(1003)],
         [4],[divert(1004)],
         [5],[divert(1005)])
     ],
     [
       divert($1)
     ])
])

Under 2.13 it seems happy enough with it, but with 2.64 I get:

configure.in:4: error: m4_divert_pop(GROW): diversion mismatch:
configure.in:4: m4_divert: 1001
../../lib/m4sugar/m4sugar.m4:3251: m4_divert_push: KILL
autom4te: /usr/bin/m4 failed with exit status: 1

There must be a better way to map 2.13 behaviour to 2.6.  Has anybody
tackled this?

-Rasmus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]