1 dnl Process this file with autoconf to produce a configure script.
2 AC_RELEASE("Id: configure.in,v 1.1 2008/02/15 01:47:15 marka Exp ")
5 dnl Checks for programs.
7 if test "$GCC" = "yes"; then
8 CFLAGS="${CFLAGS} -Wall"
12 dnl Checks for libraries.
13 AC_CHECK_LIB(resolv, res_query)
15 dnl Checks for header files.
17 AC_CONFIG_HEADER(config.h)
18 AC_CHECK_HEADER(resolv.h, , AC_MSG_ERROR("No headers for name service applications"))
19 AC_CHECK_HEADER(arpa/nameser.h, , AC_MSG_ERROR("No headers for name service applications"))
20 AC_CHECK_HEADER(sys/time.h, , AC_MSG_ERROR("Mandatory header missing on your system"))
21 AC_CHECK_HEADER(unistd.h, , AC_MSG_ERROR("Mandatory header missing on your system"))
24 dnl This one is only useful for Solaris?
25 AC_MSG_CHECKING(if libnsl is mandatory)
26 AC_TRY_LINK([#include <sys/types.h>
27 #include <netinet/in.h>
28 #include <arpa/nameser.h>
33 u_char buf[4096]; /* With RFC 2671, otherwise 512 is enough */
37 int requested_type; ],
41 (u_char *) & response,
42 sizeof (response)) ], dnl
43 [AC_MSG_RESULT(no)], dnl
44 [AC_MSG_RESULT(yes); LIBS="${LIBS} -lnsl"])
46 dnl Check for the loc_ntoa macro/function
47 AC_MSG_CHECKING(loc_ntoa)
48 AC_TRY_LINK([#include <resolv.h>], dnl
49 [u_char *cp; char *result; loc_ntoa(cp, result)], dnl
50 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOC_NTOA)], dnl
51 [AC_MSG_RESULT([no, using the alternative]); LOC_NTOA=loc_ntoa.o])
54 dnl Checks for typedefs, structures, and compiler characteristics.
58 AC_CHECK_SIZEOF(short)