[Top][All Lists]

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

AC_CHECK_DECLS is not flexible enough

From: Bruno Haible
Subject: AC_CHECK_DECLS is not flexible enough
Date: Thu, 9 Jan 2003 21:50:11 +0100 (CET)


In order to reduce the size of my configure files, I need to merge several
AC_CHECK_DECLS invocations (originating from different places) into a
single one. But it doesn't work because AC_CHECK_DECLS doesn't accept the
value of a shell variable. (In contrast to AC_CHECK_HEADERS and
AC_CHECK_FUNCS, where this works.)

============================ configure.in ==============================

funcs="malloc, free, foobar"

funcs="getenv foobar"


Process it with autoconf-2.57 and run it:

$ autoconf-2.57 
$ ./configure 
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether malloc, free, foobar is declared... yes
checking whether getenv foobar is declared... no
configure: creating ./config.status

It would just be a matter of using AC_FOREACH instead of m4_foreach...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]