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