1dnl 2dnl missing defines 3dnl 4AC_DEFUN([OBSD_NEED_RESOLV_DEFINES], [ 5 AC_MSG_CHECKING([if RES_USE_EDNS0 is defined in resolv.h]) 6 AC_EGREP_CPP(HAVE_RES_USE_EDNS0, [ 7 #include <sys/types.h> 8 #include <netinet/in.h> 9 #include <arpa/nameser.h> 10 #include <resolv.h> 11 #ifdef RES_USE_EDNS0 12 HAVE_RES_USE_EDNS0 13 #endif 14 ], 15 [ AC_MSG_RESULT([yes]) ], 16 [ AC_MSG_RESULT([no]) 17 AC_DEFINE([RES_USE_EDNS0], [0], [Defined to 0 if RES_USE_EDNS0 is not a supported resolver flag.]) ]) 18 19 AC_MSG_CHECKING([if RES_USE_DNSSEC is defined in resolv.h]) 20 AC_EGREP_CPP(HAVE_RES_USE_DNSSEC, [ 21 #include <sys/types.h> 22 #include <netinet/in.h> 23 #include <arpa/nameser.h> 24 #include <resolv.h> 25 #ifdef RES_USE_DNSSEC 26 HAVE_RES_USE_DNSSEC 27 #endif 28 ], 29 [ AC_MSG_RESULT([yes]) ], 30 [ AC_MSG_RESULT([no]) 31 AC_DEFINE([RES_USE_DNSSEC], [0], [Defined to 0 if RES_USE_DNSSEC is not a supported resolver flag.]) ]) 32]) 33 34 35dnl 36dnl res_hnok() 37dnl 38AC_DEFUN([OBSD_TEST_PROG_RES_HNOK], [AC_LANG_PROGRAM([[ 39 #include <sys/types.h> 40 #include <netinet/in.h> 41 #include <arpa/nameser.h> 42 #include <netdb.h> 43 #include <resolv.h> 44 ]], [[ 45 res_hnok(""); 46 ]]) 47]) 48 49AC_DEFUN([OBSD_NEED_RES_HNOK], [ 50 AC_MSG_CHECKING([if res_hnok will link]) 51 AC_LINK_IFELSE( 52 [ OBSD_TEST_PROG_RES_HNOK ], 53 [ AC_MSG_RESULT([yes]) 54 AC_DEFINE([HAVE_RES_HNOK], [1], [Have res_hnok()])], 55 [ AC_MSG_RESULT([no]) 56 saved_LIBS="$LIBS" 57 LIBS="$LIBS -lresolv" 58 AC_MSG_CHECKING([for res_hnok in -lresolv]) 59 AC_LINK_IFELSE( 60 [ OBSD_TEST_PROG_RES_HNOK ], 61 [ AC_MSG_RESULT([yes]) 62 AC_DEFINE([HAVE_RES_HNOK], [1], [Have res_hnok()])], 63 [ LIBS="$saved_LIBS" 64 AC_MSG_RESULT([no])]) ]) 65]) 66