mirror of
https://github.com/apache/httpd.git
synced 2025-08-20 16:09:55 +00:00

using EXTRA_CFLAGS instead, so we don't affect packages that Apache configures. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84690 13f79535-47bb-0310-9956-ffa450edef68
161 lines
3.4 KiB
Plaintext
161 lines
3.4 KiB
Plaintext
dnl ## Process this file with autoconf to produce a configure script
|
|
|
|
AC_PREREQ(2.13)
|
|
AC_INIT(acinclude.m4)
|
|
|
|
dnl ## This is the central place where Apache's version should be kept.
|
|
dnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
|
|
|
|
VERSION="apache-2.0-dev"
|
|
|
|
AC_CONFIG_HEADER(include/ap_config_auto.h)
|
|
|
|
APACHE_VERSION=$VERSION
|
|
APACHE_SUBST(APACHE_VERSION)
|
|
|
|
test "$exec_prefix" = "NONE" && exec_prefix='${prefix}'
|
|
test "$prefix" = "NONE" && prefix='/usr/local'
|
|
|
|
dnl Needed for APACHE_MODULE() to work
|
|
cwd=`pwd`
|
|
|
|
dnl ## Run configure for packages Apache uses
|
|
AC_CONFIG_SUBDIRS(lib/apr)
|
|
|
|
dnl ## Check for programs
|
|
|
|
AC_PROG_AWK
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_INSTALL
|
|
dnl AC_PROG_RANLIB
|
|
dnl AC_PATH_PROG(PERL_PATH, perl)
|
|
|
|
dnl various OS checks that apparently set required flags
|
|
AC_AIX
|
|
AC_ISC_POSIX
|
|
AC_MINIX
|
|
|
|
dnl ## Check for libraries
|
|
|
|
dnl ## Check for header files
|
|
|
|
dnl I think these are just used all over the place, so just check for
|
|
dnl them at the base of the tree. If some are specific to a single
|
|
dnl directory, they should be moved (Comment #Spoon)
|
|
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS( \
|
|
unistd.h \
|
|
sys/stat.h \
|
|
sys/time.h \
|
|
sys/types.h \
|
|
sys/socket.h \
|
|
netinet/in.h \
|
|
arpa/inet.h \
|
|
netdb.h \
|
|
pwd.h \
|
|
grp.h \
|
|
)
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
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(socket, socket)
|
|
|
|
AC_CHECK_FUNCS(inet_addr inet_network, break, [
|
|
AC_MSG_ERROR(inet_addr function not found)
|
|
])
|
|
|
|
APACHE_INADDR_NONE
|
|
|
|
REENTRANCY_FLAGS
|
|
|
|
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"
|
|
|
|
APACHE_ENABLE_LAYOUT
|
|
APACHE_ENABLE_MODULES
|
|
APACHE_ENABLE_SHARED
|
|
|
|
INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/lib/apr/include"
|
|
APACHE_SUBST(INCLUDES)
|
|
|
|
dnl reading config stubs
|
|
esyscmd(./helpers/config-stubs .)
|
|
|
|
INCLUDES="$INCLUDES -I\$(top_srcdir)/\$(OS_DIR)"
|
|
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
|
|
EXTRA_LDFLAGS="$LDFLAGS"
|
|
LIBS=""
|
|
LDFLAGS=""
|
|
APACHE_SUBST(EXTRA_LDFLAGS)
|
|
APACHE_SUBST(EXTRA_LIBS)
|
|
APACHE_SUBST(REGEX_DIR)
|
|
APACHE_SUBST(REGEX_LIB)
|
|
APACHE_SUBST(MPM_LIB)
|
|
APACHE_SUBST(OS)
|
|
APACHE_SUBST(OS_DIR)
|
|
APACHE_SUBST(BUILTIN_LIBS)
|
|
|
|
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
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS \`\$(abs_srcdir)/apaci\`"
|
|
|
|
APACHE_FAST_OUTPUT(apaci 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_SUBST(prefix)
|
|
|
|
AC_OUTPUT($APACHE_OUTPUT_FILES apaci)
|
|
chmod 744 apaci
|