* configure.in, configure: Add `-ldl -lw' for Solaris linking.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
7c40dd08 4# Generated automatically using autoconf version 2.7
5436fc65
C
5# Copyright (C) 1992, 1993, 1994 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 --enable-netrom "
188c635f
SG
16ac_help="$ac_help
17 --enable-gm "
3c0bf315
MM
18ac_help="$ac_help
19 --enable-sim-powerpc "
5436fc65
C
20ac_help="$ac_help
21 --enable-gdbtk "
22ac_help="$ac_help
23 --with-x use the X Window System"
24
25# Initialize some variables set by options.
26# The variables have the same names as the options, with
27# dashes changed to underlines.
28build=NONE
29cache_file=./config.cache
30exec_prefix=NONE
31host=NONE
32no_create=
33nonopt=NONE
34no_recursion=
35prefix=NONE
36program_prefix=NONE
37program_suffix=NONE
38program_transform_name=s,x,x,
39silent=
40site=
41srcdir=
42target=NONE
43verbose=
44x_includes=NONE
45x_libraries=NONE
7c40dd08
DE
46bindir='${exec_prefix}/bin'
47sbindir='${exec_prefix}/sbin'
48libexecdir='${exec_prefix}/libexec'
49datadir='${prefix}/share'
50sysconfdir='${prefix}/etc'
51sharedstatedir='${prefix}/com'
52localstatedir='${prefix}/var'
53libdir='${exec_prefix}/lib'
54includedir='${prefix}/include'
55oldincludedir='/usr/include'
56infodir='${prefix}/info'
57mandir='${prefix}/man'
5436fc65
C
58
59# Initialize some other variables.
60subdirs=
7c40dd08 61MFLAGS= MAKEFLAGS=
5436fc65
C
62
63ac_prev=
64for ac_option
65do
66
67 # If the previous option needs an argument, assign it.
68 if test -n "$ac_prev"; then
69 eval "$ac_prev=\$ac_option"
70 ac_prev=
71 continue
72 fi
73
74 case "$ac_option" in
75 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76 *) ac_optarg= ;;
77 esac
78
79 # Accept the important Cygnus configure options, so we can diagnose typos.
80
81 case "$ac_option" in
82
7c40dd08
DE
83 -bindir | --bindir | --bindi | --bind | --bin | --bi)
84 ac_prev=bindir ;;
85 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
86 bindir="$ac_optarg" ;;
87
88 -build | --build | --buil | --bui | --bu)
5436fc65 89 ac_prev=build ;;
7c40dd08 90 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
91 build="$ac_optarg" ;;
92
93 -cache-file | --cache-file | --cache-fil | --cache-fi \
94 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95 ac_prev=cache_file ;;
96 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
97 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
98 cache_file="$ac_optarg" ;;
99
7c40dd08
DE
100 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
101 ac_prev=datadir ;;
102 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
103 | --da=*)
104 datadir="$ac_optarg" ;;
105
5436fc65
C
106 -disable-* | --disable-*)
107 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
108 # Reject names that are not valid shell variable names.
109 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
110 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
111 fi
112 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
113 eval "enable_${ac_feature}=no" ;;
114
115 -enable-* | --enable-*)
116 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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 case "$ac_option" in
123 *=*) ;;
124 *) ac_optarg=yes ;;
125 esac
126 eval "enable_${ac_feature}='$ac_optarg'" ;;
127
128 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
129 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
130 | --exec | --exe | --ex)
131 ac_prev=exec_prefix ;;
132 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
133 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
134 | --exec=* | --exe=* | --ex=*)
135 exec_prefix="$ac_optarg" ;;
136
137 -gas | --gas | --ga | --g)
138 # Obsolete; use --with-gas.
139 with_gas=yes ;;
140
141 -help | --help | --hel | --he)
142 # Omit some internal or obsolete options to make the list less imposing.
143 # This message is too long to be a string in the A/UX 3.1 sh.
144 cat << EOF
145Usage: configure [options] [host]
146Options: [defaults in brackets after descriptions]
147Configuration:
148 --cache-file=FILE cache test results in FILE
149 --help print this message
150 --no-create do not create output files
151 --quiet, --silent do not print \`checking...' messages
152 --version print the version of autoconf that created configure
153Directory and file names:
154 --prefix=PREFIX install architecture-independent files in PREFIX
155 [$ac_default_prefix]
7c40dd08 156 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 157 [same as prefix]
7c40dd08
DE
158 --bindir=DIR user executables in DIR [EPREFIX/bin]
159 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
160 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
161 --datadir=DIR read-only architecture-independent data in DIR
162 [PREFIX/share]
163 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
164 --sharedstatedir=DIR modifiable architecture-independent data in DIR
165 [PREFIX/com]
166 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
167 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
168 --includedir=DIR C header files in DIR [PREFIX/include]
169 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
170 --infodir=DIR info documentation in DIR [PREFIX/info]
171 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
172 --srcdir=DIR find the sources in DIR [configure dir or ..]
173 --program-prefix=PREFIX prepend PREFIX to installed program names
174 --program-suffix=SUFFIX append SUFFIX to installed program names
7c40dd08
DE
175 --program-transform-name=PROGRAM
176 run sed PROGRAM on installed program names
177EOF
178 cat << EOF
5436fc65
C
179Host type:
180 --build=BUILD configure for building on BUILD [BUILD=HOST]
181 --host=HOST configure for HOST [guessed]
182 --target=TARGET configure for TARGET [TARGET=HOST]
183Features and packages:
184 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
185 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
186 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
187 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
188 --x-includes=DIR X include files are in DIR
189 --x-libraries=DIR X library files are in DIR
5436fc65 190EOF
7c40dd08
DE
191 if test -n "$ac_help"; then
192 echo "--enable and --with options recognized:$ac_help"
193 fi
5436fc65
C
194 exit 0 ;;
195
196 -host | --host | --hos | --ho)
197 ac_prev=host ;;
198 -host=* | --host=* | --hos=* | --ho=*)
199 host="$ac_optarg" ;;
200
7c40dd08
DE
201 -includedir | --includedir | --includedi | --included | --include \
202 | --includ | --inclu | --incl | --inc)
203 ac_prev=includedir ;;
204 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
205 | --includ=* | --inclu=* | --incl=* | --inc=*)
206 includedir="$ac_optarg" ;;
207
208 -infodir | --infodir | --infodi | --infod | --info | --inf)
209 ac_prev=infodir ;;
210 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
211 infodir="$ac_optarg" ;;
212
213 -libdir | --libdir | --libdi | --libd)
214 ac_prev=libdir ;;
215 -libdir=* | --libdir=* | --libdi=* | --libd=*)
216 libdir="$ac_optarg" ;;
217
218 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
219 | --libexe | --libex | --libe)
220 ac_prev=libexecdir ;;
221 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
222 | --libexe=* | --libex=* | --libe=*)
223 libexecdir="$ac_optarg" ;;
224
225 -localstatedir | --localstatedir | --localstatedi | --localstated \
226 | --localstate | --localstat | --localsta | --localst \
227 | --locals | --local | --loca | --loc | --lo)
228 ac_prev=localstatedir ;;
229 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
230 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
231 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
232 localstatedir="$ac_optarg" ;;
233
234 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
235 ac_prev=mandir ;;
236 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
237 mandir="$ac_optarg" ;;
238
5436fc65
C
239 -nfp | --nfp | --nf)
240 # Obsolete; use --without-fp.
241 with_fp=no ;;
242
243 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244 | --no-cr | --no-c)
245 no_create=yes ;;
246
247 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
248 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
249 no_recursion=yes ;;
250
7c40dd08
DE
251 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
252 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
253 | --oldin | --oldi | --old | --ol | --o)
254 ac_prev=oldincludedir ;;
255 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
256 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
257 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
258 oldincludedir="$ac_optarg" ;;
259
5436fc65
C
260 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
261 ac_prev=prefix ;;
262 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
263 prefix="$ac_optarg" ;;
264
265 -program-prefix | --program-prefix | --program-prefi | --program-pref \
266 | --program-pre | --program-pr | --program-p)
267 ac_prev=program_prefix ;;
268 -program-prefix=* | --program-prefix=* | --program-prefi=* \
269 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
270 program_prefix="$ac_optarg" ;;
271
272 -program-suffix | --program-suffix | --program-suffi | --program-suff \
273 | --program-suf | --program-su | --program-s)
274 ac_prev=program_suffix ;;
275 -program-suffix=* | --program-suffix=* | --program-suffi=* \
276 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
277 program_suffix="$ac_optarg" ;;
278
279 -program-transform-name | --program-transform-name \
280 | --program-transform-nam | --program-transform-na \
281 | --program-transform-n | --program-transform- \
282 | --program-transform | --program-transfor \
283 | --program-transfo | --program-transf \
284 | --program-trans | --program-tran \
285 | --progr-tra | --program-tr | --program-t)
286 ac_prev=program_transform_name ;;
287 -program-transform-name=* | --program-transform-name=* \
288 | --program-transform-nam=* | --program-transform-na=* \
289 | --program-transform-n=* | --program-transform-=* \
290 | --program-transform=* | --program-transfor=* \
291 | --program-transfo=* | --program-transf=* \
292 | --program-trans=* | --program-tran=* \
293 | --progr-tra=* | --program-tr=* | --program-t=*)
294 program_transform_name="$ac_optarg" ;;
295
296 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
297 | -silent | --silent | --silen | --sile | --sil)
298 silent=yes ;;
299
7c40dd08
DE
300 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
301 ac_prev=sbindir ;;
302 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
303 | --sbi=* | --sb=*)
304 sbindir="$ac_optarg" ;;
305
306 -sharedstatedir | --sharedstatedir | --sharedstatedi \
307 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
308 | --sharedst | --shareds | --shared | --share | --shar \
309 | --sha | --sh)
310 ac_prev=sharedstatedir ;;
311 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
312 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
313 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
314 | --sha=* | --sh=*)
315 sharedstatedir="$ac_optarg" ;;
316
5436fc65
C
317 -site | --site | --sit)
318 ac_prev=site ;;
319 -site=* | --site=* | --sit=*)
320 site="$ac_optarg" ;;
321
322 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
323 ac_prev=srcdir ;;
324 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
325 srcdir="$ac_optarg" ;;
326
7c40dd08
DE
327 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
328 | --syscon | --sysco | --sysc | --sys | --sy)
329 ac_prev=sysconfdir ;;
330 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
331 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
332 sysconfdir="$ac_optarg" ;;
333
5436fc65
C
334 -target | --target | --targe | --targ | --tar | --ta | --t)
335 ac_prev=target ;;
336 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
337 target="$ac_optarg" ;;
338
339 -v | -verbose | --verbose | --verbos | --verbo | --verb)
340 verbose=yes ;;
341
342 -version | --version | --versio | --versi | --vers)
7c40dd08 343 echo "configure generated by autoconf version 2.7"
5436fc65
C
344 exit 0 ;;
345
346 -with-* | --with-*)
347 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
348 # Reject names that are not valid shell variable names.
349 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
350 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
351 fi
352 ac_package=`echo $ac_package| sed 's/-/_/g'`
353 case "$ac_option" in
354 *=*) ;;
355 *) ac_optarg=yes ;;
356 esac
357 eval "with_${ac_package}='$ac_optarg'" ;;
358
359 -without-* | --without-*)
360 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
361 # Reject names that are not valid shell variable names.
362 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
363 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364 fi
365 ac_package=`echo $ac_package| sed 's/-/_/g'`
366 eval "with_${ac_package}=no" ;;
367
368 --x)
369 # Obsolete; use --with-x.
370 with_x=yes ;;
371
372 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
373 | --x-incl | --x-inc | --x-in | --x-i)
374 ac_prev=x_includes ;;
375 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
376 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
377 x_includes="$ac_optarg" ;;
378
379 -x-libraries | --x-libraries | --x-librarie | --x-librari \
380 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
381 ac_prev=x_libraries ;;
382 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
383 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
384 x_libraries="$ac_optarg" ;;
385
386 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387 ;;
388
7c40dd08 389 *)
5436fc65
C
390 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
391 echo "configure: warning: $ac_option: invalid host type" 1>&2
392 fi
393 if test "x$nonopt" != xNONE; then
394 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
395 fi
396 nonopt="$ac_option"
397 ;;
398
399 esac
400done
401
402if test -n "$ac_prev"; then
403 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
404fi
405
406trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
407
408# File descriptor usage:
409# 0 standard input
410# 1 file creation
411# 2 errors and warnings
412# 3 some systems may open it to /dev/tty
413# 4 used on the Kubota Titan
414# 6 checking for... messages and results
415# 5 compiler messages saved in config.log
416if test "$silent" = yes; then
417 exec 6>/dev/null
418else
419 exec 6>&1
420fi
421exec 5>./config.log
422
423echo "\
424This file contains any messages produced by compilers while
425running configure, to aid debugging if configure makes a mistake.
426" 1>&5
427
428# Strip out --no-create and --no-recursion so they do not pile up.
429# Also quote any args containing shell metacharacters.
430ac_configure_args=
431for ac_arg
432do
433 case "$ac_arg" in
434 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
435 | --no-cr | --no-c) ;;
436 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
437 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
438 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
439 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
440 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
441 esac
442done
443
444# NLS nuisances.
445# Only set LANG and LC_ALL to C if already set.
446# These must not be set unconditionally because not all systems understand
447# e.g. LANG=C (notably SCO).
448if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449if test "${LANG+set}" = set; then LANG=C; export LANG; fi
450
451# confdefs.h avoids OS command line length limits that DEFS can exceed.
452rm -rf conftest* confdefs.h
453# AIX cpp loses on an empty file, so make sure it contains at least a newline.
454echo > confdefs.h
455
456# A filename unique to this package, relative to the directory that
457# configure is in, which we can look for to find out if srcdir is correct.
458ac_unique_file=main.c
459
460# Find the source files, if location was not specified.
461if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
464 ac_prog=$0
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467 srcdir=$ac_confdir
468 if test ! -r $srcdir/$ac_unique_file; then
469 srcdir=..
470 fi
471else
472 ac_srcdir_defaulted=no
473fi
474if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
477 else
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
479 fi
480fi
481srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
482
483# Prefer explicitly selected file to automatically selected ones.
484if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
487 else
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
489 fi
490fi
491for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
494 . "$ac_site_file"
495 fi
496done
497
498if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
500 . $cache_file
501else
502 echo "creating cache $cache_file"
503 > $cache_file
504fi
505
506ac_ext=c
507# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7c40dd08
DE
508ac_cpp='echo $CPP $CPPFLAGS 1>&5;
509$CPP $CPPFLAGS'
510ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
511${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
512ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
513${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
5436fc65
C
514
515if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
518 ac_n= ac_c='
519' ac_t=' '
520 else
521 ac_n=-n ac_c= ac_t=
522 fi
523else
524 ac_n= ac_c='\c' ac_t=
525fi
526
527
528
5436fc65
C
529# Extract the first word of "gcc", so it can be a program name with args.
530set dummy gcc; ac_word=$2
531echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
532if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
533 echo $ac_n "(cached) $ac_c" 1>&6
534else
535 if test -n "$CC"; then
536 ac_cv_prog_CC="$CC" # Let the user override the test.
537else
538 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 539 for ac_dir in $PATH; do
5436fc65
C
540 test -z "$ac_dir" && ac_dir=.
541 if test -f $ac_dir/$ac_word; then
542 ac_cv_prog_CC="gcc"
543 break
544 fi
545 done
546 IFS="$ac_save_ifs"
547 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
548fi
549fi
550CC="$ac_cv_prog_CC"
551if test -n "$CC"; then
552 echo "$ac_t""$CC" 1>&6
553else
554 echo "$ac_t""no" 1>&6
555fi
556
557
558echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
559if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
560 echo $ac_n "(cached) $ac_c" 1>&6
561else
562 cat > conftest.c <<EOF
563#ifdef __GNUC__
564 yes;
565#endif
566EOF
567if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
568 ac_cv_prog_gcc=yes
569else
570 ac_cv_prog_gcc=no
571fi
572fi
7c40dd08 573
5436fc65
C
574echo "$ac_t""$ac_cv_prog_gcc" 1>&6
575if test $ac_cv_prog_gcc = yes; then
576 GCC=yes
577 if test "${CFLAGS+set}" != set; then
578 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
579if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
580 echo $ac_n "(cached) $ac_c" 1>&6
581else
582 echo 'void f(){}' > conftest.c
583if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
584 ac_cv_prog_gcc_g=yes
585else
586 ac_cv_prog_gcc_g=no
587fi
588rm -f conftest*
589
590fi
7c40dd08
DE
591
592echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
593 if test $ac_cv_prog_gcc_g = yes; then
594 CFLAGS="-g -O"
595 else
596 CFLAGS="-O"
597 fi
598 fi
599else
600 GCC=
601 test "${CFLAGS+set}" = set || CFLAGS="-g"
602fi
603
604echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
605# On Suns, sometimes $CPP names a directory.
606if test -n "$CPP" && test -d "$CPP"; then
607 CPP=
608fi
609if test -z "$CPP"; then
610if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
611 echo $ac_n "(cached) $ac_c" 1>&6
612else
613 # This must be in double quotes, not single quotes, because CPP may get
614 # substituted into the Makefile and "${CC-cc}" will confuse make.
615 CPP="${CC-cc} -E"
616 # On the NeXT, cc -E runs the code through the compiler's parser,
617 # not just through cpp.
618 cat > conftest.$ac_ext <<EOF
7c40dd08 619#line 620 "configure"
5436fc65
C
620#include "confdefs.h"
621#include <assert.h>
622Syntax Error
623EOF
624eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
625ac_err=`grep -v '^ *+' conftest.out`
626if test -z "$ac_err"; then
627 :
628else
629 echo "$ac_err" >&5
630 rm -rf conftest*
631 CPP="${CC-cc} -E -traditional-cpp"
632 cat > conftest.$ac_ext <<EOF
7c40dd08 633#line 634 "configure"
5436fc65
C
634#include "confdefs.h"
635#include <assert.h>
636Syntax Error
637EOF
638eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
639ac_err=`grep -v '^ *+' conftest.out`
640if test -z "$ac_err"; then
641 :
642else
643 echo "$ac_err" >&5
644 rm -rf conftest*
645 CPP=/lib/cpp
646fi
647rm -f conftest*
648fi
649rm -f conftest*
650 ac_cv_prog_CPP="$CPP"
651fi
dedcc91d
SC
652 CPP="$ac_cv_prog_CPP"
653else
654 ac_cv_prog_CPP="$CPP"
5436fc65 655fi
5436fc65
C
656echo "$ac_t""$CPP" 1>&6
657
658echo $ac_n "checking for AIX""... $ac_c" 1>&6
659cat > conftest.$ac_ext <<EOF
7c40dd08 660#line 661 "configure"
5436fc65
C
661#include "confdefs.h"
662#ifdef _AIX
663 yes
664#endif
665
666EOF
667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
668 egrep "yes" >/dev/null 2>&1; then
669 rm -rf conftest*
670 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
671#define _ALL_SOURCE 1
672EOF
673
674else
675 rm -rf conftest*
676 echo "$ac_t""no" 1>&6
677fi
678rm -f conftest*
679
680
681ac_safe=`echo "minix/config.h" | tr './\055' '___'`
682echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
683if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
685else
686 cat > conftest.$ac_ext <<EOF
7c40dd08 687#line 688 "configure"
5436fc65
C
688#include "confdefs.h"
689#include <minix/config.h>
690EOF
691eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
692ac_err=`grep -v '^ *+' conftest.out`
693if test -z "$ac_err"; then
694 rm -rf conftest*
695 eval "ac_cv_header_$ac_safe=yes"
696else
697 echo "$ac_err" >&5
698 rm -rf conftest*
699 eval "ac_cv_header_$ac_safe=no"
700fi
701rm -f conftest*
702fi
703if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
704 echo "$ac_t""yes" 1>&6
705 MINIX=yes
706else
707 echo "$ac_t""no" 1>&6
708MINIX=
709fi
710
711if test "$MINIX" = yes; then
712 cat >> confdefs.h <<\EOF
713#define _POSIX_SOURCE 1
714EOF
715
716 cat >> confdefs.h <<\EOF
717#define _POSIX_1_SOURCE 2
718EOF
719
720 cat >> confdefs.h <<\EOF
721#define _MINIX 1
722EOF
723
724fi
725
726echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
727if test -d /etc/conf/kconfig.d &&
728 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
729then
730 echo "$ac_t""yes" 1>&6
731 ISC=yes # If later tests want to check for ISC.
732 cat >> confdefs.h <<\EOF
733#define _POSIX_SOURCE 1
734EOF
735
736 if test "$GCC" = yes; then
737 CC="$CC -posix"
738 else
739 CC="$CC -Xp"
740 fi
741else
742 echo "$ac_t""no" 1>&6
743 ISC=
744fi
745
746
747ac_aux_dir=
748for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
749 if test -f $ac_dir/install-sh; then
750 ac_aux_dir=$ac_dir
751 ac_install_sh="$ac_aux_dir/install-sh -c"
752 break
753 elif test -f $ac_dir/install.sh; then
754 ac_aux_dir=$ac_dir
755 ac_install_sh="$ac_aux_dir/install.sh -c"
756 break
757 fi
758done
759if test -z "$ac_aux_dir"; then
760 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
761fi
762ac_config_guess=$ac_aux_dir/config.guess
763ac_config_sub=$ac_aux_dir/config.sub
764ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
765
766# Find a good install program. We prefer a C program (faster),
767# so one script is as good as another. But avoid the broken or
768# incompatible versions:
769# SysV /etc/install, /usr/sbin/install
770# SunOS /usr/etc/install
771# IRIX /sbin/install
772# AIX /bin/install
773# AFS /usr/afsws/bin/install, which mishandles nonexistent args
774# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
775# ./install, which can be erroneously created by make from ./install.sh.
776echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
777if test -z "$INSTALL"; then
778if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
779 echo $ac_n "(cached) $ac_c" 1>&6
780else
781 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
782 for ac_dir in $PATH; do
783 # Account for people who put trailing slashes in PATH elements.
784 case "$ac_dir/" in
785 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
786 *)
787 # OSF1 and SCO ODT 3.0 have their own names for install.
788 for ac_prog in ginstall installbsd scoinst install; do
789 if test -f $ac_dir/$ac_prog; then
790 if test $ac_prog = install &&
791 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
792 # AIX install. It has an incompatible calling convention.
793 # OSF/1 installbsd also uses dspmsg, but is usable.
794 :
795 else
796 ac_cv_path_install="$ac_dir/$ac_prog -c"
797 break 2
798 fi
799 fi
800 done
801 ;;
802 esac
803 done
804 IFS="$ac_save_ifs"
7c40dd08 805
5436fc65 806fi
7c40dd08
DE
807 if test "${ac_cv_path_install+set}" = set; then
808 INSTALL="$ac_cv_path_install"
809 else
810 # As a last resort, use the slow shell script. We don't cache a
811 # path for INSTALL within a source directory, because that will
812 # break other packages using the cache if that directory is
813 # removed, or if the path is relative.
814 INSTALL="$ac_install_sh"
815 fi
5436fc65
C
816fi
817echo "$ac_t""$INSTALL" 1>&6
818
819# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
820# It thinks the first close brace ends the variable substitution.
821test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
822
823test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
824
825# Extract the first word of "ranlib", so it can be a program name with args.
826set dummy ranlib; ac_word=$2
827echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
828if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
829 echo $ac_n "(cached) $ac_c" 1>&6
830else
831 if test -n "$RANLIB"; then
832 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
833else
834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 835 for ac_dir in $PATH; do
5436fc65
C
836 test -z "$ac_dir" && ac_dir=.
837 if test -f $ac_dir/$ac_word; then
838 ac_cv_prog_RANLIB="ranlib"
839 break
840 fi
841 done
842 IFS="$ac_save_ifs"
843 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
844fi
845fi
846RANLIB="$ac_cv_prog_RANLIB"
847if test -n "$RANLIB"; then
848 echo "$ac_t""$RANLIB" 1>&6
849else
850 echo "$ac_t""no" 1>&6
851fi
852
204c8825
FF
853for ac_prog in 'bison -y' byacc
854do
855# Extract the first word of "$ac_prog", so it can be a program name with args.
856set dummy $ac_prog; ac_word=$2
857echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
858if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
860else
861 if test -n "$YACC"; then
862 ac_cv_prog_YACC="$YACC" # Let the user override the test.
863else
864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
865 for ac_dir in $PATH; do
866 test -z "$ac_dir" && ac_dir=.
867 if test -f $ac_dir/$ac_word; then
868 ac_cv_prog_YACC="$ac_prog"
869 break
870 fi
871 done
872 IFS="$ac_save_ifs"
873fi
874fi
875YACC="$ac_cv_prog_YACC"
876if test -n "$YACC"; then
877 echo "$ac_t""$YACC" 1>&6
878else
879 echo "$ac_t""no" 1>&6
880fi
881
882test -n "$YACC" && break
883done
884test -n "$YACC" || YACC="yacc"
885
5436fc65
C
886
887ac_aux_dir=
888for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
889 if test -f $ac_dir/install-sh; then
890 ac_aux_dir=$ac_dir
891 ac_install_sh="$ac_aux_dir/install-sh -c"
892 break
893 elif test -f $ac_dir/install.sh; then
894 ac_aux_dir=$ac_dir
895 ac_install_sh="$ac_aux_dir/install.sh -c"
896 break
897 fi
898done
899if test -z "$ac_aux_dir"; then
900 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
901fi
902ac_config_guess=$ac_aux_dir/config.guess
903ac_config_sub=$ac_aux_dir/config.sub
904ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
905
906
907# Do some error checking and defaulting for the host and target type.
908# The inputs are:
909# configure --host=HOST --target=TARGET --build=BUILD NONOPT
910#
911# The rules are:
912# 1. You are not allowed to specify --host, --target, and nonopt at the
7c40dd08 913# same time.
5436fc65
C
914# 2. Host defaults to nonopt.
915# 3. If nonopt is not specified, then host defaults to the current host,
916# as determined by config.guess.
917# 4. Target and build default to nonopt.
918# 5. If nonopt is not specified, then target and build default to host.
919
920# The aliases save the names the user supplied, while $host etc.
921# will get canonicalized.
922case $host---$target---$nonopt in
923NONE---*---* | *---NONE---* | *---*---NONE) ;;
924*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
925esac
926
927
928# Make sure we can run config.sub.
929if $ac_config_sub sun4 >/dev/null 2>&1; then :
930else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
931fi
932
933echo $ac_n "checking host system type""... $ac_c" 1>&6
934
935host_alias=$host
936case "$host_alias" in
937NONE)
938 case $nonopt in
939 NONE)
940 if host_alias=`$ac_config_guess`; then :
941 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
942 fi ;;
943 *) host_alias=$nonopt ;;
944 esac ;;
945esac
946
947host=`$ac_config_sub $host_alias`
948host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
949host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
950host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
951echo "$ac_t""$host" 1>&6
952
953echo $ac_n "checking target system type""... $ac_c" 1>&6
954
955target_alias=$target
956case "$target_alias" in
957NONE)
958 case $nonopt in
959 NONE) target_alias=$host_alias ;;
960 *) target_alias=$nonopt ;;
961 esac ;;
962esac
963
964target=`$ac_config_sub $target_alias`
965target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
966target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
967target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
968echo "$ac_t""$target" 1>&6
969
970echo $ac_n "checking build system type""... $ac_c" 1>&6
971
972build_alias=$build
973case "$build_alias" in
974NONE)
975 case $nonopt in
976 NONE) build_alias=$host_alias ;;
977 *) build_alias=$nonopt ;;
978 esac ;;
979esac
980
981build=`$ac_config_sub $build_alias`
982build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
983build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
984build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
985echo "$ac_t""$build" 1>&6
986
987test "$host_alias" != "$target_alias" &&
988 test "$program_prefix$program_suffix$program_transform_name" = \
989 NONENONEs,x,x, &&
990 program_prefix=${target_alias}-
991
992if test "$program_transform_name" = s,x,x,; then
993 program_transform_name=
994else
7c40dd08
DE
995 # Double any \ or $. echo might interpret backslashes.
996 cat <<\EOF_SED > conftestsed
997s,\\,\\\\,g; s,\$,$$,g
998EOF_SED
5436fc65
C
999 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1000 rm -f conftestsed
1001fi
1002test "$program_prefix" != NONE &&
1003 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1004# Use a double $ so make ignores it.
1005test "$program_suffix" != NONE &&
1006 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1007
1008# sed with no file args requires a program.
1009test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1010
1011
2b576293
C
1012# If we cannot run a trivial program, we must be cross compiling.
1013echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1014if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
1016else
1017 if test "$cross_compiling" = yes; then
1018 ac_cv_c_cross=yes
1019else
1020cat > conftest.$ac_ext <<EOF
7c40dd08 1021#line 1022 "configure"
2b576293
C
1022#include "confdefs.h"
1023main(){return(0);}
1024EOF
1025eval $ac_link
1026if test -s conftest && (./conftest; exit) 2>/dev/null; then
1027 ac_cv_c_cross=no
1028else
1029 ac_cv_c_cross=yes
1030fi
1031fi
1032rm -fr conftest*
1033fi
7c40dd08 1034
da3d57e3 1035echo "$ac_t""$ac_cv_c_cross" 1>&6
7c40dd08 1036cross_compiling=$ac_cv_c_cross
2b576293
C
1037
1038echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1039if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1040 echo $ac_n "(cached) $ac_c" 1>&6
1041else
1042 cat > conftest.$ac_ext <<EOF
7c40dd08 1043#line 1044 "configure"
2b576293
C
1044#include "confdefs.h"
1045#include <stdlib.h>
1046#include <stdarg.h>
1047#include <string.h>
1048#include <float.h>
1049EOF
1050eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1051ac_err=`grep -v '^ *+' conftest.out`
1052if test -z "$ac_err"; then
1053 rm -rf conftest*
1054 ac_cv_header_stdc=yes
1055else
1056 echo "$ac_err" >&5
1057 rm -rf conftest*
1058 ac_cv_header_stdc=no
1059fi
1060rm -f conftest*
1061
1062if test $ac_cv_header_stdc = yes; then
1063 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1064cat > conftest.$ac_ext <<EOF
7c40dd08 1065#line 1066 "configure"
2b576293
C
1066#include "confdefs.h"
1067#include <string.h>
1068EOF
1069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1070 egrep "memchr" >/dev/null 2>&1; then
1071 :
1072else
1073 rm -rf conftest*
1074 ac_cv_header_stdc=no
1075fi
1076rm -f conftest*
1077
1078fi
1079
1080if test $ac_cv_header_stdc = yes; then
1081 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1082cat > conftest.$ac_ext <<EOF
7c40dd08 1083#line 1084 "configure"
2b576293
C
1084#include "confdefs.h"
1085#include <stdlib.h>
1086EOF
1087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1088 egrep "free" >/dev/null 2>&1; then
1089 :
1090else
1091 rm -rf conftest*
1092 ac_cv_header_stdc=no
1093fi
1094rm -f conftest*
1095
1096fi
1097
1098if test $ac_cv_header_stdc = yes; then
1099 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1100if test "$cross_compiling" = yes; then
7c40dd08 1101 :
2b576293
C
1102else
1103cat > conftest.$ac_ext <<EOF
7c40dd08 1104#line 1105 "configure"
2b576293
C
1105#include "confdefs.h"
1106#include <ctype.h>
1107#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1108#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1109#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1110int main () { int i; for (i = 0; i < 256; i++)
1111if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1112exit (0); }
1113
1114EOF
1115eval $ac_link
1116if test -s conftest && (./conftest; exit) 2>/dev/null; then
1117 :
1118else
1119 ac_cv_header_stdc=no
1120fi
1121fi
1122rm -fr conftest*
1123fi
1124fi
7c40dd08 1125
2b576293
C
1126echo "$ac_t""$ac_cv_header_stdc" 1>&6
1127if test $ac_cv_header_stdc = yes; then
1128 cat >> confdefs.h <<\EOF
1129#define STDC_HEADERS 1
1130EOF
1131
1132fi
1133
da3d57e3 1134for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h
1a494973
C
1135do
1136ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1137echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1138if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1139 echo $ac_n "(cached) $ac_c" 1>&6
1140else
1141 cat > conftest.$ac_ext <<EOF
7c40dd08 1142#line 1143 "configure"
1a494973
C
1143#include "confdefs.h"
1144#include <$ac_hdr>
1145EOF
1146eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1147ac_err=`grep -v '^ *+' conftest.out`
1148if test -z "$ac_err"; then
1149 rm -rf conftest*
1150 eval "ac_cv_header_$ac_safe=yes"
1151else
1152 echo "$ac_err" >&5
1153 rm -rf conftest*
1154 eval "ac_cv_header_$ac_safe=no"
1155fi
1156rm -f conftest*
1157fi
1158if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1159 echo "$ac_t""yes" 1>&6
7c40dd08 1160 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1a494973
C
1161 cat >> confdefs.h <<EOF
1162#define $ac_tr_hdr 1
1163EOF
1164
1165else
1166 echo "$ac_t""no" 1>&6
1167fi
1168done
1169
2b576293
C
1170echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1171if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1172 echo $ac_n "(cached) $ac_c" 1>&6
1173else
1174 cat > conftest.$ac_ext <<EOF
7c40dd08 1175#line 1176 "configure"
2b576293
C
1176#include "confdefs.h"
1177#include <sys/types.h>
1178#include <sys/stat.h>
1179
1180#if defined(S_ISBLK) && defined(S_IFDIR)
1181# if S_ISBLK (S_IFDIR)
1182You lose.
1183# endif
1184#endif
1185
1186#if defined(S_ISBLK) && defined(S_IFCHR)
1187# if S_ISBLK (S_IFCHR)
1188You lose.
1189# endif
1190#endif
1191
1192#if defined(S_ISLNK) && defined(S_IFREG)
1193# if S_ISLNK (S_IFREG)
1194You lose.
1195# endif
1196#endif
1197
1198#if defined(S_ISSOCK) && defined(S_IFREG)
1199# if S_ISSOCK (S_IFREG)
1200You lose.
1201# endif
1202#endif
1203
1204EOF
1205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1206 egrep "You lose" >/dev/null 2>&1; then
1207 rm -rf conftest*
1208 ac_cv_header_stat_broken=yes
1209else
1210 rm -rf conftest*
1211 ac_cv_header_stat_broken=no
1212fi
1213rm -f conftest*
1214
1215fi
7c40dd08 1216
2b576293
C
1217echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1218if test $ac_cv_header_stat_broken = yes; then
1219 cat >> confdefs.h <<\EOF
1220#define STAT_MACROS_BROKEN 1
1221EOF
1222
1223fi
1224
1225
7c40dd08
DE
1226for ac_func in valloc getpagesize
1227do
1228echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1229if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 cat > conftest.$ac_ext <<EOF
1233#line 1234 "configure"
1234#include "confdefs.h"
1235/* System header to define __stub macros and hopefully few prototypes,
1236 which can conflict with char $ac_func(); below. */
1237#include <assert.h>
1238/* Override any gcc2 internal prototype to avoid an error. */
1239char $ac_func();
1240
1241int main() { return 0; }
1242int t() {
1243
1244/* The GNU C library defines this for functions which it implements
1245 to always fail with ENOSYS. Some functions are actually named
1246 something starting with __ and the normal name is an alias. */
1247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1248choke me
1249#else
1250$ac_func();
1251#endif
1252
1253; return 0; }
1254EOF
1255if eval $ac_link; then
1256 rm -rf conftest*
1257 eval "ac_cv_func_$ac_func=yes"
1258else
1259 rm -rf conftest*
1260 eval "ac_cv_func_$ac_func=no"
1261fi
1262rm -f conftest*
1263
1264fi
1265if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1266 echo "$ac_t""yes" 1>&6
1267 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1268 cat >> confdefs.h <<EOF
1269#define $ac_tr_func 1
1270EOF
1271
1272else
1273 echo "$ac_t""no" 1>&6
1274fi
1275done
1276
2b576293
C
1277echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1278if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1279 echo $ac_n "(cached) $ac_c" 1>&6
1280else
1281 if test "$cross_compiling" = yes; then
1282 ac_cv_func_mmap=no
1283else
1284cat > conftest.$ac_ext <<EOF
7c40dd08 1285#line 1286 "configure"
2b576293
C
1286#include "confdefs.h"
1287
1288/* Thanks to Mike Haertel and Jim Avera for this test. */
1289#include <sys/types.h>
1290#include <fcntl.h>
1291#include <sys/mman.h>
1292
2b576293
C
1293#ifndef HAVE_GETPAGESIZE
1294# include <sys/param.h>
1295# ifdef EXEC_PAGESIZE
1296# define getpagesize() EXEC_PAGESIZE
1297# else
1298# ifdef NBPG
1299# define getpagesize() NBPG * CLSIZE
1300# ifndef CLSIZE
1301# define CLSIZE 1
1302# endif
1303# else
1304# ifdef NBPC
1305# define getpagesize() NBPC
1306# else
1307# define getpagesize() PAGESIZE /* SVR4 */
1308# endif
1309# endif
1310# endif
1311#endif
1312
7c40dd08 1313#ifndef HAVE_VALLOC
2b576293
C
1314# define valloc malloc
1315#endif
1316
1317#ifdef __cplusplus
1318extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1319#else
1320char *valloc(), *malloc();
1321#endif
1322
1323int
1324main()
1325{
1326 char *buf1, *buf2, *buf3;
1327 int i = getpagesize(), j;
7c40dd08 1328 int i2 = i * 2;
2b576293
C
1329 int fd;
1330
1331 buf1 = (char *)valloc(i2);
1332 buf2 = (char *)valloc(i);
1333 buf3 = (char *)malloc(i2);
1334 for (j = 0; j < i2; ++j)
1335 *(buf1 + j) = rand();
1336 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1337 write(fd, buf1, i2);
1338 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1339 for (j = 0; j < i; ++j)
1340 if (*(buf1 + j) != *(buf2 + j))
1341 exit(1);
1342 lseek(fd, (long)i, 0);
1343 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1344 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1345 lseek(fd, (long)0, 0);
1346 read(fd, buf3, i2);
1347 for (j = 0; j < i2; ++j)
1348 if (*(buf1 + j) != *(buf3 + j))
1349 exit(1);
1350 exit(0);
1351}
1352
1353EOF
1354eval $ac_link
1355if test -s conftest && (./conftest; exit) 2>/dev/null; then
1356 ac_cv_func_mmap=yes
1357else
1358 ac_cv_func_mmap=no
1359fi
1360fi
1361rm -fr conftest*
1362fi
7c40dd08 1363
2b576293
C
1364echo "$ac_t""$ac_cv_func_mmap" 1>&6
1365if test $ac_cv_func_mmap = yes; then
1366 cat >> confdefs.h <<\EOF
1367#define HAVE_MMAP 1
1368EOF
1369
1370fi
1371
5436fc65
C
1372
1373ENABLE_CFLAGS=
1374ENABLE_CLIBS=
1375ENABLE_OBS=
1376
1377# Check whether --enable-netrom or --disable-netrom was given.
7c40dd08
DE
1378if test "${enable_netrom+set}" = set; then
1379 enableval="$enable_netrom"
5436fc65
C
1380 case "${enableval}" in
1381yes) enable_netrom=yes ;;
1382no) enable_netrom=no ;;
1383*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1384esac
1385fi
1386
1387
1388if test "${enable_netrom}" = "yes"; then
1389 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1390fi
1391
188c635f
SG
1392# start-sanitize-gm
1393ENABLE_GM=
1394
1395# Check whether --enable-gm or --disable-gm was given.
7c40dd08
DE
1396if test "${enable_gm+set}" = set; then
1397 enableval="$enable_gm"
188c635f
SG
1398 case "${enableval}" in
1399yes) ENABLE_OBS="${ENABLE_OBS} magic.o"
1400 ENABLE_CFLAGS=-DGENERAL_MAGIC
1401 ;;
1402no) ;;
1403*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1404esac
1405fi
1406
1407
1408# end-sanitize-gm
1409
3c0bf315 1410# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
7c40dd08
DE
1411if test "${enable_sim_powerpc+set}" = set; then
1412 enableval="$enable_sim_powerpc"
3c0bf315
MM
1413 case "${enableval}" in
1414yes) powerpc_sim=yes ;;
1415no) powerpc_sim=no ;;
1416*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1417esac
1418else
1419 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1420fi
1421
1422
5436fc65
C
1423# start-sanitize-gdbtk
1424ENABLE_GDBTK=
1425
1426# Check whether --enable-gdbtk or --disable-gdbtk was given.
7c40dd08
DE
1427if test "${enable_gdbtk+set}" = set; then
1428 enableval="$enable_gdbtk"
5436fc65 1429 case "${enableval}" in
0fe1522a
SG
1430 yes)
1431 case "$host" in
1432 *go32*)
1433 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1434 enable_gdbtk=no ;;
1435 *)
1436 enable_gdbtk=yes ;;
1437 esac ;;
1438 no)
1439 enable_gdbtk=no ;;
1440 *)
1441 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 1442esac
0fe1522a
SG
1443else
1444
1445# Default is on for everything but go32
1446case "$host" in
1447 *go32*)
1448 ;;
1449 *)
1450 enable_gdbtk=yes ;;
1451 esac
1452
5436fc65
C
1453fi
1454
1455
1456if test "${enable_gdbtk}" = "yes"; then
0fe1522a 1457
a2b63bbd 1458 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1459# paths, otherwise set no_x=yes.
1460# Uses ac_ vars as temps to allow command line to override cache and checks.
1461# --without-x overrides everything else, but does not touch the cache.
1462echo $ac_n "checking for X""... $ac_c" 1>&6
1463
1464# Check whether --with-x or --without-x was given.
7c40dd08
DE
1465if test "${with_x+set}" = set; then
1466 withval="$with_x"
5436fc65
C
1467 :
1468fi
1469
1470if test "x$with_x" = xno; then
1471 no_x=yes
1472else
1473 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1474 no_x=
1475 else
1476if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
1478else
1479 # One or both of the vars are not set, and there is no cached value.
1480no_x=yes
1481rm -fr conftestdir
1482if mkdir conftestdir; then
1483 cd conftestdir
1484 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1485 cat > Imakefile <<'EOF'
1486acfindx:
1487 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1488EOF
1489 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1490 no_x=
1491 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7c40dd08 1492 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5436fc65 1493 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1494 for ac_extension in a so sl; do
1495 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1496 test -f $ac_im_libdir/libX11.$ac_extension; then
1497 ac_im_usrlibdir=$ac_im_libdir; break
1498 fi
1499 done
5436fc65
C
1500 # Screen out bogus values from the imake configuration.
1501 case "$ac_im_incroot" in
1502 /usr/include) ;;
1503 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1504 esac
1505 case "$ac_im_usrlibdir" in
1506 /usr/lib | /lib) ;;
1507 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1508 esac
1509 fi
1510 cd ..
1511 rm -fr conftestdir
1512fi
1513
1514if test "$no_x" = yes; then
1515test -z "$x_direct_test_library" && x_direct_test_library=Xt
1516test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1517test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1518cat > conftest.$ac_ext <<EOF
0fe1522a 1519#line 1520 "configure"
5436fc65
C
1520#include "confdefs.h"
1521#include <$x_direct_test_include>
1522EOF
1523eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1524ac_err=`grep -v '^ *+' conftest.out`
1525if test -z "$ac_err"; then
1526 rm -rf conftest*
1527 no_x= ac_x_includes=
1528else
1529 echo "$ac_err" >&5
1530 rm -rf conftest*
1531 for ac_dir in \
1532 /usr/X11R6/include \
1533 /usr/X11R5/include \
1534 /usr/X11R4/include \
1535 \
1536 /usr/include/X11R6 \
1537 /usr/include/X11R5 \
1538 /usr/include/X11R4 \
1539 \
1540 /usr/local/X11R6/include \
1541 /usr/local/X11R5/include \
1542 /usr/local/X11R4/include \
1543 \
1544 /usr/local/include/X11R6 \
1545 /usr/local/include/X11R5 \
1546 /usr/local/include/X11R4 \
1547 \
1548 /usr/X11/include \
1549 /usr/include/X11 \
1550 /usr/local/X11/include \
1551 /usr/local/include/X11 \
1552 \
1553 /usr/X386/include \
1554 /usr/x386/include \
1555 /usr/XFree86/include/X11 \
1556 \
1557 /usr/include \
1558 /usr/local/include \
1559 /usr/unsupported/include \
1560 /usr/athena/include \
1561 /usr/local/x11r5/include \
1562 /usr/lpp/Xamples/include \
1563 \
1564 /usr/openwin/include \
1565 /usr/openwin/share/include \
1566 ; \
1567 do
1568 if test -r "$ac_dir/$x_direct_test_include"; then
1569 no_x= ac_x_includes=$ac_dir
1570 break
1571 fi
1572 done
1573fi
1574rm -f conftest*
1575
1576# Check for the libraries.
1577# See if we find them without any special options.
1578# Don't add to $LIBS permanently.
1579ac_save_LIBS="$LIBS"
1580LIBS="-l$x_direct_test_library $LIBS"
1581cat > conftest.$ac_ext <<EOF
0fe1522a 1582#line 1583 "configure"
5436fc65
C
1583#include "confdefs.h"
1584
1585int main() { return 0; }
1586int t() {
1587${x_direct_test_function}()
1588; return 0; }
1589EOF
1590if eval $ac_link; then
1591 rm -rf conftest*
1592 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1593else
1594 rm -rf conftest*
1595 LIBS="$ac_save_LIBS"
1596# First see if replacing the include by lib works.
1597for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1598 /usr/X11R6/lib \
1599 /usr/X11R5/lib \
1600 /usr/X11R4/lib \
1601 \
1602 /usr/lib/X11R6 \
1603 /usr/lib/X11R5 \
1604 /usr/lib/X11R4 \
1605 \
1606 /usr/local/X11R6/lib \
1607 /usr/local/X11R5/lib \
1608 /usr/local/X11R4/lib \
1609 \
1610 /usr/local/lib/X11R6 \
1611 /usr/local/lib/X11R5 \
1612 /usr/local/lib/X11R4 \
1613 \
1614 /usr/X11/lib \
1615 /usr/lib/X11 \
1616 /usr/local/X11/lib \
1617 /usr/local/lib/X11 \
1618 \
1619 /usr/X386/lib \
1620 /usr/x386/lib \
1621 /usr/XFree86/lib/X11 \
1622 \
1623 /usr/lib \
1624 /usr/local/lib \
1625 /usr/unsupported/lib \
1626 /usr/athena/lib \
1627 /usr/local/x11r5/lib \
1628 /usr/lpp/Xamples/lib \
1629 \
1630 /usr/openwin/lib \
1631 /usr/openwin/share/lib \
1632 ; \
1633do
1634 for ac_extension in a so sl; do
1635 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1636 no_x= ac_x_libraries=$ac_dir
1637 break 2
1638 fi
1639 done
1640done
1641fi
1642rm -f conftest*
1643
1644fi
1645if test "$no_x" = yes; then
1646 ac_cv_path_x="no_x=yes"
1647else
1648 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1649fi
1650fi
1651 fi
1652 eval "$ac_cv_path_x"
1653fi # $with_x != no
1654
1655if test "$no_x" = yes; then
1656 echo "$ac_t""no" 1>&6
1657else
1658 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1659 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1660 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1661 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1662fi
1663
a2b63bbd 1664 if test "$no_x" = yes; then
5436fc65
C
1665 # Not all programs may use this symbol, but it does not hurt to define it.
1666 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1667else
1668 if test -n "$x_includes"; then
1669 X_CFLAGS="$X_CFLAGS -I$x_includes"
1670 fi
1671
1672 # It would be nice to have a more robust check for the -R ld option than
1673 # just checking for Solaris.
1674 # It would also be nice to do this for all -L options, not just this one.
1675 if test -n "$x_libraries"; then
1676 X_LIBS="$X_LIBS -L$x_libraries"
1677 if test "`(uname) 2>/dev/null`" = SunOS &&
1678 uname -r | grep '^5' >/dev/null; then
7c40dd08 1679 X_LIBS="$X_LIBS -R $x_libraries"
5436fc65
C
1680 fi
1681 fi
1682
1683 # Check for libraries that X11R6 Xt/Xaw programs need.
1684
1685 ac_save_LDFLAGS="$LDFLAGS"
1686 LDFLAGS="$LDFLAGS -L$x_libraries"
1687 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1688 # check for ICE first), but we must link in the order -lSM -lICE or
1689 # we get undefined symbols. So assume we have SM if we have ICE.
1690 # These have to be linked with before -lX11, unlike the other
1691 # libraries we check for below, so use a different variable.
1692 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1693 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
7c40dd08
DE
1694ac_lib_var=`echo ICE | tr '.-/+' '___p'`
1695if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1696 echo $ac_n "(cached) $ac_c" 1>&6
1697else
1698 ac_save_LIBS="$LIBS"
1699LIBS="-lICE $LIBS"
1700cat > conftest.$ac_ext <<EOF
0fe1522a 1701#line 1702 "configure"
5436fc65
C
1702#include "confdefs.h"
1703
1704int main() { return 0; }
1705int t() {
1706IceConnectionNumber()
1707; return 0; }
1708EOF
1709if eval $ac_link; then
1710 rm -rf conftest*
7c40dd08 1711 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1712else
1713 rm -rf conftest*
7c40dd08 1714 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1715fi
1716rm -f conftest*
1717LIBS="$ac_save_LIBS"
1718
1719fi
7c40dd08 1720if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1721 echo "$ac_t""yes" 1>&6
1722 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1723else
1724 echo "$ac_t""no" 1>&6
1725fi
1726
1727 LDFLAGS="$ac_save_LDFLAGS"
1728
1729 # Check for system-dependent libraries X programs must link with.
1730
1731 if test "$ISC" = yes; then
1732 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1733 else
1734 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1735 # libraries were built with DECnet support. And karl@cs.umb.edu says
1736 # the Alpha needs dnet_stub (dnet does not exist).
1737 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
7c40dd08
DE
1738ac_lib_var=`echo dnet | tr '.-/+' '___p'`
1739if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1740 echo $ac_n "(cached) $ac_c" 1>&6
1741else
1742 ac_save_LIBS="$LIBS"
1743LIBS="-ldnet $LIBS"
1744cat > conftest.$ac_ext <<EOF
0fe1522a 1745#line 1746 "configure"
5436fc65
C
1746#include "confdefs.h"
1747
1748int main() { return 0; }
1749int t() {
1750dnet_ntoa()
1751; return 0; }
1752EOF
1753if eval $ac_link; then
1754 rm -rf conftest*
7c40dd08 1755 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1756else
1757 rm -rf conftest*
7c40dd08 1758 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1759fi
1760rm -f conftest*
1761LIBS="$ac_save_LIBS"
1762
1763fi
7c40dd08 1764if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1765 echo "$ac_t""yes" 1>&6
1766 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1767else
1768 echo "$ac_t""no" 1>&6
1769fi
1770
1771 if test $ac_cv_lib_dnet = no; then
1772 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
7c40dd08
DE
1773ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
1774if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1775 echo $ac_n "(cached) $ac_c" 1>&6
1776else
1777 ac_save_LIBS="$LIBS"
1778LIBS="-ldnet_stub $LIBS"
1779cat > conftest.$ac_ext <<EOF
0fe1522a 1780#line 1781 "configure"
5436fc65
C
1781#include "confdefs.h"
1782
1783int main() { return 0; }
1784int t() {
1785dnet_ntoa()
1786; return 0; }
1787EOF
1788if eval $ac_link; then
1789 rm -rf conftest*
7c40dd08 1790 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1791else
1792 rm -rf conftest*
7c40dd08 1793 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1794fi
1795rm -f conftest*
1796LIBS="$ac_save_LIBS"
1797
1798fi
7c40dd08 1799if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1800 echo "$ac_t""yes" 1>&6
1801 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1802else
1803 echo "$ac_t""no" 1>&6
1804fi
1805
1806 fi
1807
1808 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1809 # to get the SysV transport functions.
1810 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1811 # check for it.
1812 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
7c40dd08
DE
1813ac_lib_var=`echo nsl | tr '.-/+' '___p'`
1814if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1815 echo $ac_n "(cached) $ac_c" 1>&6
1816else
1817 ac_save_LIBS="$LIBS"
1818LIBS="-lnsl $LIBS"
1819cat > conftest.$ac_ext <<EOF
0fe1522a 1820#line 1821 "configure"
5436fc65
C
1821#include "confdefs.h"
1822
1823int main() { return 0; }
1824int t() {
1825t_accept()
1826; return 0; }
1827EOF
1828if eval $ac_link; then
1829 rm -rf conftest*
7c40dd08 1830 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1831else
1832 rm -rf conftest*
7c40dd08 1833 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1834fi
1835rm -f conftest*
1836LIBS="$ac_save_LIBS"
1837
1838fi
7c40dd08 1839if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1840 echo "$ac_t""yes" 1>&6
1841 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1842else
1843 echo "$ac_t""no" 1>&6
1844fi
1845
1846
1847 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1848 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1849 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1850 if test "`(uname) 2>/dev/null`" != IRIX; then
1851 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
7c40dd08
DE
1852ac_lib_var=`echo socket | tr '.-/+' '___p'`
1853if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855else
1856 ac_save_LIBS="$LIBS"
1857LIBS="-lsocket $LIBS"
1858cat > conftest.$ac_ext <<EOF
0fe1522a 1859#line 1860 "configure"
5436fc65
C
1860#include "confdefs.h"
1861
1862int main() { return 0; }
1863int t() {
1864socket()
1865; return 0; }
1866EOF
1867if eval $ac_link; then
1868 rm -rf conftest*
7c40dd08 1869 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1870else
1871 rm -rf conftest*
7c40dd08 1872 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1873fi
1874rm -f conftest*
1875LIBS="$ac_save_LIBS"
1876
1877fi
7c40dd08 1878if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1879 echo "$ac_t""yes" 1>&6
1880 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1881else
1882 echo "$ac_t""no" 1>&6
1883fi
1884
1885 fi
1886 fi
1887fi
1888
1889
a2b63bbd 1890
5436fc65
C
1891#
1892# Ok, lets find the tk source trees so we can use the headers
1893# If the directory (presumably symlink) named "tk" exists, use that one
1894# in preference to any others. Same logic is used when choosing library
1895# and again with Tcl.
1896#
1897echo "checking for Tk source directory" 1>&6
1898TKHDIR=""
1899for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do
1900 if test -f $i/tk.h ; then
1901 TKHDIR="-I$i"
1902 fi
1903done
1904# if we can't find it, see if one is installed
1905if test x"$TKHDIR" = x ; then
1906 installed=0
1907 if test -f $prefix/include/tk.h; then
1908 installed=1 TKHDIR="-I$prefix/include"
1909 else
1910 ac_safe=`echo "tk.h" | tr './\055' '___'`
1911echo $ac_n "checking for tk.h""... $ac_c" 1>&6
1912if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914else
1915 cat > conftest.$ac_ext <<EOF
0fe1522a 1916#line 1917 "configure"
5436fc65
C
1917#include "confdefs.h"
1918#include <tk.h>
1919EOF
1920eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1921ac_err=`grep -v '^ *+' conftest.out`
1922if test -z "$ac_err"; then
1923 rm -rf conftest*
1924 eval "ac_cv_header_$ac_safe=yes"
1925else
1926 echo "$ac_err" >&5
1927 rm -rf conftest*
1928 eval "ac_cv_header_$ac_safe=no"
1929fi
1930rm -f conftest*
1931fi
1932if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1933 echo "$ac_t""yes" 1>&6
1934 installed=1
1935else
1936 echo "$ac_t""no" 1>&6
1937fi
1938
1939 fi
1940 if test $installed -eq 0 ; then
1941 TKHDIR="# no Tk directory found"
1942 echo "configure: warning: Can't find Tk directory" 1>&2
1943 fi
1944fi
1945if test x"$TKHDIR" != x ; then
1946 echo "$ac_t""Setting TKHDIR to be $i" 1>&6
1947fi
1948
1949#
1950# Ok, lets find the tk library
1951# First, look for one uninstalled.
1952#
1953TKLIB=""
1954echo "checking for Tk library" 1>&6
1955for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1956 if test -f "$i/Makefile" ; then
1957 TKLIB=$i/libtk.a
1958 fi
1959done
1960# If not found, look for installed version
1961if test x"$TKLIB" = x ; then
1962 if test -f $prefix/lib/libtk.a; then
1963 installed=1
1964 else
1965 installed=0
1966 fi
1967 if test $installed -eq 1 ; then
1968 TKLIB="-ltk"
1969 fi
1970fi
1971
1972# If still not found, assume Tk simply hasn't been built yet
1973if test x"$TKLIB" = x ; then
1974 for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1975 if test -f "$i/tk.h" ; then
1976 TKLIB=$i/libtk.a
1977 fi
1978 done
1979fi
1980
1981if test x"$TKLIB" = x ; then
1982 TKLIB="# no Tk library found"
1983 echo "configure: warning: Can't find Tk library" 1>&2
1984else
1985 echo "$ac_t""setting TKLIB to be $TKLIB" 1>&6
1986 no_tk=
1987fi
1988
1989
1990
1991
a2b63bbd 1992
5436fc65
C
1993#
1994# Ok, lets find the tcl source trees so we can use the headers
1995#
1996# Warning: transition of version 9 to 10 will break this algorithm
1997# because 10 sorts before 9.
1998#
1999echo "checking for Tcl source directory" 1>&6
2000TCLHDIR=""
2001for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do
2002 if test -f $i/tclInt.h ; then
2003 TCLHDIR="-I$i"
2004 fi
2005done
2006# if we can't find it, see if one is installed
2007if test x"$TCLHDIR" = x ; then
2008 installed=0
2009 if test -f $prefix/include/tclInt.h; then
2010 installed=1 TCLHDIR="-I$prefix/include"
2011 else
2012 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
2013echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
2014if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2015 echo $ac_n "(cached) $ac_c" 1>&6
2016else
2017 cat > conftest.$ac_ext <<EOF
0fe1522a 2018#line 2019 "configure"
5436fc65
C
2019#include "confdefs.h"
2020#include <tclInt.h>
2021EOF
2022eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2023ac_err=`grep -v '^ *+' conftest.out`
2024if test -z "$ac_err"; then
2025 rm -rf conftest*
2026 eval "ac_cv_header_$ac_safe=yes"
2027else
2028 echo "$ac_err" >&5
2029 rm -rf conftest*
2030 eval "ac_cv_header_$ac_safe=no"
2031fi
2032rm -f conftest*
2033fi
2034if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2035 echo "$ac_t""yes" 1>&6
2036 installed=1
2037else
2038 echo "$ac_t""no" 1>&6
2039fi
2040
2041 fi
2042 if test $installed -eq 0 ; then
2043 TCLHDIR="# no Tcl directory found"
2044 echo "configure: warning: Can't find Tcl directory" 1>&2
2045 fi
2046else
2047 echo "$ac_t""setting TCLHDIR to be $i" 1>&6
2048fi
2049
2050#
2051# Ok, lets find the tcl library
2052# First, look for the latest uninstalled
2053#
2054TCLLIB=""
2055echo "checking for Tcl library" 1>&6
2056for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
2057 if test -f "$i/Makefile" ; then
2058 TCLLIB=$i/libtcl.a
2059 fi
2060done
2061# If not found, look for installed version
2062if test x"$TCLLIB" = x ; then
2063 if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi
2064 if test $installed -eq 1 ; then
2065 TCLLIB="-ltcl"
2066 fi
2067fi
2068# If still not found, assume Tcl simply hasn't been built yet
2069if test x"$TCLLIB" = x ; then
2070 for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
2071 if test -f "$i/tcl.h" ; then
2072 TCLLIB=$i/libtcl.a
2073 fi
2074 done
2075fi
2076
2077if test x"$TCLLIB" = x ; then
2078 TCLLIB="# no Tcl library found"
2079 echo "configure: warning: Can't find Tcl library" 1>&2
2080else
2081 echo "$ac_t""setting TCLLIB to be $TCLLIB" 1>&6
2082fi
2083
2084
2085
2086
2087
a2b63bbd 2088 ENABLE_GDBTK=1
66efdff9 2089
a2b63bbd
JM
2090 if test "x$no_x" != "xyes"; then
2091 if test "x$x_includes" != "x" ;
2092 then
2093 X_CFLAGS="-I$x_includes"
2094 else
2095 X_CFLAGS=""
2096 fi
2097
2098 if test "x$x_libraries" != "x" ;
2099 then
2100 X_LDFLAGS="-L$x_libraries"
2101 else
2102 X_LDFLAGS=""
2103 fi
2104
2105 case "$host" in
2106#
2107# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2108#
2109 sparc-sun-solaris2*)
2110 if test "x$GCC" = "xyes";
2111 then
127841e4 2112 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
2113 else
2114 if test "x$x_libraries" != "x" ;
2115 then
2116 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2117 fi
2118 X_LIBS="-lX11 -lXext -lX11"
2119 fi ;;
2120#
2121# gdb linked statically w/ SunOS or HPUX
2122#
2123 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2124 if test "x$x_libraries" != "x" ;
2125 then
2126 X_LIBS="$x_libraries/libX11.a"
2127 else
2128 X_LIBS="/usr/lib/libX11.a"
2129 fi ;;
2130#
2131# default is to link dynamically
2132#
2133 *)
2134 X_LIBS="-lX11" ;;
2135 esac
2136 else
2137 X_LDLAGS=""
2138 X_CFLAGS=""
2139 X_LIBS=""
2140 echo "configure: warning: No X based programs will be built" 1>&2
2141 fi
2142
2143 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2144 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2145 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2146fi
66efdff9 2147
66efdff9 2148
5436fc65 2149
66efdff9
JM
2150
2151
5436fc65
C
2152# end-sanitize-gdbtk
2153
2154
2155
2156
2157
7c40dd08
DE
2158# target_subdir is used by the testsuite to find the target libraries.
2159target_subdir=
2160if test "${host}" != "${target}"; then
2161 target_subdir="${target_alias}/"
2162fi
2163
5436fc65
C
2164
2165configdirs="doc testsuite"
2166
2167
2168# Map host cpu into the config cpu subdirectory name.
2169# The default is $host_cpu.
2170
2171case "${host_cpu}" in
2172
2173c[12]) gdb_host_cpu=convex ;;
2174hppa*) gdb_host_cpu=pa ;;
3222ff2e 2175i[3456]86) gdb_host_cpu=i386 ;;
5436fc65
C
2176m68*) gdb_host_cpu=m68k ;;
2177m88*) gdb_host_cpu=m88k ;;
2178np1) gdb_host_cpu=gould ;;
2179pyramid) gdb_host_cpu=pyr ;;
2180powerpc*) gdb_host_cpu=powerpc ;;
2181*) gdb_host_cpu=$host_cpu ;;
2182
2183esac
2184
2185# map host info into gdb names.
2186
2187case "${host}" in
2188
2189a29k-*-*) gdb_host=ultra3 ;;
2190
2191alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2192alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2193alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
2194
2195arm-*-*) gdb_host=arm ;;
2196
2197c[12]-*-*) gdb_host=convex ;;
2198
2199hppa*-*-bsd*) gdb_host=hppabsd ;;
2200hppa*-*-hiux*) gdb_host=hppahpux ;;
2201hppa*-*-hpux*) gdb_host=hppahpux ;;
2202hppa*-*-osf*) gdb_host=hppaosf ;;
2203
3222ff2e
MM
2204i[3456]86-ncr-*) gdb_host=ncr3000 ;;
2205i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2206i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
2207i[3456]86-sequent-sysv*) gdb_host=ptx ;;
2208i[3456]86-*-aix*) gdb_host=i386aix ;;
2209i[3456]86-*-bsd*) gdb_host=i386bsd ;;
2210i[3456]86-*-dgux*) gdb_host=i386dgux ;;
2211i[3456]86-*-freebsd*) gdb_host=fbsd ;;
2212i[3456]86-*-netbsd*) gdb_host=nbsd ;;
2213i[3456]86-*-go32*) gdb_host=go32 ;;
2214i[3456]86-*-linux*) gdb_host=linux ;;
2215i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
2216i[3456]86-*-mach3*) gdb_host=i386m3 ;;
2217i[3456]86-*-mach*) gdb_host=i386mach ;;
2218i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
2219i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2220i[3456]86-*-sco*) gdb_host=i386sco ;;
2221i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
2222i[3456]86-*-sunos*) gdb_host=sun386 ;;
2223i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
2224i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
2225i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
2226i[3456]86-*-unixware) gdb_host=i386v4 ;;
2227i[3456]86-*-sysv*) gdb_host=i386v ;;
2228i[3456]86-*-isc*) gdb_host=i386v32 ;;
2229i[3456]86-*-os9k) gdb_host=i386os9k ;;
2230i[3456]86-*-win32*) gdb_host=win32 ;;
5436fc65
C
2231m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2232m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2233m68030-sony-*) gdb_host=news1000 ;;
2234
2235m68*-altos-*) gdb_host=altos ;;
2236m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2237m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2238m68*-att-*) gdb_host=3b1 ;;
2239m68*-bull*-sysv*) gdb_host=dpx2 ;;
2240m68*-hp-bsd*) gdb_host=hp300bsd ;;
2241m68*-hp-hpux*) gdb_host=hp300hpux ;;
2242m68*-isi-*) gdb_host=isi ;;
2243m68*-*-lynxos*) gdb_host=m68klynx ;;
2244m68*-*-sysv4*) gdb_host=m68kv4 ;;
2245m68*-motorola-*) gdb_host=delta68 ;;
2246m68*-sony-*) gdb_host=news ;;
2247m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2248m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2249m68*-sun-*) gdb_host=sun3os4 ;;
2250
2251m88*-harris-cxux*) gdb_host=cxux ;;
2252m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2253m88*-motorola-sysv*) gdb_host=delta88 ;;
2254m88*-*-mach3*) gdb_host=mach3 ;;
2255m88*-*-*) gdb_host=m88k ;;
2256
2257mips-dec-mach3*) gdb_host=mach3 ;;
2258mips-dec-*) gdb_host=decstation ;;
2259mips-little-*) gdb_host=littlemips ;;
2260mips-sgi-irix3*) gdb_host=irix3 ;;
2261mips-sgi-irix4*) gdb_host=irix4 ;;
2262mips-sgi-irix5*) gdb_host=irix5 ;;
2263mips-sony-*) gdb_host=news-mips ;;
2264mips-*-mach3*) gdb_host=mach3 ;;
2265mips-*-sysv4*) gdb_host=mipsv4 ;;
2266mips-*-sysv*) gdb_host=riscos ;;
2267mips-*-riscos*) gdb_host=riscos ;;
2268
2269none-*-*) gdb_host=none ;;
2270
2271np1-*-*) gdb_host=np1 ;;
2272
2273ns32k-*-mach3*) gdb_host=mach3 ;;
2274ns32k-*-netbsd*) gdb_host=nbsd ;;
2275ns32k-umax-*) gdb_host=umax ;;
2276ns32k-utek-sysv*) gdb_host=merlin ;;
2277
fbc3f191
JL
2278powerpc-*-aix*) gdb_host=aix ;;
2279
5436fc65
C
2280pn-*-*) gdb_host=pn ;;
2281
2282pyramid-*-*) gdb_host=pyramid ;;
2283
2284romp-*-*) gdb_host=rtbsd ;;
2285
2286rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
2287rs6000-*-*) gdb_host=rs6000 ;;
2288
2289sparc-*-lynxos*) gdb_host=sparclynx ;;
2290sparc-*-netbsd*) gdb_host=nbsd ;;
2291sparc-*-solaris2*) gdb_host=sun4sol2 ;;
2292sparc-*-sunos4*) gdb_host=sun4os4 ;;
2293sparc-*-sunos5*) gdb_host=sun4sol2 ;;
2294sparc-*-*) gdb_host=sun4os4 ;;
2295
2296tahoe-*-*) gdb_host=tahoe ;;
2297
2298vax-*-bsd*) gdb_host=vaxbsd ;;
2299vax-*-ultrix2*) gdb_host=vaxult2 ;;
2300vax-*-ultrix*) gdb_host=vaxult ;;
2301
2302w65-*-*) gdb_host=w65 ;;
2303
2304esac
2305
2306
2307# Map target cpu into the config cpu subdirectory name.
2308# The default is $target_cpu.
2309
2310case "${target_cpu}" in
2311
2312alpha) gdb_target_cpu=alpha ;;
2313c[12]) gdb_target_cpu=convex ;;
2314hppa*) gdb_target_cpu=pa ;;
3222ff2e 2315i[3456]86) gdb_target_cpu=i386 ;;
5436fc65
C
2316m68*) gdb_target_cpu=m68k ;;
2317m88*) gdb_target_cpu=m88k ;;
2318mips*) gdb_target_cpu=mips ;;
2319np1) gdb_target_cpu=gould ;;
2320powerpc*) gdb_target_cpu=powerpc ;;
2321pn) gdb_target_cpu=gould ;;
2322pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
2323sparc*) gdb_target_cpu=sparc ;;
2324*) gdb_target_cpu=$target_cpu ;;
2325
2326esac
2327
2328# map target info into gdb names.
2329
2330case "${target}" in
2331
2332a29k-*-aout*) gdb_target=a29k ;;
2333a29k-*-coff*) gdb_target=a29k ;;
2334a29k-*-elf*) gdb_target=a29k ;;
2335a29k-*-ebmon*) gdb_target=a29k ;;
2336a29k-*-kern*) gdb_target=a29k-kern ;;
2337a29k-*-none*) gdb_target=a29k ;;
2338a29k-*-sym1*) gdb_target=ultra3 ;;
2339a29k-*-udi*) gdb_target=a29k-udi ;;
2340a29k-*-vxworks*) gdb_target=vx29k ;;
2341
2342alpha-*-osf*) gdb_target=alpha-osf1 ;;
2343
2344# start-sanitize-arc
2345arc-*-*) gdb_target=arc ;;
2346# end-sanitize-arc
2347
2348arm-*-*) gdb_target=arm ;;
2349
2350c1-*-*) gdb_target=convex ;;
2351c2-*-*) gdb_target=convex ;;
2352
fb506180
SS
2353h8300-*-*) gdb_target=h8300 ;;
2354h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
2355
2356sh-*-*) gdb_target=sh ;;
2357
2358# start-sanitize-r16
2359r16-*-*) gdb_target=r16 ;;
2360# end-sanitize-r16
2361
2362hppa*-*-bsd*) gdb_target=hppabsd ;;
2363hppa*-*-pro*) gdb_target=hppapro ;;
2364hppa*-*-hpux*) gdb_target=hppahpux ;;
2365hppa*-*-hiux*) gdb_target=hppahpux ;;
2366hppa*-*-osf*) gdb_target=hppaosf ;;
2367
3222ff2e
MM
2368i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
2369i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
2370i[3456]86-sequent-sysv*) gdb_target=ptx ;;
2371i[3456]86-ncr-*) gdb_target=ncr3000 ;;
2372i[3456]86-*-aout*) gdb_target=i386aout ;;
2373i[3456]86-*-coff*) gdb_target=i386v ;;
2374i[3456]86-*-elf*) gdb_target=i386v ;;
2375i[3456]86-*-aix*) gdb_target=i386aix ;;
2376i[3456]86-*-bsd*) gdb_target=i386bsd ;;
2377i[3456]86-*-freebsd*) gdb_target=fbsd ;;
2378i[3456]86-*-netbsd*) gdb_target=nbsd ;;
2379i[3456]86-*-os9k) gdb_target=i386os9k ;;
2380i[3456]86-*-go32*) gdb_target=i386aout ;;
2381i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 2382 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
2383i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
2384i[3456]86-*-sunos*) gdb_target=sun386 ;;
2385i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
2386i[3456]86-*-sco*) gdb_target=i386v ;;
2387i[3456]86-*-sysv*) gdb_target=i386v ;;
2388i[3456]86-*-linux*) gdb_target=linux ;;
2389i[3456]86-*-isc*) gdb_target=i386v ;;
2390i[3456]86-*-mach3*) gdb_target=i386m3 ;;
2391i[3456]86-*-mach*) gdb_target=i386mach ;;
2392i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 2393 configdirs="${configdirs} nlm" ;;
3222ff2e
MM
2394i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
2395i[3456]86-*-win32) gdb_target=win32 ;;
5436fc65
C
2396
2397i960-*-bout*) gdb_target=vxworks960 ;;
2398i960-*-coff*) gdb_target=nindy960 ;;
2399i960-*-elf*) gdb_target=nindy960 ;;
2400
2401i960-*-nindy*) gdb_target=nindy960 ;;
2402i960-*-vxworks*) gdb_target=vxworks960 ;;
2403
2404m68000-*-sunos3*) gdb_target=sun2os3 ;;
2405m68000-*-sunos4*) gdb_target=sun2os4 ;;
2406
2407m68*-apollo*-bsd*) gdb_target=apollo68b ;;
2408m68*-bull-sysv*) gdb_target=dpx2 ;;
2409m68*-hp-bsd*) gdb_target=hp300bsd ;;
2410m68*-hp-hpux*) gdb_target=hp300hpux ;;
2411m68*-altos-*) gdb_target=altos ;;
2412m68*-att-*) gdb_target=3b1 ;;
2413m68*-cisco*-*) gdb_target=cisco ;;
2414m68*-ericsson-*) gdb_target=es1800 ;;
2415m68*-isi-*) gdb_target=isi ;;
2416m68*-motorola-*) gdb_target=delta68 ;;
2417m68*-netx-*) gdb_target=vxworks68 ;;
2418m68*-sony-*) gdb_target=news ;;
2419m68*-tandem-*) gdb_target=st2000 ;;
2420m68*-rom68k-*) gdb_target=monitor ;;
2421m68*-*bug-*) gdb_target=monitor ;;
2422m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 2423m68*-est-*) gdb_target=monitor ;;
5436fc65
C
2424m68*-*-aout*) gdb_target=monitor ;;
2425m68*-*-coff*) gdb_target=monitor ;;
2426m68*-*-elf*) gdb_target=monitor ;;
2427m68*-*-lynxos*) gdb_target=m68klynx
2428 configdirs="${configdirs} gdbserver" ;;
2429m68*-*-os68k*) gdb_target=os68k ;;
2430m68*-*-sunos3*) gdb_target=sun3os3 ;;
2431m68*-*-sunos4*) gdb_target=sun3os4 ;;
2432m68*-*-sysv4*) gdb_target=m68kv4 ;;
2433m68*-*-vxworks*) gdb_target=vxworks68 ;;
2434
2435m88*-harris-cxux*) gdb_target=cxux ;;
2436m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
2437m88*-*-mach3*) gdb_target=mach3 ;;
2438m88*-motorola-*) gdb_target=delta88 ;;
2439m88*-*-*) gdb_target=m88k ;;
2440
2441mips64*-big-*) gdb_target=bigmips64 ;;
2442mips*-big-*) gdb_target=bigmips ;;
2443mips*-dec-mach3*) gdb_target=mach3 ;;
2444mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
2445mips64*el-*-ecoff*) gdb_target=embedl64 ;;
2446mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
2447mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
2448mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
2449mips64*el-*-elf*) gdb_target=embedl64 ;;
2450mips64*-*-elf*) gdb_target=embed64 ;;
2451mips*el-*-ecoff*) gdb_target=embedl ;;
2452mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 2453# start-sanitize-gm
7bb5e831 2454mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 2455# end-sanitize-gm
7bb5e831
RS
2456mips*el-*-elf*) gdb_target=embedl ;;
2457mips*-*-elf*) gdb_target=embed ;;
5436fc65
C
2458mips*-little-*) gdb_target=littlemips ;;
2459mips*-sgi-irix5*) gdb_target=irix5 ;;
2460mips*-sgi-*) gdb_target=irix3 ;;
2461mips*-sony-*) gdb_target=bigmips ;;
2462mips*-*-mach3*) gdb_target=mach3 ;;
2463mips*-*-sysv4*) gdb_target=mipsv4 ;;
2464mips*-*-sysv*) gdb_target=bigmips ;;
2465mips*-*-riscos*) gdb_target=bigmips ;;
2466
2467none-*-*) gdb_target=none ;;
2468
2469np1-*-*) gdb_target=np1 ;;
2470
2471ns32k-*-mach3*) gdb_target=mach3 ;;
2472ns32k-*-netbsd*) gdb_target=nbsd ;;
2473ns32k-utek-sysv*) gdb_target=merlin ;;
2474ns32k-utek-*) gdb_target=umax ;;
2475
2476pn-*-*) gdb_target=pn ;;
c148ab3c 2477powerpc-*-macos*) gdb_target=macos ;;
5436fc65
C
2478powerpc-*-netware*) gdb_target=ppc-nw
2479 configdirs="${configdirs} nlm" ;;
2480
65eaea27 2481powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 2482powerpc-*-aix*) gdb_target=aix ;;
3c0bf315
MM
2483powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
2484 gdb_target=ppc-sim
2485 else
2486 gdb_target=ppc-eabi
2487 fi ;;
2488powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
2489 gdb_target=ppcle-sim
2490 else
2491 gdb_target=ppcle-eabi
2492 fi ;;
5436fc65
C
2493
2494pyramid-*-*) gdb_target=pyramid ;;
2495
2496rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 2497rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
2498rs6000-*-*) gdb_target=rs6000 ;;
2499
2500sparc-*-aout*) gdb_target=sparc-em ;;
2501sparc-*-coff*) gdb_target=sparc-em ;;
2502sparc-*-elf*) gdb_target=sparc-em ;;
2503sparc-*-lynxos*) gdb_target=sparclynx
2504 configdirs="${configdirs} gdbserver" ;;
2505sparc-*-netbsd*) gdb_target=nbsd ;;
2506sparc-*-solaris2*) gdb_target=sun4sol2 ;;
2507sparc-*-sunos4*) gdb_target=sun4os4 ;;
2508sparc-*-sunos5*) gdb_target=sun4sol2 ;;
2509sparc-*-vxworks*) gdb_target=vxsparc ;;
2510sparc-*-*) gdb_target=sun4os4 ;;
2511sparclite*-*-*) gdb_target=sparclite ;;
2512sparc64-*-*) gdb_target=sp64 ;;
2513
2514tahoe-*-*) gdb_target=tahoe ;;
2515
2516vax-*-*) gdb_target=vax ;;
2517
2518w65-*-*) gdb_target=w65 ;;
2519
fb506180 2520z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
2521
2522esac
2523
2524
5f107900 2525frags=
5436fc65
C
2526host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2527if test ! -f ${host_makefile_frag}; then
2528{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2529fi
5f107900 2530frags="$frags $host_makefile_frag"
5436fc65
C
2531
2532target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
2533if test ! -f ${target_makefile_frag}; then
2534{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
2535fi
5f107900 2536frags="$frags $target_makefile_frag"
5436fc65
C
2537
2538
2539
2540
2541
094fd4ae
C
2542hostfile=`sed -n '
2543s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2544' ${host_makefile_frag}`
5436fc65 2545
094fd4ae
C
2546targetfile=`sed -n '
2547s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2548' ${target_makefile_frag}`
5436fc65
C
2549
2550# these really aren't orthogonal true/false values of the same condition,
2551# but shells are slow enough that I like to reuse the test conditions
2552# whenever possible
2553if test "${target}" = "${host}"; then
094fd4ae
C
2554nativefile=`sed -n '
2555s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2556' ${host_makefile_frag}`
5436fc65
C
2557else
2558# GDBserver is only useful in a "native" enviroment
2559configdirs=`echo $configdirs | sed 's/gdbserver//'`
2560fi
2561
094fd4ae 2562
5436fc65
C
2563# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
2564# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
2565# corresponding links. But we have to remove the xm.h files and tm.h
2566# files anyway, e.g. when switching from "configure host" to
2567# "configure none".
2568
2569files=
2570links=
2571rm -f xm.h
2572if test "${hostfile}" != ""; then
2573files="${files} config/${gdb_host_cpu}/${hostfile}"
2574links="${links} xm.h"
2575fi
2576rm -f tm.h
2577if test "${targetfile}" != ""; then
2578files="${files} config/${gdb_target_cpu}/${targetfile}"
2579links="${links} tm.h"
2580fi
2581rm -f nm.h
2582if test "${nativefile}" != ""; then
2583files="${files} config/${gdb_host_cpu}/${nativefile}"
2584links="${links} nm.h"
2585else
2586# A cross-only configuration.
2587files="${files} config/nm-empty.h"
2588links="${links} nm.h"
2589fi
2590# start-sanitize-gdbtk
2591
2592# Make it possible to use the GUI without doing a full install
2593if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
2594files="${files} gdbtk.tcl"
2595links="${links} gdbtk.tcl"
2596fi
2597# end-sanitize-gdbtk
2598
2599
2600
2601subdirs="$configdirs"
2602
2603trap '' 1 2 15
2604cat > confcache <<\EOF
2605# This file is a shell script that caches the results of configure
2606# tests run on this system so they can be shared between configure
2607# scripts and configure runs. It is not useful on other systems.
2608# If it contains results you don't want to keep, you may remove or edit it.
2609#
2610# By default, configure uses ./config.cache as the cache file,
2611# creating it if it does not exist already. You can give configure
2612# the --cache-file=FILE option to use a different cache file; that is
2613# what configure does when it calls configure scripts in
2614# subdirectories, so they share the cache.
2615# Giving --cache-file=/dev/null disables caching, for debugging configure.
2616# config.status only pays attention to the cache file if you give it the
2617# --recheck option to rerun configure.
2618#
2619EOF
2620# Ultrix sh set writes to stderr and can't be redirected directly,
2621# and sets the high bit in the cache file unless we assign to the vars.
2622(set) 2>&1 |
2623 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2624 >> confcache
2625if cmp -s $cache_file confcache; then
2626 :
2627else
2628 if test -w $cache_file; then
2629 echo "updating cache $cache_file"
2630 cat confcache > $cache_file
2631 else
2632 echo "not updating unwritable cache $cache_file"
2633 fi
2634fi
2635rm -f confcache
2636
2637trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2638
2639test "x$prefix" = xNONE && prefix=$ac_default_prefix
2640# Let make expand exec_prefix.
2641test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2642
2643# Any assignment to VPATH causes Sun make to only execute
2644# the first set of double-colon rules, so remove it if not needed.
2645# If there is a colon in the path, we need to keep it.
2646if test "x$srcdir" = x.; then
2647 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2648fi
2649
2650trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2651
2652# Transform confdefs.h into DEFS.
2653# Protect against shell expansion while executing Makefile rules.
2654# Protect against Makefile macro expansion.
2655cat > conftest.defs <<\EOF
2656s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2657s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
2658s%\[%\\&%g
2659s%\]%\\&%g
2660s%\$%$$%g
2661EOF
2662DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2663rm -f conftest.defs
2664
2665
2666# Without the "./", some shells look in PATH for config.status.
2667: ${CONFIG_STATUS=./config.status}
2668
2669echo creating $CONFIG_STATUS
2670rm -f $CONFIG_STATUS
2671cat > $CONFIG_STATUS <<EOF
2672#! /bin/sh
2673# Generated automatically by configure.
2674# Run this file to recreate the current configuration.
2675# This directory was configured as follows,
2676# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2677#
2678# $0 $ac_configure_args
2679#
2680# Compiler output produced by configure, useful for debugging
2681# configure, is in ./config.log if it exists.
2682
2683ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2684for ac_option
2685do
2686 case "\$ac_option" in
2687 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2688 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2689 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2690 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7c40dd08 2691 echo "$CONFIG_STATUS generated by autoconf version 2.7"
5436fc65
C
2692 exit 0 ;;
2693 -help | --help | --hel | --he | --h)
2694 echo "\$ac_cs_usage"; exit 0 ;;
2695 *) echo "\$ac_cs_usage"; exit 1 ;;
2696 esac
2697done
2698
2699ac_given_srcdir=$srcdir
2700ac_given_INSTALL="$INSTALL"
2701
2702trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7c40dd08
DE
2703EOF
2704cat >> $CONFIG_STATUS <<EOF
5436fc65 2705
7c40dd08
DE
2706# Protect against being on the right side of a sed subst in config.status.
2707sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2708 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
2709$ac_vpsub
2710$extrasub
2711s%@CFLAGS@%$CFLAGS%g
2712s%@CPPFLAGS@%$CPPFLAGS%g
2713s%@CXXFLAGS@%$CXXFLAGS%g
2714s%@DEFS@%$DEFS%g
2715s%@LDFLAGS@%$LDFLAGS%g
2716s%@LIBS@%$LIBS%g
2717s%@exec_prefix@%$exec_prefix%g
2718s%@prefix@%$prefix%g
2719s%@program_transform_name@%$program_transform_name%g
7c40dd08
DE
2720s%@bindir@%$bindir%g
2721s%@sbindir@%$sbindir%g
2722s%@libexecdir@%$libexecdir%g
2723s%@datadir@%$datadir%g
2724s%@sysconfdir@%$sysconfdir%g
2725s%@sharedstatedir@%$sharedstatedir%g
2726s%@localstatedir@%$localstatedir%g
2727s%@libdir@%$libdir%g
2728s%@includedir@%$includedir%g
2729s%@oldincludedir@%$oldincludedir%g
2730s%@infodir@%$infodir%g
2731s%@mandir@%$mandir%g
5436fc65
C
2732s%@CC@%$CC%g
2733s%@CPP@%$CPP%g
2734s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2735s%@INSTALL_DATA@%$INSTALL_DATA%g
2736s%@RANLIB@%$RANLIB%g
204c8825 2737s%@YACC@%$YACC%g
5436fc65
C
2738s%@host@%$host%g
2739s%@host_alias@%$host_alias%g
2740s%@host_cpu@%$host_cpu%g
2741s%@host_vendor@%$host_vendor%g
2742s%@host_os@%$host_os%g
2743s%@target@%$target%g
2744s%@target_alias@%$target_alias%g
2745s%@target_cpu@%$target_cpu%g
2746s%@target_vendor@%$target_vendor%g
2747s%@target_os@%$target_os%g
2748s%@build@%$build%g
2749s%@build_alias@%$build_alias%g
2750s%@build_cpu@%$build_cpu%g
2751s%@build_vendor@%$build_vendor%g
2752s%@build_os@%$build_os%g
2753s%@X_CFLAGS@%$X_CFLAGS%g
2754s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2755s%@X_LIBS@%$X_LIBS%g
2756s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2757s%@TKHDIR@%$TKHDIR%g
2758s%@TKLIB@%$TKLIB%g
2759s%@TCLHDIR@%$TCLHDIR%g
2760s%@TCLLIB@%$TCLLIB%g
2761s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd 2762s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
2763s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
2764s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
2765s%@ENABLE_OBS@%$ENABLE_OBS%g
7c40dd08 2766s%@target_subdir@%$target_subdir%g
5436fc65
C
2767/@host_makefile_frag@/r $host_makefile_frag
2768s%@host_makefile_frag@%%g
2769/@target_makefile_frag@/r $target_makefile_frag
2770s%@target_makefile_frag@%%g
5f107900 2771s%@frags@%$frags%g
5436fc65
C
2772s%@subdirs@%$subdirs%g
2773
2774CEOF
2775EOF
2776cat >> $CONFIG_STATUS <<EOF
2777
2778CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2779EOF
2780cat >> $CONFIG_STATUS <<\EOF
2781for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2782 # Support "outfile[:infile]", defaulting infile="outfile.in".
2783 case "$ac_file" in
2784 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2785 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2786 *) ac_file_in="${ac_file}.in" ;;
2787 esac
2788
2789 # Adjust relative srcdir, etc. for subdirectories.
2790
2791 # Remove last slash and all that follows it. Not all systems have dirname.
2792 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2793 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2794 # The file is in a subdirectory.
2795 test ! -d "$ac_dir" && mkdir "$ac_dir"
2796 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2797 # A "../" for each directory in $ac_dir_suffix.
2798 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2799 else
2800 ac_dir_suffix= ac_dots=
2801 fi
2802
2803 case "$ac_given_srcdir" in
2804 .) srcdir=.
2805 if test -z "$ac_dots"; then top_srcdir=.
2806 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2807 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2808 *) # Relative path.
2809 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2810 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2811 esac
2812
2813 case "$ac_given_INSTALL" in
2814 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2815 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2816 esac
2817 echo creating "$ac_file"
2818 rm -f "$ac_file"
2819 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2820 case "$ac_file" in
2821 *Makefile*) ac_comsub="1i\\
2822# $configure_input" ;;
2823 *) ac_comsub= ;;
2824 esac
2825 sed -e "$ac_comsub
2826s%@configure_input@%$configure_input%g
2827s%@srcdir@%$srcdir%g
2828s%@top_srcdir@%$top_srcdir%g
2829s%@INSTALL@%$INSTALL%g
2830" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2831fi; done
2832rm -f conftest.subs
2833
2834EOF
2835
2836cat >> $CONFIG_STATUS <<EOF
2837ac_sources="$files"
2838ac_dests="$links"
2839EOF
2840
2841cat >> $CONFIG_STATUS <<\EOF
2842srcdir=$ac_given_srcdir
2843while test -n "$ac_sources"; do
2844 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2845 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2846
2847 echo "linking $srcdir/$ac_source to $ac_dest"
2848
2849 if test ! -r $srcdir/$ac_source; then
2850 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2851 fi
2852 rm -f $ac_dest
2853
2854 # Make relative symlinks.
2855 # Remove last slash and all that follows it. Not all systems have dirname.
2856 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2857 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2858 # The dest file is in a subdirectory.
2859 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2860 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2861 # A "../" for each directory in $ac_dest_dir_suffix.
2862 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2863 else
2864 ac_dest_dir_suffix= ac_dots=
2865 fi
2866
2867 case "$srcdir" in
2868 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2869 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2870 esac
2871
2872 # Make a symlink if possible; otherwise try a hard link.
2873 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2874 ln $srcdir/$ac_source $ac_dest; then :
2875 else
2876 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2877 fi
2878done
0a5a1821
C
2879EOF
2880cat >> $CONFIG_STATUS <<EOF
5436fc65 2881
0a5a1821
C
2882gdb_host_cpu=$gdb_host_cpu
2883gdb_target_cpu=$gdb_target_cpu
2884nativefile=$nativefile
2885
2886EOF
2887cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
2888
2889if test "${nativefile}" = ""; then
2890sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
2891 < Makefile > Makefile.tem
2892mv -f Makefile.tem Makefile
2893fi
2894
2895sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
2896/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
2897/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
2898mv -f Makefile.tmp Makefile
2899
2900case ${srcdir} in
2901.)
2902;;
2903*)
2904grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
2905echo "source ${srcdir}/.gdbinit" >> .gdbinit
2906esac
2907
2908exit 0
2909EOF
2910chmod +x $CONFIG_STATUS
2911rm -fr confdefs* $ac_clean_files
2912test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2913
2914if test "$no_recursion" != yes; then
2915
2916 # Remove --cache-file and --srcdir arguments so they do not pile up.
2917 ac_sub_configure_args=
2918 ac_prev=
2919 for ac_arg in $ac_configure_args; do
2920 if test -n "$ac_prev"; then
2921 ac_prev=
2922 continue
2923 fi
2924 case "$ac_arg" in
2925 -cache-file | --cache-file | --cache-fil | --cache-fi \
2926 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2927 ac_prev=cache_file ;;
2928 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2929 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2930 ;;
2931 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2932 ac_prev=srcdir ;;
2933 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2934 ;;
2935 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2936 esac
2937 done
2938
2939 for ac_config_dir in $configdirs; do
2940
2941 # Do not complain, so a configure script can configure whichever
2942 # parts of a large source tree are present.
2943 if test ! -d $srcdir/$ac_config_dir; then
2944 continue
2945 fi
2946
2947 echo configuring in $ac_config_dir
2948
2949 case "$srcdir" in
2950 .) ;;
2951 *)
2952 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2953 else
2954 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2955 fi
2956 ;;
2957 esac
2958
2959 ac_popdir=`pwd`
2960 cd $ac_config_dir
2961
2962 case "$srcdir" in
2963 .) # No --srcdir option. We are building in place.
2964 ac_sub_srcdir=$srcdir ;;
2965 /*) # Absolute path.
2966 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2967 *) # Relative path.
2968 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
2969 esac
2970
2971 # Check for guested configure; otherwise get Cygnus style configure.
2972 if test -f $ac_sub_srcdir/configure; then
2973 ac_sub_configure=$ac_sub_srcdir/configure
2974 elif test -f $ac_sub_srcdir/configure.in; then
2975 ac_sub_configure=$ac_configure
2976 else
2977 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2978 ac_sub_configure=
2979 fi
2980
2981 # The recursion is here.
2982 if test -n "$ac_sub_configure"; then
2983
2984 # Make the cache file name correct relative to the subdirectory.
2985 # A "../" for each directory in /$ac_config_dir.
2986 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2987 case "$cache_file" in
2988 /*) ac_sub_cache_file=$cache_file ;;
2989 *) # Relative path.
2990 ac_sub_cache_file="$ac_dots$cache_file" ;;
2991 esac
2992 case "$ac_given_INSTALL" in
2993 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2994 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2995 esac
2996
2997 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2998 # The eval makes quoting arguments work.
2999 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3000 then :
3001 else
3002 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3003 fi
3004 fi
3005
3006 cd $ac_popdir
3007 done
3008fi
3009
5e711e7f
PS
3010
3011exit 0
This page took 0.177909 seconds and 4 git commands to generate.