OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [configure] - Blame information for rev 104

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.