[Top][All Lists]

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

Re: AS_IF and AC_ARG_VAR issue with 2.62

From: Luca Barbato
Subject: Re: AS_IF and AC_ARG_VAR issue with 2.62
Date: Wed, 21 May 2008 19:30:01 +0200
User-agent: Thunderbird (X11/20080228)

Eric Blake wrote:
According to Eric Blake on 5/20/2008 8:59 PM:
| But I don't see any mention of AS_IF or AC_ARG_VAR in your snippet (ie.
| your subject line is inconsistent with your pasted example).  Without
| knowing the definition of PKG_WITH_MODULES, which is not an autoconf
| macro, I can only guess that it too has underquoted arguments.

Apologies; I didn't see that you had attached it, since it wasn't sent
with a text MIME type.

I'll try to address this issue

| #                  [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
| #                  [DESCRIPTION], [DEFAULT])
| #
| #

It might also be interesting to see the definition of PKG_CHECK_MODULES.

AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl


| m4_define([with_arg], m4_tolower($1))

Use m4_pushdef, not m4_define, when defining local m4 variables, so that
you don't destroy any prior definitions.  Proper quoting would be:

I'll do.

m4_pushdef([with_arg], m4_tolower([$1]))

| dnl Default description
| m4_define([description],ifelse([$5], , [build with ]with_arg[ support],

I prefer seeing the m4sugar builtins, rather than raw m4.  Also, by not
quoting the ifelse, the user's description is subject to overexpansion
(once in defining description, and once more when using description),
making it much harder for the user's description to supply , or [] in the
description.  I'd write this as:

~  [m4_default([$5], [build with ]with_arg[ support])])

| dnl Disabled by default
| m4_define([def_arg],ifelse([$6], , [no], [$6]))

Thank you, I'll update the macro as you suggest.

| AM_CONDITIONAL([WITH_][$1], [test "AS_TR_SH([with_]with_arg)" = "yes"])
| if test "$AS_TR_SH([with_]with_arg)" = "yes"; then
|     PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
| fi

I take it this is where you tried to use AS_IF?

right it was something like

   AS_IF([test "$AS_TR_SH([with_]with_arg)" = "yes"],


Thank you for the insight, I'm trying to learn how to properly use autotools and isn't that easy get enough information.



Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC

reply via email to

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