]> www.ginac.de Git - cln.git/blob - autoconf/acgeneral.m4
* src/polynomial/cl_UP_gen.h (gen_minus): Fix case where first
[cln.git] / autoconf / acgeneral.m4
1 dnl Parameterized macros.
2 dnl Requires GNU m4.
3 dnl This file is part of Autoconf.
4 dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
5 dnl
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)
9 dnl any later version.
10 dnl
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.
15 dnl
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
19 dnl 02111-1307, USA.
20 dnl
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.
28 dnl
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.
36 dnl
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.
47 dnl
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.
51 dnl
52 dnl Changed by Bruno Haible, 18 January 1999
53 dnl Changed more by Richard Kreckel, 16 November 2000
54 dnl
55 divert(-1)dnl Throw away output until AC_INIT is called.
56 changequote([, ])
57
58 define(AC_ACVERSION, 2.13)
59
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.
66 )m4exit(2)])
67
68 undefine([eval])
69 undefine([include])
70 undefine([shift])
71 undefine([format])
72
73
74 dnl ### Defining macros
75
76
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.
80
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
92
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
98 ])
99
100 dnl Change the diversion stream to its previous value, unstacking it.
101 dnl AC_DIVERT_POP()
102 define(AC_DIVERT_POP,
103 [popdef([AC_DIVERSION_CURRENT])dnl
104 divert(AC_DIVERSION_CURRENT)dnl
105 ])
106
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)
111
112 dnl The prologue for Autoconf macros.
113 dnl AC_PRO(MACRO-NAME)
114 define(AC_PRO,
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
119 ])
120
121 dnl The Epilogue for Autoconf macros.
122 dnl AC_EPI()
123 define(AC_EPI,
124 [AC_DIVERT_POP()dnl
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
130 ])dnl
131 ])
132
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
140 dnl processing.
141 dnl AC_DEFUN(NAME, EXPANSION)
142 define([AC_DEFUN],
143 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
144
145
146 dnl ### Initialization
147
148
149 dnl AC_INIT_NOTICE()
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.
154 #
155 # This configure script is free software; the Free Software Foundation
156 # gives unlimited permission to copy, distribute and modify it.
157
158 # Defaults:
159 ac_help=
160 ac_default_prefix=/usr/local
161 [#] Any additions from configure.in:])
162
163 dnl AC_PREFIX_DEFAULT(PREFIX)
164 AC_DEFUN(AC_PREFIX_DEFAULT,
165 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
166 ac_default_prefix=$1
167 AC_DIVERT_POP()])
168
169 dnl AC_INIT_PARSE_ARGS()
170 AC_DEFUN(AC_INIT_PARSE_ARGS,
171 [
172 # Initialize some variables set by options.
173 # The variables have the same names as the options, with
174 # dashes changed to underlines.
175 build=NONE
176 cache_file=./config.cache
177 exec_prefix=NONE
178 host=NONE
179 no_create=
180 nonopt=NONE
181 no_recursion=
182 prefix=NONE
183 program_prefix=NONE
184 program_suffix=NONE
185 program_transform_name=s,x,x,
186 silent=
187 site=
188 srcdir=
189 target=NONE
190 verbose=
191 x_includes=NONE
192 x_libraries=NONE
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'
210
211 # Initialize some other variables.
212 subdirs=
213 MFLAGS= MAKEFLAGS=
214 SHELL=${CONFIG_SHELL-/bin/sh}
215 # Maximum number of lines to put in a shell here document.
216 ac_max_here_lines=12
217
218 ac_prev=
219 for ac_option
220 do
221
222   # If the previous option needs an argument, assign it.
223   if test -n "$ac_prev"; then
224     eval "$ac_prev=\$ac_option"
225     ac_prev=
226     continue
227   fi
228
229   case "$ac_option" in
230 changequote(, )dnl
231   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
232 changequote([, ])dnl
233   *) ac_optarg= ;;
234   esac
235
236   # Accept the important Cygnus configure options, so we can diagnose typos.
237
238   case "$ac_option" in
239
240   -bindir | --bindir | --bindi | --bind | --bin | --bi)
241     ac_prev=bindir ;;
242   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
243     bindir="$ac_optarg" ;;
244
245   -build | --build | --buil | --bui | --bu)
246     ac_prev=build ;;
247   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
248     build="$ac_optarg" ;;
249
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" ;;
256
257   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
258     ac_prev=datadir ;;
259   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
260   | --da=*)
261     datadir="$ac_optarg" ;;
262
263   -disable-* | --disable-*)
264     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
265     # Reject names that are not valid shell variable names.
266 changequote(, )dnl
267     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
268 changequote([, ])dnl
269       AC_MSG_ERROR($ac_feature: invalid feature name)
270     fi
271     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
272     eval "enable_${ac_feature}=no" ;;
273
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.
277 changequote(, )dnl
278     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
279 changequote([, ])dnl
280       AC_MSG_ERROR($ac_feature: invalid feature name)
281     fi
282     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
283     case "$ac_option" in
284       *=*) ;;
285       *) ac_optarg=yes ;;
286     esac
287     eval "enable_${ac_feature}='$ac_optarg'" ;;
288
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" ;;
297
298   -gas | --gas | --ga | --g)
299     # Obsolete; use --with-gas.
300     with_gas=yes ;;
301
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.
305     cat << EOF
306 changequote(, )dnl
307 Usage: configure [options] [host]
308 Options: [defaults in brackets after descriptions]
309 Configuration:
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
317                           [$ac_default_prefix]
318   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
319                           [same as prefix]
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
324                           [PREFIX/share]
325   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
326   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
327                           [PREFIX/com]
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
339 EOF
340     cat << EOF
341 Host type:
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
352 changequote([, ])dnl
353 EOF
354     if test -n "$ac_help"; then
355       echo "--enable and --with options recognized:$ac_help"
356     fi
357     exit 0 ;;
358
359   -host | --host | --hos | --ho)
360     ac_prev=host ;;
361   -host=* | --host=* | --hos=* | --ho=*)
362     host="$ac_optarg" ;;
363
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" ;;
370
371   -infodir | --infodir | --infodi | --infod | --info | --inf)
372     ac_prev=infodir ;;
373   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
374     infodir="$ac_optarg" ;;
375
376   -libdir | --libdir | --libdi | --libd)
377     ac_prev=libdir ;;
378   -libdir=* | --libdir=* | --libdi=* | --libd=*)
379     libdir="$ac_optarg" ;;
380
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" ;;
387
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" ;;
396
397   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
398     ac_prev=mandir ;;
399   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
400     mandir="$ac_optarg" ;;
401
402   -nfp | --nfp | --nf)
403     # Obsolete; use --without-fp.
404     with_fp=no ;;
405
406   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
407   | --no-cr | --no-c)
408     no_create=yes ;;
409
410   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
411   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
412     no_recursion=yes ;;
413
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" ;;
422
423   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
424     ac_prev=prefix ;;
425   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
426     prefix="$ac_optarg" ;;
427
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" ;;
434
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" ;;
441
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" ;;
458
459   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
460   | -silent | --silent | --silen | --sile | --sil)
461     silent=yes ;;
462
463   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
464     ac_prev=sbindir ;;
465   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
466   | --sbi=* | --sb=*)
467     sbindir="$ac_optarg" ;;
468
469   -sharedstatedir | --sharedstatedir | --sharedstatedi \
470   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
471   | --sharedst | --shareds | --shared | --share | --shar \
472   | --sha | --sh)
473     ac_prev=sharedstatedir ;;
474   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
475   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
476   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
477   | --sha=* | --sh=*)
478     sharedstatedir="$ac_optarg" ;;
479
480   -site | --site | --sit)
481     ac_prev=site ;;
482   -site=* | --site=* | --sit=*)
483     site="$ac_optarg" ;;
484
485   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
486     ac_prev=srcdir ;;
487   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
488     srcdir="$ac_optarg" ;;
489
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" ;;
496
497   -target | --target | --targe | --targ | --tar | --ta | --t)
498     ac_prev=target ;;
499   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
500     target="$ac_optarg" ;;
501
502   -v | -verbose | --verbose | --verbos | --verbo | --verb)
503     verbose=yes ;;
504
505   -version | --version | --versio | --versi | --vers)
506     echo "configure generated by autoconf version AC_ACVERSION"
507     exit 0 ;;
508
509   -with-* | --with-*)
510     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
511     # Reject names that are not valid shell variable names.
512 changequote(, )dnl
513     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
514 changequote([, ])dnl
515       AC_MSG_ERROR($ac_package: invalid package name)
516     fi
517     ac_package=`echo $ac_package| sed 's/-/_/g'`
518     case "$ac_option" in
519       *=*) ;;
520       *) ac_optarg=yes ;;
521     esac
522     eval "with_${ac_package}='$ac_optarg'" ;;
523
524   -without-* | --without-*)
525     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
526     # Reject names that are not valid shell variable names.
527 changequote(, )dnl
528     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
529 changequote([, ])dnl
530       AC_MSG_ERROR($ac_package: invalid package name)
531     fi
532     ac_package=`echo $ac_package| sed 's/-/_/g'`
533     eval "with_${ac_package}=no" ;;
534
535   --x)
536     # Obsolete; use --with-x.
537     with_x=yes ;;
538
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" ;;
545
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" ;;
552
553   -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
554     ;;
555
556   *)
557 changequote(, )dnl
558     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
559 changequote([, ])dnl
560       AC_MSG_WARN($ac_option: invalid host type)
561     fi
562     if test "x$nonopt" != xNONE; then
563       AC_MSG_ERROR(can only configure for one host and one target at a time)
564     fi
565     nonopt="$ac_option"
566     ;;
567
568   esac
569 done
570
571 if test -n "$ac_prev"; then
572   AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
573 fi
574 ])
575
576 dnl Try to have only one #! line, so the script doesn't look funny
577 dnl for users of AC_REVISION.
578 dnl AC_INIT_BINSH()
579 AC_DEFUN(AC_INIT_BINSH,
580 [#! /bin/sh
581 ])
582
583 dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
584 AC_DEFUN(AC_INIT,
585 [sinclude(acsite.m4)dnl
586 sinclude(./aclocal.m4)dnl
587 AC_REQUIRE([AC_INIT_BINSH])dnl
588 AC_INIT_NOTICE
589 AC_DIVERT_POP()dnl to NORMAL
590 AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
591 AC_INIT_PARSE_ARGS
592 AC_INIT_PREPARE($1)dnl
593 AC_DIVERT_POP()dnl to NORMAL
594 ])
595
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
599
600 # File descriptor usage:
601 # 0 standard input
602 # 1 file creation
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
612 else
613   exec AC_FD_MSG>&1
614 fi
615 exec AC_FD_CC>./config.log
616
617 echo "\
618 This file contains any messages produced by compilers while
619 running configure, to aid debugging if configure makes a mistake.
620 " 1>&AC_FD_CC
621
622 # Strip out --no-create and --no-recursion so they do not pile up.
623 # Also quote any args containing shell metacharacters.
624 ac_configure_args=
625 for ac_arg
626 do
627   case "$ac_arg" in
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'" ;;
637 changequote([, ])dnl
638   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
639   esac
640 done
641
642 # NLS nuisances.
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
651
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.
655 echo > confdefs.h
656
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.
659 ac_unique_file=$1
660
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.
665   ac_prog=[$]0
666 changequote(, )dnl
667   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
668 changequote([, ])dnl
669   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
670   srcdir=$ac_confdir
671   if test ! -r $srcdir/$ac_unique_file; then
672     srcdir=..
673   fi
674 else
675   ac_srcdir_defaulted=no
676 fi
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 ..)
680   else
681     AC_MSG_ERROR(can not find sources in $srcdir)
682   fi
683 fi
684 dnl Double slashes in pathnames in object file debugging info
685 dnl mess up M-x gdb in Emacs.
686 changequote(, )dnl
687 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
688 changequote([, ])dnl
689
690 dnl Let the site file select an alternate cache file if it wants to.
691 AC_SITE_LOAD
692 AC_CACHE_LOAD
693 AC_LANG_C
694 dnl By default always use an empty string as the executable
695 dnl extension.  Only change it if the script calls AC_EXEEXT.
696 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.
699 ac_objext=o
700 AC_PROG_ECHO_N
701 dnl Substitute for predefined variables.
702 AC_SUBST(SHELL)dnl
703 AC_SUBST(CFLAGS)dnl
704 AC_SUBST(CPPFLAGS)dnl
705 AC_SUBST(CXXFLAGS)dnl
706 AC_SUBST(FFLAGS)dnl
707 AC_SUBST(DEFS)dnl
708 AC_SUBST(LDFLAGS)dnl
709 AC_SUBST(LIBS)dnl
710 AC_SUBST(exec_prefix)dnl
711 AC_SUBST(prefix)dnl
712 AC_SUBST(program_transform_name)dnl
713 dnl Installation directory options.
714 AC_SUBST(bindir)dnl
715 AC_SUBST(sbindir)dnl
716 AC_SUBST(libexecdir)dnl
717 AC_SUBST(datadir)dnl
718 AC_SUBST(sysconfdir)dnl
719 AC_SUBST(sharedstatedir)dnl
720 AC_SUBST(localstatedir)dnl
721 AC_SUBST(libdir)dnl
722 AC_SUBST(includedir)dnl
723 AC_SUBST(oldincludedir)dnl
724 AC_SUBST(infodir)dnl
725 AC_SUBST(mandir)dnl
726 ])
727
728
729 dnl ### Selecting optional features
730
731
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
735 ac_help="$ac_help
736 [$2]"
737 AC_DIVERT_POP()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
743   $4
744 ])dnl
745 fi
746 ])
747
748 AC_DEFUN(AC_ENABLE,
749 [AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
750 AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
751 ])
752
753
754 dnl ### Working with optional software
755
756
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
760 ac_help="$ac_help
761 [$2]"
762 AC_DIVERT_POP()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
768   $4
769 ])dnl
770 fi
771 ])
772
773 AC_DEFUN(AC_WITH,
774 [AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
775 AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])dnl
776 ])
777
778
779 dnl ### Transforming program names.
780
781
782 dnl AC_ARG_PROGRAM()
783 AC_DEFUN(AC_ARG_PROGRAM,
784 [if test "$program_transform_name" = s,x,x,; then
785   program_transform_name=
786 else
787   # Double any \ or $.  echo might interpret backslashes.
788   cat <<\EOF_SED > conftestsed
789 s,\\,\\\\,g; s,\$,$$,g
790 EOF_SED
791   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
792   rm -f conftestsed
793 fi
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"
799
800 # sed with no file args requires a program.
801 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
802 ])
803
804
805 dnl ### Version numbers
806
807
808 dnl AC_REVISION(REVISION-INFO)
809 AC_DEFUN(AC_REVISION,
810 [AC_REQUIRE([AC_INIT_BINSH])dnl
811 [# From configure.in] translit([$1], $")])
812
813 dnl Subroutines of AC_PREREQ.
814
815 dnl Change the dots in NUMBER into commas.
816 dnl AC_PREREQ_SPLIT(NUMBER)
817 define(AC_PREREQ_SPLIT,
818 [translit($1, ., [, ])])
819
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])])
824
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,
828 dnl                   PRINTABLE2)
829 define(AC_PREREQ_COMPARE,
830 [ifelse(builtin([eval],
831 [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
832 [errprint(dnl
833 FATAL ERROR: Autoconf version $7 or higher is required for this script
834 )m4exit(3)])])
835
836 dnl Complain and exit if the Autoconf version is less than VERSION.
837 dnl AC_PREREQ(VERSION)
838 define(AC_PREREQ,
839 [AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
840 AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
841
842
843 dnl ### Getting the canonical system type
844
845
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)])
852
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/../..)])
857
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,
864 [ac_aux_dir=
865 for ac_dir in $1; do
866   if test -f $ac_dir/install-sh; then
867     ac_aux_dir=$ac_dir
868     ac_install_sh="$ac_aux_dir/install-sh -c"
869     break
870   elif test -f $ac_dir/install.sh; then
871     ac_aux_dir=$ac_dir
872     ac_install_sh="$ac_aux_dir/install.sh -c"
873     break
874   fi
875 done
876 if test -z "$ac_aux_dir"; then
877   AC_MSG_ERROR([can not find install-sh or install.sh in $1])
878 fi
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
883 ])
884
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.
890 # The inputs are:
891 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
892 #
893 # The rules are:
894 # 1. You are not allowed to specify --host, --target, and nonopt at the
895 #    same time.
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.
901
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) ;;
907 esac
908
909 AC_CANONICAL_HOST
910 AC_CANONICAL_TARGET
911 AC_CANONICAL_BUILD
912 test "$host_alias" != "$target_alias" &&
913   test "$program_prefix$program_suffix$program_transform_name" = \
914     NONENONEs,x,x, &&
915   program_prefix=${target_alias}-
916 ])
917
918 dnl Subroutines of AC_CANONICAL_SYSTEM.
919
920 AC_DEFUN(AC_CANONICAL_HOST,
921 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
922
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)
926 fi
927
928 AC_MSG_CHECKING(host system type)
929
930 dnl Set host_alias.
931 host_alias=$host
932 case "$host_alias" in
933 NONE)
934   case $nonopt in
935   NONE)
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)
938     fi ;;
939   *) host_alias=$nonopt ;;
940   esac ;;
941 esac
942
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/'`
949 changequote([, ])dnl
950 AC_MSG_RESULT($host)
951 AC_SUBST(host)dnl
952 AC_SUBST(host_alias)dnl
953 AC_SUBST(host_cpu)dnl
954 AC_SUBST(host_vendor)dnl
955 AC_SUBST(host_os)dnl
956 ])
957
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)
962
963 dnl Set target_alias.
964 target_alias=$target
965 case "$target_alias" in
966 NONE)
967   case $nonopt in
968   NONE) target_alias=$host_alias ;;
969   *) target_alias=$nonopt ;;
970   esac ;;
971 esac
972
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/'`
979 changequote([, ])dnl
980 AC_MSG_RESULT($target)
981 AC_SUBST(target)dnl
982 AC_SUBST(target_alias)dnl
983 AC_SUBST(target_cpu)dnl
984 AC_SUBST(target_vendor)dnl
985 AC_SUBST(target_os)dnl
986 ])
987
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)
992
993 dnl Set build_alias.
994 build_alias=$build
995 case "$build_alias" in
996 NONE)
997   case $nonopt in
998   NONE) build_alias=$host_alias ;;
999   *) build_alias=$nonopt ;;
1000   esac ;;
1001 esac
1002
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)
1011 AC_SUBST(build)dnl
1012 AC_SUBST(build_alias)dnl
1013 AC_SUBST(build_cpu)dnl
1014 AC_SUBST(build_vendor)dnl
1015 AC_SUBST(build_os)dnl
1016 ])
1017
1018
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
1022 dnl error message.
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])
1033       ifelse($#, 1, [$1],
1034         [AC_MSG_ERROR([remove config.cache and re-run configure])])
1035   else
1036     AC_MSG_RESULT(ok)
1037   fi
1038   ac_cv_host_system_type="$host"
1039   ac_cv_build_system_type="$build"
1040   ac_cv_target_system_type="$target"
1041 ])
1042
1043
1044 dnl ### Caching test results
1045
1046
1047 dnl Look for site or system specific initialization scripts.
1048 dnl AC_SITE_LOAD()
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"
1054   else
1055     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1056   fi
1057 fi
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"
1061     . "$ac_site_file"
1062   fi
1063 done
1064 ])
1065
1066 dnl AC_CACHE_LOAD()
1067 define(AC_CACHE_LOAD,
1068 [if test -r "$cache_file"; then
1069   echo "loading cache $cache_file"
1070   . $cache_file
1071 else
1072   echo "creating cache $cache_file"
1073   > $cache_file
1074 fi
1075 ])
1076
1077 dnl AC_CACHE_SAVE()
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.
1084 #
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.
1093 #
1094 EOF
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.
1101 changequote(, )dnl
1102 (set) 2>&1 |
1103   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1104   *ac_space=\ *)
1105     # `set' does not quote correctly, so add quotes (double-quote substitution
1106     # turns \\\\ into \\, and sed turns \\ into \).
1107     sed -n \
1108       -e "s/'/'\\\\''/g" \
1109       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1110     ;;
1111   *)
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'
1114     ;;
1115   esac >> confcache
1116 changequote([, ])dnl
1117 if cmp -s $cache_file confcache; then
1118   :
1119 else
1120   if test -w $cache_file; then
1121     echo "updating cache $cache_file"
1122     cat confcache > $cache_file
1123   else
1124     echo "not updating unwritable cache $cache_file"
1125   fi
1126 fi
1127 rm -f confcache
1128 ])
1129
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
1139 else
1140   $2
1141 fi
1142 ])
1143
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)])
1149
1150
1151 dnl ### Defining symbols
1152
1153
1154 dnl Set VARIABLE to VALUE, verbatim, or 1.
1155 dnl AC_DEFINE(VARIABLE [, VALUE])
1156 define(AC_DEFINE,
1157 [cat >> confdefs.h <<\EOF
1158 [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
1159 EOF
1160 ])
1161
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)
1166 EOF
1167 ])
1168
1169
1170 dnl ### Setting output variables
1171
1172
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)
1176 define(AC_SUBST,
1177 [ifdef([AC_SUBST_$1], ,
1178 [define([AC_SUBST_$1], )dnl
1179 AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
1180 s%@$1@%[$]$1%g
1181 AC_DIVERT_POP()dnl
1182 ])])
1183
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
1189 /@$1@/r [$]$1
1190 s%@$1@%%g
1191 AC_DIVERT_POP()dnl
1192 ])])
1193
1194
1195 dnl ### Printing messages
1196
1197
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])
1202
1203 dnl AC_CHECKING(FEATURE-DESCRIPTION)
1204 define(AC_CHECKING,
1205 [echo "checking $1" 1>&AC_FD_MSG
1206 echo "configure:__oline__: checking $1" >&AC_FD_CC])
1207
1208 dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
1209 define(AC_MSG_RESULT,
1210 [echo "$ac_t""$1" 1>&AC_FD_MSG])
1211
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})
1217 ])
1218
1219 dnl AC_VERBOSE(RESULT-DESCRIPTION)
1220 define(AC_VERBOSE,
1221 [AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
1222 echo "  $1" 1>&AC_FD_MSG])
1223
1224 dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
1225 define(AC_MSG_WARN,
1226 [echo "configure: warning: $1" 1>&2])
1227
1228 dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
1229 define(AC_MSG_ERROR,
1230 [{ echo "configure: error: $1" 1>&2; exit 1; }])
1231
1232
1233 dnl ### Selecting which language to use for testing
1234
1235
1236 dnl AC_LANG_C()
1237 AC_DEFUN(AC_LANG_C,
1238 [define([AC_LANG], [C])dnl
1239 ac_ext=c
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
1245 ])
1246
1247 dnl AC_LANG_CPLUSPLUS()
1248 AC_DEFUN(AC_LANG_CPLUSPLUS,
1249 [define([AC_LANG], [CPLUSPLUS])dnl
1250 ac_ext=C
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
1256 ])
1257
1258 dnl AC_LANG_FORTRAN77()
1259 AC_DEFUN(AC_LANG_FORTRAN77,
1260 [define([AC_LANG], [FORTRAN77])dnl
1261 ac_ext=f
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
1265 ])
1266
1267 dnl Push the current language on a stack.
1268 dnl AC_LANG_SAVE()
1269 define(AC_LANG_SAVE,
1270 [pushdef([AC_LANG_STACK], AC_LANG)])
1271
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])])
1278
1279 dnl Expands to the "extern ..." prefix used for system declarations.
1280 dnl AC_LANG_EXTERN()
1281 define(AC_LANG_EXTERN,
1282 [extern
1283 #ifdef __cplusplus
1284 "C"
1285 #endif
1286 ])
1287
1288
1289 dnl ### Compiler-running mechanics
1290
1291
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; }])
1298
1299 dnl AC_TRY_COMMAND(COMMAND)
1300 AC_DEFUN(AC_TRY_COMMAND,
1301 [{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
1302
1303
1304 dnl ### Dependencies between macros
1305
1306
1307 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
1308 define(AC_BEFORE,
1309 [ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
1310 ])])])
1311
1312 dnl AC_REQUIRE(MACRO-NAME)
1313 define(AC_REQUIRE,
1314 [ifdef([AC_PROVIDE_$1], ,
1315 [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
1316 indir([$1])
1317 AC_DIVERT_POP()dnl
1318 ])])
1319
1320 dnl AC_PROVIDE(MACRO-NAME)
1321 define(AC_PROVIDE,
1322 [define([AC_PROVIDE_$1], )])
1323
1324 dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
1325 define(AC_OBSOLETE,
1326 [errprint(__file__:__line__: warning: [$1] is obsolete[$2]
1327 )])
1328
1329
1330 dnl ### Checking for programs
1331
1332
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.
1342 else
1343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1344 ifelse([$6], , , [  ac_prog_rejected=no
1345 ])dnl
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
1356         continue
1357       fi
1358 ])dnl
1359       ac_cv_prog_$1="$3"
1360       break
1361     fi
1362   done
1363   IFS="$ac_save_ifs"
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
1367   shift
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.
1372     shift
1373     set dummy "$ac_dir/$ac_word" "[$]@"
1374     shift
1375     ac_cv_prog_$1="[$]@"
1376 ifelse([$2], [$4], dnl
1377 [  else
1378     # Default is a loser.
1379     AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
1380 ifelse([$5], , [\$]PATH, [$5])])
1381 ])dnl
1382   fi
1383 fi
1384 ])dnl
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"
1388 ])dnl
1389 fi])dnl
1390 $1="$ac_cv_prog_$1"
1391 if test -n "[$]$1"; then
1392   AC_MSG_RESULT([$]$1)
1393 else
1394   AC_MSG_RESULT(no)
1395 fi
1396 AC_SUBST($1)dnl
1397 ])
1398
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,
1405 [case "[$]$1" in
1406   /*)
1407   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1408   ;;
1409   ?:/*)                  
1410   ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
1411   ;;
1412   *)
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"
1422       break
1423     fi
1424   done
1425   IFS="$ac_save_ifs"
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"
1429 ])dnl
1430   ;;
1431 esac])dnl
1432 $1="$ac_cv_path_$1"
1433 if test -n "[$]$1"; then
1434   AC_MSG_RESULT([$]$1)
1435 else
1436   AC_MSG_RESULT(no)
1437 fi
1438 AC_SUBST($1)dnl
1439 ])
1440
1441 dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1442 dnl                [, PATH]])
1443 AC_DEFUN(AC_CHECK_PROGS,
1444 [for ac_prog in $2
1445 do
1446 AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
1447 test -n "[$]$1" && break
1448 done
1449 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1450 ])])
1451
1452 dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
1453 dnl               [, PATH]])
1454 AC_DEFUN(AC_PATH_PROGS,
1455 [for ac_prog in $2
1456 do
1457 AC_PATH_PROG($1, [$]ac_prog, , $4)
1458 test -n "[$]$1" && break
1459 done
1460 ifelse([$3], , , [test -n "[$]$1" || $1="$3"
1461 ])])
1462
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}-
1468 else
1469   ac_tool_prefix=
1470 fi
1471 ])
1472
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)
1478 ifelse([$3], , , [
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)
1482 else
1483   $1="$3"
1484 fi
1485 fi])
1486 ])
1487
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
1508   fi
1509 fi
1510 undefine([AC_VAR_NAME])dnl
1511 ])
1512
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
1518 dnl language.
1519 dnl 
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], ,
1524 [
1525 [#]line __oline__ "configure"
1526 #include "confdefs.h"
1527 ])
1528 [$1]
1529 EOF
1530 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1531   [$2]=yes
1532   # If we can't run a trivial program, we are probably using a cross compiler.
1533   if (./conftest; exit) 2>/dev/null; then
1534     [$3]=no
1535   else
1536     [$3]=yes
1537   fi
1538 else
1539   echo "configure: failed program was:" >&AC_FD_CC
1540   cat conftest.$ac_ext >&AC_FD_CC
1541   [$2]=no
1542 fi
1543 rm -fr conftest*])
1544
1545
1546 dnl ### Checking for libraries
1547
1548
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.
1553
1554 AC_DEFUN(AC_TRY_LINK_FUNC,
1555 AC_TRY_LINK(dnl
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
1559 extern "C"
1560 #endif
1561 ])dnl
1562 [/* We use char because int might match the return type of a gcc2
1563     builtin and then its argument prototype would still apply.  */
1564 char $1();
1565 ]),
1566 [$1()],
1567 [$2],
1568 [$3]))
1569
1570
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.
1574
1575 AC_DEFUN(AC_SEARCH_LIBS,
1576 [AC_PREREQ([2.13])
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"
1585 break])
1586 done
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"
1590   $3
1591 else :
1592   $4
1593 fi])
1594
1595
1596
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.  */
1612 #ifdef __cplusplus
1613 extern "C"
1614 #endif
1615 /* We use char because int might match the return type of a gcc2
1616    builtin and then its argument prototype would still apply.  */
1617 char $2();
1618 ])),
1619             [$2()],
1620             eval "ac_cv_lib_$ac_lib_var=yes",
1621             eval "ac_cv_lib_$ac_lib_var=no")
1622 LIBS="$ac_save_LIBS"
1623 ])dnl
1624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1625   AC_MSG_RESULT(yes)
1626   ifelse([$3], ,
1627 [changequote(, )dnl
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)
1632   LIBS="-l$1 $LIBS"
1633 ], [$3])
1634 else
1635   AC_MSG_RESULT(no)
1636 ifelse([$4], , , [$4
1637 ])dnl
1638 fi
1639 ])
1640
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"
1656 ])dnl
1657 AC_MSG_RESULT($AC_CV_NAME)
1658 if test "$AC_CV_NAME" = yes; then
1659   ifelse([$2], ,
1660 [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
1661   LIBS="-l[]AC_LIB_NAME[] $LIBS"
1662 ], [$2])
1663 ifelse([$3], , , [else
1664   $3
1665 ])dnl
1666 fi
1667 undefine([AC_LIB_NAME])dnl
1668 undefine([AC_CV_NAME])dnl
1669 ])
1670
1671
1672 dnl ### Examining declarations
1673
1674
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"
1681 [$1]
1682 EOF
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"
1688 AC_TRY_EVAL(ac_try)
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*
1692   $2])
1693 else
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*
1698   $3
1699 ])dnl
1700 fi
1701 rm -f conftest*])
1702
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])])
1707
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"
1717 [$2]
1718 EOF
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:
1723 changequote(, )dnl
1724   egrep "$1" >/dev/null 2>&1; then
1725 changequote([, ])dnl
1726   ifelse([$3], , :, [rm -rf conftest*
1727   $3])
1728 ifelse([$4], , , [else
1729   rm -rf conftest*
1730   $4
1731 ])dnl
1732 fi
1733 rm -f conftest*
1734 ])
1735
1736
1737 dnl ### Examining syntax
1738
1739
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],
1745 [      program main
1746 [$2]
1747       end],
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"
1752 [$1]
1753 int main() {
1754 [$2]
1755 ; return 0; }
1756 ])EOF
1757 if AC_TRY_EVAL(ac_compile); then
1758   ifelse([$3], , :, [rm -rf conftest*
1759   $3])
1760 else
1761   echo "configure: failed program was:" >&AC_FD_CC
1762   cat conftest.$ac_ext >&AC_FD_CC
1763 ifelse([$4], , , [  rm -rf conftest*
1764   $4
1765 ])dnl
1766 fi
1767 rm -f conftest*])
1768
1769
1770 dnl ### Examining libraries
1771
1772
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])
1778 ])dnl
1779 AC_TRY_LINK([$2], [$3], [$4], [$5])
1780 ])
1781
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],
1787 [
1788       program main
1789       call [$2]
1790       end
1791 ],
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"
1796 [$1]
1797 int main() {
1798 [$2]
1799 ; return 0; }
1800 ])EOF
1801 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
1802   ifelse([$3], , :, [rm -rf conftest*
1803   $3])
1804 else
1805   echo "configure: failed program was:" >&AC_FD_CC
1806   cat conftest.$ac_ext >&AC_FD_CC
1807 ifelse([$4], , , [  rm -rf conftest*
1808   $4
1809 ])dnl
1810 fi
1811 rm -f conftest*])
1812
1813
1814 dnl ### Checking for run-time features
1815
1816
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
1821   ifelse([$4], ,
1822     [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
1823 )dnl
1824   AC_MSG_ERROR(can not run test program while cross compiling)],
1825   [$4])
1826 else
1827   AC_TRY_RUN_NATIVE([$1], [$2], [$3])
1828 fi
1829 ])
1830
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"
1837 #ifdef __cplusplus
1838 extern "C" void exit(int);
1839 #endif
1840 [$1]
1841 EOF
1842 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1843 then
1844 dnl Don't remove the temporary files here, so they can be examined.
1845   ifelse([$2], , :, [$2])
1846 else
1847   echo "configure: failed program was:" >&AC_FD_CC
1848   cat conftest.$ac_ext >&AC_FD_CC
1849 ifelse([$3], , , [  rm -fr conftest*
1850   $3
1851 ])dnl
1852 fi
1853 if test -f core; then
1854   coredir=core`/bin/sh -c 'echo $$'`
1855   mkdir $coredir
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"
1861 fi
1862 rm -fr conftest*])
1863
1864
1865 dnl ### Checking for header files
1866
1867
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
1877   AC_MSG_RESULT(yes)
1878   ifelse([$2], , :, [$2])
1879 else
1880   AC_MSG_RESULT(no)
1881 ifelse([$3], , , [$3
1882 ])dnl
1883 fi
1884 ])
1885
1886 dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1887 AC_DEFUN(AC_CHECK_HEADERS,
1888 [for ac_hdr in $1
1889 do
1890 AC_CHECK_HEADER($ac_hdr,
1891 [changequote(, )dnl
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
1895 done
1896 ])
1897
1898
1899 dnl ### Checking for the existence of files
1900
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
1910 )dnl
1911   AC_MSG_ERROR(Cannot check for file existence when cross compiling)
1912 else
1913   if test -r $1; then
1914     eval "ac_cv_file_$ac_safe=yes"
1915   else
1916     eval "ac_cv_file_$ac_safe=no"
1917   fi
1918 fi])dnl
1919 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1920   AC_MSG_RESULT(yes)
1921   ifelse([$2], , :, [$2])
1922 else
1923   AC_MSG_RESULT(no)
1924 ifelse([$3], , , [$3])
1925 fi
1926 ])
1927
1928 dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1929 AC_DEFUN(AC_CHECK_FILES,
1930 [for ac_file in $1
1931 do
1932 AC_CHECK_FILE($ac_file,
1933 [changequote(, )dnl
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
1937 done
1938 ])
1939
1940
1941 dnl ### Checking for library functions
1942
1943
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,
1948 [AC_TRY_LINK(
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.  */
1954 #include <assert.h>
1955 /* Override any gcc2 internal prototype to avoid an error.  */
1956 #ifdef __cplusplus
1957 extern "C"
1958 #endif
1959 /* We use char because int might match the return type of a gcc2
1960    builtin and then its argument prototype would still apply.  */
1961 char $1();
1962 ], [
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)
1967 choke me
1968 #else
1969 $1();
1970 #endif
1971 ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
1972 if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
1973   AC_MSG_RESULT(yes)
1974   ifelse([$2], , :, [$2])
1975 else
1976   AC_MSG_RESULT(no)
1977 ifelse([$3], , , [$3
1978 ])dnl
1979 fi
1980 ])
1981
1982 dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
1983 AC_DEFUN(AC_CHECK_FUNCS,
1984 [for ac_func in $1
1985 do
1986 AC_CHECK_FUNC($ac_func,
1987 [changequote(, )dnl
1988   ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1989 changequote([, ])dnl
1990   AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
1991 done
1992 ])
1993
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
1998 ])
1999
2000
2001 dnl ### Checking compiler characteristics
2002
2003
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>
2015 int main()
2016 {
2017   FILE *f=fopen("conftestval", "w");
2018   if (!f) exit(1);
2019   fprintf(f, "%d\n", sizeof($1));
2020   exit(0);
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
2026 ])
2027
2028
2029 dnl ### Checking for typedefs
2030
2031
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,
2037 [AC_EGREP_CPP(dnl
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)
2042 #include <stdlib.h>
2043 #endif
2044 #if defined(STDC_HEADERS) || defined(HAVE_STDDEF_H)
2045 #include <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
2049   AC_DEFINE($1, $2)
2050 fi
2051 ])
2052
2053
2054 dnl ### Creating output files
2055
2056
2057 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
2058 AC_DEFUN(AC_CONFIG_HEADER,
2059 [define(AC_LIST_HEADER, $1)])
2060
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,
2065 [dnl
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])])
2068
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
2075 [$1]
2076 AC_DIVERT_POP()dnl
2077 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
2078 [$2]
2079 AC_DIVERT_POP()])
2080
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
2087 ])
2088
2089 dnl The big finish.
2090 dnl Produce config.status, config.h, and links; and configure subdirs.
2091 dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
2092 define(AC_OUTPUT,
2093 [trap '' 1 2 15
2094 AC_CACHE_SAVE
2095 trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
2096
2097 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2098 # Let make expand exec_prefix.
2099 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2100
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
2105 changequote(, )dnl
2106   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2107 changequote([, ])dnl
2108 fi
2109
2110 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2111
2112 ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
2113
2114 # Without the "./", some shells look in PATH for config.status.
2115 : ${CONFIG_STATUS=./config.status}
2116
2117 echo creating $CONFIG_STATUS
2118 rm -f $CONFIG_STATUS
2119 cat > $CONFIG_STATUS <<EOF
2120 #! /bin/sh
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`:
2127 #
2128 [#] [$]0 [$]ac_configure_args
2129 #
2130 # Compiler output produced by configure, useful for debugging
2131 # configure, is in ./config.log if it exists.
2132
2133 changequote(, )dnl
2134 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2135 changequote([, ])dnl
2136 for ac_option
2137 do
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"
2144     exit 0 ;;
2145   -help | --help | --hel | --he | --h)
2146     echo "[\$]ac_cs_usage"; exit 0 ;;
2147   *) echo "[\$]ac_cs_usage"; exit 1 ;;
2148   esac
2149 done
2150
2151 ac_given_srcdir=$srcdir
2152 ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
2153 ])dnl
2154
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
2160 EOF
2161 cat >> $CONFIG_STATUS <<EOF
2162
2163 AC_OUTPUT_FILES($1)
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
2166 EOF
2167 cat >> $CONFIG_STATUS <<EOF
2168 undivert(AC_DIVERSION_ICMDS)dnl
2169 $3
2170 EOF
2171 cat >> $CONFIG_STATUS <<\EOF
2172 undivert(AC_DIVERSION_CMDS)dnl
2173 $2
2174 exit 0
2175 EOF
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
2181 ])dnl
2182
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
2196 s%\[%\\&%g
2197 s%\]%\\&%g
2198 s%\$%$$%g
2199 changequote([, ])dnl
2200 EOF
2201 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2202 rm -f conftest.defs
2203 ])
2204
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.
2212 changequote(, )dnl
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.
2218 $ac_vpsub
2219 dnl Shell code in configure.in might set extrasub.
2220 $extrasub
2221 dnl Insert the sed substitutions of variables.
2222 undivert(AC_DIVERSION_SED)
2223 CEOF
2224 EOF
2225
2226 cat >> $CONFIG_STATUS <<\EOF
2227
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.
2234 ac_more_lines=:
2235 ac_sed_cmds=""
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
2239   else
2240     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2241   fi
2242   if test ! -s conftest.s$ac_file; then
2243     ac_more_lines=false
2244     rm -f conftest.s$ac_file
2245   else
2246     if test -z "$ac_sed_cmds"; then
2247       ac_sed_cmds="sed -f conftest.s$ac_file"
2248     else
2249       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2250     fi
2251     ac_file=`expr $ac_file + 1`
2252     ac_beg=$ac_end
2253     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2254   fi
2255 done
2256 if test -z "$ac_sed_cmds"; then
2257   ac_sed_cmds=cat
2258 fi
2259 EOF
2260
2261 cat >> $CONFIG_STATUS <<EOF
2262
2263 CONFIG_FILES=\${CONFIG_FILES-"$1"}
2264 EOF
2265 cat >> $CONFIG_STATUS <<\EOF
2266 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2267 changequote(, )dnl
2268   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2269   case "$ac_file" 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" ;;
2273   esac
2274
2275   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2276
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.
2285 changequote(, )dnl
2286     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2287 changequote([, ])dnl
2288   else
2289     ac_dir_suffix= ac_dots=
2290   fi
2291
2292   case "$ac_given_srcdir" in
2293   .)  srcdir=.
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" ;;
2297   *) # Relative path.
2298     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2299     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2300   esac
2301
2302 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2303 [  case "$ac_given_INSTALL" in
2304 changequote(, )dnl
2305   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2306 changequote([, ])dnl
2307   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2308   esac
2309 ])dnl
2310
2311   echo creating "$ac_file"
2312   rm -f "$ac_file"
2313   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2314   case "$ac_file" in
2315   *Makefile*) ac_comsub="1i\\
2316 # $configure_input" ;;
2317   *) ac_comsub= ;;
2318   esac
2319
2320   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2321   sed -e "$ac_comsub
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
2326 ])dnl
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
2333 dnl   else
2334 dnl     rm -f $ac_file
2335 dnl    mv conftest.out $ac_file
2336 dnl  fi
2337 fi; done
2338 rm -f conftest.s*
2339 ])
2340
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.
2349 #
2350 # ac_d sets the value in "#define NAME VALUE" lines.
2351 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2352 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2353 ac_dC='\3'
2354 ac_dD='%g'
2355 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2356 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2357 ac_uB='\([      ]\)%\1#\2define\3'
2358 ac_uC=' '
2359 ac_uD='\4%g'
2360 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2361 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2362 ac_eB='<<$>>%\1#\2define\3'
2363 ac_eC=' '
2364 ac_eD='%g'
2365 # ac_f turns "#define NAME" without trailing blanks into "#define NAME VALUE".
2366 ac_fA='s%^\([   ]*\)#\([        ]*\)define\([   ][      ]*\)'
2367 ac_fB='<<$>>%\1#\2define\3'
2368 ac_fC=' '
2369 ac_fD='%g'
2370 changequote([, ])dnl
2371
2372 if test "${CONFIG_HEADERS+set}" != set; then
2373 EOF
2374 dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
2375 cat >> $CONFIG_STATUS <<EOF
2376   CONFIG_HEADERS="$1"
2377 EOF
2378 cat >> $CONFIG_STATUS <<\EOF
2379 fi
2380 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2381 changequote(, )dnl
2382   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2383   case "$ac_file" 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" ;;
2387   esac
2388 changequote([, ])dnl
2389
2390   echo creating $ac_file
2391
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
2395
2396 EOF
2397
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.
2402 rm -f conftest.vals
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
2407 s/[\\&%]/\\&/g
2408 s%[\\$`]%\\&%g
2409 s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2410 s%ac_d%ac_u%gp
2411 s%ac_u%ac_e%gp
2412 s%ac_e%ac_f%gp
2413 changequote([, ])dnl
2414 EOF
2415 sed -n -f conftest.hdr confdefs.h > conftest.vals
2416 rm -f conftest.hdr
2417
2418 dnl This is not necessary at all: Just write
2419 dnl #ifndef _POSIX_SOURCE
2420 dnl #undef _POSIX_SOURCE
2421 dnl #endif
2422 dnl instead of
2423 dnl #undef _POSIX_SOURCE
2424 dnl
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
2432 dnl EOF
2433
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.
2436
2437 rm -f conftest.tail
2438 while :
2439 do
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
2446   echo 'CEOF
2447   sed -f conftest.frag conftest.in > conftest.out
2448   rm -f conftest.in
2449   mv conftest.out conftest.in
2450 ' >> $CONFIG_STATUS
2451   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2452   rm -f conftest.vals
2453   mv conftest.tail conftest.vals
2454 done
2455 rm -f conftest.vals
2456
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
2462   rm -f conftest.in
2463   if cmp -s $ac_file conftest.h 2>/dev/null; then
2464     echo "$ac_file is unchanged"
2465     rm -f conftest.h
2466   else
2467     # Remove last slash and all that follows it.  Not all systems have dirname.
2468 changequote(, )dnl
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"
2474     fi
2475     rm -f $ac_file
2476     mv conftest.h $ac_file
2477   fi
2478 fi; done
2479
2480 ])
2481
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,
2486 [EOF
2487
2488 cat >> $CONFIG_STATUS <<EOF
2489 ac_sources="$1"
2490 ac_dests="$2"
2491 EOF
2492
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=[$]*
2498
2499   echo "linking $srcdir/$ac_source to $ac_dest"
2500
2501   if test ! -r $srcdir/$ac_source; then
2502     AC_MSG_ERROR($srcdir/$ac_source: File not found)
2503   fi
2504   rm -f $ac_dest
2505
2506   # Make relative symlinks.
2507   # Remove last slash and all that follows it.  Not all systems have dirname.
2508 changequote(, )dnl
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.
2516 changequote(, )dnl
2517     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2518 changequote([, ])dnl
2519   else
2520     ac_dest_dir_suffix= ac_dots=
2521   fi
2522
2523   case "$srcdir" in
2524 changequote(, )dnl
2525   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2526 changequote([, ])dnl
2527   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2528   esac
2529
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 :
2533   else
2534     AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
2535   fi
2536 done
2537 ])
2538
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,
2543 [
2544 if test "$no_recursion" != yes; then
2545
2546   # Remove --cache-file and --srcdir arguments so they do not pile up.
2547   ac_sub_configure_args=
2548   ac_prev=
2549   for ac_arg in $ac_configure_args; do
2550     if test -n "$ac_prev"; then
2551       ac_prev=
2552       continue
2553     fi
2554     case "$ac_arg" in
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=*)
2560       ;;
2561     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2562       ac_prev=srcdir ;;
2563     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2564       ;;
2565     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2566     esac
2567   done
2568
2569   for ac_config_dir in $1; do
2570
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
2574       continue
2575     fi
2576
2577     echo configuring in $ac_config_dir
2578
2579     case "$srcdir" in
2580     .) ;;
2581     *)
2582       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2583       else
2584         AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
2585       fi
2586       ;;
2587     esac
2588
2589     ac_popdir=`pwd`
2590     cd $ac_config_dir
2591
2592 changequote(, )dnl
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
2596
2597     case "$srcdir" in
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 ;;
2602     *) # Relative path.
2603       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2604     esac
2605
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
2611     else
2612       AC_MSG_WARN(no configuration information is in $ac_config_dir)
2613       ac_sub_configure=
2614     fi
2615
2616     # The recursion is here.
2617     if test -n "$ac_sub_configure"; then
2618
2619       # Make the cache file name correct relative to the subdirectory.
2620       case "$cache_file" in
2621       /*) ac_sub_cache_file=$cache_file ;;
2622       *) # Relative path.
2623         if test -n "$ac_dots"; then
2624           ac_sub_cache_file="$ac_dots"`echo "$cache_file" | sed 's,^\./,,'`
2625         else
2626           ac_sub_cache_file="$cache_file"
2627         fi
2628         ;;
2629       esac
2630 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
2631       [  case "$ac_given_INSTALL" in
2632 changequote(, )dnl
2633         [/$]*) INSTALL="$ac_given_INSTALL" ;;
2634 changequote([, ])dnl
2635         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2636         esac
2637 ])dnl
2638
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
2642       then :
2643       else
2644         AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
2645       fi
2646     fi
2647
2648     cd $ac_popdir
2649   done
2650 fi
2651 ])