2000-09-07 Kazu Hirata <kazu@hxi.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=
451928c5 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
451928c5 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
451928c5
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.
451928c5
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
451928c5
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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 732#line 733 "configure"
c906108c
SS
733#include "confdefs.h"
734
735main(){return(0);}
736EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 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
451928c5 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"
451928c5 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
451928c5 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"
451928c5 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
451928c5 908echo "configure:909: checking for AIX" >&5
c906108c 909cat > conftest.$ac_ext <<EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 1387#line 1388 "configure"
c906108c
SS
1388#include "confdefs.h"
1389
1390int main() {
1391} $ac_kw foo() {
1392; return 0; }
1393EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 2155#line 2156 "configure"
c906108c
SS
2156#include "confdefs.h"
2157#include <locale.h>
2158int main() {
2159return LC_MESSAGES
2160; return 0; }
2161EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 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
451928c5 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
451928c5 2254#line 2255 "configure"
c906108c
SS
2255#include "confdefs.h"
2256#include <libintl.h>
2257int main() {
2258return (int) gettext ("")
2259; return 0; }
2260EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 2317#line 2318 "configure"
c906108c
SS
2318#include "confdefs.h"
2319
2320int main() {
2321return (int) gettext ("")
2322; return 0; }
2323EOF
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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
451928c5 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"
451928c5 2747{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2748ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2749if test -z "$ac_err"; then
2750 rm -rf conftest*
2751 eval "ac_cv_header_$ac_safe=yes"
2752else
2753 echo "$ac_err" >&5
2754 echo "configure: failed program was:" >&5
2755 cat conftest.$ac_ext >&5
2756 rm -rf conftest*
2757 eval "ac_cv_header_$ac_safe=no"
2758fi
2759rm -f conftest*
2760fi
2761if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2762 echo "$ac_t""yes" 1>&6
2763 msgformat=linux
2764else
2765 echo "$ac_t""no" 1>&6
2766msgformat=xopen
2767fi
2768
2769
2770 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2771 fi
2772 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2773 $srcdir/po2tbl.sed.in > po2tbl.sed
2774 fi
2775
2776 if test "$PACKAGE" = "gettext"; then
2777 GT_NO="#NO#"
2778 GT_YES=
2779 else
2780 GT_NO=
2781 GT_YES="#YES#"
2782 fi
2783
2784
2785
2786 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2787
2788
2789 l=
2790
2791
2792 if test -d $srcdir/po; then
2793 test -d po || mkdir po
2794 if test "x$srcdir" != "x."; then
2795 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2796 posrcprefix="$srcdir/"
2797 else
2798 posrcprefix="../$srcdir/"
2799 fi
2800 else
2801 posrcprefix="../"
2802 fi
2803 rm -f po/POTFILES
2804 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2805 < $srcdir/po/POTFILES.in > po/POTFILES
2806 fi
2807
2808
2809
2810CONFIG_OBS=
2811CONFIG_DEPS=
2812CONFIG_SRCS=
fb40c209
AC
2813CONFIG_INITS=
2814ENABLE_CFLAGS=
b3a90332
AC
2815CONFIG_ALL=
2816CONFIG_CLEAN=
e56ac5c3
AC
2817CONFIG_INSTALL=
2818CONFIG_UNINSTALL=
c906108c
SS
2819
2820configdirs="doc testsuite"
2821
96baa820
JM
2822# Check whether --enable-multi-ice or --disable-multi-ice was given.
2823if test "${enable_multi_ice+set}" = set; then
2824 enableval="$enable_multi_ice"
2825 case "${enableval}" in
2826 yes ) enable_multi_ice="yes" ;;
2827 no) enable_multi_ice="no" ;;
2828 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2829 esac
2830
2831fi
2832
2833
2834if test "${enable_multi_ice}" = "yes"; then
2835 configdirs="${configdirs} multi-ice"
2836fi
2837
c906108c
SS
2838
2839. ${srcdir}/configure.host
2840
2841. ${srcdir}/configure.tgt
2842
1ba607ad
AC
2843targ=${target} ; . ${srcdir}/../bfd/config.bfd
2844
2845
2846targ=${target}
2847. ${srcdir}/../bfd/config.bfd
5c8cc331
AC
2848
2849targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2850
1ba607ad
AC
2851if test x"${targ_archs}" != x ; then
2852 cat >> confdefs.h <<EOF
2853#define DEFAULT_BFD_ARCH ${targ_archs}
2854EOF
2855
2856fi
2857if test x"${targ_defvec}" != x ; then
2858 cat >> confdefs.h <<EOF
2859#define DEFAULT_BFD_VEC ${targ_defvec}
2860EOF
2861
2862fi
c906108c 2863
0d06e24b 2864for ac_prog in mawk gawk nawk awk
7a292a7a
SS
2865do
2866# Extract the first word of "$ac_prog", so it can be a program name with args.
2867set dummy $ac_prog; ac_word=$2
2868echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 2869echo "configure:2870: checking for $ac_word" >&5
7a292a7a
SS
2870if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2871 echo $ac_n "(cached) $ac_c" 1>&6
2872else
2873 if test -n "$AWK"; then
2874 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2875else
2876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2877 ac_dummy="$PATH"
2878 for ac_dir in $ac_dummy; do
2879 test -z "$ac_dir" && ac_dir=.
2880 if test -f $ac_dir/$ac_word; then
2881 ac_cv_prog_AWK="$ac_prog"
2882 break
2883 fi
2884 done
2885 IFS="$ac_save_ifs"
2886fi
2887fi
2888AWK="$ac_cv_prog_AWK"
2889if test -n "$AWK"; then
2890 echo "$ac_t""$AWK" 1>&6
2891else
2892 echo "$ac_t""no" 1>&6
2893fi
2894
2895test -n "$AWK" && break
2896done
2897
c906108c
SS
2898# Find a good install program. We prefer a C program (faster),
2899# so one script is as good as another. But avoid the broken or
2900# incompatible versions:
2901# SysV /etc/install, /usr/sbin/install
2902# SunOS /usr/etc/install
2903# IRIX /sbin/install
2904# AIX /bin/install
2905# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2906# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2907# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2908# ./install, which can be erroneously created by make from ./install.sh.
2909echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
451928c5 2910echo "configure:2911: checking for a BSD compatible install" >&5
c906108c
SS
2911if test -z "$INSTALL"; then
2912if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2913 echo $ac_n "(cached) $ac_c" 1>&6
2914else
2915 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2916 for ac_dir in $PATH; do
2917 # Account for people who put trailing slashes in PATH elements.
2918 case "$ac_dir/" in
2919 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2920 *)
2921 # OSF1 and SCO ODT 3.0 have their own names for install.
2922 # Don't use installbsd from OSF since it installs stuff as root
2923 # by default.
2924 for ac_prog in ginstall scoinst install; do
2925 if test -f $ac_dir/$ac_prog; then
2926 if test $ac_prog = install &&
2927 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2928 # AIX install. It has an incompatible calling convention.
2929 :
2930 else
2931 ac_cv_path_install="$ac_dir/$ac_prog -c"
2932 break 2
2933 fi
2934 fi
2935 done
2936 ;;
2937 esac
2938 done
2939 IFS="$ac_save_IFS"
2940
2941fi
2942 if test "${ac_cv_path_install+set}" = set; then
2943 INSTALL="$ac_cv_path_install"
2944 else
2945 # As a last resort, use the slow shell script. We don't cache a
2946 # path for INSTALL within a source directory, because that will
2947 # break other packages using the cache if that directory is
2948 # removed, or if the path is relative.
2949 INSTALL="$ac_install_sh"
2950 fi
2951fi
2952echo "$ac_t""$INSTALL" 1>&6
2953
2954# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2955# It thinks the first close brace ends the variable substitution.
2956test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2957
2958test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2959
2960test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2961
2962if test $host != $build; then
2963 ac_tool_prefix=${host_alias}-
2964else
2965 ac_tool_prefix=
2966fi
2967
2968# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2969set dummy ${ac_tool_prefix}ar; ac_word=$2
2970echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 2971echo "configure:2972: checking for $ac_word" >&5
c906108c
SS
2972if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2973 echo $ac_n "(cached) $ac_c" 1>&6
2974else
2975 if test -n "$AR"; then
2976 ac_cv_prog_AR="$AR" # Let the user override the test.
2977else
2978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2979 ac_dummy="$PATH"
2980 for ac_dir in $ac_dummy; do
2981 test -z "$ac_dir" && ac_dir=.
2982 if test -f $ac_dir/$ac_word; then
2983 ac_cv_prog_AR="${ac_tool_prefix}ar"
2984 break
2985 fi
2986 done
2987 IFS="$ac_save_ifs"
2988 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2989fi
2990fi
2991AR="$ac_cv_prog_AR"
2992if test -n "$AR"; then
2993 echo "$ac_t""$AR" 1>&6
2994else
2995 echo "$ac_t""no" 1>&6
2996fi
2997
2998
2999
3000# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3001set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3002echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3003echo "configure:3004: checking for $ac_word" >&5
c906108c
SS
3004if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3005 echo $ac_n "(cached) $ac_c" 1>&6
3006else
3007 if test -n "$RANLIB"; then
3008 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3009else
3010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3011 ac_dummy="$PATH"
3012 for ac_dir in $ac_dummy; do
3013 test -z "$ac_dir" && ac_dir=.
3014 if test -f $ac_dir/$ac_word; then
3015 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3016 break
3017 fi
3018 done
3019 IFS="$ac_save_ifs"
3020fi
3021fi
3022RANLIB="$ac_cv_prog_RANLIB"
3023if test -n "$RANLIB"; then
3024 echo "$ac_t""$RANLIB" 1>&6
3025else
3026 echo "$ac_t""no" 1>&6
3027fi
3028
3029
3030if test -z "$ac_cv_prog_RANLIB"; then
3031if test -n "$ac_tool_prefix"; then
3032 # Extract the first word of "ranlib", so it can be a program name with args.
3033set dummy ranlib; ac_word=$2
3034echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3035echo "configure:3036: checking for $ac_word" >&5
c906108c
SS
3036if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3037 echo $ac_n "(cached) $ac_c" 1>&6
3038else
3039 if test -n "$RANLIB"; then
3040 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3041else
3042 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3043 ac_dummy="$PATH"
3044 for ac_dir in $ac_dummy; do
3045 test -z "$ac_dir" && ac_dir=.
3046 if test -f $ac_dir/$ac_word; then
3047 ac_cv_prog_RANLIB="ranlib"
3048 break
3049 fi
3050 done
3051 IFS="$ac_save_ifs"
3052 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3053fi
3054fi
3055RANLIB="$ac_cv_prog_RANLIB"
3056if test -n "$RANLIB"; then
3057 echo "$ac_t""$RANLIB" 1>&6
3058else
3059 echo "$ac_t""no" 1>&6
3060fi
3061
3062else
3063 RANLIB=":"
3064fi
3065fi
3066
95ca63c4
CF
3067# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3068set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3069echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3070echo "configure:3071: checking for $ac_word" >&5
95ca63c4
CF
3071if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073else
3074 if test -n "$DLLTOOL"; then
3075 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3076else
3077 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3078 ac_dummy="$PATH"
3079 for ac_dir in $ac_dummy; do
3080 test -z "$ac_dir" && ac_dir=.
3081 if test -f $ac_dir/$ac_word; then
3082 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3083 break
3084 fi
3085 done
3086 IFS="$ac_save_ifs"
3087 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3088fi
3089fi
3090DLLTOOL="$ac_cv_prog_DLLTOOL"
3091if test -n "$DLLTOOL"; then
3092 echo "$ac_t""$DLLTOOL" 1>&6
3093else
3094 echo "$ac_t""no" 1>&6
3095fi
3096
3097
3098
3099# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3100set dummy ${ac_tool_prefix}windres; ac_word=$2
3101echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3102echo "configure:3103: checking for $ac_word" >&5
95ca63c4
CF
3103if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3104 echo $ac_n "(cached) $ac_c" 1>&6
3105else
3106 if test -n "$WINDRES"; then
3107 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3108else
3109 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3110 ac_dummy="$PATH"
3111 for ac_dir in $ac_dummy; do
3112 test -z "$ac_dir" && ac_dir=.
3113 if test -f $ac_dir/$ac_word; then
3114 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3115 break
3116 fi
3117 done
3118 IFS="$ac_save_ifs"
3119 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3120fi
3121fi
3122WINDRES="$ac_cv_prog_WINDRES"
3123if test -n "$WINDRES"; then
3124 echo "$ac_t""$WINDRES" 1>&6
3125else
3126 echo "$ac_t""no" 1>&6
3127fi
3128
3129
3130
c906108c
SS
3131for ac_prog in 'bison -y' byacc
3132do
3133# Extract the first word of "$ac_prog", so it can be a program name with args.
3134set dummy $ac_prog; ac_word=$2
3135echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3136echo "configure:3137: checking for $ac_word" >&5
c906108c
SS
3137if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
3139else
3140 if test -n "$YACC"; then
3141 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3142else
3143 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3144 ac_dummy="$PATH"
3145 for ac_dir in $ac_dummy; do
3146 test -z "$ac_dir" && ac_dir=.
3147 if test -f $ac_dir/$ac_word; then
3148 ac_cv_prog_YACC="$ac_prog"
3149 break
3150 fi
3151 done
3152 IFS="$ac_save_ifs"
3153fi
3154fi
3155YACC="$ac_cv_prog_YACC"
3156if test -n "$YACC"; then
3157 echo "$ac_t""$YACC" 1>&6
3158else
3159 echo "$ac_t""no" 1>&6
3160fi
3161
3162test -n "$YACC" && break
3163done
3164test -n "$YACC" || YACC="yacc"
3165
3166
75c6e08a
MK
3167# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3168set dummy ${ac_tool_prefix}mig; ac_word=$2
3169echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
451928c5 3170echo "configure:3171: checking for $ac_word" >&5
75c6e08a
MK
3171if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3173else
3174 if test -n "$MIG"; then
3175 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3176else
3177 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3178 ac_dummy="$PATH"
3179 for ac_dir in $ac_dummy; do
3180 test -z "$ac_dir" && ac_dir=.
3181 if test -f $ac_dir/$ac_word; then
3182 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3183 break
3184 fi
3185 done
3186 IFS="$ac_save_ifs"
3187 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3188fi
3189fi
3190MIG="$ac_cv_prog_MIG"
3191if test -n "$MIG"; then
3192 echo "$ac_t""$MIG" 1>&6
3193else
3194 echo "$ac_t""no" 1>&6
3195fi
3196
3197
3198
3199
c906108c
SS
3200if test "$program_transform_name" = s,x,x,; then
3201 program_transform_name=
3202else
3203 # Double any \ or $. echo might interpret backslashes.
3204 cat <<\EOF_SED > conftestsed
3205s,\\,\\\\,g; s,\$,$$,g
3206EOF_SED
3207 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3208 rm -f conftestsed
3209fi
3210test "$program_prefix" != NONE &&
3211 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3212# Use a double $ so make ignores it.
3213test "$program_suffix" != NONE &&
3214 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3215
3216# sed with no file args requires a program.
3217test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3218
3219
3220echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
451928c5 3221echo "configure:3222: checking return type of signal handlers" >&5
c906108c
SS
3222if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3223 echo $ac_n "(cached) $ac_c" 1>&6
3224else
3225 cat > conftest.$ac_ext <<EOF
451928c5 3226#line 3227 "configure"
c906108c
SS
3227#include "confdefs.h"
3228#include <sys/types.h>
3229#include <signal.h>
3230#ifdef signal
3231#undef signal
3232#endif
3233#ifdef __cplusplus
3234extern "C" void (*signal (int, void (*)(int)))(int);
3235#else
3236void (*signal ()) ();
3237#endif
3238
3239int main() {
3240int i;
3241; return 0; }
3242EOF
451928c5 3243if { (eval echo configure:3244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3244 rm -rf conftest*
3245 ac_cv_type_signal=void
3246else
3247 echo "configure: failed program was:" >&5
3248 cat conftest.$ac_ext >&5
3249 rm -rf conftest*
3250 ac_cv_type_signal=int
3251fi
3252rm -f conftest*
3253fi
3254
3255echo "$ac_t""$ac_cv_type_signal" 1>&6
3256cat >> confdefs.h <<EOF
3257#define RETSIGTYPE $ac_cv_type_signal
3258EOF
3259
3260
3261
3262echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
451928c5 3263echo "configure:3264: checking for ANSI C header files" >&5
c906108c
SS
3264if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3265 echo $ac_n "(cached) $ac_c" 1>&6
3266else
3267 cat > conftest.$ac_ext <<EOF
451928c5 3268#line 3269 "configure"
c906108c
SS
3269#include "confdefs.h"
3270#include <stdlib.h>
3271#include <stdarg.h>
3272#include <string.h>
3273#include <float.h>
3274EOF
3275ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 3276{ (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3277ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3278if test -z "$ac_err"; then
3279 rm -rf conftest*
3280 ac_cv_header_stdc=yes
3281else
3282 echo "$ac_err" >&5
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 rm -rf conftest*
3286 ac_cv_header_stdc=no
3287fi
3288rm -f conftest*
3289
3290if test $ac_cv_header_stdc = yes; then
3291 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3292cat > conftest.$ac_ext <<EOF
451928c5 3293#line 3294 "configure"
c906108c
SS
3294#include "confdefs.h"
3295#include <string.h>
3296EOF
3297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3298 egrep "memchr" >/dev/null 2>&1; then
3299 :
3300else
3301 rm -rf conftest*
3302 ac_cv_header_stdc=no
3303fi
3304rm -f conftest*
3305
3306fi
3307
3308if test $ac_cv_header_stdc = yes; then
3309 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3310cat > conftest.$ac_ext <<EOF
451928c5 3311#line 3312 "configure"
c906108c
SS
3312#include "confdefs.h"
3313#include <stdlib.h>
3314EOF
3315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3316 egrep "free" >/dev/null 2>&1; then
3317 :
3318else
3319 rm -rf conftest*
3320 ac_cv_header_stdc=no
3321fi
3322rm -f conftest*
3323
3324fi
3325
3326if test $ac_cv_header_stdc = yes; then
3327 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3328if test "$cross_compiling" = yes; then
3329 :
3330else
3331 cat > conftest.$ac_ext <<EOF
451928c5 3332#line 3333 "configure"
c906108c
SS
3333#include "confdefs.h"
3334#include <ctype.h>
3335#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3336#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3337#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3338int main () { int i; for (i = 0; i < 256; i++)
3339if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3340exit (0); }
3341
3342EOF
451928c5 3343if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3344then
3345 :
3346else
3347 echo "configure: failed program was:" >&5
3348 cat conftest.$ac_ext >&5
3349 rm -fr conftest*
3350 ac_cv_header_stdc=no
3351fi
3352rm -fr conftest*
3353fi
3354
3355fi
3356fi
3357
3358echo "$ac_t""$ac_cv_header_stdc" 1>&6
3359if test $ac_cv_header_stdc = yes; then
3360 cat >> confdefs.h <<\EOF
3361#define STDC_HEADERS 1
3362EOF
3363
3364fi
3365
3366
6abadcf8 3367
3e0bf9f1 3368case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
6abadcf8
ND
3369 cat >> confdefs.h <<\EOF
3370#define _MSE_INT_H 1
3371EOF
3372
3373esac; esac
3374
2894793a 3375for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \
c906108c 3376 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
ed9a39eb 3377 string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
c906108c 3378 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
104c1213 3379 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
4b14d3e4 3380 time.h sys/ioctl.h sys/user.h \
2894793a 3381 dirent.h sys/ndir.h sys/dir.h ndir.h \
409a3f64
AC
3382 curses.h ncurses.h \
3383 poll.h sys/poll.h
c906108c
SS
3384do
3385ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3386echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
451928c5 3387echo "configure:3388: checking for $ac_hdr" >&5
c906108c
SS
3388if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3389 echo $ac_n "(cached) $ac_c" 1>&6
3390else
3391 cat > conftest.$ac_ext <<EOF
451928c5 3392#line 3393 "configure"
c906108c
SS
3393#include "confdefs.h"
3394#include <$ac_hdr>
3395EOF
3396ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 3397{ (eval echo configure:3398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3398ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3399if test -z "$ac_err"; then
3400 rm -rf conftest*
3401 eval "ac_cv_header_$ac_safe=yes"
3402else
3403 echo "$ac_err" >&5
3404 echo "configure: failed program was:" >&5
3405 cat conftest.$ac_ext >&5
3406 rm -rf conftest*
3407 eval "ac_cv_header_$ac_safe=no"
3408fi
3409rm -f conftest*
3410fi
3411if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3412 echo "$ac_t""yes" 1>&6
3413 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3414 cat >> confdefs.h <<EOF
3415#define $ac_tr_hdr 1
3416EOF
3417
3418else
3419 echo "$ac_t""no" 1>&6
3420fi
3421done
3422
3423echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
451928c5 3424echo "configure:3425: checking whether stat file-mode macros are broken" >&5
c906108c
SS
3425if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3426 echo $ac_n "(cached) $ac_c" 1>&6
3427else
3428 cat > conftest.$ac_ext <<EOF
451928c5 3429#line 3430 "configure"
c906108c
SS
3430#include "confdefs.h"
3431#include <sys/types.h>
3432#include <sys/stat.h>
3433
3434#if defined(S_ISBLK) && defined(S_IFDIR)
3435# if S_ISBLK (S_IFDIR)
3436You lose.
3437# endif
3438#endif
3439
3440#if defined(S_ISBLK) && defined(S_IFCHR)
3441# if S_ISBLK (S_IFCHR)
3442You lose.
3443# endif
3444#endif
3445
3446#if defined(S_ISLNK) && defined(S_IFREG)
3447# if S_ISLNK (S_IFREG)
3448You lose.
3449# endif
3450#endif
3451
3452#if defined(S_ISSOCK) && defined(S_IFREG)
3453# if S_ISSOCK (S_IFREG)
3454You lose.
3455# endif
3456#endif
3457
3458EOF
3459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3460 egrep "You lose" >/dev/null 2>&1; then
3461 rm -rf conftest*
3462 ac_cv_header_stat_broken=yes
3463else
3464 rm -rf conftest*
3465 ac_cv_header_stat_broken=no
3466fi
3467rm -f conftest*
3468
3469fi
3470
3471echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3472if test $ac_cv_header_stat_broken = yes; then
3473 cat >> confdefs.h <<\EOF
3474#define STAT_MACROS_BROKEN 1
3475EOF
3476
3477fi
3478
3479
3480echo $ac_n "checking for working const""... $ac_c" 1>&6
451928c5 3481echo "configure:3482: checking for working const" >&5
c906108c
SS
3482if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3483 echo $ac_n "(cached) $ac_c" 1>&6
3484else
3485 cat > conftest.$ac_ext <<EOF
451928c5 3486#line 3487 "configure"
c906108c
SS
3487#include "confdefs.h"
3488
3489int main() {
3490
3491/* Ultrix mips cc rejects this. */
3492typedef int charset[2]; const charset x;
3493/* SunOS 4.1.1 cc rejects this. */
3494char const *const *ccp;
3495char **p;
3496/* NEC SVR4.0.2 mips cc rejects this. */
3497struct point {int x, y;};
3498static struct point const zero = {0,0};
3499/* AIX XL C 1.02.0.0 rejects this.
3500 It does not let you subtract one const X* pointer from another in an arm
3501 of an if-expression whose if-part is not a constant expression */
3502const char *g = "string";
3503ccp = &g + (g ? g-g : 0);
3504/* HPUX 7.0 cc rejects these. */
3505++ccp;
3506p = (char**) ccp;
3507ccp = (char const *const *) p;
3508{ /* SCO 3.2v4 cc rejects this. */
3509 char *t;
3510 char const *s = 0 ? (char *) 0 : (char const *) 0;
3511
3512 *t++ = 0;
3513}
3514{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3515 int x[] = {25, 17};
3516 const int *foo = &x[0];
3517 ++foo;
3518}
3519{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3520 typedef const int *iptr;
3521 iptr p = 0;
3522 ++p;
3523}
3524{ /* AIX XL C 1.02.0.0 rejects this saying
3525 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3526 struct s { int j; const int *ap[3]; };
3527 struct s *b; b->j = 5;
3528}
3529{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3530 const int foo = 10;
3531}
3532
3533; return 0; }
3534EOF
451928c5 3535if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3536 rm -rf conftest*
3537 ac_cv_c_const=yes
3538else
3539 echo "configure: failed program was:" >&5
3540 cat conftest.$ac_ext >&5
3541 rm -rf conftest*
3542 ac_cv_c_const=no
3543fi
3544rm -f conftest*
3545fi
3546
3547echo "$ac_t""$ac_cv_c_const" 1>&6
3548if test $ac_cv_c_const = no; then
3549 cat >> confdefs.h <<\EOF
3550#define const
3551EOF
3552
3553fi
3554
3555
2acceee2 3556for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
c906108c
SS
3557do
3558echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
451928c5 3559echo "configure:3560: checking for $ac_func" >&5
c906108c
SS
3560if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3561 echo $ac_n "(cached) $ac_c" 1>&6
3562else
3563 cat > conftest.$ac_ext <<EOF
451928c5 3564#line 3565 "configure"
c906108c
SS
3565#include "confdefs.h"
3566/* System header to define __stub macros and hopefully few prototypes,
3567 which can conflict with char $ac_func(); below. */
3568#include <assert.h>
3569/* Override any gcc2 internal prototype to avoid an error. */
3570/* We use char because int might match the return type of a gcc2
3571 builtin and then its argument prototype would still apply. */
3572char $ac_func();
3573
3574int main() {
3575
3576/* The GNU C library defines this for functions which it implements
3577 to always fail with ENOSYS. Some functions are actually named
3578 something starting with __ and the normal name is an alias. */
3579#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3580choke me
3581#else
3582$ac_func();
3583#endif
3584
3585; return 0; }
3586EOF
451928c5 3587if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3588 rm -rf conftest*
3589 eval "ac_cv_func_$ac_func=yes"
3590else
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
3594 eval "ac_cv_func_$ac_func=no"
3595fi
3596rm -f conftest*
3597fi
3598
3599if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3600 echo "$ac_t""yes" 1>&6
3601 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3602 cat >> confdefs.h <<EOF
3603#define $ac_tr_func 1
3604EOF
3605
3606else
3607 echo "$ac_t""no" 1>&6
3608fi
3609done
3610
3611# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3612# for constant arguments. Useless!
3613echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
451928c5 3614echo "configure:3615: checking for working alloca.h" >&5
c906108c
SS
3615if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3616 echo $ac_n "(cached) $ac_c" 1>&6
3617else
3618 cat > conftest.$ac_ext <<EOF
451928c5 3619#line 3620 "configure"
c906108c
SS
3620#include "confdefs.h"
3621#include <alloca.h>
3622int main() {
3623char *p = alloca(2 * sizeof(int));
3624; return 0; }
3625EOF
451928c5 3626if { (eval echo configure:3627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3627 rm -rf conftest*
3628 ac_cv_header_alloca_h=yes
3629else
3630 echo "configure: failed program was:" >&5
3631 cat conftest.$ac_ext >&5
3632 rm -rf conftest*
3633 ac_cv_header_alloca_h=no
3634fi
3635rm -f conftest*
3636fi
3637
3638echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3639if test $ac_cv_header_alloca_h = yes; then
3640 cat >> confdefs.h <<\EOF
3641#define HAVE_ALLOCA_H 1
3642EOF
3643
3644fi
3645
3646echo $ac_n "checking for alloca""... $ac_c" 1>&6
451928c5 3647echo "configure:3648: checking for alloca" >&5
c906108c
SS
3648if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3649 echo $ac_n "(cached) $ac_c" 1>&6
3650else
3651 cat > conftest.$ac_ext <<EOF
451928c5 3652#line 3653 "configure"
c906108c
SS
3653#include "confdefs.h"
3654
3655#ifdef __GNUC__
3656# define alloca __builtin_alloca
3657#else
3658# ifdef _MSC_VER
3659# include <malloc.h>
3660# define alloca _alloca
3661# else
3662# if HAVE_ALLOCA_H
3663# include <alloca.h>
3664# else
3665# ifdef _AIX
3666 #pragma alloca
3667# else
3668# ifndef alloca /* predefined by HP cc +Olibcalls */
3669char *alloca ();
3670# endif
3671# endif
3672# endif
3673# endif
3674#endif
3675
3676int main() {
3677char *p = (char *) alloca(1);
3678; return 0; }
3679EOF
451928c5 3680if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3681 rm -rf conftest*
3682 ac_cv_func_alloca_works=yes
3683else
3684 echo "configure: failed program was:" >&5
3685 cat conftest.$ac_ext >&5
3686 rm -rf conftest*
3687 ac_cv_func_alloca_works=no
3688fi
3689rm -f conftest*
3690fi
3691
3692echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3693if test $ac_cv_func_alloca_works = yes; then
3694 cat >> confdefs.h <<\EOF
3695#define HAVE_ALLOCA 1
3696EOF
3697
3698fi
3699
3700if test $ac_cv_func_alloca_works = no; then
3701 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3702 # that cause trouble. Some versions do not even contain alloca or
3703 # contain a buggy version. If you still want to use their alloca,
3704 # use ar to extract alloca.o from them instead of compiling alloca.c.
3705 ALLOCA=alloca.${ac_objext}
3706 cat >> confdefs.h <<\EOF
3707#define C_ALLOCA 1
3708EOF
3709
3710
3711echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
451928c5 3712echo "configure:3713: checking whether alloca needs Cray hooks" >&5
c906108c
SS
3713if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3714 echo $ac_n "(cached) $ac_c" 1>&6
3715else
3716 cat > conftest.$ac_ext <<EOF
451928c5 3717#line 3718 "configure"
c906108c
SS
3718#include "confdefs.h"
3719#if defined(CRAY) && ! defined(CRAY2)
3720webecray
3721#else
3722wenotbecray
3723#endif
3724
3725EOF
3726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3727 egrep "webecray" >/dev/null 2>&1; then
3728 rm -rf conftest*
3729 ac_cv_os_cray=yes
3730else
3731 rm -rf conftest*
3732 ac_cv_os_cray=no
3733fi
3734rm -f conftest*
3735
3736fi
3737
3738echo "$ac_t""$ac_cv_os_cray" 1>&6
3739if test $ac_cv_os_cray = yes; then
3740for ac_func in _getb67 GETB67 getb67; do
3741 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
451928c5 3742echo "configure:3743: checking for $ac_func" >&5
c906108c
SS
3743if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3744 echo $ac_n "(cached) $ac_c" 1>&6
3745else
3746 cat > conftest.$ac_ext <<EOF
451928c5 3747#line 3748 "configure"
c906108c
SS
3748#include "confdefs.h"
3749/* System header to define __stub macros and hopefully few prototypes,
3750 which can conflict with char $ac_func(); below. */
3751#include <assert.h>
3752/* Override any gcc2 internal prototype to avoid an error. */
3753/* We use char because int might match the return type of a gcc2
3754 builtin and then its argument prototype would still apply. */
3755char $ac_func();
3756
3757int main() {
3758
3759/* The GNU C library defines this for functions which it implements
3760 to always fail with ENOSYS. Some functions are actually named
3761 something starting with __ and the normal name is an alias. */
3762#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3763choke me
3764#else
3765$ac_func();
3766#endif
3767
3768; return 0; }
3769EOF
451928c5 3770if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3771 rm -rf conftest*
3772 eval "ac_cv_func_$ac_func=yes"
3773else
3774 echo "configure: failed program was:" >&5
3775 cat conftest.$ac_ext >&5
3776 rm -rf conftest*
3777 eval "ac_cv_func_$ac_func=no"
3778fi
3779rm -f conftest*
3780fi
3781
3782if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3783 echo "$ac_t""yes" 1>&6
3784 cat >> confdefs.h <<EOF
3785#define CRAY_STACKSEG_END $ac_func
3786EOF
3787
3788 break
3789else
3790 echo "$ac_t""no" 1>&6
3791fi
3792
3793done
3794fi
3795
3796echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
451928c5 3797echo "configure:3798: checking stack direction for C alloca" >&5
c906108c
SS
3798if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 if test "$cross_compiling" = yes; then
3802 ac_cv_c_stack_direction=0
3803else
3804 cat > conftest.$ac_ext <<EOF
451928c5 3805#line 3806 "configure"
c906108c
SS
3806#include "confdefs.h"
3807find_stack_direction ()
3808{
3809 static char *addr = 0;
3810 auto char dummy;
3811 if (addr == 0)
3812 {
3813 addr = &dummy;
3814 return find_stack_direction ();
3815 }
3816 else
3817 return (&dummy > addr) ? 1 : -1;
3818}
3819main ()
3820{
3821 exit (find_stack_direction() < 0);
3822}
3823EOF
451928c5 3824if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3825then
3826 ac_cv_c_stack_direction=1
3827else
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3830 rm -fr conftest*
3831 ac_cv_c_stack_direction=-1
3832fi
3833rm -fr conftest*
3834fi
3835
3836fi
3837
3838echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3839cat >> confdefs.h <<EOF
3840#define STACK_DIRECTION $ac_cv_c_stack_direction
3841EOF
3842
3843fi
3844
3845
7dfa765c
MK
3846# See if machine/reg.h supports the %fs and %gs i386 segment registers.
3847# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
3848echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
451928c5 3849echo "configure:3850: checking for r_fs in struct reg" >&5
422ea4b8 3850if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7dfa765c
MK
3851 echo $ac_n "(cached) $ac_c" 1>&6
3852else
3853 cat > conftest.$ac_ext <<EOF
451928c5 3854#line 3855 "configure"
7dfa765c
MK
3855#include "confdefs.h"
3856#include <machine/reg.h>
3857int main() {
3858struct reg r; r.r_fs;
3859; return 0; }
3860EOF
451928c5 3861if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 3862 rm -rf conftest*
422ea4b8 3863 gdb_cv_struct_reg_r_fs=yes
7dfa765c
MK
3864else
3865 echo "configure: failed program was:" >&5
3866 cat conftest.$ac_ext >&5
3867 rm -rf conftest*
422ea4b8 3868 gdb_cv_struct_reg_r_fs=no
7dfa765c
MK
3869fi
3870rm -f conftest*
3871fi
3872
422ea4b8
MK
3873echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
3874if test $gdb_cv_struct_reg_r_fs = yes; then
7dfa765c 3875 cat >> confdefs.h <<\EOF
422ea4b8 3876#define HAVE_STRUCT_REG_R_FS 1
7dfa765c
MK
3877EOF
3878
3879fi
3880echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
451928c5 3881echo "configure:3882: checking for r_gs in struct reg" >&5
422ea4b8 3882if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7dfa765c
MK
3883 echo $ac_n "(cached) $ac_c" 1>&6
3884else
3885 cat > conftest.$ac_ext <<EOF
451928c5 3886#line 3887 "configure"
7dfa765c
MK
3887#include "confdefs.h"
3888#include <machine/reg.h>
3889int main() {
3890struct reg r; r.r_gs;
3891; return 0; }
3892EOF
451928c5 3893if { (eval echo configure:3894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 3894 rm -rf conftest*
422ea4b8 3895 gdb_cv_struct_reg_r_gs=yes
7dfa765c
MK
3896else
3897 echo "configure: failed program was:" >&5
3898 cat conftest.$ac_ext >&5
3899 rm -rf conftest*
422ea4b8 3900 gdb_cv_struct_reg_r_gs=no
7dfa765c
MK
3901fi
3902rm -f conftest*
3903fi
3904
422ea4b8
MK
3905echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
3906if test $gdb_cv_struct_reg_r_gs = yes; then
7dfa765c 3907 cat >> confdefs.h <<\EOF
422ea4b8 3908#define HAVE_STRUCT_REG_R_GS 1
7dfa765c
MK
3909EOF
3910
3911fi
3912
64bb1671 3913echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
451928c5 3914echo "configure:3915: checking for PTRACE_GETREGS" >&5
64bb1671
MK
3915if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
3916 echo $ac_n "(cached) $ac_c" 1>&6
3917else
3918 cat > conftest.$ac_ext <<EOF
451928c5 3919#line 3920 "configure"
64bb1671
MK
3920#include "confdefs.h"
3921#include <sys/ptrace.h>
3922int main() {
3923PTRACE_GETREGS;
3924; return 0; }
3925EOF
451928c5 3926if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
64bb1671
MK
3927 rm -rf conftest*
3928 gdb_cv_have_ptrace_getregs=yes
3929else
3930 echo "configure: failed program was:" >&5
3931 cat conftest.$ac_ext >&5
3932 rm -rf conftest*
3933 gdb_cv_have_ptrace_getregs=no
3934fi
3935rm -f conftest*
3936fi
3937
4397a6ab 3938echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
64bb1671
MK
3939if test $gdb_cv_have_ptrace_getregs = yes; then
3940 cat >> confdefs.h <<\EOF
3941#define HAVE_PTRACE_GETREGS 1
3942EOF
3943
3944fi
3945
6ce2ac0b 3946echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
451928c5 3947echo "configure:3948: checking for PTRACE_GETFPXREGS" >&5
6ce2ac0b 3948if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
5c44784c
JM
3949 echo $ac_n "(cached) $ac_c" 1>&6
3950else
3951 cat > conftest.$ac_ext <<EOF
451928c5 3952#line 3953 "configure"
5c44784c
JM
3953#include "confdefs.h"
3954#include <sys/ptrace.h>
3955int main() {
6ce2ac0b 3956PTRACE_GETFPXREGS;
5c44784c
JM
3957; return 0; }
3958EOF
451928c5 3959if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c44784c 3960 rm -rf conftest*
6ce2ac0b 3961 gdb_cv_have_ptrace_getfpxregs=yes
5c44784c
JM
3962else
3963 echo "configure: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3965 rm -rf conftest*
6ce2ac0b 3966 gdb_cv_have_ptrace_getfpxregs=no
5c44784c
JM
3967fi
3968rm -f conftest*
3969fi
3970
6ce2ac0b
MK
3971echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
3972if test $gdb_cv_have_ptrace_getfpxregs = yes; then
5c44784c 3973 cat >> confdefs.h <<\EOF
6ce2ac0b 3974#define HAVE_PTRACE_GETFPXREGS 1
5c44784c
JM
3975EOF
3976
3977fi
3978
7be570e7 3979echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
451928c5 3980echo "configure:3981: checking for socketpair in -lsocket" >&5
7be570e7
JM
3981ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
3982if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3983 echo $ac_n "(cached) $ac_c" 1>&6
3984else
3985 ac_save_LIBS="$LIBS"
3986LIBS="-lsocket $LIBS"
3987cat > conftest.$ac_ext <<EOF
451928c5 3988#line 3989 "configure"
7be570e7
JM
3989#include "confdefs.h"
3990/* Override any gcc2 internal prototype to avoid an error. */
3991/* We use char because int might match the return type of a gcc2
3992 builtin and then its argument prototype would still apply. */
3993char socketpair();
3994
3995int main() {
3996socketpair()
3997; return 0; }
3998EOF
451928c5 3999if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4000 rm -rf conftest*
4001 eval "ac_cv_lib_$ac_lib_var=yes"
4002else
4003 echo "configure: failed program was:" >&5
4004 cat conftest.$ac_ext >&5
4005 rm -rf conftest*
4006 eval "ac_cv_lib_$ac_lib_var=no"
4007fi
4008rm -f conftest*
4009LIBS="$ac_save_LIBS"
4010
4011fi
4012if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4013 echo "$ac_t""yes" 1>&6
4014 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4015 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4016 cat >> confdefs.h <<EOF
4017#define $ac_tr_lib 1
4018EOF
4019
4020 LIBS="-lsocket $LIBS"
4021
4022else
4023 echo "$ac_t""no" 1>&6
4024fi
4025
4026for ac_func in socketpair
4027do
4028echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
451928c5 4029echo "configure:4030: checking for $ac_func" >&5
7be570e7
JM
4030if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4031 echo $ac_n "(cached) $ac_c" 1>&6
4032else
4033 cat > conftest.$ac_ext <<EOF
451928c5 4034#line 4035 "configure"
7be570e7
JM
4035#include "confdefs.h"
4036/* System header to define __stub macros and hopefully few prototypes,
4037 which can conflict with char $ac_func(); below. */
4038#include <assert.h>
4039/* Override any gcc2 internal prototype to avoid an error. */
4040/* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042char $ac_func();
4043
4044int main() {
4045
4046/* The GNU C library defines this for functions which it implements
4047 to always fail with ENOSYS. Some functions are actually named
4048 something starting with __ and the normal name is an alias. */
4049#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4050choke me
4051#else
4052$ac_func();
4053#endif
4054
4055; return 0; }
4056EOF
451928c5 4057if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4058 rm -rf conftest*
4059 eval "ac_cv_func_$ac_func=yes"
4060else
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063 rm -rf conftest*
4064 eval "ac_cv_func_$ac_func=no"
4065fi
4066rm -f conftest*
4067fi
4068
4069if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4070 echo "$ac_t""yes" 1>&6
4071 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4072 cat >> confdefs.h <<EOF
4073#define $ac_tr_func 1
4074EOF
4075
4076else
4077 echo "$ac_t""no" 1>&6
4078fi
4079done
4080
4081
4082
c906108c 4083echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
451928c5 4084echo "configure:4085: checking whether malloc must be declared" >&5
c906108c
SS
4085if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4086 echo $ac_n "(cached) $ac_c" 1>&6
4087else
4088 cat > conftest.$ac_ext <<EOF
451928c5 4089#line 4090 "configure"
c906108c
SS
4090#include "confdefs.h"
4091
4092#include <stdio.h>
4093#ifdef HAVE_STRING_H
4094#include <string.h>
4095#else
4096#ifdef HAVE_STRINGS_H
4097#include <strings.h>
4098#endif
4099#endif
4100#ifdef HAVE_STDLIB_H
4101#include <stdlib.h>
4102#endif
4103#ifdef HAVE_UNISTD_H
4104#include <unistd.h>
4105#endif
4106int main() {
4107char *(*pfn) = (char *(*)) malloc
4108; return 0; }
4109EOF
451928c5 4110if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4111 rm -rf conftest*
4112 bfd_cv_decl_needed_malloc=no
4113else
4114 echo "configure: failed program was:" >&5
4115 cat conftest.$ac_ext >&5
4116 rm -rf conftest*
4117 bfd_cv_decl_needed_malloc=yes
4118fi
4119rm -f conftest*
4120fi
4121
4122echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4123if test $bfd_cv_decl_needed_malloc = yes; then
4124 cat >> confdefs.h <<\EOF
4125#define NEED_DECLARATION_MALLOC 1
4126EOF
4127
4128fi
4129
4130echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
451928c5 4131echo "configure:4132: checking whether realloc must be declared" >&5
c906108c
SS
4132if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4133 echo $ac_n "(cached) $ac_c" 1>&6
4134else
4135 cat > conftest.$ac_ext <<EOF
451928c5 4136#line 4137 "configure"
c906108c
SS
4137#include "confdefs.h"
4138
4139#include <stdio.h>
4140#ifdef HAVE_STRING_H
4141#include <string.h>
4142#else
4143#ifdef HAVE_STRINGS_H
4144#include <strings.h>
4145#endif
4146#endif
4147#ifdef HAVE_STDLIB_H
4148#include <stdlib.h>
4149#endif
4150#ifdef HAVE_UNISTD_H
4151#include <unistd.h>
4152#endif
4153int main() {
4154char *(*pfn) = (char *(*)) realloc
4155; return 0; }
4156EOF
451928c5 4157if { (eval echo configure:4158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4158 rm -rf conftest*
4159 bfd_cv_decl_needed_realloc=no
4160else
4161 echo "configure: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163 rm -rf conftest*
4164 bfd_cv_decl_needed_realloc=yes
4165fi
4166rm -f conftest*
4167fi
4168
4169echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4170if test $bfd_cv_decl_needed_realloc = yes; then
4171 cat >> confdefs.h <<\EOF
4172#define NEED_DECLARATION_REALLOC 1
4173EOF
4174
4175fi
4176
4177echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
451928c5 4178echo "configure:4179: checking whether free must be declared" >&5
c906108c
SS
4179if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4180 echo $ac_n "(cached) $ac_c" 1>&6
4181else
4182 cat > conftest.$ac_ext <<EOF
451928c5 4183#line 4184 "configure"
c906108c
SS
4184#include "confdefs.h"
4185
4186#include <stdio.h>
4187#ifdef HAVE_STRING_H
4188#include <string.h>
4189#else
4190#ifdef HAVE_STRINGS_H
4191#include <strings.h>
4192#endif
4193#endif
4194#ifdef HAVE_STDLIB_H
4195#include <stdlib.h>
4196#endif
4197#ifdef HAVE_UNISTD_H
4198#include <unistd.h>
4199#endif
4200int main() {
4201char *(*pfn) = (char *(*)) free
4202; return 0; }
4203EOF
451928c5 4204if { (eval echo configure:4205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4205 rm -rf conftest*
4206 bfd_cv_decl_needed_free=no
4207else
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210 rm -rf conftest*
4211 bfd_cv_decl_needed_free=yes
4212fi
4213rm -f conftest*
4214fi
4215
4216echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4217if test $bfd_cv_decl_needed_free = yes; then
4218 cat >> confdefs.h <<\EOF
4219#define NEED_DECLARATION_FREE 1
4220EOF
4221
4222fi
4223
4224echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
451928c5 4225echo "configure:4226: checking whether strerror must be declared" >&5
c906108c
SS
4226if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4227 echo $ac_n "(cached) $ac_c" 1>&6
4228else
4229 cat > conftest.$ac_ext <<EOF
451928c5 4230#line 4231 "configure"
c906108c
SS
4231#include "confdefs.h"
4232
4233#include <stdio.h>
4234#ifdef HAVE_STRING_H
4235#include <string.h>
4236#else
4237#ifdef HAVE_STRINGS_H
4238#include <strings.h>
4239#endif
4240#endif
4241#ifdef HAVE_STDLIB_H
4242#include <stdlib.h>
4243#endif
4244#ifdef HAVE_UNISTD_H
4245#include <unistd.h>
4246#endif
4247int main() {
4248char *(*pfn) = (char *(*)) strerror
4249; return 0; }
4250EOF
451928c5 4251if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4252 rm -rf conftest*
4253 bfd_cv_decl_needed_strerror=no
4254else
4255 echo "configure: failed program was:" >&5
4256 cat conftest.$ac_ext >&5
4257 rm -rf conftest*
4258 bfd_cv_decl_needed_strerror=yes
4259fi
4260rm -f conftest*
4261fi
4262
4263echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4264if test $bfd_cv_decl_needed_strerror = yes; then
4265 cat >> confdefs.h <<\EOF
4266#define NEED_DECLARATION_STRERROR 1
4267EOF
4268
4269fi
4270
4271echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
451928c5 4272echo "configure:4273: checking whether strdup must be declared" >&5
c906108c
SS
4273if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4274 echo $ac_n "(cached) $ac_c" 1>&6
4275else
4276 cat > conftest.$ac_ext <<EOF
451928c5 4277#line 4278 "configure"
c906108c
SS
4278#include "confdefs.h"
4279
4280#include <stdio.h>
4281#ifdef HAVE_STRING_H
4282#include <string.h>
4283#else
4284#ifdef HAVE_STRINGS_H
4285#include <strings.h>
4286#endif
4287#endif
4288#ifdef HAVE_STDLIB_H
4289#include <stdlib.h>
4290#endif
4291#ifdef HAVE_UNISTD_H
4292#include <unistd.h>
4293#endif
4294int main() {
4295char *(*pfn) = (char *(*)) strdup
4296; return 0; }
4297EOF
451928c5 4298if { (eval echo configure:4299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4299 rm -rf conftest*
4300 bfd_cv_decl_needed_strdup=no
4301else
4302 echo "configure: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304 rm -rf conftest*
4305 bfd_cv_decl_needed_strdup=yes
4306fi
4307rm -f conftest*
4308fi
4309
4310echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4311if test $bfd_cv_decl_needed_strdup = yes; then
4312 cat >> confdefs.h <<\EOF
4313#define NEED_DECLARATION_STRDUP 1
4314EOF
4315
4316fi
4317
b83266a0 4318echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
451928c5 4319echo "configure:4320: checking whether strstr must be declared" >&5
b83266a0
SS
4320if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 cat > conftest.$ac_ext <<EOF
451928c5 4324#line 4325 "configure"
b83266a0
SS
4325#include "confdefs.h"
4326
4327#include <stdio.h>
4328#ifdef HAVE_STRING_H
4329#include <string.h>
4330#else
4331#ifdef HAVE_STRINGS_H
4332#include <strings.h>
4333#endif
4334#endif
4335#ifdef HAVE_STDLIB_H
4336#include <stdlib.h>
4337#endif
4338#ifdef HAVE_UNISTD_H
4339#include <unistd.h>
4340#endif
4341int main() {
4342char *(*pfn) = (char *(*)) strstr
4343; return 0; }
4344EOF
451928c5 4345if { (eval echo configure:4346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0
SS
4346 rm -rf conftest*
4347 bfd_cv_decl_needed_strstr=no
4348else
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4351 rm -rf conftest*
4352 bfd_cv_decl_needed_strstr=yes
4353fi
4354rm -f conftest*
4355fi
4356
4357echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4358if test $bfd_cv_decl_needed_strstr = yes; then
4359 cat >> confdefs.h <<\EOF
4360#define NEED_DECLARATION_STRSTR 1
4361EOF
4362
4363fi
4364
c906108c
SS
4365
4366
4367# The following save_state_t checkery is only necessary for HPUX
4368# versions earlier than 10.20. When those fade from memory, this
4369# could be expunged. --jsm 1999-03-22
4370
4371echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
451928c5 4372echo "configure:4373: checking for HPUX save_state structure" >&5
c906108c 4373cat > conftest.$ac_ext <<EOF
451928c5 4374#line 4375 "configure"
c906108c
SS
4375#include "confdefs.h"
4376#include <machine/save_state.h>
4377EOF
4378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4379 egrep "save_state_t" >/dev/null 2>&1; then
4380 rm -rf conftest*
4381 gdb_cv_hpux_savestate=yes
4382else
4383 rm -rf conftest*
4384 gdb_cv_hpux_savestate=no
4385fi
4386rm -f conftest*
4387
4388cat > conftest.$ac_ext <<EOF
451928c5 4389#line 4390 "configure"
c906108c
SS
4390#include "confdefs.h"
4391#include <machine/save_state.h>
4392EOF
4393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394 egrep "ss_wide" >/dev/null 2>&1; then
4395 rm -rf conftest*
4396 gdb_cv_hpux_sswide=yes
4397else
4398 rm -rf conftest*
4399 gdb_cv_hpux_sswide=no
4400fi
4401rm -f conftest*
4402
4403if test $gdb_cv_hpux_savestate = yes
4404then
4405 cat >> confdefs.h <<\EOF
4406#define HAVE_STRUCT_SAVE_STATE_T 1
4407EOF
4408
4409fi
4410if test $gdb_cv_hpux_sswide = yes
4411then
4412 cat >> confdefs.h <<\EOF
4413#define HAVE_STRUCT_MEMBER_SS_WIDE 1
4414EOF
4415
4416fi
4417echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4418
4419
4420# If we are configured native on GNU/Linux, work around problems with
4421# sys/procfs.h
c3f6f71d 4422# Also detect which type of /proc is in use, such as for Unixware or Solaris.
c906108c
SS
4423
4424if test "${target}" = "${host}"; then
4425 case "${host}" in
4426 i[3456]86-*-linux*)
4427 cat >> confdefs.h <<\EOF
4428#define START_INFERIOR_TRAPS_EXPECTED 2
4429EOF
4430
4431 cat >> confdefs.h <<\EOF
4432#define sys_quotactl 1
4433EOF
4434
4435 ;;
c5394b80 4436 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
c3f6f71d
JM
4437 cat >> confdefs.h <<\EOF
4438#define NEW_PROC_API 1
c906108c
SS
4439EOF
4440
c3f6f71d 4441 ;;
3423db82 4442 *-*-solaris2.[678])
c3f6f71d
JM
4443 cat >> confdefs.h <<\EOF
4444#define NEW_PROC_API 1
4445EOF
4446
4447 ;;
4448 esac
c906108c
SS
4449fi
4450
4451if test "$ac_cv_header_sys_procfs_h" = yes; then
4452 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4453echo "configure:4454: checking for pstatus_t in sys/procfs.h" >&5
c906108c
SS
4454 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
4455 echo $ac_n "(cached) $ac_c" 1>&6
4456else
4457 cat > conftest.$ac_ext <<EOF
451928c5 4458#line 4459 "configure"
c906108c 4459#include "confdefs.h"
451928c5
AC
4460
4461#define _SYSCALL32
c906108c
SS
4462#include <sys/procfs.h>
4463int main() {
4464pstatus_t avar
4465; return 0; }
4466EOF
451928c5 4467if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4468 rm -rf conftest*
4469 bfd_cv_have_sys_procfs_type_pstatus_t=yes
4470else
4471 echo "configure: failed program was:" >&5
4472 cat conftest.$ac_ext >&5
4473 rm -rf conftest*
4474 bfd_cv_have_sys_procfs_type_pstatus_t=no
4475
4476fi
4477rm -f conftest*
4478fi
4479
4480 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4481 cat >> confdefs.h <<\EOF
4482#define HAVE_PSTATUS_T 1
4483EOF
4484
4485 fi
4486 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4487
4488 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4489echo "configure:4490: checking for prrun_t in sys/procfs.h" >&5
c906108c
SS
4490 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
4491 echo $ac_n "(cached) $ac_c" 1>&6
4492else
4493 cat > conftest.$ac_ext <<EOF
451928c5 4494#line 4495 "configure"
c906108c 4495#include "confdefs.h"
451928c5
AC
4496
4497#define _SYSCALL32
c906108c
SS
4498#include <sys/procfs.h>
4499int main() {
4500prrun_t avar
4501; return 0; }
4502EOF
451928c5 4503if { (eval echo configure:4504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4504 rm -rf conftest*
4505 bfd_cv_have_sys_procfs_type_prrun_t=yes
4506else
4507 echo "configure: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 rm -rf conftest*
4510 bfd_cv_have_sys_procfs_type_prrun_t=no
4511
4512fi
4513rm -f conftest*
4514fi
4515
4516 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
4517 cat >> confdefs.h <<\EOF
4518#define HAVE_PRRUN_T 1
4519EOF
4520
4521 fi
4522 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
4523
4524 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4525echo "configure:4526: checking for gregset_t in sys/procfs.h" >&5
c906108c
SS
4526 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
4527 echo $ac_n "(cached) $ac_c" 1>&6
4528else
4529 cat > conftest.$ac_ext <<EOF
451928c5 4530#line 4531 "configure"
c906108c 4531#include "confdefs.h"
451928c5
AC
4532
4533#define _SYSCALL32
c906108c
SS
4534#include <sys/procfs.h>
4535int main() {
4536gregset_t avar
4537; return 0; }
4538EOF
451928c5 4539if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4540 rm -rf conftest*
4541 bfd_cv_have_sys_procfs_type_gregset_t=yes
4542else
4543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
4545 rm -rf conftest*
4546 bfd_cv_have_sys_procfs_type_gregset_t=no
4547
4548fi
4549rm -f conftest*
4550fi
4551
4552 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
4553 cat >> confdefs.h <<\EOF
4554#define HAVE_GREGSET_T 1
4555EOF
4556
4557 fi
4558 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
4559
4560 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4561echo "configure:4562: checking for fpregset_t in sys/procfs.h" >&5
c906108c
SS
4562 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
4563 echo $ac_n "(cached) $ac_c" 1>&6
4564else
4565 cat > conftest.$ac_ext <<EOF
451928c5 4566#line 4567 "configure"
c906108c 4567#include "confdefs.h"
451928c5
AC
4568
4569#define _SYSCALL32
c906108c
SS
4570#include <sys/procfs.h>
4571int main() {
4572fpregset_t avar
4573; return 0; }
4574EOF
451928c5 4575if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4576 rm -rf conftest*
4577 bfd_cv_have_sys_procfs_type_fpregset_t=yes
4578else
4579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4581 rm -rf conftest*
4582 bfd_cv_have_sys_procfs_type_fpregset_t=no
4583
4584fi
4585rm -f conftest*
4586fi
4587
4588 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
4589 cat >> confdefs.h <<\EOF
4590#define HAVE_FPREGSET_T 1
4591EOF
4592
4593 fi
4594 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
4595
3862412b 4596 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4597echo "configure:4598: checking for prgregset_t in sys/procfs.h" >&5
3862412b
MK
4598 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
4599 echo $ac_n "(cached) $ac_c" 1>&6
4600else
4601 cat > conftest.$ac_ext <<EOF
451928c5 4602#line 4603 "configure"
3862412b 4603#include "confdefs.h"
451928c5
AC
4604
4605#define _SYSCALL32
3862412b
MK
4606#include <sys/procfs.h>
4607int main() {
4608prgregset_t avar
4609; return 0; }
4610EOF
451928c5 4611if { (eval echo configure:4612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4612 rm -rf conftest*
4613 bfd_cv_have_sys_procfs_type_prgregset_t=yes
4614else
4615 echo "configure: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4617 rm -rf conftest*
4618 bfd_cv_have_sys_procfs_type_prgregset_t=no
4619
4620fi
4621rm -f conftest*
4622fi
4623
4624 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
4625 cat >> confdefs.h <<\EOF
4626#define HAVE_PRGREGSET_T 1
4627EOF
4628
4629 fi
4630 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
4631
4632 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4633echo "configure:4634: checking for prfpregset_t in sys/procfs.h" >&5
3862412b
MK
4634 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4636else
4637 cat > conftest.$ac_ext <<EOF
451928c5 4638#line 4639 "configure"
3862412b 4639#include "confdefs.h"
451928c5
AC
4640
4641#define _SYSCALL32
3862412b
MK
4642#include <sys/procfs.h>
4643int main() {
4644prfpregset_t avar
4645; return 0; }
4646EOF
451928c5 4647if { (eval echo configure:4648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4648 rm -rf conftest*
4649 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
4650else
4651 echo "configure: failed program was:" >&5
4652 cat conftest.$ac_ext >&5
4653 rm -rf conftest*
4654 bfd_cv_have_sys_procfs_type_prfpregset_t=no
4655
4656fi
4657rm -f conftest*
4658fi
4659
4660 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
4661 cat >> confdefs.h <<\EOF
4662#define HAVE_PRFPREGSET_T 1
4663EOF
4664
4665 fi
4666 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
4667
451928c5
AC
4668 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
4669echo "configure:4670: checking for prgregset32_t in sys/procfs.h" >&5
4670 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
4671 echo $ac_n "(cached) $ac_c" 1>&6
4672else
4673 cat > conftest.$ac_ext <<EOF
4674#line 4675 "configure"
4675#include "confdefs.h"
4676
4677#define _SYSCALL32
4678#include <sys/procfs.h>
4679int main() {
4680prgregset32_t avar
4681; return 0; }
4682EOF
4683if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4684 rm -rf conftest*
4685 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
4686else
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4689 rm -rf conftest*
4690 bfd_cv_have_sys_procfs_type_prgregset32_t=no
4691
4692fi
4693rm -f conftest*
4694fi
4695
4696 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
4697 cat >> confdefs.h <<\EOF
4698#define HAVE_PRGREGSET32_T 1
4699EOF
4700
4701 fi
4702 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
4703
4704 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
4705echo "configure:4706: checking for prfpregset32_t in sys/procfs.h" >&5
4706 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4708else
4709 cat > conftest.$ac_ext <<EOF
4710#line 4711 "configure"
4711#include "confdefs.h"
4712
4713#define _SYSCALL32
4714#include <sys/procfs.h>
4715int main() {
4716prfpregset32_t avar
4717; return 0; }
4718EOF
4719if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4720 rm -rf conftest*
4721 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
4722else
4723 echo "configure: failed program was:" >&5
4724 cat conftest.$ac_ext >&5
4725 rm -rf conftest*
4726 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
4727
4728fi
4729rm -f conftest*
4730fi
4731
4732 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
4733 cat >> confdefs.h <<\EOF
4734#define HAVE_PRFPREGSET32_T 1
4735EOF
4736
4737 fi
4738 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
4739
3862412b 4740 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4741echo "configure:4742: checking for lwpid_t in sys/procfs.h" >&5
3862412b
MK
4742 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
4743 echo $ac_n "(cached) $ac_c" 1>&6
4744else
4745 cat > conftest.$ac_ext <<EOF
451928c5 4746#line 4747 "configure"
3862412b 4747#include "confdefs.h"
451928c5
AC
4748
4749#define _SYSCALL32
3862412b
MK
4750#include <sys/procfs.h>
4751int main() {
4752lwpid_t avar
4753; return 0; }
4754EOF
451928c5 4755if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4756 rm -rf conftest*
4757 bfd_cv_have_sys_procfs_type_lwpid_t=yes
4758else
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 bfd_cv_have_sys_procfs_type_lwpid_t=no
4763
4764fi
4765rm -f conftest*
4766fi
4767
4768 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
4769 cat >> confdefs.h <<\EOF
4770#define HAVE_LWPID_T 1
4771EOF
4772
4773 fi
4774 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
4775
4776 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
451928c5 4777echo "configure:4778: checking for psaddr_t in sys/procfs.h" >&5
3862412b
MK
4778 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
4779 echo $ac_n "(cached) $ac_c" 1>&6
4780else
4781 cat > conftest.$ac_ext <<EOF
451928c5 4782#line 4783 "configure"
3862412b 4783#include "confdefs.h"
451928c5
AC
4784
4785#define _SYSCALL32
3862412b
MK
4786#include <sys/procfs.h>
4787int main() {
4788psaddr_t avar
4789; return 0; }
4790EOF
451928c5 4791if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
4792 rm -rf conftest*
4793 bfd_cv_have_sys_procfs_type_psaddr_t=yes
4794else
4795 echo "configure: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 rm -rf conftest*
4798 bfd_cv_have_sys_procfs_type_psaddr_t=no
4799
4800fi
4801rm -f conftest*
4802fi
4803
4804 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
4805 cat >> confdefs.h <<\EOF
4806#define HAVE_PSADDR_T 1
4807EOF
4808
4809 fi
4810 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
4811
c906108c 4812
451928c5
AC
4813
4814 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
4815echo "configure:4816: checking for struct link_map32 in sys/link.h" >&5
4816 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
4817 echo $ac_n "(cached) $ac_c" 1>&6
4818else
4819 if test "$cross_compiling" = yes; then
4820 gdb_cv_have_struct_link_map32=yes
4821else
4822 cat > conftest.$ac_ext <<EOF
4823#line 4824 "configure"
4824#include "confdefs.h"
4825#define _SYSCALL32
4826 #include <sys/link.h>
4827 int main()
4828 {
4829 if (sizeof (struct link_map32) > 0)
4830 return 1;
4831 return 0;
4832 }
4833EOF
4834if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4835then
4836 gdb_cv_have_struct_link_map32=no
4837else
4838 echo "configure: failed program was:" >&5
4839 cat conftest.$ac_ext >&5
4840 rm -fr conftest*
4841 gdb_cv_have_struct_link_map32=yes
4842fi
4843rm -fr conftest*
4844fi
4845
4846fi
4847
4848 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
4849 if test $gdb_cv_have_struct_link_map32 = yes; then
4850 cat >> confdefs.h <<\EOF
4851#define HAVE_STRUCT_LINK_MAP32 1
4852EOF
4853
4854 fi
4855
c906108c 4856
746a987d 4857
d84dd0c5
MK
4858 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
4859 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
451928c5 4860echo "configure:4861: checking whether prfpregset_t type is broken" >&5
d84dd0c5
MK
4861 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
4862 echo $ac_n "(cached) $ac_c" 1>&6
4863else
4864 if test "$cross_compiling" = yes; then
4865 gdb_cv_prfpregset_t_broken=yes
4866else
4867 cat > conftest.$ac_ext <<EOF
451928c5 4868#line 4869 "configure"
d84dd0c5
MK
4869#include "confdefs.h"
4870#include <sys/procfs.h>
4871 int main ()
4872 {
4873 if (sizeof (prfpregset_t) == sizeof (void *))
4874 return 1;
4875 return 0;
4876 }
4877EOF
451928c5 4878if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
d84dd0c5
MK
4879then
4880 gdb_cv_prfpregset_t_broken=no
4881else
4882 echo "configure: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 rm -fr conftest*
4885 gdb_cv_prfpregset_t_broken=yes
4886fi
4887rm -fr conftest*
4888fi
4889
4890fi
4891
4892 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
4893 if test $gdb_cv_prfpregset_t_broken = yes; then
4894 cat >> confdefs.h <<\EOF
4895#define PRFPREGSET_T_BROKEN 1
4896EOF
4897
4898 fi
4899 fi
4900
4901
c906108c 4902 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
451928c5 4903echo "configure:4904: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
c906108c
SS
4904 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
4905 echo $ac_n "(cached) $ac_c" 1>&6
4906else
4907 cat > conftest.$ac_ext <<EOF
451928c5 4908#line 4909 "configure"
c906108c
SS
4909#include "confdefs.h"
4910#include <unistd.h>
4911#include <sys/types.h>
4912#include <sys/procfs.h>
4913
4914int main() {
4915
4916 int dummy;;
4917 dummy = ioctl(0, PIOCSET, &dummy);
4918
4919; return 0; }
4920EOF
451928c5 4921if { (eval echo configure:4922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4922 rm -rf conftest*
4923 gdb_cv_have_procfs_piocset=yes
4924else
4925 echo "configure: failed program was:" >&5
4926 cat conftest.$ac_ext >&5
4927 rm -rf conftest*
4928 gdb_cv_have_procfs_piocset=no
4929fi
4930rm -f conftest*
4931fi
4932
4933 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
4934 if test $gdb_cv_have_procfs_piocset = yes; then
4935 cat >> confdefs.h <<\EOF
4936#define HAVE_PROCFS_PIOCSET 1
4937EOF
4938
4939 fi
4940fi
4941
4942echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
451928c5 4943echo "configure:4944: checking for main in -lm" >&5
c906108c
SS
4944ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
4945if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4946 echo $ac_n "(cached) $ac_c" 1>&6
4947else
4948 ac_save_LIBS="$LIBS"
4949LIBS="-lm $LIBS"
4950cat > conftest.$ac_ext <<EOF
451928c5 4951#line 4952 "configure"
c906108c
SS
4952#include "confdefs.h"
4953
4954int main() {
4955main()
4956; return 0; }
4957EOF
451928c5 4958if { (eval echo configure:4959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
4959 rm -rf conftest*
4960 eval "ac_cv_lib_$ac_lib_var=yes"
4961else
4962 echo "configure: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 rm -rf conftest*
4965 eval "ac_cv_lib_$ac_lib_var=no"
4966fi
4967rm -f conftest*
4968LIBS="$ac_save_LIBS"
4969
4970fi
4971if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4972 echo "$ac_t""yes" 1>&6
4973 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4974 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4975 cat >> confdefs.h <<EOF
4976#define $ac_tr_lib 1
4977EOF
4978
4979 LIBS="-lm $LIBS"
4980
4981else
4982 echo "$ac_t""no" 1>&6
4983fi
4984
4985
4986echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
451928c5 4987echo "configure:4988: checking for wctype in -lc" >&5
c906108c
SS
4988ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
4989if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4991else
4992 ac_save_LIBS="$LIBS"
4993LIBS="-lc $LIBS"
4994cat > conftest.$ac_ext <<EOF
451928c5 4995#line 4996 "configure"
c906108c
SS
4996#include "confdefs.h"
4997/* Override any gcc2 internal prototype to avoid an error. */
4998/* We use char because int might match the return type of a gcc2
4999 builtin and then its argument prototype would still apply. */
5000char wctype();
5001
5002int main() {
5003wctype()
5004; return 0; }
5005EOF
451928c5 5006if { (eval echo configure:5007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5007 rm -rf conftest*
5008 eval "ac_cv_lib_$ac_lib_var=yes"
5009else
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 rm -rf conftest*
5013 eval "ac_cv_lib_$ac_lib_var=no"
5014fi
5015rm -f conftest*
5016LIBS="$ac_save_LIBS"
5017
5018fi
5019if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5020 echo "$ac_t""yes" 1>&6
5021 :
5022else
5023 echo "$ac_t""no" 1>&6
5024echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
451928c5 5025echo "configure:5026: checking for wctype in -lw" >&5
c906108c
SS
5026ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5027if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5028 echo $ac_n "(cached) $ac_c" 1>&6
5029else
5030 ac_save_LIBS="$LIBS"
5031LIBS="-lw $LIBS"
5032cat > conftest.$ac_ext <<EOF
451928c5 5033#line 5034 "configure"
c906108c
SS
5034#include "confdefs.h"
5035/* Override any gcc2 internal prototype to avoid an error. */
5036/* We use char because int might match the return type of a gcc2
5037 builtin and then its argument prototype would still apply. */
5038char wctype();
5039
5040int main() {
5041wctype()
5042; return 0; }
5043EOF
451928c5 5044if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5045 rm -rf conftest*
5046 eval "ac_cv_lib_$ac_lib_var=yes"
5047else
5048 echo "configure: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 rm -rf conftest*
5051 eval "ac_cv_lib_$ac_lib_var=no"
5052fi
5053rm -f conftest*
5054LIBS="$ac_save_LIBS"
5055
5056fi
5057if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5060 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5061 cat >> confdefs.h <<EOF
5062#define $ac_tr_lib 1
5063EOF
5064
5065 LIBS="-lw $LIBS"
5066
5067else
5068 echo "$ac_t""no" 1>&6
5069fi
5070
5071fi
5072
5073
5074
5075echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
451928c5 5076echo "configure:5077: checking for long long support in compiler" >&5
c906108c
SS
5077if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
5078 echo $ac_n "(cached) $ac_c" 1>&6
5079else
5080 cat > conftest.$ac_ext <<EOF
451928c5 5081#line 5082 "configure"
c906108c
SS
5082#include "confdefs.h"
5083
5084int main() {
5085
5086 extern long long foo;
5087 switch (foo & 2) { case 0: return 1; }
5088
5089; return 0; }
5090EOF
451928c5 5091if { (eval echo configure:5092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5092 rm -rf conftest*
5093 gdb_cv_c_long_long=yes
5094else
5095 echo "configure: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
5097 rm -rf conftest*
5098 gdb_cv_c_long_long=no
5099fi
5100rm -f conftest*
5101fi
5102
5103echo "$ac_t""$gdb_cv_c_long_long" 1>&6
5104if test $gdb_cv_c_long_long = yes; then
5105 cat >> confdefs.h <<\EOF
5106#define CC_HAS_LONG_LONG 1
5107EOF
5108
5109fi
5110
5111
5112echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
451928c5 5113echo "configure:5114: checking for long long support in printf" >&5
c906108c
SS
5114if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
5115 echo $ac_n "(cached) $ac_c" 1>&6
5116else
5117 if test "$cross_compiling" = yes; then
5118 gdb_cv_printf_has_long_long=no
5119else
5120 cat > conftest.$ac_ext <<EOF
451928c5 5121#line 5122 "configure"
c906108c
SS
5122#include "confdefs.h"
5123
5124int main () {
5125 char buf[32];
5126 long long l = 0;
5127 l = (l << 16) + 0x0123;
5128 l = (l << 16) + 0x4567;
5129 l = (l << 16) + 0x89ab;
5130 l = (l << 16) + 0xcdef;
5131 sprintf (buf, "0x%016llx", l);
5132 return (strcmp ("0x0123456789abcdef", buf));
5133}
5134EOF
451928c5 5135if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5136then
5137 gdb_cv_printf_has_long_long=yes
5138else
5139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 rm -fr conftest*
5142 gdb_cv_printf_has_long_long=no
5143fi
5144rm -fr conftest*
5145fi
5146
5147fi
5148
5149if test $gdb_cv_printf_has_long_long = yes; then
5150 cat >> confdefs.h <<\EOF
5151#define PRINTF_HAS_LONG_LONG 1
5152EOF
5153
5154fi
5155echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
5156
5157
5158echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
451928c5 5159echo "configure:5160: checking for long double support in compiler" >&5
c906108c
SS
5160if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
5162else
5163 cat > conftest.$ac_ext <<EOF
451928c5 5164#line 5165 "configure"
c906108c
SS
5165#include "confdefs.h"
5166
5167int main() {
5168long double foo;
5169; return 0; }
5170EOF
451928c5 5171if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5172 rm -rf conftest*
5173 ac_cv_c_long_double=yes
5174else
5175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5177 rm -rf conftest*
5178 ac_cv_c_long_double=no
5179fi
5180rm -f conftest*
5181fi
5182
5183echo "$ac_t""$ac_cv_c_long_double" 1>&6
5184if test $ac_cv_c_long_double = yes; then
5185 cat >> confdefs.h <<\EOF
5186#define HAVE_LONG_DOUBLE 1
5187EOF
5188
5189fi
5190
5191
5192echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
451928c5 5193echo "configure:5194: checking for long double support in printf" >&5
c906108c
SS
5194if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 if test "$cross_compiling" = yes; then
5198 gdb_cv_printf_has_long_double=no
5199else
5200 cat > conftest.$ac_ext <<EOF
451928c5 5201#line 5202 "configure"
c906108c
SS
5202#include "confdefs.h"
5203
5204int main () {
5205 char buf[16];
5206 long double f = 3.141592653;
5207 sprintf (buf, "%Lg", f);
5208 return (strncmp ("3.14159", buf, 7));
5209}
5210EOF
451928c5 5211if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5212then
5213 gdb_cv_printf_has_long_double=yes
5214else
5215 echo "configure: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
5217 rm -fr conftest*
5218 gdb_cv_printf_has_long_double=no
5219fi
5220rm -fr conftest*
5221fi
5222
5223fi
5224
5225if test $gdb_cv_printf_has_long_double = yes; then
5226 cat >> confdefs.h <<\EOF
5227#define PRINTF_HAS_LONG_DOUBLE 1
5228EOF
5229
5230fi
5231echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
5232
5233
5234echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
451928c5 5235echo "configure:5236: checking for long double support in scanf" >&5
c906108c
SS
5236if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
5237 echo $ac_n "(cached) $ac_c" 1>&6
5238else
5239 if test "$cross_compiling" = yes; then
5240 gdb_cv_scanf_has_long_double=no
5241else
5242 cat > conftest.$ac_ext <<EOF
451928c5 5243#line 5244 "configure"
c906108c
SS
5244#include "confdefs.h"
5245
5246int main () {
5247 char *buf = "3.141592653";
5248 long double f = 0;
5249 sscanf (buf, "%Lg", &f);
5250 return !(f > 3.14159 && f < 3.14160);
5251}
5252EOF
451928c5 5253if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5254then
5255 gdb_cv_scanf_has_long_double=yes
5256else
5257 echo "configure: failed program was:" >&5
5258 cat conftest.$ac_ext >&5
5259 rm -fr conftest*
5260 gdb_cv_scanf_has_long_double=no
5261fi
5262rm -fr conftest*
5263fi
5264
5265fi
5266
5267if test $gdb_cv_scanf_has_long_double = yes; then
5268 cat >> confdefs.h <<\EOF
5269#define SCANF_HAS_LONG_DOUBLE 1
5270EOF
5271
5272fi
5273echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
5274
5275for ac_hdr in unistd.h
5276do
5277ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5278echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
451928c5 5279echo "configure:5280: checking for $ac_hdr" >&5
c906108c
SS
5280if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5281 echo $ac_n "(cached) $ac_c" 1>&6
5282else
5283 cat > conftest.$ac_ext <<EOF
451928c5 5284#line 5285 "configure"
c906108c
SS
5285#include "confdefs.h"
5286#include <$ac_hdr>
5287EOF
5288ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 5289{ (eval echo configure:5290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5290ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5291if test -z "$ac_err"; then
5292 rm -rf conftest*
5293 eval "ac_cv_header_$ac_safe=yes"
5294else
5295 echo "$ac_err" >&5
5296 echo "configure: failed program was:" >&5
5297 cat conftest.$ac_ext >&5
5298 rm -rf conftest*
5299 eval "ac_cv_header_$ac_safe=no"
5300fi
5301rm -f conftest*
5302fi
5303if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5304 echo "$ac_t""yes" 1>&6
5305 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5306 cat >> confdefs.h <<EOF
5307#define $ac_tr_hdr 1
5308EOF
5309
5310else
5311 echo "$ac_t""no" 1>&6
5312fi
5313done
5314
5315for ac_func in getpagesize
5316do
5317echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
451928c5 5318echo "configure:5319: checking for $ac_func" >&5
c906108c
SS
5319if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5320 echo $ac_n "(cached) $ac_c" 1>&6
5321else
5322 cat > conftest.$ac_ext <<EOF
451928c5 5323#line 5324 "configure"
c906108c
SS
5324#include "confdefs.h"
5325/* System header to define __stub macros and hopefully few prototypes,
5326 which can conflict with char $ac_func(); below. */
5327#include <assert.h>
5328/* Override any gcc2 internal prototype to avoid an error. */
5329/* We use char because int might match the return type of a gcc2
5330 builtin and then its argument prototype would still apply. */
5331char $ac_func();
5332
5333int main() {
5334
5335/* The GNU C library defines this for functions which it implements
5336 to always fail with ENOSYS. Some functions are actually named
5337 something starting with __ and the normal name is an alias. */
5338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5339choke me
5340#else
5341$ac_func();
5342#endif
5343
5344; return 0; }
5345EOF
451928c5 5346if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5347 rm -rf conftest*
5348 eval "ac_cv_func_$ac_func=yes"
5349else
5350 echo "configure: failed program was:" >&5
5351 cat conftest.$ac_ext >&5
5352 rm -rf conftest*
5353 eval "ac_cv_func_$ac_func=no"
5354fi
5355rm -f conftest*
5356fi
5357
5358if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5359 echo "$ac_t""yes" 1>&6
5360 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5361 cat >> confdefs.h <<EOF
5362#define $ac_tr_func 1
5363EOF
5364
5365else
5366 echo "$ac_t""no" 1>&6
5367fi
5368done
5369
5370echo $ac_n "checking for working mmap""... $ac_c" 1>&6
451928c5 5371echo "configure:5372: checking for working mmap" >&5
c906108c
SS
5372if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5373 echo $ac_n "(cached) $ac_c" 1>&6
5374else
5375 if test "$cross_compiling" = yes; then
5376 ac_cv_func_mmap_fixed_mapped=no
5377else
5378 cat > conftest.$ac_ext <<EOF
451928c5 5379#line 5380 "configure"
c906108c
SS
5380#include "confdefs.h"
5381
5382/* Thanks to Mike Haertel and Jim Avera for this test.
5383 Here is a matrix of mmap possibilities:
5384 mmap private not fixed
5385 mmap private fixed at somewhere currently unmapped
5386 mmap private fixed at somewhere already mapped
5387 mmap shared not fixed
5388 mmap shared fixed at somewhere currently unmapped
5389 mmap shared fixed at somewhere already mapped
5390 For private mappings, we should verify that changes cannot be read()
5391 back from the file, nor mmap's back from the file at a different
5392 address. (There have been systems where private was not correctly
5393 implemented like the infamous i386 svr4.0, and systems where the
5394 VM page cache was not coherent with the filesystem buffer cache
5395 like early versions of FreeBSD and possibly contemporary NetBSD.)
5396 For shared mappings, we should conversely verify that changes get
5397 propogated back to all the places they're supposed to be.
5398
5399 Grep wants private fixed already mapped.
5400 The main things grep needs to know about mmap are:
5401 * does it exist and is it safe to write into the mmap'd area
5402 * how to use it (BSD variants) */
5403#include <sys/types.h>
5404#include <fcntl.h>
5405#include <sys/mman.h>
5406
5407/* This mess was copied from the GNU getpagesize.h. */
5408#ifndef HAVE_GETPAGESIZE
5409# ifdef HAVE_UNISTD_H
5410# include <unistd.h>
5411# endif
5412
5413/* Assume that all systems that can run configure have sys/param.h. */
5414# ifndef HAVE_SYS_PARAM_H
5415# define HAVE_SYS_PARAM_H 1
5416# endif
5417
5418# ifdef _SC_PAGESIZE
5419# define getpagesize() sysconf(_SC_PAGESIZE)
5420# else /* no _SC_PAGESIZE */
5421# ifdef HAVE_SYS_PARAM_H
5422# include <sys/param.h>
5423# ifdef EXEC_PAGESIZE
5424# define getpagesize() EXEC_PAGESIZE
5425# else /* no EXEC_PAGESIZE */
5426# ifdef NBPG
5427# define getpagesize() NBPG * CLSIZE
5428# ifndef CLSIZE
5429# define CLSIZE 1
5430# endif /* no CLSIZE */
5431# else /* no NBPG */
5432# ifdef NBPC
5433# define getpagesize() NBPC
5434# else /* no NBPC */
5435# ifdef PAGESIZE
5436# define getpagesize() PAGESIZE
5437# endif /* PAGESIZE */
5438# endif /* no NBPC */
5439# endif /* no NBPG */
5440# endif /* no EXEC_PAGESIZE */
5441# else /* no HAVE_SYS_PARAM_H */
5442# define getpagesize() 8192 /* punt totally */
5443# endif /* no HAVE_SYS_PARAM_H */
5444# endif /* no _SC_PAGESIZE */
5445
5446#endif /* no HAVE_GETPAGESIZE */
5447
5448#ifdef __cplusplus
5449extern "C" { void *malloc(unsigned); }
5450#else
5451char *malloc();
5452#endif
5453
5454int
5455main()
5456{
5457 char *data, *data2, *data3;
5458 int i, pagesize;
5459 int fd;
5460
5461 pagesize = getpagesize();
5462
5463 /*
5464 * First, make a file with some known garbage in it.
5465 */
5466 data = malloc(pagesize);
5467 if (!data)
5468 exit(1);
5469 for (i = 0; i < pagesize; ++i)
5470 *(data + i) = rand();
5471 umask(0);
5472 fd = creat("conftestmmap", 0600);
5473 if (fd < 0)
5474 exit(1);
5475 if (write(fd, data, pagesize) != pagesize)
5476 exit(1);
5477 close(fd);
5478
5479 /*
5480 * Next, try to mmap the file at a fixed address which
5481 * already has something else allocated at it. If we can,
5482 * also make sure that we see the same garbage.
5483 */
5484 fd = open("conftestmmap", O_RDWR);
5485 if (fd < 0)
5486 exit(1);
5487 data2 = malloc(2 * pagesize);
5488 if (!data2)
5489 exit(1);
5490 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5491 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5492 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5493 exit(1);
5494 for (i = 0; i < pagesize; ++i)
5495 if (*(data + i) != *(data2 + i))
5496 exit(1);
5497
5498 /*
5499 * Finally, make sure that changes to the mapped area
5500 * do not percolate back to the file as seen by read().
5501 * (This is a bug on some variants of i386 svr4.0.)
5502 */
5503 for (i = 0; i < pagesize; ++i)
5504 *(data2 + i) = *(data2 + i) + 1;
5505 data3 = malloc(pagesize);
5506 if (!data3)
5507 exit(1);
5508 if (read(fd, data3, pagesize) != pagesize)
5509 exit(1);
5510 for (i = 0; i < pagesize; ++i)
5511 if (*(data + i) != *(data3 + i))
5512 exit(1);
5513 close(fd);
5514 unlink("conftestmmap");
5515 exit(0);
5516}
5517
5518EOF
451928c5 5519if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5520then
5521 ac_cv_func_mmap_fixed_mapped=yes
5522else
5523 echo "configure: failed program was:" >&5
5524 cat conftest.$ac_ext >&5
5525 rm -fr conftest*
5526 ac_cv_func_mmap_fixed_mapped=no
5527fi
5528rm -fr conftest*
5529fi
5530
5531fi
5532
5533echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5534if test $ac_cv_func_mmap_fixed_mapped = yes; then
5535 cat >> confdefs.h <<\EOF
5536#define HAVE_MMAP 1
5537EOF
5538
5539fi
5540
5541
5542
5543
5544if test ${build} = ${host} -a ${host} = ${target} ; then
5545 case ${host_os} in
5546 hpux*)
5547 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
451928c5 5548echo "configure:5549: checking for HPUX/OSF thread support" >&5
c906108c
SS
5549 if test -f /usr/include/dce/cma_config.h ; then
5550 if test "$GCC" = "yes" ; then
5551 echo "$ac_t""yes" 1>&6
5552 cat >> confdefs.h <<\EOF
5553#define HAVE_HPUX_THREAD_SUPPORT 1
5554EOF
5555
5556 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
5557 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
5558 else
5559 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
5560 fi
5561 else
5562 echo "$ac_t""no" 1>&6
5563 fi
5564 ;;
5565 solaris*)
5566 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
451928c5 5567echo "configure:5568: checking for Solaris thread debugging library" >&5
c906108c
SS
5568 if test -f /usr/lib/libthread_db.so.1 ; then
5569 echo "$ac_t""yes" 1>&6
5570 cat >> confdefs.h <<\EOF
5571#define HAVE_THREAD_DB_LIB 1
5572EOF
5573
5574 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
5575 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
5576 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
451928c5 5577echo "configure:5578: checking for dlopen in -ldl" >&5
c906108c
SS
5578ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5579if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581else
5582 ac_save_LIBS="$LIBS"
5583LIBS="-ldl $LIBS"
5584cat > conftest.$ac_ext <<EOF
451928c5 5585#line 5586 "configure"
c906108c
SS
5586#include "confdefs.h"
5587/* Override any gcc2 internal prototype to avoid an error. */
5588/* We use char because int might match the return type of a gcc2
5589 builtin and then its argument prototype would still apply. */
5590char dlopen();
5591
5592int main() {
5593dlopen()
5594; return 0; }
5595EOF
451928c5 5596if { (eval echo configure:5597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5597 rm -rf conftest*
5598 eval "ac_cv_lib_$ac_lib_var=yes"
5599else
5600 echo "configure: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 rm -rf conftest*
5603 eval "ac_cv_lib_$ac_lib_var=no"
5604fi
5605rm -f conftest*
5606LIBS="$ac_save_LIBS"
5607
5608fi
5609if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5610 echo "$ac_t""yes" 1>&6
5611 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5612 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5613 cat >> confdefs.h <<EOF
5614#define $ac_tr_lib 1
5615EOF
5616
5617 LIBS="-ldl $LIBS"
5618
5619else
5620 echo "$ac_t""no" 1>&6
5621fi
5622
5623 if test "$GCC" = "yes" ; then
5624 # The GNU linker requires the -export-dynamic option to make
5625 # all symbols visible in the dynamic symbol table.
5626 hold_ldflags=$LDFLAGS
5627 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
451928c5 5628echo "configure:5629: checking for the ld -export-dynamic flag" >&5
c906108c
SS
5629 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
5630 cat > conftest.$ac_ext <<EOF
451928c5 5631#line 5632 "configure"
c906108c
SS
5632#include "confdefs.h"
5633
5634int main() {
5635int i;
5636; return 0; }
5637EOF
451928c5 5638if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5639 rm -rf conftest*
5640 found=yes
5641else
5642 echo "configure: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 rm -rf conftest*
5645 found=no
5646fi
5647rm -f conftest*
5648 LDFLAGS=$hold_ldflags
5649 echo "$ac_t""$found" 1>&6
5650 if test $found = yes; then
5651 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
5652 fi
5653 fi
5654 # Sun randomly tweaked the prototypes in <proc_service.h>
5655 # at one point.
5656 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
451928c5 5657echo "configure:5658: checking if <proc_service.h> is old" >&5
c906108c
SS
5658 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
5659 echo $ac_n "(cached) $ac_c" 1>&6
5660else
5661
5662 cat > conftest.$ac_ext <<EOF
451928c5 5663#line 5664 "configure"
c906108c
SS
5664#include "confdefs.h"
5665
5666 #include <proc_service.h>
5667 ps_err_e ps_pdwrite
5668 (struct ps_prochandle*, psaddr_t, const void*, size_t);
5669
5670int main() {
5671
5672; return 0; }
5673EOF
451928c5 5674if { (eval echo configure:5675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5675 rm -rf conftest*
5676 gdb_cv_proc_service_is_old=no
5677else
5678 echo "configure: failed program was:" >&5
5679 cat conftest.$ac_ext >&5
5680 rm -rf conftest*
5681 gdb_cv_proc_service_is_old=yes
5682fi
5683rm -f conftest*
5684
5685fi
5686
5687 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
5688 if test $gdb_cv_proc_service_is_old = yes; then
5689 cat >> confdefs.h <<\EOF
5690#define PROC_SERVICE_IS_OLD 1
5691EOF
5692
5693 fi
5694 else
5695 echo "$ac_t""no" 1>&6
5696 fi
5697 ;;
5698 esac
5699
5700fi
5701
fb40c209
AC
5702
5703# Check whether --enable-gdbmi or --disable-gdbmi was given.
5704if test "${enable_gdbmi+set}" = set; then
5705 enableval="$enable_gdbmi"
5706
5707 case "${enable_gdbmi}" in
5708 yes | no) ;;
5709 "") enable_gdbmi=yes ;;
5710 *)
5711 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
5712 ;;
5713 esac
5714
5715fi
5716
5717case ${enable_gdbmi} in
5718 "yes" )
5719 if test -d "${srcdir}/mi" ; then
5720 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
5721 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
5722 CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)"
5723 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 5724 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
b3a90332
AC
5725 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
5726 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
e56ac5c3
AC
5727 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
5728 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
5729 fi
5730 ;;
5731esac
c906108c
SS
5732
5733# Check whether --enable-tui or --disable-tui was given.
5734if test "${enable_tui+set}" = set; then
5735 enableval="$enable_tui"
5736
5737 case "${enable_tui}" in
5738 yes | no) ;;
5739 "") enable_tui=yes ;;
5740 *)
5741 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
5742 ;;
5743 esac
5744
5745fi
5746
5747case ${enable_tui} in
5748 "yes" )
ed952ac5
AC
5749 if test -d "${srcdir}/tui" ; then
5750 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
5751 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
5752 CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_TUI_SRCS)"
5753 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
5754 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
5755 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
5756 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
5757 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
5758 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
5759 fi
5760 ;;
c906108c
SS
5761esac
5762
c906108c
SS
5763# Check whether --enable-netrom or --disable-netrom was given.
5764if test "${enable_netrom+set}" = set; then
5765 enableval="$enable_netrom"
5766 case "${enableval}" in
5767yes) enable_netrom=yes ;;
5768no) enable_netrom=no ;;
5769*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
5770esac
5771fi
5772
5773
5774if test "${enable_netrom}" = "yes"; then
5775 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
5776 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
5777fi
5778
1decb323 5779
d8038014
AC
5780# Don't add -Wall or -Wunused, they include -Wunused-parameter which
5781# causes noise.
1decb323 5782build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
16cadf39 5783-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
5784# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
5785# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
5786# -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual
5787# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
5788# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
5789# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
5790# Check whether --enable-build-warnings or --disable-build-warnings was given.
5791if test "${enable_build_warnings+set}" = set; then
5792 enableval="$enable_build_warnings"
1decb323 5793 case "${enableval}" in
c906108c
SS
5794 yes) ;;
5795 no) build_warnings="-w";;
5796 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
5797 build_warnings="${build_warnings} ${t}";;
5798 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
5799 build_warnings="${t} ${build_warnings}";;
5800 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
5801esac
d4f3574e 5802if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 5803 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 5804fi
1decb323 5805fi
104c1213
JM
5806WARN_CFLAGS=""
5807WERROR_CFLAGS=""
c906108c
SS
5808if test "x${build_warnings}" != x -a "x$GCC" = xyes
5809then
746a987d 5810 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
451928c5 5811echo "configure:5812: checking compiler warning flags" >&5
746a987d
AC
5812 # Separate out the -Werror flag as some files just cannot be
5813 # compiled with it enabled.
5814 for w in ${build_warnings}; do
5815 case $w in
5816 -Werr*) WERROR_CFLAGS=-Werror ;;
5817 *) # Check that GCC accepts it
5818 if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then
5819 :
5820 else
5821 WARN_CFLAGS="${WARN_CFLAGS} $w"
5822 fi
5823 esac
5824 done
5825 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
5826fi
5827
5828
104c1213 5829
c906108c
SS
5830MMALLOC_CFLAGS=
5831MMALLOC=
5832
5833
5834
5835# Check whether --with-mmalloc or --without-mmalloc was given.
5836if test "${with_mmalloc+set}" = set; then
5837 withval="$with_mmalloc"
5838 case "${withval}" in
5839 yes) want_mmalloc=true ;;
5840 no) want_mmalloc=false;;
5841 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
5842esac
5843else
5844 want_mmalloc=false
5845fi
5846
5847if test x$want_mmalloc = xtrue; then
5848 cat >> confdefs.h <<\EOF
5849#define USE_MMALLOC 1
5850EOF
5851
5852 cat >> confdefs.h <<\EOF
5853#define MMCHECK_FORCE 1
5854EOF
5855
5856 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
5857 MMALLOC='../mmalloc/libmmalloc.a'
5858fi
5859
88987551
L
5860# Check whether --with-included-regex or --without-included-regex was given.
5861if test "${with_included_regex+set}" = set; then
5862 withval="$with_included_regex"
5863 case "${withval}" in
5864 yes) want_included_regex=true ;;
5865 no) want_included_regex=false;;
5866 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
5867esac
5868else
5869 want_included_regex=true
5870fi
5871
88987551
L
5872if test $want_included_regex = false; then
5873 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
451928c5 5874echo "configure:5875: checking for GNU regex" >&5
88987551
L
5875 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
5876 echo $ac_n "(cached) $ac_c" 1>&6
5877else
5878 cat > conftest.$ac_ext <<EOF
451928c5 5879#line 5880 "configure"
88987551
L
5880#include "confdefs.h"
5881#include <gnu-versions.h>
5882#include <sys/types.h>
5883#include <regex.h>
5884int main() {
5885#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
5886#error No valid GNU regex.
5887#endif
5888
5889; return 0; }
5890EOF
451928c5 5891if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
88987551
L
5892 rm -rf conftest*
5893 gdb_cv_have_gnu_regex=yes
5894else
5895 echo "configure: failed program was:" >&5
5896 cat conftest.$ac_ext >&5
5897 rm -rf conftest*
5898 gdb_cv_have_gnu_regex=no
5899fi
5900rm -f conftest*
5901fi
5902
5903 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
e48f66e4
AC
5904 if test $gdb_cv_have_gnu_regex = no; then
5905 want_included_regex=true
88987551
L
5906 fi
5907fi
5908
e48f66e4
AC
5909if test x${want_included_regex} = xtrue; then
5910 REGEX="gnu-regex.o"
5911 cat >> confdefs.h <<\EOF
5912#define USE_INCLUDED_REGEX 1
5913EOF
5914
5915fi
88987551 5916
7a292a7a
SS
5917
5918# In the Cygwin environment, we need some additional flags.
5919echo $ac_n "checking for cygwin""... $ac_c" 1>&6
451928c5 5920echo "configure:5921: checking for cygwin" >&5
7a292a7a
SS
5921if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
5922 echo $ac_n "(cached) $ac_c" 1>&6
5923else
5924 cat > conftest.$ac_ext <<EOF
451928c5 5925#line 5926 "configure"
7a292a7a
SS
5926#include "confdefs.h"
5927
5928#if defined (__CYGWIN__) || defined (__CYGWIN32__)
5929lose
5930#endif
5931EOF
5932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5933 egrep "lose" >/dev/null 2>&1; then
5934 rm -rf conftest*
5935 gdb_cv_os_cygwin=yes
5936else
5937 rm -rf conftest*
5938 gdb_cv_os_cygwin=no
5939fi
5940rm -f conftest*
5941
5942fi
5943
5944echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
5945
aff38e61
AC
5946
5947SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
5948case ${host} in
95cbc983
AC
5949 *go32* ) SER_HARDWIRE=ser-go32.o ;;
5950 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
5951esac
5952
5953
5954
b83266a0
SS
5955if test x$gdb_host = xgo32; then
5956 TERM_LIB=
5957else
c906108c
SS
5958if test x$gdb_cv_os_cygwin = xyes; then
5959 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
5960else
5961 TERM_LIB=
5962 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
451928c5 5963echo "configure:5964: checking for tgetent in -lncurses" >&5
c906108c
SS
5964ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
5965if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5966 echo $ac_n "(cached) $ac_c" 1>&6
5967else
5968 ac_save_LIBS="$LIBS"
5969LIBS="-lncurses $LIBS"
5970cat > conftest.$ac_ext <<EOF
451928c5 5971#line 5972 "configure"
c906108c
SS
5972#include "confdefs.h"
5973/* Override any gcc2 internal prototype to avoid an error. */
5974/* We use char because int might match the return type of a gcc2
5975 builtin and then its argument prototype would still apply. */
5976char tgetent();
5977
5978int main() {
5979tgetent()
5980; return 0; }
5981EOF
451928c5 5982if { (eval echo configure:5983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5983 rm -rf conftest*
5984 eval "ac_cv_lib_$ac_lib_var=yes"
5985else
5986 echo "configure: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5988 rm -rf conftest*
5989 eval "ac_cv_lib_$ac_lib_var=no"
5990fi
5991rm -f conftest*
5992LIBS="$ac_save_LIBS"
5993
5994fi
5995if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5996 echo "$ac_t""yes" 1>&6
5997 TERM_LIB=-lncurses
5998else
5999 echo "$ac_t""no" 1>&6
6000echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
451928c5 6001echo "configure:6002: checking for tgetent in -lHcurses" >&5
c906108c
SS
6002ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
6003if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6005else
6006 ac_save_LIBS="$LIBS"
6007LIBS="-lHcurses $LIBS"
6008cat > conftest.$ac_ext <<EOF
451928c5 6009#line 6010 "configure"
c906108c
SS
6010#include "confdefs.h"
6011/* Override any gcc2 internal prototype to avoid an error. */
6012/* We use char because int might match the return type of a gcc2
6013 builtin and then its argument prototype would still apply. */
6014char tgetent();
6015
6016int main() {
6017tgetent()
6018; return 0; }
6019EOF
451928c5 6020if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6021 rm -rf conftest*
6022 eval "ac_cv_lib_$ac_lib_var=yes"
6023else
6024 echo "configure: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 rm -rf conftest*
6027 eval "ac_cv_lib_$ac_lib_var=no"
6028fi
6029rm -f conftest*
6030LIBS="$ac_save_LIBS"
6031
6032fi
6033if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6034 echo "$ac_t""yes" 1>&6
6035 TERM_LIB=-lHcurses
6036else
6037 echo "$ac_t""no" 1>&6
6038echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
451928c5 6039echo "configure:6040: checking for tgetent in -ltermlib" >&5
c906108c
SS
6040ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
6041if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6042 echo $ac_n "(cached) $ac_c" 1>&6
6043else
6044 ac_save_LIBS="$LIBS"
6045LIBS="-ltermlib $LIBS"
6046cat > conftest.$ac_ext <<EOF
451928c5 6047#line 6048 "configure"
c906108c
SS
6048#include "confdefs.h"
6049/* Override any gcc2 internal prototype to avoid an error. */
6050/* We use char because int might match the return type of a gcc2
6051 builtin and then its argument prototype would still apply. */
6052char tgetent();
6053
6054int main() {
6055tgetent()
6056; return 0; }
6057EOF
451928c5 6058if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6059 rm -rf conftest*
6060 eval "ac_cv_lib_$ac_lib_var=yes"
6061else
6062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
6064 rm -rf conftest*
6065 eval "ac_cv_lib_$ac_lib_var=no"
6066fi
6067rm -f conftest*
6068LIBS="$ac_save_LIBS"
6069
6070fi
6071if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6072 echo "$ac_t""yes" 1>&6
6073 TERM_LIB=-ltermlib
6074else
6075 echo "$ac_t""no" 1>&6
6076echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
451928c5 6077echo "configure:6078: checking for tgetent in -ltermcap" >&5
c906108c
SS
6078ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
6079if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6080 echo $ac_n "(cached) $ac_c" 1>&6
6081else
6082 ac_save_LIBS="$LIBS"
6083LIBS="-ltermcap $LIBS"
6084cat > conftest.$ac_ext <<EOF
451928c5 6085#line 6086 "configure"
c906108c
SS
6086#include "confdefs.h"
6087/* Override any gcc2 internal prototype to avoid an error. */
6088/* We use char because int might match the return type of a gcc2
6089 builtin and then its argument prototype would still apply. */
6090char tgetent();
6091
6092int main() {
6093tgetent()
6094; return 0; }
6095EOF
451928c5 6096if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6097 rm -rf conftest*
6098 eval "ac_cv_lib_$ac_lib_var=yes"
6099else
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
6103 eval "ac_cv_lib_$ac_lib_var=no"
6104fi
6105rm -f conftest*
6106LIBS="$ac_save_LIBS"
6107
6108fi
6109if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6110 echo "$ac_t""yes" 1>&6
6111 TERM_LIB=-ltermcap
6112else
6113 echo "$ac_t""no" 1>&6
6114echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
451928c5 6115echo "configure:6116: checking for tgetent in -lcurses" >&5
c906108c
SS
6116ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
6117if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6118 echo $ac_n "(cached) $ac_c" 1>&6
6119else
6120 ac_save_LIBS="$LIBS"
6121LIBS="-lcurses $LIBS"
6122cat > conftest.$ac_ext <<EOF
451928c5 6123#line 6124 "configure"
c906108c
SS
6124#include "confdefs.h"
6125/* Override any gcc2 internal prototype to avoid an error. */
6126/* We use char because int might match the return type of a gcc2
6127 builtin and then its argument prototype would still apply. */
6128char tgetent();
6129
6130int main() {
6131tgetent()
6132; return 0; }
6133EOF
451928c5 6134if { (eval echo configure:6135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6135 rm -rf conftest*
6136 eval "ac_cv_lib_$ac_lib_var=yes"
6137else
6138 echo "configure: failed program was:" >&5
6139 cat conftest.$ac_ext >&5
6140 rm -rf conftest*
6141 eval "ac_cv_lib_$ac_lib_var=no"
6142fi
6143rm -f conftest*
6144LIBS="$ac_save_LIBS"
6145
6146fi
6147if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6148 echo "$ac_t""yes" 1>&6
6149 TERM_LIB=-lcurses
6150else
6151 echo "$ac_t""no" 1>&6
6152echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
451928c5 6153echo "configure:6154: checking for tgetent in -lterminfo" >&5
c906108c
SS
6154ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
6155if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6156 echo $ac_n "(cached) $ac_c" 1>&6
6157else
6158 ac_save_LIBS="$LIBS"
6159LIBS="-lterminfo $LIBS"
6160cat > conftest.$ac_ext <<EOF
451928c5 6161#line 6162 "configure"
c906108c
SS
6162#include "confdefs.h"
6163/* Override any gcc2 internal prototype to avoid an error. */
6164/* We use char because int might match the return type of a gcc2
6165 builtin and then its argument prototype would still apply. */
6166char tgetent();
6167
6168int main() {
6169tgetent()
6170; return 0; }
6171EOF
451928c5 6172if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6173 rm -rf conftest*
6174 eval "ac_cv_lib_$ac_lib_var=yes"
6175else
6176 echo "configure: failed program was:" >&5
6177 cat conftest.$ac_ext >&5
6178 rm -rf conftest*
6179 eval "ac_cv_lib_$ac_lib_var=no"
6180fi
6181rm -f conftest*
6182LIBS="$ac_save_LIBS"
6183
6184fi
6185if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6186 echo "$ac_t""yes" 1>&6
6187 TERM_LIB=-lterminfo
6188else
6189 echo "$ac_t""no" 1>&6
6190fi
6191
6192fi
6193
6194fi
6195
6196fi
6197
6198fi
6199
6200fi
6201
6202
6203 if test "x$TERM_LIB" = x
6204 then
6205 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
6206 fi
6207fi
b83266a0 6208fi
c906108c
SS
6209
6210
cd0fc7c3
SS
6211# libreadline needs libuser32.a in a cygwin environment
6212WIN32LIBS=
6213if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
6214 WIN32LIBS="-luser32"
6215 case "${target}" in
6216 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
6217 ;;
6218 esac
cd0fc7c3 6219fi
c906108c 6220
7a292a7a 6221
3fc11d3e
JM
6222LIBGUI="../libgui/src/libgui.a"
6223GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
6224
6225
7a292a7a 6226
8b93c638
JM
6227# Check whether --with-cpu or --without-cpu was given.
6228if test "${with_cpu+set}" = set; then
6229 withval="$with_cpu"
6230 case "${target}" in
6231 powerpc-* | powerpcle-* )
6232 ## It would be nice to keep this table in sync with the one in
6233 ## gcc/configure.
6234 case "${with_cpu}" in
6235 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
6236 | 604 | 750 )
6237 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
6238 ;;
6239 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
6240 ## These are all RS6000 variants, as far as GDB is concerned.
6241 with_cpu=rs6000
6242 ;;
6243 603e | ec603e )
6244 with_cpu=603
6245 ;;
6246 604e )
6247 with_cpu=604
6248 ;;
6249 * )
6250 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
6251 with_cpu=ppc-uisa
6252 ;;
6253 esac
6254 ;;
6255 * )
6256 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
6257 ;;
6258esac
6259cat >> confdefs.h <<EOF
6260#define TARGET_CPU_DEFAULT "${with_cpu}"
6261EOF
6262
6263
6264fi
6265
6266
6267
3fc11d3e
JM
6268# Check whether --enable-gdbtk or --disable-gdbtk was given.
6269if test "${enable_gdbtk+set}" = set; then
6270 enableval="$enable_gdbtk"
6271 case "${enableval}" in
6272 yes)
6273 case "$host" in
6274 *go32*)
6275 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
6276 enable_gdbtk=no ;;
6277 *windows*)
6278 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
6279 enable_gdbtk=no ;;
6280 *)
6281 enable_gdbtk=yes ;;
6282 esac ;;
6283 no)
6284 enable_gdbtk=no ;;
6285 *)
6286 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
6287esac
6288else
6289
6290# Default is on for everything but go32 and Cygwin
6291case "$host" in
6292 *go32* | *windows*)
6293 ;;
6294 *)
379d6434
AC
6295 if test -d "${srcdir}/gdbtk" ; then
6296 enable_gdbtk=yes
6297 fi
6298 ;;
6299esac
3fc11d3e
JM
6300
6301fi
6302
6303
6304WIN32LDAPP=
6305
6306
6307
6308configdir="unix"
6309
6310GDBTKLIBS=
6311if test "${enable_gdbtk}" = "yes"; then
6312
6313
6314#
6315# Ok, lets find the tcl configuration
6316# First, look for one uninstalled.
6317# the alternative search directory is invoked by --with-tclconfig
6318#
6319
6320if test x"${no_tcl}" = x ; then
6321 # we reset no_tcl in case something fails here
6322 no_tcl=true
6323 # Check whether --with-tclconfig or --without-tclconfig was given.
6324if test "${with_tclconfig+set}" = set; then
6325 withval="$with_tclconfig"
6326 with_tclconfig=${withval}
6327fi
6328
6329 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
451928c5 6330echo "configure:6331: checking for Tcl configuration" >&5
3fc11d3e
JM
6331 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
6332 echo $ac_n "(cached) $ac_c" 1>&6
6333else
6334
6335
6336 # First check to see if --with-tclconfig was specified.
6337 if test x"${with_tclconfig}" != x ; then
6338 if test -f "${with_tclconfig}/tclConfig.sh" ; then
6339 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
6340 else
6341 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
6342 fi
6343 fi
6344
6345 # then check for a private Tcl installation
6346 if test x"${ac_cv_c_tclconfig}" = x ; then
6347 for i in \
6348 ../tcl \
6349 `ls -dr ../tcl[7-9]* 2>/dev/null` \
6350 ../../tcl \
6351 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
6352 ../../../tcl \
6353 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
6354 if test -f "$i/${configdir}/tclConfig.sh" ; then
6355 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
6356 break
6357 fi
6358 done
6359 fi
6360 # check in a few common install locations
6361 if test x"${ac_cv_c_tclconfig}" = x ; then
6362 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6363 if test -f "$i/tclConfig.sh" ; then
6364 ac_cv_c_tclconfig=`(cd $i; pwd)`
6365 break
6366 fi
6367 done
6368 fi
6369 # check in a few other private locations
6370 if test x"${ac_cv_c_tclconfig}" = x ; then
6371 for i in \
6372 ${srcdir}/../tcl \
6373 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
6374 if test -f "$i/${configdir}/tclConfig.sh" ; then
6375 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
6376 break
6377 fi
6378 done
6379 fi
6380
6381fi
6382
6383 if test x"${ac_cv_c_tclconfig}" = x ; then
6384 TCLCONFIG="# no Tcl configs found"
6385 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
6386 else
6387 no_tcl=
6388 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
6389 echo "$ac_t""found $TCLCONFIG" 1>&6
6390 fi
6391fi
6392
6393 if test -z "${no_tcl}"; then
6394
6395 . $TCLCONFIG
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422#
6423# Ok, lets find the tk configuration
6424# First, look for one uninstalled.
6425# the alternative search directory is invoked by --with-tkconfig
6426#
6427
6428if test x"${no_tk}" = x ; then
6429 # we reset no_tk in case something fails here
6430 no_tk=true
6431 # Check whether --with-tkconfig or --without-tkconfig was given.
6432if test "${with_tkconfig+set}" = set; then
6433 withval="$with_tkconfig"
6434 with_tkconfig=${withval}
6435fi
6436
6437 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
451928c5 6438echo "configure:6439: checking for Tk configuration" >&5
3fc11d3e
JM
6439 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
6440 echo $ac_n "(cached) $ac_c" 1>&6
6441else
6442
6443
6444 # First check to see if --with-tkconfig was specified.
6445 if test x"${with_tkconfig}" != x ; then
6446 if test -f "${with_tkconfig}/tkConfig.sh" ; then
6447 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
6448 else
6449 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
6450 fi
6451 fi
6452
6453 # then check for a private Tk library
6454 if test x"${ac_cv_c_tkconfig}" = x ; then
6455 for i in \
6456 ../tk \
6457 `ls -dr ../tk[4-9]* 2>/dev/null` \
6458 ../../tk \
6459 `ls -dr ../../tk[4-9]* 2>/dev/null` \
6460 ../../../tk \
6461 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
6462 if test -f "$i/${configdir}/tkConfig.sh" ; then
6463 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
6464 break
6465 fi
6466 done
6467 fi
6468 # check in a few common install locations
6469 if test x"${ac_cv_c_tkconfig}" = x ; then
6470 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6471 if test -f "$i/tkConfig.sh" ; then
6472 ac_cv_c_tkconfig=`(cd $i; pwd)`
6473 break
6474 fi
6475 done
6476 fi
6477 # check in a few other private locations
6478 if test x"${ac_cv_c_tkconfig}" = x ; then
6479 for i in \
6480 ${srcdir}/../tk \
6481 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
6482 if test -f "$i/${configdir}/tkConfig.sh" ; then
6483 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
6484 break
6485 fi
6486 done
6487 fi
6488
6489fi
6490
6491 if test x"${ac_cv_c_tkconfig}" = x ; then
6492 TKCONFIG="# no Tk configs found"
6493 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
6494 else
6495 no_tk=
6496 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
6497 echo "$ac_t""found $TKCONFIG" 1>&6
6498 fi
6499fi
6500
6501
6502
6503 # If $no_tk is nonempty, then we can't do Tk, and there is no
6504 # point to doing Tcl.
6505 if test -z "${no_tk}"; then
6506
6507 if test -f "$TKCONFIG" ; then
6508 . $TKCONFIG
6509 fi
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524#
6525# Ok, lets find the tcl source trees so we can use the headers
6526# Warning: transition of version 9 to 10 will break this algorithm
6527# because 10 sorts before 9. We also look for just tcl. We have to
6528# be careful that we don't match stuff like tclX by accident.
6529# the alternative search directory is involked by --with-tclinclude
6530#
6531
6532no_tcl=true
6533echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
451928c5 6534echo "configure:6535: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
6535# Check whether --with-tclinclude or --without-tclinclude was given.
6536if test "${with_tclinclude+set}" = set; then
6537 withval="$with_tclinclude"
6538 with_tclinclude=${withval}
6539fi
6540
6541if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
6542 echo $ac_n "(cached) $ac_c" 1>&6
6543else
6544
6545# first check to see if --with-tclinclude was specified
6546if test x"${with_tclinclude}" != x ; then
6547 if test -f ${with_tclinclude}/tclInt.h ; then
6548 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
6549 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
6550 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
6551 else
6552 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
6553 fi
6554fi
6555
6556# next check if it came with Tcl configuration file
6557if test x"${ac_cv_c_tclconfig}" = x ; then
6558 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
6559 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
6560 fi
6561fi
6562
6563# next check in private source directory
6564#
6565# since ls returns lowest version numbers first, reverse its output
6566if test x"${ac_cv_c_tclh}" = x ; then
6567 for i in \
6568 ${srcdir}/../tcl \
6569 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
6570 ${srcdir}/../../tcl \
6571 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
6572 ${srcdir}/../../../tcl \
6573 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
6574 if test -f $i/generic/tclInt.h ; then
6575 ac_cv_c_tclh=`(cd $i/generic; pwd)`
6576 break
6577 fi
6578 done
6579fi
6580# finally check in a few common install locations
6581#
6582# since ls returns lowest version numbers first, reverse its output
6583if test x"${ac_cv_c_tclh}" = x ; then
6584 for i in \
6585 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
6586 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
6587 /usr/local/src/tcl \
6588 /usr/local/lib/tcl \
6589 ${prefix}/include ; do
6590 if test -f $i/generic/tclInt.h ; then
6591 ac_cv_c_tclh=`(cd $i/generic; pwd)`
6592 break
6593 fi
6594 done
6595fi
6596# see if one is installed
6597if test x"${ac_cv_c_tclh}" = x ; then
6598 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
6599echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
451928c5 6600echo "configure:6601: checking for tclInt.h" >&5
3fc11d3e
JM
6601if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6602 echo $ac_n "(cached) $ac_c" 1>&6
6603else
6604 cat > conftest.$ac_ext <<EOF
451928c5 6605#line 6606 "configure"
3fc11d3e
JM
6606#include "confdefs.h"
6607#include <tclInt.h>
6608EOF
6609ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 6610{ (eval echo configure:6611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
6611ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6612if test -z "$ac_err"; then
6613 rm -rf conftest*
6614 eval "ac_cv_header_$ac_safe=yes"
6615else
6616 echo "$ac_err" >&5
6617 echo "configure: failed program was:" >&5
6618 cat conftest.$ac_ext >&5
6619 rm -rf conftest*
6620 eval "ac_cv_header_$ac_safe=no"
6621fi
6622rm -f conftest*
6623fi
6624if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6625 echo "$ac_t""yes" 1>&6
6626 ac_cv_c_tclh=installed
6627else
6628 echo "$ac_t""no" 1>&6
6629ac_cv_c_tclh=""
6630fi
6631
6632fi
6633
6634fi
6635
6636if test x"${ac_cv_c_tclh}" = x ; then
6637 TCLHDIR="# no Tcl private headers found"
6638 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
6639fi
6640if test x"${ac_cv_c_tclh}" != x ; then
6641 no_tcl=""
6642 if test x"${ac_cv_c_tclh}" = x"installed" ; then
6643 echo "$ac_t""is installed" 1>&6
6644 TCLHDIR=""
6645 else
6646 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
6647 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
6648 TCLHDIR="-I${ac_cv_c_tclh}"
6649 fi
6650fi
6651
6652
6653
6654
6655#
6656# Ok, lets find the tk source trees so we can use the headers
6657# If the directory (presumably symlink) named "tk" exists, use that one
6658# in preference to any others. Same logic is used when choosing library
6659# and again with Tcl. The search order is the best place to look first, then in
6660# decreasing significance. The loop breaks if the trigger file is found.
6661# Note the gross little conversion here of srcdir by cd'ing to the found
6662# directory. This converts the path from a relative to an absolute, so
6663# recursive cache variables for the path will work right. We check all
6664# the possible paths in one loop rather than many seperate loops to speed
6665# things up.
6666# the alternative search directory is involked by --with-tkinclude
6667#
6668no_tk=true
6669echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
451928c5 6670echo "configure:6671: checking for Tk private headers" >&5
3fc11d3e
JM
6671# Check whether --with-tkinclude or --without-tkinclude was given.
6672if test "${with_tkinclude+set}" = set; then
6673 withval="$with_tkinclude"
6674 with_tkinclude=${withval}
6675fi
6676
6677if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
6678 echo $ac_n "(cached) $ac_c" 1>&6
6679else
6680
6681# first check to see if --with-tkinclude was specified
6682if test x"${with_tkinclude}" != x ; then
6683 if test -f ${with_tkinclude}/tk.h ; then
6684 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
6685 elif test -f ${with_tkinclude}/generic/tk.h ; then
6686 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
6687 else
6688 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
6689 fi
6690fi
6691
6692# next check if it came with Tk configuration file
6693if test x"${ac_cv_c_tkconfig}" = x ; then
6694 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
6695 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
6696 fi
6697fi
6698
6699# next check in private source directory
6700#
6701# since ls returns lowest version numbers first, reverse its output
6702if test x"${ac_cv_c_tkh}" = x ; then
6703 for i in \
6704 ${srcdir}/../tk \
6705 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
6706 ${srcdir}/../../tk \
6707 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
6708 ${srcdir}/../../../tk \
6709 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
6710 if test -f $i/generic/tk.h ; then
6711 ac_cv_c_tkh=`(cd $i/generic; pwd)`
6712 break
6713 fi
6714 done
6715fi
6716# finally check in a few common install locations
6717#
6718# since ls returns lowest version numbers first, reverse its output
6719if test x"${ac_cv_c_tkh}" = x ; then
6720 for i in \
6721 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
6722 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
6723 /usr/local/src/tk \
6724 /usr/local/lib/tk \
6725 ${prefix}/include ; do
6726 if test -f $i/generic/tk.h ; then
6727 ac_cv_c_tkh=`(cd $i/generic; pwd)`
6728 break
6729 fi
6730 done
6731fi
6732# see if one is installed
6733if test x"${ac_cv_c_tkh}" = x ; then
6734 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
6735echo $ac_n "checking for tk.h""... $ac_c" 1>&6
451928c5 6736echo "configure:6737: checking for tk.h" >&5
3fc11d3e
JM
6737if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6738 echo $ac_n "(cached) $ac_c" 1>&6
6739else
6740 cat > conftest.$ac_ext <<EOF
451928c5 6741#line 6742 "configure"
3fc11d3e
JM
6742#include "confdefs.h"
6743#include <tk.h>
6744EOF
6745ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 6746{ (eval echo configure:6747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
6747ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6748if test -z "$ac_err"; then
6749 rm -rf conftest*
6750 eval "ac_cv_header_$ac_safe=yes"
6751else
6752 echo "$ac_err" >&5
6753 echo "configure: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6755 rm -rf conftest*
6756 eval "ac_cv_header_$ac_safe=no"
6757fi
6758rm -f conftest*
6759fi
6760if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6761 echo "$ac_t""yes" 1>&6
6762 ac_cv_c_tkh=installed
6763else
6764 echo "$ac_t""no" 1>&6
6765ac_cv_c_tkh=""
6766fi
6767
6768fi
6769
6770fi
6771
6772if test x"${ac_cv_c_tkh}" != x ; then
6773 no_tk=""
6774 if test x"${ac_cv_c_tkh}" = x"installed" ; then
6775 echo "$ac_t""is installed" 1>&6
6776 TKHDIR=""
6777 else
6778 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
6779 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
6780 TKHDIR="-I${ac_cv_c_tkh}"
6781 fi
6782else
6783 TKHDIR="# no Tk directory found"
6784 echo "configure: warning: Can't find Tk private headers" 1>&2
6785 no_tk=true
6786fi
6787
6788
6789
6790
6791echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
451928c5 6792echo "configure:6793: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6793if test x"${ac_cv_c_itclh}" = x ; then
6794 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
6795 if test -f $i/generic/itcl.h ; then
6796 ac_cv_c_itclh=`(cd $i/generic; pwd)`
6797 break
6798 fi
6799 done
6800fi
6801if test x"${ac_cv_c_itclh}" = x ; then
6802 ITCLHDIR="# no Itcl private headers found"
6803 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
6804fi
6805if test x"${ac_cv_c_itclh}" != x ; then
6806 ITCLHDIR="-I${ac_cv_c_itclh}"
6807fi
6808# should always be here
6809# ITCLLIB="../itcl/itcl/unix/libitcl.a"
6810
6811#AC_SUBST(ITCLLIB)
6812
6813
6814echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
451928c5 6815echo "configure:6816: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6816if test x"${ac_cv_c_itkh}" = x ; then
6817 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
6818 if test -f $i/generic/itk.h ; then
6819 ac_cv_c_itkh=`(cd $i/generic; pwd)`
6820 break
6821 fi
6822 done
6823fi
6824if test x"${ac_cv_c_itkh}" = x ; then
6825 ITKHDIR="# no Itk private headers found"
6826 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
6827fi
6828if test x"${ac_cv_c_itkh}" != x ; then
6829 ITKHDIR="-I${ac_cv_c_itkh}"
6830fi
6831# should always be here
6832# ITKLIB="../itcl/itk/unix/libitk.a"
6833
6834#AC_SUBST(ITKLIB)
6835
6836
6837echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
451928c5 6838echo "configure:6839: checking for Tix private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
6839if test x"${ac_cv_c_tixh}" = x ; then
6840 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
6841 if test -f $i/generic/tix.h ; then
6842 ac_cv_c_tixh=`(cd $i/generic; pwd)`
6843 break
6844 fi
6845 done
6846fi
6847if test x"${ac_cv_c_tixh}" = x ; then
6848 TIXHDIR="# no Tix private headers found"
6849 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
6850fi
6851if test x"${ac_cv_c_tixh}" != x ; then
6852 TIXHDIR="-I${ac_cv_c_tixh}"
6853fi
6854
6855
6856
6857 # now look for Itcl library stuff
6858
6859
6860#
6861# Ok, lets find the itcl configuration
6862# First, look for one uninstalled.
6863# the alternative search directory is invoked by --with-itclconfig
6864#
6865
6866if test x"${no_itcl}" = x ; then
6867 # we reset no_itcl in case something fails here
6868 no_itcl=true
6869 # Check whether --with-itclconfig or --without-itclconfig was given.
6870if test "${with_itclconfig+set}" = set; then
6871 withval="$with_itclconfig"
6872 with_itclconfig=${withval}
6873fi
6874
6875 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
451928c5 6876echo "configure:6877: checking for Itcl configuration" >&5
3fc11d3e
JM
6877 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
6878 echo $ac_n "(cached) $ac_c" 1>&6
6879else
6880
6881
6882 # First check to see if --with-itclconfig was specified.
6883 if test x"${with_itclconfig}" != x ; then
6884 if test -f "${with_itclconfig}/itclConfig.sh" ; then
6885 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
6886 else
6887 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
6888 fi
6889 fi
6890
6891 # then check for a private Itcl library
6892 if test x"${ac_cv_c_itclconfig}" = x ; then
6893 for i in \
6894 ../itcl/itcl \
6895 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
6896 ../../itcl \
6897 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
6898 ../../../itcl \
6899 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
6900 if test -f "$i/itclConfig.sh" ; then
6901 ac_cv_c_itclconfig=`(cd $i; pwd)`
6902 break
6903 fi
6904 done
6905 fi
6906 # check in a few common install locations
6907 if test x"${ac_cv_c_itclconfig}" = x ; then
6908 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6909 if test -f "$i/itclConfig.sh" ; then
6910 ac_cv_c_itclconfig=`(cd $i; pwd)`
6911 break
6912 fi
6913 done
6914 fi
6915 # check in a few other private locations
6916 if test x"${ac_cv_c_itclconfig}" = x ; then
6917 for i in \
6918 ${srcdir}/../itcl/itcl \
6919 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
6920 if test -f "$i/itclConfig.sh" ; then
6921 ac_cv_c_itclconfig=`(cd $i; pwd)`
6922 break
6923 fi
6924 done
6925 fi
6926
6927fi
6928
6929 if test x"${ac_cv_c_itclconfig}" = x ; then
6930 ITCLCONFIG="# no Itcl configs found"
6931 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
6932 else
6933 no_itcl=
6934 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
6935 echo "$ac_t""found $ITCLCONFIG" 1>&6
6936 fi
6937fi
6938
6939 if test -z "${no_itcl}"; then
6940
6941 if test -f "$ITCLCONFIG" ; then
6942 . $ITCLCONFIG
6943 fi
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955 case "${host}" in
6956 *-*-cygwin*)
6957 itcldir=../itcl/itcl/win/
6958 ;;
6959 *)
6960 itcldir=../itcl/itcl/unix/
6961 ;;
6962 esac
6963
6964
6965 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
6966 ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
6967 fi
6968
6969
6970 # now look for Itk library stuff
6971
6972#
6973# Ok, lets find the itk configuration
6974# First, look for one uninstalled.
6975# the alternative search directory is invoked by --with-itkconfig
6976#
6977
6978if test x"${no_itk}" = x ; then
6979 # we reset no_itk in case something fails here
6980 no_itk=true
6981 # Check whether --with-itkconfig or --without-itkconfig was given.
6982if test "${with_itkconfig+set}" = set; then
6983 withval="$with_itkconfig"
6984 with_itkconfig=${withval}
6985fi
6986
6987 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
451928c5 6988echo "configure:6989: checking for Itk configuration" >&5
3fc11d3e
JM
6989 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
6990 echo $ac_n "(cached) $ac_c" 1>&6
6991else
6992
6993
6994 # First check to see if --with-itkconfig was specified.
6995 if test x"${with_itkconfig}" != x ; then
6996 if test -f "${with_itkconfig}/itkConfig.sh" ; then
6997 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
6998 else
6999 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
7000 fi
7001 fi
7002
7003 # then check for a private Itk library
7004 if test x"${ac_cv_c_itkconfig}" = x ; then
7005 for i in \
7006 ../itcl/itk \
7007 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
7008 ../../itk \
7009 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
7010 ../../../itk \
7011 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
7012 if test -f "$i/itkConfig.sh" ; then
7013 ac_cv_c_itkconfig=`(cd $i; pwd)`
7014 break
7015 fi
7016 done
7017 fi
7018 # check in a few common install locations
7019 if test x"${ac_cv_c_itkconfig}" = x ; then
7020 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7021 if test -f "$i/itkConfig.sh" ; then
7022 ac_cv_c_itkconfig=`(cd $i; pwd)`
7023 break
7024 fi
7025 done
7026 fi
7027 # check in a few other private locations
7028 if test x"${ac_cv_c_itkconfig}" = x ; then
7029 for i in \
7030 ${srcdir}/../itcl/itk \
7031 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
7032 if test -f "$i/itkConfig.sh" ; then
7033 ac_cv_c_itkconfig=`(cd $i; pwd)`
7034 break
7035 fi
7036 done
7037 fi
7038
7039fi
7040
7041 if test x"${ac_cv_c_itkconfig}" = x ; then
7042 ITKCONFIG="# no Itk configs found"
7043 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
7044 else
7045 no_itk=
7046 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
7047 echo "$ac_t""found $ITKCONFIG" 1>&6
7048 fi
7049fi
7050
7051
7052 if test -z "${no_itcl}"; then
7053
7054 if test -f "$ITKCONFIG" ; then
7055 . $ITKCONFIG
7056 fi
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069 case "${host}" in
7070 *-*-cygwin*)
7071 itkdir=../itcl/itk/win/
7072 ;;
7073 *)
7074 itkdir=../itcl/itk/unix/
7075 ;;
7076 esac
7077
7078 ITKLIB="${ITK_BUILD_LIB_SPEC}"
7079 ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
7080 fi
7081
7082 # now look for Tix library stuff
7083
7084#
7085# Ok, lets find the tix configuration
7086# First, look for one uninstalled.
7087# the alternative search directory is invoked by --with-itkconfig
7088#
7089
7090if test x"${no_tix}" = x ; then
7091 # we reset no_tix in case something fails here
7092 no_tix=true
7093 # Check whether --with-tixconfig or --without-tixconfig was given.
7094if test "${with_tixconfig+set}" = set; then
7095 withval="$with_tixconfig"
7096 with_tixconfig=${withval}
7097fi
7098
7099 echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
451928c5 7100echo "configure:7101: checking for Tix configuration" >&5
3fc11d3e
JM
7101 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
7102 echo $ac_n "(cached) $ac_c" 1>&6
7103else
7104
7105
7106 # First check to see if --with-tixconfig was specified.
7107 if test x"${with_tixconfig}" != x ; then
7108 if test -f "${with_tixconfig}/tixConfig.sh" ; then
7109 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
7110 else
7111 { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
7112 fi
7113 fi
7114
7115 # then check for a private Tix library
7116 if test x"${ac_cv_c_tixconfig}" = x ; then
7117 for i in \
7118 ../tix \
7119 `ls -dr ../tix 2>/dev/null` \
7120 ../../tix \
7121 `ls -dr ../../tix 2>/dev/null` \
7122 ../../../tix \
7123 `ls -dr ../../../tix 2>/dev/null` ; do
7124 echo "**** Looking at $i - with ${configdir}"
7125 if test -f "$i/tixConfig.sh" ; then
7126 ac_cv_c_tixconfig=`(cd $i; pwd)`
7127 break
7128 fi
7129 done
7130 fi
7131 # check in a few common install locations
7132 if test x"${ac_cv_c_tixconfig}" = x ; then
7133 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7134 echo "**** Looking at $i"
7135 if test -f "$i/tixConfig.sh" ; then
7136 ac_cv_c_tixconfig=`(cd $i; pwd)`
7137 break
7138 fi
7139 done
7140 fi
7141 # check in a few other private locations
7142 echo "**** Other private locations"
7143 if test x"${ac_cv_c_tixconfig}" = x ; then
7144 for i in \
7145 ${srcdir}/../tix \
7146 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
7147 echo "**** Looking at $i - with ${configdir}"
7148 if test -f "$i/${configdir}/tixConfig.sh" ; then
7149 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
7150 break
7151 fi
7152 done
7153 fi
7154
7155fi
7156
7157 if test x"${ac_cv_c_tixconfig}" = x ; then
7158 TIXCONFIG="# no Tix configs found"
7159 echo "configure: warning: Can't find Tix configuration definitions" 1>&2
7160 else
7161 no_tix=
7162 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
7163 echo "$ac_t""found $TIXCONFIG" 1>&6
7164 fi
7165fi
7166
7167
7168 if test -z "${no_tix}"; then
7169
7170 if test -f "$TIXCONFIG" ; then
7171 . $TIXCONFIG
7172 fi
7173
7174
7175
7176
7177
7178
7179
7180
7181 TIXLIB="${TIX_BUILD_LIB_SPEC}"
7182 TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
7183 fi
7184
3fc11d3e
JM
7185 ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK"
7186 # Tcl/Tk 8.1 require -fwritable strings. I don't
7187 # know whether 8.2 will or not, but I bet it will.
7188 # I don't have to worry about 7.x since we don't support it.
7189 GDBTK_CFLAGS=""
7190 if test "$GCC" = "yes"; then
7191 if test "$TCL_VERSION" != "8.0" ; then
7192 GDBTK_CFLAGS="-fwritable-strings"
7193 fi
7194 fi
7195
7196 # Include some libraries that Tcl and Tk want.
7197 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
7198 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
7199 # Yes, the ordering seems wrong here. But it isn't.
7200 # TK_LIBS is the list of libraries that need to be linked
7201 # after Tcl/Tk. Note that this isn't put into LIBS. If it
7202 # were in LIBS then any link tests after this point would
7203 # try to include things like `$(LIBGUI)', which wouldn't work.
7204 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
d45b9300
FN
7205 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"
7206 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o"
7207 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 7208 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 7209 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
7210 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
7211 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
7212
7213 if test x$gdb_cv_os_cygwin = xyes; then
7214 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
7215 WIN32LDAPP="-Wl,--subsystem,console"
7216 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
7217 fi
7218 fi
7219 fi
7220fi
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
c906108c
SS
7234# If we find X, set shell vars x_includes and x_libraries to the
7235# paths, otherwise set no_x=yes.
7236# Uses ac_ vars as temps to allow command line to override cache and checks.
7237# --without-x overrides everything else, but does not touch the cache.
7238echo $ac_n "checking for X""... $ac_c" 1>&6
451928c5 7239echo "configure:7240: checking for X" >&5
c906108c
SS
7240
7241# Check whether --with-x or --without-x was given.
7242if test "${with_x+set}" = set; then
7243 withval="$with_x"
7244 :
7245fi
7246
7247# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7248if test "x$with_x" = xno; then
7249 # The user explicitly disabled X.
7250 have_x=disabled
7251else
7252 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7253 # Both variables are already set.
7254 have_x=yes
7255 else
7256if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
7257 echo $ac_n "(cached) $ac_c" 1>&6
7258else
7259 # One or both of the vars are not set, and there is no cached value.
7260ac_x_includes=NO ac_x_libraries=NO
7261rm -fr conftestdir
7262if mkdir conftestdir; then
7263 cd conftestdir
7264 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7265 cat > Imakefile <<'EOF'
7266acfindx:
7267 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7268EOF
7269 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7270 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7271 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7272 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7273 for ac_extension in a so sl; do
7274 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7275 test -f $ac_im_libdir/libX11.$ac_extension; then
7276 ac_im_usrlibdir=$ac_im_libdir; break
7277 fi
7278 done
7279 # Screen out bogus values from the imake configuration. They are
7280 # bogus both because they are the default anyway, and because
7281 # using them would break gcc on systems where it needs fixed includes.
7282 case "$ac_im_incroot" in
7283 /usr/include) ;;
7284 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
7285 esac
7286 case "$ac_im_usrlibdir" in
7287 /usr/lib | /lib) ;;
7288 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
7289 esac
7290 fi
7291 cd ..
7292 rm -fr conftestdir
7293fi
7294
7295if test "$ac_x_includes" = NO; then
7296 # Guess where to find include files, by looking for this one X11 .h file.
7297 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
7298
7299 # First, try using that file with no special directory specified.
7300cat > conftest.$ac_ext <<EOF
451928c5 7301#line 7302 "configure"
c906108c
SS
7302#include "confdefs.h"
7303#include <$x_direct_test_include>
7304EOF
7305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
451928c5 7306{ (eval echo configure:7307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
7307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7308if test -z "$ac_err"; then
7309 rm -rf conftest*
7310 # We can compile using X headers with no special include directory.
7311ac_x_includes=
7312else
7313 echo "$ac_err" >&5
7314 echo "configure: failed program was:" >&5
7315 cat conftest.$ac_ext >&5
7316 rm -rf conftest*
7317 # Look for the header file in a standard set of common directories.
7318# Check X11 before X11Rn because it is often a symlink to the current release.
7319 for ac_dir in \
7320 /usr/X11/include \
7321 /usr/X11R6/include \
7322 /usr/X11R5/include \
7323 /usr/X11R4/include \
7324 \
7325 /usr/include/X11 \
7326 /usr/include/X11R6 \
7327 /usr/include/X11R5 \
7328 /usr/include/X11R4 \
7329 \
7330 /usr/local/X11/include \
7331 /usr/local/X11R6/include \
7332 /usr/local/X11R5/include \
7333 /usr/local/X11R4/include \
7334 \
7335 /usr/local/include/X11 \
7336 /usr/local/include/X11R6 \
7337 /usr/local/include/X11R5 \
7338 /usr/local/include/X11R4 \
7339 \
7340 /usr/X386/include \
7341 /usr/x386/include \
7342 /usr/XFree86/include/X11 \
7343 \
7344 /usr/include \
7345 /usr/local/include \
7346 /usr/unsupported/include \
7347 /usr/athena/include \
7348 /usr/local/x11r5/include \
7349 /usr/lpp/Xamples/include \
7350 \
7351 /usr/openwin/include \
7352 /usr/openwin/share/include \
7353 ; \
7354 do
7355 if test -r "$ac_dir/$x_direct_test_include"; then
7356 ac_x_includes=$ac_dir
7357 break
7358 fi
7359 done
7360fi
7361rm -f conftest*
7362fi # $ac_x_includes = NO
7363
7364if test "$ac_x_libraries" = NO; then
7365 # Check for the libraries.
7366
7367 test -z "$x_direct_test_library" && x_direct_test_library=Xt
7368 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
7369
7370 # See if we find them without any special options.
7371 # Don't add to $LIBS permanently.
7372 ac_save_LIBS="$LIBS"
7373 LIBS="-l$x_direct_test_library $LIBS"
7374cat > conftest.$ac_ext <<EOF
451928c5 7375#line 7376 "configure"
c906108c
SS
7376#include "confdefs.h"
7377
7378int main() {
7379${x_direct_test_function}()
7380; return 0; }
7381EOF
451928c5 7382if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7383 rm -rf conftest*
7384 LIBS="$ac_save_LIBS"
7385# We can link X programs with no special library path.
7386ac_x_libraries=
7387else
7388 echo "configure: failed program was:" >&5
7389 cat conftest.$ac_ext >&5
7390 rm -rf conftest*
7391 LIBS="$ac_save_LIBS"
7392# First see if replacing the include by lib works.
7393# Check X11 before X11Rn because it is often a symlink to the current release.
7394for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
7395 /usr/X11/lib \
7396 /usr/X11R6/lib \
7397 /usr/X11R5/lib \
7398 /usr/X11R4/lib \
7399 \
7400 /usr/lib/X11 \
7401 /usr/lib/X11R6 \
7402 /usr/lib/X11R5 \
7403 /usr/lib/X11R4 \
7404 \
7405 /usr/local/X11/lib \
7406 /usr/local/X11R6/lib \
7407 /usr/local/X11R5/lib \
7408 /usr/local/X11R4/lib \
7409 \
7410 /usr/local/lib/X11 \
7411 /usr/local/lib/X11R6 \
7412 /usr/local/lib/X11R5 \
7413 /usr/local/lib/X11R4 \
7414 \
7415 /usr/X386/lib \
7416 /usr/x386/lib \
7417 /usr/XFree86/lib/X11 \
7418 \
7419 /usr/lib \
7420 /usr/local/lib \
7421 /usr/unsupported/lib \
7422 /usr/athena/lib \
7423 /usr/local/x11r5/lib \
7424 /usr/lpp/Xamples/lib \
7425 /lib/usr/lib/X11 \
7426 \
7427 /usr/openwin/lib \
7428 /usr/openwin/share/lib \
7429 ; \
7430do
7431 for ac_extension in a so sl; do
7432 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
7433 ac_x_libraries=$ac_dir
7434 break 2
7435 fi
7436 done
7437done
7438fi
7439rm -f conftest*
7440fi # $ac_x_libraries = NO
7441
7442if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
7443 # Didn't find X anywhere. Cache the known absence of X.
7444 ac_cv_have_x="have_x=no"
7445else
7446 # Record where we found X for the cache.
7447 ac_cv_have_x="have_x=yes \
7448 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7449fi
7450fi
7451 fi
7452 eval "$ac_cv_have_x"
7453fi # $with_x != no
7454
7455if test "$have_x" != yes; then
7456 echo "$ac_t""$have_x" 1>&6
7457 no_x=yes
7458else
7459 # If each of the values was on the command line, it overrides each guess.
7460 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7461 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7462 # Update the cache value to reflect the command line values.
7463 ac_cv_have_x="have_x=yes \
7464 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7465 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
7466fi
7467
7468
7a292a7a
SS
7469
7470# Unlike the sim directory, whether a simulator is linked is controlled by
7471# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
7472# This code just checks for a few cases where we'd like to ignore those
7473# definitions, even when they're present in the '.mt' file. These cases
7474# are when --disable-sim is specified, or if the simulator directory is
7475# not part of the soruce tree.
7476#
7477# Check whether --enable-sim or --disable-sim was given.
7478if test "${enable_sim+set}" = set; then
7479 enableval="$enable_sim"
7480 echo "enable_sim = $enable_sim";
7481 echo "enableval = ${enableval}";
7482 case "${enableval}" in
7483 yes) ignore_sim=false ;;
7484 no) ignore_sim=true ;;
7485 *) ignore_sim=false ;;
7486 esac
7487else
7488 ignore_sim=false
7489fi
7490
7491
7492if test ! -d "${srcdir}/../sim"; then
7493 ignore_sim=true
7494fi
7495
7496if test "${ignore_sim}" = "true"; then
7497 IGNORE_SIM="SIM="
7498 IGNORE_SIM_OBS="SIM_OBS="
7499else
7500 IGNORE_SIM=""
7501 IGNORE_SIM_OBS=""
7502 cat >> confdefs.h <<\EOF
7503#define WITH_SIM 1
7504EOF
7505
7506fi
7507
7508
7509
c906108c
SS
7510
7511
7512
7513
7514
7515
dfcd3bfb 7516
e56ac5c3
AC
7517
7518
b3a90332
AC
7519
7520
c906108c
SS
7521# Begin stuff to support --enable-shared
7522# Check whether --enable-shared or --disable-shared was given.
7523if test "${enable_shared+set}" = set; then
7524 enableval="$enable_shared"
7525 case "${enableval}" in
7526 yes) shared=true ;;
7527 no) shared=false ;;
7528 *) shared=true ;;
7529esac
7530fi
7531
7532HLDFLAGS=
7533HLDENV=
7534# If we have shared libraries, try to set rpath reasonably.
7535if test "${shared}" = "true"; then
7536 case "${host}" in
7537 *-*-hpux*)
7538 HLDFLAGS='-Wl,+s,+b,$(libdir)'
7539 ;;
7540 *-*-irix5* | *-*-irix6*)
7541 HLDFLAGS='-Wl,-rpath,$(libdir)'
7542 ;;
7543 *-*-linux*aout*)
7544 ;;
88987551 7545 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
7546 HLDFLAGS='-Wl,-rpath,$(libdir)'
7547 ;;
7548 *-*-solaris*)
7549 HLDFLAGS='-R $(libdir)'
7550 ;;
7551 *-*-sysv4*)
7552 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;'
7553 ;;
7554 esac
7555fi
7556
7557# On SunOS, if the linker supports the -rpath option, use it to
7558# prevent ../bfd and ../opcodes from being included in the run time
7559# search path.
7560case "${host}" in
7561 *-*-sunos*)
7562 echo 'main () { }' > conftest.c
7563 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
7564 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
7565 :
7566 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
7567 :
7568 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
7569 :
7570 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
7571 :
7572 elif test "${shared}" = "true"; then
7573 HLDFLAGS='-Wl,-rpath=$(libdir)'
7574 else
7575 HLDFLAGS='-Wl,-rpath='
7576 fi
7577 rm -f conftest.t conftest.c conftest
7578 ;;
7579esac
7580
7581
7582# End stuff to support --enable-shared
7583
7584# target_subdir is used by the testsuite to find the target libraries.
7585target_subdir=
7586if test "${host}" != "${target}"; then
7587 target_subdir="${target_alias}/"
7588fi
7589
7590
7591frags=
7592host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
7593if test ! -f ${host_makefile_frag}; then
7594{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
7595fi
7596frags="$frags $host_makefile_frag"
7597
7598target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
7599if test ! -f ${target_makefile_frag}; then
7600{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
7601fi
7602frags="$frags $target_makefile_frag"
7603
7604
7605
7606
7607
7608hostfile=`sed -n '
7609s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7610' ${host_makefile_frag}`
7611
7612targetfile=`sed -n '
7613s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7614' ${target_makefile_frag}`
7615
6166d547
AC
7616GDB_MULTI_ARCH=`sed -n '
7617s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
7618' ${target_makefile_frag}`
7619
c906108c
SS
7620# these really aren't orthogonal true/false values of the same condition,
7621# but shells are slow enough that I like to reuse the test conditions
7622# whenever possible
7623if test "${target}" = "${host}"; then
7624nativefile=`sed -n '
7625s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
7626' ${host_makefile_frag}`
7627# else
7628# GDBserver is only useful in a "native" enviroment
7629# configdirs=`echo $configdirs | sed 's/gdbserver//'`
7630fi
7631
7632
6166d547
AC
7633# New targets should just set gdb_multi_arch=yes in configure.tgt.
7634# Old targets being converted can either do that or set GDB_MULTI_ARCH
7635# in the target specific makefile frag. Eventually gdb_multi_arch=yes
7636# will be the default.
7637if test x"${GDB_MULTI_ARCH}" = x ; then
7638 case "${gdb_multi_arch}" in
7639 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
7640 no ) GDB_MULTI_ARCH=0 ;;
7641 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
7642 esac
7643fi
7644if test x"${GDB_MULTI_ARCH}" != x ; then
7645 cat >> confdefs.h <<EOF
7646#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
7647EOF
7648
7649fi
7650# Warn the user when they use an old pratice
7651case "${GDB_MULTI_ARCH}" in
7652 "" ) ;;
7653 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
7654 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
7655 GDB_MULTI_ARCH_PURE )
7656 if test x"${targetfile}" != x ; then
7657 echo "configure: warning: "GDB: Ingoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 7658 targetfile=""
6166d547
AC
7659 fi ;;
7660 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
7661esac
7662
7663
96baa820
JM
7664SUBDIRS="doc testsuite nlm"
7665if test "${enable_multi_ice}" = "yes"; then
7666 SUBDIRS="${SUBDIRS} multi-ice"
7667fi
7668
7669
7670
c906108c 7671# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
7672# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
7673# version.
c906108c
SS
7674
7675files=
7676links=
5a2402b8 7677
c906108c 7678rm -f xm.h
5a2402b8 7679xm_h=""
c906108c 7680if test "${hostfile}" != ""; then
5a2402b8
AC
7681 xm_h=xm.h
7682 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
7683 files="${files} ${GDB_XM_FILE}"
7684 links="${links} xm.h"
7685 cat >> confdefs.h <<EOF
7686#define GDB_XM_FILE ${GDB_XM_FILE}
7687EOF
7688
c906108c 7689fi
5a2402b8
AC
7690
7691
c906108c 7692rm -f tm.h
5a2402b8 7693tm_h=""
c906108c 7694if test "${targetfile}" != ""; then
5a2402b8
AC
7695 tm_h=tm.h
7696 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
7697 files="${files} ${GDB_TM_FILE}"
7698 links="${links} tm.h"
7699 cat >> confdefs.h <<EOF
7700#define GDB_TM_FILE ${GDB_TM_FILE}
7701EOF
7702
c906108c 7703fi
5a2402b8
AC
7704
7705
c906108c 7706rm -f nm.h
5a2402b8 7707nm_h=""
c906108c 7708if test "${nativefile}" != ""; then
5a2402b8
AC
7709 nm_h=nm.h
7710 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
7711 files="${files} ${GDB_NM_FILE}"
7712 links="${links} nm.h"
7713 cat >> confdefs.h <<EOF
7714#define GDB_NM_FILE ${GDB_NM_FILE}
7715EOF
7716
c906108c 7717fi
5a2402b8
AC
7718
7719
3fc11d3e 7720echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
451928c5 7721echo "configure:7722: checking whether ln -s works" >&5
3fc11d3e
JM
7722if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
7723 echo $ac_n "(cached) $ac_c" 1>&6
7724else
7725 rm -f conftestdata
7726if ln -s X conftestdata 2>/dev/null
7727then
7728 rm -f conftestdata
7729 ac_cv_prog_LN_S="ln -s"
7730else
7731 ac_cv_prog_LN_S=ln
7732fi
7733fi
7734LN_S="$ac_cv_prog_LN_S"
7735if test "$ac_cv_prog_LN_S" = "ln -s"; then
7736 echo "$ac_t""yes" 1>&6
7737else
7738 echo "$ac_t""no" 1>&6
7739fi
7740
c906108c
SS
7741
7742
7743
7744echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
451928c5 7745echo "configure:7746: checking for Cygwin environment" >&5
c906108c
SS
7746if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
7747 echo $ac_n "(cached) $ac_c" 1>&6
7748else
7749 cat > conftest.$ac_ext <<EOF
451928c5 7750#line 7751 "configure"
c906108c
SS
7751#include "confdefs.h"
7752
7753int main() {
7754
7755#ifndef __CYGWIN__
7756#define __CYGWIN__ __CYGWIN32__
7757#endif
7758return __CYGWIN__;
7759; return 0; }
7760EOF
451928c5 7761if { (eval echo configure:7762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
7762 rm -rf conftest*
7763 ac_cv_cygwin=yes
7764else
7765 echo "configure: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 rm -rf conftest*
7768 ac_cv_cygwin=no
7769fi
7770rm -f conftest*
7771rm -f conftest*
7772fi
7773
7774echo "$ac_t""$ac_cv_cygwin" 1>&6
7775CYGWIN=
7776test "$ac_cv_cygwin" = yes && CYGWIN=yes
7777echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
451928c5 7778echo "configure:7779: checking for mingw32 environment" >&5
c906108c
SS
7779if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
7780 echo $ac_n "(cached) $ac_c" 1>&6
7781else
7782 cat > conftest.$ac_ext <<EOF
451928c5 7783#line 7784 "configure"
c906108c
SS
7784#include "confdefs.h"
7785
7786int main() {
7787return __MINGW32__;
7788; return 0; }
7789EOF
451928c5 7790if { (eval echo configure:7791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
7791 rm -rf conftest*
7792 ac_cv_mingw32=yes
7793else
7794 echo "configure: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7796 rm -rf conftest*
7797 ac_cv_mingw32=no
7798fi
7799rm -f conftest*
7800rm -f conftest*
7801fi
7802
7803echo "$ac_t""$ac_cv_mingw32" 1>&6
7804MINGW32=
7805test "$ac_cv_mingw32" = yes && MINGW32=yes
7806
7807
7808echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
451928c5 7809echo "configure:7810: checking for executable suffix" >&5
c906108c
SS
7810if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
7811 echo $ac_n "(cached) $ac_c" 1>&6
7812else
7813 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
7814 ac_cv_exeext=.exe
7815else
7816 rm -f conftest*
7817 echo 'int main () { return 0; }' > conftest.$ac_ext
7818 ac_cv_exeext=
451928c5 7819 if { (eval echo configure:7820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
7820 for file in conftest.*; do
7821 case $file in
451928c5 7822 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
7823 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7824 esac
7825 done
7826 else
7827 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7828 fi
7829 rm -f conftest*
7830 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7831fi
7832fi
7833
7834EXEEXT=""
7835test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7836echo "$ac_t""${ac_cv_exeext}" 1>&6
7837ac_exeext=$EXEEXT
7838
7839
7840subdirs="$configdirs"
7841
7842trap '' 1 2 15
7843cat > confcache <<\EOF
7844# This file is a shell script that caches the results of configure
7845# tests run on this system so they can be shared between configure
7846# scripts and configure runs. It is not useful on other systems.
7847# If it contains results you don't want to keep, you may remove or edit it.
7848#
7849# By default, configure uses ./config.cache as the cache file,
7850# creating it if it does not exist already. You can give configure
7851# the --cache-file=FILE option to use a different cache file; that is
7852# what configure does when it calls configure scripts in
7853# subdirectories, so they share the cache.
7854# Giving --cache-file=/dev/null disables caching, for debugging configure.
7855# config.status only pays attention to the cache file if you give it the
7856# --recheck option to rerun configure.
7857#
7858EOF
7859# The following way of writing the cache mishandles newlines in values,
7860# but we know of no workaround that is simple, portable, and efficient.
7861# So, don't put newlines in cache variables' values.
7862# Ultrix sh set writes to stderr and can't be redirected directly,
7863# and sets the high bit in the cache file unless we assign to the vars.
7864(set) 2>&1 |
7865 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7866 *ac_space=\ *)
7867 # `set' does not quote correctly, so add quotes (double-quote substitution
7868 # turns \\\\ into \\, and sed turns \\ into \).
7869 sed -n \
7870 -e "s/'/'\\\\''/g" \
7871 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7872 ;;
7873 *)
7874 # `set' quotes correctly as required by POSIX, so do not add quotes.
7875 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7876 ;;
7877 esac >> confcache
7878if cmp -s $cache_file confcache; then
7879 :
7880else
7881 if test -w $cache_file; then
7882 echo "updating cache $cache_file"
7883 cat confcache > $cache_file
7884 else
7885 echo "not updating unwritable cache $cache_file"
7886 fi
7887fi
7888rm -f confcache
7889
7890trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7891
7892test "x$prefix" = xNONE && prefix=$ac_default_prefix
7893# Let make expand exec_prefix.
7894test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7895
7896# Any assignment to VPATH causes Sun make to only execute
7897# the first set of double-colon rules, so remove it if not needed.
7898# If there is a colon in the path, we need to keep it.
7899if test "x$srcdir" = x.; then
7900 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7901fi
7902
7903trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7904
7905DEFS=-DHAVE_CONFIG_H
7906
7907# Without the "./", some shells look in PATH for config.status.
7908: ${CONFIG_STATUS=./config.status}
7909
7910echo creating $CONFIG_STATUS
7911rm -f $CONFIG_STATUS
7912cat > $CONFIG_STATUS <<EOF
7913#! /bin/sh
7914# Generated automatically by configure.
7915# Run this file to recreate the current configuration.
7916# This directory was configured as follows,
7917# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7918#
7919# $0 $ac_configure_args
7920#
7921# Compiler output produced by configure, useful for debugging
7922# configure, is in ./config.log if it exists.
7923
7924ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7925for ac_option
7926do
7927 case "\$ac_option" in
7928 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7929 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7930 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7931 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7932 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7933 exit 0 ;;
7934 -help | --help | --hel | --he | --h)
7935 echo "\$ac_cs_usage"; exit 0 ;;
7936 *) echo "\$ac_cs_usage"; exit 1 ;;
7937 esac
7938done
7939
7940ac_given_srcdir=$srcdir
7941ac_given_INSTALL="$INSTALL"
7942
ed952ac5 7943trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
7944EOF
7945cat >> $CONFIG_STATUS <<EOF
7946
7947# Protect against being on the right side of a sed subst in config.status.
7948sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7949 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7950$ac_vpsub
7951$extrasub
7952s%@SHELL@%$SHELL%g
7953s%@CFLAGS@%$CFLAGS%g
7954s%@CPPFLAGS@%$CPPFLAGS%g
7955s%@CXXFLAGS@%$CXXFLAGS%g
7956s%@FFLAGS@%$FFLAGS%g
7957s%@DEFS@%$DEFS%g
7958s%@LDFLAGS@%$LDFLAGS%g
7959s%@LIBS@%$LIBS%g
7960s%@exec_prefix@%$exec_prefix%g
7961s%@prefix@%$prefix%g
7962s%@program_transform_name@%$program_transform_name%g
7963s%@bindir@%$bindir%g
7964s%@sbindir@%$sbindir%g
7965s%@libexecdir@%$libexecdir%g
7966s%@datadir@%$datadir%g
7967s%@sysconfdir@%$sysconfdir%g
7968s%@sharedstatedir@%$sharedstatedir%g
7969s%@localstatedir@%$localstatedir%g
7970s%@libdir@%$libdir%g
7971s%@includedir@%$includedir%g
7972s%@oldincludedir@%$oldincludedir%g
7973s%@infodir@%$infodir%g
7974s%@mandir@%$mandir%g
413ccac7
AC
7975s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7976s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7977s%@MAINT@%$MAINT%g
c906108c
SS
7978s%@CC@%$CC%g
7979s%@CPP@%$CPP%g
7980s%@host@%$host%g
7981s%@host_alias@%$host_alias%g
7982s%@host_cpu@%$host_cpu%g
7983s%@host_vendor@%$host_vendor%g
7984s%@host_os@%$host_os%g
7985s%@target@%$target%g
7986s%@target_alias@%$target_alias%g
7987s%@target_cpu@%$target_cpu%g
7988s%@target_vendor@%$target_vendor%g
7989s%@target_os@%$target_os%g
7990s%@build@%$build%g
7991s%@build_alias@%$build_alias%g
7992s%@build_cpu@%$build_cpu%g
7993s%@build_vendor@%$build_vendor%g
7994s%@build_os@%$build_os%g
7995s%@SET_MAKE@%$SET_MAKE%g
7996s%@RANLIB@%$RANLIB%g
7997s%@ALLOCA@%$ALLOCA%g
7998s%@USE_NLS@%$USE_NLS%g
7999s%@MSGFMT@%$MSGFMT%g
8000s%@GMSGFMT@%$GMSGFMT%g
8001s%@XGETTEXT@%$XGETTEXT%g
8002s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8003s%@CATALOGS@%$CATALOGS%g
8004s%@CATOBJEXT@%$CATOBJEXT%g
8005s%@DATADIRNAME@%$DATADIRNAME%g
8006s%@GMOFILES@%$GMOFILES%g
8007s%@INSTOBJEXT@%$INSTOBJEXT%g
8008s%@INTLDEPS@%$INTLDEPS%g
8009s%@INTLLIBS@%$INTLLIBS%g
8010s%@INTLOBJS@%$INTLOBJS%g
8011s%@POFILES@%$POFILES%g
8012s%@POSUB@%$POSUB%g
8013s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8014s%@GT_NO@%$GT_NO%g
8015s%@GT_YES@%$GT_YES%g
8016s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8017s%@l@%$l%g
7a292a7a 8018s%@AWK@%$AWK%g
c906108c
SS
8019s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8020s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8021s%@INSTALL_DATA@%$INSTALL_DATA%g
8022s%@AR@%$AR%g
95ca63c4
CF
8023s%@DLLTOOL@%$DLLTOOL%g
8024s%@WINDRES@%$WINDRES%g
c906108c 8025s%@YACC@%$YACC%g
75c6e08a 8026s%@MIG@%$MIG%g
c906108c 8027s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 8028s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 8029s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
8030s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
8031s%@MMALLOC@%$MMALLOC%g
88987551 8032s%@REGEX@%$REGEX%g
aff38e61 8033s%@SER_HARDWIRE@%$SER_HARDWIRE%g
c906108c 8034s%@TERM_LIB@%$TERM_LIB%g
cd0fc7c3 8035s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
8036s%@LIBGUI@%$LIBGUI%g
8037s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
8038s%@WIN32LDAPP@%$WIN32LDAPP%g
8039s%@TCL_VERSION@%$TCL_VERSION%g
8040s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
8041s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
8042s%@TCL_CC@%$TCL_CC%g
8043s%@TCL_DEFS@%$TCL_DEFS%g
8044s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
8045s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
8046s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
8047s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
8048s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
8049s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
8050s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
8051s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
8052s%@TCL_RANLIB@%$TCL_RANLIB%g
8053s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
8054s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
8055s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
8056s%@TK_VERSION@%$TK_VERSION%g
8057s%@TK_DEFS@%$TK_DEFS%g
8058s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
8059s%@TK_XINCLUDES@%$TK_XINCLUDES%g
8060s%@TK_XLIBSW@%$TK_XLIBSW%g
8061s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
8062s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
8063s%@TCLHDIR@%$TCLHDIR%g
8064s%@TKHDIR@%$TKHDIR%g
8065s%@ITCLHDIR@%$ITCLHDIR%g
8066s%@ITKHDIR@%$ITKHDIR%g
8067s%@TIXHDIR@%$TIXHDIR%g
8068s%@ITCL_VERSION@%$ITCL_VERSION%g
8069s%@ITCL_DEFS@%$ITCL_DEFS%g
8070s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
8071s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
8072s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
8073s%@ITK_VERSION@%$ITK_VERSION%g
8074s%@ITK_DEFS@%$ITK_DEFS%g
8075s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
8076s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
8077s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
8078s%@TIX_VERSION@%$TIX_VERSION%g
8079s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
7a292a7a
SS
8080s%@X_CFLAGS@%$X_CFLAGS%g
8081s%@X_LDFLAGS@%$X_LDFLAGS%g
8082s%@X_LIBS@%$X_LIBS%g
8083s%@ITCLLIB@%$ITCLLIB%g
8084s%@ITCL_DEPS@%$ITCL_DEPS%g
8085s%@ITKLIB@%$ITKLIB%g
8086s%@ITK_DEPS@%$ITK_DEPS%g
8087s%@TIXLIB@%$TIXLIB%g
8088s%@TIX_DEPS@%$TIX_DEPS%g
8089s%@GDBTKLIBS@%$GDBTKLIBS%g
8090s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
8091s%@IGNORE_SIM@%$IGNORE_SIM%g
8092s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
8093s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
8094s%@CONFIG_OBS@%$CONFIG_OBS%g
8095s%@CONFIG_DEPS@%$CONFIG_DEPS%g
8096s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 8097s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
8098s%@CONFIG_ALL@%$CONFIG_ALL%g
8099s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
8100s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
8101s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
8102s%@HLDFLAGS@%$HLDFLAGS%g
8103s%@HLDENV@%$HLDENV%g
8104s%@target_subdir@%$target_subdir%g
8105/@host_makefile_frag@/r $host_makefile_frag
8106s%@host_makefile_frag@%%g
8107/@target_makefile_frag@/r $target_makefile_frag
8108s%@target_makefile_frag@%%g
8109s%@frags@%$frags%g
96baa820 8110s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
8111s%@xm_h@%$xm_h%g
8112s%@tm_h@%$tm_h%g
8113s%@nm_h@%$nm_h%g
7a292a7a 8114s%@LN_S@%$LN_S%g
c906108c
SS
8115s%@EXEEXT@%$EXEEXT%g
8116s%@subdirs@%$subdirs%g
8117
8118CEOF
8119EOF
8120
8121cat >> $CONFIG_STATUS <<\EOF
8122
8123# Split the substitutions into bite-sized pieces for seds with
8124# small command number limits, like on Digital OSF/1 and HP-UX.
8125ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8126ac_file=1 # Number of current file.
8127ac_beg=1 # First line for current file.
8128ac_end=$ac_max_sed_cmds # Line after last line for current file.
8129ac_more_lines=:
8130ac_sed_cmds=""
8131while $ac_more_lines; do
8132 if test $ac_beg -gt 1; then
8133 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8134 else
8135 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8136 fi
8137 if test ! -s conftest.s$ac_file; then
8138 ac_more_lines=false
8139 rm -f conftest.s$ac_file
8140 else
8141 if test -z "$ac_sed_cmds"; then
8142 ac_sed_cmds="sed -f conftest.s$ac_file"
8143 else
8144 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8145 fi
8146 ac_file=`expr $ac_file + 1`
8147 ac_beg=$ac_end
8148 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8149 fi
8150done
8151if test -z "$ac_sed_cmds"; then
8152 ac_sed_cmds=cat
8153fi
8154EOF
8155
8156cat >> $CONFIG_STATUS <<EOF
8157
ed952ac5 8158CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
8159EOF
8160cat >> $CONFIG_STATUS <<\EOF
8161for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8162 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8163 case "$ac_file" in
8164 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8165 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8166 *) ac_file_in="${ac_file}.in" ;;
8167 esac
8168
8169 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8170
8171 # Remove last slash and all that follows it. Not all systems have dirname.
8172 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8173 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8174 # The file is in a subdirectory.
8175 test ! -d "$ac_dir" && mkdir "$ac_dir"
8176 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8177 # A "../" for each directory in $ac_dir_suffix.
8178 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8179 else
8180 ac_dir_suffix= ac_dots=
8181 fi
8182
8183 case "$ac_given_srcdir" in
8184 .) srcdir=.
8185 if test -z "$ac_dots"; then top_srcdir=.
8186 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8187 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8188 *) # Relative path.
8189 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8190 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8191 esac
8192
8193 case "$ac_given_INSTALL" in
8194 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8195 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8196 esac
8197
8198 echo creating "$ac_file"
8199 rm -f "$ac_file"
8200 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8201 case "$ac_file" in
8202 *Makefile*) ac_comsub="1i\\
8203# $configure_input" ;;
8204 *) ac_comsub= ;;
8205 esac
8206
8207 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8208 sed -e "$ac_comsub
8209s%@configure_input@%$configure_input%g
8210s%@srcdir@%$srcdir%g
8211s%@top_srcdir@%$top_srcdir%g
8212s%@INSTALL@%$INSTALL%g
8213" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8214fi; done
8215rm -f conftest.s*
8216
8217# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8218# NAME is the cpp macro being defined and VALUE is the value it is being given.
8219#
8220# ac_d sets the value in "#define NAME VALUE" lines.
8221ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8222ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8223ac_dC='\3'
8224ac_dD='%g'
8225# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8226ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8227ac_uB='\([ ]\)%\1#\2define\3'
8228ac_uC=' '
8229ac_uD='\4%g'
8230# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8231ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8232ac_eB='$%\1#\2define\3'
8233ac_eC=' '
8234ac_eD='%g'
8235
8236if test "${CONFIG_HEADERS+set}" != set; then
8237EOF
8238cat >> $CONFIG_STATUS <<EOF
8239 CONFIG_HEADERS="config.h:config.in"
8240EOF
8241cat >> $CONFIG_STATUS <<\EOF
8242fi
8243for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8244 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8245 case "$ac_file" in
8246 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8247 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8248 *) ac_file_in="${ac_file}.in" ;;
8249 esac
8250
8251 echo creating $ac_file
8252
8253 rm -f conftest.frag conftest.in conftest.out
8254 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8255 cat $ac_file_inputs > conftest.in
8256
8257EOF
8258
8259# Transform confdefs.h into a sed script conftest.vals that substitutes
8260# the proper values into config.h.in to produce config.h. And first:
8261# Protect against being on the right side of a sed subst in config.status.
8262# Protect against being in an unquoted here document in config.status.
8263rm -f conftest.vals
8264cat > conftest.hdr <<\EOF
8265s/[\\&%]/\\&/g
8266s%[\\$`]%\\&%g
8267s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8268s%ac_d%ac_u%gp
8269s%ac_u%ac_e%gp
8270EOF
8271sed -n -f conftest.hdr confdefs.h > conftest.vals
8272rm -f conftest.hdr
8273
8274# This sed command replaces #undef with comments. This is necessary, for
8275# example, in the case of _POSIX_SOURCE, which is predefined and required
8276# on some systems where configure will not decide to define it.
8277cat >> conftest.vals <<\EOF
8278s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8279EOF
8280
8281# Break up conftest.vals because some shells have a limit on
8282# the size of here documents, and old seds have small limits too.
8283
8284rm -f conftest.tail
8285while :
8286do
8287 ac_lines=`grep -c . conftest.vals`
8288 # grep -c gives empty output for an empty file on some AIX systems.
8289 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8290 # Write a limited-size here document to conftest.frag.
8291 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8292 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8293 echo 'CEOF
8294 sed -f conftest.frag conftest.in > conftest.out
8295 rm -f conftest.in
8296 mv conftest.out conftest.in
8297' >> $CONFIG_STATUS
8298 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8299 rm -f conftest.vals
8300 mv conftest.tail conftest.vals
8301done
8302rm -f conftest.vals
8303
8304cat >> $CONFIG_STATUS <<\EOF
8305 rm -f conftest.frag conftest.h
8306 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8307 cat conftest.in >> conftest.h
8308 rm -f conftest.in
8309 if cmp -s $ac_file conftest.h 2>/dev/null; then
8310 echo "$ac_file is unchanged"
8311 rm -f conftest.h
8312 else
8313 # Remove last slash and all that follows it. Not all systems have dirname.
8314 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8315 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8316 # The file is in a subdirectory.
8317 test ! -d "$ac_dir" && mkdir "$ac_dir"
8318 fi
8319 rm -f $ac_file
8320 mv conftest.h $ac_file
8321 fi
8322fi; done
8323
8324EOF
8325
8326cat >> $CONFIG_STATUS <<EOF
8327ac_sources="$files"
8328ac_dests="$links"
8329EOF
8330
8331cat >> $CONFIG_STATUS <<\EOF
8332srcdir=$ac_given_srcdir
8333while test -n "$ac_sources"; do
8334 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
8335 set $ac_sources; ac_source=$1; shift; ac_sources=$*
8336
8337 echo "linking $srcdir/$ac_source to $ac_dest"
8338
8339 if test ! -r $srcdir/$ac_source; then
8340 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
8341 fi
8342 rm -f $ac_dest
8343
8344 # Make relative symlinks.
8345 # Remove last slash and all that follows it. Not all systems have dirname.
8346 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
8347 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
8348 # The dest file is in a subdirectory.
8349 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
8350 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
8351 # A "../" for each directory in $ac_dest_dir_suffix.
8352 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
8353 else
8354 ac_dest_dir_suffix= ac_dots=
8355 fi
8356
8357 case "$srcdir" in
8358 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
8359 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
8360 esac
8361
8362 # Make a symlink if possible; otherwise try a hard link.
8363 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
8364 ln $srcdir/$ac_source $ac_dest; then :
8365 else
8366 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
8367 fi
8368done
8369EOF
8370cat >> $CONFIG_STATUS <<EOF
8371
8372gdb_host_cpu=$gdb_host_cpu
8373gdb_target_cpu=$gdb_target_cpu
8374nativefile=$nativefile
8375
8376EOF
8377cat >> $CONFIG_STATUS <<\EOF
8378
8379if test "${nativefile}" = ""; then
8380sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
8381 < Makefile > Makefile.tem
8382mv -f Makefile.tem Makefile
8383fi
8384
8385sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
8386/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
8387/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
8388mv -f Makefile.tmp Makefile
8389
2acceee2 8390
c906108c
SS
8391case x$CONFIG_HEADERS in
8392xconfig.h:config.in)
8393echo > stamp-h ;;
8394esac
8395
8396exit 0
8397EOF
8398chmod +x $CONFIG_STATUS
8399rm -fr confdefs* $ac_clean_files
8400test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8401
8402if test "$no_recursion" != yes; then
8403
8404 # Remove --cache-file and --srcdir arguments so they do not pile up.
8405 ac_sub_configure_args=
8406 ac_prev=
8407 for ac_arg in $ac_configure_args; do
8408 if test -n "$ac_prev"; then
8409 ac_prev=
8410 continue
8411 fi
8412 case "$ac_arg" in
8413 -cache-file | --cache-file | --cache-fil | --cache-fi \
8414 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
8415 ac_prev=cache_file ;;
8416 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
8417 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
8418 ;;
8419 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
8420 ac_prev=srcdir ;;
8421 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
8422 ;;
8423 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
8424 esac
8425 done
8426
8427 for ac_config_dir in $configdirs; do
8428
8429 # Do not complain, so a configure script can configure whichever
8430 # parts of a large source tree are present.
8431 if test ! -d $srcdir/$ac_config_dir; then
8432 continue
8433 fi
8434
8435 echo configuring in $ac_config_dir
8436
8437 case "$srcdir" in
8438 .) ;;
8439 *)
8440 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
8441 else
8442 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
8443 fi
8444 ;;
8445 esac
8446
8447 ac_popdir=`pwd`
8448 cd $ac_config_dir
8449
8450 # A "../" for each directory in /$ac_config_dir.
8451 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
8452
8453 case "$srcdir" in
8454 .) # No --srcdir option. We are building in place.
8455 ac_sub_srcdir=$srcdir ;;
8456 /*) # Absolute path.
8457 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
8458 *) # Relative path.
8459 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
8460 esac
8461
8462 # Check for guested configure; otherwise get Cygnus style configure.
8463 if test -f $ac_sub_srcdir/configure; then
8464 ac_sub_configure=$ac_sub_srcdir/configure
8465 elif test -f $ac_sub_srcdir/configure.in; then
8466 ac_sub_configure=$ac_configure
8467 else
8468 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
8469 ac_sub_configure=
8470 fi
8471
8472 # The recursion is here.
8473 if test -n "$ac_sub_configure"; then
8474
8475 # Make the cache file name correct relative to the subdirectory.
8476 case "$cache_file" in
8477 /*) ac_sub_cache_file=$cache_file ;;
8478 *) # Relative path.
8479 ac_sub_cache_file="$ac_dots$cache_file" ;;
8480 esac
8481 case "$ac_given_INSTALL" in
8482 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8483 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8484 esac
8485
8486 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
8487 # The eval makes quoting arguments work.
8488 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
8489 then :
8490 else
8491 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
8492 fi
8493 fi
8494
8495 cd $ac_popdir
8496 done
8497fi
8498
8499
8500exit 0
This page took 0.48593 seconds and 4 git commands to generate.