]> err.no Git - sope/blob - libFoundation/configure
updated framework version
[sope] / libFoundation / configure
1 #! /bin/sh
2
3
4
5
6
7
8
9
10  
11 # Guess values for system-dependent variables and create Makefiles.
12 # Generated automatically using autoconf version 2.13 
13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
14 #
15 # This configure script is free software; the Free Software Foundation
16 # gives unlimited permission to copy, distribute and modify it.
17
18 # Defaults:
19 ac_help=
20 ac_default_prefix=/usr/local
21 # Any additions from configure.in:
22 ac_help="$ac_help
23
24 --with-ffcall
25     Use the ffcall library to implement dynamic invocation of methods. Note
26     the licensing restrictions of ffcall before enabling that switch !"
27 ac_help="$ac_help
28
29 --with-gc
30 --with-gc=DIR
31     Use the Boehm's garbage collector for automatic memory management instead
32     of the normal OpenStep memory management policy.
33     Search in DIR for GC include files (eg DIR=objc leads to <objc/gc.h>)"
34 ac_help="$ac_help
35
36 --with-gc-lib
37 --with-gc-lib=LIB
38     Link against GC library LIB. The default is 'gc'. Do not specify
39     --with-gc-lib if you have the GC contained in some of your system
40     libraries (eg libobjc.a)"
41 ac_default_prefix=/usr/local
42
43 # Initialize some variables set by options.
44 # The variables have the same names as the options, with
45 # dashes changed to underlines.
46 build=NONE
47 cache_file=./config.cache
48 exec_prefix=NONE
49 host=NONE
50 no_create=
51 nonopt=NONE
52 no_recursion=
53 prefix=NONE
54 program_prefix=NONE
55 program_suffix=NONE
56 program_transform_name=s,x,x,
57 silent=
58 site=
59 srcdir=
60 target=NONE
61 verbose=
62 x_includes=NONE
63 x_libraries=NONE
64 bindir='${exec_prefix}/bin'
65 sbindir='${exec_prefix}/sbin'
66 libexecdir='${exec_prefix}/libexec'
67 datadir='${prefix}/share'
68 sysconfdir='${prefix}/etc'
69 sharedstatedir='${prefix}/com'
70 localstatedir='${prefix}/var'
71 libdir='${exec_prefix}/lib'
72 includedir='${prefix}/include'
73 oldincludedir='/usr/include'
74 infodir='${prefix}/info'
75 mandir='${prefix}/man'
76
77 # Initialize some other variables.
78 subdirs=
79 MFLAGS= MAKEFLAGS=
80 SHELL=${CONFIG_SHELL-/bin/sh}
81 # Maximum number of lines to put in a shell here document.
82 ac_max_here_lines=12
83
84 ac_prev=
85 for ac_option
86 do
87
88   # If the previous option needs an argument, assign it.
89   if test -n "$ac_prev"; then
90     eval "$ac_prev=\$ac_option"
91     ac_prev=
92     continue
93   fi
94
95   case "$ac_option" in
96   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
97   *) ac_optarg= ;;
98   esac
99
100   # Accept the important Cygnus configure options, so we can diagnose typos.
101
102   case "$ac_option" in
103
104   -bindir | --bindir | --bindi | --bind | --bin | --bi)
105     ac_prev=bindir ;;
106   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
107     bindir="$ac_optarg" ;;
108
109   -build | --build | --buil | --bui | --bu)
110     ac_prev=build ;;
111   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
112     build="$ac_optarg" ;;
113
114   -cache-file | --cache-file | --cache-fil | --cache-fi \
115   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
116     ac_prev=cache_file ;;
117   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
118   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
119     cache_file="$ac_optarg" ;;
120
121   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
122     ac_prev=datadir ;;
123   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
124   | --da=*)
125     datadir="$ac_optarg" ;;
126
127   -disable-* | --disable-*)
128     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
129     # Reject names that are not valid shell variable names.
130     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132     fi
133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134     eval "enable_${ac_feature}=no" ;;
135
136   -enable-* | --enable-*)
137     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
138     # Reject names that are not valid shell variable names.
139     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
140       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141     fi
142     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143     case "$ac_option" in
144       *=*) ;;
145       *) ac_optarg=yes ;;
146     esac
147     eval "enable_${ac_feature}='$ac_optarg'" ;;
148
149   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
150   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
151   | --exec | --exe | --ex)
152     ac_prev=exec_prefix ;;
153   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
154   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
155   | --exec=* | --exe=* | --ex=*)
156     exec_prefix="$ac_optarg" ;;
157
158   -gas | --gas | --ga | --g)
159     # Obsolete; use --with-gas.
160     with_gas=yes ;;
161
162   -help | --help | --hel | --he)
163     # Omit some internal or obsolete options to make the list less imposing.
164     # This message is too long to be a string in the A/UX 3.1 sh.
165     cat << EOF
166 Usage: configure [options] [host]
167 Options: [defaults in brackets after descriptions]
168 Configuration:
169   --cache-file=FILE       cache test results in FILE
170   --help                  print this message
171   --no-create             do not create output files
172   --quiet, --silent       do not print \`checking...' messages
173   --version               print the version of autoconf that created configure
174 Directory and file names:
175   --prefix=PREFIX         install architecture-independent files in PREFIX
176                           [$ac_default_prefix]
177   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
178                           [same as prefix]
179   --bindir=DIR            user executables in DIR [EPREFIX/bin]
180   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
181   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
182   --datadir=DIR           read-only architecture-independent data in DIR
183                           [PREFIX/share]
184   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
185   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
186                           [PREFIX/com]
187   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
188   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
189   --includedir=DIR        C header files in DIR [PREFIX/include]
190   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
191   --infodir=DIR           info documentation in DIR [PREFIX/info]
192   --mandir=DIR            man documentation in DIR [PREFIX/man]
193   --srcdir=DIR            find the sources in DIR [configure dir or ..]
194   --program-prefix=PREFIX prepend PREFIX to installed program names
195   --program-suffix=SUFFIX append SUFFIX to installed program names
196   --program-transform-name=PROGRAM
197                           run sed PROGRAM on installed program names
198 EOF
199     cat << EOF
200 Host type:
201   --build=BUILD           configure for building on BUILD [BUILD=HOST]
202   --host=HOST             configure for HOST [guessed]
203   --target=TARGET         configure for TARGET [TARGET=HOST]
204 Features and packages:
205   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
206   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
207   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
208   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
209   --x-includes=DIR        X include files are in DIR
210   --x-libraries=DIR       X library files are in DIR
211 EOF
212     if test -n "$ac_help"; then
213       echo "--enable and --with options recognized:$ac_help"
214     fi
215     exit 0 ;;
216
217   -host | --host | --hos | --ho)
218     ac_prev=host ;;
219   -host=* | --host=* | --hos=* | --ho=*)
220     host="$ac_optarg" ;;
221
222   -includedir | --includedir | --includedi | --included | --include \
223   | --includ | --inclu | --incl | --inc)
224     ac_prev=includedir ;;
225   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
226   | --includ=* | --inclu=* | --incl=* | --inc=*)
227     includedir="$ac_optarg" ;;
228
229   -infodir | --infodir | --infodi | --infod | --info | --inf)
230     ac_prev=infodir ;;
231   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
232     infodir="$ac_optarg" ;;
233
234   -libdir | --libdir | --libdi | --libd)
235     ac_prev=libdir ;;
236   -libdir=* | --libdir=* | --libdi=* | --libd=*)
237     libdir="$ac_optarg" ;;
238
239   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
240   | --libexe | --libex | --libe)
241     ac_prev=libexecdir ;;
242   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
243   | --libexe=* | --libex=* | --libe=*)
244     libexecdir="$ac_optarg" ;;
245
246   -localstatedir | --localstatedir | --localstatedi | --localstated \
247   | --localstate | --localstat | --localsta | --localst \
248   | --locals | --local | --loca | --loc | --lo)
249     ac_prev=localstatedir ;;
250   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
251   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
252   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
253     localstatedir="$ac_optarg" ;;
254
255   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
256     ac_prev=mandir ;;
257   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
258     mandir="$ac_optarg" ;;
259
260   -nfp | --nfp | --nf)
261     # Obsolete; use --without-fp.
262     with_fp=no ;;
263
264   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
265   | --no-cr | --no-c)
266     no_create=yes ;;
267
268   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
269   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
270     no_recursion=yes ;;
271
272   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
273   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
274   | --oldin | --oldi | --old | --ol | --o)
275     ac_prev=oldincludedir ;;
276   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
277   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
278   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
279     oldincludedir="$ac_optarg" ;;
280
281   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
282     ac_prev=prefix ;;
283   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
284     prefix="$ac_optarg" ;;
285
286   -program-prefix | --program-prefix | --program-prefi | --program-pref \
287   | --program-pre | --program-pr | --program-p)
288     ac_prev=program_prefix ;;
289   -program-prefix=* | --program-prefix=* | --program-prefi=* \
290   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
291     program_prefix="$ac_optarg" ;;
292
293   -program-suffix | --program-suffix | --program-suffi | --program-suff \
294   | --program-suf | --program-su | --program-s)
295     ac_prev=program_suffix ;;
296   -program-suffix=* | --program-suffix=* | --program-suffi=* \
297   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
298     program_suffix="$ac_optarg" ;;
299
300   -program-transform-name | --program-transform-name \
301   | --program-transform-nam | --program-transform-na \
302   | --program-transform-n | --program-transform- \
303   | --program-transform | --program-transfor \
304   | --program-transfo | --program-transf \
305   | --program-trans | --program-tran \
306   | --progr-tra | --program-tr | --program-t)
307     ac_prev=program_transform_name ;;
308   -program-transform-name=* | --program-transform-name=* \
309   | --program-transform-nam=* | --program-transform-na=* \
310   | --program-transform-n=* | --program-transform-=* \
311   | --program-transform=* | --program-transfor=* \
312   | --program-transfo=* | --program-transf=* \
313   | --program-trans=* | --program-tran=* \
314   | --progr-tra=* | --program-tr=* | --program-t=*)
315     program_transform_name="$ac_optarg" ;;
316
317   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
318   | -silent | --silent | --silen | --sile | --sil)
319     silent=yes ;;
320
321   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
322     ac_prev=sbindir ;;
323   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
324   | --sbi=* | --sb=*)
325     sbindir="$ac_optarg" ;;
326
327   -sharedstatedir | --sharedstatedir | --sharedstatedi \
328   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
329   | --sharedst | --shareds | --shared | --share | --shar \
330   | --sha | --sh)
331     ac_prev=sharedstatedir ;;
332   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
333   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
334   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
335   | --sha=* | --sh=*)
336     sharedstatedir="$ac_optarg" ;;
337
338   -site | --site | --sit)
339     ac_prev=site ;;
340   -site=* | --site=* | --sit=*)
341     site="$ac_optarg" ;;
342
343   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
344     ac_prev=srcdir ;;
345   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346     srcdir="$ac_optarg" ;;
347
348   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349   | --syscon | --sysco | --sysc | --sys | --sy)
350     ac_prev=sysconfdir ;;
351   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353     sysconfdir="$ac_optarg" ;;
354
355   -target | --target | --targe | --targ | --tar | --ta | --t)
356     ac_prev=target ;;
357   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358     target="$ac_optarg" ;;
359
360   -v | -verbose | --verbose | --verbos | --verbo | --verb)
361     verbose=yes ;;
362
363   -version | --version | --versio | --versi | --vers)
364     echo "configure generated by autoconf version 2.13"
365     exit 0 ;;
366
367   -with-* | --with-*)
368     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369     # Reject names that are not valid shell variable names.
370     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372     fi
373     ac_package=`echo $ac_package| sed 's/-/_/g'`
374     case "$ac_option" in
375       *=*) ;;
376       *) ac_optarg=yes ;;
377     esac
378     eval "with_${ac_package}='$ac_optarg'" ;;
379
380   -without-* | --without-*)
381     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382     # Reject names that are not valid shell variable names.
383     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
385     fi
386     ac_package=`echo $ac_package| sed 's/-/_/g'`
387     eval "with_${ac_package}=no" ;;
388
389   --x)
390     # Obsolete; use --with-x.
391     with_x=yes ;;
392
393   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394   | --x-incl | --x-inc | --x-in | --x-i)
395     ac_prev=x_includes ;;
396   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398     x_includes="$ac_optarg" ;;
399
400   -x-libraries | --x-libraries | --x-librarie | --x-librari \
401   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402     ac_prev=x_libraries ;;
403   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405     x_libraries="$ac_optarg" ;;
406
407   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
408     ;;
409
410   *)
411     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412       echo "configure: warning: $ac_option: invalid host type" 1>&2
413     fi
414     if test "x$nonopt" != xNONE; then
415       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416     fi
417     nonopt="$ac_option"
418     ;;
419
420   esac
421 done
422
423 if test -n "$ac_prev"; then
424   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 fi
426
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
428
429 # File descriptor usage:
430 # 0 standard input
431 # 1 file creation
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
438   exec 6>/dev/null
439 else
440   exec 6>&1
441 fi
442 exec 5>./config.log
443
444 echo "\
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
447 " 1>&5
448
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
451 ac_configure_args=
452 for ac_arg
453 do
454   case "$ac_arg" in
455   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456   | --no-cr | --no-c) ;;
457   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462   esac
463 done
464
465 # NLS nuisances.
466 # Only set these to C if already set.  These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
474
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 echo > confdefs.h
479
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=${srcdir}/Foundation/NSObject.h.in
483
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486   ac_srcdir_defaulted=yes
487   # Try the directory containing this script, then its parent.
488   ac_prog=$0
489   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
491   srcdir=$ac_confdir
492   if test ! -r $srcdir/$ac_unique_file; then
493     srcdir=..
494   fi
495 else
496   ac_srcdir_defaulted=no
497 fi
498 if test ! -r $srcdir/$ac_unique_file; then
499   if test "$ac_srcdir_defaulted" = yes; then
500     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
501   else
502     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503   fi
504 fi
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
506
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$CONFIG_SITE"; then
509   if test "x$prefix" != xNONE; then
510     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
511   else
512     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
513   fi
514 fi
515 for ac_site_file in $CONFIG_SITE; do
516   if test -r "$ac_site_file"; then
517     echo "loading site script $ac_site_file"
518     . "$ac_site_file"
519   fi
520 done
521
522 if test -r "$cache_file"; then
523   echo "loading cache $cache_file"
524   . $cache_file
525 else
526   echo "creating cache $cache_file"
527   > $cache_file
528 fi
529
530 ac_ext=c
531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
532 ac_cpp='$CPP $CPPFLAGS'
533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
535 cross_compiling=$ac_cv_prog_cc_cross
536
537 ac_exeext=
538 ac_objext=o
539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
540   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
541   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
542     ac_n= ac_c='
543 ' ac_t='        '
544   else
545     ac_n=-n ac_c= ac_t=
546   fi
547 else
548   ac_n= ac_c='\c' ac_t=
549 fi
550
551
552
553 # ******************** GNUstep env ************************************
554
555 if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
556   { echo "configure: error: Your GNUstep.sh is not sourced" 1>&2; exit 1; }
557 fi
558
559 # ******************** version ****************************************
560
561 # todo: read from Version file?
562 MAJOR_VERSION=1
563 MINOR_VERSION=0
564 SUBMINOR_VERSION=73
565
566
567
568
569
570
571 # ******************** options ****************************************
572
573 # Check whether --with-ffcall or --without-ffcall was given.
574 if test "${with_ffcall+set}" = set; then
575   withval="$with_ffcall"
576   ac_cv_use_ffcall=yes
577 else
578   ac_cv_use_ffcall=no
579
580 fi
581
582
583 # Check whether --with-gc or --without-gc was given.
584 if test "${with_gc+set}" = set; then
585   withval="$with_gc"
586   ac_cv_use_gc=yes; ac_cv_link_gc=yes;
587 if  test x${withval} != xyes ; then
588     GC_INCLUDE_DIR="${withval}/"
589 else
590     GC_INCLUDE_DIR=""
591 fi
592
593 else
594   ac_cv_use_gc=no; ac_cv_link_gc=no; GC_INCLUDE_DIR=""
595
596 fi
597
598
599 # Check whether --with-gc-lib or --without-gc-lib was given.
600 if test "${with_gc_lib+set}" = set; then
601   withval="$with_gc_lib"
602   ac_cv_link_gc=yes;
603 if  test x${withval} != xyes ; then
604     GC_LIB="${withval}"
605 else
606     GC_LIB="gc"
607 fi
608
609 else
610   ac_cv_link_gc=no; GC_LIB=""
611
612 fi
613
614
615
616
617
618
619 # ******************** system type ************************************
620
621 # Determine the host, build, and target systems
622 CC_TARGET=$target # use --target value for CC, not the canonical form
623 ac_aux_dir=
624 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
625   if test -f $ac_dir/install-sh; then
626     ac_aux_dir=$ac_dir
627     ac_install_sh="$ac_aux_dir/install-sh -c"
628     break
629   elif test -f $ac_dir/install.sh; then
630     ac_aux_dir=$ac_dir
631     ac_install_sh="$ac_aux_dir/install.sh -c"
632     break
633   fi
634 done
635 if test -z "$ac_aux_dir"; then
636   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
637 fi
638 ac_config_guess=$ac_aux_dir/config.guess
639 ac_config_sub=$ac_aux_dir/config.sub
640 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
641
642
643 # Do some error checking and defaulting for the host and target type.
644 # The inputs are:
645 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
646 #
647 # The rules are:
648 # 1. You are not allowed to specify --host, --target, and nonopt at the
649 #    same time.
650 # 2. Host defaults to nonopt.
651 # 3. If nonopt is not specified, then host defaults to the current host,
652 #    as determined by config.guess.
653 # 4. Target and build default to nonopt.
654 # 5. If nonopt is not specified, then target and build default to host.
655
656 # The aliases save the names the user supplied, while $host etc.
657 # will get canonicalized.
658 case $host---$target---$nonopt in
659 NONE---*---* | *---NONE---* | *---*---NONE) ;;
660 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
661 esac
662
663
664 # Make sure we can run config.sub.
665 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
666 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
667 fi
668
669 echo $ac_n "checking host system type""... $ac_c" 1>&6
670 echo "configure:671: checking host system type" >&5
671
672 host_alias=$host
673 case "$host_alias" in
674 NONE)
675   case $nonopt in
676   NONE)
677     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
678     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
679     fi ;;
680   *) host_alias=$nonopt ;;
681   esac ;;
682 esac
683
684 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
685 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
686 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
687 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
688 echo "$ac_t""$host" 1>&6
689
690 echo $ac_n "checking target system type""... $ac_c" 1>&6
691 echo "configure:692: checking target system type" >&5
692
693 target_alias=$target
694 case "$target_alias" in
695 NONE)
696   case $nonopt in
697   NONE) target_alias=$host_alias ;;
698   *) target_alias=$nonopt ;;
699   esac ;;
700 esac
701
702 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
703 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
704 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
705 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
706 echo "$ac_t""$target" 1>&6
707
708 echo $ac_n "checking build system type""... $ac_c" 1>&6
709 echo "configure:710: checking build system type" >&5
710
711 build_alias=$build
712 case "$build_alias" in
713 NONE)
714   case $nonopt in
715   NONE) build_alias=$host_alias ;;
716   *) build_alias=$nonopt ;;
717   esac ;;
718 esac
719
720 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
721 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
722 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
723 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
724 echo "$ac_t""$build" 1>&6
725
726 test "$host_alias" != "$target_alias" &&
727   test "$program_prefix$program_suffix$program_transform_name" = \
728     NONENONEs,x,x, &&
729   program_prefix=${target_alias}-
730
731
732
733
734
735 # check for cross compilation
736
737 if [ x$target = xNONE ]; then
738   set target $host
739 fi
740
741 if test "x$host" != "x$target"; then
742         cross_defines="CROSS=-DCROSS_COMPILE"
743         cross_compiling="yes"
744         echo "cross compiling from $host to $target .."
745         CC=${CC_TARGET}-gcc
746         LD=${CC_TARGET}-ld
747         AR=${CC_TARGET}-ar
748         RANLIB=${CC_TARGET}-ranlib
749 fi
750
751 case "x${host_cpu}" in
752     xi[456]86*) host_cpu=i386;;
753     xhppa1.1)   host_cpu=hppa;;
754 esac
755
756 if test "x$cross_compiling" = xyes; then
757   case "x${target_cpu}" in
758     xi[456]86*) target_cpu=i386;;
759     xhppa1.1)   target_cpu=hppa;;
760   esac
761 else
762   target_cpu=${host_cpu}
763   target_os=${host_os}
764   target_vendor=${host_vendor}
765 fi
766
767 case "x${target_os}" in
768   xfreebsd*) target_os=freebsd;;
769 esac
770
771
772 # Assign the HOST/TARGET variables for sharedlib.mak
773 HOST=$host
774 HOST_CPU=$host_cpu
775 HOST_VENDOR=$host_vendor
776 HOST_OS=$host_os
777 TARGET=$target
778 TARGET_CPU=$target_cpu
779 TARGET_VENDOR=$target_vendor
780 TARGET_OS=$target_os
781
782 if test ! -f ${srcdir}/config/${target_cpu}/${target_os}.h; then
783     if test -d ${srcdir}/config/${target_cpu}; then
784         echo
785         echo '*************** Warning ****************'
786         echo This package was not ported to $target_cpu running $target_os operating system.
787         echo We\'ll use the default configuration file ${srcdir}/config/$target_cpu/$target_cpu.h.
788         echo '****************************************'
789         echo
790         target_os=$target_cpu
791     else
792         echo
793         echo '*************** Warning ****************'
794         echo This package was not ported to $target_cpu running $target_os operating system.
795         echo We\'ll use a generic configuration file, thus you will be able to compile the library, but most probably the NSInvocation, NSMethodSignature and all classes that use them will not work correctly or will not work at all.
796         echo '****************************************'
797         target_cpu=generic
798         target_os=generic
799     fi
800 fi
801
802
803 # ******************** autoconf vars **********************************
804
805
806 WITH_GNUSTEP=yes
807 cat >> confdefs.h <<\EOF
808 #define WITH_GNUSTEP 1
809 EOF
810
811
812
813 WITH_FFCALL=$ac_cv_use_ffcall
814 if test "x$ac_cv_use_ffcall" = xyes; then
815   cat >> confdefs.h <<\EOF
816 #define WITH_FFCALL 1
817 EOF
818
819 fi
820
821
822 WITH_GC=$ac_cv_use_gc
823 if test "$WITH_GC" = yes; then
824   cat >> confdefs.h <<\EOF
825 #define LIB_FOUNDATION_BOEHM_GC 1
826 EOF
827
828 fi
829
830 # Extract the first word of "gcc", so it can be a program name with args.
831 set dummy gcc; ac_word=$2
832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
833 echo "configure:834: checking for $ac_word" >&5
834 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   if test -n "$CC"; then
838   ac_cv_prog_CC="$CC" # Let the user override the test.
839 else
840   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
841   ac_dummy="$PATH"
842   for ac_dir in $ac_dummy; do
843     test -z "$ac_dir" && ac_dir=.
844     if test -f $ac_dir/$ac_word; then
845       ac_cv_prog_CC="gcc"
846       break
847     fi
848   done
849   IFS="$ac_save_ifs"
850 fi
851 fi
852 CC="$ac_cv_prog_CC"
853 if test -n "$CC"; then
854   echo "$ac_t""$CC" 1>&6
855 else
856   echo "$ac_t""no" 1>&6
857 fi
858
859 if test -z "$CC"; then
860   # Extract the first word of "cc", so it can be a program name with args.
861 set dummy cc; ac_word=$2
862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
863 echo "configure:864: checking for $ac_word" >&5
864 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
865   echo $ac_n "(cached) $ac_c" 1>&6
866 else
867   if test -n "$CC"; then
868   ac_cv_prog_CC="$CC" # Let the user override the test.
869 else
870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
871   ac_prog_rejected=no
872   ac_dummy="$PATH"
873   for ac_dir in $ac_dummy; do
874     test -z "$ac_dir" && ac_dir=.
875     if test -f $ac_dir/$ac_word; then
876       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
877         ac_prog_rejected=yes
878         continue
879       fi
880       ac_cv_prog_CC="cc"
881       break
882     fi
883   done
884   IFS="$ac_save_ifs"
885 if test $ac_prog_rejected = yes; then
886   # We found a bogon in the path, so make sure we never use it.
887   set dummy $ac_cv_prog_CC
888   shift
889   if test $# -gt 0; then
890     # We chose a different compiler from the bogus one.
891     # However, it has the same basename, so the bogon will be chosen
892     # first if we set CC to just the basename; use the full file name.
893     shift
894     set dummy "$ac_dir/$ac_word" "$@"
895     shift
896     ac_cv_prog_CC="$@"
897   fi
898 fi
899 fi
900 fi
901 CC="$ac_cv_prog_CC"
902 if test -n "$CC"; then
903   echo "$ac_t""$CC" 1>&6
904 else
905   echo "$ac_t""no" 1>&6
906 fi
907
908   if test -z "$CC"; then
909     case "`uname -s`" in
910     *win32* | *WIN32*)
911       # Extract the first word of "cl", so it can be a program name with args.
912 set dummy cl; ac_word=$2
913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
914 echo "configure:915: checking for $ac_word" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
916   echo $ac_n "(cached) $ac_c" 1>&6
917 else
918   if test -n "$CC"; then
919   ac_cv_prog_CC="$CC" # Let the user override the test.
920 else
921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
922   ac_dummy="$PATH"
923   for ac_dir in $ac_dummy; do
924     test -z "$ac_dir" && ac_dir=.
925     if test -f $ac_dir/$ac_word; then
926       ac_cv_prog_CC="cl"
927       break
928     fi
929   done
930   IFS="$ac_save_ifs"
931 fi
932 fi
933 CC="$ac_cv_prog_CC"
934 if test -n "$CC"; then
935   echo "$ac_t""$CC" 1>&6
936 else
937   echo "$ac_t""no" 1>&6
938 fi
939  ;;
940     esac
941   fi
942   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
943 fi
944
945 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
946 echo "configure:947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
947
948 ac_ext=c
949 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
950 ac_cpp='$CPP $CPPFLAGS'
951 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
952 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
953 cross_compiling=$ac_cv_prog_cc_cross
954
955 cat > conftest.$ac_ext << EOF
956
957 #line 958 "configure"
958 #include "confdefs.h"
959
960 main(){return(0);}
961 EOF
962 if { (eval echo configure:963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
963   ac_cv_prog_cc_works=yes
964   # If we can't run a trivial program, we are probably using a cross compiler.
965   if (./conftest; exit) 2>/dev/null; then
966     ac_cv_prog_cc_cross=no
967   else
968     ac_cv_prog_cc_cross=yes
969   fi
970 else
971   echo "configure: failed program was:" >&5
972   cat conftest.$ac_ext >&5
973   ac_cv_prog_cc_works=no
974 fi
975 rm -fr conftest*
976 ac_ext=c
977 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
978 ac_cpp='$CPP $CPPFLAGS'
979 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
980 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
981 cross_compiling=$ac_cv_prog_cc_cross
982
983 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
984 if test $ac_cv_prog_cc_works = no; then
985   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
986 fi
987 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
988 echo "configure:989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
989 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
990 cross_compiling=$ac_cv_prog_cc_cross
991
992 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
993 echo "configure:994: checking whether we are using GNU C" >&5
994 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   cat > conftest.c <<EOF
998 #ifdef __GNUC__
999   yes;
1000 #endif
1001 EOF
1002 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1003   ac_cv_prog_gcc=yes
1004 else
1005   ac_cv_prog_gcc=no
1006 fi
1007 fi
1008
1009 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1010
1011 if test $ac_cv_prog_gcc = yes; then
1012   GCC=yes
1013 else
1014   GCC=
1015 fi
1016
1017 ac_test_CFLAGS="${CFLAGS+set}"
1018 ac_save_CFLAGS="$CFLAGS"
1019 CFLAGS=
1020 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1021 echo "configure:1022: checking whether ${CC-cc} accepts -g" >&5
1022 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1023   echo $ac_n "(cached) $ac_c" 1>&6
1024 else
1025   echo 'void f(){}' > conftest.c
1026 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1027   ac_cv_prog_cc_g=yes
1028 else
1029   ac_cv_prog_cc_g=no
1030 fi
1031 rm -f conftest*
1032
1033 fi
1034
1035 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1036 if test "$ac_test_CFLAGS" = set; then
1037   CFLAGS="$ac_save_CFLAGS"
1038 elif test $ac_cv_prog_cc_g = yes; then
1039   if test "$GCC" = yes; then
1040     CFLAGS="-g -O2"
1041   else
1042     CFLAGS="-g"
1043   fi
1044 else
1045   if test "$GCC" = yes; then
1046     CFLAGS="-O2"
1047   else
1048     CFLAGS=
1049   fi
1050 fi
1051
1052 if test "x$cross_compiling" = xyes; then
1053         echo "cross compiling to $target"
1054 fi
1055
1056
1057 # ******************** system tools ***********************************
1058
1059 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1060 echo "configure:1061: checking for POSIXized ISC" >&5
1061 if test -d /etc/conf/kconfig.d &&
1062   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1063 then
1064   echo "$ac_t""yes" 1>&6
1065   ISC=yes # If later tests want to check for ISC.
1066   cat >> confdefs.h <<\EOF
1067 #define _POSIX_SOURCE 1
1068 EOF
1069
1070   if test "$GCC" = yes; then
1071     CC="$CC -posix"
1072   else
1073     CC="$CC -Xp"
1074   fi
1075 else
1076   echo "$ac_t""no" 1>&6
1077   ISC=
1078 fi
1079
1080 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1081 echo "configure:1082: checking how to run the C preprocessor" >&5
1082 # On Suns, sometimes $CPP names a directory.
1083 if test -n "$CPP" && test -d "$CPP"; then
1084   CPP=
1085 fi
1086 if test -z "$CPP"; then
1087 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1088   echo $ac_n "(cached) $ac_c" 1>&6
1089 else
1090     # This must be in double quotes, not single quotes, because CPP may get
1091   # substituted into the Makefile and "${CC-cc}" will confuse make.
1092   CPP="${CC-cc} -E"
1093   # On the NeXT, cc -E runs the code through the compiler's parser,
1094   # not just through cpp.
1095   cat > conftest.$ac_ext <<EOF
1096 #line 1097 "configure"
1097 #include "confdefs.h"
1098 #include <assert.h>
1099 Syntax Error
1100 EOF
1101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1102 { (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1104 if test -z "$ac_err"; then
1105   :
1106 else
1107   echo "$ac_err" >&5
1108   echo "configure: failed program was:" >&5
1109   cat conftest.$ac_ext >&5
1110   rm -rf conftest*
1111   CPP="${CC-cc} -E -traditional-cpp"
1112   cat > conftest.$ac_ext <<EOF
1113 #line 1114 "configure"
1114 #include "confdefs.h"
1115 #include <assert.h>
1116 Syntax Error
1117 EOF
1118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1119 { (eval echo configure:1120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1121 if test -z "$ac_err"; then
1122   :
1123 else
1124   echo "$ac_err" >&5
1125   echo "configure: failed program was:" >&5
1126   cat conftest.$ac_ext >&5
1127   rm -rf conftest*
1128   CPP="${CC-cc} -nologo -E"
1129   cat > conftest.$ac_ext <<EOF
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1132 #include <assert.h>
1133 Syntax Error
1134 EOF
1135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1136 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1138 if test -z "$ac_err"; then
1139   :
1140 else
1141   echo "$ac_err" >&5
1142   echo "configure: failed program was:" >&5
1143   cat conftest.$ac_ext >&5
1144   rm -rf conftest*
1145   CPP=/lib/cpp
1146 fi
1147 rm -f conftest*
1148 fi
1149 rm -f conftest*
1150 fi
1151 rm -f conftest*
1152   ac_cv_prog_CPP="$CPP"
1153 fi
1154   CPP="$ac_cv_prog_CPP"
1155 else
1156   ac_cv_prog_CPP="$CPP"
1157 fi
1158 echo "$ac_t""$CPP" 1>&6
1159
1160 for ac_prog in gmake gnumake make
1161 do
1162 # Extract the first word of "$ac_prog", so it can be a program name with args.
1163 set dummy $ac_prog; ac_word=$2
1164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1165 echo "configure:1166: checking for $ac_word" >&5
1166 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -n "$MAKE"; then
1170   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
1171 else
1172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1173   ac_dummy="$PATH"
1174   for ac_dir in $ac_dummy; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f $ac_dir/$ac_word; then
1177       ac_cv_prog_MAKE="$ac_prog"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 fi
1183 fi
1184 MAKE="$ac_cv_prog_MAKE"
1185 if test -n "$MAKE"; then
1186   echo "$ac_t""$MAKE" 1>&6
1187 else
1188   echo "$ac_t""no" 1>&6
1189 fi
1190
1191 test -n "$MAKE" && break
1192 done
1193
1194 for ac_prog in ar
1195 do
1196 # Extract the first word of "$ac_prog", so it can be a program name with args.
1197 set dummy $ac_prog; ac_word=$2
1198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1199 echo "configure:1200: checking for $ac_word" >&5
1200 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   if test -n "$AR"; then
1204   ac_cv_prog_AR="$AR" # Let the user override the test.
1205 else
1206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1207   ac_dummy="$PATH"
1208   for ac_dir in $ac_dummy; do
1209     test -z "$ac_dir" && ac_dir=.
1210     if test -f $ac_dir/$ac_word; then
1211       ac_cv_prog_AR="$ac_prog"
1212       break
1213     fi
1214   done
1215   IFS="$ac_save_ifs"
1216 fi
1217 fi
1218 AR="$ac_cv_prog_AR"
1219 if test -n "$AR"; then
1220   echo "$ac_t""$AR" 1>&6
1221 else
1222   echo "$ac_t""no" 1>&6
1223 fi
1224
1225 test -n "$AR" && break
1226 done
1227
1228 for ac_prog in ld
1229 do
1230 # Extract the first word of "$ac_prog", so it can be a program name with args.
1231 set dummy $ac_prog; ac_word=$2
1232 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1233 echo "configure:1234: checking for $ac_word" >&5
1234 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1235   echo $ac_n "(cached) $ac_c" 1>&6
1236 else
1237   if test -n "$LD"; then
1238   ac_cv_prog_LD="$LD" # Let the user override the test.
1239 else
1240   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1241   ac_dummy="$PATH"
1242   for ac_dir in $ac_dummy; do
1243     test -z "$ac_dir" && ac_dir=.
1244     if test -f $ac_dir/$ac_word; then
1245       ac_cv_prog_LD="$ac_prog"
1246       break
1247     fi
1248   done
1249   IFS="$ac_save_ifs"
1250 fi
1251 fi
1252 LD="$ac_cv_prog_LD"
1253 if test -n "$LD"; then
1254   echo "$ac_t""$LD" 1>&6
1255 else
1256   echo "$ac_t""no" 1>&6
1257 fi
1258
1259 test -n "$LD" && break
1260 done
1261
1262 for ac_prog in perl
1263 do
1264 # Extract the first word of "$ac_prog", so it can be a program name with args.
1265 set dummy $ac_prog; ac_word=$2
1266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1267 echo "configure:1268: checking for $ac_word" >&5
1268 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
1269   echo $ac_n "(cached) $ac_c" 1>&6
1270 else
1271   if test -n "$PERL"; then
1272   ac_cv_prog_PERL="$PERL" # Let the user override the test.
1273 else
1274   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1275   ac_dummy="$PATH"
1276   for ac_dir in $ac_dummy; do
1277     test -z "$ac_dir" && ac_dir=.
1278     if test -f $ac_dir/$ac_word; then
1279       ac_cv_prog_PERL="$ac_prog"
1280       break
1281     fi
1282   done
1283   IFS="$ac_save_ifs"
1284 fi
1285 fi
1286 PERL="$ac_cv_prog_PERL"
1287 if test -n "$PERL"; then
1288   echo "$ac_t""$PERL" 1>&6
1289 else
1290   echo "$ac_t""no" 1>&6
1291 fi
1292
1293 test -n "$PERL" && break
1294 done
1295
1296
1297 # uses AC_TRY_RUN
1298
1299 if test "x$cross_compiling" = xyes; then
1300   if [ "x${target_cpu}" = xi386 ]; then
1301     echo "WARNING: using predefined structure alignment of 4 for i386 !"
1302     ac_cv_struct_alignment=4
1303     STRUCT_ALIGNMENT=4
1304   elif [ "x${target_cpu}" = xsparc ]; then
1305     echo "WARNING: using predefined structure alignment of 8 for ${target_cpu} !"
1306     ac_cv_struct_alignment=8
1307     STRUCT_ALIGNMENT=8
1308   elif [ "x${target_cpu}" = xmipsel ]; then
1309     echo "WARNING: using predefined structure alignment of 8 for ${target_cpu} !"
1310     ac_cv_struct_alignment=8
1311     STRUCT_ALIGNMENT=8
1312   else
1313     echo "ERROR: unknown structure alignment for CPU ${target_cpu}, using 4 !"
1314     ac_cv_struct_alignment=4
1315     STRUCT_ALIGNMENT=4
1316   fi
1317 else
1318   echo $ac_n "checking for the C structures alignment""... $ac_c" 1>&6
1319 echo "configure:1320: checking for the C structures alignment" >&5
1320 if eval "test \"`echo '$''{'ac_cv_struct_alignment'+set}'`\" = set"; then
1321   echo $ac_n "(cached) $ac_c" 1>&6
1322 else
1323   if test "$cross_compiling" = yes; then
1324     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1325 else
1326   cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329 #include <stdio.h>
1330
1331 struct simple {
1332     double x;
1333     char y;
1334 } simple1;
1335
1336 int struct_alignment = __alignof__ (simple1);
1337
1338 main()
1339 {
1340   FILE *f=fopen("conftestval", "w");
1341   if (!f) exit(1);
1342   fprintf(f, "%u\n", struct_alignment);
1343   exit(0);
1344 }
1345
1346 EOF
1347 if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1348 then
1349   ac_cv_struct_alignment=`cat conftestval`
1350 else
1351   echo "configure: failed program was:" >&5
1352   cat conftest.$ac_ext >&5
1353   rm -fr conftest*
1354   ac_cv_struct_alignment=0
1355 fi
1356 rm -fr conftest*
1357 fi
1358
1359 fi
1360 echo "$ac_t""$ac_cv_struct_alignment" 1>&6
1361 STRUCT_ALIGNMENT=$ac_cv_struct_alignment
1362
1363 fi
1364
1365 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1366 echo "configure:1367: checking for dlopen in -ldl" >&5
1367 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1369   echo $ac_n "(cached) $ac_c" 1>&6
1370 else
1371   ac_save_LIBS="$LIBS"
1372 LIBS="-ldl  $LIBS"
1373 cat > conftest.$ac_ext <<EOF
1374 #line 1375 "configure"
1375 #include "confdefs.h"
1376 /* Override any gcc2 internal prototype to avoid an error.  */
1377 /* We use char because int might match the return type of a gcc2
1378     builtin and then its argument prototype would still apply.  */
1379 char dlopen();
1380
1381 int main() {
1382 dlopen()
1383 ; return 0; }
1384 EOF
1385 if { (eval echo configure:1386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1386   rm -rf conftest*
1387   eval "ac_cv_lib_$ac_lib_var=yes"
1388 else
1389   echo "configure: failed program was:" >&5
1390   cat conftest.$ac_ext >&5
1391   rm -rf conftest*
1392   eval "ac_cv_lib_$ac_lib_var=no"
1393 fi
1394 rm -f conftest*
1395 LIBS="$ac_save_LIBS"
1396
1397 fi
1398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1399   echo "$ac_t""yes" 1>&6
1400     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1402   cat >> confdefs.h <<EOF
1403 #define $ac_tr_lib 1
1404 EOF
1405
1406   LIBS="-ldl $LIBS"
1407
1408 else
1409   echo "$ac_t""no" 1>&6
1410 fi
1411
1412 echo $ac_n "checking for pthread_create in -lpcthread""... $ac_c" 1>&6
1413 echo "configure:1414: checking for pthread_create in -lpcthread" >&5
1414 ac_lib_var=`echo pcthread'_'pthread_create | sed 'y%./+-%__p_%'`
1415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1416   echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418   ac_save_LIBS="$LIBS"
1419 LIBS="-lpcthread  $LIBS"
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1423 /* Override any gcc2 internal prototype to avoid an error.  */
1424 /* We use char because int might match the return type of a gcc2
1425     builtin and then its argument prototype would still apply.  */
1426 char pthread_create();
1427
1428 int main() {
1429 pthread_create()
1430 ; return 0; }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1433   rm -rf conftest*
1434   eval "ac_cv_lib_$ac_lib_var=yes"
1435 else
1436   echo "configure: failed program was:" >&5
1437   cat conftest.$ac_ext >&5
1438   rm -rf conftest*
1439   eval "ac_cv_lib_$ac_lib_var=no"
1440 fi
1441 rm -f conftest*
1442 LIBS="$ac_save_LIBS"
1443
1444 fi
1445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1446   echo "$ac_t""yes" 1>&6
1447     ac_tr_lib=HAVE_LIB`echo pcthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1449   cat >> confdefs.h <<EOF
1450 #define $ac_tr_lib 1
1451 EOF
1452
1453   LIBS="-lpcthread $LIBS"
1454
1455 else
1456   echo "$ac_t""no" 1>&6
1457 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
1458 echo "configure:1459: checking for pthread_create in -lpthread" >&5
1459 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
1460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463   ac_save_LIBS="$LIBS"
1464 LIBS="-lpthread  $LIBS"
1465 cat > conftest.$ac_ext <<EOF
1466 #line 1467 "configure"
1467 #include "confdefs.h"
1468 /* Override any gcc2 internal prototype to avoid an error.  */
1469 /* We use char because int might match the return type of a gcc2
1470     builtin and then its argument prototype would still apply.  */
1471 char pthread_create();
1472
1473 int main() {
1474 pthread_create()
1475 ; return 0; }
1476 EOF
1477 if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1478   rm -rf conftest*
1479   eval "ac_cv_lib_$ac_lib_var=yes"
1480 else
1481   echo "configure: failed program was:" >&5
1482   cat conftest.$ac_ext >&5
1483   rm -rf conftest*
1484   eval "ac_cv_lib_$ac_lib_var=no"
1485 fi
1486 rm -f conftest*
1487 LIBS="$ac_save_LIBS"
1488
1489 fi
1490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1491   echo "$ac_t""yes" 1>&6
1492     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \
1493     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1494   cat >> confdefs.h <<EOF
1495 #define $ac_tr_lib 1
1496 EOF
1497
1498   LIBS="-lpthread $LIBS"
1499
1500 else
1501   echo "$ac_t""no" 1>&6
1502 fi
1503
1504 fi
1505
1506 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
1507 echo "configure:1508: checking for sqrt in -lm" >&5
1508 ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
1509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   ac_save_LIBS="$LIBS"
1513 LIBS="-lm  $LIBS"
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1517 /* Override any gcc2 internal prototype to avoid an error.  */
1518 /* We use char because int might match the return type of a gcc2
1519     builtin and then its argument prototype would still apply.  */
1520 char sqrt();
1521
1522 int main() {
1523 sqrt()
1524 ; return 0; }
1525 EOF
1526 if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1527   rm -rf conftest*
1528   eval "ac_cv_lib_$ac_lib_var=yes"
1529 else
1530   echo "configure: failed program was:" >&5
1531   cat conftest.$ac_ext >&5
1532   rm -rf conftest*
1533   eval "ac_cv_lib_$ac_lib_var=no"
1534 fi
1535 rm -f conftest*
1536 LIBS="$ac_save_LIBS"
1537
1538 fi
1539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1540   echo "$ac_t""yes" 1>&6
1541     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1542     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1543   cat >> confdefs.h <<EOF
1544 #define $ac_tr_lib 1
1545 EOF
1546
1547   LIBS="-lm $LIBS"
1548
1549 else
1550   echo "$ac_t""no" 1>&6
1551 fi
1552
1553 echo $ac_n "checking for chown in -lnsl""... $ac_c" 1>&6
1554 echo "configure:1555: checking for chown in -lnsl" >&5
1555 ac_lib_var=`echo nsl'_'chown | sed 'y%./+-%__p_%'`
1556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1557   echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559   ac_save_LIBS="$LIBS"
1560 LIBS="-lnsl  $LIBS"
1561 cat > conftest.$ac_ext <<EOF
1562 #line 1563 "configure"
1563 #include "confdefs.h"
1564 /* Override any gcc2 internal prototype to avoid an error.  */
1565 /* We use char because int might match the return type of a gcc2
1566     builtin and then its argument prototype would still apply.  */
1567 char chown();
1568
1569 int main() {
1570 chown()
1571 ; return 0; }
1572 EOF
1573 if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1574   rm -rf conftest*
1575   eval "ac_cv_lib_$ac_lib_var=yes"
1576 else
1577   echo "configure: failed program was:" >&5
1578   cat conftest.$ac_ext >&5
1579   rm -rf conftest*
1580   eval "ac_cv_lib_$ac_lib_var=no"
1581 fi
1582 rm -f conftest*
1583 LIBS="$ac_save_LIBS"
1584
1585 fi
1586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1587   echo "$ac_t""yes" 1>&6
1588     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1589     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1590   cat >> confdefs.h <<EOF
1591 #define $ac_tr_lib 1
1592 EOF
1593
1594   LIBS="-lnsl $LIBS"
1595
1596 else
1597   echo "$ac_t""no" 1>&6
1598 fi
1599
1600 echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
1601 echo "configure:1602: checking for accept in -lsocket" >&5
1602 ac_lib_var=`echo socket'_'accept | sed 'y%./+-%__p_%'`
1603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1604   echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606   ac_save_LIBS="$LIBS"
1607 LIBS="-lsocket  $LIBS"
1608 cat > conftest.$ac_ext <<EOF
1609 #line 1610 "configure"
1610 #include "confdefs.h"
1611 /* Override any gcc2 internal prototype to avoid an error.  */
1612 /* We use char because int might match the return type of a gcc2
1613     builtin and then its argument prototype would still apply.  */
1614 char accept();
1615
1616 int main() {
1617 accept()
1618 ; return 0; }
1619 EOF
1620 if { (eval echo configure:1621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1621   rm -rf conftest*
1622   eval "ac_cv_lib_$ac_lib_var=yes"
1623 else
1624   echo "configure: failed program was:" >&5
1625   cat conftest.$ac_ext >&5
1626   rm -rf conftest*
1627   eval "ac_cv_lib_$ac_lib_var=no"
1628 fi
1629 rm -f conftest*
1630 LIBS="$ac_save_LIBS"
1631
1632 fi
1633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1634   echo "$ac_t""yes" 1>&6
1635     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1636     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1637   cat >> confdefs.h <<EOF
1638 #define $ac_tr_lib 1
1639 EOF
1640
1641   LIBS="-lsocket $LIBS"
1642
1643 else
1644   echo "$ac_t""no" 1>&6
1645 fi
1646
1647
1648 RUNTIME=GNU
1649 transformed_target_cpu=`${GNUSTEP_SYSTEM_ROOT}/Makefiles/clean_cpu.sh ${TARGET_CPU}`
1650 ac_cv_file_output_prefix=Foundation/$transformed_target_cpu/${TARGET_OS}/$RUNTIME
1651
1652
1653 echo $ac_n "checking whether nested functions work""... $ac_c" 1>&6
1654 echo "configure:1655: checking whether nested functions work" >&5
1655 if eval "test \"`echo '$''{'ac_cv_nested_functions'+set}'`\" = set"; then
1656   echo $ac_n "(cached) $ac_c" 1>&6
1657 else
1658   OLD_IFS=$IFS
1659 IFS=:
1660 for i in $LD_LIBRARY_PATH
1661 do
1662   LDFLAGS="-L$i $LDFLAGS"
1663 done
1664 IFS=$OLD_IFS
1665 LIBS="-lobjc $LIBS"
1666 ac_ext=m
1667 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1668 ac_cpp='$CPP $OBJC_RUNTIME_FLAG'
1669 ac_compile='${CC-cc} -c $OBJC_RUNTIME_FLAG $CFLAGS conftest.$ac_ext 1>&5 2>&5'
1670 ac_link='${CC-cc} -o conftest $OBJC_RUNTIME_FLAG $CFLAGS $LDFLAGS conftest.$ac_ext $LIBS $OBJC_LIBS 1>&5 2>&5'
1671
1672 if test "$cross_compiling" = yes; then
1673   ac_cv_nested_functions=yes
1674 else
1675   cat > conftest.$ac_ext <<EOF
1676 #line 1677 "configure"
1677 #include "confdefs.h"
1678
1679 f(void (*nested)())
1680 {
1681     (*nested)();
1682 }
1683
1684 main()
1685 {
1686     int a = 0;
1687     void nested()
1688     {
1689         a = 1;
1690     }
1691     f(nested);
1692     if(a != 1)
1693         exit(1);
1694     exit(0);
1695 }
1696
1697 EOF
1698 if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1699 then
1700   ac_cv_nested_functions=yes
1701 else
1702   echo "configure: failed program was:" >&5
1703   cat conftest.$ac_ext >&5
1704   rm -fr conftest*
1705   ac_cv_nested_functions=no
1706 fi
1707 rm -fr conftest*
1708 fi
1709
1710 ac_ext=c
1711 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1712 ac_cpp='$CPP $CPPFLAGS'
1713 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1714 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1715 cross_compiling=$ac_cv_prog_cc_cross
1716
1717
1718 fi
1719 echo "$ac_t""${ac_cv_nested_functions}" 1>&6
1720 NO_NESTED_FUNCTIONS=no
1721 if test $ac_cv_nested_functions = no; then
1722     cat >> confdefs.h <<\EOF
1723 #define NO_NESTED_FUNCTIONS 1
1724 EOF
1725
1726     NO_NESTED_FUNCTIONS=yes
1727 fi
1728
1729 echo $ac_n "checking if the Objective-C compiler crashes with nested functions""... $ac_c" 1>&6
1730 echo "configure:1731: checking if the Objective-C compiler crashes with nested functions" >&5
1731 if eval "test \"`echo '$''{'ac_cv_broken_compiler'+set}'`\" = set"; then
1732   echo $ac_n "(cached) $ac_c" 1>&6
1733 else
1734   OLD_IFS=$IFS
1735 IFS=:
1736 for i in $LD_LIBRARY_PATH
1737 do
1738   LDFLAGS="-L$i $LDFLAGS"
1739 done
1740 IFS=$OLD_IFS
1741 LIBS="-lobjc $LIBS"
1742 ac_ext=m
1743 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1744 ac_cpp='$CPP $OBJC_RUNTIME_FLAG'
1745 ac_compile='${CC-cc} -c $OBJC_RUNTIME_FLAG $CFLAGS conftest.$ac_ext 1>&5 2>&5'
1746 ac_link='${CC-cc} -o conftest $OBJC_RUNTIME_FLAG $CFLAGS $LDFLAGS conftest.$ac_ext $LIBS $OBJC_LIBS 1>&5 2>&5'
1747
1748 if test "$cross_compiling" = yes; then
1749   ac_cv_broken_compiler=no
1750 else
1751   cat > conftest.$ac_ext <<EOF
1752 #line 1753 "configure"
1753 #include "confdefs.h"
1754
1755 #include <objc/objc.h>
1756 #include <objc/Object.h>
1757
1758 void f()
1759 {
1760     auto void h(id);
1761
1762     void h(id exception)
1763     {
1764         [Object alloc];
1765         {
1766             void clean(void)
1767             {
1768             }
1769         }
1770     }
1771 }
1772
1773 void g()
1774 {
1775     auto void h(id);
1776
1777     void h(id exception)
1778     {
1779         [Object alloc];
1780     }
1781 }
1782
1783 main()
1784 {
1785     exit(0);
1786 }
1787
1788 EOF
1789 if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1790 then
1791   ac_cv_broken_compiler=no
1792 else
1793   echo "configure: failed program was:" >&5
1794   cat conftest.$ac_ext >&5
1795   rm -fr conftest*
1796   ac_cv_broken_compiler=yes
1797 fi
1798 rm -fr conftest*
1799 fi
1800
1801 ac_ext=c
1802 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1803 ac_cpp='$CPP $CPPFLAGS'
1804 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1805 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1806 cross_compiling=$ac_cv_prog_cc_cross
1807
1808
1809 fi
1810 BROKEN_COMPILER=${ac_cv_broken_compiler}
1811 if test ${ac_cv_nested_functions} = no -o ${ac_cv_broken_compiler} = yes; then
1812   ac_cv_broken_compiler=yes;
1813   BROKEN_COMPILER=yes;
1814   cat >> confdefs.h <<\EOF
1815 #define BROKEN_COMPILER 1
1816 EOF
1817
1818 fi
1819 echo "$ac_t""${ac_cv_broken_compiler}" 1>&6
1820
1821
1822 if test $target_cpu = i386; then
1823     echo $ac_n "checking whether __builtin_apply and __builtin_return are broken""... $ac_c" 1>&6
1824 echo "configure:1825: checking whether __builtin_apply and __builtin_return are broken" >&5
1825 if eval "test \"`echo '$''{'ac_cv_broken_builtin_apply'+set}'`\" = set"; then
1826   echo $ac_n "(cached) $ac_c" 1>&6
1827 else
1828   OLD_IFS=$IFS
1829 IFS=:
1830 for i in $LD_LIBRARY_PATH
1831 do
1832   LDFLAGS="-L$i $LDFLAGS"
1833 done
1834 IFS=$OLD_IFS
1835 LIBS="-lobjc $LIBS"
1836 ac_ext=m
1837 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1838 ac_cpp='$CPP $OBJC_RUNTIME_FLAG'
1839 ac_compile='${CC-cc} -c $OBJC_RUNTIME_FLAG $CFLAGS conftest.$ac_ext 1>&5 2>&5'
1840 ac_link='${CC-cc} -o conftest $OBJC_RUNTIME_FLAG $CFLAGS $LDFLAGS conftest.$ac_ext $LIBS $OBJC_LIBS 1>&5 2>&5'
1841
1842 if test "$cross_compiling" = yes; then
1843   ac_cv_broken_builtin_apply=no
1844 else
1845   cat > conftest.$ac_ext <<EOF
1846 #line 1847 "configure"
1847 #include "confdefs.h"
1848
1849 #include <objc/Object.h>
1850
1851 float value = 123.456;
1852
1853 @interface MyObject : Object
1854 @end
1855
1856 @implementation MyObject
1857 - (float)floatValue
1858 {
1859     return value;
1860 }
1861 @end
1862
1863 @interface Forwarder : Object
1864 {
1865     id object;
1866 }
1867 @end
1868
1869 @implementation Forwarder
1870 - setObject:anObject
1871 {
1872     object = anObject;
1873     return self;
1874 }
1875
1876 - (void*)forward:(SEL)selector:(void*)argframe
1877 {
1878     IMP imp = [object methodFor:@selector(floatValue)];
1879     void* retframe;
1880     void* frame = malloc(116);
1881     *(void**)frame = NULL;
1882     retframe = __builtin_apply((void(*)(void))imp, frame, 0);
1883     if(*(long double*)(((char*)retframe) + 8) == (long double)value)
1884         exit(0);
1885     exit(1);
1886 }
1887 @end
1888
1889 int main()
1890 {
1891     id fwd = [[[Forwarder alloc] init] setObject:[MyObject alloc]];
1892     [fwd floatValue];
1893     exit(0);
1894     return 0; // keep compiler happy
1895 }
1896
1897 EOF
1898 if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1899 then
1900   ac_cv_broken_builtin_apply=no
1901 else
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   rm -fr conftest*
1905   ac_cv_broken_builtin_apply=yes
1906 fi
1907 rm -fr conftest*
1908 fi
1909
1910 ac_ext=c
1911 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1912 ac_cpp='$CPP $CPPFLAGS'
1913 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1914 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1915 cross_compiling=$ac_cv_prog_cc_cross
1916
1917
1918 fi
1919 echo "$ac_t""${ac_cv_broken_builtin_apply}" 1>&6
1920 BROKEN_BUILTIN_APPLY=${ac_cv_broken_builtin_apply}
1921 if test $BROKEN_BUILTIN_APPLY = yes; then
1922     cat >> confdefs.h <<\EOF
1923 #define BROKEN_BUILTIN_APPLY 1
1924 EOF
1925
1926 fi
1927
1928 fi
1929
1930 # If we're using the Boehm's GC check to see if we have the gc.h file and
1931 # libgc.a installed.
1932 cat >> confdefs.h <<\EOF
1933 #define WITH_GC 1
1934 EOF
1935
1936 for ac_hdr in ${GC_INCLUDE_DIR}gc.h
1937 do
1938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_hdr" >&5
1941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1942   echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944   cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 #include <$ac_hdr>
1948 EOF
1949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1950 { (eval echo configure:1951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1952 if test -z "$ac_err"; then
1953   rm -rf conftest*
1954   eval "ac_cv_header_$ac_safe=yes"
1955 else
1956   echo "$ac_err" >&5
1957   echo "configure: failed program was:" >&5
1958   cat conftest.$ac_ext >&5
1959   rm -rf conftest*
1960   eval "ac_cv_header_$ac_safe=no"
1961 fi
1962 rm -f conftest*
1963 fi
1964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1965   echo "$ac_t""yes" 1>&6
1966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1967   cat >> confdefs.h <<EOF
1968 #define $ac_tr_hdr 1
1969 EOF
1970  
1971 else
1972   echo "$ac_t""no" 1>&6
1973 fi
1974 done
1975
1976
1977 if test "x$ac_cv_link_gc" = xyes; then
1978     echo $ac_n "checking for GC_malloc in -l${GC_LIB}""... $ac_c" 1>&6
1979 echo "configure:1980: checking for GC_malloc in -l${GC_LIB}" >&5
1980 ac_lib_var=`echo ${GC_LIB}'_'GC_malloc | sed 'y%./+-%__p_%'`
1981 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1982   echo $ac_n "(cached) $ac_c" 1>&6
1983 else
1984   ac_save_LIBS="$LIBS"
1985 LIBS="-l${GC_LIB}  $LIBS"
1986 cat > conftest.$ac_ext <<EOF
1987 #line 1988 "configure"
1988 #include "confdefs.h"
1989 /* Override any gcc2 internal prototype to avoid an error.  */
1990 /* We use char because int might match the return type of a gcc2
1991     builtin and then its argument prototype would still apply.  */
1992 char GC_malloc();
1993
1994 int main() {
1995 GC_malloc()
1996 ; return 0; }
1997 EOF
1998 if { (eval echo configure:1999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999   rm -rf conftest*
2000   eval "ac_cv_lib_$ac_lib_var=yes"
2001 else
2002   echo "configure: failed program was:" >&5
2003   cat conftest.$ac_ext >&5
2004   rm -rf conftest*
2005   eval "ac_cv_lib_$ac_lib_var=no"
2006 fi
2007 rm -f conftest*
2008 LIBS="$ac_save_LIBS"
2009
2010 fi
2011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2012   echo "$ac_t""yes" 1>&6
2013     ac_tr_lib=HAVE_LIB`echo ${GC_LIB} | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2015   cat >> confdefs.h <<EOF
2016 #define $ac_tr_lib 1
2017 EOF
2018
2019   LIBS="-l${GC_LIB} $LIBS"
2020
2021 else
2022   echo "$ac_t""no" 1>&6
2023 fi
2024
2025     if test "x$ac_cv_header_gc_h" != xyes -o "x$ac_cv_lib_gc_GC_malloc" != xyes; then
2026         
2027         { echo "configure: error: It appears your system doesn't have the Boehm's garbage collector installed! Please install it first or check your paths in case it's already installed. Note that we expect the Boehm's GC library to be named so that linking using -lgc works; please be careful as the normal 'make' in Boehm's GC neither creates the library nor installs it. You should copy the files gc.h and gc.a in the appropriate directories and rename gc.a to libgc.a." 1>&2; exit 1; }
2028         
2029     fi
2030 fi
2031
2032 # uses AC_TRY_RUN
2033 if test x"$cross_compiling" = xyes; then
2034     echo "WARNING: cannot check for byte-order during cross compilation."
2035 else
2036     echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2037 echo "configure:2038: checking whether byte ordering is bigendian" >&5
2038 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2039   echo $ac_n "(cached) $ac_c" 1>&6
2040 else
2041   ac_cv_c_bigendian=unknown
2042 # See if sys/param.h defines the BYTE_ORDER macro.
2043 cat > conftest.$ac_ext <<EOF
2044 #line 2045 "configure"
2045 #include "confdefs.h"
2046 #include <sys/types.h>
2047 #include <sys/param.h>
2048 int main() {
2049
2050 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2051  bogus endian macros
2052 #endif
2053 ; return 0; }
2054 EOF
2055 if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2056   rm -rf conftest*
2057   # It does; now see whether it defined to BIG_ENDIAN or not.
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 #include <sys/types.h>
2062 #include <sys/param.h>
2063 int main() {
2064
2065 #if BYTE_ORDER != BIG_ENDIAN
2066  not big endian
2067 #endif
2068 ; return 0; }
2069 EOF
2070 if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2071   rm -rf conftest*
2072   ac_cv_c_bigendian=yes
2073 else
2074   echo "configure: failed program was:" >&5
2075   cat conftest.$ac_ext >&5
2076   rm -rf conftest*
2077   ac_cv_c_bigendian=no
2078 fi
2079 rm -f conftest*
2080 else
2081   echo "configure: failed program was:" >&5
2082   cat conftest.$ac_ext >&5
2083 fi
2084 rm -f conftest*
2085 if test $ac_cv_c_bigendian = unknown; then
2086 if test "$cross_compiling" = yes; then
2087     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2088 else
2089   cat > conftest.$ac_ext <<EOF
2090 #line 2091 "configure"
2091 #include "confdefs.h"
2092 main () {
2093   /* Are we little or big endian?  From Harbison&Steele.  */
2094   union
2095   {
2096     long l;
2097     char c[sizeof (long)];
2098   } u;
2099   u.l = 1;
2100   exit (u.c[sizeof (long) - 1] == 1);
2101 }
2102 EOF
2103 if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2104 then
2105   ac_cv_c_bigendian=no
2106 else
2107   echo "configure: failed program was:" >&5
2108   cat conftest.$ac_ext >&5
2109   rm -fr conftest*
2110   ac_cv_c_bigendian=yes
2111 fi
2112 rm -fr conftest*
2113 fi
2114
2115 fi
2116 fi
2117
2118 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2119 if test $ac_cv_c_bigendian = yes; then
2120   cat >> confdefs.h <<\EOF
2121 #define WORDS_BIGENDIAN 1
2122 EOF
2123
2124 fi
2125
2126 fi
2127
2128 echo $ac_n "checking size of short""... $ac_c" 1>&6
2129 echo "configure:2130: checking size of short" >&5 
2130 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2131   echo $ac_n "(cached) $ac_c" 1>&6
2132 else
2133   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2134   cat > conftest.$ac_ext <<EOF
2135 #line 2136 "configure"
2136 #include "confdefs.h"
2137 #include "confdefs.h" 
2138 #include <sys/types.h> 
2139  
2140
2141 int main() {
2142 switch (0) case 0: case (sizeof (short) == $ac_size):;
2143 ; return 0; }
2144 EOF
2145 if { (eval echo configure:2146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2146   rm -rf conftest*
2147   ac_cv_sizeof_short=$ac_size
2148 else
2149   echo "configure: failed program was:" >&5
2150   cat conftest.$ac_ext >&5
2151 fi
2152 rm -f conftest* 
2153   if test x$ac_cv_sizeof_short != x ; then break; fi 
2154 done 
2155
2156 fi
2157  
2158 if test x$ac_cv_sizeof_short = x ; then 
2159   echo "cannot determine a size for short";
2160   ac_cv_sizeof_short=0; 
2161 fi 
2162 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
2163 cat >> confdefs.h <<EOF
2164 #define SIZEOF_SHORT $ac_cv_sizeof_short
2165 EOF
2166  
2167
2168 echo $ac_n "checking size of int""... $ac_c" 1>&6
2169 echo "configure:2170: checking size of int" >&5 
2170 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2174   cat > conftest.$ac_ext <<EOF
2175 #line 2176 "configure"
2176 #include "confdefs.h"
2177 #include "confdefs.h" 
2178 #include <sys/types.h> 
2179  
2180
2181 int main() {
2182 switch (0) case 0: case (sizeof (int) == $ac_size):;
2183 ; return 0; }
2184 EOF
2185 if { (eval echo configure:2186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2186   rm -rf conftest*
2187   ac_cv_sizeof_int=$ac_size
2188 else
2189   echo "configure: failed program was:" >&5
2190   cat conftest.$ac_ext >&5
2191 fi
2192 rm -f conftest* 
2193   if test x$ac_cv_sizeof_int != x ; then break; fi 
2194 done 
2195
2196 fi
2197  
2198 if test x$ac_cv_sizeof_int = x ; then 
2199   echo "cannot determine a size for int";
2200   ac_cv_sizeof_int=0; 
2201 fi 
2202 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
2203 cat >> confdefs.h <<EOF
2204 #define SIZEOF_INT $ac_cv_sizeof_int
2205 EOF
2206  
2207
2208 echo $ac_n "checking size of long""... $ac_c" 1>&6
2209 echo "configure:2210: checking size of long" >&5 
2210 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2211   echo $ac_n "(cached) $ac_c" 1>&6
2212 else
2213   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2214   cat > conftest.$ac_ext <<EOF
2215 #line 2216 "configure"
2216 #include "confdefs.h"
2217 #include "confdefs.h" 
2218 #include <sys/types.h> 
2219  
2220
2221 int main() {
2222 switch (0) case 0: case (sizeof (long) == $ac_size):;
2223 ; return 0; }
2224 EOF
2225 if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2226   rm -rf conftest*
2227   ac_cv_sizeof_long=$ac_size
2228 else
2229   echo "configure: failed program was:" >&5
2230   cat conftest.$ac_ext >&5
2231 fi
2232 rm -f conftest* 
2233   if test x$ac_cv_sizeof_long != x ; then break; fi 
2234 done 
2235
2236 fi
2237  
2238 if test x$ac_cv_sizeof_long = x ; then 
2239   echo "cannot determine a size for long";
2240   ac_cv_sizeof_long=0; 
2241 fi 
2242 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
2243 cat >> confdefs.h <<EOF
2244 #define SIZEOF_LONG $ac_cv_sizeof_long
2245 EOF
2246  
2247
2248 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2249 echo "configure:2250: checking size of long long" >&5 
2250 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2251   echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2254   cat > conftest.$ac_ext <<EOF
2255 #line 2256 "configure"
2256 #include "confdefs.h"
2257 #include "confdefs.h" 
2258 #include <sys/types.h> 
2259  
2260
2261 int main() {
2262 switch (0) case 0: case (sizeof (long long) == $ac_size):;
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2266   rm -rf conftest*
2267   ac_cv_sizeof_long_long=$ac_size
2268 else
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271 fi
2272 rm -f conftest* 
2273   if test x$ac_cv_sizeof_long_long != x ; then break; fi 
2274 done 
2275
2276 fi
2277  
2278 if test x$ac_cv_sizeof_long_long = x ; then 
2279   echo "cannot determine a size for long long";
2280   ac_cv_sizeof_long_long=0; 
2281 fi 
2282 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 
2283 cat >> confdefs.h <<EOF
2284 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2285 EOF
2286  
2287
2288 echo $ac_n "checking size of float""... $ac_c" 1>&6
2289 echo "configure:2290: checking size of float" >&5 
2290 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2294   cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 #include "confdefs.h" 
2298 #include <sys/types.h> 
2299  
2300
2301 int main() {
2302 switch (0) case 0: case (sizeof (float) == $ac_size):;
2303 ; return 0; }
2304 EOF
2305 if { (eval echo configure:2306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2306   rm -rf conftest*
2307   ac_cv_sizeof_float=$ac_size
2308 else
2309   echo "configure: failed program was:" >&5
2310   cat conftest.$ac_ext >&5
2311 fi
2312 rm -f conftest* 
2313   if test x$ac_cv_sizeof_float != x ; then break; fi 
2314 done 
2315
2316 fi
2317  
2318 if test x$ac_cv_sizeof_float = x ; then 
2319   echo "cannot determine a size for float";
2320   ac_cv_sizeof_float=0; 
2321 fi 
2322 echo "$ac_t""$ac_cv_sizeof_float" 1>&6 
2323 cat >> confdefs.h <<EOF
2324 #define SIZEOF_FLOAT $ac_cv_sizeof_float
2325 EOF
2326  
2327
2328 echo $ac_n "checking size of double""... $ac_c" 1>&6
2329 echo "configure:2330: checking size of double" >&5 
2330 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2331   echo $ac_n "(cached) $ac_c" 1>&6
2332 else
2333   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2334   cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include "confdefs.h" 
2338 #include <sys/types.h> 
2339  
2340
2341 int main() {
2342 switch (0) case 0: case (sizeof (double) == $ac_size):;
2343 ; return 0; }
2344 EOF
2345 if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2346   rm -rf conftest*
2347   ac_cv_sizeof_double=$ac_size
2348 else
2349   echo "configure: failed program was:" >&5
2350   cat conftest.$ac_ext >&5
2351 fi
2352 rm -f conftest* 
2353   if test x$ac_cv_sizeof_double != x ; then break; fi 
2354 done 
2355
2356 fi
2357  
2358 if test x$ac_cv_sizeof_double = x ; then 
2359   echo "cannot determine a size for double";
2360   ac_cv_sizeof_double=0; 
2361 fi 
2362 echo "$ac_t""$ac_cv_sizeof_double" 1>&6 
2363 cat >> confdefs.h <<EOF
2364 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2365 EOF
2366  
2367
2368 echo $ac_n "checking size of long double""... $ac_c" 1>&6
2369 echo "configure:2370: checking size of long double" >&5 
2370 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
2374   cat > conftest.$ac_ext <<EOF
2375 #line 2376 "configure"
2376 #include "confdefs.h"
2377 #include "confdefs.h" 
2378 #include <sys/types.h> 
2379  
2380
2381 int main() {
2382 switch (0) case 0: case (sizeof (long double) == $ac_size):;
2383 ; return 0; }
2384 EOF
2385 if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2386   rm -rf conftest*
2387   ac_cv_sizeof_long_double=$ac_size
2388 else
2389   echo "configure: failed program was:" >&5
2390   cat conftest.$ac_ext >&5
2391 fi
2392 rm -f conftest* 
2393   if test x$ac_cv_sizeof_long_double != x ; then break; fi 
2394 done 
2395
2396 fi
2397  
2398 if test x$ac_cv_sizeof_long_double = x ; then 
2399   echo "cannot determine a size for long double";
2400   ac_cv_sizeof_long_double=0; 
2401 fi 
2402 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 
2403 cat >> confdefs.h <<EOF
2404 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
2405 EOF
2406  
2407
2408
2409 ac_header_dirent=no
2410 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2411 do
2412 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2413 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2414 echo "configure:2415: checking for $ac_hdr that defines DIR" >&5
2415 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2416   echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418   cat > conftest.$ac_ext <<EOF
2419 #line 2420 "configure"
2420 #include "confdefs.h"
2421 #include <sys/types.h>
2422 #include <$ac_hdr>
2423 int main() {
2424 DIR *dirp = 0;
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428   rm -rf conftest*
2429   eval "ac_cv_header_dirent_$ac_safe=yes"
2430 else
2431   echo "configure: failed program was:" >&5
2432   cat conftest.$ac_ext >&5
2433   rm -rf conftest*
2434   eval "ac_cv_header_dirent_$ac_safe=no"
2435 fi
2436 rm -f conftest*
2437 fi
2438 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2439   echo "$ac_t""yes" 1>&6
2440     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2441   cat >> confdefs.h <<EOF
2442 #define $ac_tr_hdr 1
2443 EOF
2444  ac_header_dirent=$ac_hdr; break
2445 else
2446   echo "$ac_t""no" 1>&6
2447 fi
2448 done
2449 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2450 if test $ac_header_dirent = dirent.h; then
2451 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2452 echo "configure:2453: checking for opendir in -ldir" >&5
2453 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2455   echo $ac_n "(cached) $ac_c" 1>&6
2456 else
2457   ac_save_LIBS="$LIBS"
2458 LIBS="-ldir  $LIBS"
2459 cat > conftest.$ac_ext <<EOF
2460 #line 2461 "configure"
2461 #include "confdefs.h"
2462 /* Override any gcc2 internal prototype to avoid an error.  */
2463 /* We use char because int might match the return type of a gcc2
2464     builtin and then its argument prototype would still apply.  */
2465 char opendir();
2466
2467 int main() {
2468 opendir()
2469 ; return 0; }
2470 EOF
2471 if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2472   rm -rf conftest*
2473   eval "ac_cv_lib_$ac_lib_var=yes"
2474 else
2475   echo "configure: failed program was:" >&5
2476   cat conftest.$ac_ext >&5
2477   rm -rf conftest*
2478   eval "ac_cv_lib_$ac_lib_var=no"
2479 fi
2480 rm -f conftest*
2481 LIBS="$ac_save_LIBS"
2482
2483 fi
2484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2485   echo "$ac_t""yes" 1>&6
2486   LIBS="$LIBS -ldir"
2487 else
2488   echo "$ac_t""no" 1>&6
2489 fi
2490
2491 else
2492 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2493 echo "configure:2494: checking for opendir in -lx" >&5
2494 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2496   echo $ac_n "(cached) $ac_c" 1>&6
2497 else
2498   ac_save_LIBS="$LIBS"
2499 LIBS="-lx  $LIBS"
2500 cat > conftest.$ac_ext <<EOF
2501 #line 2502 "configure"
2502 #include "confdefs.h"
2503 /* Override any gcc2 internal prototype to avoid an error.  */
2504 /* We use char because int might match the return type of a gcc2
2505     builtin and then its argument prototype would still apply.  */
2506 char opendir();
2507
2508 int main() {
2509 opendir()
2510 ; return 0; }
2511 EOF
2512 if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2513   rm -rf conftest*
2514   eval "ac_cv_lib_$ac_lib_var=yes"
2515 else
2516   echo "configure: failed program was:" >&5
2517   cat conftest.$ac_ext >&5
2518   rm -rf conftest*
2519   eval "ac_cv_lib_$ac_lib_var=no"
2520 fi
2521 rm -f conftest*
2522 LIBS="$ac_save_LIBS"
2523
2524 fi
2525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2526   echo "$ac_t""yes" 1>&6
2527   LIBS="$LIBS -lx"
2528 else
2529   echo "$ac_t""no" 1>&6
2530 fi
2531
2532 fi
2533
2534 for ac_hdr in dir.h libc.h sys/time.h stdlib.h memory.h string.h                strings.h sys/stat.h sys/vfs.h sys/statfs.h sys/statvfs.h               netinet/in.h windows.h          Windows32/Sockets.h pwd.h process.h grp.h sys/param.h           sys/file.h sys/errno.h sys/select.h
2535 do
2536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2538 echo "configure:2539: checking for $ac_hdr" >&5
2539 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2540   echo $ac_n "(cached) $ac_c" 1>&6
2541 else
2542   cat > conftest.$ac_ext <<EOF
2543 #line 2544 "configure"
2544 #include "confdefs.h"
2545 #include <$ac_hdr>
2546 EOF
2547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2548 { (eval echo configure:2549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2550 if test -z "$ac_err"; then
2551   rm -rf conftest*
2552   eval "ac_cv_header_$ac_safe=yes"
2553 else
2554   echo "$ac_err" >&5
2555   echo "configure: failed program was:" >&5
2556   cat conftest.$ac_ext >&5
2557   rm -rf conftest*
2558   eval "ac_cv_header_$ac_safe=no"
2559 fi
2560 rm -f conftest*
2561 fi
2562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2563   echo "$ac_t""yes" 1>&6
2564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2565   cat >> confdefs.h <<EOF
2566 #define $ac_tr_hdr 1
2567 EOF
2568  
2569 else
2570   echo "$ac_t""no" 1>&6
2571 fi
2572 done
2573
2574 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2575 echo "configure:2576: checking for sys/wait.h that is POSIX.1 compatible" >&5
2576 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2577   echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579   cat > conftest.$ac_ext <<EOF
2580 #line 2581 "configure"
2581 #include "confdefs.h"
2582 #include <sys/types.h>
2583 #include <sys/wait.h>
2584 #ifndef WEXITSTATUS
2585 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2586 #endif
2587 #ifndef WIFEXITED
2588 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2589 #endif
2590 int main() {
2591 int s;
2592 wait (&s);
2593 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2594 ; return 0; }
2595 EOF
2596 if { (eval echo configure:2597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2597   rm -rf conftest*
2598   ac_cv_header_sys_wait_h=yes
2599 else
2600   echo "configure: failed program was:" >&5
2601   cat conftest.$ac_ext >&5
2602   rm -rf conftest*
2603   ac_cv_header_sys_wait_h=no
2604 fi
2605 rm -f conftest*
2606 fi
2607
2608 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2609 if test $ac_cv_header_sys_wait_h = yes; then
2610   cat >> confdefs.h <<\EOF
2611 #define HAVE_SYS_WAIT_H 1
2612 EOF
2613
2614 fi
2615
2616
2617 for ac_func in memcpy ualarm getcwd getuid getpwnam getpwuid kill raise                getpagesize statvfs chown symlink readlink opendir fsync                sysconf GetSystemInfo gettimeofday GetLocalTime sigsetmask              sigset sigaction sighold                gethostbyname_r gethostbyaddr_r gethostent_r
2618 do
2619 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2620 echo "configure:2621: checking for $ac_func" >&5
2621 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2622   echo $ac_n "(cached) $ac_c" 1>&6
2623 else
2624   cat > conftest.$ac_ext <<EOF
2625 #line 2626 "configure"
2626 #include "confdefs.h"
2627 /* System header to define __stub macros and hopefully few prototypes,
2628     which can conflict with char $ac_func(); below.  */
2629 #include <assert.h>
2630 /* Override any gcc2 internal prototype to avoid an error.  */
2631 /* We use char because int might match the return type of a gcc2
2632     builtin and then its argument prototype would still apply.  */
2633 char $ac_func();
2634
2635 int main() {
2636
2637 /* The GNU C library defines this for functions which it implements
2638     to always fail with ENOSYS.  Some functions are actually named
2639     something starting with __ and the normal name is an alias.  */
2640 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2641 choke me
2642 #else
2643 $ac_func();
2644 #endif
2645
2646 ; return 0; }
2647 EOF
2648 if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2649   rm -rf conftest*
2650   eval "ac_cv_func_$ac_func=yes"
2651 else
2652   echo "configure: failed program was:" >&5
2653   cat conftest.$ac_ext >&5
2654   rm -rf conftest*
2655   eval "ac_cv_func_$ac_func=no"
2656 fi
2657 rm -f conftest*
2658 fi
2659
2660 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2661   echo "$ac_t""yes" 1>&6
2662     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2663   cat >> confdefs.h <<EOF
2664 #define $ac_tr_func 1
2665 EOF
2666  
2667 else
2668   echo "$ac_t""no" 1>&6
2669 fi
2670 done
2671
2672 for ac_hdr in unistd.h
2673 do
2674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2675 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2676 echo "configure:2677: checking for $ac_hdr" >&5
2677 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2678   echo $ac_n "(cached) $ac_c" 1>&6
2679 else
2680   cat > conftest.$ac_ext <<EOF
2681 #line 2682 "configure"
2682 #include "confdefs.h"
2683 #include <$ac_hdr>
2684 EOF
2685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2686 { (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2688 if test -z "$ac_err"; then
2689   rm -rf conftest*
2690   eval "ac_cv_header_$ac_safe=yes"
2691 else
2692   echo "$ac_err" >&5
2693   echo "configure: failed program was:" >&5
2694   cat conftest.$ac_ext >&5
2695   rm -rf conftest*
2696   eval "ac_cv_header_$ac_safe=no"
2697 fi
2698 rm -f conftest*
2699 fi
2700 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2701   echo "$ac_t""yes" 1>&6
2702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2703   cat >> confdefs.h <<EOF
2704 #define $ac_tr_hdr 1
2705 EOF
2706  
2707 else
2708   echo "$ac_t""no" 1>&6
2709 fi
2710 done
2711
2712 for ac_func in getpagesize
2713 do
2714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2715 echo "configure:2716: checking for $ac_func" >&5
2716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722 /* System header to define __stub macros and hopefully few prototypes,
2723     which can conflict with char $ac_func(); below.  */
2724 #include <assert.h>
2725 /* Override any gcc2 internal prototype to avoid an error.  */
2726 /* We use char because int might match the return type of a gcc2
2727     builtin and then its argument prototype would still apply.  */
2728 char $ac_func();
2729
2730 int main() {
2731
2732 /* The GNU C library defines this for functions which it implements
2733     to always fail with ENOSYS.  Some functions are actually named
2734     something starting with __ and the normal name is an alias.  */
2735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2736 choke me
2737 #else
2738 $ac_func();
2739 #endif
2740
2741 ; return 0; }
2742 EOF
2743 if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744   rm -rf conftest*
2745   eval "ac_cv_func_$ac_func=yes"
2746 else
2747   echo "configure: failed program was:" >&5
2748   cat conftest.$ac_ext >&5
2749   rm -rf conftest*
2750   eval "ac_cv_func_$ac_func=no"
2751 fi
2752 rm -f conftest*
2753 fi
2754
2755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2756   echo "$ac_t""yes" 1>&6
2757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2758   cat >> confdefs.h <<EOF
2759 #define $ac_tr_func 1
2760 EOF
2761  
2762 else
2763   echo "$ac_t""no" 1>&6
2764 fi
2765 done
2766
2767 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2768 echo "configure:2769: checking for working mmap" >&5
2769 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2770   echo $ac_n "(cached) $ac_c" 1>&6
2771 else
2772   if test "$cross_compiling" = yes; then
2773   ac_cv_func_mmap_fixed_mapped=no
2774 else
2775   cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778
2779 /* Thanks to Mike Haertel and Jim Avera for this test.
2780    Here is a matrix of mmap possibilities:
2781         mmap private not fixed
2782         mmap private fixed at somewhere currently unmapped
2783         mmap private fixed at somewhere already mapped
2784         mmap shared not fixed
2785         mmap shared fixed at somewhere currently unmapped
2786         mmap shared fixed at somewhere already mapped
2787    For private mappings, we should verify that changes cannot be read()
2788    back from the file, nor mmap's back from the file at a different
2789    address.  (There have been systems where private was not correctly
2790    implemented like the infamous i386 svr4.0, and systems where the
2791    VM page cache was not coherent with the filesystem buffer cache
2792    like early versions of FreeBSD and possibly contemporary NetBSD.)
2793    For shared mappings, we should conversely verify that changes get
2794    propogated back to all the places they're supposed to be.
2795
2796    Grep wants private fixed already mapped.
2797    The main things grep needs to know about mmap are:
2798    * does it exist and is it safe to write into the mmap'd area
2799    * how to use it (BSD variants)  */
2800 #include <sys/types.h>
2801 #include <fcntl.h>
2802 #include <sys/mman.h>
2803
2804 /* This mess was copied from the GNU getpagesize.h.  */
2805 #ifndef HAVE_GETPAGESIZE
2806 # ifdef HAVE_UNISTD_H
2807 #  include <unistd.h>
2808 # endif
2809
2810 /* Assume that all systems that can run configure have sys/param.h.  */
2811 # ifndef HAVE_SYS_PARAM_H
2812 #  define HAVE_SYS_PARAM_H 1
2813 # endif
2814
2815 # ifdef _SC_PAGESIZE
2816 #  define getpagesize() sysconf(_SC_PAGESIZE)
2817 # else /* no _SC_PAGESIZE */
2818 #  ifdef HAVE_SYS_PARAM_H
2819 #   include <sys/param.h>
2820 #   ifdef EXEC_PAGESIZE
2821 #    define getpagesize() EXEC_PAGESIZE
2822 #   else /* no EXEC_PAGESIZE */
2823 #    ifdef NBPG
2824 #     define getpagesize() NBPG * CLSIZE
2825 #     ifndef CLSIZE
2826 #      define CLSIZE 1
2827 #     endif /* no CLSIZE */
2828 #    else /* no NBPG */
2829 #     ifdef NBPC
2830 #      define getpagesize() NBPC
2831 #     else /* no NBPC */
2832 #      ifdef PAGESIZE
2833 #       define getpagesize() PAGESIZE
2834 #      endif /* PAGESIZE */
2835 #     endif /* no NBPC */
2836 #    endif /* no NBPG */
2837 #   endif /* no EXEC_PAGESIZE */
2838 #  else /* no HAVE_SYS_PARAM_H */
2839 #   define getpagesize() 8192   /* punt totally */
2840 #  endif /* no HAVE_SYS_PARAM_H */
2841 # endif /* no _SC_PAGESIZE */
2842
2843 #endif /* no HAVE_GETPAGESIZE */
2844
2845 #ifdef __cplusplus
2846 extern "C" { void *malloc(unsigned); }
2847 #else
2848 char *malloc();
2849 #endif
2850
2851 int
2852 main()
2853 {
2854         char *data, *data2, *data3;
2855         int i, pagesize;
2856         int fd;
2857
2858         pagesize = getpagesize();
2859
2860         /*
2861          * First, make a file with some known garbage in it.
2862          */
2863         data = malloc(pagesize);
2864         if (!data)
2865                 exit(1);
2866         for (i = 0; i < pagesize; ++i)
2867                 *(data + i) = rand();
2868         umask(0);
2869         fd = creat("conftestmmap", 0600);
2870         if (fd < 0)
2871                 exit(1);
2872         if (write(fd, data, pagesize) != pagesize)
2873                 exit(1);
2874         close(fd);
2875
2876         /*
2877          * Next, try to mmap the file at a fixed address which
2878          * already has something else allocated at it.  If we can,
2879          * also make sure that we see the same garbage.
2880          */
2881         fd = open("conftestmmap", O_RDWR);
2882         if (fd < 0)
2883                 exit(1);
2884         data2 = malloc(2 * pagesize);
2885         if (!data2)
2886                 exit(1);
2887         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2888         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2889             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2890                 exit(1);
2891         for (i = 0; i < pagesize; ++i)
2892                 if (*(data + i) != *(data2 + i))
2893                         exit(1);
2894
2895         /*
2896          * Finally, make sure that changes to the mapped area
2897          * do not percolate back to the file as seen by read().
2898          * (This is a bug on some variants of i386 svr4.0.)
2899          */
2900         for (i = 0; i < pagesize; ++i)
2901                 *(data2 + i) = *(data2 + i) + 1;
2902         data3 = malloc(pagesize);
2903         if (!data3)
2904                 exit(1);
2905         if (read(fd, data3, pagesize) != pagesize)
2906                 exit(1);
2907         for (i = 0; i < pagesize; ++i)
2908                 if (*(data + i) != *(data3 + i))
2909                         exit(1);
2910         close(fd);
2911         unlink("conftestmmap");
2912         exit(0);
2913 }
2914
2915 EOF
2916 if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2917 then
2918   ac_cv_func_mmap_fixed_mapped=yes
2919 else
2920   echo "configure: failed program was:" >&5
2921   cat conftest.$ac_ext >&5
2922   rm -fr conftest*
2923   ac_cv_func_mmap_fixed_mapped=no
2924 fi
2925 rm -fr conftest*
2926 fi
2927
2928 fi
2929
2930 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2931 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2932   cat >> confdefs.h <<\EOF
2933 #define HAVE_MMAP 1
2934 EOF
2935
2936 fi
2937
2938 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2939 echo "configure:2940: checking for ANSI C header files" >&5
2940 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2941   echo $ac_n "(cached) $ac_c" 1>&6
2942 else
2943   cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 #include <stdlib.h>
2947 #include <stdarg.h>
2948 #include <string.h>
2949 #include <float.h>
2950 EOF
2951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2952 { (eval echo configure:2953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2954 if test -z "$ac_err"; then
2955   rm -rf conftest*
2956   ac_cv_header_stdc=yes
2957 else
2958   echo "$ac_err" >&5
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   ac_cv_header_stdc=no
2963 fi
2964 rm -f conftest*
2965
2966 if test $ac_cv_header_stdc = yes; then
2967   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2968 cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971 #include <string.h>
2972 EOF
2973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2974   egrep "memchr" >/dev/null 2>&1; then
2975   :
2976 else
2977   rm -rf conftest*
2978   ac_cv_header_stdc=no
2979 fi
2980 rm -f conftest*
2981
2982 fi
2983
2984 if test $ac_cv_header_stdc = yes; then
2985   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2986 cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989 #include <stdlib.h>
2990 EOF
2991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2992   egrep "free" >/dev/null 2>&1; then
2993   :
2994 else
2995   rm -rf conftest*
2996   ac_cv_header_stdc=no
2997 fi
2998 rm -f conftest*
2999
3000 fi
3001
3002 if test $ac_cv_header_stdc = yes; then
3003   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3004 if test "$cross_compiling" = yes; then
3005   :
3006 else
3007   cat > conftest.$ac_ext <<EOF
3008 #line 3009 "configure"
3009 #include "confdefs.h"
3010 #include <ctype.h>
3011 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3012 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3013 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3014 int main () { int i; for (i = 0; i < 256; i++)
3015 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3016 exit (0); }
3017
3018 EOF
3019 if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3020 then
3021   :
3022 else
3023   echo "configure: failed program was:" >&5
3024   cat conftest.$ac_ext >&5
3025   rm -fr conftest*
3026   ac_cv_header_stdc=no
3027 fi
3028 rm -fr conftest*
3029 fi
3030
3031 fi
3032 fi
3033
3034 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3035 if test $ac_cv_header_stdc = yes; then
3036   cat >> confdefs.h <<\EOF
3037 #define STDC_HEADERS 1
3038 EOF
3039
3040 fi
3041
3042 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3043 echo "configure:3044: checking for pid_t" >&5
3044 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   cat > conftest.$ac_ext <<EOF
3048 #line 3049 "configure"
3049 #include "confdefs.h"
3050 #include <sys/types.h>
3051 #if STDC_HEADERS
3052 #include <stdlib.h>
3053 #include <stddef.h>
3054 #endif
3055 EOF
3056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3057   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3058   rm -rf conftest*
3059   ac_cv_type_pid_t=yes
3060 else
3061   rm -rf conftest*
3062   ac_cv_type_pid_t=no
3063 fi
3064 rm -f conftest*
3065
3066 fi
3067 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3068 if test $ac_cv_type_pid_t = no; then
3069   cat >> confdefs.h <<\EOF
3070 #define pid_t int
3071 EOF
3072
3073 fi
3074
3075 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3076 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3077 echo "configure:3078: checking for vfork.h" >&5
3078 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084 #include <vfork.h>
3085 EOF
3086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3087 { (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3089 if test -z "$ac_err"; then
3090   rm -rf conftest*
3091   eval "ac_cv_header_$ac_safe=yes"
3092 else
3093   echo "$ac_err" >&5
3094   echo "configure: failed program was:" >&5
3095   cat conftest.$ac_ext >&5
3096   rm -rf conftest*
3097   eval "ac_cv_header_$ac_safe=no"
3098 fi
3099 rm -f conftest*
3100 fi
3101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3102   echo "$ac_t""yes" 1>&6
3103   cat >> confdefs.h <<\EOF
3104 #define HAVE_VFORK_H 1
3105 EOF
3106
3107 else
3108   echo "$ac_t""no" 1>&6
3109 fi
3110
3111 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3112 echo "configure:3113: checking for working vfork" >&5
3113 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116   if test "$cross_compiling" = yes; then
3117   echo $ac_n "checking for vfork""... $ac_c" 1>&6
3118 echo "configure:3119: checking for vfork" >&5
3119 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3120   echo $ac_n "(cached) $ac_c" 1>&6
3121 else
3122   cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125 /* System header to define __stub macros and hopefully few prototypes,
3126     which can conflict with char vfork(); below.  */
3127 #include <assert.h>
3128 /* Override any gcc2 internal prototype to avoid an error.  */
3129 /* We use char because int might match the return type of a gcc2
3130     builtin and then its argument prototype would still apply.  */
3131 char vfork();
3132
3133 int main() {
3134
3135 /* The GNU C library defines this for functions which it implements
3136     to always fail with ENOSYS.  Some functions are actually named
3137     something starting with __ and the normal name is an alias.  */
3138 #if defined (__stub_vfork) || defined (__stub___vfork)
3139 choke me
3140 #else
3141 vfork();
3142 #endif
3143
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3147   rm -rf conftest*
3148   eval "ac_cv_func_vfork=yes"
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   eval "ac_cv_func_vfork=no"
3154 fi
3155 rm -f conftest*
3156 fi
3157
3158 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3159   echo "$ac_t""yes" 1>&6
3160   :
3161 else
3162   echo "$ac_t""no" 1>&6
3163 fi
3164
3165 ac_cv_func_vfork_works=$ac_cv_func_vfork
3166 else
3167   cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 /* Thanks to Paul Eggert for this test.  */
3171 #include <stdio.h>
3172 #include <sys/types.h>
3173 #include <sys/stat.h>
3174 #ifdef HAVE_UNISTD_H
3175 #include <unistd.h>
3176 #endif
3177 #ifdef HAVE_VFORK_H
3178 #include <vfork.h>
3179 #endif
3180 /* On some sparc systems, changes by the child to local and incoming
3181    argument registers are propagated back to the parent.
3182    The compiler is told about this with #include <vfork.h>,
3183    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3184    Test for this by using a static variable whose address
3185    is put into a register that is clobbered by the vfork.  */
3186 static
3187 #ifdef __cplusplus
3188 sparc_address_test (int arg)
3189 #else
3190 sparc_address_test (arg) int arg;
3191 #endif
3192 {
3193   static pid_t child;
3194   if (!child) {
3195     child = vfork ();
3196     if (child < 0) {
3197       perror ("vfork");
3198       _exit(2);
3199     }
3200     if (!child) {
3201       arg = getpid();
3202       write(-1, "", 0);
3203       _exit (arg);
3204     }
3205   }
3206 }
3207 main() {
3208   pid_t parent = getpid ();
3209   pid_t child;
3210
3211   sparc_address_test ();
3212
3213   child = vfork ();
3214
3215   if (child == 0) {
3216     /* Here is another test for sparc vfork register problems.
3217        This test uses lots of local variables, at least
3218        as many local variables as main has allocated so far
3219        including compiler temporaries.  4 locals are enough for
3220        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3221        A buggy compiler should reuse the register of parent
3222        for one of the local variables, since it will think that
3223        parent can't possibly be used any more in this routine.
3224        Assigning to the local variable will thus munge parent
3225        in the parent process.  */
3226     pid_t
3227       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3228       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3229     /* Convince the compiler that p..p7 are live; otherwise, it might
3230        use the same hardware register for all 8 local variables.  */
3231     if (p != p1 || p != p2 || p != p3 || p != p4
3232         || p != p5 || p != p6 || p != p7)
3233       _exit(1);
3234
3235     /* On some systems (e.g. IRIX 3.3),
3236        vfork doesn't separate parent from child file descriptors.
3237        If the child closes a descriptor before it execs or exits,
3238        this munges the parent's descriptor as well.
3239        Test for this by closing stdout in the child.  */
3240     _exit(close(fileno(stdout)) != 0);
3241   } else {
3242     int status;
3243     struct stat st;
3244
3245     while (wait(&status) != child)
3246       ;
3247     exit(
3248          /* Was there some problem with vforking?  */
3249          child < 0
3250
3251          /* Did the child fail?  (This shouldn't happen.)  */
3252          || status
3253
3254          /* Did the vfork/compiler bug occur?  */
3255          || parent != getpid()
3256
3257          /* Did the file descriptor bug occur?  */
3258          || fstat(fileno(stdout), &st) != 0
3259          );
3260   }
3261 }
3262 EOF
3263 if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3264 then
3265   ac_cv_func_vfork_works=yes
3266 else
3267   echo "configure: failed program was:" >&5
3268   cat conftest.$ac_ext >&5
3269   rm -fr conftest*
3270   ac_cv_func_vfork_works=no
3271 fi
3272 rm -fr conftest*
3273 fi
3274
3275 fi
3276
3277 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3278 if test $ac_cv_func_vfork_works = no; then
3279   cat >> confdefs.h <<\EOF
3280 #define vfork fork
3281 EOF
3282
3283 fi
3284
3285 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3286 echo "configure:3287: checking return type of signal handlers" >&5
3287 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3288   echo $ac_n "(cached) $ac_c" 1>&6
3289 else
3290   cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293 #include <sys/types.h>
3294 #include <signal.h>
3295 #ifdef signal
3296 #undef signal
3297 #endif
3298 #ifdef __cplusplus
3299 extern "C" void (*signal (int, void (*)(int)))(int);
3300 #else
3301 void (*signal ()) ();
3302 #endif
3303
3304 int main() {
3305 int i;
3306 ; return 0; }
3307 EOF
3308 if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3309   rm -rf conftest*
3310   ac_cv_type_signal=void
3311 else
3312   echo "configure: failed program was:" >&5
3313   cat conftest.$ac_ext >&5
3314   rm -rf conftest*
3315   ac_cv_type_signal=int
3316 fi
3317 rm -f conftest*
3318 fi
3319
3320 echo "$ac_t""$ac_cv_type_signal" 1>&6
3321 cat >> confdefs.h <<EOF
3322 #define RETSIGTYPE $ac_cv_type_signal
3323 EOF
3324
3325
3326
3327 echo $ac_n "checking for sqrt""... $ac_c" 1>&6
3328 echo "configure:3329: checking for sqrt" >&5
3329 if eval "test \"`echo '$''{'ac_cv_func_sqrt'+set}'`\" = set"; then
3330   echo $ac_n "(cached) $ac_c" 1>&6
3331 else
3332   cat > conftest.$ac_ext <<EOF
3333 #line 3334 "configure"
3334 #include "confdefs.h"
3335 /* System header to define __stub macros and hopefully few prototypes,
3336     which can conflict with char sqrt(); below.  */
3337 #include <assert.h>
3338 /* Override any gcc2 internal prototype to avoid an error.  */
3339 /* We use char because int might match the return type of a gcc2
3340     builtin and then its argument prototype would still apply.  */
3341 char sqrt();
3342
3343 int main() {
3344
3345 /* The GNU C library defines this for functions which it implements
3346     to always fail with ENOSYS.  Some functions are actually named
3347     something starting with __ and the normal name is an alias.  */
3348 #if defined (__stub_sqrt) || defined (__stub___sqrt)
3349 choke me
3350 #else
3351 sqrt();
3352 #endif
3353
3354 ; return 0; }
3355 EOF
3356 if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3357   rm -rf conftest*
3358   eval "ac_cv_func_sqrt=yes"
3359 else
3360   echo "configure: failed program was:" >&5
3361   cat conftest.$ac_ext >&5
3362   rm -rf conftest*
3363   eval "ac_cv_func_sqrt=no"
3364 fi
3365 rm -f conftest*
3366 fi
3367
3368 if eval "test \"`echo '$ac_cv_func_'sqrt`\" = yes"; then
3369   
3370   :
3371 else
3372   
3373 LIBS="$LIBS -lm -lc"
3374 ac_cv_func_sqrt=no
3375 cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378
3379 int main() {
3380
3381 double sqrt(double);
3382 sqrt(2.0);
3383
3384 ; return 0; }
3385 EOF
3386 if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3387   rm -rf conftest*
3388   ac_cv_func_sqrt="-lm -lc"
3389 else
3390   echo "configure: failed program was:" >&5
3391   cat conftest.$ac_ext >&5
3392 fi
3393 rm -f conftest*
3394
3395 fi
3396
3397 echo "$ac_t""$ac_cv_func_sqrt" 1>&6
3398
3399
3400 # uses AC_TRY_RUN
3401 if test "$cross_compiling" = yes; then
3402     echo "WARNING: cannot check for restartable system calls during cross compilation."
3403 else
3404     echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
3405 echo "configure:3406: checking for restartable system calls" >&5
3406 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   if test "$cross_compiling" = yes; then
3410     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3411 else
3412   cat > conftest.$ac_ext <<EOF
3413 #line 3414 "configure"
3414 #include "confdefs.h"
3415 /* Exit 0 (true) if wait returns something other than -1,
3416    i.e. the pid of the child, which means that wait was restarted
3417    after getting the signal.  */
3418 #include <sys/types.h>
3419 #include <signal.h>
3420 ucatch (isig) { }
3421 main () {
3422   int i = fork (), status;
3423   if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
3424   signal (SIGINT, ucatch);
3425   status = wait(&i);
3426   if (status == -1) wait(&i);
3427   exit (status == -1);
3428 }
3429
3430 EOF
3431 if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3432 then
3433   ac_cv_sys_restartable_syscalls=yes
3434 else
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -fr conftest*
3438   ac_cv_sys_restartable_syscalls=no
3439 fi
3440 rm -fr conftest*
3441 fi
3442
3443 fi
3444
3445 echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
3446 if test $ac_cv_sys_restartable_syscalls = yes; then
3447   cat >> confdefs.h <<\EOF
3448 #define HAVE_RESTARTABLE_SYSCALLS 1
3449 EOF
3450
3451 fi
3452
3453 fi
3454
3455
3456 # ******************** GNUstep.sh-less compilation ********************
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473 # ******************** output *****************************************
3474
3475 trap '' 1 2 15
3476 cat > confcache <<\EOF
3477 # This file is a shell script that caches the results of configure
3478 # tests run on this system so they can be shared between configure
3479 # scripts and configure runs.  It is not useful on other systems.
3480 # If it contains results you don't want to keep, you may remove or edit it.
3481 #
3482 # By default, configure uses ./config.cache as the cache file,
3483 # creating it if it does not exist already.  You can give configure
3484 # the --cache-file=FILE option to use a different cache file; that is
3485 # what configure does when it calls configure scripts in
3486 # subdirectories, so they share the cache.
3487 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3488 # config.status only pays attention to the cache file if you give it the
3489 # --recheck option to rerun configure.
3490 #
3491 EOF
3492 # The following way of writing the cache mishandles newlines in values,
3493 # but we know of no workaround that is simple, portable, and efficient.
3494 # So, don't put newlines in cache variables' values.
3495 # Ultrix sh set writes to stderr and can't be redirected directly,
3496 # and sets the high bit in the cache file unless we assign to the vars.
3497 (set) 2>&1 |
3498   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3499   *ac_space=\ *)
3500     # `set' does not quote correctly, so add quotes (double-quote substitution
3501     # turns \\\\ into \\, and sed turns \\ into \).
3502     sed -n \
3503       -e "s/'/'\\\\''/g" \
3504       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3505     ;;
3506   *)
3507     # `set' quotes correctly as required by POSIX, so do not add quotes.
3508     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3509     ;;
3510   esac >> confcache
3511 if cmp -s $cache_file confcache; then
3512   :
3513 else
3514   if test -w $cache_file; then
3515     echo "updating cache $cache_file"
3516     cat confcache > $cache_file
3517   else
3518     echo "not updating unwritable cache $cache_file"
3519   fi
3520 fi
3521 rm -f confcache
3522
3523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3524
3525 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3526 # Let make expand exec_prefix.
3527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3528
3529 # Any assignment to VPATH causes Sun make to only execute
3530 # the first set of double-colon rules, so remove it if not needed.
3531 # If there is a colon in the path, we need to keep it.
3532 if test "x$srcdir" = x.; then
3533   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3534 fi
3535
3536 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3537
3538 DEFS=-DHAVE_CONFIG_H
3539
3540 # Without the "./", some shells look in PATH for config.status.
3541 : ${CONFIG_STATUS=./config.status}
3542
3543 echo creating $CONFIG_STATUS
3544 rm -f $CONFIG_STATUS
3545 cat > $CONFIG_STATUS <<EOF
3546 #! /bin/sh
3547 # Generated automatically by configure.
3548 # Run this file to recreate the current configuration.
3549 # This directory was configured as follows,
3550 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3551 #
3552 # $0 $ac_configure_args
3553 #
3554 # Compiler output produced by configure, useful for debugging
3555 # configure, is in ./config.log if it exists.
3556
3557 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3558 for ac_option
3559 do
3560   case "\$ac_option" in
3561   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3562     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3563     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3564   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3565     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3566     exit 0 ;;
3567   -help | --help | --hel | --he | --h)
3568     echo "\$ac_cs_usage"; exit 0 ;;
3569   *) echo "\$ac_cs_usage"; exit 1 ;;
3570   esac
3571 done
3572
3573 ac_given_srcdir=$srcdir
3574
3575 trap 'rm -fr `echo "config.h.in.sed:config.h.in config.mak gsfix.make     Foundation/libFoundation.make           Foundation/NSObject.h.in.sed:Foundation/NSObject.h.in           Foundation/lfmemory.h.in.sed:Foundation/lfmemory.h.in config.h:config.h.in.sed                 Foundation/NSObject.h:Foundation/NSObject.h.in.sed                  Foundation/lfmemory.h:Foundation/lfmemory.h.in.sed" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3576 EOF
3577 cat >> $CONFIG_STATUS <<EOF
3578
3579 # Protect against being on the right side of a sed subst in config.status.
3580 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3581  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3582 $ac_vpsub
3583 $extrasub
3584 s%@MAKE@%$MAKE%g
3585 s%@OBJC_RUNTIME@%$OBJC_RUNTIME%g
3586 s%@OBJC_RUNTIME_FLAG@%$OBJC_RUNTIME_FLAG%g
3587 s%@BROKEN_COMPILER@%$BROKEN_COMPILER%g
3588 s%@BROKEN_BUILTIN_APPLY@%$BROKEN_BUILTIN_APPLY%g
3589 s%@NO_NESTED_FUNCTIONS@%$NO_NESTED_FUNCTIONS%g
3590 s%@PCCTS_CFLAGS@%$PCCTS_CFLAGS%g
3591 s%@HOST@%$HOST%g
3592 s%@HOST_CPU@%$HOST_CPU%g
3593 s%@HOST_VENDOR@%$HOST_VENDOR%g
3594 s%@HOST_OS@%$HOST_OS%g
3595 s%@TARGET@%$TARGET%g
3596 s%@TARGET_CPU@%$TARGET_CPU%g
3597 s%@TARGET_VENDOR@%$TARGET_VENDOR%g
3598 s%@TARGET_OS@%$TARGET_OS%g
3599 s%@STRUCT_ALIGNMENT@%$STRUCT_ALIGNMENT%g
3600 s%@SHELL@%$SHELL%g
3601 s%@CFLAGS@%$CFLAGS%g
3602 s%@CPPFLAGS@%$CPPFLAGS%g
3603 s%@CXXFLAGS@%$CXXFLAGS%g
3604 s%@FFLAGS@%$FFLAGS%g
3605 s%@DEFS@%$DEFS%g
3606 s%@LDFLAGS@%$LDFLAGS%g
3607 s%@LIBS@%$LIBS%g
3608 s%@exec_prefix@%$exec_prefix%g
3609 s%@prefix@%$prefix%g
3610 s%@program_transform_name@%$program_transform_name%g
3611 s%@bindir@%$bindir%g
3612 s%@sbindir@%$sbindir%g
3613 s%@libexecdir@%$libexecdir%g
3614 s%@datadir@%$datadir%g
3615 s%@sysconfdir@%$sysconfdir%g
3616 s%@sharedstatedir@%$sharedstatedir%g
3617 s%@localstatedir@%$localstatedir%g
3618 s%@libdir@%$libdir%g
3619 s%@includedir@%$includedir%g
3620 s%@oldincludedir@%$oldincludedir%g
3621 s%@infodir@%$infodir%g
3622 s%@mandir@%$mandir%g
3623 s%@MAJOR_VERSION@%$MAJOR_VERSION%g
3624 s%@MINOR_VERSION@%$MINOR_VERSION%g
3625 s%@SUBMINOR_VERSION@%$SUBMINOR_VERSION%g
3626 s%@GC_INCLUDE_DIR@%$GC_INCLUDE_DIR%g
3627 s%@GC_LIB@%$GC_LIB%g
3628 s%@host@%$host%g
3629 s%@host_alias@%$host_alias%g
3630 s%@host_cpu@%$host_cpu%g
3631 s%@host_vendor@%$host_vendor%g
3632 s%@host_os@%$host_os%g
3633 s%@target@%$target%g
3634 s%@target_alias@%$target_alias%g
3635 s%@target_cpu@%$target_cpu%g
3636 s%@target_vendor@%$target_vendor%g
3637 s%@target_os@%$target_os%g
3638 s%@build@%$build%g
3639 s%@build_alias@%$build_alias%g
3640 s%@build_cpu@%$build_cpu%g
3641 s%@build_vendor@%$build_vendor%g
3642 s%@build_os@%$build_os%g
3643 s%@WITH_GNUSTEP@%$WITH_GNUSTEP%g
3644 s%@WITH_FFCALL@%$WITH_FFCALL%g
3645 s%@WITH_GC@%$WITH_GC%g
3646 s%@CC@%$CC%g
3647 s%@CPP@%$CPP%g
3648 s%@AR@%$AR%g
3649 s%@LD@%$LD%g
3650 s%@PERL@%$PERL%g
3651 s%@GNUSTEP_FLATTENED@%$GNUSTEP_FLATTENED%g
3652 s%@GNUSTEP_HOST@%$GNUSTEP_HOST%g
3653 s%@GNUSTEP_HOST_CPU@%$GNUSTEP_HOST_CPU%g
3654 s%@GNUSTEP_HOST_OS@%$GNUSTEP_HOST_OS%g
3655 s%@GNUSTEP_HOST_VENDOR@%$GNUSTEP_HOST_VENDOR%g
3656 s%@GNUSTEP_LOCAL_ROOT@%$GNUSTEP_LOCAL_ROOT%g
3657 s%@GNUSTEP_MAKEFILES@%$GNUSTEP_MAKEFILES%g
3658 s%@GNUSTEP_NETWORK_ROOT@%$GNUSTEP_NETWORK_ROOT%g
3659 s%@GNUSTEP_PATHLIST@%$GNUSTEP_PATHLIST%g
3660 s%@GNUSTEP_ROOT@%$GNUSTEP_ROOT%g
3661 s%@GNUSTEP_SYSTEM_ROOT@%$GNUSTEP_SYSTEM_ROOT%g
3662 s%@GNUSTEP_USER_ROOT@%$GNUSTEP_USER_ROOT%g
3663 s%@LIBRARY_COMBO@%$LIBRARY_COMBO%g
3664
3665 CEOF
3666 EOF
3667
3668 cat >> $CONFIG_STATUS <<\EOF
3669
3670 # Split the substitutions into bite-sized pieces for seds with
3671 # small command number limits, like on Digital OSF/1 and HP-UX.
3672 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3673 ac_file=1 # Number of current file.
3674 ac_beg=1 # First line for current file.
3675 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3676 ac_more_lines=:
3677 ac_sed_cmds=""
3678 while $ac_more_lines; do
3679   if test $ac_beg -gt 1; then
3680     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3681   else
3682     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3683   fi
3684   if test ! -s conftest.s$ac_file; then
3685     ac_more_lines=false
3686     rm -f conftest.s$ac_file
3687   else
3688     if test -z "$ac_sed_cmds"; then
3689       ac_sed_cmds="sed -f conftest.s$ac_file"
3690     else
3691       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3692     fi
3693     ac_file=`expr $ac_file + 1`
3694     ac_beg=$ac_end
3695     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3696   fi
3697 done
3698 if test -z "$ac_sed_cmds"; then
3699   ac_sed_cmds=cat
3700 fi
3701 EOF
3702
3703 cat >> $CONFIG_STATUS <<EOF
3704
3705 CONFIG_FILES=\${CONFIG_FILES-"config.h.in.sed:config.h.in config.mak gsfix.make           Foundation/libFoundation.make           Foundation/NSObject.h.in.sed:Foundation/NSObject.h.in           Foundation/lfmemory.h.in.sed:Foundation/lfmemory.h.in"}
3706 EOF
3707 cat >> $CONFIG_STATUS <<\EOF
3708 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3709   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3710   case "$ac_file" in
3711   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3712        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3713   *) ac_file_in="${ac_file}.in" ;;
3714   esac
3715
3716   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3717
3718   # Remove last slash and all that follows it.  Not all systems have dirname.
3719   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3720   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3721     # The file is in a subdirectory.
3722     test ! -d "$ac_dir" && mkdir "$ac_dir"
3723     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3724     # A "../" for each directory in $ac_dir_suffix.
3725     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3726   else
3727     ac_dir_suffix= ac_dots=
3728   fi
3729
3730   case "$ac_given_srcdir" in
3731   .)  srcdir=.
3732       if test -z "$ac_dots"; then top_srcdir=.
3733       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3734   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3735   *) # Relative path.
3736     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3737     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3738   esac
3739
3740
3741   echo creating "$ac_file"
3742   rm -f "$ac_file"
3743   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3744   case "$ac_file" in
3745   *Makefile*) ac_comsub="1i\\
3746 # $configure_input" ;;
3747   *) ac_comsub= ;;
3748   esac
3749
3750   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3751   sed -e "$ac_comsub
3752 s%@configure_input@%$configure_input%g
3753 s%@srcdir@%$srcdir%g
3754 s%@top_srcdir@%$top_srcdir%g
3755 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3756 fi; done
3757 rm -f conftest.s*
3758
3759 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3760 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3761 #
3762 # ac_d sets the value in "#define NAME VALUE" lines.
3763 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3764 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3765 ac_dC='\3'
3766 ac_dD='%g'
3767 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3768 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3769 ac_uB='\([      ]\)%\1#\2define\3'
3770 ac_uC=' '
3771 ac_uD='\4%g'
3772 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3773 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3774 ac_eB='$%\1#\2define\3'
3775 ac_eC=' '
3776 ac_eD='%g'
3777
3778 if test "${CONFIG_HEADERS+set}" != set; then
3779 EOF
3780 cat >> $CONFIG_STATUS <<EOF
3781   CONFIG_HEADERS="config.h:config.h.in.sed               Foundation/NSObject.h:Foundation/NSObject.h.in.sed                  Foundation/lfmemory.h:Foundation/lfmemory.h.in.sed"
3782 EOF
3783 cat >> $CONFIG_STATUS <<\EOF
3784 fi
3785 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3786   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3787   case "$ac_file" in
3788   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3789        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3790   *) ac_file_in="${ac_file}.in" ;;
3791   esac
3792
3793   echo creating $ac_file
3794
3795   rm -f conftest.frag conftest.in conftest.out
3796   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3797   cat $ac_file_inputs > conftest.in
3798
3799 EOF
3800
3801 # Transform confdefs.h into a sed script conftest.vals that substitutes
3802 # the proper values into config.h.in to produce config.h.  And first:
3803 # Protect against being on the right side of a sed subst in config.status.
3804 # Protect against being in an unquoted here document in config.status.
3805 rm -f conftest.vals
3806 cat > conftest.hdr <<\EOF
3807 s/[\\&%]/\\&/g
3808 s%[\\$`]%\\&%g
3809 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3810 s%ac_d%ac_u%gp
3811 s%ac_u%ac_e%gp
3812 EOF
3813 sed -n -f conftest.hdr confdefs.h > conftest.vals
3814 rm -f conftest.hdr
3815
3816 # This sed command replaces #undef with comments.  This is necessary, for
3817 # example, in the case of _POSIX_SOURCE, which is predefined and required
3818 # on some systems where configure will not decide to define it.
3819 cat >> conftest.vals <<\EOF
3820 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3821 EOF
3822
3823 # Break up conftest.vals because some shells have a limit on
3824 # the size of here documents, and old seds have small limits too.
3825
3826 rm -f conftest.tail
3827 while :
3828 do
3829   ac_lines=`grep -c . conftest.vals`
3830   # grep -c gives empty output for an empty file on some AIX systems.
3831   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3832   # Write a limited-size here document to conftest.frag.
3833   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3834   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3835   echo 'CEOF
3836   sed -f conftest.frag conftest.in > conftest.out
3837   rm -f conftest.in
3838   mv conftest.out conftest.in
3839 ' >> $CONFIG_STATUS
3840   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3841   rm -f conftest.vals
3842   mv conftest.tail conftest.vals
3843 done
3844 rm -f conftest.vals
3845
3846 cat >> $CONFIG_STATUS <<\EOF
3847   rm -f conftest.frag conftest.h
3848   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3849   cat conftest.in >> conftest.h
3850   rm -f conftest.in
3851   if cmp -s $ac_file conftest.h 2>/dev/null; then
3852     echo "$ac_file is unchanged"
3853     rm -f conftest.h
3854   else
3855     # Remove last slash and all that follows it.  Not all systems have dirname.
3856       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3857       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3858       # The file is in a subdirectory.
3859       test ! -d "$ac_dir" && mkdir "$ac_dir"
3860     fi
3861     rm -f $ac_file
3862     mv conftest.h $ac_file
3863   fi
3864 fi; done
3865
3866 EOF
3867 cat >> $CONFIG_STATUS <<EOF
3868
3869 EOF
3870 cat >> $CONFIG_STATUS <<\EOF
3871 rm -f config.h.in.sed Foundation/NSObject.h.in.sed Foundation/lfmemory.h.in.sed
3872 # Read the variables from config.cache
3873 . ./config.cache
3874
3875 # Create the output directory
3876 if test ! -d $ac_cv_file_output_prefix; then
3877   ${srcdir}/mkinstalldirs $ac_cv_file_output_prefix
3878 fi
3879
3880 # Move the config.h and config.mak over to the $ac_cv_file_output_prefix
3881 mv config.h   $ac_cv_file_output_prefix
3882 mv config.mak $ac_cv_file_output_prefix
3883
3884 #
3885 # create the appropriate memory management file
3886 #
3887 mv -f Foundation/lfmemory.h $ac_cv_file_output_prefix
3888
3889 # Create the NSException.h file to include a file in
3890 #       $ac_cv_file_output_prefix
3891 # which is the actual exceptions definition file.
3892 (cd Foundation;
3893   rm -f NSException.h;
3894   echo "#include <real_exception_file.h>" >NSException.h)
3895
3896 #
3897 # Now create the real_exception_file.h based upon the compiler support
3898 #
3899 rm -f Foundation/$ac_cv_file_output_prefix/real_exception_file.h
3900 if test ${ac_cv_nested_functions} = no; then
3901   echo "creating $ac_cv_file_output_prefix/real_exception_file.h from ${srcdir}/Foundation/NSExceptionWithoutNested.h"
3902   cp ${srcdir}/Foundation/NSExceptionWithoutNested.h $ac_cv_file_output_prefix/real_exception_file.h
3903 elif test ${ac_cv_broken_compiler} = yes; then
3904   echo "creating $ac_cv_file_output_prefix/real_exception_file.h from ${srcdir}/Foundation/NSClassicException.h"
3905   cp ${srcdir}/Foundation/NSClassicException.h $ac_cv_file_output_prefix/real_exception_file.h
3906 else
3907   echo "creating $ac_cv_file_output_prefix/real_exception_file.h from ${srcdir}/Foundation/NSFuncallException.h"
3908   cp ${srcdir}/Foundation/NSFuncallException.h $ac_cv_file_output_prefix/real_exception_file.h
3909 fi
3910
3911 exit 0
3912 EOF
3913 chmod +x $CONFIG_STATUS
3914 rm -fr confdefs* $ac_clean_files
3915 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3916