[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test in a m4 macro and variable created from pushdef
From: |
Vincent Torri |
Subject: |
Re: test in a m4 macro and variable created from pushdef |
Date: |
Thu, 9 Aug 2007 20:11:37 +0200 (CEST) |
I have another problem, which is similar. The problem is the result of
AM_CONDITIONAL. Here is my macro:
AC_DEFUN([AS_CHECK_DRIVER], [
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
AC_ARG_ENABLE([DOWN[]],
AC_HELP_STRING(
[--disable-[]DOWN],
[Build VFlib without $2 font driver]
),
[
if test "x${enableval}" = "xyes"; then
use_]DOWN[_driver="yes"
AC_DEFINE(WITH_[]UP, 1, [$2 font driver support])
else
use_]DOWN[_driver="no"
fi
],
[
use_]DOWN[_driver="yes"
AC_DEFINE(WITH_[]UP, 1, [$2 font driver support])
]
)
AM_CONDITIONAL(BUILD_DRIVER_[]UP, test "x${use_]DOWN[}" = "xyes")
popdef([UP])
popdef([DOWN])
])
the first parameter is a word (driver name), the second is a string about
the description of the sriver
I use it that way (for example):
AS_CHECK_DRIVER([bdf], [BDF])
the variable use_bdf is equal to "yes", but in my Makefile.am, when I use:
if BUILD_DRIVER_BDF
DRV_BDF_SRC = drv_bdf.c
endif
DRV_BDF_SRC is not set: in the Makefile, I can see:
#DRV_BDF_SRC = drv_bdf.c
I have tried to add brackets:
AM_CONDITIONAL(BUILD_DRIVER_[]UP, test "x${use_[]DOWN[]}" = "xyes")
but it does not work.
Does someone see why BUILD_DRIVER_* is not set ?
Thank you
Vincent Torri
- test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/08
- Re: test in a m4 macro and variable created from pushdef, Andreas Schwab, 2007/08/08
- Re: test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/09
- Re: test in a m4 macro and variable created from pushdef,
Vincent Torri <=
- Re: test in a m4 macro and variable created from pushdef, Eric Blake, 2007/08/09
- Re: test in a m4 macro and variable created from pushdef, Benoit SIGOURE, 2007/08/09
- Re: test in a m4 macro and variable created from pushdef, Eric Blake, 2007/08/09
- Re: test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/10
- Re: test in a m4 macro and variable created from pushdef, Ralf Wildenhues, 2007/08/10
- Re: test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/11
- Re: test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/11
- Re: test in a m4 macro and variable created from pushdef, Keith Marshall, 2007/08/11
- Re: test in a m4 macro and variable created from pushdef, Vincent Torri, 2007/08/11
- Re: test in a m4 macro and variable created from pushdef, Ralf Wildenhues, 2007/08/15