Lines 4-15
Link Here
|
4 |
dnl AC_HELP_STRING, so let's try to call it if we can. |
4 |
dnl AC_HELP_STRING, so let's try to call it if we can. |
5 |
dnl Note: this define must be on one line so that it can be properly returned |
5 |
dnl Note: this define must be on one line so that it can be properly returned |
6 |
dnl as the help string. |
6 |
dnl as the help string. |
7 |
AC_DEFUN(APACHE_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl |
7 |
AC_DEFUN([APACHE_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl |
8 |
|
8 |
|
9 |
dnl APACHE_SUBST(VARIABLE) |
9 |
dnl APACHE_SUBST(VARIABLE) |
10 |
dnl Makes VARIABLE available in generated files |
10 |
dnl Makes VARIABLE available in generated files |
11 |
dnl (do not use @variable@ in Makefiles, but $(variable)) |
11 |
dnl (do not use @variable@ in Makefiles, but $(variable)) |
12 |
AC_DEFUN(APACHE_SUBST,[ |
12 |
AC_DEFUN([APACHE_SUBST],[ |
13 |
APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1" |
13 |
APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1" |
14 |
AC_SUBST($1) |
14 |
AC_SUBST($1) |
15 |
]) |
15 |
]) |
Lines 16-28
Link Here
|
16 |
|
16 |
|
17 |
dnl APACHE_FAST_OUTPUT(FILENAME) |
17 |
dnl APACHE_FAST_OUTPUT(FILENAME) |
18 |
dnl Perform substitutions on FILENAME (Makefiles only) |
18 |
dnl Perform substitutions on FILENAME (Makefiles only) |
19 |
AC_DEFUN(APACHE_FAST_OUTPUT,[ |
19 |
AC_DEFUN([APACHE_FAST_OUTPUT],[ |
20 |
APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1" |
20 |
APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1" |
21 |
]) |
21 |
]) |
22 |
|
22 |
|
23 |
dnl APACHE_GEN_CONFIG_VARS |
23 |
dnl APACHE_GEN_CONFIG_VARS |
24 |
dnl Creates config_vars.mk |
24 |
dnl Creates config_vars.mk |
25 |
AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ |
25 |
AC_DEFUN([APACHE_GEN_CONFIG_VARS],[ |
26 |
APACHE_SUBST(abs_srcdir) |
26 |
APACHE_SUBST(abs_srcdir) |
27 |
APACHE_SUBST(bindir) |
27 |
APACHE_SUBST(bindir) |
28 |
APACHE_SUBST(sbindir) |
28 |
APACHE_SUBST(sbindir) |
Lines 117-123
Link Here
|
117 |
|
117 |
|
118 |
dnl APACHE_GEN_MAKEFILES |
118 |
dnl APACHE_GEN_MAKEFILES |
119 |
dnl Creates Makefiles |
119 |
dnl Creates Makefiles |
120 |
AC_DEFUN(APACHE_GEN_MAKEFILES,[ |
120 |
AC_DEFUN([APACHE_GEN_MAKEFILES],[ |
121 |
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES |
121 |
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES |
122 |
]) |
122 |
]) |
123 |
|
123 |
|
Lines 124-130
Link Here
|
124 |
dnl ## APACHE_OUTPUT(file) |
124 |
dnl ## APACHE_OUTPUT(file) |
125 |
dnl ## adds "file" to the list of files generated by AC_OUTPUT |
125 |
dnl ## adds "file" to the list of files generated by AC_OUTPUT |
126 |
dnl ## This macro can be used several times. |
126 |
dnl ## This macro can be used several times. |
127 |
AC_DEFUN(APACHE_OUTPUT, [ |
127 |
AC_DEFUN([APACHE_OUTPUT], [ |
128 |
APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1" |
128 |
APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1" |
129 |
]) |
129 |
]) |
130 |
|
130 |
|
Lines 133-139
Link Here
|
133 |
dnl |
133 |
dnl |
134 |
dnl If rlim_t is not defined, define it to int |
134 |
dnl If rlim_t is not defined, define it to int |
135 |
dnl |
135 |
dnl |
136 |
AC_DEFUN(APACHE_TYPE_RLIM_T, [ |
136 |
AC_DEFUN([APACHE_TYPE_RLIM_T], [ |
137 |
AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [ |
137 |
AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [ |
138 |
AC_TRY_COMPILE([ |
138 |
AC_TRY_COMPILE([ |
139 |
#include <sys/types.h> |
139 |
#include <sys/types.h> |
Lines 156-162
Link Here
|
156 |
define(mod_buildvars, [CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS INCLUDES]) |
156 |
define(mod_buildvars, [CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS INCLUDES]) |
157 |
dnl |
157 |
dnl |
158 |
dnl APACHE_MODPATH_INIT(modpath) |
158 |
dnl APACHE_MODPATH_INIT(modpath) |
159 |
AC_DEFUN(APACHE_MODPATH_INIT,[ |
159 |
AC_DEFUN([APACHE_MODPATH_INIT],[ |
160 |
current_dir=$1 |
160 |
current_dir=$1 |
161 |
modpath_current=modules/$1 |
161 |
modpath_current=modules/$1 |
162 |
modpath_static= |
162 |
modpath_static= |
Lines 168-174
Link Here
|
168 |
> $modpath_current/modules.mk |
168 |
> $modpath_current/modules.mk |
169 |
])dnl |
169 |
])dnl |
170 |
dnl |
170 |
dnl |
171 |
AC_DEFUN(APACHE_MODPATH_FINISH,[ |
171 |
AC_DEFUN([APACHE_MODPATH_FINISH],[ |
172 |
echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk |
172 |
echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk |
173 |
echo "static = $modpath_static" >> $modpath_current/modules.mk |
173 |
echo "static = $modpath_static" >> $modpath_current/modules.mk |
174 |
echo "shared = $modpath_shared" >> $modpath_current/modules.mk |
174 |
echo "shared = $modpath_shared" >> $modpath_current/modules.mk |
Lines 186-192
Link Here
|
186 |
])dnl |
186 |
])dnl |
187 |
dnl |
187 |
dnl |
188 |
dnl APACHE_MODPATH_ADD(name[, shared[, objects [, ldflags[, libs]]]]) |
188 |
dnl APACHE_MODPATH_ADD(name[, shared[, objects [, ldflags[, libs]]]]) |
189 |
AC_DEFUN(APACHE_MODPATH_ADD,[ |
189 |
AC_DEFUN([APACHE_MODPATH_ADD],[ |
190 |
if test -z "$3"; then |
190 |
if test -z "$3"; then |
191 |
objects="mod_$1.lo" |
191 |
objects="mod_$1.lo" |
192 |
else |
192 |
else |
Lines 220-226
Link Here
|
220 |
])dnl |
220 |
])dnl |
221 |
dnl Same as APACHE_MODPATH_INIT/FINISH but for MPMs |
221 |
dnl Same as APACHE_MODPATH_INIT/FINISH but for MPMs |
222 |
dnl APACHE_MPMPATH_INIT(mpmpath) |
222 |
dnl APACHE_MPMPATH_INIT(mpmpath) |
223 |
AC_DEFUN(APACHE_MPMPATH_INIT,[ |
223 |
AC_DEFUN([APACHE_MPMPATH_INIT],[ |
224 |
current_dir=$1 |
224 |
current_dir=$1 |
225 |
modpath_current=server/mpm/$1 |
225 |
modpath_current=server/mpm/$1 |
226 |
modpath_static= |
226 |
modpath_static= |
Lines 232-238
Link Here
|
232 |
> $modpath_current/modules.mk |
232 |
> $modpath_current/modules.mk |
233 |
])dnl |
233 |
])dnl |
234 |
dnl |
234 |
dnl |
235 |
AC_DEFUN(APACHE_MPMPATH_FINISH,[ |
235 |
AC_DEFUN([APACHE_MPMPATH_FINISH],[ |
236 |
for var in mod_buildvars; do |
236 |
for var in mod_buildvars; do |
237 |
if eval val=\"\$MOD_$var\"; test -n "$val"; then |
237 |
if eval val=\"\$MOD_$var\"; test -n "$val"; then |
238 |
echo "MOD_$var = $val" >> $modpath_current/modules.mk |
238 |
echo "MOD_$var = $val" >> $modpath_current/modules.mk |
Lines 253-259
Link Here
|
253 |
dnl path -- relative path to MPM (default: server/mpm/mpmname) |
253 |
dnl path -- relative path to MPM (default: server/mpm/mpmname) |
254 |
dnl libs -- libs needed by this MPM |
254 |
dnl libs -- libs needed by this MPM |
255 |
dnl |
255 |
dnl |
256 |
AC_DEFUN(APACHE_MPM_MODULE,[ |
256 |
AC_DEFUN([APACHE_MPM_MODULE],[ |
257 |
if ap_mpm_is_enabled $1; then |
257 |
if ap_mpm_is_enabled $1; then |
258 |
if test -z "$3"; then |
258 |
if test -z "$3"; then |
259 |
objects="$1.lo" |
259 |
objects="$1.lo" |
Lines 330-336
Link Here
|
330 |
dnl prereq_module's APACHE_MODULE() statement must have been processed |
330 |
dnl prereq_module's APACHE_MODULE() statement must have been processed |
331 |
dnl before the current APACHE_MODULE() statement. |
331 |
dnl before the current APACHE_MODULE() statement. |
332 |
dnl |
332 |
dnl |
333 |
AC_DEFUN(APACHE_MODULE,[ |
333 |
AC_DEFUN([APACHE_MODULE],[ |
334 |
AC_MSG_CHECKING(whether to enable mod_$1) |
334 |
AC_MSG_CHECKING(whether to enable mod_$1) |
335 |
define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl |
335 |
define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl |
336 |
AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),force_$1=$enableval,enable_$1=ifelse($5,,maybe-all,$5)) |
336 |
AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),force_$1=$enableval,enable_$1=ifelse($5,,maybe-all,$5)) |
Lines 424-430
Link Here
|
424 |
dnl |
424 |
dnl |
425 |
dnl APACHE_ENABLE_MODULES |
425 |
dnl APACHE_ENABLE_MODULES |
426 |
dnl |
426 |
dnl |
427 |
AC_DEFUN(APACHE_ENABLE_MODULES,[ |
427 |
AC_DEFUN([APACHE_ENABLE_MODULES],[ |
428 |
module_selection=most |
428 |
module_selection=most |
429 |
module_default=shared |
429 |
module_default=shared |
430 |
|
430 |
|
Lines 484-490
Link Here
|
484 |
]) |
484 |
]) |
485 |
]) |
485 |
]) |
486 |
|
486 |
|
487 |
AC_DEFUN(APACHE_REQUIRE_CXX,[ |
487 |
AC_DEFUN([APACHE_REQUIRE_CXX],[ |
488 |
if test -z "$apache_cxx_done"; then |
488 |
if test -z "$apache_cxx_done"; then |
489 |
AC_PROG_CXX |
489 |
AC_PROG_CXX |
490 |
AC_PROG_CXXCPP |
490 |
AC_PROG_CXXCPP |
Lines 498-504
Link Here
|
498 |
dnl Configure for OpenSSL, giving preference to |
498 |
dnl Configure for OpenSSL, giving preference to |
499 |
dnl "--with-ssl=<path>" if it was specified. |
499 |
dnl "--with-ssl=<path>" if it was specified. |
500 |
dnl |
500 |
dnl |
501 |
AC_DEFUN(APACHE_CHECK_OPENSSL,[ |
501 |
AC_DEFUN([APACHE_CHECK_OPENSSL],[ |
502 |
AC_CACHE_CHECK([for OpenSSL], [ac_cv_openssl], [ |
502 |
AC_CACHE_CHECK([for OpenSSL], [ac_cv_openssl], [ |
503 |
dnl initialise the variables we use |
503 |
dnl initialise the variables we use |
504 |
ac_cv_openssl=no |
504 |
ac_cv_openssl=no |
Lines 654-660
Link Here
|
654 |
fi |
654 |
fi |
655 |
]) |
655 |
]) |
656 |
|
656 |
|
657 |
AC_DEFUN(APACHE_CHECK_SYSTEMD, [ |
657 |
AC_DEFUN([APACHE_CHECK_SYSTEMD], [ |
658 |
dnl Check for systemd support for listen.c's socket activation. |
658 |
dnl Check for systemd support for listen.c's socket activation. |
659 |
case $host in |
659 |
case $host in |
660 |
*-linux-*) |
660 |
*-linux-*) |
Lines 684-690
Link Here
|
684 |
dnl Configure for nghttp2, giving preference to |
684 |
dnl Configure for nghttp2, giving preference to |
685 |
dnl "--with-nghttp2=<path>" if it was specified. |
685 |
dnl "--with-nghttp2=<path>" if it was specified. |
686 |
dnl |
686 |
dnl |
687 |
AC_DEFUN(APACHE_CHECK_NGHTTP2,[ |
687 |
AC_DEFUN([APACHE_CHECK_NGHTTP2],[ |
688 |
AC_CACHE_CHECK([for nghttp2], [ac_cv_nghttp2], [ |
688 |
AC_CACHE_CHECK([for nghttp2], [ac_cv_nghttp2], [ |
689 |
dnl initialise the variables we use |
689 |
dnl initialise the variables we use |
690 |
ac_cv_nghttp2=no |
690 |
ac_cv_nghttp2=no |
Lines 805-811
Link Here
|
805 |
dnl apache will use while generating scripts like autoconf and apxs and |
805 |
dnl apache will use while generating scripts like autoconf and apxs and |
806 |
dnl the default config file. |
806 |
dnl the default config file. |
807 |
|
807 |
|
808 |
AC_DEFUN(APACHE_SUBST_EXPANDED_ARG,[ |
808 |
AC_DEFUN([APACHE_SUBST_EXPANDED_ARG],[ |
809 |
APR_EXPAND_VAR(exp_$1, [$]$1) |
809 |
APR_EXPAND_VAR(exp_$1, [$]$1) |
810 |
APACHE_SUBST(exp_$1) |
810 |
APACHE_SUBST(exp_$1) |
811 |
APR_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix}) |
811 |
APR_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix}) |
Lines 812-818
Link Here
|
812 |
APACHE_SUBST(rel_$1) |
812 |
APACHE_SUBST(rel_$1) |
813 |
]) |
813 |
]) |
814 |
|
814 |
|
815 |
AC_DEFUN(APACHE_EXPORT_ARGUMENTS,[ |
815 |
AC_DEFUN([APACHE_EXPORT_ARGUMENTS],[ |
816 |
APACHE_SUBST_EXPANDED_ARG(exec_prefix) |
816 |
APACHE_SUBST_EXPANDED_ARG(exec_prefix) |
817 |
APACHE_SUBST_EXPANDED_ARG(bindir) |
817 |
APACHE_SUBST_EXPANDED_ARG(bindir) |
818 |
APACHE_SUBST_EXPANDED_ARG(sbindir) |
818 |
APACHE_SUBST_EXPANDED_ARG(sbindir) |