diff options
author | Darren Tucker <dtucker@zip.com.au> | 2009-09-11 14:56:08 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2009-09-11 14:56:08 +1000 |
commit | e02b49a80643e8e22566c72bf39b76e89acdf312 (patch) | |
tree | cdec42a0325ec32b7b4a76b858a70a69d7c0922e | |
parent | e5d5a17fe16b5bb22259cb84ef13cd47e60d77d7 (diff) |
- (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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 27 |
2 files changed, 27 insertions, 5 deletions
@@ -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@ diff --git a/configure.ac b/configure.ac index a0b781ee..ea9f1bb5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.426 2009/09/01 08:26:00 dtucker Exp $ +# $Id: configure.ac,v 1.427 2009/09/11 04:56:08 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.426 $) +AC_REVISION($Revision: 1.427 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -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)]) ]) |