autoconf
[Top][All Lists]
Advanced

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

Re: m4_shift does not work


From: Roger Leigh
Subject: Re: m4_shift does not work
Date: Fri, 3 Aug 2001 22:01:42 +0100
User-agent: Mutt/1.2.5i

On Thu, Aug 02, 2001 at 11:07:21PM +0200, address@hidden wrote:
> On Wed, Aug 01, 2001 at 02:59:53PM +0100, Roger Leigh wrote:
> > In autoconf-2.13, shift was explicitly undefined in acgeneral.m4.
> > In 2.50 it seems to be renamed to m4_shift, and there is also
> > m4_shiftn in m4sh.m4.  However, I can't seem to be able to use
> > either of these macros myself:
> 
> Quote your definition body.

Oops.  Thanks, it works fine now.  However, I now have a similar
problem with m4_ifelse and m4_translit etc.:

AC_DEFUN([AC_CONFIG_LIBCONFIG_IN],[# create a custom library-config file 
($1-config)
L=`echo m4_ifelse($1, , $PACKAGE, $1)`

I do quote the definition body here, but autoconf gives the error:

configure:2705: error: possibly undefined macro: m4_ifelse

(the macro is not expanded, but plain `ifelse' is).

> > Another issue I have encountered is that in 2.13, I used
> > AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl and
> > AC_DIVERT_POP()dnl
> > around code that I wanted before the AC_ARG_WITH and AC_ARG_ENABLE
> > macros, so I could use variables in the option descriptions (for
> > defaults).  Is it still possible to do this?  Simply replacing
> > AC_DIVERSION_NOTICE with '1' did not help.
> 
> Sorry, this is not precise enough for me to understand the request.
> Are you referring to sh variables?

Yes.  I have options in the following form:

AC_MSG_CHECKING([whether to build GIMP plugin])
AC_ARG_WITH(gimp,
[  --with-gimp             build GIMP plugin [default=${BUILD_GIMP}]],
  [case "${withval}" in
      yes) BUILD_GIMP="yes" ; AC_MSG_RESULT([yes]) ;;
      no) BUILD_GIMP="no" ; AC_MSG_RESULT([no]) ;;
      *) AC_MSG_RESULT([unknown])
         AC_MSG_ERROR([bad value ${withval} for --with-gimp]) ;;
   esac],[AC_MSG_RESULT([${BUILD_GIMP}])])

The sh variable BUILD_GIMP is defined previously like this:

dnl figure defaults, prior to $ac_help setup
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
BUILD_GIMP=yes
AC_DIVERT_POP()dnl

However, the AC_DIVERT_PUSH does not seem to work.  AC_DIVERSION_NOTICE
is no longer available, but if I use its old value of '1', that has no
effect either.

> Anyway, the diversion are internals only, the user must not use them.
> We'll have to find another means to do what you want.  

I knew it was internal, and undocumented.  IIRC, I pinched this from
the GTK configure.in, but I haven't thought of a better way of doing
this yet, except perhaps for pushdef/popdef (but this would preclude
my setting defaults like this in such a clean, but illegal, way).

Apart from these small problems, I really like 2.50.  Thanks.

Regards,
Roger

-- 
Roger Leigh ** Registration Number: 151826, http://counter.li.org **
Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
For GPG Public Key: finger address@hidden or see public keyservers.



reply via email to

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