[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macros which define macros
From: |
Andreas Schwab |
Subject: |
Re: macros which define macros |
Date: |
Thu, 29 May 2008 19:20:35 +0200 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) |
Sam Steingold <address@hidden> writes:
> Sam Steingold wrote:
> |
> | AC_DEFUN([CL_CHECK],[dnl
> | AC_CACHE_CHECK(for $2,$3,$1(AC_LANG_PROGRAM([$4],[$5]),[$3=yes], [$3=no]))
> | if test [$]$3 = yes; then
> | ~ ifelse([$6], , :, [$6])
> | ifelse([$7], , , [else
> | ~ $7
> | ])dnl
> | fi
> | ])
> |
> | AC_DEFUN([CL_COMPILE_CHECK],
> | [CL_CHECK(AC_COMPILE_IFELSE,[$1],[$2],[$3],[$4],[$5],[$6])])
> | AC_DEFUN([CL_LINK_CHECK],
> | [CL_CHECK(AC_LINK_IFELSE,[$1],[$2],[$3],[$4],[$5],[$6])])
>
> sorry. the configure script is generated just fine (autoconf 2.62, m4
> 1.4.5), but the resulting script is broken:
>
> src/configure: line 33309: syntax error near unexpected token `('
> src/configure: line 33309: `rm -f core conftest.err conftest.$ac_objext
> (/* confdefs.h. */'
Missing quotes. Remember that m4 always expands the arguments before
exanding the macro itself. Also, you can use $@ to forward all
arguments.
AC_DEFUN([CL_COMPILE_CHECK],
[CL_CHECK([AC_COMPILE_IFELSE],address@hidden)])
AC_DEFUN([CL_LINK_CHECK],
[CL_CHECK([AC_LINK_IFELSE],address@hidden)])
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
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."