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