1 dnl ## Process this file with autoconf to produce a configure script
6 dnl ## This is the central place where Apache's version should be kept.
7 dnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
9 VERSION="apache-2.0-dev"
11 AC_CONFIG_HEADER(include/ap_config_auto.h)
13 APACHE_VERSION=$VERSION
14 APACHE_SUBST(APACHE_VERSION)
16 test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
17 test "$prefix" = "NONE" && prefix='/usr/local'
19 dnl Needed for APACHE_MODULE() to work
22 dnl ## Run configure for packages Apache uses
23 AC_CONFIG_SUBDIRS(lib/apr)
25 dnl ## Check for programs
32 dnl AC_PATH_PROG(PERL_PATH, perl)
34 dnl various OS checks that apparently set required flags
39 dnl ## Check for libraries
41 dnl ## Check for header files
43 dnl I think these are just used all over the place, so just check for
44 dnl them at the base of the tree. If some are specific to a single
45 dnl directory, they should be moved (Comment #Spoon)
62 dnl ## Check for C preprocessor symbols
64 AC_CHECK_DEFINE(EAGAIN, errno.h)
66 dnl ## Check for typedefs, structures, and compiler characteristics.
72 dnl ## Check for library functions
74 dnl See Comment #Spoon
89 AC_CHECK_LIB(nsl, gethostbyname)
90 AC_CHECK_LIB(socket, socket)
92 AC_CHECK_FUNCS(inet_addr inet_network, break, [
93 AC_MSG_ERROR(inet_addr function not found)
100 AC_FUNC_SELECT_ARGTYPES
102 dnl Check if we'll actually need to cast select args all the time
103 if test "$ac_cv_func_select_arg1" != "int" \
104 -o "$ac_cv_func_select_arg234" != "fd_set *" \
105 -o "$ac_cv_func_select_arg5" != "struct timeval *" ; then
107 AC_DEFINE(SELECT_NEEDS_CAST,,
108 [Define if arguments to select() aren't what we expect])
111 dnl ## Checking command-line options
112 test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
113 EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
114 test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "y2" && \
115 EXTRA_CFLAGS="$EXTRA_CFLAGS -g -Wall -Werror -Wmissing-declarations"
118 APACHE_ENABLE_MODULES
121 INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/lib/apr/include"
122 APACHE_SUBST(INCLUDES)
124 dnl reading config stubs
125 esyscmd(./helpers/config-stubs .)
127 INCLUDES="$INCLUDES -I\$(top_srcdir)/\$(OS_DIR)"
128 EXTRA_LIBS="$EXTRA_LIBS $LIBS"
129 EXTRA_LDFLAGS="$LDFLAGS"
132 APACHE_SUBST(EXTRA_CFLAGS)
133 APACHE_SUBST(EXTRA_LDFLAGS)
134 APACHE_SUBST(EXTRA_LIBS)
135 APACHE_SUBST(REGEX_DIR)
136 APACHE_SUBST(REGEX_LIB)
137 APACHE_SUBST(MPM_LIB)
140 APACHE_SUBST(BUILTIN_LIBS)
144 APACHE_LIBTOOL_SILENT
146 if test "$apache_need_shared" = "yes"; then
147 $SHELL $srcdir/ltconfig --output=shlibtool --disable-static --srcdir=$srcdir --cache-file=./config.cache $srcdir/ltmain.sh
150 EXTRA_CFLAGS="$EXTRA_CFLAGS \`\$(abs_srcdir)/apaci\`"
152 APACHE_FAST_OUTPUT(apaci Makefile ap/Makefile lib/Makefile main/Makefile
153 modules/Makefile os/Makefile)
156 dnl ## Build modules.c
157 rm -f $srcdir/modules.c
158 echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c
162 AC_OUTPUT($APACHE_OUTPUT_FILES apaci)