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