]> err.no Git - sope/blob - sope-core/NGStreams/configure
fixed a Tiger warning
[sope] / sope-core / NGStreams / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults: 
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
15
16 # Initialize some variables set by options.
17 # The variables have the same names as the options, with
18 # dashes changed to underlines.
19 build=NONE
20 cache_file=./config.cache
21 exec_prefix=NONE
22 host=NONE
23 no_create=
24 nonopt=NONE
25 no_recursion=
26 prefix=NONE
27 program_prefix=NONE
28 program_suffix=NONE
29 program_transform_name=s,x,x,
30 silent=
31 site=
32 srcdir=
33 target=NONE
34 verbose=
35 x_includes=NONE
36 x_libraries=NONE
37 bindir='${exec_prefix}/bin'
38 sbindir='${exec_prefix}/sbin'
39 libexecdir='${exec_prefix}/libexec'
40 datadir='${prefix}/share'
41 sysconfdir='${prefix}/etc'
42 sharedstatedir='${prefix}/com'
43 localstatedir='${prefix}/var'
44 libdir='${exec_prefix}/lib'
45 includedir='${prefix}/include'
46 oldincludedir='/usr/include'
47 infodir='${prefix}/info'
48 mandir='${prefix}/man'
49
50 # Initialize some other variables.
51 subdirs=
52 MFLAGS= MAKEFLAGS=
53 SHELL=${CONFIG_SHELL-/bin/sh}
54 # Maximum number of lines to put in a shell here document.
55 ac_max_here_lines=12
56
57 ac_prev=
58 for ac_option
59 do
60
61   # If the previous option needs an argument, assign it.
62   if test -n "$ac_prev"; then
63     eval "$ac_prev=\$ac_option"
64     ac_prev=
65     continue
66   fi
67
68   case "$ac_option" in
69   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
70   *) ac_optarg= ;;
71   esac
72
73   # Accept the important Cygnus configure options, so we can diagnose typos.
74
75   case "$ac_option" in
76
77   -bindir | --bindir | --bindi | --bind | --bin | --bi)
78     ac_prev=bindir ;;
79   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80     bindir="$ac_optarg" ;;
81
82   -build | --build | --buil | --bui | --bu)
83     ac_prev=build ;;
84   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
85     build="$ac_optarg" ;;
86
87   -cache-file | --cache-file | --cache-fil | --cache-fi \
88   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89     ac_prev=cache_file ;;
90   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92     cache_file="$ac_optarg" ;;
93
94   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95     ac_prev=datadir ;;
96   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97   | --da=*)
98     datadir="$ac_optarg" ;;
99
100   -disable-* | --disable-*)
101     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
102     # Reject names that are not valid shell variable names.
103     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
104       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105     fi
106     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107     eval "enable_${ac_feature}=no" ;;
108
109   -enable-* | --enable-*)
110     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
111     # Reject names that are not valid shell variable names.
112     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
113       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     case "$ac_option" in
117       *=*) ;;
118       *) ac_optarg=yes ;;
119     esac
120     eval "enable_${ac_feature}='$ac_optarg'" ;;
121
122   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124   | --exec | --exe | --ex)
125     ac_prev=exec_prefix ;;
126   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128   | --exec=* | --exe=* | --ex=*)
129     exec_prefix="$ac_optarg" ;;
130
131   -gas | --gas | --ga | --g)
132     # Obsolete; use --with-gas.
133     with_gas=yes ;;
134
135   -help | --help | --hel | --he)
136     # Omit some internal or obsolete options to make the list less imposing.
137     # This message is too long to be a string in the A/UX 3.1 sh.
138     cat << EOF
139 Usage: configure [options] [host]
140 Options: [defaults in brackets after descriptions]
141 Configuration:
142   --cache-file=FILE       cache test results in FILE
143   --help                  print this message
144   --no-create             do not create output files
145   --quiet, --silent       do not print \`checking...' messages
146   --version               print the version of autoconf that created configure
147 Directory and file names:
148   --prefix=PREFIX         install architecture-independent files in PREFIX
149                           [$ac_default_prefix]
150   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
151                           [same as prefix]
152   --bindir=DIR            user executables in DIR [EPREFIX/bin]
153   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
154   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
155   --datadir=DIR           read-only architecture-independent data in DIR
156                           [PREFIX/share]
157   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
158   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
159                           [PREFIX/com]
160   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
161   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
162   --includedir=DIR        C header files in DIR [PREFIX/include]
163   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
164   --infodir=DIR           info documentation in DIR [PREFIX/info]
165   --mandir=DIR            man documentation in DIR [PREFIX/man]
166   --srcdir=DIR            find the sources in DIR [configure dir or ..]
167   --program-prefix=PREFIX prepend PREFIX to installed program names
168   --program-suffix=SUFFIX append SUFFIX to installed program names
169   --program-transform-name=PROGRAM
170                           run sed PROGRAM on installed program names
171 EOF
172     cat << EOF
173 Host type:
174   --build=BUILD           configure for building on BUILD [BUILD=HOST]
175   --host=HOST             configure for HOST [guessed]
176   --target=TARGET         configure for TARGET [TARGET=HOST]
177 Features and packages:
178   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
179   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
180   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
181   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
182   --x-includes=DIR        X include files are in DIR
183   --x-libraries=DIR       X library files are in DIR
184 EOF
185     if test -n "$ac_help"; then
186       echo "--enable and --with options recognized:$ac_help"
187     fi
188     exit 0 ;;
189
190   -host | --host | --hos | --ho)
191     ac_prev=host ;;
192   -host=* | --host=* | --hos=* | --ho=*)
193     host="$ac_optarg" ;;
194
195   -includedir | --includedir | --includedi | --included | --include \
196   | --includ | --inclu | --incl | --inc)
197     ac_prev=includedir ;;
198   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
199   | --includ=* | --inclu=* | --incl=* | --inc=*)
200     includedir="$ac_optarg" ;;
201
202   -infodir | --infodir | --infodi | --infod | --info | --inf)
203     ac_prev=infodir ;;
204   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
205     infodir="$ac_optarg" ;;
206
207   -libdir | --libdir | --libdi | --libd)
208     ac_prev=libdir ;;
209   -libdir=* | --libdir=* | --libdi=* | --libd=*)
210     libdir="$ac_optarg" ;;
211
212   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
213   | --libexe | --libex | --libe)
214     ac_prev=libexecdir ;;
215   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
216   | --libexe=* | --libex=* | --libe=*)
217     libexecdir="$ac_optarg" ;;
218
219   -localstatedir | --localstatedir | --localstatedi | --localstated \
220   | --localstate | --localstat | --localsta | --localst \
221   | --locals | --local | --loca | --loc | --lo)
222     ac_prev=localstatedir ;;
223   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
224   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
225   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
226     localstatedir="$ac_optarg" ;;
227
228   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
229     ac_prev=mandir ;;
230   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
231     mandir="$ac_optarg" ;;
232
233   -nfp | --nfp | --nf)
234     # Obsolete; use --without-fp.
235     with_fp=no ;;
236
237   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
238   | --no-cr | --no-c)
239     no_create=yes ;;
240
241   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
242   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
243     no_recursion=yes ;;
244
245   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
246   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
247   | --oldin | --oldi | --old | --ol | --o)
248     ac_prev=oldincludedir ;;
249   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
250   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
251   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
252     oldincludedir="$ac_optarg" ;;
253
254   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
255     ac_prev=prefix ;;
256   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
257     prefix="$ac_optarg" ;;
258
259   -program-prefix | --program-prefix | --program-prefi | --program-pref \
260   | --program-pre | --program-pr | --program-p)
261     ac_prev=program_prefix ;;
262   -program-prefix=* | --program-prefix=* | --program-prefi=* \
263   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
264     program_prefix="$ac_optarg" ;;
265
266   -program-suffix | --program-suffix | --program-suffi | --program-suff \
267   | --program-suf | --program-su | --program-s)
268     ac_prev=program_suffix ;;
269   -program-suffix=* | --program-suffix=* | --program-suffi=* \
270   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
271     program_suffix="$ac_optarg" ;;
272
273   -program-transform-name | --program-transform-name \
274   | --program-transform-nam | --program-transform-na \
275   | --program-transform-n | --program-transform- \
276   | --program-transform | --program-transfor \
277   | --program-transfo | --program-transf \
278   | --program-trans | --program-tran \
279   | --progr-tra | --program-tr | --program-t)
280     ac_prev=program_transform_name ;;
281   -program-transform-name=* | --program-transform-name=* \
282   | --program-transform-nam=* | --program-transform-na=* \
283   | --program-transform-n=* | --program-transform-=* \
284   | --program-transform=* | --program-transfor=* \
285   | --program-transfo=* | --program-transf=* \
286   | --program-trans=* | --program-tran=* \
287   | --progr-tra=* | --program-tr=* | --program-t=*)
288     program_transform_name="$ac_optarg" ;;
289
290   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
291   | -silent | --silent | --silen | --sile | --sil)
292     silent=yes ;;
293
294   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
295     ac_prev=sbindir ;;
296   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
297   | --sbi=* | --sb=*)
298     sbindir="$ac_optarg" ;;
299
300   -sharedstatedir | --sharedstatedir | --sharedstatedi \
301   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
302   | --sharedst | --shareds | --shared | --share | --shar \
303   | --sha | --sh)
304     ac_prev=sharedstatedir ;;
305   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
306   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
307   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
308   | --sha=* | --sh=*)
309     sharedstatedir="$ac_optarg" ;;
310
311   -site | --site | --sit)
312     ac_prev=site ;;
313   -site=* | --site=* | --sit=*)
314     site="$ac_optarg" ;;
315
316   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
317     ac_prev=srcdir ;;
318   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
319     srcdir="$ac_optarg" ;;
320
321   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
322   | --syscon | --sysco | --sysc | --sys | --sy)
323     ac_prev=sysconfdir ;;
324   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
325   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
326     sysconfdir="$ac_optarg" ;;
327
328   -target | --target | --targe | --targ | --tar | --ta | --t)
329     ac_prev=target ;;
330   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
331     target="$ac_optarg" ;;
332
333   -v | -verbose | --verbose | --verbos | --verbo | --verb)
334     verbose=yes ;;
335
336   -version | --version | --versio | --versi | --vers)
337     echo "configure generated by autoconf version 2.13"
338     exit 0 ;;
339
340   -with-* | --with-*)
341     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
342     # Reject names that are not valid shell variable names.
343     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
344       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345     fi
346     ac_package=`echo $ac_package| sed 's/-/_/g'`
347     case "$ac_option" in
348       *=*) ;;
349       *) ac_optarg=yes ;;
350     esac
351     eval "with_${ac_package}='$ac_optarg'" ;;
352
353   -without-* | --without-*)
354     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
355     # Reject names that are not valid shell variable names.
356     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
357       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358     fi
359     ac_package=`echo $ac_package| sed 's/-/_/g'`
360     eval "with_${ac_package}=no" ;;
361
362   --x)
363     # Obsolete; use --with-x.
364     with_x=yes ;;
365
366   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
367   | --x-incl | --x-inc | --x-in | --x-i)
368     ac_prev=x_includes ;;
369   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
370   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
371     x_includes="$ac_optarg" ;;
372
373   -x-libraries | --x-libraries | --x-librarie | --x-librari \
374   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
375     ac_prev=x_libraries ;;
376   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
377   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
378     x_libraries="$ac_optarg" ;;
379
380   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
381     ;;
382
383   *)
384     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
385       echo "configure: warning: $ac_option: invalid host type" 1>&2
386     fi
387     if test "x$nonopt" != xNONE; then
388       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
389     fi
390     nonopt="$ac_option"
391     ;;
392
393   esac
394 done
395
396 if test -n "$ac_prev"; then
397   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
398 fi
399
400 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401
402 # File descriptor usage:
403 # 0 standard input
404 # 1 file creation
405 # 2 errors and warnings
406 # 3 some systems may open it to /dev/tty
407 # 4 used on the Kubota Titan
408 # 6 checking for... messages and results
409 # 5 compiler messages saved in config.log
410 if test "$silent" = yes; then
411   exec 6>/dev/null
412 else
413   exec 6>&1
414 fi
415 exec 5>./config.log
416
417 echo "\
418 This file contains any messages produced by compilers while
419 running configure, to aid debugging if configure makes a mistake.
420 " 1>&5
421
422 # Strip out --no-create and --no-recursion so they do not pile up.
423 # Also quote any args containing shell metacharacters.
424 ac_configure_args=
425 for ac_arg
426 do
427   case "$ac_arg" in
428   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
429   | --no-cr | --no-c) ;;
430   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
431   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
432   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
433   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
434   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
435   esac
436 done
437
438 # NLS nuisances.
439 # Only set these to C if already set.  These must not be set unconditionally
440 # because not all systems understand e.g. LANG=C (notably SCO).
441 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
442 # Non-C LC_CTYPE values break the ctype check.
443 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
444 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
446 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
447
448 # confdefs.h avoids OS command line length limits that DEFS can exceed.
449 rm -rf conftest* confdefs.h
450 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
451 echo > confdefs.h
452
453 # A filename unique to this package, relative to the directory that
454 # configure is in, which we can look for to find out if srcdir is correct.
455 ac_unique_file=NGStream.m
456
457 # Find the source files, if location was not specified.
458 if test -z "$srcdir"; then
459   ac_srcdir_defaulted=yes
460   # Try the directory containing this script, then its parent.
461   ac_prog=$0
462   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
463   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
464   srcdir=$ac_confdir
465   if test ! -r $srcdir/$ac_unique_file; then
466     srcdir=..
467   fi
468 else
469   ac_srcdir_defaulted=no
470 fi
471 if test ! -r $srcdir/$ac_unique_file; then
472   if test "$ac_srcdir_defaulted" = yes; then
473     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
474   else
475     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
476   fi
477 fi
478 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
479
480 # Prefer explicitly selected file to automatically selected ones.
481 if test -z "$CONFIG_SITE"; then
482   if test "x$prefix" != xNONE; then
483     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
484   else
485     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
486   fi
487 fi
488 for ac_site_file in $CONFIG_SITE; do
489   if test -r "$ac_site_file"; then
490     echo "loading site script $ac_site_file"
491     . "$ac_site_file"
492   fi
493 done
494
495 if test -r "$cache_file"; then
496   echo "loading cache $cache_file"
497   . $cache_file
498 else
499   echo "creating cache $cache_file"
500   > $cache_file
501 fi
502
503 ac_ext=c
504 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
505 ac_cpp='$CPP $CPPFLAGS'
506 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
507 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
508 cross_compiling=$ac_cv_prog_cc_cross
509
510 ac_exeext=
511 ac_objext=o
512 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
513   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
514   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
515     ac_n= ac_c='
516 ' ac_t='        '
517   else
518     ac_n=-n ac_c= ac_t=
519   fi
520 else
521   ac_n= ac_c='\c' ac_t=
522 fi
523
524
525
526 # Determine the host, build, and target systems
527 CC_TARGET=$target # use --target value for CC, not the canonical form
528 ac_aux_dir=
529 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
530   if test -f $ac_dir/install-sh; then
531     ac_aux_dir=$ac_dir
532     ac_install_sh="$ac_aux_dir/install-sh -c"
533     break
534   elif test -f $ac_dir/install.sh; then
535     ac_aux_dir=$ac_dir
536     ac_install_sh="$ac_aux_dir/install.sh -c"
537     break
538   fi
539 done
540 if test -z "$ac_aux_dir"; then
541   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
542 fi
543 ac_config_guess=$ac_aux_dir/config.guess
544 ac_config_sub=$ac_aux_dir/config.sub
545 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
546
547
548 # Do some error checking and defaulting for the host and target type.
549 # The inputs are:
550 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
551 #
552 # The rules are:
553 # 1. You are not allowed to specify --host, --target, and nonopt at the
554 #    same time.
555 # 2. Host defaults to nonopt.
556 # 3. If nonopt is not specified, then host defaults to the current host,
557 #    as determined by config.guess.
558 # 4. Target and build default to nonopt.
559 # 5. If nonopt is not specified, then target and build default to host.
560
561 # The aliases save the names the user supplied, while $host etc.
562 # will get canonicalized.
563 case $host---$target---$nonopt in
564 NONE---*---* | *---NONE---* | *---*---NONE) ;;
565 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
566 esac
567
568
569 # Make sure we can run config.sub.
570 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
571 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
572 fi
573
574 echo $ac_n "checking host system type""... $ac_c" 1>&6
575 echo "configure:576: checking host system type" >&5
576
577 host_alias=$host
578 case "$host_alias" in
579 NONE)
580   case $nonopt in
581   NONE)
582     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
583     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
584     fi ;;
585   *) host_alias=$nonopt ;;
586   esac ;;
587 esac
588
589 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
590 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
591 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
592 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
593 echo "$ac_t""$host" 1>&6
594
595 echo $ac_n "checking target system type""... $ac_c" 1>&6
596 echo "configure:597: checking target system type" >&5
597
598 target_alias=$target
599 case "$target_alias" in
600 NONE)
601   case $nonopt in
602   NONE) target_alias=$host_alias ;;
603   *) target_alias=$nonopt ;;
604   esac ;;
605 esac
606
607 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
608 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
609 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
610 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
611 echo "$ac_t""$target" 1>&6
612
613 echo $ac_n "checking build system type""... $ac_c" 1>&6
614 echo "configure:615: checking build system type" >&5
615
616 build_alias=$build
617 case "$build_alias" in
618 NONE)
619   case $nonopt in
620   NONE) build_alias=$host_alias ;;
621   *) build_alias=$nonopt ;;
622   esac ;;
623 esac
624
625 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
626 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
627 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
628 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
629 echo "$ac_t""$build" 1>&6
630
631 test "$host_alias" != "$target_alias" &&
632   test "$program_prefix$program_suffix$program_transform_name" = \
633     NONENONEs,x,x, &&
634   program_prefix=${target_alias}-
635
636
637
638
639
640 # check for cross compilation
641
642 if test "x$target" = "xNONE"; then
643   set target $host
644 fi
645
646 if test "x$host" != "x$target"; then
647         cross_defines="CROSS=-DCROSS_COMPILE"
648         cross_compiling="yes"
649         echo "cross compiling from $host to $target .."
650 # Extract the first word of ""${CC_TARGET}-gcc"", so it can be a program name with args.
651 set dummy "${CC_TARGET}-gcc"; ac_word=$2
652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
653 echo "configure:654: checking for $ac_word" >&5
654 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
655   echo $ac_n "(cached) $ac_c" 1>&6
656 else
657   if test -n "$CC"; then
658   ac_cv_prog_CC="$CC" # Let the user override the test.
659 else
660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
661   ac_dummy="$PATH"
662   for ac_dir in $ac_dummy; do
663     test -z "$ac_dir" && ac_dir=.
664     if test -f $ac_dir/$ac_word; then
665       ac_cv_prog_CC=""${CC_TARGET}-gcc""
666       break
667     fi
668   done
669   IFS="$ac_save_ifs"
670   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
671 fi
672 fi
673 CC="$ac_cv_prog_CC"
674 if test -n "$CC"; then
675   echo "$ac_t""$CC" 1>&6
676 else
677   echo "$ac_t""no" 1>&6
678 fi
679
680 # Extract the first word of ""${CC_TARGET}-ranlib"", so it can be a program name with args.
681 set dummy "${CC_TARGET}-ranlib"; ac_word=$2
682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
683 echo "configure:684: checking for $ac_word" >&5
684 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
685   echo $ac_n "(cached) $ac_c" 1>&6
686 else
687   if test -n "$RANLIB"; then
688   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
689 else
690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
691   ac_dummy="$PATH"
692   for ac_dir in $ac_dummy; do
693     test -z "$ac_dir" && ac_dir=.
694     if test -f $ac_dir/$ac_word; then
695       ac_cv_prog_RANLIB=""${CC_TARGET}-ranlib""
696       break
697     fi
698   done
699   IFS="$ac_save_ifs"
700   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
701 fi
702 fi
703 RANLIB="$ac_cv_prog_RANLIB"
704 if test -n "$RANLIB"; then
705   echo "$ac_t""$RANLIB" 1>&6
706 else
707   echo "$ac_t""no" 1>&6
708 fi
709
710 # Extract the first word of ""${CC_TARGET}-ar"", so it can be a program name with args.
711 set dummy "${CC_TARGET}-ar"; ac_word=$2
712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
713 echo "configure:714: checking for $ac_word" >&5
714 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
715   echo $ac_n "(cached) $ac_c" 1>&6
716 else
717   if test -n "$AR"; then
718   ac_cv_prog_AR="$AR" # Let the user override the test.
719 else
720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
721   ac_dummy="$PATH"
722   for ac_dir in $ac_dummy; do
723     test -z "$ac_dir" && ac_dir=.
724     if test -f $ac_dir/$ac_word; then
725       ac_cv_prog_AR=""${CC_TARGET}-ar""
726       break
727     fi
728   done
729   IFS="$ac_save_ifs"
730   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
731 fi
732 fi
733 AR="$ac_cv_prog_AR"
734 if test -n "$AR"; then
735   echo "$ac_t""$AR" 1>&6
736 else
737   echo "$ac_t""no" 1>&6
738 fi
739
740 # Extract the first word of ""${CC_TARGET}-dlltool"", so it can be a program name with args.
741 set dummy "${CC_TARGET}-dlltool"; ac_word=$2
742 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
743 echo "configure:744: checking for $ac_word" >&5
744 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
745   echo $ac_n "(cached) $ac_c" 1>&6
746 else
747   if test -n "$DLLTOOL"; then
748   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
749 else
750   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
751   ac_dummy="$PATH"
752   for ac_dir in $ac_dummy; do
753     test -z "$ac_dir" && ac_dir=.
754     if test -f $ac_dir/$ac_word; then
755       ac_cv_prog_DLLTOOL=""${CC_TARGET}-dlltool""
756       break
757     fi
758   done
759   IFS="$ac_save_ifs"
760   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
761 fi
762 fi
763 DLLTOOL="$ac_cv_prog_DLLTOOL"
764 if test -n "$DLLTOOL"; then
765   echo "$ac_t""$DLLTOOL" 1>&6
766 else
767   echo "$ac_t""no" 1>&6
768 fi
769
770         CC=${CC_TARGET}-gcc
771         LD=${CC_TARGET}-ld
772         AR=${CC_TARGET}-ar
773         RANLIB=${CC_TARGET}-ranlib
774 else
775 # Extract the first word of ""gcc"", so it can be a program name with args.
776 set dummy "gcc"; ac_word=$2
777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
778 echo "configure:779: checking for $ac_word" >&5
779 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
780   echo $ac_n "(cached) $ac_c" 1>&6
781 else
782   if test -n "$CC"; then
783   ac_cv_prog_CC="$CC" # Let the user override the test.
784 else
785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
786   ac_dummy="$PATH"
787   for ac_dir in $ac_dummy; do
788     test -z "$ac_dir" && ac_dir=.
789     if test -f $ac_dir/$ac_word; then
790       ac_cv_prog_CC=""gcc""
791       break
792     fi
793   done
794   IFS="$ac_save_ifs"
795   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
796 fi
797 fi
798 CC="$ac_cv_prog_CC"
799 if test -n "$CC"; then
800   echo "$ac_t""$CC" 1>&6
801 else
802   echo "$ac_t""no" 1>&6
803 fi
804
805 # Extract the first word of ""ranlib"", so it can be a program name with args.
806 set dummy "ranlib"; ac_word=$2
807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
808 echo "configure:809: checking for $ac_word" >&5
809 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
810   echo $ac_n "(cached) $ac_c" 1>&6
811 else
812   if test -n "$RANLIB"; then
813   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
814 else
815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
816   ac_dummy="$PATH"
817   for ac_dir in $ac_dummy; do
818     test -z "$ac_dir" && ac_dir=.
819     if test -f $ac_dir/$ac_word; then
820       ac_cv_prog_RANLIB=""ranlib""
821       break
822     fi
823   done
824   IFS="$ac_save_ifs"
825   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
826 fi
827 fi
828 RANLIB="$ac_cv_prog_RANLIB"
829 if test -n "$RANLIB"; then
830   echo "$ac_t""$RANLIB" 1>&6
831 else
832   echo "$ac_t""no" 1>&6
833 fi
834
835 # Extract the first word of ""ar"", so it can be a program name with args.
836 set dummy "ar"; ac_word=$2
837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
838 echo "configure:839: checking for $ac_word" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   if test -n "$AR"; then
843   ac_cv_prog_AR="$AR" # Let the user override the test.
844 else
845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
846   ac_dummy="$PATH"
847   for ac_dir in $ac_dummy; do
848     test -z "$ac_dir" && ac_dir=.
849     if test -f $ac_dir/$ac_word; then
850       ac_cv_prog_AR=""ar""
851       break
852     fi
853   done
854   IFS="$ac_save_ifs"
855   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
856 fi
857 fi
858 AR="$ac_cv_prog_AR"
859 if test -n "$AR"; then
860   echo "$ac_t""$AR" 1>&6
861 else
862   echo "$ac_t""no" 1>&6
863 fi
864
865 # Extract the first word of ""dlltool"", so it can be a program name with args.
866 set dummy "dlltool"; ac_word=$2
867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
868 echo "configure:869: checking for $ac_word" >&5
869 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
870   echo $ac_n "(cached) $ac_c" 1>&6
871 else
872   if test -n "$DLLTOOL"; then
873   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
874 else
875   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
876   ac_dummy="$PATH"
877   for ac_dir in $ac_dummy; do
878     test -z "$ac_dir" && ac_dir=.
879     if test -f $ac_dir/$ac_word; then
880       ac_cv_prog_DLLTOOL=""dlltool""
881       break
882     fi
883   done
884   IFS="$ac_save_ifs"
885   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
886 fi
887 fi
888 DLLTOOL="$ac_cv_prog_DLLTOOL"
889 if test -n "$DLLTOOL"; then
890   echo "$ac_t""$DLLTOOL" 1>&6
891 else
892   echo "$ac_t""no" 1>&6
893 fi
894
895 fi
896
897 case "${host_cpu}" in
898     i[45]86*)   host_cpu=i386;;
899     hppa1.1)    host_cpu=hppa;;
900 esac
901 if test "x$cross_compiling" = "xyes"; then
902   case "${target_cpu}" in
903     i[45]86*)   target_cpu=i386;;
904     hppa1.1)    target_cpu=hppa;;
905   esac
906 else
907   target_cpu=${host_cpu}
908   target_os=${host_os}
909   target_vendor=${host_vendor}
910 fi
911 case "x${target_os}" in
912   xfreebsd*) target_os=freebsd;;
913 esac
914
915 # Assign the HOST variables for sharedlib.mak
916 HOST=$host
917 HOST_CPU=$host_cpu
918 HOST_VENDOR=$host_vendor
919 HOST_OS=$host_os
920 TARGET=$target
921 TARGET_CPU=$target_cpu
922 TARGET_VENDOR=$target_vendor
923 TARGET_OS=$target_os
924
925 echo $ac_n "checking for chown in -lnsl""... $ac_c" 1>&6
926 echo "configure:927: checking for chown in -lnsl" >&5
927 ac_lib_var=`echo nsl'_'chown | sed 'y%./+-%__p_%'`
928 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
929   echo $ac_n "(cached) $ac_c" 1>&6
930 else
931   ac_save_LIBS="$LIBS"
932 LIBS="-lnsl  $LIBS"
933 cat > conftest.$ac_ext <<EOF
934 #line 935 "configure"
935 #include "confdefs.h"
936 /* Override any gcc2 internal prototype to avoid an error.  */
937 /* We use char because int might match the return type of a gcc2
938     builtin and then its argument prototype would still apply.  */
939 char chown();
940
941 int main() {
942 chown()
943 ; return 0; }
944 EOF
945 if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
946   rm -rf conftest*
947   eval "ac_cv_lib_$ac_lib_var=yes"
948 else
949   echo "configure: failed program was:" >&5
950   cat conftest.$ac_ext >&5
951   rm -rf conftest*
952   eval "ac_cv_lib_$ac_lib_var=no"
953 fi
954 rm -f conftest*
955 LIBS="$ac_save_LIBS"
956
957 fi
958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
959   echo "$ac_t""yes" 1>&6
960     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
961     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
962   cat >> confdefs.h <<EOF
963 #define $ac_tr_lib 1
964 EOF
965
966   LIBS="-lnsl $LIBS"
967
968 else
969   echo "$ac_t""no" 1>&6
970 fi
971
972 echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
973 echo "configure:974: checking for accept in -lsocket" >&5
974 ac_lib_var=`echo socket'_'accept | sed 'y%./+-%__p_%'`
975 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
976   echo $ac_n "(cached) $ac_c" 1>&6
977 else
978   ac_save_LIBS="$LIBS"
979 LIBS="-lsocket  $LIBS"
980 cat > conftest.$ac_ext <<EOF
981 #line 982 "configure"
982 #include "confdefs.h"
983 /* Override any gcc2 internal prototype to avoid an error.  */
984 /* We use char because int might match the return type of a gcc2
985     builtin and then its argument prototype would still apply.  */
986 char accept();
987
988 int main() {
989 accept()
990 ; return 0; }
991 EOF
992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
993   rm -rf conftest*
994   eval "ac_cv_lib_$ac_lib_var=yes"
995 else
996   echo "configure: failed program was:" >&5
997   cat conftest.$ac_ext >&5
998   rm -rf conftest*
999   eval "ac_cv_lib_$ac_lib_var=no"
1000 fi
1001 rm -f conftest*
1002 LIBS="$ac_save_LIBS"
1003
1004 fi
1005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1006   echo "$ac_t""yes" 1>&6
1007     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1008     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1009   cat >> confdefs.h <<EOF
1010 #define $ac_tr_lib 1
1011 EOF
1012
1013   LIBS="-lsocket $LIBS"
1014
1015 else
1016   echo "$ac_t""no" 1>&6
1017 fi
1018
1019 echo $ac_n "checking for  in -lwsock32""... $ac_c" 1>&6
1020 echo "configure:1021: checking for  in -lwsock32" >&5
1021 ac_lib_var=`echo wsock32'_' | sed 'y%./+-%__p_%'`
1022 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1023   echo $ac_n "(cached) $ac_c" 1>&6
1024 else
1025   ac_save_LIBS="$LIBS"
1026 LIBS="-lwsock32  $LIBS"
1027 cat > conftest.$ac_ext <<EOF
1028 #line 1029 "configure"
1029 #include "confdefs.h"
1030 /* Override any gcc2 internal prototype to avoid an error.  */
1031 /* We use char because int might match the return type of a gcc2
1032     builtin and then its argument prototype would still apply.  */
1033 char ();
1034
1035 int main() {
1036 ()
1037 ; return 0; }
1038 EOF
1039 if { (eval echo configure:1040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1040   rm -rf conftest*
1041   eval "ac_cv_lib_$ac_lib_var=yes"
1042 else
1043   echo "configure: failed program was:" >&5
1044   cat conftest.$ac_ext >&5
1045   rm -rf conftest*
1046   eval "ac_cv_lib_$ac_lib_var=no"
1047 fi
1048 rm -f conftest*
1049 LIBS="$ac_save_LIBS"
1050
1051 fi
1052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1053   echo "$ac_t""yes" 1>&6
1054     ac_tr_lib=HAVE_LIB`echo wsock32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1055     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1056   cat >> confdefs.h <<EOF
1057 #define $ac_tr_lib 1
1058 EOF
1059
1060   LIBS="-lwsock32 $LIBS"
1061
1062 else
1063   echo "$ac_t""no" 1>&6
1064 fi
1065
1066 echo $ac_n "checking for  in -ladvapi32""... $ac_c" 1>&6
1067 echo "configure:1068: checking for  in -ladvapi32" >&5
1068 ac_lib_var=`echo advapi32'_' | sed 'y%./+-%__p_%'`
1069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1070   echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072   ac_save_LIBS="$LIBS"
1073 LIBS="-ladvapi32  $LIBS"
1074 cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 /* Override any gcc2 internal prototype to avoid an error.  */
1078 /* We use char because int might match the return type of a gcc2
1079     builtin and then its argument prototype would still apply.  */
1080 char ();
1081
1082 int main() {
1083 ()
1084 ; return 0; }
1085 EOF
1086 if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1087   rm -rf conftest*
1088   eval "ac_cv_lib_$ac_lib_var=yes"
1089 else
1090   echo "configure: failed program was:" >&5
1091   cat conftest.$ac_ext >&5
1092   rm -rf conftest*
1093   eval "ac_cv_lib_$ac_lib_var=no"
1094 fi
1095 rm -f conftest*
1096 LIBS="$ac_save_LIBS"
1097
1098 fi
1099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1100   echo "$ac_t""yes" 1>&6
1101     ac_tr_lib=HAVE_LIB`echo advapi32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1102     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1103   cat >> confdefs.h <<EOF
1104 #define $ac_tr_lib 1
1105 EOF
1106
1107   LIBS="-ladvapi32 $LIBS"
1108
1109 else
1110   echo "$ac_t""no" 1>&6
1111 fi
1112
1113
1114 transformed_target_cpu=`${GNUSTEP_MAKEFILES}/clean_cpu.sh ${TARGET_CPU}`
1115 ac_cv_file_output_prefix=${transformed_target_cpu}/${TARGET_OS}
1116
1117 ac_header_dirent=no
1118 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1119 do
1120 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1121 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1122 echo "configure:1123: checking for $ac_hdr that defines DIR" >&5
1123 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1124   echo $ac_n "(cached) $ac_c" 1>&6
1125 else
1126   cat > conftest.$ac_ext <<EOF
1127 #line 1128 "configure"
1128 #include "confdefs.h"
1129 #include <sys/types.h>
1130 #include <$ac_hdr>
1131 int main() {
1132 DIR *dirp = 0;
1133 ; return 0; }
1134 EOF
1135 if { (eval echo configure:1136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1136   rm -rf conftest*
1137   eval "ac_cv_header_dirent_$ac_safe=yes"
1138 else
1139   echo "configure: failed program was:" >&5
1140   cat conftest.$ac_ext >&5
1141   rm -rf conftest*
1142   eval "ac_cv_header_dirent_$ac_safe=no"
1143 fi
1144 rm -f conftest*
1145 fi
1146 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1147   echo "$ac_t""yes" 1>&6
1148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1149   cat >> confdefs.h <<EOF
1150 #define $ac_tr_hdr 1
1151 EOF
1152  ac_header_dirent=$ac_hdr; break
1153 else
1154   echo "$ac_t""no" 1>&6
1155 fi
1156 done
1157 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1158 if test $ac_header_dirent = dirent.h; then
1159 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1160 echo "configure:1161: checking for opendir in -ldir" >&5
1161 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1162 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   ac_save_LIBS="$LIBS"
1166 LIBS="-ldir  $LIBS"
1167 cat > conftest.$ac_ext <<EOF
1168 #line 1169 "configure"
1169 #include "confdefs.h"
1170 /* Override any gcc2 internal prototype to avoid an error.  */
1171 /* We use char because int might match the return type of a gcc2
1172     builtin and then its argument prototype would still apply.  */
1173 char opendir();
1174
1175 int main() {
1176 opendir()
1177 ; return 0; }
1178 EOF
1179 if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1180   rm -rf conftest*
1181   eval "ac_cv_lib_$ac_lib_var=yes"
1182 else
1183   echo "configure: failed program was:" >&5
1184   cat conftest.$ac_ext >&5
1185   rm -rf conftest*
1186   eval "ac_cv_lib_$ac_lib_var=no"
1187 fi
1188 rm -f conftest*
1189 LIBS="$ac_save_LIBS"
1190
1191 fi
1192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1193   echo "$ac_t""yes" 1>&6
1194   LIBS="$LIBS -ldir"
1195 else
1196   echo "$ac_t""no" 1>&6
1197 fi
1198
1199 else
1200 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1201 echo "configure:1202: checking for opendir in -lx" >&5
1202 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1204   echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206   ac_save_LIBS="$LIBS"
1207 LIBS="-lx  $LIBS"
1208 cat > conftest.$ac_ext <<EOF
1209 #line 1210 "configure"
1210 #include "confdefs.h"
1211 /* Override any gcc2 internal prototype to avoid an error.  */
1212 /* We use char because int might match the return type of a gcc2
1213     builtin and then its argument prototype would still apply.  */
1214 char opendir();
1215
1216 int main() {
1217 opendir()
1218 ; return 0; }
1219 EOF
1220 if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1221   rm -rf conftest*
1222   eval "ac_cv_lib_$ac_lib_var=yes"
1223 else
1224   echo "configure: failed program was:" >&5
1225   cat conftest.$ac_ext >&5
1226   rm -rf conftest*
1227   eval "ac_cv_lib_$ac_lib_var=no"
1228 fi
1229 rm -f conftest*
1230 LIBS="$ac_save_LIBS"
1231
1232 fi
1233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1234   echo "$ac_t""yes" 1>&6
1235   LIBS="$LIBS -lx"
1236 else
1237   echo "$ac_t""no" 1>&6
1238 fi
1239
1240 fi
1241
1242 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1243 echo "configure:1244: checking how to run the C preprocessor" >&5
1244 # On Suns, sometimes $CPP names a directory.
1245 if test -n "$CPP" && test -d "$CPP"; then
1246   CPP=
1247 fi
1248 if test -z "$CPP"; then
1249 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1250   echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252     # This must be in double quotes, not single quotes, because CPP may get
1253   # substituted into the Makefile and "${CC-cc}" will confuse make.
1254   CPP="${CC-cc} -E"
1255   # On the NeXT, cc -E runs the code through the compiler's parser,
1256   # not just through cpp.
1257   cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 #include <assert.h>
1261 Syntax Error
1262 EOF
1263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1264 { (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1266 if test -z "$ac_err"; then
1267   :
1268 else
1269   echo "$ac_err" >&5
1270   echo "configure: failed program was:" >&5
1271   cat conftest.$ac_ext >&5
1272   rm -rf conftest*
1273   CPP="${CC-cc} -E -traditional-cpp"
1274   cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
1277 #include <assert.h>
1278 Syntax Error
1279 EOF
1280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1281 { (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1283 if test -z "$ac_err"; then
1284   :
1285 else
1286   echo "$ac_err" >&5
1287   echo "configure: failed program was:" >&5
1288   cat conftest.$ac_ext >&5
1289   rm -rf conftest*
1290   CPP="${CC-cc} -nologo -E"
1291   cat > conftest.$ac_ext <<EOF
1292 #line 1293 "configure"
1293 #include "confdefs.h"
1294 #include <assert.h>
1295 Syntax Error
1296 EOF
1297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1298 { (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1300 if test -z "$ac_err"; then
1301   :
1302 else
1303   echo "$ac_err" >&5
1304   echo "configure: failed program was:" >&5
1305   cat conftest.$ac_ext >&5
1306   rm -rf conftest*
1307   CPP=/lib/cpp
1308 fi
1309 rm -f conftest*
1310 fi
1311 rm -f conftest*
1312 fi
1313 rm -f conftest*
1314   ac_cv_prog_CPP="$CPP"
1315 fi
1316   CPP="$ac_cv_prog_CPP"
1317 else
1318   ac_cv_prog_CPP="$CPP"
1319 fi
1320 echo "$ac_t""$CPP" 1>&6
1321
1322 for ac_hdr in dir.h libc.h time.h stdlib.h memory.h string.h            strings.h sys/stat.h sys/fcntl.h fcntl.h                 sys/vfs.h sys/statfs.h sys/statvfs.h           netinet/in.h windows.h winsock.h sys/socket.h           Windows32/Sockets.h pwd.h process.h grp.h sys/param.h           sys/file.h sys/errno.h sys/select.h sys/poll.h poll.h                 sys/time.h sys/types.h                 sys/ioctl.h sys/filio.h                 netdb.h unistd.h unistd.h limits.h
1323 do
1324 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1325 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1326 echo "configure:1327: checking for $ac_hdr" >&5
1327 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1328   echo $ac_n "(cached) $ac_c" 1>&6
1329 else
1330   cat > conftest.$ac_ext <<EOF
1331 #line 1332 "configure"
1332 #include "confdefs.h"
1333 #include <$ac_hdr>
1334 EOF
1335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1336 { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1338 if test -z "$ac_err"; then
1339   rm -rf conftest*
1340   eval "ac_cv_header_$ac_safe=yes"
1341 else
1342   echo "$ac_err" >&5
1343   echo "configure: failed program was:" >&5
1344   cat conftest.$ac_ext >&5
1345   rm -rf conftest*
1346   eval "ac_cv_header_$ac_safe=no"
1347 fi
1348 rm -f conftest*
1349 fi
1350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1351   echo "$ac_t""yes" 1>&6
1352     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1353   cat >> confdefs.h <<EOF
1354 #define $ac_tr_hdr 1
1355 EOF
1356  
1357 else
1358   echo "$ac_t""no" 1>&6
1359 fi
1360 done
1361
1362 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1363 echo "configure:1364: checking for sys/wait.h that is POSIX.1 compatible" >&5
1364 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1365   echo $ac_n "(cached) $ac_c" 1>&6
1366 else
1367   cat > conftest.$ac_ext <<EOF
1368 #line 1369 "configure"
1369 #include "confdefs.h"
1370 #include <sys/types.h>
1371 #include <sys/wait.h>
1372 #ifndef WEXITSTATUS
1373 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1374 #endif
1375 #ifndef WIFEXITED
1376 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1377 #endif
1378 int main() {
1379 int s;
1380 wait (&s);
1381 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1382 ; return 0; }
1383 EOF
1384 if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1385   rm -rf conftest*
1386   ac_cv_header_sys_wait_h=yes
1387 else
1388   echo "configure: failed program was:" >&5
1389   cat conftest.$ac_ext >&5
1390   rm -rf conftest*
1391   ac_cv_header_sys_wait_h=no
1392 fi
1393 rm -f conftest*
1394 fi
1395
1396 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1397 if test $ac_cv_header_sys_wait_h = yes; then
1398   cat >> confdefs.h <<\EOF
1399 #define HAVE_SYS_WAIT_H 1
1400 EOF
1401
1402 fi
1403
1404
1405 for ac_func in memcpy getcwd kill poll isatty ttyname ttyname_r                gethostbyname_r gethostbyaddr_r gethostent_r
1406 do
1407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1408 echo "configure:1409: checking for $ac_func" >&5
1409 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1410   echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412   cat > conftest.$ac_ext <<EOF
1413 #line 1414 "configure"
1414 #include "confdefs.h"
1415 /* System header to define __stub macros and hopefully few prototypes,
1416     which can conflict with char $ac_func(); below.  */
1417 #include <assert.h>
1418 /* Override any gcc2 internal prototype to avoid an error.  */
1419 /* We use char because int might match the return type of a gcc2
1420     builtin and then its argument prototype would still apply.  */
1421 char $ac_func();
1422
1423 int main() {
1424
1425 /* The GNU C library defines this for functions which it implements
1426     to always fail with ENOSYS.  Some functions are actually named
1427     something starting with __ and the normal name is an alias.  */
1428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1429 choke me
1430 #else
1431 $ac_func();
1432 #endif
1433
1434 ; return 0; }
1435 EOF
1436 if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1437   rm -rf conftest*
1438   eval "ac_cv_func_$ac_func=yes"
1439 else
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442   rm -rf conftest*
1443   eval "ac_cv_func_$ac_func=no"
1444 fi
1445 rm -f conftest*
1446 fi
1447
1448 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1449   echo "$ac_t""yes" 1>&6
1450     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1451   cat >> confdefs.h <<EOF
1452 #define $ac_tr_func 1
1453 EOF
1454  
1455 else
1456   echo "$ac_t""no" 1>&6
1457 fi
1458 done
1459
1460 for ac_hdr in unistd.h
1461 do
1462 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1463 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1464 echo "configure:1465: checking for $ac_hdr" >&5
1465 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1466   echo $ac_n "(cached) $ac_c" 1>&6
1467 else
1468   cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1471 #include <$ac_hdr>
1472 EOF
1473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1474 { (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1476 if test -z "$ac_err"; then
1477   rm -rf conftest*
1478   eval "ac_cv_header_$ac_safe=yes"
1479 else
1480   echo "$ac_err" >&5
1481   echo "configure: failed program was:" >&5
1482   cat conftest.$ac_ext >&5
1483   rm -rf conftest*
1484   eval "ac_cv_header_$ac_safe=no"
1485 fi
1486 rm -f conftest*
1487 fi
1488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1489   echo "$ac_t""yes" 1>&6
1490     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1491   cat >> confdefs.h <<EOF
1492 #define $ac_tr_hdr 1
1493 EOF
1494  
1495 else
1496   echo "$ac_t""no" 1>&6
1497 fi
1498 done
1499
1500 for ac_func in getpagesize
1501 do
1502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1503 echo "configure:1504: checking for $ac_func" >&5
1504 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1505   echo $ac_n "(cached) $ac_c" 1>&6
1506 else
1507   cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1510 /* System header to define __stub macros and hopefully few prototypes,
1511     which can conflict with char $ac_func(); below.  */
1512 #include <assert.h>
1513 /* Override any gcc2 internal prototype to avoid an error.  */
1514 /* We use char because int might match the return type of a gcc2
1515     builtin and then its argument prototype would still apply.  */
1516 char $ac_func();
1517
1518 int main() {
1519
1520 /* The GNU C library defines this for functions which it implements
1521     to always fail with ENOSYS.  Some functions are actually named
1522     something starting with __ and the normal name is an alias.  */
1523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1524 choke me
1525 #else
1526 $ac_func();
1527 #endif
1528
1529 ; return 0; }
1530 EOF
1531 if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1532   rm -rf conftest*
1533   eval "ac_cv_func_$ac_func=yes"
1534 else
1535   echo "configure: failed program was:" >&5
1536   cat conftest.$ac_ext >&5
1537   rm -rf conftest*
1538   eval "ac_cv_func_$ac_func=no"
1539 fi
1540 rm -f conftest*
1541 fi
1542
1543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1544   echo "$ac_t""yes" 1>&6
1545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1546   cat >> confdefs.h <<EOF
1547 #define $ac_tr_func 1
1548 EOF
1549  
1550 else
1551   echo "$ac_t""no" 1>&6
1552 fi
1553 done
1554
1555 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1556 echo "configure:1557: checking for working mmap" >&5
1557 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1558   echo $ac_n "(cached) $ac_c" 1>&6
1559 else
1560   if test "$cross_compiling" = yes; then
1561   ac_cv_func_mmap_fixed_mapped=no
1562 else
1563   cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
1566
1567 /* Thanks to Mike Haertel and Jim Avera for this test.
1568    Here is a matrix of mmap possibilities:
1569         mmap private not fixed
1570         mmap private fixed at somewhere currently unmapped
1571         mmap private fixed at somewhere already mapped
1572         mmap shared not fixed
1573         mmap shared fixed at somewhere currently unmapped
1574         mmap shared fixed at somewhere already mapped
1575    For private mappings, we should verify that changes cannot be read()
1576    back from the file, nor mmap's back from the file at a different
1577    address.  (There have been systems where private was not correctly
1578    implemented like the infamous i386 svr4.0, and systems where the
1579    VM page cache was not coherent with the filesystem buffer cache
1580    like early versions of FreeBSD and possibly contemporary NetBSD.)
1581    For shared mappings, we should conversely verify that changes get
1582    propogated back to all the places they're supposed to be.
1583
1584    Grep wants private fixed already mapped.
1585    The main things grep needs to know about mmap are:
1586    * does it exist and is it safe to write into the mmap'd area
1587    * how to use it (BSD variants)  */
1588 #include <sys/types.h>
1589 #include <fcntl.h>
1590 #include <sys/mman.h>
1591
1592 /* This mess was copied from the GNU getpagesize.h.  */
1593 #ifndef HAVE_GETPAGESIZE
1594 # ifdef HAVE_UNISTD_H
1595 #  include <unistd.h>
1596 # endif
1597
1598 /* Assume that all systems that can run configure have sys/param.h.  */
1599 # ifndef HAVE_SYS_PARAM_H
1600 #  define HAVE_SYS_PARAM_H 1
1601 # endif
1602
1603 # ifdef _SC_PAGESIZE
1604 #  define getpagesize() sysconf(_SC_PAGESIZE)
1605 # else /* no _SC_PAGESIZE */
1606 #  ifdef HAVE_SYS_PARAM_H
1607 #   include <sys/param.h>
1608 #   ifdef EXEC_PAGESIZE
1609 #    define getpagesize() EXEC_PAGESIZE
1610 #   else /* no EXEC_PAGESIZE */
1611 #    ifdef NBPG
1612 #     define getpagesize() NBPG * CLSIZE
1613 #     ifndef CLSIZE
1614 #      define CLSIZE 1
1615 #     endif /* no CLSIZE */
1616 #    else /* no NBPG */
1617 #     ifdef NBPC
1618 #      define getpagesize() NBPC
1619 #     else /* no NBPC */
1620 #      ifdef PAGESIZE
1621 #       define getpagesize() PAGESIZE
1622 #      endif /* PAGESIZE */
1623 #     endif /* no NBPC */
1624 #    endif /* no NBPG */
1625 #   endif /* no EXEC_PAGESIZE */
1626 #  else /* no HAVE_SYS_PARAM_H */
1627 #   define getpagesize() 8192   /* punt totally */
1628 #  endif /* no HAVE_SYS_PARAM_H */
1629 # endif /* no _SC_PAGESIZE */
1630
1631 #endif /* no HAVE_GETPAGESIZE */
1632
1633 #ifdef __cplusplus
1634 extern "C" { void *malloc(unsigned); }
1635 #else
1636 char *malloc();
1637 #endif
1638
1639 int
1640 main()
1641 {
1642         char *data, *data2, *data3;
1643         int i, pagesize;
1644         int fd;
1645
1646         pagesize = getpagesize();
1647
1648         /*
1649          * First, make a file with some known garbage in it.
1650          */
1651         data = malloc(pagesize);
1652         if (!data)
1653                 exit(1);
1654         for (i = 0; i < pagesize; ++i)
1655                 *(data + i) = rand();
1656         umask(0);
1657         fd = creat("conftestmmap", 0600);
1658         if (fd < 0)
1659                 exit(1);
1660         if (write(fd, data, pagesize) != pagesize)
1661                 exit(1);
1662         close(fd);
1663
1664         /*
1665          * Next, try to mmap the file at a fixed address which
1666          * already has something else allocated at it.  If we can,
1667          * also make sure that we see the same garbage.
1668          */
1669         fd = open("conftestmmap", O_RDWR);
1670         if (fd < 0)
1671                 exit(1);
1672         data2 = malloc(2 * pagesize);
1673         if (!data2)
1674                 exit(1);
1675         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1676         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1677             MAP_PRIVATE | MAP_FIXED, fd, 0L))
1678                 exit(1);
1679         for (i = 0; i < pagesize; ++i)
1680                 if (*(data + i) != *(data2 + i))
1681                         exit(1);
1682
1683         /*
1684          * Finally, make sure that changes to the mapped area
1685          * do not percolate back to the file as seen by read().
1686          * (This is a bug on some variants of i386 svr4.0.)
1687          */
1688         for (i = 0; i < pagesize; ++i)
1689                 *(data2 + i) = *(data2 + i) + 1;
1690         data3 = malloc(pagesize);
1691         if (!data3)
1692                 exit(1);
1693         if (read(fd, data3, pagesize) != pagesize)
1694                 exit(1);
1695         for (i = 0; i < pagesize; ++i)
1696                 if (*(data + i) != *(data3 + i))
1697                         exit(1);
1698         close(fd);
1699         unlink("conftestmmap");
1700         exit(0);
1701 }
1702
1703 EOF
1704 if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1705 then
1706   ac_cv_func_mmap_fixed_mapped=yes
1707 else
1708   echo "configure: failed program was:" >&5
1709   cat conftest.$ac_ext >&5
1710   rm -fr conftest*
1711   ac_cv_func_mmap_fixed_mapped=no
1712 fi
1713 rm -fr conftest*
1714 fi
1715
1716 fi
1717
1718 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1719 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1720   cat >> confdefs.h <<\EOF
1721 #define HAVE_MMAP 1
1722 EOF
1723
1724 fi
1725
1726 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1727 echo "configure:1728: checking for ANSI C header files" >&5
1728 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1729   echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731   cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #include <stdlib.h>
1735 #include <stdarg.h>
1736 #include <string.h>
1737 #include <float.h>
1738 EOF
1739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1740 { (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1742 if test -z "$ac_err"; then
1743   rm -rf conftest*
1744   ac_cv_header_stdc=yes
1745 else
1746   echo "$ac_err" >&5
1747   echo "configure: failed program was:" >&5
1748   cat conftest.$ac_ext >&5
1749   rm -rf conftest*
1750   ac_cv_header_stdc=no
1751 fi
1752 rm -f conftest*
1753
1754 if test $ac_cv_header_stdc = yes; then
1755   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 #include <string.h>
1760 EOF
1761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1762   egrep "memchr" >/dev/null 2>&1; then
1763   :
1764 else
1765   rm -rf conftest*
1766   ac_cv_header_stdc=no
1767 fi
1768 rm -f conftest*
1769
1770 fi
1771
1772 if test $ac_cv_header_stdc = yes; then
1773   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1774 cat > conftest.$ac_ext <<EOF
1775 #line 1776 "configure"
1776 #include "confdefs.h"
1777 #include <stdlib.h>
1778 EOF
1779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1780   egrep "free" >/dev/null 2>&1; then
1781   :
1782 else
1783   rm -rf conftest*
1784   ac_cv_header_stdc=no
1785 fi
1786 rm -f conftest*
1787
1788 fi
1789
1790 if test $ac_cv_header_stdc = yes; then
1791   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1792 if test "$cross_compiling" = yes; then
1793   :
1794 else
1795   cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 #include <ctype.h>
1799 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1800 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1801 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1802 int main () { int i; for (i = 0; i < 256; i++)
1803 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1804 exit (0); }
1805
1806 EOF
1807 if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1808 then
1809   :
1810 else
1811   echo "configure: failed program was:" >&5
1812   cat conftest.$ac_ext >&5
1813   rm -fr conftest*
1814   ac_cv_header_stdc=no
1815 fi
1816 rm -fr conftest*
1817 fi
1818
1819 fi
1820 fi
1821
1822 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1823 if test $ac_cv_header_stdc = yes; then
1824   cat >> confdefs.h <<\EOF
1825 #define STDC_HEADERS 1
1826 EOF
1827
1828 fi
1829
1830 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1831 echo "configure:1832: checking for pid_t" >&5
1832 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1833   echo $ac_n "(cached) $ac_c" 1>&6
1834 else
1835   cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <sys/types.h>
1839 #if STDC_HEADERS
1840 #include <stdlib.h>
1841 #include <stddef.h>
1842 #endif
1843 EOF
1844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1845   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1846   rm -rf conftest*
1847   ac_cv_type_pid_t=yes
1848 else
1849   rm -rf conftest*
1850   ac_cv_type_pid_t=no
1851 fi
1852 rm -f conftest*
1853
1854 fi
1855 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1856 if test $ac_cv_type_pid_t = no; then
1857   cat >> confdefs.h <<\EOF
1858 #define pid_t int
1859 EOF
1860
1861 fi
1862
1863 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
1864 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1865 echo "configure:1866: checking for vfork.h" >&5
1866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1867   echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869   cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 #include <vfork.h>
1873 EOF
1874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1875 { (eval echo configure:1876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1877 if test -z "$ac_err"; then
1878   rm -rf conftest*
1879   eval "ac_cv_header_$ac_safe=yes"
1880 else
1881   echo "$ac_err" >&5
1882   echo "configure: failed program was:" >&5
1883   cat conftest.$ac_ext >&5
1884   rm -rf conftest*
1885   eval "ac_cv_header_$ac_safe=no"
1886 fi
1887 rm -f conftest*
1888 fi
1889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1890   echo "$ac_t""yes" 1>&6
1891   cat >> confdefs.h <<\EOF
1892 #define HAVE_VFORK_H 1
1893 EOF
1894
1895 else
1896   echo "$ac_t""no" 1>&6
1897 fi
1898
1899 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1900 echo "configure:1901: checking for working vfork" >&5
1901 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
1902   echo $ac_n "(cached) $ac_c" 1>&6
1903 else
1904   if test "$cross_compiling" = yes; then
1905   echo $ac_n "checking for vfork""... $ac_c" 1>&6
1906 echo "configure:1907: checking for vfork" >&5
1907 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1908   echo $ac_n "(cached) $ac_c" 1>&6
1909 else
1910   cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 /* System header to define __stub macros and hopefully few prototypes,
1914     which can conflict with char vfork(); below.  */
1915 #include <assert.h>
1916 /* Override any gcc2 internal prototype to avoid an error.  */
1917 /* We use char because int might match the return type of a gcc2
1918     builtin and then its argument prototype would still apply.  */
1919 char vfork();
1920
1921 int main() {
1922
1923 /* The GNU C library defines this for functions which it implements
1924     to always fail with ENOSYS.  Some functions are actually named
1925     something starting with __ and the normal name is an alias.  */
1926 #if defined (__stub_vfork) || defined (__stub___vfork)
1927 choke me
1928 #else
1929 vfork();
1930 #endif
1931
1932 ; return 0; }
1933 EOF
1934 if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1935   rm -rf conftest*
1936   eval "ac_cv_func_vfork=yes"
1937 else
1938   echo "configure: failed program was:" >&5
1939   cat conftest.$ac_ext >&5
1940   rm -rf conftest*
1941   eval "ac_cv_func_vfork=no"
1942 fi
1943 rm -f conftest*
1944 fi
1945
1946 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1947   echo "$ac_t""yes" 1>&6
1948   :
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952
1953 ac_cv_func_vfork_works=$ac_cv_func_vfork
1954 else
1955   cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 /* Thanks to Paul Eggert for this test.  */
1959 #include <stdio.h>
1960 #include <sys/types.h>
1961 #include <sys/stat.h>
1962 #ifdef HAVE_UNISTD_H
1963 #include <unistd.h>
1964 #endif
1965 #ifdef HAVE_VFORK_H
1966 #include <vfork.h>
1967 #endif
1968 /* On some sparc systems, changes by the child to local and incoming
1969    argument registers are propagated back to the parent.
1970    The compiler is told about this with #include <vfork.h>,
1971    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1972    Test for this by using a static variable whose address
1973    is put into a register that is clobbered by the vfork.  */
1974 static
1975 #ifdef __cplusplus
1976 sparc_address_test (int arg)
1977 #else
1978 sparc_address_test (arg) int arg;
1979 #endif
1980 {
1981   static pid_t child;
1982   if (!child) {
1983     child = vfork ();
1984     if (child < 0) {
1985       perror ("vfork");
1986       _exit(2);
1987     }
1988     if (!child) {
1989       arg = getpid();
1990       write(-1, "", 0);
1991       _exit (arg);
1992     }
1993   }
1994 }
1995 main() {
1996   pid_t parent = getpid ();
1997   pid_t child;
1998
1999   sparc_address_test ();
2000
2001   child = vfork ();
2002
2003   if (child == 0) {
2004     /* Here is another test for sparc vfork register problems.
2005        This test uses lots of local variables, at least
2006        as many local variables as main has allocated so far
2007        including compiler temporaries.  4 locals are enough for
2008        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2009        A buggy compiler should reuse the register of parent
2010        for one of the local variables, since it will think that
2011        parent can't possibly be used any more in this routine.
2012        Assigning to the local variable will thus munge parent
2013        in the parent process.  */
2014     pid_t
2015       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2016       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2017     /* Convince the compiler that p..p7 are live; otherwise, it might
2018        use the same hardware register for all 8 local variables.  */
2019     if (p != p1 || p != p2 || p != p3 || p != p4
2020         || p != p5 || p != p6 || p != p7)
2021       _exit(1);
2022
2023     /* On some systems (e.g. IRIX 3.3),
2024        vfork doesn't separate parent from child file descriptors.
2025        If the child closes a descriptor before it execs or exits,
2026        this munges the parent's descriptor as well.
2027        Test for this by closing stdout in the child.  */
2028     _exit(close(fileno(stdout)) != 0);
2029   } else {
2030     int status;
2031     struct stat st;
2032
2033     while (wait(&status) != child)
2034       ;
2035     exit(
2036          /* Was there some problem with vforking?  */
2037          child < 0
2038
2039          /* Did the child fail?  (This shouldn't happen.)  */
2040          || status
2041
2042          /* Did the vfork/compiler bug occur?  */
2043          || parent != getpid()
2044
2045          /* Did the file descriptor bug occur?  */
2046          || fstat(fileno(stdout), &st) != 0
2047          );
2048   }
2049 }
2050 EOF
2051 if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2052 then
2053   ac_cv_func_vfork_works=yes
2054 else
2055   echo "configure: failed program was:" >&5
2056   cat conftest.$ac_ext >&5
2057   rm -fr conftest*
2058   ac_cv_func_vfork_works=no
2059 fi
2060 rm -fr conftest*
2061 fi
2062
2063 fi
2064
2065 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2066 if test $ac_cv_func_vfork_works = no; then
2067   cat >> confdefs.h <<\EOF
2068 #define vfork fork
2069 EOF
2070
2071 fi
2072
2073
2074 # uses AC_TRY_RUN
2075 if test "$cross_compiling" = yes; then
2076 echo "WARNING: cannot check for restartable system calls during cross compilation."
2077 else
2078 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
2079 echo "configure:2080: checking for restartable system calls" >&5
2080 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
2081   echo $ac_n "(cached) $ac_c" 1>&6
2082 else
2083   if test "$cross_compiling" = yes; then
2084     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2085 else
2086   cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 /* Exit 0 (true) if wait returns something other than -1,
2090    i.e. the pid of the child, which means that wait was restarted
2091    after getting the signal.  */
2092 #include <sys/types.h>
2093 #include <signal.h>
2094 ucatch (isig) { }
2095 main () {
2096   int i = fork (), status;
2097   if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
2098   signal (SIGINT, ucatch);
2099   status = wait(&i);
2100   if (status == -1) wait(&i);
2101   exit (status == -1);
2102 }
2103
2104 EOF
2105 if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2106 then
2107   ac_cv_sys_restartable_syscalls=yes
2108 else
2109   echo "configure: failed program was:" >&5
2110   cat conftest.$ac_ext >&5
2111   rm -fr conftest*
2112   ac_cv_sys_restartable_syscalls=no
2113 fi
2114 rm -fr conftest*
2115 fi
2116
2117 fi
2118
2119 echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
2120 if test $ac_cv_sys_restartable_syscalls = yes; then
2121   cat >> confdefs.h <<\EOF
2122 #define HAVE_RESTARTABLE_SYSCALLS 1
2123 EOF
2124
2125 fi
2126
2127 fi
2128
2129 trap '' 1 2 15
2130 cat > confcache <<\EOF
2131 # This file is a shell script that caches the results of configure
2132 # tests run on this system so they can be shared between configure
2133 # scripts and configure runs.  It is not useful on other systems.
2134 # If it contains results you don't want to keep, you may remove or edit it.
2135 #
2136 # By default, configure uses ./config.cache as the cache file,
2137 # creating it if it does not exist already.  You can give configure
2138 # the --cache-file=FILE option to use a different cache file; that is
2139 # what configure does when it calls configure scripts in
2140 # subdirectories, so they share the cache.
2141 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2142 # config.status only pays attention to the cache file if you give it the
2143 # --recheck option to rerun configure.
2144 #
2145 EOF
2146 # The following way of writing the cache mishandles newlines in values,
2147 # but we know of no workaround that is simple, portable, and efficient.
2148 # So, don't put newlines in cache variables' values.
2149 # Ultrix sh set writes to stderr and can't be redirected directly,
2150 # and sets the high bit in the cache file unless we assign to the vars.
2151 (set) 2>&1 |
2152   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2153   *ac_space=\ *)
2154     # `set' does not quote correctly, so add quotes (double-quote substitution
2155     # turns \\\\ into \\, and sed turns \\ into \).
2156     sed -n \
2157       -e "s/'/'\\\\''/g" \
2158       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2159     ;;
2160   *)
2161     # `set' quotes correctly as required by POSIX, so do not add quotes.
2162     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2163     ;;
2164   esac >> confcache
2165 if cmp -s $cache_file confcache; then
2166   :
2167 else
2168   if test -w $cache_file; then
2169     echo "updating cache $cache_file"
2170     cat confcache > $cache_file
2171   else
2172     echo "not updating unwritable cache $cache_file"
2173   fi
2174 fi
2175 rm -f confcache
2176
2177 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2178
2179 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2180 # Let make expand exec_prefix.
2181 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2182
2183 # Any assignment to VPATH causes Sun make to only execute
2184 # the first set of double-colon rules, so remove it if not needed.
2185 # If there is a colon in the path, we need to keep it.
2186 if test "x$srcdir" = x.; then
2187   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2188 fi
2189
2190 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2191
2192 DEFS=-DHAVE_CONFIG_H
2193
2194 # Without the "./", some shells look in PATH for config.status.
2195 : ${CONFIG_STATUS=./config.status}
2196
2197 echo creating $CONFIG_STATUS
2198 rm -f $CONFIG_STATUS
2199 cat > $CONFIG_STATUS <<EOF
2200 #! /bin/sh
2201 # Generated automatically by configure.
2202 # Run this file to recreate the current configuration.
2203 # This directory was configured as follows,
2204 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2205 #
2206 # $0 $ac_configure_args
2207 #
2208 # Compiler output produced by configure, useful for debugging
2209 # configure, is in ./config.log if it exists.
2210
2211 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2212 for ac_option
2213 do
2214   case "\$ac_option" in
2215   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2216     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2217     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2218   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2219     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2220     exit 0 ;;
2221   -help | --help | --hel | --he | --h)
2222     echo "\$ac_cs_usage"; exit 0 ;;
2223   *) echo "\$ac_cs_usage"; exit 1 ;;
2224   esac
2225 done
2226
2227 ac_given_srcdir=$srcdir
2228
2229 trap 'rm -fr `echo " config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2230 EOF
2231 cat >> $CONFIG_STATUS <<EOF
2232
2233 # Protect against being on the right side of a sed subst in config.status.
2234 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2235  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2236 $ac_vpsub
2237 $extrasub
2238 s%@SHELL@%$SHELL%g
2239 s%@CFLAGS@%$CFLAGS%g
2240 s%@CPPFLAGS@%$CPPFLAGS%g
2241 s%@CXXFLAGS@%$CXXFLAGS%g
2242 s%@FFLAGS@%$FFLAGS%g
2243 s%@DEFS@%$DEFS%g
2244 s%@LDFLAGS@%$LDFLAGS%g
2245 s%@LIBS@%$LIBS%g
2246 s%@exec_prefix@%$exec_prefix%g
2247 s%@prefix@%$prefix%g
2248 s%@program_transform_name@%$program_transform_name%g
2249 s%@bindir@%$bindir%g
2250 s%@sbindir@%$sbindir%g
2251 s%@libexecdir@%$libexecdir%g
2252 s%@datadir@%$datadir%g
2253 s%@sysconfdir@%$sysconfdir%g
2254 s%@sharedstatedir@%$sharedstatedir%g
2255 s%@localstatedir@%$localstatedir%g
2256 s%@libdir@%$libdir%g
2257 s%@includedir@%$includedir%g
2258 s%@oldincludedir@%$oldincludedir%g
2259 s%@infodir@%$infodir%g
2260 s%@mandir@%$mandir%g
2261 s%@host@%$host%g
2262 s%@host_alias@%$host_alias%g
2263 s%@host_cpu@%$host_cpu%g
2264 s%@host_vendor@%$host_vendor%g
2265 s%@host_os@%$host_os%g
2266 s%@target@%$target%g
2267 s%@target_alias@%$target_alias%g
2268 s%@target_cpu@%$target_cpu%g
2269 s%@target_vendor@%$target_vendor%g
2270 s%@target_os@%$target_os%g
2271 s%@build@%$build%g
2272 s%@build_alias@%$build_alias%g
2273 s%@build_cpu@%$build_cpu%g
2274 s%@build_vendor@%$build_vendor%g
2275 s%@build_os@%$build_os%g
2276 s%@CC@%$CC%g
2277 s%@RANLIB@%$RANLIB%g
2278 s%@AR@%$AR%g
2279 s%@DLLTOOL@%$DLLTOOL%g
2280 s%@CPP@%$CPP%g
2281
2282 CEOF
2283 EOF
2284
2285 cat >> $CONFIG_STATUS <<\EOF
2286
2287 # Split the substitutions into bite-sized pieces for seds with
2288 # small command number limits, like on Digital OSF/1 and HP-UX.
2289 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2290 ac_file=1 # Number of current file.
2291 ac_beg=1 # First line for current file.
2292 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2293 ac_more_lines=:
2294 ac_sed_cmds=""
2295 while $ac_more_lines; do
2296   if test $ac_beg -gt 1; then
2297     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2298   else
2299     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2300   fi
2301   if test ! -s conftest.s$ac_file; then
2302     ac_more_lines=false
2303     rm -f conftest.s$ac_file
2304   else
2305     if test -z "$ac_sed_cmds"; then
2306       ac_sed_cmds="sed -f conftest.s$ac_file"
2307     else
2308       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2309     fi
2310     ac_file=`expr $ac_file + 1`
2311     ac_beg=$ac_end
2312     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2313   fi
2314 done
2315 if test -z "$ac_sed_cmds"; then
2316   ac_sed_cmds=cat
2317 fi
2318 EOF
2319
2320 cat >> $CONFIG_STATUS <<EOF
2321
2322 CONFIG_FILES=\${CONFIG_FILES-""}
2323 EOF
2324 cat >> $CONFIG_STATUS <<\EOF
2325 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2326   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2327   case "$ac_file" in
2328   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2329        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2330   *) ac_file_in="${ac_file}.in" ;;
2331   esac
2332
2333   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2334
2335   # Remove last slash and all that follows it.  Not all systems have dirname.
2336   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2337   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2338     # The file is in a subdirectory.
2339     test ! -d "$ac_dir" && mkdir "$ac_dir"
2340     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2341     # A "../" for each directory in $ac_dir_suffix.
2342     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2343   else
2344     ac_dir_suffix= ac_dots=
2345   fi
2346
2347   case "$ac_given_srcdir" in
2348   .)  srcdir=.
2349       if test -z "$ac_dots"; then top_srcdir=.
2350       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2351   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2352   *) # Relative path.
2353     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2354     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2355   esac
2356
2357
2358   echo creating "$ac_file"
2359   rm -f "$ac_file"
2360   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2361   case "$ac_file" in
2362   *Makefile*) ac_comsub="1i\\
2363 # $configure_input" ;;
2364   *) ac_comsub= ;;
2365   esac
2366
2367   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2368   sed -e "$ac_comsub
2369 s%@configure_input@%$configure_input%g
2370 s%@srcdir@%$srcdir%g
2371 s%@top_srcdir@%$top_srcdir%g
2372 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2373 fi; done
2374 rm -f conftest.s*
2375
2376 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2377 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2378 #
2379 # ac_d sets the value in "#define NAME VALUE" lines.
2380 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2381 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2382 ac_dC='\3'
2383 ac_dD='%g'
2384 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2385 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2386 ac_uB='\([      ]\)%\1#\2define\3'
2387 ac_uC=' '
2388 ac_uD='\4%g'
2389 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2390 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2391 ac_eB='$%\1#\2define\3'
2392 ac_eC=' '
2393 ac_eD='%g'
2394
2395 if test "${CONFIG_HEADERS+set}" != set; then
2396 EOF
2397 cat >> $CONFIG_STATUS <<EOF
2398   CONFIG_HEADERS="config.h:config.h.in"
2399 EOF
2400 cat >> $CONFIG_STATUS <<\EOF
2401 fi
2402 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2403   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2404   case "$ac_file" in
2405   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2406        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2407   *) ac_file_in="${ac_file}.in" ;;
2408   esac
2409
2410   echo creating $ac_file
2411
2412   rm -f conftest.frag conftest.in conftest.out
2413   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2414   cat $ac_file_inputs > conftest.in
2415
2416 EOF
2417
2418 # Transform confdefs.h into a sed script conftest.vals that substitutes
2419 # the proper values into config.h.in to produce config.h.  And first:
2420 # Protect against being on the right side of a sed subst in config.status.
2421 # Protect against being in an unquoted here document in config.status.
2422 rm -f conftest.vals
2423 cat > conftest.hdr <<\EOF
2424 s/[\\&%]/\\&/g
2425 s%[\\$`]%\\&%g
2426 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2427 s%ac_d%ac_u%gp
2428 s%ac_u%ac_e%gp
2429 EOF
2430 sed -n -f conftest.hdr confdefs.h > conftest.vals
2431 rm -f conftest.hdr
2432
2433 # This sed command replaces #undef with comments.  This is necessary, for
2434 # example, in the case of _POSIX_SOURCE, which is predefined and required
2435 # on some systems where configure will not decide to define it.
2436 cat >> conftest.vals <<\EOF
2437 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2438 EOF
2439
2440 # Break up conftest.vals because some shells have a limit on
2441 # the size of here documents, and old seds have small limits too.
2442
2443 rm -f conftest.tail
2444 while :
2445 do
2446   ac_lines=`grep -c . conftest.vals`
2447   # grep -c gives empty output for an empty file on some AIX systems.
2448   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2449   # Write a limited-size here document to conftest.frag.
2450   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2451   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2452   echo 'CEOF
2453   sed -f conftest.frag conftest.in > conftest.out
2454   rm -f conftest.in
2455   mv conftest.out conftest.in
2456 ' >> $CONFIG_STATUS
2457   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2458   rm -f conftest.vals
2459   mv conftest.tail conftest.vals
2460 done
2461 rm -f conftest.vals
2462
2463 cat >> $CONFIG_STATUS <<\EOF
2464   rm -f conftest.frag conftest.h
2465   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2466   cat conftest.in >> conftest.h
2467   rm -f conftest.in
2468   if cmp -s $ac_file conftest.h 2>/dev/null; then
2469     echo "$ac_file is unchanged"
2470     rm -f conftest.h
2471   else
2472     # Remove last slash and all that follows it.  Not all systems have dirname.
2473       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2474       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2475       # The file is in a subdirectory.
2476       test ! -d "$ac_dir" && mkdir "$ac_dir"
2477     fi
2478     rm -f $ac_file
2479     mv conftest.h $ac_file
2480   fi
2481 fi; done
2482
2483 EOF
2484 cat >> $CONFIG_STATUS <<EOF
2485
2486 EOF
2487 cat >> $CONFIG_STATUS <<\EOF
2488
2489 . ./config.cache
2490
2491 if test ! -d ${ac_cv_file_output_prefix}; then
2492   ${GNUSTEP_MAKEFILES}/mkinstalldirs ${ac_cv_file_output_prefix}
2493 fi
2494 cp config.h ${ac_cv_file_output_prefix}
2495 rm -f config.h
2496
2497 exit 0
2498 EOF
2499 chmod +x $CONFIG_STATUS
2500 rm -fr confdefs* $ac_clean_files
2501 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2502