1 AC_DEFUN([OPENAFS_LIBRARY_CHECKS],[
2 if test "x${MKAFS_OSTYPE}" = "xIRIX"; then
3 echo Skipping library tests because they confuse Irix.
5 AC_SEARCH_LIBS([socket], [socket inet])
6 AC_SEARCH_LIBS([connect], [nsl])
7 AC_SEARCH_LIBS([gethostbyname], [dns nsl resolv])
9 dnl darwin wants it, aix hates it
10 AC_MSG_CHECKING(for the useability of arpa/nameser_compat.h)
11 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
14 #include <sys/types.h>
15 #include <sys/socket.h>
16 #include <netinet/in.h>
17 #include <arpa/inet.h>
18 #include <arpa/nameser.h>
19 #include <arpa/nameser_compat.h>
21 ]], [[static int i; i = 0;]])],[AC_MSG_RESULT(yes)
22 AC_DEFINE(HAVE_ARPA_NAMESER_COMPAT_H, 1, [define if arpa/nameser_compat.h exists])],[AC_MSG_RESULT(no)
25 openafs_save_libs="$LIBS"
26 AC_MSG_CHECKING([for res_search])
29 if test "$ac_cv_func_res_search" = no; then
30 for lib in dns nsl resolv; do
31 if test "$ac_cv_func_res_search" != yes; then
34 LIBS="$openafs_save_libs"
37 if test "$ac_cv_func_res_search" = yes; then
39 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
40 AC_MSG_RESULT([yes, in lib$lib])
45 AC_DEFINE(HAVE_RES_SEARCH, 1, [])
50 XLIBS="$LIB_AFSDB $XLIBS"