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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [sim/] [mn10300/] [configure] - Blame information for rev 1181

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

Line No. Rev Author Line
1 1181 sfurman
#! /bin/sh
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
32
 
33
 
34
 
35
 
36
 
37
 
38
 
39
 
40
 
41
 
42
 
43
 
44
 
45
sim_inline="-DDEFAULT_INLINE=0"
46
 
47
 
48
 
49
 
50
 
51
 
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
 
67
 
68
 
69
 
70
 
71
 
72
 
73
 
74
 
75
 
76
 
77
 
78
 
79
 
80
 
81
 
82
# This file is derived from `gettext.m4'.  The difference is that the
83
# included macros assume Cygnus-style source and build trees.
84
 
85
# Macro to add for using GNU gettext.
86
# Ulrich Drepper , 1995.
87
#
88
# This file file be copied and used freely without restrictions.  It can
89
# be used in projects which are not available under the GNU Public License
90
# but which still want to provide support for the GNU gettext functionality.
91
# Please note that the actual code is *not* freely available.
92
 
93
# serial 3
94
 
95
 
96
 
97
 
98
 
99
# Search path for a program which passes the given test.
100
# Ulrich Drepper , 1996.
101
#
102
# This file file be copied and used freely without restrictions.  It can
103
# be used in projects which are not available under the GNU Public License
104
# but which still want to provide support for the GNU gettext functionality.
105
# Please note that the actual code is *not* freely available.
106
 
107
# serial 1
108
 
109
 
110
 
111
# Check whether LC_MESSAGES is available in .
112
# Ulrich Drepper , 1995.
113
#
114
# This file file be copied and used freely without restrictions.  It can
115
# be used in projects which are not available under the GNU Public License
116
# but which still want to provide support for the GNU gettext functionality.
117
# Please note that the actual code is *not* freely available.
118
 
119
# serial 1
120
 
121
 
122
 
123
 
124
 
125
 
126
# Guess values for system-dependent variables and create Makefiles.
127
# Generated automatically using autoconf version 2.13
128
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
129
#
130
# This configure script is free software; the Free Software Foundation
131
# gives unlimited permission to copy, distribute and modify it.
132
 
133
# Defaults:
134
ac_help=
135
ac_default_prefix=/usr/local
136
# Any additions from configure.in:
137
ac_help="$ac_help
138
  --disable-nls           do not use Native Language Support"
139
ac_help="$ac_help
140
  --with-included-gettext use the GNU gettext library included here"
141
ac_help="$ac_help
142
  --enable-maintainer-mode              Enable developer functionality."
143
ac_help="$ac_help
144
  --enable-sim-bswap                    Use Host specific BSWAP instruction."
145
ac_help="$ac_help
146
  --enable-sim-cflags=opts              Extra CFLAGS for use in building simulator"
147
ac_help="$ac_help
148
  --enable-sim-debug=opts               Enable debugging flags"
149
ac_help="$ac_help
150
  --enable-sim-stdio                    Specify whether to use stdio for console input/output."
151
ac_help="$ac_help
152
  --enable-sim-trace=opts               Enable tracing flags"
153
ac_help="$ac_help
154
  --enable-sim-profile=opts             Enable profiling flags"
155
ac_help="$ac_help
156
  --enable-sim-endian=endian            Specify target byte endian orientation."
157
ac_help="$ac_help
158
  --enable-sim-alignment=align          Specify strict,  nonstrict or forced alignment of memory accesses."
159
ac_help="$ac_help
160
  --enable-sim-hostendian=end           Specify host byte endian orientation."
161
ac_help="$ac_help
162
  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
163
ac_help="$ac_help
164
  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
165
ac_help="$ac_help
166
  --enable-sim-reserved-bits            Specify whether to check reserved bits in instruction."
167
ac_help="$ac_help
168
  --enable-sim-bitsize=N                Specify target bitsize (32 or 64)."
169
ac_help="$ac_help
170
  --enable-sim-inline=inlines           Specify which functions should be inlined."
171
ac_help="$ac_help
172
  --enable-sim-hardware=LIST            Specify the hardware to be included in the build."
173
ac_help="$ac_help
174
  --enable-sim-common                   Enable common simulator"
175
 
176
# Initialize some variables set by options.
177
# The variables have the same names as the options, with
178
# dashes changed to underlines.
179
build=NONE
180
cache_file=./config.cache
181
exec_prefix=NONE
182
host=NONE
183
no_create=
184
nonopt=NONE
185
no_recursion=
186
prefix=NONE
187
program_prefix=NONE
188
program_suffix=NONE
189
program_transform_name=s,x,x,
190
silent=
191
site=
192
sitefile=
193
srcdir=
194
target=NONE
195
verbose=
196
x_includes=NONE
197
x_libraries=NONE
198
bindir='${exec_prefix}/bin'
199
sbindir='${exec_prefix}/sbin'
200
libexecdir='${exec_prefix}/libexec'
201
datadir='${prefix}/share'
202
sysconfdir='${prefix}/etc'
203
sharedstatedir='${prefix}/com'
204
localstatedir='${prefix}/var'
205
libdir='${exec_prefix}/lib'
206
includedir='${prefix}/include'
207
oldincludedir='/usr/include'
208
infodir='${prefix}/info'
209
mandir='${prefix}/man'
210
 
211
# Initialize some other variables.
212
subdirs=
213
MFLAGS= MAKEFLAGS=
214
SHELL=${CONFIG_SHELL-/bin/sh}
215
# Maximum number of lines to put in a shell here document.
216
ac_max_here_lines=12
217
 
218
ac_prev=
219
for ac_option
220
do
221
 
222
  # If the previous option needs an argument, assign it.
223
  if test -n "$ac_prev"; then
224
    eval "$ac_prev=\$ac_option"
225
    ac_prev=
226
    continue
227
  fi
228
 
229
  case "$ac_option" in
230
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
231
  *) ac_optarg= ;;
232
  esac
233
 
234
  # Accept the important Cygnus configure options, so we can diagnose typos.
235
 
236
  case "$ac_option" in
237
 
238
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
239
    ac_prev=bindir ;;
240
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
241
    bindir="$ac_optarg" ;;
242
 
243
  -build | --build | --buil | --bui | --bu)
244
    ac_prev=build ;;
245
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
246
    build="$ac_optarg" ;;
247
 
248
  -cache-file | --cache-file | --cache-fil | --cache-fi \
249
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
250
    ac_prev=cache_file ;;
251
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
252
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
253
    cache_file="$ac_optarg" ;;
254
 
255
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
256
    ac_prev=datadir ;;
257
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
258
  | --da=*)
259
    datadir="$ac_optarg" ;;
260
 
261
  -disable-* | --disable-*)
262
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
263
    # Reject names that are not valid shell variable names.
264
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
265
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
266
    fi
267
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
268
    eval "enable_${ac_feature}=no" ;;
269
 
270
  -enable-* | --enable-*)
271
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
272
    # Reject names that are not valid shell variable names.
273
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
274
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
275
    fi
276
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
277
    case "$ac_option" in
278
      *=*) ;;
279
      *) ac_optarg=yes ;;
280
    esac
281
    eval "enable_${ac_feature}='$ac_optarg'" ;;
282
 
283
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
284
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
285
  | --exec | --exe | --ex)
286
    ac_prev=exec_prefix ;;
287
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
288
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
289
  | --exec=* | --exe=* | --ex=*)
290
    exec_prefix="$ac_optarg" ;;
291
 
292
  -gas | --gas | --ga | --g)
293
    # Obsolete; use --with-gas.
294
    with_gas=yes ;;
295
 
296
  -help | --help | --hel | --he)
297
    # Omit some internal or obsolete options to make the list less imposing.
298
    # This message is too long to be a string in the A/UX 3.1 sh.
299
    cat << EOF
300
Usage: configure [options] [host]
301
Options: [defaults in brackets after descriptions]
302
Configuration:
303
  --cache-file=FILE       cache test results in FILE
304
  --help                  print this message
305
  --no-create             do not create output files
306
  --quiet, --silent       do not print \`checking...' messages
307
  --site-file=FILE        use FILE as the site file
308
  --version               print the version of autoconf that created configure
309
Directory and file names:
310
  --prefix=PREFIX         install architecture-independent files in PREFIX
311
                          [$ac_default_prefix]
312
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
313
                          [same as prefix]
314
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
315
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
316
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
317
  --datadir=DIR           read-only architecture-independent data in DIR
318
                          [PREFIX/share]
319
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
320
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
321
                          [PREFIX/com]
322
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
323
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
324
  --includedir=DIR        C header files in DIR [PREFIX/include]
325
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
326
  --infodir=DIR           info documentation in DIR [PREFIX/info]
327
  --mandir=DIR            man documentation in DIR [PREFIX/man]
328
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
329
  --program-prefix=PREFIX prepend PREFIX to installed program names
330
  --program-suffix=SUFFIX append SUFFIX to installed program names
331
  --program-transform-name=PROGRAM
332
                          run sed PROGRAM on installed program names
333
EOF
334
    cat << EOF
335
Host type:
336
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
337
  --host=HOST             configure for HOST [guessed]
338
  --target=TARGET         configure for TARGET [TARGET=HOST]
339
Features and packages:
340
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
341
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
342
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
343
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
344
  --x-includes=DIR        X include files are in DIR
345
  --x-libraries=DIR       X library files are in DIR
346
EOF
347
    if test -n "$ac_help"; then
348
      echo "--enable and --with options recognized:$ac_help"
349
    fi
350
    exit 0 ;;
351
 
352
  -host | --host | --hos | --ho)
353
    ac_prev=host ;;
354
  -host=* | --host=* | --hos=* | --ho=*)
355
    host="$ac_optarg" ;;
356
 
357
  -includedir | --includedir | --includedi | --included | --include \
358
  | --includ | --inclu | --incl | --inc)
359
    ac_prev=includedir ;;
360
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
361
  | --includ=* | --inclu=* | --incl=* | --inc=*)
362
    includedir="$ac_optarg" ;;
363
 
364
  -infodir | --infodir | --infodi | --infod | --info | --inf)
365
    ac_prev=infodir ;;
366
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
367
    infodir="$ac_optarg" ;;
368
 
369
  -libdir | --libdir | --libdi | --libd)
370
    ac_prev=libdir ;;
371
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
372
    libdir="$ac_optarg" ;;
373
 
374
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
375
  | --libexe | --libex | --libe)
376
    ac_prev=libexecdir ;;
377
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
378
  | --libexe=* | --libex=* | --libe=*)
379
    libexecdir="$ac_optarg" ;;
380
 
381
  -localstatedir | --localstatedir | --localstatedi | --localstated \
382
  | --localstate | --localstat | --localsta | --localst \
383
  | --locals | --local | --loca | --loc | --lo)
384
    ac_prev=localstatedir ;;
385
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
386
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
387
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
388
    localstatedir="$ac_optarg" ;;
389
 
390
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
391
    ac_prev=mandir ;;
392
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
393
    mandir="$ac_optarg" ;;
394
 
395
  -nfp | --nfp | --nf)
396
    # Obsolete; use --without-fp.
397
    with_fp=no ;;
398
 
399
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
400
  | --no-cr | --no-c)
401
    no_create=yes ;;
402
 
403
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
404
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
405
    no_recursion=yes ;;
406
 
407
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
408
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
409
  | --oldin | --oldi | --old | --ol | --o)
410
    ac_prev=oldincludedir ;;
411
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
412
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
413
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
414
    oldincludedir="$ac_optarg" ;;
415
 
416
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
417
    ac_prev=prefix ;;
418
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
419
    prefix="$ac_optarg" ;;
420
 
421
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
422
  | --program-pre | --program-pr | --program-p)
423
    ac_prev=program_prefix ;;
424
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
425
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
426
    program_prefix="$ac_optarg" ;;
427
 
428
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
429
  | --program-suf | --program-su | --program-s)
430
    ac_prev=program_suffix ;;
431
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
432
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
433
    program_suffix="$ac_optarg" ;;
434
 
435
  -program-transform-name | --program-transform-name \
436
  | --program-transform-nam | --program-transform-na \
437
  | --program-transform-n | --program-transform- \
438
  | --program-transform | --program-transfor \
439
  | --program-transfo | --program-transf \
440
  | --program-trans | --program-tran \
441
  | --progr-tra | --program-tr | --program-t)
442
    ac_prev=program_transform_name ;;
443
  -program-transform-name=* | --program-transform-name=* \
444
  | --program-transform-nam=* | --program-transform-na=* \
445
  | --program-transform-n=* | --program-transform-=* \
446
  | --program-transform=* | --program-transfor=* \
447
  | --program-transfo=* | --program-transf=* \
448
  | --program-trans=* | --program-tran=* \
449
  | --progr-tra=* | --program-tr=* | --program-t=*)
450
    program_transform_name="$ac_optarg" ;;
451
 
452
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
453
  | -silent | --silent | --silen | --sile | --sil)
454
    silent=yes ;;
455
 
456
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
457
    ac_prev=sbindir ;;
458
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
459
  | --sbi=* | --sb=*)
460
    sbindir="$ac_optarg" ;;
461
 
462
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
463
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
464
  | --sharedst | --shareds | --shared | --share | --shar \
465
  | --sha | --sh)
466
    ac_prev=sharedstatedir ;;
467
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
468
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
469
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
470
  | --sha=* | --sh=*)
471
    sharedstatedir="$ac_optarg" ;;
472
 
473
  -site | --site | --sit)
474
    ac_prev=site ;;
475
  -site=* | --site=* | --sit=*)
476
    site="$ac_optarg" ;;
477
 
478
  -site-file | --site-file | --site-fil | --site-fi | --site-f)
479
    ac_prev=sitefile ;;
480
  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
481
    sitefile="$ac_optarg" ;;
482
 
483
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
484
    ac_prev=srcdir ;;
485
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
486
    srcdir="$ac_optarg" ;;
487
 
488
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
489
  | --syscon | --sysco | --sysc | --sys | --sy)
490
    ac_prev=sysconfdir ;;
491
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
492
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
493
    sysconfdir="$ac_optarg" ;;
494
 
495
  -target | --target | --targe | --targ | --tar | --ta | --t)
496
    ac_prev=target ;;
497
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
498
    target="$ac_optarg" ;;
499
 
500
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
501
    verbose=yes ;;
502
 
503
  -version | --version | --versio | --versi | --vers)
504
    echo "configure generated by autoconf version 2.13"
505
    exit 0 ;;
506
 
507
  -with-* | --with-*)
508
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
509
    # Reject names that are not valid shell variable names.
510
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
511
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
512
    fi
513
    ac_package=`echo $ac_package| sed 's/-/_/g'`
514
    case "$ac_option" in
515
      *=*) ;;
516
      *) ac_optarg=yes ;;
517
    esac
518
    eval "with_${ac_package}='$ac_optarg'" ;;
519
 
520
  -without-* | --without-*)
521
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
522
    # Reject names that are not valid shell variable names.
523
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
524
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
525
    fi
526
    ac_package=`echo $ac_package| sed 's/-/_/g'`
527
    eval "with_${ac_package}=no" ;;
528
 
529
  --x)
530
    # Obsolete; use --with-x.
531
    with_x=yes ;;
532
 
533
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
534
  | --x-incl | --x-inc | --x-in | --x-i)
535
    ac_prev=x_includes ;;
536
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
537
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
538
    x_includes="$ac_optarg" ;;
539
 
540
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
541
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
542
    ac_prev=x_libraries ;;
543
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
544
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
545
    x_libraries="$ac_optarg" ;;
546
 
547
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
548
    ;;
549
 
550
  *)
551
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
552
      echo "configure: warning: $ac_option: invalid host type" 1>&2
553
    fi
554
    if test "x$nonopt" != xNONE; then
555
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
556
    fi
557
    nonopt="$ac_option"
558
    ;;
559
 
560
  esac
561
done
562
 
563
if test -n "$ac_prev"; then
564
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
565
fi
566
 
567
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
568
 
569
# File descriptor usage:
570
# 0 standard input
571
# 1 file creation
572
# 2 errors and warnings
573
# 3 some systems may open it to /dev/tty
574
# 4 used on the Kubota Titan
575
# 6 checking for... messages and results
576
# 5 compiler messages saved in config.log
577
if test "$silent" = yes; then
578
  exec 6>/dev/null
579
else
580
  exec 6>&1
581
fi
582
exec 5>./config.log
583
 
584
echo "\
585
This file contains any messages produced by compilers while
586
running configure, to aid debugging if configure makes a mistake.
587
" 1>&5
588
 
589
# Strip out --no-create and --no-recursion so they do not pile up.
590
# Also quote any args containing shell metacharacters.
591
ac_configure_args=
592
for ac_arg
593
do
594
  case "$ac_arg" in
595
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
596
  | --no-cr | --no-c) ;;
597
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
598
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
599
  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
600
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
601
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
602
  esac
603
done
604
 
605
# NLS nuisances.
606
# Only set these to C if already set.  These must not be set unconditionally
607
# because not all systems understand e.g. LANG=C (notably SCO).
608
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
609
# Non-C LC_CTYPE values break the ctype check.
610
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
611
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
612
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
613
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
614
 
615
# confdefs.h avoids OS command line length limits that DEFS can exceed.
616
rm -rf conftest* confdefs.h
617
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
618
echo > confdefs.h
619
 
620
# A filename unique to this package, relative to the directory that
621
# configure is in, which we can look for to find out if srcdir is correct.
622
ac_unique_file=Makefile.in
623
 
624
# Find the source files, if location was not specified.
625
if test -z "$srcdir"; then
626
  ac_srcdir_defaulted=yes
627
  # Try the directory containing this script, then its parent.
628
  ac_prog=$0
629
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
630
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
631
  srcdir=$ac_confdir
632
  if test ! -r $srcdir/$ac_unique_file; then
633
    srcdir=..
634
  fi
635
else
636
  ac_srcdir_defaulted=no
637
fi
638
if test ! -r $srcdir/$ac_unique_file; then
639
  if test "$ac_srcdir_defaulted" = yes; then
640
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
641
  else
642
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
643
  fi
644
fi
645
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
646
 
647
# Prefer explicitly selected file to automatically selected ones.
648
if test -z "$sitefile"; then
649
  if test -z "$CONFIG_SITE"; then
650
    if test "x$prefix" != xNONE; then
651
      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
652
    else
653
      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
654
    fi
655
  fi
656
else
657
  CONFIG_SITE="$sitefile"
658
fi
659
for ac_site_file in $CONFIG_SITE; do
660
  if test -r "$ac_site_file"; then
661
    echo "loading site script $ac_site_file"
662
    . "$ac_site_file"
663
  fi
664
done
665
 
666
if test -r "$cache_file"; then
667
  echo "loading cache $cache_file"
668
  . $cache_file
669
else
670
  echo "creating cache $cache_file"
671
  > $cache_file
672
fi
673
 
674
ac_ext=c
675
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
676
ac_cpp='$CPP $CPPFLAGS'
677
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
678
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
679
cross_compiling=$ac_cv_prog_cc_cross
680
 
681
ac_exeext=
682
ac_objext=o
683
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
684
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
685
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
686
    ac_n= ac_c='
687
' ac_t='        '
688
  else
689
    ac_n=-n ac_c= ac_t=
690
  fi
691
else
692
  ac_n= ac_c='\c' ac_t=
693
fi
694
 
695
 
696
 
697
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
698
echo "configure:699: checking how to run the C preprocessor" >&5
699
# On Suns, sometimes $CPP names a directory.
700
if test -n "$CPP" && test -d "$CPP"; then
701
  CPP=
702
fi
703
if test -z "$CPP"; then
704
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
705
  echo $ac_n "(cached) $ac_c" 1>&6
706
else
707
    # This must be in double quotes, not single quotes, because CPP may get
708
  # substituted into the Makefile and "${CC-cc}" will confuse make.
709
  CPP="${CC-cc} -E"
710
  # On the NeXT, cc -E runs the code through the compiler's parser,
711
  # not just through cpp.
712
  cat > conftest.$ac_ext <
713
#line 714 "configure"
714
#include "confdefs.h"
715
#include 
716
Syntax Error
717
EOF
718
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
719
{ (eval echo configure:720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
720
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
721
if test -z "$ac_err"; then
722
  :
723
else
724
  echo "$ac_err" >&5
725
  echo "configure: failed program was:" >&5
726
  cat conftest.$ac_ext >&5
727
  rm -rf conftest*
728
  CPP="${CC-cc} -E -traditional-cpp"
729
  cat > conftest.$ac_ext <
730
#line 731 "configure"
731
#include "confdefs.h"
732
#include 
733
Syntax Error
734
EOF
735
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
736
{ (eval echo configure:737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
737
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
738
if test -z "$ac_err"; then
739
  :
740
else
741
  echo "$ac_err" >&5
742
  echo "configure: failed program was:" >&5
743
  cat conftest.$ac_ext >&5
744
  rm -rf conftest*
745
  CPP="${CC-cc} -nologo -E"
746
  cat > conftest.$ac_ext <
747
#line 748 "configure"
748
#include "confdefs.h"
749
#include 
750
Syntax Error
751
EOF
752
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
753
{ (eval echo configure:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
754
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
755
if test -z "$ac_err"; then
756
  :
757
else
758
  echo "$ac_err" >&5
759
  echo "configure: failed program was:" >&5
760
  cat conftest.$ac_ext >&5
761
  rm -rf conftest*
762
  CPP=/lib/cpp
763
fi
764
rm -f conftest*
765
fi
766
rm -f conftest*
767
fi
768
rm -f conftest*
769
  ac_cv_prog_CPP="$CPP"
770
fi
771
  CPP="$ac_cv_prog_CPP"
772
else
773
  ac_cv_prog_CPP="$CPP"
774
fi
775
echo "$ac_t""$CPP" 1>&6
776
 
777
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
778
echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5
779
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
780
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
781
  echo $ac_n "(cached) $ac_c" 1>&6
782
else
783
  cat > conftestmake <<\EOF
784
all:
785
        @echo 'ac_maketemp="${MAKE}"'
786
EOF
787
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
788
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
789
if test -n "$ac_maketemp"; then
790
  eval ac_cv_prog_make_${ac_make}_set=yes
791
else
792
  eval ac_cv_prog_make_${ac_make}_set=no
793
fi
794
rm -f conftestmake
795
fi
796
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
797
  echo "$ac_t""yes" 1>&6
798
  SET_MAKE=
799
else
800
  echo "$ac_t""no" 1>&6
801
  SET_MAKE="MAKE=${MAKE-make}"
802
fi
803
 
804
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
805
echo "configure:806: checking for POSIXized ISC" >&5
806
if test -d /etc/conf/kconfig.d &&
807
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
808
then
809
  echo "$ac_t""yes" 1>&6
810
  ISC=yes # If later tests want to check for ISC.
811
  cat >> confdefs.h <<\EOF
812
#define _POSIX_SOURCE 1
813
EOF
814
 
815
  if test "$GCC" = yes; then
816
    CC="$CC -posix"
817
  else
818
    CC="$CC -Xp"
819
  fi
820
else
821
  echo "$ac_t""no" 1>&6
822
  ISC=
823
fi
824
 
825
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
826
echo "configure:827: checking for ANSI C header files" >&5
827
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
828
  echo $ac_n "(cached) $ac_c" 1>&6
829
else
830
  cat > conftest.$ac_ext <
831
#line 832 "configure"
832
#include "confdefs.h"
833
#include 
834
#include 
835
#include 
836
#include 
837
EOF
838
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
839
{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
840
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
841
if test -z "$ac_err"; then
842
  rm -rf conftest*
843
  ac_cv_header_stdc=yes
844
else
845
  echo "$ac_err" >&5
846
  echo "configure: failed program was:" >&5
847
  cat conftest.$ac_ext >&5
848
  rm -rf conftest*
849
  ac_cv_header_stdc=no
850
fi
851
rm -f conftest*
852
 
853
if test $ac_cv_header_stdc = yes; then
854
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
855
cat > conftest.$ac_ext <
856
#line 857 "configure"
857
#include "confdefs.h"
858
#include 
859
EOF
860
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
861
  egrep "memchr" >/dev/null 2>&1; then
862
  :
863
else
864
  rm -rf conftest*
865
  ac_cv_header_stdc=no
866
fi
867
rm -f conftest*
868
 
869
fi
870
 
871
if test $ac_cv_header_stdc = yes; then
872
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
873
cat > conftest.$ac_ext <
874
#line 875 "configure"
875
#include "confdefs.h"
876
#include 
877
EOF
878
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
879
  egrep "free" >/dev/null 2>&1; then
880
  :
881
else
882
  rm -rf conftest*
883
  ac_cv_header_stdc=no
884
fi
885
rm -f conftest*
886
 
887
fi
888
 
889
if test $ac_cv_header_stdc = yes; then
890
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
891
if test "$cross_compiling" = yes; then
892
  :
893
else
894
  cat > conftest.$ac_ext <
895
#line 896 "configure"
896
#include "confdefs.h"
897
#include 
898
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
899
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
900
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
901
int main () { int i; for (i = 0; i < 256; i++)
902
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
903
exit (0); }
904
 
905
EOF
906
if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
907
then
908
  :
909
else
910
  echo "configure: failed program was:" >&5
911
  cat conftest.$ac_ext >&5
912
  rm -fr conftest*
913
  ac_cv_header_stdc=no
914
fi
915
rm -fr conftest*
916
fi
917
 
918
fi
919
fi
920
 
921
echo "$ac_t""$ac_cv_header_stdc" 1>&6
922
if test $ac_cv_header_stdc = yes; then
923
  cat >> confdefs.h <<\EOF
924
#define STDC_HEADERS 1
925
EOF
926
 
927
fi
928
 
929
echo $ac_n "checking for working const""... $ac_c" 1>&6
930
echo "configure:931: checking for working const" >&5
931
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
932
  echo $ac_n "(cached) $ac_c" 1>&6
933
else
934
  cat > conftest.$ac_ext <
935
#line 936 "configure"
936
#include "confdefs.h"
937
 
938
int main() {
939
 
940
/* Ultrix mips cc rejects this.  */
941
typedef int charset[2]; const charset x;
942
/* SunOS 4.1.1 cc rejects this.  */
943
char const *const *ccp;
944
char **p;
945
/* NEC SVR4.0.2 mips cc rejects this.  */
946
struct point {int x, y;};
947
static struct point const zero = {0,0};
948
/* AIX XL C 1.02.0.0 rejects this.
949
   It does not let you subtract one const X* pointer from another in an arm
950
   of an if-expression whose if-part is not a constant expression */
951
const char *g = "string";
952
ccp = &g + (g ? g-g : 0);
953
/* HPUX 7.0 cc rejects these. */
954
++ccp;
955
p = (char**) ccp;
956
ccp = (char const *const *) p;
957
{ /* SCO 3.2v4 cc rejects this.  */
958
  char *t;
959
  char const *s = 0 ? (char *) 0 : (char const *) 0;
960
 
961
  *t++ = 0;
962
}
963
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
964
  int x[] = {25, 17};
965
  const int *foo = &x[0];
966
  ++foo;
967
}
968
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
969
  typedef const int *iptr;
970
  iptr p = 0;
971
  ++p;
972
}
973
{ /* AIX XL C 1.02.0.0 rejects this saying
974
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
975
  struct s { int j; const int *ap[3]; };
976
  struct s *b; b->j = 5;
977
}
978
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
979
  const int foo = 10;
980
}
981
 
982
; return 0; }
983
EOF
984
if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
985
  rm -rf conftest*
986
  ac_cv_c_const=yes
987
else
988
  echo "configure: failed program was:" >&5
989
  cat conftest.$ac_ext >&5
990
  rm -rf conftest*
991
  ac_cv_c_const=no
992
fi
993
rm -f conftest*
994
fi
995
 
996
echo "$ac_t""$ac_cv_c_const" 1>&6
997
if test $ac_cv_c_const = no; then
998
  cat >> confdefs.h <<\EOF
999
#define const
1000
EOF
1001
 
1002
fi
1003
 
1004
echo $ac_n "checking for inline""... $ac_c" 1>&6
1005
echo "configure:1006: checking for inline" >&5
1006
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1007
  echo $ac_n "(cached) $ac_c" 1>&6
1008
else
1009
  ac_cv_c_inline=no
1010
for ac_kw in inline __inline__ __inline; do
1011
  cat > conftest.$ac_ext <
1012
#line 1013 "configure"
1013
#include "confdefs.h"
1014
 
1015
int main() {
1016
} $ac_kw foo() {
1017
; return 0; }
1018
EOF
1019
if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1020
  rm -rf conftest*
1021
  ac_cv_c_inline=$ac_kw; break
1022
else
1023
  echo "configure: failed program was:" >&5
1024
  cat conftest.$ac_ext >&5
1025
fi
1026
rm -f conftest*
1027
done
1028
 
1029
fi
1030
 
1031
echo "$ac_t""$ac_cv_c_inline" 1>&6
1032
case "$ac_cv_c_inline" in
1033
  inline | yes) ;;
1034
  no) cat >> confdefs.h <<\EOF
1035
#define inline
1036
EOF
1037
 ;;
1038
  *)  cat >> confdefs.h <
1039
#define inline $ac_cv_c_inline
1040
EOF
1041
 ;;
1042
esac
1043
 
1044
echo $ac_n "checking for off_t""... $ac_c" 1>&6
1045
echo "configure:1046: checking for off_t" >&5
1046
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1047
  echo $ac_n "(cached) $ac_c" 1>&6
1048
else
1049
  cat > conftest.$ac_ext <
1050
#line 1051 "configure"
1051
#include "confdefs.h"
1052
#include 
1053
#if STDC_HEADERS
1054
#include 
1055
#include 
1056
#endif
1057
EOF
1058
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1059
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1060
  rm -rf conftest*
1061
  ac_cv_type_off_t=yes
1062
else
1063
  rm -rf conftest*
1064
  ac_cv_type_off_t=no
1065
fi
1066
rm -f conftest*
1067
 
1068
fi
1069
echo "$ac_t""$ac_cv_type_off_t" 1>&6
1070
if test $ac_cv_type_off_t = no; then
1071
  cat >> confdefs.h <<\EOF
1072
#define off_t long
1073
EOF
1074
 
1075
fi
1076
 
1077
echo $ac_n "checking for size_t""... $ac_c" 1>&6
1078
echo "configure:1079: checking for size_t" >&5
1079
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1080
  echo $ac_n "(cached) $ac_c" 1>&6
1081
else
1082
  cat > conftest.$ac_ext <
1083
#line 1084 "configure"
1084
#include "confdefs.h"
1085
#include 
1086
#if STDC_HEADERS
1087
#include 
1088
#include 
1089
#endif
1090
EOF
1091
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1092
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1093
  rm -rf conftest*
1094
  ac_cv_type_size_t=yes
1095
else
1096
  rm -rf conftest*
1097
  ac_cv_type_size_t=no
1098
fi
1099
rm -f conftest*
1100
 
1101
fi
1102
echo "$ac_t""$ac_cv_type_size_t" 1>&6
1103
if test $ac_cv_type_size_t = no; then
1104
  cat >> confdefs.h <<\EOF
1105
#define size_t unsigned
1106
EOF
1107
 
1108
fi
1109
 
1110
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1111
# for constant arguments.  Useless!
1112
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1113
echo "configure:1114: checking for working alloca.h" >&5
1114
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1115
  echo $ac_n "(cached) $ac_c" 1>&6
1116
else
1117
  cat > conftest.$ac_ext <
1118
#line 1119 "configure"
1119
#include "confdefs.h"
1120
#include 
1121
int main() {
1122
char *p = alloca(2 * sizeof(int));
1123
; return 0; }
1124
EOF
1125
if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1126
  rm -rf conftest*
1127
  ac_cv_header_alloca_h=yes
1128
else
1129
  echo "configure: failed program was:" >&5
1130
  cat conftest.$ac_ext >&5
1131
  rm -rf conftest*
1132
  ac_cv_header_alloca_h=no
1133
fi
1134
rm -f conftest*
1135
fi
1136
 
1137
echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1138
if test $ac_cv_header_alloca_h = yes; then
1139
  cat >> confdefs.h <<\EOF
1140
#define HAVE_ALLOCA_H 1
1141
EOF
1142
 
1143
fi
1144
 
1145
echo $ac_n "checking for alloca""... $ac_c" 1>&6
1146
echo "configure:1147: checking for alloca" >&5
1147
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1148
  echo $ac_n "(cached) $ac_c" 1>&6
1149
else
1150
  cat > conftest.$ac_ext <
1151
#line 1152 "configure"
1152
#include "confdefs.h"
1153
 
1154
#ifdef __GNUC__
1155
# define alloca __builtin_alloca
1156
#else
1157
# ifdef _MSC_VER
1158
#  include 
1159
#  define alloca _alloca
1160
# else
1161
#  if HAVE_ALLOCA_H
1162
#   include 
1163
#  else
1164
#   ifdef _AIX
1165
 #pragma alloca
1166
#   else
1167
#    ifndef alloca /* predefined by HP cc +Olibcalls */
1168
char *alloca ();
1169
#    endif
1170
#   endif
1171
#  endif
1172
# endif
1173
#endif
1174
 
1175
int main() {
1176
char *p = (char *) alloca(1);
1177
; return 0; }
1178
EOF
1179
if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1180
  rm -rf conftest*
1181
  ac_cv_func_alloca_works=yes
1182
else
1183
  echo "configure: failed program was:" >&5
1184
  cat conftest.$ac_ext >&5
1185
  rm -rf conftest*
1186
  ac_cv_func_alloca_works=no
1187
fi
1188
rm -f conftest*
1189
fi
1190
 
1191
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1192
if test $ac_cv_func_alloca_works = yes; then
1193
  cat >> confdefs.h <<\EOF
1194
#define HAVE_ALLOCA 1
1195
EOF
1196
 
1197
fi
1198
 
1199
if test $ac_cv_func_alloca_works = no; then
1200
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1201
  # that cause trouble.  Some versions do not even contain alloca or
1202
  # contain a buggy version.  If you still want to use their alloca,
1203
  # use ar to extract alloca.o from them instead of compiling alloca.c.
1204
  ALLOCA=alloca.${ac_objext}
1205
  cat >> confdefs.h <<\EOF
1206
#define C_ALLOCA 1
1207
EOF
1208
 
1209
 
1210
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1211
echo "configure:1212: checking whether alloca needs Cray hooks" >&5
1212
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1213
  echo $ac_n "(cached) $ac_c" 1>&6
1214
else
1215
  cat > conftest.$ac_ext <
1216
#line 1217 "configure"
1217
#include "confdefs.h"
1218
#if defined(CRAY) && ! defined(CRAY2)
1219
webecray
1220
#else
1221
wenotbecray
1222
#endif
1223
 
1224
EOF
1225
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1226
  egrep "webecray" >/dev/null 2>&1; then
1227
  rm -rf conftest*
1228
  ac_cv_os_cray=yes
1229
else
1230
  rm -rf conftest*
1231
  ac_cv_os_cray=no
1232
fi
1233
rm -f conftest*
1234
 
1235
fi
1236
 
1237
echo "$ac_t""$ac_cv_os_cray" 1>&6
1238
if test $ac_cv_os_cray = yes; then
1239
for ac_func in _getb67 GETB67 getb67; do
1240
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1241
echo "configure:1242: checking for $ac_func" >&5
1242
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1243
  echo $ac_n "(cached) $ac_c" 1>&6
1244
else
1245
  cat > conftest.$ac_ext <
1246
#line 1247 "configure"
1247
#include "confdefs.h"
1248
/* System header to define __stub macros and hopefully few prototypes,
1249
    which can conflict with char $ac_func(); below.  */
1250
#include 
1251
/* Override any gcc2 internal prototype to avoid an error.  */
1252
/* We use char because int might match the return type of a gcc2
1253
    builtin and then its argument prototype would still apply.  */
1254
char $ac_func();
1255
 
1256
int main() {
1257
 
1258
/* The GNU C library defines this for functions which it implements
1259
    to always fail with ENOSYS.  Some functions are actually named
1260
    something starting with __ and the normal name is an alias.  */
1261
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1262
choke me
1263
#else
1264
$ac_func();
1265
#endif
1266
 
1267
; return 0; }
1268
EOF
1269
if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1270
  rm -rf conftest*
1271
  eval "ac_cv_func_$ac_func=yes"
1272
else
1273
  echo "configure: failed program was:" >&5
1274
  cat conftest.$ac_ext >&5
1275
  rm -rf conftest*
1276
  eval "ac_cv_func_$ac_func=no"
1277
fi
1278
rm -f conftest*
1279
fi
1280
 
1281
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1282
  echo "$ac_t""yes" 1>&6
1283
  cat >> confdefs.h <
1284
#define CRAY_STACKSEG_END $ac_func
1285
EOF
1286
 
1287
  break
1288
else
1289
  echo "$ac_t""no" 1>&6
1290
fi
1291
 
1292
done
1293
fi
1294
 
1295
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1296
echo "configure:1297: checking stack direction for C alloca" >&5
1297
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1298
  echo $ac_n "(cached) $ac_c" 1>&6
1299
else
1300
  if test "$cross_compiling" = yes; then
1301
  ac_cv_c_stack_direction=0
1302
else
1303
  cat > conftest.$ac_ext <
1304
#line 1305 "configure"
1305
#include "confdefs.h"
1306
find_stack_direction ()
1307
{
1308
  static char *addr = 0;
1309
  auto char dummy;
1310
  if (addr == 0)
1311
    {
1312
      addr = &dummy;
1313
      return find_stack_direction ();
1314
    }
1315
  else
1316
    return (&dummy > addr) ? 1 : -1;
1317
}
1318
main ()
1319
{
1320
  exit (find_stack_direction() < 0);
1321
}
1322
EOF
1323
if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1324
then
1325
  ac_cv_c_stack_direction=1
1326
else
1327
  echo "configure: failed program was:" >&5
1328
  cat conftest.$ac_ext >&5
1329
  rm -fr conftest*
1330
  ac_cv_c_stack_direction=-1
1331
fi
1332
rm -fr conftest*
1333
fi
1334
 
1335
fi
1336
 
1337
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1338
cat >> confdefs.h <
1339
#define STACK_DIRECTION $ac_cv_c_stack_direction
1340
EOF
1341
 
1342
fi
1343
 
1344
for ac_hdr in unistd.h
1345
do
1346
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1347
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1348
echo "configure:1349: checking for $ac_hdr" >&5
1349
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1350
  echo $ac_n "(cached) $ac_c" 1>&6
1351
else
1352
  cat > conftest.$ac_ext <
1353
#line 1354 "configure"
1354
#include "confdefs.h"
1355
#include <$ac_hdr>
1356
EOF
1357
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1358
{ (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1359
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1360
if test -z "$ac_err"; then
1361
  rm -rf conftest*
1362
  eval "ac_cv_header_$ac_safe=yes"
1363
else
1364
  echo "$ac_err" >&5
1365
  echo "configure: failed program was:" >&5
1366
  cat conftest.$ac_ext >&5
1367
  rm -rf conftest*
1368
  eval "ac_cv_header_$ac_safe=no"
1369
fi
1370
rm -f conftest*
1371
fi
1372
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1373
  echo "$ac_t""yes" 1>&6
1374
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1375
  cat >> confdefs.h <
1376
#define $ac_tr_hdr 1
1377
EOF
1378
 
1379
else
1380
  echo "$ac_t""no" 1>&6
1381
fi
1382
done
1383
 
1384
for ac_func in getpagesize
1385
do
1386
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1387
echo "configure:1388: checking for $ac_func" >&5
1388
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1389
  echo $ac_n "(cached) $ac_c" 1>&6
1390
else
1391
  cat > conftest.$ac_ext <
1392
#line 1393 "configure"
1393
#include "confdefs.h"
1394
/* System header to define __stub macros and hopefully few prototypes,
1395
    which can conflict with char $ac_func(); below.  */
1396
#include 
1397
/* Override any gcc2 internal prototype to avoid an error.  */
1398
/* We use char because int might match the return type of a gcc2
1399
    builtin and then its argument prototype would still apply.  */
1400
char $ac_func();
1401
 
1402
int main() {
1403
 
1404
/* The GNU C library defines this for functions which it implements
1405
    to always fail with ENOSYS.  Some functions are actually named
1406
    something starting with __ and the normal name is an alias.  */
1407
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1408
choke me
1409
#else
1410
$ac_func();
1411
#endif
1412
 
1413
; return 0; }
1414
EOF
1415
if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1416
  rm -rf conftest*
1417
  eval "ac_cv_func_$ac_func=yes"
1418
else
1419
  echo "configure: failed program was:" >&5
1420
  cat conftest.$ac_ext >&5
1421
  rm -rf conftest*
1422
  eval "ac_cv_func_$ac_func=no"
1423
fi
1424
rm -f conftest*
1425
fi
1426
 
1427
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1428
  echo "$ac_t""yes" 1>&6
1429
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1430
  cat >> confdefs.h <
1431
#define $ac_tr_func 1
1432
EOF
1433
 
1434
else
1435
  echo "$ac_t""no" 1>&6
1436
fi
1437
done
1438
 
1439
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1440
echo "configure:1441: checking for working mmap" >&5
1441
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1442
  echo $ac_n "(cached) $ac_c" 1>&6
1443
else
1444
  if test "$cross_compiling" = yes; then
1445
  ac_cv_func_mmap_fixed_mapped=no
1446
else
1447
  cat > conftest.$ac_ext <
1448
#line 1449 "configure"
1449
#include "confdefs.h"
1450
 
1451
/* Thanks to Mike Haertel and Jim Avera for this test.
1452
   Here is a matrix of mmap possibilities:
1453
        mmap private not fixed
1454
        mmap private fixed at somewhere currently unmapped
1455
        mmap private fixed at somewhere already mapped
1456
        mmap shared not fixed
1457
        mmap shared fixed at somewhere currently unmapped
1458
        mmap shared fixed at somewhere already mapped
1459
   For private mappings, we should verify that changes cannot be read()
1460
   back from the file, nor mmap's back from the file at a different
1461
   address.  (There have been systems where private was not correctly
1462
   implemented like the infamous i386 svr4.0, and systems where the
1463
   VM page cache was not coherent with the filesystem buffer cache
1464
   like early versions of FreeBSD and possibly contemporary NetBSD.)
1465
   For shared mappings, we should conversely verify that changes get
1466
   propogated back to all the places they're supposed to be.
1467
 
1468
   Grep wants private fixed already mapped.
1469
   The main things grep needs to know about mmap are:
1470
   * does it exist and is it safe to write into the mmap'd area
1471
   * how to use it (BSD variants)  */
1472
#include 
1473
#include 
1474
#include 
1475
 
1476
/* This mess was copied from the GNU getpagesize.h.  */
1477
#ifndef HAVE_GETPAGESIZE
1478
# ifdef HAVE_UNISTD_H
1479
#  include 
1480
# endif
1481
 
1482
/* Assume that all systems that can run configure have sys/param.h.  */
1483
# ifndef HAVE_SYS_PARAM_H
1484
#  define HAVE_SYS_PARAM_H 1
1485
# endif
1486
 
1487
# ifdef _SC_PAGESIZE
1488
#  define getpagesize() sysconf(_SC_PAGESIZE)
1489
# else /* no _SC_PAGESIZE */
1490
#  ifdef HAVE_SYS_PARAM_H
1491
#   include 
1492
#   ifdef EXEC_PAGESIZE
1493
#    define getpagesize() EXEC_PAGESIZE
1494
#   else /* no EXEC_PAGESIZE */
1495
#    ifdef NBPG
1496
#     define getpagesize() NBPG * CLSIZE
1497
#     ifndef CLSIZE
1498
#      define CLSIZE 1
1499
#     endif /* no CLSIZE */
1500
#    else /* no NBPG */
1501
#     ifdef NBPC
1502
#      define getpagesize() NBPC
1503
#     else /* no NBPC */
1504
#      ifdef PAGESIZE
1505
#       define getpagesize() PAGESIZE
1506
#      endif /* PAGESIZE */
1507
#     endif /* no NBPC */
1508
#    endif /* no NBPG */
1509
#   endif /* no EXEC_PAGESIZE */
1510
#  else /* no HAVE_SYS_PARAM_H */
1511
#   define getpagesize() 8192   /* punt totally */
1512
#  endif /* no HAVE_SYS_PARAM_H */
1513
# endif /* no _SC_PAGESIZE */
1514
 
1515
#endif /* no HAVE_GETPAGESIZE */
1516
 
1517
#ifdef __cplusplus
1518
extern "C" { void *malloc(unsigned); }
1519
#else
1520
char *malloc();
1521
#endif
1522
 
1523
int
1524
main()
1525
{
1526
        char *data, *data2, *data3;
1527
        int i, pagesize;
1528
        int fd;
1529
 
1530
        pagesize = getpagesize();
1531
 
1532
        /*
1533
         * First, make a file with some known garbage in it.
1534
         */
1535
        data = malloc(pagesize);
1536
        if (!data)
1537
                exit(1);
1538
        for (i = 0; i < pagesize; ++i)
1539
                *(data + i) = rand();
1540
        umask(0);
1541
        fd = creat("conftestmmap", 0600);
1542
        if (fd < 0)
1543
                exit(1);
1544
        if (write(fd, data, pagesize) != pagesize)
1545
                exit(1);
1546
        close(fd);
1547
 
1548
        /*
1549
         * Next, try to mmap the file at a fixed address which
1550
         * already has something else allocated at it.  If we can,
1551
         * also make sure that we see the same garbage.
1552
         */
1553
        fd = open("conftestmmap", O_RDWR);
1554
        if (fd < 0)
1555
                exit(1);
1556
        data2 = malloc(2 * pagesize);
1557
        if (!data2)
1558
                exit(1);
1559
        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1560
        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1561
            MAP_PRIVATE | MAP_FIXED, fd, 0L))
1562
                exit(1);
1563
        for (i = 0; i < pagesize; ++i)
1564
                if (*(data + i) != *(data2 + i))
1565
                        exit(1);
1566
 
1567
        /*
1568
         * Finally, make sure that changes to the mapped area
1569
         * do not percolate back to the file as seen by read().
1570
         * (This is a bug on some variants of i386 svr4.0.)
1571
         */
1572
        for (i = 0; i < pagesize; ++i)
1573
                *(data2 + i) = *(data2 + i) + 1;
1574
        data3 = malloc(pagesize);
1575
        if (!data3)
1576
                exit(1);
1577
        if (read(fd, data3, pagesize) != pagesize)
1578
                exit(1);
1579
        for (i = 0; i < pagesize; ++i)
1580
                if (*(data + i) != *(data3 + i))
1581
                        exit(1);
1582
        close(fd);
1583
        unlink("conftestmmap");
1584
        exit(0);
1585
}
1586
 
1587
EOF
1588
if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1589
then
1590
  ac_cv_func_mmap_fixed_mapped=yes
1591
else
1592
  echo "configure: failed program was:" >&5
1593
  cat conftest.$ac_ext >&5
1594
  rm -fr conftest*
1595
  ac_cv_func_mmap_fixed_mapped=no
1596
fi
1597
rm -fr conftest*
1598
fi
1599
 
1600
fi
1601
 
1602
echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1603
if test $ac_cv_func_mmap_fixed_mapped = yes; then
1604
  cat >> confdefs.h <<\EOF
1605
#define HAVE_MMAP 1
1606
EOF
1607
 
1608
fi
1609
 
1610
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1611
echo "configure:1612: checking for Cygwin environment" >&5
1612
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1613
  echo $ac_n "(cached) $ac_c" 1>&6
1614
else
1615
  cat > conftest.$ac_ext <
1616
#line 1617 "configure"
1617
#include "confdefs.h"
1618
 
1619
int main() {
1620
 
1621
#ifndef __CYGWIN__
1622
#define __CYGWIN__ __CYGWIN32__
1623
#endif
1624
return __CYGWIN__;
1625
; return 0; }
1626
EOF
1627
if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1628
  rm -rf conftest*
1629
  ac_cv_cygwin=yes
1630
else
1631
  echo "configure: failed program was:" >&5
1632
  cat conftest.$ac_ext >&5
1633
  rm -rf conftest*
1634
  ac_cv_cygwin=no
1635
fi
1636
rm -f conftest*
1637
rm -f conftest*
1638
fi
1639
 
1640
echo "$ac_t""$ac_cv_cygwin" 1>&6
1641
CYGWIN=
1642
test "$ac_cv_cygwin" = yes && CYGWIN=yes
1643
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1644
echo "configure:1645: checking for mingw32 environment" >&5
1645
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1646
  echo $ac_n "(cached) $ac_c" 1>&6
1647
else
1648
  cat > conftest.$ac_ext <
1649
#line 1650 "configure"
1650
#include "confdefs.h"
1651
 
1652
int main() {
1653
return __MINGW32__;
1654
; return 0; }
1655
EOF
1656
if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1657
  rm -rf conftest*
1658
  ac_cv_mingw32=yes
1659
else
1660
  echo "configure: failed program was:" >&5
1661
  cat conftest.$ac_ext >&5
1662
  rm -rf conftest*
1663
  ac_cv_mingw32=no
1664
fi
1665
rm -f conftest*
1666
rm -f conftest*
1667
fi
1668
 
1669
echo "$ac_t""$ac_cv_mingw32" 1>&6
1670
MINGW32=
1671
test "$ac_cv_mingw32" = yes && MINGW32=yes
1672
 
1673
# autoconf.info says this should be called right after AC_INIT.
1674
 
1675
 
1676
ac_aux_dir=
1677
for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1678
  if test -f $ac_dir/install-sh; then
1679
    ac_aux_dir=$ac_dir
1680
    ac_install_sh="$ac_aux_dir/install-sh -c"
1681
    break
1682
  elif test -f $ac_dir/install.sh; then
1683
    ac_aux_dir=$ac_dir
1684
    ac_install_sh="$ac_aux_dir/install.sh -c"
1685
    break
1686
  fi
1687
done
1688
if test -z "$ac_aux_dir"; then
1689
  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1690
fi
1691
ac_config_guess=$ac_aux_dir/config.guess
1692
ac_config_sub=$ac_aux_dir/config.sub
1693
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1694
 
1695
 
1696
# Do some error checking and defaulting for the host and target type.
1697
# The inputs are:
1698
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1699
#
1700
# The rules are:
1701
# 1. You are not allowed to specify --host, --target, and nonopt at the
1702
#    same time.
1703
# 2. Host defaults to nonopt.
1704
# 3. If nonopt is not specified, then host defaults to the current host,
1705
#    as determined by config.guess.
1706
# 4. Target and build default to nonopt.
1707
# 5. If nonopt is not specified, then target and build default to host.
1708
 
1709
# The aliases save the names the user supplied, while $host etc.
1710
# will get canonicalized.
1711
case $host---$target---$nonopt in
1712
NONE---*---* | *---NONE---* | *---*---NONE) ;;
1713
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1714
esac
1715
 
1716
 
1717
# Make sure we can run config.sub.
1718
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1719
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1720
fi
1721
 
1722
echo $ac_n "checking host system type""... $ac_c" 1>&6
1723
echo "configure:1724: checking host system type" >&5
1724
 
1725
host_alias=$host
1726
case "$host_alias" in
1727
NONE)
1728
  case $nonopt in
1729
  NONE)
1730
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1731
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1732
    fi ;;
1733
  *) host_alias=$nonopt ;;
1734
  esac ;;
1735
esac
1736
 
1737
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1738
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1739
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1740
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1741
echo "$ac_t""$host" 1>&6
1742
 
1743
echo $ac_n "checking target system type""... $ac_c" 1>&6
1744
echo "configure:1745: checking target system type" >&5
1745
 
1746
target_alias=$target
1747
case "$target_alias" in
1748
NONE)
1749
  case $nonopt in
1750
  NONE) target_alias=$host_alias ;;
1751
  *) target_alias=$nonopt ;;
1752
  esac ;;
1753
esac
1754
 
1755
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1756
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1757
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1758
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1759
echo "$ac_t""$target" 1>&6
1760
 
1761
echo $ac_n "checking build system type""... $ac_c" 1>&6
1762
echo "configure:1763: checking build system type" >&5
1763
 
1764
build_alias=$build
1765
case "$build_alias" in
1766
NONE)
1767
  case $nonopt in
1768
  NONE) build_alias=$host_alias ;;
1769
  *) build_alias=$nonopt ;;
1770
  esac ;;
1771
esac
1772
 
1773
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1774
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1775
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1776
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1777
echo "$ac_t""$build" 1>&6
1778
 
1779
test "$host_alias" != "$target_alias" &&
1780
  test "$program_prefix$program_suffix$program_transform_name" = \
1781
    NONENONEs,x,x, &&
1782
  program_prefix=${target_alias}-
1783
 
1784
if test "$program_transform_name" = s,x,x,; then
1785
  program_transform_name=
1786
else
1787
  # Double any \ or $.  echo might interpret backslashes.
1788
  cat <<\EOF_SED > conftestsed
1789
s,\\,\\\\,g; s,\$,$$,g
1790
EOF_SED
1791
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1792
  rm -f conftestsed
1793
fi
1794
test "$program_prefix" != NONE &&
1795
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
1796
# Use a double $ so make ignores it.
1797
test "$program_suffix" != NONE &&
1798
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1799
 
1800
# sed with no file args requires a program.
1801
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1802
 
1803
# Extract the first word of "gcc", so it can be a program name with args.
1804
set dummy gcc; ac_word=$2
1805
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1806
echo "configure:1807: checking for $ac_word" >&5
1807
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1808
  echo $ac_n "(cached) $ac_c" 1>&6
1809
else
1810
  if test -n "$CC"; then
1811
  ac_cv_prog_CC="$CC" # Let the user override the test.
1812
else
1813
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1814
  ac_dummy="$PATH"
1815
  for ac_dir in $ac_dummy; do
1816
    test -z "$ac_dir" && ac_dir=.
1817
    if test -f $ac_dir/$ac_word; then
1818
      ac_cv_prog_CC="gcc"
1819
      break
1820
    fi
1821
  done
1822
  IFS="$ac_save_ifs"
1823
fi
1824
fi
1825
CC="$ac_cv_prog_CC"
1826
if test -n "$CC"; then
1827
  echo "$ac_t""$CC" 1>&6
1828
else
1829
  echo "$ac_t""no" 1>&6
1830
fi
1831
 
1832
if test -z "$CC"; then
1833
  # Extract the first word of "cc", so it can be a program name with args.
1834
set dummy cc; ac_word=$2
1835
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1836
echo "configure:1837: checking for $ac_word" >&5
1837
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1838
  echo $ac_n "(cached) $ac_c" 1>&6
1839
else
1840
  if test -n "$CC"; then
1841
  ac_cv_prog_CC="$CC" # Let the user override the test.
1842
else
1843
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1844
  ac_prog_rejected=no
1845
  ac_dummy="$PATH"
1846
  for ac_dir in $ac_dummy; do
1847
    test -z "$ac_dir" && ac_dir=.
1848
    if test -f $ac_dir/$ac_word; then
1849
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1850
        ac_prog_rejected=yes
1851
        continue
1852
      fi
1853
      ac_cv_prog_CC="cc"
1854
      break
1855
    fi
1856
  done
1857
  IFS="$ac_save_ifs"
1858
if test $ac_prog_rejected = yes; then
1859
  # We found a bogon in the path, so make sure we never use it.
1860
  set dummy $ac_cv_prog_CC
1861
  shift
1862
  if test $# -gt 0; then
1863
    # We chose a different compiler from the bogus one.
1864
    # However, it has the same basename, so the bogon will be chosen
1865
    # first if we set CC to just the basename; use the full file name.
1866
    shift
1867
    set dummy "$ac_dir/$ac_word" "$@"
1868
    shift
1869
    ac_cv_prog_CC="$@"
1870
  fi
1871
fi
1872
fi
1873
fi
1874
CC="$ac_cv_prog_CC"
1875
if test -n "$CC"; then
1876
  echo "$ac_t""$CC" 1>&6
1877
else
1878
  echo "$ac_t""no" 1>&6
1879
fi
1880
 
1881
  if test -z "$CC"; then
1882
    case "`uname -s`" in
1883
    *win32* | *WIN32*)
1884
      # Extract the first word of "cl", so it can be a program name with args.
1885
set dummy cl; ac_word=$2
1886
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1887
echo "configure:1888: checking for $ac_word" >&5
1888
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1889
  echo $ac_n "(cached) $ac_c" 1>&6
1890
else
1891
  if test -n "$CC"; then
1892
  ac_cv_prog_CC="$CC" # Let the user override the test.
1893
else
1894
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1895
  ac_dummy="$PATH"
1896
  for ac_dir in $ac_dummy; do
1897
    test -z "$ac_dir" && ac_dir=.
1898
    if test -f $ac_dir/$ac_word; then
1899
      ac_cv_prog_CC="cl"
1900
      break
1901
    fi
1902
  done
1903
  IFS="$ac_save_ifs"
1904
fi
1905
fi
1906
CC="$ac_cv_prog_CC"
1907
if test -n "$CC"; then
1908
  echo "$ac_t""$CC" 1>&6
1909
else
1910
  echo "$ac_t""no" 1>&6
1911
fi
1912
 ;;
1913
    esac
1914
  fi
1915
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1916
fi
1917
 
1918
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1919
echo "configure:1920: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1920
 
1921
ac_ext=c
1922
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1923
ac_cpp='$CPP $CPPFLAGS'
1924
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1925
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1926
cross_compiling=$ac_cv_prog_cc_cross
1927
 
1928
cat > conftest.$ac_ext << EOF
1929
 
1930
#line 1931 "configure"
1931
#include "confdefs.h"
1932
 
1933
main(){return(0);}
1934
EOF
1935
if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1936
  ac_cv_prog_cc_works=yes
1937
  # If we can't run a trivial program, we are probably using a cross compiler.
1938
  if (./conftest; exit) 2>/dev/null; then
1939
    ac_cv_prog_cc_cross=no
1940
  else
1941
    ac_cv_prog_cc_cross=yes
1942
  fi
1943
else
1944
  echo "configure: failed program was:" >&5
1945
  cat conftest.$ac_ext >&5
1946
  ac_cv_prog_cc_works=no
1947
fi
1948
rm -fr conftest*
1949
ac_ext=c
1950
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1951
ac_cpp='$CPP $CPPFLAGS'
1952
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1953
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1954
cross_compiling=$ac_cv_prog_cc_cross
1955
 
1956
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1957
if test $ac_cv_prog_cc_works = no; then
1958
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1959
fi
1960
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1961
echo "configure:1962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1962
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1963
cross_compiling=$ac_cv_prog_cc_cross
1964
 
1965
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1966
echo "configure:1967: checking whether we are using GNU C" >&5
1967
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1968
  echo $ac_n "(cached) $ac_c" 1>&6
1969
else
1970
  cat > conftest.c <
1971
#ifdef __GNUC__
1972
  yes;
1973
#endif
1974
EOF
1975
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1976
  ac_cv_prog_gcc=yes
1977
else
1978
  ac_cv_prog_gcc=no
1979
fi
1980
fi
1981
 
1982
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1983
 
1984
if test $ac_cv_prog_gcc = yes; then
1985
  GCC=yes
1986
else
1987
  GCC=
1988
fi
1989
 
1990
ac_test_CFLAGS="${CFLAGS+set}"
1991
ac_save_CFLAGS="$CFLAGS"
1992
CFLAGS=
1993
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1994
echo "configure:1995: checking whether ${CC-cc} accepts -g" >&5
1995
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1996
  echo $ac_n "(cached) $ac_c" 1>&6
1997
else
1998
  echo 'void f(){}' > conftest.c
1999
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2000
  ac_cv_prog_cc_g=yes
2001
else
2002
  ac_cv_prog_cc_g=no
2003
fi
2004
rm -f conftest*
2005
 
2006
fi
2007
 
2008
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2009
if test "$ac_test_CFLAGS" = set; then
2010
  CFLAGS="$ac_save_CFLAGS"
2011
elif test $ac_cv_prog_cc_g = yes; then
2012
  if test "$GCC" = yes; then
2013
    CFLAGS="-g -O2"
2014
  else
2015
    CFLAGS="-g"
2016
  fi
2017
else
2018
  if test "$GCC" = yes; then
2019
    CFLAGS="-O2"
2020
  else
2021
    CFLAGS=
2022
  fi
2023
fi
2024
 
2025
# Find a good install program.  We prefer a C program (faster),
2026
# so one script is as good as another.  But avoid the broken or
2027
# incompatible versions:
2028
# SysV /etc/install, /usr/sbin/install
2029
# SunOS /usr/etc/install
2030
# IRIX /sbin/install
2031
# AIX /bin/install
2032
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2033
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2034
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2035
# ./install, which can be erroneously created by make from ./install.sh.
2036
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2037
echo "configure:2038: checking for a BSD compatible install" >&5
2038
if test -z "$INSTALL"; then
2039
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2040
  echo $ac_n "(cached) $ac_c" 1>&6
2041
else
2042
    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2043
  for ac_dir in $PATH; do
2044
    # Account for people who put trailing slashes in PATH elements.
2045
    case "$ac_dir/" in
2046
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2047
    *)
2048
      # OSF1 and SCO ODT 3.0 have their own names for install.
2049
      # Don't use installbsd from OSF since it installs stuff as root
2050
      # by default.
2051
      for ac_prog in ginstall scoinst install; do
2052
        if test -f $ac_dir/$ac_prog; then
2053
          if test $ac_prog = install &&
2054
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2055
            # AIX install.  It has an incompatible calling convention.
2056
            :
2057
          else
2058
            ac_cv_path_install="$ac_dir/$ac_prog -c"
2059
            break 2
2060
          fi
2061
        fi
2062
      done
2063
      ;;
2064
    esac
2065
  done
2066
  IFS="$ac_save_IFS"
2067
 
2068
fi
2069
  if test "${ac_cv_path_install+set}" = set; then
2070
    INSTALL="$ac_cv_path_install"
2071
  else
2072
    # As a last resort, use the slow shell script.  We don't cache a
2073
    # path for INSTALL within a source directory, because that will
2074
    # break other packages using the cache if that directory is
2075
    # removed, or if the path is relative.
2076
    INSTALL="$ac_install_sh"
2077
  fi
2078
fi
2079
echo "$ac_t""$INSTALL" 1>&6
2080
 
2081
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2082
# It thinks the first close brace ends the variable substitution.
2083
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2084
 
2085
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2086
 
2087
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2088
 
2089
 
2090
# Put a plausible default for CC_FOR_BUILD in Makefile.
2091
if test "x$cross_compiling" = "xno"; then
2092
  CC_FOR_BUILD='$(CC)'
2093
else
2094
  CC_FOR_BUILD=gcc
2095
fi
2096
 
2097
 
2098
 
2099
 
2100
AR=${AR-ar}
2101
 
2102
# Extract the first word of "ranlib", so it can be a program name with args.
2103
set dummy ranlib; ac_word=$2
2104
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2105
echo "configure:2106: checking for $ac_word" >&5
2106
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2107
  echo $ac_n "(cached) $ac_c" 1>&6
2108
else
2109
  if test -n "$RANLIB"; then
2110
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2111
else
2112
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2113
  ac_dummy="$PATH"
2114
  for ac_dir in $ac_dummy; do
2115
    test -z "$ac_dir" && ac_dir=.
2116
    if test -f $ac_dir/$ac_word; then
2117
      ac_cv_prog_RANLIB="ranlib"
2118
      break
2119
    fi
2120
  done
2121
  IFS="$ac_save_ifs"
2122
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2123
fi
2124
fi
2125
RANLIB="$ac_cv_prog_RANLIB"
2126
if test -n "$RANLIB"; then
2127
  echo "$ac_t""$RANLIB" 1>&6
2128
else
2129
  echo "$ac_t""no" 1>&6
2130
fi
2131
 
2132
 
2133
ALL_LINGUAS=
2134
 
2135
   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2136
unistd.h values.h sys/param.h
2137
do
2138
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2139
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2140
echo "configure:2141: checking for $ac_hdr" >&5
2141
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2142
  echo $ac_n "(cached) $ac_c" 1>&6
2143
else
2144
  cat > conftest.$ac_ext <
2145
#line 2146 "configure"
2146
#include "confdefs.h"
2147
#include <$ac_hdr>
2148
EOF
2149
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2150
{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2151
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2152
if test -z "$ac_err"; then
2153
  rm -rf conftest*
2154
  eval "ac_cv_header_$ac_safe=yes"
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
  eval "ac_cv_header_$ac_safe=no"
2161
fi
2162
rm -f conftest*
2163
fi
2164
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2165
  echo "$ac_t""yes" 1>&6
2166
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2167
  cat >> confdefs.h <
2168
#define $ac_tr_hdr 1
2169
EOF
2170
 
2171
else
2172
  echo "$ac_t""no" 1>&6
2173
fi
2174
done
2175
 
2176
   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2177
__argz_count __argz_stringify __argz_next
2178
do
2179
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2180
echo "configure:2181: checking for $ac_func" >&5
2181
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182
  echo $ac_n "(cached) $ac_c" 1>&6
2183
else
2184
  cat > conftest.$ac_ext <
2185
#line 2186 "configure"
2186
#include "confdefs.h"
2187
/* System header to define __stub macros and hopefully few prototypes,
2188
    which can conflict with char $ac_func(); below.  */
2189
#include 
2190
/* Override any gcc2 internal prototype to avoid an error.  */
2191
/* We use char because int might match the return type of a gcc2
2192
    builtin and then its argument prototype would still apply.  */
2193
char $ac_func();
2194
 
2195
int main() {
2196
 
2197
/* The GNU C library defines this for functions which it implements
2198
    to always fail with ENOSYS.  Some functions are actually named
2199
    something starting with __ and the normal name is an alias.  */
2200
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201
choke me
2202
#else
2203
$ac_func();
2204
#endif
2205
 
2206
; return 0; }
2207
EOF
2208
if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2209
  rm -rf conftest*
2210
  eval "ac_cv_func_$ac_func=yes"
2211
else
2212
  echo "configure: failed program was:" >&5
2213
  cat conftest.$ac_ext >&5
2214
  rm -rf conftest*
2215
  eval "ac_cv_func_$ac_func=no"
2216
fi
2217
rm -f conftest*
2218
fi
2219
 
2220
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221
  echo "$ac_t""yes" 1>&6
2222
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223
  cat >> confdefs.h <
2224
#define $ac_tr_func 1
2225
EOF
2226
 
2227
else
2228
  echo "$ac_t""no" 1>&6
2229
fi
2230
done
2231
 
2232
 
2233
   if test "${ac_cv_func_stpcpy+set}" != "set"; then
2234
     for ac_func in stpcpy
2235
do
2236
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2237
echo "configure:2238: checking for $ac_func" >&5
2238
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2239
  echo $ac_n "(cached) $ac_c" 1>&6
2240
else
2241
  cat > conftest.$ac_ext <
2242
#line 2243 "configure"
2243
#include "confdefs.h"
2244
/* System header to define __stub macros and hopefully few prototypes,
2245
    which can conflict with char $ac_func(); below.  */
2246
#include 
2247
/* Override any gcc2 internal prototype to avoid an error.  */
2248
/* We use char because int might match the return type of a gcc2
2249
    builtin and then its argument prototype would still apply.  */
2250
char $ac_func();
2251
 
2252
int main() {
2253
 
2254
/* The GNU C library defines this for functions which it implements
2255
    to always fail with ENOSYS.  Some functions are actually named
2256
    something starting with __ and the normal name is an alias.  */
2257
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2258
choke me
2259
#else
2260
$ac_func();
2261
#endif
2262
 
2263
; return 0; }
2264
EOF
2265
if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266
  rm -rf conftest*
2267
  eval "ac_cv_func_$ac_func=yes"
2268
else
2269
  echo "configure: failed program was:" >&5
2270
  cat conftest.$ac_ext >&5
2271
  rm -rf conftest*
2272
  eval "ac_cv_func_$ac_func=no"
2273
fi
2274
rm -f conftest*
2275
fi
2276
 
2277
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2278
  echo "$ac_t""yes" 1>&6
2279
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2280
  cat >> confdefs.h <
2281
#define $ac_tr_func 1
2282
EOF
2283
 
2284
else
2285
  echo "$ac_t""no" 1>&6
2286
fi
2287
done
2288
 
2289
   fi
2290
   if test "${ac_cv_func_stpcpy}" = "yes"; then
2291
     cat >> confdefs.h <<\EOF
2292
#define HAVE_STPCPY 1
2293
EOF
2294
 
2295
   fi
2296
 
2297
   if test $ac_cv_header_locale_h = yes; then
2298
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2299
echo "configure:2300: checking for LC_MESSAGES" >&5
2300
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2301
  echo $ac_n "(cached) $ac_c" 1>&6
2302
else
2303
  cat > conftest.$ac_ext <
2304
#line 2305 "configure"
2305
#include "confdefs.h"
2306
#include 
2307
int main() {
2308
return LC_MESSAGES
2309
; return 0; }
2310
EOF
2311
if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2312
  rm -rf conftest*
2313
  am_cv_val_LC_MESSAGES=yes
2314
else
2315
  echo "configure: failed program was:" >&5
2316
  cat conftest.$ac_ext >&5
2317
  rm -rf conftest*
2318
  am_cv_val_LC_MESSAGES=no
2319
fi
2320
rm -f conftest*
2321
fi
2322
 
2323
echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2324
    if test $am_cv_val_LC_MESSAGES = yes; then
2325
      cat >> confdefs.h <<\EOF
2326
#define HAVE_LC_MESSAGES 1
2327
EOF
2328
 
2329
    fi
2330
  fi
2331
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2332
echo "configure:2333: checking whether NLS is requested" >&5
2333
        # Check whether --enable-nls or --disable-nls was given.
2334
if test "${enable_nls+set}" = set; then
2335
  enableval="$enable_nls"
2336
  USE_NLS=$enableval
2337
else
2338
  USE_NLS=yes
2339
fi
2340
 
2341
    echo "$ac_t""$USE_NLS" 1>&6
2342
 
2343
 
2344
    USE_INCLUDED_LIBINTL=no
2345
 
2346
        if test "$USE_NLS" = "yes"; then
2347
      cat >> confdefs.h <<\EOF
2348
#define ENABLE_NLS 1
2349
EOF
2350
 
2351
      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2352
echo "configure:2353: checking whether included gettext is requested" >&5
2353
      # Check whether --with-included-gettext or --without-included-gettext was given.
2354
if test "${with_included_gettext+set}" = set; then
2355
  withval="$with_included_gettext"
2356
  nls_cv_force_use_gnu_gettext=$withval
2357
else
2358
  nls_cv_force_use_gnu_gettext=no
2359
fi
2360
 
2361
      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2362
 
2363
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2364
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2365
                                        nls_cv_header_intl=
2366
        nls_cv_header_libgt=
2367
        CATOBJEXT=NONE
2368
 
2369
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2370
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2371
echo "configure:2372: checking for libintl.h" >&5
2372
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2373
  echo $ac_n "(cached) $ac_c" 1>&6
2374
else
2375
  cat > conftest.$ac_ext <
2376
#line 2377 "configure"
2377
#include "confdefs.h"
2378
#include 
2379
EOF
2380
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2381
{ (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2382
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2383
if test -z "$ac_err"; then
2384
  rm -rf conftest*
2385
  eval "ac_cv_header_$ac_safe=yes"
2386
else
2387
  echo "$ac_err" >&5
2388
  echo "configure: failed program was:" >&5
2389
  cat conftest.$ac_ext >&5
2390
  rm -rf conftest*
2391
  eval "ac_cv_header_$ac_safe=no"
2392
fi
2393
rm -f conftest*
2394
fi
2395
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2396
  echo "$ac_t""yes" 1>&6
2397
  echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2398
echo "configure:2399: checking for gettext in libc" >&5
2399
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2400
  echo $ac_n "(cached) $ac_c" 1>&6
2401
else
2402
  cat > conftest.$ac_ext <
2403
#line 2404 "configure"
2404
#include "confdefs.h"
2405
#include 
2406
int main() {
2407
return (int) gettext ("")
2408
; return 0; }
2409
EOF
2410
if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2411
  rm -rf conftest*
2412
  gt_cv_func_gettext_libc=yes
2413
else
2414
  echo "configure: failed program was:" >&5
2415
  cat conftest.$ac_ext >&5
2416
  rm -rf conftest*
2417
  gt_cv_func_gettext_libc=no
2418
fi
2419
rm -f conftest*
2420
fi
2421
 
2422
echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2423
 
2424
           if test "$gt_cv_func_gettext_libc" != "yes"; then
2425
             echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2426
echo "configure:2427: checking for bindtextdomain in -lintl" >&5
2427
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2428
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2429
  echo $ac_n "(cached) $ac_c" 1>&6
2430
else
2431
  ac_save_LIBS="$LIBS"
2432
LIBS="-lintl  $LIBS"
2433
cat > conftest.$ac_ext <
2434
#line 2435 "configure"
2435
#include "confdefs.h"
2436
/* Override any gcc2 internal prototype to avoid an error.  */
2437
/* We use char because int might match the return type of a gcc2
2438
    builtin and then its argument prototype would still apply.  */
2439
char bindtextdomain();
2440
 
2441
int main() {
2442
bindtextdomain()
2443
; return 0; }
2444
EOF
2445
if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2446
  rm -rf conftest*
2447
  eval "ac_cv_lib_$ac_lib_var=yes"
2448
else
2449
  echo "configure: failed program was:" >&5
2450
  cat conftest.$ac_ext >&5
2451
  rm -rf conftest*
2452
  eval "ac_cv_lib_$ac_lib_var=no"
2453
fi
2454
rm -f conftest*
2455
LIBS="$ac_save_LIBS"
2456
 
2457
fi
2458
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2459
  echo "$ac_t""yes" 1>&6
2460
  echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2461
echo "configure:2462: checking for gettext in libintl" >&5
2462
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2463
  echo $ac_n "(cached) $ac_c" 1>&6
2464
else
2465
  cat > conftest.$ac_ext <
2466
#line 2467 "configure"
2467
#include "confdefs.h"
2468
 
2469
int main() {
2470
return (int) gettext ("")
2471
; return 0; }
2472
EOF
2473
if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2474
  rm -rf conftest*
2475
  gt_cv_func_gettext_libintl=yes
2476
else
2477
  echo "configure: failed program was:" >&5
2478
  cat conftest.$ac_ext >&5
2479
  rm -rf conftest*
2480
  gt_cv_func_gettext_libintl=no
2481
fi
2482
rm -f conftest*
2483
fi
2484
 
2485
echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2486
else
2487
  echo "$ac_t""no" 1>&6
2488
fi
2489
 
2490
           fi
2491
 
2492
           if test "$gt_cv_func_gettext_libc" = "yes" \
2493
              || test "$gt_cv_func_gettext_libintl" = "yes"; then
2494
              cat >> confdefs.h <<\EOF
2495
#define HAVE_GETTEXT 1
2496
EOF
2497
 
2498
              # Extract the first word of "msgfmt", so it can be a program name with args.
2499
set dummy msgfmt; ac_word=$2
2500
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2501
echo "configure:2502: checking for $ac_word" >&5
2502
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2503
  echo $ac_n "(cached) $ac_c" 1>&6
2504
else
2505
  case "$MSGFMT" in
2506
  /*)
2507
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2508
  ;;
2509
  *)
2510
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2511
  for ac_dir in $PATH; do
2512
    test -z "$ac_dir" && ac_dir=.
2513
    if test -f $ac_dir/$ac_word; then
2514
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2515
        ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2516
        break
2517
      fi
2518
    fi
2519
  done
2520
  IFS="$ac_save_ifs"
2521
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2522
  ;;
2523
esac
2524
fi
2525
MSGFMT="$ac_cv_path_MSGFMT"
2526
if test -n "$MSGFMT"; then
2527
  echo "$ac_t""$MSGFMT" 1>&6
2528
else
2529
  echo "$ac_t""no" 1>&6
2530
fi
2531
              if test "$MSGFMT" != "no"; then
2532
                for ac_func in dcgettext
2533
do
2534
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2535
echo "configure:2536: checking for $ac_func" >&5
2536
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2537
  echo $ac_n "(cached) $ac_c" 1>&6
2538
else
2539
  cat > conftest.$ac_ext <
2540
#line 2541 "configure"
2541
#include "confdefs.h"
2542
/* System header to define __stub macros and hopefully few prototypes,
2543
    which can conflict with char $ac_func(); below.  */
2544
#include 
2545
/* Override any gcc2 internal prototype to avoid an error.  */
2546
/* We use char because int might match the return type of a gcc2
2547
    builtin and then its argument prototype would still apply.  */
2548
char $ac_func();
2549
 
2550
int main() {
2551
 
2552
/* The GNU C library defines this for functions which it implements
2553
    to always fail with ENOSYS.  Some functions are actually named
2554
    something starting with __ and the normal name is an alias.  */
2555
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2556
choke me
2557
#else
2558
$ac_func();
2559
#endif
2560
 
2561
; return 0; }
2562
EOF
2563
if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2564
  rm -rf conftest*
2565
  eval "ac_cv_func_$ac_func=yes"
2566
else
2567
  echo "configure: failed program was:" >&5
2568
  cat conftest.$ac_ext >&5
2569
  rm -rf conftest*
2570
  eval "ac_cv_func_$ac_func=no"
2571
fi
2572
rm -f conftest*
2573
fi
2574
 
2575
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2576
  echo "$ac_t""yes" 1>&6
2577
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2578
  cat >> confdefs.h <
2579
#define $ac_tr_func 1
2580
EOF
2581
 
2582
else
2583
  echo "$ac_t""no" 1>&6
2584
fi
2585
done
2586
 
2587
                # Extract the first word of "gmsgfmt", so it can be a program name with args.
2588
set dummy gmsgfmt; ac_word=$2
2589
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2590
echo "configure:2591: checking for $ac_word" >&5
2591
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2592
  echo $ac_n "(cached) $ac_c" 1>&6
2593
else
2594
  case "$GMSGFMT" in
2595
  /*)
2596
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2597
  ;;
2598
  ?:/*)
2599
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2600
  ;;
2601
  *)
2602
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2603
  ac_dummy="$PATH"
2604
  for ac_dir in $ac_dummy; do
2605
    test -z "$ac_dir" && ac_dir=.
2606
    if test -f $ac_dir/$ac_word; then
2607
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2608
      break
2609
    fi
2610
  done
2611
  IFS="$ac_save_ifs"
2612
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2613
  ;;
2614
esac
2615
fi
2616
GMSGFMT="$ac_cv_path_GMSGFMT"
2617
if test -n "$GMSGFMT"; then
2618
  echo "$ac_t""$GMSGFMT" 1>&6
2619
else
2620
  echo "$ac_t""no" 1>&6
2621
fi
2622
 
2623
                # Extract the first word of "xgettext", so it can be a program name with args.
2624
set dummy xgettext; ac_word=$2
2625
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2626
echo "configure:2627: checking for $ac_word" >&5
2627
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2628
  echo $ac_n "(cached) $ac_c" 1>&6
2629
else
2630
  case "$XGETTEXT" in
2631
  /*)
2632
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2633
  ;;
2634
  *)
2635
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2636
  for ac_dir in $PATH; do
2637
    test -z "$ac_dir" && ac_dir=.
2638
    if test -f $ac_dir/$ac_word; then
2639
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2640
        ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2641
        break
2642
      fi
2643
    fi
2644
  done
2645
  IFS="$ac_save_ifs"
2646
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2647
  ;;
2648
esac
2649
fi
2650
XGETTEXT="$ac_cv_path_XGETTEXT"
2651
if test -n "$XGETTEXT"; then
2652
  echo "$ac_t""$XGETTEXT" 1>&6
2653
else
2654
  echo "$ac_t""no" 1>&6
2655
fi
2656
 
2657
                cat > conftest.$ac_ext <
2658
#line 2659 "configure"
2659
#include "confdefs.h"
2660
 
2661
int main() {
2662
extern int _nl_msg_cat_cntr;
2663
                               return _nl_msg_cat_cntr
2664
; return 0; }
2665
EOF
2666
if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2667
  rm -rf conftest*
2668
  CATOBJEXT=.gmo
2669
                   DATADIRNAME=share
2670
else
2671
  echo "configure: failed program was:" >&5
2672
  cat conftest.$ac_ext >&5
2673
  rm -rf conftest*
2674
  CATOBJEXT=.mo
2675
                   DATADIRNAME=lib
2676
fi
2677
rm -f conftest*
2678
                INSTOBJEXT=.mo
2679
              fi
2680
            fi
2681
 
2682
else
2683
  echo "$ac_t""no" 1>&6
2684
fi
2685
 
2686
 
2687
 
2688
        if test "$CATOBJEXT" = "NONE"; then
2689
                          nls_cv_use_gnu_gettext=yes
2690
        fi
2691
      fi
2692
 
2693
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
2694
                INTLOBJS="\$(GETTOBJS)"
2695
        # Extract the first word of "msgfmt", so it can be a program name with args.
2696
set dummy msgfmt; ac_word=$2
2697
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2698
echo "configure:2699: checking for $ac_word" >&5
2699
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2700
  echo $ac_n "(cached) $ac_c" 1>&6
2701
else
2702
  case "$MSGFMT" in
2703
  /*)
2704
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2705
  ;;
2706
  *)
2707
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2708
  for ac_dir in $PATH; do
2709
    test -z "$ac_dir" && ac_dir=.
2710
    if test -f $ac_dir/$ac_word; then
2711
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2712
        ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2713
        break
2714
      fi
2715
    fi
2716
  done
2717
  IFS="$ac_save_ifs"
2718
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2719
  ;;
2720
esac
2721
fi
2722
MSGFMT="$ac_cv_path_MSGFMT"
2723
if test -n "$MSGFMT"; then
2724
  echo "$ac_t""$MSGFMT" 1>&6
2725
else
2726
  echo "$ac_t""no" 1>&6
2727
fi
2728
 
2729
        # Extract the first word of "gmsgfmt", so it can be a program name with args.
2730
set dummy gmsgfmt; ac_word=$2
2731
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2732
echo "configure:2733: checking for $ac_word" >&5
2733
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2734
  echo $ac_n "(cached) $ac_c" 1>&6
2735
else
2736
  case "$GMSGFMT" in
2737
  /*)
2738
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2739
  ;;
2740
  ?:/*)
2741
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2742
  ;;
2743
  *)
2744
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2745
  ac_dummy="$PATH"
2746
  for ac_dir in $ac_dummy; do
2747
    test -z "$ac_dir" && ac_dir=.
2748
    if test -f $ac_dir/$ac_word; then
2749
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2750
      break
2751
    fi
2752
  done
2753
  IFS="$ac_save_ifs"
2754
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2755
  ;;
2756
esac
2757
fi
2758
GMSGFMT="$ac_cv_path_GMSGFMT"
2759
if test -n "$GMSGFMT"; then
2760
  echo "$ac_t""$GMSGFMT" 1>&6
2761
else
2762
  echo "$ac_t""no" 1>&6
2763
fi
2764
 
2765
        # Extract the first word of "xgettext", so it can be a program name with args.
2766
set dummy xgettext; ac_word=$2
2767
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2768
echo "configure:2769: checking for $ac_word" >&5
2769
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2770
  echo $ac_n "(cached) $ac_c" 1>&6
2771
else
2772
  case "$XGETTEXT" in
2773
  /*)
2774
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2775
  ;;
2776
  *)
2777
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2778
  for ac_dir in $PATH; do
2779
    test -z "$ac_dir" && ac_dir=.
2780
    if test -f $ac_dir/$ac_word; then
2781
      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2782
        ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2783
        break
2784
      fi
2785
    fi
2786
  done
2787
  IFS="$ac_save_ifs"
2788
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2789
  ;;
2790
esac
2791
fi
2792
XGETTEXT="$ac_cv_path_XGETTEXT"
2793
if test -n "$XGETTEXT"; then
2794
  echo "$ac_t""$XGETTEXT" 1>&6
2795
else
2796
  echo "$ac_t""no" 1>&6
2797
fi
2798
 
2799
 
2800
        USE_INCLUDED_LIBINTL=yes
2801
        CATOBJEXT=.gmo
2802
        INSTOBJEXT=.mo
2803
        DATADIRNAME=share
2804
        INTLDEPS='$(top_builddir)/../intl/libintl.a'
2805
        INTLLIBS=$INTLDEPS
2806
        LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2807
        nls_cv_header_intl=libintl.h
2808
        nls_cv_header_libgt=libgettext.h
2809
      fi
2810
 
2811
            if test "$XGETTEXT" != ":"; then
2812
                        if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2813
          : ;
2814
        else
2815
          echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2816
          XGETTEXT=":"
2817
        fi
2818
      fi
2819
 
2820
      # We need to process the po/ directory.
2821
      POSUB=po
2822
    else
2823
      DATADIRNAME=share
2824
      nls_cv_header_intl=libintl.h
2825
      nls_cv_header_libgt=libgettext.h
2826
    fi
2827
 
2828
    # If this is used in GNU gettext we have to set USE_NLS to `yes'
2829
    # because some of the sources are only built for this goal.
2830
    if test "$PACKAGE" = gettext; then
2831
      USE_NLS=yes
2832
      USE_INCLUDED_LIBINTL=yes
2833
    fi
2834
 
2835
                for lang in $ALL_LINGUAS; do
2836
      GMOFILES="$GMOFILES $lang.gmo"
2837
      POFILES="$POFILES $lang.po"
2838
    done
2839
 
2840
 
2841
 
2842
 
2843
 
2844
 
2845
 
2846
 
2847
 
2848
 
2849
 
2850
 
2851
 
2852
 
2853
   if test "x$CATOBJEXT" != "x"; then
2854
     if test "x$ALL_LINGUAS" = "x"; then
2855
       LINGUAS=
2856
     else
2857
       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2858
echo "configure:2859: checking for catalogs to be installed" >&5
2859
       NEW_LINGUAS=
2860
       for lang in ${LINGUAS=$ALL_LINGUAS}; do
2861
         case "$ALL_LINGUAS" in
2862
          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2863
         esac
2864
       done
2865
       LINGUAS=$NEW_LINGUAS
2866
       echo "$ac_t""$LINGUAS" 1>&6
2867
     fi
2868
 
2869
          if test -n "$LINGUAS"; then
2870
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2871
     fi
2872
   fi
2873
 
2874
            if test $ac_cv_header_locale_h = yes; then
2875
     INCLUDE_LOCALE_H="#include "
2876
   else
2877
     INCLUDE_LOCALE_H="\
2878
/* The system does not provide the header .  Take care yourself.  */"
2879
   fi
2880
 
2881
 
2882
            if test -f $srcdir/po2tbl.sed.in; then
2883
      if test "$CATOBJEXT" = ".cat"; then
2884
         ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2885
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2886
echo "configure:2887: checking for linux/version.h" >&5
2887
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2888
  echo $ac_n "(cached) $ac_c" 1>&6
2889
else
2890
  cat > conftest.$ac_ext <
2891
#line 2892 "configure"
2892
#include "confdefs.h"
2893
#include 
2894
EOF
2895
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2896
{ (eval echo configure:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2897
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2898
if test -z "$ac_err"; then
2899
  rm -rf conftest*
2900
  eval "ac_cv_header_$ac_safe=yes"
2901
else
2902
  echo "$ac_err" >&5
2903
  echo "configure: failed program was:" >&5
2904
  cat conftest.$ac_ext >&5
2905
  rm -rf conftest*
2906
  eval "ac_cv_header_$ac_safe=no"
2907
fi
2908
rm -f conftest*
2909
fi
2910
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2911
  echo "$ac_t""yes" 1>&6
2912
  msgformat=linux
2913
else
2914
  echo "$ac_t""no" 1>&6
2915
msgformat=xopen
2916
fi
2917
 
2918
 
2919
                         sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2920
      fi
2921
            sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2922
         $srcdir/po2tbl.sed.in > po2tbl.sed
2923
   fi
2924
 
2925
            if test "$PACKAGE" = "gettext"; then
2926
     GT_NO="#NO#"
2927
     GT_YES=
2928
   else
2929
     GT_NO=
2930
     GT_YES="#YES#"
2931
   fi
2932
 
2933
 
2934
 
2935
   MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2936
 
2937
 
2938
      l=
2939
 
2940
 
2941
            if test -d $srcdir/po; then
2942
      test -d po || mkdir po
2943
      if test "x$srcdir" != "x."; then
2944
         if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2945
            posrcprefix="$srcdir/"
2946
         else
2947
            posrcprefix="../$srcdir/"
2948
         fi
2949
      else
2950
         posrcprefix="../"
2951
      fi
2952
      rm -f po/POTFILES
2953
      sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2954
         < $srcdir/po/POTFILES.in > po/POTFILES
2955
   fi
2956
 
2957
 
2958
# Check for common headers.
2959
# FIXME: Seems to me this can cause problems for i386-windows hosts.
2960
# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
2961
for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2962
do
2963
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2964
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2965
echo "configure:2966: checking for $ac_hdr" >&5
2966
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2967
  echo $ac_n "(cached) $ac_c" 1>&6
2968
else
2969
  cat > conftest.$ac_ext <
2970
#line 2971 "configure"
2971
#include "confdefs.h"
2972
#include <$ac_hdr>
2973
EOF
2974
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2975
{ (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2976
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2977
if test -z "$ac_err"; then
2978
  rm -rf conftest*
2979
  eval "ac_cv_header_$ac_safe=yes"
2980
else
2981
  echo "$ac_err" >&5
2982
  echo "configure: failed program was:" >&5
2983
  cat conftest.$ac_ext >&5
2984
  rm -rf conftest*
2985
  eval "ac_cv_header_$ac_safe=no"
2986
fi
2987
rm -f conftest*
2988
fi
2989
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2990
  echo "$ac_t""yes" 1>&6
2991
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2992
  cat >> confdefs.h <
2993
#define $ac_tr_hdr 1
2994
EOF
2995
 
2996
else
2997
  echo "$ac_t""no" 1>&6
2998
fi
2999
done
3000
 
3001
for ac_hdr in sys/time.h sys/resource.h
3002
do
3003
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3004
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3005
echo "configure:3006: checking for $ac_hdr" >&5
3006
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3007
  echo $ac_n "(cached) $ac_c" 1>&6
3008
else
3009
  cat > conftest.$ac_ext <
3010
#line 3011 "configure"
3011
#include "confdefs.h"
3012
#include <$ac_hdr>
3013
EOF
3014
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3015
{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3016
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3017
if test -z "$ac_err"; then
3018
  rm -rf conftest*
3019
  eval "ac_cv_header_$ac_safe=yes"
3020
else
3021
  echo "$ac_err" >&5
3022
  echo "configure: failed program was:" >&5
3023
  cat conftest.$ac_ext >&5
3024
  rm -rf conftest*
3025
  eval "ac_cv_header_$ac_safe=no"
3026
fi
3027
rm -f conftest*
3028
fi
3029
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3030
  echo "$ac_t""yes" 1>&6
3031
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3032
  cat >> confdefs.h <
3033
#define $ac_tr_hdr 1
3034
EOF
3035
 
3036
else
3037
  echo "$ac_t""no" 1>&6
3038
fi
3039
done
3040
 
3041
for ac_hdr in fcntl.h fpu_control.h
3042
do
3043
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3044
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3045
echo "configure:3046: checking for $ac_hdr" >&5
3046
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3047
  echo $ac_n "(cached) $ac_c" 1>&6
3048
else
3049
  cat > conftest.$ac_ext <
3050
#line 3051 "configure"
3051
#include "confdefs.h"
3052
#include <$ac_hdr>
3053
EOF
3054
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3055
{ (eval echo configure:3056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3056
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3057
if test -z "$ac_err"; then
3058
  rm -rf conftest*
3059
  eval "ac_cv_header_$ac_safe=yes"
3060
else
3061
  echo "$ac_err" >&5
3062
  echo "configure: failed program was:" >&5
3063
  cat conftest.$ac_ext >&5
3064
  rm -rf conftest*
3065
  eval "ac_cv_header_$ac_safe=no"
3066
fi
3067
rm -f conftest*
3068
fi
3069
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3070
  echo "$ac_t""yes" 1>&6
3071
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3072
  cat >> confdefs.h <
3073
#define $ac_tr_hdr 1
3074
EOF
3075
 
3076
else
3077
  echo "$ac_t""no" 1>&6
3078
fi
3079
done
3080
 
3081
for ac_hdr in dlfcn.h errno.h sys/stat.h
3082
do
3083
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3084
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3085
echo "configure:3086: checking for $ac_hdr" >&5
3086
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3087
  echo $ac_n "(cached) $ac_c" 1>&6
3088
else
3089
  cat > conftest.$ac_ext <
3090
#line 3091 "configure"
3091
#include "confdefs.h"
3092
#include <$ac_hdr>
3093
EOF
3094
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3095
{ (eval echo configure:3096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3096
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3097
if test -z "$ac_err"; then
3098
  rm -rf conftest*
3099
  eval "ac_cv_header_$ac_safe=yes"
3100
else
3101
  echo "$ac_err" >&5
3102
  echo "configure: failed program was:" >&5
3103
  cat conftest.$ac_ext >&5
3104
  rm -rf conftest*
3105
  eval "ac_cv_header_$ac_safe=no"
3106
fi
3107
rm -f conftest*
3108
fi
3109
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3110
  echo "$ac_t""yes" 1>&6
3111
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3112
  cat >> confdefs.h <
3113
#define $ac_tr_hdr 1
3114
EOF
3115
 
3116
else
3117
  echo "$ac_t""no" 1>&6
3118
fi
3119
done
3120
 
3121
for ac_func in getrusage time sigaction __setfpucw
3122
do
3123
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3124
echo "configure:3125: checking for $ac_func" >&5
3125
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3126
  echo $ac_n "(cached) $ac_c" 1>&6
3127
else
3128
  cat > conftest.$ac_ext <
3129
#line 3130 "configure"
3130
#include "confdefs.h"
3131
/* System header to define __stub macros and hopefully few prototypes,
3132
    which can conflict with char $ac_func(); below.  */
3133
#include 
3134
/* Override any gcc2 internal prototype to avoid an error.  */
3135
/* We use char because int might match the return type of a gcc2
3136
    builtin and then its argument prototype would still apply.  */
3137
char $ac_func();
3138
 
3139
int main() {
3140
 
3141
/* The GNU C library defines this for functions which it implements
3142
    to always fail with ENOSYS.  Some functions are actually named
3143
    something starting with __ and the normal name is an alias.  */
3144
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3145
choke me
3146
#else
3147
$ac_func();
3148
#endif
3149
 
3150
; return 0; }
3151
EOF
3152
if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3153
  rm -rf conftest*
3154
  eval "ac_cv_func_$ac_func=yes"
3155
else
3156
  echo "configure: failed program was:" >&5
3157
  cat conftest.$ac_ext >&5
3158
  rm -rf conftest*
3159
  eval "ac_cv_func_$ac_func=no"
3160
fi
3161
rm -f conftest*
3162
fi
3163
 
3164
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3165
  echo "$ac_t""yes" 1>&6
3166
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3167
  cat >> confdefs.h <
3168
#define $ac_tr_func 1
3169
EOF
3170
 
3171
else
3172
  echo "$ac_t""no" 1>&6
3173
fi
3174
done
3175
 
3176
 
3177
# Check for socket libraries
3178
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
3179
echo "configure:3180: checking for bind in -lsocket" >&5
3180
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
3181
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3182
  echo $ac_n "(cached) $ac_c" 1>&6
3183
else
3184
  ac_save_LIBS="$LIBS"
3185
LIBS="-lsocket  $LIBS"
3186
cat > conftest.$ac_ext <
3187
#line 3188 "configure"
3188
#include "confdefs.h"
3189
/* Override any gcc2 internal prototype to avoid an error.  */
3190
/* We use char because int might match the return type of a gcc2
3191
    builtin and then its argument prototype would still apply.  */
3192
char bind();
3193
 
3194
int main() {
3195
bind()
3196
; return 0; }
3197
EOF
3198
if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3199
  rm -rf conftest*
3200
  eval "ac_cv_lib_$ac_lib_var=yes"
3201
else
3202
  echo "configure: failed program was:" >&5
3203
  cat conftest.$ac_ext >&5
3204
  rm -rf conftest*
3205
  eval "ac_cv_lib_$ac_lib_var=no"
3206
fi
3207
rm -f conftest*
3208
LIBS="$ac_save_LIBS"
3209
 
3210
fi
3211
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3212
  echo "$ac_t""yes" 1>&6
3213
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3214
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3215
  cat >> confdefs.h <
3216
#define $ac_tr_lib 1
3217
EOF
3218
 
3219
  LIBS="-lsocket $LIBS"
3220
 
3221
else
3222
  echo "$ac_t""no" 1>&6
3223
fi
3224
 
3225
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3226
echo "configure:3227: checking for gethostbyname in -lnsl" >&5
3227
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3228
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3229
  echo $ac_n "(cached) $ac_c" 1>&6
3230
else
3231
  ac_save_LIBS="$LIBS"
3232
LIBS="-lnsl  $LIBS"
3233
cat > conftest.$ac_ext <
3234
#line 3235 "configure"
3235
#include "confdefs.h"
3236
/* Override any gcc2 internal prototype to avoid an error.  */
3237
/* We use char because int might match the return type of a gcc2
3238
    builtin and then its argument prototype would still apply.  */
3239
char gethostbyname();
3240
 
3241
int main() {
3242
gethostbyname()
3243
; return 0; }
3244
EOF
3245
if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3246
  rm -rf conftest*
3247
  eval "ac_cv_lib_$ac_lib_var=yes"
3248
else
3249
  echo "configure: failed program was:" >&5
3250
  cat conftest.$ac_ext >&5
3251
  rm -rf conftest*
3252
  eval "ac_cv_lib_$ac_lib_var=no"
3253
fi
3254
rm -f conftest*
3255
LIBS="$ac_save_LIBS"
3256
 
3257
fi
3258
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3259
  echo "$ac_t""yes" 1>&6
3260
    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3261
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3262
  cat >> confdefs.h <
3263
#define $ac_tr_lib 1
3264
EOF
3265
 
3266
  LIBS="-lnsl $LIBS"
3267
 
3268
else
3269
  echo "$ac_t""no" 1>&6
3270
fi
3271
 
3272
 
3273
. ${srcdir}/../../bfd/configure.host
3274
 
3275
 
3276
 
3277
USE_MAINTAINER_MODE=no
3278
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3279
if test "${enable_maintainer_mode+set}" = set; then
3280
  enableval="$enable_maintainer_mode"
3281
  case "${enableval}" in
3282
  yes)  MAINT="" USE_MAINTAINER_MODE=yes ;;
3283
  no)   MAINT="#" ;;
3284
  *)    { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
3285
esac
3286
if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
3287
  echo "Setting maintainer mode" 6>&1
3288
fi
3289
else
3290
  MAINT="#"
3291
fi
3292
 
3293
 
3294
 
3295
# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
3296
if test "${enable_sim_bswap+set}" = set; then
3297
  enableval="$enable_sim_bswap"
3298
  case "${enableval}" in
3299
  yes)  sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
3300
  no)   sim_bswap="-DWITH_BSWAP=0";;
3301
  *)    { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
3302
esac
3303
if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
3304
  echo "Setting bswap flags = $sim_bswap" 6>&1
3305
fi
3306
else
3307
  sim_bswap=""
3308
fi
3309
 
3310
 
3311
 
3312
# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
3313
if test "${enable_sim_cflags+set}" = set; then
3314
  enableval="$enable_sim_cflags"
3315
  case "${enableval}" in
3316
  yes)   sim_cflags="-O2 -fomit-frame-pointer";;
3317
  trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3318
  no)    sim_cflags="";;
3319
  *)     sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3320
esac
3321
if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3322
  echo "Setting sim cflags = $sim_cflags" 6>&1
3323
fi
3324
else
3325
  sim_cflags=""
3326
fi
3327
 
3328
 
3329
 
3330
# Check whether --enable-sim-debug or --disable-sim-debug was given.
3331
if test "${enable_sim_debug+set}" = set; then
3332
  enableval="$enable_sim_debug"
3333
  case "${enableval}" in
3334
  yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3335
  no)  sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3336
  *)   sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
3337
esac
3338
if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3339
  echo "Setting sim debug = $sim_debug" 6>&1
3340
fi
3341
else
3342
  sim_debug=""
3343
fi
3344
 
3345
 
3346
 
3347
# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3348
if test "${enable_sim_stdio+set}" = set; then
3349
  enableval="$enable_sim_stdio"
3350
  case "${enableval}" in
3351
  yes)  sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3352
  no)   sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3353
  *)    { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3354
esac
3355
if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3356
  echo "Setting stdio flags = $sim_stdio" 6>&1
3357
fi
3358
else
3359
  sim_stdio=""
3360
fi
3361
 
3362
 
3363
 
3364
# Check whether --enable-sim-trace or --disable-sim-trace was given.
3365
if test "${enable_sim_trace+set}" = set; then
3366
  enableval="$enable_sim_trace"
3367
  case "${enableval}" in
3368
  yes)  sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
3369
  no)   sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
3370
  [-0-9]*)
3371
        sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3372
  [a-z]*)
3373
        sim_trace=""
3374
        for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3375
          if test x"$sim_trace" = x; then
3376
            sim_trace="-DWITH_TRACE='(TRACE_$x"
3377
          else
3378
            sim_trace="${sim_trace}|TRACE_$x"
3379
          fi
3380
        done
3381
        sim_trace="$sim_trace)'" ;;
3382
esac
3383
if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3384
  echo "Setting sim trace = $sim_trace" 6>&1
3385
fi
3386
else
3387
  sim_trace=""
3388
fi
3389
 
3390
 
3391
 
3392
# Check whether --enable-sim-profile or --disable-sim-profile was given.
3393
if test "${enable_sim_profile+set}" = set; then
3394
  enableval="$enable_sim_profile"
3395
  case "${enableval}" in
3396
  yes)  sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3397
  no)   sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3398
  [-0-9]*)
3399
        sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3400
  [a-z]*)
3401
        sim_profile=""
3402
        for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3403
          if test x"$sim_profile" = x; then
3404
            sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3405
          else
3406
            sim_profile="${sim_profile}|PROFILE_$x"
3407
          fi
3408
        done
3409
        sim_profile="$sim_profile)'" ;;
3410
esac
3411
if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3412
  echo "Setting sim profile = $sim_profile" 6>&1
3413
fi
3414
else
3415
  sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
3416
fi
3417
 
3418
 
3419
 
3420
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3421
echo "configure:3422: checking return type of signal handlers" >&5
3422
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3423
  echo $ac_n "(cached) $ac_c" 1>&6
3424
else
3425
  cat > conftest.$ac_ext <
3426
#line 3427 "configure"
3427
#include "confdefs.h"
3428
#include 
3429
#include 
3430
#ifdef signal
3431
#undef signal
3432
#endif
3433
#ifdef __cplusplus
3434
extern "C" void (*signal (int, void (*)(int)))(int);
3435
#else
3436
void (*signal ()) ();
3437
#endif
3438
 
3439
int main() {
3440
int i;
3441
; return 0; }
3442
EOF
3443
if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3444
  rm -rf conftest*
3445
  ac_cv_type_signal=void
3446
else
3447
  echo "configure: failed program was:" >&5
3448
  cat conftest.$ac_ext >&5
3449
  rm -rf conftest*
3450
  ac_cv_type_signal=int
3451
fi
3452
rm -f conftest*
3453
fi
3454
 
3455
echo "$ac_t""$ac_cv_type_signal" 1>&6
3456
cat >> confdefs.h <
3457
#define RETSIGTYPE $ac_cv_type_signal
3458
EOF
3459
 
3460
 
3461
 
3462
 
3463
 
3464
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3465
echo "configure:3466: checking for executable suffix" >&5
3466
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
3467
  echo $ac_n "(cached) $ac_c" 1>&6
3468
else
3469
  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
3470
  ac_cv_exeext=.exe
3471
else
3472
  rm -f conftest*
3473
  echo 'int main () { return 0; }' > conftest.$ac_ext
3474
  ac_cv_exeext=
3475
  if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3476
    for file in conftest.*; do
3477
      case $file in
3478
      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
3479
      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3480
      esac
3481
    done
3482
  else
3483
    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3484
  fi
3485
  rm -f conftest*
3486
  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3487
fi
3488
fi
3489
 
3490
EXEEXT=""
3491
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3492
echo "$ac_t""${ac_cv_exeext}" 1>&6
3493
ac_exeext=$EXEEXT
3494
 
3495
 
3496
sim_link_files=
3497
sim_link_links=
3498
 
3499
sim_link_links=tconfig.h
3500
if test -f ${srcdir}/tconfig.in
3501
then
3502
  sim_link_files=tconfig.in
3503
else
3504
  sim_link_files=../common/tconfig.in
3505
fi
3506
 
3507
# targ-vals.def points to the libc macro description file.
3508
case "${target}" in
3509
*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
3510
esac
3511
sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3512
sim_link_links="${sim_link_links} targ-vals.def"
3513
 
3514
 
3515
 
3516
 
3517
wire_endian="LITTLE_ENDIAN"
3518
default_endian=""
3519
# Check whether --enable-sim-endian or --disable-sim-endian was given.
3520
if test "${enable_sim_endian+set}" = set; then
3521
  enableval="$enable_sim_endian"
3522
  case "${enableval}" in
3523
  b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3524
  l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3525
  yes)   if test x"$wire_endian" != x; then
3526
           sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3527
         else
3528
           if test x"$default_endian" != x; then
3529
             sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3530
           else
3531
             echo "No hard-wired endian for target $target" 1>&6
3532
             sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3533
           fi
3534
         fi;;
3535
  no)    if test x"$default_endian" != x; then
3536
           sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3537
         else
3538
           if test x"$wire_endian" != x; then
3539
             sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3540
           else
3541
             echo "No default endian for target $target" 1>&6
3542
             sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3543
           fi
3544
         fi;;
3545
  *)     { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3546
esac
3547
if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3548
  echo "Setting endian flags = $sim_endian" 6>&1
3549
fi
3550
else
3551
  if test x"$default_endian" != x; then
3552
  sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3553
else
3554
  if test x"$wire_endian" != x; then
3555
    sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3556
  else
3557
    sim_endian=
3558
  fi
3559
fi
3560
fi
3561
 
3562
wire_alignment="NONSTRICT_ALIGNMENT"
3563
default_alignment=""
3564
 
3565
# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
3566
if test "${enable_sim_alignment+set}" = set; then
3567
  enableval="$enable_sim_alignment"
3568
  case "${enableval}" in
3569
  strict | STRICT)       sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
3570
  nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
3571
  forced | FORCED)       sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
3572
  yes) if test x"$wire_alignment" != x; then
3573
         sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3574
       else
3575
         if test x"$default_alignment" != x; then
3576
           sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
3577
         else
3578
           echo "No hard-wired alignment for target $target" 1>&6
3579
           sim_alignment="-DWITH_ALIGNMENT=0"
3580
         fi
3581
       fi;;
3582
  no)  if test x"$default_alignment" != x; then
3583
         sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3584
       else
3585
         if test x"$wire_alignment" != x; then
3586
           sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
3587
         else
3588
           echo "No default alignment for target $target" 1>&6
3589
           sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
3590
         fi
3591
       fi;;
3592
  *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
3593
esac
3594
if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
3595
  echo "Setting alignment flags = $sim_alignment" 6>&1
3596
fi
3597
else
3598
  if test x"$default_alignment" != x; then
3599
  sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3600
else
3601
  if test x"$wire_alignment" != x; then
3602
    sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3603
  else
3604
    sim_alignment=
3605
  fi
3606
fi
3607
fi
3608
 
3609
 
3610
# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3611
if test "${enable_sim_hostendian+set}" = set; then
3612
  enableval="$enable_sim_hostendian"
3613
  case "${enableval}" in
3614
  no)    sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3615
  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3616
  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3617
  *)     { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3618
esac
3619
if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3620
  echo "Setting hostendian flags = $sim_hostendian" 6>&1
3621
fi
3622
else
3623
 
3624
if test "x$cross_compiling" = "xno"; then
3625
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3626
echo "configure:3627: checking whether byte ordering is bigendian" >&5
3627
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3628
  echo $ac_n "(cached) $ac_c" 1>&6
3629
else
3630
  ac_cv_c_bigendian=unknown
3631
# See if sys/param.h defines the BYTE_ORDER macro.
3632
cat > conftest.$ac_ext <
3633
#line 3634 "configure"
3634
#include "confdefs.h"
3635
#include 
3636
#include 
3637
int main() {
3638
 
3639
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3640
 bogus endian macros
3641
#endif
3642
; return 0; }
3643
EOF
3644
if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3645
  rm -rf conftest*
3646
  # It does; now see whether it defined to BIG_ENDIAN or not.
3647
cat > conftest.$ac_ext <
3648
#line 3649 "configure"
3649
#include "confdefs.h"
3650
#include 
3651
#include 
3652
int main() {
3653
 
3654
#if BYTE_ORDER != BIG_ENDIAN
3655
 not big endian
3656
#endif
3657
; return 0; }
3658
EOF
3659
if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3660
  rm -rf conftest*
3661
  ac_cv_c_bigendian=yes
3662
else
3663
  echo "configure: failed program was:" >&5
3664
  cat conftest.$ac_ext >&5
3665
  rm -rf conftest*
3666
  ac_cv_c_bigendian=no
3667
fi
3668
rm -f conftest*
3669
else
3670
  echo "configure: failed program was:" >&5
3671
  cat conftest.$ac_ext >&5
3672
fi
3673
rm -f conftest*
3674
if test $ac_cv_c_bigendian = unknown; then
3675
if test "$cross_compiling" = yes; then
3676
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3677
else
3678
  cat > conftest.$ac_ext <
3679
#line 3680 "configure"
3680
#include "confdefs.h"
3681
main () {
3682
  /* Are we little or big endian?  From Harbison&Steele.  */
3683
  union
3684
  {
3685
    long l;
3686
    char c[sizeof (long)];
3687
  } u;
3688
  u.l = 1;
3689
  exit (u.c[sizeof (long) - 1] == 1);
3690
}
3691
EOF
3692
if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3693
then
3694
  ac_cv_c_bigendian=no
3695
else
3696
  echo "configure: failed program was:" >&5
3697
  cat conftest.$ac_ext >&5
3698
  rm -fr conftest*
3699
  ac_cv_c_bigendian=yes
3700
fi
3701
rm -fr conftest*
3702
fi
3703
 
3704
fi
3705
fi
3706
 
3707
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3708
if test $ac_cv_c_bigendian = yes; then
3709
  cat >> confdefs.h <<\EOF
3710
#define WORDS_BIGENDIAN 1
3711
EOF
3712
 
3713
fi
3714
 
3715
  if test $ac_cv_c_bigendian = yes; then
3716
    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3717
  else
3718
    sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3719
  fi
3720
else
3721
  sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3722
fi
3723
fi
3724
 
3725
 
3726
# NOTE: Don't add -Wall or -Wunused, they both include
3727
# -Wunused-parameter which reports bogus warnings.
3728
# NOTE: If you add to this list, remember to update
3729
# gdb/doc/gdbint.texinfo.
3730
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
3731
-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
3732
# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
3733
# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
3734
# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
3735
# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
3736
# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
3737
# -Woverloaded-virtual -Winline -Werror"
3738
# Check whether --enable-build-warnings or --disable-build-warnings was given.
3739
if test "${enable_build_warnings+set}" = set; then
3740
  enableval="$enable_build_warnings"
3741
  case "${enableval}" in
3742
  yes)  ;;
3743
  no)   build_warnings="-w";;
3744
  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3745
        build_warnings="${build_warnings} ${t}";;
3746
  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3747
        build_warnings="${t} ${build_warnings}";;
3748
  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3749
esac
3750
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
3751
  echo "Setting compiler warning flags = $build_warnings" 6>&1
3752
fi
3753
fi
3754
# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
3755
if test "${enable_sim_build_warnings+set}" = set; then
3756
  enableval="$enable_sim_build_warnings"
3757
  case "${enableval}" in
3758
  yes)  ;;
3759
  no)   build_warnings="-w";;
3760
  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3761
        build_warnings="${build_warnings} ${t}";;
3762
  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3763
        build_warnings="${t} ${build_warnings}";;
3764
  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3765
esac
3766
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
3767
  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
3768
fi
3769
fi
3770
WARN_CFLAGS=""
3771
WERROR_CFLAGS=""
3772
if test "x${build_warnings}" != x -a "x$GCC" = xyes
3773
then
3774
    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
3775
echo "configure:3776: checking compiler warning flags" >&5
3776
    # Separate out the -Werror flag as some files just cannot be
3777
    # compiled with it enabled.
3778
    for w in ${build_warnings}; do
3779
        case $w in
3780
        -Werr*) WERROR_CFLAGS=-Werror ;;
3781
        *) # Check that GCC accepts it
3782
            saved_CFLAGS="$CFLAGS"
3783
            CFLAGS="$CFLAGS $w"
3784
            cat > conftest.$ac_ext <
3785
#line 3786 "configure"
3786
#include "confdefs.h"
3787
 
3788
int main() {
3789
 
3790
; return 0; }
3791
EOF
3792
if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3793
  rm -rf conftest*
3794
  WARN_CFLAGS="${WARN_CFLAGS} $w"
3795
else
3796
  echo "configure: failed program was:" >&5
3797
  cat conftest.$ac_ext >&5
3798
fi
3799
rm -f conftest*
3800
            CFLAGS="$saved_CFLAGS"
3801
        esac
3802
    done
3803
    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
3804
fi
3805
 
3806
 
3807
default_sim_reserved_bits="1"
3808
# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
3809
if test "${enable_sim_reserved_bits+set}" = set; then
3810
  enableval="$enable_sim_reserved_bits"
3811
  case "${enableval}" in
3812
  yes)  sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
3813
  no)   sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
3814
  *)    { echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
3815
esac
3816
if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
3817
  echo "Setting reserved flags = $sim_reserved_bits" 6>&1
3818
fi
3819
else
3820
  sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
3821
fi
3822
 
3823
wire_word_bitsize="32"
3824
wire_word_msb="31"
3825
wire_address_bitsize=""
3826
wire_cell_bitsize=""
3827
# Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
3828
if test "${enable_sim_bitsize+set}" = set; then
3829
  enableval="$enable_sim_bitsize"
3830
  sim_bitsize=
3831
case "${enableval}" in
3832
  64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
3833
  32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
3834
  64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3835
  32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
3836
  32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3837
        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
3838
      else
3839
        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
3840
      fi ;;
3841
  64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
3842
        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
3843
      else
3844
        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
3845
      fi ;;
3846
  *)  { echo "configure: error: "--enable-sim-bitsize was given $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
3847
esac
3848
# address bitsize
3849
tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
3850
case x"${tmp}" in
3851
  x ) ;;
3852
  x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
3853
  x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
3854
  * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
3855
esac
3856
# cell bitsize
3857
tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
3858
case x"${tmp}" in
3859
  x ) ;;
3860
  x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
3861
  x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
3862
  * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
3863
esac
3864
if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
3865
  echo "Setting bitsize flags = $sim_bitsize" 6>&1
3866
fi
3867
else
3868
  sim_bitsize=""
3869
if test x"$wire_word_bitsize" != x; then
3870
  sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
3871
fi
3872
if test x"$wire_word_msb" != x; then
3873
  sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
3874
fi
3875
if test x"$wire_address_bitsize" != x; then
3876
  sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
3877
fi
3878
if test x"$wire_cell_bitsize" != x; then
3879
  sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
3880
fi
3881
fi
3882
 
3883
 
3884
default_sim_inline=""
3885
# Check whether --enable-sim-inline or --disable-sim-inline was given.
3886
if test "${enable_sim_inline+set}" = set; then
3887
  enableval="$enable_sim_inline"
3888
  sim_inline=""
3889
case "$enableval" in
3890
  no)           sim_inline="-DDEFAULT_INLINE=0";;
3891
  0)            sim_inline="-DDEFAULT_INLINE=0";;
3892
  yes | 2)      sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
3893
  1)            sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
3894
  *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3895
       new_flag=""
3896
       case "$x" in
3897
         *_INLINE=*)    new_flag="-D$x";;
3898
         *=*)           new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
3899
         *_INLINE)      new_flag="-D$x=ALL_C_INLINE";;
3900
         *)             new_flag="-D$x""_INLINE=ALL_C_INLINE";;
3901
       esac
3902
       if test x"$sim_inline" = x""; then
3903
         sim_inline="$new_flag"
3904
       else
3905
         sim_inline="$sim_inline $new_flag"
3906
       fi
3907
     done;;
3908
esac
3909
if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
3910
  echo "Setting inline flags = $sim_inline" 6>&1
3911
fi
3912
else
3913
 
3914
if test "x$cross_compiling" = "xno"; then
3915
  if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
3916
    sim_inline="${default_sim_inline}"
3917
    if test x"$silent" != x"yes"; then
3918
      echo "Setting inline flags = $sim_inline" 6>&1
3919
    fi
3920
  else
3921
    sim_inline=""
3922
  fi
3923
else
3924
  sim_inline="-DDEFAULT_INLINE=0"
3925
fi
3926
fi
3927
 
3928
 
3929
if test x"yes" = x"yes"; then
3930
  sim_hw_p=yes
3931
else
3932
  sim_hw_p=no
3933
fi
3934
if test ""; then
3935
  hardware="core pal glue"
3936
else
3937
  hardware="core pal glue mn103cpu mn103int mn103tim mn103ser mn103iop"
3938
fi
3939
sim_hw_cflags="-DWITH_HW=1"
3940
sim_hw="$hardware"
3941
sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([^ ][^ ]*\)/dv-\1.o/g'`"
3942
# Check whether --enable-sim-hardware or --disable-sim-hardware was given.
3943
if test "${enable_sim_hardware+set}" = set; then
3944
  enableval="$enable_sim_hardware"
3945
 
3946
case "${enableval}" in
3947
  yes)  sim_hw_p=yes;;
3948
  no)   sim_hw_p=no;;
3949
  ,*)   sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";;
3950
  *,)   sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";;
3951
  *)    sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';;
3952
esac
3953
if test "$sim_hw_p" != yes; then
3954
  sim_hw_objs=
3955
  sim_hw_cflags="-DWITH_HW=0"
3956
  sim_hw=
3957
else
3958
  sim_hw_cflags="-DWITH_HW=1"
3959
  # remove duplicates
3960
  sim_hw=""
3961
  sim_hw_objs="\$(SIM_COMMON_HW_OBJS)"
3962
  for i in x $hardware ; do
3963
    case " $f " in
3964
      x) ;;
3965
      *" $i "*) ;;
3966
      *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";;
3967
    esac
3968
  done
3969
fi
3970
if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then
3971
  echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
3972
fi
3973
else
3974
 
3975
if test "$sim_hw_p" != yes; then
3976
  sim_hw_objs=
3977
  sim_hw_cflags="-DWITH_HW=0"
3978
  sim_hw=
3979
fi
3980
if test x"$silent" != x"yes"; then
3981
  echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs"
3982
fi
3983
fi
3984
 
3985
 
3986
for ac_func in time chmod utime fork execve execv chown
3987
do
3988
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3989
echo "configure:3990: checking for $ac_func" >&5
3990
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3991
  echo $ac_n "(cached) $ac_c" 1>&6
3992
else
3993
  cat > conftest.$ac_ext <
3994
#line 3995 "configure"
3995
#include "confdefs.h"
3996
/* System header to define __stub macros and hopefully few prototypes,
3997
    which can conflict with char $ac_func(); below.  */
3998
#include 
3999
/* Override any gcc2 internal prototype to avoid an error.  */
4000
/* We use char because int might match the return type of a gcc2
4001
    builtin and then its argument prototype would still apply.  */
4002
char $ac_func();
4003
 
4004
int main() {
4005
 
4006
/* The GNU C library defines this for functions which it implements
4007
    to always fail with ENOSYS.  Some functions are actually named
4008
    something starting with __ and the normal name is an alias.  */
4009
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4010
choke me
4011
#else
4012
$ac_func();
4013
#endif
4014
 
4015
; return 0; }
4016
EOF
4017
if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4018
  rm -rf conftest*
4019
  eval "ac_cv_func_$ac_func=yes"
4020
else
4021
  echo "configure: failed program was:" >&5
4022
  cat conftest.$ac_ext >&5
4023
  rm -rf conftest*
4024
  eval "ac_cv_func_$ac_func=no"
4025
fi
4026
rm -f conftest*
4027
fi
4028
 
4029
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4030
  echo "$ac_t""yes" 1>&6
4031
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4032
  cat >> confdefs.h <
4033
#define $ac_tr_func 1
4034
EOF
4035
 
4036
else
4037
  echo "$ac_t""no" 1>&6
4038
fi
4039
done
4040
 
4041
for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h
4042
do
4043
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4044
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4045
echo "configure:4046: checking for $ac_hdr" >&5
4046
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4047
  echo $ac_n "(cached) $ac_c" 1>&6
4048
else
4049
  cat > conftest.$ac_ext <
4050
#line 4051 "configure"
4051
#include "confdefs.h"
4052
#include <$ac_hdr>
4053
EOF
4054
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4055
{ (eval echo configure:4056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4056
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4057
if test -z "$ac_err"; then
4058
  rm -rf conftest*
4059
  eval "ac_cv_header_$ac_safe=yes"
4060
else
4061
  echo "$ac_err" >&5
4062
  echo "configure: failed program was:" >&5
4063
  cat conftest.$ac_ext >&5
4064
  rm -rf conftest*
4065
  eval "ac_cv_header_$ac_safe=no"
4066
fi
4067
rm -f conftest*
4068
fi
4069
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4070
  echo "$ac_t""yes" 1>&6
4071
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4072
  cat >> confdefs.h <
4073
#define $ac_tr_hdr 1
4074
EOF
4075
 
4076
else
4077
  echo "$ac_t""no" 1>&6
4078
fi
4079
done
4080
 
4081
 
4082
#
4083
# Enable common
4084
#
4085
# Check whether --enable-sim-common or --disable-sim-common was given.
4086
if test "${enable_sim_common+set}" = set; then
4087
  enableval="$enable_sim_common"
4088
  case "${enableval}" in
4089
  yes) sim_gen="-DWITH_COMMON=1"; mn10300_common="WITH";;
4090
  no)  sim_gen="-DWITH_COMMON=0"; mn10300_common="WITHOUT";;
4091
  *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-common"" 1>&2; exit 1; }; sim_gen="";;
4092
esac
4093
if test x"$silent" != x"yes" && test x"$sim_gen" != x""; then
4094
  echo "Setting sim_common = $sim_common" 6>&1
4095
fi
4096
else
4097
  sim_gen="-DWITH_COMMON=1"; mn10300_common="WITH"
4098
fi
4099
 
4100
 
4101
 
4102
 
4103
 
4104
trap '' 1 2 15
4105
cat > confcache <<\EOF
4106
# This file is a shell script that caches the results of configure
4107
# tests run on this system so they can be shared between configure
4108
# scripts and configure runs.  It is not useful on other systems.
4109
# If it contains results you don't want to keep, you may remove or edit it.
4110
#
4111
# By default, configure uses ./config.cache as the cache file,
4112
# creating it if it does not exist already.  You can give configure
4113
# the --cache-file=FILE option to use a different cache file; that is
4114
# what configure does when it calls configure scripts in
4115
# subdirectories, so they share the cache.
4116
# Giving --cache-file=/dev/null disables caching, for debugging configure.
4117
# config.status only pays attention to the cache file if you give it the
4118
# --recheck option to rerun configure.
4119
#
4120
EOF
4121
# The following way of writing the cache mishandles newlines in values,
4122
# but we know of no workaround that is simple, portable, and efficient.
4123
# So, don't put newlines in cache variables' values.
4124
# Ultrix sh set writes to stderr and can't be redirected directly,
4125
# and sets the high bit in the cache file unless we assign to the vars.
4126
(set) 2>&1 |
4127
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4128
  *ac_space=\ *)
4129
    # `set' does not quote correctly, so add quotes (double-quote substitution
4130
    # turns \\\\ into \\, and sed turns \\ into \).
4131
    sed -n \
4132
      -e "s/'/'\\\\''/g" \
4133
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4134
    ;;
4135
  *)
4136
    # `set' quotes correctly as required by POSIX, so do not add quotes.
4137
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4138
    ;;
4139
  esac >> confcache
4140
if cmp -s $cache_file confcache; then
4141
  :
4142
else
4143
  if test -w $cache_file; then
4144
    echo "updating cache $cache_file"
4145
    cat confcache > $cache_file
4146
  else
4147
    echo "not updating unwritable cache $cache_file"
4148
  fi
4149
fi
4150
rm -f confcache
4151
 
4152
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4153
 
4154
test "x$prefix" = xNONE && prefix=$ac_default_prefix
4155
# Let make expand exec_prefix.
4156
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4157
 
4158
# Any assignment to VPATH causes Sun make to only execute
4159
# the first set of double-colon rules, so remove it if not needed.
4160
# If there is a colon in the path, we need to keep it.
4161
if test "x$srcdir" = x.; then
4162
  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4163
fi
4164
 
4165
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4166
 
4167
DEFS=-DHAVE_CONFIG_H
4168
 
4169
# Without the "./", some shells look in PATH for config.status.
4170
: ${CONFIG_STATUS=./config.status}
4171
 
4172
echo creating $CONFIG_STATUS
4173
rm -f $CONFIG_STATUS
4174
cat > $CONFIG_STATUS <
4175
#! /bin/sh
4176
# Generated automatically by configure.
4177
# Run this file to recreate the current configuration.
4178
# This directory was configured as follows,
4179
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4180
#
4181
# $0 $ac_configure_args
4182
#
4183
# Compiler output produced by configure, useful for debugging
4184
# configure, is in ./config.log if it exists.
4185
 
4186
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4187
for ac_option
4188
do
4189
  case "\$ac_option" in
4190
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4191
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4192
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4193
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4194
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4195
    exit 0 ;;
4196
  -help | --help | --hel | --he | --h)
4197
    echo "\$ac_cs_usage"; exit 0 ;;
4198
  *) echo "\$ac_cs_usage"; exit 1 ;;
4199
  esac
4200
done
4201
 
4202
ac_given_srcdir=$srcdir
4203
ac_given_INSTALL="$INSTALL"
4204
 
4205
trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4206
EOF
4207
cat >> $CONFIG_STATUS <
4208
 
4209
# Protect against being on the right side of a sed subst in config.status.
4210
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4211
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4212
$ac_vpsub
4213
$extrasub
4214
s%@sim_environment@%$sim_environment%g
4215
s%@sim_alignment@%$sim_alignment%g
4216
s%@sim_assert@%$sim_assert%g
4217
s%@sim_bitsize@%$sim_bitsize%g
4218
s%@sim_endian@%$sim_endian%g
4219
s%@sim_hostendian@%$sim_hostendian%g
4220
s%@sim_float@%$sim_float%g
4221
s%@sim_scache@%$sim_scache%g
4222
s%@sim_default_model@%$sim_default_model%g
4223
s%@sim_hw_cflags@%$sim_hw_cflags%g
4224
s%@sim_hw_objs@%$sim_hw_objs%g
4225
s%@sim_hw@%$sim_hw%g
4226
s%@sim_inline@%$sim_inline%g
4227
s%@sim_packages@%$sim_packages%g
4228
s%@sim_regparm@%$sim_regparm%g
4229
s%@sim_reserved_bits@%$sim_reserved_bits%g
4230
s%@sim_smp@%$sim_smp%g
4231
s%@sim_stdcall@%$sim_stdcall%g
4232
s%@sim_xor_endian@%$sim_xor_endian%g
4233
s%@WARN_CFLAGS@%$WARN_CFLAGS%g
4234
s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
4235
s%@SHELL@%$SHELL%g
4236
s%@CFLAGS@%$CFLAGS%g
4237
s%@CPPFLAGS@%$CPPFLAGS%g
4238
s%@CXXFLAGS@%$CXXFLAGS%g
4239
s%@FFLAGS@%$FFLAGS%g
4240
s%@DEFS@%$DEFS%g
4241
s%@LDFLAGS@%$LDFLAGS%g
4242
s%@LIBS@%$LIBS%g
4243
s%@exec_prefix@%$exec_prefix%g
4244
s%@prefix@%$prefix%g
4245
s%@program_transform_name@%$program_transform_name%g
4246
s%@bindir@%$bindir%g
4247
s%@sbindir@%$sbindir%g
4248
s%@libexecdir@%$libexecdir%g
4249
s%@datadir@%$datadir%g
4250
s%@sysconfdir@%$sysconfdir%g
4251
s%@sharedstatedir@%$sharedstatedir%g
4252
s%@localstatedir@%$localstatedir%g
4253
s%@libdir@%$libdir%g
4254
s%@includedir@%$includedir%g
4255
s%@oldincludedir@%$oldincludedir%g
4256
s%@infodir@%$infodir%g
4257
s%@mandir@%$mandir%g
4258
s%@host@%$host%g
4259
s%@host_alias@%$host_alias%g
4260
s%@host_cpu@%$host_cpu%g
4261
s%@host_vendor@%$host_vendor%g
4262
s%@host_os@%$host_os%g
4263
s%@target@%$target%g
4264
s%@target_alias@%$target_alias%g
4265
s%@target_cpu@%$target_cpu%g
4266
s%@target_vendor@%$target_vendor%g
4267
s%@target_os@%$target_os%g
4268
s%@build@%$build%g
4269
s%@build_alias@%$build_alias%g
4270
s%@build_cpu@%$build_cpu%g
4271
s%@build_vendor@%$build_vendor%g
4272
s%@build_os@%$build_os%g
4273
s%@CC@%$CC%g
4274
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4275
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4276
s%@INSTALL_DATA@%$INSTALL_DATA%g
4277
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4278
s%@HDEFINES@%$HDEFINES%g
4279
s%@AR@%$AR%g
4280
s%@RANLIB@%$RANLIB%g
4281
s%@SET_MAKE@%$SET_MAKE%g
4282
s%@CPP@%$CPP%g
4283
s%@ALLOCA@%$ALLOCA%g
4284
s%@USE_NLS@%$USE_NLS%g
4285
s%@MSGFMT@%$MSGFMT%g
4286
s%@GMSGFMT@%$GMSGFMT%g
4287
s%@XGETTEXT@%$XGETTEXT%g
4288
s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4289
s%@CATALOGS@%$CATALOGS%g
4290
s%@CATOBJEXT@%$CATOBJEXT%g
4291
s%@DATADIRNAME@%$DATADIRNAME%g
4292
s%@GMOFILES@%$GMOFILES%g
4293
s%@INSTOBJEXT@%$INSTOBJEXT%g
4294
s%@INTLDEPS@%$INTLDEPS%g
4295
s%@INTLLIBS@%$INTLLIBS%g
4296
s%@INTLOBJS@%$INTLOBJS%g
4297
s%@POFILES@%$POFILES%g
4298
s%@POSUB@%$POSUB%g
4299
s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
4300
s%@GT_NO@%$GT_NO%g
4301
s%@GT_YES@%$GT_YES%g
4302
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4303
s%@l@%$l%g
4304
s%@MAINT@%$MAINT%g
4305
s%@sim_bswap@%$sim_bswap%g
4306
s%@sim_cflags@%$sim_cflags%g
4307
s%@sim_debug@%$sim_debug%g
4308
s%@sim_stdio@%$sim_stdio%g
4309
s%@sim_trace@%$sim_trace%g
4310
s%@sim_profile@%$sim_profile%g
4311
s%@EXEEXT@%$EXEEXT%g
4312
s%@sim_gen@%$sim_gen%g
4313
s%@mn10300_common@%$mn10300_common%g
4314
 
4315
CEOF
4316
EOF
4317
 
4318
cat >> $CONFIG_STATUS <<\EOF
4319
 
4320
# Split the substitutions into bite-sized pieces for seds with
4321
# small command number limits, like on Digital OSF/1 and HP-UX.
4322
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4323
ac_file=1 # Number of current file.
4324
ac_beg=1 # First line for current file.
4325
ac_end=$ac_max_sed_cmds # Line after last line for current file.
4326
ac_more_lines=:
4327
ac_sed_cmds=""
4328
while $ac_more_lines; do
4329
  if test $ac_beg -gt 1; then
4330
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4331
  else
4332
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4333
  fi
4334
  if test ! -s conftest.s$ac_file; then
4335
    ac_more_lines=false
4336
    rm -f conftest.s$ac_file
4337
  else
4338
    if test -z "$ac_sed_cmds"; then
4339
      ac_sed_cmds="sed -f conftest.s$ac_file"
4340
    else
4341
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4342
    fi
4343
    ac_file=`expr $ac_file + 1`
4344
    ac_beg=$ac_end
4345
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4346
  fi
4347
done
4348
if test -z "$ac_sed_cmds"; then
4349
  ac_sed_cmds=cat
4350
fi
4351
EOF
4352
 
4353
cat >> $CONFIG_STATUS <
4354
 
4355
CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
4356
EOF
4357
cat >> $CONFIG_STATUS <<\EOF
4358
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4359
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4360
  case "$ac_file" in
4361
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4362
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4363
  *) ac_file_in="${ac_file}.in" ;;
4364
  esac
4365
 
4366
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4367
 
4368
  # Remove last slash and all that follows it.  Not all systems have dirname.
4369
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4370
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4371
    # The file is in a subdirectory.
4372
    test ! -d "$ac_dir" && mkdir "$ac_dir"
4373
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4374
    # A "../" for each directory in $ac_dir_suffix.
4375
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4376
  else
4377
    ac_dir_suffix= ac_dots=
4378
  fi
4379
 
4380
  case "$ac_given_srcdir" in
4381
  .)  srcdir=.
4382
      if test -z "$ac_dots"; then top_srcdir=.
4383
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4384
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4385
  *) # Relative path.
4386
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4387
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4388
  esac
4389
 
4390
  case "$ac_given_INSTALL" in
4391
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
4392
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4393
  esac
4394
 
4395
  echo creating "$ac_file"
4396
  rm -f "$ac_file"
4397
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4398
  case "$ac_file" in
4399
  *Makefile*) ac_comsub="1i\\
4400
# $configure_input" ;;
4401
  *) ac_comsub= ;;
4402
  esac
4403
 
4404
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4405
  sed -e "$ac_comsub
4406
s%@configure_input@%$configure_input%g
4407
s%@srcdir@%$srcdir%g
4408
s%@top_srcdir@%$top_srcdir%g
4409
s%@INSTALL@%$INSTALL%g
4410
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4411
fi; done
4412
rm -f conftest.s*
4413
 
4414
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4415
# NAME is the cpp macro being defined and VALUE is the value it is being given.
4416
#
4417
# ac_d sets the value in "#define NAME VALUE" lines.
4418
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4419
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4420
ac_dC='\3'
4421
ac_dD='%g'
4422
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4423
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4424
ac_uB='\([      ]\)%\1#\2define\3'
4425
ac_uC=' '
4426
ac_uD='\4%g'
4427
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4428
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4429
ac_eB='$%\1#\2define\3'
4430
ac_eC=' '
4431
ac_eD='%g'
4432
 
4433
if test "${CONFIG_HEADERS+set}" != set; then
4434
EOF
4435
cat >> $CONFIG_STATUS <
4436
  CONFIG_HEADERS="config.h:config.in"
4437
EOF
4438
cat >> $CONFIG_STATUS <<\EOF
4439
fi
4440
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4441
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4442
  case "$ac_file" in
4443
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4444
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4445
  *) ac_file_in="${ac_file}.in" ;;
4446
  esac
4447
 
4448
  echo creating $ac_file
4449
 
4450
  rm -f conftest.frag conftest.in conftest.out
4451
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4452
  cat $ac_file_inputs > conftest.in
4453
 
4454
EOF
4455
 
4456
# Transform confdefs.h into a sed script conftest.vals that substitutes
4457
# the proper values into config.h.in to produce config.h.  And first:
4458
# Protect against being on the right side of a sed subst in config.status.
4459
# Protect against being in an unquoted here document in config.status.
4460
rm -f conftest.vals
4461
cat > conftest.hdr <<\EOF
4462
s/[\\&%]/\\&/g
4463
s%[\\$`]%\\&%g
4464
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4465
s%ac_d%ac_u%gp
4466
s%ac_u%ac_e%gp
4467
EOF
4468
sed -n -f conftest.hdr confdefs.h > conftest.vals
4469
rm -f conftest.hdr
4470
 
4471
# This sed command replaces #undef with comments.  This is necessary, for
4472
# example, in the case of _POSIX_SOURCE, which is predefined and required
4473
# on some systems where configure will not decide to define it.
4474
cat >> conftest.vals <<\EOF
4475
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4476
EOF
4477
 
4478
# Break up conftest.vals because some shells have a limit on
4479
# the size of here documents, and old seds have small limits too.
4480
 
4481
rm -f conftest.tail
4482
while :
4483
do
4484
  ac_lines=`grep -c . conftest.vals`
4485
  # grep -c gives empty output for an empty file on some AIX systems.
4486
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4487
  # Write a limited-size here document to conftest.frag.
4488
  echo '  cat > conftest.frag <> $CONFIG_STATUS
4489
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4490
  echo 'CEOF
4491
  sed -f conftest.frag conftest.in > conftest.out
4492
  rm -f conftest.in
4493
  mv conftest.out conftest.in
4494
' >> $CONFIG_STATUS
4495
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4496
  rm -f conftest.vals
4497
  mv conftest.tail conftest.vals
4498
done
4499
rm -f conftest.vals
4500
 
4501
cat >> $CONFIG_STATUS <<\EOF
4502
  rm -f conftest.frag conftest.h
4503
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4504
  cat conftest.in >> conftest.h
4505
  rm -f conftest.in
4506
  if cmp -s $ac_file conftest.h 2>/dev/null; then
4507
    echo "$ac_file is unchanged"
4508
    rm -f conftest.h
4509
  else
4510
    # Remove last slash and all that follows it.  Not all systems have dirname.
4511
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4512
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4513
      # The file is in a subdirectory.
4514
      test ! -d "$ac_dir" && mkdir "$ac_dir"
4515
    fi
4516
    rm -f $ac_file
4517
    mv conftest.h $ac_file
4518
  fi
4519
fi; done
4520
 
4521
EOF
4522
 
4523
cat >> $CONFIG_STATUS <
4524
ac_sources="$sim_link_files"
4525
ac_dests="$sim_link_links"
4526
EOF
4527
 
4528
cat >> $CONFIG_STATUS <<\EOF
4529
srcdir=$ac_given_srcdir
4530
while test -n "$ac_sources"; do
4531
  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4532
  set $ac_sources; ac_source=$1; shift; ac_sources=$*
4533
 
4534
  echo "linking $srcdir/$ac_source to $ac_dest"
4535
 
4536
  if test ! -r $srcdir/$ac_source; then
4537
    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4538
  fi
4539
  rm -f $ac_dest
4540
 
4541
  # Make relative symlinks.
4542
  # Remove last slash and all that follows it.  Not all systems have dirname.
4543
  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4544
  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4545
    # The dest file is in a subdirectory.
4546
    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4547
    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4548
    # A "../" for each directory in $ac_dest_dir_suffix.
4549
    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4550
  else
4551
    ac_dest_dir_suffix= ac_dots=
4552
  fi
4553
 
4554
  case "$srcdir" in
4555
  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4556
  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4557
  esac
4558
 
4559
  # Make a symlink if possible; otherwise try a hard link.
4560
  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4561
    ln $srcdir/$ac_source $ac_dest; then :
4562
  else
4563
    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4564
  fi
4565
done
4566
EOF
4567
cat >> $CONFIG_STATUS <
4568
 
4569
EOF
4570
cat >> $CONFIG_STATUS <<\EOF
4571
case "x$CONFIG_FILES" in
4572
 xMakefile*)
4573
   echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
4574
   rm -f Makesim1.tmp Makesim2.tmp Makefile
4575
   sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' Makesim1.tmp
4576
   sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' Makesim2.tmp
4577
   sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
4578
        -e '/^## COMMON_POST_/ r Makesim2.tmp' \
4579
        Makefile
4580
   rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
4581
   ;;
4582
 esac
4583
 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
4584
 
4585
exit 0
4586
EOF
4587
chmod +x $CONFIG_STATUS
4588
rm -fr confdefs* $ac_clean_files
4589
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4590
 
4591
 

powered by: WebSVN 2.1.0

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