]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac] Change the -lresolv check so it works on Mac OS X
authordtucker <dtucker>
Fri, 11 Sep 2009 04:56:08 +0000 (04:56 +0000)
committerdtucker <dtucker>
Fri, 11 Sep 2009 04:56:08 +0000 (04:56 +0000)
   10.6 (which doesn't have BIND8_COMPAT and thus uses res_9_query).  Patch
   from jbasney at ncsa uiuc edu.

ChangeLog
configure.ac

index dcb471b530494778f6fdbeeb9d0bf40c5d835fc3..83664dc3de0051f0791a4abd2d15b467bf8e2272 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20090911
+ - (dtucker) [configure.ac] Change the -lresolv check so it works on Mac OS X
+   10.6 (which doesn't have BIND8_COMPAT and thus uses res_9_query).  Patch
+   from jbasney at ncsa uiuc edu.
+
 20090908
  - (djm) [serverloop.c] Fix test for server-assigned remote forwarding port
    (-R 0:...); bz#1578, spotted and fix by gavin AT emf.net; ok dtucker@
index f68e00a0aca92fe2efbf1a33d8256e547d0ed6e6..a0c50e30021637023cbb124f260a4f6aa17d57d1 100644 (file)
@@ -3324,12 +3324,30 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
                AC_SEARCH_LIBS(res_query, resolv)
                AC_SEARCH_LIBS(dn_expand, resolv)
                AC_MSG_CHECKING(if res_query will link)
-               AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
+               AC_LINK_IFELSE([
+#include "confdefs.h"
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+int main()
+{
+       res_query (0, 0, 0, 0, 0);
+       return 0;
+}
+                  ],
+                   AC_MSG_RESULT(yes),
                   [AC_MSG_RESULT(no)
                    saved_LIBS="$LIBS"
                    LIBS="$LIBS -lresolv"
                    AC_MSG_CHECKING(for res_query in -lresolv)
                    AC_LINK_IFELSE([
+#include "confdefs.h"
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
 #include <resolv.h>
 int main()
 {
@@ -3337,8 +3355,7 @@ int main()
        return 0;
 }
                        ],
-                       [LIBS="$LIBS -lresolv"
-                        AC_MSG_RESULT(yes)],
+                       [AC_MSG_RESULT(yes)],
                        [LIBS="$saved_LIBS"
                         AC_MSG_RESULT(no)])
                    ])
This page took 0.059438 seconds and 5 git commands to generate.