Skip to content
Newer
Older
100644 87 lines (71 sloc) 2.6 KB
adb2f1d [project @ 2004-09-18 12:49:59 by panne]
panne authored Sep 18, 2004
1 AC_INIT([Haskell network package], [1.0], [libraries@haskell.org], [network])
e0192b0 [project @ 2004-09-02 15:18:08 by ross]
ross authored Sep 2, 2004
2
3 # Safety check: Ensure that we are in the correct source directory.
4 AC_CONFIG_SRCDIR([include/HsNet.h])
5
6 AC_CONFIG_HEADERS([include/HsNetworkConfig.h])
7
4a273bf [project @ 2005-09-21 12:54:57 by ross]
ross authored Sep 21, 2005
8 AC_CANONICAL_HOST
9
925f88e @igfoo Pass configure options through to ./configure, and allow CC to be pas…
igfoo authored Apr 11, 2007
10 AC_ARG_WITH([cc],
11 [C compiler],
12 [OLDPATH=$PATH
13 PATH=`dirname $withval`:$PATH
14 AC_PROG_CC(`basename $withval`)
15 PATH=$OLDPATH
16 CC=$withval],
17 [AC_PROG_CC()])
18 echo CC is $CC >&5
19 echo CC is $CC >&6
20
f1bb2a9 [project @ 2005-09-20 09:47:48 by ross]
ross authored Sep 20, 2005
21 AC_C_CONST
22
e0192b0 [project @ 2004-09-02 15:18:08 by ross]
ross authored Sep 2, 2004
23 dnl ** check for specific header (.h) files that we are interested in
f1bb2a9 [project @ 2005-09-20 09:47:48 by ross]
ross authored Sep 20, 2005
24 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h sys/types.h unistd.h winsock.h])
e0192b0 [project @ 2004-09-02 15:18:08 by ross]
ross authored Sep 2, 2004
25 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h netinet/tcp.h sys/socket.h sys/uio.h sys/un.h])
26
6e29faf [project @ 2004-11-18 16:39:54 by stolz]
stolz authored Nov 18, 2004
27 AC_CHECK_FUNCS([readlink symlink])
28
e0192b0 [project @ 2004-09-02 15:18:08 by ross]
ross authored Sep 2, 2004
29 dnl ** check what fields struct msghdr contains
30 AC_CHECK_MEMBERS([struct msghdr.msg_control, struct msghdr.msg_accrights], [], [], [#if HAVE_SYS_TYPES_H
31 # include <sys/types.h>
32 #endif
33 #if HAVE_SYS_SOCKET_H
34 # include <sys/socket.h>
35 #endif
36 #if HAVE_SYS_UIO_H
37 # include <sys/uio.h>
38 #endif])
39
40 dnl --------------------------------------------------
41 dnl * test for in_addr_t
42 dnl --------------------------------------------------
43 AC_MSG_CHECKING(for in_addr_t in netinet/in.h)
44 AC_EGREP_HEADER(in_addr_t, netinet/in.h,
45 [ AC_DEFINE([HAVE_IN_ADDR_T], [1], [Define to 1 if in_addr_t is available.]) AC_MSG_RESULT(yes) ],
46 AC_MSG_RESULT(no))
47
48 dnl --------------------------------------------------
49 dnl * test for Linux sendfile(2)
50 dnl --------------------------------------------------
51 AC_MSG_CHECKING(for sendfile in sys/sendfile.h)
52 AC_EGREP_HEADER(sendfile, sys/sendfile.h,
53 [ AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have a Linux sendfile(2) implementation.]) AC_MSG_RESULT(yes) ],
54 AC_MSG_RESULT(no))
55
56 dnl --------------------------------------------------
57 dnl * test for BSD sendfile(2)
58 dnl --------------------------------------------------
59 AC_MSG_CHECKING(for sendfile in sys/socket.h)
60 AC_EGREP_HEADER(sendfile, sys/socket.h,
61 [ AC_DEFINE([HAVE_BSD_SENDFILE], [1], [Define to 1 if you have a BSDish sendfile(2) implementation.]) AC_MSG_RESULT(yes) ],
62 AC_MSG_RESULT(no))
63
b904620 [project @ 2004-11-30 08:48:28 by stolz]
stolz authored Nov 30, 2004
64 AC_CHECK_FUNCS(gethostent)
65
210db14 [project @ 2005-07-19 09:26:04 by ross]
ross authored Jul 19, 2005
66 case "$host" in
ff21afc [project @ 2005-01-25 17:06:39 by ross]
ross authored Jan 25, 2005
67 *-mingw32)
68 EXTRA_SRCS="cbits/initWinSock.c, cbits/winSockErr.c, cbits/asyncAccept.c"
69 EXTRA_LIBS=wsock32
70 CALLCONV=stdcall ;;
71 *-solaris2)
72 EXTRA_SRCS="cbits/ancilData.c"
73 EXTRA_LIBS="nsl, socket"
74 CALLCONV=ccall ;;
75 *)
76 EXTRA_SRCS="cbits/ancilData.c"
77 EXTRA_LIBS=
78 CALLCONV=ccall ;;
79 esac
80 AC_SUBST([CALLCONV])
81 AC_SUBST([EXTRA_LIBS])
82 AC_SUBST([EXTRA_SRCS])
83
84 AC_CONFIG_FILES([network.buildinfo])
85
e0192b0 [project @ 2004-09-02 15:18:08 by ross]
ross authored Sep 2, 2004
86 AC_OUTPUT
Something went wrong with that request. Please try again.