configure.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:2k
- dnl Process this file with autoconf to produce a configure script.
- dnl
- dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- dnl distribution information.
- AC_INIT(cgi.c)
- AM_INIT_AUTOMAKE(cgi, 0.10, 0)
- AM_CONFIG_HEADER(config.h)
- dnl Checks for programs.
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_PROG_AWK
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_ISC_POSIX
- AC_AIX
- AC_MINIX
- dnl Checks for libraries.
- AC_ARG_WITH(fcgi,
- [ --without-fcgi Do not compile fastcgi support
- --with-fcgi Compile with fastcgi support],
- [ AC_CHECK_LIB(fcgi, FCGX_GetChar,
- CFLAGS="$CFLAGS -I.. -DHAVE_LIBFCGI=1" )] )
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
- AC_HEADER_TIME
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_TYPE_SIZE_T
- dnl Checks for library functions.
- AC_CHECK_FUNCS(strdup strncasecmp)
- dnl Other checks
- AC_ARG_WITH(formdata,
- [ --with-formdata Compile support for multipart/formdata],
- AC_DEFINE_UNQUOTED(CGIFORMDATA,1))
- AC_ARG_WITH(maxargsize,
- [ --with-maxargsize=nbytes Limit maximum size of CGI args],
- CFLAGS="$CFLAGS -DCGIMAXARG=$withval")
- AC_ARG_WITH(maxformargsize,
- [ --with-maxformargsize=nbytes Maximum size of multipart/formdata uploads],
- CFLAGS="$CFLAGS -DCGIMAXFORMDATAARG=$withval")
- AC_TRY_RUN( [
- #include <stdio.h>
- #include <stdlib.h>
- #include <limits.h>
- int main()
- {
- FILE *fp=fopen("conftestval", "w");
- if (!fp) exit(1);
- fprintf(fp, "-%lun", ULONG_MAX);
- fclose(fp);
- return (0);
- }
- ]
- , [ MAXLONGSIZE=`wc -c conftestval | awk ' { print $1 } ' ` ],
- [
- AC_MSG_ERROR(Unable to run test program.)
- ] ,
- [
- MAXLONGSIZE=60
- AC_MSG_WARN([Cross compiling, setting MAXLONGSIZE to $MAXLONGSIZE])
- ]
- )
- if test "$GCC" = yes ; then
- CFLAGS="$CFLAGS -Wall"
- fi
- CFLAGS="$CFLAGS -I.. -I$srcdir/.."
- AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE)
- AC_OUTPUT(Makefile)