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