[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
passing a macro as an argument of macro
From: |
Vincent Torri |
Subject: |
passing a macro as an argument of macro |
Date: |
Sat, 31 Mar 2007 11:24:51 +0200 (CEST) |
Hey,
I would like to do the following:
defining several macros that have the same signature :
dnl use: MACRO1(ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND])
AC_DEFUN([MACRO1],
[
****
])
dnl use: MACRO2(ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND])
AC_DEFUN([MACRO2],
[
****
])
and pass one of them to another macro
dnl use: MAIN_MACRO(macro)
AC_DEFUN([MAIN_MACRO],
[
dnl i want to use the 1st arg as a macro. Something like that:
$1([have_xx="yes"], [have_xx="no"])
])
MAIN_MACRO would be used that way:
MAIN_MACRO(MACRO1)
MAIN_MACRO(MACRO2)
Is it possible ? If yes, what is the syntax I should use in MAIN_MACRO ?
thank you
Vincent Torri
- passing a macro as an argument of macro,
Vincent Torri <=