summaryrefslogtreecommitdiff
path: root/lib/make/configure.in
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-14 21:27:31 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-09-14 21:27:31 +0000
commitf2ed5d4292dcc39028601b6936475dc065ca9ee8 (patch)
treec91eeb886726dfe90f9a54c78c10e5bf5a3f5eb7 /lib/make/configure.in
parent83113c17877801a633ccd267b74894741efc65c0 (diff)
Checking for additional headers for socket stuff.
Now defines HAVE_SOCKLEN_T if socklen_t exists. Have modified so CCTK_SOCKLEN_T gets set depending on the value of the HAVE_SOCKLEN_T, but, if this new config stuff works, would like to lose the CCTK_SOCKLEN_T stuff. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1815 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/configure.in')
-rw-r--r--lib/make/configure.in34
1 files changed, 33 insertions, 1 deletions
diff --git a/lib/make/configure.in b/lib/make/configure.in
index b4677d0f..cc4e299d 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -382,11 +382,43 @@ CCTK_CHECK_HEADERS(assert.h)
CCTK_CHECK_HEADERS(sys/stat.h)
CCTK_CHECK_HEADERS(getopt.h)
CCTK_HEADER_REGEX
+CCTK_CHECK_HEADERS(sys/types.h)
+CCTK_CHECK_HEADERS(sys/socket.h)
+CCTK_CHECK_HEADERS(winsock2.h)
AC_HEADER_TIME
#Check type of socklen
-CCTK_CHECK_SOCK_LENGTH_TYPE
+
+# Check if we have socklen_t available
+AC_MSG_CHECKING([if socklen_t is defined])
+AC_CACHE_VAL(cctk_cv_have_socklen_t,
+[AC_TRY_COMPILE([#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif],
+[socklen_t foo; return 0], eval "cctk_cv_have_socklen_t=yes",
+eval "cctk_cv_have_socklen_t=no")
+])
+if test "$cctk_cv_have_socklen_t" = "yes"; then
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+dnl Let's see if the above does it for us.
+dnl CCTK_CHECK_SOCK_LENGTH_TYPE
# C++ STL stuff