1 # Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(arlib, 1.0)
4 AC_CONFIG_SRCDIR([arlib.c])
5 #AM_CONFIG_HEADER([config.h])
11 # Checks for libraries.
12 AC_CHECK_FUNC([gethostent], ,
13 [AC_SEARCH_LIBS([gethostent], [nsl], , , [-lsocket])])
14 AC_SEARCH_LIBS([setsockopt], [socket xnet])
15 AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
16 AC_CHECK_FUNCS(res_init __res_init)
19 # Checks for header files.
20 dnl AC_CHECK_HEADERS([errno.h fcntl.h netdb.h netinet/in.h strings.h sys/socket.h sys/time.h])
22 # Checks for typedefs, structures, and compiler characteristics.
25 AC_CHECK_TYPE(u_int32_t, ,
26 [AC_DEFINE(u_int32_t, [unsigned int], [Unsigned 32-bit type])],[
27 #include <sys/types.h>
28 #include <netinet/in.h>])
30 AC_CACHE_CHECK([for name of NS address list], [ac_cv_var_ns_addr_list],
31 [ac_cv_var_ns_addr_list=''
34 #include <sys/types.h>
35 #include <netinet/in.h>
36 #include <arpa/nameser.h>
37 #include <resolv.h>], [ return sizeof(_res.nsaddr_list);],
38 [ac_cv_var_ns_addr_list=nsaddr_list],
41 #include <sys/types.h>
42 #include <netinet/in.h>
43 #include <arpa/nameser.h>
44 #include <resolv.h>], [ return sizeof(_res.ns_list);],
45 [ac_cv_var_ns_addr_list=ns_list])])
46 case "$ac_cv_var_ns_addr_list" in
47 '') AC_MSG_RESULT([???])
48 AC_MSG_ERROR([Can't find nameserver address list in _res])
51 AC_DEFINE_UNQUOTED(NS_ADDR_LIST, $ac_cv_var_ns_addr_list, [The name of the NS address list in _res])
53 # Checks for library functions.
56 dnl AC_CHECK_FUNCS([bzero inet_ntoa select socket])
58 AC_CONFIG_FILES([Makefile])