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