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