summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-03 12:10:48 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-03 12:10:48 (GMT)
commit95c419b20ae7953fee534584e0baf39c4d8f0c38 (patch)
tree34ef7d81d127d40ad6b3b97d09d5ddfbd26518f2 /configure.in
parentd3545ec5e3508479c48c2d5828b8c9e484222778 (diff)
downloadcpython-95c419b20ae7953fee534584e0baf39c4d8f0c38.zip
cpython-95c419b20ae7953fee534584e0baf39c4d8f0c38.tar.gz
cpython-95c419b20ae7953fee534584e0baf39c4d8f0c38.tar.bz2
Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 6686f2b..9db7f43 100644
--- a/configure.in
+++ b/configure.in
@@ -1929,23 +1929,29 @@ AC_TRY_COMPILE([
AC_MSG_RESULT(no)
)
+dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
+dnl On others, they are in the C library, so we to take no action
+AC_CHECK_LIB(c, inet_aton, [/bin/true],
+ AC_CHECK_LIB(resolv, inet_aton)
+)
+
AC_MSG_CHECKING(for hstrerror)
-AC_TRY_COMPILE([
+AC_TRY_LINK([
#include "confdefs.h"
#include <netdb.h>
-], void* p = hstrerror,
+], void* p = hstrerror; hstrerror(0),
AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for inet_aton)
-AC_TRY_COMPILE([
+AC_TRY_LINK([
#include "confdefs.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-], void* p = inet_aton,
+], void* p = inet_aton;inet_aton(0,0),
AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)