]> granicus.if.org Git - apache/blob - acinclude.m4
remove ssl_engine_ds.c
[apache] / acinclude.m4
1
2 dnl APACHE_HELP_STRING(LHS, RHS)
3 dnl Autoconf 2.50 can not handle substr correctly.  It does have 
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
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
8
9 dnl APACHE_SUBST(VARIABLE)
10 dnl Makes VARIABLE available in generated files
11 dnl (do not use @variable@ in Makefiles, but $(variable))
12 AC_DEFUN(APACHE_SUBST,[
13   APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1"
14   AC_SUBST($1)
15 ])
16
17 dnl APACHE_FAST_OUTPUT(FILENAME)
18 dnl Perform substitutions on FILENAME (Makefiles only)
19 AC_DEFUN(APACHE_FAST_OUTPUT,[
20   APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1"
21 ])
22
23 dnl APACHE_MKDIR_P_CHECK
24 dnl checks whether mkdir -p works
25 AC_DEFUN(APACHE_MKDIR_P_CHECK,[
26   AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
27     test -d conftestdir && rm -rf conftestdir
28     mkdir -p conftestdir/somedir >/dev/null 2>&1
29     if test -d conftestdir/somedir; then
30       ac_cv_mkdir_p=yes
31     else
32       ac_cv_mkdir_p=no
33     fi
34     rm -rf conftestdir
35   ])
36 ])
37
38 dnl APACHE_GEN_CONFIG_VARS
39 dnl Creates config_vars.mk
40 AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
41   APACHE_SUBST(abs_srcdir)
42   APACHE_SUBST(bindir)
43   APACHE_SUBST(sbindir)
44   APACHE_SUBST(cgidir)
45   APACHE_SUBST(logfiledir)
46   APACHE_SUBST(exec_prefix)
47   APACHE_SUBST(datadir)
48   APACHE_SUBST(localstatedir)
49   APACHE_SUBST(mandir)
50   APACHE_SUBST(libexecdir)
51   APACHE_SUBST(htdocsdir)
52   APACHE_SUBST(manualdir)
53   APACHE_SUBST(includedir)
54   APACHE_SUBST(errordir)
55   APACHE_SUBST(iconsdir)
56   APACHE_SUBST(sysconfdir)
57   APACHE_SUBST(installbuilddir)
58   APACHE_SUBST(runtimedir)
59   APACHE_SUBST(proxycachedir)
60   APACHE_SUBST(other_targets)
61   APACHE_SUBST(progname)
62   APACHE_SUBST(prefix)
63   APACHE_SUBST(AWK)
64   APACHE_SUBST(CC)
65   APACHE_SUBST(CPP)
66   APACHE_SUBST(CXX)
67   APACHE_SUBST(CPPFLAGS)
68   APACHE_SUBST(CFLAGS)
69   APACHE_SUBST(CXXFLAGS)
70   APACHE_SUBST(LTFLAGS)
71   APACHE_SUBST(LDFLAGS)
72   APACHE_SUBST(LT_LDFLAGS)
73   APACHE_SUBST(SH_LDFLAGS)
74   APACHE_SUBST(HTTPD_LDFLAGS)
75   APACHE_SUBST(UTIL_LDFLAGS)
76   APACHE_SUBST(LIBS)
77   APACHE_SUBST(DEFS)
78   APACHE_SUBST(INCLUDES)
79   APACHE_SUBST(NOTEST_CPPFLAGS)
80   APACHE_SUBST(NOTEST_CFLAGS)
81   APACHE_SUBST(NOTEST_CXXFLAGS)
82   APACHE_SUBST(NOTEST_LDFLAGS)
83   APACHE_SUBST(NOTEST_LIBS)
84   APACHE_SUBST(EXTRA_CPPFLAGS)
85   APACHE_SUBST(EXTRA_CFLAGS)
86   APACHE_SUBST(EXTRA_CXXFLAGS)
87   APACHE_SUBST(EXTRA_LDFLAGS)
88   APACHE_SUBST(EXTRA_LIBS)
89   APACHE_SUBST(EXTRA_INCLUDES)
90   APACHE_SUBST(LIBTOOL)
91   APACHE_SUBST(SHELL)
92   APACHE_SUBST(MODULE_DIRS)
93   APACHE_SUBST(MODULE_CLEANDIRS)
94   APACHE_SUBST(PORT)
95   APACHE_SUBST(CORE_IMPLIB_FILE)
96   APACHE_SUBST(CORE_IMPLIB)
97   APACHE_SUBST(SH_LIBS)
98   APACHE_SUBST(SH_LIBTOOL)
99   APACHE_SUBST(MK_IMPLIB)
100   APACHE_SUBST(INSTALL_PROG_FLAGS)
101   APACHE_SUBST(DSO_MODULES)
102
103   abs_srcdir="`(cd $srcdir && pwd)`"
104
105   APACHE_MKDIR_P_CHECK
106   echo creating config_vars.mk
107   > config_vars.mk
108   for i in $APACHE_VAR_SUBST; do
109     eval echo "$i = \$$i" >> config_vars.mk
110   done
111 ])
112
113 dnl APACHE_GEN_MAKEFILES
114 dnl Creates Makefiles
115 AC_DEFUN(APACHE_GEN_MAKEFILES,[
116   $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES
117 ])
118
119 dnl ## APACHE_OUTPUT(file)
120 dnl ## adds "file" to the list of files generated by AC_OUTPUT
121 dnl ## This macro can be used several times.
122 AC_DEFUN(APACHE_OUTPUT, [
123   APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1"
124 ])
125
126 dnl
127 dnl APACHE_TYPE_RLIM_T
128 dnl
129 dnl If rlim_t is not defined, define it to int
130 dnl
131 AC_DEFUN(APACHE_TYPE_RLIM_T, [
132   AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [
133     AC_TRY_COMPILE([
134 #include <sys/types.h>
135 #include <sys/time.h>
136 #include <sys/resource.h>
137 ], [rlim_t spoon;], [
138       ac_cv_type_rlim_t=yes
139     ],[ac_cv_type_rlim_t=no
140     ])
141   ])
142   if test "$ac_cv_type_rlim_t" = "no" ; then
143       AC_DEFINE(rlim_t, int,
144           [Define to 'int' if <sys/resource.h> doesn't define it for us])
145   fi
146 ])
147
148 dnl APACHE_MODPATH_INIT(modpath)
149 AC_DEFUN(APACHE_MODPATH_INIT,[
150   current_dir=$1
151   modpath_current=modules/$1
152   modpath_static=
153   modpath_shared=
154   test -d $1 || $srcdir/build/mkdir.sh $modpath_current
155   > $modpath_current/modules.mk
156 ])dnl
157 dnl
158 AC_DEFUN(APACHE_MODPATH_FINISH,[
159   echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk
160   echo "static = $modpath_static" >> $modpath_current/modules.mk
161   echo "shared = $modpath_shared" >> $modpath_current/modules.mk
162   if test ! -z "$modpath_static" -o ! -z "$modpath_shared"; then
163     MODULE_DIRS="$MODULE_DIRS $current_dir"
164   else
165     MODULE_CLEANDIRS="$MODULE_CLEANDIRS $current_dir"
166   fi
167   APACHE_FAST_OUTPUT($modpath_current/Makefile)
168 ])dnl
169 dnl
170 dnl APACHE_MODPATH_ADD(name[, shared[, objects [, ldflags[, libs]]]])
171 AC_DEFUN(APACHE_MODPATH_ADD,[
172   if test -z "$3"; then
173     objects="mod_$1.lo"
174   else
175     objects="$3"
176   fi
177
178   if test -z "$module_standalone"; then
179     if test -z "$2"; then
180       libname="mod_$1.la"
181       BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
182       modpath_static="$modpath_static $libname"
183       cat >>$modpath_current/modules.mk<<EOF
184 $libname: $objects
185         \$(MOD_LINK) $objects
186 EOF
187     else
188       apache_need_shared=yes
189       libname="mod_$1.la"
190       shobjects=`echo $objects | sed 's/\.lo/.slo/g'`
191       modpath_shared="$modpath_shared $libname"
192       cat >>$modpath_current/modules.mk<<EOF
193 $libname: $shobjects
194         \$(SH_LINK) -rpath \$(libexecdir) -module -avoid-version $4 $objects $5
195 EOF
196     fi
197   fi
198 ])dnl
199
200 dnl
201 dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
202 dnl
203 dnl default is one of:
204 dnl   yes    -- enabled by default. user must explicitly disable.
205 dnl   no     -- disabled under default, most, all. user must explicitly enable.
206 dnl   most   -- disabled by default. enabled explicitly or with most or all.
207 dnl   static -- enabled as static by default, must be explicitly changed.
208 dnl   ""     -- disabled under default, most. enabled explicitly or with all.
209 dnl
210 dnl basically: yes/no is a hard setting. "most" means follow the "most"
211 dnl            setting. otherwise, fall under the "all" setting.
212 dnl            explicit yes/no always overrides.
213 dnl
214 AC_DEFUN(APACHE_MODULE,[
215   AC_MSG_CHECKING(whether to enable mod_$1)
216   define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl
217   AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),,enable_$1=ifelse($5,,maybe-all,$5))
218   undefine([optname])dnl
219   _apmod_extra_msg=""
220   dnl When --enable-modules=most is set and the module was not explicitly
221   dnl requested, allow a module to disable itself if its pre-reqs fail.
222   if test "$module_selection" = "most" -a "$enable_$1" = "most"; then
223     _apmod_error_fatal="no"
224   else
225     _apmod_error_fatal="yes"
226   fi
227   if test "$enable_$1" = "static"; then
228     enable_$1=yes
229   elif test "$enable_$1" = "yes"; then
230     enable_$1=$module_default
231     _apmod_extra_msg=" ($module_selection)"
232   elif test "$enable_$1" = "most"; then
233     if test "$module_selection" = "most" -o "$module_selection" = "all"; then
234       enable_$1=$module_default
235       _apmod_extra_msg=" ($module_selection)"
236     elif test "$enable_$1" != "yes"; then
237       enable_$1=no
238     fi
239   elif test "$enable_$1" = "maybe-all"; then
240     if test "$module_selection" = "all"; then
241       enable_$1=$module_default
242       _apmod_extra_msg=" (all)"
243     else
244       enable_$1=no
245     fi
246   fi
247   if test "$enable_$1" != "no"; then
248     dnl If we plan to enable it, allow the module to run some autoconf magic
249     dnl that may disable it because of missing dependencies.
250     ifelse([$6],,:,[AC_MSG_RESULT([checking dependencies])
251                     $6
252                     AC_MSG_CHECKING(whether to enable mod_$1)
253                     if test "$enable_$1" = "no"; then
254                       if test "$_apmod_error_fatal" = "no"; then
255                         _apmod_extra_msg=" (disabled)"
256                       else
257                         AC_MSG_ERROR([mod_$1 has been requested but can not be built due to prerequisite failures])
258                       fi
259                     fi])
260   fi
261   AC_MSG_RESULT($enable_$1$_apmod_extra_msg)
262   if test "$enable_$1" != "no"; then
263     case "$enable_$1" in
264     shared*)
265       enable_$1=`echo $ac_n $enable_$1$ac_c|sed 's/shared,*//'`
266       sharedobjs=yes
267       shared=yes
268       DSO_MODULES="$DSO_MODULES $1"
269       ;;
270     *)
271       MODLIST="$MODLIST ifelse($4,,$1,$4)"
272       if test "$1" = "so"; then
273           sharedobjs=yes
274       fi
275       shared="";;
276     esac
277     APACHE_MODPATH_ADD($1, $shared, $3)
278   fi
279 ])dnl
280
281 dnl
282 dnl APACHE_LAYOUT_DEFAULTS
283 dnl
284 AC_DEFUN(APACHE_LAYOUT_DEFAULTS,[
285   dnl Apache defaults for autoconf variables.
286   test "x${prefix}" = "xNONE" && prefix='/usr/local/apache2'
287   test "x${exec_prefix}" = "xNONE" && exec_prefix='${prefix}'
288   dnl Now we need to check the non-autoconf variables.
289   test "x${cgidir}" = "x" && cgidir='${datadir}/cgi-bin'
290   test "x${logfiledir}" = "x" && logfiledir='${localstatedir}/logs'
291   test "x${htdocsdir}" = "x" && htdocsdir='${datadir}/htdocs'
292   test "x${manualdir}" = "x" && manualdir='${datadir}/manual'
293   test "x${errordir}" = "x" && errordir='${datadir}/error'
294   test "x${iconsdir}" = "x" && iconsdir='${datadir}/icons'
295   test "x${installbuilddir}" = "x" && installbuilddir='${datadir}/build'
296   test "x${runtimedir}" = "x" && runtimedir='${localstatedir}/logs'
297   test "x${proxycachedir}" = "x" && proxycachedir='${localstatedir}/proxy'
298 ])dnl
299
300 dnl
301 dnl APACHE_LAYOUT(configlayout, layoutname)
302 dnl
303 AC_DEFUN(APACHE_LAYOUT,[
304   if test ! -f $srcdir/config.layout; then
305     echo "** Error: Layout file $srcdir/config.layout not found"
306     echo "** Error: Cannot use undefined layout '$LAYOUT'"
307     exit 1
308   fi
309   pldconf=./config.pld
310   changequote({,})
311   sed -e "1,/[  ]*<[lL]ayout[   ]*$2[   ]*>[    ]*/d" \
312       -e '/[    ]*<\/Layout>[   ]*/,$d' \
313       -e "s/^[  ]*//g" \
314       -e "s/:[  ]*/=\'/g" \
315       -e "s/[   ]*$/'/g" \
316       $1 > $pldconf
317   layout_name=$2
318   . $pldconf
319   rm $pldconf
320   for var in prefix exec_prefix bindir sbindir libexecdir mandir \
321              sysconfdir datadir errordir iconsdir htdocsdir cgidir \
322              includedir localstatedir runtimedir logfiledir \
323              manualdir proxycachedir installbuilddir; do
324     eval "val=\"\$$var\""
325     case $val in
326       *+)
327         val=`echo $val | sed -e 's;\+$;;'`
328         eval "$var=\"\$val\""
329         autosuffix=yes
330         ;;
331       *)
332         autosuffix=no
333         ;;
334     esac
335     val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
336     val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
337     if test "$autosuffix" = "yes"; then
338       if echo $val | grep apache >/dev/null; then
339         addtarget=no
340       else
341         addtarget=yes
342       fi
343       if test "$addtarget" = "yes"; then
344         val="$val/apache"
345       fi
346     fi
347     eval "$var='$val'"
348   done
349   changequote([,])
350 ])dnl
351
352 dnl
353 dnl APACHE_ENABLE_LAYOUT
354 dnl
355 AC_DEFUN(APACHE_ENABLE_LAYOUT,[
356 AC_ARG_ENABLE(layout,
357 [  --enable-layout=LAYOUT],[
358   LAYOUT=$enableval
359 ])
360
361 if test -z "$LAYOUT"; then
362   LAYOUT="Apache"
363 fi
364 APACHE_LAYOUT($srcdir/config.layout, $LAYOUT)
365
366 AC_MSG_CHECKING(for chosen layout)
367 AC_MSG_RESULT($layout_name)
368 ])
369
370 dnl
371 dnl APACHE_ENABLE_MODULES
372 dnl
373 AC_DEFUN(APACHE_ENABLE_MODULES,[
374   module_selection=default
375   module_default=yes
376
377   AC_ARG_ENABLE(modules,
378   APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Modules to enable),[
379     for i in $enableval; do
380       if test "$i" = "all" -o "$i" = "most"; then
381         module_selection=$i
382       else
383         eval "enable_$i=yes"
384       fi
385     done
386   ])
387   
388   AC_ARG_ENABLE(mods-shared,
389   APACHE_HELP_STRING(--enable-mods-shared=MODULE-LIST,Shared modules to enable),[
390     for i in $enableval; do
391       if test "$i" = "all" -o "$i" = "most"; then
392         module_selection=$i
393         module_default=shared
394       else
395         i=`echo $i | sed 's/-/_/g'`
396         eval "enable_$i=shared"
397       fi
398     done
399   ])
400 ])
401
402 AC_DEFUN(APACHE_REQUIRE_CXX,[
403   if test -z "$apache_cxx_done"; then
404     AC_PROG_CXX
405     AC_PROG_CXXCPP
406     apache_cxx_done=yes
407   fi
408 ])
409
410 dnl
411 dnl APACHE_CHECK_SSL_TOOLKIT
412 dnl
413 dnl Find the openssl toolkit installation and check it for the right
414 dnl version, then add its flags to INCLUDES and LIBS.  This should
415 dnl really be using a custom AC_TRY_COMPILE function to test the includes
416 dnl and then AC_TRY_LINK to test the libraries directly for the version,
417 dnl but that will require someone who knows how to program openssl.
418 dnl
419 AC_DEFUN(APACHE_CHECK_SSL_TOOLKIT,[
420 if test "x$ap_ssltk_base" = "x"; then
421   AC_MSG_CHECKING(for SSL/TLS toolkit base)
422   ap_ssltk_base=""
423   AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,SSL/TLS toolkit (OpenSSL)), [
424     if test "x$withval" != "xyes" -a "x$withval" != "x"; then
425       ap_ssltk_base="$withval"
426     fi
427   ])
428   if test "x$ap_ssltk_base" = "x"; then
429     AC_CACHE_VAL(ap_cv_ssltk,[
430       #
431       # shotgun approach: find all occurrences of the openssl program
432       #
433       ap_ssltk_try=""
434       # The IFS=... trick eliminates the colons from $PATH, without using an external program
435       for p in `IFS=":$IFS"; echo $PATH` /usr/local/openssl/bin /usr/local/ssl/bin; do
436         if test -f "$p/openssl"; then
437           ap_ssltk_try="$ap_ssltk_try $p"
438         fi
439       done
440       if test "x$ap_ssltk_try" = "x"; then
441         AC_MSG_ERROR(['openssl' not found in path])
442       fi
443       for p in $ap_ssltk_try; do
444         ap_ssltk_version="`$p/openssl version`"
445         case "$ap_ssltk_version" in
446             "OpenSSL "[[1-9]]* | \
447             "OpenSSL "0.9.[[6-9]]* | \
448             "OpenSSL "0.[[1-9]][[0-9]]* )
449                 ap_cv_ssltk="`(cd $p/.. && pwd)`"
450                 break
451                 ;;
452             *)
453                 # skip because it is too old or a bad result
454                 ;;
455         esac
456       done
457       if test "x$ap_cv_ssltk" = "x"; then
458         AC_MSG_ERROR([requires OpenSSL 0.9.6 or higher])
459       fi
460     ])
461     ap_ssltk_base="$ap_cv_ssltk"
462   fi
463   if test ! -d $ap_ssltk_base; then
464     AC_MSG_ERROR([invalid SSL/TLS toolkit base directory $ap_ssltk_base])
465   fi
466   AC_MSG_RESULT($ap_ssltk_base)
467     
468   AC_MSG_CHECKING(for SSL/TLS toolkit version)
469   AC_MSG_RESULT($ap_ssltk_version)
470     
471   AC_MSG_CHECKING(for SSL/TLS toolkit includes)
472   ap_ssltk_incdir=""
473   for p in $ap_ssltk_base/include /usr/local/openssl/include \
474            /usr/local/ssl/include /usr/local/include /usr/include; do
475     if test -f "$p/openssl/ssl.h"; then
476       ap_ssltk_incdir="$p"
477       break
478     elif test -f "$p/ssl.h"; then
479       ap_ssltk_incdir="$p"
480       break
481     fi
482   done
483   if test "x$ap_ssltk_incdir" = "x"; then
484     AC_MSG_ERROR([OpenSSL headers not found])
485   fi
486   AC_MSG_RESULT($ap_ssltk_incdir)
487
488   AC_MSG_CHECKING(for SSL/TLS toolkit libraries)
489   ap_ssltk_libdir=""
490   for p in $ap_ssltk_base/lib /usr/local/openssl/lib \
491            /usr/local/ssl/lib /usr/local/lib /usr/lib /lib; do
492     if test -f "$p/libssl.a" -o -f "$p/libssl.so"; then
493       ap_ssltk_libdir="$p"
494       break
495     fi
496   done
497   if test ".$ap_ssltk_libdir" = .; then
498     AC_MSG_ERROR([OpenSSL libraries not found])
499   fi
500   AC_MSG_RESULT($ap_ssltk_libdir)
501
502   dnl #  annotate the Apache build environment with determined information
503   APR_ADDTO(INCLUDES, [-I$ap_ssltk_incdir/openssl])
504   if test "x$ap_ssltk_incdir" != "x/usr/include"; then
505     APR_ADDTO(INCLUDES, [-I$ap_ssltk_incdir])
506   fi
507   if test "x$ap_ssltk_libdir" != "x/usr/lib"; then
508     APR_ADDTO(LDFLAGS, [-L$ap_ssltk_libdir])
509     if test "x$ap_platform_runtime_link_flag" != "x"; then
510       APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_ssltk_libdir])
511     fi
512   fi
513   APR_ADDTO(LIBS, [-lssl -lcrypto])
514   ap_cv_ssltk="$ap_ssltk_base"
515 fi
516 ])
517
518 dnl
519 dnl APACHE_PARSE_ARGUMENTS
520 dnl a reimplementation of autoconf's argument parser,
521 dnl used here to allow us to co-exist layouts and argument based
522 dnl set ups.
523 AC_DEFUN(APACHE_PARSE_ARGUMENTS,[
524 ac_prev=
525 for ac_option
526 do
527   # If the previous option needs an argument, assign it.
528   if test -n "$ac_prev"; then
529     eval "$ac_prev=\$ac_option"
530     ac_prev=
531     continue
532   fi
533
534   ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
535
536   case $ac_option in
537
538   -bindir | --bindir | --bindi | --bind | --bin | --bi)
539     ac_prev=bindir ;;
540   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
541     bindir=$ac_optarg ;;
542
543   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
544     ac_prev=datadir ;;
545   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
546   | --da=*)
547     datadir=$ac_optarg ;;
548
549   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
550   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
551   | --exec | --exe | --ex)
552     ac_prev=exec_prefix ;;
553   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
554   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
555   | --exec=* | --exe=* | --ex=*)
556     exec_prefix=$ac_optarg ;;
557
558   -includedir | --includedir | --includedi | --included | --include \
559   | --includ | --inclu | --incl | --inc)
560     ac_prev=includedir ;;
561   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
562   | --includ=* | --inclu=* | --incl=* | --inc=*)
563     includedir=$ac_optarg ;;
564
565   -infodir | --infodir | --infodi | --infod | --info | --inf)
566     ac_prev=infodir ;;
567   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
568     infodir=$ac_optarg ;;
569
570   -libdir | --libdir | --libdi | --libd)
571     ac_prev=libdir ;;
572   -libdir=* | --libdir=* | --libdi=* | --libd=*)
573     libdir=$ac_optarg ;;
574
575   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
576   | --libexe | --libex | --libe)
577     ac_prev=libexecdir ;;
578   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
579   | --libexe=* | --libex=* | --libe=*)
580     libexecdir=$ac_optarg ;;
581
582   -localstatedir | --localstatedir | --localstatedi | --localstated \
583   | --localstate | --localstat | --localsta | --localst \
584   | --locals | --local | --loca | --loc | --lo)
585     ac_prev=localstatedir ;;
586   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
587   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
588   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
589     localstatedir=$ac_optarg ;;
590
591   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
592     ac_prev=mandir ;;
593   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
594     mandir=$ac_optarg ;;
595
596   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
597     ac_prev=prefix ;;
598   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
599     prefix=$ac_optarg ;;
600
601   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
602     ac_prev=sbindir ;;
603   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
604   | --sbi=* | --sb=*)
605     sbindir=$ac_optarg ;;
606
607   -sharedstatedir | --sharedstatedir | --sharedstatedi \
608   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
609   | --sharedst | --shareds | --shared | --share | --shar \
610   | --sha | --sh)
611     ac_prev=sharedstatedir ;;
612   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
613   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
614   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
615   | --sha=* | --sh=*)
616     sharedstatedir=$ac_optarg ;;
617
618   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
619   | --syscon | --sysco | --sysc | --sys | --sy)
620     ac_prev=sysconfdir ;;
621   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
622   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
623     sysconfdir=$ac_optarg ;;
624
625   esac
626 done
627
628 # Be sure to have absolute paths.
629 for ac_var in exec_prefix prefix
630 do
631   eval ac_val=$`echo $ac_var`
632   case $ac_val in
633     [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
634     *)  AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
635   esac
636 done
637
638 ])dnl