1 dnl $Id: acinclude.m4,v 1.1 2001/09/21 22:38:57 skimo Exp $
3 AC_DEFUN(FCGI_COMMON_CHECKS, [
4 AC_CHECK_TYPE([ssize_t], [int])
6 AC_MSG_CHECKING([for sun_len in sys/un.h])
7 AC_EGREP_HEADER([sun_len], [sys/un.h],
9 AC_DEFINE([HAVE_SOCKADDR_UN_SUN_LEN], [1],
10 [Define if sockaddr_un in sys/un.h contains a sun_len component])],
13 AC_MSG_CHECKING([for fpos_t in stdio.h])
14 AC_EGREP_HEADER([fpos_t], [stdio.h],
16 AC_DEFINE([HAVE_FPOS], [1],
17 [Define if the fpos_t typedef is in stdio.h])],
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])
23 AC_MSG_CHECKING([for a fileno() prototype in stdio.h])
24 AC_EGREP_HEADER([fileno], [stdio.h],
26 AC_DEFINE([HAVE_FILENO_PROTO], [1],
27 [Define if there's a fileno() prototype in stdio.h])],
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],
34 AC_DEFINE([HAVE_SOCKLEN], [1],
35 [Define if the socklen_t typedef is in sys/socket.h])],
39 #--------------------------------------------------------------------
40 # Do we need cross-process locking on this platform?
41 #--------------------------------------------------------------------
42 AC_MSG_CHECKING([whether cross-process locking is required by accept()])
44 IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0)
46 AC_DEFINE([USE_LOCKING], [1],
47 [Define if cross-process locking is required by accept()])
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);],
63 AC_DEFINE([HAVE_VA_ARG_LONG_DOUBLE_BUG], [1],
64 [Define if va_arg(arg, long double) crashes the compiler])])