import gdb-19990422 snapshot
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --disable-nls do not use Native Language Support"
16 ac_help="$ac_help
17 --with-included-gettext use the GNU gettext library included here"
18 ac_help="$ac_help
19 --enable-tui Enable full-screen terminal user interface"
20 ac_help="$ac_help
21 --enable-netrom Enable NetROM support"
22 ac_help="$ac_help
23 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
24 ac_help="$ac_help
25 --with-mmalloc Use memory mapped malloc package"
26 ac_help="$ac_help
27 --enable-carp Configure alternative readaptive paradigm "
28 ac_help="$ac_help
29 --enable-targets Alternative target configurations"
30 ac_help="$ac_help
31 --enable-ide Enable IDE support"
32 ac_help="$ac_help
33 --with-foundry-libs=DIR Use the Foundry SDK in DIR"
34 ac_help="$ac_help
35 --with-cpu=CPU Set the default CPU variant to debug"
36 ac_help="$ac_help
37 --enable-gdbtk Enable GDBTK GUI front end"
38 ac_help="$ac_help
39 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
40 ac_help="$ac_help
41 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
42 ac_help="$ac_help
43 --with-tclinclude=DIR Directory where tcl private headers are"
44 ac_help="$ac_help
45 --with-tkinclude=DIR Directory where tk private headers are"
46 ac_help="$ac_help
47 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
48 ac_help="$ac_help
49 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
50 ac_help="$ac_help
51 --with-tixconfig Directory containing tix configuration (tixConfig.sh)"
52 ac_help="$ac_help
53 --with-x use the X Window System"
54 ac_help="$ac_help
55 --with-sim-gpu2=DIR Use GPU2 library under given DIR"
56 ac_help="$ac_help
57 --with-sim-funit=DIR Use target FP lib under given DIR"
58 ac_help="$ac_help
59 --enable-sim Link gdb with simulator"
60 ac_help="$ac_help
61 --enable-shared Use shared libraries"
62
63 # Initialize some variables set by options.
64 # The variables have the same names as the options, with
65 # dashes changed to underlines.
66 build=NONE
67 cache_file=./config.cache
68 exec_prefix=NONE
69 host=NONE
70 no_create=
71 nonopt=NONE
72 no_recursion=
73 prefix=NONE
74 program_prefix=NONE
75 program_suffix=NONE
76 program_transform_name=s,x,x,
77 silent=
78 site=
79 srcdir=
80 target=NONE
81 verbose=
82 x_includes=NONE
83 x_libraries=NONE
84 bindir='${exec_prefix}/bin'
85 sbindir='${exec_prefix}/sbin'
86 libexecdir='${exec_prefix}/libexec'
87 datadir='${prefix}/share'
88 sysconfdir='${prefix}/etc'
89 sharedstatedir='${prefix}/com'
90 localstatedir='${prefix}/var'
91 libdir='${exec_prefix}/lib'
92 includedir='${prefix}/include'
93 oldincludedir='/usr/include'
94 infodir='${prefix}/info'
95 mandir='${prefix}/man'
96
97 # Initialize some other variables.
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101 # Maximum number of lines to put in a shell here document.
102 ac_max_here_lines=12
103
104 ac_prev=
105 for ac_option
106 do
107
108 # If the previous option needs an argument, assign it.
109 if test -n "$ac_prev"; then
110 eval "$ac_prev=\$ac_option"
111 ac_prev=
112 continue
113 fi
114
115 case "$ac_option" in
116 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117 *) ac_optarg= ;;
118 esac
119
120 # Accept the important Cygnus configure options, so we can diagnose typos.
121
122 case "$ac_option" in
123
124 -bindir | --bindir | --bindi | --bind | --bin | --bi)
125 ac_prev=bindir ;;
126 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127 bindir="$ac_optarg" ;;
128
129 -build | --build | --buil | --bui | --bu)
130 ac_prev=build ;;
131 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132 build="$ac_optarg" ;;
133
134 -cache-file | --cache-file | --cache-fil | --cache-fi \
135 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136 ac_prev=cache_file ;;
137 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139 cache_file="$ac_optarg" ;;
140
141 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142 ac_prev=datadir ;;
143 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144 | --da=*)
145 datadir="$ac_optarg" ;;
146
147 -disable-* | --disable-*)
148 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149 # Reject names that are not valid shell variable names.
150 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 fi
153 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154 eval "enable_${ac_feature}=no" ;;
155
156 -enable-* | --enable-*)
157 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158 # Reject names that are not valid shell variable names.
159 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 fi
162 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163 case "$ac_option" in
164 *=*) ;;
165 *) ac_optarg=yes ;;
166 esac
167 eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171 | --exec | --exe | --ex)
172 ac_prev=exec_prefix ;;
173 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175 | --exec=* | --exe=* | --ex=*)
176 exec_prefix="$ac_optarg" ;;
177
178 -gas | --gas | --ga | --g)
179 # Obsolete; use --with-gas.
180 with_gas=yes ;;
181
182 -help | --help | --hel | --he)
183 # Omit some internal or obsolete options to make the list less imposing.
184 # This message is too long to be a string in the A/UX 3.1 sh.
185 cat << EOF
186 Usage: configure [options] [host]
187 Options: [defaults in brackets after descriptions]
188 Configuration:
189 --cache-file=FILE cache test results in FILE
190 --help print this message
191 --no-create do not create output files
192 --quiet, --silent do not print \`checking...' messages
193 --version print the version of autoconf that created configure
194 Directory and file names:
195 --prefix=PREFIX install architecture-independent files in PREFIX
196 [$ac_default_prefix]
197 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
198 [same as prefix]
199 --bindir=DIR user executables in DIR [EPREFIX/bin]
200 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
201 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
202 --datadir=DIR read-only architecture-independent data in DIR
203 [PREFIX/share]
204 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
205 --sharedstatedir=DIR modifiable architecture-independent data in DIR
206 [PREFIX/com]
207 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
208 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
209 --includedir=DIR C header files in DIR [PREFIX/include]
210 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
211 --infodir=DIR info documentation in DIR [PREFIX/info]
212 --mandir=DIR man documentation in DIR [PREFIX/man]
213 --srcdir=DIR find the sources in DIR [configure dir or ..]
214 --program-prefix=PREFIX prepend PREFIX to installed program names
215 --program-suffix=SUFFIX append SUFFIX to installed program names
216 --program-transform-name=PROGRAM
217 run sed PROGRAM on installed program names
218 EOF
219 cat << EOF
220 Host type:
221 --build=BUILD configure for building on BUILD [BUILD=HOST]
222 --host=HOST configure for HOST [guessed]
223 --target=TARGET configure for TARGET [TARGET=HOST]
224 Features and packages:
225 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
226 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
227 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
228 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
229 --x-includes=DIR X include files are in DIR
230 --x-libraries=DIR X library files are in DIR
231 EOF
232 if test -n "$ac_help"; then
233 echo "--enable and --with options recognized:$ac_help"
234 fi
235 exit 0 ;;
236
237 -host | --host | --hos | --ho)
238 ac_prev=host ;;
239 -host=* | --host=* | --hos=* | --ho=*)
240 host="$ac_optarg" ;;
241
242 -includedir | --includedir | --includedi | --included | --include \
243 | --includ | --inclu | --incl | --inc)
244 ac_prev=includedir ;;
245 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
246 | --includ=* | --inclu=* | --incl=* | --inc=*)
247 includedir="$ac_optarg" ;;
248
249 -infodir | --infodir | --infodi | --infod | --info | --inf)
250 ac_prev=infodir ;;
251 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
252 infodir="$ac_optarg" ;;
253
254 -libdir | --libdir | --libdi | --libd)
255 ac_prev=libdir ;;
256 -libdir=* | --libdir=* | --libdi=* | --libd=*)
257 libdir="$ac_optarg" ;;
258
259 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
260 | --libexe | --libex | --libe)
261 ac_prev=libexecdir ;;
262 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
263 | --libexe=* | --libex=* | --libe=*)
264 libexecdir="$ac_optarg" ;;
265
266 -localstatedir | --localstatedir | --localstatedi | --localstated \
267 | --localstate | --localstat | --localsta | --localst \
268 | --locals | --local | --loca | --loc | --lo)
269 ac_prev=localstatedir ;;
270 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
271 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
272 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
273 localstatedir="$ac_optarg" ;;
274
275 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
276 ac_prev=mandir ;;
277 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
278 mandir="$ac_optarg" ;;
279
280 -nfp | --nfp | --nf)
281 # Obsolete; use --without-fp.
282 with_fp=no ;;
283
284 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
285 | --no-cr | --no-c)
286 no_create=yes ;;
287
288 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
289 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
290 no_recursion=yes ;;
291
292 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
293 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
294 | --oldin | --oldi | --old | --ol | --o)
295 ac_prev=oldincludedir ;;
296 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
297 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
298 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
299 oldincludedir="$ac_optarg" ;;
300
301 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
302 ac_prev=prefix ;;
303 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
304 prefix="$ac_optarg" ;;
305
306 -program-prefix | --program-prefix | --program-prefi | --program-pref \
307 | --program-pre | --program-pr | --program-p)
308 ac_prev=program_prefix ;;
309 -program-prefix=* | --program-prefix=* | --program-prefi=* \
310 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
311 program_prefix="$ac_optarg" ;;
312
313 -program-suffix | --program-suffix | --program-suffi | --program-suff \
314 | --program-suf | --program-su | --program-s)
315 ac_prev=program_suffix ;;
316 -program-suffix=* | --program-suffix=* | --program-suffi=* \
317 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
318 program_suffix="$ac_optarg" ;;
319
320 -program-transform-name | --program-transform-name \
321 | --program-transform-nam | --program-transform-na \
322 | --program-transform-n | --program-transform- \
323 | --program-transform | --program-transfor \
324 | --program-transfo | --program-transf \
325 | --program-trans | --program-tran \
326 | --progr-tra | --program-tr | --program-t)
327 ac_prev=program_transform_name ;;
328 -program-transform-name=* | --program-transform-name=* \
329 | --program-transform-nam=* | --program-transform-na=* \
330 | --program-transform-n=* | --program-transform-=* \
331 | --program-transform=* | --program-transfor=* \
332 | --program-transfo=* | --program-transf=* \
333 | --program-trans=* | --program-tran=* \
334 | --progr-tra=* | --program-tr=* | --program-t=*)
335 program_transform_name="$ac_optarg" ;;
336
337 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
338 | -silent | --silent | --silen | --sile | --sil)
339 silent=yes ;;
340
341 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
342 ac_prev=sbindir ;;
343 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
344 | --sbi=* | --sb=*)
345 sbindir="$ac_optarg" ;;
346
347 -sharedstatedir | --sharedstatedir | --sharedstatedi \
348 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
349 | --sharedst | --shareds | --shared | --share | --shar \
350 | --sha | --sh)
351 ac_prev=sharedstatedir ;;
352 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
353 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
354 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
355 | --sha=* | --sh=*)
356 sharedstatedir="$ac_optarg" ;;
357
358 -site | --site | --sit)
359 ac_prev=site ;;
360 -site=* | --site=* | --sit=*)
361 site="$ac_optarg" ;;
362
363 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
364 ac_prev=srcdir ;;
365 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
366 srcdir="$ac_optarg" ;;
367
368 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
369 | --syscon | --sysco | --sysc | --sys | --sy)
370 ac_prev=sysconfdir ;;
371 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
372 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
373 sysconfdir="$ac_optarg" ;;
374
375 -target | --target | --targe | --targ | --tar | --ta | --t)
376 ac_prev=target ;;
377 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
378 target="$ac_optarg" ;;
379
380 -v | -verbose | --verbose | --verbos | --verbo | --verb)
381 verbose=yes ;;
382
383 -version | --version | --versio | --versi | --vers)
384 echo "configure generated by autoconf version 2.13"
385 exit 0 ;;
386
387 -with-* | --with-*)
388 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
389 # Reject names that are not valid shell variable names.
390 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
391 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
392 fi
393 ac_package=`echo $ac_package| sed 's/-/_/g'`
394 case "$ac_option" in
395 *=*) ;;
396 *) ac_optarg=yes ;;
397 esac
398 eval "with_${ac_package}='$ac_optarg'" ;;
399
400 -without-* | --without-*)
401 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
402 # Reject names that are not valid shell variable names.
403 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
404 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405 fi
406 ac_package=`echo $ac_package| sed 's/-/_/g'`
407 eval "with_${ac_package}=no" ;;
408
409 --x)
410 # Obsolete; use --with-x.
411 with_x=yes ;;
412
413 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414 | --x-incl | --x-inc | --x-in | --x-i)
415 ac_prev=x_includes ;;
416 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418 x_includes="$ac_optarg" ;;
419
420 -x-libraries | --x-libraries | --x-librarie | --x-librari \
421 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422 ac_prev=x_libraries ;;
423 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425 x_libraries="$ac_optarg" ;;
426
427 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
428 ;;
429
430 *)
431 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
432 echo "configure: warning: $ac_option: invalid host type" 1>&2
433 fi
434 if test "x$nonopt" != xNONE; then
435 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
436 fi
437 nonopt="$ac_option"
438 ;;
439
440 esac
441 done
442
443 if test -n "$ac_prev"; then
444 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
445 fi
446
447 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
448
449 # File descriptor usage:
450 # 0 standard input
451 # 1 file creation
452 # 2 errors and warnings
453 # 3 some systems may open it to /dev/tty
454 # 4 used on the Kubota Titan
455 # 6 checking for... messages and results
456 # 5 compiler messages saved in config.log
457 if test "$silent" = yes; then
458 exec 6>/dev/null
459 else
460 exec 6>&1
461 fi
462 exec 5>./config.log
463
464 echo "\
465 This file contains any messages produced by compilers while
466 running configure, to aid debugging if configure makes a mistake.
467 " 1>&5
468
469 # Strip out --no-create and --no-recursion so they do not pile up.
470 # Also quote any args containing shell metacharacters.
471 ac_configure_args=
472 for ac_arg
473 do
474 case "$ac_arg" in
475 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
476 | --no-cr | --no-c) ;;
477 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
478 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
479 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
480 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
481 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
482 esac
483 done
484
485 # NLS nuisances.
486 # Only set these to C if already set. These must not be set unconditionally
487 # because not all systems understand e.g. LANG=C (notably SCO).
488 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
489 # Non-C LC_CTYPE values break the ctype check.
490 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
491 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
492 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
493 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
494
495 # confdefs.h avoids OS command line length limits that DEFS can exceed.
496 rm -rf conftest* confdefs.h
497 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
498 echo > confdefs.h
499
500 # A filename unique to this package, relative to the directory that
501 # configure is in, which we can look for to find out if srcdir is correct.
502 ac_unique_file=main.c
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506 ac_srcdir_defaulted=yes
507 # Try the directory containing this script, then its parent.
508 ac_prog=$0
509 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
510 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511 srcdir=$ac_confdir
512 if test ! -r $srcdir/$ac_unique_file; then
513 srcdir=..
514 fi
515 else
516 ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519 if test "$ac_srcdir_defaulted" = yes; then
520 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
521 else
522 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
523 fi
524 fi
525 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
526
527 # Prefer explicitly selected file to automatically selected ones.
528 if test -z "$CONFIG_SITE"; then
529 if test "x$prefix" != xNONE; then
530 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
531 else
532 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
533 fi
534 fi
535 for ac_site_file in $CONFIG_SITE; do
536 if test -r "$ac_site_file"; then
537 echo "loading site script $ac_site_file"
538 . "$ac_site_file"
539 fi
540 done
541
542 if test -r "$cache_file"; then
543 echo "loading cache $cache_file"
544 . $cache_file
545 else
546 echo "creating cache $cache_file"
547 > $cache_file
548 fi
549
550 ac_ext=c
551 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
552 ac_cpp='$CPP $CPPFLAGS'
553 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
554 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
555 cross_compiling=$ac_cv_prog_cc_cross
556
557 ac_exeext=
558 ac_objext=o
559 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
560 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
561 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
562 ac_n= ac_c='
563 ' ac_t=' '
564 else
565 ac_n=-n ac_c= ac_t=
566 fi
567 else
568 ac_n= ac_c='\c' ac_t=
569 fi
570
571
572
573
574 # Extract the first word of "gcc", so it can be a program name with args.
575 set dummy gcc; ac_word=$2
576 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
577 echo "configure:578: checking for $ac_word" >&5
578 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
579 echo $ac_n "(cached) $ac_c" 1>&6
580 else
581 if test -n "$CC"; then
582 ac_cv_prog_CC="$CC" # Let the user override the test.
583 else
584 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
585 ac_dummy="$PATH"
586 for ac_dir in $ac_dummy; do
587 test -z "$ac_dir" && ac_dir=.
588 if test -f $ac_dir/$ac_word; then
589 ac_cv_prog_CC="gcc"
590 break
591 fi
592 done
593 IFS="$ac_save_ifs"
594 fi
595 fi
596 CC="$ac_cv_prog_CC"
597 if test -n "$CC"; then
598 echo "$ac_t""$CC" 1>&6
599 else
600 echo "$ac_t""no" 1>&6
601 fi
602
603 if test -z "$CC"; then
604 # Extract the first word of "cc", so it can be a program name with args.
605 set dummy cc; ac_word=$2
606 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
607 echo "configure:608: checking for $ac_word" >&5
608 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
609 echo $ac_n "(cached) $ac_c" 1>&6
610 else
611 if test -n "$CC"; then
612 ac_cv_prog_CC="$CC" # Let the user override the test.
613 else
614 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
615 ac_prog_rejected=no
616 ac_dummy="$PATH"
617 for ac_dir in $ac_dummy; do
618 test -z "$ac_dir" && ac_dir=.
619 if test -f $ac_dir/$ac_word; then
620 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
621 ac_prog_rejected=yes
622 continue
623 fi
624 ac_cv_prog_CC="cc"
625 break
626 fi
627 done
628 IFS="$ac_save_ifs"
629 if test $ac_prog_rejected = yes; then
630 # We found a bogon in the path, so make sure we never use it.
631 set dummy $ac_cv_prog_CC
632 shift
633 if test $# -gt 0; then
634 # We chose a different compiler from the bogus one.
635 # However, it has the same basename, so the bogon will be chosen
636 # first if we set CC to just the basename; use the full file name.
637 shift
638 set dummy "$ac_dir/$ac_word" "$@"
639 shift
640 ac_cv_prog_CC="$@"
641 fi
642 fi
643 fi
644 fi
645 CC="$ac_cv_prog_CC"
646 if test -n "$CC"; then
647 echo "$ac_t""$CC" 1>&6
648 else
649 echo "$ac_t""no" 1>&6
650 fi
651
652 if test -z "$CC"; then
653 case "`uname -s`" in
654 *win32* | *WIN32*)
655 # Extract the first word of "cl", so it can be a program name with args.
656 set dummy cl; ac_word=$2
657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
658 echo "configure:659: checking for $ac_word" >&5
659 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
660 echo $ac_n "(cached) $ac_c" 1>&6
661 else
662 if test -n "$CC"; then
663 ac_cv_prog_CC="$CC" # Let the user override the test.
664 else
665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
666 ac_dummy="$PATH"
667 for ac_dir in $ac_dummy; do
668 test -z "$ac_dir" && ac_dir=.
669 if test -f $ac_dir/$ac_word; then
670 ac_cv_prog_CC="cl"
671 break
672 fi
673 done
674 IFS="$ac_save_ifs"
675 fi
676 fi
677 CC="$ac_cv_prog_CC"
678 if test -n "$CC"; then
679 echo "$ac_t""$CC" 1>&6
680 else
681 echo "$ac_t""no" 1>&6
682 fi
683 ;;
684 esac
685 fi
686 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
687 fi
688
689 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
690 echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
691
692 ac_ext=c
693 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
694 ac_cpp='$CPP $CPPFLAGS'
695 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
696 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
697 cross_compiling=$ac_cv_prog_cc_cross
698
699 cat > conftest.$ac_ext << EOF
700
701 #line 702 "configure"
702 #include "confdefs.h"
703
704 main(){return(0);}
705 EOF
706 if { (eval echo configure:707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
707 ac_cv_prog_cc_works=yes
708 # If we can't run a trivial program, we are probably using a cross compiler.
709 if (./conftest; exit) 2>/dev/null; then
710 ac_cv_prog_cc_cross=no
711 else
712 ac_cv_prog_cc_cross=yes
713 fi
714 else
715 echo "configure: failed program was:" >&5
716 cat conftest.$ac_ext >&5
717 ac_cv_prog_cc_works=no
718 fi
719 rm -fr conftest*
720 ac_ext=c
721 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
722 ac_cpp='$CPP $CPPFLAGS'
723 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
724 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
725 cross_compiling=$ac_cv_prog_cc_cross
726
727 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
728 if test $ac_cv_prog_cc_works = no; then
729 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
730 fi
731 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
732 echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
733 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
737 echo "configure:738: checking whether we are using GNU C" >&5
738 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
739 echo $ac_n "(cached) $ac_c" 1>&6
740 else
741 cat > conftest.c <<EOF
742 #ifdef __GNUC__
743 yes;
744 #endif
745 EOF
746 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
747 ac_cv_prog_gcc=yes
748 else
749 ac_cv_prog_gcc=no
750 fi
751 fi
752
753 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
754
755 if test $ac_cv_prog_gcc = yes; then
756 GCC=yes
757 else
758 GCC=
759 fi
760
761 ac_test_CFLAGS="${CFLAGS+set}"
762 ac_save_CFLAGS="$CFLAGS"
763 CFLAGS=
764 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
765 echo "configure:766: checking whether ${CC-cc} accepts -g" >&5
766 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
767 echo $ac_n "(cached) $ac_c" 1>&6
768 else
769 echo 'void f(){}' > conftest.c
770 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
771 ac_cv_prog_cc_g=yes
772 else
773 ac_cv_prog_cc_g=no
774 fi
775 rm -f conftest*
776
777 fi
778
779 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
780 if test "$ac_test_CFLAGS" = set; then
781 CFLAGS="$ac_save_CFLAGS"
782 elif test $ac_cv_prog_cc_g = yes; then
783 if test "$GCC" = yes; then
784 CFLAGS="-g -O2"
785 else
786 CFLAGS="-g"
787 fi
788 else
789 if test "$GCC" = yes; then
790 CFLAGS="-O2"
791 else
792 CFLAGS=
793 fi
794 fi
795
796 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
797 echo "configure:798: checking how to run the C preprocessor" >&5
798 # On Suns, sometimes $CPP names a directory.
799 if test -n "$CPP" && test -d "$CPP"; then
800 CPP=
801 fi
802 if test -z "$CPP"; then
803 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 # This must be in double quotes, not single quotes, because CPP may get
807 # substituted into the Makefile and "${CC-cc}" will confuse make.
808 CPP="${CC-cc} -E"
809 # On the NeXT, cc -E runs the code through the compiler's parser,
810 # not just through cpp.
811 cat > conftest.$ac_ext <<EOF
812 #line 813 "configure"
813 #include "confdefs.h"
814 #include <assert.h>
815 Syntax Error
816 EOF
817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
818 { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
820 if test -z "$ac_err"; then
821 :
822 else
823 echo "$ac_err" >&5
824 echo "configure: failed program was:" >&5
825 cat conftest.$ac_ext >&5
826 rm -rf conftest*
827 CPP="${CC-cc} -E -traditional-cpp"
828 cat > conftest.$ac_ext <<EOF
829 #line 830 "configure"
830 #include "confdefs.h"
831 #include <assert.h>
832 Syntax Error
833 EOF
834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
835 { (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
837 if test -z "$ac_err"; then
838 :
839 else
840 echo "$ac_err" >&5
841 echo "configure: failed program was:" >&5
842 cat conftest.$ac_ext >&5
843 rm -rf conftest*
844 CPP="${CC-cc} -nologo -E"
845 cat > conftest.$ac_ext <<EOF
846 #line 847 "configure"
847 #include "confdefs.h"
848 #include <assert.h>
849 Syntax Error
850 EOF
851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
852 { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
854 if test -z "$ac_err"; then
855 :
856 else
857 echo "$ac_err" >&5
858 echo "configure: failed program was:" >&5
859 cat conftest.$ac_ext >&5
860 rm -rf conftest*
861 CPP=/lib/cpp
862 fi
863 rm -f conftest*
864 fi
865 rm -f conftest*
866 fi
867 rm -f conftest*
868 ac_cv_prog_CPP="$CPP"
869 fi
870 CPP="$ac_cv_prog_CPP"
871 else
872 ac_cv_prog_CPP="$CPP"
873 fi
874 echo "$ac_t""$CPP" 1>&6
875
876 echo $ac_n "checking for AIX""... $ac_c" 1>&6
877 echo "configure:878: checking for AIX" >&5
878 cat > conftest.$ac_ext <<EOF
879 #line 880 "configure"
880 #include "confdefs.h"
881 #ifdef _AIX
882 yes
883 #endif
884
885 EOF
886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
887 egrep "yes" >/dev/null 2>&1; then
888 rm -rf conftest*
889 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
890 #define _ALL_SOURCE 1
891 EOF
892
893 else
894 rm -rf conftest*
895 echo "$ac_t""no" 1>&6
896 fi
897 rm -f conftest*
898
899
900 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
901 echo "configure:902: checking for POSIXized ISC" >&5
902 if test -d /etc/conf/kconfig.d &&
903 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
904 then
905 echo "$ac_t""yes" 1>&6
906 ISC=yes # If later tests want to check for ISC.
907 cat >> confdefs.h <<\EOF
908 #define _POSIX_SOURCE 1
909 EOF
910
911 if test "$GCC" = yes; then
912 CC="$CC -posix"
913 else
914 CC="$CC -Xp"
915 fi
916 else
917 echo "$ac_t""no" 1>&6
918 ISC=
919 fi
920
921
922
923
924 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
925 echo "configure:926: checking for ${CC-cc} option to accept ANSI C" >&5
926 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
927 echo $ac_n "(cached) $ac_c" 1>&6
928 else
929 am_cv_prog_cc_stdc=no
930 ac_save_CC="$CC"
931 # Don't try gcc -ansi; that turns off useful extensions and
932 # breaks some systems' header files.
933 # AIX -qlanglvl=ansi
934 # Ultrix and OSF/1 -std1
935 # HP-UX -Aa -D_HPUX_SOURCE
936 # SVR4 -Xc -D__EXTENSIONS__
937 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
938 do
939 CC="$ac_save_CC $ac_arg"
940 cat > conftest.$ac_ext <<EOF
941 #line 942 "configure"
942 #include "confdefs.h"
943 #include <stdarg.h>
944 #include <stdio.h>
945 #include <sys/types.h>
946 #include <sys/stat.h>
947 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
948 struct buf { int x; };
949 FILE * (*rcsopen) (struct buf *, struct stat *, int);
950 static char *e (p, i)
951 char **p;
952 int i;
953 {
954 return p[i];
955 }
956 static char *f (char * (*g) (char **, int), char **p, ...)
957 {
958 char *s;
959 va_list v;
960 va_start (v,p);
961 s = g (p, va_arg (v,int));
962 va_end (v);
963 return s;
964 }
965 int test (int i, double x);
966 struct s1 {int (*f) (int a);};
967 struct s2 {int (*f) (double a);};
968 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
969 int argc;
970 char **argv;
971
972 int main() {
973
974 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
975
976 ; return 0; }
977 EOF
978 if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
979 rm -rf conftest*
980 am_cv_prog_cc_stdc="$ac_arg"; break
981 else
982 echo "configure: failed program was:" >&5
983 cat conftest.$ac_ext >&5
984 fi
985 rm -f conftest*
986 done
987 CC="$ac_save_CC"
988
989 fi
990
991 if test -z "$am_cv_prog_cc_stdc"; then
992 echo "$ac_t""none needed" 1>&6
993 else
994 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
995 fi
996 case "x$am_cv_prog_cc_stdc" in
997 x|xno) ;;
998 *) CC="$CC $am_cv_prog_cc_stdc" ;;
999 esac
1000
1001
1002 ac_aux_dir=
1003 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1004 if test -f $ac_dir/install-sh; then
1005 ac_aux_dir=$ac_dir
1006 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 break
1008 elif test -f $ac_dir/install.sh; then
1009 ac_aux_dir=$ac_dir
1010 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 break
1012 fi
1013 done
1014 if test -z "$ac_aux_dir"; then
1015 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1016 fi
1017 ac_config_guess=$ac_aux_dir/config.guess
1018 ac_config_sub=$ac_aux_dir/config.sub
1019 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1020
1021
1022 # Do some error checking and defaulting for the host and target type.
1023 # The inputs are:
1024 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1025 #
1026 # The rules are:
1027 # 1. You are not allowed to specify --host, --target, and nonopt at the
1028 # same time.
1029 # 2. Host defaults to nonopt.
1030 # 3. If nonopt is not specified, then host defaults to the current host,
1031 # as determined by config.guess.
1032 # 4. Target and build default to nonopt.
1033 # 5. If nonopt is not specified, then target and build default to host.
1034
1035 # The aliases save the names the user supplied, while $host etc.
1036 # will get canonicalized.
1037 case $host---$target---$nonopt in
1038 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1039 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1040 esac
1041
1042
1043 # Make sure we can run config.sub.
1044 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1045 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1046 fi
1047
1048 echo $ac_n "checking host system type""... $ac_c" 1>&6
1049 echo "configure:1050: checking host system type" >&5
1050
1051 host_alias=$host
1052 case "$host_alias" in
1053 NONE)
1054 case $nonopt in
1055 NONE)
1056 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1057 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1058 fi ;;
1059 *) host_alias=$nonopt ;;
1060 esac ;;
1061 esac
1062
1063 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1064 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067 echo "$ac_t""$host" 1>&6
1068
1069 echo $ac_n "checking target system type""... $ac_c" 1>&6
1070 echo "configure:1071: checking target system type" >&5
1071
1072 target_alias=$target
1073 case "$target_alias" in
1074 NONE)
1075 case $nonopt in
1076 NONE) target_alias=$host_alias ;;
1077 *) target_alias=$nonopt ;;
1078 esac ;;
1079 esac
1080
1081 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1082 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1083 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1084 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1085 echo "$ac_t""$target" 1>&6
1086
1087 echo $ac_n "checking build system type""... $ac_c" 1>&6
1088 echo "configure:1089: checking build system type" >&5
1089
1090 build_alias=$build
1091 case "$build_alias" in
1092 NONE)
1093 case $nonopt in
1094 NONE) build_alias=$host_alias ;;
1095 *) build_alias=$nonopt ;;
1096 esac ;;
1097 esac
1098
1099 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1100 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1101 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1102 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1103 echo "$ac_t""$build" 1>&6
1104
1105 test "$host_alias" != "$target_alias" &&
1106 test "$program_prefix$program_suffix$program_transform_name" = \
1107 NONENONEs,x,x, &&
1108 program_prefix=${target_alias}-
1109
1110
1111 ALL_LINGUAS=
1112 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1113 echo "configure:1114: checking whether ${MAKE-make} sets \${MAKE}" >&5
1114 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1115 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1116 echo $ac_n "(cached) $ac_c" 1>&6
1117 else
1118 cat > conftestmake <<\EOF
1119 all:
1120 @echo 'ac_maketemp="${MAKE}"'
1121 EOF
1122 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1123 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1124 if test -n "$ac_maketemp"; then
1125 eval ac_cv_prog_make_${ac_make}_set=yes
1126 else
1127 eval ac_cv_prog_make_${ac_make}_set=no
1128 fi
1129 rm -f conftestmake
1130 fi
1131 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1132 echo "$ac_t""yes" 1>&6
1133 SET_MAKE=
1134 else
1135 echo "$ac_t""no" 1>&6
1136 SET_MAKE="MAKE=${MAKE-make}"
1137 fi
1138
1139 # Extract the first word of "ranlib", so it can be a program name with args.
1140 set dummy ranlib; ac_word=$2
1141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1142 echo "configure:1143: checking for $ac_word" >&5
1143 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1144 echo $ac_n "(cached) $ac_c" 1>&6
1145 else
1146 if test -n "$RANLIB"; then
1147 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1148 else
1149 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1150 ac_dummy="$PATH"
1151 for ac_dir in $ac_dummy; do
1152 test -z "$ac_dir" && ac_dir=.
1153 if test -f $ac_dir/$ac_word; then
1154 ac_cv_prog_RANLIB="ranlib"
1155 break
1156 fi
1157 done
1158 IFS="$ac_save_ifs"
1159 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1160 fi
1161 fi
1162 RANLIB="$ac_cv_prog_RANLIB"
1163 if test -n "$RANLIB"; then
1164 echo "$ac_t""$RANLIB" 1>&6
1165 else
1166 echo "$ac_t""no" 1>&6
1167 fi
1168
1169 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1170 echo "configure:1171: checking for ANSI C header files" >&5
1171 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1172 echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174 cat > conftest.$ac_ext <<EOF
1175 #line 1176 "configure"
1176 #include "confdefs.h"
1177 #include <stdlib.h>
1178 #include <stdarg.h>
1179 #include <string.h>
1180 #include <float.h>
1181 EOF
1182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1183 { (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1185 if test -z "$ac_err"; then
1186 rm -rf conftest*
1187 ac_cv_header_stdc=yes
1188 else
1189 echo "$ac_err" >&5
1190 echo "configure: failed program was:" >&5
1191 cat conftest.$ac_ext >&5
1192 rm -rf conftest*
1193 ac_cv_header_stdc=no
1194 fi
1195 rm -f conftest*
1196
1197 if test $ac_cv_header_stdc = yes; then
1198 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1199 cat > conftest.$ac_ext <<EOF
1200 #line 1201 "configure"
1201 #include "confdefs.h"
1202 #include <string.h>
1203 EOF
1204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1205 egrep "memchr" >/dev/null 2>&1; then
1206 :
1207 else
1208 rm -rf conftest*
1209 ac_cv_header_stdc=no
1210 fi
1211 rm -f conftest*
1212
1213 fi
1214
1215 if test $ac_cv_header_stdc = yes; then
1216 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1217 cat > conftest.$ac_ext <<EOF
1218 #line 1219 "configure"
1219 #include "confdefs.h"
1220 #include <stdlib.h>
1221 EOF
1222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1223 egrep "free" >/dev/null 2>&1; then
1224 :
1225 else
1226 rm -rf conftest*
1227 ac_cv_header_stdc=no
1228 fi
1229 rm -f conftest*
1230
1231 fi
1232
1233 if test $ac_cv_header_stdc = yes; then
1234 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1235 if test "$cross_compiling" = yes; then
1236 :
1237 else
1238 cat > conftest.$ac_ext <<EOF
1239 #line 1240 "configure"
1240 #include "confdefs.h"
1241 #include <ctype.h>
1242 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1243 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1244 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1245 int main () { int i; for (i = 0; i < 256; i++)
1246 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1247 exit (0); }
1248
1249 EOF
1250 if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1251 then
1252 :
1253 else
1254 echo "configure: failed program was:" >&5
1255 cat conftest.$ac_ext >&5
1256 rm -fr conftest*
1257 ac_cv_header_stdc=no
1258 fi
1259 rm -fr conftest*
1260 fi
1261
1262 fi
1263 fi
1264
1265 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1266 if test $ac_cv_header_stdc = yes; then
1267 cat >> confdefs.h <<\EOF
1268 #define STDC_HEADERS 1
1269 EOF
1270
1271 fi
1272
1273 echo $ac_n "checking for working const""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working const" >&5
1275 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1276 echo $ac_n "(cached) $ac_c" 1>&6
1277 else
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281
1282 int main() {
1283
1284 /* Ultrix mips cc rejects this. */
1285 typedef int charset[2]; const charset x;
1286 /* SunOS 4.1.1 cc rejects this. */
1287 char const *const *ccp;
1288 char **p;
1289 /* NEC SVR4.0.2 mips cc rejects this. */
1290 struct point {int x, y;};
1291 static struct point const zero = {0,0};
1292 /* AIX XL C 1.02.0.0 rejects this.
1293 It does not let you subtract one const X* pointer from another in an arm
1294 of an if-expression whose if-part is not a constant expression */
1295 const char *g = "string";
1296 ccp = &g + (g ? g-g : 0);
1297 /* HPUX 7.0 cc rejects these. */
1298 ++ccp;
1299 p = (char**) ccp;
1300 ccp = (char const *const *) p;
1301 { /* SCO 3.2v4 cc rejects this. */
1302 char *t;
1303 char const *s = 0 ? (char *) 0 : (char const *) 0;
1304
1305 *t++ = 0;
1306 }
1307 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1308 int x[] = {25, 17};
1309 const int *foo = &x[0];
1310 ++foo;
1311 }
1312 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1313 typedef const int *iptr;
1314 iptr p = 0;
1315 ++p;
1316 }
1317 { /* AIX XL C 1.02.0.0 rejects this saying
1318 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1319 struct s { int j; const int *ap[3]; };
1320 struct s *b; b->j = 5;
1321 }
1322 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1323 const int foo = 10;
1324 }
1325
1326 ; return 0; }
1327 EOF
1328 if { (eval echo configure:1329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1329 rm -rf conftest*
1330 ac_cv_c_const=yes
1331 else
1332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
1334 rm -rf conftest*
1335 ac_cv_c_const=no
1336 fi
1337 rm -f conftest*
1338 fi
1339
1340 echo "$ac_t""$ac_cv_c_const" 1>&6
1341 if test $ac_cv_c_const = no; then
1342 cat >> confdefs.h <<\EOF
1343 #define const
1344 EOF
1345
1346 fi
1347
1348 echo $ac_n "checking for inline""... $ac_c" 1>&6
1349 echo "configure:1350: checking for inline" >&5
1350 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1351 echo $ac_n "(cached) $ac_c" 1>&6
1352 else
1353 ac_cv_c_inline=no
1354 for ac_kw in inline __inline__ __inline; do
1355 cat > conftest.$ac_ext <<EOF
1356 #line 1357 "configure"
1357 #include "confdefs.h"
1358
1359 int main() {
1360 } $ac_kw foo() {
1361 ; return 0; }
1362 EOF
1363 if { (eval echo configure:1364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1364 rm -rf conftest*
1365 ac_cv_c_inline=$ac_kw; break
1366 else
1367 echo "configure: failed program was:" >&5
1368 cat conftest.$ac_ext >&5
1369 fi
1370 rm -f conftest*
1371 done
1372
1373 fi
1374
1375 echo "$ac_t""$ac_cv_c_inline" 1>&6
1376 case "$ac_cv_c_inline" in
1377 inline | yes) ;;
1378 no) cat >> confdefs.h <<\EOF
1379 #define inline
1380 EOF
1381 ;;
1382 *) cat >> confdefs.h <<EOF
1383 #define inline $ac_cv_c_inline
1384 EOF
1385 ;;
1386 esac
1387
1388 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1389 echo "configure:1390: checking for off_t" >&5
1390 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1391 echo $ac_n "(cached) $ac_c" 1>&6
1392 else
1393 cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <sys/types.h>
1397 #if STDC_HEADERS
1398 #include <stdlib.h>
1399 #include <stddef.h>
1400 #endif
1401 EOF
1402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1403 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1404 rm -rf conftest*
1405 ac_cv_type_off_t=yes
1406 else
1407 rm -rf conftest*
1408 ac_cv_type_off_t=no
1409 fi
1410 rm -f conftest*
1411
1412 fi
1413 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1414 if test $ac_cv_type_off_t = no; then
1415 cat >> confdefs.h <<\EOF
1416 #define off_t long
1417 EOF
1418
1419 fi
1420
1421 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1422 echo "configure:1423: checking for size_t" >&5
1423 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 cat > conftest.$ac_ext <<EOF
1427 #line 1428 "configure"
1428 #include "confdefs.h"
1429 #include <sys/types.h>
1430 #if STDC_HEADERS
1431 #include <stdlib.h>
1432 #include <stddef.h>
1433 #endif
1434 EOF
1435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1436 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1437 rm -rf conftest*
1438 ac_cv_type_size_t=yes
1439 else
1440 rm -rf conftest*
1441 ac_cv_type_size_t=no
1442 fi
1443 rm -f conftest*
1444
1445 fi
1446 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1447 if test $ac_cv_type_size_t = no; then
1448 cat >> confdefs.h <<\EOF
1449 #define size_t unsigned
1450 EOF
1451
1452 fi
1453
1454 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1455 # for constant arguments. Useless!
1456 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1457 echo "configure:1458: checking for working alloca.h" >&5
1458 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1459 echo $ac_n "(cached) $ac_c" 1>&6
1460 else
1461 cat > conftest.$ac_ext <<EOF
1462 #line 1463 "configure"
1463 #include "confdefs.h"
1464 #include <alloca.h>
1465 int main() {
1466 char *p = alloca(2 * sizeof(int));
1467 ; return 0; }
1468 EOF
1469 if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1470 rm -rf conftest*
1471 ac_cv_header_alloca_h=yes
1472 else
1473 echo "configure: failed program was:" >&5
1474 cat conftest.$ac_ext >&5
1475 rm -rf conftest*
1476 ac_cv_header_alloca_h=no
1477 fi
1478 rm -f conftest*
1479 fi
1480
1481 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1482 if test $ac_cv_header_alloca_h = yes; then
1483 cat >> confdefs.h <<\EOF
1484 #define HAVE_ALLOCA_H 1
1485 EOF
1486
1487 fi
1488
1489 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1490 echo "configure:1491: checking for alloca" >&5
1491 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494 cat > conftest.$ac_ext <<EOF
1495 #line 1496 "configure"
1496 #include "confdefs.h"
1497
1498 #ifdef __GNUC__
1499 # define alloca __builtin_alloca
1500 #else
1501 # ifdef _MSC_VER
1502 # include <malloc.h>
1503 # define alloca _alloca
1504 # else
1505 # if HAVE_ALLOCA_H
1506 # include <alloca.h>
1507 # else
1508 # ifdef _AIX
1509 #pragma alloca
1510 # else
1511 # ifndef alloca /* predefined by HP cc +Olibcalls */
1512 char *alloca ();
1513 # endif
1514 # endif
1515 # endif
1516 # endif
1517 #endif
1518
1519 int main() {
1520 char *p = (char *) alloca(1);
1521 ; return 0; }
1522 EOF
1523 if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1524 rm -rf conftest*
1525 ac_cv_func_alloca_works=yes
1526 else
1527 echo "configure: failed program was:" >&5
1528 cat conftest.$ac_ext >&5
1529 rm -rf conftest*
1530 ac_cv_func_alloca_works=no
1531 fi
1532 rm -f conftest*
1533 fi
1534
1535 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1536 if test $ac_cv_func_alloca_works = yes; then
1537 cat >> confdefs.h <<\EOF
1538 #define HAVE_ALLOCA 1
1539 EOF
1540
1541 fi
1542
1543 if test $ac_cv_func_alloca_works = no; then
1544 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1545 # that cause trouble. Some versions do not even contain alloca or
1546 # contain a buggy version. If you still want to use their alloca,
1547 # use ar to extract alloca.o from them instead of compiling alloca.c.
1548 ALLOCA=alloca.${ac_objext}
1549 cat >> confdefs.h <<\EOF
1550 #define C_ALLOCA 1
1551 EOF
1552
1553
1554 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1555 echo "configure:1556: checking whether alloca needs Cray hooks" >&5
1556 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1557 echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559 cat > conftest.$ac_ext <<EOF
1560 #line 1561 "configure"
1561 #include "confdefs.h"
1562 #if defined(CRAY) && ! defined(CRAY2)
1563 webecray
1564 #else
1565 wenotbecray
1566 #endif
1567
1568 EOF
1569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570 egrep "webecray" >/dev/null 2>&1; then
1571 rm -rf conftest*
1572 ac_cv_os_cray=yes
1573 else
1574 rm -rf conftest*
1575 ac_cv_os_cray=no
1576 fi
1577 rm -f conftest*
1578
1579 fi
1580
1581 echo "$ac_t""$ac_cv_os_cray" 1>&6
1582 if test $ac_cv_os_cray = yes; then
1583 for ac_func in _getb67 GETB67 getb67; do
1584 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1585 echo "configure:1586: checking for $ac_func" >&5
1586 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1587 echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592 /* System header to define __stub macros and hopefully few prototypes,
1593 which can conflict with char $ac_func(); below. */
1594 #include <assert.h>
1595 /* Override any gcc2 internal prototype to avoid an error. */
1596 /* We use char because int might match the return type of a gcc2
1597 builtin and then its argument prototype would still apply. */
1598 char $ac_func();
1599
1600 int main() {
1601
1602 /* The GNU C library defines this for functions which it implements
1603 to always fail with ENOSYS. Some functions are actually named
1604 something starting with __ and the normal name is an alias. */
1605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1606 choke me
1607 #else
1608 $ac_func();
1609 #endif
1610
1611 ; return 0; }
1612 EOF
1613 if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1614 rm -rf conftest*
1615 eval "ac_cv_func_$ac_func=yes"
1616 else
1617 echo "configure: failed program was:" >&5
1618 cat conftest.$ac_ext >&5
1619 rm -rf conftest*
1620 eval "ac_cv_func_$ac_func=no"
1621 fi
1622 rm -f conftest*
1623 fi
1624
1625 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1626 echo "$ac_t""yes" 1>&6
1627 cat >> confdefs.h <<EOF
1628 #define CRAY_STACKSEG_END $ac_func
1629 EOF
1630
1631 break
1632 else
1633 echo "$ac_t""no" 1>&6
1634 fi
1635
1636 done
1637 fi
1638
1639 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1640 echo "configure:1641: checking stack direction for C alloca" >&5
1641 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1642 echo $ac_n "(cached) $ac_c" 1>&6
1643 else
1644 if test "$cross_compiling" = yes; then
1645 ac_cv_c_stack_direction=0
1646 else
1647 cat > conftest.$ac_ext <<EOF
1648 #line 1649 "configure"
1649 #include "confdefs.h"
1650 find_stack_direction ()
1651 {
1652 static char *addr = 0;
1653 auto char dummy;
1654 if (addr == 0)
1655 {
1656 addr = &dummy;
1657 return find_stack_direction ();
1658 }
1659 else
1660 return (&dummy > addr) ? 1 : -1;
1661 }
1662 main ()
1663 {
1664 exit (find_stack_direction() < 0);
1665 }
1666 EOF
1667 if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1668 then
1669 ac_cv_c_stack_direction=1
1670 else
1671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
1673 rm -fr conftest*
1674 ac_cv_c_stack_direction=-1
1675 fi
1676 rm -fr conftest*
1677 fi
1678
1679 fi
1680
1681 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1682 cat >> confdefs.h <<EOF
1683 #define STACK_DIRECTION $ac_cv_c_stack_direction
1684 EOF
1685
1686 fi
1687
1688 for ac_hdr in unistd.h
1689 do
1690 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1691 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1692 echo "configure:1693: checking for $ac_hdr" >&5
1693 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1694 echo $ac_n "(cached) $ac_c" 1>&6
1695 else
1696 cat > conftest.$ac_ext <<EOF
1697 #line 1698 "configure"
1698 #include "confdefs.h"
1699 #include <$ac_hdr>
1700 EOF
1701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1702 { (eval echo configure:1703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1704 if test -z "$ac_err"; then
1705 rm -rf conftest*
1706 eval "ac_cv_header_$ac_safe=yes"
1707 else
1708 echo "$ac_err" >&5
1709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -rf conftest*
1712 eval "ac_cv_header_$ac_safe=no"
1713 fi
1714 rm -f conftest*
1715 fi
1716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1717 echo "$ac_t""yes" 1>&6
1718 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1719 cat >> confdefs.h <<EOF
1720 #define $ac_tr_hdr 1
1721 EOF
1722
1723 else
1724 echo "$ac_t""no" 1>&6
1725 fi
1726 done
1727
1728 for ac_func in getpagesize
1729 do
1730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1731 echo "configure:1732: checking for $ac_func" >&5
1732 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1734 else
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 /* System header to define __stub macros and hopefully few prototypes,
1739 which can conflict with char $ac_func(); below. */
1740 #include <assert.h>
1741 /* Override any gcc2 internal prototype to avoid an error. */
1742 /* We use char because int might match the return type of a gcc2
1743 builtin and then its argument prototype would still apply. */
1744 char $ac_func();
1745
1746 int main() {
1747
1748 /* The GNU C library defines this for functions which it implements
1749 to always fail with ENOSYS. Some functions are actually named
1750 something starting with __ and the normal name is an alias. */
1751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1752 choke me
1753 #else
1754 $ac_func();
1755 #endif
1756
1757 ; return 0; }
1758 EOF
1759 if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1760 rm -rf conftest*
1761 eval "ac_cv_func_$ac_func=yes"
1762 else
1763 echo "configure: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 rm -rf conftest*
1766 eval "ac_cv_func_$ac_func=no"
1767 fi
1768 rm -f conftest*
1769 fi
1770
1771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1772 echo "$ac_t""yes" 1>&6
1773 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1774 cat >> confdefs.h <<EOF
1775 #define $ac_tr_func 1
1776 EOF
1777
1778 else
1779 echo "$ac_t""no" 1>&6
1780 fi
1781 done
1782
1783 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1784 echo "configure:1785: checking for working mmap" >&5
1785 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1786 echo $ac_n "(cached) $ac_c" 1>&6
1787 else
1788 if test "$cross_compiling" = yes; then
1789 ac_cv_func_mmap_fixed_mapped=no
1790 else
1791 cat > conftest.$ac_ext <<EOF
1792 #line 1793 "configure"
1793 #include "confdefs.h"
1794
1795 /* Thanks to Mike Haertel and Jim Avera for this test.
1796 Here is a matrix of mmap possibilities:
1797 mmap private not fixed
1798 mmap private fixed at somewhere currently unmapped
1799 mmap private fixed at somewhere already mapped
1800 mmap shared not fixed
1801 mmap shared fixed at somewhere currently unmapped
1802 mmap shared fixed at somewhere already mapped
1803 For private mappings, we should verify that changes cannot be read()
1804 back from the file, nor mmap's back from the file at a different
1805 address. (There have been systems where private was not correctly
1806 implemented like the infamous i386 svr4.0, and systems where the
1807 VM page cache was not coherent with the filesystem buffer cache
1808 like early versions of FreeBSD and possibly contemporary NetBSD.)
1809 For shared mappings, we should conversely verify that changes get
1810 propogated back to all the places they're supposed to be.
1811
1812 Grep wants private fixed already mapped.
1813 The main things grep needs to know about mmap are:
1814 * does it exist and is it safe to write into the mmap'd area
1815 * how to use it (BSD variants) */
1816 #include <sys/types.h>
1817 #include <fcntl.h>
1818 #include <sys/mman.h>
1819
1820 /* This mess was copied from the GNU getpagesize.h. */
1821 #ifndef HAVE_GETPAGESIZE
1822 # ifdef HAVE_UNISTD_H
1823 # include <unistd.h>
1824 # endif
1825
1826 /* Assume that all systems that can run configure have sys/param.h. */
1827 # ifndef HAVE_SYS_PARAM_H
1828 # define HAVE_SYS_PARAM_H 1
1829 # endif
1830
1831 # ifdef _SC_PAGESIZE
1832 # define getpagesize() sysconf(_SC_PAGESIZE)
1833 # else /* no _SC_PAGESIZE */
1834 # ifdef HAVE_SYS_PARAM_H
1835 # include <sys/param.h>
1836 # ifdef EXEC_PAGESIZE
1837 # define getpagesize() EXEC_PAGESIZE
1838 # else /* no EXEC_PAGESIZE */
1839 # ifdef NBPG
1840 # define getpagesize() NBPG * CLSIZE
1841 # ifndef CLSIZE
1842 # define CLSIZE 1
1843 # endif /* no CLSIZE */
1844 # else /* no NBPG */
1845 # ifdef NBPC
1846 # define getpagesize() NBPC
1847 # else /* no NBPC */
1848 # ifdef PAGESIZE
1849 # define getpagesize() PAGESIZE
1850 # endif /* PAGESIZE */
1851 # endif /* no NBPC */
1852 # endif /* no NBPG */
1853 # endif /* no EXEC_PAGESIZE */
1854 # else /* no HAVE_SYS_PARAM_H */
1855 # define getpagesize() 8192 /* punt totally */
1856 # endif /* no HAVE_SYS_PARAM_H */
1857 # endif /* no _SC_PAGESIZE */
1858
1859 #endif /* no HAVE_GETPAGESIZE */
1860
1861 #ifdef __cplusplus
1862 extern "C" { void *malloc(unsigned); }
1863 #else
1864 char *malloc();
1865 #endif
1866
1867 int
1868 main()
1869 {
1870 char *data, *data2, *data3;
1871 int i, pagesize;
1872 int fd;
1873
1874 pagesize = getpagesize();
1875
1876 /*
1877 * First, make a file with some known garbage in it.
1878 */
1879 data = malloc(pagesize);
1880 if (!data)
1881 exit(1);
1882 for (i = 0; i < pagesize; ++i)
1883 *(data + i) = rand();
1884 umask(0);
1885 fd = creat("conftestmmap", 0600);
1886 if (fd < 0)
1887 exit(1);
1888 if (write(fd, data, pagesize) != pagesize)
1889 exit(1);
1890 close(fd);
1891
1892 /*
1893 * Next, try to mmap the file at a fixed address which
1894 * already has something else allocated at it. If we can,
1895 * also make sure that we see the same garbage.
1896 */
1897 fd = open("conftestmmap", O_RDWR);
1898 if (fd < 0)
1899 exit(1);
1900 data2 = malloc(2 * pagesize);
1901 if (!data2)
1902 exit(1);
1903 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1904 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1905 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1906 exit(1);
1907 for (i = 0; i < pagesize; ++i)
1908 if (*(data + i) != *(data2 + i))
1909 exit(1);
1910
1911 /*
1912 * Finally, make sure that changes to the mapped area
1913 * do not percolate back to the file as seen by read().
1914 * (This is a bug on some variants of i386 svr4.0.)
1915 */
1916 for (i = 0; i < pagesize; ++i)
1917 *(data2 + i) = *(data2 + i) + 1;
1918 data3 = malloc(pagesize);
1919 if (!data3)
1920 exit(1);
1921 if (read(fd, data3, pagesize) != pagesize)
1922 exit(1);
1923 for (i = 0; i < pagesize; ++i)
1924 if (*(data + i) != *(data3 + i))
1925 exit(1);
1926 close(fd);
1927 unlink("conftestmmap");
1928 exit(0);
1929 }
1930
1931 EOF
1932 if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1933 then
1934 ac_cv_func_mmap_fixed_mapped=yes
1935 else
1936 echo "configure: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1938 rm -fr conftest*
1939 ac_cv_func_mmap_fixed_mapped=no
1940 fi
1941 rm -fr conftest*
1942 fi
1943
1944 fi
1945
1946 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1947 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1948 cat >> confdefs.h <<\EOF
1949 #define HAVE_MMAP 1
1950 EOF
1951
1952 fi
1953
1954
1955 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1956 unistd.h values.h sys/param.h
1957 do
1958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1960 echo "configure:1961: checking for $ac_hdr" >&5
1961 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964 cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 #include <$ac_hdr>
1968 EOF
1969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1970 { (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1972 if test -z "$ac_err"; then
1973 rm -rf conftest*
1974 eval "ac_cv_header_$ac_safe=yes"
1975 else
1976 echo "$ac_err" >&5
1977 echo "configure: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1979 rm -rf conftest*
1980 eval "ac_cv_header_$ac_safe=no"
1981 fi
1982 rm -f conftest*
1983 fi
1984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1985 echo "$ac_t""yes" 1>&6
1986 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1987 cat >> confdefs.h <<EOF
1988 #define $ac_tr_hdr 1
1989 EOF
1990
1991 else
1992 echo "$ac_t""no" 1>&6
1993 fi
1994 done
1995
1996 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
1997 __argz_count __argz_stringify __argz_next
1998 do
1999 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_func" >&5
2001 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2002 echo $ac_n "(cached) $ac_c" 1>&6
2003 else
2004 cat > conftest.$ac_ext <<EOF
2005 #line 2006 "configure"
2006 #include "confdefs.h"
2007 /* System header to define __stub macros and hopefully few prototypes,
2008 which can conflict with char $ac_func(); below. */
2009 #include <assert.h>
2010 /* Override any gcc2 internal prototype to avoid an error. */
2011 /* We use char because int might match the return type of a gcc2
2012 builtin and then its argument prototype would still apply. */
2013 char $ac_func();
2014
2015 int main() {
2016
2017 /* The GNU C library defines this for functions which it implements
2018 to always fail with ENOSYS. Some functions are actually named
2019 something starting with __ and the normal name is an alias. */
2020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2021 choke me
2022 #else
2023 $ac_func();
2024 #endif
2025
2026 ; return 0; }
2027 EOF
2028 if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2029 rm -rf conftest*
2030 eval "ac_cv_func_$ac_func=yes"
2031 else
2032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 rm -rf conftest*
2035 eval "ac_cv_func_$ac_func=no"
2036 fi
2037 rm -f conftest*
2038 fi
2039
2040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2041 echo "$ac_t""yes" 1>&6
2042 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2043 cat >> confdefs.h <<EOF
2044 #define $ac_tr_func 1
2045 EOF
2046
2047 else
2048 echo "$ac_t""no" 1>&6
2049 fi
2050 done
2051
2052
2053 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2054 for ac_func in stpcpy
2055 do
2056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2057 echo "configure:2058: checking for $ac_func" >&5
2058 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2059 echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061 cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2064 /* System header to define __stub macros and hopefully few prototypes,
2065 which can conflict with char $ac_func(); below. */
2066 #include <assert.h>
2067 /* Override any gcc2 internal prototype to avoid an error. */
2068 /* We use char because int might match the return type of a gcc2
2069 builtin and then its argument prototype would still apply. */
2070 char $ac_func();
2071
2072 int main() {
2073
2074 /* The GNU C library defines this for functions which it implements
2075 to always fail with ENOSYS. Some functions are actually named
2076 something starting with __ and the normal name is an alias. */
2077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2078 choke me
2079 #else
2080 $ac_func();
2081 #endif
2082
2083 ; return 0; }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2086 rm -rf conftest*
2087 eval "ac_cv_func_$ac_func=yes"
2088 else
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 eval "ac_cv_func_$ac_func=no"
2093 fi
2094 rm -f conftest*
2095 fi
2096
2097 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2098 echo "$ac_t""yes" 1>&6
2099 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2100 cat >> confdefs.h <<EOF
2101 #define $ac_tr_func 1
2102 EOF
2103
2104 else
2105 echo "$ac_t""no" 1>&6
2106 fi
2107 done
2108
2109 fi
2110 if test "${ac_cv_func_stpcpy}" = "yes"; then
2111 cat >> confdefs.h <<\EOF
2112 #define HAVE_STPCPY 1
2113 EOF
2114
2115 fi
2116
2117 if test $ac_cv_header_locale_h = yes; then
2118 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2119 echo "configure:2120: checking for LC_MESSAGES" >&5
2120 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2121 echo $ac_n "(cached) $ac_c" 1>&6
2122 else
2123 cat > conftest.$ac_ext <<EOF
2124 #line 2125 "configure"
2125 #include "confdefs.h"
2126 #include <locale.h>
2127 int main() {
2128 return LC_MESSAGES
2129 ; return 0; }
2130 EOF
2131 if { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2132 rm -rf conftest*
2133 am_cv_val_LC_MESSAGES=yes
2134 else
2135 echo "configure: failed program was:" >&5
2136 cat conftest.$ac_ext >&5
2137 rm -rf conftest*
2138 am_cv_val_LC_MESSAGES=no
2139 fi
2140 rm -f conftest*
2141 fi
2142
2143 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2144 if test $am_cv_val_LC_MESSAGES = yes; then
2145 cat >> confdefs.h <<\EOF
2146 #define HAVE_LC_MESSAGES 1
2147 EOF
2148
2149 fi
2150 fi
2151 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2152 echo "configure:2153: checking whether NLS is requested" >&5
2153 # Check whether --enable-nls or --disable-nls was given.
2154 if test "${enable_nls+set}" = set; then
2155 enableval="$enable_nls"
2156 USE_NLS=$enableval
2157 else
2158 USE_NLS=yes
2159 fi
2160
2161 echo "$ac_t""$USE_NLS" 1>&6
2162
2163
2164 USE_INCLUDED_LIBINTL=no
2165
2166 if test "$USE_NLS" = "yes"; then
2167 cat >> confdefs.h <<\EOF
2168 #define ENABLE_NLS 1
2169 EOF
2170
2171 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2172 echo "configure:2173: checking whether included gettext is requested" >&5
2173 # Check whether --with-included-gettext or --without-included-gettext was given.
2174 if test "${with_included_gettext+set}" = set; then
2175 withval="$with_included_gettext"
2176 nls_cv_force_use_gnu_gettext=$withval
2177 else
2178 nls_cv_force_use_gnu_gettext=no
2179 fi
2180
2181 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2182
2183 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2184 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2185 nls_cv_header_intl=
2186 nls_cv_header_libgt=
2187 CATOBJEXT=NONE
2188
2189 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2190 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2191 echo "configure:2192: checking for libintl.h" >&5
2192 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 #include <libintl.h>
2199 EOF
2200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2201 { (eval echo configure:2202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2203 if test -z "$ac_err"; then
2204 rm -rf conftest*
2205 eval "ac_cv_header_$ac_safe=yes"
2206 else
2207 echo "$ac_err" >&5
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_header_$ac_safe=no"
2212 fi
2213 rm -f conftest*
2214 fi
2215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2216 echo "$ac_t""yes" 1>&6
2217 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2218 echo "configure:2219: checking for gettext in libc" >&5
2219 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2220 echo $ac_n "(cached) $ac_c" 1>&6
2221 else
2222 cat > conftest.$ac_ext <<EOF
2223 #line 2224 "configure"
2224 #include "confdefs.h"
2225 #include <libintl.h>
2226 int main() {
2227 return (int) gettext ("")
2228 ; return 0; }
2229 EOF
2230 if { (eval echo configure:2231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2231 rm -rf conftest*
2232 gt_cv_func_gettext_libc=yes
2233 else
2234 echo "configure: failed program was:" >&5
2235 cat conftest.$ac_ext >&5
2236 rm -rf conftest*
2237 gt_cv_func_gettext_libc=no
2238 fi
2239 rm -f conftest*
2240 fi
2241
2242 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2243
2244 if test "$gt_cv_func_gettext_libc" != "yes"; then
2245 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2246 echo "configure:2247: checking for bindtextdomain in -lintl" >&5
2247 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2248 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2249 echo $ac_n "(cached) $ac_c" 1>&6
2250 else
2251 ac_save_LIBS="$LIBS"
2252 LIBS="-lintl $LIBS"
2253 cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 /* Override any gcc2 internal prototype to avoid an error. */
2257 /* We use char because int might match the return type of a gcc2
2258 builtin and then its argument prototype would still apply. */
2259 char bindtextdomain();
2260
2261 int main() {
2262 bindtextdomain()
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266 rm -rf conftest*
2267 eval "ac_cv_lib_$ac_lib_var=yes"
2268 else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 eval "ac_cv_lib_$ac_lib_var=no"
2273 fi
2274 rm -f conftest*
2275 LIBS="$ac_save_LIBS"
2276
2277 fi
2278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2279 echo "$ac_t""yes" 1>&6
2280 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2281 echo "configure:2282: checking for gettext in libintl" >&5
2282 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285 cat > conftest.$ac_ext <<EOF
2286 #line 2287 "configure"
2287 #include "confdefs.h"
2288
2289 int main() {
2290 return (int) gettext ("")
2291 ; return 0; }
2292 EOF
2293 if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2294 rm -rf conftest*
2295 gt_cv_func_gettext_libintl=yes
2296 else
2297 echo "configure: failed program was:" >&5
2298 cat conftest.$ac_ext >&5
2299 rm -rf conftest*
2300 gt_cv_func_gettext_libintl=no
2301 fi
2302 rm -f conftest*
2303 fi
2304
2305 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2306 else
2307 echo "$ac_t""no" 1>&6
2308 fi
2309
2310 fi
2311
2312 if test "$gt_cv_func_gettext_libc" = "yes" \
2313 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2314 cat >> confdefs.h <<\EOF
2315 #define HAVE_GETTEXT 1
2316 EOF
2317
2318 # Extract the first word of "msgfmt", so it can be a program name with args.
2319 set dummy msgfmt; ac_word=$2
2320 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_word" >&5
2322 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2323 echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325 case "$MSGFMT" in
2326 /*)
2327 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2328 ;;
2329 *)
2330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2331 for ac_dir in $PATH; do
2332 test -z "$ac_dir" && ac_dir=.
2333 if test -f $ac_dir/$ac_word; then
2334 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2335 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2336 break
2337 fi
2338 fi
2339 done
2340 IFS="$ac_save_ifs"
2341 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2342 ;;
2343 esac
2344 fi
2345 MSGFMT="$ac_cv_path_MSGFMT"
2346 if test -n "$MSGFMT"; then
2347 echo "$ac_t""$MSGFMT" 1>&6
2348 else
2349 echo "$ac_t""no" 1>&6
2350 fi
2351 if test "$MSGFMT" != "no"; then
2352 for ac_func in dcgettext
2353 do
2354 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2355 echo "configure:2356: checking for $ac_func" >&5
2356 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2357 echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 /* System header to define __stub macros and hopefully few prototypes,
2363 which can conflict with char $ac_func(); below. */
2364 #include <assert.h>
2365 /* Override any gcc2 internal prototype to avoid an error. */
2366 /* We use char because int might match the return type of a gcc2
2367 builtin and then its argument prototype would still apply. */
2368 char $ac_func();
2369
2370 int main() {
2371
2372 /* The GNU C library defines this for functions which it implements
2373 to always fail with ENOSYS. Some functions are actually named
2374 something starting with __ and the normal name is an alias. */
2375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2376 choke me
2377 #else
2378 $ac_func();
2379 #endif
2380
2381 ; return 0; }
2382 EOF
2383 if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2384 rm -rf conftest*
2385 eval "ac_cv_func_$ac_func=yes"
2386 else
2387 echo "configure: failed program was:" >&5
2388 cat conftest.$ac_ext >&5
2389 rm -rf conftest*
2390 eval "ac_cv_func_$ac_func=no"
2391 fi
2392 rm -f conftest*
2393 fi
2394
2395 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2396 echo "$ac_t""yes" 1>&6
2397 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2398 cat >> confdefs.h <<EOF
2399 #define $ac_tr_func 1
2400 EOF
2401
2402 else
2403 echo "$ac_t""no" 1>&6
2404 fi
2405 done
2406
2407 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2408 set dummy gmsgfmt; ac_word=$2
2409 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2410 echo "configure:2411: checking for $ac_word" >&5
2411 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 case "$GMSGFMT" in
2415 /*)
2416 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2417 ;;
2418 ?:/*)
2419 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2420 ;;
2421 *)
2422 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2423 ac_dummy="$PATH"
2424 for ac_dir in $ac_dummy; do
2425 test -z "$ac_dir" && ac_dir=.
2426 if test -f $ac_dir/$ac_word; then
2427 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2428 break
2429 fi
2430 done
2431 IFS="$ac_save_ifs"
2432 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2433 ;;
2434 esac
2435 fi
2436 GMSGFMT="$ac_cv_path_GMSGFMT"
2437 if test -n "$GMSGFMT"; then
2438 echo "$ac_t""$GMSGFMT" 1>&6
2439 else
2440 echo "$ac_t""no" 1>&6
2441 fi
2442
2443 # Extract the first word of "xgettext", so it can be a program name with args.
2444 set dummy xgettext; ac_word=$2
2445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2446 echo "configure:2447: checking for $ac_word" >&5
2447 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450 case "$XGETTEXT" in
2451 /*)
2452 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2453 ;;
2454 *)
2455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2456 for ac_dir in $PATH; do
2457 test -z "$ac_dir" && ac_dir=.
2458 if test -f $ac_dir/$ac_word; then
2459 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2460 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2461 break
2462 fi
2463 fi
2464 done
2465 IFS="$ac_save_ifs"
2466 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2467 ;;
2468 esac
2469 fi
2470 XGETTEXT="$ac_cv_path_XGETTEXT"
2471 if test -n "$XGETTEXT"; then
2472 echo "$ac_t""$XGETTEXT" 1>&6
2473 else
2474 echo "$ac_t""no" 1>&6
2475 fi
2476
2477 cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480
2481 int main() {
2482 extern int _nl_msg_cat_cntr;
2483 return _nl_msg_cat_cntr
2484 ; return 0; }
2485 EOF
2486 if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2487 rm -rf conftest*
2488 CATOBJEXT=.gmo
2489 DATADIRNAME=share
2490 else
2491 echo "configure: failed program was:" >&5
2492 cat conftest.$ac_ext >&5
2493 rm -rf conftest*
2494 CATOBJEXT=.mo
2495 DATADIRNAME=lib
2496 fi
2497 rm -f conftest*
2498 INSTOBJEXT=.mo
2499 fi
2500 fi
2501
2502 else
2503 echo "$ac_t""no" 1>&6
2504 fi
2505
2506
2507
2508 if test "$CATOBJEXT" = "NONE"; then
2509 nls_cv_use_gnu_gettext=yes
2510 fi
2511 fi
2512
2513 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2514 INTLOBJS="\$(GETTOBJS)"
2515 # Extract the first word of "msgfmt", so it can be a program name with args.
2516 set dummy msgfmt; ac_word=$2
2517 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2518 echo "configure:2519: checking for $ac_word" >&5
2519 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2520 echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522 case "$MSGFMT" in
2523 /*)
2524 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2525 ;;
2526 *)
2527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2528 for ac_dir in $PATH; do
2529 test -z "$ac_dir" && ac_dir=.
2530 if test -f $ac_dir/$ac_word; then
2531 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2532 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2533 break
2534 fi
2535 fi
2536 done
2537 IFS="$ac_save_ifs"
2538 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2539 ;;
2540 esac
2541 fi
2542 MSGFMT="$ac_cv_path_MSGFMT"
2543 if test -n "$MSGFMT"; then
2544 echo "$ac_t""$MSGFMT" 1>&6
2545 else
2546 echo "$ac_t""no" 1>&6
2547 fi
2548
2549 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2550 set dummy gmsgfmt; ac_word=$2
2551 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2552 echo "configure:2553: checking for $ac_word" >&5
2553 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2554 echo $ac_n "(cached) $ac_c" 1>&6
2555 else
2556 case "$GMSGFMT" in
2557 /*)
2558 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2559 ;;
2560 ?:/*)
2561 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2562 ;;
2563 *)
2564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2565 ac_dummy="$PATH"
2566 for ac_dir in $ac_dummy; do
2567 test -z "$ac_dir" && ac_dir=.
2568 if test -f $ac_dir/$ac_word; then
2569 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2570 break
2571 fi
2572 done
2573 IFS="$ac_save_ifs"
2574 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2575 ;;
2576 esac
2577 fi
2578 GMSGFMT="$ac_cv_path_GMSGFMT"
2579 if test -n "$GMSGFMT"; then
2580 echo "$ac_t""$GMSGFMT" 1>&6
2581 else
2582 echo "$ac_t""no" 1>&6
2583 fi
2584
2585 # Extract the first word of "xgettext", so it can be a program name with args.
2586 set dummy xgettext; ac_word=$2
2587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2588 echo "configure:2589: checking for $ac_word" >&5
2589 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2590 echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592 case "$XGETTEXT" in
2593 /*)
2594 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2595 ;;
2596 *)
2597 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2598 for ac_dir in $PATH; do
2599 test -z "$ac_dir" && ac_dir=.
2600 if test -f $ac_dir/$ac_word; then
2601 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2602 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2603 break
2604 fi
2605 fi
2606 done
2607 IFS="$ac_save_ifs"
2608 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2609 ;;
2610 esac
2611 fi
2612 XGETTEXT="$ac_cv_path_XGETTEXT"
2613 if test -n "$XGETTEXT"; then
2614 echo "$ac_t""$XGETTEXT" 1>&6
2615 else
2616 echo "$ac_t""no" 1>&6
2617 fi
2618
2619
2620 USE_INCLUDED_LIBINTL=yes
2621 CATOBJEXT=.gmo
2622 INSTOBJEXT=.mo
2623 DATADIRNAME=share
2624 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2625 INTLLIBS=$INTLDEPS
2626 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2627 nls_cv_header_intl=libintl.h
2628 nls_cv_header_libgt=libgettext.h
2629 fi
2630
2631 if test "$XGETTEXT" != ":"; then
2632 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2633 : ;
2634 else
2635 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2636 XGETTEXT=":"
2637 fi
2638 fi
2639
2640 # We need to process the po/ directory.
2641 POSUB=po
2642 else
2643 DATADIRNAME=share
2644 nls_cv_header_intl=libintl.h
2645 nls_cv_header_libgt=libgettext.h
2646 fi
2647
2648 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2649 # because some of the sources are only built for this goal.
2650 if test "$PACKAGE" = gettext; then
2651 USE_NLS=yes
2652 USE_INCLUDED_LIBINTL=yes
2653 fi
2654
2655 for lang in $ALL_LINGUAS; do
2656 GMOFILES="$GMOFILES $lang.gmo"
2657 POFILES="$POFILES $lang.po"
2658 done
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673 if test "x$CATOBJEXT" != "x"; then
2674 if test "x$ALL_LINGUAS" = "x"; then
2675 LINGUAS=
2676 else
2677 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2678 echo "configure:2679: checking for catalogs to be installed" >&5
2679 NEW_LINGUAS=
2680 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2681 case "$ALL_LINGUAS" in
2682 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2683 esac
2684 done
2685 LINGUAS=$NEW_LINGUAS
2686 echo "$ac_t""$LINGUAS" 1>&6
2687 fi
2688
2689 if test -n "$LINGUAS"; then
2690 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2691 fi
2692 fi
2693
2694 if test $ac_cv_header_locale_h = yes; then
2695 INCLUDE_LOCALE_H="#include <locale.h>"
2696 else
2697 INCLUDE_LOCALE_H="\
2698 /* The system does not provide the header <locale.h>. Take care yourself. */"
2699 fi
2700
2701
2702 if test -f $srcdir/po2tbl.sed.in; then
2703 if test "$CATOBJEXT" = ".cat"; then
2704 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2705 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2706 echo "configure:2707: checking for linux/version.h" >&5
2707 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2708 echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710 cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713 #include <linux/version.h>
2714 EOF
2715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2716 { (eval echo configure:2717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2718 if test -z "$ac_err"; then
2719 rm -rf conftest*
2720 eval "ac_cv_header_$ac_safe=yes"
2721 else
2722 echo "$ac_err" >&5
2723 echo "configure: failed program was:" >&5
2724 cat conftest.$ac_ext >&5
2725 rm -rf conftest*
2726 eval "ac_cv_header_$ac_safe=no"
2727 fi
2728 rm -f conftest*
2729 fi
2730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2731 echo "$ac_t""yes" 1>&6
2732 msgformat=linux
2733 else
2734 echo "$ac_t""no" 1>&6
2735 msgformat=xopen
2736 fi
2737
2738
2739 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2740 fi
2741 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2742 $srcdir/po2tbl.sed.in > po2tbl.sed
2743 fi
2744
2745 if test "$PACKAGE" = "gettext"; then
2746 GT_NO="#NO#"
2747 GT_YES=
2748 else
2749 GT_NO=
2750 GT_YES="#YES#"
2751 fi
2752
2753
2754
2755 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2756
2757
2758 l=
2759
2760
2761 if test -d $srcdir/po; then
2762 test -d po || mkdir po
2763 if test "x$srcdir" != "x."; then
2764 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2765 posrcprefix="$srcdir/"
2766 else
2767 posrcprefix="../$srcdir/"
2768 fi
2769 else
2770 posrcprefix="../"
2771 fi
2772 rm -f po/POTFILES
2773 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2774 < $srcdir/po/POTFILES.in > po/POTFILES
2775 fi
2776
2777
2778
2779 CONFIG_OBS=
2780 CONFIG_DEPS=
2781 CONFIG_SRCS=
2782
2783 configdirs="doc testsuite"
2784
2785
2786 . ${srcdir}/configure.host
2787
2788 . ${srcdir}/configure.tgt
2789
2790
2791 for ac_prog in mawk gawk nawk awk
2792 do
2793 # Extract the first word of "$ac_prog", so it can be a program name with args.
2794 set dummy $ac_prog; ac_word=$2
2795 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2796 echo "configure:2797: checking for $ac_word" >&5
2797 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2798 echo $ac_n "(cached) $ac_c" 1>&6
2799 else
2800 if test -n "$AWK"; then
2801 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2802 else
2803 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2804 ac_dummy="$PATH"
2805 for ac_dir in $ac_dummy; do
2806 test -z "$ac_dir" && ac_dir=.
2807 if test -f $ac_dir/$ac_word; then
2808 ac_cv_prog_AWK="$ac_prog"
2809 break
2810 fi
2811 done
2812 IFS="$ac_save_ifs"
2813 fi
2814 fi
2815 AWK="$ac_cv_prog_AWK"
2816 if test -n "$AWK"; then
2817 echo "$ac_t""$AWK" 1>&6
2818 else
2819 echo "$ac_t""no" 1>&6
2820 fi
2821
2822 test -n "$AWK" && break
2823 done
2824
2825 # Find a good install program. We prefer a C program (faster),
2826 # so one script is as good as another. But avoid the broken or
2827 # incompatible versions:
2828 # SysV /etc/install, /usr/sbin/install
2829 # SunOS /usr/etc/install
2830 # IRIX /sbin/install
2831 # AIX /bin/install
2832 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2833 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2834 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2835 # ./install, which can be erroneously created by make from ./install.sh.
2836 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2837 echo "configure:2838: checking for a BSD compatible install" >&5
2838 if test -z "$INSTALL"; then
2839 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2840 echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2843 for ac_dir in $PATH; do
2844 # Account for people who put trailing slashes in PATH elements.
2845 case "$ac_dir/" in
2846 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2847 *)
2848 # OSF1 and SCO ODT 3.0 have their own names for install.
2849 # Don't use installbsd from OSF since it installs stuff as root
2850 # by default.
2851 for ac_prog in ginstall scoinst install; do
2852 if test -f $ac_dir/$ac_prog; then
2853 if test $ac_prog = install &&
2854 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2855 # AIX install. It has an incompatible calling convention.
2856 :
2857 else
2858 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 break 2
2860 fi
2861 fi
2862 done
2863 ;;
2864 esac
2865 done
2866 IFS="$ac_save_IFS"
2867
2868 fi
2869 if test "${ac_cv_path_install+set}" = set; then
2870 INSTALL="$ac_cv_path_install"
2871 else
2872 # As a last resort, use the slow shell script. We don't cache a
2873 # path for INSTALL within a source directory, because that will
2874 # break other packages using the cache if that directory is
2875 # removed, or if the path is relative.
2876 INSTALL="$ac_install_sh"
2877 fi
2878 fi
2879 echo "$ac_t""$INSTALL" 1>&6
2880
2881 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2882 # It thinks the first close brace ends the variable substitution.
2883 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2884
2885 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2886
2887 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2888
2889 if test $host != $build; then
2890 ac_tool_prefix=${host_alias}-
2891 else
2892 ac_tool_prefix=
2893 fi
2894
2895 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2896 set dummy ${ac_tool_prefix}ar; ac_word=$2
2897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2898 echo "configure:2899: checking for $ac_word" >&5
2899 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902 if test -n "$AR"; then
2903 ac_cv_prog_AR="$AR" # Let the user override the test.
2904 else
2905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2906 ac_dummy="$PATH"
2907 for ac_dir in $ac_dummy; do
2908 test -z "$ac_dir" && ac_dir=.
2909 if test -f $ac_dir/$ac_word; then
2910 ac_cv_prog_AR="${ac_tool_prefix}ar"
2911 break
2912 fi
2913 done
2914 IFS="$ac_save_ifs"
2915 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2916 fi
2917 fi
2918 AR="$ac_cv_prog_AR"
2919 if test -n "$AR"; then
2920 echo "$ac_t""$AR" 1>&6
2921 else
2922 echo "$ac_t""no" 1>&6
2923 fi
2924
2925
2926
2927 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2928 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2930 echo "configure:2931: checking for $ac_word" >&5
2931 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2932 echo $ac_n "(cached) $ac_c" 1>&6
2933 else
2934 if test -n "$RANLIB"; then
2935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2936 else
2937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2938 ac_dummy="$PATH"
2939 for ac_dir in $ac_dummy; do
2940 test -z "$ac_dir" && ac_dir=.
2941 if test -f $ac_dir/$ac_word; then
2942 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2943 break
2944 fi
2945 done
2946 IFS="$ac_save_ifs"
2947 fi
2948 fi
2949 RANLIB="$ac_cv_prog_RANLIB"
2950 if test -n "$RANLIB"; then
2951 echo "$ac_t""$RANLIB" 1>&6
2952 else
2953 echo "$ac_t""no" 1>&6
2954 fi
2955
2956
2957 if test -z "$ac_cv_prog_RANLIB"; then
2958 if test -n "$ac_tool_prefix"; then
2959 # Extract the first word of "ranlib", so it can be a program name with args.
2960 set dummy ranlib; ac_word=$2
2961 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2962 echo "configure:2963: checking for $ac_word" >&5
2963 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2964 echo $ac_n "(cached) $ac_c" 1>&6
2965 else
2966 if test -n "$RANLIB"; then
2967 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2968 else
2969 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2970 ac_dummy="$PATH"
2971 for ac_dir in $ac_dummy; do
2972 test -z "$ac_dir" && ac_dir=.
2973 if test -f $ac_dir/$ac_word; then
2974 ac_cv_prog_RANLIB="ranlib"
2975 break
2976 fi
2977 done
2978 IFS="$ac_save_ifs"
2979 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2980 fi
2981 fi
2982 RANLIB="$ac_cv_prog_RANLIB"
2983 if test -n "$RANLIB"; then
2984 echo "$ac_t""$RANLIB" 1>&6
2985 else
2986 echo "$ac_t""no" 1>&6
2987 fi
2988
2989 else
2990 RANLIB=":"
2991 fi
2992 fi
2993
2994 for ac_prog in 'bison -y' byacc
2995 do
2996 # Extract the first word of "$ac_prog", so it can be a program name with args.
2997 set dummy $ac_prog; ac_word=$2
2998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_word" >&5
3000 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003 if test -n "$YACC"; then
3004 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3005 else
3006 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3007 ac_dummy="$PATH"
3008 for ac_dir in $ac_dummy; do
3009 test -z "$ac_dir" && ac_dir=.
3010 if test -f $ac_dir/$ac_word; then
3011 ac_cv_prog_YACC="$ac_prog"
3012 break
3013 fi
3014 done
3015 IFS="$ac_save_ifs"
3016 fi
3017 fi
3018 YACC="$ac_cv_prog_YACC"
3019 if test -n "$YACC"; then
3020 echo "$ac_t""$YACC" 1>&6
3021 else
3022 echo "$ac_t""no" 1>&6
3023 fi
3024
3025 test -n "$YACC" && break
3026 done
3027 test -n "$YACC" || YACC="yacc"
3028
3029
3030 if test "$program_transform_name" = s,x,x,; then
3031 program_transform_name=
3032 else
3033 # Double any \ or $. echo might interpret backslashes.
3034 cat <<\EOF_SED > conftestsed
3035 s,\\,\\\\,g; s,\$,$$,g
3036 EOF_SED
3037 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3038 rm -f conftestsed
3039 fi
3040 test "$program_prefix" != NONE &&
3041 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3042 # Use a double $ so make ignores it.
3043 test "$program_suffix" != NONE &&
3044 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3045
3046 # sed with no file args requires a program.
3047 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3048
3049
3050 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3051 echo "configure:3052: checking return type of signal handlers" >&5
3052 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3053 echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055 cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 #include <sys/types.h>
3059 #include <signal.h>
3060 #ifdef signal
3061 #undef signal
3062 #endif
3063 #ifdef __cplusplus
3064 extern "C" void (*signal (int, void (*)(int)))(int);
3065 #else
3066 void (*signal ()) ();
3067 #endif
3068
3069 int main() {
3070 int i;
3071 ; return 0; }
3072 EOF
3073 if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3074 rm -rf conftest*
3075 ac_cv_type_signal=void
3076 else
3077 echo "configure: failed program was:" >&5
3078 cat conftest.$ac_ext >&5
3079 rm -rf conftest*
3080 ac_cv_type_signal=int
3081 fi
3082 rm -f conftest*
3083 fi
3084
3085 echo "$ac_t""$ac_cv_type_signal" 1>&6
3086 cat >> confdefs.h <<EOF
3087 #define RETSIGTYPE $ac_cv_type_signal
3088 EOF
3089
3090
3091
3092 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3093 echo "configure:3094: checking for ANSI C header files" >&5
3094 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3095 echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097 cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100 #include <stdlib.h>
3101 #include <stdarg.h>
3102 #include <string.h>
3103 #include <float.h>
3104 EOF
3105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3106 { (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3108 if test -z "$ac_err"; then
3109 rm -rf conftest*
3110 ac_cv_header_stdc=yes
3111 else
3112 echo "$ac_err" >&5
3113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 rm -rf conftest*
3116 ac_cv_header_stdc=no
3117 fi
3118 rm -f conftest*
3119
3120 if test $ac_cv_header_stdc = yes; then
3121 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3122 cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 #include <string.h>
3126 EOF
3127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3128 egrep "memchr" >/dev/null 2>&1; then
3129 :
3130 else
3131 rm -rf conftest*
3132 ac_cv_header_stdc=no
3133 fi
3134 rm -f conftest*
3135
3136 fi
3137
3138 if test $ac_cv_header_stdc = yes; then
3139 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3140 cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143 #include <stdlib.h>
3144 EOF
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146 egrep "free" >/dev/null 2>&1; then
3147 :
3148 else
3149 rm -rf conftest*
3150 ac_cv_header_stdc=no
3151 fi
3152 rm -f conftest*
3153
3154 fi
3155
3156 if test $ac_cv_header_stdc = yes; then
3157 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3158 if test "$cross_compiling" = yes; then
3159 :
3160 else
3161 cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164 #include <ctype.h>
3165 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3166 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3167 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3168 int main () { int i; for (i = 0; i < 256; i++)
3169 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3170 exit (0); }
3171
3172 EOF
3173 if { (eval echo configure:3174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3174 then
3175 :
3176 else
3177 echo "configure: failed program was:" >&5
3178 cat conftest.$ac_ext >&5
3179 rm -fr conftest*
3180 ac_cv_header_stdc=no
3181 fi
3182 rm -fr conftest*
3183 fi
3184
3185 fi
3186 fi
3187
3188 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3189 if test $ac_cv_header_stdc = yes; then
3190 cat >> confdefs.h <<\EOF
3191 #define STDC_HEADERS 1
3192 EOF
3193
3194 fi
3195
3196
3197 for ac_hdr in ctype.h curses.h endian.h link.h \
3198 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3199 string.h sys/procfs.h sys/ptrace.h sys/reg.h \
3200 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3201 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h
3202 do
3203 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3204 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3205 echo "configure:3206: checking for $ac_hdr" >&5
3206 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3207 echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 #include <$ac_hdr>
3213 EOF
3214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3215 { (eval echo configure:3216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3217 if test -z "$ac_err"; then
3218 rm -rf conftest*
3219 eval "ac_cv_header_$ac_safe=yes"
3220 else
3221 echo "$ac_err" >&5
3222 echo "configure: failed program was:" >&5
3223 cat conftest.$ac_ext >&5
3224 rm -rf conftest*
3225 eval "ac_cv_header_$ac_safe=no"
3226 fi
3227 rm -f conftest*
3228 fi
3229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3230 echo "$ac_t""yes" 1>&6
3231 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3232 cat >> confdefs.h <<EOF
3233 #define $ac_tr_hdr 1
3234 EOF
3235
3236 else
3237 echo "$ac_t""no" 1>&6
3238 fi
3239 done
3240
3241 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3242 echo "configure:3243: checking whether stat file-mode macros are broken" >&5
3243 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3244 echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246 cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 #include <sys/types.h>
3250 #include <sys/stat.h>
3251
3252 #if defined(S_ISBLK) && defined(S_IFDIR)
3253 # if S_ISBLK (S_IFDIR)
3254 You lose.
3255 # endif
3256 #endif
3257
3258 #if defined(S_ISBLK) && defined(S_IFCHR)
3259 # if S_ISBLK (S_IFCHR)
3260 You lose.
3261 # endif
3262 #endif
3263
3264 #if defined(S_ISLNK) && defined(S_IFREG)
3265 # if S_ISLNK (S_IFREG)
3266 You lose.
3267 # endif
3268 #endif
3269
3270 #if defined(S_ISSOCK) && defined(S_IFREG)
3271 # if S_ISSOCK (S_IFREG)
3272 You lose.
3273 # endif
3274 #endif
3275
3276 EOF
3277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3278 egrep "You lose" >/dev/null 2>&1; then
3279 rm -rf conftest*
3280 ac_cv_header_stat_broken=yes
3281 else
3282 rm -rf conftest*
3283 ac_cv_header_stat_broken=no
3284 fi
3285 rm -f conftest*
3286
3287 fi
3288
3289 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3290 if test $ac_cv_header_stat_broken = yes; then
3291 cat >> confdefs.h <<\EOF
3292 #define STAT_MACROS_BROKEN 1
3293 EOF
3294
3295 fi
3296
3297
3298 echo $ac_n "checking for working const""... $ac_c" 1>&6
3299 echo "configure:3300: checking for working const" >&5
3300 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303 cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306
3307 int main() {
3308
3309 /* Ultrix mips cc rejects this. */
3310 typedef int charset[2]; const charset x;
3311 /* SunOS 4.1.1 cc rejects this. */
3312 char const *const *ccp;
3313 char **p;
3314 /* NEC SVR4.0.2 mips cc rejects this. */
3315 struct point {int x, y;};
3316 static struct point const zero = {0,0};
3317 /* AIX XL C 1.02.0.0 rejects this.
3318 It does not let you subtract one const X* pointer from another in an arm
3319 of an if-expression whose if-part is not a constant expression */
3320 const char *g = "string";
3321 ccp = &g + (g ? g-g : 0);
3322 /* HPUX 7.0 cc rejects these. */
3323 ++ccp;
3324 p = (char**) ccp;
3325 ccp = (char const *const *) p;
3326 { /* SCO 3.2v4 cc rejects this. */
3327 char *t;
3328 char const *s = 0 ? (char *) 0 : (char const *) 0;
3329
3330 *t++ = 0;
3331 }
3332 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3333 int x[] = {25, 17};
3334 const int *foo = &x[0];
3335 ++foo;
3336 }
3337 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3338 typedef const int *iptr;
3339 iptr p = 0;
3340 ++p;
3341 }
3342 { /* AIX XL C 1.02.0.0 rejects this saying
3343 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3344 struct s { int j; const int *ap[3]; };
3345 struct s *b; b->j = 5;
3346 }
3347 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3348 const int foo = 10;
3349 }
3350
3351 ; return 0; }
3352 EOF
3353 if { (eval echo configure:3354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3354 rm -rf conftest*
3355 ac_cv_c_const=yes
3356 else
3357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 rm -rf conftest*
3360 ac_cv_c_const=no
3361 fi
3362 rm -f conftest*
3363 fi
3364
3365 echo "$ac_t""$ac_cv_c_const" 1>&6
3366 if test $ac_cv_c_const = no; then
3367 cat >> confdefs.h <<\EOF
3368 #define const
3369 EOF
3370
3371 fi
3372
3373
3374 for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc
3375 do
3376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3377 echo "configure:3378: checking for $ac_func" >&5
3378 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3379 echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381 cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 /* System header to define __stub macros and hopefully few prototypes,
3385 which can conflict with char $ac_func(); below. */
3386 #include <assert.h>
3387 /* Override any gcc2 internal prototype to avoid an error. */
3388 /* We use char because int might match the return type of a gcc2
3389 builtin and then its argument prototype would still apply. */
3390 char $ac_func();
3391
3392 int main() {
3393
3394 /* The GNU C library defines this for functions which it implements
3395 to always fail with ENOSYS. Some functions are actually named
3396 something starting with __ and the normal name is an alias. */
3397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3398 choke me
3399 #else
3400 $ac_func();
3401 #endif
3402
3403 ; return 0; }
3404 EOF
3405 if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3406 rm -rf conftest*
3407 eval "ac_cv_func_$ac_func=yes"
3408 else
3409 echo "configure: failed program was:" >&5
3410 cat conftest.$ac_ext >&5
3411 rm -rf conftest*
3412 eval "ac_cv_func_$ac_func=no"
3413 fi
3414 rm -f conftest*
3415 fi
3416
3417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3418 echo "$ac_t""yes" 1>&6
3419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3420 cat >> confdefs.h <<EOF
3421 #define $ac_tr_func 1
3422 EOF
3423
3424 else
3425 echo "$ac_t""no" 1>&6
3426 fi
3427 done
3428
3429 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3430 # for constant arguments. Useless!
3431 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3432 echo "configure:3433: checking for working alloca.h" >&5
3433 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3434 echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436 cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439 #include <alloca.h>
3440 int main() {
3441 char *p = alloca(2 * sizeof(int));
3442 ; return 0; }
3443 EOF
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3445 rm -rf conftest*
3446 ac_cv_header_alloca_h=yes
3447 else
3448 echo "configure: failed program was:" >&5
3449 cat conftest.$ac_ext >&5
3450 rm -rf conftest*
3451 ac_cv_header_alloca_h=no
3452 fi
3453 rm -f conftest*
3454 fi
3455
3456 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3457 if test $ac_cv_header_alloca_h = yes; then
3458 cat >> confdefs.h <<\EOF
3459 #define HAVE_ALLOCA_H 1
3460 EOF
3461
3462 fi
3463
3464 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3465 echo "configure:3466: checking for alloca" >&5
3466 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3467 echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469 cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472
3473 #ifdef __GNUC__
3474 # define alloca __builtin_alloca
3475 #else
3476 # ifdef _MSC_VER
3477 # include <malloc.h>
3478 # define alloca _alloca
3479 # else
3480 # if HAVE_ALLOCA_H
3481 # include <alloca.h>
3482 # else
3483 # ifdef _AIX
3484 #pragma alloca
3485 # else
3486 # ifndef alloca /* predefined by HP cc +Olibcalls */
3487 char *alloca ();
3488 # endif
3489 # endif
3490 # endif
3491 # endif
3492 #endif
3493
3494 int main() {
3495 char *p = (char *) alloca(1);
3496 ; return 0; }
3497 EOF
3498 if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3499 rm -rf conftest*
3500 ac_cv_func_alloca_works=yes
3501 else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3504 rm -rf conftest*
3505 ac_cv_func_alloca_works=no
3506 fi
3507 rm -f conftest*
3508 fi
3509
3510 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3511 if test $ac_cv_func_alloca_works = yes; then
3512 cat >> confdefs.h <<\EOF
3513 #define HAVE_ALLOCA 1
3514 EOF
3515
3516 fi
3517
3518 if test $ac_cv_func_alloca_works = no; then
3519 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3520 # that cause trouble. Some versions do not even contain alloca or
3521 # contain a buggy version. If you still want to use their alloca,
3522 # use ar to extract alloca.o from them instead of compiling alloca.c.
3523 ALLOCA=alloca.${ac_objext}
3524 cat >> confdefs.h <<\EOF
3525 #define C_ALLOCA 1
3526 EOF
3527
3528
3529 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3530 echo "configure:3531: checking whether alloca needs Cray hooks" >&5
3531 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3532 echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 #if defined(CRAY) && ! defined(CRAY2)
3538 webecray
3539 #else
3540 wenotbecray
3541 #endif
3542
3543 EOF
3544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3545 egrep "webecray" >/dev/null 2>&1; then
3546 rm -rf conftest*
3547 ac_cv_os_cray=yes
3548 else
3549 rm -rf conftest*
3550 ac_cv_os_cray=no
3551 fi
3552 rm -f conftest*
3553
3554 fi
3555
3556 echo "$ac_t""$ac_cv_os_cray" 1>&6
3557 if test $ac_cv_os_cray = yes; then
3558 for ac_func in _getb67 GETB67 getb67; do
3559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3560 echo "configure:3561: checking for $ac_func" >&5
3561 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3562 echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564 cat > conftest.$ac_ext <<EOF
3565 #line 3566 "configure"
3566 #include "confdefs.h"
3567 /* System header to define __stub macros and hopefully few prototypes,
3568 which can conflict with char $ac_func(); below. */
3569 #include <assert.h>
3570 /* Override any gcc2 internal prototype to avoid an error. */
3571 /* We use char because int might match the return type of a gcc2
3572 builtin and then its argument prototype would still apply. */
3573 char $ac_func();
3574
3575 int main() {
3576
3577 /* The GNU C library defines this for functions which it implements
3578 to always fail with ENOSYS. Some functions are actually named
3579 something starting with __ and the normal name is an alias. */
3580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3581 choke me
3582 #else
3583 $ac_func();
3584 #endif
3585
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3589 rm -rf conftest*
3590 eval "ac_cv_func_$ac_func=yes"
3591 else
3592 echo "configure: failed program was:" >&5
3593 cat conftest.$ac_ext >&5
3594 rm -rf conftest*
3595 eval "ac_cv_func_$ac_func=no"
3596 fi
3597 rm -f conftest*
3598 fi
3599
3600 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3601 echo "$ac_t""yes" 1>&6
3602 cat >> confdefs.h <<EOF
3603 #define CRAY_STACKSEG_END $ac_func
3604 EOF
3605
3606 break
3607 else
3608 echo "$ac_t""no" 1>&6
3609 fi
3610
3611 done
3612 fi
3613
3614 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3615 echo "configure:3616: checking stack direction for C alloca" >&5
3616 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619 if test "$cross_compiling" = yes; then
3620 ac_cv_c_stack_direction=0
3621 else
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 find_stack_direction ()
3626 {
3627 static char *addr = 0;
3628 auto char dummy;
3629 if (addr == 0)
3630 {
3631 addr = &dummy;
3632 return find_stack_direction ();
3633 }
3634 else
3635 return (&dummy > addr) ? 1 : -1;
3636 }
3637 main ()
3638 {
3639 exit (find_stack_direction() < 0);
3640 }
3641 EOF
3642 if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3643 then
3644 ac_cv_c_stack_direction=1
3645 else
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3648 rm -fr conftest*
3649 ac_cv_c_stack_direction=-1
3650 fi
3651 rm -fr conftest*
3652 fi
3653
3654 fi
3655
3656 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3657 cat >> confdefs.h <<EOF
3658 #define STACK_DIRECTION $ac_cv_c_stack_direction
3659 EOF
3660
3661 fi
3662
3663
3664 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
3665 echo "configure:3666: checking whether malloc must be declared" >&5
3666 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3667 echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672
3673 #include <stdio.h>
3674 #ifdef HAVE_STRING_H
3675 #include <string.h>
3676 #else
3677 #ifdef HAVE_STRINGS_H
3678 #include <strings.h>
3679 #endif
3680 #endif
3681 #ifdef HAVE_STDLIB_H
3682 #include <stdlib.h>
3683 #endif
3684 #ifdef HAVE_UNISTD_H
3685 #include <unistd.h>
3686 #endif
3687 int main() {
3688 char *(*pfn) = (char *(*)) malloc
3689 ; return 0; }
3690 EOF
3691 if { (eval echo configure:3692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3692 rm -rf conftest*
3693 bfd_cv_decl_needed_malloc=no
3694 else
3695 echo "configure: failed program was:" >&5
3696 cat conftest.$ac_ext >&5
3697 rm -rf conftest*
3698 bfd_cv_decl_needed_malloc=yes
3699 fi
3700 rm -f conftest*
3701 fi
3702
3703 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3704 if test $bfd_cv_decl_needed_malloc = yes; then
3705 cat >> confdefs.h <<\EOF
3706 #define NEED_DECLARATION_MALLOC 1
3707 EOF
3708
3709 fi
3710
3711 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
3712 echo "configure:3713: checking whether realloc must be declared" >&5
3713 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3714 echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719
3720 #include <stdio.h>
3721 #ifdef HAVE_STRING_H
3722 #include <string.h>
3723 #else
3724 #ifdef HAVE_STRINGS_H
3725 #include <strings.h>
3726 #endif
3727 #endif
3728 #ifdef HAVE_STDLIB_H
3729 #include <stdlib.h>
3730 #endif
3731 #ifdef HAVE_UNISTD_H
3732 #include <unistd.h>
3733 #endif
3734 int main() {
3735 char *(*pfn) = (char *(*)) realloc
3736 ; return 0; }
3737 EOF
3738 if { (eval echo configure:3739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3739 rm -rf conftest*
3740 bfd_cv_decl_needed_realloc=no
3741 else
3742 echo "configure: failed program was:" >&5
3743 cat conftest.$ac_ext >&5
3744 rm -rf conftest*
3745 bfd_cv_decl_needed_realloc=yes
3746 fi
3747 rm -f conftest*
3748 fi
3749
3750 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3751 if test $bfd_cv_decl_needed_realloc = yes; then
3752 cat >> confdefs.h <<\EOF
3753 #define NEED_DECLARATION_REALLOC 1
3754 EOF
3755
3756 fi
3757
3758 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
3759 echo "configure:3760: checking whether free must be declared" >&5
3760 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3761 echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763 cat > conftest.$ac_ext <<EOF
3764 #line 3765 "configure"
3765 #include "confdefs.h"
3766
3767 #include <stdio.h>
3768 #ifdef HAVE_STRING_H
3769 #include <string.h>
3770 #else
3771 #ifdef HAVE_STRINGS_H
3772 #include <strings.h>
3773 #endif
3774 #endif
3775 #ifdef HAVE_STDLIB_H
3776 #include <stdlib.h>
3777 #endif
3778 #ifdef HAVE_UNISTD_H
3779 #include <unistd.h>
3780 #endif
3781 int main() {
3782 char *(*pfn) = (char *(*)) free
3783 ; return 0; }
3784 EOF
3785 if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3786 rm -rf conftest*
3787 bfd_cv_decl_needed_free=no
3788 else
3789 echo "configure: failed program was:" >&5
3790 cat conftest.$ac_ext >&5
3791 rm -rf conftest*
3792 bfd_cv_decl_needed_free=yes
3793 fi
3794 rm -f conftest*
3795 fi
3796
3797 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
3798 if test $bfd_cv_decl_needed_free = yes; then
3799 cat >> confdefs.h <<\EOF
3800 #define NEED_DECLARATION_FREE 1
3801 EOF
3802
3803 fi
3804
3805 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
3806 echo "configure:3807: checking whether strerror must be declared" >&5
3807 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
3809 else
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813
3814 #include <stdio.h>
3815 #ifdef HAVE_STRING_H
3816 #include <string.h>
3817 #else
3818 #ifdef HAVE_STRINGS_H
3819 #include <strings.h>
3820 #endif
3821 #endif
3822 #ifdef HAVE_STDLIB_H
3823 #include <stdlib.h>
3824 #endif
3825 #ifdef HAVE_UNISTD_H
3826 #include <unistd.h>
3827 #endif
3828 int main() {
3829 char *(*pfn) = (char *(*)) strerror
3830 ; return 0; }
3831 EOF
3832 if { (eval echo configure:3833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3833 rm -rf conftest*
3834 bfd_cv_decl_needed_strerror=no
3835 else
3836 echo "configure: failed program was:" >&5
3837 cat conftest.$ac_ext >&5
3838 rm -rf conftest*
3839 bfd_cv_decl_needed_strerror=yes
3840 fi
3841 rm -f conftest*
3842 fi
3843
3844 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
3845 if test $bfd_cv_decl_needed_strerror = yes; then
3846 cat >> confdefs.h <<\EOF
3847 #define NEED_DECLARATION_STRERROR 1
3848 EOF
3849
3850 fi
3851
3852 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
3853 echo "configure:3854: checking whether strdup must be declared" >&5
3854 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857 cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860
3861 #include <stdio.h>
3862 #ifdef HAVE_STRING_H
3863 #include <string.h>
3864 #else
3865 #ifdef HAVE_STRINGS_H
3866 #include <strings.h>
3867 #endif
3868 #endif
3869 #ifdef HAVE_STDLIB_H
3870 #include <stdlib.h>
3871 #endif
3872 #ifdef HAVE_UNISTD_H
3873 #include <unistd.h>
3874 #endif
3875 int main() {
3876 char *(*pfn) = (char *(*)) strdup
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880 rm -rf conftest*
3881 bfd_cv_decl_needed_strdup=no
3882 else
3883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
3885 rm -rf conftest*
3886 bfd_cv_decl_needed_strdup=yes
3887 fi
3888 rm -f conftest*
3889 fi
3890
3891 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
3892 if test $bfd_cv_decl_needed_strdup = yes; then
3893 cat >> confdefs.h <<\EOF
3894 #define NEED_DECLARATION_STRDUP 1
3895 EOF
3896
3897 fi
3898
3899
3900
3901 # The following save_state_t checkery is only necessary for HPUX
3902 # versions earlier than 10.20. When those fade from memory, this
3903 # could be expunged. --jsm 1999-03-22
3904
3905 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
3906 echo "configure:3907: checking for HPUX save_state structure" >&5
3907 cat > conftest.$ac_ext <<EOF
3908 #line 3909 "configure"
3909 #include "confdefs.h"
3910 #include <machine/save_state.h>
3911 EOF
3912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3913 egrep "save_state_t" >/dev/null 2>&1; then
3914 rm -rf conftest*
3915 gdb_cv_hpux_savestate=yes
3916 else
3917 rm -rf conftest*
3918 gdb_cv_hpux_savestate=no
3919 fi
3920 rm -f conftest*
3921
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #include <machine/save_state.h>
3926 EOF
3927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3928 egrep "ss_wide" >/dev/null 2>&1; then
3929 rm -rf conftest*
3930 gdb_cv_hpux_sswide=yes
3931 else
3932 rm -rf conftest*
3933 gdb_cv_hpux_sswide=no
3934 fi
3935 rm -f conftest*
3936
3937 if test $gdb_cv_hpux_savestate = yes
3938 then
3939 cat >> confdefs.h <<\EOF
3940 #define HAVE_STRUCT_SAVE_STATE_T 1
3941 EOF
3942
3943 fi
3944 if test $gdb_cv_hpux_sswide = yes
3945 then
3946 cat >> confdefs.h <<\EOF
3947 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
3948 EOF
3949
3950 fi
3951 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
3952
3953
3954 # If we are configured native on GNU/Linux, work around problems with
3955 # sys/procfs.h
3956 # Also detect which type of /proc is in use, such as for Unixware.
3957
3958 if test "${target}" = "${host}"; then
3959 gdb_cv_hostos_is_solaris=no
3960 case "${host}" in
3961 i[3456]86-*-linux*)
3962 cat >> confdefs.h <<\EOF
3963 #define START_INFERIOR_TRAPS_EXPECTED 2
3964 EOF
3965
3966 cat >> confdefs.h <<\EOF
3967 #define sys_quotactl 1
3968 EOF
3969
3970 ;;
3971 *-*-solaris*)
3972 gdb_cv_hostos_is_solaris=yes ;;
3973 esac
3974 echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
3975 echo "configure:3976: checking for directory proc entries" >&5
3976 # The [gdb_host != sun4sol2] hack is because Solaris does provide the
3977 # multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
3978 if test "$ac_cv_header_sys_procfs_h" = yes -a \
3979 "$gdb_cv_hostos_is_solaris" = no \
3980 -a -d /proc/$$ \
3981 -a -f /proc/$$/ctl \
3982 -a -f /proc/$$/as \
3983 -a -f /proc/$$/map \
3984 -a -f /proc/$$/status; then
3985 echo "$ac_t""yes" 1>&6
3986 cat >> confdefs.h <<\EOF
3987 #define HAVE_MULTIPLE_PROC_FDS 1
3988 EOF
3989
3990 else
3991 echo "$ac_t""no" 1>&6
3992 fi
3993 fi
3994
3995 if test "$ac_cv_header_sys_procfs_h" = yes; then
3996 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
3997 echo "configure:3998: checking for pstatus_t in sys/procfs.h" >&5
3998 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
3999 echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <sys/procfs.h>
4005 int main() {
4006 pstatus_t avar
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4010 rm -rf conftest*
4011 bfd_cv_have_sys_procfs_type_pstatus_t=yes
4012 else
4013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
4015 rm -rf conftest*
4016 bfd_cv_have_sys_procfs_type_pstatus_t=no
4017
4018 fi
4019 rm -f conftest*
4020 fi
4021
4022 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4023 cat >> confdefs.h <<\EOF
4024 #define HAVE_PSTATUS_T 1
4025 EOF
4026
4027 fi
4028 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4029
4030 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
4031 echo "configure:4032: checking for prrun_t in sys/procfs.h" >&5
4032 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
4033 echo $ac_n "(cached) $ac_c" 1>&6
4034 else
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <sys/procfs.h>
4039 int main() {
4040 prrun_t avar
4041 ; return 0; }
4042 EOF
4043 if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4044 rm -rf conftest*
4045 bfd_cv_have_sys_procfs_type_prrun_t=yes
4046 else
4047 echo "configure: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4049 rm -rf conftest*
4050 bfd_cv_have_sys_procfs_type_prrun_t=no
4051
4052 fi
4053 rm -f conftest*
4054 fi
4055
4056 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
4057 cat >> confdefs.h <<\EOF
4058 #define HAVE_PRRUN_T 1
4059 EOF
4060
4061 fi
4062 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
4063
4064 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
4065 echo "configure:4066: checking for gregset_t in sys/procfs.h" >&5
4066 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
4067 echo $ac_n "(cached) $ac_c" 1>&6
4068 else
4069 cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 #include <sys/procfs.h>
4073 int main() {
4074 gregset_t avar
4075 ; return 0; }
4076 EOF
4077 if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078 rm -rf conftest*
4079 bfd_cv_have_sys_procfs_type_gregset_t=yes
4080 else
4081 echo "configure: failed program was:" >&5
4082 cat conftest.$ac_ext >&5
4083 rm -rf conftest*
4084 bfd_cv_have_sys_procfs_type_gregset_t=no
4085
4086 fi
4087 rm -f conftest*
4088 fi
4089
4090 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
4091 cat >> confdefs.h <<\EOF
4092 #define HAVE_GREGSET_T 1
4093 EOF
4094
4095 fi
4096 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
4097
4098 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
4099 echo "configure:4100: checking for fpregset_t in sys/procfs.h" >&5
4100 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
4101 echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103 cat > conftest.$ac_ext <<EOF
4104 #line 4105 "configure"
4105 #include "confdefs.h"
4106 #include <sys/procfs.h>
4107 int main() {
4108 fpregset_t avar
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4112 rm -rf conftest*
4113 bfd_cv_have_sys_procfs_type_fpregset_t=yes
4114 else
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4117 rm -rf conftest*
4118 bfd_cv_have_sys_procfs_type_fpregset_t=no
4119
4120 fi
4121 rm -f conftest*
4122 fi
4123
4124 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
4125 cat >> confdefs.h <<\EOF
4126 #define HAVE_FPREGSET_T 1
4127 EOF
4128
4129 fi
4130 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
4131
4132
4133
4134 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
4135 echo "configure:4136: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
4136 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
4137 echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139 cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <unistd.h>
4143 #include <sys/types.h>
4144 #include <sys/procfs.h>
4145
4146 int main() {
4147
4148 int dummy;;
4149 dummy = ioctl(0, PIOCSET, &dummy);
4150
4151 ; return 0; }
4152 EOF
4153 if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4154 rm -rf conftest*
4155 gdb_cv_have_procfs_piocset=yes
4156 else
4157 echo "configure: failed program was:" >&5
4158 cat conftest.$ac_ext >&5
4159 rm -rf conftest*
4160 gdb_cv_have_procfs_piocset=no
4161 fi
4162 rm -f conftest*
4163 fi
4164
4165 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
4166 if test $gdb_cv_have_procfs_piocset = yes; then
4167 cat >> confdefs.h <<\EOF
4168 #define HAVE_PROCFS_PIOCSET 1
4169 EOF
4170
4171 fi
4172 fi
4173
4174 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
4175 echo "configure:4176: checking for main in -lm" >&5
4176 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
4177 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4178 echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180 ac_save_LIBS="$LIBS"
4181 LIBS="-lm $LIBS"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185
4186 int main() {
4187 main()
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4191 rm -rf conftest*
4192 eval "ac_cv_lib_$ac_lib_var=yes"
4193 else
4194 echo "configure: failed program was:" >&5
4195 cat conftest.$ac_ext >&5
4196 rm -rf conftest*
4197 eval "ac_cv_lib_$ac_lib_var=no"
4198 fi
4199 rm -f conftest*
4200 LIBS="$ac_save_LIBS"
4201
4202 fi
4203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4204 echo "$ac_t""yes" 1>&6
4205 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4206 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4207 cat >> confdefs.h <<EOF
4208 #define $ac_tr_lib 1
4209 EOF
4210
4211 LIBS="-lm $LIBS"
4212
4213 else
4214 echo "$ac_t""no" 1>&6
4215 fi
4216
4217
4218 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
4219 echo "configure:4220: checking for wctype in -lc" >&5
4220 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
4221 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4222 echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224 ac_save_LIBS="$LIBS"
4225 LIBS="-lc $LIBS"
4226 cat > conftest.$ac_ext <<EOF
4227 #line 4228 "configure"
4228 #include "confdefs.h"
4229 /* Override any gcc2 internal prototype to avoid an error. */
4230 /* We use char because int might match the return type of a gcc2
4231 builtin and then its argument prototype would still apply. */
4232 char wctype();
4233
4234 int main() {
4235 wctype()
4236 ; return 0; }
4237 EOF
4238 if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4239 rm -rf conftest*
4240 eval "ac_cv_lib_$ac_lib_var=yes"
4241 else
4242 echo "configure: failed program was:" >&5
4243 cat conftest.$ac_ext >&5
4244 rm -rf conftest*
4245 eval "ac_cv_lib_$ac_lib_var=no"
4246 fi
4247 rm -f conftest*
4248 LIBS="$ac_save_LIBS"
4249
4250 fi
4251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4252 echo "$ac_t""yes" 1>&6
4253 :
4254 else
4255 echo "$ac_t""no" 1>&6
4256 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
4257 echo "configure:4258: checking for wctype in -lw" >&5
4258 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
4259 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4260 echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262 ac_save_LIBS="$LIBS"
4263 LIBS="-lw $LIBS"
4264 cat > conftest.$ac_ext <<EOF
4265 #line 4266 "configure"
4266 #include "confdefs.h"
4267 /* Override any gcc2 internal prototype to avoid an error. */
4268 /* We use char because int might match the return type of a gcc2
4269 builtin and then its argument prototype would still apply. */
4270 char wctype();
4271
4272 int main() {
4273 wctype()
4274 ; return 0; }
4275 EOF
4276 if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4277 rm -rf conftest*
4278 eval "ac_cv_lib_$ac_lib_var=yes"
4279 else
4280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4282 rm -rf conftest*
4283 eval "ac_cv_lib_$ac_lib_var=no"
4284 fi
4285 rm -f conftest*
4286 LIBS="$ac_save_LIBS"
4287
4288 fi
4289 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4290 echo "$ac_t""yes" 1>&6
4291 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
4292 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4293 cat >> confdefs.h <<EOF
4294 #define $ac_tr_lib 1
4295 EOF
4296
4297 LIBS="-lw $LIBS"
4298
4299 else
4300 echo "$ac_t""no" 1>&6
4301 fi
4302
4303 fi
4304
4305
4306
4307 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
4308 echo "configure:4309: checking for long long support in compiler" >&5
4309 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
4310 echo $ac_n "(cached) $ac_c" 1>&6
4311 else
4312 cat > conftest.$ac_ext <<EOF
4313 #line 4314 "configure"
4314 #include "confdefs.h"
4315
4316 int main() {
4317
4318 extern long long foo;
4319 switch (foo & 2) { case 0: return 1; }
4320
4321 ; return 0; }
4322 EOF
4323 if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4324 rm -rf conftest*
4325 gdb_cv_c_long_long=yes
4326 else
4327 echo "configure: failed program was:" >&5
4328 cat conftest.$ac_ext >&5
4329 rm -rf conftest*
4330 gdb_cv_c_long_long=no
4331 fi
4332 rm -f conftest*
4333 fi
4334
4335 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
4336 if test $gdb_cv_c_long_long = yes; then
4337 cat >> confdefs.h <<\EOF
4338 #define CC_HAS_LONG_LONG 1
4339 EOF
4340
4341 fi
4342
4343
4344 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
4345 echo "configure:4346: checking for long long support in printf" >&5
4346 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
4347 echo $ac_n "(cached) $ac_c" 1>&6
4348 else
4349 if test "$cross_compiling" = yes; then
4350 gdb_cv_printf_has_long_long=no
4351 else
4352 cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355
4356 int main () {
4357 char buf[32];
4358 long long l = 0;
4359 l = (l << 16) + 0x0123;
4360 l = (l << 16) + 0x4567;
4361 l = (l << 16) + 0x89ab;
4362 l = (l << 16) + 0xcdef;
4363 sprintf (buf, "0x%016llx", l);
4364 return (strcmp ("0x0123456789abcdef", buf));
4365 }
4366 EOF
4367 if { (eval echo configure:4368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4368 then
4369 gdb_cv_printf_has_long_long=yes
4370 else
4371 echo "configure: failed program was:" >&5
4372 cat conftest.$ac_ext >&5
4373 rm -fr conftest*
4374 gdb_cv_printf_has_long_long=no
4375 fi
4376 rm -fr conftest*
4377 fi
4378
4379 fi
4380
4381 if test $gdb_cv_printf_has_long_long = yes; then
4382 cat >> confdefs.h <<\EOF
4383 #define PRINTF_HAS_LONG_LONG 1
4384 EOF
4385
4386 fi
4387 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
4388
4389
4390 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
4391 echo "configure:4392: checking for long double support in compiler" >&5
4392 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
4393 echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398
4399 int main() {
4400 long double foo;
4401 ; return 0; }
4402 EOF
4403 if { (eval echo configure:4404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4404 rm -rf conftest*
4405 ac_cv_c_long_double=yes
4406 else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -rf conftest*
4410 ac_cv_c_long_double=no
4411 fi
4412 rm -f conftest*
4413 fi
4414
4415 echo "$ac_t""$ac_cv_c_long_double" 1>&6
4416 if test $ac_cv_c_long_double = yes; then
4417 cat >> confdefs.h <<\EOF
4418 #define HAVE_LONG_DOUBLE 1
4419 EOF
4420
4421 fi
4422
4423
4424 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
4425 echo "configure:4426: checking for long double support in printf" >&5
4426 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
4427 echo $ac_n "(cached) $ac_c" 1>&6
4428 else
4429 if test "$cross_compiling" = yes; then
4430 gdb_cv_printf_has_long_double=no
4431 else
4432 cat > conftest.$ac_ext <<EOF
4433 #line 4434 "configure"
4434 #include "confdefs.h"
4435
4436 int main () {
4437 char buf[16];
4438 long double f = 3.141592653;
4439 sprintf (buf, "%Lg", f);
4440 return (strncmp ("3.14159", buf, 7));
4441 }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4444 then
4445 gdb_cv_printf_has_long_double=yes
4446 else
4447 echo "configure: failed program was:" >&5
4448 cat conftest.$ac_ext >&5
4449 rm -fr conftest*
4450 gdb_cv_printf_has_long_double=no
4451 fi
4452 rm -fr conftest*
4453 fi
4454
4455 fi
4456
4457 if test $gdb_cv_printf_has_long_double = yes; then
4458 cat >> confdefs.h <<\EOF
4459 #define PRINTF_HAS_LONG_DOUBLE 1
4460 EOF
4461
4462 fi
4463 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
4464
4465
4466 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
4467 echo "configure:4468: checking for long double support in scanf" >&5
4468 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
4469 echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471 if test "$cross_compiling" = yes; then
4472 gdb_cv_scanf_has_long_double=no
4473 else
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477
4478 int main () {
4479 char *buf = "3.141592653";
4480 long double f = 0;
4481 sscanf (buf, "%Lg", &f);
4482 return !(f > 3.14159 && f < 3.14160);
4483 }
4484 EOF
4485 if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4486 then
4487 gdb_cv_scanf_has_long_double=yes
4488 else
4489 echo "configure: failed program was:" >&5
4490 cat conftest.$ac_ext >&5
4491 rm -fr conftest*
4492 gdb_cv_scanf_has_long_double=no
4493 fi
4494 rm -fr conftest*
4495 fi
4496
4497 fi
4498
4499 if test $gdb_cv_scanf_has_long_double = yes; then
4500 cat >> confdefs.h <<\EOF
4501 #define SCANF_HAS_LONG_DOUBLE 1
4502 EOF
4503
4504 fi
4505 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
4506
4507 for ac_hdr in unistd.h
4508 do
4509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4511 echo "configure:4512: checking for $ac_hdr" >&5
4512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515 cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518 #include <$ac_hdr>
4519 EOF
4520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4521 { (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4523 if test -z "$ac_err"; then
4524 rm -rf conftest*
4525 eval "ac_cv_header_$ac_safe=yes"
4526 else
4527 echo "$ac_err" >&5
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 rm -rf conftest*
4531 eval "ac_cv_header_$ac_safe=no"
4532 fi
4533 rm -f conftest*
4534 fi
4535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4536 echo "$ac_t""yes" 1>&6
4537 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4538 cat >> confdefs.h <<EOF
4539 #define $ac_tr_hdr 1
4540 EOF
4541
4542 else
4543 echo "$ac_t""no" 1>&6
4544 fi
4545 done
4546
4547 for ac_func in getpagesize
4548 do
4549 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4550 echo "configure:4551: checking for $ac_func" >&5
4551 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4552 echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 /* System header to define __stub macros and hopefully few prototypes,
4558 which can conflict with char $ac_func(); below. */
4559 #include <assert.h>
4560 /* Override any gcc2 internal prototype to avoid an error. */
4561 /* We use char because int might match the return type of a gcc2
4562 builtin and then its argument prototype would still apply. */
4563 char $ac_func();
4564
4565 int main() {
4566
4567 /* The GNU C library defines this for functions which it implements
4568 to always fail with ENOSYS. Some functions are actually named
4569 something starting with __ and the normal name is an alias. */
4570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4571 choke me
4572 #else
4573 $ac_func();
4574 #endif
4575
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579 rm -rf conftest*
4580 eval "ac_cv_func_$ac_func=yes"
4581 else
4582 echo "configure: failed program was:" >&5
4583 cat conftest.$ac_ext >&5
4584 rm -rf conftest*
4585 eval "ac_cv_func_$ac_func=no"
4586 fi
4587 rm -f conftest*
4588 fi
4589
4590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4591 echo "$ac_t""yes" 1>&6
4592 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4593 cat >> confdefs.h <<EOF
4594 #define $ac_tr_func 1
4595 EOF
4596
4597 else
4598 echo "$ac_t""no" 1>&6
4599 fi
4600 done
4601
4602 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4603 echo "configure:4604: checking for working mmap" >&5
4604 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4605 echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607 if test "$cross_compiling" = yes; then
4608 ac_cv_func_mmap_fixed_mapped=no
4609 else
4610 cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613
4614 /* Thanks to Mike Haertel and Jim Avera for this test.
4615 Here is a matrix of mmap possibilities:
4616 mmap private not fixed
4617 mmap private fixed at somewhere currently unmapped
4618 mmap private fixed at somewhere already mapped
4619 mmap shared not fixed
4620 mmap shared fixed at somewhere currently unmapped
4621 mmap shared fixed at somewhere already mapped
4622 For private mappings, we should verify that changes cannot be read()
4623 back from the file, nor mmap's back from the file at a different
4624 address. (There have been systems where private was not correctly
4625 implemented like the infamous i386 svr4.0, and systems where the
4626 VM page cache was not coherent with the filesystem buffer cache
4627 like early versions of FreeBSD and possibly contemporary NetBSD.)
4628 For shared mappings, we should conversely verify that changes get
4629 propogated back to all the places they're supposed to be.
4630
4631 Grep wants private fixed already mapped.
4632 The main things grep needs to know about mmap are:
4633 * does it exist and is it safe to write into the mmap'd area
4634 * how to use it (BSD variants) */
4635 #include <sys/types.h>
4636 #include <fcntl.h>
4637 #include <sys/mman.h>
4638
4639 /* This mess was copied from the GNU getpagesize.h. */
4640 #ifndef HAVE_GETPAGESIZE
4641 # ifdef HAVE_UNISTD_H
4642 # include <unistd.h>
4643 # endif
4644
4645 /* Assume that all systems that can run configure have sys/param.h. */
4646 # ifndef HAVE_SYS_PARAM_H
4647 # define HAVE_SYS_PARAM_H 1
4648 # endif
4649
4650 # ifdef _SC_PAGESIZE
4651 # define getpagesize() sysconf(_SC_PAGESIZE)
4652 # else /* no _SC_PAGESIZE */
4653 # ifdef HAVE_SYS_PARAM_H
4654 # include <sys/param.h>
4655 # ifdef EXEC_PAGESIZE
4656 # define getpagesize() EXEC_PAGESIZE
4657 # else /* no EXEC_PAGESIZE */
4658 # ifdef NBPG
4659 # define getpagesize() NBPG * CLSIZE
4660 # ifndef CLSIZE
4661 # define CLSIZE 1
4662 # endif /* no CLSIZE */
4663 # else /* no NBPG */
4664 # ifdef NBPC
4665 # define getpagesize() NBPC
4666 # else /* no NBPC */
4667 # ifdef PAGESIZE
4668 # define getpagesize() PAGESIZE
4669 # endif /* PAGESIZE */
4670 # endif /* no NBPC */
4671 # endif /* no NBPG */
4672 # endif /* no EXEC_PAGESIZE */
4673 # else /* no HAVE_SYS_PARAM_H */
4674 # define getpagesize() 8192 /* punt totally */
4675 # endif /* no HAVE_SYS_PARAM_H */
4676 # endif /* no _SC_PAGESIZE */
4677
4678 #endif /* no HAVE_GETPAGESIZE */
4679
4680 #ifdef __cplusplus
4681 extern "C" { void *malloc(unsigned); }
4682 #else
4683 char *malloc();
4684 #endif
4685
4686 int
4687 main()
4688 {
4689 char *data, *data2, *data3;
4690 int i, pagesize;
4691 int fd;
4692
4693 pagesize = getpagesize();
4694
4695 /*
4696 * First, make a file with some known garbage in it.
4697 */
4698 data = malloc(pagesize);
4699 if (!data)
4700 exit(1);
4701 for (i = 0; i < pagesize; ++i)
4702 *(data + i) = rand();
4703 umask(0);
4704 fd = creat("conftestmmap", 0600);
4705 if (fd < 0)
4706 exit(1);
4707 if (write(fd, data, pagesize) != pagesize)
4708 exit(1);
4709 close(fd);
4710
4711 /*
4712 * Next, try to mmap the file at a fixed address which
4713 * already has something else allocated at it. If we can,
4714 * also make sure that we see the same garbage.
4715 */
4716 fd = open("conftestmmap", O_RDWR);
4717 if (fd < 0)
4718 exit(1);
4719 data2 = malloc(2 * pagesize);
4720 if (!data2)
4721 exit(1);
4722 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4723 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4724 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4725 exit(1);
4726 for (i = 0; i < pagesize; ++i)
4727 if (*(data + i) != *(data2 + i))
4728 exit(1);
4729
4730 /*
4731 * Finally, make sure that changes to the mapped area
4732 * do not percolate back to the file as seen by read().
4733 * (This is a bug on some variants of i386 svr4.0.)
4734 */
4735 for (i = 0; i < pagesize; ++i)
4736 *(data2 + i) = *(data2 + i) + 1;
4737 data3 = malloc(pagesize);
4738 if (!data3)
4739 exit(1);
4740 if (read(fd, data3, pagesize) != pagesize)
4741 exit(1);
4742 for (i = 0; i < pagesize; ++i)
4743 if (*(data + i) != *(data3 + i))
4744 exit(1);
4745 close(fd);
4746 unlink("conftestmmap");
4747 exit(0);
4748 }
4749
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4752 then
4753 ac_cv_func_mmap_fixed_mapped=yes
4754 else
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -fr conftest*
4758 ac_cv_func_mmap_fixed_mapped=no
4759 fi
4760 rm -fr conftest*
4761 fi
4762
4763 fi
4764
4765 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4766 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4767 cat >> confdefs.h <<\EOF
4768 #define HAVE_MMAP 1
4769 EOF
4770
4771 fi
4772
4773
4774
4775
4776 if test ${build} = ${host} -a ${host} = ${target} ; then
4777 case ${host_os} in
4778 hpux*)
4779 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4780 echo "configure:4781: checking for HPUX/OSF thread support" >&5
4781 if test -f /usr/include/dce/cma_config.h ; then
4782 if test "$GCC" = "yes" ; then
4783 echo "$ac_t""yes" 1>&6
4784 cat >> confdefs.h <<\EOF
4785 #define HAVE_HPUX_THREAD_SUPPORT 1
4786 EOF
4787
4788 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
4789 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4790 else
4791 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4792 fi
4793 else
4794 echo "$ac_t""no" 1>&6
4795 fi
4796 ;;
4797 solaris*)
4798 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4799 echo "configure:4800: checking for Solaris thread debugging library" >&5
4800 if test -f /usr/lib/libthread_db.so.1 ; then
4801 echo "$ac_t""yes" 1>&6
4802 cat >> confdefs.h <<\EOF
4803 #define HAVE_THREAD_DB_LIB 1
4804 EOF
4805
4806 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
4807 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4808 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4809 echo "configure:4810: checking for dlopen in -ldl" >&5
4810 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4812 echo $ac_n "(cached) $ac_c" 1>&6
4813 else
4814 ac_save_LIBS="$LIBS"
4815 LIBS="-ldl $LIBS"
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819 /* Override any gcc2 internal prototype to avoid an error. */
4820 /* We use char because int might match the return type of a gcc2
4821 builtin and then its argument prototype would still apply. */
4822 char dlopen();
4823
4824 int main() {
4825 dlopen()
4826 ; return 0; }
4827 EOF
4828 if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4829 rm -rf conftest*
4830 eval "ac_cv_lib_$ac_lib_var=yes"
4831 else
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 rm -rf conftest*
4835 eval "ac_cv_lib_$ac_lib_var=no"
4836 fi
4837 rm -f conftest*
4838 LIBS="$ac_save_LIBS"
4839
4840 fi
4841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4842 echo "$ac_t""yes" 1>&6
4843 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4844 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4845 cat >> confdefs.h <<EOF
4846 #define $ac_tr_lib 1
4847 EOF
4848
4849 LIBS="-ldl $LIBS"
4850
4851 else
4852 echo "$ac_t""no" 1>&6
4853 fi
4854
4855 if test "$GCC" = "yes" ; then
4856 # The GNU linker requires the -export-dynamic option to make
4857 # all symbols visible in the dynamic symbol table.
4858 hold_ldflags=$LDFLAGS
4859 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4860 echo "configure:4861: checking for the ld -export-dynamic flag" >&5
4861 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865
4866 int main() {
4867 int i;
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4871 rm -rf conftest*
4872 found=yes
4873 else
4874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
4876 rm -rf conftest*
4877 found=no
4878 fi
4879 rm -f conftest*
4880 LDFLAGS=$hold_ldflags
4881 echo "$ac_t""$found" 1>&6
4882 if test $found = yes; then
4883 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
4884 fi
4885 fi
4886 # Sun randomly tweaked the prototypes in <proc_service.h>
4887 # at one point.
4888 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
4889 echo "configure:4890: checking if <proc_service.h> is old" >&5
4890 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
4891 echo $ac_n "(cached) $ac_c" 1>&6
4892 else
4893
4894 cat > conftest.$ac_ext <<EOF
4895 #line 4896 "configure"
4896 #include "confdefs.h"
4897
4898 #include <proc_service.h>
4899 ps_err_e ps_pdwrite
4900 (struct ps_prochandle*, psaddr_t, const void*, size_t);
4901
4902 int main() {
4903
4904 ; return 0; }
4905 EOF
4906 if { (eval echo configure:4907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4907 rm -rf conftest*
4908 gdb_cv_proc_service_is_old=no
4909 else
4910 echo "configure: failed program was:" >&5
4911 cat conftest.$ac_ext >&5
4912 rm -rf conftest*
4913 gdb_cv_proc_service_is_old=yes
4914 fi
4915 rm -f conftest*
4916
4917 fi
4918
4919 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
4920 if test $gdb_cv_proc_service_is_old = yes; then
4921 cat >> confdefs.h <<\EOF
4922 #define PROC_SERVICE_IS_OLD 1
4923 EOF
4924
4925 fi
4926 else
4927 echo "$ac_t""no" 1>&6
4928 fi
4929 ;;
4930 esac
4931
4932 fi
4933
4934 ENABLE_CFLAGS=
4935
4936 # Check whether --enable-tui or --disable-tui was given.
4937 if test "${enable_tui+set}" = set; then
4938 enableval="$enable_tui"
4939
4940 case "${enable_tui}" in
4941 yes | no) ;;
4942 "") enable_tui=yes ;;
4943 *)
4944 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
4945 ;;
4946 esac
4947
4948 fi
4949
4950 case ${enable_tui} in
4951 "yes" )
4952 cat >> confdefs.h <<\EOF
4953 #define TUI 1
4954 EOF
4955
4956 BUILD_TUI=all-tui
4957 TUI_LIBRARY=tui/libtui.a
4958 ;;
4959 * )
4960 BUILD_TUI=
4961 TUI_LIBRARY=
4962 ;;
4963 esac
4964
4965
4966
4967 # Check whether --enable-netrom or --disable-netrom was given.
4968 if test "${enable_netrom+set}" = set; then
4969 enableval="$enable_netrom"
4970 case "${enableval}" in
4971 yes) enable_netrom=yes ;;
4972 no) enable_netrom=no ;;
4973 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
4974 esac
4975 fi
4976
4977
4978 if test "${enable_netrom}" = "yes"; then
4979 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
4980 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
4981 fi
4982
4983 # Check whether --enable-build-warnings or --disable-build-warnings was given.
4984 if test "${enable_build_warnings+set}" = set; then
4985 enableval="$enable_build_warnings"
4986 build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
4987 case "${enableval}" in
4988 yes) ;;
4989 no) build_warnings="-w";;
4990 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4991 build_warnings="${build_warnings} ${t}";;
4992 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4993 build_warnings="${t} ${build_warnings}";;
4994 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
4995 esac
4996 else
4997 build_warnings=""
4998 fi
4999
5000 if test "x${build_warnings}" != x -a "x$GCC" = xyes
5001 then
5002 WARN_CFLAGS="${build_warnings}"
5003 else
5004 WARN_CFLAGS=""
5005 fi
5006
5007
5008 MMALLOC_CFLAGS=
5009 MMALLOC=
5010
5011
5012
5013 # Check whether --with-mmalloc or --without-mmalloc was given.
5014 if test "${with_mmalloc+set}" = set; then
5015 withval="$with_mmalloc"
5016 case "${withval}" in
5017 yes) want_mmalloc=true ;;
5018 no) want_mmalloc=false;;
5019 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
5020 esac
5021 else
5022 want_mmalloc=false
5023 fi
5024
5025 if test x$want_mmalloc = xtrue; then
5026 cat >> confdefs.h <<\EOF
5027 #define USE_MMALLOC 1
5028 EOF
5029
5030 cat >> confdefs.h <<\EOF
5031 #define MMCHECK_FORCE 1
5032 EOF
5033
5034 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
5035 MMALLOC='../mmalloc/libmmalloc.a'
5036 fi
5037
5038
5039 # In the Cygwin environment, we need some additional flags.
5040 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
5041 echo "configure:5165: checking for cygwin" >&5
5042 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
5043 echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045 cat > conftest.$ac_ext <<EOF
5046 #line 5170 "configure"
5047 #include "confdefs.h"
5048
5049 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
5050 lose
5051 #endif
5052 EOF
5053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5054 egrep "lose" >/dev/null 2>&1; then
5055 rm -rf conftest*
5056 gdb_cv_os_cygwin=yes
5057 else
5058 rm -rf conftest*
5059 gdb_cv_os_cygwin=no
5060 fi
5061 rm -f conftest*
5062
5063 fi
5064
5065 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
5066
5067 DLLTOOL=${DLLTOOL-dlltool}
5068 WINDRES=${WINDRES-windres}
5069
5070
5071
5072 if test x$gdb_cv_os_cygwin = xyes; then
5073 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
5074 else
5075 TERM_LIB=
5076 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
5077 echo "configure:5201: checking for tgetent in -lncurses" >&5
5078 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
5079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5080 echo $ac_n "(cached) $ac_c" 1>&6
5081 else
5082 ac_save_LIBS="$LIBS"
5083 LIBS="-lncurses $LIBS"
5084 cat > conftest.$ac_ext <<EOF
5085 #line 5209 "configure"
5086 #include "confdefs.h"
5087 /* Override any gcc2 internal prototype to avoid an error. */
5088 /* We use char because int might match the return type of a gcc2
5089 builtin and then its argument prototype would still apply. */
5090 char tgetent();
5091
5092 int main() {
5093 tgetent()
5094 ; return 0; }
5095 EOF
5096 if { (eval echo configure:5220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5097 rm -rf conftest*
5098 eval "ac_cv_lib_$ac_lib_var=yes"
5099 else
5100 echo "configure: failed program was:" >&5
5101 cat conftest.$ac_ext >&5
5102 rm -rf conftest*
5103 eval "ac_cv_lib_$ac_lib_var=no"
5104 fi
5105 rm -f conftest*
5106 LIBS="$ac_save_LIBS"
5107
5108 fi
5109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5110 echo "$ac_t""yes" 1>&6
5111 TERM_LIB=-lncurses
5112 else
5113 echo "$ac_t""no" 1>&6
5114 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
5115 echo "configure:5239: checking for tgetent in -lHcurses" >&5
5116 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
5117 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5118 echo $ac_n "(cached) $ac_c" 1>&6
5119 else
5120 ac_save_LIBS="$LIBS"
5121 LIBS="-lHcurses $LIBS"
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5247 "configure"
5124 #include "confdefs.h"
5125 /* Override any gcc2 internal prototype to avoid an error. */
5126 /* We use char because int might match the return type of a gcc2
5127 builtin and then its argument prototype would still apply. */
5128 char tgetent();
5129
5130 int main() {
5131 tgetent()
5132 ; return 0; }
5133 EOF
5134 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5135 rm -rf conftest*
5136 eval "ac_cv_lib_$ac_lib_var=yes"
5137 else
5138 echo "configure: failed program was:" >&5
5139 cat conftest.$ac_ext >&5
5140 rm -rf conftest*
5141 eval "ac_cv_lib_$ac_lib_var=no"
5142 fi
5143 rm -f conftest*
5144 LIBS="$ac_save_LIBS"
5145
5146 fi
5147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5148 echo "$ac_t""yes" 1>&6
5149 TERM_LIB=-lHcurses
5150 else
5151 echo "$ac_t""no" 1>&6
5152 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
5153 echo "configure:5277: checking for tgetent in -ltermlib" >&5
5154 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
5155 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5156 echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158 ac_save_LIBS="$LIBS"
5159 LIBS="-ltermlib $LIBS"
5160 cat > conftest.$ac_ext <<EOF
5161 #line 5285 "configure"
5162 #include "confdefs.h"
5163 /* Override any gcc2 internal prototype to avoid an error. */
5164 /* We use char because int might match the return type of a gcc2
5165 builtin and then its argument prototype would still apply. */
5166 char tgetent();
5167
5168 int main() {
5169 tgetent()
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5173 rm -rf conftest*
5174 eval "ac_cv_lib_$ac_lib_var=yes"
5175 else
5176 echo "configure: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5178 rm -rf conftest*
5179 eval "ac_cv_lib_$ac_lib_var=no"
5180 fi
5181 rm -f conftest*
5182 LIBS="$ac_save_LIBS"
5183
5184 fi
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5186 echo "$ac_t""yes" 1>&6
5187 TERM_LIB=-ltermlib
5188 else
5189 echo "$ac_t""no" 1>&6
5190 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
5191 echo "configure:5315: checking for tgetent in -ltermcap" >&5
5192 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
5193 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5194 echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196 ac_save_LIBS="$LIBS"
5197 LIBS="-ltermcap $LIBS"
5198 cat > conftest.$ac_ext <<EOF
5199 #line 5323 "configure"
5200 #include "confdefs.h"
5201 /* Override any gcc2 internal prototype to avoid an error. */
5202 /* We use char because int might match the return type of a gcc2
5203 builtin and then its argument prototype would still apply. */
5204 char tgetent();
5205
5206 int main() {
5207 tgetent()
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211 rm -rf conftest*
5212 eval "ac_cv_lib_$ac_lib_var=yes"
5213 else
5214 echo "configure: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216 rm -rf conftest*
5217 eval "ac_cv_lib_$ac_lib_var=no"
5218 fi
5219 rm -f conftest*
5220 LIBS="$ac_save_LIBS"
5221
5222 fi
5223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5224 echo "$ac_t""yes" 1>&6
5225 TERM_LIB=-ltermcap
5226 else
5227 echo "$ac_t""no" 1>&6
5228 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
5229 echo "configure:5353: checking for tgetent in -lcurses" >&5
5230 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
5231 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5232 echo $ac_n "(cached) $ac_c" 1>&6
5233 else
5234 ac_save_LIBS="$LIBS"
5235 LIBS="-lcurses $LIBS"
5236 cat > conftest.$ac_ext <<EOF
5237 #line 5361 "configure"
5238 #include "confdefs.h"
5239 /* Override any gcc2 internal prototype to avoid an error. */
5240 /* We use char because int might match the return type of a gcc2
5241 builtin and then its argument prototype would still apply. */
5242 char tgetent();
5243
5244 int main() {
5245 tgetent()
5246 ; return 0; }
5247 EOF
5248 if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5249 rm -rf conftest*
5250 eval "ac_cv_lib_$ac_lib_var=yes"
5251 else
5252 echo "configure: failed program was:" >&5
5253 cat conftest.$ac_ext >&5
5254 rm -rf conftest*
5255 eval "ac_cv_lib_$ac_lib_var=no"
5256 fi
5257 rm -f conftest*
5258 LIBS="$ac_save_LIBS"
5259
5260 fi
5261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5262 echo "$ac_t""yes" 1>&6
5263 TERM_LIB=-lcurses
5264 else
5265 echo "$ac_t""no" 1>&6
5266 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
5267 echo "configure:5391: checking for tgetent in -lterminfo" >&5
5268 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
5269 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5270 echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272 ac_save_LIBS="$LIBS"
5273 LIBS="-lterminfo $LIBS"
5274 cat > conftest.$ac_ext <<EOF
5275 #line 5399 "configure"
5276 #include "confdefs.h"
5277 /* Override any gcc2 internal prototype to avoid an error. */
5278 /* We use char because int might match the return type of a gcc2
5279 builtin and then its argument prototype would still apply. */
5280 char tgetent();
5281
5282 int main() {
5283 tgetent()
5284 ; return 0; }
5285 EOF
5286 if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5287 rm -rf conftest*
5288 eval "ac_cv_lib_$ac_lib_var=yes"
5289 else
5290 echo "configure: failed program was:" >&5
5291 cat conftest.$ac_ext >&5
5292 rm -rf conftest*
5293 eval "ac_cv_lib_$ac_lib_var=no"
5294 fi
5295 rm -f conftest*
5296 LIBS="$ac_save_LIBS"
5297
5298 fi
5299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5300 echo "$ac_t""yes" 1>&6
5301 TERM_LIB=-lterminfo
5302 else
5303 echo "$ac_t""no" 1>&6
5304 fi
5305
5306 fi
5307
5308 fi
5309
5310 fi
5311
5312 fi
5313
5314 fi
5315
5316
5317 if test "x$TERM_LIB" = x
5318 then
5319 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
5320 fi
5321 fi
5322
5323
5324
5325
5326
5327 # If we find X, set shell vars x_includes and x_libraries to the
5328 # paths, otherwise set no_x=yes.
5329 # Uses ac_ vars as temps to allow command line to override cache and checks.
5330 # --without-x overrides everything else, but does not touch the cache.
5331 echo $ac_n "checking for X""... $ac_c" 1>&6
5332 echo "configure:6542: checking for X" >&5
5333
5334 # Check whether --with-x or --without-x was given.
5335 if test "${with_x+set}" = set; then
5336 withval="$with_x"
5337 :
5338 fi
5339
5340 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5341 if test "x$with_x" = xno; then
5342 # The user explicitly disabled X.
5343 have_x=disabled
5344 else
5345 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5346 # Both variables are already set.
5347 have_x=yes
5348 else
5349 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5350 echo $ac_n "(cached) $ac_c" 1>&6
5351 else
5352 # One or both of the vars are not set, and there is no cached value.
5353 ac_x_includes=NO ac_x_libraries=NO
5354 rm -fr conftestdir
5355 if mkdir conftestdir; then
5356 cd conftestdir
5357 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5358 cat > Imakefile <<'EOF'
5359 acfindx:
5360 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5361 EOF
5362 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5363 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5364 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5365 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5366 for ac_extension in a so sl; do
5367 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5368 test -f $ac_im_libdir/libX11.$ac_extension; then
5369 ac_im_usrlibdir=$ac_im_libdir; break
5370 fi
5371 done
5372 # Screen out bogus values from the imake configuration. They are
5373 # bogus both because they are the default anyway, and because
5374 # using them would break gcc on systems where it needs fixed includes.
5375 case "$ac_im_incroot" in
5376 /usr/include) ;;
5377 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5378 esac
5379 case "$ac_im_usrlibdir" in
5380 /usr/lib | /lib) ;;
5381 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5382 esac
5383 fi
5384 cd ..
5385 rm -fr conftestdir
5386 fi
5387
5388 if test "$ac_x_includes" = NO; then
5389 # Guess where to find include files, by looking for this one X11 .h file.
5390 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5391
5392 # First, try using that file with no special directory specified.
5393 cat > conftest.$ac_ext <<EOF
5394 #line 6604 "configure"
5395 #include "confdefs.h"
5396 #include <$x_direct_test_include>
5397 EOF
5398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5399 { (eval echo configure:6609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5401 if test -z "$ac_err"; then
5402 rm -rf conftest*
5403 # We can compile using X headers with no special include directory.
5404 ac_x_includes=
5405 else
5406 echo "$ac_err" >&5
5407 echo "configure: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5409 rm -rf conftest*
5410 # Look for the header file in a standard set of common directories.
5411 # Check X11 before X11Rn because it is often a symlink to the current release.
5412 for ac_dir in \
5413 /usr/X11/include \
5414 /usr/X11R6/include \
5415 /usr/X11R5/include \
5416 /usr/X11R4/include \
5417 \
5418 /usr/include/X11 \
5419 /usr/include/X11R6 \
5420 /usr/include/X11R5 \
5421 /usr/include/X11R4 \
5422 \
5423 /usr/local/X11/include \
5424 /usr/local/X11R6/include \
5425 /usr/local/X11R5/include \
5426 /usr/local/X11R4/include \
5427 \
5428 /usr/local/include/X11 \
5429 /usr/local/include/X11R6 \
5430 /usr/local/include/X11R5 \
5431 /usr/local/include/X11R4 \
5432 \
5433 /usr/X386/include \
5434 /usr/x386/include \
5435 /usr/XFree86/include/X11 \
5436 \
5437 /usr/include \
5438 /usr/local/include \
5439 /usr/unsupported/include \
5440 /usr/athena/include \
5441 /usr/local/x11r5/include \
5442 /usr/lpp/Xamples/include \
5443 \
5444 /usr/openwin/include \
5445 /usr/openwin/share/include \
5446 ; \
5447 do
5448 if test -r "$ac_dir/$x_direct_test_include"; then
5449 ac_x_includes=$ac_dir
5450 break
5451 fi
5452 done
5453 fi
5454 rm -f conftest*
5455 fi # $ac_x_includes = NO
5456
5457 if test "$ac_x_libraries" = NO; then
5458 # Check for the libraries.
5459
5460 test -z "$x_direct_test_library" && x_direct_test_library=Xt
5461 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5462
5463 # See if we find them without any special options.
5464 # Don't add to $LIBS permanently.
5465 ac_save_LIBS="$LIBS"
5466 LIBS="-l$x_direct_test_library $LIBS"
5467 cat > conftest.$ac_ext <<EOF
5468 #line 6678 "configure"
5469 #include "confdefs.h"
5470
5471 int main() {
5472 ${x_direct_test_function}()
5473 ; return 0; }
5474 EOF
5475 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5476 rm -rf conftest*
5477 LIBS="$ac_save_LIBS"
5478 # We can link X programs with no special library path.
5479 ac_x_libraries=
5480 else
5481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5483 rm -rf conftest*
5484 LIBS="$ac_save_LIBS"
5485 # First see if replacing the include by lib works.
5486 # Check X11 before X11Rn because it is often a symlink to the current release.
5487 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5488 /usr/X11/lib \
5489 /usr/X11R6/lib \
5490 /usr/X11R5/lib \
5491 /usr/X11R4/lib \
5492 \
5493 /usr/lib/X11 \
5494 /usr/lib/X11R6 \
5495 /usr/lib/X11R5 \
5496 /usr/lib/X11R4 \
5497 \
5498 /usr/local/X11/lib \
5499 /usr/local/X11R6/lib \
5500 /usr/local/X11R5/lib \
5501 /usr/local/X11R4/lib \
5502 \
5503 /usr/local/lib/X11 \
5504 /usr/local/lib/X11R6 \
5505 /usr/local/lib/X11R5 \
5506 /usr/local/lib/X11R4 \
5507 \
5508 /usr/X386/lib \
5509 /usr/x386/lib \
5510 /usr/XFree86/lib/X11 \
5511 \
5512 /usr/lib \
5513 /usr/local/lib \
5514 /usr/unsupported/lib \
5515 /usr/athena/lib \
5516 /usr/local/x11r5/lib \
5517 /usr/lpp/Xamples/lib \
5518 /lib/usr/lib/X11 \
5519 \
5520 /usr/openwin/lib \
5521 /usr/openwin/share/lib \
5522 ; \
5523 do
5524 for ac_extension in a so sl; do
5525 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5526 ac_x_libraries=$ac_dir
5527 break 2
5528 fi
5529 done
5530 done
5531 fi
5532 rm -f conftest*
5533 fi # $ac_x_libraries = NO
5534
5535 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5536 # Didn't find X anywhere. Cache the known absence of X.
5537 ac_cv_have_x="have_x=no"
5538 else
5539 # Record where we found X for the cache.
5540 ac_cv_have_x="have_x=yes \
5541 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5542 fi
5543 fi
5544 fi
5545 eval "$ac_cv_have_x"
5546 fi # $with_x != no
5547
5548 if test "$have_x" != yes; then
5549 echo "$ac_t""$have_x" 1>&6
5550 no_x=yes
5551 else
5552 # If each of the values was on the command line, it overrides each guess.
5553 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5554 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5555 # Update the cache value to reflect the command line values.
5556 ac_cv_have_x="have_x=yes \
5557 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5558 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5559 fi
5560
5561
5562
5563 # Unlike the sim directory, whether a simulator is linked is controlled by
5564 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
5565 # This code just checks for a few cases where we'd like to ignore those
5566 # definitions, even when they're present in the '.mt' file. These cases
5567 # are when --disable-sim is specified, or if the simulator directory is
5568 # not part of the soruce tree.
5569 #
5570 # Check whether --enable-sim or --disable-sim was given.
5571 if test "${enable_sim+set}" = set; then
5572 enableval="$enable_sim"
5573 echo "enable_sim = $enable_sim";
5574 echo "enableval = ${enableval}";
5575 case "${enableval}" in
5576 yes) ignore_sim=false ;;
5577 no) ignore_sim=true ;;
5578 *) ignore_sim=false ;;
5579 esac
5580 else
5581 ignore_sim=false
5582 fi
5583
5584
5585 if test ! -d "${srcdir}/../sim"; then
5586 ignore_sim=true
5587 fi
5588
5589 if test "${ignore_sim}" = "true"; then
5590 IGNORE_SIM="SIM="
5591 IGNORE_SIM_OBS="SIM_OBS="
5592 else
5593 IGNORE_SIM=""
5594 IGNORE_SIM_OBS=""
5595 cat >> confdefs.h <<\EOF
5596 #define WITH_SIM 1
5597 EOF
5598
5599 fi
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609 # Begin stuff to support --enable-shared
5610 # Check whether --enable-shared or --disable-shared was given.
5611 if test "${enable_shared+set}" = set; then
5612 enableval="$enable_shared"
5613 case "${enableval}" in
5614 yes) shared=true ;;
5615 no) shared=false ;;
5616 *) shared=true ;;
5617 esac
5618 fi
5619
5620 HLDFLAGS=
5621 HLDENV=
5622 # If we have shared libraries, try to set rpath reasonably.
5623 if test "${shared}" = "true"; then
5624 case "${host}" in
5625 *-*-hpux*)
5626 HLDFLAGS='-Wl,+s,+b,$(libdir)'
5627 ;;
5628 *-*-irix5* | *-*-irix6*)
5629 HLDFLAGS='-Wl,-rpath,$(libdir)'
5630 ;;
5631 *-*-linux*aout*)
5632 ;;
5633 *-*-linux* | *-pc-linux-gnu)
5634 HLDFLAGS='-Wl,-rpath,$(libdir)'
5635 ;;
5636 *-*-solaris*)
5637 HLDFLAGS='-R $(libdir)'
5638 ;;
5639 *-*-sysv4*)
5640 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
5641 ;;
5642 esac
5643 fi
5644
5645 # On SunOS, if the linker supports the -rpath option, use it to
5646 # prevent ../bfd and ../opcodes from being included in the run time
5647 # search path.
5648 case "${host}" in
5649 *-*-sunos*)
5650 echo 'main () { }' > conftest.c
5651 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
5652 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
5653 :
5654 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
5655 :
5656 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
5657 :
5658 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
5659 :
5660 elif test "${shared}" = "true"; then
5661 HLDFLAGS='-Wl,-rpath=$(libdir)'
5662 else
5663 HLDFLAGS='-Wl,-rpath='
5664 fi
5665 rm -f conftest.t conftest.c conftest
5666 ;;
5667 esac
5668
5669
5670 # End stuff to support --enable-shared
5671
5672 # target_subdir is used by the testsuite to find the target libraries.
5673 target_subdir=
5674 if test "${host}" != "${target}"; then
5675 target_subdir="${target_alias}/"
5676 fi
5677
5678
5679 frags=
5680 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
5681 if test ! -f ${host_makefile_frag}; then
5682 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
5683 fi
5684 frags="$frags $host_makefile_frag"
5685
5686 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
5687 if test ! -f ${target_makefile_frag}; then
5688 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
5689 fi
5690 frags="$frags $target_makefile_frag"
5691
5692
5693
5694
5695
5696 hostfile=`sed -n '
5697 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5698 ' ${host_makefile_frag}`
5699
5700 targetfile=`sed -n '
5701 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5702 ' ${target_makefile_frag}`
5703
5704 # these really aren't orthogonal true/false values of the same condition,
5705 # but shells are slow enough that I like to reuse the test conditions
5706 # whenever possible
5707 if test "${target}" = "${host}"; then
5708 nativefile=`sed -n '
5709 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
5710 ' ${host_makefile_frag}`
5711 # else
5712 # GDBserver is only useful in a "native" enviroment
5713 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
5714 fi
5715
5716
5717 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5718 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
5719 # corresponding links. But we have to remove the xm.h files and tm.h
5720 # files anyway, e.g. when switching from "configure host" to
5721 # "configure none".
5722
5723 files=
5724 links=
5725 rm -f xm.h
5726 if test "${hostfile}" != ""; then
5727 files="${files} config/${gdb_host_cpu}/${hostfile}"
5728 links="${links} xm.h"
5729 fi
5730 rm -f tm.h
5731 if test "${targetfile}" != ""; then
5732 files="${files} config/${gdb_target_cpu}/${targetfile}"
5733 links="${links} tm.h"
5734 fi
5735 rm -f nm.h
5736 if test "${nativefile}" != ""; then
5737 files="${files} config/${gdb_host_cpu}/${nativefile}"
5738 links="${links} nm.h"
5739 else
5740 # A cross-only configuration.
5741 files="${files} config/nm-empty.h"
5742 links="${links} nm.h"
5743 fi
5744
5745
5746
5747 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
5748 echo "configure:7029: checking for Cygwin environment" >&5
5749 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
5750 echo $ac_n "(cached) $ac_c" 1>&6
5751 else
5752 cat > conftest.$ac_ext <<EOF
5753 #line 7034 "configure"
5754 #include "confdefs.h"
5755
5756 int main() {
5757
5758 #ifndef __CYGWIN__
5759 #define __CYGWIN__ __CYGWIN32__
5760 #endif
5761 return __CYGWIN__;
5762 ; return 0; }
5763 EOF
5764 if { (eval echo configure:7045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5765 rm -rf conftest*
5766 ac_cv_cygwin=yes
5767 else
5768 echo "configure: failed program was:" >&5
5769 cat conftest.$ac_ext >&5
5770 rm -rf conftest*
5771 ac_cv_cygwin=no
5772 fi
5773 rm -f conftest*
5774 rm -f conftest*
5775 fi
5776
5777 echo "$ac_t""$ac_cv_cygwin" 1>&6
5778 CYGWIN=
5779 test "$ac_cv_cygwin" = yes && CYGWIN=yes
5780 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
5781 echo "configure:7062: checking for mingw32 environment" >&5
5782 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
5783 echo $ac_n "(cached) $ac_c" 1>&6
5784 else
5785 cat > conftest.$ac_ext <<EOF
5786 #line 7067 "configure"
5787 #include "confdefs.h"
5788
5789 int main() {
5790 return __MINGW32__;
5791 ; return 0; }
5792 EOF
5793 if { (eval echo configure:7074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5794 rm -rf conftest*
5795 ac_cv_mingw32=yes
5796 else
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5799 rm -rf conftest*
5800 ac_cv_mingw32=no
5801 fi
5802 rm -f conftest*
5803 rm -f conftest*
5804 fi
5805
5806 echo "$ac_t""$ac_cv_mingw32" 1>&6
5807 MINGW32=
5808 test "$ac_cv_mingw32" = yes && MINGW32=yes
5809
5810
5811 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5812 echo "configure:7093: checking for executable suffix" >&5
5813 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5815 else
5816 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
5817 ac_cv_exeext=.exe
5818 else
5819 rm -f conftest*
5820 echo 'int main () { return 0; }' > conftest.$ac_ext
5821 ac_cv_exeext=
5822 if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5823 for file in conftest.*; do
5824 case $file in
5825 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
5826 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
5827 esac
5828 done
5829 else
5830 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
5831 fi
5832 rm -f conftest*
5833 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
5834 fi
5835 fi
5836
5837 EXEEXT=""
5838 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
5839 echo "$ac_t""${ac_cv_exeext}" 1>&6
5840 ac_exeext=$EXEEXT
5841
5842
5843 subdirs="$configdirs"
5844
5845 trap '' 1 2 15
5846 cat > confcache <<\EOF
5847 # This file is a shell script that caches the results of configure
5848 # tests run on this system so they can be shared between configure
5849 # scripts and configure runs. It is not useful on other systems.
5850 # If it contains results you don't want to keep, you may remove or edit it.
5851 #
5852 # By default, configure uses ./config.cache as the cache file,
5853 # creating it if it does not exist already. You can give configure
5854 # the --cache-file=FILE option to use a different cache file; that is
5855 # what configure does when it calls configure scripts in
5856 # subdirectories, so they share the cache.
5857 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5858 # config.status only pays attention to the cache file if you give it the
5859 # --recheck option to rerun configure.
5860 #
5861 EOF
5862 # The following way of writing the cache mishandles newlines in values,
5863 # but we know of no workaround that is simple, portable, and efficient.
5864 # So, don't put newlines in cache variables' values.
5865 # Ultrix sh set writes to stderr and can't be redirected directly,
5866 # and sets the high bit in the cache file unless we assign to the vars.
5867 (set) 2>&1 |
5868 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5869 *ac_space=\ *)
5870 # `set' does not quote correctly, so add quotes (double-quote substitution
5871 # turns \\\\ into \\, and sed turns \\ into \).
5872 sed -n \
5873 -e "s/'/'\\\\''/g" \
5874 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5875 ;;
5876 *)
5877 # `set' quotes correctly as required by POSIX, so do not add quotes.
5878 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5879 ;;
5880 esac >> confcache
5881 if cmp -s $cache_file confcache; then
5882 :
5883 else
5884 if test -w $cache_file; then
5885 echo "updating cache $cache_file"
5886 cat confcache > $cache_file
5887 else
5888 echo "not updating unwritable cache $cache_file"
5889 fi
5890 fi
5891 rm -f confcache
5892
5893 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5894
5895 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5896 # Let make expand exec_prefix.
5897 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5898
5899 # Any assignment to VPATH causes Sun make to only execute
5900 # the first set of double-colon rules, so remove it if not needed.
5901 # If there is a colon in the path, we need to keep it.
5902 if test "x$srcdir" = x.; then
5903 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5904 fi
5905
5906 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5907
5908 DEFS=-DHAVE_CONFIG_H
5909
5910 # Without the "./", some shells look in PATH for config.status.
5911 : ${CONFIG_STATUS=./config.status}
5912
5913 echo creating $CONFIG_STATUS
5914 rm -f $CONFIG_STATUS
5915 cat > $CONFIG_STATUS <<EOF
5916 #! /bin/sh
5917 # Generated automatically by configure.
5918 # Run this file to recreate the current configuration.
5919 # This directory was configured as follows,
5920 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5921 #
5922 # $0 $ac_configure_args
5923 #
5924 # Compiler output produced by configure, useful for debugging
5925 # configure, is in ./config.log if it exists.
5926
5927 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5928 for ac_option
5929 do
5930 case "\$ac_option" in
5931 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5932 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5933 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5934 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5935 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5936 exit 0 ;;
5937 -help | --help | --hel | --he | --h)
5938 echo "\$ac_cs_usage"; exit 0 ;;
5939 *) echo "\$ac_cs_usage"; exit 1 ;;
5940 esac
5941 done
5942
5943 ac_given_srcdir=$srcdir
5944 ac_given_INSTALL="$INSTALL"
5945
5946 trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5947 EOF
5948 cat >> $CONFIG_STATUS <<EOF
5949
5950 # Protect against being on the right side of a sed subst in config.status.
5951 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5952 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5953 $ac_vpsub
5954 $extrasub
5955 s%@SHELL@%$SHELL%g
5956 s%@CFLAGS@%$CFLAGS%g
5957 s%@CPPFLAGS@%$CPPFLAGS%g
5958 s%@CXXFLAGS@%$CXXFLAGS%g
5959 s%@FFLAGS@%$FFLAGS%g
5960 s%@DEFS@%$DEFS%g
5961 s%@LDFLAGS@%$LDFLAGS%g
5962 s%@LIBS@%$LIBS%g
5963 s%@exec_prefix@%$exec_prefix%g
5964 s%@prefix@%$prefix%g
5965 s%@program_transform_name@%$program_transform_name%g
5966 s%@bindir@%$bindir%g
5967 s%@sbindir@%$sbindir%g
5968 s%@libexecdir@%$libexecdir%g
5969 s%@datadir@%$datadir%g
5970 s%@sysconfdir@%$sysconfdir%g
5971 s%@sharedstatedir@%$sharedstatedir%g
5972 s%@localstatedir@%$localstatedir%g
5973 s%@libdir@%$libdir%g
5974 s%@includedir@%$includedir%g
5975 s%@oldincludedir@%$oldincludedir%g
5976 s%@infodir@%$infodir%g
5977 s%@mandir@%$mandir%g
5978 s%@CC@%$CC%g
5979 s%@CPP@%$CPP%g
5980 s%@host@%$host%g
5981 s%@host_alias@%$host_alias%g
5982 s%@host_cpu@%$host_cpu%g
5983 s%@host_vendor@%$host_vendor%g
5984 s%@host_os@%$host_os%g
5985 s%@target@%$target%g
5986 s%@target_alias@%$target_alias%g
5987 s%@target_cpu@%$target_cpu%g
5988 s%@target_vendor@%$target_vendor%g
5989 s%@target_os@%$target_os%g
5990 s%@build@%$build%g
5991 s%@build_alias@%$build_alias%g
5992 s%@build_cpu@%$build_cpu%g
5993 s%@build_vendor@%$build_vendor%g
5994 s%@build_os@%$build_os%g
5995 s%@SET_MAKE@%$SET_MAKE%g
5996 s%@RANLIB@%$RANLIB%g
5997 s%@ALLOCA@%$ALLOCA%g
5998 s%@USE_NLS@%$USE_NLS%g
5999 s%@MSGFMT@%$MSGFMT%g
6000 s%@GMSGFMT@%$GMSGFMT%g
6001 s%@XGETTEXT@%$XGETTEXT%g
6002 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6003 s%@CATALOGS@%$CATALOGS%g
6004 s%@CATOBJEXT@%$CATOBJEXT%g
6005 s%@DATADIRNAME@%$DATADIRNAME%g
6006 s%@GMOFILES@%$GMOFILES%g
6007 s%@INSTOBJEXT@%$INSTOBJEXT%g
6008 s%@INTLDEPS@%$INTLDEPS%g
6009 s%@INTLLIBS@%$INTLLIBS%g
6010 s%@INTLOBJS@%$INTLOBJS%g
6011 s%@POFILES@%$POFILES%g
6012 s%@POSUB@%$POSUB%g
6013 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6014 s%@GT_NO@%$GT_NO%g
6015 s%@GT_YES@%$GT_YES%g
6016 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6017 s%@l@%$l%g
6018 s%@AWK@%$AWK%g
6019 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6020 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6021 s%@INSTALL_DATA@%$INSTALL_DATA%g
6022 s%@AR@%$AR%g
6023 s%@YACC@%$YACC%g
6024 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
6025 s%@BUILD_TUI@%$BUILD_TUI%g
6026 s%@TUI_LIBRARY@%$TUI_LIBRARY%g
6027 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
6028 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
6029 s%@MMALLOC@%$MMALLOC%g
6030 s%@MACHINE_OBS@%$MACHINE_OBS%g
6031 s%@DLLTOOL@%$DLLTOOL%g
6032 s%@WINDRES@%$WINDRES%g
6033 s%@TERM_LIB@%$TERM_LIB%g
6034 s%@ENABLE_IDE@%$ENABLE_IDE%g
6035 s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
6036 s%@LIBGUI@%$LIBGUI%g
6037 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
6038 s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
6039 s%@IDE_X@%$IDE_X%g
6040 s%@LIBIDETCL@%$LIBIDETCL%g
6041 s%@LIBIDE@%$LIBIDE%g
6042 s%@IDE_DEPS@%$IDE_DEPS%g
6043 s%@WIN32LIBS@%$WIN32LIBS%g
6044 s%@WIN32LDAPP@%$WIN32LDAPP%g
6045 s%@TCL_VERSION@%$TCL_VERSION%g
6046 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
6047 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
6048 s%@TCL_CC@%$TCL_CC%g
6049 s%@TCL_DEFS@%$TCL_DEFS%g
6050 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
6051 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6052 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
6053 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
6054 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
6055 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6056 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
6057 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
6058 s%@TCL_RANLIB@%$TCL_RANLIB%g
6059 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6060 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6061 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
6062 s%@TK_VERSION@%$TK_VERSION%g
6063 s%@TK_DEFS@%$TK_DEFS%g
6064 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
6065 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6066 s%@TK_XLIBSW@%$TK_XLIBSW%g
6067 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6068 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
6069 s%@TCLHDIR@%$TCLHDIR%g
6070 s%@TKHDIR@%$TKHDIR%g
6071 s%@ITCLHDIR@%$ITCLHDIR%g
6072 s%@ITKHDIR@%$ITKHDIR%g
6073 s%@TIXHDIR@%$TIXHDIR%g
6074 s%@ITCL_VERSION@%$ITCL_VERSION%g
6075 s%@ITCL_DEFS@%$ITCL_DEFS%g
6076 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
6077 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
6078 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
6079 s%@ITK_VERSION@%$ITK_VERSION%g
6080 s%@ITK_DEFS@%$ITK_DEFS%g
6081 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
6082 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
6083 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
6084 s%@TIX_VERSION@%$TIX_VERSION%g
6085 s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
6086 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
6087 s%@X_CFLAGS@%$X_CFLAGS%g
6088 s%@X_LDFLAGS@%$X_LDFLAGS%g
6089 s%@X_LIBS@%$X_LIBS%g
6090 s%@ITCLLIB@%$ITCLLIB%g
6091 s%@ITCL_DEPS@%$ITCL_DEPS%g
6092 s%@ITKLIB@%$ITKLIB%g
6093 s%@ITK_DEPS@%$ITK_DEPS%g
6094 s%@TIXLIB@%$TIXLIB%g
6095 s%@TIX_DEPS@%$TIX_DEPS%g
6096 s%@GDBTKLIBS@%$GDBTKLIBS%g
6097 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
6098 s%@IGNORE_SIM@%$IGNORE_SIM%g
6099 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
6100 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6101 s%@CONFIG_OBS@%$CONFIG_OBS%g
6102 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
6103 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
6104 s%@HLDFLAGS@%$HLDFLAGS%g
6105 s%@HLDENV@%$HLDENV%g
6106 s%@target_subdir@%$target_subdir%g
6107 /@host_makefile_frag@/r $host_makefile_frag
6108 s%@host_makefile_frag@%%g
6109 /@target_makefile_frag@/r $target_makefile_frag
6110 s%@target_makefile_frag@%%g
6111 s%@frags@%$frags%g
6112 s%@LN_S@%$LN_S%g
6113 s%@EXEEXT@%$EXEEXT%g
6114 s%@subdirs@%$subdirs%g
6115
6116 CEOF
6117 EOF
6118
6119 cat >> $CONFIG_STATUS <<\EOF
6120
6121 # Split the substitutions into bite-sized pieces for seds with
6122 # small command number limits, like on Digital OSF/1 and HP-UX.
6123 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6124 ac_file=1 # Number of current file.
6125 ac_beg=1 # First line for current file.
6126 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6127 ac_more_lines=:
6128 ac_sed_cmds=""
6129 while $ac_more_lines; do
6130 if test $ac_beg -gt 1; then
6131 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6132 else
6133 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6134 fi
6135 if test ! -s conftest.s$ac_file; then
6136 ac_more_lines=false
6137 rm -f conftest.s$ac_file
6138 else
6139 if test -z "$ac_sed_cmds"; then
6140 ac_sed_cmds="sed -f conftest.s$ac_file"
6141 else
6142 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6143 fi
6144 ac_file=`expr $ac_file + 1`
6145 ac_beg=$ac_end
6146 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6147 fi
6148 done
6149 if test -z "$ac_sed_cmds"; then
6150 ac_sed_cmds=cat
6151 fi
6152 EOF
6153
6154 cat >> $CONFIG_STATUS <<EOF
6155
6156 CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"}
6157 EOF
6158 cat >> $CONFIG_STATUS <<\EOF
6159 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6160 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6161 case "$ac_file" in
6162 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6163 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6164 *) ac_file_in="${ac_file}.in" ;;
6165 esac
6166
6167 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6168
6169 # Remove last slash and all that follows it. Not all systems have dirname.
6170 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6171 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6172 # The file is in a subdirectory.
6173 test ! -d "$ac_dir" && mkdir "$ac_dir"
6174 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6175 # A "../" for each directory in $ac_dir_suffix.
6176 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6177 else
6178 ac_dir_suffix= ac_dots=
6179 fi
6180
6181 case "$ac_given_srcdir" in
6182 .) srcdir=.
6183 if test -z "$ac_dots"; then top_srcdir=.
6184 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6185 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6186 *) # Relative path.
6187 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6188 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6189 esac
6190
6191 case "$ac_given_INSTALL" in
6192 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6193 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6194 esac
6195
6196 echo creating "$ac_file"
6197 rm -f "$ac_file"
6198 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6199 case "$ac_file" in
6200 *Makefile*) ac_comsub="1i\\
6201 # $configure_input" ;;
6202 *) ac_comsub= ;;
6203 esac
6204
6205 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6206 sed -e "$ac_comsub
6207 s%@configure_input@%$configure_input%g
6208 s%@srcdir@%$srcdir%g
6209 s%@top_srcdir@%$top_srcdir%g
6210 s%@INSTALL@%$INSTALL%g
6211 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6212 fi; done
6213 rm -f conftest.s*
6214
6215 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6216 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6217 #
6218 # ac_d sets the value in "#define NAME VALUE" lines.
6219 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6220 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
6221 ac_dC='\3'
6222 ac_dD='%g'
6223 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6224 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6225 ac_uB='\([ ]\)%\1#\2define\3'
6226 ac_uC=' '
6227 ac_uD='\4%g'
6228 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6229 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6230 ac_eB='$%\1#\2define\3'
6231 ac_eC=' '
6232 ac_eD='%g'
6233
6234 if test "${CONFIG_HEADERS+set}" != set; then
6235 EOF
6236 cat >> $CONFIG_STATUS <<EOF
6237 CONFIG_HEADERS="config.h:config.in"
6238 EOF
6239 cat >> $CONFIG_STATUS <<\EOF
6240 fi
6241 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6242 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6243 case "$ac_file" in
6244 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6245 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6246 *) ac_file_in="${ac_file}.in" ;;
6247 esac
6248
6249 echo creating $ac_file
6250
6251 rm -f conftest.frag conftest.in conftest.out
6252 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6253 cat $ac_file_inputs > conftest.in
6254
6255 EOF
6256
6257 # Transform confdefs.h into a sed script conftest.vals that substitutes
6258 # the proper values into config.h.in to produce config.h. And first:
6259 # Protect against being on the right side of a sed subst in config.status.
6260 # Protect against being in an unquoted here document in config.status.
6261 rm -f conftest.vals
6262 cat > conftest.hdr <<\EOF
6263 s/[\\&%]/\\&/g
6264 s%[\\$`]%\\&%g
6265 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6266 s%ac_d%ac_u%gp
6267 s%ac_u%ac_e%gp
6268 EOF
6269 sed -n -f conftest.hdr confdefs.h > conftest.vals
6270 rm -f conftest.hdr
6271
6272 # This sed command replaces #undef with comments. This is necessary, for
6273 # example, in the case of _POSIX_SOURCE, which is predefined and required
6274 # on some systems where configure will not decide to define it.
6275 cat >> conftest.vals <<\EOF
6276 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6277 EOF
6278
6279 # Break up conftest.vals because some shells have a limit on
6280 # the size of here documents, and old seds have small limits too.
6281
6282 rm -f conftest.tail
6283 while :
6284 do
6285 ac_lines=`grep -c . conftest.vals`
6286 # grep -c gives empty output for an empty file on some AIX systems.
6287 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6288 # Write a limited-size here document to conftest.frag.
6289 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6290 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6291 echo 'CEOF
6292 sed -f conftest.frag conftest.in > conftest.out
6293 rm -f conftest.in
6294 mv conftest.out conftest.in
6295 ' >> $CONFIG_STATUS
6296 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6297 rm -f conftest.vals
6298 mv conftest.tail conftest.vals
6299 done
6300 rm -f conftest.vals
6301
6302 cat >> $CONFIG_STATUS <<\EOF
6303 rm -f conftest.frag conftest.h
6304 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
6305 cat conftest.in >> conftest.h
6306 rm -f conftest.in
6307 if cmp -s $ac_file conftest.h 2>/dev/null; then
6308 echo "$ac_file is unchanged"
6309 rm -f conftest.h
6310 else
6311 # Remove last slash and all that follows it. Not all systems have dirname.
6312 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6313 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6314 # The file is in a subdirectory.
6315 test ! -d "$ac_dir" && mkdir "$ac_dir"
6316 fi
6317 rm -f $ac_file
6318 mv conftest.h $ac_file
6319 fi
6320 fi; done
6321
6322 EOF
6323
6324 cat >> $CONFIG_STATUS <<EOF
6325 ac_sources="$files"
6326 ac_dests="$links"
6327 EOF
6328
6329 cat >> $CONFIG_STATUS <<\EOF
6330 srcdir=$ac_given_srcdir
6331 while test -n "$ac_sources"; do
6332 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6333 set $ac_sources; ac_source=$1; shift; ac_sources=$*
6334
6335 echo "linking $srcdir/$ac_source to $ac_dest"
6336
6337 if test ! -r $srcdir/$ac_source; then
6338 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6339 fi
6340 rm -f $ac_dest
6341
6342 # Make relative symlinks.
6343 # Remove last slash and all that follows it. Not all systems have dirname.
6344 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6345 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6346 # The dest file is in a subdirectory.
6347 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6348 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6349 # A "../" for each directory in $ac_dest_dir_suffix.
6350 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6351 else
6352 ac_dest_dir_suffix= ac_dots=
6353 fi
6354
6355 case "$srcdir" in
6356 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6357 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6358 esac
6359
6360 # Make a symlink if possible; otherwise try a hard link.
6361 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6362 ln $srcdir/$ac_source $ac_dest; then :
6363 else
6364 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6365 fi
6366 done
6367 EOF
6368 cat >> $CONFIG_STATUS <<EOF
6369
6370 gdb_host_cpu=$gdb_host_cpu
6371 gdb_target_cpu=$gdb_target_cpu
6372 nativefile=$nativefile
6373
6374 EOF
6375 cat >> $CONFIG_STATUS <<\EOF
6376
6377 if test "${nativefile}" = ""; then
6378 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
6379 < Makefile > Makefile.tem
6380 mv -f Makefile.tem Makefile
6381 fi
6382
6383 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
6384 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
6385 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
6386 mv -f Makefile.tmp Makefile
6387
6388 case x$CONFIG_HEADERS in
6389 xconfig.h:config.in)
6390 echo > stamp-h ;;
6391 esac
6392
6393 exit 0
6394 EOF
6395 chmod +x $CONFIG_STATUS
6396 rm -fr confdefs* $ac_clean_files
6397 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6398
6399 if test "$no_recursion" != yes; then
6400
6401 # Remove --cache-file and --srcdir arguments so they do not pile up.
6402 ac_sub_configure_args=
6403 ac_prev=
6404 for ac_arg in $ac_configure_args; do
6405 if test -n "$ac_prev"; then
6406 ac_prev=
6407 continue
6408 fi
6409 case "$ac_arg" in
6410 -cache-file | --cache-file | --cache-fil | --cache-fi \
6411 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6412 ac_prev=cache_file ;;
6413 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6414 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6415 ;;
6416 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6417 ac_prev=srcdir ;;
6418 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6419 ;;
6420 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
6421 esac
6422 done
6423
6424 for ac_config_dir in $configdirs; do
6425
6426 # Do not complain, so a configure script can configure whichever
6427 # parts of a large source tree are present.
6428 if test ! -d $srcdir/$ac_config_dir; then
6429 continue
6430 fi
6431
6432 echo configuring in $ac_config_dir
6433
6434 case "$srcdir" in
6435 .) ;;
6436 *)
6437 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
6438 else
6439 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
6440 fi
6441 ;;
6442 esac
6443
6444 ac_popdir=`pwd`
6445 cd $ac_config_dir
6446
6447 # A "../" for each directory in /$ac_config_dir.
6448 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
6449
6450 case "$srcdir" in
6451 .) # No --srcdir option. We are building in place.
6452 ac_sub_srcdir=$srcdir ;;
6453 /*) # Absolute path.
6454 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
6455 *) # Relative path.
6456 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
6457 esac
6458
6459 # Check for guested configure; otherwise get Cygnus style configure.
6460 if test -f $ac_sub_srcdir/configure; then
6461 ac_sub_configure=$ac_sub_srcdir/configure
6462 elif test -f $ac_sub_srcdir/configure.in; then
6463 ac_sub_configure=$ac_configure
6464 else
6465 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
6466 ac_sub_configure=
6467 fi
6468
6469 # The recursion is here.
6470 if test -n "$ac_sub_configure"; then
6471
6472 # Make the cache file name correct relative to the subdirectory.
6473 case "$cache_file" in
6474 /*) ac_sub_cache_file=$cache_file ;;
6475 *) # Relative path.
6476 ac_sub_cache_file="$ac_dots$cache_file" ;;
6477 esac
6478 case "$ac_given_INSTALL" in
6479 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6480 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6481 esac
6482
6483 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
6484 # The eval makes quoting arguments work.
6485 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
6486 then :
6487 else
6488 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
6489 fi
6490 fi
6491
6492 cd $ac_popdir
6493 done
6494 fi
6495
6496
6497 exit 0
This page took 0.186502 seconds and 5 git commands to generate.