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