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

Subversion Repositories or1k

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

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

powered by: WebSVN 2.1.0

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