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