configure.in revision 6e24b94d1e7122e128d9c19b3dff0e49475f5d37
1592N/Adnl ## Process this file with autoconf to produce a configure script
1592N/A
1592N/AAC_PREREQ(2.13)
1592N/AAC_INIT(acinclude.m4)
1592N/A
2362N/Adnl ## This is the central place where Apache's version should be kept.
1592N/Adnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
2362N/A
1592N/AVERSION="apache-2.0-dev"
1592N/A
1592N/AAC_CONFIG_HEADER(include/ap_config_auto.h)
1592N/A
1592N/AAPACHE_VERSION=$VERSION
1592N/AAPACHE_SUBST(APACHE_VERSION)
1592N/A
1592N/Atest "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
1592N/Atest "$prefix" = "NONE" && prefix='/usr/local'
1592N/A
1592N/Adnl Needed for APACHE_MODULE() to work
2362N/Acwd=`pwd`
2362N/A
2362N/Adnl ## Run configure for packages Apache uses
1592N/AAC_CONFIG_SUBDIRS(lib/apr)
1592N/A
1592N/Adnl ## Check for programs
1592N/A
1592N/AAC_PROG_AWK
1592N/AAC_PROG_CC
1592N/AAC_PROG_CPP
1592N/AAC_PROG_INSTALL
1592N/Adnl AC_PROG_RANLIB
1592N/Adnl AC_PATH_PROG(PERL_PATH, perl)
1592N/A
1592N/Adnl various OS checks that apparently set required flags
1592N/AAC_AIX
1592N/AAC_ISC_POSIX
1592N/AAC_MINIX
1592N/A
1592N/Adnl ## Check for libraries
1592N/A
1592N/Adnl ## Check for header files
1592N/A
1592N/Adnl I think these are just used all over the place, so just check for
1592N/Adnl them at the base of the tree. If some are specific to a single
1592N/Adnl directory, they should be moved (Comment #Spoon)
1592N/A
1592N/Adnl Regarding standard header files: AC_HEADER_STDC doesn't set symbols
1592N/Adnl HAVE_STRING_H, HAVE_STDLIB_H, etc., so those are checked for
1592N/Adnl explicitly so that the normal HAVE_xxx_H symbol is defined.
1592N/A
1592N/AAC_HEADER_STDC
1592N/AAC_CHECK_HEADERS( \
1592N/Astring.h \
1592N/Astdlib.h \
1592N/Actype.h \
1592N/Alimits.h \
1592N/Aunistd.h \
1592N/Asys/stat.h \
1592N/Asys/time.h \
1592N/Asys/types.h \
1592N/Asys/socket.h \
1592N/Anetinet/in.h \
1592N/Anetinet/tcp.h \
1592N/Aarpa/inet.h \
1592N/Anetdb.h \
1592N/Apwd.h \
1592N/Agrp.h \
1592N/A)
1592N/AAC_HEADER_SYS_WAIT
1592N/AAC_STRUCT_TM
1592N/A
1592N/Adnl ## Check for C preprocessor symbols
1592N/A
1592N/AAC_CHECK_DEFINE(EAGAIN, errno.h)
1592N/A
1592N/Adnl ## Check for typedefs, structures, and compiler characteristics.
1592N/A
1592N/AAC_C_CONST
1592N/AAC_C_INLINE
1592N/AAC_TYPE_PID_T
1592N/A
1592N/Adnl ## Check for library functions
1592N/A
1592N/Adnl See Comment #Spoon
1592N/A
1592N/AAC_CHECK_FUNCS( \
1592N/Astrdup \
1592N/Astrcasecmp \
1592N/Astrncasecmp \
1592N/Astrstr \
1592N/Astrerror \
1592N/Ainitgroups \
1592N/Awaitpid \
1592N/Agettimeofday \
1592N/Amemmove \
1592N/Abzero \
1592N/A)
1592N/A
1592N/AAC_CHECK_LIB(nsl, gethostbyname)
1592N/AAC_CHECK_LIB(nsl, gethostname)
1592N/AAC_CHECK_LIB(socket, socket)
1592N/AAC_CHECK_LIB(resolv, sethostent)
1592N/A
1592N/AAC_CHECK_FUNCS(inet_addr inet_network, break, [
1592N/A AC_MSG_ERROR(inet_addr function not found)
1592N/A])
1592N/A
1592N/AAPACHE_INADDR_NONE
1592N/A
1592N/AAPACHE_EBCDIC
1592N/A
1592N/AREENTRANCY_FLAGS
1592N/A
1592N/AAC_FUNC_SELECT_ARGTYPES
1592N/A
1592N/Adnl Check if we'll actually need to cast select args all the time
1592N/Aif test "$ac_cv_func_select_arg1" != "int" \
1592N/A -o "$ac_cv_func_select_arg234" != "fd_set *" \
1592N/A -o "$ac_cv_func_select_arg5" != "struct timeval *" ; then
1592N/A
1592N/A AC_DEFINE(SELECT_NEEDS_CAST,,
1592N/A [Define if arguments to select() aren't what we expect])
1592N/Afi
1592N/A
1592N/Adnl ## Checking command-line options
1592N/Atest -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
1592N/A EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
1592N/Atest -n "$GCC" && test "$USE_MAINTAINER_MODE" = "y2" && \
1592N/A EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Werror -Wmissing-declarations"
1592N/A
1592N/AAPACHE_ENABLE_LAYOUT
1592N/AAPACHE_ENABLE_MODULES
1592N/AAPACHE_ENABLE_SHARED
1592N/A
1592N/AINCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/lib/apr/include"
1592N/AAPACHE_SUBST(INCLUDES)
1592N/A
1592N/Adnl reading config stubs
1592N/Aesyscmd(./helpers/config-stubs .)
1592N/A
1592N/AINCLUDES="$INCLUDES -I\$(top_srcdir)/\$(OS_DIR)"
1592N/AEXTRA_LIBS="$EXTRA_LIBS $LIBS"
1592N/AEXTRA_LDFLAGS="$LDFLAGS"
1592N/ALIBS=""
1592N/ALDFLAGS=""
1592N/AAPACHE_SUBST(progname)
1592N/AAPACHE_SUBST(EXTRA_CFLAGS)
1592N/AAPACHE_SUBST(EXTRA_LDFLAGS)
1592N/AAPACHE_SUBST(EXTRA_LIBS)
1592N/AAPACHE_SUBST(REGEX_DIR)
1592N/AAPACHE_SUBST(REGEX_LIB)
1592N/AAPACHE_SUBST(MPM_LIB)
APACHE_SUBST(OS)
APACHE_SUBST(OS_DIR)
APACHE_SUBST(BUILTIN_LIBS)
APACHE_SUBST(LIBPRE)
AM_DISABLE_SHARED
AM_PROG_LIBTOOL
APACHE_LIBTOOL_SILENT
if test "$apache_need_shared" = "yes"; then
$SHELL $srcdir/ltconfig --output=shlibtool --disable-static --srcdir=$srcdir --cache-file=./config.cache $srcdir/ltmain.sh
fi
AC_ARG_WITH(program-name,
[ --with-program-name=alternate executable name],[
progname="$withval" ], [
progname="httpd"] )
APACHE_FAST_OUTPUT(Makefile ap/Makefile lib/Makefile main/Makefile
modules/Makefile os/Makefile)
APACHE_FAST_GENERATE
dnl ## Build modules.c
rm -f $srcdir/modules.c
echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c
AC_OUTPUT_COMMANDS([
echo '/* Generated by configure */' > ${path_h}.new
echo "#define HTTPD_ROOT \"$prefix\"" >> ${path_h}.new
echo "#define SUEXEC_BIN \"$bindir/suexec\"" >> ${path_h}.new
echo "#define SERVER_CONFIG_FILE \"conf/$progname.conf\"" >> ${path_h}.new
cmp ${path_h}.new ${path_h} >/dev/null 2>&1
if test $? -ne 0 ; then
rm -f ${path_h} && mv ${path_h}.new ${path_h} && \
echo "Updated ${path_h}"
else
rm -f ${path_h}.new && \
echo "${path_h} unchanged"
fi
],[
path_h=./include/ap_config_path.h
prefix=$prefix
exec_prefix=$exec_prefix
bindir=$bindir
progname=$progname
])
AC_OUTPUT($APACHE_OUTPUT_FILES)