?? configure.in
字號:
dnl $Id: configure.in,v 1.1.2.16 2003/10/05 04:00:05 jnelson Exp $dnl Process this file with autoconf to produce a configure script.AC_INITAC_CONFIG_SRCDIR([src/boa.c])dnl Make config.hAC_CONFIG_HEADER(src/config.h)AC_CANONICAL_HOSTdnl Checks for programs.AC_PROG_CCAC_PROG_CPPAC_C_VAR_FUNCCHECK_GNU_MAKEif test "x$_cv_gnu_make_command" != "x"; then MAKE="$_cv_gnu_make_command" ALLSOURCES="\$^"else MAKE="make" ALLSOURCES="\$(.ALLSRC)"fiAC_SUBST(ALLSOURCES)AC_SUBST(MAKE)dnl AC_MSG_RESULT($host) dnl i686-pc-linux-gnudnl AC_MSG_RESULT($host_cpu) dnl i686dnl AC_MSG_RESULT($host_vendor) dnl pcdnl AC_MSG_RESULT($host_os) dnl linux-gnudnl i386-unknown-freebsd4.2dnl Checks for libraries.# AC_SEARCH_LIBS (function, search-libs, [action-if-found], [action-if-not-found], [other-libraries])AC_SEARCH_LIBS(socket, socket net)AC_SEARCH_LIBS(inet_aton, resolv)AC_SEARCH_LIBS(gethostname, nsl)AC_SEARCH_LIBS(gethostbyname, nsl)dnl Checks for header files.AC_HEADER_DIRENTAC_HEADER_STDCAC_HEADER_SYS_WAITAC_CHECK_HEADERS(fcntl.h sys/fcntl.h limits.h sys/time.h)AC_CHECK_HEADERS(getopt.h unistd.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_UID_TAC_TYPE_OFF_TAC_TYPE_PID_TAC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TMdnl AC_CHECK_TYPE(sa_family_t,unsigned short int)dnl AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) (includes, function-body, [action-if-found], [action-if-not-found])AC_MSG_CHECKING(whether sa_family_t is defined)AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>#include <sys/socket.h>]], [[sa_family_t foo2;]])],[AC_MSG_RESULT(yes)],[ AC_MSG_RESULT(no) AC_DEFINE(DONT_HAVE_SA_FAMILY_T,1,[Define if sa_family_t is not defined]) ])dnl Checks for library functions.AC_FUNC_FNMATCHAC_FUNC_MEMCMPAC_FUNC_MMAPAC_FUNC_SETVBUF_REVERSEDAC_CHECK_FUNCS(getcwd strdup strstr strcspn strtol)AC_CHECK_FUNCS(gethostname gethostbyname socket inet_aton herror inet_addr)AC_CHECK_FUNCS(scandir alphasort)AC_CHECK_FUNCS(madvise)AC_CHECK_STRUCT_FOR([#if TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# if HAVE_SYS_TIME_H# include <sys/time.h># else# include <time.h># endif#endif],tm,tm_gmtoff)if test "$ac_cv_struct_tm_has_tm_gmtoff" = "yes"; then AC_DEFINE(HAVE_TM_GMTOFF,1,[Define if struct tm has a tm_gmtoff member])fiAC_CHECK_STRUCT_FOR([#if TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# if HAVE_SYS_TIME_H# include <sys/time.h># else# include <time.h># endif#endif],tm,tm_zone)if test "$ac_cv_struct_tm_has_tm_zone" = "yes"; then AC_DEFINE(HAVE_TM_ZONE,1,[Define if struct tm has tm_zone member])fiAC_CHECK_STRUCT_FOR([#include <sys/types.h>#include <netinet/in.h>],sockaddr_in,sin_len)if test "$ac_cv_struct_sockaddr_in_has_sin_len" = "yes"; then AC_DEFINE(HAVE_SIN_LEN,1,[Define if struct sockaddr_in has sin_len member])fiif test $ac_cv_func_scandir = no; then # scandir not defined, add it SCANDIR="scandir.o" AC_SUBST(SCANDIR)fiif test $ac_cv_func_alphasort = no; then # alphasort not defined, add it ALPHASORT="alphasort.o" AC_SUBST(ALPHASORT)fiif test $ac_cv_func_strdup = no -o $ac_cv_func_strstr = no; then # strdup or strstr not defined STRUTIL="strutil.o" AC_SUBST(STRUTIL)fiif test -n "$GCC"; then dnl if we are running gcc, use -pipe test -n "$GCC" && CFLAGS="$CFLAGS -pipe" AC_MSG_CHECKING(compile and link profiling code) AC_ARG_ENABLE(profiling, [ --enable-profiling Compile and link profiling code], [ if test "$enableval" = "yes" ; then AC_MSG_RESULT(yes) CFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -g -pg" else AC_MSG_RESULT(no) fi ], [ AC_MSG_RESULT(no) ])fiAC_MSG_CHECKING(whether to enable gunzip support)AC_ARG_ENABLE(gunzip,[ --disable-gunzip Disable use of gunzip],[ if test "$enableval" = "yes" ; then AC_MSG_RESULT(yes) AC_PATH_PROG(GUNZIP, gunzip) AC_DEFINE_UNQUOTED(GUNZIP, "$ac_cv_path_GUNZIP", [Define if gunzip can be found]) else AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(yes) AC_PATH_PROG(GUNZIP, gunzip) AC_DEFINE_UNQUOTED(GUNZIP, "$ac_cv_path_GUNZIP", [Define if gunzip can be found])])AC_MSG_CHECKING(whether to enable access control support)AC_ARG_ENABLE(access-control,[ --enable-access-control Enable support for allow/deny rules],[ if test "$enableval" = "yes" ; then AC_MSG_RESULT(yes) CFLAGS="$CFLAGS -DACCESS_CONTROL" ACCESSCONTROL_SOURCE="access.c" else AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(no)])AC_SUBST(ACCESSCONTROL_SOURCE)AC_MSG_CHECKING(whether to compile and link debugging code)AC_ARG_ENABLE(debug,[ --disable-debug Do not compile and link debugging code],[ if test "$enableval" = "yes" ; then AC_MSG_RESULT(yes) LDFLAGS="$LDFLAGS -g" test -n "$GCC" && CFLAGS="$CFLAGS -Wall" else AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(yes) LDFLAGS="$LDFLAGS -g" test -n "$GCC" && CFLAGS="$CFLAGS -Wall"])AC_MSG_CHECKING(whether to disable verbose/debug logging)AC_ARG_ENABLE(verbose,[ --disable-verbose Do not enable verbose/debug logging],[ if test "$enableval" = "yes" ; then AC_MSG_RESULT(yes) else CFLAGS="$CFLAGS -DDISABLE_DEBUG" AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(yes)])AC_MSG_CHECKING(whether to link with the Dmalloc memory debugger/profiler)AC_ARG_WITH(dmalloc, [ --with-dmalloc Link with the Dmalloc memory debugger/profiler],[ if test "$withval" = "yes"; then AC_MSG_RESULT(trying) AC_CHECK_LIB(dmalloc, dmalloc_shutdown) else AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(no)])AC_MSG_CHECKING(whether to link with the Electric Fence memory debugger)AC_ARG_WITH(efence, [ --with-efence Link with the Electric Fence memory debugger],[ if test "$withval" = "yes"; then AC_MSG_RESULT(trying) AC_CHECK_LIB(efence, main) else AC_MSG_RESULT(no) fi],[ AC_MSG_RESULT(no)])case $host_os in *linux*) AC_MSG_CHECKING(whether to enable the use of the sendfile(2) system call) AC_ARG_ENABLE(sendfile, [ --disable-sendfile Disable the use of the sendfile(2) system call], [ if test "$enableval" = "no" ; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) AC_CHECK_HEADERS(sys/sendfile.h) AC_CHECK_FUNCS(sendfile) fi ], [ AC_MSG_RESULT(yes) AC_CHECK_HEADERS(sys/sendfile.h) AC_CHECK_FUNCS(sendfile) ]) ;; *) ;;esacPOLL_OR_SELECTif test "$BOA_ASYNC_IO" = "poll"; then ASYNCIO_SOURCE="poll.c"else ASYNCIO_SOURCE="select.c"fiAC_SUBST(ASYNCIO_SOURCE)# there are three scenarios# GNU make is installed as "make"# GNU make is installed as something else we detected# GNU make is not installed# Unfortunately, we can't deal with it one way or the other# Trying multiple AC_OUTPUT confuses autoconf, and using variables# *in* AC_OUTPUT is even worse.# *so*, make a default makefile that just forces make to call gmake# or whatever.AC_CONFIG_FILES([Makefile src/Makefile docs/Makefile])AC_OUTPUT
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -