autoconf
[Top][All Lists]
Advanced

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

AC_CHECK_FUNCS vs. undeclared entry points


From: Eric Blake
Subject: AC_CHECK_FUNCS vs. undeclared entry points
Date: Fri, 14 Apr 2006 14:53:30 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

While trying to compile CVS gettext on cygwin, I encountered:

 gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -
DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -
DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -
DIN_LIBRARY -DINSTALLDIR=\"/usr/local/lib\" -DNO_XMALLOC -
Dset_relocation_prefix=libintl_set_relocation_prefix -
Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -
I.. -g2 -Wall -Werror ./l10nflist.c  -DPIC -o .libs/l10nflist.o
./l10nflist.c: In function `_nl_make_l10nflist':
./l10nflist.c:210: warning: implicit declaration of function `__argz_stringify'
./l10nflist.c:267: warning: implicit declaration of function `__argz_count'
./l10nflist.c:314: warning: implicit declaration of function `__argz_next'
./l10nflist.c:314: warning: assignment makes pointer from integer without a cast
make[3]: *** [l10nflist.lo] Error 1

It turns out that gettext was doing AC_CHECK_FUNCS([__argz_stringify]).  Well,
on cygwin, the entry point __argz_stringify is defined as an alias to
argz_stringify, so the conftest.c program links just fine because it provides
its own prototype, while l10nflist.c fails to compile because the __*
variants are not declared in any header.

Should we change AC_CHECK_FUNCS to also check for a prototype?  Or should
we just beef up the documentation of AC_CHECK_FUNCS to cross-reference
AC_CHECK_DECLS?  After all, this case shows it is possible for a function
to be linkable without declaration; and I suppose that in the opposite
case, a declaration can exist without linkage if it is a macro.

-- 
Eric Blake






reply via email to

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