~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Guess values for system-dependent variables and create Makefiles.
 
4
# Generated automatically using autoconf version 2.13 
 
5
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 
6
#
 
7
# This configure script is free software; the Free Software Foundation
 
8
# gives unlimited permission to copy, distribute and modify it.
 
9
 
 
10
# Defaults:
 
11
ac_help=
 
12
ac_default_prefix=/usr/local
 
13
# Any additions from configure.in:
 
14
ac_help="$ac_help
 
15
 --enable-maxpage=XXXX will compile in a page table of size XXX (eg '--enable-maxpage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each) "
 
16
ac_help="$ac_help
 
17
 --enable-holepage=XXXX will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each) "
 
18
ac_help="$ac_help
 
19
 --enable-vssize=XXXX will compile in a value stack of size XXX "
 
20
ac_help="$ac_help
 
21
 --enable-bdssize=XXXX will compile in a binding stack of size XXX "
 
22
ac_help="$ac_help
 
23
 --enable-ihssize=XXXX will compile in a invocation history stack of size XXX "
 
24
ac_help="$ac_help
 
25
 --enable-frssize=XXXX will compile in a frame stack of size XXX "
 
26
ac_help="$ac_help
 
27
 --enable-machine=XXXX will force the use of one of the definitions in h/XXXX.defs "
 
28
ac_help="$ac_help
 
29
 --enable-notify=no will disable the automatic notification of gcl maintainers of successful builds/problems "
 
30
ac_help="$ac_help
 
31
 --enable-tkconfig=XXXX will force the use of a TK_CONFIG_PREFIX=XXXXX as place to look for tkConfig.sh and tclConfig.sh  "
 
32
ac_help="$ac_help
 
33
 --enable-tclconfig=XXXX will force the use of a TCL_CONFIG_PREFIX=XXXXX as place to look for tclConfig.sh and tclConfig.sh  "
 
34
ac_help="$ac_help
 
35
 --enable-infodir=XXXX will force the use of a INFO_DIR=XXXXX as place to look for info  "
 
36
ac_help="$ac_help
 
37
 --enable-emacsdir=XXXX will manually specify the location for elisp files  "
 
38
ac_help="$ac_help
 
39
 --enable-common-binary=yes forces use of lowest common denominator instruction sets, (default is =yes) "
 
40
ac_help="$ac_help
 
41
 --enable-japi=yes will compile in support for the JAPI graphical interface if present on your system"
 
42
ac_help="$ac_help
 
43
 --enable-xdr=yes will compile in support for XDR"
 
44
ac_help="$ac_help
 
45
 --enable-dlopen uses dlopen for loading objects, which can then not be retained  in saved images 
 
46
        "
 
47
ac_help="$ac_help
 
48
 --enable-statsysbfd uses a static sytem bfd library for loading and relocationing object files 
 
49
        "
 
50
ac_help="$ac_help
 
51
 --enable-dynsysbfd uses a dynamic shared sytem bfd library for loading and relocationing object files 
 
52
        "
 
53
ac_help="$ac_help
 
54
 --enable-locbfd uses a static bfd library built from this source tree for loading and relocationing object files 
 
55
        "
 
56
ac_help="$ac_help
 
57
 --enable-custreloc uses custom gcl code if available for loading  and relocationing object files 
 
58
        "
 
59
ac_help="$ac_help
 
60
 --enable-debug builds gcl with -g in CFLAGS to enable running under gdb 
 
61
        "
 
62
ac_help="$ac_help
 
63
 --enable-gprof builds gcl with -pg in CFLAGS to enable profiling with gprof 
 
64
        "
 
65
ac_help="$ac_help
 
66
 --enable-static will link your GCL against static as opposed to shared system libraries  "
 
67
ac_help="$ac_help
 
68
 --enable-pic builds gcl with -fPIC in CFLAGS 
 
69
        "
 
70
ac_help="$ac_help
 
71
 --enable-dynsysgmp will link against the system libgmp3 overriding certain functions with patched versions from the local source 
 
72
        "
 
73
ac_help="$ac_help
 
74
  --with-x                use the X Window System"
 
75
ac_help="$ac_help
 
76
--enable-readine    enables command line completion via the readline library "
 
77
ac_help="$ac_help
 
78
--enable-ansi builds a large gcl aiming for ansi compliance, 
 
79
                    --disable-ansi builds the smaller traditional CLtL1 image"
 
80
 
 
81
# Initialize some variables set by options.
 
82
# The variables have the same names as the options, with
 
83
# dashes changed to underlines.
 
84
build=NONE
 
85
cache_file=./config.cache
 
86
exec_prefix=NONE
 
87
host=NONE
 
88
no_create=
 
89
nonopt=NONE
 
90
no_recursion=
 
91
prefix=NONE
 
92
program_prefix=NONE
 
93
program_suffix=NONE
 
94
program_transform_name=s,x,x,
 
95
silent=
 
96
site=
 
97
srcdir=
 
98
target=NONE
 
99
verbose=
 
100
x_includes=NONE
 
101
x_libraries=NONE
 
102
bindir='${exec_prefix}/bin'
 
103
sbindir='${exec_prefix}/sbin'
 
104
libexecdir='${exec_prefix}/libexec'
 
105
datadir='${prefix}/share'
 
106
sysconfdir='${prefix}/etc'
 
107
sharedstatedir='${prefix}/com'
 
108
localstatedir='${prefix}/var'
 
109
libdir='${exec_prefix}/lib'
 
110
includedir='${prefix}/include'
 
111
oldincludedir='/usr/include'
 
112
infodir='${prefix}/info'
 
113
mandir='${prefix}/man'
 
114
 
 
115
# Initialize some other variables.
 
116
subdirs=
 
117
MFLAGS= MAKEFLAGS=
 
118
SHELL=${CONFIG_SHELL-/bin/sh}
 
119
# Maximum number of lines to put in a shell here document.
 
120
ac_max_here_lines=12
 
121
 
 
122
ac_prev=
 
123
for ac_option
 
124
do
 
125
 
 
126
  # If the previous option needs an argument, assign it.
 
127
  if test -n "$ac_prev"; then
 
128
    eval "$ac_prev=\$ac_option"
 
129
    ac_prev=
 
130
    continue
 
131
  fi
 
132
 
 
133
  case "$ac_option" in
 
134
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
135
  *) ac_optarg= ;;
 
136
  esac
 
137
 
 
138
  # Accept the important Cygnus configure options, so we can diagnose typos.
 
139
 
 
140
  case "$ac_option" in
 
141
 
 
142
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
 
143
    ac_prev=bindir ;;
 
144
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
 
145
    bindir="$ac_optarg" ;;
 
146
 
 
147
  -build | --build | --buil | --bui | --bu)
 
148
    ac_prev=build ;;
 
149
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
 
150
    build="$ac_optarg" ;;
 
151
 
 
152
  -cache-file | --cache-file | --cache-fil | --cache-fi \
 
153
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
 
154
    ac_prev=cache_file ;;
 
155
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
 
156
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
 
157
    cache_file="$ac_optarg" ;;
 
158
 
 
159
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
 
160
    ac_prev=datadir ;;
 
161
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
 
162
  | --da=*)
 
163
    datadir="$ac_optarg" ;;
 
164
 
 
165
  -disable-* | --disable-*)
 
166
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
 
167
    # Reject names that are not valid shell variable names.
 
168
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
 
169
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
 
170
    fi
 
171
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
 
172
    eval "enable_${ac_feature}=no" ;;
 
173
 
 
174
  -enable-* | --enable-*)
 
175
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
 
176
    # Reject names that are not valid shell variable names.
 
177
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
 
178
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
 
179
    fi
 
180
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
 
181
    case "$ac_option" in
 
182
      *=*) ;;
 
183
      *) ac_optarg=yes ;;
 
184
    esac
 
185
    eval "enable_${ac_feature}='$ac_optarg'" ;;
 
186
 
 
187
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 
188
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
 
189
  | --exec | --exe | --ex)
 
190
    ac_prev=exec_prefix ;;
 
191
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
 
192
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
 
193
  | --exec=* | --exe=* | --ex=*)
 
194
    exec_prefix="$ac_optarg" ;;
 
195
 
 
196
  -gas | --gas | --ga | --g)
 
197
    # Obsolete; use --with-gas.
 
198
    with_gas=yes ;;
 
199
 
 
200
  -help | --help | --hel | --he)
 
201
    # Omit some internal or obsolete options to make the list less imposing.
 
202
    # This message is too long to be a string in the A/UX 3.1 sh.
 
203
    cat << EOF
 
204
Usage: configure [options] [host]
 
205
Options: [defaults in brackets after descriptions]
 
206
Configuration:
 
207
  --cache-file=FILE       cache test results in FILE
 
208
  --help                  print this message
 
209
  --no-create             do not create output files
 
210
  --quiet, --silent       do not print \`checking...' messages
 
211
  --version               print the version of autoconf that created configure
 
212
Directory and file names:
 
213
  --prefix=PREFIX         install architecture-independent files in PREFIX
 
214
                          [$ac_default_prefix]
 
215
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
 
216
                          [same as prefix]
 
217
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
 
218
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
 
219
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
 
220
  --datadir=DIR           read-only architecture-independent data in DIR
 
221
                          [PREFIX/share]
 
222
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
 
223
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
 
224
                          [PREFIX/com]
 
225
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
 
226
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
 
227
  --includedir=DIR        C header files in DIR [PREFIX/include]
 
228
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
 
229
  --infodir=DIR           info documentation in DIR [PREFIX/info]
 
230
  --mandir=DIR            man documentation in DIR [PREFIX/man]
 
231
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
 
232
  --program-prefix=PREFIX prepend PREFIX to installed program names
 
233
  --program-suffix=SUFFIX append SUFFIX to installed program names
 
234
  --program-transform-name=PROGRAM
 
235
                          run sed PROGRAM on installed program names
 
236
EOF
 
237
    cat << EOF
 
238
Host type:
 
239
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
 
240
  --host=HOST             configure for HOST [guessed]
 
241
  --target=TARGET         configure for TARGET [TARGET=HOST]
 
242
Features and packages:
 
243
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
 
244
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 
245
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
 
246
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
 
247
  --x-includes=DIR        X include files are in DIR
 
248
  --x-libraries=DIR       X library files are in DIR
 
249
EOF
 
250
    if test -n "$ac_help"; then
 
251
      echo "--enable and --with options recognized:$ac_help"
 
252
    fi
 
253
    exit 0 ;;
 
254
 
 
255
  -host | --host | --hos | --ho)
 
256
    ac_prev=host ;;
 
257
  -host=* | --host=* | --hos=* | --ho=*)
 
258
    host="$ac_optarg" ;;
 
259
 
 
260
  -includedir | --includedir | --includedi | --included | --include \
 
261
  | --includ | --inclu | --incl | --inc)
 
262
    ac_prev=includedir ;;
 
263
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
 
264
  | --includ=* | --inclu=* | --incl=* | --inc=*)
 
265
    includedir="$ac_optarg" ;;
 
266
 
 
267
  -infodir | --infodir | --infodi | --infod | --info | --inf)
 
268
    ac_prev=infodir ;;
 
269
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
 
270
    infodir="$ac_optarg" ;;
 
271
 
 
272
  -libdir | --libdir | --libdi | --libd)
 
273
    ac_prev=libdir ;;
 
274
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
 
275
    libdir="$ac_optarg" ;;
 
276
 
 
277
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
 
278
  | --libexe | --libex | --libe)
 
279
    ac_prev=libexecdir ;;
 
280
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
 
281
  | --libexe=* | --libex=* | --libe=*)
 
282
    libexecdir="$ac_optarg" ;;
 
283
 
 
284
  -localstatedir | --localstatedir | --localstatedi | --localstated \
 
285
  | --localstate | --localstat | --localsta | --localst \
 
286
  | --locals | --local | --loca | --loc | --lo)
 
287
    ac_prev=localstatedir ;;
 
288
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
 
289
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
 
290
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
 
291
    localstatedir="$ac_optarg" ;;
 
292
 
 
293
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
 
294
    ac_prev=mandir ;;
 
295
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
 
296
    mandir="$ac_optarg" ;;
 
297
 
 
298
  -nfp | --nfp | --nf)
 
299
    # Obsolete; use --without-fp.
 
300
    with_fp=no ;;
 
301
 
 
302
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
303
  | --no-cr | --no-c)
 
304
    no_create=yes ;;
 
305
 
 
306
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
307
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
 
308
    no_recursion=yes ;;
 
309
 
 
310
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
 
311
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
 
312
  | --oldin | --oldi | --old | --ol | --o)
 
313
    ac_prev=oldincludedir ;;
 
314
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
 
315
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
 
316
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
 
317
    oldincludedir="$ac_optarg" ;;
 
318
 
 
319
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
 
320
    ac_prev=prefix ;;
 
321
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
 
322
    prefix="$ac_optarg" ;;
 
323
 
 
324
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
 
325
  | --program-pre | --program-pr | --program-p)
 
326
    ac_prev=program_prefix ;;
 
327
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
 
328
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
 
329
    program_prefix="$ac_optarg" ;;
 
330
 
 
331
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
 
332
  | --program-suf | --program-su | --program-s)
 
333
    ac_prev=program_suffix ;;
 
334
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
 
335
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
 
336
    program_suffix="$ac_optarg" ;;
 
337
 
 
338
  -program-transform-name | --program-transform-name \
 
339
  | --program-transform-nam | --program-transform-na \
 
340
  | --program-transform-n | --program-transform- \
 
341
  | --program-transform | --program-transfor \
 
342
  | --program-transfo | --program-transf \
 
343
  | --program-trans | --program-tran \
 
344
  | --progr-tra | --program-tr | --program-t)
 
345
    ac_prev=program_transform_name ;;
 
346
  -program-transform-name=* | --program-transform-name=* \
 
347
  | --program-transform-nam=* | --program-transform-na=* \
 
348
  | --program-transform-n=* | --program-transform-=* \
 
349
  | --program-transform=* | --program-transfor=* \
 
350
  | --program-transfo=* | --program-transf=* \
 
351
  | --program-trans=* | --program-tran=* \
 
352
  | --progr-tra=* | --program-tr=* | --program-t=*)
 
353
    program_transform_name="$ac_optarg" ;;
 
354
 
 
355
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
356
  | -silent | --silent | --silen | --sile | --sil)
 
357
    silent=yes ;;
 
358
 
 
359
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
 
360
    ac_prev=sbindir ;;
 
361
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
 
362
  | --sbi=* | --sb=*)
 
363
    sbindir="$ac_optarg" ;;
 
364
 
 
365
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
 
366
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
 
367
  | --sharedst | --shareds | --shared | --share | --shar \
 
368
  | --sha | --sh)
 
369
    ac_prev=sharedstatedir ;;
 
370
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
 
371
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
 
372
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
 
373
  | --sha=* | --sh=*)
 
374
    sharedstatedir="$ac_optarg" ;;
 
375
 
 
376
  -site | --site | --sit)
 
377
    ac_prev=site ;;
 
378
  -site=* | --site=* | --sit=*)
 
379
    site="$ac_optarg" ;;
 
380
 
 
381
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
 
382
    ac_prev=srcdir ;;
 
383
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
 
384
    srcdir="$ac_optarg" ;;
 
385
 
 
386
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
 
387
  | --syscon | --sysco | --sysc | --sys | --sy)
 
388
    ac_prev=sysconfdir ;;
 
389
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
 
390
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
 
391
    sysconfdir="$ac_optarg" ;;
 
392
 
 
393
  -target | --target | --targe | --targ | --tar | --ta | --t)
 
394
    ac_prev=target ;;
 
395
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
 
396
    target="$ac_optarg" ;;
 
397
 
 
398
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
 
399
    verbose=yes ;;
 
400
 
 
401
  -version | --version | --versio | --versi | --vers)
 
402
    echo "configure generated by autoconf version 2.13"
 
403
    exit 0 ;;
 
404
 
 
405
  -with-* | --with-*)
 
406
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
 
407
    # Reject names that are not valid shell variable names.
 
408
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
 
409
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
 
410
    fi
 
411
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
412
    case "$ac_option" in
 
413
      *=*) ;;
 
414
      *) ac_optarg=yes ;;
 
415
    esac
 
416
    eval "with_${ac_package}='$ac_optarg'" ;;
 
417
 
 
418
  -without-* | --without-*)
 
419
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
 
420
    # Reject names that are not valid shell variable names.
 
421
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
 
422
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
 
423
    fi
 
424
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
425
    eval "with_${ac_package}=no" ;;
 
426
 
 
427
  --x)
 
428
    # Obsolete; use --with-x.
 
429
    with_x=yes ;;
 
430
 
 
431
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
 
432
  | --x-incl | --x-inc | --x-in | --x-i)
 
433
    ac_prev=x_includes ;;
 
434
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
 
435
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
 
436
    x_includes="$ac_optarg" ;;
 
437
 
 
438
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
 
439
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
 
440
    ac_prev=x_libraries ;;
 
441
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
 
442
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
 
443
    x_libraries="$ac_optarg" ;;
 
444
 
 
445
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
 
446
    ;;
 
447
 
 
448
  *)
 
449
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
 
450
      echo "configure: warning: $ac_option: invalid host type" 1>&2
 
451
    fi
 
452
    if test "x$nonopt" != xNONE; then
 
453
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
 
454
    fi
 
455
    nonopt="$ac_option"
 
456
    ;;
 
457
 
 
458
  esac
 
459
done
 
460
 
 
461
if test -n "$ac_prev"; then
 
462
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
 
463
fi
 
464
 
 
465
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
466
 
 
467
# File descriptor usage:
 
468
# 0 standard input
 
469
# 1 file creation
 
470
# 2 errors and warnings
 
471
# 3 some systems may open it to /dev/tty
 
472
# 4 used on the Kubota Titan
 
473
# 6 checking for... messages and results
 
474
# 5 compiler messages saved in config.log
 
475
if test "$silent" = yes; then
 
476
  exec 6>/dev/null
 
477
else
 
478
  exec 6>&1
 
479
fi
 
480
exec 5>./config.log
 
481
 
 
482
echo "\
 
483
This file contains any messages produced by compilers while
 
484
running configure, to aid debugging if configure makes a mistake.
 
485
" 1>&5
 
486
 
 
487
# Strip out --no-create and --no-recursion so they do not pile up.
 
488
# Also quote any args containing shell metacharacters.
 
489
ac_configure_args=
 
490
for ac_arg
 
491
do
 
492
  case "$ac_arg" in
 
493
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
494
  | --no-cr | --no-c) ;;
 
495
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
496
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
 
497
  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
 
498
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
 
499
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
 
500
  esac
 
501
done
 
502
 
 
503
# NLS nuisances.
 
504
# Only set these to C if already set.  These must not be set unconditionally
 
505
# because not all systems understand e.g. LANG=C (notably SCO).
 
506
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
 
507
# Non-C LC_CTYPE values break the ctype check.
 
508
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
 
509
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 
510
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 
511
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
512
 
 
513
# confdefs.h avoids OS command line length limits that DEFS can exceed.
 
514
rm -rf conftest* confdefs.h
 
515
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
 
516
echo > confdefs.h
 
517
 
 
518
# A filename unique to this package, relative to the directory that
 
519
# configure is in, which we can look for to find out if srcdir is correct.
 
520
ac_unique_file=
 
521
 
 
522
# Find the source files, if location was not specified.
 
523
if test -z "$srcdir"; then
 
524
  ac_srcdir_defaulted=yes
 
525
  # Try the directory containing this script, then its parent.
 
526
  ac_prog=$0
 
527
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
 
528
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
 
529
  srcdir=$ac_confdir
 
530
  if test ! -r $srcdir/$ac_unique_file; then
 
531
    srcdir=..
 
532
  fi
 
533
else
 
534
  ac_srcdir_defaulted=no
 
535
fi
 
536
if test ! -r $srcdir/$ac_unique_file; then
 
537
  if test "$ac_srcdir_defaulted" = yes; then
 
538
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
 
539
  else
 
540
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
 
541
  fi
 
542
fi
 
543
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
544
 
 
545
# Prefer explicitly selected file to automatically selected ones.
 
546
if test -z "$CONFIG_SITE"; then
 
547
  if test "x$prefix" != xNONE; then
 
548
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
 
549
  else
 
550
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 
551
  fi
 
552
fi
 
553
for ac_site_file in $CONFIG_SITE; do
 
554
  if test -r "$ac_site_file"; then
 
555
    echo "loading site script $ac_site_file"
 
556
    . "$ac_site_file"
 
557
  fi
 
558
done
 
559
 
 
560
if test -r "$cache_file"; then
 
561
  echo "loading cache $cache_file"
 
562
  . $cache_file
 
563
else
 
564
  echo "creating cache $cache_file"
 
565
  > $cache_file
 
566
fi
 
567
 
 
568
ac_ext=c
 
569
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
570
ac_cpp='$CPP $CPPFLAGS'
 
571
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
572
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
573
cross_compiling=$ac_cv_prog_cc_cross
 
574
 
 
575
ac_exeext=
 
576
ac_objext=o
 
577
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
 
578
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
 
579
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
 
580
    ac_n= ac_c='
 
581
' ac_t='        '
 
582
  else
 
583
    ac_n=-n ac_c= ac_t=
 
584
  fi
 
585
else
 
586
  ac_n= ac_c='\c' ac_t=
 
587
fi
 
588
 
 
589
 
 
590
 
 
591
 
 
592
VERSION=`cat majvers`.`cat minvers`
 
593
 
 
594
 
 
595
# some parts of this configure script are taken from the tcl configure.in
 
596
 
 
597
#
 
598
# Arguments
 
599
#
 
600
 
 
601
help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})"
 
602
# Check whether --enable-maxpage or --disable-maxpage was given.
 
603
if test "${enable_maxpage+set}" = set; then
 
604
  enableval="$enable_maxpage"
 
605
  cat >> confdefs.h <<EOF
 
606
#define MAXPAGE $enable_maxpage
 
607
EOF
 
608
 
 
609
fi
 
610
 
 
611
 
 
612
# Check whether --enable-holepage or --disable-holepage was given.
 
613
if test "${enable_holepage+set}" = set; then
 
614
  enableval="$enable_holepage"
 
615
  cat >> confdefs.h <<EOF
 
616
#define HOLEPAGE $enable_holepage
 
617
EOF
 
618
 
 
619
fi
 
620
 
 
621
 
 
622
# Check whether --enable-vssize or --disable-vssize was given.
 
623
if test "${enable_vssize+set}" = set; then
 
624
  enableval="$enable_vssize"
 
625
  cat >> confdefs.h <<EOF
 
626
#define VSSIZE $enable_vssize
 
627
EOF
 
628
 
 
629
fi
 
630
 
 
631
 
 
632
# Check whether --enable-bdssize or --disable-bdssize was given.
 
633
if test "${enable_bdssize+set}" = set; then
 
634
  enableval="$enable_bdssize"
 
635
  cat >> confdefs.h <<EOF
 
636
#define BDSSIZE $enable_bdssize
 
637
EOF
 
638
 
 
639
fi
 
640
 
 
641
 
 
642
# Check whether --enable-ihssize or --disable-ihssize was given.
 
643
if test "${enable_ihssize+set}" = set; then
 
644
  enableval="$enable_ihssize"
 
645
  cat >> confdefs.h <<EOF
 
646
#define IHSSIZE $enable_ihssize
 
647
EOF
 
648
 
 
649
fi
 
650
 
 
651
 
 
652
# Check whether --enable-frssize or --disable-frssize was given.
 
653
if test "${enable_frssize+set}" = set; then
 
654
  enableval="$enable_frssize"
 
655
  cat >> confdefs.h <<EOF
 
656
#define FRSSIZE $enable_frssize
 
657
EOF
 
658
 
 
659
fi
 
660
 
 
661
 
 
662
# Check whether --enable-machine or --disable-machine was given.
 
663
if test "${enable_machine+set}" = set; then
 
664
  enableval="$enable_machine"
 
665
  enable_machine=$enableval
 
666
else
 
667
  enable_machine=""
 
668
fi
 
669
 
 
670
 
 
671
#AC_ARG_ENABLE(gmp,[ --enable-gmp=no will disable use of GMP gnu multiprecision arithmetic, (default is =yes)] ,
 
672
#[use_gmp=$enableval],[use_gmp="yes"])
 
673
 
 
674
use_gmp="yes"
 
675
 
 
676
# Check whether --enable-notify or --disable-notify was given.
 
677
if test "${enable_notify+set}" = set; then
 
678
  enableval="$enable_notify"
 
679
  enable_notify=$enableval
 
680
else
 
681
  enable_notify="yes"
 
682
fi
 
683
 
 
684
 
 
685
# Check whether --enable-tkconfig or --disable-tkconfig was given.
 
686
if test "${enable_tkconfig+set}" = set; then
 
687
  enableval="$enable_tkconfig"
 
688
  TK_CONFIG_PREFIX=$enableval
 
689
else
 
690
  TK_CONFIG_PREFIX="unknown"
 
691
fi
 
692
 
 
693
 
 
694
 
 
695
# Check whether --enable-tclconfig or --disable-tclconfig was given.
 
696
if test "${enable_tclconfig+set}" = set; then
 
697
  enableval="$enable_tclconfig"
 
698
  TCL_CONFIG_PREFIX=$enableval
 
699
else
 
700
  TCL_CONFIG_PREFIX="unknown"
 
701
fi
 
702
 
 
703
 
 
704
# Check whether --enable-infodir or --disable-infodir was given.
 
705
if test "${enable_infodir+set}" = set; then
 
706
  enableval="$enable_infodir"
 
707
  INFO_DIR=$enableval
 
708
else
 
709
  INFO_DIR="unknown"
 
710
fi
 
711
 
 
712
INFO_DIR=`eval echo $INFO_DIR/`
 
713
 
 
714
# Check whether --enable-emacsdir or --disable-emacsdir was given.
 
715
if test "${enable_emacsdir+set}" = set; then
 
716
  enableval="$enable_emacsdir"
 
717
  EMACS_SITE_LISP=$enableval
 
718
else
 
719
  EMACS_SITE_LISP="unknown"
 
720
fi
 
721
 
 
722
EMACS_SITE_LISP=`eval echo $EMACS_SITE_LISP`
 
723
 
 
724
# Check whether --enable-common-binary or --disable-common-binary was given.
 
725
if test "${enable_common_binary+set}" = set; then
 
726
  enableval="$enable_common_binary"
 
727
  use_common_binary=$enableval
 
728
else
 
729
  use_common_binary="yes"
 
730
fi
 
731
 
 
732
 
 
733
# Check whether --enable-japi or --disable-japi was given.
 
734
if test "${enable_japi+set}" = set; then
 
735
  enableval="$enable_japi"
 
736
  try_japi=$enableval
 
737
else
 
738
  try_japi="no"
 
739
fi
 
740
 
 
741
 
 
742
# Check whether --enable-xdr or --disable-xdr was given.
 
743
if test "${enable_xdr+set}" = set; then
 
744
  enableval="$enable_xdr"
 
745
  try_xdr=$enableval
 
746
else
 
747
  try_xdr="no"
 
748
fi
 
749
 
 
750
 
 
751
#
 
752
# Host information 
 
753
#
 
754
 
 
755
 
 
756
ac_aux_dir=
 
757
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
 
758
  if test -f $ac_dir/install-sh; then
 
759
    ac_aux_dir=$ac_dir
 
760
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
761
    break
 
762
  elif test -f $ac_dir/install.sh; then
 
763
    ac_aux_dir=$ac_dir
 
764
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
765
    break
 
766
  fi
 
767
done
 
768
if test -z "$ac_aux_dir"; then
 
769
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
 
770
fi
 
771
ac_config_guess=$ac_aux_dir/config.guess
 
772
ac_config_sub=$ac_aux_dir/config.sub
 
773
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
774
 
 
775
 
 
776
# Make sure we can run config.sub.
 
777
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 
778
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 
779
fi
 
780
 
 
781
echo $ac_n "checking host system type""... $ac_c" 1>&6
 
782
echo "configure:783: checking host system type" >&5
 
783
 
 
784
host_alias=$host
 
785
case "$host_alias" in
 
786
NONE)
 
787
  case $nonopt in
 
788
  NONE)
 
789
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
 
790
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
 
791
    fi ;;
 
792
  *) host_alias=$nonopt ;;
 
793
  esac ;;
 
794
esac
 
795
 
 
796
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 
797
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 
798
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 
799
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
800
echo "$ac_t""$host" 1>&6
 
801
 
 
802
canonical=$host
 
803
my_host_kernel=`echo $host_os | awk '{j=split($1,A,"-");print A[1]}'`
 
804
my_host_system=`echo $host_os | awk '{j=split($1,A,"-");if (j>=2) print A[2]}'`
 
805
cat >> confdefs.h <<EOF
 
806
#define HOST_CPU "`echo $host_cpu | awk '{print toupper($0)}'`"
 
807
EOF
 
808
 
 
809
cat >> confdefs.h <<EOF
 
810
#define HOST_KERNEL "`echo $my_host_kernel | awk '{print toupper($0)}'`"
 
811
EOF
 
812
 
 
813
if test "$my_host_system" != "" ; then 
 
814
        cat >> confdefs.h <<EOF
 
815
#define HOST_SYSTEM "`echo $my_host_system | awk '{print toupper($0)}'`"
 
816
EOF
 
817
 
 
818
fi
 
819
echo "$ac_t""host=$host" 1>&6
 
820
 
 
821
PROCESSOR_FLAGS=${PROCESSOR_FLAGS:-""}
 
822
 
 
823
use=unknown
 
824
TLDFLAGS=""
 
825
case $canonical in
 
826
     older)
 
827
     use=386-bsd;;
 
828
 
 
829
     *x86_64*linux*)
 
830
        use=amd64-linux;;
 
831
 
 
832
     *86*linux*)
 
833
        use=386-linux;;
 
834
 
 
835
# m6800 not working with gcc-3.2
 
836
     m68k*linux*)
 
837
       if test "$use_common_binary" = "yes"; then
 
838
         host=m68020-unknown-linux-gnu
 
839
         echo "The host is canonicalised to $host"
 
840
       fi
 
841
        use=m68k-linux;;
 
842
 
 
843
     alpha*linux*)
 
844
        use=alpha-linux;;
 
845
 
 
846
     mips*linux*)
 
847
        use=mips-linux;;
 
848
 
 
849
     mipsel*linux*)
 
850
        use=mipsel-linux;;
 
851
 
 
852
     sparc*linux*)
 
853
        use=sparc-linux;;
 
854
 
 
855
     arm*linux*)
 
856
        use=arm-linux;;
 
857
 
 
858
     s390*linux*)
 
859
        use=s390-linux;;
 
860
 
 
861
     ia64*linux*)
 
862
        use=ia64-linux;;
 
863
 
 
864
     hppa*linux*)
 
865
        use=hppa-linux;;
 
866
 
 
867
     powerpc*linux*)
 
868
        use=powerpc-linux;;
 
869
 
 
870
     powerpc-*-darwin*)
 
871
        use=powerpc-macosx;;
 
872
     
 
873
     alpha-dec-osf)
 
874
     use=alpha-osf1;;
 
875
 
 
876
     mips-dec-ultrix)
 
877
     use=dec3100;;
 
878
 
 
879
     old)
 
880
     use=dos-go32;;
 
881
 
 
882
     *86*-freebsd*)
 
883
     use=FreeBSD;;
 
884
 
 
885
     hp3*-*hpux*)
 
886
     use=hp300;;
 
887
 
 
888
     hp3*-*-*bsd*)
 
889
     use=hp300-bsd;;
 
890
 
 
891
     hppa*-*hpux*)
 
892
     use=hp800;;
 
893
 
 
894
     mips-sgi-irix)
 
895
       case $system in
 
896
           IRIX5*)
 
897
            use=irix5;;
 
898
           IRIX6*)
 
899
            use=irix6;;
 
900
           IRIX3*)
 
901
            use=sgi4d;;
 
902
       esac ;;
 
903
 
 
904
 
 
905
     m68k-apple-aux*)
 
906
     use=mac2;;
 
907
 
 
908
     old)
 
909
     use=mp386;;
 
910
 
 
911
     *86-ncr-sysv4)
 
912
     use=ncr;;
 
913
 
 
914
     *3-986-*netbsd*)
 
915
     use=NetBSD;;
 
916
 
 
917
     old)
 
918
     use=NeXT;;
 
919
 
 
920
     old)
 
921
     use=NeXT30-m68k;;
 
922
 
 
923
     *86-*nextstep*)
 
924
     use=NeXT32-i386;;
 
925
 
 
926
     *m68*-*nextstep*)
 
927
     use=NeXT32-m68k;;
 
928
 
 
929
     *rs6000-*-aix4*)
 
930
     use=rios;;
 
931
 
 
932
     *rs6000-*-aix3*)
 
933
     use=rios-aix3;;
 
934
 
 
935
     old)
 
936
     use=rt_aix;;
 
937
 
 
938
     old)
 
939
     use=sgi;;
 
940
 
 
941
     sparc-sun-solaris*)
 
942
     use=solaris;;
 
943
 
 
944
     i?86-pc-solaris*)
 
945
     use=solaris-i386;;
 
946
 
 
947
     old)
 
948
     use=sun2r3;;
 
949
 
 
950
     old)
 
951
     use=sun3;;
 
952
 
 
953
     m68*-sunos*)
 
954
     use=sun3-os4;;
 
955
 
 
956
     old)
 
957
     use=sun386i;;
 
958
 
 
959
     sparc*sunos*)
 
960
     use=sun4;;
 
961
 
 
962
     *86-sequent-dynix)
 
963
     use=symmetry;;
 
964
 
 
965
     u370*aix)
 
966
     use=u370_aix;;
 
967
 
 
968
     old)
 
969
     use=vax;;
 
970
 
 
971
     i*mingw*)
 
972
       if test "$use_common_binary" = "yes"; then
 
973
         host=i386-pc-mingw32
 
974
         PROCESSOR_FLAGS="-mcpu=i386 -march=i386"
 
975
         echo "The host is canonicalised to $host"
 
976
       fi
 
977
 
 
978
       use=mingw;;
 
979
 
 
980
     i*cygwin*)
 
981
        if $CC -v 2>&1 | fgrep ming > /dev/null ;
 
982
            then use=mingw
 
983
          else  use=gnuwin95
 
984
        fi;;
 
985
 
 
986
     *openbsd*)
 
987
        # 'ld -Z' means disable W^X
 
988
        TLDFLAGS="$TLDFLAGS -Z"
 
989
        use=FreeBSD;;
 
990
  
 
991
esac
 
992
 
 
993
 
 
994
 
 
995
echo enable_machine=$enable_machine
 
996
if test "x$enable_machine" != "x" ; then
 
997
  use=$enable_machine
 
998
fi
 
999
 
 
1000
def_dlopen="no"
 
1001
def_statsysbfd="yes"
 
1002
def_custreloc="no"
 
1003
def_locbfd="no"
 
1004
def_pic="no";
 
1005
def_static="no";
 
1006
def_static="debug";
 
1007
case $use in 
 
1008
     *linux)
 
1009
        ln -snf linux.defs h/$use.defs;
 
1010
        case $use in
 
1011
                alpha*)
 
1012
                        def_dlopen="yes" ; def_statsysbfd="no" ;;
 
1013
                mips*)
 
1014
                        def_dlopen="yes" ; def_statsysbfd="no" ;;
 
1015
# def_static -- Function descriptors are currently realized at runtime in a non-reproducible fashion
 
1016
# on these architectures -- CM                  
 
1017
                ia64*)
 
1018
                        def_dlopen="yes" ; def_statsysbfd="no" ; def_static="no" ;;
 
1019
                hppa*)
 
1020
                        def_dlopen="yes" ; def_statsysbfd="no" ; def_pic="yes" ; def_debug="yes" ;;
 
1021
        esac;;
 
1022
    *mingw*)
 
1023
        def_statsysbfd="no" ; def_custreloc="yes" ;;
 
1024
    powerpc-macosx)
 
1025
        def_statsysbfd="no" ; def_locbfd="yes" ;;
 
1026
esac
 
1027
 
 
1028
# Check whether --enable-dlopen or --disable-dlopen was given.
 
1029
if test "${enable_dlopen+set}" = set; then
 
1030
  enableval="$enable_dlopen"
 
1031
  :
 
1032
else
 
1033
  enable_dlopen="$def_dlopen"
 
1034
fi
 
1035
 
 
1036
# Check whether --enable-statsysbfd or --disable-statsysbfd was given.
 
1037
if test "${enable_statsysbfd+set}" = set; then
 
1038
  enableval="$enable_statsysbfd"
 
1039
  :
 
1040
else
 
1041
  enable_statsysbfd="$def_statsysbfd"
 
1042
fi
 
1043
 
 
1044
# Check whether --enable-dynsysbfd or --disable-dynsysbfd was given.
 
1045
if test "${enable_dynsysbfd+set}" = set; then
 
1046
  enableval="$enable_dynsysbfd"
 
1047
  :
 
1048
else
 
1049
  enable_dynsysbfd="no"
 
1050
fi
 
1051
 
 
1052
# Check whether --enable-locbfd or --disable-locbfd was given.
 
1053
if test "${enable_locbfd+set}" = set; then
 
1054
  enableval="$enable_locbfd"
 
1055
  :
 
1056
else
 
1057
  enable_locbfd="$def_locbfd"
 
1058
fi
 
1059
 
 
1060
# Check whether --enable-custreloc or --disable-custreloc was given.
 
1061
if test "${enable_custreloc+set}" = set; then
 
1062
  enableval="$enable_custreloc"
 
1063
  :
 
1064
else
 
1065
  enable_custreloc="$def_custreloc"
 
1066
fi
 
1067
 
 
1068
# Check whether --enable-debug or --disable-debug was given.
 
1069
if test "${enable_debug+set}" = set; then
 
1070
  enableval="$enable_debug"
 
1071
  :
 
1072
else
 
1073
  enable_debug="$def_debug"
 
1074
fi
 
1075
 
 
1076
# Check whether --enable-gprof or --disable-gprof was given.
 
1077
if test "${enable_gprof+set}" = set; then
 
1078
  enableval="$enable_gprof"
 
1079
  :
 
1080
else
 
1081
  enable_gprof="no"
 
1082
fi
 
1083
 
 
1084
# Check whether --enable-static or --disable-static was given.
 
1085
if test "${enable_static+set}" = set; then
 
1086
  enableval="$enable_static"
 
1087
  enable_static=$enableval
 
1088
else
 
1089
  enable_static="$def_static"
 
1090
fi
 
1091
 
 
1092
# Check whether --enable-pic or --disable-pic was given.
 
1093
if test "${enable_pic+set}" = set; then
 
1094
  enableval="$enable_pic"
 
1095
  :
 
1096
else
 
1097
  enable_pic="$def_pic"
 
1098
fi
 
1099
 
 
1100
 
 
1101
# Check whether --enable-dynsysgmp or --disable-dynsysgmp was given.
 
1102
if test "${enable_dynsysgmp+set}" = set; then
 
1103
  enableval="$enable_dynsysgmp"
 
1104
  :
 
1105
else
 
1106
  enable_dynsysgmp="no"
 
1107
fi
 
1108
 
 
1109
 
 
1110
load_opt="0"
 
1111
if test "$enable_dlopen" = "yes" ; then
 
1112
   load_opt=1
 
1113
fi
 
1114
if test "$enable_statsysbfd" = "yes" ; then
 
1115
   case $load_opt in
 
1116
   0) load_opt=1;;
 
1117
   1) load_opt=2;;
 
1118
   esac
 
1119
fi
 
1120
if test "$enable_dynsysbfd" = "yes" ; then
 
1121
   case $load_opt in
 
1122
   0) load_opt=1;;
 
1123
   1) load_opt=2;;
 
1124
   2) load_opt=3;;
 
1125
   esac
 
1126
fi
 
1127
if test "$enable_locbfd" = "yes" ; then
 
1128
   case $load_opt in
 
1129
   0) load_opt=1;;
 
1130
   1) load_opt=2;;
 
1131
   2) load_opt=3;;
 
1132
   3) load_opt=4;;
 
1133
   esac
 
1134
fi
 
1135
if test "$enable_custreloc" = "yes" ; then
 
1136
   case $load_opt in
 
1137
   0) load_opt=1;;
 
1138
   1) load_opt=2;;
 
1139
   2) load_opt=3;;
 
1140
   3) load_opt=4;;
 
1141
   4) load_opt=5;;
 
1142
   esac
 
1143
fi
 
1144
 
 
1145
if test "$load_opt" != "1" ; then
 
1146
        echo "Exactly one loader option must be chosen: dlopen=$enable_dlopen statsysbfd=$enable_statsysbfd dynsysbfd=$enable_dynsysbfd locbfd=$enable_locbfd custreloc=$enable_custreloc"
 
1147
        exit 1
 
1148
fi
 
1149
 
 
1150
TLIBS=""
 
1151
if test "$enable_static" = "yes" ; then
 
1152
   TLIBS="-static $TLIBS";
 
1153
fi
 
1154
 
 
1155
## finally warn if we did not find a recognized machine.s
 
1156
##
 
1157
#if test "$use" = "unknown" ; then
 
1158
#types=`echo h/*.defs` | sed -e "s:h/::g" -e "s:\.defs:g"`
 
1159
#echo got canonical=$canonical, but was not recognized. 
 
1160
#echo Unable to guess type to use.  Try one of 
 
1161
#exit(1)
 
1162
#fi
 
1163
 
 
1164
echo "$ac_t""use=$use" 1>&6     
 
1165
 
 
1166
 
 
1167
#
 
1168
# System programs
 
1169
#
 
1170
 
 
1171
# We set the default CFLAGS below, and don't want the autoconf default
 
1172
# CM 20040106
 
1173
if test "$CFLAGS" = "" ; then
 
1174
        CFLAGS=" "
 
1175
fi
 
1176
if test "$LDFLAGS" = "" ; then
 
1177
        LDFLAGS=" "
 
1178
fi
 
1179
 
 
1180
# Extract the first word of "gcc", so it can be a program name with args.
 
1181
set dummy gcc; ac_word=$2
 
1182
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1183
echo "configure:1184: checking for $ac_word" >&5
 
1184
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 
1185
  echo $ac_n "(cached) $ac_c" 1>&6
 
1186
else
 
1187
  if test -n "$CC"; then
 
1188
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
1189
else
 
1190
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1191
  ac_dummy="$PATH"
 
1192
  for ac_dir in $ac_dummy; do
 
1193
    test -z "$ac_dir" && ac_dir=.
 
1194
    if test -f $ac_dir/$ac_word; then
 
1195
      ac_cv_prog_CC="gcc"
 
1196
      break
 
1197
    fi
 
1198
  done
 
1199
  IFS="$ac_save_ifs"
 
1200
fi
 
1201
fi
 
1202
CC="$ac_cv_prog_CC"
 
1203
if test -n "$CC"; then
 
1204
  echo "$ac_t""$CC" 1>&6
 
1205
else
 
1206
  echo "$ac_t""no" 1>&6
 
1207
fi
 
1208
 
 
1209
if test -z "$CC"; then
 
1210
  # Extract the first word of "cc", so it can be a program name with args.
 
1211
set dummy cc; ac_word=$2
 
1212
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1213
echo "configure:1214: checking for $ac_word" >&5
 
1214
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 
1215
  echo $ac_n "(cached) $ac_c" 1>&6
 
1216
else
 
1217
  if test -n "$CC"; then
 
1218
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
1219
else
 
1220
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1221
  ac_prog_rejected=no
 
1222
  ac_dummy="$PATH"
 
1223
  for ac_dir in $ac_dummy; do
 
1224
    test -z "$ac_dir" && ac_dir=.
 
1225
    if test -f $ac_dir/$ac_word; then
 
1226
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
 
1227
        ac_prog_rejected=yes
 
1228
        continue
 
1229
      fi
 
1230
      ac_cv_prog_CC="cc"
 
1231
      break
 
1232
    fi
 
1233
  done
 
1234
  IFS="$ac_save_ifs"
 
1235
if test $ac_prog_rejected = yes; then
 
1236
  # We found a bogon in the path, so make sure we never use it.
 
1237
  set dummy $ac_cv_prog_CC
 
1238
  shift
 
1239
  if test $# -gt 0; then
 
1240
    # We chose a different compiler from the bogus one.
 
1241
    # However, it has the same basename, so the bogon will be chosen
 
1242
    # first if we set CC to just the basename; use the full file name.
 
1243
    shift
 
1244
    set dummy "$ac_dir/$ac_word" "$@"
 
1245
    shift
 
1246
    ac_cv_prog_CC="$@"
 
1247
  fi
 
1248
fi
 
1249
fi
 
1250
fi
 
1251
CC="$ac_cv_prog_CC"
 
1252
if test -n "$CC"; then
 
1253
  echo "$ac_t""$CC" 1>&6
 
1254
else
 
1255
  echo "$ac_t""no" 1>&6
 
1256
fi
 
1257
 
 
1258
  if test -z "$CC"; then
 
1259
    case "`uname -s`" in
 
1260
    *win32* | *WIN32*)
 
1261
      # Extract the first word of "cl", so it can be a program name with args.
 
1262
set dummy cl; ac_word=$2
 
1263
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1264
echo "configure:1265: checking for $ac_word" >&5
 
1265
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 
1266
  echo $ac_n "(cached) $ac_c" 1>&6
 
1267
else
 
1268
  if test -n "$CC"; then
 
1269
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
1270
else
 
1271
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1272
  ac_dummy="$PATH"
 
1273
  for ac_dir in $ac_dummy; do
 
1274
    test -z "$ac_dir" && ac_dir=.
 
1275
    if test -f $ac_dir/$ac_word; then
 
1276
      ac_cv_prog_CC="cl"
 
1277
      break
 
1278
    fi
 
1279
  done
 
1280
  IFS="$ac_save_ifs"
 
1281
fi
 
1282
fi
 
1283
CC="$ac_cv_prog_CC"
 
1284
if test -n "$CC"; then
 
1285
  echo "$ac_t""$CC" 1>&6
 
1286
else
 
1287
  echo "$ac_t""no" 1>&6
 
1288
fi
 
1289
 ;;
 
1290
    esac
 
1291
  fi
 
1292
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 
1293
fi
 
1294
 
 
1295
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 
1296
echo "configure:1297: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
1297
 
 
1298
ac_ext=c
 
1299
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
1300
ac_cpp='$CPP $CPPFLAGS'
 
1301
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
1302
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
1303
cross_compiling=$ac_cv_prog_cc_cross
 
1304
 
 
1305
cat > conftest.$ac_ext << EOF
 
1306
 
 
1307
#line 1308 "configure"
 
1308
#include "confdefs.h"
 
1309
 
 
1310
main(){return(0);}
 
1311
EOF
 
1312
if { (eval echo configure:1313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1313
  ac_cv_prog_cc_works=yes
 
1314
  # If we can't run a trivial program, we are probably using a cross compiler.
 
1315
  if (./conftest; exit) 2>/dev/null; then
 
1316
    ac_cv_prog_cc_cross=no
 
1317
  else
 
1318
    ac_cv_prog_cc_cross=yes
 
1319
  fi
 
1320
else
 
1321
  echo "configure: failed program was:" >&5
 
1322
  cat conftest.$ac_ext >&5
 
1323
  ac_cv_prog_cc_works=no
 
1324
fi
 
1325
rm -fr conftest*
 
1326
ac_ext=c
 
1327
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
1328
ac_cpp='$CPP $CPPFLAGS'
 
1329
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
1330
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
1331
cross_compiling=$ac_cv_prog_cc_cross
 
1332
 
 
1333
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 
1334
if test $ac_cv_prog_cc_works = no; then
 
1335
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 
1336
fi
 
1337
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
 
1338
echo "configure:1339: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 
1339
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 
1340
cross_compiling=$ac_cv_prog_cc_cross
 
1341
 
 
1342
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 
1343
echo "configure:1344: checking whether we are using GNU C" >&5
 
1344
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
 
1345
  echo $ac_n "(cached) $ac_c" 1>&6
 
1346
else
 
1347
  cat > conftest.c <<EOF
 
1348
#ifdef __GNUC__
 
1349
  yes;
 
1350
#endif
 
1351
EOF
 
1352
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
1353
  ac_cv_prog_gcc=yes
 
1354
else
 
1355
  ac_cv_prog_gcc=no
 
1356
fi
 
1357
fi
 
1358
 
 
1359
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
1360
 
 
1361
if test $ac_cv_prog_gcc = yes; then
 
1362
  GCC=yes
 
1363
else
 
1364
  GCC=
 
1365
fi
 
1366
 
 
1367
ac_test_CFLAGS="${CFLAGS+set}"
 
1368
ac_save_CFLAGS="$CFLAGS"
 
1369
CFLAGS=
 
1370
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 
1371
echo "configure:1372: checking whether ${CC-cc} accepts -g" >&5
 
1372
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
 
1373
  echo $ac_n "(cached) $ac_c" 1>&6
 
1374
else
 
1375
  echo 'void f(){}' > conftest.c
 
1376
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
 
1377
  ac_cv_prog_cc_g=yes
 
1378
else
 
1379
  ac_cv_prog_cc_g=no
 
1380
fi
 
1381
rm -f conftest*
 
1382
 
 
1383
fi
 
1384
 
 
1385
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
 
1386
if test "$ac_test_CFLAGS" = set; then
 
1387
  CFLAGS="$ac_save_CFLAGS"
 
1388
elif test $ac_cv_prog_cc_g = yes; then
 
1389
  if test "$GCC" = yes; then
 
1390
    CFLAGS="-g -O2"
 
1391
  else
 
1392
    CFLAGS="-g"
 
1393
  fi
 
1394
else
 
1395
  if test "$GCC" = yes; then
 
1396
    CFLAGS="-O2"
 
1397
  else
 
1398
    CFLAGS=
 
1399
  fi
 
1400
fi
 
1401
 
 
1402
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 
1403
echo "configure:1404: checking how to run the C preprocessor" >&5
 
1404
# On Suns, sometimes $CPP names a directory.
 
1405
if test -n "$CPP" && test -d "$CPP"; then
 
1406
  CPP=
 
1407
fi
 
1408
if test -z "$CPP"; then
 
1409
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
 
1410
  echo $ac_n "(cached) $ac_c" 1>&6
 
1411
else
 
1412
    # This must be in double quotes, not single quotes, because CPP may get
 
1413
  # substituted into the Makefile and "${CC-cc}" will confuse make.
 
1414
  CPP="${CC-cc} -E"
 
1415
  # On the NeXT, cc -E runs the code through the compiler's parser,
 
1416
  # not just through cpp.
 
1417
  cat > conftest.$ac_ext <<EOF
 
1418
#line 1419 "configure"
 
1419
#include "confdefs.h"
 
1420
#include <assert.h>
 
1421
Syntax Error
 
1422
EOF
 
1423
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1424
{ (eval echo configure:1425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1425
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1426
if test -z "$ac_err"; then
 
1427
  :
 
1428
else
 
1429
  echo "$ac_err" >&5
 
1430
  echo "configure: failed program was:" >&5
 
1431
  cat conftest.$ac_ext >&5
 
1432
  rm -rf conftest*
 
1433
  CPP="${CC-cc} -E -traditional-cpp"
 
1434
  cat > conftest.$ac_ext <<EOF
 
1435
#line 1436 "configure"
 
1436
#include "confdefs.h"
 
1437
#include <assert.h>
 
1438
Syntax Error
 
1439
EOF
 
1440
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1441
{ (eval echo configure:1442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1442
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1443
if test -z "$ac_err"; then
 
1444
  :
 
1445
else
 
1446
  echo "$ac_err" >&5
 
1447
  echo "configure: failed program was:" >&5
 
1448
  cat conftest.$ac_ext >&5
 
1449
  rm -rf conftest*
 
1450
  CPP="${CC-cc} -nologo -E"
 
1451
  cat > conftest.$ac_ext <<EOF
 
1452
#line 1453 "configure"
 
1453
#include "confdefs.h"
 
1454
#include <assert.h>
 
1455
Syntax Error
 
1456
EOF
 
1457
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1458
{ (eval echo configure:1459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1459
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1460
if test -z "$ac_err"; then
 
1461
  :
 
1462
else
 
1463
  echo "$ac_err" >&5
 
1464
  echo "configure: failed program was:" >&5
 
1465
  cat conftest.$ac_ext >&5
 
1466
  rm -rf conftest*
 
1467
  CPP=/lib/cpp
 
1468
fi
 
1469
rm -f conftest*
 
1470
fi
 
1471
rm -f conftest*
 
1472
fi
 
1473
rm -f conftest*
 
1474
  ac_cv_prog_CPP="$CPP"
 
1475
fi
 
1476
  CPP="$ac_cv_prog_CPP"
 
1477
else
 
1478
  ac_cv_prog_CPP="$CPP"
 
1479
fi
 
1480
echo "$ac_t""$CPP" 1>&6
 
1481
 
 
1482
 
 
1483
 
 
1484
 
 
1485
# can only test for numbers -- CM
 
1486
# if test "${GCC}" -eq "yes" ; then
 
1487
#if [[ "${GCC}" = "yes" ]] ; then
 
1488
# Allog for environment variable overrides on compiler selection -- CM
 
1489
#GCC=$CC
 
1490
#else
 
1491
#GCC=""
 
1492
#fi
 
1493
# subst GCC not only under 386-linux, but where available -- CM
 
1494
 
 
1495
 
 
1496
TCFLAGS="-Wall -DVOL=volatile -fsigned-char"
 
1497
if test "$GCC" = "yes" ; then
 
1498
        TCFLAGS="$TCFLAGS -pipe"
 
1499
        case $use in
 
1500
             *mingw*)
 
1501
                echo "WARNING: Remove -fno-zero-initialized-in-bss from makedefs if gcc less than 3.3.1."
 
1502
                echo "         It is ptherwise needed for the Unexec stuff to work."
 
1503
                TCFLAGS="$TCFLAGS -fno-zero-initialized-in-bss -mms-bitfields";;
 
1504
        esac
 
1505
fi
 
1506
#if test -f /proc/sys/kernel/exec-shield ; then
 
1507
#       exec_stat=`cat /proc/sys/kernel/exec-shield`
 
1508
#       if test "$exec_stat" != "0" ; then
 
1509
#               # CFLAGS here to hopefully cover the DBEGIN routine below
 
1510
#               CFLAGS="$CFLAGS -Wa,--execstack"
 
1511
#       fi
 
1512
#fi
 
1513
 
 
1514
TO3FLAGS=""
 
1515
TO2FLAGS=""
 
1516
 
 
1517
#TFPFLAG="-fomit-frame-pointer"
 
1518
# FIXME -- remove when mingw compiler issues are fixed
 
1519
case "$use" in
 
1520
  *mingw*)
 
1521
        TFPFLAG="";;
 
1522
  *)
 
1523
        TFPFLAG="-fomit-frame-pointer";;
 
1524
esac
 
1525
 
 
1526
if test "$enable_gprof" = "yes" ; then
 
1527
        TCFLAGS="$TCFLAGS -pg"
 
1528
        TLIBS="$TLIBS -pg"
 
1529
        TFPFLAG=""
 
1530
        cat >> confdefs.h <<\EOF
 
1531
#define GCL_GPROF 1
 
1532
EOF
 
1533
 
 
1534
fi
 
1535
 
 
1536
if test "$enable_debug" = "yes" ; then
 
1537
        TCFLAGS="$TCFLAGS -g"
 
1538
        # for subconfigurations
 
1539
        CFLAGS="$CFLAGS -g"
 
1540
else
 
1541
# FIXME -- remove when mingw compiler issues are fixed
 
1542
        case "$use" in
 
1543
          *mingw*)
 
1544
                TO3FLAGS="-O3 $TFPFLAG";;
 
1545
          *)
 
1546
                TO3FLAGS="-O3 $TFPFLAG";;
 
1547
        esac
 
1548
#       TO3FLAGS="-O3 $TFPFLAG"
 
1549
        TO2FLAGS="-O"
 
1550
fi
 
1551
 
 
1552
for ac_prog in gawk nawk awk
 
1553
do
 
1554
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
1555
set dummy $ac_prog; ac_word=$2
 
1556
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1557
echo "configure:1558: checking for $ac_word" >&5
 
1558
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
 
1559
  echo $ac_n "(cached) $ac_c" 1>&6
 
1560
else
 
1561
  if test -n "$AWK"; then
 
1562
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
 
1563
else
 
1564
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1565
  ac_dummy="$PATH"
 
1566
  for ac_dir in $ac_dummy; do
 
1567
    test -z "$ac_dir" && ac_dir=.
 
1568
    if test -f $ac_dir/$ac_word; then
 
1569
      ac_cv_prog_AWK="$ac_prog"
 
1570
      break
 
1571
    fi
 
1572
  done
 
1573
  IFS="$ac_save_ifs"
 
1574
fi
 
1575
fi
 
1576
AWK="$ac_cv_prog_AWK"
 
1577
if test -n "$AWK"; then
 
1578
  echo "$ac_t""$AWK" 1>&6
 
1579
else
 
1580
  echo "$ac_t""no" 1>&6
 
1581
fi
 
1582
 
 
1583
test -n "$AWK" && break
 
1584
done
 
1585
test -n "$AWK" || AWK=""""
 
1586
 
 
1587
 
 
1588
# gcc on ppc cannot compile our new_init.c with full opts --CM
 
1589
TONIFLAGS=""
 
1590
case $use in 
 
1591
     *linux)
 
1592
        case $use in
 
1593
#               amd64*) # stack-boundary option does not work
 
1594
#                       TCFLAGS="$TCFLAGS -m64 -mpreferred-stack-boundary=8";;  
 
1595
                alpha*)
 
1596
                        TCFLAGS="$TCFLAGS -mieee";;
 
1597
#               m68k*)
 
1598
#                       TCFLAGS="$TCFLAGS -ffloat-store";;
 
1599
                hppa*)
 
1600
                        TCFLAGS="$TCFLAGS -ffunction-sections"
 
1601
                        if test "$enable_debug" != "yes" ; then TO3FLAGS="-O $TFPFLAG" ; fi
 
1602
                        if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi
 
1603
                        ;;
 
1604
                arm*)
 
1605
                        TCFLAGS="$TCFLAGS -mlong-calls";;       
 
1606
                powerpc*) 
 
1607
                        if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then
 
1608
                           echo Reducing optimization for buggy gcc-3.2
 
1609
                           if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi
 
1610
                        fi;
 
1611
                        echo Probing for longcall
 
1612
                        if ! $CC -v 2>&1 | $AWK '/^gcc version / {split($3,A,".");if (A[1]+0>=3 && A[2]+0>=3) exit 1;}'; then
 
1613
                           echo Enabling longcall on gcc 3.3 or later
 
1614
                           TCFLAGS="$TCFLAGS -mlongcall"
 
1615
                           echo Reducing optimization for buggy gcc 3.3 or later
 
1616
                           if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi
 
1617
                        fi;;
 
1618
        esac;;
 
1619
esac
 
1620
if test "$enable_pic" = "yes" ; then
 
1621
        TCFLAGS="$TCFLAGS -fPIC"
 
1622
fi
 
1623
 
 
1624
 
 
1625
# Step 1: set the variable "system" to hold the name and version number
 
1626
# for the system.  This can usually be done via the "uname" command, but
 
1627
# there are a few systems, like Next, where this doesn't work.
 
1628
 
 
1629
echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
 
1630
echo "configure:1631: checking system version (for dynamic loading)" >&5
 
1631
if machine=`uname -m` ; then true; else machine=unknown ; fi
 
1632
 
 
1633
for ac_prog in makeinfo
 
1634
do
 
1635
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
1636
set dummy $ac_prog; ac_word=$2
 
1637
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1638
echo "configure:1639: checking for $ac_word" >&5
 
1639
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
 
1640
  echo $ac_n "(cached) $ac_c" 1>&6
 
1641
else
 
1642
  if test -n "$MAKEINFO"; then
 
1643
  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
 
1644
else
 
1645
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1646
  ac_dummy="$PATH"
 
1647
  for ac_dir in $ac_dummy; do
 
1648
    test -z "$ac_dir" && ac_dir=.
 
1649
    if test -f $ac_dir/$ac_word; then
 
1650
      ac_cv_prog_MAKEINFO="$ac_prog"
 
1651
      break
 
1652
    fi
 
1653
  done
 
1654
  IFS="$ac_save_ifs"
 
1655
fi
 
1656
fi
 
1657
MAKEINFO="$ac_cv_prog_MAKEINFO"
 
1658
if test -n "$MAKEINFO"; then
 
1659
  echo "$ac_t""$MAKEINFO" 1>&6
 
1660
else
 
1661
  echo "$ac_t""no" 1>&6
 
1662
fi
 
1663
 
 
1664
test -n "$MAKEINFO" && break
 
1665
done
 
1666
test -n "$MAKEINFO" || MAKEINFO=""false""
 
1667
 
 
1668
 
 
1669
 
 
1670
if test -f /usr/lib/NextStep/software_version; then
 
1671
    system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
 
1672
else
 
1673
    system=`uname -s`-`uname -r`
 
1674
    if test "$?" -ne 0 ; then
 
1675
        echo "$ac_t""unknown (can't find uname command)" 1>&6
 
1676
        system=unknown
 
1677
    else
 
1678
        # Special check for weird MP-RAS system (uname returns weird
 
1679
        # results, and the version is kept in special file).
 
1680
    
 
1681
        if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
 
1682
            system=MP-RAS-`${AWK} '{print $3}' /etc/.relid'`
 
1683
        fi
 
1684
        if test "`uname -s`" = "AIX" ; then
 
1685
            system=AIX-`uname -v`.`uname -r`
 
1686
        fi
 
1687
        echo "$ac_t""$system" 1>&6
 
1688
    fi
 
1689
fi
 
1690
 
 
1691
#MY_SUBDIRS=
 
1692
 
 
1693
#
 
1694
# GMP
 
1695
#
 
1696
 
 
1697
rm -f makedefsafter
 
1698
 
 
1699
MP_INLCUDE=""
 
1700
if test $use_gmp = yes ; then
 
1701
 
 
1702
 echo $ac_n "checking use_gmp=yes, doing configure in gmp directory""... $ac_c" 1>&6
 
1703
echo "configure:1704: checking use_gmp=yes, doing configure in gmp directory" >&5
 
1704
 echo
 
1705
 echo "#"
 
1706
 echo "#"
 
1707
 echo "# -------------------"
 
1708
 echo "# Subconfigure of GMP"
 
1709
 echo "#"
 
1710
 echo "#"
 
1711
 
 
1712
 if test "$enable_oldgmp" = "yes" ; then
 
1713
        GMPDIR=gmp
 
1714
 else
 
1715
        GMPDIR=gmp3
 
1716
 fi
 
1717
 
 
1718
 if test "$use_common_binary" = "yes"; then
 
1719
   cd $GMPDIR && ./configure --host=$host && cd ..
 
1720
 else
 
1721
   cd $GMPDIR && ./configure && cd ..
 
1722
 fi
 
1723
#MY_SUBDIRS="$MY_SUBDIRS $GMPDIR" 
 
1724
 
 
1725
 echo "#"
 
1726
 echo "#"
 
1727
 echo "#"
 
1728
 echo "# Subconfigure of GMP done"
 
1729
 echo "# ------------------------"
 
1730
 echo "#"
 
1731
 
 
1732
 PATCHED_SYMBOLS=""
 
1733
 if test "$enable_dynsysgmp" = "yes" ; then
 
1734
        ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'`
 
1735
echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
 
1736
echo "configure:1737: checking for gmp.h" >&5
 
1737
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
1738
  echo $ac_n "(cached) $ac_c" 1>&6
 
1739
else
 
1740
  cat > conftest.$ac_ext <<EOF
 
1741
#line 1742 "configure"
 
1742
#include "confdefs.h"
 
1743
#include <gmp.h>
 
1744
EOF
 
1745
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1746
{ (eval echo configure:1747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1747
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1748
if test -z "$ac_err"; then
 
1749
  rm -rf conftest*
 
1750
  eval "ac_cv_header_$ac_safe=yes"
 
1751
else
 
1752
  echo "$ac_err" >&5
 
1753
  echo "configure: failed program was:" >&5
 
1754
  cat conftest.$ac_ext >&5
 
1755
  rm -rf conftest*
 
1756
  eval "ac_cv_header_$ac_safe=no"
 
1757
fi
 
1758
rm -f conftest*
 
1759
fi
 
1760
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
1761
  echo "$ac_t""yes" 1>&6
 
1762
  echo $ac_n "checking for __gmpz_init in -lgmp""... $ac_c" 1>&6
 
1763
echo "configure:1764: checking for __gmpz_init in -lgmp" >&5
 
1764
ac_lib_var=`echo gmp'_'__gmpz_init | sed 'y%./+-%__p_%'`
 
1765
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
1766
  echo $ac_n "(cached) $ac_c" 1>&6
 
1767
else
 
1768
  ac_save_LIBS="$LIBS"
 
1769
LIBS="-lgmp  $LIBS"
 
1770
cat > conftest.$ac_ext <<EOF
 
1771
#line 1772 "configure"
 
1772
#include "confdefs.h"
 
1773
/* Override any gcc2 internal prototype to avoid an error.  */
 
1774
/* We use char because int might match the return type of a gcc2
 
1775
    builtin and then its argument prototype would still apply.  */
 
1776
char __gmpz_init();
 
1777
 
 
1778
int main() {
 
1779
__gmpz_init()
 
1780
; return 0; }
 
1781
EOF
 
1782
if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1783
  rm -rf conftest*
 
1784
  eval "ac_cv_lib_$ac_lib_var=yes"
 
1785
else
 
1786
  echo "configure: failed program was:" >&5
 
1787
  cat conftest.$ac_ext >&5
 
1788
  rm -rf conftest*
 
1789
  eval "ac_cv_lib_$ac_lib_var=no"
 
1790
fi
 
1791
rm -f conftest*
 
1792
LIBS="$ac_save_LIBS"
 
1793
 
 
1794
fi
 
1795
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
1796
  echo "$ac_t""yes" 1>&6
 
1797
  echo $ac_n "checking "for external gmp version"""... $ac_c" 1>&6
 
1798
echo "configure:1799: checking "for external gmp version"" >&5
 
1799
                        if test "$cross_compiling" = yes; then
 
1800
  echo "Cannot use dynamic gmp lib" 
 
1801
else
 
1802
  cat > conftest.$ac_ext <<EOF
 
1803
#line 1804 "configure"
 
1804
#include "confdefs.h"
 
1805
#include <gmp.h>
 
1806
                                    int main() {
 
1807
                                    #if __GNU_MP_VERSION == 4
 
1808
                                        return 0;
 
1809
                                    #else
 
1810
                                        return -1;
 
1811
                                    #endif
 
1812
                                    }
 
1813
EOF
 
1814
if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1815
then
 
1816
  MPFILES=$GMPDIR/mpn/mul_n.o
 
1817
                                PATCHED_SYMBOLS=__gmpn_toom3_mul_n
 
1818
                                if test "$use" = "m68k-linux" ; then
 
1819
                                        MPFILES="$MPFILES $GMPDIR/mpn/lshift.o $GMPDIR/mpn/rshift.o"
 
1820
                                        PATCHED_SYMBOLS="$PATCHED_SYMBOLS __gmpn_lshift __gmpn_rshift"
 
1821
                                fi
 
1822
                                TLIBS="$TLIBS -lgmp"
 
1823
                                echo "#include \"gmp.h\"" >foo.c
 
1824
                                echo "int main() {return 0;}" >>foo.c
 
1825
                                MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -1l | $AWK '{print $3}' | tr -d '"'`
 
1826
                                rm -f foo.c
 
1827
else
 
1828
  echo "configure: failed program was:" >&5
 
1829
  cat conftest.$ac_ext >&5
 
1830
  rm -fr conftest*
 
1831
  echo "Cannot use dynamic gmp lib" 
 
1832
fi
 
1833
rm -fr conftest*
 
1834
fi
 
1835
 
 
1836
else
 
1837
  echo "$ac_t""no" 1>&6
 
1838
echo "Cannot use dynamic gmp lib" 
 
1839
fi
 
1840
 
 
1841
else
 
1842
  echo "$ac_t""no" 1>&6
 
1843
echo "Cannot use dynamic gmp lib" 
 
1844
fi
 
1845
 
 
1846
fi
 
1847
 
 
1848
if test "$MP_INCLUDE" = "" ; then                       
 
1849
 
 
1850
        cp $GMPDIR/gmp.h h/gmp.h
 
1851
        MP_INCLUDE=h/gmp.h
 
1852
        MPFILES=gmp_all
 
1853
 
 
1854
fi
 
1855
 
 
1856
echo $ac_n "checking "for leading underscore in object symbols"""... $ac_c" 1>&6
 
1857
echo "configure:1858: checking "for leading underscore in object symbols"" >&5
 
1858
cat>foo.c <<EOFF
 
1859
#include <math.h>
 
1860
int main() {double d=0.0;cos(d);return 0;}
 
1861
EOFF
 
1862
$CC -c foo.c -o foo.o
 
1863
if nm foo.o |grep " U " | grep "_cos" >/dev/null ; then
 
1864
        LEADING_UNDERSCORE=1
 
1865
        echo "$ac_t"""yes"" 1>&6
 
1866
else
 
1867
        LEADING_UNDERSCORE=""
 
1868
        echo "$ac_t"""no"" 1>&6
 
1869
fi
 
1870
echo $ac_n "checking "for GNU ld option -Map"""... $ac_c" 1>&6
 
1871
echo "configure:1872: checking "for GNU ld option -Map"" >&5
 
1872
touch map
 
1873
$CC -o foo  -Wl,-Map  map foo.o >/dev/null 2>&1
 
1874
if test `cat map | wc -l` != "0" ; then
 
1875
        echo "$ac_t"""yes"" 1>&6
 
1876
        cat >> confdefs.h <<\EOF
 
1877
#define HAVE_GNU_LD 1
 
1878
EOF
 
1879
 
 
1880
        GNU_LD=1
 
1881
else
 
1882
        echo "$ac_t"""no"" 1>&6
 
1883
        GNU_LD=
 
1884
fi
 
1885
rm -f foo.c foo.o foo map
 
1886
 
 
1887
 echo $ac_n "checking "for size of gmp limbs"""... $ac_c" 1>&6
 
1888
echo "configure:1889: checking "for size of gmp limbs"" >&5
 
1889
 if test "$cross_compiling" = yes; then
 
1890
  mpsize=0
 
1891
else
 
1892
  cat > conftest.$ac_ext <<EOF
 
1893
#line 1894 "configure"
 
1894
#include "confdefs.h"
 
1895
#include <stdio.h>
 
1896
        #include "$MP_INCLUDE"
 
1897
        int main() {
 
1898
        FILE *fp=fopen("conftest1","w");
 
1899
        fprintf(fp,"%u",sizeof(mp_limb_t));
 
1900
        fclose(fp);
 
1901
        return 0;
 
1902
        }
 
1903
EOF
 
1904
if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1905
then
 
1906
  mpsize=`cat conftest1`
 
1907
else
 
1908
  echo "configure: failed program was:" >&5
 
1909
  cat conftest.$ac_ext >&5
 
1910
  rm -fr conftest*
 
1911
  mpsize=0
 
1912
fi
 
1913
rm -fr conftest*
 
1914
fi
 
1915
 
 
1916
 if test "$mpsize" = "0" ; then
 
1917
        echo "Cannot determine mpsize"
 
1918
        exit 1
 
1919
 fi
 
1920
 cat >> confdefs.h <<EOF
 
1921
#define MP_LIMB_BYTES $mpsize
 
1922
EOF
 
1923
 
 
1924
 echo "$ac_t""$mpsize" 1>&6 
 
1925
 
 
1926
 echo $ac_n "checking "_SHORT_LIMB"""... $ac_c" 1>&6
 
1927
echo "configure:1928: checking "_SHORT_LIMB"" >&5
 
1928
 if test "$cross_compiling" = yes; then
 
1929
  echo "$ac_t""no" 1>&6
 
1930
else
 
1931
  cat > conftest.$ac_ext <<EOF
 
1932
#line 1933 "configure"
 
1933
#include "confdefs.h"
 
1934
#include <stdio.h>
 
1935
        #include "$MP_INCLUDE"
 
1936
        int main() {
 
1937
        #ifdef _SHORT_LIMB
 
1938
        return 0;
 
1939
        #else
 
1940
        return 1;
 
1941
        #endif
 
1942
        }
 
1943
EOF
 
1944
if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1945
then
 
1946
  cat >> confdefs.h <<\EOF
 
1947
#define __SHORT_LIMB 1
 
1948
EOF
 
1949
 echo "$ac_t""yes" 1>&6
 
1950
else
 
1951
  echo "configure: failed program was:" >&5
 
1952
  cat conftest.$ac_ext >&5
 
1953
  rm -fr conftest*
 
1954
  echo "$ac_t""no" 1>&6
 
1955
fi
 
1956
rm -fr conftest*
 
1957
fi
 
1958
 
 
1959
 echo $ac_n "checking "_LONG_LONG_LIMB"""... $ac_c" 1>&6
 
1960
echo "configure:1961: checking "_LONG_LONG_LIMB"" >&5
 
1961
 if test "$cross_compiling" = yes; then
 
1962
  echo "$ac_t""no" 1>&6
 
1963
else
 
1964
  cat > conftest.$ac_ext <<EOF
 
1965
#line 1966 "configure"
 
1966
#include "confdefs.h"
 
1967
#include <stdio.h>
 
1968
        #include "$MP_INCLUDE"
 
1969
        int main() {
 
1970
        #ifdef _LONG_LONG_LIMB
 
1971
        return 0;
 
1972
        #else
 
1973
        return 1;
 
1974
        #endif
 
1975
        }
 
1976
EOF
 
1977
if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1978
then
 
1979
  cat >> confdefs.h <<\EOF
 
1980
#define __LONG_LONG_LIMB 1
 
1981
EOF
 
1982
 echo "$ac_t""yes" 1>&6
 
1983
else
 
1984
  echo "configure: failed program was:" >&5
 
1985
  cat conftest.$ac_ext >&5
 
1986
  rm -fr conftest*
 
1987
  echo "$ac_t""no" 1>&6
 
1988
fi
 
1989
rm -fr conftest*
 
1990
fi
 
1991
 
 
1992
 
 
1993
 GMP=1
 
1994
 cat >> confdefs.h <<\EOF
 
1995
#define GMP 1
 
1996
EOF
 
1997
 
 
1998
 
 
1999
 
 
2000
 echo > makedefsafter
 
2001
 echo "MPFILES=$MPFILES" >> makedefsafter
 
2002
 echo "PATCHED_SYMBOLS=$PATCHED_SYMBOLS" >> makedefsafter
 
2003
 echo >> makedefsafter
 
2004
fi
 
2005
 
 
2006
 
 
2007
#
 
2008
# X windows
 
2009
 
2010
 
 
2011
# If we find X, set shell vars x_includes and x_libraries to the
 
2012
# paths, otherwise set no_x=yes.
 
2013
# Uses ac_ vars as temps to allow command line to override cache and checks.
 
2014
# --without-x overrides everything else, but does not touch the cache.
 
2015
echo $ac_n "checking for X""... $ac_c" 1>&6
 
2016
echo "configure:2017: checking for X" >&5
 
2017
 
 
2018
# Check whether --with-x or --without-x was given.
 
2019
if test "${with_x+set}" = set; then
 
2020
  withval="$with_x"
 
2021
  :
 
2022
fi
 
2023
 
 
2024
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
 
2025
if test "x$with_x" = xno; then
 
2026
  # The user explicitly disabled X.
 
2027
  have_x=disabled
 
2028
else
 
2029
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
 
2030
    # Both variables are already set.
 
2031
    have_x=yes
 
2032
  else
 
2033
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
 
2034
  echo $ac_n "(cached) $ac_c" 1>&6
 
2035
else
 
2036
  # One or both of the vars are not set, and there is no cached value.
 
2037
ac_x_includes=NO ac_x_libraries=NO
 
2038
rm -fr conftestdir
 
2039
if mkdir conftestdir; then
 
2040
  cd conftestdir
 
2041
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
 
2042
  cat > Imakefile <<'EOF'
 
2043
acfindx:
 
2044
        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
 
2045
EOF
 
2046
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
 
2047
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 
2048
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
 
2049
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
 
2050
    for ac_extension in a so sl; do
 
2051
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
 
2052
        test -f $ac_im_libdir/libX11.$ac_extension; then
 
2053
        ac_im_usrlibdir=$ac_im_libdir; break
 
2054
      fi
 
2055
    done
 
2056
    # Screen out bogus values from the imake configuration.  They are
 
2057
    # bogus both because they are the default anyway, and because
 
2058
    # using them would break gcc on systems where it needs fixed includes.
 
2059
    case "$ac_im_incroot" in
 
2060
        /usr/include) ;;
 
2061
        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
 
2062
    esac
 
2063
    case "$ac_im_usrlibdir" in
 
2064
        /usr/lib | /lib) ;;
 
2065
        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
 
2066
    esac
 
2067
  fi
 
2068
  cd ..
 
2069
  rm -fr conftestdir
 
2070
fi
 
2071
 
 
2072
if test "$ac_x_includes" = NO; then
 
2073
  # Guess where to find include files, by looking for this one X11 .h file.
 
2074
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
2075
 
 
2076
  # First, try using that file with no special directory specified.
 
2077
cat > conftest.$ac_ext <<EOF
 
2078
#line 2079 "configure"
 
2079
#include "confdefs.h"
 
2080
#include <$x_direct_test_include>
 
2081
EOF
 
2082
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
2083
{ (eval echo configure:2084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
2084
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
2085
if test -z "$ac_err"; then
 
2086
  rm -rf conftest*
 
2087
  # We can compile using X headers with no special include directory.
 
2088
ac_x_includes=
 
2089
else
 
2090
  echo "$ac_err" >&5
 
2091
  echo "configure: failed program was:" >&5
 
2092
  cat conftest.$ac_ext >&5
 
2093
  rm -rf conftest*
 
2094
  # Look for the header file in a standard set of common directories.
 
2095
# Check X11 before X11Rn because it is often a symlink to the current release.
 
2096
  for ac_dir in               \
 
2097
    /usr/X11/include          \
 
2098
    /usr/X11R6/include        \
 
2099
    /usr/X11R5/include        \
 
2100
    /usr/X11R4/include        \
 
2101
                              \
 
2102
    /usr/include/X11          \
 
2103
    /usr/include/X11R6        \
 
2104
    /usr/include/X11R5        \
 
2105
    /usr/include/X11R4        \
 
2106
                              \
 
2107
    /usr/local/X11/include    \
 
2108
    /usr/local/X11R6/include  \
 
2109
    /usr/local/X11R5/include  \
 
2110
    /usr/local/X11R4/include  \
 
2111
                              \
 
2112
    /usr/local/include/X11    \
 
2113
    /usr/local/include/X11R6  \
 
2114
    /usr/local/include/X11R5  \
 
2115
    /usr/local/include/X11R4  \
 
2116
                              \
 
2117
    /usr/X386/include         \
 
2118
    /usr/x386/include         \
 
2119
    /usr/XFree86/include/X11  \
 
2120
                              \
 
2121
    /usr/include              \
 
2122
    /usr/local/include        \
 
2123
    /usr/unsupported/include  \
 
2124
    /usr/athena/include       \
 
2125
    /usr/local/x11r5/include  \
 
2126
    /usr/lpp/Xamples/include  \
 
2127
                              \
 
2128
    /usr/openwin/include      \
 
2129
    /usr/openwin/share/include \
 
2130
    ; \
 
2131
  do
 
2132
    if test -r "$ac_dir/$x_direct_test_include"; then
 
2133
      ac_x_includes=$ac_dir
 
2134
      break
 
2135
    fi
 
2136
  done
 
2137
fi
 
2138
rm -f conftest*
 
2139
fi # $ac_x_includes = NO
 
2140
 
 
2141
if test "$ac_x_libraries" = NO; then
 
2142
  # Check for the libraries.
 
2143
 
 
2144
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
 
2145
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
2146
 
 
2147
  # See if we find them without any special options.
 
2148
  # Don't add to $LIBS permanently.
 
2149
  ac_save_LIBS="$LIBS"
 
2150
  LIBS="-l$x_direct_test_library $LIBS"
 
2151
cat > conftest.$ac_ext <<EOF
 
2152
#line 2153 "configure"
 
2153
#include "confdefs.h"
 
2154
 
 
2155
int main() {
 
2156
${x_direct_test_function}()
 
2157
; return 0; }
 
2158
EOF
 
2159
if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2160
  rm -rf conftest*
 
2161
  LIBS="$ac_save_LIBS"
 
2162
# We can link X programs with no special library path.
 
2163
ac_x_libraries=
 
2164
else
 
2165
  echo "configure: failed program was:" >&5
 
2166
  cat conftest.$ac_ext >&5
 
2167
  rm -rf conftest*
 
2168
  LIBS="$ac_save_LIBS"
 
2169
# First see if replacing the include by lib works.
 
2170
# Check X11 before X11Rn because it is often a symlink to the current release.
 
2171
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
 
2172
    /usr/X11/lib          \
 
2173
    /usr/X11R6/lib        \
 
2174
    /usr/X11R5/lib        \
 
2175
    /usr/X11R4/lib        \
 
2176
                          \
 
2177
    /usr/lib/X11          \
 
2178
    /usr/lib/X11R6        \
 
2179
    /usr/lib/X11R5        \
 
2180
    /usr/lib/X11R4        \
 
2181
                          \
 
2182
    /usr/local/X11/lib    \
 
2183
    /usr/local/X11R6/lib  \
 
2184
    /usr/local/X11R5/lib  \
 
2185
    /usr/local/X11R4/lib  \
 
2186
                          \
 
2187
    /usr/local/lib/X11    \
 
2188
    /usr/local/lib/X11R6  \
 
2189
    /usr/local/lib/X11R5  \
 
2190
    /usr/local/lib/X11R4  \
 
2191
                          \
 
2192
    /usr/X386/lib         \
 
2193
    /usr/x386/lib         \
 
2194
    /usr/XFree86/lib/X11  \
 
2195
                          \
 
2196
    /usr/lib              \
 
2197
    /usr/local/lib        \
 
2198
    /usr/unsupported/lib  \
 
2199
    /usr/athena/lib       \
 
2200
    /usr/local/x11r5/lib  \
 
2201
    /usr/lpp/Xamples/lib  \
 
2202
    /lib/usr/lib/X11      \
 
2203
                          \
 
2204
    /usr/openwin/lib      \
 
2205
    /usr/openwin/share/lib \
 
2206
    ; \
 
2207
do
 
2208
  for ac_extension in a so sl; do
 
2209
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
 
2210
      ac_x_libraries=$ac_dir
 
2211
      break 2
 
2212
    fi
 
2213
  done
 
2214
done
 
2215
fi
 
2216
rm -f conftest*
 
2217
fi # $ac_x_libraries = NO
 
2218
 
 
2219
if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
 
2220
  # Didn't find X anywhere.  Cache the known absence of X.
 
2221
  ac_cv_have_x="have_x=no"
 
2222
else
 
2223
  # Record where we found X for the cache.
 
2224
  ac_cv_have_x="have_x=yes \
 
2225
                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
 
2226
fi
 
2227
fi
 
2228
  fi
 
2229
  eval "$ac_cv_have_x"
 
2230
fi # $with_x != no
 
2231
 
 
2232
if test "$have_x" != yes; then
 
2233
  echo "$ac_t""$have_x" 1>&6
 
2234
  no_x=yes
 
2235
else
 
2236
  # If each of the values was on the command line, it overrides each guess.
 
2237
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
 
2238
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
 
2239
  # Update the cache value to reflect the command line values.
 
2240
  ac_cv_have_x="have_x=yes \
 
2241
                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
 
2242
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
 
2243
fi
 
2244
 
 
2245
if test "$no_x" = yes; then
 
2246
  # Not all programs may use this symbol, but it does not hurt to define it.
 
2247
  cat >> confdefs.h <<\EOF
 
2248
#define X_DISPLAY_MISSING 1
 
2249
EOF
 
2250
 
 
2251
  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
 
2252
else
 
2253
  if test -n "$x_includes"; then
 
2254
    X_CFLAGS="$X_CFLAGS -I$x_includes"
 
2255
  fi
 
2256
 
 
2257
  # It would also be nice to do this for all -L options, not just this one.
 
2258
  if test -n "$x_libraries"; then
 
2259
    X_LIBS="$X_LIBS -L$x_libraries"
 
2260
    # For Solaris; some versions of Sun CC require a space after -R and
 
2261
    # others require no space.  Words are not sufficient . . . .
 
2262
    case "`(uname -sr) 2>/dev/null`" in
 
2263
    "SunOS 5"*)
 
2264
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
 
2265
echo "configure:2266: checking whether -R must be followed by a space" >&5
 
2266
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
 
2267
      cat > conftest.$ac_ext <<EOF
 
2268
#line 2269 "configure"
 
2269
#include "confdefs.h"
 
2270
 
 
2271
int main() {
 
2272
 
 
2273
; return 0; }
 
2274
EOF
 
2275
if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2276
  rm -rf conftest*
 
2277
  ac_R_nospace=yes
 
2278
else
 
2279
  echo "configure: failed program was:" >&5
 
2280
  cat conftest.$ac_ext >&5
 
2281
  rm -rf conftest*
 
2282
  ac_R_nospace=no
 
2283
fi
 
2284
rm -f conftest*
 
2285
      if test $ac_R_nospace = yes; then
 
2286
        echo "$ac_t""no" 1>&6
 
2287
        X_LIBS="$X_LIBS -R$x_libraries"
 
2288
      else
 
2289
        LIBS="$ac_xsave_LIBS -R $x_libraries"
 
2290
        cat > conftest.$ac_ext <<EOF
 
2291
#line 2292 "configure"
 
2292
#include "confdefs.h"
 
2293
 
 
2294
int main() {
 
2295
 
 
2296
; return 0; }
 
2297
EOF
 
2298
if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2299
  rm -rf conftest*
 
2300
  ac_R_space=yes
 
2301
else
 
2302
  echo "configure: failed program was:" >&5
 
2303
  cat conftest.$ac_ext >&5
 
2304
  rm -rf conftest*
 
2305
  ac_R_space=no
 
2306
fi
 
2307
rm -f conftest*
 
2308
        if test $ac_R_space = yes; then
 
2309
          echo "$ac_t""yes" 1>&6
 
2310
          X_LIBS="$X_LIBS -R $x_libraries"
 
2311
        else
 
2312
          echo "$ac_t""neither works" 1>&6
 
2313
        fi
 
2314
      fi
 
2315
      LIBS="$ac_xsave_LIBS"
 
2316
    esac
 
2317
  fi
 
2318
 
 
2319
  # Check for system-dependent libraries X programs must link with.
 
2320
  # Do this before checking for the system-independent R6 libraries
 
2321
  # (-lICE), since we may need -lsocket or whatever for X linking.
 
2322
 
 
2323
  if test "$ISC" = yes; then
 
2324
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
 
2325
  else
 
2326
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
 
2327
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
 
2328
    # the Alpha needs dnet_stub (dnet does not exist).
 
2329
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
 
2330
echo "configure:2331: checking for dnet_ntoa in -ldnet" >&5
 
2331
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
2332
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2333
  echo $ac_n "(cached) $ac_c" 1>&6
 
2334
else
 
2335
  ac_save_LIBS="$LIBS"
 
2336
LIBS="-ldnet  $LIBS"
 
2337
cat > conftest.$ac_ext <<EOF
 
2338
#line 2339 "configure"
 
2339
#include "confdefs.h"
 
2340
/* Override any gcc2 internal prototype to avoid an error.  */
 
2341
/* We use char because int might match the return type of a gcc2
 
2342
    builtin and then its argument prototype would still apply.  */
 
2343
char dnet_ntoa();
 
2344
 
 
2345
int main() {
 
2346
dnet_ntoa()
 
2347
; return 0; }
 
2348
EOF
 
2349
if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2350
  rm -rf conftest*
 
2351
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2352
else
 
2353
  echo "configure: failed program was:" >&5
 
2354
  cat conftest.$ac_ext >&5
 
2355
  rm -rf conftest*
 
2356
  eval "ac_cv_lib_$ac_lib_var=no"
 
2357
fi
 
2358
rm -f conftest*
 
2359
LIBS="$ac_save_LIBS"
 
2360
 
 
2361
fi
 
2362
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2363
  echo "$ac_t""yes" 1>&6
 
2364
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 
2365
else
 
2366
  echo "$ac_t""no" 1>&6
 
2367
fi
 
2368
 
 
2369
    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
 
2370
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
 
2371
echo "configure:2372: checking for dnet_ntoa in -ldnet_stub" >&5
 
2372
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
2373
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2374
  echo $ac_n "(cached) $ac_c" 1>&6
 
2375
else
 
2376
  ac_save_LIBS="$LIBS"
 
2377
LIBS="-ldnet_stub  $LIBS"
 
2378
cat > conftest.$ac_ext <<EOF
 
2379
#line 2380 "configure"
 
2380
#include "confdefs.h"
 
2381
/* Override any gcc2 internal prototype to avoid an error.  */
 
2382
/* We use char because int might match the return type of a gcc2
 
2383
    builtin and then its argument prototype would still apply.  */
 
2384
char dnet_ntoa();
 
2385
 
 
2386
int main() {
 
2387
dnet_ntoa()
 
2388
; return 0; }
 
2389
EOF
 
2390
if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2391
  rm -rf conftest*
 
2392
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2393
else
 
2394
  echo "configure: failed program was:" >&5
 
2395
  cat conftest.$ac_ext >&5
 
2396
  rm -rf conftest*
 
2397
  eval "ac_cv_lib_$ac_lib_var=no"
 
2398
fi
 
2399
rm -f conftest*
 
2400
LIBS="$ac_save_LIBS"
 
2401
 
 
2402
fi
 
2403
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2404
  echo "$ac_t""yes" 1>&6
 
2405
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
 
2406
else
 
2407
  echo "$ac_t""no" 1>&6
 
2408
fi
 
2409
 
 
2410
    fi
 
2411
 
 
2412
    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
 
2413
    # to get the SysV transport functions.
 
2414
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
 
2415
    # needs -lnsl.
 
2416
    # The nsl library prevents programs from opening the X display
 
2417
    # on Irix 5.2, according to dickey@clark.net.
 
2418
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
 
2419
echo "configure:2420: checking for gethostbyname" >&5
 
2420
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
 
2421
  echo $ac_n "(cached) $ac_c" 1>&6
 
2422
else
 
2423
  cat > conftest.$ac_ext <<EOF
 
2424
#line 2425 "configure"
 
2425
#include "confdefs.h"
 
2426
/* System header to define __stub macros and hopefully few prototypes,
 
2427
    which can conflict with char gethostbyname(); below.  */
 
2428
#include <assert.h>
 
2429
/* Override any gcc2 internal prototype to avoid an error.  */
 
2430
/* We use char because int might match the return type of a gcc2
 
2431
    builtin and then its argument prototype would still apply.  */
 
2432
char gethostbyname();
 
2433
 
 
2434
int main() {
 
2435
 
 
2436
/* The GNU C library defines this for functions which it implements
 
2437
    to always fail with ENOSYS.  Some functions are actually named
 
2438
    something starting with __ and the normal name is an alias.  */
 
2439
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 
2440
choke me
 
2441
#else
 
2442
gethostbyname();
 
2443
#endif
 
2444
 
 
2445
; return 0; }
 
2446
EOF
 
2447
if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2448
  rm -rf conftest*
 
2449
  eval "ac_cv_func_gethostbyname=yes"
 
2450
else
 
2451
  echo "configure: failed program was:" >&5
 
2452
  cat conftest.$ac_ext >&5
 
2453
  rm -rf conftest*
 
2454
  eval "ac_cv_func_gethostbyname=no"
 
2455
fi
 
2456
rm -f conftest*
 
2457
fi
 
2458
 
 
2459
if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 
2460
  echo "$ac_t""yes" 1>&6
 
2461
  :
 
2462
else
 
2463
  echo "$ac_t""no" 1>&6
 
2464
fi
 
2465
 
 
2466
    if test $ac_cv_func_gethostbyname = no; then
 
2467
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
 
2468
echo "configure:2469: checking for gethostbyname in -lnsl" >&5
 
2469
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
2470
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2471
  echo $ac_n "(cached) $ac_c" 1>&6
 
2472
else
 
2473
  ac_save_LIBS="$LIBS"
 
2474
LIBS="-lnsl  $LIBS"
 
2475
cat > conftest.$ac_ext <<EOF
 
2476
#line 2477 "configure"
 
2477
#include "confdefs.h"
 
2478
/* Override any gcc2 internal prototype to avoid an error.  */
 
2479
/* We use char because int might match the return type of a gcc2
 
2480
    builtin and then its argument prototype would still apply.  */
 
2481
char gethostbyname();
 
2482
 
 
2483
int main() {
 
2484
gethostbyname()
 
2485
; return 0; }
 
2486
EOF
 
2487
if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2488
  rm -rf conftest*
 
2489
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2490
else
 
2491
  echo "configure: failed program was:" >&5
 
2492
  cat conftest.$ac_ext >&5
 
2493
  rm -rf conftest*
 
2494
  eval "ac_cv_lib_$ac_lib_var=no"
 
2495
fi
 
2496
rm -f conftest*
 
2497
LIBS="$ac_save_LIBS"
 
2498
 
 
2499
fi
 
2500
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2501
  echo "$ac_t""yes" 1>&6
 
2502
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
 
2503
else
 
2504
  echo "$ac_t""no" 1>&6
 
2505
fi
 
2506
 
 
2507
    fi
 
2508
 
 
2509
    # lieder@skyler.mavd.honeywell.com says without -lsocket,
 
2510
    # socket/setsockopt and other routines are undefined under SCO ODT
 
2511
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
 
2512
    # on later versions), says simon@lia.di.epfl.ch: it contains
 
2513
    # gethostby* variants that don't use the nameserver (or something).
 
2514
    # -lsocket must be given before -lnsl if both are needed.
 
2515
    # We assume that if connect needs -lnsl, so does gethostbyname.
 
2516
    echo $ac_n "checking for connect""... $ac_c" 1>&6
 
2517
echo "configure:2518: checking for connect" >&5
 
2518
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
 
2519
  echo $ac_n "(cached) $ac_c" 1>&6
 
2520
else
 
2521
  cat > conftest.$ac_ext <<EOF
 
2522
#line 2523 "configure"
 
2523
#include "confdefs.h"
 
2524
/* System header to define __stub macros and hopefully few prototypes,
 
2525
    which can conflict with char connect(); below.  */
 
2526
#include <assert.h>
 
2527
/* Override any gcc2 internal prototype to avoid an error.  */
 
2528
/* We use char because int might match the return type of a gcc2
 
2529
    builtin and then its argument prototype would still apply.  */
 
2530
char connect();
 
2531
 
 
2532
int main() {
 
2533
 
 
2534
/* The GNU C library defines this for functions which it implements
 
2535
    to always fail with ENOSYS.  Some functions are actually named
 
2536
    something starting with __ and the normal name is an alias.  */
 
2537
#if defined (__stub_connect) || defined (__stub___connect)
 
2538
choke me
 
2539
#else
 
2540
connect();
 
2541
#endif
 
2542
 
 
2543
; return 0; }
 
2544
EOF
 
2545
if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2546
  rm -rf conftest*
 
2547
  eval "ac_cv_func_connect=yes"
 
2548
else
 
2549
  echo "configure: failed program was:" >&5
 
2550
  cat conftest.$ac_ext >&5
 
2551
  rm -rf conftest*
 
2552
  eval "ac_cv_func_connect=no"
 
2553
fi
 
2554
rm -f conftest*
 
2555
fi
 
2556
 
 
2557
if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
 
2558
  echo "$ac_t""yes" 1>&6
 
2559
  :
 
2560
else
 
2561
  echo "$ac_t""no" 1>&6
 
2562
fi
 
2563
 
 
2564
    if test $ac_cv_func_connect = no; then
 
2565
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
 
2566
echo "configure:2567: checking for connect in -lsocket" >&5
 
2567
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
2568
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2569
  echo $ac_n "(cached) $ac_c" 1>&6
 
2570
else
 
2571
  ac_save_LIBS="$LIBS"
 
2572
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 
2573
cat > conftest.$ac_ext <<EOF
 
2574
#line 2575 "configure"
 
2575
#include "confdefs.h"
 
2576
/* Override any gcc2 internal prototype to avoid an error.  */
 
2577
/* We use char because int might match the return type of a gcc2
 
2578
    builtin and then its argument prototype would still apply.  */
 
2579
char connect();
 
2580
 
 
2581
int main() {
 
2582
connect()
 
2583
; return 0; }
 
2584
EOF
 
2585
if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2586
  rm -rf conftest*
 
2587
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2588
else
 
2589
  echo "configure: failed program was:" >&5
 
2590
  cat conftest.$ac_ext >&5
 
2591
  rm -rf conftest*
 
2592
  eval "ac_cv_lib_$ac_lib_var=no"
 
2593
fi
 
2594
rm -f conftest*
 
2595
LIBS="$ac_save_LIBS"
 
2596
 
 
2597
fi
 
2598
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2599
  echo "$ac_t""yes" 1>&6
 
2600
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
 
2601
else
 
2602
  echo "$ac_t""no" 1>&6
 
2603
fi
 
2604
 
 
2605
    fi
 
2606
 
 
2607
    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
 
2608
    echo $ac_n "checking for remove""... $ac_c" 1>&6
 
2609
echo "configure:2610: checking for remove" >&5
 
2610
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
 
2611
  echo $ac_n "(cached) $ac_c" 1>&6
 
2612
else
 
2613
  cat > conftest.$ac_ext <<EOF
 
2614
#line 2615 "configure"
 
2615
#include "confdefs.h"
 
2616
/* System header to define __stub macros and hopefully few prototypes,
 
2617
    which can conflict with char remove(); below.  */
 
2618
#include <assert.h>
 
2619
/* Override any gcc2 internal prototype to avoid an error.  */
 
2620
/* We use char because int might match the return type of a gcc2
 
2621
    builtin and then its argument prototype would still apply.  */
 
2622
char remove();
 
2623
 
 
2624
int main() {
 
2625
 
 
2626
/* The GNU C library defines this for functions which it implements
 
2627
    to always fail with ENOSYS.  Some functions are actually named
 
2628
    something starting with __ and the normal name is an alias.  */
 
2629
#if defined (__stub_remove) || defined (__stub___remove)
 
2630
choke me
 
2631
#else
 
2632
remove();
 
2633
#endif
 
2634
 
 
2635
; return 0; }
 
2636
EOF
 
2637
if { (eval echo configure:2638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2638
  rm -rf conftest*
 
2639
  eval "ac_cv_func_remove=yes"
 
2640
else
 
2641
  echo "configure: failed program was:" >&5
 
2642
  cat conftest.$ac_ext >&5
 
2643
  rm -rf conftest*
 
2644
  eval "ac_cv_func_remove=no"
 
2645
fi
 
2646
rm -f conftest*
 
2647
fi
 
2648
 
 
2649
if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
 
2650
  echo "$ac_t""yes" 1>&6
 
2651
  :
 
2652
else
 
2653
  echo "$ac_t""no" 1>&6
 
2654
fi
 
2655
 
 
2656
    if test $ac_cv_func_remove = no; then
 
2657
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
 
2658
echo "configure:2659: checking for remove in -lposix" >&5
 
2659
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
2660
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2661
  echo $ac_n "(cached) $ac_c" 1>&6
 
2662
else
 
2663
  ac_save_LIBS="$LIBS"
 
2664
LIBS="-lposix  $LIBS"
 
2665
cat > conftest.$ac_ext <<EOF
 
2666
#line 2667 "configure"
 
2667
#include "confdefs.h"
 
2668
/* Override any gcc2 internal prototype to avoid an error.  */
 
2669
/* We use char because int might match the return type of a gcc2
 
2670
    builtin and then its argument prototype would still apply.  */
 
2671
char remove();
 
2672
 
 
2673
int main() {
 
2674
remove()
 
2675
; return 0; }
 
2676
EOF
 
2677
if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2678
  rm -rf conftest*
 
2679
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2680
else
 
2681
  echo "configure: failed program was:" >&5
 
2682
  cat conftest.$ac_ext >&5
 
2683
  rm -rf conftest*
 
2684
  eval "ac_cv_lib_$ac_lib_var=no"
 
2685
fi
 
2686
rm -f conftest*
 
2687
LIBS="$ac_save_LIBS"
 
2688
 
 
2689
fi
 
2690
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2691
  echo "$ac_t""yes" 1>&6
 
2692
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
 
2693
else
 
2694
  echo "$ac_t""no" 1>&6
 
2695
fi
 
2696
 
 
2697
    fi
 
2698
 
 
2699
    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
 
2700
    echo $ac_n "checking for shmat""... $ac_c" 1>&6
 
2701
echo "configure:2702: checking for shmat" >&5
 
2702
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
 
2703
  echo $ac_n "(cached) $ac_c" 1>&6
 
2704
else
 
2705
  cat > conftest.$ac_ext <<EOF
 
2706
#line 2707 "configure"
 
2707
#include "confdefs.h"
 
2708
/* System header to define __stub macros and hopefully few prototypes,
 
2709
    which can conflict with char shmat(); below.  */
 
2710
#include <assert.h>
 
2711
/* Override any gcc2 internal prototype to avoid an error.  */
 
2712
/* We use char because int might match the return type of a gcc2
 
2713
    builtin and then its argument prototype would still apply.  */
 
2714
char shmat();
 
2715
 
 
2716
int main() {
 
2717
 
 
2718
/* The GNU C library defines this for functions which it implements
 
2719
    to always fail with ENOSYS.  Some functions are actually named
 
2720
    something starting with __ and the normal name is an alias.  */
 
2721
#if defined (__stub_shmat) || defined (__stub___shmat)
 
2722
choke me
 
2723
#else
 
2724
shmat();
 
2725
#endif
 
2726
 
 
2727
; return 0; }
 
2728
EOF
 
2729
if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2730
  rm -rf conftest*
 
2731
  eval "ac_cv_func_shmat=yes"
 
2732
else
 
2733
  echo "configure: failed program was:" >&5
 
2734
  cat conftest.$ac_ext >&5
 
2735
  rm -rf conftest*
 
2736
  eval "ac_cv_func_shmat=no"
 
2737
fi
 
2738
rm -f conftest*
 
2739
fi
 
2740
 
 
2741
if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
 
2742
  echo "$ac_t""yes" 1>&6
 
2743
  :
 
2744
else
 
2745
  echo "$ac_t""no" 1>&6
 
2746
fi
 
2747
 
 
2748
    if test $ac_cv_func_shmat = no; then
 
2749
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
 
2750
echo "configure:2751: checking for shmat in -lipc" >&5
 
2751
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
2752
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2753
  echo $ac_n "(cached) $ac_c" 1>&6
 
2754
else
 
2755
  ac_save_LIBS="$LIBS"
 
2756
LIBS="-lipc  $LIBS"
 
2757
cat > conftest.$ac_ext <<EOF
 
2758
#line 2759 "configure"
 
2759
#include "confdefs.h"
 
2760
/* Override any gcc2 internal prototype to avoid an error.  */
 
2761
/* We use char because int might match the return type of a gcc2
 
2762
    builtin and then its argument prototype would still apply.  */
 
2763
char shmat();
 
2764
 
 
2765
int main() {
 
2766
shmat()
 
2767
; return 0; }
 
2768
EOF
 
2769
if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2770
  rm -rf conftest*
 
2771
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2772
else
 
2773
  echo "configure: failed program was:" >&5
 
2774
  cat conftest.$ac_ext >&5
 
2775
  rm -rf conftest*
 
2776
  eval "ac_cv_lib_$ac_lib_var=no"
 
2777
fi
 
2778
rm -f conftest*
 
2779
LIBS="$ac_save_LIBS"
 
2780
 
 
2781
fi
 
2782
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2783
  echo "$ac_t""yes" 1>&6
 
2784
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
 
2785
else
 
2786
  echo "$ac_t""no" 1>&6
 
2787
fi
 
2788
 
 
2789
    fi
 
2790
  fi
 
2791
 
 
2792
  # Check for libraries that X11R6 Xt/Xaw programs need.
 
2793
  ac_save_LDFLAGS="$LDFLAGS"
 
2794
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
 
2795
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
 
2796
  # check for ICE first), but we must link in the order -lSM -lICE or
 
2797
  # we get undefined symbols.  So assume we have SM if we have ICE.
 
2798
  # These have to be linked with before -lX11, unlike the other
 
2799
  # libraries we check for below, so use a different variable.
 
2800
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
 
2801
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
 
2802
echo "configure:2803: checking for IceConnectionNumber in -lICE" >&5
 
2803
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
2804
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2805
  echo $ac_n "(cached) $ac_c" 1>&6
 
2806
else
 
2807
  ac_save_LIBS="$LIBS"
 
2808
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 
2809
cat > conftest.$ac_ext <<EOF
 
2810
#line 2811 "configure"
 
2811
#include "confdefs.h"
 
2812
/* Override any gcc2 internal prototype to avoid an error.  */
 
2813
/* We use char because int might match the return type of a gcc2
 
2814
    builtin and then its argument prototype would still apply.  */
 
2815
char IceConnectionNumber();
 
2816
 
 
2817
int main() {
 
2818
IceConnectionNumber()
 
2819
; return 0; }
 
2820
EOF
 
2821
if { (eval echo configure:2822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2822
  rm -rf conftest*
 
2823
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2824
else
 
2825
  echo "configure: failed program was:" >&5
 
2826
  cat conftest.$ac_ext >&5
 
2827
  rm -rf conftest*
 
2828
  eval "ac_cv_lib_$ac_lib_var=no"
 
2829
fi
 
2830
rm -f conftest*
 
2831
LIBS="$ac_save_LIBS"
 
2832
 
 
2833
fi
 
2834
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2835
  echo "$ac_t""yes" 1>&6
 
2836
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
 
2837
else
 
2838
  echo "$ac_t""no" 1>&6
 
2839
fi
 
2840
 
 
2841
  LDFLAGS="$ac_save_LDFLAGS"
 
2842
 
 
2843
fi
 
2844
 
 
2845
echo $X_CFLAGS
 
2846
echo $X_LIBS
 
2847
echo $X_EXTRA_LIBS
 
2848
echo $X_PRE_LIBS
 
2849
 
 
2850
miss=0
 
2851
echo $ac_n "checking for main in -lXmu""... $ac_c" 1>&6
 
2852
echo "configure:2853: checking for main in -lXmu" >&5
 
2853
ac_lib_var=`echo Xmu'_'main | sed 'y%./+-%__p_%'`
 
2854
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2855
  echo $ac_n "(cached) $ac_c" 1>&6
 
2856
else
 
2857
  ac_save_LIBS="$LIBS"
 
2858
LIBS="-lXmu $X_LIBS $LIBS"
 
2859
cat > conftest.$ac_ext <<EOF
 
2860
#line 2861 "configure"
 
2861
#include "confdefs.h"
 
2862
 
 
2863
int main() {
 
2864
main()
 
2865
; return 0; }
 
2866
EOF
 
2867
if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2868
  rm -rf conftest*
 
2869
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2870
else
 
2871
  echo "configure: failed program was:" >&5
 
2872
  cat conftest.$ac_ext >&5
 
2873
  rm -rf conftest*
 
2874
  eval "ac_cv_lib_$ac_lib_var=no"
 
2875
fi
 
2876
rm -f conftest*
 
2877
LIBS="$ac_save_LIBS"
 
2878
 
 
2879
fi
 
2880
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2881
  echo "$ac_t""yes" 1>&6
 
2882
  X_LIBS="$X_LIBS -lXmu"
 
2883
else
 
2884
  echo "$ac_t""no" 1>&6
 
2885
miss=1
 
2886
fi
 
2887
 
 
2888
echo $ac_n "checking for main in -lXt""... $ac_c" 1>&6
 
2889
echo "configure:2890: checking for main in -lXt" >&5
 
2890
ac_lib_var=`echo Xt'_'main | sed 'y%./+-%__p_%'`
 
2891
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2892
  echo $ac_n "(cached) $ac_c" 1>&6
 
2893
else
 
2894
  ac_save_LIBS="$LIBS"
 
2895
LIBS="-lXt $X_LIBS $LIBS"
 
2896
cat > conftest.$ac_ext <<EOF
 
2897
#line 2898 "configure"
 
2898
#include "confdefs.h"
 
2899
 
 
2900
int main() {
 
2901
main()
 
2902
; return 0; }
 
2903
EOF
 
2904
if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2905
  rm -rf conftest*
 
2906
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2907
else
 
2908
  echo "configure: failed program was:" >&5
 
2909
  cat conftest.$ac_ext >&5
 
2910
  rm -rf conftest*
 
2911
  eval "ac_cv_lib_$ac_lib_var=no"
 
2912
fi
 
2913
rm -f conftest*
 
2914
LIBS="$ac_save_LIBS"
 
2915
 
 
2916
fi
 
2917
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2918
  echo "$ac_t""yes" 1>&6
 
2919
  X_LIBS="$X_LIBS -lXt"
 
2920
else
 
2921
  echo "$ac_t""no" 1>&6
 
2922
miss=1
 
2923
fi
 
2924
 
 
2925
echo $ac_n "checking for main in -lXext""... $ac_c" 1>&6
 
2926
echo "configure:2927: checking for main in -lXext" >&5
 
2927
ac_lib_var=`echo Xext'_'main | sed 'y%./+-%__p_%'`
 
2928
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2929
  echo $ac_n "(cached) $ac_c" 1>&6
 
2930
else
 
2931
  ac_save_LIBS="$LIBS"
 
2932
LIBS="-lXext $X_LIBS $LIBS"
 
2933
cat > conftest.$ac_ext <<EOF
 
2934
#line 2935 "configure"
 
2935
#include "confdefs.h"
 
2936
 
 
2937
int main() {
 
2938
main()
 
2939
; return 0; }
 
2940
EOF
 
2941
if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2942
  rm -rf conftest*
 
2943
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2944
else
 
2945
  echo "configure: failed program was:" >&5
 
2946
  cat conftest.$ac_ext >&5
 
2947
  rm -rf conftest*
 
2948
  eval "ac_cv_lib_$ac_lib_var=no"
 
2949
fi
 
2950
rm -f conftest*
 
2951
LIBS="$ac_save_LIBS"
 
2952
 
 
2953
fi
 
2954
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2955
  echo "$ac_t""yes" 1>&6
 
2956
  X_LIBS="$X_LIBS -lXext"
 
2957
else
 
2958
  echo "$ac_t""no" 1>&6
 
2959
miss=1
 
2960
fi
 
2961
 
 
2962
echo $ac_n "checking for main in -lXaw""... $ac_c" 1>&6
 
2963
echo "configure:2964: checking for main in -lXaw" >&5
 
2964
ac_lib_var=`echo Xaw'_'main | sed 'y%./+-%__p_%'`
 
2965
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
2966
  echo $ac_n "(cached) $ac_c" 1>&6
 
2967
else
 
2968
  ac_save_LIBS="$LIBS"
 
2969
LIBS="-lXaw $X_LIBS $LIBS"
 
2970
cat > conftest.$ac_ext <<EOF
 
2971
#line 2972 "configure"
 
2972
#include "confdefs.h"
 
2973
 
 
2974
int main() {
 
2975
main()
 
2976
; return 0; }
 
2977
EOF
 
2978
if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2979
  rm -rf conftest*
 
2980
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2981
else
 
2982
  echo "configure: failed program was:" >&5
 
2983
  cat conftest.$ac_ext >&5
 
2984
  rm -rf conftest*
 
2985
  eval "ac_cv_lib_$ac_lib_var=no"
 
2986
fi
 
2987
rm -f conftest*
 
2988
LIBS="$ac_save_LIBS"
 
2989
 
 
2990
fi
 
2991
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2992
  echo "$ac_t""yes" 1>&6
 
2993
  X_LIBS="$X_LIBS -lXaw"
 
2994
else
 
2995
  echo "$ac_t""no" 1>&6
 
2996
miss=1
 
2997
fi
 
2998
 
 
2999
echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6
 
3000
echo "configure:3001: checking for main in -lX11" >&5
 
3001
ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'`
 
3002
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
3003
  echo $ac_n "(cached) $ac_c" 1>&6
 
3004
else
 
3005
  ac_save_LIBS="$LIBS"
 
3006
LIBS="-lX11 $X_LIBS $LIBS"
 
3007
cat > conftest.$ac_ext <<EOF
 
3008
#line 3009 "configure"
 
3009
#include "confdefs.h"
 
3010
 
 
3011
int main() {
 
3012
main()
 
3013
; return 0; }
 
3014
EOF
 
3015
if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3016
  rm -rf conftest*
 
3017
  eval "ac_cv_lib_$ac_lib_var=yes"
 
3018
else
 
3019
  echo "configure: failed program was:" >&5
 
3020
  cat conftest.$ac_ext >&5
 
3021
  rm -rf conftest*
 
3022
  eval "ac_cv_lib_$ac_lib_var=no"
 
3023
fi
 
3024
rm -f conftest*
 
3025
LIBS="$ac_save_LIBS"
 
3026
 
 
3027
fi
 
3028
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
3029
  echo "$ac_t""yes" 1>&6
 
3030
  X_LIBS="$X_LIBS -lX11"
 
3031
else
 
3032
  echo "$ac_t""no" 1>&6
 
3033
miss=1
 
3034
fi
 
3035
 
 
3036
 
 
3037
if test "$miss" = "1" ; then
 
3038
        X_CFLAGS=
 
3039
        X_LIBS=
 
3040
        echo missing x libraries -- cannot compile xgcl
 
3041
fi
 
3042
 
 
3043
 
 
3044
 
 
3045
 
 
3046
 
 
3047
#
 
3048
# Dynamic loading
 
3049
#
 
3050
 
 
3051
if test "$enable_dlopen" = "yes" ; then
 
3052
 
 
3053
        echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
 
3054
echo "configure:3055: checking for dlopen in -ldl" >&5
 
3055
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
3056
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
3057
  echo $ac_n "(cached) $ac_c" 1>&6
 
3058
else
 
3059
  ac_save_LIBS="$LIBS"
 
3060
LIBS="-ldl  $LIBS"
 
3061
cat > conftest.$ac_ext <<EOF
 
3062
#line 3063 "configure"
 
3063
#include "confdefs.h"
 
3064
/* Override any gcc2 internal prototype to avoid an error.  */
 
3065
/* We use char because int might match the return type of a gcc2
 
3066
    builtin and then its argument prototype would still apply.  */
 
3067
char dlopen();
 
3068
 
 
3069
int main() {
 
3070
dlopen()
 
3071
; return 0; }
 
3072
EOF
 
3073
if { (eval echo configure:3074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3074
  rm -rf conftest*
 
3075
  eval "ac_cv_lib_$ac_lib_var=yes"
 
3076
else
 
3077
  echo "configure: failed program was:" >&5
 
3078
  cat conftest.$ac_ext >&5
 
3079
  rm -rf conftest*
 
3080
  eval "ac_cv_lib_$ac_lib_var=no"
 
3081
fi
 
3082
rm -f conftest*
 
3083
LIBS="$ac_save_LIBS"
 
3084
 
 
3085
fi
 
3086
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
3087
  echo "$ac_t""yes" 1>&6
 
3088
  have_dl=1
 
3089
else
 
3090
  echo "$ac_t""no" 1>&6
 
3091
have_dl=0
 
3092
fi
 
3093
 
 
3094
        if test "$have_dl" = "0" ; then
 
3095
                echo "Cannot find dlopen in -dl"
 
3096
                exit 1
 
3097
        fi
 
3098
 
 
3099
        TLIBS="$TLIBS -ldl -rdynamic"
 
3100
        cat >> confdefs.h <<\EOF
 
3101
#define USE_DLOPEN 1
 
3102
EOF
 
3103
 
 
3104
fi
 
3105
 
 
3106
if test "$enable_statsysbfd" = "yes" || test "$enable_dynsysbfd" = "yes" ; then
 
3107
        ac_safe=`echo "bfd.h" | sed 'y%./+-%__p_%'`
 
3108
echo $ac_n "checking for bfd.h""... $ac_c" 1>&6
 
3109
echo "configure:3110: checking for bfd.h" >&5
 
3110
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
3111
  echo $ac_n "(cached) $ac_c" 1>&6
 
3112
else
 
3113
  cat > conftest.$ac_ext <<EOF
 
3114
#line 3115 "configure"
 
3115
#include "confdefs.h"
 
3116
#include <bfd.h>
 
3117
EOF
 
3118
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
3119
{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
3120
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
3121
if test -z "$ac_err"; then
 
3122
  rm -rf conftest*
 
3123
  eval "ac_cv_header_$ac_safe=yes"
 
3124
else
 
3125
  echo "$ac_err" >&5
 
3126
  echo "configure: failed program was:" >&5
 
3127
  cat conftest.$ac_ext >&5
 
3128
  rm -rf conftest*
 
3129
  eval "ac_cv_header_$ac_safe=no"
 
3130
fi
 
3131
rm -f conftest*
 
3132
fi
 
3133
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
3134
  echo "$ac_t""yes" 1>&6
 
3135
  echo $ac_n "checking for bfd_init in -lbfd""... $ac_c" 1>&6
 
3136
echo "configure:3137: checking for bfd_init in -lbfd" >&5
 
3137
ac_lib_var=`echo bfd'_'bfd_init | sed 'y%./+-%__p_%'`
 
3138
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
3139
  echo $ac_n "(cached) $ac_c" 1>&6
 
3140
else
 
3141
  ac_save_LIBS="$LIBS"
 
3142
LIBS="-lbfd -liberty $LIBS"
 
3143
cat > conftest.$ac_ext <<EOF
 
3144
#line 3145 "configure"
 
3145
#include "confdefs.h"
 
3146
/* Override any gcc2 internal prototype to avoid an error.  */
 
3147
/* We use char because int might match the return type of a gcc2
 
3148
    builtin and then its argument prototype would still apply.  */
 
3149
char bfd_init();
 
3150
 
 
3151
int main() {
 
3152
bfd_init()
 
3153
; return 0; }
 
3154
EOF
 
3155
if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3156
  rm -rf conftest*
 
3157
  eval "ac_cv_lib_$ac_lib_var=yes"
 
3158
else
 
3159
  echo "configure: failed program was:" >&5
 
3160
  cat conftest.$ac_ext >&5
 
3161
  rm -rf conftest*
 
3162
  eval "ac_cv_lib_$ac_lib_var=no"
 
3163
fi
 
3164
rm -f conftest*
 
3165
LIBS="$ac_save_LIBS"
 
3166
 
 
3167
fi
 
3168
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
3169
  echo "$ac_t""yes" 1>&6
 
3170
  #
 
3171
                # Old binutils appear to need CONST defined to const
 
3172
                #
 
3173
                        echo $ac_n "checking if need to define CONST for bfd""... $ac_c" 1>&6
 
3174
echo "configure:3175: checking if need to define CONST for bfd" >&5
 
3175
                        if test "$cross_compiling" = yes; then
 
3176
  echo "$ac_t""cannot use bfd" 1>&6 exit 1;
 
3177
else
 
3178
  cat > conftest.$ac_ext <<EOF
 
3179
#line 3180 "configure"
 
3180
#include "confdefs.h"
 
3181
#define IN_GCC
 
3182
                                    #include <bfd.h>
 
3183
                                    int main() { symbol_info t; return 0;}
 
3184
EOF
 
3185
if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3186
then
 
3187
  echo "$ac_t""no" 1>&6
 
3188
else
 
3189
  echo "configure: failed program was:" >&5
 
3190
  cat conftest.$ac_ext >&5
 
3191
  rm -fr conftest*
 
3192
  if test "$cross_compiling" = yes; then
 
3193
  echo "$ac_t""cannot use bfd" 1>&6 exit 1;
 
3194
else
 
3195
  cat > conftest.$ac_ext <<EOF
 
3196
#line 3197 "configure"
 
3197
#include "confdefs.h"
 
3198
#define CONST const
 
3199
                                            #define IN_GCC
 
3200
                                            #include <bfd.h>
 
3201
                                            int main() {symbol_info t; return 0;}
 
3202
EOF
 
3203
if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3204
then
 
3205
  echo "$ac_t""yes" 1>&6 
 
3206
                                        cat >> confdefs.h <<\EOF
 
3207
#define NEED_CONST 1
 
3208
EOF
 
3209
 
 
3210
else
 
3211
  echo "configure: failed program was:" >&5
 
3212
  cat conftest.$ac_ext >&5
 
3213
  rm -fr conftest*
 
3214
  echo "$ac_t""cannot use bfd" 1>&6 exit 1;
 
3215
fi
 
3216
rm -fr conftest*
 
3217
fi
 
3218
 
 
3219
fi
 
3220
rm -fr conftest*
 
3221
fi
 
3222
 
 
3223
                        
 
3224
else
 
3225
  echo "$ac_t""no" 1>&6
 
3226
fi
 
3227
 
 
3228
else
 
3229
  echo "$ac_t""no" 1>&6
 
3230
fi
 
3231
 
 
3232
 
 
3233
        cat >> confdefs.h <<\EOF
 
3234
#define HAVE_LIBBFD 1
 
3235
EOF
 
3236
 
 
3237
 
 
3238
#
 
3239
# BFD boolean syntax
 
3240
#
 
3241
 
 
3242
        echo $ac_n "checking for useable bfd_boolean""... $ac_c" 1>&6
 
3243
echo "configure:3244: checking for useable bfd_boolean" >&5
 
3244
        if test "$cross_compiling" = yes; then
 
3245
  echo "$ac_t""no" 1>&6
 
3246
else
 
3247
  cat > conftest.$ac_ext <<EOF
 
3248
#line 3249 "configure"
 
3249
#include "confdefs.h"
 
3250
#define IN_GCC
 
3251
                    #include <bfd.h>
 
3252
                    bfd_boolean foo() {return FALSE;}
 
3253
                    int main() {return 0;}
 
3254
EOF
 
3255
if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3256
then
 
3257
  echo "$ac_t""yes" 1>&6 
 
3258
                cat >> confdefs.h <<\EOF
 
3259
#define HAVE_BFD_BOOLEAN 1
 
3260
EOF
 
3261
 
 
3262
else
 
3263
  echo "configure: failed program was:" >&5
 
3264
  cat conftest.$ac_ext >&5
 
3265
  rm -fr conftest*
 
3266
  echo "$ac_t""no" 1>&6
 
3267
fi
 
3268
rm -fr conftest*
 
3269
fi
 
3270
 
 
3271
 
 
3272
 
 
3273
#
 
3274
# FIXME: Need to workaround mingw before this point -- CM
 
3275
#
 
3276
        if test "$enable_statsysbfd" = "yes" && ! $CC -v 2>&1 | fgrep ming > /dev/null ; then
 
3277
                echo 'int main() {bfd_init();bfd_openr("/dev/null",0);return 0;}' >foo.c
 
3278
                MP=`$CC  -Wl,-M  -static -o foo foo.c -lbfd -liberty 2>&1 | grep -v : | tr '()' '\012\012' | $AWK '{print $NF}' | sort | uniq`
 
3279
                rm -f foo.c foo
 
3280
                if echo $MP | tr ' ' '\012' | grep -q libbfd.a ; then
 
3281
                   TLIBS="$TLIBS `echo $MP | tr ' ' '\012' | grep libbfd.a`"
 
3282
                else
 
3283
                   echo Guessing path to libbfd.a due to gcc bug
 
3284
                   TLIBS="$TLIBS /usr/lib/libbfd.a"
 
3285
                fi   
 
3286
                if echo $MP | tr ' ' '\012' | grep -q libiberty.a ; then
 
3287
                   TLIBS="$TLIBS `echo $MP | tr ' ' '\012' | grep libiberty.a`"
 
3288
                else
 
3289
                   echo Guessing path to libiberty.a due to gcc bug
 
3290
                   TLIBS="$TLIBS /usr/lib/libiberty.a"
 
3291
                fi   
 
3292
        else
 
3293
                TLIBS="$TLIBS -lbfd -liberty"
 
3294
        fi
 
3295
fi
 
3296
 
 
3297
if test "$enable_locbfd" = "yes" ; then
 
3298
 
 
3299
        # check for gettext.  It is part of glibc, but others
 
3300
        # need GNU gettext separately.
 
3301
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 
3302
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
 
3303
echo "configure:3304: checking for libintl.h" >&5
 
3304
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
3305
  echo $ac_n "(cached) $ac_c" 1>&6
 
3306
else
 
3307
  cat > conftest.$ac_ext <<EOF
 
3308
#line 3309 "configure"
 
3309
#include "confdefs.h"
 
3310
#include <libintl.h>
 
3311
EOF
 
3312
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
3313
{ (eval echo configure:3314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
3314
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
3315
if test -z "$ac_err"; then
 
3316
  rm -rf conftest*
 
3317
  eval "ac_cv_header_$ac_safe=yes"
 
3318
else
 
3319
  echo "$ac_err" >&5
 
3320
  echo "configure: failed program was:" >&5
 
3321
  cat conftest.$ac_ext >&5
 
3322
  rm -rf conftest*
 
3323
  eval "ac_cv_header_$ac_safe=no"
 
3324
fi
 
3325
rm -f conftest*
 
3326
fi
 
3327
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
3328
  echo "$ac_t""yes" 1>&6
 
3329
  true
 
3330
else
 
3331
  echo "$ac_t""no" 1>&6
 
3332
{ echo "configure: error: libintl.h (gettext) not found" 1>&2; exit 1; }
 
3333
fi
 
3334
 
 
3335
        
 
3336
echo $ac_n "checking for library containing dgettext""... $ac_c" 1>&6
 
3337
echo "configure:3338: checking for library containing dgettext" >&5
 
3338
if eval "test \"`echo '$''{'ac_cv_search_dgettext'+set}'`\" = set"; then
 
3339
  echo $ac_n "(cached) $ac_c" 1>&6
 
3340
else
 
3341
  ac_func_search_save_LIBS="$LIBS"
 
3342
ac_cv_search_dgettext="no"
 
3343
cat > conftest.$ac_ext <<EOF
 
3344
#line 3345 "configure"
 
3345
#include "confdefs.h"
 
3346
/* Override any gcc2 internal prototype to avoid an error.  */
 
3347
/* We use char because int might match the return type of a gcc2
 
3348
    builtin and then its argument prototype would still apply.  */
 
3349
char dgettext();
 
3350
 
 
3351
int main() {
 
3352
dgettext()
 
3353
; return 0; }
 
3354
EOF
 
3355
if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3356
  rm -rf conftest*
 
3357
  ac_cv_search_dgettext="none required"
 
3358
else
 
3359
  echo "configure: failed program was:" >&5
 
3360
  cat conftest.$ac_ext >&5
 
3361
fi
 
3362
rm -f conftest*
 
3363
test "$ac_cv_search_dgettext" = "no" && for i in intl; do
 
3364
LIBS="-l$i  $ac_func_search_save_LIBS"
 
3365
cat > conftest.$ac_ext <<EOF
 
3366
#line 3367 "configure"
 
3367
#include "confdefs.h"
 
3368
/* Override any gcc2 internal prototype to avoid an error.  */
 
3369
/* We use char because int might match the return type of a gcc2
 
3370
    builtin and then its argument prototype would still apply.  */
 
3371
char dgettext();
 
3372
 
 
3373
int main() {
 
3374
dgettext()
 
3375
; return 0; }
 
3376
EOF
 
3377
if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3378
  rm -rf conftest*
 
3379
  ac_cv_search_dgettext="-l$i"
 
3380
break
 
3381
else
 
3382
  echo "configure: failed program was:" >&5
 
3383
  cat conftest.$ac_ext >&5
 
3384
fi
 
3385
rm -f conftest*
 
3386
done
 
3387
LIBS="$ac_func_search_save_LIBS"
 
3388
fi
 
3389
 
 
3390
echo "$ac_t""$ac_cv_search_dgettext" 1>&6
 
3391
if test "$ac_cv_search_dgettext" != "no"; then
 
3392
  test "$ac_cv_search_dgettext" = "none required" || LIBS="$ac_cv_search_dgettext $LIBS"
 
3393
  true
 
3394
else :
 
3395
  { echo "configure: error: gettext library not found" 1>&2; exit 1; }
 
3396
fi
 
3397
 
 
3398
        echo "#"
 
3399
        echo "#"
 
3400
        echo "# -------------------------"
 
3401
        echo "# Subconfigure of LIBIBERTY"
 
3402
        echo "#"
 
3403
        echo "#"
 
3404
        cd binutils/libiberty && chmod +x configure && ./configure && cd ../..
 
3405
#       MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " 
 
3406
        echo "#"
 
3407
        echo "#"
 
3408
        echo "#"
 
3409
        echo "# Subconfigure of LIBIBERTY done"
 
3410
        echo "# ------------------------------"
 
3411
        echo "#"
 
3412
        echo "#"
 
3413
        echo "#"
 
3414
        echo "# -------------------"
 
3415
        echo "# Subconfigure of BFD"
 
3416
        echo "#"
 
3417
        echo "#"
 
3418
        cd binutils/bfd && chmod +x configure && ./configure && cd ../..
 
3419
#       MY_SUBDIRS="$MY_SUBDIRS binutils/bfd " 
 
3420
        echo "#"
 
3421
        echo "#"
 
3422
        echo "#"
 
3423
        echo "# Subconfigure of BFD done"
 
3424
        echo "# ------------------------"
 
3425
        echo "#"
 
3426
        TLIBS="$TLIBS `pwd`/binutils/bfd/libbfd.a `pwd`/binutils/libiberty/libiberty.a"
 
3427
        cat >> confdefs.h <<\EOF
 
3428
#define HAVE_LIBBFD 1
 
3429
EOF
 
3430
 
 
3431
        BUILD_BFD="h/bfd.h h/bfdlink.h h/ansidecl.h h/symcat.h"
 
3432
        
 
3433
fi
 
3434
 
 
3435
#AC_CONFIG_SUBDIRS($MY_SUBDIRS)
 
3436
 
 
3437
# Find where Data begins.  This is used by the storage allocation
 
3438
# mechanism, in the PAGE macro.  This offset is subtracted from
 
3439
# addresses, in calculating a page for an address in the heap.
 
3440
 
 
3441
echo $ac_n "checking size of long""... $ac_c" 1>&6
 
3442
echo "configure:3443: checking size of long" >&5
 
3443
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
 
3444
  echo $ac_n "(cached) $ac_c" 1>&6
 
3445
else
 
3446
  if test "$cross_compiling" = yes; then
 
3447
  ac_cv_sizeof_long=0
 
3448
else
 
3449
  cat > conftest.$ac_ext <<EOF
 
3450
#line 3451 "configure"
 
3451
#include "confdefs.h"
 
3452
#include <stdio.h>
 
3453
#include <sys/types.h>
 
3454
main()
 
3455
{
 
3456
  FILE *f=fopen("conftestval", "w");
 
3457
  if (!f) exit(1);
 
3458
  fprintf(f, "%d\n", sizeof(long));
 
3459
  exit(0);
 
3460
}
 
3461
EOF
 
3462
if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3463
then
 
3464
  ac_cv_sizeof_long=`cat conftestval`
 
3465
else
 
3466
  echo "configure: failed program was:" >&5
 
3467
  cat conftest.$ac_ext >&5
 
3468
  rm -fr conftest*
 
3469
  ac_cv_sizeof_long=0
 
3470
fi
 
3471
rm -fr conftest*
 
3472
fi
 
3473
 
 
3474
fi
 
3475
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
 
3476
cat >> confdefs.h <<EOF
 
3477
#define SIZEOF_LONG $ac_cv_sizeof_long
 
3478
EOF
 
3479
 
 
3480
 
 
3481
echo $ac_n "checking sizeof struct contblock""... $ac_c" 1>&6
 
3482
echo "configure:3483: checking sizeof struct contblock" >&5
 
3483
 
 
3484
# work around MSYS pwd result incompatibility
 
3485
if test "$use" = "mingw" ; then
 
3486
if test "$cross_compiling" = yes; then
 
3487
  echo Cannot find sizeof struct contblock;exit 1
 
3488
else
 
3489
  cat > conftest.$ac_ext <<EOF
 
3490
#line 3491 "configure"
 
3491
#include "confdefs.h"
 
3492
#include <stdio.h>
 
3493
        #define EXTER
 
3494
        #include "$MP_INCLUDE"
 
3495
        #include "h/enum.h"
 
3496
        #include "h/object.h"
 
3497
        int main(int argc,char **argv,char **envp) {
 
3498
        FILE *f=fopen("conftest1","w");
 
3499
        fprintf(f,"%u",sizeof(struct contblock));
 
3500
        fclose(f);
 
3501
        return 0;
 
3502
        }
 
3503
EOF
 
3504
if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3505
then
 
3506
  sizeof_contblock=`cat conftest1`
 
3507
else
 
3508
  echo "configure: failed program was:" >&5
 
3509
  cat conftest.$ac_ext >&5
 
3510
  rm -fr conftest*
 
3511
  echo Cannot find sizeof struct contblock;exit 1
 
3512
fi
 
3513
rm -fr conftest*
 
3514
fi
 
3515
 
 
3516
else
 
3517
if test "$cross_compiling" = yes; then
 
3518
  echo Cannot find sizeof struct contblock;exit 1
 
3519
else
 
3520
  cat > conftest.$ac_ext <<EOF
 
3521
#line 3522 "configure"
 
3522
#include "confdefs.h"
 
3523
#include <stdio.h>
 
3524
        #define EXTER
 
3525
        #include "$MP_INCLUDE"
 
3526
        #include "`pwd`/h/enum.h"
 
3527
        #include "`pwd`/h/object.h"
 
3528
        int main(int argc,char **argv,char **envp) {
 
3529
        FILE *f=fopen("conftest1","w");
 
3530
        fprintf(f,"%u",sizeof(struct contblock));
 
3531
        fclose(f);
 
3532
        return 0;
 
3533
        }
 
3534
EOF
 
3535
if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3536
then
 
3537
  sizeof_contblock=`cat conftest1`
 
3538
else
 
3539
  echo "configure: failed program was:" >&5
 
3540
  cat conftest.$ac_ext >&5
 
3541
  rm -fr conftest*
 
3542
  echo Cannot find sizeof struct contblock;exit 1
 
3543
fi
 
3544
rm -fr conftest*
 
3545
fi
 
3546
 
 
3547
fi
 
3548
echo "$ac_t""$sizeof_contblock" 1>&6
 
3549
cat >> confdefs.h <<EOF
 
3550
#define SIZEOF_CONTBLOCK $sizeof_contblock
 
3551
EOF
 
3552
 
 
3553
 
 
3554
 
 
3555
 
 
3556
for ac_hdr in endian.h
 
3557
do
 
3558
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
3559
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
3560
echo "configure:3561: checking for $ac_hdr" >&5
 
3561
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
3562
  echo $ac_n "(cached) $ac_c" 1>&6
 
3563
else
 
3564
  cat > conftest.$ac_ext <<EOF
 
3565
#line 3566 "configure"
 
3566
#include "confdefs.h"
 
3567
#include <$ac_hdr>
 
3568
EOF
 
3569
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
3570
{ (eval echo configure:3571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
3571
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
3572
if test -z "$ac_err"; then
 
3573
  rm -rf conftest*
 
3574
  eval "ac_cv_header_$ac_safe=yes"
 
3575
else
 
3576
  echo "$ac_err" >&5
 
3577
  echo "configure: failed program was:" >&5
 
3578
  cat conftest.$ac_ext >&5
 
3579
  rm -rf conftest*
 
3580
  eval "ac_cv_header_$ac_safe=no"
 
3581
fi
 
3582
rm -f conftest*
 
3583
fi
 
3584
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
3585
  echo "$ac_t""yes" 1>&6
 
3586
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
3587
  cat >> confdefs.h <<EOF
 
3588
#define $ac_tr_hdr 1
 
3589
EOF
 
3590
 echo $ac_n "checking "endianness"""... $ac_c" 1>&6
 
3591
echo "configure:3592: checking "endianness"" >&5
 
3592
        if test "$cross_compiling" = yes; then
 
3593
  echo "$ac_t""big" 1>&6
 
3594
else
 
3595
  cat > conftest.$ac_ext <<EOF
 
3596
#line 3597 "configure"
 
3597
#include "confdefs.h"
 
3598
#define __ARMEB__
 
3599
                #include <endian.h> 
 
3600
                int main() { return BYTE_ORDER == __LITTLE_ENDIAN ? 0 : 1;}
 
3601
EOF
 
3602
if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3603
then
 
3604
  cat >> confdefs.h <<\EOF
 
3605
#define LITTLE_END 1
 
3606
EOF
 
3607
 echo "$ac_t""little" 1>&6
 
3608
else
 
3609
  echo "configure: failed program was:" >&5
 
3610
  cat conftest.$ac_ext >&5
 
3611
  rm -fr conftest*
 
3612
  echo "$ac_t""big" 1>&6
 
3613
fi
 
3614
rm -fr conftest*
 
3615
fi
 
3616
 
 
3617
else
 
3618
  echo "$ac_t""no" 1>&6
 
3619
fi
 
3620
done
 
3621
 
 
3622
 
 
3623
 
 
3624
 
 
3625
# On systems with execshield, brk is randomized.  We need to catch
 
3626
# this and restore the traditional behavior here
 
3627
 
 
3628
echo $ac_n "checking for sbrk""... $ac_c" 1>&6
 
3629
echo "configure:3630: checking for sbrk" >&5
 
3630
HAVE_SBRK=""
 
3631
if test "$cross_compiling" = yes; then
 
3632
  echo "$ac_t""no: WARNING you must be able to emulate sbrk: as on mingw or macosx" 1>&6
 
3633
else
 
3634
  cat > conftest.$ac_ext <<EOF
 
3635
#line 3636 "configure"
 
3636
#include "confdefs.h"
 
3637
#include <unistd.h>
 
3638
            #include <stdio.h>
 
3639
            int main() {
 
3640
                FILE *f;
 
3641
                if (!(f=fopen("conftest1","w")))
 
3642
                        return -1;
 
3643
                fprintf(f,"%u",sbrk(0));
 
3644
                return 0;
 
3645
                }
 
3646
EOF
 
3647
if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3648
then
 
3649
  HAVE_SBRK=1
 
3650
                echo "$ac_t""yes" 1>&6
 
3651
else
 
3652
  echo "configure: failed program was:" >&5
 
3653
  cat conftest.$ac_ext >&5
 
3654
  rm -fr conftest*
 
3655
  echo "$ac_t""no: WARNING you must be able to emulate sbrk: as on mingw or macosx" 1>&6
 
3656
fi
 
3657
rm -fr conftest*
 
3658
fi
 
3659
 
 
3660
 
 
3661
if test "$HAVE_SBRK" = "1" ; then
 
3662
        echo $ac_n "checking for randomized sbrk""... $ac_c" 1>&6
 
3663
echo "configure:3664: checking for randomized sbrk" >&5
 
3664
        if test "$cross_compiling" = yes; then
 
3665
  SBRK=0
 
3666
else
 
3667
  cat > conftest.$ac_ext <<EOF
 
3668
#line 3669 "configure"
 
3669
#include "confdefs.h"
 
3670
#include <unistd.h>
 
3671
                    #include <stdio.h>
 
3672
                    int main() {
 
3673
                        FILE *f;
 
3674
                        if (!(f=fopen("conftest1","w")))
 
3675
                                return -1;
 
3676
                        fprintf(f,"%u",sbrk(0));
 
3677
                        return 0;
 
3678
                        }
 
3679
EOF
 
3680
if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3681
then
 
3682
  SBRK=`cat conftest1`
 
3683
else
 
3684
  echo "configure: failed program was:" >&5
 
3685
  cat conftest.$ac_ext >&5
 
3686
  rm -fr conftest*
 
3687
  SBRK=0
 
3688
fi
 
3689
rm -fr conftest*
 
3690
fi
 
3691
 
 
3692
        if test "$SBRK" = "0" ; then
 
3693
                echo "$ac_t""cannot trap sbrk" 1>&6
 
3694
                exit 1
 
3695
        fi
 
3696
        if test "$cross_compiling" = yes; then
 
3697
  SBRK1=0
 
3698
else
 
3699
  cat > conftest.$ac_ext <<EOF
 
3700
#line 3701 "configure"
 
3701
#include "confdefs.h"
 
3702
#include <unistd.h>
 
3703
                    #include <stdio.h>
 
3704
                    int main() {
 
3705
                        FILE *f;
 
3706
                        if (!(f=fopen("conftest1","w")))
 
3707
                                return -1;
 
3708
                        fprintf(f,"%u",sbrk(0));
 
3709
                        return 0;
 
3710
                        }
 
3711
EOF
 
3712
if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3713
then
 
3714
  SBRK1=`cat conftest1`
 
3715
else
 
3716
  echo "configure: failed program was:" >&5
 
3717
  cat conftest.$ac_ext >&5
 
3718
  rm -fr conftest*
 
3719
  SBRK1=0
 
3720
fi
 
3721
rm -fr conftest*
 
3722
fi
 
3723
 
 
3724
        if test "$SBRK1" = "0" ; then
 
3725
                echo "$ac_t""cannot trap sbrk" 1>&6
 
3726
                exit 1
 
3727
        fi
 
3728
        
 
3729
        if test "$SBRK" != "$SBRK1" ; then
 
3730
                echo "$ac_t""yes" 1>&6
 
3731
                echo $ac_n "checking for randomized brk remedy""... $ac_c" 1>&6
 
3732
echo "configure:3733: checking for randomized brk remedy" >&5
 
3733
                if test "$cross_compiling" = yes; then
 
3734
  SBRK=0
 
3735
else
 
3736
  cat > conftest.$ac_ext <<EOF
 
3737
#line 3738 "configure"
 
3738
#include "confdefs.h"
 
3739
#include <syscall.h>
 
3740
                            #include <linux/personality.h>
 
3741
                            #include <stdio.h>
 
3742
                            #include <unistd.h>
 
3743
                            int main(int argc,char * argv[]) {
 
3744
                                FILE *f;
 
3745
                                #if SIZEOF_LONG == 4
 
3746
                                if (!syscall(SYS_personality,PER_LINUX32))
 
3747
                                #else
 
3748
                                if (!syscall(SYS_personality,PER_LINUX))
 
3749
                                #endif
 
3750
                                        execvp(argv[0],argv);
 
3751
                                if (!(f=fopen("conftest1","w")))
 
3752
                                        return -1;
 
3753
                                fprintf(f,"%u",sbrk(0));
 
3754
                                return 0;
 
3755
                                }
 
3756
EOF
 
3757
if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3758
then
 
3759
  SBRK=`cat conftest1`
 
3760
else
 
3761
  echo "configure: failed program was:" >&5
 
3762
  cat conftest.$ac_ext >&5
 
3763
  rm -fr conftest*
 
3764
  SBRK=0
 
3765
fi
 
3766
rm -fr conftest*
 
3767
fi
 
3768
 
 
3769
                if test "$SBRK" = "0" ; then
 
3770
                        echo "$ac_t""cannot trap sbrk" 1>&6
 
3771
                        exit 1
 
3772
                fi
 
3773
                if test "$cross_compiling" = yes; then
 
3774
  SBRK1=0
 
3775
else
 
3776
  cat > conftest.$ac_ext <<EOF
 
3777
#line 3778 "configure"
 
3778
#include "confdefs.h"
 
3779
#include <syscall.h>
 
3780
                            #include <linux/personality.h>
 
3781
                            #include <stdio.h>
 
3782
                            #include <unistd.h>
 
3783
                            int main(int argc,char * argv[]) {
 
3784
                                FILE *f;
 
3785
                                #if SIZEOF_LONG == 4
 
3786
                                if (!syscall(SYS_personality,PER_LINUX32))
 
3787
                                #else
 
3788
                                if (!syscall(SYS_personality,PER_LINUX))
 
3789
                                #endif
 
3790
                                        execvp(argv[0],argv);
 
3791
                                if (!(f=fopen("conftest1","w")))
 
3792
                                        return -1;
 
3793
                                fprintf(f,"%u",sbrk(0));
 
3794
                                return 0;
 
3795
                                }
 
3796
EOF
 
3797
if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3798
then
 
3799
  SBRK1=`cat conftest1`
 
3800
else
 
3801
  echo "configure: failed program was:" >&5
 
3802
  cat conftest.$ac_ext >&5
 
3803
  rm -fr conftest*
 
3804
  SBRK1=0
 
3805
fi
 
3806
rm -fr conftest*
 
3807
fi
 
3808
 
 
3809
                if test "$SBRK1" = "0" ; then
 
3810
                        echo "$ac_t""cannot trap sbrk" 1>&6
 
3811
                        exit 1
 
3812
                fi
 
3813
                if test "$SBRK" = "$SBRK1" ; then
 
3814
                        echo "$ac_t""yes" 1>&6
 
3815
                        cat >> confdefs.h <<\EOF
 
3816
#define NEED_NONRANDOM_SBRK 1
 
3817
EOF
 
3818
 
 
3819
                else
 
3820
                        echo "$ac_t""no" 1>&6
 
3821
                        echo "Cannot build with randomized sbrk"
 
3822
                        exit 1
 
3823
                fi 
 
3824
        else
 
3825
                echo "$ac_t""no" 1>&6
 
3826
        fi
 
3827
fi
 
3828
 
 
3829
 
 
3830
old_LDFLAGS="$LDFLAGS"
 
3831
LDFLAGS="$TLDFLAGS"
 
3832
echo $ac_n "checking "finding DBEGIN"""... $ac_c" 1>&6
 
3833
echo "configure:3834: checking "finding DBEGIN"" >&5
 
3834
if test "$cross_compiling" = yes; then
 
3835
  dbegin=0
 
3836
else
 
3837
  cat > conftest.$ac_ext <<EOF
 
3838
#line 3839 "configure"
 
3839
#include "confdefs.h"
 
3840
#include <stdio.h>
 
3841
            #include <stdlib.h>
 
3842
            #ifdef NEED_NONRANDOM_SBRK
 
3843
                   #include <syscall.h>
 
3844
                   #include <linux/personality.h>
 
3845
                   #include <unistd.h>
 
3846
           #endif
 
3847
int
 
3848
main(int argc,char * argv[])
 
3849
{
 
3850
  char *b;
 
3851
  FILE *fp;
 
3852
 
 
3853
#ifdef NEED_NONRANDOM_SBRK
 
3854
#if SIZEOF_LONG == 4
 
3855
if (!syscall(SYS_personality,PER_LINUX32))
 
3856
#else
 
3857
if (!syscall(SYS_personality,PER_LINUX))
 
3858
#endif
 
3859
     execvp(argv[0],argv);
 
3860
#endif  
 
3861
  b = (void *) malloc(1000);
 
3862
  fp = fopen("conftest1","w");
 
3863
 
 
3864
#ifdef _WIN32
 
3865
  fprintf(fp,"_dbegin");
 
3866
#else
 
3867
#if defined (__APPLE__) && defined (__MACH__)
 
3868
  fprintf(fp,"get_dbegin()");
 
3869
#else
 
3870
  fprintf(fp,"0x%lx",((unsigned long) b) & ~(unsigned long)0xffffff);
 
3871
#endif
 
3872
#endif
 
3873
  fclose(fp);
 
3874
  return 0;
 
3875
}
 
3876
EOF
 
3877
if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3878
then
 
3879
  dbegin=`cat conftest1`
 
3880
else
 
3881
  echo "configure: failed program was:" >&5
 
3882
  cat conftest.$ac_ext >&5
 
3883
  rm -fr conftest*
 
3884
  dbegin=0
 
3885
fi
 
3886
rm -fr conftest*
 
3887
fi
 
3888
 
 
3889
cat >> confdefs.h <<EOF
 
3890
#define DBEGIN $dbegin \
 
3891
/* where data begins */
 
3892
 
 
3893
EOF
 
3894
 
 
3895
echo "$ac_t""got $dbegin" 1>&6
 
3896
LDFLAGS="$old_LDFLAGS"
 
3897
 
 
3898
 
 
3899
echo $ac_n "checking "finding CSTACK_ADDRESS"""... $ac_c" 1>&6
 
3900
echo "configure:3901: checking "finding CSTACK_ADDRESS"" >&5
 
3901
if test "$cross_compiling" = yes; then
 
3902
  cstack_address=0
 
3903
else
 
3904
  cat > conftest.$ac_ext <<EOF
 
3905
#line 3906 "configure"
 
3906
#include "confdefs.h"
 
3907
#include <stdio.h>
 
3908
main()
 
3909
{
 
3910
  char *b ;
 
3911
  FILE *fp = fopen("conftest1","w");
 
3912
  fprintf(fp,"%ld",((long) &b));
 
3913
  fclose(fp);
 
3914
  return 0;
 
3915
}
 
3916
EOF
 
3917
if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3918
then
 
3919
  cstack_address=`cat conftest1`
 
3920
else
 
3921
  echo "configure: failed program was:" >&5
 
3922
  cat conftest.$ac_ext >&5
 
3923
  rm -fr conftest*
 
3924
  cstack_address=0
 
3925
fi
 
3926
rm -fr conftest*
 
3927
fi
 
3928
 
 
3929
cat >> confdefs.h <<EOF
 
3930
#define CSTACK_ADDRESS $cstack_address \
 
3931
 
 
3932
EOF
 
3933
 
 
3934
echo "$ac_t""got $cstack_address" 1>&6
 
3935
 
 
3936
 
 
3937
 
 
3938
echo $ac_n "checking "sizeof long long int"""... $ac_c" 1>&6
 
3939
echo "configure:3940: checking "sizeof long long int"" >&5
 
3940
if test "$cross_compiling" = yes; then
 
3941
  echo "$ac_t""no" 1>&6
 
3942
 
 
3943
else
 
3944
  cat > conftest.$ac_ext <<EOF
 
3945
#line 3946 "configure"
 
3946
#include "confdefs.h"
 
3947
#include <stdio.h>
 
3948
main()
 
3949
{
 
3950
  if (sizeof(long long int) == 2*sizeof(long)) return 0;
 
3951
  return 1;
 
3952
}
 
3953
 
 
3954
EOF
 
3955
if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
3956
then
 
3957
  cat >> confdefs.h <<\EOF
 
3958
#define HAVE_LONG_LONG 1
 
3959
EOF
 
3960
 
 
3961
echo "$ac_t""yes" 1>&6
 
3962
else
 
3963
  echo "configure: failed program was:" >&5
 
3964
  cat conftest.$ac_ext >&5
 
3965
  rm -fr conftest*
 
3966
  echo "$ac_t""no" 1>&6
 
3967
fi
 
3968
rm -fr conftest*
 
3969
fi
 
3970
 
 
3971
 
 
3972
 
 
3973
 
 
3974
# readline
 
3975
# Check whether --enable-readline or --disable-readline was given.
 
3976
if test "${enable_readline+set}" = set; then
 
3977
  enableval="$enable_readline"
 
3978
  :
 
3979
else
 
3980
  enable_readline="yes"
 
3981
fi
 
3982
 
 
3983
 
 
3984
# ansi lisp
 
3985
# Check whether --enable-ansi or --disable-ansi was given.
 
3986
if test "${enable_ansi+set}" = set; then
 
3987
  enableval="$enable_ansi"
 
3988
  :
 
3989
else
 
3990
  enable_ansi="no"
 
3991
fi
 
3992
 
 
3993
 
 
3994
if test "$enable_ansi" = "yes" ; then
 
3995
        SYSTEM=ansi_gcl
 
3996
        cat >> confdefs.h <<\EOF
 
3997
#define ANSI_COMMON_LISP 1
 
3998
EOF
 
3999
 
 
4000
        CLSTANDARD=ANSI
 
4001
else
 
4002
        SYSTEM=gcl
 
4003
        CLSTANDARD=CLtL1
 
4004
fi
 
4005
 
 
4006
FLISP="saved_$SYSTEM"
 
4007
 
 
4008
 
 
4009
 
 
4010
 
 
4011
# pagewidth
 
4012
echo $ac_n "checking for pagewidth""... $ac_c" 1>&6
 
4013
echo "configure:4014: checking for pagewidth" >&5
 
4014
if test "$cross_compiling" = yes; then
 
4015
  PAGEWIDTH=0
 
4016
else
 
4017
  cat > conftest.$ac_ext <<EOF
 
4018
#line 4019 "configure"
 
4019
#include "confdefs.h"
 
4020
#include <stdio.h>
 
4021
            #include <unistd.h>
 
4022
int main() {size_t i=getpagesize(),j; 
 
4023
            FILE *fp=fopen("conftest1","w");
 
4024
            for (j=0;i>>=1;j++);
 
4025
            fprintf(fp,"%u",j);
 
4026
            return 0;}
 
4027
EOF
 
4028
if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4029
then
 
4030
  PAGEWIDTH=`cat conftest1`
 
4031
else
 
4032
  echo "configure: failed program was:" >&5
 
4033
  cat conftest.$ac_ext >&5
 
4034
  rm -fr conftest*
 
4035
  PAGEWIDTH=0
 
4036
fi
 
4037
rm -fr conftest*
 
4038
fi
 
4039
 
 
4040
echo "$ac_t""$PAGEWIDTH" 1>&6
 
4041
cat >> confdefs.h <<EOF
 
4042
#define PAGEWIDTH $PAGEWIDTH
 
4043
EOF
 
4044
 
 
4045
 
 
4046
 
 
4047
# Maximum number of pages
 
4048
 
 
4049
 
 
4050
 
 
4051
# Check if Posix compliant getcwd exists, if not we'll use getwd.
 
4052
for ac_func in getcwd
 
4053
do
 
4054
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4055
echo "configure:4056: checking for $ac_func" >&5
 
4056
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
 
4057
  echo $ac_n "(cached) $ac_c" 1>&6
 
4058
else
 
4059
  cat > conftest.$ac_ext <<EOF
 
4060
#line 4061 "configure"
 
4061
#include "confdefs.h"
 
4062
/* System header to define __stub macros and hopefully few prototypes,
 
4063
    which can conflict with char $ac_func(); below.  */
 
4064
#include <assert.h>
 
4065
/* Override any gcc2 internal prototype to avoid an error.  */
 
4066
/* We use char because int might match the return type of a gcc2
 
4067
    builtin and then its argument prototype would still apply.  */
 
4068
char $ac_func();
 
4069
 
 
4070
int main() {
 
4071
 
 
4072
/* The GNU C library defines this for functions which it implements
 
4073
    to always fail with ENOSYS.  Some functions are actually named
 
4074
    something starting with __ and the normal name is an alias.  */
 
4075
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4076
choke me
 
4077
#else
 
4078
$ac_func();
 
4079
#endif
 
4080
 
 
4081
; return 0; }
 
4082
EOF
 
4083
if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4084
  rm -rf conftest*
 
4085
  eval "ac_cv_func_$ac_func=yes"
 
4086
else
 
4087
  echo "configure: failed program was:" >&5
 
4088
  cat conftest.$ac_ext >&5
 
4089
  rm -rf conftest*
 
4090
  eval "ac_cv_func_$ac_func=no"
 
4091
fi
 
4092
rm -f conftest*
 
4093
fi
 
4094
 
 
4095
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4096
  echo "$ac_t""yes" 1>&6
 
4097
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4098
  cat >> confdefs.h <<EOF
 
4099
#define $ac_tr_func 1
 
4100
EOF
 
4101
 
 
4102
else
 
4103
  echo "$ac_t""no" 1>&6
 
4104
fi
 
4105
done
 
4106
 
 
4107
for ac_func in getwd
 
4108
do
 
4109
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4110
echo "configure:4111: checking for $ac_func" >&5
 
4111
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
 
4112
  echo $ac_n "(cached) $ac_c" 1>&6
 
4113
else
 
4114
  cat > conftest.$ac_ext <<EOF
 
4115
#line 4116 "configure"
 
4116
#include "confdefs.h"
 
4117
/* System header to define __stub macros and hopefully few prototypes,
 
4118
    which can conflict with char $ac_func(); below.  */
 
4119
#include <assert.h>
 
4120
/* Override any gcc2 internal prototype to avoid an error.  */
 
4121
/* We use char because int might match the return type of a gcc2
 
4122
    builtin and then its argument prototype would still apply.  */
 
4123
char $ac_func();
 
4124
 
 
4125
int main() {
 
4126
 
 
4127
/* The GNU C library defines this for functions which it implements
 
4128
    to always fail with ENOSYS.  Some functions are actually named
 
4129
    something starting with __ and the normal name is an alias.  */
 
4130
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4131
choke me
 
4132
#else
 
4133
$ac_func();
 
4134
#endif
 
4135
 
 
4136
; return 0; }
 
4137
EOF
 
4138
if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4139
  rm -rf conftest*
 
4140
  eval "ac_cv_func_$ac_func=yes"
 
4141
else
 
4142
  echo "configure: failed program was:" >&5
 
4143
  cat conftest.$ac_ext >&5
 
4144
  rm -rf conftest*
 
4145
  eval "ac_cv_func_$ac_func=no"
 
4146
fi
 
4147
rm -f conftest*
 
4148
fi
 
4149
 
 
4150
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4151
  echo "$ac_t""yes" 1>&6
 
4152
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4153
  cat >> confdefs.h <<EOF
 
4154
#define $ac_tr_func 1
 
4155
EOF
 
4156
 
 
4157
else
 
4158
  echo "$ac_t""no" 1>&6
 
4159
fi
 
4160
done
 
4161
 
 
4162
echo $ac_n "checking for uname""... $ac_c" 1>&6
 
4163
echo "configure:4164: checking for uname" >&5
 
4164
if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
 
4165
  echo $ac_n "(cached) $ac_c" 1>&6
 
4166
else
 
4167
  cat > conftest.$ac_ext <<EOF
 
4168
#line 4169 "configure"
 
4169
#include "confdefs.h"
 
4170
/* System header to define __stub macros and hopefully few prototypes,
 
4171
    which can conflict with char uname(); below.  */
 
4172
#include <assert.h>
 
4173
/* Override any gcc2 internal prototype to avoid an error.  */
 
4174
/* We use char because int might match the return type of a gcc2
 
4175
    builtin and then its argument prototype would still apply.  */
 
4176
char uname();
 
4177
 
 
4178
int main() {
 
4179
 
 
4180
/* The GNU C library defines this for functions which it implements
 
4181
    to always fail with ENOSYS.  Some functions are actually named
 
4182
    something starting with __ and the normal name is an alias.  */
 
4183
#if defined (__stub_uname) || defined (__stub___uname)
 
4184
choke me
 
4185
#else
 
4186
uname();
 
4187
#endif
 
4188
 
 
4189
; return 0; }
 
4190
EOF
 
4191
if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4192
  rm -rf conftest*
 
4193
  eval "ac_cv_func_uname=yes"
 
4194
else
 
4195
  echo "configure: failed program was:" >&5
 
4196
  cat conftest.$ac_ext >&5
 
4197
  rm -rf conftest*
 
4198
  eval "ac_cv_func_uname=no"
 
4199
fi
 
4200
rm -f conftest*
 
4201
fi
 
4202
 
 
4203
if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
 
4204
  echo "$ac_t""yes" 1>&6
 
4205
  :
 
4206
else
 
4207
  echo "$ac_t""no" 1>&6
 
4208
cat >> confdefs.h <<\EOF
 
4209
#define NO_UNAME 1
 
4210
EOF
 
4211
 
 
4212
fi
 
4213
 
 
4214
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
 
4215
echo "configure:4216: checking for gettimeofday" >&5
 
4216
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
 
4217
  echo $ac_n "(cached) $ac_c" 1>&6
 
4218
else
 
4219
  cat > conftest.$ac_ext <<EOF
 
4220
#line 4221 "configure"
 
4221
#include "confdefs.h"
 
4222
/* System header to define __stub macros and hopefully few prototypes,
 
4223
    which can conflict with char gettimeofday(); below.  */
 
4224
#include <assert.h>
 
4225
/* Override any gcc2 internal prototype to avoid an error.  */
 
4226
/* We use char because int might match the return type of a gcc2
 
4227
    builtin and then its argument prototype would still apply.  */
 
4228
char gettimeofday();
 
4229
 
 
4230
int main() {
 
4231
 
 
4232
/* The GNU C library defines this for functions which it implements
 
4233
    to always fail with ENOSYS.  Some functions are actually named
 
4234
    something starting with __ and the normal name is an alias.  */
 
4235
#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
 
4236
choke me
 
4237
#else
 
4238
gettimeofday();
 
4239
#endif
 
4240
 
 
4241
; return 0; }
 
4242
EOF
 
4243
if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4244
  rm -rf conftest*
 
4245
  eval "ac_cv_func_gettimeofday=yes"
 
4246
else
 
4247
  echo "configure: failed program was:" >&5
 
4248
  cat conftest.$ac_ext >&5
 
4249
  rm -rf conftest*
 
4250
  eval "ac_cv_func_gettimeofday=no"
 
4251
fi
 
4252
rm -f conftest*
 
4253
fi
 
4254
 
 
4255
if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
 
4256
  echo "$ac_t""yes" 1>&6
 
4257
  :
 
4258
else
 
4259
  echo "$ac_t""no" 1>&6
 
4260
cat >> confdefs.h <<\EOF
 
4261
#define NO_GETTOD 1
 
4262
EOF
 
4263
 
 
4264
fi
 
4265
 
 
4266
 
 
4267
 
 
4268
for ac_hdr in sys/ioctl.h
 
4269
do
 
4270
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4271
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4272
echo "configure:4273: checking for $ac_hdr" >&5
 
4273
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4274
  echo $ac_n "(cached) $ac_c" 1>&6
 
4275
else
 
4276
  cat > conftest.$ac_ext <<EOF
 
4277
#line 4278 "configure"
 
4278
#include "confdefs.h"
 
4279
#include <$ac_hdr>
 
4280
EOF
 
4281
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4282
{ (eval echo configure:4283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4283
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4284
if test -z "$ac_err"; then
 
4285
  rm -rf conftest*
 
4286
  eval "ac_cv_header_$ac_safe=yes"
 
4287
else
 
4288
  echo "$ac_err" >&5
 
4289
  echo "configure: failed program was:" >&5
 
4290
  cat conftest.$ac_ext >&5
 
4291
  rm -rf conftest*
 
4292
  eval "ac_cv_header_$ac_safe=no"
 
4293
fi
 
4294
rm -f conftest*
 
4295
fi
 
4296
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4297
  echo "$ac_t""yes" 1>&6
 
4298
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4299
  cat >> confdefs.h <<EOF
 
4300
#define $ac_tr_hdr 1
 
4301
EOF
 
4302
 
 
4303
else
 
4304
  echo "$ac_t""no" 1>&6
 
4305
fi
 
4306
done
 
4307
 
 
4308
 
 
4309
# OpenBSD has elf_abi.h instead of elf.h
 
4310
for ac_hdr in elf.h elf_abi.h
 
4311
do
 
4312
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4313
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4314
echo "configure:4315: checking for $ac_hdr" >&5
 
4315
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4316
  echo $ac_n "(cached) $ac_c" 1>&6
 
4317
else
 
4318
  cat > conftest.$ac_ext <<EOF
 
4319
#line 4320 "configure"
 
4320
#include "confdefs.h"
 
4321
#include <$ac_hdr>
 
4322
EOF
 
4323
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4324
{ (eval echo configure:4325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4325
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4326
if test -z "$ac_err"; then
 
4327
  rm -rf conftest*
 
4328
  eval "ac_cv_header_$ac_safe=yes"
 
4329
else
 
4330
  echo "$ac_err" >&5
 
4331
  echo "configure: failed program was:" >&5
 
4332
  cat conftest.$ac_ext >&5
 
4333
  rm -rf conftest*
 
4334
  eval "ac_cv_header_$ac_safe=no"
 
4335
fi
 
4336
rm -f conftest*
 
4337
fi
 
4338
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4339
  echo "$ac_t""yes" 1>&6
 
4340
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4341
  cat >> confdefs.h <<EOF
 
4342
#define $ac_tr_hdr 1
 
4343
EOF
 
4344
 
 
4345
else
 
4346
  echo "$ac_t""no" 1>&6
 
4347
fi
 
4348
done
 
4349
 
 
4350
 
 
4351
 
 
4352
#--------------------------------------------------------------------
 
4353
#       The code below deals with several issues related to gettimeofday:
 
4354
#       1. Some systems don't provide a gettimeofday function at all
 
4355
#          (set NO_GETTOD if this is the case).
 
4356
#       2. SGI systems don't use the BSD form of the gettimeofday function,
 
4357
#          but they have a BSDgettimeofday function that can be used instead.
 
4358
#       3. See if gettimeofday is declared in the <sys/time.h> header file.
 
4359
#          if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
 
4360
#          declare it.
 
4361
#--------------------------------------------------------------------
 
4362
 
 
4363
echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
 
4364
echo "configure:4365: checking for BSDgettimeofday" >&5
 
4365
if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
 
4366
  echo $ac_n "(cached) $ac_c" 1>&6
 
4367
else
 
4368
  cat > conftest.$ac_ext <<EOF
 
4369
#line 4370 "configure"
 
4370
#include "confdefs.h"
 
4371
/* System header to define __stub macros and hopefully few prototypes,
 
4372
    which can conflict with char BSDgettimeofday(); below.  */
 
4373
#include <assert.h>
 
4374
/* Override any gcc2 internal prototype to avoid an error.  */
 
4375
/* We use char because int might match the return type of a gcc2
 
4376
    builtin and then its argument prototype would still apply.  */
 
4377
char BSDgettimeofday();
 
4378
 
 
4379
int main() {
 
4380
 
 
4381
/* The GNU C library defines this for functions which it implements
 
4382
    to always fail with ENOSYS.  Some functions are actually named
 
4383
    something starting with __ and the normal name is an alias.  */
 
4384
#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
 
4385
choke me
 
4386
#else
 
4387
BSDgettimeofday();
 
4388
#endif
 
4389
 
 
4390
; return 0; }
 
4391
EOF
 
4392
if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4393
  rm -rf conftest*
 
4394
  eval "ac_cv_func_BSDgettimeofday=yes"
 
4395
else
 
4396
  echo "configure: failed program was:" >&5
 
4397
  cat conftest.$ac_ext >&5
 
4398
  rm -rf conftest*
 
4399
  eval "ac_cv_func_BSDgettimeofday=no"
 
4400
fi
 
4401
rm -f conftest*
 
4402
fi
 
4403
 
 
4404
if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
 
4405
  echo "$ac_t""yes" 1>&6
 
4406
  cat >> confdefs.h <<\EOF
 
4407
#define HAVE_BSDGETTIMEOFDAY 1
 
4408
EOF
 
4409
 
 
4410
else
 
4411
  echo "$ac_t""no" 1>&6
 
4412
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
 
4413
echo "configure:4414: checking for gettimeofday" >&5
 
4414
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
 
4415
  echo $ac_n "(cached) $ac_c" 1>&6
 
4416
else
 
4417
  cat > conftest.$ac_ext <<EOF
 
4418
#line 4419 "configure"
 
4419
#include "confdefs.h"
 
4420
/* System header to define __stub macros and hopefully few prototypes,
 
4421
    which can conflict with char gettimeofday(); below.  */
 
4422
#include <assert.h>
 
4423
/* Override any gcc2 internal prototype to avoid an error.  */
 
4424
/* We use char because int might match the return type of a gcc2
 
4425
    builtin and then its argument prototype would still apply.  */
 
4426
char gettimeofday();
 
4427
 
 
4428
int main() {
 
4429
 
 
4430
/* The GNU C library defines this for functions which it implements
 
4431
    to always fail with ENOSYS.  Some functions are actually named
 
4432
    something starting with __ and the normal name is an alias.  */
 
4433
#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
 
4434
choke me
 
4435
#else
 
4436
gettimeofday();
 
4437
#endif
 
4438
 
 
4439
; return 0; }
 
4440
EOF
 
4441
if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4442
  rm -rf conftest*
 
4443
  eval "ac_cv_func_gettimeofday=yes"
 
4444
else
 
4445
  echo "configure: failed program was:" >&5
 
4446
  cat conftest.$ac_ext >&5
 
4447
  rm -rf conftest*
 
4448
  eval "ac_cv_func_gettimeofday=no"
 
4449
fi
 
4450
rm -f conftest*
 
4451
fi
 
4452
 
 
4453
if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
 
4454
  echo "$ac_t""yes" 1>&6
 
4455
  :
 
4456
else
 
4457
  echo "$ac_t""no" 1>&6
 
4458
cat >> confdefs.h <<\EOF
 
4459
#define NO_GETTOD 1
 
4460
EOF
 
4461
 
 
4462
fi
 
4463
 
 
4464
fi
 
4465
 
 
4466
 
 
4467
echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
 
4468
echo "configure:4469: checking for gettimeofday declaration" >&5
 
4469
 
 
4470
cat > conftest.$ac_ext <<EOF
 
4471
#line 4472 "configure"
 
4472
#include "confdefs.h"
 
4473
#include <sys/time.h>
 
4474
EOF
 
4475
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
4476
  egrep "gettimeofday" >/dev/null 2>&1; then
 
4477
  rm -rf conftest*
 
4478
  echo "$ac_t""present" 1>&6
 
4479
else
 
4480
  rm -rf conftest*
 
4481
  echo "$ac_t""missing" 1>&6
 
4482
                 cat >> confdefs.h <<\EOF
 
4483
#define GETTOD_NOT_DECLARED 1
 
4484
EOF
 
4485
 
 
4486
fi
 
4487
rm -f conftest*
 
4488
 
 
4489
 
 
4490
 
 
4491
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
 
4492
echo "configure:4493: checking for sin in -lm" >&5
 
4493
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 
4494
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
4495
  echo $ac_n "(cached) $ac_c" 1>&6
 
4496
else
 
4497
  ac_save_LIBS="$LIBS"
 
4498
LIBS="-lm  $LIBS"
 
4499
cat > conftest.$ac_ext <<EOF
 
4500
#line 4501 "configure"
 
4501
#include "confdefs.h"
 
4502
/* Override any gcc2 internal prototype to avoid an error.  */
 
4503
/* We use char because int might match the return type of a gcc2
 
4504
    builtin and then its argument prototype would still apply.  */
 
4505
char sin();
 
4506
 
 
4507
int main() {
 
4508
sin()
 
4509
; return 0; }
 
4510
EOF
 
4511
if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4512
  rm -rf conftest*
 
4513
  eval "ac_cv_lib_$ac_lib_var=yes"
 
4514
else
 
4515
  echo "configure: failed program was:" >&5
 
4516
  cat conftest.$ac_ext >&5
 
4517
  rm -rf conftest*
 
4518
  eval "ac_cv_lib_$ac_lib_var=no"
 
4519
fi
 
4520
rm -f conftest*
 
4521
LIBS="$ac_save_LIBS"
 
4522
 
 
4523
fi
 
4524
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
4525
  echo "$ac_t""yes" 1>&6
 
4526
  LIBS="${LIBS} -lm"
 
4527
else
 
4528
  echo "$ac_t""no" 1>&6
 
4529
true
 
4530
fi
 
4531
 
 
4532
echo $ac_n "checking for main in -lmingwex""... $ac_c" 1>&6
 
4533
echo "configure:4534: checking for main in -lmingwex" >&5
 
4534
ac_lib_var=`echo mingwex'_'main | sed 'y%./+-%__p_%'`
 
4535
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
4536
  echo $ac_n "(cached) $ac_c" 1>&6
 
4537
else
 
4538
  ac_save_LIBS="$LIBS"
 
4539
LIBS="-lmingwex  $LIBS"
 
4540
cat > conftest.$ac_ext <<EOF
 
4541
#line 4542 "configure"
 
4542
#include "confdefs.h"
 
4543
 
 
4544
int main() {
 
4545
main()
 
4546
; return 0; }
 
4547
EOF
 
4548
if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4549
  rm -rf conftest*
 
4550
  eval "ac_cv_lib_$ac_lib_var=yes"
 
4551
else
 
4552
  echo "configure: failed program was:" >&5
 
4553
  cat conftest.$ac_ext >&5
 
4554
  rm -rf conftest*
 
4555
  eval "ac_cv_lib_$ac_lib_var=no"
 
4556
fi
 
4557
rm -f conftest*
 
4558
LIBS="$ac_save_LIBS"
 
4559
 
 
4560
fi
 
4561
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
4562
  echo "$ac_t""yes" 1>&6
 
4563
  LIBS="${LIBS} -lmingwex"
 
4564
else
 
4565
  echo "$ac_t""no" 1>&6
 
4566
true
 
4567
fi
 
4568
 
 
4569
 
 
4570
EXTRA_LOBJS=
 
4571
if test "$try_japi" = "yes" ; then
 
4572
   for ac_hdr in japi.h
 
4573
do
 
4574
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4575
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4576
echo "configure:4577: checking for $ac_hdr" >&5
 
4577
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4578
  echo $ac_n "(cached) $ac_c" 1>&6
 
4579
else
 
4580
  cat > conftest.$ac_ext <<EOF
 
4581
#line 4582 "configure"
 
4582
#include "confdefs.h"
 
4583
#include <$ac_hdr>
 
4584
EOF
 
4585
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4586
{ (eval echo configure:4587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4587
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4588
if test -z "$ac_err"; then
 
4589
  rm -rf conftest*
 
4590
  eval "ac_cv_header_$ac_safe=yes"
 
4591
else
 
4592
  echo "$ac_err" >&5
 
4593
  echo "configure: failed program was:" >&5
 
4594
  cat conftest.$ac_ext >&5
 
4595
  rm -rf conftest*
 
4596
  eval "ac_cv_header_$ac_safe=no"
 
4597
fi
 
4598
rm -f conftest*
 
4599
fi
 
4600
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4601
  echo "$ac_t""yes" 1>&6
 
4602
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4603
  cat >> confdefs.h <<EOF
 
4604
#define $ac_tr_hdr 1
 
4605
EOF
 
4606
 cat >> confdefs.h <<\EOF
 
4607
#define HAVE_JAPI_H 1
 
4608
EOF
 
4609
 
 
4610
                                 EXTRA_LOBJS="${EXTRA_LOBJS} gcl_japi.o"
 
4611
                                 LIBS="${LIBS} -ljapi -lwsock32" 
 
4612
else
 
4613
  echo "$ac_t""no" 1>&6
 
4614
fi
 
4615
done
 
4616
 
 
4617
fi
 
4618
if test "$use" = "mingw" ; then
 
4619
 if test "$try_xdr" = "yes" ; then
 
4620
   for ac_hdr in rpc/rpc.h
 
4621
do
 
4622
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4623
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4624
echo "configure:4625: checking for $ac_hdr" >&5
 
4625
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4626
  echo $ac_n "(cached) $ac_c" 1>&6
 
4627
else
 
4628
  cat > conftest.$ac_ext <<EOF
 
4629
#line 4630 "configure"
 
4630
#include "confdefs.h"
 
4631
#include <$ac_hdr>
 
4632
EOF
 
4633
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4634
{ (eval echo configure:4635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4635
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4636
if test -z "$ac_err"; then
 
4637
  rm -rf conftest*
 
4638
  eval "ac_cv_header_$ac_safe=yes"
 
4639
else
 
4640
  echo "$ac_err" >&5
 
4641
  echo "configure: failed program was:" >&5
 
4642
  cat conftest.$ac_ext >&5
 
4643
  rm -rf conftest*
 
4644
  eval "ac_cv_header_$ac_safe=no"
 
4645
fi
 
4646
rm -f conftest*
 
4647
fi
 
4648
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4649
  echo "$ac_t""yes" 1>&6
 
4650
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4651
  cat >> confdefs.h <<EOF
 
4652
#define $ac_tr_hdr 1
 
4653
EOF
 
4654
 cat >> confdefs.h <<\EOF
 
4655
#define HAVE_XDR 1
 
4656
EOF
 
4657
 
 
4658
                                 LIBS="${LIBS} -loncrpc" 
 
4659
else
 
4660
  echo "$ac_t""no" 1>&6
 
4661
fi
 
4662
done
 
4663
 
 
4664
 fi
 
4665
else
 
4666
 if test "$try_xdr" = "yes" ; then
 
4667
   for ac_hdr in rpc/rpc.h
 
4668
do
 
4669
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4670
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4671
echo "configure:4672: checking for $ac_hdr" >&5
 
4672
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4673
  echo $ac_n "(cached) $ac_c" 1>&6
 
4674
else
 
4675
  cat > conftest.$ac_ext <<EOF
 
4676
#line 4677 "configure"
 
4677
#include "confdefs.h"
 
4678
#include <$ac_hdr>
 
4679
EOF
 
4680
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4681
{ (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4682
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4683
if test -z "$ac_err"; then
 
4684
  rm -rf conftest*
 
4685
  eval "ac_cv_header_$ac_safe=yes"
 
4686
else
 
4687
  echo "$ac_err" >&5
 
4688
  echo "configure: failed program was:" >&5
 
4689
  cat conftest.$ac_ext >&5
 
4690
  rm -rf conftest*
 
4691
  eval "ac_cv_header_$ac_safe=no"
 
4692
fi
 
4693
rm -f conftest*
 
4694
fi
 
4695
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4696
  echo "$ac_t""yes" 1>&6
 
4697
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4698
  cat >> confdefs.h <<EOF
 
4699
#define $ac_tr_hdr 1
 
4700
EOF
 
4701
 cat >> confdefs.h <<\EOF
 
4702
#define HAVE_XDR 1
 
4703
EOF
 
4704
 
 
4705
                                 LIBS="${LIBS} -lrpc" 
 
4706
else
 
4707
  echo "$ac_t""no" 1>&6
 
4708
fi
 
4709
done
 
4710
 
 
4711
 fi
 
4712
fi
 
4713
 
 
4714
# Should really find a way to check for prototypes, but this 
 
4715
# basically works for now.  CM
 
4716
#
 
4717
for ac_hdr in math.h
 
4718
do
 
4719
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4720
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4721
echo "configure:4722: checking for $ac_hdr" >&5
 
4722
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4723
  echo $ac_n "(cached) $ac_c" 1>&6
 
4724
else
 
4725
  cat > conftest.$ac_ext <<EOF
 
4726
#line 4727 "configure"
 
4727
#include "confdefs.h"
 
4728
#include <$ac_hdr>
 
4729
EOF
 
4730
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4731
{ (eval echo configure:4732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4732
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4733
if test -z "$ac_err"; then
 
4734
  rm -rf conftest*
 
4735
  eval "ac_cv_header_$ac_safe=yes"
 
4736
else
 
4737
  echo "$ac_err" >&5
 
4738
  echo "configure: failed program was:" >&5
 
4739
  cat conftest.$ac_ext >&5
 
4740
  rm -rf conftest*
 
4741
  eval "ac_cv_header_$ac_safe=no"
 
4742
fi
 
4743
rm -f conftest*
 
4744
fi
 
4745
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4746
  echo "$ac_t""yes" 1>&6
 
4747
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4748
  cat >> confdefs.h <<EOF
 
4749
#define $ac_tr_hdr 1
 
4750
EOF
 
4751
 cat >> confdefs.h <<\EOF
 
4752
#define HAVE_MATH_H 1
 
4753
EOF
 
4754
 
 
4755
else
 
4756
  echo "$ac_t""no" 1>&6
 
4757
fi
 
4758
done
 
4759
 
 
4760
 
 
4761
#
 
4762
# For DBL_MAX et. al. on (only) certain Linux arches, apparently CM
 
4763
#
 
4764
for ac_hdr in values.h
 
4765
do
 
4766
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4767
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4768
echo "configure:4769: checking for $ac_hdr" >&5
 
4769
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4770
  echo $ac_n "(cached) $ac_c" 1>&6
 
4771
else
 
4772
  cat > conftest.$ac_ext <<EOF
 
4773
#line 4774 "configure"
 
4774
#include "confdefs.h"
 
4775
#include <$ac_hdr>
 
4776
EOF
 
4777
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4778
{ (eval echo configure:4779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4779
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4780
if test -z "$ac_err"; then
 
4781
  rm -rf conftest*
 
4782
  eval "ac_cv_header_$ac_safe=yes"
 
4783
else
 
4784
  echo "$ac_err" >&5
 
4785
  echo "configure: failed program was:" >&5
 
4786
  cat conftest.$ac_ext >&5
 
4787
  rm -rf conftest*
 
4788
  eval "ac_cv_header_$ac_safe=no"
 
4789
fi
 
4790
rm -f conftest*
 
4791
fi
 
4792
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4793
  echo "$ac_t""yes" 1>&6
 
4794
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4795
  cat >> confdefs.h <<EOF
 
4796
#define $ac_tr_hdr 1
 
4797
EOF
 
4798
 cat >> confdefs.h <<\EOF
 
4799
#define HAVE_VALUES_H 1
 
4800
EOF
 
4801
 
 
4802
else
 
4803
  echo "$ac_t""no" 1>&6
 
4804
fi
 
4805
done
 
4806
 
 
4807
 
 
4808
#
 
4809
# Sparc solaris keeps this in float.h, rework either/or with values.h later
 
4810
#
 
4811
for ac_hdr in float.h
 
4812
do
 
4813
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4814
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4815
echo "configure:4816: checking for $ac_hdr" >&5
 
4816
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
4817
  echo $ac_n "(cached) $ac_c" 1>&6
 
4818
else
 
4819
  cat > conftest.$ac_ext <<EOF
 
4820
#line 4821 "configure"
 
4821
#include "confdefs.h"
 
4822
#include <$ac_hdr>
 
4823
EOF
 
4824
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4825
{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4826
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4827
if test -z "$ac_err"; then
 
4828
  rm -rf conftest*
 
4829
  eval "ac_cv_header_$ac_safe=yes"
 
4830
else
 
4831
  echo "$ac_err" >&5
 
4832
  echo "configure: failed program was:" >&5
 
4833
  cat conftest.$ac_ext >&5
 
4834
  rm -rf conftest*
 
4835
  eval "ac_cv_header_$ac_safe=no"
 
4836
fi
 
4837
rm -f conftest*
 
4838
fi
 
4839
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4840
  echo "$ac_t""yes" 1>&6
 
4841
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4842
  cat >> confdefs.h <<EOF
 
4843
#define $ac_tr_hdr 1
 
4844
EOF
 
4845
 cat >> confdefs.h <<\EOF
 
4846
#define HAVE_FLOAT_H 1
 
4847
EOF
 
4848
 
 
4849
else
 
4850
  echo "$ac_t""no" 1>&6
 
4851
fi
 
4852
done
 
4853
 
 
4854
 
 
4855
#
 
4856
# The second alternative is for solaris.  This needs to be
 
4857
# a more comprehensive later, i.e. checking that the fpclass
 
4858
# test makes sense.  CM
 
4859
#
 
4860
echo $ac_n "checking for isnormal""... $ac_c" 1>&6
 
4861
echo "configure:4862: checking for isnormal" >&5
 
4862
if test "$cross_compiling" = yes; then
 
4863
  HAVE_ISNORMAL=0 echo "$ac_t""no" 1>&6
 
4864
else
 
4865
  cat > conftest.$ac_ext <<EOF
 
4866
#line 4867 "configure"
 
4867
#include "confdefs.h"
 
4868
#define _GNU_SOURCE
 
4869
            #include <math.h>
 
4870
            int main() {
 
4871
                float f;
 
4872
                return isnormal(f) || !isnormal(f) ? 0 : 1;
 
4873
                }
 
4874
EOF
 
4875
if { (eval echo configure:4876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4876
then
 
4877
  cat >> confdefs.h <<\EOF
 
4878
#define HAVE_ISNORMAL 1
 
4879
EOF
 
4880
 echo "$ac_t""yes" 1>&6
 
4881
else
 
4882
  echo "configure: failed program was:" >&5
 
4883
  cat conftest.$ac_ext >&5
 
4884
  rm -fr conftest*
 
4885
  echo $ac_n "checking for fpclass in ieeefp.h""... $ac_c" 1>&6
 
4886
echo "configure:4887: checking for fpclass in ieeefp.h" >&5
 
4887
                if test "$cross_compiling" = yes; then
 
4888
  HAVE_IEEEFP=0 echo "$ac_t""no" 1>&6
 
4889
else
 
4890
  cat > conftest.$ac_ext <<EOF
 
4891
#line 4892 "configure"
 
4892
#include "confdefs.h"
 
4893
#include <ieeefp.h>
 
4894
                            int main() {
 
4895
                                float f;
 
4896
                                return fpclass(f)>=FP_NZERO || fpclass(f)<FP_NZERO ? 0 : 1;
 
4897
                                }
 
4898
EOF
 
4899
if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4900
then
 
4901
  cat >> confdefs.h <<\EOF
 
4902
#define HAVE_IEEEFP 1
 
4903
EOF
 
4904
 echo "$ac_t""yes" 1>&6
 
4905
else
 
4906
  echo "configure: failed program was:" >&5
 
4907
  cat conftest.$ac_ext >&5
 
4908
  rm -fr conftest*
 
4909
  HAVE_IEEEFP=0 echo "$ac_t""no" 1>&6
 
4910
fi
 
4911
rm -fr conftest*
 
4912
fi
 
4913
 
 
4914
        
 
4915
fi
 
4916
rm -fr conftest*
 
4917
fi
 
4918
 
 
4919
 
 
4920
echo $ac_n "checking for isfinite""... $ac_c" 1>&6
 
4921
echo "configure:4922: checking for isfinite" >&5
 
4922
if test "$cross_compiling" = yes; then
 
4923
  HAVE_ISFINITE=0 echo "$ac_t""no" 1>&6
 
4924
else
 
4925
  cat > conftest.$ac_ext <<EOF
 
4926
#line 4927 "configure"
 
4927
#include "confdefs.h"
 
4928
#define _GNU_SOURCE
 
4929
            #include <math.h>
 
4930
            int main() {
 
4931
                float f;
 
4932
                return isfinite(f) || !isfinite(f) ? 0 : 1;
 
4933
                }
 
4934
EOF
 
4935
if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4936
then
 
4937
  cat >> confdefs.h <<\EOF
 
4938
#define HAVE_ISFINITE 1
 
4939
EOF
 
4940
 echo "$ac_t""yes" 1>&6
 
4941
else
 
4942
  echo "configure: failed program was:" >&5
 
4943
  cat conftest.$ac_ext >&5
 
4944
  rm -fr conftest*
 
4945
  echo $ac_n "checking for finite()""... $ac_c" 1>&6
 
4946
echo "configure:4947: checking for finite()" >&5
 
4947
                if test "$cross_compiling" = yes; then
 
4948
  HAVE_FINITE=0 echo "$ac_t""no" 1>&6
 
4949
else
 
4950
  cat > conftest.$ac_ext <<EOF
 
4951
#line 4952 "configure"
 
4952
#include "confdefs.h"
 
4953
#include <math.h>
 
4954
                            #include <ieeefp.h>
 
4955
                            int main() {
 
4956
                                float f;
 
4957
                                return finite(f) || !finite(f) ? 0 : 1;
 
4958
                                }
 
4959
EOF
 
4960
if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4961
then
 
4962
  cat >> confdefs.h <<\EOF
 
4963
#define HAVE_FINITE 1
 
4964
EOF
 
4965
 echo "$ac_t""yes" 1>&6
 
4966
else
 
4967
  echo "configure: failed program was:" >&5
 
4968
  cat conftest.$ac_ext >&5
 
4969
  rm -fr conftest*
 
4970
  HAVE_FINITE=0 echo "$ac_t""no" 1>&6
 
4971
fi
 
4972
rm -fr conftest*
 
4973
fi
 
4974
 
 
4975
        
 
4976
fi
 
4977
rm -fr conftest*
 
4978
fi
 
4979
 
 
4980
 
 
4981
 
 
4982
 
 
4983
#--------------------------------------------------------------------
 
4984
#       Check for the existence of the -lsocket and -lnsl libraries.
 
4985
#       The order here is important, so that they end up in the right
 
4986
#       order in the command line generated by make.  Here are some
 
4987
#       special considerations:
 
4988
#       1. Use "connect" and "accept" to check for -lsocket, and
 
4989
#          "gethostbyname" to check for -lnsl.
 
4990
#       2. Use each function name only once:  can't redo a check because
 
4991
#          autoconf caches the results of the last check and won't redo it.
 
4992
#       3. Use -lnsl and -lsocket only if they supply procedures that
 
4993
#          aren't already present in the normal libraries.  This is because
 
4994
#          IRIX 5.2 has libraries, but they aren't needed and they're
 
4995
#          bogus:  they goof up name resolution if used.
 
4996
#       4. On some SVR4 systems, can't use -lsocket without -lnsl too.
 
4997
#          To get around this problem, check for both libraries together
 
4998
#          if -lsocket doesn't work by itself.
 
4999
#--------------------------------------------------------------------
 
5000
echo $ac_n "checking for sockets""... $ac_c" 1>&6
 
5001
echo "configure:5002: checking for sockets" >&5
 
5002
tcl_checkBoth=0
 
5003
echo $ac_n "checking for connect""... $ac_c" 1>&6
 
5004
echo "configure:5005: checking for connect" >&5
 
5005
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
 
5006
  echo $ac_n "(cached) $ac_c" 1>&6
 
5007
else
 
5008
  cat > conftest.$ac_ext <<EOF
 
5009
#line 5010 "configure"
 
5010
#include "confdefs.h"
 
5011
/* System header to define __stub macros and hopefully few prototypes,
 
5012
    which can conflict with char connect(); below.  */
 
5013
#include <assert.h>
 
5014
/* Override any gcc2 internal prototype to avoid an error.  */
 
5015
/* We use char because int might match the return type of a gcc2
 
5016
    builtin and then its argument prototype would still apply.  */
 
5017
char connect();
 
5018
 
 
5019
int main() {
 
5020
 
 
5021
/* The GNU C library defines this for functions which it implements
 
5022
    to always fail with ENOSYS.  Some functions are actually named
 
5023
    something starting with __ and the normal name is an alias.  */
 
5024
#if defined (__stub_connect) || defined (__stub___connect)
 
5025
choke me
 
5026
#else
 
5027
connect();
 
5028
#endif
 
5029
 
 
5030
; return 0; }
 
5031
EOF
 
5032
if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5033
  rm -rf conftest*
 
5034
  eval "ac_cv_func_connect=yes"
 
5035
else
 
5036
  echo "configure: failed program was:" >&5
 
5037
  cat conftest.$ac_ext >&5
 
5038
  rm -rf conftest*
 
5039
  eval "ac_cv_func_connect=no"
 
5040
fi
 
5041
rm -f conftest*
 
5042
fi
 
5043
 
 
5044
if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
 
5045
  echo "$ac_t""yes" 1>&6
 
5046
  tcl_checkSocket=0
 
5047
else
 
5048
  echo "$ac_t""no" 1>&6
 
5049
tcl_checkSocket=1
 
5050
fi
 
5051
 
 
5052
if test "$tcl_checkSocket" = 1; then
 
5053
    echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
 
5054
echo "configure:5055: checking for main in -lsocket" >&5
 
5055
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 
5056
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
5057
  echo $ac_n "(cached) $ac_c" 1>&6
 
5058
else
 
5059
  ac_save_LIBS="$LIBS"
 
5060
LIBS="-lsocket  $LIBS"
 
5061
cat > conftest.$ac_ext <<EOF
 
5062
#line 5063 "configure"
 
5063
#include "confdefs.h"
 
5064
 
 
5065
int main() {
 
5066
main()
 
5067
; return 0; }
 
5068
EOF
 
5069
if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5070
  rm -rf conftest*
 
5071
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5072
else
 
5073
  echo "configure: failed program was:" >&5
 
5074
  cat conftest.$ac_ext >&5
 
5075
  rm -rf conftest*
 
5076
  eval "ac_cv_lib_$ac_lib_var=no"
 
5077
fi
 
5078
rm -f conftest*
 
5079
LIBS="$ac_save_LIBS"
 
5080
 
 
5081
fi
 
5082
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5083
  echo "$ac_t""yes" 1>&6
 
5084
  TLIBS="$TLIBS -lsocket"
 
5085
else
 
5086
  echo "$ac_t""no" 1>&6
 
5087
tcl_checkBoth=1
 
5088
fi
 
5089
 
 
5090
fi
 
5091
 
 
5092
 
 
5093
if test "$tcl_checkBoth" = 1; then
 
5094
    tk_oldLibs=$TLIBS
 
5095
    TLIBS="$TLIBS -lsocket -lnsl"
 
5096
    echo $ac_n "checking for accept""... $ac_c" 1>&6
 
5097
echo "configure:5098: checking for accept" >&5
 
5098
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
 
5099
  echo $ac_n "(cached) $ac_c" 1>&6
 
5100
else
 
5101
  cat > conftest.$ac_ext <<EOF
 
5102
#line 5103 "configure"
 
5103
#include "confdefs.h"
 
5104
/* System header to define __stub macros and hopefully few prototypes,
 
5105
    which can conflict with char accept(); below.  */
 
5106
#include <assert.h>
 
5107
/* Override any gcc2 internal prototype to avoid an error.  */
 
5108
/* We use char because int might match the return type of a gcc2
 
5109
    builtin and then its argument prototype would still apply.  */
 
5110
char accept();
 
5111
 
 
5112
int main() {
 
5113
 
 
5114
/* The GNU C library defines this for functions which it implements
 
5115
    to always fail with ENOSYS.  Some functions are actually named
 
5116
    something starting with __ and the normal name is an alias.  */
 
5117
#if defined (__stub_accept) || defined (__stub___accept)
 
5118
choke me
 
5119
#else
 
5120
accept();
 
5121
#endif
 
5122
 
 
5123
; return 0; }
 
5124
EOF
 
5125
if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5126
  rm -rf conftest*
 
5127
  eval "ac_cv_func_accept=yes"
 
5128
else
 
5129
  echo "configure: failed program was:" >&5
 
5130
  cat conftest.$ac_ext >&5
 
5131
  rm -rf conftest*
 
5132
  eval "ac_cv_func_accept=no"
 
5133
fi
 
5134
rm -f conftest*
 
5135
fi
 
5136
 
 
5137
if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
 
5138
  echo "$ac_t""yes" 1>&6
 
5139
  tcl_checkNsl=0
 
5140
else
 
5141
  echo "$ac_t""no" 1>&6
 
5142
TLIBS=$tk_oldLibs
 
5143
fi
 
5144
 
 
5145
fi
 
5146
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
 
5147
echo "configure:5148: checking for gethostbyname" >&5
 
5148
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
 
5149
  echo $ac_n "(cached) $ac_c" 1>&6
 
5150
else
 
5151
  cat > conftest.$ac_ext <<EOF
 
5152
#line 5153 "configure"
 
5153
#include "confdefs.h"
 
5154
/* System header to define __stub macros and hopefully few prototypes,
 
5155
    which can conflict with char gethostbyname(); below.  */
 
5156
#include <assert.h>
 
5157
/* Override any gcc2 internal prototype to avoid an error.  */
 
5158
/* We use char because int might match the return type of a gcc2
 
5159
    builtin and then its argument prototype would still apply.  */
 
5160
char gethostbyname();
 
5161
 
 
5162
int main() {
 
5163
 
 
5164
/* The GNU C library defines this for functions which it implements
 
5165
    to always fail with ENOSYS.  Some functions are actually named
 
5166
    something starting with __ and the normal name is an alias.  */
 
5167
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 
5168
choke me
 
5169
#else
 
5170
gethostbyname();
 
5171
#endif
 
5172
 
 
5173
; return 0; }
 
5174
EOF
 
5175
if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5176
  rm -rf conftest*
 
5177
  eval "ac_cv_func_gethostbyname=yes"
 
5178
else
 
5179
  echo "configure: failed program was:" >&5
 
5180
  cat conftest.$ac_ext >&5
 
5181
  rm -rf conftest*
 
5182
  eval "ac_cv_func_gethostbyname=no"
 
5183
fi
 
5184
rm -f conftest*
 
5185
fi
 
5186
 
 
5187
if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 
5188
  echo "$ac_t""yes" 1>&6
 
5189
  :
 
5190
else
 
5191
  echo "$ac_t""no" 1>&6
 
5192
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
 
5193
echo "configure:5194: checking for main in -lnsl" >&5
 
5194
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 
5195
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
5196
  echo $ac_n "(cached) $ac_c" 1>&6
 
5197
else
 
5198
  ac_save_LIBS="$LIBS"
 
5199
LIBS="-lnsl  $LIBS"
 
5200
cat > conftest.$ac_ext <<EOF
 
5201
#line 5202 "configure"
 
5202
#include "confdefs.h"
 
5203
 
 
5204
int main() {
 
5205
main()
 
5206
; return 0; }
 
5207
EOF
 
5208
if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5209
  rm -rf conftest*
 
5210
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5211
else
 
5212
  echo "configure: failed program was:" >&5
 
5213
  cat conftest.$ac_ext >&5
 
5214
  rm -rf conftest*
 
5215
  eval "ac_cv_lib_$ac_lib_var=no"
 
5216
fi
 
5217
rm -f conftest*
 
5218
LIBS="$ac_save_LIBS"
 
5219
 
 
5220
fi
 
5221
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5222
  echo "$ac_t""yes" 1>&6
 
5223
  TLIBS="$TLIBS -lnsl"
 
5224
else
 
5225
  echo "$ac_t""no" 1>&6
 
5226
fi
 
5227
 
 
5228
fi
 
5229
 
 
5230
 
 
5231
RL_OJBS=""
 
5232
RL_LIB=""
 
5233
if test "$enable_readline" = "yes" ; then
 
5234
        for ac_hdr in readline/readline.h
 
5235
do
 
5236
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
5237
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
5238
echo "configure:5239: checking for $ac_hdr" >&5
 
5239
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
5240
  echo $ac_n "(cached) $ac_c" 1>&6
 
5241
else
 
5242
  cat > conftest.$ac_ext <<EOF
 
5243
#line 5244 "configure"
 
5244
#include "confdefs.h"
 
5245
#include <$ac_hdr>
 
5246
EOF
 
5247
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
5248
{ (eval echo configure:5249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
5249
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
5250
if test -z "$ac_err"; then
 
5251
  rm -rf conftest*
 
5252
  eval "ac_cv_header_$ac_safe=yes"
 
5253
else
 
5254
  echo "$ac_err" >&5
 
5255
  echo "configure: failed program was:" >&5
 
5256
  cat conftest.$ac_ext >&5
 
5257
  rm -rf conftest*
 
5258
  eval "ac_cv_header_$ac_safe=no"
 
5259
fi
 
5260
rm -f conftest*
 
5261
fi
 
5262
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
5263
  echo "$ac_t""yes" 1>&6
 
5264
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
5265
  cat >> confdefs.h <<EOF
 
5266
#define $ac_tr_hdr 1
 
5267
EOF
 
5268
 echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
 
5269
echo "configure:5270: checking for main in -lreadline" >&5
 
5270
ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
 
5271
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
5272
  echo $ac_n "(cached) $ac_c" 1>&6
 
5273
else
 
5274
  ac_save_LIBS="$LIBS"
 
5275
LIBS="-lreadline -lncurses $LIBS"
 
5276
cat > conftest.$ac_ext <<EOF
 
5277
#line 5278 "configure"
 
5278
#include "confdefs.h"
 
5279
 
 
5280
int main() {
 
5281
main()
 
5282
; return 0; }
 
5283
EOF
 
5284
if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5285
  rm -rf conftest*
 
5286
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5287
else
 
5288
  echo "configure: failed program was:" >&5
 
5289
  cat conftest.$ac_ext >&5
 
5290
  rm -rf conftest*
 
5291
  eval "ac_cv_lib_$ac_lib_var=no"
 
5292
fi
 
5293
rm -f conftest*
 
5294
LIBS="$ac_save_LIBS"
 
5295
 
 
5296
fi
 
5297
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5298
  echo "$ac_t""yes" 1>&6
 
5299
  cat >> confdefs.h <<\EOF
 
5300
#define HAVE_READLINE 1
 
5301
EOF
 
5302
 
 
5303
                        TLIBS="$TLIBS -lreadline -lncurses"
 
5304
                        RL_OBJS=gcl_readline.o
 
5305
# Readline support now initialized automatically when compiled in, this lisp
 
5306
# object no longer needed, 20040102 CM
 
5307
#                       RL_LIB=mod/gcl_readline.o
 
5308
                        
 
5309
else
 
5310
  echo "$ac_t""no" 1>&6
 
5311
fi
 
5312
 
 
5313
else
 
5314
  echo "$ac_t""no" 1>&6
 
5315
fi
 
5316
done
 
5317
 
 
5318
 
 
5319
# These tests discover differences between readline 4.1 and 4.3
 
5320
        echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
 
5321
echo "configure:5322: checking for rl_completion_matches in -lreadline" >&5
 
5322
ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
 
5323
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
5324
  echo $ac_n "(cached) $ac_c" 1>&6
 
5325
else
 
5326
  ac_save_LIBS="$LIBS"
 
5327
LIBS="-lreadline  $LIBS"
 
5328
cat > conftest.$ac_ext <<EOF
 
5329
#line 5330 "configure"
 
5330
#include "confdefs.h"
 
5331
/* Override any gcc2 internal prototype to avoid an error.  */
 
5332
/* We use char because int might match the return type of a gcc2
 
5333
    builtin and then its argument prototype would still apply.  */
 
5334
char rl_completion_matches();
 
5335
 
 
5336
int main() {
 
5337
rl_completion_matches()
 
5338
; return 0; }
 
5339
EOF
 
5340
if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5341
  rm -rf conftest*
 
5342
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5343
else
 
5344
  echo "configure: failed program was:" >&5
 
5345
  cat conftest.$ac_ext >&5
 
5346
  rm -rf conftest*
 
5347
  eval "ac_cv_lib_$ac_lib_var=no"
 
5348
fi
 
5349
rm -f conftest*
 
5350
LIBS="$ac_save_LIBS"
 
5351
 
 
5352
fi
 
5353
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5354
  echo "$ac_t""yes" 1>&6
 
5355
  cat >> confdefs.h <<\EOF
 
5356
#define HAVE_DECL_RL_COMPLETION_MATCHES 1
 
5357
EOF
 
5358
 
 
5359
                        cat >> confdefs.h <<\EOF
 
5360
#define HAVE_RL_COMPENTRY_FUNC_T 1
 
5361
EOF
 
5362
 
 
5363
else
 
5364
  echo "$ac_t""no" 1>&6
 
5365
fi
 
5366
 
 
5367
fi
 
5368
 
 
5369
 
 
5370
 
 
5371
 
 
5372
echo $ac_n "checking For network code for nsocket.c""... $ac_c" 1>&6
 
5373
echo "configure:5374: checking For network code for nsocket.c" >&5
 
5374
cat > conftest.$ac_ext <<EOF
 
5375
#line 5376 "configure"
 
5376
#include "confdefs.h"
 
5377
 
 
5378
#include <sys/time.h>
 
5379
#include <sys/types.h>
 
5380
#include <unistd.h>
 
5381
 
 
5382
#include <errno.h>
 
5383
#include <fcntl.h>
 
5384
#include <stdio.h>
 
5385
 
 
5386
/************* for the sockets ******************/ 
 
5387
#include <sys/socket.h>         /* struct sockaddr, SOCK_STREAM, ... */
 
5388
#ifndef NO_UNAME
 
5389
#   include <sys/utsname.h>     /* uname system call. */
 
5390
#endif
 
5391
#include <netinet/in.h>         /* struct in_addr, struct sockaddr_in */
 
5392
#include <arpa/inet.h>          /* inet_ntoa() */
 
5393
#include <netdb.h>              /* gethostbyname() */
 
5394
 
 
5395
int main() {
 
5396
 connect(0,(struct sockaddr *)0,0);
 
5397
    gethostbyname("jil");
 
5398
    socket(AF_INET, SOCK_STREAM, 0);
 
5399
        
 
5400
; return 0; }
 
5401
EOF
 
5402
if { (eval echo configure:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5403
  rm -rf conftest*
 
5404
  cat >> confdefs.h <<\EOF
 
5405
#define HAVE_NSOCKET 1
 
5406
EOF
 
5407
 
 
5408
 echo "$ac_t""yes" 1>&6
 
5409
else
 
5410
  echo "configure: failed program was:" >&5
 
5411
  cat conftest.$ac_ext >&5
 
5412
  rm -rf conftest*
 
5413
  echo "$ac_t""no" 1>&6
 
5414
fi
 
5415
rm -f conftest*
 
5416
 
 
5417
 
 
5418
echo $ac_n "checking check for listen using fcntl""... $ac_c" 1>&6
 
5419
echo "configure:5420: checking check for listen using fcntl" >&5
 
5420
cat > conftest.$ac_ext <<EOF
 
5421
#line 5422 "configure"
 
5422
#include "confdefs.h"
 
5423
#include <stdio.h>
 
5424
#include <fcntl.h>
 
5425
 
 
5426
int main() {
 
5427
FILE *fp=fopen("configure.in","r");
 
5428
  int orig;
 
5429
  orig = fcntl(fileno(fp), F_GETFL);
 
5430
  if (! (orig & O_NONBLOCK )) return 0;
 
5431
 
 
5432
; return 0; }
 
5433
EOF
 
5434
if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5435
  rm -rf conftest*
 
5436
  cat >> confdefs.h <<\EOF
 
5437
#define LISTEN_USE_FCNTL 1
 
5438
EOF
 
5439
 
 
5440
 echo "$ac_t""yes" 1>&6
 
5441
else
 
5442
  echo "configure: failed program was:" >&5
 
5443
  cat conftest.$ac_ext >&5
 
5444
  rm -rf conftest*
 
5445
  echo "$ac_t""no" 1>&6
 
5446
fi
 
5447
rm -f conftest*
 
5448
 
 
5449
 
 
5450
 
 
5451
 
 
5452
echo $ac_n "checking for profil""... $ac_c" 1>&6
 
5453
echo "configure:5454: checking for profil" >&5
 
5454
if eval "test \"`echo '$''{'ac_cv_func_profil'+set}'`\" = set"; then
 
5455
  echo $ac_n "(cached) $ac_c" 1>&6
 
5456
else
 
5457
  cat > conftest.$ac_ext <<EOF
 
5458
#line 5459 "configure"
 
5459
#include "confdefs.h"
 
5460
/* System header to define __stub macros and hopefully few prototypes,
 
5461
    which can conflict with char profil(); below.  */
 
5462
#include <assert.h>
 
5463
/* Override any gcc2 internal prototype to avoid an error.  */
 
5464
/* We use char because int might match the return type of a gcc2
 
5465
    builtin and then its argument prototype would still apply.  */
 
5466
char profil();
 
5467
 
 
5468
int main() {
 
5469
 
 
5470
/* The GNU C library defines this for functions which it implements
 
5471
    to always fail with ENOSYS.  Some functions are actually named
 
5472
    something starting with __ and the normal name is an alias.  */
 
5473
#if defined (__stub_profil) || defined (__stub___profil)
 
5474
choke me
 
5475
#else
 
5476
profil();
 
5477
#endif
 
5478
 
 
5479
; return 0; }
 
5480
EOF
 
5481
if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5482
  rm -rf conftest*
 
5483
  eval "ac_cv_func_profil=yes"
 
5484
else
 
5485
  echo "configure: failed program was:" >&5
 
5486
  cat conftest.$ac_ext >&5
 
5487
  rm -rf conftest*
 
5488
  eval "ac_cv_func_profil=no"
 
5489
fi
 
5490
rm -f conftest*
 
5491
fi
 
5492
 
 
5493
if eval "test \"`echo '$ac_cv_func_'profil`\" = yes"; then
 
5494
  echo "$ac_t""yes" 1>&6
 
5495
  :
 
5496
else
 
5497
  echo "$ac_t""no" 1>&6
 
5498
cat >> confdefs.h <<\EOF
 
5499
#define NO_PROFILE 1
 
5500
EOF
 
5501
 
 
5502
fi
 
5503
 
 
5504
 
 
5505
echo $ac_n "checking for setenv""... $ac_c" 1>&6
 
5506
echo "configure:5507: checking for setenv" >&5
 
5507
if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then
 
5508
  echo $ac_n "(cached) $ac_c" 1>&6
 
5509
else
 
5510
  cat > conftest.$ac_ext <<EOF
 
5511
#line 5512 "configure"
 
5512
#include "confdefs.h"
 
5513
/* System header to define __stub macros and hopefully few prototypes,
 
5514
    which can conflict with char setenv(); below.  */
 
5515
#include <assert.h>
 
5516
/* Override any gcc2 internal prototype to avoid an error.  */
 
5517
/* We use char because int might match the return type of a gcc2
 
5518
    builtin and then its argument prototype would still apply.  */
 
5519
char setenv();
 
5520
 
 
5521
int main() {
 
5522
 
 
5523
/* The GNU C library defines this for functions which it implements
 
5524
    to always fail with ENOSYS.  Some functions are actually named
 
5525
    something starting with __ and the normal name is an alias.  */
 
5526
#if defined (__stub_setenv) || defined (__stub___setenv)
 
5527
choke me
 
5528
#else
 
5529
setenv();
 
5530
#endif
 
5531
 
 
5532
; return 0; }
 
5533
EOF
 
5534
if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5535
  rm -rf conftest*
 
5536
  eval "ac_cv_func_setenv=yes"
 
5537
else
 
5538
  echo "configure: failed program was:" >&5
 
5539
  cat conftest.$ac_ext >&5
 
5540
  rm -rf conftest*
 
5541
  eval "ac_cv_func_setenv=no"
 
5542
fi
 
5543
rm -f conftest*
 
5544
fi
 
5545
 
 
5546
if eval "test \"`echo '$ac_cv_func_'setenv`\" = yes"; then
 
5547
  echo "$ac_t""yes" 1>&6
 
5548
  cat >> confdefs.h <<\EOF
 
5549
#define HAVE_SETENV 1
 
5550
EOF
 
5551
 
 
5552
else
 
5553
  echo "$ac_t""no" 1>&6
 
5554
no_setenv=1 
 
5555
fi
 
5556
 
 
5557
 
 
5558
if test "$no_setenv" = "1" ; then
 
5559
echo $ac_n "checking for putenv""... $ac_c" 1>&6
 
5560
echo "configure:5561: checking for putenv" >&5
 
5561
if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then
 
5562
  echo $ac_n "(cached) $ac_c" 1>&6
 
5563
else
 
5564
  cat > conftest.$ac_ext <<EOF
 
5565
#line 5566 "configure"
 
5566
#include "confdefs.h"
 
5567
/* System header to define __stub macros and hopefully few prototypes,
 
5568
    which can conflict with char putenv(); below.  */
 
5569
#include <assert.h>
 
5570
/* Override any gcc2 internal prototype to avoid an error.  */
 
5571
/* We use char because int might match the return type of a gcc2
 
5572
    builtin and then its argument prototype would still apply.  */
 
5573
char putenv();
 
5574
 
 
5575
int main() {
 
5576
 
 
5577
/* The GNU C library defines this for functions which it implements
 
5578
    to always fail with ENOSYS.  Some functions are actually named
 
5579
    something starting with __ and the normal name is an alias.  */
 
5580
#if defined (__stub_putenv) || defined (__stub___putenv)
 
5581
choke me
 
5582
#else
 
5583
putenv();
 
5584
#endif
 
5585
 
 
5586
; return 0; }
 
5587
EOF
 
5588
if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5589
  rm -rf conftest*
 
5590
  eval "ac_cv_func_putenv=yes"
 
5591
else
 
5592
  echo "configure: failed program was:" >&5
 
5593
  cat conftest.$ac_ext >&5
 
5594
  rm -rf conftest*
 
5595
  eval "ac_cv_func_putenv=no"
 
5596
fi
 
5597
rm -f conftest*
 
5598
fi
 
5599
 
 
5600
if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then
 
5601
  echo "$ac_t""yes" 1>&6
 
5602
  cat >> confdefs.h <<\EOF
 
5603
#define HAVE_PUTENV 1
 
5604
EOF
 
5605
 
 
5606
else
 
5607
  echo "$ac_t""no" 1>&6
 
5608
fi
 
5609
 
 
5610
 
 
5611
fi
 
5612
 
 
5613
echo $ac_n "checking for _cleanup""... $ac_c" 1>&6
 
5614
echo "configure:5615: checking for _cleanup" >&5
 
5615
if eval "test \"`echo '$''{'ac_cv_func__cleanup'+set}'`\" = set"; then
 
5616
  echo $ac_n "(cached) $ac_c" 1>&6
 
5617
else
 
5618
  cat > conftest.$ac_ext <<EOF
 
5619
#line 5620 "configure"
 
5620
#include "confdefs.h"
 
5621
/* System header to define __stub macros and hopefully few prototypes,
 
5622
    which can conflict with char _cleanup(); below.  */
 
5623
#include <assert.h>
 
5624
/* Override any gcc2 internal prototype to avoid an error.  */
 
5625
/* We use char because int might match the return type of a gcc2
 
5626
    builtin and then its argument prototype would still apply.  */
 
5627
char _cleanup();
 
5628
 
 
5629
int main() {
 
5630
 
 
5631
/* The GNU C library defines this for functions which it implements
 
5632
    to always fail with ENOSYS.  Some functions are actually named
 
5633
    something starting with __ and the normal name is an alias.  */
 
5634
#if defined (__stub__cleanup) || defined (__stub____cleanup)
 
5635
choke me
 
5636
#else
 
5637
_cleanup();
 
5638
#endif
 
5639
 
 
5640
; return 0; }
 
5641
EOF
 
5642
if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5643
  rm -rf conftest*
 
5644
  eval "ac_cv_func__cleanup=yes"
 
5645
else
 
5646
  echo "configure: failed program was:" >&5
 
5647
  cat conftest.$ac_ext >&5
 
5648
  rm -rf conftest*
 
5649
  eval "ac_cv_func__cleanup=no"
 
5650
fi
 
5651
rm -f conftest*
 
5652
fi
 
5653
 
 
5654
if eval "test \"`echo '$ac_cv_func_'_cleanup`\" = yes"; then
 
5655
  echo "$ac_t""yes" 1>&6
 
5656
  cat >> confdefs.h <<\EOF
 
5657
#define USE_CLEANUP 1
 
5658
EOF
 
5659
 
 
5660
else
 
5661
  echo "$ac_t""no" 1>&6
 
5662
fi
 
5663
 
 
5664
 
 
5665
gcl_ok=no
 
5666
 
 
5667
cat > conftest.$ac_ext <<EOF
 
5668
#line 5669 "configure"
 
5669
#include "confdefs.h"
 
5670
#include <ctype.h>
 
5671
EOF
 
5672
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
5673
  egrep "LITTLE_ENDIAN" >/dev/null 2>&1; then
 
5674
  rm -rf conftest*
 
5675
  gcl_ok=yes
 
5676
else
 
5677
  rm -rf conftest*
 
5678
  gcl_ok=noo
 
5679
fi
 
5680
rm -f conftest*
 
5681
 
 
5682
if test $gcl_ok = yes ; then
 
5683
cat >> confdefs.h <<\EOF
 
5684
#define ENDIAN_ALREADY_DEFINED 1
 
5685
EOF
 
5686
 
 
5687
fi
 
5688
 
 
5689
 
 
5690
 
 
5691
 
 
5692
 
 
5693
 
 
5694
# if test "x$enable_machine" = "x" ; then
 
5695
echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
 
5696
echo "configure:5697: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
 
5697
 
 
5698
case $system in
 
5699
       OSF*)
 
5700
        cat >> confdefs.h <<\EOF
 
5701
#define USE_FIONBIO 1
 
5702
EOF
 
5703
 
 
5704
        echo "$ac_t""FIONBIO" 1>&6
 
5705
        ;;
 
5706
    SunOS-4*)
 
5707
        cat >> confdefs.h <<\EOF
 
5708
#define USE_FIONBIO 1
 
5709
EOF
 
5710
 
 
5711
        echo "$ac_t""FIONBIO" 1>&6
 
5712
        ;;
 
5713
    ULTRIX-4.*)
 
5714
        cat >> confdefs.h <<\EOF
 
5715
#define USE_FIONBIO 1
 
5716
EOF
 
5717
 
 
5718
        echo "$ac_t""FIONBIO" 1>&6
 
5719
        ;;
 
5720
    *)
 
5721
        echo "$ac_t""O_NONBLOCK" 1>&6
 
5722
        ;;
 
5723
esac
 
5724
 
 
5725
 
 
5726
echo $ac_n "checking check for SV_ONSTACK""... $ac_c" 1>&6
 
5727
echo "configure:5728: checking check for SV_ONSTACK" >&5
 
5728
cat > conftest.$ac_ext <<EOF
 
5729
#line 5730 "configure"
 
5730
#include "confdefs.h"
 
5731
#include <signal.h>
 
5732
int joe=SV_ONSTACK;
 
5733
 
 
5734
int main() {
 
5735
 
 
5736
; return 0; }
 
5737
EOF
 
5738
if { (eval echo configure:5739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5739
  rm -rf conftest*
 
5740
  cat >> confdefs.h <<\EOF
 
5741
#define HAVE_SV_ONSTACK 1
 
5742
EOF
 
5743
 
 
5744
 
 
5745
 echo "$ac_t""yes" 1>&6
 
5746
else
 
5747
  echo "configure: failed program was:" >&5
 
5748
  cat conftest.$ac_ext >&5
 
5749
  rm -rf conftest*
 
5750
  echo "$ac_t""no" 1>&6
 
5751
fi
 
5752
rm -f conftest*
 
5753
 
 
5754
echo $ac_n "checking check for SIGSYS""... $ac_c" 1>&6
 
5755
echo "configure:5756: checking check for SIGSYS" >&5
 
5756
cat > conftest.$ac_ext <<EOF
 
5757
#line 5758 "configure"
 
5758
#include "confdefs.h"
 
5759
#include <signal.h>
 
5760
int joe=SIGSYS;
 
5761
 
 
5762
int main() {
 
5763
 
 
5764
; return 0; }
 
5765
EOF
 
5766
if { (eval echo configure:5767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5767
  rm -rf conftest*
 
5768
  cat >> confdefs.h <<\EOF
 
5769
#define HAVE_SIGSYS 1
 
5770
EOF
 
5771
 
 
5772
 
 
5773
 echo "$ac_t""yes" 1>&6
 
5774
else
 
5775
  echo "configure: failed program was:" >&5
 
5776
  cat conftest.$ac_ext >&5
 
5777
  rm -rf conftest*
 
5778
  echo "$ac_t""no" 1>&6
 
5779
fi
 
5780
rm -f conftest*
 
5781
 
 
5782
 
 
5783
echo $ac_n "checking check for SIGEMT""... $ac_c" 1>&6
 
5784
echo "configure:5785: checking check for SIGEMT" >&5
 
5785
cat > conftest.$ac_ext <<EOF
 
5786
#line 5787 "configure"
 
5787
#include "confdefs.h"
 
5788
#include <signal.h>
 
5789
int joe=SIGEMT;
 
5790
 
 
5791
int main() {
 
5792
 
 
5793
; return 0; }
 
5794
EOF
 
5795
if { (eval echo configure:5796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5796
  rm -rf conftest*
 
5797
  cat >> confdefs.h <<\EOF
 
5798
#define HAVE_SIGEMT 1
 
5799
EOF
 
5800
 
 
5801
 
 
5802
 echo "$ac_t""yes" 1>&6
 
5803
else
 
5804
  echo "configure: failed program was:" >&5
 
5805
  cat conftest.$ac_ext >&5
 
5806
  rm -rf conftest*
 
5807
  echo "$ac_t""no" 1>&6
 
5808
fi
 
5809
rm -f conftest*
 
5810
 
 
5811
 
 
5812
 
 
5813
 
 
5814
#if test $use = "386-linux" ; then
 
5815
        for ac_hdr in asm/sigcontext.h
 
5816
do
 
5817
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
5818
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
5819
echo "configure:5820: checking for $ac_hdr" >&5
 
5820
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
5821
  echo $ac_n "(cached) $ac_c" 1>&6
 
5822
else
 
5823
  cat > conftest.$ac_ext <<EOF
 
5824
#line 5825 "configure"
 
5825
#include "confdefs.h"
 
5826
#include <$ac_hdr>
 
5827
EOF
 
5828
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
5829
{ (eval echo configure:5830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
5830
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
5831
if test -z "$ac_err"; then
 
5832
  rm -rf conftest*
 
5833
  eval "ac_cv_header_$ac_safe=yes"
 
5834
else
 
5835
  echo "$ac_err" >&5
 
5836
  echo "configure: failed program was:" >&5
 
5837
  cat conftest.$ac_ext >&5
 
5838
  rm -rf conftest*
 
5839
  eval "ac_cv_header_$ac_safe=no"
 
5840
fi
 
5841
rm -f conftest*
 
5842
fi
 
5843
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
5844
  echo "$ac_t""yes" 1>&6
 
5845
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
5846
  cat >> confdefs.h <<EOF
 
5847
#define $ac_tr_hdr 1
 
5848
EOF
 
5849
 
 
5850
else
 
5851
  echo "$ac_t""no" 1>&6
 
5852
fi
 
5853
done
 
5854
 
 
5855
        for ac_hdr in asm/signal.h
 
5856
do
 
5857
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
5858
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
5859
echo "configure:5860: checking for $ac_hdr" >&5
 
5860
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
 
5861
  echo $ac_n "(cached) $ac_c" 1>&6
 
5862
else
 
5863
  cat > conftest.$ac_ext <<EOF
 
5864
#line 5865 "configure"
 
5865
#include "confdefs.h"
 
5866
#include <$ac_hdr>
 
5867
EOF
 
5868
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
5869
{ (eval echo configure:5870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
5870
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
5871
if test -z "$ac_err"; then
 
5872
  rm -rf conftest*
 
5873
  eval "ac_cv_header_$ac_safe=yes"
 
5874
else
 
5875
  echo "$ac_err" >&5
 
5876
  echo "configure: failed program was:" >&5
 
5877
  cat conftest.$ac_ext >&5
 
5878
  rm -rf conftest*
 
5879
  eval "ac_cv_header_$ac_safe=no"
 
5880
fi
 
5881
rm -f conftest*
 
5882
fi
 
5883
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
5884
  echo "$ac_t""yes" 1>&6
 
5885
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
5886
  cat >> confdefs.h <<EOF
 
5887
#define $ac_tr_hdr 1
 
5888
EOF
 
5889
 
 
5890
else
 
5891
  echo "$ac_t""no" 1>&6
 
5892
fi
 
5893
done
 
5894
 
 
5895
        echo $ac_n "checking for sigcontext...""... $ac_c" 1>&6
 
5896
echo "configure:5897: checking for sigcontext..." >&5
 
5897
        cat > conftest.$ac_ext <<EOF
 
5898
#line 5899 "configure"
 
5899
#include "confdefs.h"
 
5900
#include <signal.h>
 
5901
       
 
5902
int main() {
 
5903
 
 
5904
        struct sigcontext foo;
 
5905
       
 
5906
; return 0; }
 
5907
EOF
 
5908
if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5909
  rm -rf conftest*
 
5910
  
 
5911
        sigcontext_works=1;
 
5912
        cat >> confdefs.h <<\EOF
 
5913
#define SIGNAL_H_HAS_SIGCONTEXT 1
 
5914
EOF
 
5915
 
 
5916
        echo "$ac_t""sigcontext in signal.h" 1>&6
 
5917
       
 
5918
else
 
5919
  echo "configure: failed program was:" >&5
 
5920
  cat conftest.$ac_ext >&5
 
5921
  rm -rf conftest*
 
5922
  sigcontext_works=0;
 
5923
         echo "$ac_t""sigcontext NOT in signal.h" 1>&6
 
5924
       
 
5925
fi
 
5926
rm -f conftest*
 
5927
       if test "$sigcontext_works" = 0 ; then
 
5928
       echo $ac_n "checking for sigcontext...""... $ac_c" 1>&6
 
5929
echo "configure:5930: checking for sigcontext..." >&5
 
5930
       cat > conftest.$ac_ext <<EOF
 
5931
#line 5932 "configure"
 
5932
#include "confdefs.h"
 
5933
#include <signal.h>
 
5934
             #ifdef HAVE_ASM_SIGCONTEXT_H     
 
5935
             #include <asm/sigcontext.h>
 
5936
             #endif
 
5937
             #ifdef HAVE_ASM_SIGNAL_H          
 
5938
             #include <asm/signal.h>
 
5939
             #endif
 
5940
          
 
5941
int main() {
 
5942
 
 
5943
        struct sigcontext foo;
 
5944
        
 
5945
; return 0; }
 
5946
EOF
 
5947
if { (eval echo configure:5948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5948
  rm -rf conftest*
 
5949
  
 
5950
        cat >> confdefs.h <<\EOF
 
5951
#define HAVE_SIGCONTEXT 1
 
5952
EOF
 
5953
 
 
5954
        echo "$ac_t""sigcontext in asm files" 1>&6
 
5955
        
 
5956
else
 
5957
  echo "configure: failed program was:" >&5
 
5958
  cat conftest.$ac_ext >&5
 
5959
  rm -rf conftest*
 
5960
  
 
5961
        echo "$ac_t""no sigcontext found" 1>&6
 
5962
     
 
5963
fi
 
5964
rm -f conftest*
 
5965
 
 
5966
 
 
5967
       fi
 
5968
#       echo 'foo() {}' > conftest1.c
 
5969
#       $CC -S conftest1.c
 
5970
#       use_underscore=0        
 
5971
#       if fgrep _foo conftest1.s ; then use_underscore=1 ; fi
 
5972
#       if test $use_underscore = 0 ; then
 
5973
#            MPI_FILE=mpi-386_no_under.o
 
5974
#          else
 
5975
#            MPI_FILE=mpi-386d.o
 
5976
#        fi
 
5977
#       AC_SUBST(MPI_FILE)
 
5978
#       GCC=$CC
 
5979
#        if test -x  /usr/bin/i386-glibc20-linux-gcc ; then
 
5980
#          GCC=/usr/bin/i386-glibc20-linux-gcc
 
5981
#       fi
 
5982
#       AC_SUBST(GCC)
 
5983
 
 
5984
#fi
 
5985
 
 
5986
# Extract the first word of "emacs", so it can be a program name with args.
 
5987
set dummy emacs; ac_word=$2
 
5988
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
5989
echo "configure:5990: checking for $ac_word" >&5
 
5990
if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then
 
5991
  echo $ac_n "(cached) $ac_c" 1>&6
 
5992
else
 
5993
  case "$EMACS" in
 
5994
  /*)
 
5995
  ac_cv_path_EMACS="$EMACS" # Let the user override the test with a path.
 
5996
  ;;
 
5997
  ?:/*)                  
 
5998
  ac_cv_path_EMACS="$EMACS" # Let the user override the test with a dos path.
 
5999
  ;;
 
6000
  *)
 
6001
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
6002
  ac_dummy="$PATH"
 
6003
  for ac_dir in $ac_dummy; do 
 
6004
    test -z "$ac_dir" && ac_dir=.
 
6005
    if test -f $ac_dir/$ac_word; then
 
6006
      ac_cv_path_EMACS="$ac_dir/$ac_word"
 
6007
      break
 
6008
    fi
 
6009
  done
 
6010
  IFS="$ac_save_ifs"
 
6011
  ;;
 
6012
esac
 
6013
fi
 
6014
EMACS="$ac_cv_path_EMACS"
 
6015
if test -n "$EMACS"; then
 
6016
  echo "$ac_t""$EMACS" 1>&6
 
6017
else
 
6018
  echo "$ac_t""no" 1>&6
 
6019
fi
 
6020
 
 
6021
 
 
6022
 
 
6023
# check for where the emacs site lisp directory is.
 
6024
rm -f conftest.el
 
6025
cat >> conftest.el <<EOF
 
6026
(let ((ans ".") (tem load-path) cur)
 
6027
 (while (setq cur (car tem))
 
6028
   (setq tem (cdr tem))
 
6029
   (cond ((and (string-match "site-lisp/?$" cur) (file-directory-p cur))
 
6030
          (setq ans cur)
 
6031
           (if (string-match "-0-9.+$" cur) nil
 
6032
               (setq tem nil)))))
 
6033
  (message ans))
 
6034
EOF
 
6035
 
 
6036
echo $ac_n "checking emacs site lisp directory""... $ac_c" 1>&6
 
6037
echo "configure:6038: checking emacs site lisp directory" >&5
 
6038
if [ "$EMACS_SITE_LISP" = "unknown" ] ; then
 
6039
        if [ "$EMACS" != "" ] ; then
 
6040
                EMACS_SITE_LISP=`$EMACS -q -batch --no-site-file -l conftest.el 2>&1 | sed -e /Loading/d | sed -e /load/d `
 
6041
        else
 
6042
                EMACS_SITE_LISP=""
 
6043
        fi
 
6044
fi
 
6045
echo "$ac_t""$EMACS_SITE_LISP" 1>&6
 
6046
 
 
6047
 
 
6048
# check for where the emacs site lisp default.el is
 
6049
rm -f conftest.el
 
6050
cat >> conftest.el <<EOF
 
6051
(let ((ans "./default.el") file (tem load-path))
 
6052
 (while tem
 
6053
   (cond ((file-exists-p
 
6054
           (setq file (expand-file-name "/default.el" (car tem))))
 
6055
          (setq tem nil) (setq ans file)))
 
6056
   (setq tem (cdr tem)))
 
6057
  (message ans))
 
6058
EOF
 
6059
 
 
6060
echo $ac_n "checking emacs default.el""... $ac_c" 1>&6
 
6061
echo "configure:6062: checking emacs default.el" >&5
 
6062
if [ "$EMACS" != "" ] ; then
 
6063
        EMACS_DEFAULT_EL=`$EMACS -q -batch --no-site-file -l conftest.el 2>&1 | sed -e /Loading/d | sed -e /load/d `
 
6064
else
 
6065
        EMACS_DEFAULT_EL=""
 
6066
fi
 
6067
if  test -f "${EMACS_DEFAULT_EL}"  ; then true;else
 
6068
  if test -d $EMACS_SITE_LISP ; then
 
6069
     EMACS_DEFAULT_EL=${EMACS_SITE_LISP}/default.el
 
6070
  fi
 
6071
fi
 
6072
echo "$ac_t""$EMACS_DEFAULT_EL" 1>&6
 
6073
 
 
6074
 
 
6075
 
 
6076
 
 
6077
# check for where the emacs site lisp info/dir is
 
6078
rm -f conftest.el
 
6079
cat >> conftest.el <<EOF
 
6080
(let ((ans "") file (tem Info-default-directory-list))
 
6081
 (while tem
 
6082
   (cond ((file-exists-p (setq file (expand-file-name "dir" (car tem))))
 
6083
          (setq ans (file-name-as-directory (car tem)))         
 
6084
          (setq tem nil) ))
 
6085
   (setq tem (cdr tem)))
 
6086
  (message ans))
 
6087
EOF
 
6088
 
 
6089
echo $ac_n "checking emacs info/dir""... $ac_c" 1>&6
 
6090
echo "configure:6091: checking emacs info/dir" >&5
 
6091
if test "$use" = "mingw" ; then
 
6092
    INFO_DIR=\$\(prefix\)/lib/gcl-$VERSION/info/
 
6093
else
 
6094
    if [ "$EMACS" != "" ] && [ "$INFO_DIR" = "unknown" ] ; then
 
6095
        INFO_DIR=`$EMACS -q -batch --no-site-file -l conftest.el 2>&1 | sed -e /Loading/d | sed -e /load/d `
 
6096
    fi
 
6097
fi
 
6098
if  test -f "${INFO_DIR}dir"  ; then true;else
 
6099
if test -f /usr/share/info/dir ; then
 
6100
  INFO_DIR=/usr/share/info/
 
6101
else true;
 
6102
fi
 
6103
fi
 
6104
echo "$ac_t""$INFO_DIR" 1>&6
 
6105
 
 
6106
 
 
6107
echo $ac_n "checking for tcl/tk""... $ac_c" 1>&6
 
6108
echo "configure:6109: checking for tcl/tk" >&5
 
6109
 
 
6110
 
 
6111
if test -d "${TCL_CONFIG_PREFIX}"  ; then true ; else
 
6112
rm -f conftest.tcl
 
6113
cat >> conftest.tcl <<EOF
 
6114
 
 
6115
set dir [set tcl_library]
 
6116
if { [file exists [file join [set dir] tclConfig.sh]] } {
 
6117
      puts  [set dir]
 
6118
      exit      
 
6119
  }
 
6120
set dir [file dirname [set tcl_library]]
 
6121
if { [file exists [file join [set dir] tclConfig.sh]] } {
 
6122
      puts  [set dir]
 
6123
  }
 
6124
 
 
6125
EOF
 
6126
#cp conftest.tcl foo.tcl
 
6127
 
 
6128
# Extract the first word of "tclsh", so it can be a program name with args.
 
6129
set dummy tclsh; ac_word=$2
 
6130
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
6131
echo "configure:6132: checking for $ac_word" >&5
 
6132
if eval "test \"`echo '$''{'ac_cv_prog_TCLSH'+set}'`\" = set"; then
 
6133
  echo $ac_n "(cached) $ac_c" 1>&6
 
6134
else
 
6135
  if test -n "$TCLSH"; then
 
6136
  ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test.
 
6137
else
 
6138
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
6139
  ac_dummy="$PATH"
 
6140
  for ac_dir in $ac_dummy; do
 
6141
    test -z "$ac_dir" && ac_dir=.
 
6142
    if test -f $ac_dir/$ac_word; then
 
6143
      ac_cv_prog_TCLSH="tclsh"
 
6144
      break
 
6145
    fi
 
6146
  done
 
6147
  IFS="$ac_save_ifs"
 
6148
  test -z "$ac_cv_prog_TCLSH" && ac_cv_prog_TCLSH="${TCLSH}"
 
6149
fi
 
6150
fi
 
6151
TCLSH="$ac_cv_prog_TCLSH"
 
6152
if test -n "$TCLSH"; then
 
6153
  echo "$ac_t""$TCLSH" 1>&6
 
6154
else
 
6155
  echo "$ac_t""no" 1>&6
 
6156
fi
 
6157
 
 
6158
#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
 
6159
 
 
6160
if test "${TCLSH}" = "" ; then true ; else
 
6161
TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
 
6162
fi
 
6163
fi
 
6164
if test -f ${TCL_CONFIG_PREFIX}/tclConfig.sh  ; then . ${TCL_CONFIG_PREFIX}/tclConfig.sh ; fi
 
6165
 
 
6166
 
 
6167
if test -d "${TK_CONFIG_PREFIX}"  ; then true ; else
 
6168
if test -f ${TCL_CONFIG_PREFIX}/tkConfig.sh ; then
 
6169
TK_CONFIG_PREFIX=${TCL_CONFIG_PREFIX}
 
6170
else
 
6171
#rm -f conftest.tcl
 
6172
#cat >> conftest.tcl <<EOF
 
6173
#[
 
6174
#set dir [set tk_library]
 
6175
#if { [file exists [file join [set dir] tkConfig.sh]] } {
 
6176
#      puts  [set dir]
 
6177
#      exit
 
6178
#  }
 
6179
#set dir [file dirname [set tk_library]]
 
6180
#if { [file exists [file join [set dir] tkConfig.sh]] } {
 
6181
#      puts  [set dir]
 
6182
#  }
 
6183
#exit 0
 
6184
#]
 
6185
#EOF
 
6186
#cp conftest.tcl foo.tcl
 
6187
#AC_CHECK_PROG(TKSH,wish,wish,${TKSH})
 
6188
##AC_CHECK_PROG(TKSH,wish8.0,wish8.0,${TKSH})
 
6189
#if test "${TKSH}" = "" ; then true ; else
 
6190
#TK_CONFIG_PREFIX=`${TKSH} < conftest.tcl`
 
6191
#fi
 
6192
 
 
6193
if test "${TCLSH}" = "" ; then true ; else
 
6194
        TK_CONFIG_PREFIX=`echo tcl_findLibrary \"tk\" \"${TCL_VERSION}\" \"\" \"tkConfig.sh\" \"TK_LIBRARY\" tk_library | ${TCLSH} 2>&1 | ${AWK} '/"source / {if (i++) next;sub("/[^/]*$","",$2);print $2}'`
 
6195
fi
 
6196
 
 
6197
fi
 
6198
fi
 
6199
#AC_MSG_CHECKING(TK_CONFIG_PREFIX=${TK_CONFIG_PREFIX})
 
6200
if test -f ${TK_CONFIG_PREFIX}/tkConfig.sh  ; then . ${TK_CONFIG_PREFIX}/tkConfig.sh ; fi
 
6201
 
 
6202
if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
 
6203
  TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
 
6204
  else
 
6205
  if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
 
6206
    TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
 
6207
  fi
 
6208
fi
 
6209
if test -d ${TK_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
 
6210
  TCL_LIBRARY=${TK_CONFIG_PREFIX}/tcl${TCL_VERSION}
 
6211
  else
 
6212
  if test -d ${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
 
6213
    TCL_LIBRARY=${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION}
 
6214
  fi
 
6215
fi
 
6216
if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
 
6217
  TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
 
6218
  else
 
6219
  if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
 
6220
    TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
 
6221
  fi    
 
6222
fi
 
6223
if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
 
6224
  TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
 
6225
  else
 
6226
  if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
 
6227
    TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
 
6228
  fi
 
6229
fi
 
6230
echo $ac_n "checking for main in -llieee""... $ac_c" 1>&6
 
6231
echo "configure:6232: checking for main in -llieee" >&5
 
6232
ac_lib_var=`echo lieee'_'main | sed 'y%./+-%__p_%'`
 
6233
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
 
6234
  echo $ac_n "(cached) $ac_c" 1>&6
 
6235
else
 
6236
  ac_save_LIBS="$LIBS"
 
6237
LIBS="-llieee  $LIBS"
 
6238
cat > conftest.$ac_ext <<EOF
 
6239
#line 6240 "configure"
 
6240
#include "confdefs.h"
 
6241
 
 
6242
int main() {
 
6243
main()
 
6244
; return 0; }
 
6245
EOF
 
6246
if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6247
  rm -rf conftest*
 
6248
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6249
else
 
6250
  echo "configure: failed program was:" >&5
 
6251
  cat conftest.$ac_ext >&5
 
6252
  rm -rf conftest*
 
6253
  eval "ac_cv_lib_$ac_lib_var=no"
 
6254
fi
 
6255
rm -f conftest*
 
6256
LIBS="$ac_save_LIBS"
 
6257
 
 
6258
fi
 
6259
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6260
  echo "$ac_t""yes" 1>&6
 
6261
  have_ieee=1
 
6262
else
 
6263
  echo "$ac_t""no" 1>&6
 
6264
have_ieee=0
 
6265
fi
 
6266
 
 
6267
if test "$have_ieee" = "0" ; then
 
6268
 TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
 
6269
fi
 
6270
if test "$have_dl" = "0" ; then
 
6271
 TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-ldl::g"`
 
6272
fi
 
6273
 
 
6274
 
 
6275
 
 
6276
 
 
6277
 
 
6278
 
 
6279
 
 
6280
 
 
6281
 
 
6282
 
 
6283
 
 
6284
 
 
6285
 
 
6286
 
 
6287
 
 
6288
 
 
6289
 
 
6290
 
 
6291
 
 
6292
 
 
6293
 
 
6294
if test -d "${TK_CONFIG_PREFIX}" ; then
 
6295
echo "$ac_t""using TK_VERSION=${TK_VERSION} in ${TK_CONFIG_PREFIX}" 1>&6
 
6296
else
 
6297
echo "$ac_t""not found" 1>&6
 
6298
fi
 
6299
 
 
6300
NOTIFY=$enable_notify
 
6301
 
 
6302
 
 
6303
      
 
6304
 
 
6305
 
 
6306
# for sgbc the mprotect capabilities.
 
6307
 
 
6308
# the time handling for unixtime, add timezone
 
6309
 
 
6310
echo $ac_n "checking alloca""... $ac_c" 1>&6
 
6311
echo "configure:6312: checking alloca" >&5
 
6312
if test "$cross_compiling" = yes; then
 
6313
  gcl_ok=no
 
6314
else
 
6315
  cat > conftest.$ac_ext <<EOF
 
6316
#line 6317 "configure"
 
6317
#include "confdefs.h"
 
6318
int main() { exit(alloca(500) != NULL ? 0 : 1);}
 
6319
EOF
 
6320
if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
6321
then
 
6322
  :
 
6323
else
 
6324
  echo "configure: failed program was:" >&5
 
6325
  cat conftest.$ac_ext >&5
 
6326
  rm -fr conftest*
 
6327
  gcl_ok=yes
 
6328
fi
 
6329
rm -fr conftest*
 
6330
fi
 
6331
 
 
6332
if test $gcl_ok = yes ; then
 
6333
    echo "$ac_t""yes" 1>&6
 
6334
    cat >> confdefs.h <<\EOF
 
6335
#define HAVE_ALLOCA 1
 
6336
EOF
 
6337
 
 
6338
else
 
6339
  if test "$cross_compiling" = yes; then
 
6340
  gcl_ok=no
 
6341
else
 
6342
  cat > conftest.$ac_ext <<EOF
 
6343
#line 6344 "configure"
 
6344
#include "confdefs.h"
 
6345
#include <alloca.h>
 
6346
  int main() { exit(alloca(500) != NULL ? 0 : 1)}
 
6347
EOF
 
6348
if { (eval echo configure:6349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
6349
then
 
6350
  :
 
6351
else
 
6352
  echo "configure: failed program was:" >&5
 
6353
  cat conftest.$ac_ext >&5
 
6354
  rm -fr conftest*
 
6355
  gcl_ok=yes
 
6356
fi
 
6357
rm -fr conftest*
 
6358
fi
 
6359
 
 
6360
 if test $gcl_ok = yes ; then
 
6361
    echo "$ac_t""yes" 1>&6
 
6362
    cat >> confdefs.h <<\EOF
 
6363
#define HAVE_ALLOCA 1
 
6364
EOF
 
6365
 
 
6366
    cat >> confdefs.h <<\EOF
 
6367
#define NEED_ALLOCA_H 1
 
6368
EOF
 
6369
 
 
6370
 fi
 
6371
fi
 
6372
if test $gcl_ok = no ; then     echo "$ac_t""no" 1>&6 ; fi
 
6373
 
 
6374
 
 
6375
 
 
6376
 
 
6377
 
 
6378
 
 
6379
 
 
6380
 
 
6381
 
 
6382
 
 
6383
# alloca
 
6384
 
 
6385
# dlopen etc
 
6386
# idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
 
6387
# then dlload("foo.o") a lisp file can refer to things in libX.so
 
6388
 
6389
 
 
6390
# what machine this is, and include then a machine specific hdr.
 
6391
# and machine specific defs.
 
6392
 
 
6393
# check bzero,
 
6394
 
 
6395
# check getcwd, getwd etc..
 
6396
 
 
6397
 
 
6398
 
 
6399
 
 
6400
# check socket stuff..
 
6401
 
 
6402
# getrlimit
 
6403
 
 
6404
# fionread or block
 
6405
 
 
6406
# redhat/cygnus released for some reason a buggy version of gcc,
 
6407
# which no one else released.   Catch that here.
 
6408
echo $ac_n "checking Checking for buggy gcc version from redhat""... $ac_c" 1>&6
 
6409
echo "configure:6410: checking Checking for buggy gcc version from redhat" >&5
 
6410
if  2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null 
 
6411
   then 
 
6412
        BROKEN_O4_OPT=1
 
6413
        cat >> confdefs.h <<\EOF
 
6414
#define BROKEN_O4_OPT 1
 
6415
EOF
 
6416
 
 
6417
        
 
6418
        echo ODIR_DEBUG=-O >> makedefsafter
 
6419
        echo >> makedefsafter
 
6420
        echo "$ac_t""yes .. turning off -O4" 1>&6
 
6421
   else
 
6422
        echo "$ac_t""no" 1>&6
 
6423
fi 
 
6424
 
 
6425
LIBS="$LDFLAGS $TLDFLAGS $LIBS $TLIBS"
 
6426
 
 
6427
FINAL_CFLAGS="$CFLAGS $TCFLAGS $PROCESSOR_FLAGS"
 
6428
 
 
6429
# Work around bug with gcc on ppc -- CM
 
6430
NIFLAGS="$CFLAGS $TCFLAGS $TONIFLAGS $PROCESSOR_FLAGS -I\$(GCLDIR)/o"
 
6431
 
 
6432
CFLAGS="$CFLAGS $TCFLAGS $TO3FLAGS $PROCESSOR_FLAGS -I\$(GCLDIR)/o"
 
6433
 
 
6434
O3FLAGS=$TO3FLAGS
 
6435
 
 
6436
O2FLAGS=$TO2FLAGS
 
6437
 
 
6438
 
 
6439
 
 
6440
 
 
6441
 
 
6442
if test -f h/$use.defs  ; then
 
6443
 
 
6444
  
 
6445
  trap '' 1 2 15
 
6446
cat > confcache <<\EOF
 
6447
# This file is a shell script that caches the results of configure
 
6448
# tests run on this system so they can be shared between configure
 
6449
# scripts and configure runs.  It is not useful on other systems.
 
6450
# If it contains results you don't want to keep, you may remove or edit it.
 
6451
#
 
6452
# By default, configure uses ./config.cache as the cache file,
 
6453
# creating it if it does not exist already.  You can give configure
 
6454
# the --cache-file=FILE option to use a different cache file; that is
 
6455
# what configure does when it calls configure scripts in
 
6456
# subdirectories, so they share the cache.
 
6457
# Giving --cache-file=/dev/null disables caching, for debugging configure.
 
6458
# config.status only pays attention to the cache file if you give it the
 
6459
# --recheck option to rerun configure.
 
6460
#
 
6461
EOF
 
6462
# The following way of writing the cache mishandles newlines in values,
 
6463
# but we know of no workaround that is simple, portable, and efficient.
 
6464
# So, don't put newlines in cache variables' values.
 
6465
# Ultrix sh set writes to stderr and can't be redirected directly,
 
6466
# and sets the high bit in the cache file unless we assign to the vars.
 
6467
(set) 2>&1 |
 
6468
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
 
6469
  *ac_space=\ *)
 
6470
    # `set' does not quote correctly, so add quotes (double-quote substitution
 
6471
    # turns \\\\ into \\, and sed turns \\ into \).
 
6472
    sed -n \
 
6473
      -e "s/'/'\\\\''/g" \
 
6474
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
 
6475
    ;;
 
6476
  *)
 
6477
    # `set' quotes correctly as required by POSIX, so do not add quotes.
 
6478
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
 
6479
    ;;
 
6480
  esac >> confcache
 
6481
if cmp -s $cache_file confcache; then
 
6482
  :
 
6483
else
 
6484
  if test -w $cache_file; then
 
6485
    echo "updating cache $cache_file"
 
6486
    cat confcache > $cache_file
 
6487
  else
 
6488
    echo "not updating unwritable cache $cache_file"
 
6489
  fi
 
6490
fi
 
6491
rm -f confcache
 
6492
 
 
6493
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
6494
 
 
6495
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
6496
# Let make expand exec_prefix.
 
6497
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
6498
 
 
6499
# Any assignment to VPATH causes Sun make to only execute
 
6500
# the first set of double-colon rules, so remove it if not needed.
 
6501
# If there is a colon in the path, we need to keep it.
 
6502
if test "x$srcdir" = x.; then
 
6503
  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
 
6504
fi
 
6505
 
 
6506
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
6507
 
 
6508
DEFS=-DHAVE_CONFIG_H
 
6509
 
 
6510
# Without the "./", some shells look in PATH for config.status.
 
6511
: ${CONFIG_STATUS=./config.status}
 
6512
 
 
6513
echo creating $CONFIG_STATUS
 
6514
rm -f $CONFIG_STATUS
 
6515
cat > $CONFIG_STATUS <<EOF
 
6516
#! /bin/sh
 
6517
# Generated automatically by configure.
 
6518
# Run this file to recreate the current configuration.
 
6519
# This directory was configured as follows,
 
6520
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
6521
#
 
6522
# $0 $ac_configure_args
 
6523
#
 
6524
# Compiler output produced by configure, useful for debugging
 
6525
# configure, is in ./config.log if it exists.
 
6526
 
 
6527
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
 
6528
for ac_option
 
6529
do
 
6530
  case "\$ac_option" in
 
6531
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
 
6532
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
 
6533
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
 
6534
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
 
6535
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
 
6536
    exit 0 ;;
 
6537
  -help | --help | --hel | --he | --h)
 
6538
    echo "\$ac_cs_usage"; exit 0 ;;
 
6539
  *) echo "\$ac_cs_usage"; exit 1 ;;
 
6540
  esac
 
6541
done
 
6542
 
 
6543
ac_given_srcdir=$srcdir
 
6544
 
 
6545
trap 'rm -fr `echo "makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp  h/gclincl.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 
6546
EOF
 
6547
cat >> $CONFIG_STATUS <<EOF
 
6548
 
 
6549
# Protect against being on the right side of a sed subst in config.status.
 
6550
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 
6551
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 
6552
$ac_vpsub
 
6553
$extrasub
 
6554
s%@SHELL@%$SHELL%g
 
6555
s%@CFLAGS@%$CFLAGS%g
 
6556
s%@CPPFLAGS@%$CPPFLAGS%g
 
6557
s%@CXXFLAGS@%$CXXFLAGS%g
 
6558
s%@FFLAGS@%$FFLAGS%g
 
6559
s%@DEFS@%$DEFS%g
 
6560
s%@LDFLAGS@%$LDFLAGS%g
 
6561
s%@LIBS@%$LIBS%g
 
6562
s%@exec_prefix@%$exec_prefix%g
 
6563
s%@prefix@%$prefix%g
 
6564
s%@program_transform_name@%$program_transform_name%g
 
6565
s%@bindir@%$bindir%g
 
6566
s%@sbindir@%$sbindir%g
 
6567
s%@libexecdir@%$libexecdir%g
 
6568
s%@datadir@%$datadir%g
 
6569
s%@sysconfdir@%$sysconfdir%g
 
6570
s%@sharedstatedir@%$sharedstatedir%g
 
6571
s%@localstatedir@%$localstatedir%g
 
6572
s%@libdir@%$libdir%g
 
6573
s%@includedir@%$includedir%g
 
6574
s%@oldincludedir@%$oldincludedir%g
 
6575
s%@infodir@%$infodir%g
 
6576
s%@mandir@%$mandir%g
 
6577
s%@VERSION@%$VERSION%g
 
6578
s%@host@%$host%g
 
6579
s%@host_alias@%$host_alias%g
 
6580
s%@host_cpu@%$host_cpu%g
 
6581
s%@host_vendor@%$host_vendor%g
 
6582
s%@host_os@%$host_os%g
 
6583
s%@PROCESSOR_FLAGS@%$PROCESSOR_FLAGS%g
 
6584
s%@CC@%$CC%g
 
6585
s%@CPP@%$CPP%g
 
6586
s%@AWK@%$AWK%g
 
6587
s%@MAKEINFO@%$MAKEINFO%g
 
6588
s%@GMP@%$GMP%g
 
6589
s%@GMPDIR@%$GMPDIR%g
 
6590
s%@X_CFLAGS@%$X_CFLAGS%g
 
6591
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
 
6592
s%@X_LIBS@%$X_LIBS%g
 
6593
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
 
6594
s%@BUILD_BFD@%$BUILD_BFD%g
 
6595
s%@LITTLE_END@%$LITTLE_END%g
 
6596
s%@HAVE_LONG_LONG@%$HAVE_LONG_LONG%g
 
6597
s%@FLISP@%$FLISP%g
 
6598
s%@SYSTEM@%$SYSTEM%g
 
6599
s%@CLSTANDARD@%$CLSTANDARD%g
 
6600
s%@PAGEWIDTH@%$PAGEWIDTH%g
 
6601
s%@RL_OBJS@%$RL_OBJS%g
 
6602
s%@RL_LIB@%$RL_LIB%g
 
6603
s%@NO_PROFILE@%$NO_PROFILE%g
 
6604
s%@HAVE_SETENV@%$HAVE_SETENV%g
 
6605
s%@HAVE_PUTENV@%$HAVE_PUTENV%g
 
6606
s%@USE_CLEANUP@%$USE_CLEANUP%g
 
6607
s%@ENDIAN_ALREADY_DEFINED@%$ENDIAN_ALREADY_DEFINED%g
 
6608
s%@HAVE_SV_ONSTACK@%$HAVE_SV_ONSTACK%g
 
6609
s%@HAVE_SIGSYS@%$HAVE_SIGSYS%g
 
6610
s%@HAVE_SIGEMT@%$HAVE_SIGEMT%g
 
6611
s%@EMACS@%$EMACS%g
 
6612
s%@EMACS_SITE_LISP@%$EMACS_SITE_LISP%g
 
6613
s%@EMACS_DEFAULT_EL@%$EMACS_DEFAULT_EL%g
 
6614
s%@INFO_DIR@%$INFO_DIR%g
 
6615
s%@TCLSH@%$TCLSH%g
 
6616
s%@TK_CONFIG_PREFIX@%$TK_CONFIG_PREFIX%g
 
6617
s%@TK_LIBRARY@%$TK_LIBRARY%g
 
6618
s%@TCL_LIBRARY@%$TCL_LIBRARY%g
 
6619
s%@TK_XINCLUDES@%$TK_XINCLUDES%g
 
6620
s%@TK_INCLUDE@%$TK_INCLUDE%g
 
6621
s%@TCL_INCLUDE@%$TCL_INCLUDE%g
 
6622
s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
 
6623
s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
 
6624
s%@TK_XLIBSW@%$TK_XLIBSW%g
 
6625
s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
 
6626
s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
 
6627
s%@TCL_LIBS@%$TCL_LIBS%g
 
6628
s%@NOTIFY@%$NOTIFY%g
 
6629
s%@BROKEN_O4_OPT@%$BROKEN_O4_OPT%g
 
6630
s%@FINAL_CFLAGS@%$FINAL_CFLAGS%g
 
6631
s%@NIFLAGS@%$NIFLAGS%g
 
6632
s%@O3FLAGS@%$O3FLAGS%g
 
6633
s%@O2FLAGS@%$O2FLAGS%g
 
6634
s%@EXTRA_LOBJS@%$EXTRA_LOBJS%g
 
6635
s%@LEADING_UNDERSCORE@%$LEADING_UNDERSCORE%g
 
6636
s%@GNU_LD@%$GNU_LD%g
 
6637
s%@use@%$use%g
 
6638
 
 
6639
CEOF
 
6640
EOF
 
6641
 
 
6642
cat >> $CONFIG_STATUS <<\EOF
 
6643
 
 
6644
# Split the substitutions into bite-sized pieces for seds with
 
6645
# small command number limits, like on Digital OSF/1 and HP-UX.
 
6646
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
 
6647
ac_file=1 # Number of current file.
 
6648
ac_beg=1 # First line for current file.
 
6649
ac_end=$ac_max_sed_cmds # Line after last line for current file.
 
6650
ac_more_lines=:
 
6651
ac_sed_cmds=""
 
6652
while $ac_more_lines; do
 
6653
  if test $ac_beg -gt 1; then
 
6654
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
 
6655
  else
 
6656
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
 
6657
  fi
 
6658
  if test ! -s conftest.s$ac_file; then
 
6659
    ac_more_lines=false
 
6660
    rm -f conftest.s$ac_file
 
6661
  else
 
6662
    if test -z "$ac_sed_cmds"; then
 
6663
      ac_sed_cmds="sed -f conftest.s$ac_file"
 
6664
    else
 
6665
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
 
6666
    fi
 
6667
    ac_file=`expr $ac_file + 1`
 
6668
    ac_beg=$ac_end
 
6669
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
 
6670
  fi
 
6671
done
 
6672
if test -z "$ac_sed_cmds"; then
 
6673
  ac_sed_cmds=cat
 
6674
fi
 
6675
EOF
 
6676
 
 
6677
cat >> $CONFIG_STATUS <<EOF
 
6678
 
 
6679
CONFIG_FILES=\${CONFIG_FILES-"makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp "}
 
6680
EOF
 
6681
cat >> $CONFIG_STATUS <<\EOF
 
6682
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 
6683
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
6684
  case "$ac_file" in
 
6685
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
 
6686
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
6687
  *) ac_file_in="${ac_file}.in" ;;
 
6688
  esac
 
6689
 
 
6690
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
6691
 
 
6692
  # Remove last slash and all that follows it.  Not all systems have dirname.
 
6693
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
 
6694
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
 
6695
    # The file is in a subdirectory.
 
6696
    test ! -d "$ac_dir" && mkdir "$ac_dir"
 
6697
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
 
6698
    # A "../" for each directory in $ac_dir_suffix.
 
6699
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
 
6700
  else
 
6701
    ac_dir_suffix= ac_dots=
 
6702
  fi
 
6703
 
 
6704
  case "$ac_given_srcdir" in
 
6705
  .)  srcdir=.
 
6706
      if test -z "$ac_dots"; then top_srcdir=.
 
6707
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
 
6708
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
 
6709
  *) # Relative path.
 
6710
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
 
6711
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
6712
  esac
 
6713
 
 
6714
 
 
6715
  echo creating "$ac_file"
 
6716
  rm -f "$ac_file"
 
6717
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
 
6718
  case "$ac_file" in
 
6719
  *Makefile*) ac_comsub="1i\\
 
6720
# $configure_input" ;;
 
6721
  *) ac_comsub= ;;
 
6722
  esac
 
6723
 
 
6724
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
 
6725
  sed -e "$ac_comsub
 
6726
s%@configure_input@%$configure_input%g
 
6727
s%@srcdir@%$srcdir%g
 
6728
s%@top_srcdir@%$top_srcdir%g
 
6729
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
 
6730
fi; done
 
6731
rm -f conftest.s*
 
6732
 
 
6733
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 
6734
# NAME is the cpp macro being defined and VALUE is the value it is being given.
 
6735
#
 
6736
# ac_d sets the value in "#define NAME VALUE" lines.
 
6737
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
 
6738
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
 
6739
ac_dC='\3'
 
6740
ac_dD='%g'
 
6741
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
 
6742
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
 
6743
ac_uB='\([      ]\)%\1#\2define\3'
 
6744
ac_uC=' '
 
6745
ac_uD='\4%g'
 
6746
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
 
6747
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
 
6748
ac_eB='$%\1#\2define\3'
 
6749
ac_eC=' '
 
6750
ac_eD='%g'
 
6751
 
 
6752
if test "${CONFIG_HEADERS+set}" != set; then
 
6753
EOF
 
6754
cat >> $CONFIG_STATUS <<EOF
 
6755
  CONFIG_HEADERS="h/gclincl.h"
 
6756
EOF
 
6757
cat >> $CONFIG_STATUS <<\EOF
 
6758
fi
 
6759
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
 
6760
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
6761
  case "$ac_file" in
 
6762
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
 
6763
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
6764
  *) ac_file_in="${ac_file}.in" ;;
 
6765
  esac
 
6766
 
 
6767
  echo creating $ac_file
 
6768
 
 
6769
  rm -f conftest.frag conftest.in conftest.out
 
6770
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
 
6771
  cat $ac_file_inputs > conftest.in
 
6772
 
 
6773
EOF
 
6774
 
 
6775
# Transform confdefs.h into a sed script conftest.vals that substitutes
 
6776
# the proper values into config.h.in to produce config.h.  And first:
 
6777
# Protect against being on the right side of a sed subst in config.status.
 
6778
# Protect against being in an unquoted here document in config.status.
 
6779
rm -f conftest.vals
 
6780
cat > conftest.hdr <<\EOF
 
6781
s/[\\&%]/\\&/g
 
6782
s%[\\$`]%\\&%g
 
6783
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
 
6784
s%ac_d%ac_u%gp
 
6785
s%ac_u%ac_e%gp
 
6786
EOF
 
6787
sed -n -f conftest.hdr confdefs.h > conftest.vals
 
6788
rm -f conftest.hdr
 
6789
 
 
6790
# This sed command replaces #undef with comments.  This is necessary, for
 
6791
# example, in the case of _POSIX_SOURCE, which is predefined and required
 
6792
# on some systems where configure will not decide to define it.
 
6793
cat >> conftest.vals <<\EOF
 
6794
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
 
6795
EOF
 
6796
 
 
6797
# Break up conftest.vals because some shells have a limit on
 
6798
# the size of here documents, and old seds have small limits too.
 
6799
 
 
6800
rm -f conftest.tail
 
6801
while :
 
6802
do
 
6803
  ac_lines=`grep -c . conftest.vals`
 
6804
  # grep -c gives empty output for an empty file on some AIX systems.
 
6805
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
 
6806
  # Write a limited-size here document to conftest.frag.
 
6807
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
 
6808
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
 
6809
  echo 'CEOF
 
6810
  sed -f conftest.frag conftest.in > conftest.out
 
6811
  rm -f conftest.in
 
6812
  mv conftest.out conftest.in
 
6813
' >> $CONFIG_STATUS
 
6814
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
 
6815
  rm -f conftest.vals
 
6816
  mv conftest.tail conftest.vals
 
6817
done
 
6818
rm -f conftest.vals
 
6819
 
 
6820
cat >> $CONFIG_STATUS <<\EOF
 
6821
  rm -f conftest.frag conftest.h
 
6822
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
 
6823
  cat conftest.in >> conftest.h
 
6824
  rm -f conftest.in
 
6825
  if cmp -s $ac_file conftest.h 2>/dev/null; then
 
6826
    echo "$ac_file is unchanged"
 
6827
    rm -f conftest.h
 
6828
  else
 
6829
    # Remove last slash and all that follows it.  Not all systems have dirname.
 
6830
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
 
6831
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
 
6832
      # The file is in a subdirectory.
 
6833
      test ! -d "$ac_dir" && mkdir "$ac_dir"
 
6834
    fi
 
6835
    rm -f $ac_file
 
6836
    mv conftest.h $ac_file
 
6837
  fi
 
6838
fi; done
 
6839
 
 
6840
EOF
 
6841
cat >> $CONFIG_STATUS <<EOF
 
6842
 
 
6843
EOF
 
6844
cat >> $CONFIG_STATUS <<\EOF
 
6845
 
 
6846
exit 0
 
6847
EOF
 
6848
chmod +x $CONFIG_STATUS
 
6849
rm -fr confdefs* $ac_clean_files
 
6850
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
6851
 
 
6852
  echo makedefc
 
6853
  cat makedefc
 
6854
 
 
6855
  echo    add-defs1 $use
 
6856
  CC=$CC ./add-defs1 $use
 
6857
 
 
6858
else
 
6859
  echo "Unable to guess machine type"
 
6860
  echo use configure --enable-machine=XXX,  for XXX such that h/XXX.defs exists, ie in h/*.defs
 
6861
fi