source: trunk/gsdl/packages/mg/configure@ 3762

Last change on this file since 3762 was 3762, checked in by jrm21, 21 years ago

undid previous changes, which broke mg for gsdl-2

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 86.3 KB
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-dmalloc use dmalloc, as in
16 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz"
17ac_help="$ac_help
18 --with-regex use older regex in lieu of GNU rx for matching"
19
20# Initialize some variables set by options.
21# The variables have the same names as the options, with
22# dashes changed to underlines.
23build=NONE
24cache_file=./config.cache
25exec_prefix=NONE
26host=NONE
27no_create=
28nonopt=NONE
29no_recursion=
30prefix=NONE
31program_prefix=NONE
32program_suffix=NONE
33program_transform_name=s,x,x,
34silent=
35site=
36srcdir=
37target=NONE
38verbose=
39x_includes=NONE
40x_libraries=NONE
41bindir='${exec_prefix}/bin'
42sbindir='${exec_prefix}/sbin'
43libexecdir='${exec_prefix}/libexec'
44datadir='${prefix}/share'
45sysconfdir='${prefix}/etc'
46sharedstatedir='${prefix}/com'
47localstatedir='${prefix}/var'
48libdir='${exec_prefix}/lib'
49includedir='${prefix}/include'
50oldincludedir='/usr/include'
51infodir='${prefix}/info'
52mandir='${prefix}/man'
53
54# Initialize some other variables.
55subdirs=
56MFLAGS= MAKEFLAGS=
57# Maximum number of lines to put in a shell here document.
58ac_max_here_lines=12
59
60ac_prev=
61for ac_option
62do
63
64 # If the previous option needs an argument, assign it.
65 if test -n "$ac_prev"; then
66 eval "$ac_prev=\$ac_option"
67 ac_prev=
68 continue
69 fi
70
71 case "$ac_option" in
72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 *) ac_optarg= ;;
74 esac
75
76 # Accept the important Cygnus configure options, so we can diagnose typos.
77
78 case "$ac_option" in
79
80 -bindir | --bindir | --bindi | --bind | --bin | --bi)
81 ac_prev=bindir ;;
82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83 bindir="$ac_optarg" ;;
84
85 -build | --build | --buil | --bui | --bu)
86 ac_prev=build ;;
87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
88 build="$ac_optarg" ;;
89
90 -cache-file | --cache-file | --cache-fil | --cache-fi \
91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92 ac_prev=cache_file ;;
93 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95 cache_file="$ac_optarg" ;;
96
97 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
98 ac_prev=datadir ;;
99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100 | --da=*)
101 datadir="$ac_optarg" ;;
102
103 -disable-* | --disable-*)
104 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105 # Reject names that are not valid shell variable names.
106 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108 fi
109 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110 eval "enable_${ac_feature}=no" ;;
111
112 -enable-* | --enable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114 # Reject names that are not valid shell variable names.
115 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117 fi
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 case "$ac_option" in
120 *=*) ;;
121 *) ac_optarg=yes ;;
122 esac
123 eval "enable_${ac_feature}='$ac_optarg'" ;;
124
125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127 | --exec | --exe | --ex)
128 ac_prev=exec_prefix ;;
129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131 | --exec=* | --exe=* | --ex=*)
132 exec_prefix="$ac_optarg" ;;
133
134 -gas | --gas | --ga | --g)
135 # Obsolete; use --with-gas.
136 with_gas=yes ;;
137
138 -help | --help | --hel | --he)
139 # Omit some internal or obsolete options to make the list less imposing.
140 # This message is too long to be a string in the A/UX 3.1 sh.
141 cat << EOF
142Usage: configure [options] [host]
143Options: [defaults in brackets after descriptions]
144Configuration:
145 --cache-file=FILE cache test results in FILE
146 --help print this message
147 --no-create do not create output files
148 --quiet, --silent do not print \`checking...' messages
149 --version print the version of autoconf that created configure
150Directory and file names:
151 --prefix=PREFIX install architecture-independent files in PREFIX
152 [$ac_default_prefix]
153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
154 [same as prefix]
155 --bindir=DIR user executables in DIR [EPREFIX/bin]
156 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
157 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
158 --datadir=DIR read-only architecture-independent data in DIR
159 [PREFIX/share]
160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
161 --sharedstatedir=DIR modifiable architecture-independent data in DIR
162 [PREFIX/com]
163 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
164 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
165 --includedir=DIR C header files in DIR [PREFIX/include]
166 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
167 --infodir=DIR info documentation in DIR [PREFIX/info]
168 --mandir=DIR man documentation in DIR [PREFIX/man]
169 --srcdir=DIR find the sources in DIR [configure dir or ..]
170 --program-prefix=PREFIX prepend PREFIX to installed program names
171 --program-suffix=SUFFIX append SUFFIX to installed program names
172 --program-transform-name=PROGRAM
173 run sed PROGRAM on installed program names
174EOF
175 cat << EOF
176Host type:
177 --build=BUILD configure for building on BUILD [BUILD=HOST]
178 --host=HOST configure for HOST [guessed]
179 --target=TARGET configure for TARGET [TARGET=HOST]
180Features and packages:
181 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
182 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
183 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
184 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
185 --x-includes=DIR X include files are in DIR
186 --x-libraries=DIR X library files are in DIR
187EOF
188 if test -n "$ac_help"; then
189 echo "--enable and --with options recognized:$ac_help"
190 fi
191 exit 0 ;;
192
193 -host | --host | --hos | --ho)
194 ac_prev=host ;;
195 -host=* | --host=* | --hos=* | --ho=*)
196 host="$ac_optarg" ;;
197
198 -includedir | --includedir | --includedi | --included | --include \
199 | --includ | --inclu | --incl | --inc)
200 ac_prev=includedir ;;
201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202 | --includ=* | --inclu=* | --incl=* | --inc=*)
203 includedir="$ac_optarg" ;;
204
205 -infodir | --infodir | --infodi | --infod | --info | --inf)
206 ac_prev=infodir ;;
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
209
210 -libdir | --libdir | --libdi | --libd)
211 ac_prev=libdir ;;
212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
213 libdir="$ac_optarg" ;;
214
215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216 | --libexe | --libex | --libe)
217 ac_prev=libexecdir ;;
218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219 | --libexe=* | --libex=* | --libe=*)
220 libexecdir="$ac_optarg" ;;
221
222 -localstatedir | --localstatedir | --localstatedi | --localstated \
223 | --localstate | --localstat | --localsta | --localst \
224 | --locals | --local | --loca | --loc | --lo)
225 ac_prev=localstatedir ;;
226 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229 localstatedir="$ac_optarg" ;;
230
231 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
232 ac_prev=mandir ;;
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
235
236 -nfp | --nfp | --nf)
237 # Obsolete; use --without-fp.
238 with_fp=no ;;
239
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241 | --no-cr | --no-c)
242 no_create=yes ;;
243
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
246 no_recursion=yes ;;
247
248 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250 | --oldin | --oldi | --old | --ol | --o)
251 ac_prev=oldincludedir ;;
252 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255 oldincludedir="$ac_optarg" ;;
256
257 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
258 ac_prev=prefix ;;
259 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260 prefix="$ac_optarg" ;;
261
262 -program-prefix | --program-prefix | --program-prefi | --program-pref \
263 | --program-pre | --program-pr | --program-p)
264 ac_prev=program_prefix ;;
265 -program-prefix=* | --program-prefix=* | --program-prefi=* \
266 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267 program_prefix="$ac_optarg" ;;
268
269 -program-suffix | --program-suffix | --program-suffi | --program-suff \
270 | --program-suf | --program-su | --program-s)
271 ac_prev=program_suffix ;;
272 -program-suffix=* | --program-suffix=* | --program-suffi=* \
273 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274 program_suffix="$ac_optarg" ;;
275
276 -program-transform-name | --program-transform-name \
277 | --program-transform-nam | --program-transform-na \
278 | --program-transform-n | --program-transform- \
279 | --program-transform | --program-transfor \
280 | --program-transfo | --program-transf \
281 | --program-trans | --program-tran \
282 | --progr-tra | --program-tr | --program-t)
283 ac_prev=program_transform_name ;;
284 -program-transform-name=* | --program-transform-name=* \
285 | --program-transform-nam=* | --program-transform-na=* \
286 | --program-transform-n=* | --program-transform-=* \
287 | --program-transform=* | --program-transfor=* \
288 | --program-transfo=* | --program-transf=* \
289 | --program-trans=* | --program-tran=* \
290 | --progr-tra=* | --program-tr=* | --program-t=*)
291 program_transform_name="$ac_optarg" ;;
292
293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294 | -silent | --silent | --silen | --sile | --sil)
295 silent=yes ;;
296
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
298 ac_prev=sbindir ;;
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
300 | --sbi=* | --sb=*)
301 sbindir="$ac_optarg" ;;
302
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
306 | --sha | --sh)
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
311 | --sha=* | --sh=*)
312 sharedstatedir="$ac_optarg" ;;
313
314 -site | --site | --sit)
315 ac_prev=site ;;
316 -site=* | --site=* | --sit=*)
317 site="$ac_optarg" ;;
318
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
320 ac_prev=srcdir ;;
321 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322 srcdir="$ac_optarg" ;;
323
324 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325 | --syscon | --sysco | --sysc | --sys | --sy)
326 ac_prev=sysconfdir ;;
327 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329 sysconfdir="$ac_optarg" ;;
330
331 -target | --target | --targe | --targ | --tar | --ta | --t)
332 ac_prev=target ;;
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
335
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
337 verbose=yes ;;
338
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.12"
341 exit 0 ;;
342
343 -with-* | --with-*)
344 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
348 fi
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
350 case "$ac_option" in
351 *=*) ;;
352 *) ac_optarg=yes ;;
353 esac
354 eval "with_${ac_package}='$ac_optarg'" ;;
355
356 -without-* | --without-*)
357 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 eval "with_${ac_package}=no" ;;
364
365 --x)
366 # Obsolete; use --with-x.
367 with_x=yes ;;
368
369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370 | --x-incl | --x-inc | --x-in | --x-i)
371 ac_prev=x_includes ;;
372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374 x_includes="$ac_optarg" ;;
375
376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378 ac_prev=x_libraries ;;
379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381 x_libraries="$ac_optarg" ;;
382
383 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
384 ;;
385
386 *)
387 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388 echo "configure: warning: $ac_option: invalid host type" 1>&2
389 fi
390 if test "x$nonopt" != xNONE; then
391 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
392 fi
393 nonopt="$ac_option"
394 ;;
395
396 esac
397done
398
399if test -n "$ac_prev"; then
400 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
401fi
402
403trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
404
405# File descriptor usage:
406# 0 standard input
407# 1 file creation
408# 2 errors and warnings
409# 3 some systems may open it to /dev/tty
410# 4 used on the Kubota Titan
411# 6 checking for... messages and results
412# 5 compiler messages saved in config.log
413if test "$silent" = yes; then
414 exec 6>/dev/null
415else
416 exec 6>&1
417fi
418exec 5>./config.log
419
420echo "\
421This file contains any messages produced by compilers while
422running configure, to aid debugging if configure makes a mistake.
423" 1>&5
424
425# Strip out --no-create and --no-recursion so they do not pile up.
426# Also quote any args containing shell metacharacters.
427ac_configure_args=
428for ac_arg
429do
430 case "$ac_arg" in
431 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432 | --no-cr | --no-c) ;;
433 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
438 esac
439done
440
441# NLS nuisances.
442# Only set these to C if already set. These must not be set unconditionally
443# because not all systems understand e.g. LANG=C (notably SCO).
444# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445# Non-C LC_CTYPE values break the ctype check.
446if test "${LANG+set}" = set; then LANG=C; export LANG; fi
447if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
450
451# confdefs.h avoids OS command line length limits that DEFS can exceed.
452rm -rf conftest* confdefs.h
453# AIX cpp loses on an empty file, so make sure it contains at least a newline.
454echo > confdefs.h
455
456# A filename unique to this package, relative to the directory that
457# configure is in, which we can look for to find out if srcdir is correct.
458ac_unique_file=src/text/mgquery.c
459
460# Find the source files, if location was not specified.
461if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
464 ac_prog=$0
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467 srcdir=$ac_confdir
468 if test ! -r $srcdir/$ac_unique_file; then
469 srcdir=..
470 fi
471else
472 ac_srcdir_defaulted=no
473fi
474if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
477 else
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
479 fi
480fi
481srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
482
483# Prefer explicitly selected file to automatically selected ones.
484if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
487 else
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
489 fi
490fi
491for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
494 . "$ac_site_file"
495 fi
496done
497
498if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
500 . $cache_file
501else
502 echo "creating cache $cache_file"
503 > $cache_file
504fi
505
506ac_ext=c
507# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508ac_cpp='$CPP $CPPFLAGS'
509ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511cross_compiling=$ac_cv_prog_cc_cross
512
513if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
515 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
516 ac_n= ac_c='
517' ac_t=' '
518 else
519 ac_n=-n ac_c= ac_t=
520 fi
521else
522 ac_n= ac_c='\c' ac_t=
523fi
524
525
526
527if test "$program_transform_name" = s,x,x,; then
528 program_transform_name=
529else
530 # Double any \ or $. echo might interpret backslashes.
531 cat <<\EOF_SED > conftestsed
532s,\\,\\\\,g; s,\$,$$,g
533EOF_SED
534 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
535 rm -f conftestsed
536fi
537test "$program_prefix" != NONE &&
538 program_transform_name="s,^,${program_prefix},; $program_transform_name"
539# Use a double $ so make ignores it.
540test "$program_suffix" != NONE &&
541 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
542
543# sed with no file args requires a program.
544test "$program_transform_name" = "" && program_transform_name="s,x,x,"
545
546
547PACKAGE=mg
548VERSION=1.3e
549
550cat >> confdefs.h <<EOF
551#define PACKAGE "$PACKAGE"
552EOF
553
554cat >> confdefs.h <<EOF
555#define VERSION "$VERSION"
556EOF
557
558
559
560
561for ac_prog in $CCC c++ g++ gcc CC cxx cc++
562do
563# Extract the first word of "$ac_prog", so it can be a program name with args.
564set dummy $ac_prog; ac_word=$2
565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
566echo "configure:567: checking for $ac_word" >&5
567if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
568 echo $ac_n "(cached) $ac_c" 1>&6
569else
570 if test -n "$CXX"; then
571 ac_cv_prog_CXX="$CXX" # Let the user override the test.
572else
573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
574 for ac_dir in $PATH; do
575 test -z "$ac_dir" && ac_dir=.
576 if test -f $ac_dir/$ac_word; then
577 ac_cv_prog_CXX="$ac_prog"
578 break
579 fi
580 done
581 IFS="$ac_save_ifs"
582fi
583fi
584CXX="$ac_cv_prog_CXX"
585if test -n "$CXX"; then
586 echo "$ac_t""$CXX" 1>&6
587else
588 echo "$ac_t""no" 1>&6
589fi
590
591test -n "$CXX" && break
592done
593test -n "$CXX" || CXX="gcc"
594
595
596echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
597echo "configure:598: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
598
599ac_ext=C
600# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
601ac_cpp='$CXXCPP $CPPFLAGS'
602ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
603ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
604cross_compiling=$ac_cv_prog_cxx_cross
605
606cat > conftest.$ac_ext <<EOF
607#line 608 "configure"
608#include "confdefs.h"
609main(){return(0);}
610EOF
611if { (eval echo configure:612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
612 ac_cv_prog_cxx_works=yes
613 # If we can't run a trivial program, we are probably using a cross compiler.
614 if (./conftest; exit) 2>/dev/null; then
615 ac_cv_prog_cxx_cross=no
616 else
617 ac_cv_prog_cxx_cross=yes
618 fi
619else
620 echo "configure: failed program was:" >&5
621 cat conftest.$ac_ext >&5
622 ac_cv_prog_cxx_works=no
623fi
624rm -fr conftest*
625ac_ext=c
626# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
627ac_cpp='$CPP $CPPFLAGS'
628ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
629ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
630cross_compiling=$ac_cv_prog_cc_cross
631
632echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
633if test $ac_cv_prog_cxx_works = no; then
634 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
635fi
636echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
637echo "configure:638: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
638echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
639cross_compiling=$ac_cv_prog_cxx_cross
640
641echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
642echo "configure:643: checking whether we are using GNU C++" >&5
643if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
645else
646 cat > conftest.C <<EOF
647#ifdef __GNUC__
648 yes;
649#endif
650EOF
651if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
652 ac_cv_prog_gxx=yes
653else
654 ac_cv_prog_gxx=no
655fi
656fi
657
658echo "$ac_t""$ac_cv_prog_gxx" 1>&6
659
660if test $ac_cv_prog_gxx = yes; then
661 GXX=yes
662 ac_test_CXXFLAGS="${CXXFLAGS+set}"
663 ac_save_CXXFLAGS="$CXXFLAGS"
664 CXXFLAGS=
665 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
666echo "configure:667: checking whether ${CXX-g++} accepts -g" >&5
667if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
668 echo $ac_n "(cached) $ac_c" 1>&6
669else
670 echo 'void f(){}' > conftest.cc
671if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
672 ac_cv_prog_cxx_g=yes
673else
674 ac_cv_prog_cxx_g=no
675fi
676rm -f conftest*
677
678fi
679
680echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
681 if test "$ac_test_CXXFLAGS" = set; then
682 CXXFLAGS="$ac_save_CXXFLAGS"
683 elif test $ac_cv_prog_cxx_g = yes; then
684 CXXFLAGS="-g -O2"
685 else
686 CXXFLAGS="-O2"
687 fi
688else
689 GXX=
690 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
691fi
692
693for ac_prog in mawk gawk nawk awk
694do
695# Extract the first word of "$ac_prog", so it can be a program name with args.
696set dummy $ac_prog; ac_word=$2
697echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
698echo "configure:699: checking for $ac_word" >&5
699if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
700 echo $ac_n "(cached) $ac_c" 1>&6
701else
702 if test -n "$AWK"; then
703 ac_cv_prog_AWK="$AWK" # Let the user override the test.
704else
705 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
706 for ac_dir in $PATH; do
707 test -z "$ac_dir" && ac_dir=.
708 if test -f $ac_dir/$ac_word; then
709 ac_cv_prog_AWK="$ac_prog"
710 break
711 fi
712 done
713 IFS="$ac_save_ifs"
714fi
715fi
716AWK="$ac_cv_prog_AWK"
717if test -n "$AWK"; then
718 echo "$ac_t""$AWK" 1>&6
719else
720 echo "$ac_t""no" 1>&6
721fi
722
723test -n "$AWK" && break
724done
725
726for ac_prog in 'bison -y' byacc
727do
728# Extract the first word of "$ac_prog", so it can be a program name with args.
729set dummy $ac_prog; ac_word=$2
730echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
731echo "configure:732: checking for $ac_word" >&5
732if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
733 echo $ac_n "(cached) $ac_c" 1>&6
734else
735 if test -n "$YACC"; then
736 ac_cv_prog_YACC="$YACC" # Let the user override the test.
737else
738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
739 for ac_dir in $PATH; do
740 test -z "$ac_dir" && ac_dir=.
741 if test -f $ac_dir/$ac_word; then
742 ac_cv_prog_YACC="$ac_prog"
743 break
744 fi
745 done
746 IFS="$ac_save_ifs"
747fi
748fi
749YACC="$ac_cv_prog_YACC"
750if test -n "$YACC"; then
751 echo "$ac_t""$YACC" 1>&6
752else
753 echo "$ac_t""no" 1>&6
754fi
755
756test -n "$YACC" && break
757done
758test -n "$YACC" || YACC="yacc"
759
760# Extract the first word of "gcc", so it can be a program name with args.
761set dummy gcc; ac_word=$2
762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
763echo "configure:764: checking for $ac_word" >&5
764if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 if test -n "$CC"; then
768 ac_cv_prog_CC="$CC" # Let the user override the test.
769else
770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
771 for ac_dir in $PATH; do
772 test -z "$ac_dir" && ac_dir=.
773 if test -f $ac_dir/$ac_word; then
774 ac_cv_prog_CC="gcc"
775 break
776 fi
777 done
778 IFS="$ac_save_ifs"
779fi
780fi
781CC="$ac_cv_prog_CC"
782if test -n "$CC"; then
783 echo "$ac_t""$CC" 1>&6
784else
785 echo "$ac_t""no" 1>&6
786fi
787
788if test -z "$CC"; then
789 # Extract the first word of "cc", so it can be a program name with args.
790set dummy cc; ac_word=$2
791echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
792echo "configure:793: checking for $ac_word" >&5
793if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
794 echo $ac_n "(cached) $ac_c" 1>&6
795else
796 if test -n "$CC"; then
797 ac_cv_prog_CC="$CC" # Let the user override the test.
798else
799 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
800 ac_prog_rejected=no
801 for ac_dir in $PATH; do
802 test -z "$ac_dir" && ac_dir=.
803 if test -f $ac_dir/$ac_word; then
804 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
805 ac_prog_rejected=yes
806 continue
807 fi
808 ac_cv_prog_CC="cc"
809 break
810 fi
811 done
812 IFS="$ac_save_ifs"
813if test $ac_prog_rejected = yes; then
814 # We found a bogon in the path, so make sure we never use it.
815 set dummy $ac_cv_prog_CC
816 shift
817 if test $# -gt 0; then
818 # We chose a different compiler from the bogus one.
819 # However, it has the same basename, so the bogon will be chosen
820 # first if we set CC to just the basename; use the full file name.
821 shift
822 set dummy "$ac_dir/$ac_word" "$@"
823 shift
824 ac_cv_prog_CC="$@"
825 fi
826fi
827fi
828fi
829CC="$ac_cv_prog_CC"
830if test -n "$CC"; then
831 echo "$ac_t""$CC" 1>&6
832else
833 echo "$ac_t""no" 1>&6
834fi
835
836 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
837fi
838
839echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
840echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
841
842ac_ext=c
843# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
844ac_cpp='$CPP $CPPFLAGS'
845ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
846ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
847cross_compiling=$ac_cv_prog_cc_cross
848
849cat > conftest.$ac_ext <<EOF
850#line 851 "configure"
851#include "confdefs.h"
852main(){return(0);}
853EOF
854if { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
855 ac_cv_prog_cc_works=yes
856 # If we can't run a trivial program, we are probably using a cross compiler.
857 if (./conftest; exit) 2>/dev/null; then
858 ac_cv_prog_cc_cross=no
859 else
860 ac_cv_prog_cc_cross=yes
861 fi
862else
863 echo "configure: failed program was:" >&5
864 cat conftest.$ac_ext >&5
865 ac_cv_prog_cc_works=no
866fi
867rm -fr conftest*
868
869echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
870if test $ac_cv_prog_cc_works = no; then
871 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
872fi
873echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
874echo "configure:875: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
875echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
876cross_compiling=$ac_cv_prog_cc_cross
877
878echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
879echo "configure:880: checking whether we are using GNU C" >&5
880if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
881 echo $ac_n "(cached) $ac_c" 1>&6
882else
883 cat > conftest.c <<EOF
884#ifdef __GNUC__
885 yes;
886#endif
887EOF
888if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
889 ac_cv_prog_gcc=yes
890else
891 ac_cv_prog_gcc=no
892fi
893fi
894
895echo "$ac_t""$ac_cv_prog_gcc" 1>&6
896
897if test $ac_cv_prog_gcc = yes; then
898 GCC=yes
899 ac_test_CFLAGS="${CFLAGS+set}"
900 ac_save_CFLAGS="$CFLAGS"
901 CFLAGS=
902 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
903echo "configure:904: checking whether ${CC-cc} accepts -g" >&5
904if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
905 echo $ac_n "(cached) $ac_c" 1>&6
906else
907 echo 'void f(){}' > conftest.c
908if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
909 ac_cv_prog_cc_g=yes
910else
911 ac_cv_prog_cc_g=no
912fi
913rm -f conftest*
914
915fi
916
917echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
918 if test "$ac_test_CFLAGS" = set; then
919 CFLAGS="$ac_save_CFLAGS"
920 elif test $ac_cv_prog_cc_g = yes; then
921 CFLAGS="-g -O2"
922 else
923 CFLAGS="-O2"
924 fi
925else
926 GCC=
927 test "${CFLAGS+set}" = set || CFLAGS="-g"
928fi
929
930ac_aux_dir=
931for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
932 if test -f $ac_dir/install-sh; then
933 ac_aux_dir=$ac_dir
934 ac_install_sh="$ac_aux_dir/install-sh -c"
935 break
936 elif test -f $ac_dir/install.sh; then
937 ac_aux_dir=$ac_dir
938 ac_install_sh="$ac_aux_dir/install.sh -c"
939 break
940 fi
941done
942if test -z "$ac_aux_dir"; then
943 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
944fi
945ac_config_guess=$ac_aux_dir/config.guess
946ac_config_sub=$ac_aux_dir/config.sub
947ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
948
949# Find a good install program. We prefer a C program (faster),
950# so one script is as good as another. But avoid the broken or
951# incompatible versions:
952# SysV /etc/install, /usr/sbin/install
953# SunOS /usr/etc/install
954# IRIX /sbin/install
955# AIX /bin/install
956# AFS /usr/afsws/bin/install, which mishandles nonexistent args
957# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
958# ./install, which can be erroneously created by make from ./install.sh.
959echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
960echo "configure:961: checking for a BSD compatible install" >&5
961if test -z "$INSTALL"; then
962if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964else
965 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
966 for ac_dir in $PATH; do
967 # Account for people who put trailing slashes in PATH elements.
968 case "$ac_dir/" in
969 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
970 *)
971 # OSF1 and SCO ODT 3.0 have their own names for install.
972 for ac_prog in ginstall installbsd scoinst install; do
973 if test -f $ac_dir/$ac_prog; then
974 if test $ac_prog = install &&
975 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
976 # AIX install. It has an incompatible calling convention.
977 # OSF/1 installbsd also uses dspmsg, but is usable.
978 :
979 else
980 ac_cv_path_install="$ac_dir/$ac_prog -c"
981 break 2
982 fi
983 fi
984 done
985 ;;
986 esac
987 done
988 IFS="$ac_save_IFS"
989
990fi
991 if test "${ac_cv_path_install+set}" = set; then
992 INSTALL="$ac_cv_path_install"
993 else
994 # As a last resort, use the slow shell script. We don't cache a
995 # path for INSTALL within a source directory, because that will
996 # break other packages using the cache if that directory is
997 # removed, or if the path is relative.
998 INSTALL="$ac_install_sh"
999 fi
1000fi
1001echo "$ac_t""$INSTALL" 1>&6
1002
1003# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1004# It thinks the first close brace ends the variable substitution.
1005test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1006
1007test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1008
1009echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1010echo "configure:1011: checking whether ln -s works" >&5
1011if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1012 echo $ac_n "(cached) $ac_c" 1>&6
1013else
1014 rm -f conftestdata
1015if ln -s X conftestdata 2>/dev/null
1016then
1017 rm -f conftestdata
1018 ac_cv_prog_LN_S="ln -s"
1019else
1020 ac_cv_prog_LN_S=ln
1021fi
1022fi
1023LN_S="$ac_cv_prog_LN_S"
1024if test "$ac_cv_prog_LN_S" = "ln -s"; then
1025 echo "$ac_t""yes" 1>&6
1026else
1027 echo "$ac_t""no" 1>&6
1028fi
1029
1030echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1031echo "configure:1032: checking whether ${MAKE-make} sets \${MAKE}" >&5
1032set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1033if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1034 echo $ac_n "(cached) $ac_c" 1>&6
1035else
1036 cat > conftestmake <<\EOF
1037all:
1038 @echo 'ac_maketemp="${MAKE}"'
1039EOF
1040# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1041eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1042if test -n "$ac_maketemp"; then
1043 eval ac_cv_prog_make_${ac_make}_set=yes
1044else
1045 eval ac_cv_prog_make_${ac_make}_set=no
1046fi
1047rm -f conftestmake
1048fi
1049if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1050 echo "$ac_t""yes" 1>&6
1051 SET_MAKE=
1052else
1053 echo "$ac_t""no" 1>&6
1054 SET_MAKE="MAKE=${MAKE-make}"
1055fi
1056
1057# Extract the first word of "ranlib", so it can be a program name with args.
1058set dummy ranlib; ac_word=$2
1059echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1060echo "configure:1061: checking for $ac_word" >&5
1061if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1062 echo $ac_n "(cached) $ac_c" 1>&6
1063else
1064 if test -n "$RANLIB"; then
1065 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1066else
1067 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1068 for ac_dir in $PATH; do
1069 test -z "$ac_dir" && ac_dir=.
1070 if test -f $ac_dir/$ac_word; then
1071 ac_cv_prog_RANLIB="ranlib"
1072 break
1073 fi
1074 done
1075 IFS="$ac_save_ifs"
1076 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1077fi
1078fi
1079RANLIB="$ac_cv_prog_RANLIB"
1080if test -n "$RANLIB"; then
1081 echo "$ac_t""$RANLIB" 1>&6
1082else
1083 echo "$ac_t""no" 1>&6
1084fi
1085
1086
1087echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1088echo "configure:1089: checking how to run the C preprocessor" >&5
1089# On Suns, sometimes $CPP names a directory.
1090if test -n "$CPP" && test -d "$CPP"; then
1091 CPP=
1092fi
1093if test -z "$CPP"; then
1094if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1095 echo $ac_n "(cached) $ac_c" 1>&6
1096else
1097 # This must be in double quotes, not single quotes, because CPP may get
1098 # substituted into the Makefile and "${CC-cc}" will confuse make.
1099 CPP="${CC-cc} -E"
1100 # On the NeXT, cc -E runs the code through the compiler's parser,
1101 # not just through cpp.
1102 cat > conftest.$ac_ext <<EOF
1103#line 1104 "configure"
1104#include "confdefs.h"
1105#include <assert.h>
1106Syntax Error
1107EOF
1108ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1109{ (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1110ac_err=`grep -v '^ *+' conftest.out`
1111if test -z "$ac_err"; then
1112 :
1113else
1114 echo "$ac_err" >&5
1115 echo "configure: failed program was:" >&5
1116 cat conftest.$ac_ext >&5
1117 rm -rf conftest*
1118 CPP="${CC-cc} -E -traditional-cpp"
1119 cat > conftest.$ac_ext <<EOF
1120#line 1121 "configure"
1121#include "confdefs.h"
1122#include <assert.h>
1123Syntax Error
1124EOF
1125ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1126{ (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1127ac_err=`grep -v '^ *+' conftest.out`
1128if test -z "$ac_err"; then
1129 :
1130else
1131 echo "$ac_err" >&5
1132 echo "configure: failed program was:" >&5
1133 cat conftest.$ac_ext >&5
1134 rm -rf conftest*
1135 CPP=/lib/cpp
1136fi
1137rm -f conftest*
1138fi
1139rm -f conftest*
1140 ac_cv_prog_CPP="$CPP"
1141fi
1142 CPP="$ac_cv_prog_CPP"
1143else
1144 ac_cv_prog_CPP="$CPP"
1145fi
1146echo "$ac_t""$CPP" 1>&6
1147
1148echo $ac_n "checking for AIX""... $ac_c" 1>&6
1149echo "configure:1150: checking for AIX" >&5
1150cat > conftest.$ac_ext <<EOF
1151#line 1152 "configure"
1152#include "confdefs.h"
1153#ifdef _AIX
1154 yes
1155#endif
1156
1157EOF
1158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1159 egrep "yes" >/dev/null 2>&1; then
1160 rm -rf conftest*
1161 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1162#define _ALL_SOURCE 1
1163EOF
1164
1165else
1166 rm -rf conftest*
1167 echo "$ac_t""no" 1>&6
1168fi
1169rm -f conftest*
1170
1171
1172echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1173echo "configure:1174: checking for POSIXized ISC" >&5
1174if test -d /etc/conf/kconfig.d &&
1175 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1176then
1177 echo "$ac_t""yes" 1>&6
1178 ISC=yes # If later tests want to check for ISC.
1179 cat >> confdefs.h <<\EOF
1180#define _POSIX_SOURCE 1
1181EOF
1182
1183 if test "$GCC" = yes; then
1184 CC="$CC -posix"
1185 else
1186 CC="$CC -Xp"
1187 fi
1188else
1189 echo "$ac_t""no" 1>&6
1190 ISC=
1191fi
1192
1193ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1194echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1195echo "configure:1196: checking for minix/config.h" >&5
1196if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199 cat > conftest.$ac_ext <<EOF
1200#line 1201 "configure"
1201#include "confdefs.h"
1202#include <minix/config.h>
1203EOF
1204ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1205{ (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1206ac_err=`grep -v '^ *+' conftest.out`
1207if test -z "$ac_err"; then
1208 rm -rf conftest*
1209 eval "ac_cv_header_$ac_safe=yes"
1210else
1211 echo "$ac_err" >&5
1212 echo "configure: failed program was:" >&5
1213 cat conftest.$ac_ext >&5
1214 rm -rf conftest*
1215 eval "ac_cv_header_$ac_safe=no"
1216fi
1217rm -f conftest*
1218fi
1219if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1220 echo "$ac_t""yes" 1>&6
1221 MINIX=yes
1222else
1223 echo "$ac_t""no" 1>&6
1224MINIX=
1225fi
1226
1227if test "$MINIX" = yes; then
1228 cat >> confdefs.h <<\EOF
1229#define _POSIX_SOURCE 1
1230EOF
1231
1232 cat >> confdefs.h <<\EOF
1233#define _POSIX_1_SOURCE 2
1234EOF
1235
1236 cat >> confdefs.h <<\EOF
1237#define _MINIX 1
1238EOF
1239
1240fi
1241
1242echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1243echo "configure:1244: checking for ${CC-cc} option to accept ANSI C" >&5
1244if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
1245 echo $ac_n "(cached) $ac_c" 1>&6
1246else
1247 ac_cv_prog_cc_stdc=no
1248ac_save_CFLAGS="$CFLAGS"
1249# Don't try gcc -ansi; that turns off useful extensions and
1250# breaks some systems' header files.
1251# AIX -qlanglvl=ansi
1252# Ultrix and OSF/1 -std1
1253# HP-UX -Aa -D_HPUX_SOURCE
1254# SVR4 -Xc
1255for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
1256do
1257 CFLAGS="$ac_save_CFLAGS $ac_arg"
1258 cat > conftest.$ac_ext <<EOF
1259#line 1260 "configure"
1260#include "confdefs.h"
1261#if !defined(__STDC__) || __STDC__ != 1
1262choke me
1263#endif
1264
1265int main() {
1266int test (int i, double x);
1267struct s1 {int (*f) (int a);};
1268struct s2 {int (*f) (double a);};
1269; return 0; }
1270EOF
1271if { (eval echo configure:1272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1272 rm -rf conftest*
1273 ac_cv_prog_cc_stdc="$ac_arg"; break
1274else
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1277fi
1278rm -f conftest*
1279done
1280CFLAGS="$ac_save_CFLAGS"
1281
1282fi
1283
1284echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
1285case "x$ac_cv_prog_cc_stdc" in
1286 x|xno) ;;
1287 *) CC="$CC $ac_cv_prog_cc_stdc" ;;
1288esac
1289
1290
1291echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
1292echo "configure:1293: checking for function prototypes" >&5
1293if test "$ac_cv_prog_cc_stdc" != no; then
1294 echo "$ac_t""yes" 1>&6
1295 cat >> confdefs.h <<\EOF
1296#define PROTOTYPES 1
1297EOF
1298
1299 U= ANSI2KNR=
1300else
1301 echo "$ac_t""no" 1>&6
1302 U=_ ANSI2KNR=ansi2knr
1303fi
1304
1305echo $ac_n "checking for working const""... $ac_c" 1>&6
1306echo "configure:1307: checking for working const" >&5
1307if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1308 echo $ac_n "(cached) $ac_c" 1>&6
1309else
1310 cat > conftest.$ac_ext <<EOF
1311#line 1312 "configure"
1312#include "confdefs.h"
1313
1314int main() {
1315
1316/* Ultrix mips cc rejects this. */
1317typedef int charset[2]; const charset x;
1318/* SunOS 4.1.1 cc rejects this. */
1319char const *const *ccp;
1320char **p;
1321/* NEC SVR4.0.2 mips cc rejects this. */
1322struct point {int x, y;};
1323static struct point const zero = {0,0};
1324/* AIX XL C 1.02.0.0 rejects this.
1325 It does not let you subtract one const X* pointer from another in an arm
1326 of an if-expression whose if-part is not a constant expression */
1327const char *g = "string";
1328ccp = &g + (g ? g-g : 0);
1329/* HPUX 7.0 cc rejects these. */
1330++ccp;
1331p = (char**) ccp;
1332ccp = (char const *const *) p;
1333{ /* SCO 3.2v4 cc rejects this. */
1334 char *t;
1335 char const *s = 0 ? (char *) 0 : (char const *) 0;
1336
1337 *t++ = 0;
1338}
1339{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1340 int x[] = {25, 17};
1341 const int *foo = &x[0];
1342 ++foo;
1343}
1344{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1345 typedef const int *iptr;
1346 iptr p = 0;
1347 ++p;
1348}
1349{ /* AIX XL C 1.02.0.0 rejects this saying
1350 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1351 struct s { int j; const int *ap[3]; };
1352 struct s *b; b->j = 5;
1353}
1354{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1355 const int foo = 10;
1356}
1357
1358; return 0; }
1359EOF
1360if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1361 rm -rf conftest*
1362 ac_cv_c_const=yes
1363else
1364 echo "configure: failed program was:" >&5
1365 cat conftest.$ac_ext >&5
1366 rm -rf conftest*
1367 ac_cv_c_const=no
1368fi
1369rm -f conftest*
1370fi
1371
1372echo "$ac_t""$ac_cv_c_const" 1>&6
1373if test $ac_cv_c_const = no; then
1374 cat >> confdefs.h <<\EOF
1375#define const
1376EOF
1377
1378fi
1379
1380echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1381echo "configure:1382: checking for ANSI C header files" >&5
1382if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1383 echo $ac_n "(cached) $ac_c" 1>&6
1384else
1385 cat > conftest.$ac_ext <<EOF
1386#line 1387 "configure"
1387#include "confdefs.h"
1388#include <stdlib.h>
1389#include <stdarg.h>
1390#include <string.h>
1391#include <float.h>
1392EOF
1393ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1394{ (eval echo configure:1395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1395ac_err=`grep -v '^ *+' conftest.out`
1396if test -z "$ac_err"; then
1397 rm -rf conftest*
1398 ac_cv_header_stdc=yes
1399else
1400 echo "$ac_err" >&5
1401 echo "configure: failed program was:" >&5
1402 cat conftest.$ac_ext >&5
1403 rm -rf conftest*
1404 ac_cv_header_stdc=no
1405fi
1406rm -f conftest*
1407
1408if test $ac_cv_header_stdc = yes; then
1409 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1410cat > conftest.$ac_ext <<EOF
1411#line 1412 "configure"
1412#include "confdefs.h"
1413#include <string.h>
1414EOF
1415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1416 egrep "memchr" >/dev/null 2>&1; then
1417 :
1418else
1419 rm -rf conftest*
1420 ac_cv_header_stdc=no
1421fi
1422rm -f conftest*
1423
1424fi
1425
1426if test $ac_cv_header_stdc = yes; then
1427 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1428cat > conftest.$ac_ext <<EOF
1429#line 1430 "configure"
1430#include "confdefs.h"
1431#include <stdlib.h>
1432EOF
1433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1434 egrep "free" >/dev/null 2>&1; then
1435 :
1436else
1437 rm -rf conftest*
1438 ac_cv_header_stdc=no
1439fi
1440rm -f conftest*
1441
1442fi
1443
1444if test $ac_cv_header_stdc = yes; then
1445 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1446if test "$cross_compiling" = yes; then
1447 :
1448else
1449 cat > conftest.$ac_ext <<EOF
1450#line 1451 "configure"
1451#include "confdefs.h"
1452#include <ctype.h>
1453#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1454#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1455#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1456int main () { int i; for (i = 0; i < 256; i++)
1457if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1458exit (0); }
1459
1460EOF
1461if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1462then
1463 :
1464else
1465 echo "configure: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1467 rm -fr conftest*
1468 ac_cv_header_stdc=no
1469fi
1470rm -fr conftest*
1471fi
1472
1473fi
1474fi
1475
1476echo "$ac_t""$ac_cv_header_stdc" 1>&6
1477if test $ac_cv_header_stdc = yes; then
1478 cat >> confdefs.h <<\EOF
1479#define STDC_HEADERS 1
1480EOF
1481
1482fi
1483
1484echo $ac_n "checking for off_t""... $ac_c" 1>&6
1485echo "configure:1486: checking for off_t" >&5
1486if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1487 echo $ac_n "(cached) $ac_c" 1>&6
1488else
1489 cat > conftest.$ac_ext <<EOF
1490#line 1491 "configure"
1491#include "confdefs.h"
1492#include <sys/types.h>
1493#if STDC_HEADERS
1494#include <stdlib.h>
1495#include <stddef.h>
1496#endif
1497EOF
1498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1499 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1500 rm -rf conftest*
1501 ac_cv_type_off_t=yes
1502else
1503 rm -rf conftest*
1504 ac_cv_type_off_t=no
1505fi
1506rm -f conftest*
1507
1508fi
1509echo "$ac_t""$ac_cv_type_off_t" 1>&6
1510if test $ac_cv_type_off_t = no; then
1511 cat >> confdefs.h <<\EOF
1512#define off_t long
1513EOF
1514
1515fi
1516
1517echo $ac_n "checking for size_t""... $ac_c" 1>&6
1518echo "configure:1519: checking for size_t" >&5
1519if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1520 echo $ac_n "(cached) $ac_c" 1>&6
1521else
1522 cat > conftest.$ac_ext <<EOF
1523#line 1524 "configure"
1524#include "confdefs.h"
1525#include <sys/types.h>
1526#if STDC_HEADERS
1527#include <stdlib.h>
1528#include <stddef.h>
1529#endif
1530EOF
1531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1532 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1533 rm -rf conftest*
1534 ac_cv_type_size_t=yes
1535else
1536 rm -rf conftest*
1537 ac_cv_type_size_t=no
1538fi
1539rm -f conftest*
1540
1541fi
1542echo "$ac_t""$ac_cv_type_size_t" 1>&6
1543if test $ac_cv_type_size_t = no; then
1544 cat >> confdefs.h <<\EOF
1545#define size_t unsigned
1546EOF
1547
1548fi
1549
1550echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1551echo "configure:1552: checking whether time.h and sys/time.h may both be included" >&5
1552if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1554else
1555 cat > conftest.$ac_ext <<EOF
1556#line 1557 "configure"
1557#include "confdefs.h"
1558#include <sys/types.h>
1559#include <sys/time.h>
1560#include <time.h>
1561int main() {
1562struct tm *tp;
1563; return 0; }
1564EOF
1565if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1566 rm -rf conftest*
1567 ac_cv_header_time=yes
1568else
1569 echo "configure: failed program was:" >&5
1570 cat conftest.$ac_ext >&5
1571 rm -rf conftest*
1572 ac_cv_header_time=no
1573fi
1574rm -f conftest*
1575fi
1576
1577echo "$ac_t""$ac_cv_header_time" 1>&6
1578if test $ac_cv_header_time = yes; then
1579 cat >> confdefs.h <<\EOF
1580#define TIME_WITH_SYS_TIME 1
1581EOF
1582
1583fi
1584
1585echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1586echo "configure:1587: checking whether struct tm is in sys/time.h or time.h" >&5
1587if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1589else
1590 cat > conftest.$ac_ext <<EOF
1591#line 1592 "configure"
1592#include "confdefs.h"
1593#include <sys/types.h>
1594#include <time.h>
1595int main() {
1596struct tm *tp; tp->tm_sec;
1597; return 0; }
1598EOF
1599if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1600 rm -rf conftest*
1601 ac_cv_struct_tm=time.h
1602else
1603 echo "configure: failed program was:" >&5
1604 cat conftest.$ac_ext >&5
1605 rm -rf conftest*
1606 ac_cv_struct_tm=sys/time.h
1607fi
1608rm -f conftest*
1609fi
1610
1611echo "$ac_t""$ac_cv_struct_tm" 1>&6
1612if test $ac_cv_struct_tm = sys/time.h; then
1613 cat >> confdefs.h <<\EOF
1614#define TM_IN_SYS_TIME 1
1615EOF
1616
1617fi
1618
1619
1620if test "$ac_cv_prog_cc_stdc" = '-Xc'; then
1621cat > conftest.$ac_ext <<EOF
1622#line 1623 "configure"
1623#include "confdefs.h"
1624#include <stdio.h>
1625
1626int main() {
1627 FILE *rubbish = popen("yes", "r");
1628; return 0; }
1629EOF
1630if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1631 :
1632else
1633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
1635 rm -rf conftest*
1636 CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa'
1637fi
1638rm -f conftest*
1639fi
1640
1641
1642echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
1643echo "configure:1644: checking for main in -lm" >&5
1644ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
1645if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1646 echo $ac_n "(cached) $ac_c" 1>&6
1647else
1648 ac_save_LIBS="$LIBS"
1649LIBS="-lm $LIBS"
1650cat > conftest.$ac_ext <<EOF
1651#line 1652 "configure"
1652#include "confdefs.h"
1653
1654int main() {
1655main()
1656; return 0; }
1657EOF
1658if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1659 rm -rf conftest*
1660 eval "ac_cv_lib_$ac_lib_var=yes"
1661else
1662 echo "configure: failed program was:" >&5
1663 cat conftest.$ac_ext >&5
1664 rm -rf conftest*
1665 eval "ac_cv_lib_$ac_lib_var=no"
1666fi
1667rm -f conftest*
1668LIBS="$ac_save_LIBS"
1669
1670fi
1671if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1672 echo "$ac_t""yes" 1>&6
1673 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1674 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1675 cat >> confdefs.h <<EOF
1676#define $ac_tr_lib 1
1677EOF
1678
1679 LIBS="-lm $LIBS"
1680
1681else
1682 echo "$ac_t""no" 1>&6
1683fi
1684
1685
1686ac_header_dirent=no
1687for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1688do
1689ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1690echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1691echo "configure:1692: checking for $ac_hdr that defines DIR" >&5
1692if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694else
1695 cat > conftest.$ac_ext <<EOF
1696#line 1697 "configure"
1697#include "confdefs.h"
1698#include <sys/types.h>
1699#include <$ac_hdr>
1700int main() {
1701DIR *dirp = 0;
1702; return 0; }
1703EOF
1704if { (eval echo configure:1705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1705 rm -rf conftest*
1706 eval "ac_cv_header_dirent_$ac_safe=yes"
1707else
1708 echo "configure: failed program was:" >&5
1709 cat conftest.$ac_ext >&5
1710 rm -rf conftest*
1711 eval "ac_cv_header_dirent_$ac_safe=no"
1712fi
1713rm -f conftest*
1714fi
1715if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1716 echo "$ac_t""yes" 1>&6
1717 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1718 cat >> confdefs.h <<EOF
1719#define $ac_tr_hdr 1
1720EOF
1721 ac_header_dirent=$ac_hdr; break
1722else
1723 echo "$ac_t""no" 1>&6
1724fi
1725done
1726# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1727if test $ac_header_dirent = dirent.h; then
1728echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1729echo "configure:1730: checking for opendir in -ldir" >&5
1730ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1731if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734 ac_save_LIBS="$LIBS"
1735LIBS="-ldir $LIBS"
1736cat > conftest.$ac_ext <<EOF
1737#line 1738 "configure"
1738#include "confdefs.h"
1739/* Override any gcc2 internal prototype to avoid an error. */
1740/* We use char because int might match the return type of a gcc2
1741 builtin and then its argument prototype would still apply. */
1742char opendir();
1743
1744int main() {
1745opendir()
1746; return 0; }
1747EOF
1748if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1749 rm -rf conftest*
1750 eval "ac_cv_lib_$ac_lib_var=yes"
1751else
1752 echo "configure: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 rm -rf conftest*
1755 eval "ac_cv_lib_$ac_lib_var=no"
1756fi
1757rm -f conftest*
1758LIBS="$ac_save_LIBS"
1759
1760fi
1761if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1762 echo "$ac_t""yes" 1>&6
1763 LIBS="$LIBS -ldir"
1764else
1765 echo "$ac_t""no" 1>&6
1766fi
1767
1768else
1769echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1770echo "configure:1771: checking for opendir in -lx" >&5
1771ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1772if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1773 echo $ac_n "(cached) $ac_c" 1>&6
1774else
1775 ac_save_LIBS="$LIBS"
1776LIBS="-lx $LIBS"
1777cat > conftest.$ac_ext <<EOF
1778#line 1779 "configure"
1779#include "confdefs.h"
1780/* Override any gcc2 internal prototype to avoid an error. */
1781/* We use char because int might match the return type of a gcc2
1782 builtin and then its argument prototype would still apply. */
1783char opendir();
1784
1785int main() {
1786opendir()
1787; return 0; }
1788EOF
1789if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1790 rm -rf conftest*
1791 eval "ac_cv_lib_$ac_lib_var=yes"
1792else
1793 echo "configure: failed program was:" >&5
1794 cat conftest.$ac_ext >&5
1795 rm -rf conftest*
1796 eval "ac_cv_lib_$ac_lib_var=no"
1797fi
1798rm -f conftest*
1799LIBS="$ac_save_LIBS"
1800
1801fi
1802if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1803 echo "$ac_t""yes" 1>&6
1804 LIBS="$LIBS -lx"
1805else
1806 echo "$ac_t""no" 1>&6
1807fi
1808
1809fi
1810
1811echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1812echo "configure:1813: checking for ANSI C header files" >&5
1813if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1815else
1816 cat > conftest.$ac_ext <<EOF
1817#line 1818 "configure"
1818#include "confdefs.h"
1819#include <stdlib.h>
1820#include <stdarg.h>
1821#include <string.h>
1822#include <float.h>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1826ac_err=`grep -v '^ *+' conftest.out`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 ac_cv_header_stdc=yes
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 ac_cv_header_stdc=no
1836fi
1837rm -f conftest*
1838
1839if test $ac_cv_header_stdc = yes; then
1840 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1841cat > conftest.$ac_ext <<EOF
1842#line 1843 "configure"
1843#include "confdefs.h"
1844#include <string.h>
1845EOF
1846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1847 egrep "memchr" >/dev/null 2>&1; then
1848 :
1849else
1850 rm -rf conftest*
1851 ac_cv_header_stdc=no
1852fi
1853rm -f conftest*
1854
1855fi
1856
1857if test $ac_cv_header_stdc = yes; then
1858 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1859cat > conftest.$ac_ext <<EOF
1860#line 1861 "configure"
1861#include "confdefs.h"
1862#include <stdlib.h>
1863EOF
1864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1865 egrep "free" >/dev/null 2>&1; then
1866 :
1867else
1868 rm -rf conftest*
1869 ac_cv_header_stdc=no
1870fi
1871rm -f conftest*
1872
1873fi
1874
1875if test $ac_cv_header_stdc = yes; then
1876 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1877if test "$cross_compiling" = yes; then
1878 :
1879else
1880 cat > conftest.$ac_ext <<EOF
1881#line 1882 "configure"
1882#include "confdefs.h"
1883#include <ctype.h>
1884#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1885#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1886#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1887int main () { int i; for (i = 0; i < 256; i++)
1888if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1889exit (0); }
1890
1891EOF
1892if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1893then
1894 :
1895else
1896 echo "configure: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1898 rm -fr conftest*
1899 ac_cv_header_stdc=no
1900fi
1901rm -fr conftest*
1902fi
1903
1904fi
1905fi
1906
1907echo "$ac_t""$ac_cv_header_stdc" 1>&6
1908if test $ac_cv_header_stdc = yes; then
1909 cat >> confdefs.h <<\EOF
1910#define STDC_HEADERS 1
1911EOF
1912
1913fi
1914
1915for ac_hdr in fcntl.h limits.h sys/time.h unistd.h string.h memory.h sys/procfs.h
1916do
1917ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1918echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1919echo "configure:1920: checking for $ac_hdr" >&5
1920if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922else
1923 cat > conftest.$ac_ext <<EOF
1924#line 1925 "configure"
1925#include "confdefs.h"
1926#include <$ac_hdr>
1927EOF
1928ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1929{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1930ac_err=`grep -v '^ *+' conftest.out`
1931if test -z "$ac_err"; then
1932 rm -rf conftest*
1933 eval "ac_cv_header_$ac_safe=yes"
1934else
1935 echo "$ac_err" >&5
1936 echo "configure: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1938 rm -rf conftest*
1939 eval "ac_cv_header_$ac_safe=no"
1940fi
1941rm -f conftest*
1942fi
1943if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1944 echo "$ac_t""yes" 1>&6
1945 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1946 cat >> confdefs.h <<EOF
1947#define $ac_tr_hdr 1
1948EOF
1949
1950else
1951 echo "$ac_t""no" 1>&6
1952fi
1953done
1954
1955cat > conftest.$ac_ext <<EOF
1956#line 1957 "configure"
1957#include "confdefs.h"
1958#include <stdio.h>
1959EOF
1960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1961 egrep "fread" >/dev/null 2>&1; then
1962 rm -rf conftest*
1963 cat >> confdefs.h <<\EOF
1964#define HAVE_FREAD_DECL 1
1965EOF
1966
1967fi
1968rm -f conftest*
1969
1970cat > conftest.$ac_ext <<EOF
1971#line 1972 "configure"
1972#include "confdefs.h"
1973#include <stdio.h>
1974EOF
1975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1976 egrep "fgetc" >/dev/null 2>&1; then
1977 rm -rf conftest*
1978 cat >> confdefs.h <<\EOF
1979#define HAVE_FGETC_DECL 1
1980EOF
1981
1982fi
1983rm -f conftest*
1984
1985cat > conftest.$ac_ext <<EOF
1986#line 1987 "configure"
1987#include "confdefs.h"
1988#include <sys/procfs.h>
1989EOF
1990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1991 egrep "pr_brksize" >/dev/null 2>&1; then
1992 rm -rf conftest*
1993 cat >> confdefs.h <<\EOF
1994#define HAVE_PR_BRKSIZE 1
1995EOF
1996
1997fi
1998rm -f conftest*
1999
2000
2001# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2002# for constant arguments. Useless!
2003echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2004echo "configure:2005: checking for working alloca.h" >&5
2005if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2006 echo $ac_n "(cached) $ac_c" 1>&6
2007else
2008 cat > conftest.$ac_ext <<EOF
2009#line 2010 "configure"
2010#include "confdefs.h"
2011#include <alloca.h>
2012int main() {
2013char *p = alloca(2 * sizeof(int));
2014; return 0; }
2015EOF
2016if { (eval echo configure:2017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2017 rm -rf conftest*
2018 ac_cv_header_alloca_h=yes
2019else
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2022 rm -rf conftest*
2023 ac_cv_header_alloca_h=no
2024fi
2025rm -f conftest*
2026fi
2027
2028echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2029if test $ac_cv_header_alloca_h = yes; then
2030 cat >> confdefs.h <<\EOF
2031#define HAVE_ALLOCA_H 1
2032EOF
2033
2034fi
2035
2036echo $ac_n "checking for alloca""... $ac_c" 1>&6
2037echo "configure:2038: checking for alloca" >&5
2038if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2039 echo $ac_n "(cached) $ac_c" 1>&6
2040else
2041 cat > conftest.$ac_ext <<EOF
2042#line 2043 "configure"
2043#include "confdefs.h"
2044
2045#ifdef __GNUC__
2046# define alloca __builtin_alloca
2047#else
2048# if HAVE_ALLOCA_H
2049# include <alloca.h>
2050# else
2051# ifdef _AIX
2052 #pragma alloca
2053# else
2054# ifndef alloca /* predefined by HP cc +Olibcalls */
2055char *alloca ();
2056# endif
2057# endif
2058# endif
2059#endif
2060
2061int main() {
2062char *p = (char *) alloca(1);
2063; return 0; }
2064EOF
2065if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2066 rm -rf conftest*
2067 ac_cv_func_alloca_works=yes
2068else
2069 echo "configure: failed program was:" >&5
2070 cat conftest.$ac_ext >&5
2071 rm -rf conftest*
2072 ac_cv_func_alloca_works=no
2073fi
2074rm -f conftest*
2075fi
2076
2077echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2078if test $ac_cv_func_alloca_works = yes; then
2079 cat >> confdefs.h <<\EOF
2080#define HAVE_ALLOCA 1
2081EOF
2082
2083fi
2084
2085if test $ac_cv_func_alloca_works = no; then
2086 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2087 # that cause trouble. Some versions do not even contain alloca or
2088 # contain a buggy version. If you still want to use their alloca,
2089 # use ar to extract alloca.o from them instead of compiling alloca.c.
2090 ALLOCA=alloca.o
2091 cat >> confdefs.h <<\EOF
2092#define C_ALLOCA 1
2093EOF
2094
2095
2096echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2097echo "configure:2098: checking whether alloca needs Cray hooks" >&5
2098if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2100else
2101 cat > conftest.$ac_ext <<EOF
2102#line 2103 "configure"
2103#include "confdefs.h"
2104#if defined(CRAY) && ! defined(CRAY2)
2105webecray
2106#else
2107wenotbecray
2108#endif
2109
2110EOF
2111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2112 egrep "webecray" >/dev/null 2>&1; then
2113 rm -rf conftest*
2114 ac_cv_os_cray=yes
2115else
2116 rm -rf conftest*
2117 ac_cv_os_cray=no
2118fi
2119rm -f conftest*
2120
2121fi
2122
2123echo "$ac_t""$ac_cv_os_cray" 1>&6
2124if test $ac_cv_os_cray = yes; then
2125for ac_func in _getb67 GETB67 getb67; do
2126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2127echo "configure:2128: checking for $ac_func" >&5
2128if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130else
2131 cat > conftest.$ac_ext <<EOF
2132#line 2133 "configure"
2133#include "confdefs.h"
2134/* System header to define __stub macros and hopefully few prototypes,
2135 which can conflict with char $ac_func(); below. */
2136#include <assert.h>
2137/* Override any gcc2 internal prototype to avoid an error. */
2138/* We use char because int might match the return type of a gcc2
2139 builtin and then its argument prototype would still apply. */
2140char $ac_func();
2141
2142int main() {
2143
2144/* The GNU C library defines this for functions which it implements
2145 to always fail with ENOSYS. Some functions are actually named
2146 something starting with __ and the normal name is an alias. */
2147#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2148choke me
2149#else
2150$ac_func();
2151#endif
2152
2153; return 0; }
2154EOF
2155if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2156 rm -rf conftest*
2157 eval "ac_cv_func_$ac_func=yes"
2158else
2159 echo "configure: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 rm -rf conftest*
2162 eval "ac_cv_func_$ac_func=no"
2163fi
2164rm -f conftest*
2165fi
2166
2167if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2168 echo "$ac_t""yes" 1>&6
2169 cat >> confdefs.h <<EOF
2170#define CRAY_STACKSEG_END $ac_func
2171EOF
2172
2173 break
2174else
2175 echo "$ac_t""no" 1>&6
2176fi
2177
2178done
2179fi
2180
2181echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2182echo "configure:2183: checking stack direction for C alloca" >&5
2183if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 if test "$cross_compiling" = yes; then
2187 ac_cv_c_stack_direction=0
2188else
2189 cat > conftest.$ac_ext <<EOF
2190#line 2191 "configure"
2191#include "confdefs.h"
2192find_stack_direction ()
2193{
2194 static char *addr = 0;
2195 auto char dummy;
2196 if (addr == 0)
2197 {
2198 addr = &dummy;
2199 return find_stack_direction ();
2200 }
2201 else
2202 return (&dummy > addr) ? 1 : -1;
2203}
2204main ()
2205{
2206 exit (find_stack_direction() < 0);
2207}
2208EOF
2209if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2210then
2211 ac_cv_c_stack_direction=1
2212else
2213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 rm -fr conftest*
2216 ac_cv_c_stack_direction=-1
2217fi
2218rm -fr conftest*
2219fi
2220
2221fi
2222
2223echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2224cat >> confdefs.h <<EOF
2225#define STACK_DIRECTION $ac_cv_c_stack_direction
2226EOF
2227
2228fi
2229
2230if test $ac_cv_prog_gcc = yes; then
2231 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
2232echo "configure:2233: checking whether ${CC-cc} needs -traditional" >&5
2233if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235else
2236 ac_pattern="Autoconf.*'x'"
2237 cat > conftest.$ac_ext <<EOF
2238#line 2239 "configure"
2239#include "confdefs.h"
2240#include <sgtty.h>
2241Autoconf TIOCGETP
2242EOF
2243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2244 egrep "$ac_pattern" >/dev/null 2>&1; then
2245 rm -rf conftest*
2246 ac_cv_prog_gcc_traditional=yes
2247else
2248 rm -rf conftest*
2249 ac_cv_prog_gcc_traditional=no
2250fi
2251rm -f conftest*
2252
2253
2254 if test $ac_cv_prog_gcc_traditional = no; then
2255 cat > conftest.$ac_ext <<EOF
2256#line 2257 "configure"
2257#include "confdefs.h"
2258#include <termio.h>
2259Autoconf TCGETA
2260EOF
2261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2262 egrep "$ac_pattern" >/dev/null 2>&1; then
2263 rm -rf conftest*
2264 ac_cv_prog_gcc_traditional=yes
2265fi
2266rm -f conftest*
2267
2268 fi
2269fi
2270
2271echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
2272 if test $ac_cv_prog_gcc_traditional = yes; then
2273 CC="$CC -traditional"
2274 fi
2275fi
2276
2277echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2278echo "configure:2279: checking return type of signal handlers" >&5
2279if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2280 echo $ac_n "(cached) $ac_c" 1>&6
2281else
2282 cat > conftest.$ac_ext <<EOF
2283#line 2284 "configure"
2284#include "confdefs.h"
2285#include <sys/types.h>
2286#include <signal.h>
2287#ifdef signal
2288#undef signal
2289#endif
2290#ifdef __cplusplus
2291extern "C" void (*signal (int, void (*)(int)))(int);
2292#else
2293void (*signal ()) ();
2294#endif
2295
2296int main() {
2297int i;
2298; return 0; }
2299EOF
2300if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2301 rm -rf conftest*
2302 ac_cv_type_signal=void
2303else
2304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2306 rm -rf conftest*
2307 ac_cv_type_signal=int
2308fi
2309rm -f conftest*
2310fi
2311
2312echo "$ac_t""$ac_cv_type_signal" 1>&6
2313cat >> confdefs.h <<EOF
2314#define RETSIGTYPE $ac_cv_type_signal
2315EOF
2316
2317
2318echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2319echo "configure:2320: checking for vprintf" >&5
2320if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2322else
2323 cat > conftest.$ac_ext <<EOF
2324#line 2325 "configure"
2325#include "confdefs.h"
2326/* System header to define __stub macros and hopefully few prototypes,
2327 which can conflict with char vprintf(); below. */
2328#include <assert.h>
2329/* Override any gcc2 internal prototype to avoid an error. */
2330/* We use char because int might match the return type of a gcc2
2331 builtin and then its argument prototype would still apply. */
2332char vprintf();
2333
2334int main() {
2335
2336/* The GNU C library defines this for functions which it implements
2337 to always fail with ENOSYS. Some functions are actually named
2338 something starting with __ and the normal name is an alias. */
2339#if defined (__stub_vprintf) || defined (__stub___vprintf)
2340choke me
2341#else
2342vprintf();
2343#endif
2344
2345; return 0; }
2346EOF
2347if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2348 rm -rf conftest*
2349 eval "ac_cv_func_vprintf=yes"
2350else
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2353 rm -rf conftest*
2354 eval "ac_cv_func_vprintf=no"
2355fi
2356rm -f conftest*
2357fi
2358
2359if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2360 echo "$ac_t""yes" 1>&6
2361 cat >> confdefs.h <<\EOF
2362#define HAVE_VPRINTF 1
2363EOF
2364
2365else
2366 echo "$ac_t""no" 1>&6
2367fi
2368
2369if test "$ac_cv_func_vprintf" != yes; then
2370echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2371echo "configure:2372: checking for _doprnt" >&5
2372if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374else
2375 cat > conftest.$ac_ext <<EOF
2376#line 2377 "configure"
2377#include "confdefs.h"
2378/* System header to define __stub macros and hopefully few prototypes,
2379 which can conflict with char _doprnt(); below. */
2380#include <assert.h>
2381/* Override any gcc2 internal prototype to avoid an error. */
2382/* We use char because int might match the return type of a gcc2
2383 builtin and then its argument prototype would still apply. */
2384char _doprnt();
2385
2386int main() {
2387
2388/* The GNU C library defines this for functions which it implements
2389 to always fail with ENOSYS. Some functions are actually named
2390 something starting with __ and the normal name is an alias. */
2391#if defined (__stub__doprnt) || defined (__stub____doprnt)
2392choke me
2393#else
2394_doprnt();
2395#endif
2396
2397; return 0; }
2398EOF
2399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2400 rm -rf conftest*
2401 eval "ac_cv_func__doprnt=yes"
2402else
2403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -rf conftest*
2406 eval "ac_cv_func__doprnt=no"
2407fi
2408rm -f conftest*
2409fi
2410
2411if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2412 echo "$ac_t""yes" 1>&6
2413 cat >> confdefs.h <<\EOF
2414#define HAVE_DOPRNT 1
2415EOF
2416
2417else
2418 echo "$ac_t""no" 1>&6
2419fi
2420
2421fi
2422
2423for ac_func in ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize
2424do
2425echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2426echo "configure:2427: checking for $ac_func" >&5
2427if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2429else
2430 cat > conftest.$ac_ext <<EOF
2431#line 2432 "configure"
2432#include "confdefs.h"
2433/* System header to define __stub macros and hopefully few prototypes,
2434 which can conflict with char $ac_func(); below. */
2435#include <assert.h>
2436/* Override any gcc2 internal prototype to avoid an error. */
2437/* We use char because int might match the return type of a gcc2
2438 builtin and then its argument prototype would still apply. */
2439char $ac_func();
2440
2441int main() {
2442
2443/* The GNU C library defines this for functions which it implements
2444 to always fail with ENOSYS. Some functions are actually named
2445 something starting with __ and the normal name is an alias. */
2446#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2447choke me
2448#else
2449$ac_func();
2450#endif
2451
2452; return 0; }
2453EOF
2454if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2455 rm -rf conftest*
2456 eval "ac_cv_func_$ac_func=yes"
2457else
2458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -rf conftest*
2461 eval "ac_cv_func_$ac_func=no"
2462fi
2463rm -f conftest*
2464fi
2465
2466if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2467 echo "$ac_t""yes" 1>&6
2468 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2469 cat >> confdefs.h <<EOF
2470#define $ac_tr_func 1
2471EOF
2472
2473else
2474 echo "$ac_t""no" 1>&6
2475fi
2476done
2477
2478for ac_func in ftruncate strstr strcasecmp
2479do
2480echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2481echo "configure:2482: checking for $ac_func" >&5
2482if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2483 echo $ac_n "(cached) $ac_c" 1>&6
2484else
2485 cat > conftest.$ac_ext <<EOF
2486#line 2487 "configure"
2487#include "confdefs.h"
2488/* System header to define __stub macros and hopefully few prototypes,
2489 which can conflict with char $ac_func(); below. */
2490#include <assert.h>
2491/* Override any gcc2 internal prototype to avoid an error. */
2492/* We use char because int might match the return type of a gcc2
2493 builtin and then its argument prototype would still apply. */
2494char $ac_func();
2495
2496int main() {
2497
2498/* The GNU C library defines this for functions which it implements
2499 to always fail with ENOSYS. Some functions are actually named
2500 something starting with __ and the normal name is an alias. */
2501#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2502choke me
2503#else
2504$ac_func();
2505#endif
2506
2507; return 0; }
2508EOF
2509if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2510 rm -rf conftest*
2511 eval "ac_cv_func_$ac_func=yes"
2512else
2513 echo "configure: failed program was:" >&5
2514 cat conftest.$ac_ext >&5
2515 rm -rf conftest*
2516 eval "ac_cv_func_$ac_func=no"
2517fi
2518rm -f conftest*
2519fi
2520
2521if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2522 echo "$ac_t""yes" 1>&6
2523 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2524 cat >> confdefs.h <<EOF
2525#define $ac_tr_func 1
2526EOF
2527
2528else
2529 echo "$ac_t""no" 1>&6
2530LIBOBJS="$LIBOBJS ${ac_func}.o"
2531fi
2532done
2533
2534
2535
2536
2537# *** Custom checking (based on GNU tar configure.in) ***
2538# ---------------------------------------------------------------------------
2539echo $ac_n "checking for HP-UX needing gmalloc""... $ac_c" 1>&6
2540echo "configure:2541: checking for HP-UX needing gmalloc" >&5
2541if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then
2542 echo "$ac_t""yes" 1>&6
2543 LIBOBJS="$LIBOBJS gmalloc.o"
2544 cat >> confdefs.h <<\EOF
2545#define HAVE_VALLOC 1
2546EOF
2547
2548else
2549 echo "$ac_t""no" 1>&6
2550 for ac_func in valloc
2551do
2552echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2553echo "configure:2554: checking for $ac_func" >&5
2554if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2555 echo $ac_n "(cached) $ac_c" 1>&6
2556else
2557 cat > conftest.$ac_ext <<EOF
2558#line 2559 "configure"
2559#include "confdefs.h"
2560/* System header to define __stub macros and hopefully few prototypes,
2561 which can conflict with char $ac_func(); below. */
2562#include <assert.h>
2563/* Override any gcc2 internal prototype to avoid an error. */
2564/* We use char because int might match the return type of a gcc2
2565 builtin and then its argument prototype would still apply. */
2566char $ac_func();
2567
2568int main() {
2569
2570/* The GNU C library defines this for functions which it implements
2571 to always fail with ENOSYS. Some functions are actually named
2572 something starting with __ and the normal name is an alias. */
2573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2574choke me
2575#else
2576$ac_func();
2577#endif
2578
2579; return 0; }
2580EOF
2581if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2582 rm -rf conftest*
2583 eval "ac_cv_func_$ac_func=yes"
2584else
2585 echo "configure: failed program was:" >&5
2586 cat conftest.$ac_ext >&5
2587 rm -rf conftest*
2588 eval "ac_cv_func_$ac_func=no"
2589fi
2590rm -f conftest*
2591fi
2592
2593if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2594 echo "$ac_t""yes" 1>&6
2595 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2596 cat >> confdefs.h <<EOF
2597#define $ac_tr_func 1
2598EOF
2599
2600else
2601 echo "$ac_t""no" 1>&6
2602fi
2603done
2604
2605fi
2606
2607echo $ac_n "checking if malloc debugging is wanted""... $ac_c" 1>&6
2608echo "configure:2609: checking if malloc debugging is wanted" >&5
2609# Check whether --with-dmalloc or --without-dmalloc was given.
2610if test "${with_dmalloc+set}" = set; then
2611 withval="$with_dmalloc"
2612 if test "$withval" = yes; then
2613 echo "$ac_t""yes" 1>&6
2614 cat >> confdefs.h <<\EOF
2615#define WITH_DMALLOC 1
2616EOF
2617
2618 LIBS="$LIBS -ldmalloc"
2619 LDFLAGS="$LDFLAGS -g"
2620else
2621 echo "$ac_t""no" 1>&6
2622fi
2623else
2624 echo "$ac_t""no" 1>&6
2625fi
2626
2627
2628echo $ac_n "checking which of rx or regex is wanted""... $ac_c" 1>&6
2629echo "configure:2630: checking which of rx or regex is wanted" >&5
2630# Check whether --with-regex or --without-regex was given.
2631if test "${with_regex+set}" = set; then
2632 withval="$with_regex"
2633 if test "$withval" = yes; then
2634 ac_with_regex=1
2635 echo "$ac_t""regex" 1>&6
2636 cat >> confdefs.h <<\EOF
2637#define WITH_REGEX 1
2638EOF
2639
2640 LIBOBJS="$LIBOBJS regex.o"
2641fi
2642fi
2643
2644if test -z "$ac_with_regex"; then
2645 echo "$ac_t""rx" 1>&6
2646 echo $ac_n "checking for re_rx_search""... $ac_c" 1>&6
2647echo "configure:2648: checking for re_rx_search" >&5
2648if eval "test \"`echo '$''{'ac_cv_func_re_rx_search'+set}'`\" = set"; then
2649 echo $ac_n "(cached) $ac_c" 1>&6
2650else
2651 cat > conftest.$ac_ext <<EOF
2652#line 2653 "configure"
2653#include "confdefs.h"
2654/* System header to define __stub macros and hopefully few prototypes,
2655 which can conflict with char re_rx_search(); below. */
2656#include <assert.h>
2657/* Override any gcc2 internal prototype to avoid an error. */
2658/* We use char because int might match the return type of a gcc2
2659 builtin and then its argument prototype would still apply. */
2660char re_rx_search();
2661
2662int main() {
2663
2664/* The GNU C library defines this for functions which it implements
2665 to always fail with ENOSYS. Some functions are actually named
2666 something starting with __ and the normal name is an alias. */
2667#if defined (__stub_re_rx_search) || defined (__stub___re_rx_search)
2668choke me
2669#else
2670re_rx_search();
2671#endif
2672
2673; return 0; }
2674EOF
2675if { (eval echo configure:2676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2676 rm -rf conftest*
2677 eval "ac_cv_func_re_rx_search=yes"
2678else
2679 echo "configure: failed program was:" >&5
2680 cat conftest.$ac_ext >&5
2681 rm -rf conftest*
2682 eval "ac_cv_func_re_rx_search=no"
2683fi
2684rm -f conftest*
2685fi
2686
2687if eval "test \"`echo '$ac_cv_func_'re_rx_search`\" = yes"; then
2688 echo "$ac_t""yes" 1>&6
2689 :
2690else
2691 echo "$ac_t""no" 1>&6
2692LIBOBJS="$LIBOBJS rx.o"
2693fi
2694
2695fi
2696
2697
2698# ---------------------------------------------------------------------------
2699if test "$ac_cv_func_alloca" = 'no'; then
2700 LIBOBJS="$LIBOBJS xmalloc.o error.o"
2701fi
2702
2703
2704# ---------------------------------------------------------------------------
2705
2706trap '' 1 2 15
2707cat > confcache <<\EOF
2708# This file is a shell script that caches the results of configure
2709# tests run on this system so they can be shared between configure
2710# scripts and configure runs. It is not useful on other systems.
2711# If it contains results you don't want to keep, you may remove or edit it.
2712#
2713# By default, configure uses ./config.cache as the cache file,
2714# creating it if it does not exist already. You can give configure
2715# the --cache-file=FILE option to use a different cache file; that is
2716# what configure does when it calls configure scripts in
2717# subdirectories, so they share the cache.
2718# Giving --cache-file=/dev/null disables caching, for debugging configure.
2719# config.status only pays attention to the cache file if you give it the
2720# --recheck option to rerun configure.
2721#
2722EOF
2723# The following way of writing the cache mishandles newlines in values,
2724# but we know of no workaround that is simple, portable, and efficient.
2725# So, don't put newlines in cache variables' values.
2726# Ultrix sh set writes to stderr and can't be redirected directly,
2727# and sets the high bit in the cache file unless we assign to the vars.
2728(set) 2>&1 |
2729 case `(ac_space=' '; set) 2>&1` in
2730 *ac_space=\ *)
2731 # `set' does not quote correctly, so add quotes (double-quote substitution
2732 # turns \\\\ into \\, and sed turns \\ into \).
2733 sed -n \
2734 -e "s/'/'\\\\''/g" \
2735 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2736 ;;
2737 *)
2738 # `set' quotes correctly as required by POSIX, so do not add quotes.
2739 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2740 ;;
2741 esac >> confcache
2742if cmp -s $cache_file confcache; then
2743 :
2744else
2745 if test -w $cache_file; then
2746 echo "updating cache $cache_file"
2747 cat confcache > $cache_file
2748 else
2749 echo "not updating unwritable cache $cache_file"
2750 fi
2751fi
2752rm -f confcache
2753
2754trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2755
2756test "x$prefix" = xNONE && prefix=$ac_default_prefix
2757# Let make expand exec_prefix.
2758test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2759
2760# Any assignment to VPATH causes Sun make to only execute
2761# the first set of double-colon rules, so remove it if not needed.
2762# If there is a colon in the path, we need to keep it.
2763if test "x$srcdir" = x.; then
2764 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2765fi
2766
2767trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2768
2769DEFS=-DHAVE_CONFIG_H
2770
2771# Without the "./", some shells look in PATH for config.status.
2772: ${CONFIG_STATUS=./config.status}
2773
2774echo creating $CONFIG_STATUS
2775rm -f $CONFIG_STATUS
2776cat > $CONFIG_STATUS <<EOF
2777#! /bin/sh
2778# Generated automatically by configure.
2779# Run this file to recreate the current configuration.
2780# This directory was configured as follows,
2781# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2782#
2783# $0 $ac_configure_args
2784#
2785# Compiler output produced by configure, useful for debugging
2786# configure, is in ./config.log if it exists.
2787
2788ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2789for ac_option
2790do
2791 case "\$ac_option" in
2792 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2793 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2794 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2795 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2796 echo "$CONFIG_STATUS generated by autoconf version 2.12"
2797 exit 0 ;;
2798 -help | --help | --hel | --he | --h)
2799 echo "\$ac_cs_usage"; exit 0 ;;
2800 *) echo "\$ac_cs_usage"; exit 1 ;;
2801 esac
2802done
2803
2804ac_given_srcdir=$srcdir
2805ac_given_INSTALL="$INSTALL"
2806
2807trap 'rm -fr `echo "Makefile src/text/Makefile src/images/Makefile
2808 src/scripts/Makefile lib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2809EOF
2810cat >> $CONFIG_STATUS <<EOF
2811
2812# Protect against being on the right side of a sed subst in config.status.
2813sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2814 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2815$ac_vpsub
2816$extrasub
2817s%@CFLAGS@%$CFLAGS%g
2818s%@CPPFLAGS@%$CPPFLAGS%g
2819s%@CXXFLAGS@%$CXXFLAGS%g
2820s%@DEFS@%$DEFS%g
2821s%@LDFLAGS@%$LDFLAGS%g
2822s%@LIBS@%$LIBS%g
2823s%@exec_prefix@%$exec_prefix%g
2824s%@prefix@%$prefix%g
2825s%@program_transform_name@%$program_transform_name%g
2826s%@bindir@%$bindir%g
2827s%@sbindir@%$sbindir%g
2828s%@libexecdir@%$libexecdir%g
2829s%@datadir@%$datadir%g
2830s%@sysconfdir@%$sysconfdir%g
2831s%@sharedstatedir@%$sharedstatedir%g
2832s%@localstatedir@%$localstatedir%g
2833s%@libdir@%$libdir%g
2834s%@includedir@%$includedir%g
2835s%@oldincludedir@%$oldincludedir%g
2836s%@infodir@%$infodir%g
2837s%@mandir@%$mandir%g
2838s%@PACKAGE@%$PACKAGE%g
2839s%@VERSION@%$VERSION%g
2840s%@CXX@%$CXX%g
2841s%@AWK@%$AWK%g
2842s%@YACC@%$YACC%g
2843s%@CC@%$CC%g
2844s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2845s%@INSTALL_DATA@%$INSTALL_DATA%g
2846s%@LN_S@%$LN_S%g
2847s%@SET_MAKE@%$SET_MAKE%g
2848s%@RANLIB@%$RANLIB%g
2849s%@CPP@%$CPP%g
2850s%@U@%$U%g
2851s%@ANSI2KNR@%$ANSI2KNR%g
2852s%@ALLOCA@%$ALLOCA%g
2853s%@LIBOBJS@%$LIBOBJS%g
2854
2855CEOF
2856EOF
2857
2858cat >> $CONFIG_STATUS <<\EOF
2859
2860# Split the substitutions into bite-sized pieces for seds with
2861# small command number limits, like on Digital OSF/1 and HP-UX.
2862ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2863ac_file=1 # Number of current file.
2864ac_beg=1 # First line for current file.
2865ac_end=$ac_max_sed_cmds # Line after last line for current file.
2866ac_more_lines=:
2867ac_sed_cmds=""
2868while $ac_more_lines; do
2869 if test $ac_beg -gt 1; then
2870 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2871 else
2872 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2873 fi
2874 if test ! -s conftest.s$ac_file; then
2875 ac_more_lines=false
2876 rm -f conftest.s$ac_file
2877 else
2878 if test -z "$ac_sed_cmds"; then
2879 ac_sed_cmds="sed -f conftest.s$ac_file"
2880 else
2881 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2882 fi
2883 ac_file=`expr $ac_file + 1`
2884 ac_beg=$ac_end
2885 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2886 fi
2887done
2888if test -z "$ac_sed_cmds"; then
2889 ac_sed_cmds=cat
2890fi
2891EOF
2892
2893cat >> $CONFIG_STATUS <<EOF
2894
2895CONFIG_FILES=\${CONFIG_FILES-"Makefile src/text/Makefile src/images/Makefile
2896 src/scripts/Makefile lib/Makefile "}
2897EOF
2898cat >> $CONFIG_STATUS <<\EOF
2899for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2900 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2901 case "$ac_file" in
2902 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2903 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2904 *) ac_file_in="${ac_file}.in" ;;
2905 esac
2906
2907 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2908
2909 # Remove last slash and all that follows it. Not all systems have dirname.
2910 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2911 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2912 # The file is in a subdirectory.
2913 test ! -d "$ac_dir" && mkdir "$ac_dir"
2914 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2915 # A "../" for each directory in $ac_dir_suffix.
2916 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2917 else
2918 ac_dir_suffix= ac_dots=
2919 fi
2920
2921 case "$ac_given_srcdir" in
2922 .) srcdir=.
2923 if test -z "$ac_dots"; then top_srcdir=.
2924 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2925 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2926 *) # Relative path.
2927 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2928 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2929 esac
2930
2931 case "$ac_given_INSTALL" in
2932 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2933 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2934 esac
2935
2936 echo creating "$ac_file"
2937 rm -f "$ac_file"
2938 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2939 case "$ac_file" in
2940 *Makefile*) ac_comsub="1i\\
2941# $configure_input" ;;
2942 *) ac_comsub= ;;
2943 esac
2944
2945 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2946 sed -e "$ac_comsub
2947s%@configure_input@%$configure_input%g
2948s%@srcdir@%$srcdir%g
2949s%@top_srcdir@%$top_srcdir%g
2950s%@INSTALL@%$INSTALL%g
2951" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2952fi; done
2953rm -f conftest.s*
2954
2955# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2956# NAME is the cpp macro being defined and VALUE is the value it is being given.
2957#
2958# ac_d sets the value in "#define NAME VALUE" lines.
2959ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2960ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2961ac_dC='\3'
2962ac_dD='%g'
2963# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2964ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2965ac_uB='\([ ]\)%\1#\2define\3'
2966ac_uC=' '
2967ac_uD='\4%g'
2968# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2969ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2970ac_eB='$%\1#\2define\3'
2971ac_eC=' '
2972ac_eD='%g'
2973
2974if test "${CONFIG_HEADERS+set}" != set; then
2975EOF
2976cat >> $CONFIG_STATUS <<EOF
2977 CONFIG_HEADERS="config.h"
2978EOF
2979cat >> $CONFIG_STATUS <<\EOF
2980fi
2981for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2982 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2983 case "$ac_file" in
2984 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2985 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2986 *) ac_file_in="${ac_file}.in" ;;
2987 esac
2988
2989 echo creating $ac_file
2990
2991 rm -f conftest.frag conftest.in conftest.out
2992 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2993 cat $ac_file_inputs > conftest.in
2994
2995EOF
2996
2997# Transform confdefs.h into a sed script conftest.vals that substitutes
2998# the proper values into config.h.in to produce config.h. And first:
2999# Protect against being on the right side of a sed subst in config.status.
3000# Protect against being in an unquoted here document in config.status.
3001rm -f conftest.vals
3002cat > conftest.hdr <<\EOF
3003s/[\\&%]/\\&/g
3004s%[\\$`]%\\&%g
3005s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3006s%ac_d%ac_u%gp
3007s%ac_u%ac_e%gp
3008EOF
3009sed -n -f conftest.hdr confdefs.h > conftest.vals
3010rm -f conftest.hdr
3011
3012# This sed command replaces #undef with comments. This is necessary, for
3013# example, in the case of _POSIX_SOURCE, which is predefined and required
3014# on some systems where configure will not decide to define it.
3015cat >> conftest.vals <<\EOF
3016s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3017EOF
3018
3019# Break up conftest.vals because some shells have a limit on
3020# the size of here documents, and old seds have small limits too.
3021
3022rm -f conftest.tail
3023while :
3024do
3025 ac_lines=`grep -c . conftest.vals`
3026 # grep -c gives empty output for an empty file on some AIX systems.
3027 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3028 # Write a limited-size here document to conftest.frag.
3029 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3030 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3031 echo 'CEOF
3032 sed -f conftest.frag conftest.in > conftest.out
3033 rm -f conftest.in
3034 mv conftest.out conftest.in
3035' >> $CONFIG_STATUS
3036 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3037 rm -f conftest.vals
3038 mv conftest.tail conftest.vals
3039done
3040rm -f conftest.vals
3041
3042cat >> $CONFIG_STATUS <<\EOF
3043 rm -f conftest.frag conftest.h
3044 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3045 cat conftest.in >> conftest.h
3046 rm -f conftest.in
3047 if cmp -s $ac_file conftest.h 2>/dev/null; then
3048 echo "$ac_file is unchanged"
3049 rm -f conftest.h
3050 else
3051 # Remove last slash and all that follows it. Not all systems have dirname.
3052 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3053 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3054 # The file is in a subdirectory.
3055 test ! -d "$ac_dir" && mkdir "$ac_dir"
3056 fi
3057 rm -f $ac_file
3058 mv conftest.h $ac_file
3059 fi
3060fi; done
3061
3062EOF
3063cat >> $CONFIG_STATUS <<EOF
3064
3065EOF
3066cat >> $CONFIG_STATUS <<\EOF
3067test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3068exit 0
3069EOF
3070chmod +x $CONFIG_STATUS
3071rm -fr confdefs* $ac_clean_files
3072test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3073
Note: See TracBrowser for help on using the repository browser.