Modified Files: os_win32.c
[catagits/fcgi2.git] / acinclude.m4
CommitLineData
7ef79c64 1dnl $Id: acinclude.m4,v 1.1 2001/09/21 22:38:57 skimo Exp $
2
3AC_DEFUN(FCGI_COMMON_CHECKS, [
4 AC_CHECK_TYPE([ssize_t], [int])
5
6 AC_MSG_CHECKING([for sun_len in sys/un.h])
7 AC_EGREP_HEADER([sun_len], [sys/un.h],
8 [AC_MSG_RESULT([yes])
9 AC_DEFINE([HAVE_SOCKADDR_UN_SUN_LEN], [1],
10 [Define if sockaddr_un in sys/un.h contains a sun_len component])],
11 AC_MSG_RESULT([no]))
12
13 AC_MSG_CHECKING([for fpos_t in stdio.h])
14 AC_EGREP_HEADER([fpos_t], [stdio.h],
15 [AC_MSG_RESULT([yes])
16 AC_DEFINE([HAVE_FPOS], [1],
17 [Define if the fpos_t typedef is in stdio.h])],
18 AC_MSG_RESULT([no]))
19
20 AC_CHECK_HEADERS([sys/socket.h netdb.h netinet/in.h arpa/inet.h])
21 AC_CHECK_HEADERS([sys/time.h limits.h sys/param.h unistd.h])
22
23 AC_MSG_CHECKING([for a fileno() prototype in stdio.h])
24 AC_EGREP_HEADER([fileno], [stdio.h],
25 [AC_MSG_RESULT([yes])
26 AC_DEFINE([HAVE_FILENO_PROTO], [1],
27 [Define if there's a fileno() prototype in stdio.h])],
28 AC_MSG_RESULT([no]))
29
30 if test "$HAVE_SYS_SOCKET_H"; then
31 AC_MSG_CHECKING([for socklen_t in sys/socket.h])
32 AC_EGREP_HEADER([socklen_t], [sys/socket.h],
33 [AC_MSG_RESULT([yes])
34 AC_DEFINE([HAVE_SOCKLEN], [1],
35 [Define if the socklen_t typedef is in sys/socket.h])],
36 AC_MSG_RESULT([no]))
37 fi
38
39 #--------------------------------------------------------------------
40 # Do we need cross-process locking on this platform?
41 #--------------------------------------------------------------------
42 AC_MSG_CHECKING([whether cross-process locking is required by accept()])
43 case "`uname -sr`" in
44 IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0)
45 AC_MSG_RESULT([yes])
46 AC_DEFINE([USE_LOCKING], [1],
47 [Define if cross-process locking is required by accept()])
48 ;;
49 *)
50 AC_MSG_RESULT([no])
51 ;;
52 esac
53
54 #--------------------------------------------------------------------
55 # Does va_arg(arg, long double) crash the compiler?
56 # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler)
57 #--------------------------------------------------------------------
58 AC_MSG_CHECKING([whether va_arg(arg, long double) crashes the compiler])
59 AC_TRY_COMPILE([#include <stdarg.h>],
60 [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);],
61 AC_MSG_RESULT([no]),
62 [AC_MSG_RESULT([yes])
63 AC_DEFINE([HAVE_VA_ARG_LONG_DOUBLE_BUG], [1],
64 [Define if va_arg(arg, long double) crashes the compiler])])
65
66 AC_C_CONST
67])