1 dnl Parameterized macros.
3 dnl This file is part of Autoconf.
4 dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2, or (at your option)
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 dnl As a special exception, the Free Software Foundation gives unlimited
22 dnl permission to copy, distribute and modify the configure scripts that
23 dnl are the output of Autoconf. You need not follow the terms of the GNU
24 dnl General Public License when using or distributing such scripts, even
25 dnl though portions of the text of Autoconf appear in them. The GNU
26 dnl General Public License (GPL) does govern all other use of the material
27 dnl that constitutes the Autoconf program.
29 dnl Certain portions of the Autoconf source text are designed to be copied
30 dnl (in certain cases, depending on the input) into the output of
31 dnl Autoconf. We call these the "data" portions. The rest of the Autoconf
32 dnl source text consists of comments plus executable code that decides which
33 dnl of the data portions to output in any given case. We call these
34 dnl comments and executable code the "non-data" portions. Autoconf never
35 dnl copies any of the non-data portions into its output.
37 dnl This special exception to the GPL applies to versions of Autoconf
38 dnl released by the Free Software Foundation. When you make and
39 dnl distribute a modified version of Autoconf, you may extend this special
40 dnl exception to the GPL to apply to your modified version as well, *unless*
41 dnl your modified version has the potential to copy into its output some
42 dnl of the text that was the non-data portion of the version that you started
43 dnl with. (In other words, unless your change moves or copies text from
44 dnl the non-data portions to the data portions.) If your modification has
45 dnl such potential, you must delete any notice of this special exception
46 dnl to the GPL from your modified version.
48 dnl Written by David MacKenzie, with help from
49 dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
52 divert(-1)dnl Throw away output until AC_INIT is called.
55 define(AC_ACVERSION, 2.13)
57 dnl Some old m4's don't support m4exit. But they provide
58 dnl equivalent functionality by core dumping because of the
59 dnl long macros we define.
60 ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
61 Install it before installing Autoconf or set the
62 M4 environment variable to its path name.
71 dnl ### Defining macros
74 dnl m4 output diversions. We let m4 output them all in order at the end,
75 dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
76 dnl and AC_DIVERSION_ICMDS.
78 dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line
79 define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
80 define(AC_DIVERSION_INIT, 2)dnl initialization code
81 define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep
82 define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep
83 define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep
84 define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep
85 define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code
86 define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status
87 define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status
88 define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status
90 dnl Change the diversion stream to STREAM, while stacking old values.
91 dnl AC_DIVERT_PUSH(STREAM)
92 define(AC_DIVERT_PUSH,
93 [pushdef([AC_DIVERSION_CURRENT], $1)dnl
94 divert(AC_DIVERSION_CURRENT)dnl
97 dnl Change the diversion stream to its previous value, unstacking it.
100 [popdef([AC_DIVERSION_CURRENT])dnl
101 divert(AC_DIVERSION_CURRENT)dnl
104 dnl Initialize the diversion setup.
105 define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
106 dnl This will be popped by AC_REQUIRE in AC_INIT.
107 pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
109 dnl The prologue for Autoconf macros.
110 dnl AC_PRO(MACRO-NAME)
112 [define([AC_PROVIDE_$1], )dnl
113 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
114 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
115 [pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
118 dnl The Epilogue for Autoconf macros.
122 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
123 [undivert(AC_DIVERSION_NORMAL_4)dnl
124 undivert(AC_DIVERSION_NORMAL_3)dnl
125 undivert(AC_DIVERSION_NORMAL_2)dnl
126 undivert(AC_DIVERSION_NORMAL_1)dnl
130 dnl Define a macro which automatically provides itself. Add machinery
131 dnl so the macro automatically switches expansion to the diversion
132 dnl stack if it is not already using it. In this case, once finished,
133 dnl it will bring back all the code accumulated in the diversion stack.
134 dnl This, combined with AC_REQUIRE, achieves the topological ordering of
135 dnl macros. We don't use this macro to define some frequently called
136 dnl macros that are not involved in ordering constraints, to save m4
138 dnl AC_DEFUN(NAME, EXPANSION)
140 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
143 dnl ### Initialization
147 AC_DEFUN(AC_INIT_NOTICE,
148 [# Guess values for system-dependent variables and create Makefiles.
149 # Generated automatically using autoconf version] AC_ACVERSION [
150 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
152 # This configure script is free software; the Free Software Foundation
153 # gives unlimited permission to copy, distribute and modify it.
157 ac_default_prefix=/usr/local
158 [#] Any additions from configure.in:])
160 dnl AC_PREFIX_DEFAULT(PREFIX)
161 AC_DEFUN(AC_PREFIX_DEFAULT,
162 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
166 dnl AC_INIT_PARSE_ARGS()
167 AC_DEFUN(AC_INIT_PARSE_ARGS,
169 # Initialize some variables set by options.
170 # The variables have the same names as the options, with
171 # dashes changed to underlines.
173 cache_file=./config.cache
182 program_transform_name=s,x,x,
190 dnl Installation directory options.
191 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
192 dnl and all the variables that are supposed to be based on exec_prefix
193 dnl by default will actually change.
194 dnl Use braces instead of parens because sh, perl, etc. also accept them.
195 bindir='${exec_prefix}/bin'
196 sbindir='${exec_prefix}/sbin'
197 libexecdir='${exec_prefix}/libexec'
198 datadir='${prefix}/share'
199 sysconfdir='${prefix}/etc'
200 sharedstatedir='${prefix}/com'
201 localstatedir='${prefix}/var'
202 libdir='${exec_prefix}/lib'
203 includedir='${prefix}/include'
204 oldincludedir='/usr/include'
205 infodir='${prefix}/info'
206 mandir='${prefix}/man'
208 # Initialize some other variables.
211 SHELL=${CONFIG_SHELL-/bin/sh}
212 # Maximum number of lines to put in a shell here document.
219 # If the previous option needs an argument, assign it.
220 if test -n "$ac_prev"; then
221 eval "$ac_prev=\$ac_option"
228 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
233 # Accept the important Cygnus configure options, so we can diagnose typos.
237 -bindir | --bindir | --bindi | --bind | --bin | --bi)
239 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
240 bindir="$ac_optarg" ;;
242 -build | --build | --buil | --bui | --bu)
244 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
245 build="$ac_optarg" ;;
247 -cache-file | --cache-file | --cache-fil | --cache-fi \
248 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
249 ac_prev=cache_file ;;
250 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
251 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
252 cache_file="$ac_optarg" ;;
254 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
256 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
258 datadir="$ac_optarg" ;;
260 -disable-* | --disable-*)
261 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
262 # Reject names that are not valid shell variable names.
264 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
266 AC_MSG_ERROR($ac_feature: invalid feature name)
268 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
269 eval "enable_${ac_feature}=no" ;;
271 -enable-* | --enable-*)
272 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
273 # Reject names that are not valid shell variable names.
275 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
277 AC_MSG_ERROR($ac_feature: invalid feature name)
279 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
284 eval "enable_${ac_feature}='$ac_optarg'" ;;
286 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
287 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
288 | --exec | --exe | --ex)
289 ac_prev=exec_prefix ;;
290 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
291 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
292 | --exec=* | --exe=* | --ex=*)
293 exec_prefix="$ac_optarg" ;;
295 -gas | --gas | --ga | --g)
296 # Obsolete; use --with-gas.
299 -help | --help | --hel | --he)
300 # Omit some internal or obsolete options to make the list less imposing.
301 # This message is too long to be a string in the A/UX 3.1 sh.
304 Usage: configure [options] [host]
305 Options: [defaults in brackets after descriptions]
307 --cache-file=FILE cache test results in FILE
308 --help print this message
309 --no-create do not create output files
310 --quiet, --silent do not print \`checking...' messages
311 --version print the version of autoconf that created configure
312 Directory and file names:
313 --prefix=PREFIX install architecture-independent files in PREFIX
315 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
317 --bindir=DIR user executables in DIR [EPREFIX/bin]
318 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
319 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
320 --datadir=DIR read-only architecture-independent data in DIR
322 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
323 --sharedstatedir=DIR modifiable architecture-independent data in DIR
325 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
326 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
327 --includedir=DIR C header files in DIR [PREFIX/include]
328 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
329 --infodir=DIR info documentation in DIR [PREFIX/info]
330 --mandir=DIR man documentation in DIR [PREFIX/man]
331 --srcdir=DIR find the sources in DIR [configure dir or ..]
332 --program-prefix=PREFIX prepend PREFIX to installed program names
333 --program-suffix=SUFFIX append SUFFIX to installed program names
334 --program-transform-name=PROGRAM
335 run sed PROGRAM on installed program names
339 --build=BUILD configure for building on BUILD [BUILD=HOST]
340 --host=HOST configure for HOST [guessed]
341 --target=TARGET configure for TARGET [TARGET=HOST]
342 Features and packages:
343 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
344 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
345 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
346 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
347 --x-includes=DIR X include files are in DIR
348 --x-libraries=DIR X library files are in DIR
351 if test -n "$ac_help"; then
352 echo "--enable and --with options recognized:$ac_help"
356 -host | --host | --hos | --ho)
358 -host=* | --host=* | --hos=* | --ho=*)
361 -includedir | --includedir | --includedi | --included | --include \
362 | --includ | --inclu | --incl | --inc)
363 ac_prev=includedir ;;
364 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
365 | --includ=* | --inclu=* | --incl=* | --inc=*)
366 includedir="$ac_optarg" ;;
368 -infodir | --infodir | --infodi | --infod | --info | --inf)
370 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
371 infodir="$ac_optarg" ;;
373 -libdir | --libdir | --libdi | --libd)
375 -libdir=* | --libdir=* | --libdi=* | --libd=*)
376 libdir="$ac_optarg" ;;
378 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
379 | --libexe | --libex | --libe)
380 ac_prev=libexecdir ;;
381 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
382 | --libexe=* | --libex=* | --libe=*)
383 libexecdir="$ac_optarg" ;;
385 -localstatedir | --localstatedir | --localstatedi | --localstated \
386 | --localstate | --localstat | --localsta | --localst \
387 | --locals | --local | --loca | --loc | --lo)
388 ac_prev=localstatedir ;;
389 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
390 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
391 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
392 localstatedir="$ac_optarg" ;;
394 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
396 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
397 mandir="$ac_optarg" ;;
400 # Obsolete; use --without-fp.
403 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
407 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
408 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
411 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
412 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
413 | --oldin | --oldi | --old | --ol | --o)
414 ac_prev=oldincludedir ;;
415 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
416 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
417 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
418 oldincludedir="$ac_optarg" ;;
420 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
422 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
423 prefix="$ac_optarg" ;;
425 -program-prefix | --program-prefix | --program-prefi | --program-pref \
426 | --program-pre | --program-pr | --program-p)
427 ac_prev=program_prefix ;;
428 -program-prefix=* | --program-prefix=* | --program-prefi=* \
429 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
430 program_prefix="$ac_optarg" ;;
432 -program-suffix | --program-suffix | --program-suffi | --program-suff \
433 | --program-suf | --program-su | --program-s)
434 ac_prev=program_suffix ;;
435 -program-suffix=* | --program-suffix=* | --program-suffi=* \
436 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
437 program_suffix="$ac_optarg" ;;
439 -program-transform-name | --program-transform-name \
440 | --program-transform-nam | --program-transform-na \
441 | --program-transform-n | --program-transform- \
442 | --program-transform | --program-transfor \
443 | --program-transfo | --program-transf \
444 | --program-trans | --program-tran \
445 | --progr-tra | --program-tr | --program-t)
446 ac_prev=program_transform_name ;;
447 -program-transform-name=* | --program-transform-name=* \
448 | --program-transform-nam=* | --program-transform-na=* \
449 | --program-transform-n=* | --program-transform-=* \
450 | --program-transform=* | --program-transfor=* \
451 | --program-transfo=* | --program-transf=* \
452 | --program-trans=* | --program-tran=* \
453 | --progr-tra=* | --program-tr=* | --program-t=*)
454 program_transform_name="$ac_optarg" ;;
456 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
457 | -silent | --silent | --silen | --sile | --sil)
460 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
462 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
464 sbindir="$ac_optarg" ;;
466 -sharedstatedir | --sharedstatedir | --sharedstatedi \
467 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
468 | --sharedst | --shareds | --shared | --share | --shar \
470 ac_prev=sharedstatedir ;;
471 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
472 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
473 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
475 sharedstatedir="$ac_optarg" ;;
477 -site | --site | --sit)
479 -site=* | --site=* | --sit=*)
482 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
484 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
485 srcdir="$ac_optarg" ;;
487 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
488 | --syscon | --sysco | --sysc | --sys | --sy)
489 ac_prev=sysconfdir ;;
490 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
491 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
492 sysconfdir="$ac_optarg" ;;
494 -target | --target | --targe | --targ | --tar | --ta | --t)
496 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
497 target="$ac_optarg" ;;
499 -v | -verbose | --verbose | --verbos | --verbo | --verb)
502 -version | --version | --versio | --versi | --vers)
503 echo "configure generated by autoconf version AC_ACVERSION"
507 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
508 # Reject names that are not valid shell variable names.
510 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
512 AC_MSG_ERROR($ac_package: invalid package name)
514 ac_package=`echo $ac_package| sed 's/-/_/g'`
519 eval "with_${ac_package}='$ac_optarg'" ;;
521 -without-* | --without-*)
522 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
523 # Reject names that are not valid shell variable names.
525 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
527 AC_MSG_ERROR($ac_package: invalid package name)
529 ac_package=`echo $ac_package| sed 's/-/_/g'`
530 eval "with_${ac_package}=no" ;;
533 # Obsolete; use --with-x.
536 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
537 | --x-incl | --x-inc | --x-in | --x-i)
538 ac_prev=x_includes ;;
539 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
540 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
541 x_includes="$ac_optarg" ;;
543 -x-libraries | --x-libraries | --x-librarie | --x-librari \
544 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
545 ac_prev=x_libraries ;;
546 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
547 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
548 x_libraries="$ac_optarg" ;;
550 -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
555 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
557 AC_MSG_WARN($ac_option: invalid host type)
559 if test "x$nonopt" != xNONE; then
560 AC_MSG_ERROR(can only configure for one host and one target at a time)
568 if test -n "$ac_prev"; then
569 AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
573 dnl Try to have only one #! line, so the script doesn't look funny
574 dnl for users of AC_REVISION.
576 AC_DEFUN(AC_INIT_BINSH,
580 dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
582 [sinclude(acsite.m4)dnl
583 sinclude(./aclocal.m4)dnl
584 AC_REQUIRE([AC_INIT_BINSH])dnl
586 AC_DIVERT_POP()dnl to NORMAL
587 AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
589 AC_INIT_PREPARE($1)dnl
590 AC_DIVERT_POP()dnl to NORMAL
593 dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
594 AC_DEFUN(AC_INIT_PREPARE,
595 [trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
597 # File descriptor usage:
600 # 2 errors and warnings
601 # 3 some systems may open it to /dev/tty
602 # 4 used on the Kubota Titan
603 define(AC_FD_MSG, 6)dnl
604 [#] AC_FD_MSG checking for... messages and results
605 define(AC_FD_CC, 5)dnl
606 [#] AC_FD_CC compiler messages saved in config.log
607 if test "$silent" = yes; then
608 exec AC_FD_MSG>/dev/null
612 exec AC_FD_CC>./config.log
615 This file contains any messages produced by compilers while
616 running configure, to aid debugging if configure makes a mistake.
619 # Strip out --no-create and --no-recursion so they do not pile up.
620 # Also quote any args containing shell metacharacters.
625 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
626 | --no-cr | --no-c) ;;
627 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
628 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
629 changequote(<<, >>)dnl
630 dnl If you change this globbing pattern, test it on an old shell --
631 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
632 *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
633 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
635 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
640 # Only set these to C if already set. These must not be set unconditionally
641 # because not all systems understand e.g. LANG=C (notably SCO).
642 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
643 # Non-C LC_CTYPE values break the ctype check.
644 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
645 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
646 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
647 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
649 # confdefs.h avoids OS command line length limits that DEFS can exceed.
650 rm -rf conftest* confdefs.h
651 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
654 # A filename unique to this package, relative to the directory that
655 # configure is in, which we can look for to find out if srcdir is correct.
658 # Find the source files, if location was not specified.
659 if test -z "$srcdir"; then
660 ac_srcdir_defaulted=yes
661 # Try the directory containing this script, then its parent.
664 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
666 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
668 if test ! -r $srcdir/$ac_unique_file; then
672 ac_srcdir_defaulted=no
674 if test ! -r $srcdir/$ac_unique_file; then
675 if test "$ac_srcdir_defaulted" = yes; then
676 AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
678 AC_MSG_ERROR(can not find sources in $srcdir)
681 dnl Double slashes in pathnames in object file debugging info
682 dnl mess up M-x gdb in Emacs.
684 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
687 dnl Let the site file select an alternate cache file if it wants to.
691 dnl By default always use an empty string as the executable
692 dnl extension. Only change it if the script calls AC_EXEEXT.
694 dnl By default assume that objects files use an extension of .o. Only
695 dnl change it if the script calls AC_OBJEXT.
698 dnl Substitute for predefined variables.
701 AC_SUBST(CPPFLAGS)dnl
702 AC_SUBST(CXXFLAGS)dnl
707 AC_SUBST(exec_prefix)dnl
709 AC_SUBST(program_transform_name)dnl
710 dnl Installation directory options.
713 AC_SUBST(libexecdir)dnl
715 AC_SUBST(sysconfdir)dnl
716 AC_SUBST(sharedstatedir)dnl
717 AC_SUBST(localstatedir)dnl
719 AC_SUBST(includedir)dnl
720 AC_SUBST(oldincludedir)dnl
726 dnl ### Selecting optional features
729 dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
730 AC_DEFUN(AC_ARG_ENABLE,
731 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
735 [#] Check whether --enable-[$1] or --disable-[$1] was given.
736 if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
737 enableval="[$enable_]patsubst([$1], -, _)"
738 ifelse([$3], , :, [$3])
739 ifelse([$4], , , [else
746 [AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
747 AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl
751 dnl ### Working with optional software
754 dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
755 AC_DEFUN(AC_ARG_WITH,
756 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
760 [#] Check whether --with-[$1] or --without-[$1] was given.
761 if test "[${with_]patsubst([$1], -, _)+set}" = set; then
762 withval="[$with_]patsubst([$1], -, _)"
763 ifelse([$3], , :, [$3])
764 ifelse([$4], , , [else
771 [AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
772 AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl
776 dnl ### Transforming program names.
780 AC_DEFUN(AC_ARG_PROGRAM,
781 [if test "$program_transform_name" = s,x,x,; then
782 program_transform_name=
784 # Double any \ or $. echo might interpret backslashes.
785 cat <<\EOF_SED > conftestsed
786 s,\\,\\\\,g; s,\$,$$,g
788 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
791 test "$program_prefix" != NONE &&
792 program_transform_name="s,^,${program_prefix},; $program_transform_name"
793 # Use a double $ so make ignores it.
794 test "$program_suffix" != NONE &&
795 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
797 # sed with no file args requires a program.
798 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
802 dnl ### Version numbers
805 dnl AC_REVISION(REVISION-INFO)
806 AC_DEFUN(AC_REVISION,
807 [AC_REQUIRE([AC_INIT_BINSH])dnl
808 [# From configure.in] translit([$1], $")])
810 dnl Subroutines of AC_PREREQ.
812 dnl Change the dots in NUMBER into commas.
813 dnl AC_PREREQ_SPLIT(NUMBER)
814 define(AC_PREREQ_SPLIT,
815 [translit($1, ., [, ])])
817 dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
818 dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
819 define(AC_PREREQ_CANON,
820 [$1, $2, ifelse([$3], , 0, [$3])])
822 dnl Complain and exit if version number 1 is less than version number 2.
823 dnl PRINTABLE2 is the printable version of version number 2.
824 dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
826 define(AC_PREREQ_COMPARE,
827 [ifelse(builtin([eval],
828 [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
830 FATAL ERROR: Autoconf version $7 or higher is required for this script
833 dnl Complain and exit if the Autoconf version is less than VERSION.
834 dnl AC_PREREQ(VERSION)
836 [AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
837 AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
840 dnl ### Getting the canonical system type
843 dnl Find install-sh, config.sub, config.guess, and Cygnus configure
844 dnl in directory DIR. These are auxiliary files used in configuration.
845 dnl DIR can be either absolute or relative to $srcdir.
846 dnl AC_CONFIG_AUX_DIR(DIR)
847 AC_DEFUN(AC_CONFIG_AUX_DIR,
848 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
850 dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
851 dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
852 AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
853 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
855 dnl Internal subroutine.
856 dnl Search for the configuration auxiliary files in directory list $1.
857 dnl We look only for install-sh, so users of AC_PROG_INSTALL
858 dnl do not automatically need to distribute the other auxiliary files.
859 dnl AC_CONFIG_AUX_DIRS(DIR ...)
860 AC_DEFUN(AC_CONFIG_AUX_DIRS,
863 if test -f $ac_dir/install-sh; then
865 ac_install_sh="$ac_aux_dir/install-sh -c"
867 elif test -f $ac_dir/install.sh; then
869 ac_install_sh="$ac_aux_dir/install.sh -c"
873 if test -z "$ac_aux_dir"; then
874 AC_MSG_ERROR([can not find install-sh or install.sh in $1])
876 ac_config_guess=$ac_aux_dir/config.guess
877 ac_config_sub=$ac_aux_dir/config.sub
878 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
879 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
882 dnl Canonicalize the host, target, and build system types.
883 AC_DEFUN(AC_CANONICAL_SYSTEM,
884 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
885 AC_BEFORE([$0], [AC_ARG_PROGRAM])
886 # Do some error checking and defaulting for the host and target type.
888 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
891 # 1. You are not allowed to specify --host, --target, and nonopt at the
893 # 2. Host defaults to nonopt.
894 # 3. If nonopt is not specified, then host defaults to the current host,
895 # as determined by config.guess.
896 # 4. Target and build default to nonopt.
897 # 5. If nonopt is not specified, then target and build default to host.
899 # The aliases save the names the user supplied, while $host etc.
900 # will get canonicalized.
901 case $host---$target---$nonopt in
902 NONE---*---* | *---NONE---* | *---*---NONE) ;;
903 *) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
909 test "$host_alias" != "$target_alias" &&
910 test "$program_prefix$program_suffix$program_transform_name" = \
912 program_prefix=${target_alias}-
915 dnl Subroutines of AC_CANONICAL_SYSTEM.
917 AC_DEFUN(AC_CANONICAL_HOST,
918 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
920 # Make sure we can run config.sub.
921 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
922 else AC_MSG_ERROR(can not run $ac_config_sub)
925 AC_MSG_CHECKING(host system type)
929 case "$host_alias" in
933 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
934 else AC_MSG_ERROR(can not guess host type; you must specify one)
936 *) host_alias=$nonopt ;;
940 dnl Set the other host vars.
941 changequote(<<, >>)dnl
942 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
943 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949 AC_SUBST(host_alias)dnl
950 AC_SUBST(host_cpu)dnl
951 AC_SUBST(host_vendor)dnl
955 dnl Internal use only.
956 AC_DEFUN(AC_CANONICAL_TARGET,
957 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
958 AC_MSG_CHECKING(target system type)
960 dnl Set target_alias.
962 case "$target_alias" in
965 NONE) target_alias=$host_alias ;;
966 *) target_alias=$nonopt ;;
970 dnl Set the other target vars.
971 changequote(<<, >>)dnl
972 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
973 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
974 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
975 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
977 AC_MSG_RESULT($target)
979 AC_SUBST(target_alias)dnl
980 AC_SUBST(target_cpu)dnl
981 AC_SUBST(target_vendor)dnl
982 AC_SUBST(target_os)dnl
985 dnl Internal use only.
986 AC_DEFUN(AC_CANONICAL_BUILD,
987 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
988 AC_MSG_CHECKING(build system type)
992 case "$build_alias" in
995 NONE) build_alias=$host_alias ;;
996 *) build_alias=$nonopt ;;
1000 dnl Set the other build vars.
1001 changequote(<<, >>)dnl
1002 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1003 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1004 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1005 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1006 changequote([, ])dnl
1007 AC_MSG_RESULT($build)
1009 AC_SUBST(build_alias)dnl
1010 AC_SUBST(build_cpu)dnl
1011 AC_SUBST(build_vendor)dnl
1012 AC_SUBST(build_os)dnl
1016 dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
1017 dnl if the cache file is inconsistent with the current host,
1018 dnl target and build system types, execute CMD or print a default
1020 AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
1021 AC_REQUIRE([AC_CANONICAL_SYSTEM])
1022 AC_MSG_CHECKING([cached system tuple])
1023 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1024 test x"$ac_cv_host_system_type" != x"$host"; } ||
1025 { test x"${ac_cv_build_system_type+set}" = x"set" &&
1026 test x"$ac_cv_build_system_type" != x"$build"; } ||
1027 { test x"${ac_cv_target_system_type+set}" = x"set" &&
1028 test x"$ac_cv_target_system_type" != x"$target"; }; then
1029 AC_MSG_RESULT([different])
1031 [AC_MSG_ERROR([remove config.cache and re-run configure])])
1035 ac_cv_host_system_type="$host"
1036 ac_cv_build_system_type="$build"
1037 ac_cv_target_system_type="$target"
1041 dnl ### Caching test results
1044 dnl Look for site or system specific initialization scripts.
1046 define(AC_SITE_LOAD,
1047 [# Prefer explicitly selected file to automatically selected ones.
1048 if test -z "$CONFIG_SITE"; then
1049 if test "x$prefix" != xNONE; then
1050 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1052 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1055 for ac_site_file in $CONFIG_SITE; do
1056 if test -r "$ac_site_file"; then
1057 echo "loading site script $ac_site_file"
1064 define(AC_CACHE_LOAD,
1065 [if test -r "$cache_file"; then
1066 echo "loading cache $cache_file"
1069 echo "creating cache $cache_file"
1075 define(AC_CACHE_SAVE,
1076 [cat > confcache <<\EOF
1077 # This file is a shell script that caches the results of configure
1078 # tests run on this system so they can be shared between configure
1079 # scripts and configure runs. It is not useful on other systems.
1080 # If it contains results you don't want to keep, you may remove or edit it.
1082 # By default, configure uses ./config.cache as the cache file,
1083 # creating it if it does not exist already. You can give configure
1084 # the --cache-file=FILE option to use a different cache file; that is
1085 # what configure does when it calls configure scripts in
1086 # subdirectories, so they share the cache.
1087 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1088 # config.status only pays attention to the cache file if you give it the
1089 # --recheck option to rerun configure.
1092 dnl Allow a site initialization script to override cache values.
1093 # The following way of writing the cache mishandles newlines in values,
1094 # but we know of no workaround that is simple, portable, and efficient.
1095 # So, don't put newlines in cache variables' values.
1096 # Ultrix sh set writes to stderr and can't be redirected directly,
1097 # and sets the high bit in the cache file unless we assign to the vars.
1100 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1102 # `set' does not quote correctly, so add quotes (double-quote substitution
1103 # turns \\\\ into \\, and sed turns \\ into \).
1105 -e "s/'/'\\\\''/g" \
1106 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1109 # `set' quotes correctly as required by POSIX, so do not add quotes.
1110 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1113 changequote([, ])dnl
1114 if cmp -s $cache_file confcache; then
1117 if test -w $cache_file; then
1118 echo "updating cache $cache_file"
1119 cat confcache > $cache_file
1121 echo "not updating unwritable cache $cache_file"
1127 dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1128 dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1129 define(AC_CACHE_VAL,
1130 [dnl We used to use the below line, but it fails if the 1st arg is a
1131 dnl shell variable, so we need the eval.
1132 dnl if test "${$1+set}" = set; then
1133 dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
1134 if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
1135 echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
1141 dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1142 define(AC_CACHE_CHECK,
1143 [AC_MSG_CHECKING([$1])
1144 AC_CACHE_VAL([$2], [$3])
1145 AC_MSG_RESULT([$]$2)])
1148 dnl ### Defining symbols
1151 dnl Set VARIABLE to VALUE, verbatim, or 1.
1152 dnl AC_DEFINE(VARIABLE [, VALUE])
1154 [cat >> confdefs.h <<\EOF
1155 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1159 dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
1160 define(AC_DEFINE_UNQUOTED,
1161 [cat >> confdefs.h <<EOF
1162 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1167 dnl ### Setting output variables
1170 dnl This macro protects VARIABLE from being diverted twice
1171 dnl if this macro is called twice for it.
1172 dnl AC_SUBST(VARIABLE)
1174 [ifdef([AC_SUBST_$1], ,
1175 [define([AC_SUBST_$1], )dnl
1176 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1181 dnl AC_SUBST_FILE(VARIABLE)
1182 define(AC_SUBST_FILE,
1183 [ifdef([AC_SUBST_$1], ,
1184 [define([AC_SUBST_$1], )dnl
1185 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1192 dnl ### Printing messages
1195 dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
1196 define(AC_MSG_CHECKING,
1197 [echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
1198 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1200 dnl AC_CHECKING(FEATURE-DESCRIPTION)
1202 [echo "checking $1" 1>&AC_FD_MSG
1203 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1205 dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
1206 define(AC_MSG_RESULT,
1207 [echo "$ac_t""$1" 1>&AC_FD_MSG])
1209 dnl AC_VERBOSE(RESULT-DESCRIPTION)
1211 [AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
1212 echo " $1" 1>&AC_FD_MSG])
1214 dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
1216 [echo "configure: warning: $1" 1>&2])
1218 dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
1219 define(AC_MSG_ERROR,
1220 [{ echo "configure: error: $1" 1>&2; exit 1; }])
1223 dnl ### Selecting which language to use for testing
1228 [define([AC_LANG], [C])dnl
1230 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1231 ac_cpp='$CPP $CPPFLAGS'
1232 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1233 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1234 cross_compiling=$ac_cv_prog_cc_cross
1237 dnl AC_LANG_CPLUSPLUS()
1238 AC_DEFUN(AC_LANG_CPLUSPLUS,
1239 [define([AC_LANG], [CPLUSPLUS])dnl
1241 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1242 ac_cpp='$CXXCPP $CPPFLAGS'
1243 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1244 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1245 cross_compiling=$ac_cv_prog_cxx_cross
1248 dnl AC_LANG_FORTRAN77()
1249 AC_DEFUN(AC_LANG_FORTRAN77,
1250 [define([AC_LANG], [FORTRAN77])dnl
1252 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1253 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1254 cross_compiling=$ac_cv_prog_f77_cross
1257 dnl Push the current language on a stack.
1259 define(AC_LANG_SAVE,
1260 [pushdef([AC_LANG_STACK], AC_LANG)])
1262 dnl Restore the current language from the stack.
1263 dnl AC_LANG_RESTORE()
1264 pushdef([AC_LANG_RESTORE],
1265 [ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
1266 AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
1267 AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
1270 dnl ### Compiler-running mechanics
1273 dnl The purpose of this macro is to "configure:123: command line"
1274 dnl written into config.log for every test run.
1275 dnl AC_TRY_EVAL(VARIABLE)
1276 AC_DEFUN(AC_TRY_EVAL,
1277 [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
1278 (eval [$]$1) 2>&AC_FD_CC; }])
1280 dnl AC_TRY_COMMAND(COMMAND)
1281 AC_DEFUN(AC_TRY_COMMAND,
1282 [{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
1285 dnl ### Dependencies between macros
1288 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
1290 [ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
1293 dnl AC_REQUIRE(MACRO-NAME)
1295 [ifdef([AC_PROVIDE_$1], ,
1296 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
1301 dnl AC_PROVIDE(MACRO-NAME)
1303 [define([AC_PROVIDE_$1], )])
1305 dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
1307 [errprint(__file__:__line__: warning: [$1] is obsolete[$2]
1311 dnl ### Checking for programs
1314 dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
1315 dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
1316 AC_DEFUN(AC_CHECK_PROG,
1317 [# Extract the first word of "$2", so it can be a program name with args.
1318 set dummy $2; ac_word=[$]2
1319 AC_MSG_CHECKING([for $ac_word])
1320 AC_CACHE_VAL(ac_cv_prog_$1,
1321 [if test -n "[$]$1"; then
1322 ac_cv_prog_$1="[$]$1" # Let the user override the test.
1324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1325 ifelse([$6], , , [ ac_prog_rejected=no
1327 dnl $ac_dummy forces splitting on constant user-supplied paths.
1328 dnl POSIX.2 word splitting is done only on the output of word expansions,
1329 dnl not every word. This closes a longstanding sh security hole.
1330 ac_dummy="ifelse([$5], , $PATH, [$5])"
1331 for ac_dir in $ac_dummy; do
1332 test -z "$ac_dir" && ac_dir=.
1333 if test -f $ac_dir/$ac_word; then
1334 ifelse([$6], , , dnl
1335 [ if test "[$ac_dir/$ac_word]" = "$6"; then
1336 ac_prog_rejected=yes
1345 ifelse([$6], , , [if test $ac_prog_rejected = yes; then
1346 # We found a bogon in the path, so make sure we never use it.
1347 set dummy [$]ac_cv_prog_$1
1349 if test [$]# -gt 0; then
1350 # We chose a different compiler from the bogus one.
1351 # However, it has the same basename, so the bogon will be chosen
1352 # first if we set $1 to just the basename; use the full file name.
1354 set dummy "$ac_dir/$ac_word" "[$]@"
1356 ac_cv_prog_$1="[$]@"
1357 ifelse([$2], [$4], dnl
1359 # Default is a loser.
1360 AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
1361 ifelse([$5], , [\$]PATH, [$5])])
1366 dnl If no 4th arg is given, leave the cache variable unset,
1367 dnl so AC_CHECK_PROGS will keep looking.
1368 ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
1372 if test -n "[$]$1"; then
1373 AC_MSG_RESULT([$]$1)
1380 dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
1381 AC_DEFUN(AC_PATH_PROG,
1382 [# Extract the first word of "$2", so it can be a program name with args.
1383 set dummy $2; ac_word=[$]2
1384 AC_MSG_CHECKING([for $ac_word])
1385 AC_CACHE_VAL(ac_cv_path_$1,
1388 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1391 ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
1394 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1395 dnl $ac_dummy forces splitting on constant user-supplied paths.
1396 dnl POSIX.2 word splitting is done only on the output of word expansions,
1397 dnl not every word. This closes a longstanding sh security hole.
1398 ac_dummy="ifelse([$4], , $PATH, [$4])"
1399 for ac_dir in $ac_dummy; do
1400 test -z "$ac_dir" && ac_dir=.
1401 if test -f $ac_dir/$ac_word; then
1402 ac_cv_path_$1="$ac_dir/$ac_word"
1407 dnl If no 3rd arg is given, leave the cache variable unset,
1408 dnl so AC_PATH_PROGS will keep looking.
1409 ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
1414 if test -n "[$]$1"; then
1415 AC_MSG_RESULT([$]$1)
1422 dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1424 AC_DEFUN(AC_CHECK_PROGS,
1427 AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
1428 test -n "[$]$1" && break
1430 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1433 dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1435 AC_DEFUN(AC_PATH_PROGS,
1438 AC_PATH_PROG($1, [$]ac_prog, , $4)
1439 test -n "[$]$1" && break
1441 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1444 dnl Internal subroutine.
1445 AC_DEFUN(AC_CHECK_TOOL_PREFIX,
1446 [AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1447 if test $host != $build; then
1448 ac_tool_prefix=${host_alias}-
1454 dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
1455 AC_DEFUN(AC_CHECK_TOOL,
1456 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
1457 AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
1458 ifelse([$3], , [$2], ), $4)
1460 if test -z "$ac_cv_prog_$1"; then
1461 if test -n "$ac_tool_prefix"; then
1462 AC_CHECK_PROG($1, $2, $2, $3)
1469 dnl Guess the value for the `prefix' variable by looking for
1470 dnl the argument program along PATH and taking its parent.
1471 dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
1472 dnl set `prefix' to /usr/local/gnu.
1473 dnl This comes too late to find a site file based on the prefix,
1474 dnl and it might use a cached value for the path.
1475 dnl No big loss, I think, since most configures don't use this macro anyway.
1476 dnl AC_PREFIX_PROGRAM(PROGRAM)
1477 AC_DEFUN(AC_PREFIX_PROGRAM,
1478 [if test "x$prefix" = xNONE; then
1479 changequote(<<, >>)dnl
1480 define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
1481 changequote([, ])dnl
1482 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
1483 echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
1484 AC_PATH_PROG(AC_VAR_NAME, $1)
1485 changequote(<<, >>)dnl
1486 if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
1487 prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1488 changequote([, ])dnl
1491 undefine([AC_VAR_NAME])dnl
1494 dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to
1495 dnl `yes' if the current compiler works, otherwise set it ti `no'. Set
1496 dnl CROSS-VAR to `yes' if the compiler and linker produce non-native
1497 dnl executables, otherwise set it to `no'. Before calling
1498 dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
1501 dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
1502 AC_DEFUN(AC_TRY_COMPILER,
1503 [cat > conftest.$ac_ext << EOF
1504 ifelse(AC_LANG, [FORTRAN77], ,
1506 [#]line __oline__ "configure"
1507 #include "confdefs.h"
1511 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1513 # If we can't run a trivial program, we are probably using a cross compiler.
1514 if (./conftest; exit) 2>/dev/null; then
1520 echo "configure: failed program was:" >&AC_FD_CC
1521 cat conftest.$ac_ext >&AC_FD_CC
1527 dnl ### Checking for libraries
1530 dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
1531 dnl Try to link a program that calls FUNC, handling GCC builtins. If
1532 dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
1533 dnl ACTION-IF-NOT-FOUND.
1535 AC_DEFUN(AC_TRY_LINK_FUNC,
1537 ifelse([$1], [main], , dnl Avoid conflicting decl of main.
1538 [/* Override any gcc2 internal prototype to avoid an error. */
1539 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1543 [/* We use char because int might match the return type of a gcc2
1544 builtin and then its argument prototype would still apply. */
1552 dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
1553 dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
1554 dnl Search for a library defining FUNC, if it's not already available.
1556 AC_DEFUN(AC_SEARCH_LIBS,
1558 AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
1559 [ac_func_search_save_LIBS="$LIBS"
1560 ac_cv_search_$1="no"
1561 AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
1562 test "$ac_cv_search_$1" = "no" && for i in $2; do
1563 LIBS="-l$i $5 $ac_func_search_save_LIBS"
1564 AC_TRY_LINK_FUNC([$1],
1565 [ac_cv_search_$1="-l$i"
1568 LIBS="$ac_func_search_save_LIBS"])
1569 if test "$ac_cv_search_$1" != "no"; then
1570 test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
1578 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1579 dnl [, OTHER-LIBRARIES]]])
1580 AC_DEFUN(AC_CHECK_LIB,
1581 [AC_MSG_CHECKING([for $2 in -l$1])
1582 dnl Use a cache variable name containing both the library and function name,
1583 dnl because the test really is for library $1 defining function $2, not
1584 dnl just for library $1. Separate tests with the same $1 and different $2s
1585 dnl may have different results.
1586 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
1587 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
1588 [ac_save_LIBS="$LIBS"
1589 LIBS="-l$1 $5 $LIBS"
1591 ifelse(AC_LANG, [FORTRAN77], ,
1592 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
1593 [/* Override any gcc2 internal prototype to avoid an error. */
1594 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1598 [/* We use char because int might match the return type of a gcc2
1599 builtin and then its argument prototype would still apply. */
1603 eval "ac_cv_lib_$ac_lib_var=yes",
1604 eval "ac_cv_lib_$ac_lib_var=no")
1605 LIBS="$ac_save_LIBS"
1607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1611 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1612 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1613 changequote([, ])dnl
1614 AC_DEFINE_UNQUOTED($ac_tr_lib)
1619 ifelse([$4], , , [$4
1624 dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1625 dnl [, OTHER-LIBRARIES]]])
1626 AC_DEFUN(AC_HAVE_LIBRARY,
1627 [AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
1628 changequote(<<, >>)dnl
1629 define(<<AC_LIB_NAME>>, dnl
1630 patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
1631 define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
1632 changequote([, ])dnl
1633 AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
1634 AC_CACHE_VAL(AC_CV_NAME,
1635 [ac_save_LIBS="$LIBS"
1636 LIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
1637 AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)
1638 LIBS="$ac_save_LIBS"
1640 AC_MSG_RESULT($AC_CV_NAME)
1641 if test "$AC_CV_NAME" = yes; then
1643 [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
1644 LIBS="-l[]AC_LIB_NAME[] $LIBS"
1646 ifelse([$3], , , [else
1650 undefine([AC_LIB_NAME])dnl
1651 undefine([AC_CV_NAME])dnl
1655 dnl ### Examining declarations
1658 dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1659 AC_DEFUN(AC_TRY_CPP,
1660 [AC_REQUIRE_CPP()dnl
1661 cat > conftest.$ac_ext <<EOF
1662 [#]line __oline__ "configure"
1663 #include "confdefs.h"
1666 dnl Capture the stderr of cpp. eval is necessary to expand ac_cpp.
1667 dnl We used to copy stderr to stdout and capture it in a variable, but
1668 dnl that breaks under sh -x, which writes compile commands starting
1669 dnl with ` +' to stderr in eval and subshells.
1670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1673 if test -z "$ac_err"; then
1674 ifelse([$2], , :, [rm -rf conftest*
1677 echo "$ac_err" >&AC_FD_CC
1678 echo "configure: failed program was:" >&AC_FD_CC
1679 cat conftest.$ac_ext >&AC_FD_CC
1680 ifelse([$3], , , [ rm -rf conftest*
1686 dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
1687 dnl ACTION-IF-NOT-FOUND])
1688 AC_DEFUN(AC_EGREP_HEADER,
1689 [AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
1691 dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
1692 dnl come early, it is not included in AC_BEFORE checks.
1693 dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
1694 dnl ACTION-IF-NOT-FOUND]])
1695 AC_DEFUN(AC_EGREP_CPP,
1696 [AC_REQUIRE_CPP()dnl
1697 cat > conftest.$ac_ext <<EOF
1698 [#]line __oline__ "configure"
1699 #include "confdefs.h"
1702 dnl eval is necessary to expand ac_cpp.
1703 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
1704 if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
1705 dnl Prevent m4 from eating character classes:
1707 egrep "$1" >/dev/null 2>&1; then
1708 changequote([, ])dnl
1709 ifelse([$3], , :, [rm -rf conftest*
1711 ifelse([$4], , , [else
1720 dnl ### Examining syntax
1723 dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
1724 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1725 AC_DEFUN(AC_TRY_COMPILE,
1726 [cat > conftest.$ac_ext <<EOF
1727 ifelse(AC_LANG, [FORTRAN77],
1731 [dnl This sometimes fails to find confdefs.h, for some reason.
1732 dnl [#]line __oline__ "[$]0"
1733 [#]line __oline__ "configure"
1734 #include "confdefs.h"
1740 if AC_TRY_EVAL(ac_compile); then
1741 ifelse([$3], , :, [rm -rf conftest*
1744 echo "configure: failed program was:" >&AC_FD_CC
1745 cat conftest.$ac_ext >&AC_FD_CC
1746 ifelse([$4], , , [ rm -rf conftest*
1753 dnl ### Examining libraries
1756 dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
1757 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
1758 AC_DEFUN(AC_COMPILE_CHECK,
1759 [AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
1760 ifelse([$1], , , [AC_CHECKING([for $1])
1762 AC_TRY_LINK([$2], [$3], [$4], [$5])
1765 dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
1766 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1767 AC_DEFUN(AC_TRY_LINK,
1768 [cat > conftest.$ac_ext <<EOF
1769 ifelse(AC_LANG, [FORTRAN77],
1775 [dnl This sometimes fails to find confdefs.h, for some reason.
1776 dnl [#]line __oline__ "[$]0"
1777 [#]line __oline__ "configure"
1778 #include "confdefs.h"
1784 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1785 ifelse([$3], , :, [rm -rf conftest*
1788 echo "configure: failed program was:" >&AC_FD_CC
1789 cat conftest.$ac_ext >&AC_FD_CC
1790 ifelse([$4], , , [ rm -rf conftest*
1797 dnl ### Checking for run-time features
1800 dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
1801 dnl [, ACTION-IF-CROSS-COMPILING]]])
1802 AC_DEFUN(AC_TRY_RUN,
1803 [if test "$cross_compiling" = yes; then
1805 [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
1807 AC_MSG_ERROR(can not run test program while cross compiling)],
1810 AC_TRY_RUN_NATIVE([$1], [$2], [$3])
1814 dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
1815 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1816 AC_DEFUN(AC_TRY_RUN_NATIVE,
1817 [cat > conftest.$ac_ext <<EOF
1818 [#]line __oline__ "configure"
1819 #include "confdefs.h"
1822 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1824 dnl Don't remove the temporary files here, so they can be examined.
1825 ifelse([$2], , :, [$2])
1827 echo "configure: failed program was:" >&AC_FD_CC
1828 cat conftest.$ac_ext >&AC_FD_CC
1829 ifelse([$3], , , [ rm -fr conftest*
1836 dnl ### Checking for header files
1839 dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1840 AC_DEFUN(AC_CHECK_HEADER,
1841 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1842 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1843 AC_MSG_CHECKING([for $1])
1844 AC_CACHE_VAL(ac_cv_header_$ac_safe,
1845 [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
1846 eval "ac_cv_header_$ac_safe=no")])dnl
1847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1849 ifelse([$2], , :, [$2])
1852 ifelse([$3], , , [$3
1857 dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1858 AC_DEFUN(AC_CHECK_HEADERS,
1861 AC_CHECK_HEADER($ac_hdr,
1863 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1864 changequote([, ])dnl
1865 AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
1870 dnl ### Checking for the existence of files
1872 dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1873 AC_DEFUN(AC_CHECK_FILE,
1874 [AC_REQUIRE([AC_PROG_CC])
1875 dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1876 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1877 AC_MSG_CHECKING([for $1])
1878 AC_CACHE_VAL(ac_cv_file_$ac_safe,
1879 [if test "$cross_compiling" = yes; then
1880 errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
1882 AC_MSG_ERROR(Cannot check for file existence when cross compiling)
1885 eval "ac_cv_file_$ac_safe=yes"
1887 eval "ac_cv_file_$ac_safe=no"
1890 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1892 ifelse([$2], , :, [$2])
1895 ifelse([$3], , , [$3])
1899 dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1900 AC_DEFUN(AC_CHECK_FILES,
1903 AC_CHECK_FILE($ac_file,
1905 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1906 changequote([, ])dnl
1907 AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
1912 dnl ### Checking for library functions
1915 dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1916 AC_DEFUN(AC_CHECK_FUNC,
1917 [AC_MSG_CHECKING([for $1])
1918 AC_CACHE_VAL(ac_cv_func_$1,
1920 dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
1921 dnl which includes <sys/select.h> which contains a prototype for
1922 dnl select. Similarly for bzero.
1923 [/* System header to define __stub macros and hopefully few prototypes,
1924 which can conflict with char $1(); below. */
1926 /* Override any gcc2 internal prototype to avoid an error. */
1927 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1931 [/* We use char because int might match the return type of a gcc2
1932 builtin and then its argument prototype would still apply. */
1935 /* The GNU C library defines this for functions which it implements
1936 to always fail with ENOSYS. Some functions are actually named
1937 something starting with __ and the normal name is an alias. */
1938 #if defined (__stub_$1) || defined (__stub___$1)
1943 ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
1944 if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
1946 ifelse([$2], , :, [$2])
1949 ifelse([$3], , , [$3
1954 dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1955 AC_DEFUN(AC_CHECK_FUNCS,
1958 AC_CHECK_FUNC($ac_func,
1960 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1961 changequote([, ])dnl
1962 AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
1966 dnl AC_REPLACE_FUNCS(FUNCTION...)
1967 AC_DEFUN(AC_REPLACE_FUNCS,
1968 [AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
1969 AC_SUBST(LIBOBJS)dnl
1973 dnl ### Checking compiler characteristics
1976 dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
1977 AC_DEFUN(AC_CHECK_SIZEOF,
1978 [changequote(<<, >>)dnl
1979 dnl The name to #define.
1980 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
1981 dnl The cache variable name.
1982 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
1983 changequote([, ])dnl
1984 AC_MSG_CHECKING(size of $1)
1985 AC_CACHE_VAL(AC_CV_NAME,
1986 [AC_TRY_RUN([#include <stdio.h>
1989 FILE *f=fopen("conftestval", "w");
1991 fprintf(f, "%d\n", sizeof($1));
1993 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
1994 AC_MSG_RESULT($AC_CV_NAME)
1995 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
1996 undefine([AC_TYPE_NAME])dnl
1997 undefine([AC_CV_NAME])dnl
2001 dnl ### Checking for typedefs
2004 dnl AC_CHECK_TYPE(TYPE, DEFAULT)
2005 AC_DEFUN(AC_CHECK_TYPE,
2006 [AC_REQUIRE([AC_HEADER_STDC])dnl
2007 AC_MSG_CHECKING(for $1)
2008 AC_CACHE_VAL(ac_cv_type_$1,
2010 changequote(<<,>>)dnl
2011 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
2012 changequote([,]), [#include <sys/types.h>
2016 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
2017 AC_MSG_RESULT($ac_cv_type_$1)
2018 if test $ac_cv_type_$1 = no; then
2024 dnl ### Creating output files
2027 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
2028 AC_DEFUN(AC_CONFIG_HEADER,
2029 [define(AC_LIST_HEADER, $1)])
2031 dnl Link each of the existing files SOURCE... to the corresponding
2032 dnl link name in DEST...
2033 dnl AC_LINK_FILES(SOURCE..., DEST...)
2034 AC_DEFUN(AC_LINK_FILES,
2036 define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
2037 define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
2039 dnl Add additional commands for AC_OUTPUT to put into config.status.
2040 dnl Use diversions instead of macros so we can be robust in the
2041 dnl presence of commas in $1 and/or $2.
2042 dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
2043 AC_DEFUN(AC_OUTPUT_COMMANDS,
2044 [AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
2047 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
2051 dnl AC_CONFIG_SUBDIRS(DIR ...)
2052 AC_DEFUN(AC_CONFIG_SUBDIRS,
2053 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2054 define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
2055 subdirs="AC_LIST_SUBDIRS"
2056 AC_SUBST(subdirs)dnl
2060 dnl Produce config.status, config.h, and links; and configure subdirs.
2061 dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
2065 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2067 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2068 # Let make expand exec_prefix.
2069 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2071 # Any assignment to VPATH causes Sun make to only execute
2072 # the first set of double-colon rules, so remove it if not needed.
2073 # If there is a colon in the path, we need to keep it.
2074 if test "x$srcdir" = x.; then
2076 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2077 changequote([, ])dnl
2080 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2082 ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
2084 # Without the "./", some shells look in PATH for config.status.
2085 : ${CONFIG_STATUS=./config.status}
2087 echo creating $CONFIG_STATUS
2088 rm -f $CONFIG_STATUS
2089 cat > $CONFIG_STATUS <<EOF
2091 # Generated automatically by configure.
2092 # Run this file to recreate the current configuration.
2093 # This directory was configured as follows,
2094 dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
2095 dnl so uname gets run too.
2096 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2098 [#] [$]0 [$]ac_configure_args
2100 # Compiler output produced by configure, useful for debugging
2101 # configure, is in ./config.log if it exists.
2104 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2105 changequote([, ])dnl
2108 case "[\$]ac_option" in
2109 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2110 echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
2111 exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
2112 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2113 echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
2115 -help | --help | --hel | --he | --h)
2116 echo "[\$]ac_cs_usage"; exit 0 ;;
2117 *) echo "[\$]ac_cs_usage"; exit 1 ;;
2121 ac_given_srcdir=$srcdir
2122 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
2125 changequote(<<, >>)dnl
2126 ifdef(<<AC_LIST_HEADER>>,
2127 <<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
2128 <<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
2129 changequote([, ])dnl
2131 cat >> $CONFIG_STATUS <<EOF
2134 ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
2135 ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
2137 cat >> $CONFIG_STATUS <<EOF
2138 undivert(AC_DIVERSION_ICMDS)dnl
2141 cat >> $CONFIG_STATUS <<\EOF
2142 undivert(AC_DIVERSION_CMDS)dnl
2146 chmod +x $CONFIG_STATUS
2147 rm -fr confdefs* $ac_clean_files
2148 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2149 dnl config.status should not do recursion.
2150 ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
2153 dnl Set the DEFS variable to the -D options determined earlier.
2154 dnl This is a subroutine of AC_OUTPUT.
2155 dnl It is called inside configure, outside of config.status.
2156 dnl AC_OUTPUT_MAKE_DEFS()
2157 define(AC_OUTPUT_MAKE_DEFS,
2158 [# Transform confdefs.h into DEFS.
2159 # Protect against shell expansion while executing Makefile rules.
2160 # Protect against Makefile macro expansion.
2162 # If the first sed substitution is executed (which looks for macros that
2163 # take arguments), then we branch to the quote section. Otherwise,
2164 # look for a macro that doesn't take arguments.
2165 cat >confdef2opt.sed <<\_ACEOF
2166 changequote(<<, >>)dnl
2169 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
2171 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
2175 s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
2180 changequote([, ])dnl
2182 # We use echo to avoid assuming a particular line-breaking character.
2183 # The extra dot is to prevent the shell from consuming trailing
2184 # line-breaks from the sub-command output. A line-break within
2185 # single-quotes doesn't work because, if this script is created in a
2186 # platform that uses two characters for line-breaks (e.g., DOS), tr
2188 ac_LF_and_DOT=`echo; echo .`
2189 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
2190 rm -f confdef2opt.sed
2193 dnl Do the variable substitutions to create the Makefiles or whatever.
2194 dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
2195 dnl here document whose contents are going into config.status, but
2196 dnl upon returning, the here document is being quoted.
2197 dnl AC_OUTPUT_FILES(FILE...)
2198 define(AC_OUTPUT_FILES,
2199 [# Protect against being on the right side of a sed subst in config.status.
2201 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2202 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2203 changequote([, ])dnl
2204 dnl These here document variables are unquoted when configure runs
2205 dnl but quoted when config.status runs, so variables are expanded once.
2207 dnl Shell code in configure.in might set extrasub.
2209 dnl Insert the sed substitutions of variables.
2210 undivert(AC_DIVERSION_SED)
2214 cat >> $CONFIG_STATUS <<\EOF
2216 # Split the substitutions into bite-sized pieces for seds with
2217 # small command number limits, like on Digital OSF/1 and HP-UX.
2218 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2219 ac_file=1 # Number of current file.
2220 ac_beg=1 # First line for current file.
2221 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2224 while $ac_more_lines; do
2225 if test $ac_beg -gt 1; then
2226 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2228 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2230 if test ! -s conftest.s$ac_file; then
2232 rm -f conftest.s$ac_file
2234 if test -z "$ac_sed_cmds"; then
2235 ac_sed_cmds="sed -f conftest.s$ac_file"
2237 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2239 ac_file=`expr $ac_file + 1`
2241 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2244 if test -z "$ac_sed_cmds"; then
2249 cat >> $CONFIG_STATUS <<EOF
2251 CONFIG_FILES=\${CONFIG_FILES-"$1"}
2253 cat >> $CONFIG_STATUS <<\EOF
2254 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2256 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2258 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2259 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2260 *) ac_file_in="${ac_file}.in" ;;
2263 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2265 # Remove last slash and all that follows it. Not all systems have dirname.
2266 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2267 changequote([, ])dnl
2268 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2269 # The file is in a subdirectory.
2270 test ! -d "$ac_dir" && mkdir "$ac_dir"
2271 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2272 # A "../" for each directory in $ac_dir_suffix.
2274 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2275 changequote([, ])dnl
2277 ac_dir_suffix= ac_dots=
2280 case "$ac_given_srcdir" in
2282 if test -z "$ac_dots"; then top_srcdir=.
2283 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2284 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2286 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2287 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2290 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2291 [ case "$ac_given_INSTALL" in
2293 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2294 changequote([, ])dnl
2295 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2299 echo creating "$ac_file"
2301 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2303 *Makefile*) ac_comsub="1i\\
2304 # $configure_input" ;;
2308 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2310 s%@configure_input@%$configure_input%g
2311 s%@srcdir@%$srcdir%g
2312 s%@top_srcdir@%$top_srcdir%g
2313 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
2315 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
2316 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2317 dnl This would break Makefile dependencies.
2318 dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
2319 dnl echo "$ac_file is unchanged"
2320 dnl rm -f conftest.out
2323 dnl mv conftest.out $ac_file
2329 dnl Create the config.h files from the config.h.in files.
2330 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2331 dnl here document whose contents are going into config.status.
2332 dnl AC_OUTPUT_HEADER(HEADER-FILE...)
2333 define(AC_OUTPUT_HEADER,
2334 [changequote(<<, >>)dnl
2335 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2336 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2338 # ac_d sets the value in "#define NAME VALUE" lines.
2339 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2340 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2343 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2344 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2345 ac_uB='\([ ]\)%\1#\2define\3'
2348 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2349 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2350 ac_eB='<<$>>%\1#\2define\3'
2353 changequote([, ])dnl
2355 if test "${CONFIG_HEADERS+set}" != set; then
2357 dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
2358 cat >> $CONFIG_STATUS <<EOF
2361 cat >> $CONFIG_STATUS <<\EOF
2363 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2365 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2367 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2368 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2369 *) ac_file_in="${ac_file}.in" ;;
2371 changequote([, ])dnl
2373 echo creating $ac_file
2375 rm -f conftest.frag conftest.in conftest.out
2376 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2377 cat $ac_file_inputs > conftest.in
2381 # Transform confdefs.h into a sed script conftest.vals that substitutes
2382 # the proper values into config.h.in to produce config.h. And first:
2383 # Protect against being on the right side of a sed subst in config.status.
2384 # Protect against being in an unquoted here document in config.status.
2386 dnl Using a here document instead of a string reduces the quoting nightmare.
2387 dnl Putting comments in sed scripts is not portable.
2388 cat > conftest.hdr <<\EOF
2389 changequote(<<, >>)dnl
2392 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2395 changequote([, ])dnl
2397 sed -n -f conftest.hdr confdefs.h > conftest.vals
2400 # This sed command replaces #undef with comments. This is necessary, for
2401 # example, in the case of _POSIX_SOURCE, which is predefined and required
2402 # on some systems where configure will not decide to define it.
2403 cat >> conftest.vals <<\EOF
2405 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2406 changequote([, ])dnl
2409 # Break up conftest.vals because some shells have a limit on
2410 # the size of here documents, and old seds have small limits too.
2415 ac_lines=`grep -c . conftest.vals`
2416 # grep -c gives empty output for an empty file on some AIX systems.
2417 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2418 # Write a limited-size here document to conftest.frag.
2419 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2420 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2422 sed -f conftest.frag conftest.in > conftest.out
2424 mv conftest.out conftest.in
2426 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2428 mv conftest.tail conftest.vals
2432 dnl Now back to your regularly scheduled config.status.
2433 cat >> $CONFIG_STATUS <<\EOF
2434 rm -f conftest.frag conftest.h
2435 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2436 cat conftest.in >> conftest.h
2438 if cmp -s $ac_file conftest.h 2>/dev/null; then
2439 echo "$ac_file is unchanged"
2442 # Remove last slash and all that follows it. Not all systems have dirname.
2444 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2445 changequote([, ])dnl
2446 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2447 # The file is in a subdirectory.
2448 test ! -d "$ac_dir" && mkdir "$ac_dir"
2451 mv conftest.h $ac_file
2457 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2458 dnl here document whose contents are going into config.status.
2459 dnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
2460 define(AC_OUTPUT_LINKS,
2463 cat >> $CONFIG_STATUS <<EOF
2468 cat >> $CONFIG_STATUS <<\EOF
2469 srcdir=$ac_given_srcdir
2470 while test -n "$ac_sources"; do
2471 set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
2472 set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
2474 echo "linking $srcdir/$ac_source to $ac_dest"
2476 if test ! -r $srcdir/$ac_source; then
2477 AC_MSG_ERROR($srcdir/$ac_source: File not found)
2481 # Make relative symlinks.
2482 # Remove last slash and all that follows it. Not all systems have dirname.
2484 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2485 changequote([, ])dnl
2486 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2487 # The dest file is in a subdirectory.
2488 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2489 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2490 # A "../" for each directory in $ac_dest_dir_suffix.
2492 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2493 changequote([, ])dnl
2495 ac_dest_dir_suffix= ac_dots=
2500 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2501 changequote([, ])dnl
2502 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2505 # Make a symlink if possible; otherwise try a hard link.
2506 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2507 ln $srcdir/$ac_source $ac_dest; then :
2509 AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
2514 dnl This is a subroutine of AC_OUTPUT.
2515 dnl It is called after running config.status.
2516 dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
2517 define(AC_OUTPUT_SUBDIRS,
2519 if test "$no_recursion" != yes; then
2521 # Remove --cache-file and --srcdir arguments so they do not pile up.
2522 ac_sub_configure_args=
2524 for ac_arg in $ac_configure_args; do
2525 if test -n "$ac_prev"; then
2530 -cache-file | --cache-file | --cache-fil | --cache-fi \
2531 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2532 ac_prev=cache_file ;;
2533 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2534 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2536 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2538 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2540 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2544 for ac_config_dir in $1; do
2546 # Do not complain, so a configure script can configure whichever
2547 # parts of a large source tree are present.
2548 if test ! -d $srcdir/$ac_config_dir; then
2552 echo configuring in $ac_config_dir
2557 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2559 AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
2568 # A "../" for each directory in /$ac_config_dir.
2569 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2570 changequote([, ])dnl
2573 .) # No --srcdir option. We are building in place.
2574 ac_sub_srcdir=$srcdir ;;
2575 /*) # Absolute path.
2576 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2578 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2581 # Check for guested configure; otherwise get Cygnus style configure.
2582 if test -f $ac_sub_srcdir/configure; then
2583 ac_sub_configure=$ac_sub_srcdir/configure
2584 elif test -f $ac_sub_srcdir/configure.in; then
2585 ac_sub_configure=$ac_configure
2587 AC_MSG_WARN(no configuration information is in $ac_config_dir)
2591 # The recursion is here.
2592 if test -n "$ac_sub_configure"; then
2594 # Make the cache file name correct relative to the subdirectory.
2595 case "$cache_file" in
2596 /*) ac_sub_cache_file=$cache_file ;;
2598 ac_sub_cache_file="$ac_dots$cache_file" ;;
2600 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2601 [ case "$ac_given_INSTALL" in
2603 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2604 changequote([, ])dnl
2605 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2609 echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
2610 # The eval makes quoting arguments work.
2611 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2614 AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)