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
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf