blob: f9ee55f4d53c44c2e8c9ab3a09d26aadda7d0eea [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
Wichert Akkerman1786d811999-04-15 20:34:14 +00004# Generated automatically using autoconf version 2.13
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00005# 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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14
15# Initialize some variables set by options.
16# The variables have the same names as the options, with
17# dashes changed to underlines.
18build=NONE
19cache_file=./config.cache
20exec_prefix=NONE
21host=NONE
22no_create=
23nonopt=NONE
24no_recursion=
25prefix=NONE
26program_prefix=NONE
27program_suffix=NONE
28program_transform_name=s,x,x,
29silent=
30site=
31srcdir=
32target=NONE
33verbose=
34x_includes=NONE
35x_libraries=NONE
36bindir='${exec_prefix}/bin'
37sbindir='${exec_prefix}/sbin'
38libexecdir='${exec_prefix}/libexec'
39datadir='${prefix}/share'
40sysconfdir='${prefix}/etc'
41sharedstatedir='${prefix}/com'
42localstatedir='${prefix}/var'
43libdir='${exec_prefix}/lib'
44includedir='${prefix}/include'
45oldincludedir='/usr/include'
46infodir='${prefix}/info'
47mandir='${prefix}/man'
48
49# Initialize some other variables.
50subdirs=
51MFLAGS= MAKEFLAGS=
Wichert Akkerman1786d811999-04-15 20:34:14 +000052SHELL=${CONFIG_SHELL-/bin/sh}
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000053# Maximum number of lines to put in a shell here document.
54ac_max_here_lines=12
55
56ac_prev=
57for ac_option
58do
59
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
63 ac_prev=
64 continue
65 fi
66
67 case "$ac_option" in
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69 *) ac_optarg= ;;
70 esac
71
72 # Accept the important Cygnus configure options, so we can diagnose typos.
73
74 case "$ac_option" in
75
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
77 ac_prev=bindir ;;
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
80
81 -build | --build | --buil | --bui | --bu)
82 ac_prev=build ;;
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84 build="$ac_optarg" ;;
85
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88 ac_prev=cache_file ;;
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
92
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94 ac_prev=datadir ;;
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96 | --da=*)
97 datadir="$ac_optarg" ;;
98
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104 fi
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
107
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113 fi
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115 case "$ac_option" in
116 *=*) ;;
117 *) ac_optarg=yes ;;
118 esac
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
120
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
129
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
132 with_gas=yes ;;
133
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
137 cat << EOF
138Usage: configure [options] [host]
139Options: [defaults in brackets after descriptions]
140Configuration:
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
148 [$ac_default_prefix]
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
150 [same as prefix]
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
155 [PREFIX/share]
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
158 [PREFIX/com]
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
170EOF
171 cat << EOF
172Host type:
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
183EOF
184 if test -n "$ac_help"; then
185 echo "--enable and --with options recognized:$ac_help"
186 fi
187 exit 0 ;;
188
189 -host | --host | --hos | --ho)
190 ac_prev=host ;;
191 -host=* | --host=* | --hos=* | --ho=*)
192 host="$ac_optarg" ;;
193
194 -includedir | --includedir | --includedi | --included | --include \
195 | --includ | --inclu | --incl | --inc)
196 ac_prev=includedir ;;
197 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198 | --includ=* | --inclu=* | --incl=* | --inc=*)
199 includedir="$ac_optarg" ;;
200
201 -infodir | --infodir | --infodi | --infod | --info | --inf)
202 ac_prev=infodir ;;
203 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204 infodir="$ac_optarg" ;;
205
206 -libdir | --libdir | --libdi | --libd)
207 ac_prev=libdir ;;
208 -libdir=* | --libdir=* | --libdi=* | --libd=*)
209 libdir="$ac_optarg" ;;
210
211 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212 | --libexe | --libex | --libe)
213 ac_prev=libexecdir ;;
214 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215 | --libexe=* | --libex=* | --libe=*)
216 libexecdir="$ac_optarg" ;;
217
218 -localstatedir | --localstatedir | --localstatedi | --localstated \
219 | --localstate | --localstat | --localsta | --localst \
220 | --locals | --local | --loca | --loc | --lo)
221 ac_prev=localstatedir ;;
222 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225 localstatedir="$ac_optarg" ;;
226
227 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
228 ac_prev=mandir ;;
229 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230 mandir="$ac_optarg" ;;
231
232 -nfp | --nfp | --nf)
233 # Obsolete; use --without-fp.
234 with_fp=no ;;
235
236 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
237 | --no-cr | --no-c)
238 no_create=yes ;;
239
240 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
242 no_recursion=yes ;;
243
244 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246 | --oldin | --oldi | --old | --ol | --o)
247 ac_prev=oldincludedir ;;
248 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251 oldincludedir="$ac_optarg" ;;
252
253 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
254 ac_prev=prefix ;;
255 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256 prefix="$ac_optarg" ;;
257
258 -program-prefix | --program-prefix | --program-prefi | --program-pref \
259 | --program-pre | --program-pr | --program-p)
260 ac_prev=program_prefix ;;
261 -program-prefix=* | --program-prefix=* | --program-prefi=* \
262 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263 program_prefix="$ac_optarg" ;;
264
265 -program-suffix | --program-suffix | --program-suffi | --program-suff \
266 | --program-suf | --program-su | --program-s)
267 ac_prev=program_suffix ;;
268 -program-suffix=* | --program-suffix=* | --program-suffi=* \
269 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270 program_suffix="$ac_optarg" ;;
271
272 -program-transform-name | --program-transform-name \
273 | --program-transform-nam | --program-transform-na \
274 | --program-transform-n | --program-transform- \
275 | --program-transform | --program-transfor \
276 | --program-transfo | --program-transf \
277 | --program-trans | --program-tran \
278 | --progr-tra | --program-tr | --program-t)
279 ac_prev=program_transform_name ;;
280 -program-transform-name=* | --program-transform-name=* \
281 | --program-transform-nam=* | --program-transform-na=* \
282 | --program-transform-n=* | --program-transform-=* \
283 | --program-transform=* | --program-transfor=* \
284 | --program-transfo=* | --program-transf=* \
285 | --program-trans=* | --program-tran=* \
286 | --progr-tra=* | --program-tr=* | --program-t=*)
287 program_transform_name="$ac_optarg" ;;
288
289 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290 | -silent | --silent | --silen | --sile | --sil)
291 silent=yes ;;
292
293 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
294 ac_prev=sbindir ;;
295 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
296 | --sbi=* | --sb=*)
297 sbindir="$ac_optarg" ;;
298
299 -sharedstatedir | --sharedstatedir | --sharedstatedi \
300 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301 | --sharedst | --shareds | --shared | --share | --shar \
302 | --sha | --sh)
303 ac_prev=sharedstatedir ;;
304 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
307 | --sha=* | --sh=*)
308 sharedstatedir="$ac_optarg" ;;
309
310 -site | --site | --sit)
311 ac_prev=site ;;
312 -site=* | --site=* | --sit=*)
313 site="$ac_optarg" ;;
314
315 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
316 ac_prev=srcdir ;;
317 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318 srcdir="$ac_optarg" ;;
319
320 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321 | --syscon | --sysco | --sysc | --sys | --sy)
322 ac_prev=sysconfdir ;;
323 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325 sysconfdir="$ac_optarg" ;;
326
327 -target | --target | --targe | --targ | --tar | --ta | --t)
328 ac_prev=target ;;
329 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330 target="$ac_optarg" ;;
331
332 -v | -verbose | --verbose | --verbos | --verbo | --verb)
333 verbose=yes ;;
334
335 -version | --version | --versio | --versi | --vers)
Wichert Akkerman1786d811999-04-15 20:34:14 +0000336 echo "configure generated by autoconf version 2.13"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000337 exit 0 ;;
338
339 -with-* | --with-*)
340 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341 # Reject names that are not valid shell variable names.
342 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
344 fi
345 ac_package=`echo $ac_package| sed 's/-/_/g'`
346 case "$ac_option" in
347 *=*) ;;
348 *) ac_optarg=yes ;;
349 esac
350 eval "with_${ac_package}='$ac_optarg'" ;;
351
352 -without-* | --without-*)
353 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354 # Reject names that are not valid shell variable names.
355 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 fi
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 eval "with_${ac_package}=no" ;;
360
361 --x)
362 # Obsolete; use --with-x.
363 with_x=yes ;;
364
365 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366 | --x-incl | --x-inc | --x-in | --x-i)
367 ac_prev=x_includes ;;
368 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370 x_includes="$ac_optarg" ;;
371
372 -x-libraries | --x-libraries | --x-librarie | --x-librari \
373 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374 ac_prev=x_libraries ;;
375 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377 x_libraries="$ac_optarg" ;;
378
379 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
380 ;;
381
382 *)
383 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384 echo "configure: warning: $ac_option: invalid host type" 1>&2
385 fi
386 if test "x$nonopt" != xNONE; then
387 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
388 fi
389 nonopt="$ac_option"
390 ;;
391
392 esac
393done
394
395if test -n "$ac_prev"; then
396 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
397fi
398
399trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
400
401# File descriptor usage:
402# 0 standard input
403# 1 file creation
404# 2 errors and warnings
405# 3 some systems may open it to /dev/tty
406# 4 used on the Kubota Titan
407# 6 checking for... messages and results
408# 5 compiler messages saved in config.log
409if test "$silent" = yes; then
410 exec 6>/dev/null
411else
412 exec 6>&1
413fi
414exec 5>./config.log
415
416echo "\
417This file contains any messages produced by compilers while
418running configure, to aid debugging if configure makes a mistake.
419" 1>&5
420
421# Strip out --no-create and --no-recursion so they do not pile up.
422# Also quote any args containing shell metacharacters.
423ac_configure_args=
424for ac_arg
425do
426 case "$ac_arg" in
427 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428 | --no-cr | --no-c) ;;
429 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
434 esac
435done
436
437# NLS nuisances.
438# Only set these to C if already set. These must not be set unconditionally
439# because not all systems understand e.g. LANG=C (notably SCO).
440# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
441# Non-C LC_CTYPE values break the ctype check.
442if test "${LANG+set}" = set; then LANG=C; export LANG; fi
443if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
444if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
445if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
446
447# confdefs.h avoids OS command line length limits that DEFS can exceed.
448rm -rf conftest* confdefs.h
449# AIX cpp loses on an empty file, so make sure it contains at least a newline.
450echo > confdefs.h
451
452# A filename unique to this package, relative to the directory that
453# configure is in, which we can look for to find out if srcdir is correct.
454ac_unique_file=strace.c
455
456# Find the source files, if location was not specified.
457if test -z "$srcdir"; then
458 ac_srcdir_defaulted=yes
459 # Try the directory containing this script, then its parent.
460 ac_prog=$0
461 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463 srcdir=$ac_confdir
464 if test ! -r $srcdir/$ac_unique_file; then
465 srcdir=..
466 fi
467else
468 ac_srcdir_defaulted=no
469fi
470if test ! -r $srcdir/$ac_unique_file; then
471 if test "$ac_srcdir_defaulted" = yes; then
472 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473 else
474 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475 fi
476fi
477srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479# Prefer explicitly selected file to automatically selected ones.
480if test -z "$CONFIG_SITE"; then
481 if test "x$prefix" != xNONE; then
482 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483 else
484 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485 fi
486fi
487for ac_site_file in $CONFIG_SITE; do
488 if test -r "$ac_site_file"; then
489 echo "loading site script $ac_site_file"
490 . "$ac_site_file"
491 fi
492done
493
494if test -r "$cache_file"; then
495 echo "loading cache $cache_file"
496 . $cache_file
497else
498 echo "creating cache $cache_file"
499 > $cache_file
500fi
501
502ac_ext=c
503# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504ac_cpp='$CPP $CPPFLAGS'
505ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Wichert Akkerman1786d811999-04-15 20:34:14 +0000506ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000507cross_compiling=$ac_cv_prog_cc_cross
508
Wichert Akkerman1786d811999-04-15 20:34:14 +0000509ac_exeext=
510ac_objext=o
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000511if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
514 ac_n= ac_c='
515' ac_t=' '
516 else
517 ac_n=-n ac_c= ac_t=
518 fi
519else
520 ac_n= ac_c='\c' ac_t=
521fi
522
523
524ac_aux_dir=
525for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
526 if test -f $ac_dir/install-sh; then
527 ac_aux_dir=$ac_dir
528 ac_install_sh="$ac_aux_dir/install-sh -c"
529 break
530 elif 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 fi
535done
536if test -z "$ac_aux_dir"; then
537 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
538fi
539ac_config_guess=$ac_aux_dir/config.guess
540ac_config_sub=$ac_aux_dir/config.sub
541ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
542
543
544# Make sure we can run config.sub.
Wichert Akkerman1786d811999-04-15 20:34:14 +0000545if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000546else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
547fi
548
549echo $ac_n "checking host system type""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000550echo "configure:551: checking host system type" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000551
552host_alias=$host
553case "$host_alias" in
554NONE)
555 case $nonopt in
556 NONE)
Wichert Akkerman1786d811999-04-15 20:34:14 +0000557 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000558 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
559 fi ;;
560 *) host_alias=$nonopt ;;
561 esac ;;
562esac
563
Wichert Akkerman1786d811999-04-15 20:34:14 +0000564host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000565host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
566host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
567host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
568echo "$ac_t""$host" 1>&6
569
570echo $ac_n "checking for supported operating system""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000571echo "configure:572: checking for supported operating system" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000572
573case "$host_os" in
574linux*)
575 opsys=linux
576 ;;
577sunos4*)
578 opsys=sunos4
579 ;;
580solaris2*)
581 opsys=svr4
582 ;;
583sysv4*)
584 opsys=svr4
585 ;;
586irix5*)
587 opsys=svr4
588 ;;
589*)
590 { echo "configure: error: this operating system is not yet supported by strace" 1>&2; exit 1; }
591 ;;
592esac
593echo "$ac_t""$opsys" 1>&6
594
595# Autoheader trick. Heh, heh.
596opsys_list='
597@@@syms="$syms LINUX SUNOS4 SVR4"@@@
598'
599
600echo $ac_n "checking for supported architecture""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000601echo "configure:602: checking for supported architecture" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000602case "$host_cpu" in
603i[3456]86|pentium)
604 arch=i386
605 ;;
606m68k)
607 arch=m68k
608 ;;
Wichert Akkerman1786d811999-04-15 20:34:14 +0000609sparc)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000610 arch=sparc
611 ;;
612mips)
613 arch=mips
614 ;;
Wichert Akkerman1786d811999-04-15 20:34:14 +0000615alpha*)
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000616 arch=alpha
617 ;;
618ppc|powerpc)
619 arch=powerpc
620 ;;
621arm)
622 arch=arm
623 ;;
624*)
625 { echo "configure: error: this architecture is not yet supported by strace" 1>&2; exit 1; }
626 ;;
627esac
628echo "$ac_t""$arch" 1>&6
629
630# Autoheader trick. Heh, heh.
631arch_list='
632@@@syms="$syms I386 M68K SPARC MIPS ALPHA ARM"@@@
633'
634
635osarch="$opsys"
636if [ -d "$srcdir/$opsys/$arch" ]; then
637 osarch="$opsys/$arch"
638fi
639
640OPSYS=`echo $opsys | tr '[a-z]' '[A-Z]'`
641ARCH=`echo $arch | tr '[a-z]' '[A-Z]'`
642
643
644
645cat >> confdefs.h <<EOF
646#define $OPSYS 1
647EOF
648
649
650cat >> confdefs.h <<EOF
651#define $ARCH 1
652EOF
653
654
655# Extract the first word of "gcc", so it can be a program name with args.
656set dummy gcc; ac_word=$2
657echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000658echo "configure:659: checking for $ac_word" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000659if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
660 echo $ac_n "(cached) $ac_c" 1>&6
661else
662 if test -n "$CC"; then
663 ac_cv_prog_CC="$CC" # Let the user override the test.
664else
Wichert Akkerman1786d811999-04-15 20:34:14 +0000665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
666 ac_dummy="$PATH"
667 for ac_dir in $ac_dummy; do
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000668 test -z "$ac_dir" && ac_dir=.
669 if test -f $ac_dir/$ac_word; then
670 ac_cv_prog_CC="gcc"
671 break
672 fi
673 done
674 IFS="$ac_save_ifs"
675fi
676fi
677CC="$ac_cv_prog_CC"
678if test -n "$CC"; then
679 echo "$ac_t""$CC" 1>&6
680else
681 echo "$ac_t""no" 1>&6
682fi
683
684if test -z "$CC"; then
685 # Extract the first word of "cc", so it can be a program name with args.
686set dummy cc; ac_word=$2
687echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000688echo "configure:689: checking for $ac_word" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000689if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
690 echo $ac_n "(cached) $ac_c" 1>&6
691else
692 if test -n "$CC"; then
693 ac_cv_prog_CC="$CC" # Let the user override the test.
694else
Wichert Akkerman1786d811999-04-15 20:34:14 +0000695 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000696 ac_prog_rejected=no
Wichert Akkerman1786d811999-04-15 20:34:14 +0000697 ac_dummy="$PATH"
698 for ac_dir in $ac_dummy; do
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000699 test -z "$ac_dir" && ac_dir=.
700 if test -f $ac_dir/$ac_word; then
701 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
702 ac_prog_rejected=yes
703 continue
704 fi
705 ac_cv_prog_CC="cc"
706 break
707 fi
708 done
709 IFS="$ac_save_ifs"
710if test $ac_prog_rejected = yes; then
711 # We found a bogon in the path, so make sure we never use it.
712 set dummy $ac_cv_prog_CC
713 shift
714 if test $# -gt 0; then
715 # We chose a different compiler from the bogus one.
716 # However, it has the same basename, so the bogon will be chosen
717 # first if we set CC to just the basename; use the full file name.
718 shift
719 set dummy "$ac_dir/$ac_word" "$@"
720 shift
721 ac_cv_prog_CC="$@"
722 fi
723fi
724fi
725fi
726CC="$ac_cv_prog_CC"
727if test -n "$CC"; then
728 echo "$ac_t""$CC" 1>&6
729else
730 echo "$ac_t""no" 1>&6
731fi
732
Wichert Akkerman1786d811999-04-15 20:34:14 +0000733 if test -z "$CC"; then
734 case "`uname -s`" in
735 *win32* | *WIN32*)
736 # Extract the first word of "cl", so it can be a program name with args.
737set dummy cl; ac_word=$2
738echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
739echo "configure:740: checking for $ac_word" >&5
740if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
741 echo $ac_n "(cached) $ac_c" 1>&6
742else
743 if test -n "$CC"; then
744 ac_cv_prog_CC="$CC" # Let the user override the test.
745else
746 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
747 ac_dummy="$PATH"
748 for ac_dir in $ac_dummy; do
749 test -z "$ac_dir" && ac_dir=.
750 if test -f $ac_dir/$ac_word; then
751 ac_cv_prog_CC="cl"
752 break
753 fi
754 done
755 IFS="$ac_save_ifs"
756fi
757fi
758CC="$ac_cv_prog_CC"
759if test -n "$CC"; then
760 echo "$ac_t""$CC" 1>&6
761else
762 echo "$ac_t""no" 1>&6
763fi
764 ;;
765 esac
766 fi
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000767 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
768fi
769
770echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000771echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000772
773ac_ext=c
774# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
775ac_cpp='$CPP $CPPFLAGS'
776ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Wichert Akkerman1786d811999-04-15 20:34:14 +0000777ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000778cross_compiling=$ac_cv_prog_cc_cross
779
Wichert Akkerman1786d811999-04-15 20:34:14 +0000780cat > conftest.$ac_ext << EOF
781
782#line 783 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000783#include "confdefs.h"
Wichert Akkerman1786d811999-04-15 20:34:14 +0000784
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000785main(){return(0);}
786EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000787if { (eval echo configure:788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000788 ac_cv_prog_cc_works=yes
789 # If we can't run a trivial program, we are probably using a cross compiler.
790 if (./conftest; exit) 2>/dev/null; then
791 ac_cv_prog_cc_cross=no
792 else
793 ac_cv_prog_cc_cross=yes
794 fi
795else
796 echo "configure: failed program was:" >&5
797 cat conftest.$ac_ext >&5
798 ac_cv_prog_cc_works=no
799fi
800rm -fr conftest*
Wichert Akkerman1786d811999-04-15 20:34:14 +0000801ac_ext=c
802# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
803ac_cpp='$CPP $CPPFLAGS'
804ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
805ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
806cross_compiling=$ac_cv_prog_cc_cross
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000807
808echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
809if test $ac_cv_prog_cc_works = no; then
810 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
811fi
812echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000813echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000814echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
815cross_compiling=$ac_cv_prog_cc_cross
816
817echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000818echo "configure:819: checking whether we are using GNU C" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000819if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
820 echo $ac_n "(cached) $ac_c" 1>&6
821else
822 cat > conftest.c <<EOF
823#ifdef __GNUC__
824 yes;
825#endif
826EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000827if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000828 ac_cv_prog_gcc=yes
829else
830 ac_cv_prog_gcc=no
831fi
832fi
833
834echo "$ac_t""$ac_cv_prog_gcc" 1>&6
835
836if test $ac_cv_prog_gcc = yes; then
837 GCC=yes
Wichert Akkerman1786d811999-04-15 20:34:14 +0000838else
839 GCC=
840fi
841
842ac_test_CFLAGS="${CFLAGS+set}"
843ac_save_CFLAGS="$CFLAGS"
844CFLAGS=
845echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
846echo "configure:847: checking whether ${CC-cc} accepts -g" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000847if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
849else
850 echo 'void f(){}' > conftest.c
851if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
852 ac_cv_prog_cc_g=yes
853else
854 ac_cv_prog_cc_g=no
855fi
856rm -f conftest*
857
858fi
859
860echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000861if test "$ac_test_CFLAGS" = set; then
862 CFLAGS="$ac_save_CFLAGS"
863elif test $ac_cv_prog_cc_g = yes; then
864 if test "$GCC" = yes; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000865 CFLAGS="-g -O2"
866 else
Wichert Akkerman1786d811999-04-15 20:34:14 +0000867 CFLAGS="-g"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000868 fi
869else
Wichert Akkerman1786d811999-04-15 20:34:14 +0000870 if test "$GCC" = yes; then
871 CFLAGS="-O2"
872 else
873 CFLAGS=
874 fi
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000875fi
876
877if test -z "$HOSTCC"
878then
879 HOSTCC="$CC"
880 if test -n "$GCC"
881 then
882 # Find out if gcc groks our host.
883 worked=
884 last=
885 for i in $host_alias $host
886 do
887 test "x$i" = "x$last" && continue
888 last="$i"
889 CC="$HOSTCC -b $i"
890 echo $ac_n "checking for working $CC""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000891echo "configure:892: checking for working $CC" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000892 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000893#line 894 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000894#include "confdefs.h"
895
896int main() {
897
898; return 0; }
899EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000900if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000901 rm -rf conftest*
902 worked=1
903 break
904
905else
906 echo "configure: failed program was:" >&5
907 cat conftest.$ac_ext >&5
908fi
909rm -f conftest*
910 echo "$ac_t""no" 1>&6
911 done
912 if test -z "$worked"
913 then
914 CC="$HOSTCC"
915 else
916 echo "$ac_t""yes" 1>&6
917 fi
918 fi
919fi
920
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000921echo $ac_n "checking for pollable procfs""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +0000922echo "configure:923: checking for pollable procfs" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000923if eval "test \"`echo '$''{'ac_cv_pollable_procfs'+set}'`\" = set"; then
924 echo $ac_n "(cached) $ac_c" 1>&6
925else
926 if test "$cross_compiling" = yes; then
927
928# Guess or punt.
929case "$host_os" in
930solaris2*|irix5*)
931 ac_cv_pollable_procfs=yes
932 ;;
933*)
934 ac_cv_pollable_procfs=no
935 ;;
936esac
937
938else
939 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000940#line 941 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000941#include "confdefs.h"
942
943#include <stdio.h>
944#include <signal.h>
945#include <sys/procfs.h>
946#include <sys/stropts.h>
947#include <poll.h>
948
949main()
950{
951 int pid;
952 char proc[32];
953 FILE *pfp;
954 struct pollfd pfd;
955
956 if ((pid = fork()) == 0) {
957 pause();
958 exit(0);
959 }
960 sprintf(proc, "/proc/%d", pid);
961 if ((pfp = fopen(proc, "r+")) == NULL)
962 goto fail;
963 if (ioctl(fileno(pfp), PIOCSTOP, NULL) < 0)
964 goto fail;
965 pfd.fd = fileno(pfp);
966 pfd.events = POLLPRI;
967 if (poll(&pfd, 1, 0) < 0)
968 goto fail;
969 if (!(pfd.revents & POLLPRI))
970 goto fail;
971 kill(pid, SIGKILL);
972 exit(0);
973fail:
974 kill(pid, SIGKILL);
975 exit(1);
976}
977
978EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +0000979if { (eval echo configure:980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000980then
981 ac_cv_pollable_procfs=yes
982else
983 echo "configure: failed program was:" >&5
984 cat conftest.$ac_ext >&5
985 rm -fr conftest*
986 ac_cv_pollable_procfs=no
987fi
988rm -fr conftest*
989fi
990
991fi
992
993echo "$ac_t""$ac_cv_pollable_procfs" 1>&6
994if test "$ac_cv_pollable_procfs" = yes
995then
996 cat >> confdefs.h <<\EOF
997#define HAVE_POLLABLE_PROCFS 1
998EOF
999
1000fi
1001
1002echo $ac_n "checking for pr_syscall in struct prstatus""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001003echo "configure:1004: checking for pr_syscall in struct prstatus" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001004if eval "test \"`echo '$''{'ac_cv_struct_pr_syscall'+set}'`\" = set"; then
1005 echo $ac_n "(cached) $ac_c" 1>&6
1006else
1007 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001008#line 1009 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001009#include "confdefs.h"
1010#include <sys/procfs.h>
1011int main() {
1012struct prstatus s; s.pr_syscall;
1013; return 0; }
1014EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001015if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001016 rm -rf conftest*
1017 ac_cv_struct_pr_syscall=yes
1018else
1019 echo "configure: failed program was:" >&5
1020 cat conftest.$ac_ext >&5
1021 rm -rf conftest*
1022 ac_cv_struct_pr_syscall=no
1023fi
1024rm -f conftest*
1025fi
1026
1027echo "$ac_t""$ac_cv_struct_pr_syscall" 1>&6
1028if test "$ac_cv_struct_pr_syscall" = yes
1029then
1030 cat >> confdefs.h <<\EOF
1031#define HAVE_PR_SYSCALL 1
1032EOF
1033
1034fi
1035
1036echo $ac_n "checking for msg_control in struct msghdr""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001037echo "configure:1038: checking for msg_control in struct msghdr" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001038if eval "test \"`echo '$''{'ac_cv_struct_msg_control'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040else
1041 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001042#line 1043 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001043#include "confdefs.h"
1044#include <sys/types.h>
1045#include <sys/socket.h>
1046int main() {
1047#undef msg_control
1048struct msghdr m; m.msg_control;
1049; return 0; }
1050EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001051if { (eval echo configure:1052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001052 rm -rf conftest*
1053 ac_cv_struct_msg_control=yes
1054else
1055 echo "configure: failed program was:" >&5
1056 cat conftest.$ac_ext >&5
1057 rm -rf conftest*
1058 ac_cv_struct_msg_control=no
1059fi
1060rm -f conftest*
1061fi
1062
1063echo "$ac_t""$ac_cv_struct_msg_control" 1>&6
1064if test "$ac_cv_struct_msg_control" = yes
1065then
1066 cat >> confdefs.h <<\EOF
1067#define HAVE_MSG_CONTROL 1
1068EOF
1069
1070fi
1071
1072for ac_prog in mawk gawk nawk awk
1073do
1074# Extract the first word of "$ac_prog", so it can be a program name with args.
1075set dummy $ac_prog; ac_word=$2
1076echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001077echo "configure:1078: checking for $ac_word" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001078if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1079 echo $ac_n "(cached) $ac_c" 1>&6
1080else
1081 if test -n "$AWK"; then
1082 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1083else
Wichert Akkerman1786d811999-04-15 20:34:14 +00001084 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1085 ac_dummy="$PATH"
1086 for ac_dir in $ac_dummy; do
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001087 test -z "$ac_dir" && ac_dir=.
1088 if test -f $ac_dir/$ac_word; then
1089 ac_cv_prog_AWK="$ac_prog"
1090 break
1091 fi
1092 done
1093 IFS="$ac_save_ifs"
1094fi
1095fi
1096AWK="$ac_cv_prog_AWK"
1097if test -n "$AWK"; then
1098 echo "$ac_t""$AWK" 1>&6
1099else
1100 echo "$ac_t""no" 1>&6
1101fi
1102
1103test -n "$AWK" && break
1104done
1105
1106
1107echo $ac_n "checking for primary include directory""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001108echo "configure:1109: checking for primary include directory" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001109includedir=/usr/include
1110if test -n "$GCC"
1111then
1112 >conftest.c
1113 new_includedir=`
1114 $CC -v -E conftest.c 2>&1 | $AWK '
1115 /^End of search list/ { print last; exit }
1116 { last = $1 }
1117 '
1118 `
1119 rm -f conftest.c
1120 if test -n "$new_includedir" && test -d "$new_includedir"
1121 then
1122 includedir=$new_includedir
1123 fi
1124fi
1125echo "$ac_t""$includedir" 1>&6
1126
1127if test "x$OPSYS" = "xSUNOS4" && test "x$ARCH" = "xSPARC"
1128then
1129 echo $ac_n "checking for valid machine include directory""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001130echo "configure:1131: checking for valid machine include directory" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001131 if test -d "$includedir/sun4"
1132 then
1133 rm -f machine
1134 ln -s $includedir/sun4 machine
1135 echo "$ac_t""yes" 1>&6
1136 cat >> confdefs.h <<\EOF
1137#define SUNOS4_KERNEL_ARCH_KLUDGE 1
1138EOF
1139
1140 else
1141 echo "$ac_t""no" 1>&6
1142 fi
1143fi
1144
1145if test -z "$WARNFLAGS"
1146then
1147 if test -n "$GCC"
1148 then
1149 # If we're using gcc we want warning flags.
1150 WARNFLAGS=-Wall
1151 fi
1152fi
1153
1154if test "x$OPSYS" = "xSUNOS4"
1155then
1156 if test -n "$GCC"
1157 then
1158 # SunOS 4.x header files don't declare int functions.
1159 WARNFLAGS="$WARNFLAGS -Wno-implicit"
1160 fi
1161fi
1162echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001163echo "configure:1164: checking how to run the C preprocessor" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001164# On Suns, sometimes $CPP names a directory.
1165if test -n "$CPP" && test -d "$CPP"; then
1166 CPP=
1167fi
1168if test -z "$CPP"; then
1169if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1170 echo $ac_n "(cached) $ac_c" 1>&6
1171else
1172 # This must be in double quotes, not single quotes, because CPP may get
1173 # substituted into the Makefile and "${CC-cc}" will confuse make.
1174 CPP="${CC-cc} -E"
1175 # On the NeXT, cc -E runs the code through the compiler's parser,
1176 # not just through cpp.
1177 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001178#line 1179 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001179#include "confdefs.h"
1180#include <assert.h>
1181Syntax Error
1182EOF
1183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00001184{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1185ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001186if test -z "$ac_err"; then
1187 :
1188else
1189 echo "$ac_err" >&5
1190 echo "configure: failed program was:" >&5
1191 cat conftest.$ac_ext >&5
1192 rm -rf conftest*
1193 CPP="${CC-cc} -E -traditional-cpp"
1194 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001195#line 1196 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001196#include "confdefs.h"
1197#include <assert.h>
1198Syntax Error
1199EOF
1200ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00001201{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1202ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1203if test -z "$ac_err"; then
1204 :
1205else
1206 echo "$ac_err" >&5
1207 echo "configure: failed program was:" >&5
1208 cat conftest.$ac_ext >&5
1209 rm -rf conftest*
1210 CPP="${CC-cc} -nologo -E"
1211 cat > conftest.$ac_ext <<EOF
1212#line 1213 "configure"
1213#include "confdefs.h"
1214#include <assert.h>
1215Syntax Error
1216EOF
1217ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1218{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1219ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001220if test -z "$ac_err"; then
1221 :
1222else
1223 echo "$ac_err" >&5
1224 echo "configure: failed program was:" >&5
1225 cat conftest.$ac_ext >&5
1226 rm -rf conftest*
1227 CPP=/lib/cpp
1228fi
1229rm -f conftest*
1230fi
1231rm -f conftest*
Wichert Akkerman1786d811999-04-15 20:34:14 +00001232fi
1233rm -f conftest*
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001234 ac_cv_prog_CPP="$CPP"
1235fi
1236 CPP="$ac_cv_prog_CPP"
1237else
1238 ac_cv_prog_CPP="$CPP"
1239fi
1240echo "$ac_t""$CPP" 1>&6
1241
1242if test $ac_cv_prog_gcc = yes; then
1243 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001244echo "configure:1245: checking whether ${CC-cc} needs -traditional" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001245if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1246 echo $ac_n "(cached) $ac_c" 1>&6
1247else
1248 ac_pattern="Autoconf.*'x'"
1249 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001250#line 1251 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001251#include "confdefs.h"
1252#include <sgtty.h>
1253Autoconf TIOCGETP
1254EOF
1255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1256 egrep "$ac_pattern" >/dev/null 2>&1; then
1257 rm -rf conftest*
1258 ac_cv_prog_gcc_traditional=yes
1259else
1260 rm -rf conftest*
1261 ac_cv_prog_gcc_traditional=no
1262fi
1263rm -f conftest*
1264
1265
1266 if test $ac_cv_prog_gcc_traditional = no; then
1267 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001268#line 1269 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001269#include "confdefs.h"
1270#include <termio.h>
1271Autoconf TCGETA
1272EOF
1273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1274 egrep "$ac_pattern" >/dev/null 2>&1; then
1275 rm -rf conftest*
1276 ac_cv_prog_gcc_traditional=yes
1277fi
1278rm -f conftest*
1279
1280 fi
1281fi
1282
1283echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1284 if test $ac_cv_prog_gcc_traditional = yes; then
1285 CC="$CC -traditional"
1286 fi
1287fi
1288
1289# Find a good install program. We prefer a C program (faster),
1290# so one script is as good as another. But avoid the broken or
1291# incompatible versions:
1292# SysV /etc/install, /usr/sbin/install
1293# SunOS /usr/etc/install
1294# IRIX /sbin/install
1295# AIX /bin/install
Wichert Akkerman1786d811999-04-15 20:34:14 +00001296# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001297# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1298# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1299# ./install, which can be erroneously created by make from ./install.sh.
1300echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001301echo "configure:1302: checking for a BSD compatible install" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001302if test -z "$INSTALL"; then
1303if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
Wichert Akkerman1786d811999-04-15 20:34:14 +00001306 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001307 for ac_dir in $PATH; do
1308 # Account for people who put trailing slashes in PATH elements.
1309 case "$ac_dir/" in
1310 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1311 *)
1312 # OSF1 and SCO ODT 3.0 have their own names for install.
Wichert Akkerman1786d811999-04-15 20:34:14 +00001313 # Don't use installbsd from OSF since it installs stuff as root
1314 # by default.
1315 for ac_prog in ginstall scoinst install; do
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001316 if test -f $ac_dir/$ac_prog; then
1317 if test $ac_prog = install &&
1318 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1319 # AIX install. It has an incompatible calling convention.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001320 :
1321 else
1322 ac_cv_path_install="$ac_dir/$ac_prog -c"
1323 break 2
1324 fi
1325 fi
1326 done
1327 ;;
1328 esac
1329 done
1330 IFS="$ac_save_IFS"
1331
1332fi
1333 if test "${ac_cv_path_install+set}" = set; then
1334 INSTALL="$ac_cv_path_install"
1335 else
1336 # As a last resort, use the slow shell script. We don't cache a
1337 # path for INSTALL within a source directory, because that will
1338 # break other packages using the cache if that directory is
1339 # removed, or if the path is relative.
1340 INSTALL="$ac_install_sh"
1341 fi
1342fi
1343echo "$ac_t""$INSTALL" 1>&6
1344
1345# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1346# It thinks the first close brace ends the variable substitution.
1347test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1348
Wichert Akkerman1786d811999-04-15 20:34:14 +00001349test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1350
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001351test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1352
1353echo $ac_n "checking for working const""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001354echo "configure:1355: checking for working const" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001355if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1356 echo $ac_n "(cached) $ac_c" 1>&6
1357else
1358 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001359#line 1360 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001360#include "confdefs.h"
1361
1362int main() {
1363
1364/* Ultrix mips cc rejects this. */
1365typedef int charset[2]; const charset x;
1366/* SunOS 4.1.1 cc rejects this. */
1367char const *const *ccp;
1368char **p;
1369/* NEC SVR4.0.2 mips cc rejects this. */
1370struct point {int x, y;};
1371static struct point const zero = {0,0};
1372/* AIX XL C 1.02.0.0 rejects this.
1373 It does not let you subtract one const X* pointer from another in an arm
1374 of an if-expression whose if-part is not a constant expression */
1375const char *g = "string";
1376ccp = &g + (g ? g-g : 0);
1377/* HPUX 7.0 cc rejects these. */
1378++ccp;
1379p = (char**) ccp;
1380ccp = (char const *const *) p;
1381{ /* SCO 3.2v4 cc rejects this. */
1382 char *t;
1383 char const *s = 0 ? (char *) 0 : (char const *) 0;
1384
1385 *t++ = 0;
1386}
1387{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1388 int x[] = {25, 17};
1389 const int *foo = &x[0];
1390 ++foo;
1391}
1392{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1393 typedef const int *iptr;
1394 iptr p = 0;
1395 ++p;
1396}
1397{ /* AIX XL C 1.02.0.0 rejects this saying
1398 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1399 struct s { int j; const int *ap[3]; };
1400 struct s *b; b->j = 5;
1401}
1402{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1403 const int foo = 10;
1404}
1405
1406; return 0; }
1407EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001408if { (eval echo configure:1409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001409 rm -rf conftest*
1410 ac_cv_c_const=yes
1411else
1412 echo "configure: failed program was:" >&5
1413 cat conftest.$ac_ext >&5
1414 rm -rf conftest*
1415 ac_cv_c_const=no
1416fi
1417rm -f conftest*
1418fi
1419
1420echo "$ac_t""$ac_cv_c_const" 1>&6
1421if test $ac_cv_c_const = no; then
1422 cat >> confdefs.h <<\EOF
1423#define const
1424EOF
1425
1426fi
1427
1428echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001429echo "configure:1430: checking for ANSI C header files" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001430if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1431 echo $ac_n "(cached) $ac_c" 1>&6
1432else
1433 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001434#line 1435 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001435#include "confdefs.h"
1436#include <stdlib.h>
1437#include <stdarg.h>
1438#include <string.h>
1439#include <float.h>
1440EOF
1441ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00001442{ (eval echo configure:1443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1443ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001444if test -z "$ac_err"; then
1445 rm -rf conftest*
1446 ac_cv_header_stdc=yes
1447else
1448 echo "$ac_err" >&5
1449 echo "configure: failed program was:" >&5
1450 cat conftest.$ac_ext >&5
1451 rm -rf conftest*
1452 ac_cv_header_stdc=no
1453fi
1454rm -f conftest*
1455
1456if test $ac_cv_header_stdc = yes; then
1457 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1458cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001459#line 1460 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001460#include "confdefs.h"
1461#include <string.h>
1462EOF
1463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1464 egrep "memchr" >/dev/null 2>&1; then
1465 :
1466else
1467 rm -rf conftest*
1468 ac_cv_header_stdc=no
1469fi
1470rm -f conftest*
1471
1472fi
1473
1474if test $ac_cv_header_stdc = yes; then
1475 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1476cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001477#line 1478 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001478#include "confdefs.h"
1479#include <stdlib.h>
1480EOF
1481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1482 egrep "free" >/dev/null 2>&1; then
1483 :
1484else
1485 rm -rf conftest*
1486 ac_cv_header_stdc=no
1487fi
1488rm -f conftest*
1489
1490fi
1491
1492if test $ac_cv_header_stdc = yes; then
1493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1494if test "$cross_compiling" = yes; then
1495 :
1496else
1497 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001498#line 1499 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001499#include "confdefs.h"
1500#include <ctype.h>
1501#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1502#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1503#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1504int main () { int i; for (i = 0; i < 256; i++)
1505if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1506exit (0); }
1507
1508EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001509if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001510then
1511 :
1512else
1513 echo "configure: failed program was:" >&5
1514 cat conftest.$ac_ext >&5
1515 rm -fr conftest*
1516 ac_cv_header_stdc=no
1517fi
1518rm -fr conftest*
1519fi
1520
1521fi
1522fi
1523
1524echo "$ac_t""$ac_cv_header_stdc" 1>&6
1525if test $ac_cv_header_stdc = yes; then
1526 cat >> confdefs.h <<\EOF
1527#define STDC_HEADERS 1
1528EOF
1529
1530fi
1531
1532ac_header_dirent=no
1533for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1534do
1535ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1536echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001537echo "configure:1538: checking for $ac_hdr that defines DIR" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001538if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1539 echo $ac_n "(cached) $ac_c" 1>&6
1540else
1541 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001542#line 1543 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001543#include "confdefs.h"
1544#include <sys/types.h>
1545#include <$ac_hdr>
1546int main() {
1547DIR *dirp = 0;
1548; return 0; }
1549EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001550if { (eval echo configure:1551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001551 rm -rf conftest*
1552 eval "ac_cv_header_dirent_$ac_safe=yes"
1553else
1554 echo "configure: failed program was:" >&5
1555 cat conftest.$ac_ext >&5
1556 rm -rf conftest*
1557 eval "ac_cv_header_dirent_$ac_safe=no"
1558fi
1559rm -f conftest*
1560fi
1561if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1562 echo "$ac_t""yes" 1>&6
1563 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1564 cat >> confdefs.h <<EOF
1565#define $ac_tr_hdr 1
1566EOF
1567 ac_header_dirent=$ac_hdr; break
1568else
1569 echo "$ac_t""no" 1>&6
1570fi
1571done
1572# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1573if test $ac_header_dirent = dirent.h; then
1574echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001575echo "configure:1576: checking for opendir in -ldir" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001576ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1577if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1578 echo $ac_n "(cached) $ac_c" 1>&6
1579else
1580 ac_save_LIBS="$LIBS"
1581LIBS="-ldir $LIBS"
1582cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001583#line 1584 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001584#include "confdefs.h"
1585/* Override any gcc2 internal prototype to avoid an error. */
1586/* We use char because int might match the return type of a gcc2
1587 builtin and then its argument prototype would still apply. */
1588char opendir();
1589
1590int main() {
1591opendir()
1592; return 0; }
1593EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001594if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001595 rm -rf conftest*
1596 eval "ac_cv_lib_$ac_lib_var=yes"
1597else
1598 echo "configure: failed program was:" >&5
1599 cat conftest.$ac_ext >&5
1600 rm -rf conftest*
1601 eval "ac_cv_lib_$ac_lib_var=no"
1602fi
1603rm -f conftest*
1604LIBS="$ac_save_LIBS"
1605
1606fi
1607if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1608 echo "$ac_t""yes" 1>&6
1609 LIBS="$LIBS -ldir"
1610else
1611 echo "$ac_t""no" 1>&6
1612fi
1613
1614else
1615echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001616echo "configure:1617: checking for opendir in -lx" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001617ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1618if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620else
1621 ac_save_LIBS="$LIBS"
1622LIBS="-lx $LIBS"
1623cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001624#line 1625 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001625#include "confdefs.h"
1626/* Override any gcc2 internal prototype to avoid an error. */
1627/* We use char because int might match the return type of a gcc2
1628 builtin and then its argument prototype would still apply. */
1629char opendir();
1630
1631int main() {
1632opendir()
1633; return 0; }
1634EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001635if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001636 rm -rf conftest*
1637 eval "ac_cv_lib_$ac_lib_var=yes"
1638else
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
1641 rm -rf conftest*
1642 eval "ac_cv_lib_$ac_lib_var=no"
1643fi
1644rm -f conftest*
1645LIBS="$ac_save_LIBS"
1646
1647fi
1648if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1649 echo "$ac_t""yes" 1>&6
1650 LIBS="$LIBS -lx"
1651else
1652 echo "$ac_t""no" 1>&6
1653fi
1654
1655fi
1656
1657echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001658echo "configure:1659: checking return type of signal handlers" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001659if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1661else
1662 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001663#line 1664 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001664#include "confdefs.h"
1665#include <sys/types.h>
1666#include <signal.h>
1667#ifdef signal
1668#undef signal
1669#endif
1670#ifdef __cplusplus
1671extern "C" void (*signal (int, void (*)(int)))(int);
1672#else
1673void (*signal ()) ();
1674#endif
1675
1676int main() {
1677int i;
1678; return 0; }
1679EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001680if { (eval echo configure:1681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001681 rm -rf conftest*
1682 ac_cv_type_signal=void
1683else
1684 echo "configure: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 rm -rf conftest*
1687 ac_cv_type_signal=int
1688fi
1689rm -f conftest*
1690fi
1691
1692echo "$ac_t""$ac_cv_type_signal" 1>&6
1693cat >> confdefs.h <<EOF
1694#define RETSIGTYPE $ac_cv_type_signal
1695EOF
1696
1697
1698echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001699echo "configure:1700: checking for st_blksize in struct stat" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001700if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
1701 echo $ac_n "(cached) $ac_c" 1>&6
1702else
1703 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001704#line 1705 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001705#include "confdefs.h"
1706#include <sys/types.h>
1707#include <sys/stat.h>
1708int main() {
1709struct stat s; s.st_blksize;
1710; return 0; }
1711EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001712if { (eval echo configure:1713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001713 rm -rf conftest*
1714 ac_cv_struct_st_blksize=yes
1715else
1716 echo "configure: failed program was:" >&5
1717 cat conftest.$ac_ext >&5
1718 rm -rf conftest*
1719 ac_cv_struct_st_blksize=no
1720fi
1721rm -f conftest*
1722fi
1723
1724echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
1725if test $ac_cv_struct_st_blksize = yes; then
1726 cat >> confdefs.h <<\EOF
1727#define HAVE_ST_BLKSIZE 1
1728EOF
1729
1730fi
1731
1732echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001733echo "configure:1734: checking for st_blocks in struct stat" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001734if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
1735 echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001738#line 1739 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001739#include "confdefs.h"
1740#include <sys/types.h>
1741#include <sys/stat.h>
1742int main() {
1743struct stat s; s.st_blocks;
1744; return 0; }
1745EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001746if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001747 rm -rf conftest*
1748 ac_cv_struct_st_blocks=yes
1749else
1750 echo "configure: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 rm -rf conftest*
1753 ac_cv_struct_st_blocks=no
1754fi
1755rm -f conftest*
1756fi
1757
1758echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
1759if test $ac_cv_struct_st_blocks = yes; then
1760 cat >> confdefs.h <<\EOF
1761#define HAVE_ST_BLOCKS 1
1762EOF
1763
1764else
Wichert Akkerman1786d811999-04-15 20:34:14 +00001765 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001766fi
1767
1768echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001769echo "configure:1770: checking for st_rdev in struct stat" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001770if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
1771 echo $ac_n "(cached) $ac_c" 1>&6
1772else
1773 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001774#line 1775 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001775#include "confdefs.h"
1776#include <sys/types.h>
1777#include <sys/stat.h>
1778int main() {
1779struct stat s; s.st_rdev;
1780; return 0; }
1781EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001782if { (eval echo configure:1783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001783 rm -rf conftest*
1784 ac_cv_struct_st_rdev=yes
1785else
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -rf conftest*
1789 ac_cv_struct_st_rdev=no
1790fi
1791rm -f conftest*
1792fi
1793
1794echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
1795if test $ac_cv_struct_st_rdev = yes; then
1796 cat >> confdefs.h <<\EOF
1797#define HAVE_ST_RDEV 1
1798EOF
1799
1800fi
1801
1802echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001803echo "configure:1804: checking whether stat file-mode macros are broken" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001804if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1805 echo $ac_n "(cached) $ac_c" 1>&6
1806else
1807 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001808#line 1809 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001809#include "confdefs.h"
1810#include <sys/types.h>
1811#include <sys/stat.h>
1812
1813#if defined(S_ISBLK) && defined(S_IFDIR)
1814# if S_ISBLK (S_IFDIR)
1815You lose.
1816# endif
1817#endif
1818
1819#if defined(S_ISBLK) && defined(S_IFCHR)
1820# if S_ISBLK (S_IFCHR)
1821You lose.
1822# endif
1823#endif
1824
1825#if defined(S_ISLNK) && defined(S_IFREG)
1826# if S_ISLNK (S_IFREG)
1827You lose.
1828# endif
1829#endif
1830
1831#if defined(S_ISSOCK) && defined(S_IFREG)
1832# if S_ISSOCK (S_IFREG)
1833You lose.
1834# endif
1835#endif
1836
1837EOF
1838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1839 egrep "You lose" >/dev/null 2>&1; then
1840 rm -rf conftest*
1841 ac_cv_header_stat_broken=yes
1842else
1843 rm -rf conftest*
1844 ac_cv_header_stat_broken=no
1845fi
1846rm -f conftest*
1847
1848fi
1849
1850echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1851if test $ac_cv_header_stat_broken = yes; then
1852 cat >> confdefs.h <<\EOF
1853#define STAT_MACROS_BROKEN 1
1854EOF
1855
1856fi
1857
1858echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001859echo "configure:1860: checking for uid_t in sys/types.h" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001860if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1861 echo $ac_n "(cached) $ac_c" 1>&6
1862else
1863 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001864#line 1865 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001865#include "confdefs.h"
1866#include <sys/types.h>
1867EOF
1868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1869 egrep "uid_t" >/dev/null 2>&1; then
1870 rm -rf conftest*
1871 ac_cv_type_uid_t=yes
1872else
1873 rm -rf conftest*
1874 ac_cv_type_uid_t=no
1875fi
1876rm -f conftest*
1877
1878fi
1879
1880echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1881if test $ac_cv_type_uid_t = no; then
1882 cat >> confdefs.h <<\EOF
1883#define uid_t int
1884EOF
1885
1886 cat >> confdefs.h <<\EOF
1887#define gid_t int
1888EOF
1889
1890fi
1891
1892echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001893echo "configure:1894: checking for mode_t" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001894if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1895 echo $ac_n "(cached) $ac_c" 1>&6
1896else
1897 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001898#line 1899 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001899#include "confdefs.h"
1900#include <sys/types.h>
1901#if STDC_HEADERS
1902#include <stdlib.h>
1903#include <stddef.h>
1904#endif
1905EOF
1906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Wichert Akkerman1786d811999-04-15 20:34:14 +00001907 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001908 rm -rf conftest*
1909 ac_cv_type_mode_t=yes
1910else
1911 rm -rf conftest*
1912 ac_cv_type_mode_t=no
1913fi
1914rm -f conftest*
1915
1916fi
1917echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1918if test $ac_cv_type_mode_t = no; then
1919 cat >> confdefs.h <<\EOF
1920#define mode_t int
1921EOF
1922
1923fi
1924
1925echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001926echo "configure:1927: checking type of array argument to getgroups" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001927if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
1928 echo $ac_n "(cached) $ac_c" 1>&6
1929else
1930 if test "$cross_compiling" = yes; then
1931 ac_cv_type_getgroups=cross
1932else
1933 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001934#line 1935 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001935#include "confdefs.h"
1936
1937/* Thanks to Mike Rendell for this test. */
1938#include <sys/types.h>
1939#define NGID 256
1940#undef MAX
1941#define MAX(x, y) ((x) > (y) ? (x) : (y))
1942main()
1943{
1944 gid_t gidset[NGID];
1945 int i, n;
1946 union { gid_t gval; long lval; } val;
1947
1948 val.lval = -1;
1949 for (i = 0; i < NGID; i++)
1950 gidset[i] = val.gval;
1951 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
1952 gidset);
1953 /* Exit non-zero if getgroups seems to require an array of ints. This
1954 happens when gid_t is short but getgroups modifies an array of ints. */
1955 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
1956}
1957
1958EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001959if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001960then
1961 ac_cv_type_getgroups=gid_t
1962else
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1965 rm -fr conftest*
1966 ac_cv_type_getgroups=int
1967fi
1968rm -fr conftest*
1969fi
1970
1971if test $ac_cv_type_getgroups = cross; then
1972 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00001973#line 1974 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001974#include "confdefs.h"
1975#include <unistd.h>
1976EOF
1977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1978 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
1979 rm -rf conftest*
1980 ac_cv_type_getgroups=gid_t
1981else
1982 rm -rf conftest*
1983 ac_cv_type_getgroups=int
1984fi
1985rm -f conftest*
1986
1987fi
1988fi
1989
1990echo "$ac_t""$ac_cv_type_getgroups" 1>&6
1991cat >> confdefs.h <<EOF
1992#define GETGROUPS_T $ac_cv_type_getgroups
1993EOF
1994
1995
1996echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00001997echo "configure:1998: checking whether sys/types.h defines makedev" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001998if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
1999 echo $ac_n "(cached) $ac_c" 1>&6
2000else
2001 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002002#line 2003 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002003#include "confdefs.h"
2004#include <sys/types.h>
2005int main() {
2006return makedev(0, 0);
2007; return 0; }
2008EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002009if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002010 rm -rf conftest*
2011 ac_cv_header_sys_types_h_makedev=yes
2012else
2013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 rm -rf conftest*
2016 ac_cv_header_sys_types_h_makedev=no
2017fi
2018rm -f conftest*
2019
2020fi
2021
2022echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
2023
2024if test $ac_cv_header_sys_types_h_makedev = no; then
2025ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
2026echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002027echo "configure:2028: checking for sys/mkdev.h" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002028if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2029 echo $ac_n "(cached) $ac_c" 1>&6
2030else
2031 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002032#line 2033 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002033#include "confdefs.h"
2034#include <sys/mkdev.h>
2035EOF
2036ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00002037{ (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2038ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002039if test -z "$ac_err"; then
2040 rm -rf conftest*
2041 eval "ac_cv_header_$ac_safe=yes"
2042else
2043 echo "$ac_err" >&5
2044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 rm -rf conftest*
2047 eval "ac_cv_header_$ac_safe=no"
2048fi
2049rm -f conftest*
2050fi
2051if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2052 echo "$ac_t""yes" 1>&6
2053 cat >> confdefs.h <<\EOF
2054#define MAJOR_IN_MKDEV 1
2055EOF
2056
2057else
2058 echo "$ac_t""no" 1>&6
2059fi
2060
2061
2062 if test $ac_cv_header_sys_mkdev_h = no; then
2063ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
2064echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002065echo "configure:2066: checking for sys/sysmacros.h" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002066if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2067 echo $ac_n "(cached) $ac_c" 1>&6
2068else
2069 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002070#line 2071 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002071#include "confdefs.h"
2072#include <sys/sysmacros.h>
2073EOF
2074ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00002075{ (eval echo configure:2076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2076ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002077if test -z "$ac_err"; then
2078 rm -rf conftest*
2079 eval "ac_cv_header_$ac_safe=yes"
2080else
2081 echo "$ac_err" >&5
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 rm -rf conftest*
2085 eval "ac_cv_header_$ac_safe=no"
2086fi
2087rm -f conftest*
2088fi
2089if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2090 echo "$ac_t""yes" 1>&6
2091 cat >> confdefs.h <<\EOF
2092#define MAJOR_IN_SYSMACROS 1
2093EOF
2094
2095else
2096 echo "$ac_t""no" 1>&6
2097fi
2098
2099 fi
2100fi
2101
2102echo $ac_n "checking for sig_atomic_t in signal.h""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002103echo "configure:2104: checking for sig_atomic_t in signal.h" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002104if eval "test \"`echo '$''{'ac_cv_sig_atomic_t'+set}'`\" = set"; then
2105 echo $ac_n "(cached) $ac_c" 1>&6
2106else
2107 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002108#line 2109 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002109#include "confdefs.h"
2110#include <signal.h>
2111int main() {
2112sig_atomic_t x;
2113; return 0; }
2114EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002115if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002116 rm -rf conftest*
2117 ac_cv_sig_atomic_t=yes
2118else
2119 echo "configure: failed program was:" >&5
2120 cat conftest.$ac_ext >&5
2121 rm -rf conftest*
2122 ac_cv_sig_atomic_t=no
2123fi
2124rm -f conftest*
2125fi
2126
2127echo "$ac_t""$ac_cv_sig_atomic_t" 1>&6
2128if test "$ac_cv_sig_atomic_t" = yes
2129then
2130 cat >> confdefs.h <<\EOF
2131#define HAVE_SIG_ATOMIC_T 1
2132EOF
2133
2134fi
2135
2136echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002137echo "configure:2138: checking for main in -lnsl" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002138ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2139if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2140 echo $ac_n "(cached) $ac_c" 1>&6
2141else
2142 ac_save_LIBS="$LIBS"
2143LIBS="-lnsl $LIBS"
2144cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002145#line 2146 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002146#include "confdefs.h"
2147
2148int main() {
2149main()
2150; return 0; }
2151EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002152if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002153 rm -rf conftest*
2154 eval "ac_cv_lib_$ac_lib_var=yes"
2155else
2156 echo "configure: failed program was:" >&5
2157 cat conftest.$ac_ext >&5
2158 rm -rf conftest*
2159 eval "ac_cv_lib_$ac_lib_var=no"
2160fi
2161rm -f conftest*
2162LIBS="$ac_save_LIBS"
2163
2164fi
2165if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2166 echo "$ac_t""yes" 1>&6
2167 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2168 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2169 cat >> confdefs.h <<EOF
2170#define $ac_tr_lib 1
2171EOF
2172
2173 LIBS="-lnsl $LIBS"
2174
2175else
2176 echo "$ac_t""no" 1>&6
2177fi
2178
2179for ac_func in sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg
2180do
2181echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002182echo "configure:2183: checking for $ac_func" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002183if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002187#line 2188 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002188#include "confdefs.h"
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $ac_func(); below. */
2191#include <assert.h>
2192/* Override any gcc2 internal prototype to avoid an error. */
2193/* We use char because int might match the return type of a gcc2
2194 builtin and then its argument prototype would still apply. */
2195char $ac_func();
2196
2197int main() {
2198
2199/* The GNU C library defines this for functions which it implements
2200 to always fail with ENOSYS. Some functions are actually named
2201 something starting with __ and the normal name is an alias. */
2202#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2203choke me
2204#else
2205$ac_func();
2206#endif
2207
2208; return 0; }
2209EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002210if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002211 rm -rf conftest*
2212 eval "ac_cv_func_$ac_func=yes"
2213else
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 rm -rf conftest*
2217 eval "ac_cv_func_$ac_func=no"
2218fi
2219rm -f conftest*
2220fi
2221
2222if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2223 echo "$ac_t""yes" 1>&6
2224 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2225 cat >> confdefs.h <<EOF
2226#define $ac_tr_func 1
2227EOF
2228
2229else
2230 echo "$ac_t""no" 1>&6
2231fi
2232done
2233
2234for ac_hdr in sys/filio.h sys/asynch.h sys/stream.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h
2235do
2236ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2237echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002238echo "configure:2239: checking for $ac_hdr" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002239if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241else
2242 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002243#line 2244 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002244#include "confdefs.h"
2245#include <$ac_hdr>
2246EOF
2247ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Wichert Akkerman1786d811999-04-15 20:34:14 +00002248{ (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2249ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002250if test -z "$ac_err"; then
2251 rm -rf conftest*
2252 eval "ac_cv_header_$ac_safe=yes"
2253else
2254 echo "$ac_err" >&5
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257 rm -rf conftest*
2258 eval "ac_cv_header_$ac_safe=no"
2259fi
2260rm -f conftest*
2261fi
2262if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2263 echo "$ac_t""yes" 1>&6
2264 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2265 cat >> confdefs.h <<EOF
2266#define $ac_tr_hdr 1
2267EOF
2268
2269else
2270 echo "$ac_t""no" 1>&6
2271fi
2272done
2273
2274echo $ac_n "checking for sys_errlist declaration""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002275echo "configure:2276: checking for sys_errlist declaration" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002276if eval "test \"`echo '$''{'ac_cv_decl_sys_errlist'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
2278else
2279 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002280#line 2281 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002281#include "confdefs.h"
2282#include <sys/types.h>
2283#include <errno.h>
2284#include <stdio.h>
2285/* Somebody might declare sys_errlist in unistd.h. */
2286#ifdef HAVE_UNISTD_H
2287#include <unistd.h>
2288#endif
2289int main() {
2290char *msg = *(sys_errlist + 1);
2291; return 0; }
2292EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002293if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002294 rm -rf conftest*
2295 ac_cv_decl_sys_errlist=yes
2296else
2297 echo "configure: failed program was:" >&5
2298 cat conftest.$ac_ext >&5
2299 rm -rf conftest*
2300 ac_cv_decl_sys_errlist=no
2301fi
2302rm -f conftest*
2303fi
2304echo "$ac_t""$ac_cv_decl_sys_errlist" 1>&6
2305if test $ac_cv_decl_sys_errlist = yes; then
2306 cat >> confdefs.h <<\EOF
2307#define SYS_ERRLIST_DECLARED 1
2308EOF
2309
2310fi
2311
2312echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002313echo "configure:2314: checking for sys_siglist declaration in signal.h or unistd.h" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002314if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
2315 echo $ac_n "(cached) $ac_c" 1>&6
2316else
2317 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002318#line 2319 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002319#include "confdefs.h"
2320#include <sys/types.h>
2321#include <signal.h>
2322/* NetBSD declares sys_siglist in unistd.h. */
2323#ifdef HAVE_UNISTD_H
2324#include <unistd.h>
2325#endif
2326int main() {
2327char *msg = *(sys_siglist + 1);
2328; return 0; }
2329EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002330if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002331 rm -rf conftest*
2332 ac_cv_decl_sys_siglist=yes
2333else
2334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2336 rm -rf conftest*
2337 ac_cv_decl_sys_siglist=no
2338fi
2339rm -f conftest*
2340fi
2341
2342echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
2343if test $ac_cv_decl_sys_siglist = yes; then
2344 cat >> confdefs.h <<\EOF
2345#define SYS_SIGLIST_DECLARED 1
2346EOF
2347
2348fi
2349
2350echo $ac_n "checking for _sys_siglist declaration""... $ac_c" 1>&6
Wichert Akkerman1786d811999-04-15 20:34:14 +00002351echo "configure:2352: checking for _sys_siglist declaration" >&5
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002352if eval "test \"`echo '$''{'ac_cv_decl__sys_siglist'+set}'`\" = set"; then
2353 echo $ac_n "(cached) $ac_c" 1>&6
2354else
2355 cat > conftest.$ac_ext <<EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002356#line 2357 "configure"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002357#include "confdefs.h"
2358#include <sys/types.h>
2359#include <signal.h>
2360/* Somebody might declare _sys_siglist in unistd.h. */
2361#ifdef HAVE_UNISTD_H
2362#include <unistd.h>
2363#endif
2364int main() {
2365char *msg = *(_sys_siglist + 1);
2366; return 0; }
2367EOF
Wichert Akkerman1786d811999-04-15 20:34:14 +00002368if { (eval echo configure:2369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002369 rm -rf conftest*
2370 ac_cv_decl__sys_siglist=yes
2371else
2372 echo "configure: failed program was:" >&5
2373 cat conftest.$ac_ext >&5
2374 rm -rf conftest*
2375 ac_cv_decl__sys_siglist=no
2376fi
2377rm -f conftest*
2378fi
2379echo "$ac_t""$ac_cv_decl__sys_siglist" 1>&6
2380if test $ac_cv_decl__sys_siglist = yes; then
2381 cat >> confdefs.h <<\EOF
2382#define SYS_SIGLIST_DECLARED 1
2383EOF
2384
2385fi
2386
2387trap '' 1 2 15
2388cat > confcache <<\EOF
2389# This file is a shell script that caches the results of configure
2390# tests run on this system so they can be shared between configure
2391# scripts and configure runs. It is not useful on other systems.
2392# If it contains results you don't want to keep, you may remove or edit it.
2393#
2394# By default, configure uses ./config.cache as the cache file,
2395# creating it if it does not exist already. You can give configure
2396# the --cache-file=FILE option to use a different cache file; that is
2397# what configure does when it calls configure scripts in
2398# subdirectories, so they share the cache.
2399# Giving --cache-file=/dev/null disables caching, for debugging configure.
2400# config.status only pays attention to the cache file if you give it the
2401# --recheck option to rerun configure.
2402#
2403EOF
2404# The following way of writing the cache mishandles newlines in values,
2405# but we know of no workaround that is simple, portable, and efficient.
2406# So, don't put newlines in cache variables' values.
2407# Ultrix sh set writes to stderr and can't be redirected directly,
2408# and sets the high bit in the cache file unless we assign to the vars.
2409(set) 2>&1 |
Wichert Akkerman1786d811999-04-15 20:34:14 +00002410 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002411 *ac_space=\ *)
2412 # `set' does not quote correctly, so add quotes (double-quote substitution
2413 # turns \\\\ into \\, and sed turns \\ into \).
2414 sed -n \
2415 -e "s/'/'\\\\''/g" \
2416 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2417 ;;
2418 *)
2419 # `set' quotes correctly as required by POSIX, so do not add quotes.
2420 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2421 ;;
2422 esac >> confcache
2423if cmp -s $cache_file confcache; then
2424 :
2425else
2426 if test -w $cache_file; then
2427 echo "updating cache $cache_file"
2428 cat confcache > $cache_file
2429 else
2430 echo "not updating unwritable cache $cache_file"
2431 fi
2432fi
2433rm -f confcache
2434
2435trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2436
2437test "x$prefix" = xNONE && prefix=$ac_default_prefix
2438# Let make expand exec_prefix.
2439test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2440
2441# Any assignment to VPATH causes Sun make to only execute
2442# the first set of double-colon rules, so remove it if not needed.
2443# If there is a colon in the path, we need to keep it.
2444if test "x$srcdir" = x.; then
2445 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2446fi
2447
2448trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2449
2450DEFS=-DHAVE_CONFIG_H
2451
2452# Without the "./", some shells look in PATH for config.status.
2453: ${CONFIG_STATUS=./config.status}
2454
2455echo creating $CONFIG_STATUS
2456rm -f $CONFIG_STATUS
2457cat > $CONFIG_STATUS <<EOF
2458#! /bin/sh
2459# Generated automatically by configure.
2460# Run this file to recreate the current configuration.
2461# This directory was configured as follows,
2462# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2463#
2464# $0 $ac_configure_args
2465#
2466# Compiler output produced by configure, useful for debugging
2467# configure, is in ./config.log if it exists.
2468
2469ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2470for ac_option
2471do
2472 case "\$ac_option" in
2473 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2474 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2475 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2476 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Wichert Akkerman1786d811999-04-15 20:34:14 +00002477 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002478 exit 0 ;;
2479 -help | --help | --hel | --he | --h)
2480 echo "\$ac_cs_usage"; exit 0 ;;
2481 *) echo "\$ac_cs_usage"; exit 1 ;;
2482 esac
2483done
2484
2485ac_given_srcdir=$srcdir
2486ac_given_INSTALL="$INSTALL"
2487
2488trap 'rm -fr `echo "Makefile $osarch/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2489EOF
2490cat >> $CONFIG_STATUS <<EOF
2491
2492# Protect against being on the right side of a sed subst in config.status.
2493sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2494 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2495$ac_vpsub
2496$extrasub
Wichert Akkerman1786d811999-04-15 20:34:14 +00002497s%@SHELL@%$SHELL%g
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002498s%@CFLAGS@%$CFLAGS%g
2499s%@CPPFLAGS@%$CPPFLAGS%g
2500s%@CXXFLAGS@%$CXXFLAGS%g
Wichert Akkerman1786d811999-04-15 20:34:14 +00002501s%@FFLAGS@%$FFLAGS%g
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002502s%@DEFS@%$DEFS%g
2503s%@LDFLAGS@%$LDFLAGS%g
2504s%@LIBS@%$LIBS%g
2505s%@exec_prefix@%$exec_prefix%g
2506s%@prefix@%$prefix%g
2507s%@program_transform_name@%$program_transform_name%g
2508s%@bindir@%$bindir%g
2509s%@sbindir@%$sbindir%g
2510s%@libexecdir@%$libexecdir%g
2511s%@datadir@%$datadir%g
2512s%@sysconfdir@%$sysconfdir%g
2513s%@sharedstatedir@%$sharedstatedir%g
2514s%@localstatedir@%$localstatedir%g
2515s%@libdir@%$libdir%g
2516s%@includedir@%$includedir%g
2517s%@oldincludedir@%$oldincludedir%g
2518s%@infodir@%$infodir%g
2519s%@mandir@%$mandir%g
2520s%@host@%$host%g
2521s%@host_alias@%$host_alias%g
2522s%@host_cpu@%$host_cpu%g
2523s%@host_vendor@%$host_vendor%g
2524s%@host_os@%$host_os%g
2525s%@opsys@%$opsys%g
2526s%@arch@%$arch%g
2527s%@osarch@%$osarch%g
2528s%@CC@%$CC%g
2529s%@HOSTCC@%$HOSTCC%g
2530s%@AWK@%$AWK%g
2531s%@WARNFLAGS@%$WARNFLAGS%g
2532s%@CPP@%$CPP%g
2533s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Wichert Akkerman1786d811999-04-15 20:34:14 +00002534s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002535s%@INSTALL_DATA@%$INSTALL_DATA%g
2536s%@LIBOBJS@%$LIBOBJS%g
2537
2538CEOF
2539EOF
2540
2541cat >> $CONFIG_STATUS <<\EOF
2542
2543# Split the substitutions into bite-sized pieces for seds with
2544# small command number limits, like on Digital OSF/1 and HP-UX.
2545ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2546ac_file=1 # Number of current file.
2547ac_beg=1 # First line for current file.
2548ac_end=$ac_max_sed_cmds # Line after last line for current file.
2549ac_more_lines=:
2550ac_sed_cmds=""
2551while $ac_more_lines; do
2552 if test $ac_beg -gt 1; then
2553 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2554 else
2555 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2556 fi
2557 if test ! -s conftest.s$ac_file; then
2558 ac_more_lines=false
2559 rm -f conftest.s$ac_file
2560 else
2561 if test -z "$ac_sed_cmds"; then
2562 ac_sed_cmds="sed -f conftest.s$ac_file"
2563 else
2564 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2565 fi
2566 ac_file=`expr $ac_file + 1`
2567 ac_beg=$ac_end
2568 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2569 fi
2570done
2571if test -z "$ac_sed_cmds"; then
2572 ac_sed_cmds=cat
2573fi
2574EOF
2575
2576cat >> $CONFIG_STATUS <<EOF
2577
2578CONFIG_FILES=\${CONFIG_FILES-"Makefile $osarch/Makefile"}
2579EOF
2580cat >> $CONFIG_STATUS <<\EOF
2581for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2582 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2583 case "$ac_file" in
2584 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2585 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2586 *) ac_file_in="${ac_file}.in" ;;
2587 esac
2588
2589 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2590
2591 # Remove last slash and all that follows it. Not all systems have dirname.
2592 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2593 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2594 # The file is in a subdirectory.
2595 test ! -d "$ac_dir" && mkdir "$ac_dir"
2596 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2597 # A "../" for each directory in $ac_dir_suffix.
2598 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2599 else
2600 ac_dir_suffix= ac_dots=
2601 fi
2602
2603 case "$ac_given_srcdir" in
2604 .) srcdir=.
2605 if test -z "$ac_dots"; then top_srcdir=.
2606 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2607 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2608 *) # Relative path.
2609 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2610 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2611 esac
2612
2613 case "$ac_given_INSTALL" in
2614 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2615 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2616 esac
2617
2618 echo creating "$ac_file"
2619 rm -f "$ac_file"
2620 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2621 case "$ac_file" in
2622 *Makefile*) ac_comsub="1i\\
2623# $configure_input" ;;
2624 *) ac_comsub= ;;
2625 esac
2626
2627 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2628 sed -e "$ac_comsub
2629s%@configure_input@%$configure_input%g
2630s%@srcdir@%$srcdir%g
2631s%@top_srcdir@%$top_srcdir%g
2632s%@INSTALL@%$INSTALL%g
2633" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2634fi; done
2635rm -f conftest.s*
2636
2637# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2638# NAME is the cpp macro being defined and VALUE is the value it is being given.
2639#
2640# ac_d sets the value in "#define NAME VALUE" lines.
2641ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2642ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2643ac_dC='\3'
2644ac_dD='%g'
2645# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2646ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2647ac_uB='\([ ]\)%\1#\2define\3'
2648ac_uC=' '
2649ac_uD='\4%g'
2650# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2651ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2652ac_eB='$%\1#\2define\3'
2653ac_eC=' '
2654ac_eD='%g'
2655
2656if test "${CONFIG_HEADERS+set}" != set; then
2657EOF
2658cat >> $CONFIG_STATUS <<EOF
2659 CONFIG_HEADERS="config.h"
2660EOF
2661cat >> $CONFIG_STATUS <<\EOF
2662fi
2663for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2664 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2665 case "$ac_file" in
2666 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2667 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2668 *) ac_file_in="${ac_file}.in" ;;
2669 esac
2670
2671 echo creating $ac_file
2672
2673 rm -f conftest.frag conftest.in conftest.out
2674 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2675 cat $ac_file_inputs > conftest.in
2676
2677EOF
2678
2679# Transform confdefs.h into a sed script conftest.vals that substitutes
2680# the proper values into config.h.in to produce config.h. And first:
2681# Protect against being on the right side of a sed subst in config.status.
2682# Protect against being in an unquoted here document in config.status.
2683rm -f conftest.vals
2684cat > conftest.hdr <<\EOF
2685s/[\\&%]/\\&/g
2686s%[\\$`]%\\&%g
2687s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2688s%ac_d%ac_u%gp
2689s%ac_u%ac_e%gp
2690EOF
2691sed -n -f conftest.hdr confdefs.h > conftest.vals
2692rm -f conftest.hdr
2693
2694# This sed command replaces #undef with comments. This is necessary, for
2695# example, in the case of _POSIX_SOURCE, which is predefined and required
2696# on some systems where configure will not decide to define it.
2697cat >> conftest.vals <<\EOF
2698s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2699EOF
2700
2701# Break up conftest.vals because some shells have a limit on
2702# the size of here documents, and old seds have small limits too.
2703
2704rm -f conftest.tail
2705while :
2706do
2707 ac_lines=`grep -c . conftest.vals`
2708 # grep -c gives empty output for an empty file on some AIX systems.
2709 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2710 # Write a limited-size here document to conftest.frag.
2711 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2712 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2713 echo 'CEOF
2714 sed -f conftest.frag conftest.in > conftest.out
2715 rm -f conftest.in
2716 mv conftest.out conftest.in
2717' >> $CONFIG_STATUS
2718 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2719 rm -f conftest.vals
2720 mv conftest.tail conftest.vals
2721done
2722rm -f conftest.vals
2723
2724cat >> $CONFIG_STATUS <<\EOF
2725 rm -f conftest.frag conftest.h
2726 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2727 cat conftest.in >> conftest.h
2728 rm -f conftest.in
2729 if cmp -s $ac_file conftest.h 2>/dev/null; then
2730 echo "$ac_file is unchanged"
2731 rm -f conftest.h
2732 else
2733 # Remove last slash and all that follows it. Not all systems have dirname.
2734 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2735 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2736 # The file is in a subdirectory.
2737 test ! -d "$ac_dir" && mkdir "$ac_dir"
2738 fi
2739 rm -f $ac_file
2740 mv conftest.h $ac_file
2741 fi
2742fi; done
2743
2744EOF
2745cat >> $CONFIG_STATUS <<EOF
2746
2747EOF
2748cat >> $CONFIG_STATUS <<\EOF
2749
2750exit 0
2751EOF
2752chmod +x $CONFIG_STATUS
2753rm -fr confdefs* $ac_clean_files
2754test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2755