]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix autoconf test for getaddrinfo_a
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Feb 2016 03:53:27 +0000 (04:53 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Feb 2016 03:53:27 +0000 (04:53 +0100)
* configure.ac: Make the test for getaddrinfo_a work.

configure.ac

index b00cc1a266f27a507e37940eb49506f8397af856..1d2b175eae4aaefd650a4c08acc7069d04d04c95 100644 (file)
@@ -2408,15 +2408,13 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
   fi
 fi
 
-GETADDRINFO_A_LIBS="-lanl"
-AC_CHECK_LIB(anl, getaddrinfo_a, HAVE_GETADDRINFO_A=yes, HAVE_GETADDRINFO_A=no,
-        [$GETADDRINFO_A_LIBS])
-AC_SUBST(GETADDRINFO_A_LIBS)
-
-OLD_LIBS=$LIBS
-LIBS="-lanl $LIBS"
-AC_CHECK_FUNCS(getaddrinfo_a)
-LIBS=$OLD_LIBS
+AC_CHECK_LIB(anl, getaddrinfo_a, HAVE_GETADDRINFO_A=yes)
+if test "${HAVE_GETADDRINFO_A}" = "yes"; then
+  AC_DEFINE(HAVE_GETADDRINFO_A, 1,
+[Define to 1 if you have getaddrinfo_a for asynchronous DNS resolution.])
+  GETADDRINFO_A_LIBS="-lanl"
+  AC_SUBST(GETADDRINFO_A_LIBS)
+fi
 
 HAVE_GTK=no
 GTK_OBJ=