aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in35
1 files changed, 31 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 0f101a0edc3..c6fca826461 100644
--- a/configure.in
+++ b/configure.in
@@ -2731,7 +2731,7 @@ AC_CHECK_HEADERS(maillock.h)
2731 2731
2732AC_CHECK_FUNCS(gethostname getdomainname dup2 \ 2732AC_CHECK_FUNCS(gethostname getdomainname dup2 \
2733rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ 2733rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
2734random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ 2734random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
2735strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ 2735strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
2736utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 2736utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
2737__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ 2737__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
@@ -2775,17 +2775,38 @@ AC_CHECK_FUNCS(getpt)
2775# than to expect to find it in ncurses. 2775# than to expect to find it in ncurses.
2776AC_CHECK_LIB(ncurses, tparm) 2776AC_CHECK_LIB(ncurses, tparm)
2777 2777
2778# Do we have res_init, for detecting changes in /etc/resolv.conf?
2779
2780resolv=no
2781AC_CHECK_FUNC(res_init, have_res_init=yes, have_res_init=no)
2782if test "$have_res_init" = no; then
2783 OLIBS="$LIBS"
2784 LIBS="$LIBS -lresolv"
2785 AC_MSG_CHECKING(for res_init with -lresolv)
2786 AC_TRY_LINK([#include <netinet/in.h>
2787#include <arpa/nameser.h>
2788#include <resolv.h> ],
2789 [res_init();],
2790 have_res_init=yes, have_res_init=no)
2791 AC_MSG_RESULT($have_res_init)
2792 if test "$have_res_init" = yes ; then
2793 resolv=yes
2794 fi
2795 LIBS="$OLIBS"
2796fi
2797
2798if test "$have_res_init" = yes; then
2799 AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.])
2800fi
2801
2778# Do we need the Hesiod library to provide the support routines? 2802# Do we need the Hesiod library to provide the support routines?
2779if test "$with_hesiod" = yes ; then 2803if test "$with_hesiod" = yes ; then
2780 # Don't set $LIBS here -- see comments above. 2804 # Don't set $LIBS here -- see comments above.
2781 resolv=no
2782 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, , 2805 AC_CHECK_FUNC(res_send, , [AC_CHECK_FUNC(__res_send, ,
2783 [AC_CHECK_LIB(resolv, res_send, resolv=yes, 2806 [AC_CHECK_LIB(resolv, res_send, resolv=yes,
2784 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])]) 2807 [AC_CHECK_LIB(resolv, __res_send, resolv=yes)])])])
2785 if test "$resolv" = yes ; then 2808 if test "$resolv" = yes ; then
2786 RESOLVLIB=-lresolv 2809 RESOLVLIB=-lresolv
2787 AC_DEFINE(HAVE_LIBRESOLV, 1,
2788 [Define to 1 if you have the resolv library (-lresolv).])
2789 else 2810 else
2790 RESOLVLIB= 2811 RESOLVLIB=
2791 fi 2812 fi
@@ -2795,6 +2816,12 @@ if test "$with_hesiod" = yes ; then
2795 :, $RESOLVLIB)]) 2816 :, $RESOLVLIB)])
2796fi 2817fi
2797 2818
2819# Do we need libresolv (due to res_init or Hesiod)?
2820if test "$resolv" = yes ; then
2821 AC_DEFINE(HAVE_LIBRESOLV, 1,
2822 [Define to 1 if you have the resolv library (-lresolv).])
2823fi
2824
2798# These tell us which Kerberos-related libraries to use. 2825# These tell us which Kerberos-related libraries to use.
2799if test "${with_kerberos+set}" = set; then 2826if test "${with_kerberos+set}" = set; then
2800 AC_CHECK_LIB(com_err, com_err) 2827 AC_CHECK_LIB(com_err, com_err)