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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local
16 # Initialize some variables set by options.
17 # The variables have the same names as the options, with
18 # dashes changed to underlines.
20 cache_file=./config.cache
29 program_transform_name=s,x,x,
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'
50 # Initialize some other variables.
53 SHELL=${CONFIG_SHELL-/bin/sh}
54 # Maximum number of lines to put in a shell here document.
61 # If the previous option needs an argument, assign it.
62 if test -n "$ac_prev"; then
63 eval "$ac_prev=\$ac_option"
69 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 # Accept the important Cygnus configure options, so we can diagnose typos.
77 -bindir | --bindir | --bindi | --bind | --bin | --bi)
79 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80 bindir="$ac_optarg" ;;
82 -build | --build | --buil | --bui | --bu)
84 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87 -cache-file | --cache-file | --cache-fil | --cache-fi \
88 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92 cache_file="$ac_optarg" ;;
94 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98 datadir="$ac_optarg" ;;
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; }
106 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107 eval "enable_${ac_feature}=no" ;;
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; }
115 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 eval "enable_${ac_feature}='$ac_optarg'" ;;
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" ;;
131 -gas | --gas | --ga | --g)
132 # Obsolete; use --with-gas.
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.
139 Usage: configure [options] [host]
140 Options: [defaults in brackets after descriptions]
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
150 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
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
157 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
158 --sharedstatedir=DIR modifiable architecture-independent data in DIR
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
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
185 if test -n "$ac_help"; then
186 echo "--enable and --with options recognized:$ac_help"
190 -host | --host | --hos | --ho)
192 -host=* | --host=* | --hos=* | --ho=*)
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" ;;
202 -infodir | --infodir | --infodi | --infod | --info | --inf)
204 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
205 infodir="$ac_optarg" ;;
207 -libdir | --libdir | --libdi | --libd)
209 -libdir=* | --libdir=* | --libdi=* | --libd=*)
210 libdir="$ac_optarg" ;;
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" ;;
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" ;;
228 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
230 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
231 mandir="$ac_optarg" ;;
234 # Obsolete; use --without-fp.
237 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
242 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
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" ;;
254 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
256 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
257 prefix="$ac_optarg" ;;
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" ;;
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" ;;
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" ;;
290 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
291 | -silent | --silent | --silen | --sile | --sil)
294 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
296 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
298 sbindir="$ac_optarg" ;;
300 -sharedstatedir | --sharedstatedir | --sharedstatedi \
301 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
302 | --sharedst | --shareds | --shared | --share | --shar \
304 ac_prev=sharedstatedir ;;
305 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
306 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
307 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
309 sharedstatedir="$ac_optarg" ;;
311 -site | --site | --sit)
313 -site=* | --site=* | --sit=*)
316 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
318 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
319 srcdir="$ac_optarg" ;;
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" ;;
328 -target | --target | --targe | --targ | --tar | --ta | --t)
330 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
331 target="$ac_optarg" ;;
333 -v | -verbose | --verbose | --verbos | --verbo | --verb)
336 -version | --version | --versio | --versi | --vers)
337 echo "configure generated by autoconf version 2.13"
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; }
346 ac_package=`echo $ac_package| sed 's/-/_/g'`
351 eval "with_${ac_package}='$ac_optarg'" ;;
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; }
359 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 eval "with_${ac_package}=no" ;;
363 # Obsolete; use --with-x.
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" ;;
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" ;;
380 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
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
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; }
396 if test -n "$ac_prev"; then
397 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
402 # File descriptor usage:
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
418 This file contains any messages produced by compilers while
419 running configure, to aid debugging if configure makes a mistake.
422 # Strip out --no-create and --no-recursion so they do not pile up.
423 # Also quote any args containing shell metacharacters.
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" ;;
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
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.
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
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.
462 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
463 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465 if test ! -r $srcdir/$ac_unique_file; then
469 ac_srcdir_defaulted=no
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; }
475 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
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"
485 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
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"
495 if test -r "$cache_file"; then
496 echo "loading cache $cache_file"
499 echo "creating cache $cache_file"
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
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
521 ac_n= ac_c='\c' ac_t=
526 # Determine the host, build, and target systems
527 CC_TARGET=$target # use --target value for CC, not the canonical form
529 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
530 if test -f $ac_dir/install-sh; then
532 ac_install_sh="$ac_aux_dir/install-sh -c"
534 elif test -f $ac_dir/install.sh; then
536 ac_install_sh="$ac_aux_dir/install.sh -c"
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; }
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.
548 # Do some error checking and defaulting for the host and target type.
550 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
553 # 1. You are not allowed to specify --host, --target, and nonopt at the
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.
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; } ;;
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; }
574 echo $ac_n "checking host system type""... $ac_c" 1>&6
575 echo "configure:576: checking host system type" >&5
578 case "$host_alias" in
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; }
585 *) host_alias=$nonopt ;;
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
595 echo $ac_n "checking target system type""... $ac_c" 1>&6
596 echo "configure:597: checking target system type" >&5
599 case "$target_alias" in
602 NONE) target_alias=$host_alias ;;
603 *) target_alias=$nonopt ;;
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
613 echo $ac_n "checking build system type""... $ac_c" 1>&6
614 echo "configure:615: checking build system type" >&5
617 case "$build_alias" in
620 NONE) build_alias=$host_alias ;;
621 *) build_alias=$nonopt ;;
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
631 test "$host_alias" != "$target_alias" &&
632 test "$program_prefix$program_suffix$program_transform_name" = \
634 program_prefix=${target_alias}-
640 # check for cross compilation
642 if test "x$target" = "xNONE"; then
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
657 if test -n "$CC"; then
658 ac_cv_prog_CC="$CC" # Let the user override the test.
660 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
670 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
674 if test -n "$CC"; then
675 echo "$ac_t""$CC" 1>&6
677 echo "$ac_t""no" 1>&6
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
687 if test -n "$RANLIB"; then
688 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
700 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
703 RANLIB="$ac_cv_prog_RANLIB"
704 if test -n "$RANLIB"; then
705 echo "$ac_t""$RANLIB" 1>&6
707 echo "$ac_t""no" 1>&6
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
717 if test -n "$AR"; then
718 ac_cv_prog_AR="$AR" # Let the user override the test.
720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
730 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
734 if test -n "$AR"; then
735 echo "$ac_t""$AR" 1>&6
737 echo "$ac_t""no" 1>&6
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
747 if test -n "$DLLTOOL"; then
748 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
760 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
763 DLLTOOL="$ac_cv_prog_DLLTOOL"
764 if test -n "$DLLTOOL"; then
765 echo "$ac_t""$DLLTOOL" 1>&6
767 echo "$ac_t""no" 1>&6
773 RANLIB=${CC_TARGET}-ranlib
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
782 if test -n "$CC"; then
783 ac_cv_prog_CC="$CC" # Let the user override the test.
785 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
795 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
799 if test -n "$CC"; then
800 echo "$ac_t""$CC" 1>&6
802 echo "$ac_t""no" 1>&6
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
812 if test -n "$RANLIB"; then
813 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
815 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
825 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
828 RANLIB="$ac_cv_prog_RANLIB"
829 if test -n "$RANLIB"; then
830 echo "$ac_t""$RANLIB" 1>&6
832 echo "$ac_t""no" 1>&6
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
842 if test -n "$AR"; then
843 ac_cv_prog_AR="$AR" # Let the user override the test.
845 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
847 for ac_dir in $ac_dummy; do
848 test -z "$ac_dir" && ac_dir=.
849 if test -f $ac_dir/$ac_word; then
855 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
859 if test -n "$AR"; then
860 echo "$ac_t""$AR" 1>&6
862 echo "$ac_t""no" 1>&6
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
872 if test -n "$DLLTOOL"; then
873 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
875 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
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""
885 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
888 DLLTOOL="$ac_cv_prog_DLLTOOL"
889 if test -n "$DLLTOOL"; then
890 echo "$ac_t""$DLLTOOL" 1>&6
892 echo "$ac_t""no" 1>&6
897 case "${host_cpu}" in
898 i[45]86*) host_cpu=i386;;
899 hppa1.1) host_cpu=hppa;;
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;;
907 target_cpu=${host_cpu}
909 target_vendor=${host_vendor}
911 case "x${target_os}" in
912 xfreebsd*) target_os=freebsd;;
915 # Assign the HOST variables for sharedlib.mak
918 HOST_VENDOR=$host_vendor
921 TARGET_CPU=$target_cpu
922 TARGET_VENDOR=$target_vendor
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
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. */
945 if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
947 eval "ac_cv_lib_$ac_lib_var=yes"
949 echo "configure: failed program was:" >&5
950 cat conftest.$ac_ext >&5
952 eval "ac_cv_lib_$ac_lib_var=no"
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
969 echo "$ac_t""no" 1>&6
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
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. */
992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
994 eval "ac_cv_lib_$ac_lib_var=yes"
996 echo "configure: failed program was:" >&5
997 cat conftest.$ac_ext >&5
999 eval "ac_cv_lib_$ac_lib_var=no"
1002 LIBS="$ac_save_LIBS"
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
1013 LIBS="-lsocket $LIBS"
1016 echo "$ac_t""no" 1>&6
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
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. */
1039 if { (eval echo configure:1040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1041 eval "ac_cv_lib_$ac_lib_var=yes"
1043 echo "configure: failed program was:" >&5
1044 cat conftest.$ac_ext >&5
1046 eval "ac_cv_lib_$ac_lib_var=no"
1049 LIBS="$ac_save_LIBS"
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
1060 LIBS="-lwsock32 $LIBS"
1063 echo "$ac_t""no" 1>&6
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
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. */
1086 if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1088 eval "ac_cv_lib_$ac_lib_var=yes"
1090 echo "configure: failed program was:" >&5
1091 cat conftest.$ac_ext >&5
1093 eval "ac_cv_lib_$ac_lib_var=no"
1096 LIBS="$ac_save_LIBS"
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
1107 LIBS="-ladvapi32 $LIBS"
1110 echo "$ac_t""no" 1>&6
1114 transformed_target_cpu=`${GNUSTEP_MAKEFILES}/clean_cpu.sh ${TARGET_CPU}`
1115 ac_cv_file_output_prefix=${transformed_target_cpu}/${TARGET_OS}
1118 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
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
1126 cat > conftest.$ac_ext <<EOF
1127 #line 1128 "configure"
1128 #include "confdefs.h"
1129 #include <sys/types.h>
1135 if { (eval echo configure:1136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1137 eval "ac_cv_header_dirent_$ac_safe=yes"
1139 echo "configure: failed program was:" >&5
1140 cat conftest.$ac_ext >&5
1142 eval "ac_cv_header_dirent_$ac_safe=no"
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
1152 ac_header_dirent=$ac_hdr; break
1154 echo "$ac_t""no" 1>&6
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
1165 ac_save_LIBS="$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. */
1179 if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1181 eval "ac_cv_lib_$ac_lib_var=yes"
1183 echo "configure: failed program was:" >&5
1184 cat conftest.$ac_ext >&5
1186 eval "ac_cv_lib_$ac_lib_var=no"
1189 LIBS="$ac_save_LIBS"
1192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1193 echo "$ac_t""yes" 1>&6
1196 echo "$ac_t""no" 1>&6
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
1206 ac_save_LIBS="$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. */
1220 if { (eval echo configure:1221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1222 eval "ac_cv_lib_$ac_lib_var=yes"
1224 echo "configure: failed program was:" >&5
1225 cat conftest.$ac_ext >&5
1227 eval "ac_cv_lib_$ac_lib_var=no"
1230 LIBS="$ac_save_LIBS"
1233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1234 echo "$ac_t""yes" 1>&6
1237 echo "$ac_t""no" 1>&6
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
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
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.
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"
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
1270 echo "configure: failed program was:" >&5
1271 cat conftest.$ac_ext >&5
1273 CPP="${CC-cc} -E -traditional-cpp"
1274 cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
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
1287 echo "configure: failed program was:" >&5
1288 cat conftest.$ac_ext >&5
1290 CPP="${CC-cc} -nologo -E"
1291 cat > conftest.$ac_ext <<EOF
1292 #line 1293 "configure"
1293 #include "confdefs.h"
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
1304 echo "configure: failed program was:" >&5
1305 cat conftest.$ac_ext >&5
1314 ac_cv_prog_CPP="$CPP"
1316 CPP="$ac_cv_prog_CPP"
1318 ac_cv_prog_CPP="$CPP"
1320 echo "$ac_t""$CPP" 1>&6
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
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
1330 cat > conftest.$ac_ext <<EOF
1331 #line 1332 "configure"
1332 #include "confdefs.h"
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
1340 eval "ac_cv_header_$ac_safe=yes"
1343 echo "configure: failed program was:" >&5
1344 cat conftest.$ac_ext >&5
1346 eval "ac_cv_header_$ac_safe=no"
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
1358 echo "$ac_t""no" 1>&6
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
1367 cat > conftest.$ac_ext <<EOF
1368 #line 1369 "configure"
1369 #include "confdefs.h"
1370 #include <sys/types.h>
1371 #include <sys/wait.h>
1373 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1376 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1381 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1384 if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1386 ac_cv_header_sys_wait_h=yes
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1391 ac_cv_header_sys_wait_h=no
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
1405 for ac_func in memcpy getcwd kill poll isatty ttyname ttyname_r gethostbyname_r gethostbyaddr_r gethostent_r
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
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. */
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. */
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)
1436 if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1438 eval "ac_cv_func_$ac_func=yes"
1440 echo "configure: failed program was:" >&5
1441 cat conftest.$ac_ext >&5
1443 eval "ac_cv_func_$ac_func=no"
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
1456 echo "$ac_t""no" 1>&6
1460 for ac_hdr in unistd.h
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
1468 cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
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
1478 eval "ac_cv_header_$ac_safe=yes"
1481 echo "configure: failed program was:" >&5
1482 cat conftest.$ac_ext >&5
1484 eval "ac_cv_header_$ac_safe=no"
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
1496 echo "$ac_t""no" 1>&6
1500 for ac_func in getpagesize
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
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. */
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. */
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)
1531 if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1533 eval "ac_cv_func_$ac_func=yes"
1535 echo "configure: failed program was:" >&5
1536 cat conftest.$ac_ext >&5
1538 eval "ac_cv_func_$ac_func=no"
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
1551 echo "$ac_t""no" 1>&6
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
1560 if test "$cross_compiling" = yes; then
1561 ac_cv_func_mmap_fixed_mapped=no
1563 cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
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.
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>
1590 #include <sys/mman.h>
1592 /* This mess was copied from the GNU getpagesize.h. */
1593 #ifndef HAVE_GETPAGESIZE
1594 # ifdef HAVE_UNISTD_H
1595 # include <unistd.h>
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
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 */
1612 # define getpagesize() NBPG * CLSIZE
1615 # endif /* no CLSIZE */
1616 # else /* no NBPG */
1618 # define getpagesize() NBPC
1619 # else /* no NBPC */
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 */
1631 #endif /* no HAVE_GETPAGESIZE */
1634 extern "C" { void *malloc(unsigned); }
1642 char *data, *data2, *data3;
1646 pagesize = getpagesize();
1649 * First, make a file with some known garbage in it.
1651 data = malloc(pagesize);
1654 for (i = 0; i < pagesize; ++i)
1655 *(data + i) = rand();
1657 fd = creat("conftestmmap", 0600);
1660 if (write(fd, data, pagesize) != pagesize)
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.
1669 fd = open("conftestmmap", O_RDWR);
1672 data2 = malloc(2 * pagesize);
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))
1679 for (i = 0; i < pagesize; ++i)
1680 if (*(data + i) != *(data2 + i))
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.)
1688 for (i = 0; i < pagesize; ++i)
1689 *(data2 + i) = *(data2 + i) + 1;
1690 data3 = malloc(pagesize);
1693 if (read(fd, data3, pagesize) != pagesize)
1695 for (i = 0; i < pagesize; ++i)
1696 if (*(data + i) != *(data3 + i))
1699 unlink("conftestmmap");
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
1706 ac_cv_func_mmap_fixed_mapped=yes
1708 echo "configure: failed program was:" >&5
1709 cat conftest.$ac_ext >&5
1711 ac_cv_func_mmap_fixed_mapped=no
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
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
1731 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
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
1744 ac_cv_header_stdc=yes
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1750 ac_cv_header_stdc=no
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"
1761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1762 egrep "memchr" >/dev/null 2>&1; then
1766 ac_cv_header_stdc=no
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"
1779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1780 egrep "free" >/dev/null 2>&1; then
1784 ac_cv_header_stdc=no
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
1795 cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.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);
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
1811 echo "configure: failed program was:" >&5
1812 cat conftest.$ac_ext >&5
1814 ac_cv_header_stdc=no
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
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
1835 cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <sys/types.h>
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
1847 ac_cv_type_pid_t=yes
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
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
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
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
1879 eval "ac_cv_header_$ac_safe=yes"
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1885 eval "ac_cv_header_$ac_safe=no"
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
1896 echo "$ac_t""no" 1>&6
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
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
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. */
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. */
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)
1934 if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1936 eval "ac_cv_func_vfork=yes"
1938 echo "configure: failed program was:" >&5
1939 cat conftest.$ac_ext >&5
1941 eval "ac_cv_func_vfork=no"
1946 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1947 echo "$ac_t""yes" 1>&6
1950 echo "$ac_t""no" 1>&6
1953 ac_cv_func_vfork_works=$ac_cv_func_vfork
1955 cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 /* Thanks to Paul Eggert for this test. */
1960 #include <sys/types.h>
1961 #include <sys/stat.h>
1962 #ifdef HAVE_UNISTD_H
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. */
1976 sparc_address_test (int arg)
1978 sparc_address_test (arg) int arg;
1996 pid_t parent = getpid ();
1999 sparc_address_test ();
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. */
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)
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);
2033 while (wait(&status) != child)
2036 /* Was there some problem with vforking? */
2039 /* Did the child fail? (This shouldn't happen.) */
2042 /* Did the vfork/compiler bug occur? */
2043 || parent != getpid()
2045 /* Did the file descriptor bug occur? */
2046 || fstat(fileno(stdout), &st) != 0
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
2053 ac_cv_func_vfork_works=yes
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2058 ac_cv_func_vfork_works=no
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
2075 if test "$cross_compiling" = yes; then
2076 echo "WARNING: cannot check for restartable system calls during cross compilation."
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
2083 if test "$cross_compiling" = yes; then
2084 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
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>
2096 int i = fork (), status;
2097 if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
2098 signal (SIGINT, ucatch);
2100 if (status == -1) wait(&i);
2101 exit (status == -1);
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
2107 ac_cv_sys_restartable_syscalls=yes
2109 echo "configure: failed program was:" >&5
2110 cat conftest.$ac_ext >&5
2112 ac_cv_sys_restartable_syscalls=no
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
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.
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.
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.
2152 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2154 # `set' does not quote correctly, so add quotes (double-quote substitution
2155 # turns \\\\ into \\, and sed turns \\ into \).
2157 -e "s/'/'\\\\''/g" \
2158 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
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'
2165 if cmp -s $cache_file confcache; then
2168 if test -w $cache_file; then
2169 echo "updating cache $cache_file"
2170 cat confcache > $cache_file
2172 echo "not updating unwritable cache $cache_file"
2177 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2179 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2180 # Let make expand exec_prefix.
2181 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
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'
2190 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2192 DEFS=-DHAVE_CONFIG_H
2194 # Without the "./", some shells look in PATH for config.status.
2195 : ${CONFIG_STATUS=./config.status}
2197 echo creating $CONFIG_STATUS
2198 rm -f $CONFIG_STATUS
2199 cat > $CONFIG_STATUS <<EOF
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`:
2206 # $0 $ac_configure_args
2208 # Compiler output produced by configure, useful for debugging
2209 # configure, is in ./config.log if it exists.
2211 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
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"
2221 -help | --help | --hel | --he | --h)
2222 echo "\$ac_cs_usage"; exit 0 ;;
2223 *) echo "\$ac_cs_usage"; exit 1 ;;
2227 ac_given_srcdir=$srcdir
2229 trap 'rm -fr `echo " config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2231 cat >> $CONFIG_STATUS <<EOF
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
2239 s%@CFLAGS@%$CFLAGS%g
2240 s%@CPPFLAGS@%$CPPFLAGS%g
2241 s%@CXXFLAGS@%$CXXFLAGS%g
2242 s%@FFLAGS@%$FFLAGS%g
2244 s%@LDFLAGS@%$LDFLAGS%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
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
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
2277 s%@RANLIB@%$RANLIB%g
2279 s%@DLLTOOL@%$DLLTOOL%g
2285 cat >> $CONFIG_STATUS <<\EOF
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.
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
2299 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2301 if test ! -s conftest.s$ac_file; then
2303 rm -f conftest.s$ac_file
2305 if test -z "$ac_sed_cmds"; then
2306 ac_sed_cmds="sed -f conftest.s$ac_file"
2308 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2310 ac_file=`expr $ac_file + 1`
2312 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2315 if test -z "$ac_sed_cmds"; then
2320 cat >> $CONFIG_STATUS <<EOF
2322 CONFIG_FILES=\${CONFIG_FILES-""}
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".
2328 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2329 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2330 *) ac_file_in="${ac_file}.in" ;;
2333 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
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'`
2344 ac_dir_suffix= ac_dots=
2347 case "$ac_given_srcdir" in
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" ;;
2353 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2354 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2358 echo creating "$ac_file"
2360 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2362 *Makefile*) ac_comsub="1i\\
2363 # $configure_input" ;;
2367 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
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
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.
2379 # ac_d sets the value in "#define NAME VALUE" lines.
2380 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2381 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2384 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2385 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2386 ac_uB='\([ ]\)%\1#\2define\3'
2389 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2390 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2391 ac_eB='$%\1#\2define\3'
2395 if test "${CONFIG_HEADERS+set}" != set; then
2397 cat >> $CONFIG_STATUS <<EOF
2398 CONFIG_HEADERS="config.h:config.h.in"
2400 cat >> $CONFIG_STATUS <<\EOF
2402 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2403 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.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" ;;
2410 echo creating $ac_file
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
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.
2423 cat > conftest.hdr <<\EOF
2426 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2430 sed -n -f conftest.hdr confdefs.h > conftest.vals
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]*%/* & */%
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.
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
2453 sed -f conftest.frag conftest.in > conftest.out
2455 mv conftest.out conftest.in
2457 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2459 mv conftest.tail conftest.vals
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
2468 if cmp -s $ac_file conftest.h 2>/dev/null; then
2469 echo "$ac_file is unchanged"
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"
2479 mv conftest.h $ac_file
2484 cat >> $CONFIG_STATUS <<EOF
2487 cat >> $CONFIG_STATUS <<\EOF
2491 if test ! -d ${ac_cv_file_output_prefix}; then
2492 ${GNUSTEP_MAKEFILES}/mkinstalldirs ${ac_cv_file_output_prefix}
2494 cp config.h ${ac_cv_file_output_prefix}
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