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 dnl Changed by Bruno Haible, 18 January 1999
54 divert(-1)dnl Throw away output until AC_INIT is called.
57 define(AC_ACVERSION, 2.13)
59 dnl Some old m4's don't support m4exit. But they provide
60 dnl equivalent functionality by core dumping because of the
61 dnl long macros we define.
62 ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
63 Install it before installing Autoconf or set the
64 M4 environment variable to its path name.
73 dnl ### Defining macros
76 dnl m4 output diversions. We let m4 output them all in order at the end,
77 dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
78 dnl and AC_DIVERSION_ICMDS.
80 dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line
81 define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
82 define(AC_DIVERSION_INIT, 2)dnl initialization code
83 define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep
84 define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep
85 define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep
86 define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep
87 define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code
88 define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status
89 define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status
90 define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status
92 dnl Change the diversion stream to STREAM, while stacking old values.
93 dnl AC_DIVERT_PUSH(STREAM)
94 define(AC_DIVERT_PUSH,
95 [pushdef([AC_DIVERSION_CURRENT], $1)dnl
96 divert(AC_DIVERSION_CURRENT)dnl
99 dnl Change the diversion stream to its previous value, unstacking it.
101 define(AC_DIVERT_POP,
102 [popdef([AC_DIVERSION_CURRENT])dnl
103 divert(AC_DIVERSION_CURRENT)dnl
106 dnl Initialize the diversion setup.
107 define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
108 dnl This will be popped by AC_REQUIRE in AC_INIT.
109 pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
111 dnl The prologue for Autoconf macros.
112 dnl AC_PRO(MACRO-NAME)
114 [define([AC_PROVIDE_$1], )dnl
115 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
116 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
117 [pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
120 dnl The Epilogue for Autoconf macros.
124 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
125 [undivert(AC_DIVERSION_NORMAL_4)dnl
126 undivert(AC_DIVERSION_NORMAL_3)dnl
127 undivert(AC_DIVERSION_NORMAL_2)dnl
128 undivert(AC_DIVERSION_NORMAL_1)dnl
132 dnl Define a macro which automatically provides itself. Add machinery
133 dnl so the macro automatically switches expansion to the diversion
134 dnl stack if it is not already using it. In this case, once finished,
135 dnl it will bring back all the code accumulated in the diversion stack.
136 dnl This, combined with AC_REQUIRE, achieves the topological ordering of
137 dnl macros. We don't use this macro to define some frequently called
138 dnl macros that are not involved in ordering constraints, to save m4
140 dnl AC_DEFUN(NAME, EXPANSION)
142 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
145 dnl ### Initialization
149 AC_DEFUN(AC_INIT_NOTICE,
150 [# Guess values for system-dependent variables and create Makefiles.
151 # Generated automatically using autoconf version] AC_ACVERSION [
152 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
154 # This configure script is free software; the Free Software Foundation
155 # gives unlimited permission to copy, distribute and modify it.
159 ac_default_prefix=/usr/local
160 [#] Any additions from configure.in:])
162 dnl AC_PREFIX_DEFAULT(PREFIX)
163 AC_DEFUN(AC_PREFIX_DEFAULT,
164 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
168 dnl AC_INIT_PARSE_ARGS()
169 AC_DEFUN(AC_INIT_PARSE_ARGS,
171 # Initialize some variables set by options.
172 # The variables have the same names as the options, with
173 # dashes changed to underlines.
175 cache_file=./config.cache
184 program_transform_name=s,x,x,
192 dnl Installation directory options.
193 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
194 dnl and all the variables that are supposed to be based on exec_prefix
195 dnl by default will actually change.
196 dnl Use braces instead of parens because sh, perl, etc. also accept them.
197 bindir='${exec_prefix}/bin'
198 sbindir='${exec_prefix}/sbin'
199 libexecdir='${exec_prefix}/libexec'
200 datadir='${prefix}/share'
201 sysconfdir='${prefix}/etc'
202 sharedstatedir='${prefix}/com'
203 localstatedir='${prefix}/var'
204 libdir='${exec_prefix}/lib'
205 includedir='${prefix}/include'
206 oldincludedir='/usr/include'
207 infodir='${prefix}/info'
208 mandir='${prefix}/man'
210 # Initialize some other variables.
213 SHELL=${CONFIG_SHELL-/bin/sh}
214 # Maximum number of lines to put in a shell here document.
221 # If the previous option needs an argument, assign it.
222 if test -n "$ac_prev"; then
223 eval "$ac_prev=\$ac_option"
230 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
235 # Accept the important Cygnus configure options, so we can diagnose typos.
239 -bindir | --bindir | --bindi | --bind | --bin | --bi)
241 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
242 bindir="$ac_optarg" ;;
244 -build | --build | --buil | --bui | --bu)
246 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
247 build="$ac_optarg" ;;
249 -cache-file | --cache-file | --cache-fil | --cache-fi \
250 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
251 ac_prev=cache_file ;;
252 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
253 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
254 cache_file="$ac_optarg" ;;
256 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
258 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
260 datadir="$ac_optarg" ;;
262 -disable-* | --disable-*)
263 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
264 # Reject names that are not valid shell variable names.
266 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
268 AC_MSG_ERROR($ac_feature: invalid feature name)
270 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
271 eval "enable_${ac_feature}=no" ;;
273 -enable-* | --enable-*)
274 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
275 # Reject names that are not valid shell variable names.
277 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
279 AC_MSG_ERROR($ac_feature: invalid feature name)
281 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
286 eval "enable_${ac_feature}='$ac_optarg'" ;;
288 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
289 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
290 | --exec | --exe | --ex)
291 ac_prev=exec_prefix ;;
292 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
293 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
294 | --exec=* | --exe=* | --ex=*)
295 exec_prefix="$ac_optarg" ;;
297 -gas | --gas | --ga | --g)
298 # Obsolete; use --with-gas.
301 -help | --help | --hel | --he)
302 # Omit some internal or obsolete options to make the list less imposing.
303 # This message is too long to be a string in the A/UX 3.1 sh.
306 Usage: configure [options] [host]
307 Options: [defaults in brackets after descriptions]
309 --cache-file=FILE cache test results in FILE
310 --help print this message
311 --no-create do not create output files
312 --quiet, --silent do not print \`checking...' messages
313 --version print the version of autoconf that created configure
314 Directory and file names:
315 --prefix=PREFIX install architecture-independent files in PREFIX
317 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
319 --bindir=DIR user executables in DIR [EPREFIX/bin]
320 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
321 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
322 --datadir=DIR read-only architecture-independent data in DIR
324 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
325 --sharedstatedir=DIR modifiable architecture-independent data in DIR
327 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
328 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
329 --includedir=DIR C header files in DIR [PREFIX/include]
330 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
331 --infodir=DIR info documentation in DIR [PREFIX/info]
332 --mandir=DIR man documentation in DIR [PREFIX/man]
333 --srcdir=DIR find the sources in DIR [configure dir or ..]
334 --program-prefix=PREFIX prepend PREFIX to installed program names
335 --program-suffix=SUFFIX append SUFFIX to installed program names
336 --program-transform-name=PROGRAM
337 run sed PROGRAM on installed program names
341 --build=BUILD configure for building on BUILD [BUILD=HOST]
342 --host=HOST configure for HOST [guessed]
343 --target=TARGET configure for TARGET [TARGET=HOST]
344 Features and packages:
345 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
346 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
347 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
348 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
349 --x-includes=DIR X include files are in DIR
350 --x-libraries=DIR X library files are in DIR
353 if test -n "$ac_help"; then
354 echo "--enable and --with options recognized:$ac_help"
358 -host | --host | --hos | --ho)
360 -host=* | --host=* | --hos=* | --ho=*)
363 -includedir | --includedir | --includedi | --included | --include \
364 | --includ | --inclu | --incl | --inc)
365 ac_prev=includedir ;;
366 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
367 | --includ=* | --inclu=* | --incl=* | --inc=*)
368 includedir="$ac_optarg" ;;
370 -infodir | --infodir | --infodi | --infod | --info | --inf)
372 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
373 infodir="$ac_optarg" ;;
375 -libdir | --libdir | --libdi | --libd)
377 -libdir=* | --libdir=* | --libdi=* | --libd=*)
378 libdir="$ac_optarg" ;;
380 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
381 | --libexe | --libex | --libe)
382 ac_prev=libexecdir ;;
383 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
384 | --libexe=* | --libex=* | --libe=*)
385 libexecdir="$ac_optarg" ;;
387 -localstatedir | --localstatedir | --localstatedi | --localstated \
388 | --localstate | --localstat | --localsta | --localst \
389 | --locals | --local | --loca | --loc | --lo)
390 ac_prev=localstatedir ;;
391 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
392 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
393 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
394 localstatedir="$ac_optarg" ;;
396 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
398 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
399 mandir="$ac_optarg" ;;
402 # Obsolete; use --without-fp.
405 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
409 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
410 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
413 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
414 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
415 | --oldin | --oldi | --old | --ol | --o)
416 ac_prev=oldincludedir ;;
417 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
418 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
419 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
420 oldincludedir="$ac_optarg" ;;
422 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
424 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
425 prefix="$ac_optarg" ;;
427 -program-prefix | --program-prefix | --program-prefi | --program-pref \
428 | --program-pre | --program-pr | --program-p)
429 ac_prev=program_prefix ;;
430 -program-prefix=* | --program-prefix=* | --program-prefi=* \
431 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
432 program_prefix="$ac_optarg" ;;
434 -program-suffix | --program-suffix | --program-suffi | --program-suff \
435 | --program-suf | --program-su | --program-s)
436 ac_prev=program_suffix ;;
437 -program-suffix=* | --program-suffix=* | --program-suffi=* \
438 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
439 program_suffix="$ac_optarg" ;;
441 -program-transform-name | --program-transform-name \
442 | --program-transform-nam | --program-transform-na \
443 | --program-transform-n | --program-transform- \
444 | --program-transform | --program-transfor \
445 | --program-transfo | --program-transf \
446 | --program-trans | --program-tran \
447 | --progr-tra | --program-tr | --program-t)
448 ac_prev=program_transform_name ;;
449 -program-transform-name=* | --program-transform-name=* \
450 | --program-transform-nam=* | --program-transform-na=* \
451 | --program-transform-n=* | --program-transform-=* \
452 | --program-transform=* | --program-transfor=* \
453 | --program-transfo=* | --program-transf=* \
454 | --program-trans=* | --program-tran=* \
455 | --progr-tra=* | --program-tr=* | --program-t=*)
456 program_transform_name="$ac_optarg" ;;
458 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
459 | -silent | --silent | --silen | --sile | --sil)
462 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
464 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
466 sbindir="$ac_optarg" ;;
468 -sharedstatedir | --sharedstatedir | --sharedstatedi \
469 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
470 | --sharedst | --shareds | --shared | --share | --shar \
472 ac_prev=sharedstatedir ;;
473 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
474 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
475 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
477 sharedstatedir="$ac_optarg" ;;
479 -site | --site | --sit)
481 -site=* | --site=* | --sit=*)
484 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
486 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
487 srcdir="$ac_optarg" ;;
489 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
490 | --syscon | --sysco | --sysc | --sys | --sy)
491 ac_prev=sysconfdir ;;
492 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
493 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
494 sysconfdir="$ac_optarg" ;;
496 -target | --target | --targe | --targ | --tar | --ta | --t)
498 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
499 target="$ac_optarg" ;;
501 -v | -verbose | --verbose | --verbos | --verbo | --verb)
504 -version | --version | --versio | --versi | --vers)
505 echo "configure generated by autoconf version AC_ACVERSION"
509 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
510 # Reject names that are not valid shell variable names.
512 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
514 AC_MSG_ERROR($ac_package: invalid package name)
516 ac_package=`echo $ac_package| sed 's/-/_/g'`
521 eval "with_${ac_package}='$ac_optarg'" ;;
523 -without-* | --without-*)
524 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
525 # Reject names that are not valid shell variable names.
527 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
529 AC_MSG_ERROR($ac_package: invalid package name)
531 ac_package=`echo $ac_package| sed 's/-/_/g'`
532 eval "with_${ac_package}=no" ;;
535 # Obsolete; use --with-x.
538 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
539 | --x-incl | --x-inc | --x-in | --x-i)
540 ac_prev=x_includes ;;
541 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
542 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
543 x_includes="$ac_optarg" ;;
545 -x-libraries | --x-libraries | --x-librarie | --x-librari \
546 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
547 ac_prev=x_libraries ;;
548 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
549 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
550 x_libraries="$ac_optarg" ;;
552 -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
557 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
559 AC_MSG_WARN($ac_option: invalid host type)
561 if test "x$nonopt" != xNONE; then
562 AC_MSG_ERROR(can only configure for one host and one target at a time)
570 if test -n "$ac_prev"; then
571 AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
575 dnl Try to have only one #! line, so the script doesn't look funny
576 dnl for users of AC_REVISION.
578 AC_DEFUN(AC_INIT_BINSH,
582 dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
584 [sinclude(acsite.m4)dnl
585 sinclude(./aclocal.m4)dnl
586 AC_REQUIRE([AC_INIT_BINSH])dnl
588 AC_DIVERT_POP()dnl to NORMAL
589 AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
591 AC_INIT_PREPARE($1)dnl
592 AC_DIVERT_POP()dnl to NORMAL
595 dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
596 AC_DEFUN(AC_INIT_PREPARE,
597 [trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
599 # File descriptor usage:
602 # 2 errors and warnings
603 # 3 some systems may open it to /dev/tty
604 # 4 used on the Kubota Titan
605 define(AC_FD_MSG, 6)dnl
606 [#] AC_FD_MSG checking for... messages and results
607 define(AC_FD_CC, 5)dnl
608 [#] AC_FD_CC compiler messages saved in config.log
609 if test "$silent" = yes; then
610 exec AC_FD_MSG>/dev/null
614 exec AC_FD_CC>./config.log
617 This file contains any messages produced by compilers while
618 running configure, to aid debugging if configure makes a mistake.
621 # Strip out --no-create and --no-recursion so they do not pile up.
622 # Also quote any args containing shell metacharacters.
627 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
628 | --no-cr | --no-c) ;;
629 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
630 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
631 changequote(<<, >>)dnl
632 dnl If you change this globbing pattern, test it on an old shell --
633 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
634 *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
635 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
637 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
642 # Only set these to C if already set. These must not be set unconditionally
643 # because not all systems understand e.g. LANG=C (notably SCO).
644 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
645 # Non-C LC_CTYPE values break the ctype check.
646 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
647 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
648 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
649 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
651 # confdefs.h avoids OS command line length limits that DEFS can exceed.
652 rm -rf conftest* confdefs.h
653 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
656 # A filename unique to this package, relative to the directory that
657 # configure is in, which we can look for to find out if srcdir is correct.
660 # Find the source files, if location was not specified.
661 if test -z "$srcdir"; then
662 ac_srcdir_defaulted=yes
663 # Try the directory containing this script, then its parent.
666 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
668 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
670 if test ! -r $srcdir/$ac_unique_file; then
674 ac_srcdir_defaulted=no
676 if test ! -r $srcdir/$ac_unique_file; then
677 if test "$ac_srcdir_defaulted" = yes; then
678 AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
680 AC_MSG_ERROR(can not find sources in $srcdir)
683 dnl Double slashes in pathnames in object file debugging info
684 dnl mess up M-x gdb in Emacs.
686 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
689 dnl Let the site file select an alternate cache file if it wants to.
693 dnl By default always use an empty string as the executable
694 dnl extension. Only change it if the script calls AC_EXEEXT.
696 dnl By default assume that objects files use an extension of .o. Only
697 dnl change it if the script calls AC_OBJEXT.
700 dnl Substitute for predefined variables.
703 AC_SUBST(CPPFLAGS)dnl
704 AC_SUBST(CXXFLAGS)dnl
709 AC_SUBST(exec_prefix)dnl
711 AC_SUBST(program_transform_name)dnl
712 dnl Installation directory options.
715 AC_SUBST(libexecdir)dnl
717 AC_SUBST(sysconfdir)dnl
718 AC_SUBST(sharedstatedir)dnl
719 AC_SUBST(localstatedir)dnl
721 AC_SUBST(includedir)dnl
722 AC_SUBST(oldincludedir)dnl
728 dnl ### Selecting optional features
731 dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
732 AC_DEFUN(AC_ARG_ENABLE,
733 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
737 [#] Check whether --enable-[$1] or --disable-[$1] was given.
738 if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
739 enableval="[$enable_]patsubst([$1], -, _)"
740 ifelse([$3], , :, [$3])
741 ifelse([$4], , , [else
748 [AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
749 AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl
753 dnl ### Working with optional software
756 dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
757 AC_DEFUN(AC_ARG_WITH,
758 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
762 [#] Check whether --with-[$1] or --without-[$1] was given.
763 if test "[${with_]patsubst([$1], -, _)+set}" = set; then
764 withval="[$with_]patsubst([$1], -, _)"
765 ifelse([$3], , :, [$3])
766 ifelse([$4], , , [else
773 [AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
774 AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl
778 dnl ### Transforming program names.
782 AC_DEFUN(AC_ARG_PROGRAM,
783 [if test "$program_transform_name" = s,x,x,; then
784 program_transform_name=
786 # Double any \ or $. echo might interpret backslashes.
787 cat <<\EOF_SED > conftestsed
788 s,\\,\\\\,g; s,\$,$$,g
790 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
793 test "$program_prefix" != NONE &&
794 program_transform_name="s,^,${program_prefix},; $program_transform_name"
795 # Use a double $ so make ignores it.
796 test "$program_suffix" != NONE &&
797 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
799 # sed with no file args requires a program.
800 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
804 dnl ### Version numbers
807 dnl AC_REVISION(REVISION-INFO)
808 AC_DEFUN(AC_REVISION,
809 [AC_REQUIRE([AC_INIT_BINSH])dnl
810 [# From configure.in] translit([$1], $")])
812 dnl Subroutines of AC_PREREQ.
814 dnl Change the dots in NUMBER into commas.
815 dnl AC_PREREQ_SPLIT(NUMBER)
816 define(AC_PREREQ_SPLIT,
817 [translit($1, ., [, ])])
819 dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
820 dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
821 define(AC_PREREQ_CANON,
822 [$1, $2, ifelse([$3], , 0, [$3])])
824 dnl Complain and exit if version number 1 is less than version number 2.
825 dnl PRINTABLE2 is the printable version of version number 2.
826 dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
828 define(AC_PREREQ_COMPARE,
829 [ifelse(builtin([eval],
830 [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
832 FATAL ERROR: Autoconf version $7 or higher is required for this script
835 dnl Complain and exit if the Autoconf version is less than VERSION.
836 dnl AC_PREREQ(VERSION)
838 [AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
839 AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
842 dnl ### Getting the canonical system type
845 dnl Find install-sh, config.sub, config.guess, and Cygnus configure
846 dnl in directory DIR. These are auxiliary files used in configuration.
847 dnl DIR can be either absolute or relative to $srcdir.
848 dnl AC_CONFIG_AUX_DIR(DIR)
849 AC_DEFUN(AC_CONFIG_AUX_DIR,
850 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
852 dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
853 dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
854 AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
855 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
857 dnl Internal subroutine.
858 dnl Search for the configuration auxiliary files in directory list $1.
859 dnl We look only for install-sh, so users of AC_PROG_INSTALL
860 dnl do not automatically need to distribute the other auxiliary files.
861 dnl AC_CONFIG_AUX_DIRS(DIR ...)
862 AC_DEFUN(AC_CONFIG_AUX_DIRS,
865 if test -f $ac_dir/install-sh; then
867 ac_install_sh="$ac_aux_dir/install-sh -c"
869 elif test -f $ac_dir/install.sh; then
871 ac_install_sh="$ac_aux_dir/install.sh -c"
875 if test -z "$ac_aux_dir"; then
876 AC_MSG_ERROR([can not find install-sh or install.sh in $1])
878 ac_config_guess=$ac_aux_dir/config.guess
879 ac_config_sub=$ac_aux_dir/config.sub
880 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
881 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
884 dnl Canonicalize the host, target, and build system types.
885 AC_DEFUN(AC_CANONICAL_SYSTEM,
886 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
887 AC_BEFORE([$0], [AC_ARG_PROGRAM])
888 # Do some error checking and defaulting for the host and target type.
890 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
893 # 1. You are not allowed to specify --host, --target, and nonopt at the
895 # 2. Host defaults to nonopt.
896 # 3. If nonopt is not specified, then host defaults to the current host,
897 # as determined by config.guess.
898 # 4. Target and build default to nonopt.
899 # 5. If nonopt is not specified, then target and build default to host.
901 # The aliases save the names the user supplied, while $host etc.
902 # will get canonicalized.
903 case $host---$target---$nonopt in
904 NONE---*---* | *---NONE---* | *---*---NONE) ;;
905 *) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
911 test "$host_alias" != "$target_alias" &&
912 test "$program_prefix$program_suffix$program_transform_name" = \
914 program_prefix=${target_alias}-
917 dnl Subroutines of AC_CANONICAL_SYSTEM.
919 AC_DEFUN(AC_CANONICAL_HOST,
920 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
922 # Make sure we can run config.sub.
923 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
924 else AC_MSG_ERROR(can not run $ac_config_sub)
927 AC_MSG_CHECKING(host system type)
931 case "$host_alias" in
935 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
936 else AC_MSG_ERROR(can not guess host type; you must specify one)
938 *) host_alias=$nonopt ;;
942 dnl Set the other host vars.
943 changequote(<<, >>)dnl
944 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
945 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
946 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
947 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
951 AC_SUBST(host_alias)dnl
952 AC_SUBST(host_cpu)dnl
953 AC_SUBST(host_vendor)dnl
957 dnl Internal use only.
958 AC_DEFUN(AC_CANONICAL_TARGET,
959 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
960 AC_MSG_CHECKING(target system type)
962 dnl Set target_alias.
964 case "$target_alias" in
967 NONE) target_alias=$host_alias ;;
968 *) target_alias=$nonopt ;;
972 dnl Set the other target vars.
973 changequote(<<, >>)dnl
974 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
975 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
976 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
977 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
979 AC_MSG_RESULT($target)
981 AC_SUBST(target_alias)dnl
982 AC_SUBST(target_cpu)dnl
983 AC_SUBST(target_vendor)dnl
984 AC_SUBST(target_os)dnl
987 dnl Internal use only.
988 AC_DEFUN(AC_CANONICAL_BUILD,
989 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
990 AC_MSG_CHECKING(build system type)
994 case "$build_alias" in
997 NONE) build_alias=$host_alias ;;
998 *) build_alias=$nonopt ;;
1002 dnl Set the other build vars.
1003 changequote(<<, >>)dnl
1004 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1005 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1006 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1007 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1008 changequote([, ])dnl
1009 AC_MSG_RESULT($build)
1011 AC_SUBST(build_alias)dnl
1012 AC_SUBST(build_cpu)dnl
1013 AC_SUBST(build_vendor)dnl
1014 AC_SUBST(build_os)dnl
1018 dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
1019 dnl if the cache file is inconsistent with the current host,
1020 dnl target and build system types, execute CMD or print a default
1022 AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
1023 AC_REQUIRE([AC_CANONICAL_SYSTEM])
1024 AC_MSG_CHECKING([cached system tuple])
1025 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1026 test x"$ac_cv_host_system_type" != x"$host"; } ||
1027 { test x"${ac_cv_build_system_type+set}" = x"set" &&
1028 test x"$ac_cv_build_system_type" != x"$build"; } ||
1029 { test x"${ac_cv_target_system_type+set}" = x"set" &&
1030 test x"$ac_cv_target_system_type" != x"$target"; }; then
1031 AC_MSG_RESULT([different])
1033 [AC_MSG_ERROR([remove config.cache and re-run configure])])
1037 ac_cv_host_system_type="$host"
1038 ac_cv_build_system_type="$build"
1039 ac_cv_target_system_type="$target"
1043 dnl ### Caching test results
1046 dnl Look for site or system specific initialization scripts.
1048 define(AC_SITE_LOAD,
1049 [# Prefer explicitly selected file to automatically selected ones.
1050 if test -z "$CONFIG_SITE"; then
1051 if test "x$prefix" != xNONE; then
1052 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1054 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1057 for ac_site_file in $CONFIG_SITE; do
1058 if test -r "$ac_site_file"; then
1059 echo "loading site script $ac_site_file"
1066 define(AC_CACHE_LOAD,
1067 [if test -r "$cache_file"; then
1068 echo "loading cache $cache_file"
1071 echo "creating cache $cache_file"
1077 define(AC_CACHE_SAVE,
1078 [cat > confcache <<\EOF
1079 # This file is a shell script that caches the results of configure
1080 # tests run on this system so they can be shared between configure
1081 # scripts and configure runs. It is not useful on other systems.
1082 # If it contains results you don't want to keep, you may remove or edit it.
1084 # By default, configure uses ./config.cache as the cache file,
1085 # creating it if it does not exist already. You can give configure
1086 # the --cache-file=FILE option to use a different cache file; that is
1087 # what configure does when it calls configure scripts in
1088 # subdirectories, so they share the cache.
1089 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1090 # config.status only pays attention to the cache file if you give it the
1091 # --recheck option to rerun configure.
1094 dnl Allow a site initialization script to override cache values.
1095 # The following way of writing the cache mishandles newlines in values,
1096 # but we know of no workaround that is simple, portable, and efficient.
1097 # So, don't put newlines in cache variables' values.
1098 # Ultrix sh set writes to stderr and can't be redirected directly,
1099 # and sets the high bit in the cache file unless we assign to the vars.
1102 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1104 # `set' does not quote correctly, so add quotes (double-quote substitution
1105 # turns \\\\ into \\, and sed turns \\ into \).
1107 -e "s/'/'\\\\''/g" \
1108 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1111 # `set' quotes correctly as required by POSIX, so do not add quotes.
1112 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1115 changequote([, ])dnl
1116 if cmp -s $cache_file confcache; then
1119 if test -w $cache_file; then
1120 echo "updating cache $cache_file"
1121 cat confcache > $cache_file
1123 echo "not updating unwritable cache $cache_file"
1129 dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1130 dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1131 define(AC_CACHE_VAL,
1132 [dnl We used to use the below line, but it fails if the 1st arg is a
1133 dnl shell variable, so we need the eval.
1134 dnl if test "${$1+set}" = set; then
1135 dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
1136 if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
1137 echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
1143 dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1144 define(AC_CACHE_CHECK,
1145 [AC_MSG_CHECKING([$1])
1146 AC_CACHE_VAL([$2], [$3])dnl
1147 AC_MSG_RESULT([$]$2)])
1150 dnl ### Defining symbols
1153 dnl Set VARIABLE to VALUE, verbatim, or 1.
1154 dnl AC_DEFINE(VARIABLE [, VALUE])
1156 [cat >> confdefs.h <<\EOF
1157 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1161 dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
1162 define(AC_DEFINE_UNQUOTED,
1163 [cat >> confdefs.h <<EOF
1164 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1169 dnl ### Setting output variables
1172 dnl This macro protects VARIABLE from being diverted twice
1173 dnl if this macro is called twice for it.
1174 dnl AC_SUBST(VARIABLE)
1176 [ifdef([AC_SUBST_$1], ,
1177 [define([AC_SUBST_$1], )dnl
1178 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1183 dnl AC_SUBST_FILE(VARIABLE)
1184 define(AC_SUBST_FILE,
1185 [ifdef([AC_SUBST_$1], ,
1186 [define([AC_SUBST_$1], )dnl
1187 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1194 dnl ### Printing messages
1197 dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
1198 define(AC_MSG_CHECKING,
1199 [echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
1200 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1202 dnl AC_CHECKING(FEATURE-DESCRIPTION)
1204 [echo "checking $1" 1>&AC_FD_MSG
1205 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1207 dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
1208 define(AC_MSG_RESULT,
1209 [echo "$ac_t""$1" 1>&AC_FD_MSG])
1211 dnl AC_MSG_RESULTPROTO(RESULT-PROTOTYPE-DESCRIPTION)
1212 define(AC_MSG_RESULTPROTO,
1213 [AC_MSG_RESULT(${ac_tt}[$1])
1214 dnl ac_proto=`echo "$1" | tr -s ' '`
1215 dnl AC_MSG_RESULT(${ac_tt}${ac_proto})
1218 dnl AC_VERBOSE(RESULT-DESCRIPTION)
1220 [AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
1221 echo " $1" 1>&AC_FD_MSG])
1223 dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
1225 [echo "configure: warning: $1" 1>&2])
1227 dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
1228 define(AC_MSG_ERROR,
1229 [{ echo "configure: error: $1" 1>&2; exit 1; }])
1232 dnl ### Selecting which language to use for testing
1237 [define([AC_LANG], [C])dnl
1239 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1240 ac_cpp='$CPP $CPPFLAGS'
1241 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1242 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1243 cross_compiling=$ac_cv_prog_cc_cross
1246 dnl AC_LANG_CPLUSPLUS()
1247 AC_DEFUN(AC_LANG_CPLUSPLUS,
1248 [define([AC_LANG], [CPLUSPLUS])dnl
1250 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1251 ac_cpp='$CXXCPP $CPPFLAGS'
1252 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1253 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1254 cross_compiling=$ac_cv_prog_cxx_cross
1257 dnl AC_LANG_FORTRAN77()
1258 AC_DEFUN(AC_LANG_FORTRAN77,
1259 [define([AC_LANG], [FORTRAN77])dnl
1261 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1262 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1263 cross_compiling=$ac_cv_prog_f77_cross
1266 dnl Push the current language on a stack.
1268 define(AC_LANG_SAVE,
1269 [pushdef([AC_LANG_STACK], AC_LANG)])
1271 dnl Restore the current language from the stack.
1272 dnl AC_LANG_RESTORE()
1273 pushdef([AC_LANG_RESTORE],
1274 [ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
1275 AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
1276 AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
1278 dnl Expands to the "extern ..." prefix used for system declarations.
1279 dnl AC_LANG_EXTERN()
1280 define(AC_LANG_EXTERN,
1288 dnl ### Compiler-running mechanics
1291 dnl The purpose of this macro is to "configure:123: command line"
1292 dnl written into config.log for every test run.
1293 dnl AC_TRY_EVAL(VARIABLE)
1294 AC_DEFUN(AC_TRY_EVAL,
1295 [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
1296 (eval [$]$1) 2>&AC_FD_CC; }])
1298 dnl AC_TRY_COMMAND(COMMAND)
1299 AC_DEFUN(AC_TRY_COMMAND,
1300 [{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
1303 dnl ### Dependencies between macros
1306 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
1308 [ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
1311 dnl AC_REQUIRE(MACRO-NAME)
1313 [ifdef([AC_PROVIDE_$1], ,
1314 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
1319 dnl AC_PROVIDE(MACRO-NAME)
1321 [define([AC_PROVIDE_$1], )])
1323 dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
1325 [errprint(__file__:__line__: warning: [$1] is obsolete[$2]
1329 dnl ### Checking for programs
1332 dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
1333 dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
1334 AC_DEFUN(AC_CHECK_PROG,
1335 [# Extract the first word of "$2", so it can be a program name with args.
1336 set dummy $2; ac_word=[$]2
1337 AC_MSG_CHECKING([for $ac_word])
1338 AC_CACHE_VAL(ac_cv_prog_$1,
1339 [if test -n "[$]$1"; then
1340 ac_cv_prog_$1="[$]$1" # Let the user override the test.
1342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1343 ifelse([$6], , , [ ac_prog_rejected=no
1345 dnl $ac_dummy forces splitting on constant user-supplied paths.
1346 dnl POSIX.2 word splitting is done only on the output of word expansions,
1347 dnl not every word. This closes a longstanding sh security hole.
1348 ac_dummy="ifelse([$5], , $PATH, [$5])"
1349 for ac_dir in $ac_dummy; do
1350 test -z "$ac_dir" && ac_dir=.
1351 if test -f $ac_dir/$ac_word; then
1352 ifelse([$6], , , dnl
1353 [ if test "[$ac_dir/$ac_word]" = "$6"; then
1354 ac_prog_rejected=yes
1363 ifelse([$6], , , [if test $ac_prog_rejected = yes; then
1364 # We found a bogon in the path, so make sure we never use it.
1365 set dummy [$]ac_cv_prog_$1
1367 if test [$]# -gt 0; then
1368 # We chose a different compiler from the bogus one.
1369 # However, it has the same basename, so the bogon will be chosen
1370 # first if we set $1 to just the basename; use the full file name.
1372 set dummy "$ac_dir/$ac_word" "[$]@"
1374 ac_cv_prog_$1="[$]@"
1375 ifelse([$2], [$4], dnl
1377 # Default is a loser.
1378 AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
1379 ifelse([$5], , [\$]PATH, [$5])])
1384 dnl If no 4th arg is given, leave the cache variable unset,
1385 dnl so AC_CHECK_PROGS will keep looking.
1386 ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
1390 if test -n "[$]$1"; then
1391 AC_MSG_RESULT([$]$1)
1398 dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
1399 AC_DEFUN(AC_PATH_PROG,
1400 [# Extract the first word of "$2", so it can be a program name with args.
1401 set dummy $2; ac_word=[$]2
1402 AC_MSG_CHECKING([for $ac_word])
1403 AC_CACHE_VAL(ac_cv_path_$1,
1406 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1409 ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
1412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1413 dnl $ac_dummy forces splitting on constant user-supplied paths.
1414 dnl POSIX.2 word splitting is done only on the output of word expansions,
1415 dnl not every word. This closes a longstanding sh security hole.
1416 ac_dummy="ifelse([$4], , $PATH, [$4])"
1417 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 if test -f $ac_dir/$ac_word; then
1420 ac_cv_path_$1="$ac_dir/$ac_word"
1425 dnl If no 3rd arg is given, leave the cache variable unset,
1426 dnl so AC_PATH_PROGS will keep looking.
1427 ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
1432 if test -n "[$]$1"; then
1433 AC_MSG_RESULT([$]$1)
1440 dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1442 AC_DEFUN(AC_CHECK_PROGS,
1445 AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
1446 test -n "[$]$1" && break
1448 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1451 dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1453 AC_DEFUN(AC_PATH_PROGS,
1456 AC_PATH_PROG($1, [$]ac_prog, , $4)
1457 test -n "[$]$1" && break
1459 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1462 dnl Internal subroutine.
1463 AC_DEFUN(AC_CHECK_TOOL_PREFIX,
1464 [AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1465 if test $host != $build; then
1466 ac_tool_prefix=${host_alias}-
1472 dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
1473 AC_DEFUN(AC_CHECK_TOOL,
1474 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
1475 AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
1476 ifelse([$3], , [$2], ), $4)
1478 if test -z "$ac_cv_prog_$1"; then
1479 if test -n "$ac_tool_prefix"; then
1480 AC_CHECK_PROG($1, $2, $2, $3)
1487 dnl Guess the value for the `prefix' variable by looking for
1488 dnl the argument program along PATH and taking its parent.
1489 dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
1490 dnl set `prefix' to /usr/local/gnu.
1491 dnl This comes too late to find a site file based on the prefix,
1492 dnl and it might use a cached value for the path.
1493 dnl No big loss, I think, since most configures don't use this macro anyway.
1494 dnl AC_PREFIX_PROGRAM(PROGRAM)
1495 AC_DEFUN(AC_PREFIX_PROGRAM,
1496 [if test "x$prefix" = xNONE; then
1497 changequote(<<, >>)dnl
1498 define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
1499 changequote([, ])dnl
1500 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
1501 echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
1502 AC_PATH_PROG(AC_VAR_NAME, $1)
1503 changequote(<<, >>)dnl
1504 if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
1505 prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1506 changequote([, ])dnl
1509 undefine([AC_VAR_NAME])dnl
1512 dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to
1513 dnl `yes' if the current compiler works, otherwise set it ti `no'. Set
1514 dnl CROSS-VAR to `yes' if the compiler and linker produce non-native
1515 dnl executables, otherwise set it to `no'. Before calling
1516 dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
1519 dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
1520 AC_DEFUN(AC_TRY_COMPILER,
1521 [cat > conftest.$ac_ext << EOF
1522 ifelse(AC_LANG, [FORTRAN77], ,
1524 [#]line __oline__ "configure"
1525 #include "confdefs.h"
1529 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1531 # If we can't run a trivial program, we are probably using a cross compiler.
1532 if (./conftest; exit) 2>/dev/null; then
1538 echo "configure: failed program was:" >&AC_FD_CC
1539 cat conftest.$ac_ext >&AC_FD_CC
1545 dnl ### Checking for libraries
1548 dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
1549 dnl Try to link a program that calls FUNC, handling GCC builtins. If
1550 dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
1551 dnl ACTION-IF-NOT-FOUND.
1553 AC_DEFUN(AC_TRY_LINK_FUNC,
1555 ifelse([$1], [main], , dnl Avoid conflicting decl of main.
1556 [/* Override any gcc2 internal prototype to avoid an error. */
1557 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1561 [/* We use char because int might match the return type of a gcc2
1562 builtin and then its argument prototype would still apply. */
1570 dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
1571 dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
1572 dnl Search for a library defining FUNC, if it's not already available.
1574 AC_DEFUN(AC_SEARCH_LIBS,
1576 AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
1577 [ac_func_search_save_LIBS="$LIBS"
1578 ac_cv_search_$1="no"
1579 AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
1580 test "$ac_cv_search_$1" = "no" && for i in $2; do
1581 LIBS="-l$i $5 $ac_func_search_save_LIBS"
1582 AC_TRY_LINK_FUNC([$1],
1583 [ac_cv_search_$1="-l$i"
1586 LIBS="$ac_func_search_save_LIBS"])
1587 if test "$ac_cv_search_$1" != "no"; then
1588 test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
1596 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1597 dnl [, OTHER-LIBRARIES]]])
1598 AC_DEFUN(AC_CHECK_LIB,
1599 [AC_MSG_CHECKING(ifelse([$2], [main], [for -l$1], [for $2 in -l$1]))
1600 dnl Use a cache variable name containing both the library and function name,
1601 dnl because the test really is for library $1 defining function $2, not
1602 dnl just for library $1. Separate tests with the same $1 and different $2s
1603 dnl may have different results.
1604 ac_lib_var=`echo ifelse([$2],main,[$1],[$1[_]$2]) | sed 'y%./+-%__p_%'`
1605 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
1606 [ac_save_LIBS="$LIBS"
1607 LIBS="-l$1 $5 $LIBS"
1608 AC_TRY_LINK(ifelse(AC_LANG, [FORTRAN77], ,
1609 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
1610 [/* Override any gcc2 internal prototype to avoid an error. */
1614 /* We use char because int might match the return type of a gcc2
1615 builtin and then its argument prototype would still apply. */
1619 eval "ac_cv_lib_$ac_lib_var=yes",
1620 eval "ac_cv_lib_$ac_lib_var=no")
1621 LIBS="$ac_save_LIBS"
1623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1627 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1628 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1629 changequote([, ])dnl
1630 AC_DEFINE_UNQUOTED($ac_tr_lib)
1635 ifelse([$4], , , [$4
1640 dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1641 dnl [, OTHER-LIBRARIES]]])
1642 AC_DEFUN(AC_HAVE_LIBRARY,
1643 [AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
1644 changequote(<<, >>)dnl
1645 define(<<AC_LIB_NAME>>, dnl
1646 patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
1647 define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
1648 changequote([, ])dnl
1649 AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
1650 AC_CACHE_VAL(AC_CV_NAME,
1651 [ac_save_LIBS="$LIBS"
1652 LIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
1653 AC_TRY_LINK( , [int main()], AC_CV_NAME=yes, AC_CV_NAME=no)
1654 LIBS="$ac_save_LIBS"
1656 AC_MSG_RESULT($AC_CV_NAME)
1657 if test "$AC_CV_NAME" = yes; then
1659 [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
1660 LIBS="-l[]AC_LIB_NAME[] $LIBS"
1662 ifelse([$3], , , [else
1666 undefine([AC_LIB_NAME])dnl
1667 undefine([AC_CV_NAME])dnl
1671 dnl ### Examining declarations
1674 dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1675 AC_DEFUN(AC_TRY_CPP,
1676 [AC_REQUIRE_CPP()dnl
1677 cat > conftest.$ac_ext <<EOF
1678 [#]line __oline__ "configure"
1679 #include "confdefs.h"
1682 dnl Capture the stderr of cpp. eval is necessary to expand ac_cpp.
1683 dnl We used to copy stderr to stdout and capture it in a variable, but
1684 dnl that breaks under sh -x, which writes compile commands starting
1685 dnl with ` +' to stderr in eval and subshells.
1686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1689 if test -z "$ac_err"; then
1690 ifelse([$2], , :, [rm -rf conftest*
1693 echo "$ac_err" >&AC_FD_CC
1694 echo "configure: failed program was:" >&AC_FD_CC
1695 cat conftest.$ac_ext >&AC_FD_CC
1696 ifelse([$3], , , [ rm -rf conftest*
1702 dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
1703 dnl ACTION-IF-NOT-FOUND])
1704 AC_DEFUN(AC_EGREP_HEADER,
1705 [AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
1707 dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
1708 dnl come early, it is not included in AC_BEFORE checks.
1709 dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
1710 dnl ACTION-IF-NOT-FOUND]])
1711 AC_DEFUN(AC_EGREP_CPP,
1712 [AC_REQUIRE_CPP()dnl
1713 cat > conftest.$ac_ext <<EOF
1714 [#]line __oline__ "configure"
1715 #include "confdefs.h"
1718 dnl eval is necessary to expand ac_cpp.
1719 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
1720 if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
1721 dnl Prevent m4 from eating character classes:
1723 egrep "$1" >/dev/null 2>&1; then
1724 changequote([, ])dnl
1725 ifelse([$3], , :, [rm -rf conftest*
1727 ifelse([$4], , , [else
1736 dnl ### Examining syntax
1739 dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
1740 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1741 AC_DEFUN(AC_TRY_COMPILE,
1742 [cat > conftest.$ac_ext <<EOF
1743 ifelse(AC_LANG, [FORTRAN77],
1747 [dnl This sometimes fails to find confdefs.h, for some reason.
1748 dnl [#]line __oline__ "[$]0"
1749 [#]line __oline__ "configure"
1750 #include "confdefs.h"
1756 if AC_TRY_EVAL(ac_compile); then
1757 ifelse([$3], , :, [rm -rf conftest*
1760 echo "configure: failed program was:" >&AC_FD_CC
1761 cat conftest.$ac_ext >&AC_FD_CC
1762 ifelse([$4], , , [ rm -rf conftest*
1769 dnl ### Examining libraries
1772 dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
1773 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
1774 AC_DEFUN(AC_COMPILE_CHECK,
1775 [AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
1776 ifelse([$1], , , [AC_CHECKING([for $1])
1778 AC_TRY_LINK([$2], [$3], [$4], [$5])
1781 dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
1782 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1783 AC_DEFUN(AC_TRY_LINK,
1784 [cat > conftest.$ac_ext <<EOF
1785 ifelse(AC_LANG, [FORTRAN77],
1791 [dnl This sometimes fails to find confdefs.h, for some reason.
1792 dnl [#]line __oline__ "[$]0"
1793 [#]line __oline__ "configure"
1794 #include "confdefs.h"
1800 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1801 ifelse([$3], , :, [rm -rf conftest*
1804 echo "configure: failed program was:" >&AC_FD_CC
1805 cat conftest.$ac_ext >&AC_FD_CC
1806 ifelse([$4], , , [ rm -rf conftest*
1813 dnl ### Checking for run-time features
1816 dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
1817 dnl [, ACTION-IF-CROSS-COMPILING]]])
1818 AC_DEFUN(AC_TRY_RUN,
1819 [if test "$cross_compiling" = yes; then
1821 [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
1823 AC_MSG_ERROR(can not run test program while cross compiling)],
1826 AC_TRY_RUN_NATIVE([$1], [$2], [$3])
1830 dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
1831 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1832 AC_DEFUN(AC_TRY_RUN_NATIVE,
1833 [cat > conftest.$ac_ext <<EOF
1834 [#]line __oline__ "configure"
1835 #include "confdefs.h"
1837 extern "C" void exit(int);
1841 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1843 dnl Don't remove the temporary files here, so they can be examined.
1844 ifelse([$2], , :, [$2])
1846 echo "configure: failed program was:" >&AC_FD_CC
1847 cat conftest.$ac_ext >&AC_FD_CC
1848 ifelse([$3], , , [ rm -fr conftest*
1852 if test -f core; then
1853 coredir=core`/bin/sh -c 'echo $$'`
1855 cp confdefs.h $coredir/confdefs.h
1856 mv conftest.c $coredir/conftest.c
1857 mv conftest $coredir/conftest
1858 mv core $coredir/core
1859 echo "warning: test program dumped core -- see subdirectory $coredir"
1864 dnl ### Checking for header files
1867 dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1868 AC_DEFUN(AC_CHECK_HEADER,
1869 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1870 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1871 AC_MSG_CHECKING([for $1])
1872 AC_CACHE_VAL(ac_cv_header_$ac_safe,
1873 [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
1874 eval "ac_cv_header_$ac_safe=no")])dnl
1875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1877 ifelse([$2], , :, [$2])
1880 ifelse([$3], , , [$3
1885 dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1886 AC_DEFUN(AC_CHECK_HEADERS,
1889 AC_CHECK_HEADER($ac_hdr,
1891 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1892 changequote([, ])dnl
1893 AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
1898 dnl ### Checking for the existence of files
1900 dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1901 AC_DEFUN(AC_CHECK_FILE,
1902 [AC_REQUIRE([AC_PROG_CC])
1903 dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1904 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1905 AC_MSG_CHECKING([for $1])
1906 AC_CACHE_VAL(ac_cv_file_$ac_safe,
1907 [if test "$cross_compiling" = yes; then
1908 errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
1910 AC_MSG_ERROR(Cannot check for file existence when cross compiling)
1913 eval "ac_cv_file_$ac_safe=yes"
1915 eval "ac_cv_file_$ac_safe=no"
1918 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1920 ifelse([$2], , :, [$2])
1923 ifelse([$3], , , [$3])
1927 dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1928 AC_DEFUN(AC_CHECK_FILES,
1931 AC_CHECK_FILE($ac_file,
1933 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1934 changequote([, ])dnl
1935 AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
1940 dnl ### Checking for library functions
1943 dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1944 AC_DEFUN(AC_CHECK_FUNC,
1945 [AC_MSG_CHECKING([for $1])
1946 AC_CACHE_VAL(ac_cv_func_$1,
1948 dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
1949 dnl which includes <sys/select.h> which contains a prototype for
1950 dnl select. Similarly for bzero.
1951 [/* System header to define __stub macros and hopefully few prototypes,
1952 which can conflict with char $1(); below. */
1954 /* Override any gcc2 internal prototype to avoid an error. */
1958 /* We use char because int might match the return type of a gcc2
1959 builtin and then its argument prototype would still apply. */
1962 /* The GNU C library defines this for functions which it implements
1963 to always fail with ENOSYS. Some functions are actually named
1964 something starting with __ and the normal name is an alias. */
1965 #if defined (__stub_$1) || defined (__stub___$1)
1970 ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
1971 if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
1973 ifelse([$2], , :, [$2])
1976 ifelse([$3], , , [$3
1981 dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1982 AC_DEFUN(AC_CHECK_FUNCS,
1985 AC_CHECK_FUNC($ac_func,
1987 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1988 changequote([, ])dnl
1989 AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
1993 dnl AC_REPLACE_FUNCS(FUNCTION...)
1994 AC_DEFUN(AC_REPLACE_FUNCS,
1995 [AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
1996 AC_SUBST(LIBOBJS)dnl
2000 dnl ### Checking compiler characteristics
2003 dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
2004 AC_DEFUN(AC_CHECK_SIZEOF,
2005 [changequote(<<, >>)dnl
2006 dnl The name to #define.
2007 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
2008 dnl The cache variable name.
2009 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
2010 changequote([, ])dnl
2011 AC_MSG_CHECKING(size of $1)
2012 AC_CACHE_VAL(AC_CV_NAME,
2013 [AC_TRY_RUN([#include <stdio.h>
2016 FILE *f=fopen("conftestval", "w");
2018 fprintf(f, "%d\n", sizeof($1));
2020 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
2021 AC_MSG_RESULT($AC_CV_NAME)
2022 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
2023 undefine([AC_TYPE_NAME])dnl
2024 undefine([AC_CV_NAME])dnl
2028 dnl ### Checking for typedefs
2031 dnl AC_CHECK_TYPE(TYPE, DEFAULT)
2032 AC_DEFUN(AC_CHECK_TYPE,
2033 [AC_REQUIRE([AC_HEADER_STDC])dnl
2034 AC_MSG_CHECKING(for $1)
2035 AC_CACHE_VAL(ac_cv_type_$1,
2037 changequote(<<,>>)dnl
2038 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
2039 changequote([,]), [#include <sys/types.h>
2040 #if defined(STDC_HEADERS) || defined(HAVE_STDLIB_H)
2043 #if defined(STDC_HEADERS) || defined(HAVE_STDDEF_H)
2045 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
2046 AC_MSG_RESULT($ac_cv_type_$1)
2047 if test $ac_cv_type_$1 = no; then
2053 dnl ### Creating output files
2056 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
2057 AC_DEFUN(AC_CONFIG_HEADER,
2058 [define(AC_LIST_HEADER, $1)])
2060 dnl Link each of the existing files SOURCE... to the corresponding
2061 dnl link name in DEST...
2062 dnl AC_LINK_FILES(SOURCE..., DEST...)
2063 AC_DEFUN(AC_LINK_FILES,
2065 define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
2066 define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
2068 dnl Add additional commands for AC_OUTPUT to put into config.status.
2069 dnl Use diversions instead of macros so we can be robust in the
2070 dnl presence of commas in $1 and/or $2.
2071 dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
2072 AC_DEFUN(AC_OUTPUT_COMMANDS,
2073 [AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
2076 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
2080 dnl AC_CONFIG_SUBDIRS(DIR ...)
2081 AC_DEFUN(AC_CONFIG_SUBDIRS,
2082 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2083 define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
2084 subdirs="AC_LIST_SUBDIRS"
2085 AC_SUBST(subdirs)dnl
2089 dnl Produce config.status, config.h, and links; and configure subdirs.
2090 dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
2094 trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
2096 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2097 # Let make expand exec_prefix.
2098 test "x$exec_prefix" = xNONE && exec_prefix='$(prefix)'
2100 # Any assignment to VPATH causes Sun make to only execute
2101 # the first set of double-colon rules, so remove it if not needed.
2102 # If there is a colon in the path, we need to keep it.
2103 if test "x$srcdir" = x.; then
2105 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2106 changequote([, ])dnl
2109 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2111 ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
2113 # Without the "./", some shells look in PATH for config.status.
2114 : ${CONFIG_STATUS=./config.status}
2116 echo creating $CONFIG_STATUS
2117 rm -f $CONFIG_STATUS
2118 cat > $CONFIG_STATUS <<EOF
2120 # Generated automatically by configure.
2121 # Run this file to recreate the current configuration.
2122 # This directory was configured as follows,
2123 dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
2124 dnl so uname gets run too.
2125 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2127 [#] [$]0 [$]ac_configure_args
2129 # Compiler output produced by configure, useful for debugging
2130 # configure, is in ./config.log if it exists.
2133 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2134 changequote([, ])dnl
2137 case "[\$]ac_option" in
2138 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2139 echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
2140 exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
2141 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2142 echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
2144 -help | --help | --hel | --he | --h)
2145 echo "[\$]ac_cs_usage"; exit 0 ;;
2146 *) echo "[\$]ac_cs_usage"; exit 1 ;;
2150 ac_given_srcdir=$srcdir
2151 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
2154 changequote(<<, >>)dnl
2155 ifdef(<<AC_LIST_HEADER>>,
2156 <<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
2157 <<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
2158 changequote([, ])dnl
2160 cat >> $CONFIG_STATUS <<EOF
2163 ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
2164 ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
2166 cat >> $CONFIG_STATUS <<EOF
2167 undivert(AC_DIVERSION_ICMDS)dnl
2170 cat >> $CONFIG_STATUS <<\EOF
2171 undivert(AC_DIVERSION_CMDS)dnl
2175 chmod +x $CONFIG_STATUS
2176 rm -fr confdefs* $ac_clean_files
2177 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2178 dnl config.status should not do recursion.
2179 ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
2182 dnl Set the DEFS variable to the -D options determined earlier.
2183 dnl This is a subroutine of AC_OUTPUT.
2184 dnl It is called inside configure, outside of config.status.
2185 dnl AC_OUTPUT_MAKE_DEFS()
2186 define(AC_OUTPUT_MAKE_DEFS,
2187 [# Transform confdefs.h into DEFS.
2188 dnl Using a here document instead of a string reduces the quoting nightmare.
2189 # Protect against shell expansion while executing Makefile rules.
2190 # Protect against Makefile macro expansion.
2191 cat > conftest.defs <<\EOF
2192 changequote(<<, >>)dnl
2193 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2194 s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
2198 changequote([, ])dnl
2200 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2204 dnl Do the variable substitutions to create the Makefiles or whatever.
2205 dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
2206 dnl here document whose contents are going into config.status, but
2207 dnl upon returning, the here document is being quoted.
2208 dnl AC_OUTPUT_FILES(FILE...)
2209 define(AC_OUTPUT_FILES,
2210 [# Protect against being on the right side of a sed subst in config.status.
2212 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2213 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2214 changequote([, ])dnl
2215 dnl These here document variables are unquoted when configure runs
2216 dnl but quoted when config.status runs, so variables are expanded once.
2218 dnl Shell code in configure.in might set extrasub.
2220 dnl Insert the sed substitutions of variables.
2221 undivert(AC_DIVERSION_SED)
2225 cat >> $CONFIG_STATUS <<\EOF
2227 # Split the substitutions into bite-sized pieces for seds with
2228 # small command number limits, like on Digital OSF/1 and HP-UX.
2229 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2230 ac_file=1 # Number of current file.
2231 ac_beg=1 # First line for current file.
2232 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2235 while $ac_more_lines; do
2236 if test $ac_beg -gt 1; then
2237 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2239 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2241 if test ! -s conftest.s$ac_file; then
2243 rm -f conftest.s$ac_file
2245 if test -z "$ac_sed_cmds"; then
2246 ac_sed_cmds="sed -f conftest.s$ac_file"
2248 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2250 ac_file=`expr $ac_file + 1`
2252 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2255 if test -z "$ac_sed_cmds"; then
2260 cat >> $CONFIG_STATUS <<EOF
2262 CONFIG_FILES=\${CONFIG_FILES-"$1"}
2264 cat >> $CONFIG_STATUS <<\EOF
2265 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2267 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2269 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2270 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2271 *) ac_file_in="${ac_file}.in" ;;
2274 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2276 # Remove last slash and all that follows it. Not all systems have dirname.
2277 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2278 changequote([, ])dnl
2279 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2280 # The file is in a subdirectory.
2281 test ! -d "$ac_dir" && mkdir "$ac_dir"
2282 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2283 # A "../" for each directory in $ac_dir_suffix.
2285 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2286 changequote([, ])dnl
2288 ac_dir_suffix= ac_dots=
2291 case "$ac_given_srcdir" in
2293 if test -z "$ac_dots"; then top_srcdir=.
2294 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2295 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2297 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2298 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2301 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2302 [ case "$ac_given_INSTALL" in
2304 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2305 changequote([, ])dnl
2306 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2310 echo creating "$ac_file"
2312 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2314 *Makefile*) ac_comsub="1i\\
2315 # $configure_input" ;;
2319 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2321 s%@configure_input@%$configure_input%g
2322 s%@srcdir@%$srcdir%g
2323 s%@top_srcdir@%$top_srcdir%g
2324 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
2326 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
2327 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2328 dnl This would break Makefile dependencies.
2329 dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
2330 dnl echo "$ac_file is unchanged"
2331 dnl rm -f conftest.out
2334 dnl mv conftest.out $ac_file
2340 dnl Create the config.h files from the config.h.in files.
2341 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2342 dnl here document whose contents are going into config.status.
2343 dnl AC_OUTPUT_HEADER(HEADER-FILE...)
2344 define(AC_OUTPUT_HEADER,
2345 [changequote(<<, >>)dnl
2346 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2347 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2349 # ac_d sets the value in "#define NAME VALUE" lines.
2350 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2351 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2354 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2355 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2356 ac_uB='\([ ]\)%\1#\2define\3'
2359 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2360 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2361 ac_eB='<<$>>%\1#\2define\3'
2364 # ac_f turns "#define NAME" without trailing blanks into "#define NAME VALUE".
2365 ac_fA='s%^\([ ]*\)#\([ ]*\)define\([ ][ ]*\)'
2366 ac_fB='<<$>>%\1#\2define\3'
2369 changequote([, ])dnl
2371 if test "${CONFIG_HEADERS+set}" != set; then
2373 dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
2374 cat >> $CONFIG_STATUS <<EOF
2377 cat >> $CONFIG_STATUS <<\EOF
2379 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2381 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2383 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2384 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2385 *) ac_file_in="${ac_file}.in" ;;
2387 changequote([, ])dnl
2389 echo creating $ac_file
2391 rm -f conftest.frag conftest.in conftest.out
2392 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2393 cat $ac_file_inputs > conftest.in
2397 # Transform confdefs.h into a sed script conftest.vals that substitutes
2398 # the proper values into config.h.in to produce config.h. And first:
2399 # Protect against being on the right side of a sed subst in config.status.
2400 # Protect against being in an unquoted here document in config.status.
2402 dnl Using a here document instead of a string reduces the quoting nightmare.
2403 dnl Putting comments in sed scripts is not portable.
2404 cat > conftest.hdr <<\EOF
2405 changequote(<<, >>)dnl
2408 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2412 changequote([, ])dnl
2414 sed -n -f conftest.hdr confdefs.h > conftest.vals
2417 dnl This is not necessary at all: Just write
2418 dnl #ifndef _POSIX_SOURCE
2419 dnl #undef _POSIX_SOURCE
2422 dnl #undef _POSIX_SOURCE
2424 dnl # This sed command replaces #undef with comments. This is necessary, for
2425 dnl # example, in the case of _POSIX_SOURCE, which is predefined and required
2426 dnl # on some systems where configure will not decide to define it.
2427 dnl cat >> conftest.vals <<\EOF
2428 dnl changequote(, )dnl
2429 dnl s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2430 dnl changequote([, ])dnl
2433 # Break up conftest.vals because some shells have a limit on
2434 # the size of here documents, and old seds have small limits too.
2439 ac_lines=`grep -c . conftest.vals`
2440 # grep -c gives empty output for an empty file on some AIX systems.
2441 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2442 # Write a limited-size here document to conftest.frag.
2443 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2444 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2446 sed -f conftest.frag conftest.in > conftest.out
2448 mv conftest.out conftest.in
2450 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2452 mv conftest.tail conftest.vals
2456 dnl Now back to your regularly scheduled config.status.
2457 cat >> $CONFIG_STATUS <<\EOF
2458 rm -f conftest.frag conftest.h
2459 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2460 cat conftest.in >> conftest.h
2462 if cmp -s $ac_file conftest.h 2>/dev/null; then
2463 echo "$ac_file is unchanged"
2466 # Remove last slash and all that follows it. Not all systems have dirname.
2468 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2469 changequote([, ])dnl
2470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2471 # The file is in a subdirectory.
2472 test ! -d "$ac_dir" && mkdir "$ac_dir"
2475 mv conftest.h $ac_file
2481 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2482 dnl here document whose contents are going into config.status.
2483 dnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
2484 define(AC_OUTPUT_LINKS,
2487 cat >> $CONFIG_STATUS <<EOF
2492 cat >> $CONFIG_STATUS <<\EOF
2493 srcdir=$ac_given_srcdir
2494 while test -n "$ac_sources"; do
2495 set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
2496 set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
2498 echo "linking $srcdir/$ac_source to $ac_dest"
2500 if test ! -r $srcdir/$ac_source; then
2501 AC_MSG_ERROR($srcdir/$ac_source: File not found)
2505 # Make relative symlinks.
2506 # Remove last slash and all that follows it. Not all systems have dirname.
2508 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2509 changequote([, ])dnl
2510 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2511 # The dest file is in a subdirectory.
2512 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2513 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2514 # A "../" for each directory in $ac_dest_dir_suffix.
2516 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2517 changequote([, ])dnl
2519 ac_dest_dir_suffix= ac_dots=
2524 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2525 changequote([, ])dnl
2526 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2529 # Make a symlink if possible; otherwise try a hard link.
2530 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2531 ln $srcdir/$ac_source $ac_dest; then :
2533 AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
2538 dnl This is a subroutine of AC_OUTPUT.
2539 dnl It is called after running config.status.
2540 dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
2541 define(AC_OUTPUT_SUBDIRS,
2543 if test "$no_recursion" != yes; then
2545 # Remove --cache-file and --srcdir arguments so they do not pile up.
2546 ac_sub_configure_args=
2548 for ac_arg in $ac_configure_args; do
2549 if test -n "$ac_prev"; then
2554 -cache-file | --cache-file | --cache-fil | --cache-fi \
2555 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2556 ac_prev=cache_file ;;
2557 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2558 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2560 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2562 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2564 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2568 for ac_config_dir in $1; do
2570 # Do not complain, so a configure script can configure whichever
2571 # parts of a large source tree are present.
2572 if test ! -d $srcdir/$ac_config_dir; then
2576 echo configuring in $ac_config_dir
2581 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2583 AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
2592 # A "../" for each directory in /$ac_config_dir.
2593 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2594 changequote([, ])dnl
2597 .) # No --srcdir option. We are building in place.
2598 ac_sub_srcdir=$srcdir ;;
2599 /*) # Absolute path.
2600 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2602 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2605 # Check for guested configure; otherwise get Cygnus style configure.
2606 if test -f $ac_sub_srcdir/configure; then
2607 ac_sub_configure=$ac_sub_srcdir/configure
2608 elif test -f $ac_sub_srcdir/configure.in; then
2609 ac_sub_configure=$ac_configure
2611 AC_MSG_WARN(no configuration information is in $ac_config_dir)
2615 # The recursion is here.
2616 if test -n "$ac_sub_configure"; then
2618 # Make the cache file name correct relative to the subdirectory.
2619 case "$cache_file" in
2620 /*) ac_sub_cache_file=$cache_file ;;
2622 if test -n "$ac_dots"; then
2623 ac_sub_cache_file="$ac_dots"`echo "$cache_file" | sed 's,^\./,,'`
2625 ac_sub_cache_file="$cache_file"
2629 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2630 [ case "$ac_given_INSTALL" in
2632 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2633 changequote([, ])dnl
2634 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2638 echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
2639 # The eval makes quoting arguments work.
2640 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2643 AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)