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
53 dnl Changed more by Richard Kreckel, 16 November 2000
55 divert(-1)dnl Throw away output until AC_INIT is called.
58 define(AC_ACVERSION, 2.13)
60 dnl Some old m4's don't support m4exit. But they provide
61 dnl equivalent functionality by core dumping because of the
62 dnl long macros we define.
63 ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
64 Install it before installing Autoconf or set the
65 M4 environment variable to its path name.
74 dnl ### Defining macros
77 dnl m4 output diversions. We let m4 output them all in order at the end,
78 dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
79 dnl and AC_DIVERSION_ICMDS.
81 dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line
82 define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
83 define(AC_DIVERSION_INIT, 2)dnl initialization code
84 define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep
85 define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep
86 define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep
87 define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep
88 define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code
89 define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status
90 define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status
91 define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status
93 dnl Change the diversion stream to STREAM, while stacking old values.
94 dnl AC_DIVERT_PUSH(STREAM)
95 define(AC_DIVERT_PUSH,
96 [pushdef([AC_DIVERSION_CURRENT], $1)dnl
97 divert(AC_DIVERSION_CURRENT)dnl
100 dnl Change the diversion stream to its previous value, unstacking it.
102 define(AC_DIVERT_POP,
103 [popdef([AC_DIVERSION_CURRENT])dnl
104 divert(AC_DIVERSION_CURRENT)dnl
107 dnl Initialize the diversion setup.
108 define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
109 dnl This will be popped by AC_REQUIRE in AC_INIT.
110 pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
112 dnl The prologue for Autoconf macros.
113 dnl AC_PRO(MACRO-NAME)
115 [define([AC_PROVIDE_$1], )dnl
116 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
117 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
118 [pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
121 dnl The Epilogue for Autoconf macros.
125 ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
126 [undivert(AC_DIVERSION_NORMAL_4)dnl
127 undivert(AC_DIVERSION_NORMAL_3)dnl
128 undivert(AC_DIVERSION_NORMAL_2)dnl
129 undivert(AC_DIVERSION_NORMAL_1)dnl
133 dnl Define a macro which automatically provides itself. Add machinery
134 dnl so the macro automatically switches expansion to the diversion
135 dnl stack if it is not already using it. In this case, once finished,
136 dnl it will bring back all the code accumulated in the diversion stack.
137 dnl This, combined with AC_REQUIRE, achieves the topological ordering of
138 dnl macros. We don't use this macro to define some frequently called
139 dnl macros that are not involved in ordering constraints, to save m4
141 dnl AC_DEFUN(NAME, EXPANSION)
143 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
146 dnl ### Initialization
150 AC_DEFUN(AC_INIT_NOTICE,
151 [# Guess values for system-dependent variables and create Makefiles.
152 # Generated automatically using autoconf version] AC_ACVERSION [
153 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
155 # This configure script is free software; the Free Software Foundation
156 # gives unlimited permission to copy, distribute and modify it.
160 ac_default_prefix=/usr/local
161 [#] Any additions from configure.in:])
163 dnl AC_PREFIX_DEFAULT(PREFIX)
164 AC_DEFUN(AC_PREFIX_DEFAULT,
165 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
169 dnl AC_INIT_PARSE_ARGS()
170 AC_DEFUN(AC_INIT_PARSE_ARGS,
172 # Initialize some variables set by options.
173 # The variables have the same names as the options, with
174 # dashes changed to underlines.
176 cache_file=./config.cache
185 program_transform_name=s,x,x,
193 dnl Installation directory options.
194 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
195 dnl and all the variables that are supposed to be based on exec_prefix
196 dnl by default will actually change.
197 dnl Use braces instead of parens because sh, perl, etc. also accept them.
198 bindir='${exec_prefix}/bin'
199 sbindir='${exec_prefix}/sbin'
200 libexecdir='${exec_prefix}/libexec'
201 datadir='${prefix}/share'
202 sysconfdir='${prefix}/etc'
203 sharedstatedir='${prefix}/com'
204 localstatedir='${prefix}/var'
205 libdir='${exec_prefix}/lib'
206 includedir='${prefix}/include'
207 oldincludedir='/usr/include'
208 infodir='${datadir}/info'
209 mandir='${datadir}/man'
211 # Initialize some other variables.
214 SHELL=${CONFIG_SHELL-/bin/sh}
215 # Maximum number of lines to put in a shell here document.
222 # If the previous option needs an argument, assign it.
223 if test -n "$ac_prev"; then
224 eval "$ac_prev=\$ac_option"
231 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
236 # Accept the important Cygnus configure options, so we can diagnose typos.
240 -bindir | --bindir | --bindi | --bind | --bin | --bi)
242 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
243 bindir="$ac_optarg" ;;
245 -build | --build | --buil | --bui | --bu)
247 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
248 build="$ac_optarg" ;;
250 -cache-file | --cache-file | --cache-fil | --cache-fi \
251 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
252 ac_prev=cache_file ;;
253 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
254 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
255 cache_file="$ac_optarg" ;;
257 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
259 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
261 datadir="$ac_optarg" ;;
263 -disable-* | --disable-*)
264 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
265 # Reject names that are not valid shell variable names.
267 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
269 AC_MSG_ERROR($ac_feature: invalid feature name)
271 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
272 eval "enable_${ac_feature}=no" ;;
274 -enable-* | --enable-*)
275 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
276 # Reject names that are not valid shell variable names.
278 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
280 AC_MSG_ERROR($ac_feature: invalid feature name)
282 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
287 eval "enable_${ac_feature}='$ac_optarg'" ;;
289 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
290 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
291 | --exec | --exe | --ex)
292 ac_prev=exec_prefix ;;
293 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
294 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
295 | --exec=* | --exe=* | --ex=*)
296 exec_prefix="$ac_optarg" ;;
298 -gas | --gas | --ga | --g)
299 # Obsolete; use --with-gas.
302 -help | --help | --hel | --he)
303 # Omit some internal or obsolete options to make the list less imposing.
304 # This message is too long to be a string in the A/UX 3.1 sh.
307 Usage: configure [options] [host]
308 Options: [defaults in brackets after descriptions]
310 --cache-file=FILE cache test results in FILE
311 --help print this message
312 --no-create do not create output files
313 --quiet, --silent do not print \`checking...' messages
314 --version print the version of autoconf that created configure
315 Directory and file names:
316 --prefix=PREFIX install architecture-independent files in PREFIX
318 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
320 --bindir=DIR user executables in DIR [EPREFIX/bin]
321 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
322 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
323 --datadir=DIR read-only architecture-independent data in DIR
325 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
326 --sharedstatedir=DIR modifiable architecture-independent data in DIR
328 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
329 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
330 --includedir=DIR C header files in DIR [PREFIX/include]
331 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
332 --infodir=DIR info documentation in DIR [PREFIX/info]
333 --mandir=DIR man documentation in DIR [PREFIX/man]
334 --srcdir=DIR find the sources in DIR [configure dir or ..]
335 --program-prefix=PREFIX prepend PREFIX to installed program names
336 --program-suffix=SUFFIX append SUFFIX to installed program names
337 --program-transform-name=PROGRAM
338 run sed PROGRAM on installed program names
342 --build=BUILD configure for building on BUILD [BUILD=HOST]
343 --host=HOST configure for HOST [guessed]
344 --target=TARGET configure for TARGET [TARGET=HOST]
345 Features and packages:
346 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
347 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
348 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
349 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
350 --x-includes=DIR X include files are in DIR
351 --x-libraries=DIR X library files are in DIR
354 if test -n "$ac_help"; then
355 echo "--enable and --with options recognized:$ac_help"
359 -host | --host | --hos | --ho)
361 -host=* | --host=* | --hos=* | --ho=*)
364 -includedir | --includedir | --includedi | --included | --include \
365 | --includ | --inclu | --incl | --inc)
366 ac_prev=includedir ;;
367 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
368 | --includ=* | --inclu=* | --incl=* | --inc=*)
369 includedir="$ac_optarg" ;;
371 -infodir | --infodir | --infodi | --infod | --info | --inf)
373 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
374 infodir="$ac_optarg" ;;
376 -libdir | --libdir | --libdi | --libd)
378 -libdir=* | --libdir=* | --libdi=* | --libd=*)
379 libdir="$ac_optarg" ;;
381 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
382 | --libexe | --libex | --libe)
383 ac_prev=libexecdir ;;
384 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
385 | --libexe=* | --libex=* | --libe=*)
386 libexecdir="$ac_optarg" ;;
388 -localstatedir | --localstatedir | --localstatedi | --localstated \
389 | --localstate | --localstat | --localsta | --localst \
390 | --locals | --local | --loca | --loc | --lo)
391 ac_prev=localstatedir ;;
392 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
393 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
394 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
395 localstatedir="$ac_optarg" ;;
397 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
399 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
400 mandir="$ac_optarg" ;;
403 # Obsolete; use --without-fp.
406 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
410 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
411 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
414 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
415 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
416 | --oldin | --oldi | --old | --ol | --o)
417 ac_prev=oldincludedir ;;
418 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
419 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
420 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
421 oldincludedir="$ac_optarg" ;;
423 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
425 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
426 prefix="$ac_optarg" ;;
428 -program-prefix | --program-prefix | --program-prefi | --program-pref \
429 | --program-pre | --program-pr | --program-p)
430 ac_prev=program_prefix ;;
431 -program-prefix=* | --program-prefix=* | --program-prefi=* \
432 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
433 program_prefix="$ac_optarg" ;;
435 -program-suffix | --program-suffix | --program-suffi | --program-suff \
436 | --program-suf | --program-su | --program-s)
437 ac_prev=program_suffix ;;
438 -program-suffix=* | --program-suffix=* | --program-suffi=* \
439 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
440 program_suffix="$ac_optarg" ;;
442 -program-transform-name | --program-transform-name \
443 | --program-transform-nam | --program-transform-na \
444 | --program-transform-n | --program-transform- \
445 | --program-transform | --program-transfor \
446 | --program-transfo | --program-transf \
447 | --program-trans | --program-tran \
448 | --progr-tra | --program-tr | --program-t)
449 ac_prev=program_transform_name ;;
450 -program-transform-name=* | --program-transform-name=* \
451 | --program-transform-nam=* | --program-transform-na=* \
452 | --program-transform-n=* | --program-transform-=* \
453 | --program-transform=* | --program-transfor=* \
454 | --program-transfo=* | --program-transf=* \
455 | --program-trans=* | --program-tran=* \
456 | --progr-tra=* | --program-tr=* | --program-t=*)
457 program_transform_name="$ac_optarg" ;;
459 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
460 | -silent | --silent | --silen | --sile | --sil)
463 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
465 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
467 sbindir="$ac_optarg" ;;
469 -sharedstatedir | --sharedstatedir | --sharedstatedi \
470 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
471 | --sharedst | --shareds | --shared | --share | --shar \
473 ac_prev=sharedstatedir ;;
474 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
475 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
476 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
478 sharedstatedir="$ac_optarg" ;;
480 -site | --site | --sit)
482 -site=* | --site=* | --sit=*)
485 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
487 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
488 srcdir="$ac_optarg" ;;
490 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
491 | --syscon | --sysco | --sysc | --sys | --sy)
492 ac_prev=sysconfdir ;;
493 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
494 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
495 sysconfdir="$ac_optarg" ;;
497 -target | --target | --targe | --targ | --tar | --ta | --t)
499 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
500 target="$ac_optarg" ;;
502 -v | -verbose | --verbose | --verbos | --verbo | --verb)
505 -version | --version | --versio | --versi | --vers)
506 echo "configure generated by autoconf version AC_ACVERSION"
510 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
511 # Reject names that are not valid shell variable names.
513 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
515 AC_MSG_ERROR($ac_package: invalid package name)
517 ac_package=`echo $ac_package| sed 's/-/_/g'`
522 eval "with_${ac_package}='$ac_optarg'" ;;
524 -without-* | --without-*)
525 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
526 # Reject names that are not valid shell variable names.
528 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
530 AC_MSG_ERROR($ac_package: invalid package name)
532 ac_package=`echo $ac_package| sed 's/-/_/g'`
533 eval "with_${ac_package}=no" ;;
536 # Obsolete; use --with-x.
539 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
540 | --x-incl | --x-inc | --x-in | --x-i)
541 ac_prev=x_includes ;;
542 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
543 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
544 x_includes="$ac_optarg" ;;
546 -x-libraries | --x-libraries | --x-librarie | --x-librari \
547 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
548 ac_prev=x_libraries ;;
549 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
550 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
551 x_libraries="$ac_optarg" ;;
553 -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
558 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
560 AC_MSG_WARN($ac_option: invalid host type)
562 if test "x$nonopt" != xNONE; then
563 AC_MSG_ERROR(can only configure for one host and one target at a time)
571 if test -n "$ac_prev"; then
572 AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
576 dnl Try to have only one #! line, so the script doesn't look funny
577 dnl for users of AC_REVISION.
579 AC_DEFUN(AC_INIT_BINSH,
583 dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
585 [sinclude(acsite.m4)dnl
586 sinclude(./aclocal.m4)dnl
587 AC_REQUIRE([AC_INIT_BINSH])dnl
589 AC_DIVERT_POP()dnl to NORMAL
590 AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
592 AC_INIT_PREPARE($1)dnl
593 AC_DIVERT_POP()dnl to NORMAL
596 dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
597 AC_DEFUN(AC_INIT_PREPARE,
598 [trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
600 # File descriptor usage:
603 # 2 errors and warnings
604 # 3 some systems may open it to /dev/tty
605 # 4 used on the Kubota Titan
606 define(AC_FD_MSG, 6)dnl
607 [#] AC_FD_MSG checking for... messages and results
608 define(AC_FD_CC, 5)dnl
609 [#] AC_FD_CC compiler messages saved in config.log
610 if test "$silent" = yes; then
611 exec AC_FD_MSG>/dev/null
615 exec AC_FD_CC>./config.log
618 This file contains any messages produced by compilers while
619 running configure, to aid debugging if configure makes a mistake.
622 # Strip out --no-create and --no-recursion so they do not pile up.
623 # Also quote any args containing shell metacharacters.
628 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
629 | --no-cr | --no-c) ;;
630 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
631 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
632 changequote(<<, >>)dnl
633 dnl If you change this globbing pattern, test it on an old shell --
634 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
635 *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
636 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
638 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
643 # Only set these to C if already set. These must not be set unconditionally
644 # because not all systems understand e.g. LANG=C (notably SCO).
645 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
646 # Non-C LC_CTYPE values break the ctype check.
647 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
648 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
649 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
650 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
652 # confdefs.h avoids OS command line length limits that DEFS can exceed.
653 rm -rf conftest* confdefs.h
654 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
657 # A filename unique to this package, relative to the directory that
658 # configure is in, which we can look for to find out if srcdir is correct.
661 # Find the source files, if location was not specified.
662 if test -z "$srcdir"; then
663 ac_srcdir_defaulted=yes
664 # Try the directory containing this script, then its parent.
667 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
669 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
671 if test ! -r $srcdir/$ac_unique_file; then
675 ac_srcdir_defaulted=no
677 if test ! -r $srcdir/$ac_unique_file; then
678 if test "$ac_srcdir_defaulted" = yes; then
679 AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
681 AC_MSG_ERROR(can not find sources in $srcdir)
684 dnl Double slashes in pathnames in object file debugging info
685 dnl mess up M-x gdb in Emacs.
687 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
690 dnl Let the site file select an alternate cache file if it wants to.
694 dnl By default always use an empty string as the executable
695 dnl extension. Only change it if the script calls AC_EXEEXT.
697 dnl By default assume that objects files use an extension of .o. Only
698 dnl change it if the script calls AC_OBJEXT.
701 dnl Substitute for predefined variables.
704 AC_SUBST(CPPFLAGS)dnl
705 AC_SUBST(CXXFLAGS)dnl
710 AC_SUBST(exec_prefix)dnl
712 AC_SUBST(program_transform_name)dnl
713 dnl Installation directory options.
716 AC_SUBST(libexecdir)dnl
718 AC_SUBST(sysconfdir)dnl
719 AC_SUBST(sharedstatedir)dnl
720 AC_SUBST(localstatedir)dnl
722 AC_SUBST(includedir)dnl
723 AC_SUBST(oldincludedir)dnl
729 dnl ### Selecting optional features
732 dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
733 AC_DEFUN(AC_ARG_ENABLE,
734 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
738 [#] Check whether --enable-[$1] or --disable-[$1] was given.
739 if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
740 enableval="[$enable_]patsubst([$1], -, _)"
741 ifelse([$3], , :, [$3])
742 ifelse([$4], , , [else
749 [AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
750 AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl
754 dnl ### Working with optional software
757 dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
758 AC_DEFUN(AC_ARG_WITH,
759 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
763 [#] Check whether --with-[$1] or --without-[$1] was given.
764 if test "[${with_]patsubst([$1], -, _)+set}" = set; then
765 withval="[$with_]patsubst([$1], -, _)"
766 ifelse([$3], , :, [$3])
767 ifelse([$4], , , [else
774 [AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
775 AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl
779 dnl ### Transforming program names.
783 AC_DEFUN(AC_ARG_PROGRAM,
784 [if test "$program_transform_name" = s,x,x,; then
785 program_transform_name=
787 # Double any \ or $. echo might interpret backslashes.
788 cat <<\EOF_SED > conftestsed
789 s,\\,\\\\,g; s,\$,$$,g
791 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
794 test "$program_prefix" != NONE &&
795 program_transform_name="s,^,${program_prefix},; $program_transform_name"
796 # Use a double $ so make ignores it.
797 test "$program_suffix" != NONE &&
798 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
800 # sed with no file args requires a program.
801 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
805 dnl ### Version numbers
808 dnl AC_REVISION(REVISION-INFO)
809 AC_DEFUN(AC_REVISION,
810 [AC_REQUIRE([AC_INIT_BINSH])dnl
811 [# From configure.in] translit([$1], $")])
813 dnl Subroutines of AC_PREREQ.
815 dnl Change the dots in NUMBER into commas.
816 dnl AC_PREREQ_SPLIT(NUMBER)
817 define(AC_PREREQ_SPLIT,
818 [translit($1, ., [, ])])
820 dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
821 dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
822 define(AC_PREREQ_CANON,
823 [$1, $2, ifelse([$3], , 0, [$3])])
825 dnl Complain and exit if version number 1 is less than version number 2.
826 dnl PRINTABLE2 is the printable version of version number 2.
827 dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
829 define(AC_PREREQ_COMPARE,
830 [ifelse(builtin([eval],
831 [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
833 FATAL ERROR: Autoconf version $7 or higher is required for this script
836 dnl Complain and exit if the Autoconf version is less than VERSION.
837 dnl AC_PREREQ(VERSION)
839 [AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
840 AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
843 dnl ### Getting the canonical system type
846 dnl Find install-sh, config.sub, config.guess, and Cygnus configure
847 dnl in directory DIR. These are auxiliary files used in configuration.
848 dnl DIR can be either absolute or relative to $srcdir.
849 dnl AC_CONFIG_AUX_DIR(DIR)
850 AC_DEFUN(AC_CONFIG_AUX_DIR,
851 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
853 dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
854 dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
855 AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
856 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
858 dnl Internal subroutine.
859 dnl Search for the configuration auxiliary files in directory list $1.
860 dnl We look only for install-sh, so users of AC_PROG_INSTALL
861 dnl do not automatically need to distribute the other auxiliary files.
862 dnl AC_CONFIG_AUX_DIRS(DIR ...)
863 AC_DEFUN(AC_CONFIG_AUX_DIRS,
866 if test -f $ac_dir/install-sh; then
868 ac_install_sh="$ac_aux_dir/install-sh -c"
870 elif test -f $ac_dir/install.sh; then
872 ac_install_sh="$ac_aux_dir/install.sh -c"
876 if test -z "$ac_aux_dir"; then
877 AC_MSG_ERROR([can not find install-sh or install.sh in $1])
879 ac_config_guess=$ac_aux_dir/config.guess
880 ac_config_sub=$ac_aux_dir/config.sub
881 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
882 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
885 dnl Canonicalize the host, target, and build system types.
886 AC_DEFUN(AC_CANONICAL_SYSTEM,
887 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
888 AC_BEFORE([$0], [AC_ARG_PROGRAM])
889 # Do some error checking and defaulting for the host and target type.
891 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
894 # 1. You are not allowed to specify --host, --target, and nonopt at the
896 # 2. Host defaults to nonopt.
897 # 3. If nonopt is not specified, then host defaults to the current host,
898 # as determined by config.guess.
899 # 4. Target and build default to nonopt.
900 # 5. If nonopt is not specified, then target and build default to host.
902 # The aliases save the names the user supplied, while $host etc.
903 # will get canonicalized.
904 case $host---$target---$nonopt in
905 NONE---*---* | *---NONE---* | *---*---NONE) ;;
906 *) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
912 test "$host_alias" != "$target_alias" &&
913 test "$program_prefix$program_suffix$program_transform_name" = \
915 program_prefix=${target_alias}-
918 dnl Subroutines of AC_CANONICAL_SYSTEM.
920 AC_DEFUN(AC_CANONICAL_HOST,
921 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
923 # Make sure we can run config.sub.
924 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
925 else AC_MSG_ERROR(can not run $ac_config_sub)
928 AC_MSG_CHECKING(host system type)
932 case "$host_alias" in
936 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
937 else AC_MSG_ERROR(can not guess host type; you must specify one)
939 *) host_alias=$nonopt ;;
943 dnl Set the other host vars.
944 changequote(<<, >>)dnl
945 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
946 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
952 AC_SUBST(host_alias)dnl
953 AC_SUBST(host_cpu)dnl
954 AC_SUBST(host_vendor)dnl
958 dnl Internal use only.
959 AC_DEFUN(AC_CANONICAL_TARGET,
960 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
961 AC_MSG_CHECKING(target system type)
963 dnl Set target_alias.
965 case "$target_alias" in
968 NONE) target_alias=$host_alias ;;
969 *) target_alias=$nonopt ;;
973 dnl Set the other target vars.
974 changequote(<<, >>)dnl
975 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
976 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
977 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
978 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
980 AC_MSG_RESULT($target)
982 AC_SUBST(target_alias)dnl
983 AC_SUBST(target_cpu)dnl
984 AC_SUBST(target_vendor)dnl
985 AC_SUBST(target_os)dnl
988 dnl Internal use only.
989 AC_DEFUN(AC_CANONICAL_BUILD,
990 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
991 AC_MSG_CHECKING(build system type)
995 case "$build_alias" in
998 NONE) build_alias=$host_alias ;;
999 *) build_alias=$nonopt ;;
1003 dnl Set the other build vars.
1004 changequote(<<, >>)dnl
1005 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1006 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1007 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1008 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1009 changequote([, ])dnl
1010 AC_MSG_RESULT($build)
1012 AC_SUBST(build_alias)dnl
1013 AC_SUBST(build_cpu)dnl
1014 AC_SUBST(build_vendor)dnl
1015 AC_SUBST(build_os)dnl
1019 dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
1020 dnl if the cache file is inconsistent with the current host,
1021 dnl target and build system types, execute CMD or print a default
1023 AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
1024 AC_REQUIRE([AC_CANONICAL_SYSTEM])
1025 AC_MSG_CHECKING([cached system tuple])
1026 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1027 test x"$ac_cv_host_system_type" != x"$host"; } ||
1028 { test x"${ac_cv_build_system_type+set}" = x"set" &&
1029 test x"$ac_cv_build_system_type" != x"$build"; } ||
1030 { test x"${ac_cv_target_system_type+set}" = x"set" &&
1031 test x"$ac_cv_target_system_type" != x"$target"; }; then
1032 AC_MSG_RESULT([different])
1034 [AC_MSG_ERROR([remove config.cache and re-run configure])])
1038 ac_cv_host_system_type="$host"
1039 ac_cv_build_system_type="$build"
1040 ac_cv_target_system_type="$target"
1044 dnl ### Caching test results
1047 dnl Look for site or system specific initialization scripts.
1049 define(AC_SITE_LOAD,
1050 [# Prefer explicitly selected file to automatically selected ones.
1051 if test -z "$CONFIG_SITE"; then
1052 if test "x$prefix" != xNONE; then
1053 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1055 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1058 for ac_site_file in $CONFIG_SITE; do
1059 if test -r "$ac_site_file"; then
1060 echo "loading site script $ac_site_file"
1067 define(AC_CACHE_LOAD,
1068 [if test -r "$cache_file"; then
1069 echo "loading cache $cache_file"
1072 echo "creating cache $cache_file"
1078 define(AC_CACHE_SAVE,
1079 [cat > confcache <<\EOF
1080 # This file is a shell script that caches the results of configure
1081 # tests run on this system so they can be shared between configure
1082 # scripts and configure runs. It is not useful on other systems.
1083 # If it contains results you don't want to keep, you may remove or edit it.
1085 # By default, configure uses ./config.cache as the cache file,
1086 # creating it if it does not exist already. You can give configure
1087 # the --cache-file=FILE option to use a different cache file; that is
1088 # what configure does when it calls configure scripts in
1089 # subdirectories, so they share the cache.
1090 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1091 # config.status only pays attention to the cache file if you give it the
1092 # --recheck option to rerun configure.
1095 dnl Allow a site initialization script to override cache values.
1096 # The following way of writing the cache mishandles newlines in values,
1097 # but we know of no workaround that is simple, portable, and efficient.
1098 # So, don't put newlines in cache variables' values.
1099 # Ultrix sh set writes to stderr and can't be redirected directly,
1100 # and sets the high bit in the cache file unless we assign to the vars.
1103 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1105 # `set' does not quote correctly, so add quotes (double-quote substitution
1106 # turns \\\\ into \\, and sed turns \\ into \).
1108 -e "s/'/'\\\\''/g" \
1109 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1112 # `set' quotes correctly as required by POSIX, so do not add quotes.
1113 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1116 changequote([, ])dnl
1117 if cmp -s $cache_file confcache; then
1120 if test -w $cache_file; then
1121 echo "updating cache $cache_file"
1122 cat confcache > $cache_file
1124 echo "not updating unwritable cache $cache_file"
1130 dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1131 dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1132 define(AC_CACHE_VAL,
1133 [dnl We used to use the below line, but it fails if the 1st arg is a
1134 dnl shell variable, so we need the eval.
1135 dnl if test "${$1+set}" = set; then
1136 dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
1137 if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
1144 dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1145 define(AC_CACHE_CHECK,
1146 [AC_MSG_CHECKING([$1])
1147 AC_CACHE_VAL([$2], [$3])dnl
1148 AC_MSG_RESULT([$]$2)])
1151 dnl ### Defining symbols
1154 dnl Set VARIABLE to VALUE, verbatim, or 1.
1155 dnl AC_DEFINE(VARIABLE [, VALUE])
1157 [cat >> confdefs.h <<\EOF
1158 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1162 dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
1163 define(AC_DEFINE_UNQUOTED,
1164 [cat >> confdefs.h <<EOF
1165 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1170 dnl ### Setting output variables
1173 dnl This macro protects VARIABLE from being diverted twice
1174 dnl if this macro is called twice for it.
1175 dnl AC_SUBST(VARIABLE)
1177 [ifdef([AC_SUBST_$1], ,
1178 [define([AC_SUBST_$1], )dnl
1179 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1184 dnl AC_SUBST_FILE(VARIABLE)
1185 define(AC_SUBST_FILE,
1186 [ifdef([AC_SUBST_$1], ,
1187 [define([AC_SUBST_$1], )dnl
1188 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1195 dnl ### Printing messages
1198 dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
1199 define(AC_MSG_CHECKING,
1200 [echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
1201 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1203 dnl AC_CHECKING(FEATURE-DESCRIPTION)
1205 [echo "checking $1" 1>&AC_FD_MSG
1206 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1208 dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
1209 define(AC_MSG_RESULT,
1210 [echo "$ac_t""$1" 1>&AC_FD_MSG])
1212 dnl AC_MSG_RESULTPROTO(RESULT-PROTOTYPE-DESCRIPTION)
1213 define(AC_MSG_RESULTPROTO,
1214 [AC_MSG_RESULT(${ac_tt}[$1])
1215 dnl ac_proto=`echo "$1" | tr -s ' '`
1216 dnl AC_MSG_RESULT(${ac_tt}${ac_proto})
1219 dnl AC_VERBOSE(RESULT-DESCRIPTION)
1221 [AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
1222 echo " $1" 1>&AC_FD_MSG])
1224 dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
1226 [echo "configure: warning: $1" 1>&2])
1228 dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
1229 define(AC_MSG_ERROR,
1230 [{ echo "configure: error: $1" 1>&2; exit 1; }])
1233 dnl ### Selecting which language to use for testing
1238 [define([AC_LANG], [C])dnl
1240 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1241 ac_cpp='$CPP $CPPFLAGS'
1242 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1243 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1244 cross_compiling=$ac_cv_prog_cc_cross
1247 dnl AC_LANG_CPLUSPLUS()
1248 AC_DEFUN(AC_LANG_CPLUSPLUS,
1249 [define([AC_LANG], [CPLUSPLUS])dnl
1251 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1252 ac_cpp='$CXXCPP $CPPFLAGS'
1253 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1254 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1255 cross_compiling=$ac_cv_prog_cxx_cross
1258 dnl AC_LANG_FORTRAN77()
1259 AC_DEFUN(AC_LANG_FORTRAN77,
1260 [define([AC_LANG], [FORTRAN77])dnl
1262 ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
1263 ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
1264 cross_compiling=$ac_cv_prog_f77_cross
1267 dnl Push the current language on a stack.
1269 define(AC_LANG_SAVE,
1270 [pushdef([AC_LANG_STACK], AC_LANG)])
1272 dnl Restore the current language from the stack.
1273 dnl AC_LANG_RESTORE()
1274 pushdef([AC_LANG_RESTORE],
1275 [ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
1276 AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
1277 AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
1279 dnl Expands to the "extern ..." prefix used for system declarations.
1280 dnl AC_LANG_EXTERN()
1281 define(AC_LANG_EXTERN,
1289 dnl ### Compiler-running mechanics
1292 dnl The purpose of this macro is to "configure:123: command line"
1293 dnl written into config.log for every test run.
1294 dnl AC_TRY_EVAL(VARIABLE)
1295 AC_DEFUN(AC_TRY_EVAL,
1296 [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
1297 (eval [$]$1) 2>&AC_FD_CC; }])
1299 dnl AC_TRY_COMMAND(COMMAND)
1300 AC_DEFUN(AC_TRY_COMMAND,
1301 [{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
1304 dnl ### Dependencies between macros
1307 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
1309 [ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
1312 dnl AC_REQUIRE(MACRO-NAME)
1314 [ifdef([AC_PROVIDE_$1], ,
1315 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
1320 dnl AC_PROVIDE(MACRO-NAME)
1322 [define([AC_PROVIDE_$1], )])
1324 dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
1326 [errprint(__file__:__line__: warning: [$1] is obsolete[$2]
1330 dnl ### Checking for programs
1333 dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
1334 dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
1335 AC_DEFUN(AC_CHECK_PROG,
1336 [# Extract the first word of "$2", so it can be a program name with args.
1337 set dummy $2; ac_word=[$]2
1338 AC_MSG_CHECKING([for $ac_word])
1339 AC_CACHE_VAL(ac_cv_prog_$1,
1340 [if test -n "[$]$1"; then
1341 ac_cv_prog_$1="[$]$1" # Let the user override the test.
1343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1344 ifelse([$6], , , [ ac_prog_rejected=no
1346 dnl $ac_dummy forces splitting on constant user-supplied paths.
1347 dnl POSIX.2 word splitting is done only on the output of word expansions,
1348 dnl not every word. This closes a longstanding sh security hole.
1349 ac_dummy="ifelse([$5], , $PATH, [$5])"
1350 for ac_dir in $ac_dummy; do
1351 test -z "$ac_dir" && ac_dir=.
1352 if test -f $ac_dir/$ac_word; then
1353 ifelse([$6], , , dnl
1354 [ if test "[$ac_dir/$ac_word]" = "$6"; then
1355 ac_prog_rejected=yes
1364 ifelse([$6], , , [if test $ac_prog_rejected = yes; then
1365 # We found a bogon in the path, so make sure we never use it.
1366 set dummy [$]ac_cv_prog_$1
1368 if test [$]# -gt 0; then
1369 # We chose a different compiler from the bogus one.
1370 # However, it has the same basename, so the bogon will be chosen
1371 # first if we set $1 to just the basename; use the full file name.
1373 set dummy "$ac_dir/$ac_word" "[$]@"
1375 ac_cv_prog_$1="[$]@"
1376 ifelse([$2], [$4], dnl
1378 # Default is a loser.
1379 AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
1380 ifelse([$5], , [\$]PATH, [$5])])
1385 dnl If no 4th arg is given, leave the cache variable unset,
1386 dnl so AC_CHECK_PROGS will keep looking.
1387 ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
1391 if test -n "[$]$1"; then
1392 AC_MSG_RESULT([$]$1)
1399 dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
1400 AC_DEFUN(AC_PATH_PROG,
1401 [# Extract the first word of "$2", so it can be a program name with args.
1402 set dummy $2; ac_word=[$]2
1403 AC_MSG_CHECKING([for $ac_word])
1404 AC_CACHE_VAL(ac_cv_path_$1,
1407 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1410 ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
1413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1414 dnl $ac_dummy forces splitting on constant user-supplied paths.
1415 dnl POSIX.2 word splitting is done only on the output of word expansions,
1416 dnl not every word. This closes a longstanding sh security hole.
1417 ac_dummy="ifelse([$4], , $PATH, [$4])"
1418 for ac_dir in $ac_dummy; do
1419 test -z "$ac_dir" && ac_dir=.
1420 if test -f $ac_dir/$ac_word; then
1421 ac_cv_path_$1="$ac_dir/$ac_word"
1426 dnl If no 3rd arg is given, leave the cache variable unset,
1427 dnl so AC_PATH_PROGS will keep looking.
1428 ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
1433 if test -n "[$]$1"; then
1434 AC_MSG_RESULT([$]$1)
1441 dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1443 AC_DEFUN(AC_CHECK_PROGS,
1446 AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
1447 test -n "[$]$1" && break
1449 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1452 dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1454 AC_DEFUN(AC_PATH_PROGS,
1457 AC_PATH_PROG($1, [$]ac_prog, , $4)
1458 test -n "[$]$1" && break
1460 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1463 dnl Internal subroutine.
1464 AC_DEFUN(AC_CHECK_TOOL_PREFIX,
1465 [AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1466 if test $host != $build; then
1467 ac_tool_prefix=${host_alias}-
1473 dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
1474 AC_DEFUN(AC_CHECK_TOOL,
1475 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
1476 AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
1477 ifelse([$3], , [$2], ), $4)
1479 if test -z "$ac_cv_prog_$1"; then
1480 if test -n "$ac_tool_prefix"; then
1481 AC_CHECK_PROG($1, $2, $2, $3)
1488 dnl Guess the value for the `prefix' variable by looking for
1489 dnl the argument program along PATH and taking its parent.
1490 dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
1491 dnl set `prefix' to /usr/local/gnu.
1492 dnl This comes too late to find a site file based on the prefix,
1493 dnl and it might use a cached value for the path.
1494 dnl No big loss, I think, since most configures don't use this macro anyway.
1495 dnl AC_PREFIX_PROGRAM(PROGRAM)
1496 AC_DEFUN(AC_PREFIX_PROGRAM,
1497 [if test "x$prefix" = xNONE; then
1498 changequote(<<, >>)dnl
1499 define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
1500 changequote([, ])dnl
1501 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
1502 echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
1503 AC_PATH_PROG(AC_VAR_NAME, $1)
1504 changequote(<<, >>)dnl
1505 if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
1506 prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1507 changequote([, ])dnl
1510 undefine([AC_VAR_NAME])dnl
1513 dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to
1514 dnl `yes' if the current compiler works, otherwise set it ti `no'. Set
1515 dnl CROSS-VAR to `yes' if the compiler and linker produce non-native
1516 dnl executables, otherwise set it to `no'. Before calling
1517 dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
1520 dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
1521 AC_DEFUN(AC_TRY_COMPILER,
1522 [cat > conftest.$ac_ext << EOF
1523 ifelse(AC_LANG, [FORTRAN77], ,
1525 [#]line __oline__ "configure"
1526 #include "confdefs.h"
1530 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1532 # If we can't run a trivial program, we are probably using a cross compiler.
1533 if (./conftest; exit) 2>/dev/null; then
1539 echo "configure: failed program was:" >&AC_FD_CC
1540 cat conftest.$ac_ext >&AC_FD_CC
1546 dnl ### Checking for libraries
1549 dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
1550 dnl Try to link a program that calls FUNC, handling GCC builtins. If
1551 dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
1552 dnl ACTION-IF-NOT-FOUND.
1554 AC_DEFUN(AC_TRY_LINK_FUNC,
1556 ifelse([$1], [main], , dnl Avoid conflicting decl of main.
1557 [/* Override any gcc2 internal prototype to avoid an error. */
1558 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1562 [/* We use char because int might match the return type of a gcc2
1563 builtin and then its argument prototype would still apply. */
1571 dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
1572 dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
1573 dnl Search for a library defining FUNC, if it's not already available.
1575 AC_DEFUN(AC_SEARCH_LIBS,
1577 AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
1578 [ac_func_search_save_LIBS="$LIBS"
1579 ac_cv_search_$1="no"
1580 AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
1581 test "$ac_cv_search_$1" = "no" && for i in $2; do
1582 LIBS="-l$i $5 $ac_func_search_save_LIBS"
1583 AC_TRY_LINK_FUNC([$1],
1584 [ac_cv_search_$1="-l$i"
1587 LIBS="$ac_func_search_save_LIBS"])
1588 if test "$ac_cv_search_$1" != "no"; then
1589 test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
1597 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1598 dnl [, OTHER-LIBRARIES]]])
1599 AC_DEFUN(AC_CHECK_LIB,
1600 [AC_MSG_CHECKING(ifelse([$2], [main], [for -l$1], [for $2 in -l$1]))
1601 dnl Use a cache variable name containing both the library and function name,
1602 dnl because the test really is for library $1 defining function $2, not
1603 dnl just for library $1. Separate tests with the same $1 and different $2s
1604 dnl may have different results.
1605 ac_lib_var=`echo ifelse([$2],main,[$1],[$1[_]$2]) | sed 'y%./+-%__p_%'`
1606 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
1607 [ac_save_LIBS="$LIBS"
1608 LIBS="-l$1 $5 $LIBS"
1609 AC_TRY_LINK(ifelse(AC_LANG, [FORTRAN77], ,
1610 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
1611 [/* Override any gcc2 internal prototype to avoid an error. */
1615 /* We use char because int might match the return type of a gcc2
1616 builtin and then its argument prototype would still apply. */
1620 eval "ac_cv_lib_$ac_lib_var=yes",
1621 eval "ac_cv_lib_$ac_lib_var=no")
1622 LIBS="$ac_save_LIBS"
1624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1628 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1629 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1630 changequote([, ])dnl
1631 AC_DEFINE_UNQUOTED($ac_tr_lib)
1636 ifelse([$4], , , [$4
1641 dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
1642 dnl [, OTHER-LIBRARIES]]])
1643 AC_DEFUN(AC_HAVE_LIBRARY,
1644 [AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
1645 changequote(<<, >>)dnl
1646 define(<<AC_LIB_NAME>>, dnl
1647 patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
1648 define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
1649 changequote([, ])dnl
1650 AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
1651 AC_CACHE_VAL(AC_CV_NAME,
1652 [ac_save_LIBS="$LIBS"
1653 LIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
1654 AC_TRY_LINK( , [int main()], AC_CV_NAME=yes, AC_CV_NAME=no)
1655 LIBS="$ac_save_LIBS"
1657 AC_MSG_RESULT($AC_CV_NAME)
1658 if test "$AC_CV_NAME" = yes; then
1660 [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
1661 LIBS="-l[]AC_LIB_NAME[] $LIBS"
1663 ifelse([$3], , , [else
1667 undefine([AC_LIB_NAME])dnl
1668 undefine([AC_CV_NAME])dnl
1672 dnl ### Examining declarations
1675 dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1676 AC_DEFUN(AC_TRY_CPP,
1677 [AC_REQUIRE_CPP()dnl
1678 cat > conftest.$ac_ext <<EOF
1679 [#]line __oline__ "configure"
1680 #include "confdefs.h"
1683 dnl Capture the stderr of cpp. eval is necessary to expand ac_cpp.
1684 dnl We used to copy stderr to stdout and capture it in a variable, but
1685 dnl that breaks under sh -x, which writes compile commands starting
1686 dnl with ` +' to stderr in eval and subshells.
1687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1690 if test -z "$ac_err"; then
1691 ifelse([$2], , :, [rm -rf conftest*
1694 echo "$ac_err" >&AC_FD_CC
1695 echo "configure: failed program was:" >&AC_FD_CC
1696 cat conftest.$ac_ext >&AC_FD_CC
1697 ifelse([$3], , , [ rm -rf conftest*
1703 dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
1704 dnl ACTION-IF-NOT-FOUND])
1705 AC_DEFUN(AC_EGREP_HEADER,
1706 [AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
1708 dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
1709 dnl come early, it is not included in AC_BEFORE checks.
1710 dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
1711 dnl ACTION-IF-NOT-FOUND]])
1712 AC_DEFUN(AC_EGREP_CPP,
1713 [AC_REQUIRE_CPP()dnl
1714 cat > conftest.$ac_ext <<EOF
1715 [#]line __oline__ "configure"
1716 #include "confdefs.h"
1719 dnl eval is necessary to expand ac_cpp.
1720 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
1721 if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
1722 dnl Prevent m4 from eating character classes:
1724 egrep "$1" >/dev/null 2>&1; then
1725 changequote([, ])dnl
1726 ifelse([$3], , :, [rm -rf conftest*
1728 ifelse([$4], , , [else
1737 dnl ### Examining syntax
1740 dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
1741 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1742 AC_DEFUN(AC_TRY_COMPILE,
1743 [cat > conftest.$ac_ext <<EOF
1744 ifelse(AC_LANG, [FORTRAN77],
1748 [dnl This sometimes fails to find confdefs.h, for some reason.
1749 dnl [#]line __oline__ "[$]0"
1750 [#]line __oline__ "configure"
1751 #include "confdefs.h"
1757 if AC_TRY_EVAL(ac_compile); then
1758 ifelse([$3], , :, [rm -rf conftest*
1761 echo "configure: failed program was:" >&AC_FD_CC
1762 cat conftest.$ac_ext >&AC_FD_CC
1763 ifelse([$4], , , [ rm -rf conftest*
1770 dnl ### Examining libraries
1773 dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
1774 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
1775 AC_DEFUN(AC_COMPILE_CHECK,
1776 [AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
1777 ifelse([$1], , , [AC_CHECKING([for $1])
1779 AC_TRY_LINK([$2], [$3], [$4], [$5])
1782 dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
1783 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1784 AC_DEFUN(AC_TRY_LINK,
1785 [cat > conftest.$ac_ext <<EOF
1786 ifelse(AC_LANG, [FORTRAN77],
1792 [dnl This sometimes fails to find confdefs.h, for some reason.
1793 dnl [#]line __oline__ "[$]0"
1794 [#]line __oline__ "configure"
1795 #include "confdefs.h"
1801 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1802 ifelse([$3], , :, [rm -rf conftest*
1805 echo "configure: failed program was:" >&AC_FD_CC
1806 cat conftest.$ac_ext >&AC_FD_CC
1807 ifelse([$4], , , [ rm -rf conftest*
1814 dnl ### Checking for run-time features
1817 dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
1818 dnl [, ACTION-IF-CROSS-COMPILING]]])
1819 AC_DEFUN(AC_TRY_RUN,
1820 [if test "$cross_compiling" = yes; then
1822 [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
1824 AC_MSG_ERROR(can not run test program while cross compiling)],
1827 AC_TRY_RUN_NATIVE([$1], [$2], [$3])
1831 dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
1832 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
1833 AC_DEFUN(AC_TRY_RUN_NATIVE,
1834 [cat > conftest.$ac_ext <<EOF
1835 [#]line __oline__ "configure"
1836 #include "confdefs.h"
1838 extern "C" void exit(int);
1842 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1844 dnl Don't remove the temporary files here, so they can be examined.
1845 ifelse([$2], , :, [$2])
1847 echo "configure: failed program was:" >&AC_FD_CC
1848 cat conftest.$ac_ext >&AC_FD_CC
1849 ifelse([$3], , , [ rm -fr conftest*
1853 if test -f core; then
1854 coredir=core`/bin/sh -c 'echo $$'`
1856 cp confdefs.h $coredir/confdefs.h
1857 mv conftest.c $coredir/conftest.c
1858 mv conftest $coredir/conftest
1859 mv core $coredir/core
1860 echo "warning: test program dumped core -- see subdirectory $coredir"
1865 dnl ### Checking for header files
1868 dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1869 AC_DEFUN(AC_CHECK_HEADER,
1870 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1871 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1872 AC_MSG_CHECKING([for $1])
1873 AC_CACHE_VAL(ac_cv_header_$ac_safe,
1874 [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
1875 eval "ac_cv_header_$ac_safe=no")])dnl
1876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1878 ifelse([$2], , :, [$2])
1881 ifelse([$3], , , [$3
1886 dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1887 AC_DEFUN(AC_CHECK_HEADERS,
1890 AC_CHECK_HEADER($ac_hdr,
1892 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1893 changequote([, ])dnl
1894 AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
1899 dnl ### Checking for the existence of files
1901 dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1902 AC_DEFUN(AC_CHECK_FILE,
1903 [AC_REQUIRE([AC_PROG_CC])
1904 dnl Do the transliteration at runtime so arg 1 can be a shell variable.
1905 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
1906 AC_MSG_CHECKING([for $1])
1907 AC_CACHE_VAL(ac_cv_file_$ac_safe,
1908 [if test "$cross_compiling" = yes; then
1909 errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
1911 AC_MSG_ERROR(Cannot check for file existence when cross compiling)
1914 eval "ac_cv_file_$ac_safe=yes"
1916 eval "ac_cv_file_$ac_safe=no"
1919 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1921 ifelse([$2], , :, [$2])
1924 ifelse([$3], , , [$3])
1928 dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1929 AC_DEFUN(AC_CHECK_FILES,
1932 AC_CHECK_FILE($ac_file,
1934 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1935 changequote([, ])dnl
1936 AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
1941 dnl ### Checking for library functions
1944 dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1945 AC_DEFUN(AC_CHECK_FUNC,
1946 [AC_MSG_CHECKING([for $1])
1947 AC_CACHE_VAL(ac_cv_func_$1,
1949 dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
1950 dnl which includes <sys/select.h> which contains a prototype for
1951 dnl select. Similarly for bzero.
1952 [/* System header to define __stub macros and hopefully few prototypes,
1953 which can conflict with char $1(); below. */
1955 /* Override any gcc2 internal prototype to avoid an error. */
1959 /* We use char because int might match the return type of a gcc2
1960 builtin and then its argument prototype would still apply. */
1963 /* The GNU C library defines this for functions which it implements
1964 to always fail with ENOSYS. Some functions are actually named
1965 something starting with __ and the normal name is an alias. */
1966 #if defined (__stub_$1) || defined (__stub___$1)
1971 ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
1972 if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
1974 ifelse([$2], , :, [$2])
1977 ifelse([$3], , , [$3
1982 dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1983 AC_DEFUN(AC_CHECK_FUNCS,
1986 AC_CHECK_FUNC($ac_func,
1988 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1989 changequote([, ])dnl
1990 AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
1994 dnl AC_REPLACE_FUNCS(FUNCTION...)
1995 AC_DEFUN(AC_REPLACE_FUNCS,
1996 [AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
1997 AC_SUBST(LIBOBJS)dnl
2001 dnl ### Checking compiler characteristics
2004 dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
2005 AC_DEFUN(AC_CHECK_SIZEOF,
2006 [changequote(<<, >>)dnl
2007 dnl The name to #define.
2008 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
2009 dnl The cache variable name.
2010 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
2011 changequote([, ])dnl
2012 AC_MSG_CHECKING(size of $1)
2013 AC_CACHE_VAL(AC_CV_NAME,
2014 [AC_TRY_RUN([#include <stdio.h>
2017 FILE *f=fopen("conftestval", "w");
2019 fprintf(f, "%d\n", sizeof($1));
2021 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
2022 AC_MSG_RESULT($AC_CV_NAME)
2023 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
2024 undefine([AC_TYPE_NAME])dnl
2025 undefine([AC_CV_NAME])dnl
2029 dnl ### Checking for typedefs
2032 dnl AC_CHECK_TYPE(TYPE, DEFAULT)
2033 AC_DEFUN(AC_CHECK_TYPE,
2034 [AC_REQUIRE([AC_HEADER_STDC])dnl
2035 AC_MSG_CHECKING(for $1)
2036 AC_CACHE_VAL(ac_cv_type_$1,
2038 changequote(<<,>>)dnl
2039 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
2040 changequote([,]), [#include <sys/types.h>
2041 #if defined(STDC_HEADERS) || defined(HAVE_STDLIB_H)
2044 #if defined(STDC_HEADERS) || defined(HAVE_STDDEF_H)
2046 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
2047 AC_MSG_RESULT($ac_cv_type_$1)
2048 if test $ac_cv_type_$1 = no; then
2054 dnl ### Creating output files
2057 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
2058 AC_DEFUN(AC_CONFIG_HEADER,
2059 [define(AC_LIST_HEADER, $1)])
2061 dnl Link each of the existing files SOURCE... to the corresponding
2062 dnl link name in DEST...
2063 dnl AC_LINK_FILES(SOURCE..., DEST...)
2064 AC_DEFUN(AC_LINK_FILES,
2066 define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
2067 define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
2069 dnl Add additional commands for AC_OUTPUT to put into config.status.
2070 dnl Use diversions instead of macros so we can be robust in the
2071 dnl presence of commas in $1 and/or $2.
2072 dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
2073 AC_DEFUN(AC_OUTPUT_COMMANDS,
2074 [AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
2077 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
2081 dnl AC_CONFIG_SUBDIRS(DIR ...)
2082 AC_DEFUN(AC_CONFIG_SUBDIRS,
2083 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2084 define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
2085 subdirs="AC_LIST_SUBDIRS"
2086 AC_SUBST(subdirs)dnl
2090 dnl Produce config.status, config.h, and links; and configure subdirs.
2091 dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
2095 trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
2097 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2098 # Let make expand exec_prefix.
2099 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2101 # Any assignment to VPATH causes Sun make to only execute
2102 # the first set of double-colon rules, so remove it if not needed.
2103 # If there is a colon in the path, we need to keep it.
2104 if test "x$srcdir" = x.; then
2106 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2107 changequote([, ])dnl
2110 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2112 ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
2114 # Without the "./", some shells look in PATH for config.status.
2115 : ${CONFIG_STATUS=./config.status}
2117 echo creating $CONFIG_STATUS
2118 rm -f $CONFIG_STATUS
2119 cat > $CONFIG_STATUS <<EOF
2121 # Generated automatically by configure.
2122 # Run this file to recreate the current configuration.
2123 # This directory was configured as follows,
2124 dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
2125 dnl so uname gets run too.
2126 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2128 [#] [$]0 [$]ac_configure_args
2130 # Compiler output produced by configure, useful for debugging
2131 # configure, is in ./config.log if it exists.
2134 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2135 changequote([, ])dnl
2138 case "[\$]ac_option" in
2139 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2140 echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
2141 exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
2142 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2143 echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
2145 -help | --help | --hel | --he | --h)
2146 echo "[\$]ac_cs_usage"; exit 0 ;;
2147 *) echo "[\$]ac_cs_usage"; exit 1 ;;
2151 ac_given_srcdir=$srcdir
2152 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
2155 changequote(<<, >>)dnl
2156 ifdef(<<AC_LIST_HEADER>>,
2157 <<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
2158 <<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
2159 changequote([, ])dnl
2161 cat >> $CONFIG_STATUS <<EOF
2164 ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
2165 ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
2167 cat >> $CONFIG_STATUS <<EOF
2168 undivert(AC_DIVERSION_ICMDS)dnl
2171 cat >> $CONFIG_STATUS <<\EOF
2172 undivert(AC_DIVERSION_CMDS)dnl
2176 chmod +x $CONFIG_STATUS
2177 rm -fr confdefs* $ac_clean_files
2178 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2179 dnl config.status should not do recursion.
2180 ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
2183 dnl Set the DEFS variable to the -D options determined earlier.
2184 dnl This is a subroutine of AC_OUTPUT.
2185 dnl It is called inside configure, outside of config.status.
2186 dnl AC_OUTPUT_MAKE_DEFS()
2187 define(AC_OUTPUT_MAKE_DEFS,
2188 [# Transform confdefs.h into DEFS.
2189 dnl Using a here document instead of a string reduces the quoting nightmare.
2190 # Protect against shell expansion while executing Makefile rules.
2191 # Protect against Makefile macro expansion.
2192 cat > conftest.defs <<\EOF
2193 changequote(<<, >>)dnl
2194 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2195 s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
2199 changequote([, ])dnl
2201 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2205 dnl Do the variable substitutions to create the Makefiles or whatever.
2206 dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
2207 dnl here document whose contents are going into config.status, but
2208 dnl upon returning, the here document is being quoted.
2209 dnl AC_OUTPUT_FILES(FILE...)
2210 define(AC_OUTPUT_FILES,
2211 [# Protect against being on the right side of a sed subst in config.status.
2213 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2214 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2215 changequote([, ])dnl
2216 dnl These here document variables are unquoted when configure runs
2217 dnl but quoted when config.status runs, so variables are expanded once.
2219 dnl Shell code in configure.in might set extrasub.
2221 dnl Insert the sed substitutions of variables.
2222 undivert(AC_DIVERSION_SED)
2226 cat >> $CONFIG_STATUS <<\EOF
2228 # Split the substitutions into bite-sized pieces for seds with
2229 # small command number limits, like on Digital OSF/1 and HP-UX.
2230 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2231 ac_file=1 # Number of current file.
2232 ac_beg=1 # First line for current file.
2233 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2236 while $ac_more_lines; do
2237 if test $ac_beg -gt 1; then
2238 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2240 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2242 if test ! -s conftest.s$ac_file; then
2244 rm -f conftest.s$ac_file
2246 if test -z "$ac_sed_cmds"; then
2247 ac_sed_cmds="sed -f conftest.s$ac_file"
2249 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2251 ac_file=`expr $ac_file + 1`
2253 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2256 if test -z "$ac_sed_cmds"; then
2261 cat >> $CONFIG_STATUS <<EOF
2263 CONFIG_FILES=\${CONFIG_FILES-"$1"}
2265 cat >> $CONFIG_STATUS <<\EOF
2266 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2268 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2270 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2271 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2272 *) ac_file_in="${ac_file}.in" ;;
2275 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2277 # Remove last slash and all that follows it. Not all systems have dirname.
2278 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2279 changequote([, ])dnl
2280 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2281 # The file is in a subdirectory.
2282 test ! -d "$ac_dir" && mkdir "$ac_dir"
2283 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2284 # A "../" for each directory in $ac_dir_suffix.
2286 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2287 changequote([, ])dnl
2289 ac_dir_suffix= ac_dots=
2292 case "$ac_given_srcdir" in
2294 if test -z "$ac_dots"; then top_srcdir=.
2295 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2296 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2298 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2299 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2302 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2303 [ case "$ac_given_INSTALL" in
2305 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2306 changequote([, ])dnl
2307 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2311 echo creating "$ac_file"
2313 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2315 *Makefile*) ac_comsub="1i\\
2316 # $configure_input" ;;
2320 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2322 s%@configure_input@%$configure_input%g
2323 s%@srcdir@%$srcdir%g
2324 s%@top_srcdir@%$top_srcdir%g
2325 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
2327 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
2328 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2329 dnl This would break Makefile dependencies.
2330 dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
2331 dnl echo "$ac_file is unchanged"
2332 dnl rm -f conftest.out
2335 dnl mv conftest.out $ac_file
2341 dnl Create the config.h files from the config.h.in files.
2342 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2343 dnl here document whose contents are going into config.status.
2344 dnl AC_OUTPUT_HEADER(HEADER-FILE...)
2345 define(AC_OUTPUT_HEADER,
2346 [changequote(<<, >>)dnl
2347 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2348 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2350 # ac_d sets the value in "#define NAME VALUE" lines.
2351 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2352 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2355 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2356 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2357 ac_uB='\([ ]\)%\1#\2define\3'
2360 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2361 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2362 ac_eB='<<$>>%\1#\2define\3'
2365 # ac_f turns "#define NAME" without trailing blanks into "#define NAME VALUE".
2366 ac_fA='s%^\([ ]*\)#\([ ]*\)define\([ ][ ]*\)'
2367 ac_fB='<<$>>%\1#\2define\3'
2370 changequote([, ])dnl
2372 if test "${CONFIG_HEADERS+set}" != set; then
2374 dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
2375 cat >> $CONFIG_STATUS <<EOF
2378 cat >> $CONFIG_STATUS <<\EOF
2380 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2382 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2384 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2385 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2386 *) ac_file_in="${ac_file}.in" ;;
2388 changequote([, ])dnl
2390 echo creating $ac_file
2392 rm -f conftest.frag conftest.in conftest.out
2393 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2394 cat $ac_file_inputs > conftest.in
2398 # Transform confdefs.h into a sed script conftest.vals that substitutes
2399 # the proper values into config.h.in to produce config.h. And first:
2400 # Protect against being on the right side of a sed subst in config.status.
2401 # Protect against being in an unquoted here document in config.status.
2403 dnl Using a here document instead of a string reduces the quoting nightmare.
2404 dnl Putting comments in sed scripts is not portable.
2405 cat > conftest.hdr <<\EOF
2406 changequote(<<, >>)dnl
2409 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2413 changequote([, ])dnl
2415 sed -n -f conftest.hdr confdefs.h > conftest.vals
2418 dnl This is not necessary at all: Just write
2419 dnl #ifndef _POSIX_SOURCE
2420 dnl #undef _POSIX_SOURCE
2423 dnl #undef _POSIX_SOURCE
2425 dnl # This sed command replaces #undef with comments. This is necessary, for
2426 dnl # example, in the case of _POSIX_SOURCE, which is predefined and required
2427 dnl # on some systems where configure will not decide to define it.
2428 dnl cat >> conftest.vals <<\EOF
2429 dnl changequote(, )dnl
2430 dnl s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2431 dnl changequote([, ])dnl
2434 # Break up conftest.vals because some shells have a limit on
2435 # the size of here documents, and old seds have small limits too.
2440 ac_lines=`grep -c . conftest.vals`
2441 # grep -c gives empty output for an empty file on some AIX systems.
2442 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2443 # Write a limited-size here document to conftest.frag.
2444 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2445 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2447 sed -f conftest.frag conftest.in > conftest.out
2449 mv conftest.out conftest.in
2451 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2453 mv conftest.tail conftest.vals
2457 dnl Now back to your regularly scheduled config.status.
2458 cat >> $CONFIG_STATUS <<\EOF
2459 rm -f conftest.frag conftest.h
2460 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2461 cat conftest.in >> conftest.h
2463 if cmp -s $ac_file conftest.h 2>/dev/null; then
2464 echo "$ac_file is unchanged"
2467 # Remove last slash and all that follows it. Not all systems have dirname.
2469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2470 changequote([, ])dnl
2471 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2472 # The file is in a subdirectory.
2473 test ! -d "$ac_dir" && mkdir "$ac_dir"
2476 mv conftest.h $ac_file
2482 dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
2483 dnl here document whose contents are going into config.status.
2484 dnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
2485 define(AC_OUTPUT_LINKS,
2488 cat >> $CONFIG_STATUS <<EOF
2493 cat >> $CONFIG_STATUS <<\EOF
2494 srcdir=$ac_given_srcdir
2495 while test -n "$ac_sources"; do
2496 set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
2497 set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
2499 echo "linking $srcdir/$ac_source to $ac_dest"
2501 if test ! -r $srcdir/$ac_source; then
2502 AC_MSG_ERROR($srcdir/$ac_source: File not found)
2506 # Make relative symlinks.
2507 # Remove last slash and all that follows it. Not all systems have dirname.
2509 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2510 changequote([, ])dnl
2511 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2512 # The dest file is in a subdirectory.
2513 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2514 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2515 # A "../" for each directory in $ac_dest_dir_suffix.
2517 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2518 changequote([, ])dnl
2520 ac_dest_dir_suffix= ac_dots=
2525 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2526 changequote([, ])dnl
2527 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2530 # Make a symlink if possible; otherwise try a hard link.
2531 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2532 ln $srcdir/$ac_source $ac_dest; then :
2534 AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
2539 dnl This is a subroutine of AC_OUTPUT.
2540 dnl It is called after running config.status.
2541 dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
2542 define(AC_OUTPUT_SUBDIRS,
2544 if test "$no_recursion" != yes; then
2546 # Remove --cache-file and --srcdir arguments so they do not pile up.
2547 ac_sub_configure_args=
2549 for ac_arg in $ac_configure_args; do
2550 if test -n "$ac_prev"; then
2555 -cache-file | --cache-file | --cache-fil | --cache-fi \
2556 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2557 ac_prev=cache_file ;;
2558 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2559 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2561 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2563 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2565 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2569 for ac_config_dir in $1; do
2571 # Do not complain, so a configure script can configure whichever
2572 # parts of a large source tree are present.
2573 if test ! -d $srcdir/$ac_config_dir; then
2577 echo configuring in $ac_config_dir
2582 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2584 AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
2593 # A "../" for each directory in /$ac_config_dir.
2594 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2595 changequote([, ])dnl
2598 .) # No --srcdir option. We are building in place.
2599 ac_sub_srcdir=$srcdir ;;
2600 /*) # Absolute path.
2601 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2603 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2606 # Check for guested configure; otherwise get Cygnus style configure.
2607 if test -f $ac_sub_srcdir/configure; then
2608 ac_sub_configure=$ac_sub_srcdir/configure
2609 elif test -f $ac_sub_srcdir/configure.in; then
2610 ac_sub_configure=$ac_configure
2612 AC_MSG_WARN(no configuration information is in $ac_config_dir)
2616 # The recursion is here.
2617 if test -n "$ac_sub_configure"; then
2619 # Make the cache file name correct relative to the subdirectory.
2620 case "$cache_file" in
2621 /*) ac_sub_cache_file=$cache_file ;;
2623 if test -n "$ac_dots"; then
2624 ac_sub_cache_file="$ac_dots"`echo "$cache_file" | sed 's,^\./,,'`
2626 ac_sub_cache_file="$cache_file"
2630 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2631 [ case "$ac_given_INSTALL" in
2633 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2634 changequote([, ])dnl
2635 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2639 echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
2640 # The eval makes quoting arguments work.
2641 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2644 AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)