Re: `CHECK_LIB', `CHECK_FUNC' and macros

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

 



On Fri, May 28, 2004 at 12:03:11PM +0200,
 Ludovic Courtès <ludovic.courtes@xxxxxxxx> wrote 
 a message of 48 lines which said:

> Both `AC_CHECK_LIB' and `AC_CHECK_FUNC' check whether a *symbol* can be
> found in the given library (or in one of `$LIBS').  However, on Tru64
> UNIX 5.1 (aka. Digital UNIX, OSF1, ...) <pthread.h> does the following:
...
> The same problem might very well arise with other headers/libraries,
> unless some standard defines which symbols are mandatory.  What do
> people think about it?

The network interface (getaddrinfo and friends) has the same problem
on Tru64. IMHO, autoconf should allow to include a header in test
testing program. My workaround:

dnl Some Unices like Tru64 or Mac OS X has getaddrinfo() or
dnl getnameinfo() but has it renamed in libc as something else so we
dnl must include <netdb.h> to get the redefinition. (Stolen from rsync)
dnl autoconf AC_CHECK_FUNCS does not allow headers to be easily included :-(
AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_ntop, ,
	[AC_MSG_CHECKING([$ac_func again by including <netdb.h>])
	AC_TRY_LINK([#include <sys/types.h>
	#include <sys/socket.h>
	#include <netdb.h>],[$ac_func(NULL, NULL, NULL, NULL);],
		[AC_MSG_RESULT([yes])],
		[AC_MSG_ERROR([Missing mandatory function - echoping now uses the new network functions (RFC 2133) which are mandatory for IPv6])]
         	)])
		




_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://mail.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