Vincent Torri <vtorri@xxxxxxxxxxxx> writes: > Hey, > > I've written an m4 macro which is basically: > > > AC_DEFUN([AC_CHECK_ECORE_MODULE], > [ > pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl > > ecore_]DOWN[_libs="" > > AC_SUBST(ecore_]DOWN[_libs) > > popdef([DOWN]) > ]) After AC_DEFUN has been executed the body of AC_CHECK_ECORE_MODULE basically looks like this: pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl ecore_DOWN_libs="" AC_SUBST(ecore_DOWN_libs) popdef([DOWN]) Note that the outer level of quoting has been stripped at the time the AC_DEFUN macro was expanded. > But it seems that I do not use correctly the DOWN variable (ecore_***_libs > is not subsituted). I have tried with DOWN instead of ]DOWN[ without > success. > > Does someone know the correct syntax to do what I want ? What you want is that the body of the macro looks like this: pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl ecore_[]DOWN[]_libs="" AC_SUBST(ecore_[]DOWN[]_libs) popdef([DOWN]) Now put a pair of quotes around it, and you get this: AC_DEFUN([AC_CHECK_ECORE_MODULE], [ pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl ecore_[]DOWN[]_libs="" AC_SUBST(ecore_[]DOWN[]_libs) popdef([DOWN]) ]) Andreas. -- Andreas Schwab, SuSE Labs, schwab@xxxxxxx SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf