ObjFW  Check-in [720661e1b3]

Overview
Comment:Fix IPv6 test on win32, in case we're not crosscompiling.
Additionally, remove useless -D_REENTRANT (which had a typo and
was -D_RENTRANT and is added by acx_pthread.m4 anyway if it's needed).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 720661e1b35691a666dd5adf18f0977223f5793079a2c30554765229626f0e89
User & Date: js on 2009-01-05 01:31:10
Other Links: manifest | tags
Context
2009-01-05
02:18
Fix three stupid warnings. check-in: 41095bf7a1 user: js tags: trunk
01:31
Fix IPv6 test on win32, in case we're not crosscompiling.
Additionally, remove useless -D_REENTRANT (which had a typo and
was -D_RENTRANT and is added by acx_pthread.m4 anyway if it's needed).
check-in: 720661e1b3 user: js tags: trunk
00:59
Update copyright. check-in: f1b749d113 user: js tags: trunk
Changes

Modified configure.ac from [0bf2bf3095] to [4c39ba909e].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20













-







AC_INIT(objfw, 0.1, js@webkeks.org)
AC_CONFIG_SRCDIR(src)

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_PROG_CC
AC_PROG_OBJC
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_EGREP

CFLAGS="$CFLAGS -Wall"
CPPFLAGS="$CPPFLAGS -D_RENTRANT"
OBJCFLAGS="$OBJCFLAGS -Wall -fobjc-exceptions"
LIBS="$LIBS -lobjc"

AC_DEFINE(OF_CONFIG_H, 1, [Define so that we know we got our config.h])

BUILDSYS_LIB
AC_C_BIGENDIAN([AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian])])
82
83
84
85
86
87
88

89
90
91








92
93
94
95
96
97
98
99
100
101

102
103
104
105
106
107
108
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116







+



+
+
+
+
+
+
+
+









-
+







esac

AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")

AC_MSG_CHECKING(whether we have IPv6 support)
AC_CACHE_VAL(ac_cv_have_ipv6, [
	AC_TRY_RUN([
		#ifndef _WIN32
		#include <sys/types.h>
		#include <sys/socket.h>
		#include <netinet/in.h>
		#else
		#include <winsock2.h>
		#include <ws2tcpip.h>
		#endif

		#ifndef INVALID_SOCKET
		#define INVALID_SOCKET -1
		#endif

		int
		main()
		{
			int fd;
			struct sockaddr_in6 addr;

			fd = socket(AF_INET6, SOCK_STREAM, 0);

			exit(fd >= 0 ? 0 : 1);
			exit(fd != INVALID_SOCKET ? 0 : 1);
		}],
		ac_cv_have_ipv6="yes",
		ac_cv_have_ipv6="no",
		ac_cv_have_ipv6="no")])
AC_MSG_RESULT($ac_cv_have_ipv6)
test x"$ac_cv_have_ipv6" = x"yes" && \
	AC_DEFINE(HAVE_IPV6, 1, "Whether we have IPv6 support")