configure.in revision 06924437019f9871bc4ee49748511130548b7d35
7abe86bacd7821fb83a784398037defc64060a2emanojdnl ## Process this file with autoconf to produce a configure script
7abe86bacd7821fb83a784398037defc64060a2emanoj
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAC_PREREQ(2.13)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAC_INIT(acinclude.m4)
809c98e396829d27f2d9efc0c27f7bb1294381bcgstein
7abe86bacd7821fb83a784398037defc64060a2emanojdnl ## This is the central place where Apache's version should be kept.
cd47196ef7dd7647418fa9b9cb8297cfa614c100rbbdnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
7bb9fddff37df5cde21b7c4880360f5199875874trawick
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzVERSION="apache-2.0-dev"
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAC_CONFIG_HEADER(include/ap_config_auto.h)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAPACHE_VERSION=$VERSION
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAPACHE_SUBST(APACHE_VERSION)
5f4f0143cfe4e4a74195441b3c9dba4662a7788dniq
8d09f97dc349d4658d751199b77564a9b09ccec7niqtest "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantztest "$prefix" = "NONE" && prefix='/usr/local'
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesdnl Absolute source/build directory
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesabs_srcdir=`(cd $srcdir && pwd)`
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesabs_builddir=`pwd`
7825bb798c5cdbed5865904896146aea6da1fd52bnicholes
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzAPACHE_CONFIG_NICE(config.nice)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzdnl If the source dir is not equal to the build dir,
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzdnl then we are running in VPATH mode.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzif test "$abs_builddir" != "$abs_srcdir"; then
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz USE_VPATH=1
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzfi
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
84572252cfafd33c91d893b34dec34fcbca34371nddnl ## Run configure for packages Apache uses
6c47a7d40935c5508868904cba1e87ca783ec386niqAC_CONFIG_SUBDIRS(lib/pcre lib/apr)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesdnl
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesdnl ## Preload our OS configuration
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesAPR_PRELOAD
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholes
367d146f245f3b1c9f77c18e6ec591b52e0b344cbnicholesdnl ## Check for programs
480706fbb16436bfdff23c83c8993875ae7ece92minfrin
480706fbb16436bfdff23c83c8993875ae7ece92minfrinAC_PROG_AWK
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_PROG_CC
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_PROG_CPP
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_PROG_INSTALL
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfdnl AC_PROG_RANLIB
4726a8c69bfb6a4666875b83dc25f6d2738c3dc4rjungdnl AC_PATH_PROG(PERL_PATH, perl)
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sf
4726a8c69bfb6a4666875b83dc25f6d2738c3dc4rjungREENTRANCY_FLAGS
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sf
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfdnl various OS checks that apparently set required flags
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_AIX
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_ISC_POSIX
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sfAC_MINIX
65f6e321663b3fd0f93d8b47b4df05f189de6cf1sf
1fc7668ad3646be5c199f967514b7988708b8fb5rpluemdnl ## Check for libraries
f3f5b610c384cae1bb39f069e15e7c62d7d8cd3cwrowe
480706fbb16436bfdff23c83c8993875ae7ece92minfrindnl ## Check for header files
e684537a0db1085ac01f3743e1630ebe9bfdaf10bnicholes
e684537a0db1085ac01f3743e1630ebe9bfdaf10bnicholesdnl I think these are just used all over the place, so just check for
e684537a0db1085ac01f3743e1630ebe9bfdaf10bnicholesdnl them at the base of the tree. If some are specific to a single
3340850c6856d1652d190f459aba81b4f350f000jerenkrantzdnl directory, they should be moved (Comment #Spoon)
482ac4a7875bf582690164f70e868508c17f6b87bnicholes
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantzdnl Regarding standard header files: AC_HEADER_STDC doesn't set symbols
322b350d0f1ac750b112ec15481a33efc92d182cjerenkrantzdnl HAVE_STRING_H, HAVE_STDLIB_H, etc., so those are checked for
e9f8410b788ef1e6f1baed6c706ffdf3da395a16jerenkrantzdnl explicitly so that the normal HAVE_xxx_H symbol is defined.
306e22b1e932824368f6d9df002f72fb00e70ecdrjung
e9f8410b788ef1e6f1baed6c706ffdf3da395a16jerenkrantzAC_HEADER_STDC
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawickAC_CHECK_HEADERS( \
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawickstring.h \
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawickstdlib.h \
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawickctype.h \
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawicklimits.h \
7416a4d524cc7456c90a155e06fae5ac6c2d0288trawickunistd.h \
855aa233fcb7b51d738fca5c36585646ae1960c3jerenkrantzsys/stat.h \
7abe86bacd7821fb83a784398037defc64060a2emanojsys/time.h \
306e22b1e932824368f6d9df002f72fb00e70ecdrjungsys/types.h \
132ee6ac1c26d6e8953836316ba50734eefab47bsfsys/socket.h \
b4a00883f358625923365ca1560c96edec172a52sfnetinet/in.h \
3a330c2331fc04f7d3f0ce7741bb52b5823f97e1wrowenetinet/tcp.h \
3a330c2331fc04f7d3f0ce7741bb52b5823f97e1wrowearpa/inet.h \
c803b0d84b48f151504b87ec3f196cb433149592rbbnetdb.h \
pwd.h \
grp.h \
)
AC_HEADER_SYS_WAIT
AC_STRUCT_TM
dnl ## Check for C preprocessor symbols
AC_CHECK_DEFINE(EAGAIN, errno.h)
dnl ## Check for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
dnl ## Check for library functions
dnl See Comment #Spoon
AC_CHECK_FUNCS( \
strdup \
strcasecmp \
strncasecmp \
strstr \
strerror \
initgroups \
waitpid \
gettimeofday \
memmove \
bzero \
)
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(nsl, gethostname)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(resolv, sethostent)
AC_CHECK_FUNCS(inet_addr inet_network, break, [
AC_MSG_ERROR(inet_addr function not found)
])
APACHE_INADDR_NONE
APACHE_EBCDIC
AC_FUNC_SELECT_ARGTYPES
dnl Check if we'll actually need to cast select args all the time
if test "$ac_cv_func_select_arg1" != "int" \
-o "$ac_cv_func_select_arg234" != "fd_set *" \
-o "$ac_cv_func_select_arg5" != "struct timeval *" ; then
AC_DEFINE(SELECT_NEEDS_CAST,,
[Define if arguments to select() aren't what we expect])
fi
dnl ## Checking command-line options
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "y2" && \
EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Werror -Wmissing-declarations"
APACHE_ENABLE_LAYOUT
APACHE_ENABLE_MODULES
APACHE_ENABLE_SHARED
INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/lib/apr/include"
if test -n "$USE_VPATH"; then
INCLUDES="$INCLUDES -I\$(top_builddir)/include -I\$(top_builddir)/lib/apr/include"
fi
dnl reading config stubs
esyscmd(./helpers/config-stubs .)
INCLUDES="$INCLUDES -I\$(top_srcdir)/os/\$(OS_DIR)"
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
EXTRA_LDFLAGS="$LDFLAGS"
LIBS=""
LDFLAGS=""
APACHE_SUBST(progname)
APACHE_SUBST(EXTRA_CFLAGS)
APACHE_SUBST(EXTRA_LDFLAGS)
APACHE_SUBST(EXTRA_LIBS)
APACHE_SUBST(INCLUDES)
APACHE_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 support/Makefile)
APACHE_FAST_GENERATE
dnl There needs to be a .deps file in the top build directory.
dnl All others are created dynamically by rules.mk.
touch .deps
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
])
perlbin=`which perl`
AC_SUBST(perlbin)
AC_OUTPUT($APACHE_OUTPUT_FILES support/apxs)