You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/12 19:29:54 UTC

svn commit: r803621 - in /commons/sandbox/runtime/trunk/src/main/native: configure include/acr.h

Author: mturk
Date: Wed Aug 12 17:29:54 2009
New Revision: 803621

URL: http://svn.apache.org/viewvc?rev=803621&view=rev
Log:
Link with libresolv on all platforms

Modified:
    commons/sandbox/runtime/trunk/src/main/native/configure
    commons/sandbox/runtime/trunk/src/main/native/include/acr.h

Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=803621&r1=803620&r2=803621&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Wed Aug 12 17:29:54 2009
@@ -421,7 +421,7 @@
             varadds cppopts -D_POSIX_PTHREAD_SEMANTICS
         fi
         varadds ccflags -xstrconst -xdepend -O -Xa -KPIC
-        varadds ldflags -lrt -ldl -lthread -lsendfile -lresolv -lsocket -lnsl
+        varadds ldflags -lrt -ldl -lthread -lsendfile -lsocket -lnsl
         varadds shflags -G -KPIC -dy
         varadds exflags -R:.
         test ".$cxx_set" = .no && cxx=CC
@@ -763,6 +763,8 @@
         ok=`have_library uuid`
         test ".$ok" = .1 && varadds ldflags -luuid
     fi
+    ok=`have_library resolv`
+    test ".$ok" = .1 && varadds ldflags -lresolv
 fi
 
 if [ ".$host" = ".linux" ]; then
@@ -842,6 +844,7 @@
 #define HAVE_NETDB_H          `have_include netdb`
 #define HAVE_NETINET_IN_H     `have_include netinet/in`
 #define HAVE_ARPA_INET_H      `have_include arpa/inet`
+#define HAVE_RESOLV_H         `have_include resolv`
 #define HAVE_SYS_UN_H         `have_include sys/un`
 #define HAVE_STRERROR_R       `have_function strerror_r`
 #define HAVE_ACCEPT4          `have_function accept4`

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr.h?rev=803621&r1=803620&r2=803621&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr.h Wed Aug 12 17:29:54 2009
@@ -156,6 +156,9 @@
 #if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#if HAVE_RESOLV_H
+#include <resolv.h>
+#endif
 #if HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif