Re: macros which define macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam Steingold <sds@xxxxxxx> 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],[$@])])
AC_DEFUN([CL_LINK_CHECK],
[CL_CHECK([AC_LINK_IFELSE],[$@])])

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


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux