1
dnl -------------------------------------------------------- -*- autoconf -*-
2
dnl Copyright 2000-2005 The Apache Software Foundation
4
dnl Licensed under the Apache License, Version 2.0 (the "License");
5
dnl you may not use this file except in compliance with the License.
6
dnl You may obtain a copy of the License at
8
dnl http://www.apache.org/licenses/LICENSE-2.0
10
dnl Unless required by applicable law or agreed to in writing, software
11
dnl distributed under the License is distributed on an "AS IS" BASIS,
12
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
dnl See the License for the specific language governing permissions and
14
dnl limitations under the License.
17
dnl apr_common.m4: APR's general-purpose autoconf macros
21
dnl APR_CONFIG_NICE(filename)
23
dnl Saves a snapshot of the configure command-line for later reuse
25
AC_DEFUN(APR_CONFIG_NICE,[
30
# Created by configure
33
if test -n "$CC"; then
34
echo "CC=\"$CC\"; export CC" >> $1
36
if test -n "$CFLAGS"; then
37
echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
39
if test -n "$CPPFLAGS"; then
40
echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
42
if test -n "$LDFLAGS"; then
43
echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
45
if test -n "$LTFLAGS"; then
46
echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
48
if test -n "$LIBS"; then
49
echo "LIBS=\"$LIBS\"; export LIBS" >> $1
51
if test -n "$INCLUDES"; then
52
echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
54
if test -n "$NOTEST_CFLAGS"; then
55
echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
57
if test -n "$NOTEST_CPPFLAGS"; then
58
echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
60
if test -n "$NOTEST_LDFLAGS"; then
61
echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
63
if test -n "$NOTEST_LIBS"; then
64
echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
67
for arg in [$]0 "[$]@"; do
68
APR_EXPAND_VAR(arg, $arg)
69
echo "\"[$]arg\" \\" >> $1
75
dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
76
dnl checks whether mkdir -p works
77
AC_DEFUN(APR_MKDIR_P_CHECK,[
78
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
79
test -d conftestdir && rm -rf conftestdir
80
mkdir -p conftestdir/somedir >/dev/null 2>&1
81
if test -d conftestdir/somedir; then
88
if test "$ac_cv_mkdir_p" = "yes"; then
96
dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
98
dnl dir: directory to find configure in
99
dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
100
dnl args-to-drop: arguments to drop from the invocation (optional)
102
dnl Note: This macro relies on ac_configure_args being set properly.
104
dnl The args-to-drop argument is shoved into a case statement, so
105
dnl multiple arguments can be separated with a |.
107
dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
108
dnl places quotes around every argument. So, if you want to drop the
109
dnl argument called --enable-layout, you must pass the third argument as:
110
dnl [--enable-layout=*|\'--enable-layout=*]
112
dnl Trying to optimize this is left as an exercise to the reader who wants
113
dnl to put up with more autoconf craziness. I give up.
115
AC_DEFUN(APR_SUBDIR_CONFIG, [
116
# save our work to this point; this allows the sub-package to use it
119
echo "configuring package in $1 now"
121
apr_config_subdirs="$1"
122
test -d $1 || $mkdir_p $1
123
ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
127
# A "../" for each directory in /$config_subdirs.
128
ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
131
# Make the cache file pathname absolute for the subdirs
132
# required to correctly handle subdirs that might actually
134
case "$cache_file" in
135
/*) # already absolute
136
ac_sub_cache_file=$cache_file ;;
137
*) # Was relative path.
138
ac_sub_cache_file="$ac_popdir/$cache_file" ;;
141
ifelse($3, [], [apr_configure_args=$ac_configure_args],[
144
for apr_configure_arg in $ac_configure_args
146
case "$apr_configure_arg" in
150
apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
155
# autoconf doesn't add --silent to ac_configure_args; explicitly pass it
156
test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
158
dnl The eval makes quoting arguments work - specifically $2 where the
159
dnl quoting mechanisms used is "" rather than [].
161
dnl We need to execute another shell because some autoconf/shell combinations
162
dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
163
dnl and autoconf-2.54+)
164
if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
166
echo "$1 configured properly"
168
echo "configure failed for $1"
174
# grab any updates from the sub-package
179
dnl APR_SAVE_THE_ENVIRONMENT(variable_name)
181
dnl Stores the variable (usually a Makefile macro) for later restoration
183
AC_DEFUN(APR_SAVE_THE_ENVIRONMENT,[
184
apr_ste_save_$1="$$1"
188
dnl APR_RESTORE_THE_ENVIRONMENT(variable_name, prefix_)
190
dnl Uses the previously saved variable content to figure out what configure
191
dnl has added to the variable, moving the new bits to prefix_variable_name
192
dnl and restoring the original variable contents. This makes it possible
193
dnl for a user to override configure when it does something stupid.
195
AC_DEFUN(APR_RESTORE_THE_ENVIRONMENT,[
196
if test "x$apr_ste_save_$1" = "x"; then
200
if test "x$apr_ste_save_$1" = "x$$1"; then
203
$2$1=`echo $$1 | sed -e "s%${apr_ste_save_$1}%%"`
204
$1="$apr_ste_save_$1"
207
if test "x$silent" != "xyes"; then
208
echo " restoring $1 to \"$$1\""
209
echo " setting $2$1 to \"$$2$1\""
215
dnl APR_SETIFNULL(variable, value)
217
dnl Set variable iff it's currently null
219
AC_DEFUN(APR_SETIFNULL,[
220
if test -z "$$1"; then
221
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
227
dnl APR_SETVAR(variable, value)
229
dnl Set variable no matter what
231
AC_DEFUN(APR_SETVAR,[
232
test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
237
dnl APR_ADDTO(variable, value)
239
dnl Add value to variable
242
if test "x$$1" = "x"; then
243
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
246
apr_addto_bugger="$2"
247
for i in $apr_addto_bugger; do
248
apr_addto_duplicate="0"
250
if test "x$i" = "x$j"; then
251
apr_addto_duplicate="1"
255
if test $apr_addto_duplicate = "0"; then
256
test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
264
dnl APR_REMOVEFROM(variable, value)
266
dnl Remove a value from a variable
268
AC_DEFUN(APR_REMOVEFROM,[
269
if test "x$$1" = "x$2"; then
270
test "x$silent" != "xyes" && echo " nulling $1"
276
if test "x$i" != "x$2"; then
277
apr_new_bugger="$apr_new_bugger $i"
282
if test $apr_removed = "1"; then
283
test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
290
dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
292
AC_DEFUN(APR_CHECK_DEFINE_FILES,[
293
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
297
AC_EGREP_CPP(YES_IS_DEFINED, [
302
], ac_cv_define_$1=yes)
305
if test "$ac_cv_define_$1" = "yes"; then
306
AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined])
312
dnl APR_CHECK_DEFINE(symbol, header_file)
314
AC_DEFUN(APR_CHECK_DEFINE,[
315
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
316
AC_EGREP_CPP(YES_IS_DEFINED, [
321
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
323
if test "$ac_cv_define_$1" = "yes"; then
324
AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined in $2])
329
dnl APR_CHECK_APR_DEFINE( symbol )
331
AC_DEFUN(APR_CHECK_APR_DEFINE,[
332
apr_old_cppflags=$CPPFLAGS
333
CPPFLAGS="$CPPFLAGS $INCLUDES"
334
AC_EGREP_CPP(YES_IS_DEFINED, [
339
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
340
CPPFLAGS=$apr_old_cppflags
343
dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
344
dnl "yes" if 'filename' is readable, else "no".
345
AC_DEFUN([APR_CHECK_FILE], [
346
dnl Pick a safe variable name
347
define([apr_cvname], ac_cv_file_[]translit([$1], [./+-], [__p_]))
348
AC_CACHE_CHECK([for $1], [apr_cvname],
356
define(APR_IFALLYES,[dnl
358
for ac_spec in $1; do
359
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
360
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
363
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
364
ac_var="ac_cv_header_$ac_item"
367
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
368
ac_var="ac_cv_file_$ac_item"
370
func ) ac_var="ac_cv_func_$ac_item" ;;
371
struct ) ac_var="ac_cv_struct_$ac_item" ;;
372
define ) ac_var="ac_cv_define_$ac_item" ;;
373
custom ) ac_var="$ac_item" ;;
375
eval "ac_val=\$$ac_var"
376
if test ".$ac_val" != .yes; then
381
if test ".$ac_rc" = .yes; then
391
define(APR_BEGIN_DECISION,[dnl
392
ac_decision_item='$1'
393
ac_decision_msg='FAILED'
398
AC_DEFUN([APR_DECIDE],[dnl
399
dnl Define the flag (or not) in apr_private.h via autoheader
400
AH_TEMPLATE($1, [Define if $2 will be used])
404
ac_decision_$1_msg='$2'
408
define(APR_DECISION_OVERRIDE,[dnl
410
for ac_item in $1; do
411
eval "ac_decision_this=\$ac_decision_${ac_item}"
412
if test ".$ac_decision_this" = .yes; then
414
eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
420
define(APR_DECISION_FORCE,[dnl
422
eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
426
define(APR_END_DECISION,[dnl
427
if test ".$ac_decision" = .; then
428
echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
431
if test ".$ac_decision_msg" = .; then
432
ac_decision_msg="$ac_decision"
434
AC_DEFINE_UNQUOTED(${ac_decision_item})
435
AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg])
441
dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
443
dnl A variant of AC_CHECK_SIZEOF which allows the checking of
444
dnl sizes of non-builtin types
446
AC_DEFUN(APR_CHECK_SIZEOF_EXTENDED,
447
[changequote(<<,>>)dnl
448
dnl The name to #define
449
define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
450
dnl The cache variable
451
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$2, [ *],[<p>]))dnl
453
AC_MSG_CHECKING(size of $2)
454
AC_CACHE_VAL(AC_CV_NAME,
455
[AC_TRY_RUN([#include <stdio.h>
459
FILE *f=fopen("conftestval","w");
461
fprintf(f, "%d\n", sizeof($2));
463
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
465
AC_MSG_RESULT($AC_CV_NAME)
466
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The size of ]$2)
467
undefine([AC_TYPE_NAME])dnl
468
undefine([AC_CV_NAME])dnl
473
dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
474
dnl [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
476
dnl Tries a compile test with warnings activated so that the result
477
dnl is false if the code doesn't compile cleanly. For compilers
478
dnl where it is not known how to activate a "fail-on-error" mode,
479
dnl it is undefined which of the sets of actions will be run.
481
AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
482
[apr_save_CFLAGS=$CFLAGS
483
CFLAGS="$CFLAGS $CFLAGS_WARN"
484
if test "$ac_cv_prog_gcc" = "yes"; then
485
CFLAGS="$CFLAGS -Werror"
488
[#include "confdefs.h"
491
[int main(int argc, const char *const *argv) {]
495
CFLAGS=$apr_save_CFLAGS
499
dnl APR_CHECK_STRERROR_R_RC
501
dnl Decide which style of retcode is used by this system's
502
dnl strerror_r(). It either returns int (0 for success, -1
503
dnl for failure), or it returns a pointer to the error
507
AC_DEFUN(APR_CHECK_STRERROR_R_RC,[
508
AC_MSG_CHECKING(for type of return code from strerror_r)
516
if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
523
ac_cv_strerror_r_rc_int=yes ], [
524
ac_cv_strerror_r_rc_int=no ], [
525
ac_cv_strerror_r_rc_int=no ] )
526
if test "x$ac_cv_strerror_r_rc_int" = xyes; then
527
AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
532
AC_MSG_RESULT([$msg])
536
dnl APR_CHECK_DIRENT_INODE
538
dnl Decide if d_fileno or d_ino are available in the dirent
539
dnl structure on this platform. Single UNIX Spec says d_ino,
540
dnl BSD uses d_fileno. Undef to find the real beast.
542
AC_DEFUN(APR_CHECK_DIRENT_INODE, [
543
AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
544
apr_cv_dirent_inode=no
546
#include <sys/types.h>
552
struct dirent de; de.d_fileno;
553
], apr_cv_dirent_inode=d_fileno)
554
if test "$apr_cv_dirent_inode" = "no"; then
556
#include <sys/types.h>
562
struct dirent de; de.d_ino;
563
], apr_cv_dirent_inode=d_ino)
566
if test "$apr_cv_dirent_inode" != "no"; then
567
AC_DEFINE_UNQUOTED(DIRENT_INODE, $apr_cv_dirent_inode,
568
[Define if struct dirent has an inode member])
573
dnl APR_CHECK_DIRENT_TYPE
575
dnl Decide if d_type is available in the dirent structure
576
dnl on this platform. Not part of the Single UNIX Spec.
577
dnl Note that this is worthless without DT_xxx macros, so
578
dnl look for one while we are at it.
580
AC_DEFUN(APR_CHECK_DIRENT_TYPE,[
581
AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
582
apr_cv_dirent_type=no
584
#include <sys/types.h>
587
struct dirent de; de.d_type = DT_REG;
588
], apr_cv_dirent_type=d_type)
590
if test "$apr_cv_dirent_type" != "no"; then
591
AC_DEFINE_UNQUOTED(DIRENT_TYPE, $apr_cv_dirent_type,
592
[Define if struct dirent has a d_type member])
596
dnl the following is a newline, a space, a tab, and a backslash (the
597
dnl backslash is used by the shell to skip newlines, but m4 sees it;
598
dnl treat it like whitespace).
599
dnl WARNING: don't reindent these lines, or the space/tab will be lost!
600
define([apr_whitespace],[
604
dnl APR_COMMA_ARGS(ARG1 ...)
605
dnl convert the whitespace-separated arguments into comman-separated
608
dnl APR_FOREACH(CODE-BLOCK, ARG1, ARG2, ...)
609
dnl subsitute CODE-BLOCK for each ARG[i]. "eachval" will be set to ARG[i]
610
dnl within each iteration.
613
define({APR_COMMA_ARGS},{patsubst([$}{1],[[}apr_whitespace{]+],[,])})
614
define({APR_FOREACH},
617
$}{2)$}{1[]APR_FOREACH([$}{1],
619
builtin([shift], $}{@)))])})
622
dnl APR_FLAG_HEADERS(HEADER-FILE ... [, FLAG-TO-SET ] [, "yes" ])
623
dnl we set FLAG-TO-SET to 1 if we find HEADER-FILE, otherwise we set to 0
624
dnl if FLAG-TO-SET is null, we automagically determine it's name
625
dnl by changing all "/" to "_" in the HEADER-FILE and dropping
626
dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
627
dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
629
AC_DEFUN(APR_FLAG_HEADERS,[
633
ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
634
aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
635
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
636
eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,yes,1)"
638
eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,no,0)"
643
dnl APR_FLAG_FUNCS(FUNC ... [, FLAG-TO-SET] [, "yes" ])
644
dnl if FLAG-TO-SET is null, we automagically determine it's name
645
dnl prepending "have_" to the function name in FUNC, otherwise
646
dnl we use what's provided as FLAG-TO-SET. If the 3rd parameter
647
dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
650
AC_DEFUN(APR_FLAG_FUNCS,[
654
aprt_3="have_$aprt_j"
655
if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
656
eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,yes,1)"
658
eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,no,0)"
663
dnl Iteratively interpolate the contents of the second argument
664
dnl until interpolation offers no new result. Then assign the
665
dnl final result to $1.
672
dnl APR_EXPAND_VAR(fraz, $baz)
673
dnl $fraz is now "1/2/3"
675
AC_DEFUN(APR_EXPAND_VAR,[
678
while test "x${ap_cur}" != "x${ap_last}";
681
ap_cur=`eval "echo ${ap_cur}"`
687
dnl Removes the value of $3 from the string in $2, strips of any leading
688
dnl slashes, and returns the value in $1.
691
dnl orig_path="${prefix}/bar"
692
dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
693
dnl $final_path now contains "bar"
694
AC_DEFUN(APR_PATH_RELATIVE,[
695
ap_stripped=`echo $2 | sed -e "s#^$3##"`
696
# check if the stripping was successful
697
if test "x$2" != "x${ap_stripped}"; then
698
# it was, so strip of any leading slashes
699
$1="`echo ${ap_stripped} | sed -e 's#^/*##'`"
701
# it wasn't so return the original
706
dnl APR_HELP_STRING(LHS, RHS)
707
dnl Autoconf 2.50 can not handle substr correctly. It does have
708
dnl AC_HELP_STRING, so let's try to call it if we can.
709
dnl Note: this define must be on one line so that it can be properly returned
710
dnl as the help string. When using this macro with a multi-line RHS, ensure
711
dnl that you surround the macro invocation with []s
712
AC_DEFUN(APR_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
715
dnl APR_LAYOUT(configlayout, layoutname [, extravars])
717
AC_DEFUN(APR_LAYOUT,[
718
if test ! -f $srcdir/config.layout; then
719
echo "** Error: Layout file $srcdir/config.layout not found"
720
echo "** Error: Cannot use undefined layout '$LAYOUT'"
723
# Catch layout names including a slash which will otherwise
724
# confuse the heck out of the sed script.
727
echo "** Error: $2 is not a valid layout name"
732
sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
733
-e "1,/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*/d" \
734
-e '/[ ]*<\/Layout>[ ]*/,$d' \
740
if test ! -s $pldconf; then
741
echo "** Error: unable to find layout $layout_name"
746
for var in prefix exec_prefix bindir sbindir libexecdir mandir \
747
sysconfdir datadir includedir localstatedir runtimedir \
748
logfiledir libdir installbuilddir libsuffix $3; do
749
eval "val=\"\$$var\""
752
val=`echo $val | sed -e 's;\+$;;'`
753
eval "$var=\"\$val\""
760
val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
761
val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
762
if test "$autosuffix" = "yes"; then
763
if echo $val | grep apache >/dev/null; then
768
if test "$addtarget" = "yes"; then
778
dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
780
AC_DEFUN(APR_ENABLE_LAYOUT,[
781
AC_ARG_ENABLE(layout,
782
[ --enable-layout=LAYOUT],[
786
if test -z "$LAYOUT"; then
789
APR_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
791
AC_MSG_CHECKING(for chosen layout)
792
AC_MSG_RESULT($layout_name)
797
dnl APR_PARSE_ARGUMENTS
798
dnl a reimplementation of autoconf's argument parser,
799
dnl used here to allow us to co-exist layouts and argument based
801
AC_DEFUN(APR_PARSE_ARGUMENTS,[
805
# If the previous option needs an argument, assign it.
806
if test -n "$ac_prev"; then
807
eval "$ac_prev=\$ac_option"
812
ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
816
-bindir | --bindir | --bindi | --bind | --bin | --bi)
818
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
819
bindir="$ac_optarg" ;;
821
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
823
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
825
datadir="$ac_optarg" ;;
827
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
828
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
829
| --exec | --exe | --ex)
830
ac_prev=exec_prefix ;;
831
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
832
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
833
| --exec=* | --exe=* | --ex=*)
834
exec_prefix="$ac_optarg" ;;
836
-includedir | --includedir | --includedi | --included | --include \
837
| --includ | --inclu | --incl | --inc)
838
ac_prev=includedir ;;
839
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
840
| --includ=* | --inclu=* | --incl=* | --inc=*)
841
includedir="$ac_optarg" ;;
843
-infodir | --infodir | --infodi | --infod | --info | --inf)
845
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
846
infodir="$ac_optarg" ;;
848
-libdir | --libdir | --libdi | --libd)
850
-libdir=* | --libdir=* | --libdi=* | --libd=*)
851
libdir="$ac_optarg" ;;
853
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
854
| --libexe | --libex | --libe)
855
ac_prev=libexecdir ;;
856
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
857
| --libexe=* | --libex=* | --libe=*)
858
libexecdir="$ac_optarg" ;;
860
-localstatedir | --localstatedir | --localstatedi | --localstated \
861
| --localstate | --localstat | --localsta | --localst \
862
| --locals | --local | --loca | --loc | --lo)
863
ac_prev=localstatedir ;;
864
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
865
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
866
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
867
localstatedir="$ac_optarg" ;;
869
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
871
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
872
mandir="$ac_optarg" ;;
874
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
876
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
877
prefix="$ac_optarg" ;;
879
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
881
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
883
sbindir="$ac_optarg" ;;
885
-sharedstatedir | --sharedstatedir | --sharedstatedi \
886
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
887
| --sharedst | --shareds | --shared | --share | --shar \
889
ac_prev=sharedstatedir ;;
890
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
891
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
892
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
894
sharedstatedir="$ac_optarg" ;;
896
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
897
| --syscon | --sysco | --sysc | --sys | --sy)
898
ac_prev=sysconfdir ;;
899
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
900
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
901
sysconfdir="$ac_optarg" ;;
906
# Be sure to have absolute paths.
907
for ac_var in exec_prefix prefix
909
eval ac_val=$`echo $ac_var`
911
[[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
912
*) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
921
dnl Determine what program we can use to generate .deps-style dependencies
923
AC_DEFUN(APR_CHECK_DEPEND,[
924
dnl Try to determine what depend program we can use
925
dnl All GCC-variants should have -MM.
926
dnl If not, then we can check on those, too.
927
if test "$GCC" = "yes"; then
931
dnl <sys/types.h> should be available everywhere!
932
cat > conftest.c <<EOF
933
#include <sys/types.h>
934
int main() { return 0; }
937
for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
938
AC_MSG_CHECKING([if $i can create proper make dependencies])
939
if $i conftest.c 2>/dev/null | grep 'conftest.o: conftest.c' >/dev/null; then