1592N/Adnl ## Process this file with autoconf to produce a configure script
2362N/Adnl ## This is the central place where Apache's version should be kept.
1592N/Adnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
1592N/AAPACHE_SUBST(APACHE_VERSION)
1592N/Atest "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
1592N/Adnl Needed for APACHE_MODULE() to work
2362N/Adnl ## Run configure for packages Apache uses
1592N/Adnl AC_PATH_PROG(PERL_PATH, perl)
1592N/Adnl various OS checks that apparently set required flags
1592N/Adnl ## Check for header files
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/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/Adnl ## Check for C preprocessor symbols
1592N/Adnl ## Check for typedefs, structures, and compiler characteristics.
1592N/Adnl ## Check for library functions
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/AAC_CHECK_FUNCS(inet_addr inet_network, break, [
1592N/A AC_MSG_ERROR(inet_addr function not found)
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 AC_DEFINE(SELECT_NEEDS_CAST,,
1592N/A [Define if arguments to select() aren't what we expect])
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/AINCLUDES="$INCLUDES -I\$(top_srcdir)/\$(OS_DIR)"
1592N/AEXTRA_LIBS="$EXTRA_LIBS $LIBS"
APACHE_SUBST(BUILTIN_LIBS)
if test "$apache_need_shared" = "yes"; then
AC_ARG_WITH(program-name,
[ --with-program-name=alternate executable name],[
echo '/* Generated by configure */' > ${path_h}.new
echo "#define HTTPD_ROOT \"$prefix\"" >> ${path_h}.new
echo "#define SERVER_CONFIG_FILE \"conf/$
progname.conf\"" >> ${path_h}.new
rm -f ${path_h} && mv ${path_h}.new ${path_h} && \
echo "${path_h} unchanged"
AC_OUTPUT($APACHE_OUTPUT_FILES)