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