jorton 2003/10/01 10:06:45
Modified: . configure.in
Log:
* configure.in: Only look for hstrerror if IPv6 is not enabled;
avoid linking against libresolv unless it is needed.
Revision Changes Path
1.541 +8 -2 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.540
retrieving revision 1.541
diff -u -u -r1.540 -r1.541
--- configure.in 1 Oct 2003 14:11:40 -0000 1.540
+++ configure.in 1 Oct 2003 17:06:42 -0000 1.541
@@ -457,7 +457,6 @@
dnl It should check for LIBS being empty and set LIBS equal to the new value
dnl without the extra " " in that case, but they didn't do that. So, we
dnl end up LIBS="-lm -lcrypt -lnsl -ldl" which is an annoyance.
-AC_CHECK_LIB(resolv, res_init)
AC_CHECK_LIB(nsl, gethostbyname)
AC_SEARCH_LIBS(gethostname, nsl)
AC_CHECK_LIB(socket, socket)
@@ -866,7 +865,7 @@
mmap="1"
fi
AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ])
-AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r hstrerror
mkstemp])
+AC_CHECK_FUNCS([getpass getpassphrase gmtime_r localtime_r mkstemp])
AC_SUBST(fork)
AC_SUBST(have_inet_addr)
@@ -1830,6 +1829,13 @@
AC_MSG_RESULT($ipv6_result)
AC_SUBST(have_ipv6)
+
+# hstrerror is only needed if IPv6 is not enabled,
+# so getaddrinfo/gai_strerror are not used.
+if test $have_ipv6 = 0; then
+ AC_CHECK_LIB(hstrerror, resolv)
+ AC_CHECK_FUNCS(hstrerror)
+fi
dnl Check for langinfo support