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