source: trunk/third/sysinfo/configure @ 16215

Revision 16215, 139.3 KB checked in by zacheiss, 24 years ago (diff)
On Solaris, build both 32 and 64 bit executables so that we'll work on sun4m and sun4u machines. Compile using sunsoft cc, since gcc doesn't generate 64 bit binaries. Fix configure.in and configure so that we correctly recognize sunsoft cc if $CC is something other than "cc".
  • Property svn:executable set to *
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_default_prefix=$prefix
15ac_help="$ac_help
16  --with-cfdir=DIR        config files in DIR [PREFIX/config]"
17
18# Initialize some variables set by options.
19# The variables have the same names as the options, with
20# dashes changed to underlines.
21build=NONE
22cache_file=./config.cache
23exec_prefix=NONE
24host=NONE
25no_create=
26nonopt=NONE
27no_recursion=
28prefix=NONE
29program_prefix=NONE
30program_suffix=NONE
31program_transform_name=s,x,x,
32silent=
33site=
34srcdir=
35target=NONE
36verbose=
37x_includes=NONE
38x_libraries=NONE
39bindir='${exec_prefix}/bin'
40sbindir='${exec_prefix}/sbin'
41libexecdir='${exec_prefix}/libexec'
42datadir='${prefix}/share'
43sysconfdir='${prefix}/etc'
44sharedstatedir='${prefix}/com'
45localstatedir='${prefix}/var'
46libdir='${exec_prefix}/lib'
47includedir='${prefix}/include'
48oldincludedir='/usr/include'
49infodir='${prefix}/info'
50mandir='${prefix}/man'
51
52# Initialize some other variables.
53subdirs=
54MFLAGS= MAKEFLAGS=
55SHELL=${CONFIG_SHELL-/bin/sh}
56# Maximum number of lines to put in a shell here document.
57ac_max_here_lines=12
58
59ac_prev=
60for ac_option
61do
62
63  # If the previous option needs an argument, assign it.
64  if test -n "$ac_prev"; then
65    eval "$ac_prev=\$ac_option"
66    ac_prev=
67    continue
68  fi
69
70  case "$ac_option" in
71  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72  *) ac_optarg= ;;
73  esac
74
75  # Accept the important Cygnus configure options, so we can diagnose typos.
76
77  case "$ac_option" in
78
79  -bindir | --bindir | --bindi | --bind | --bin | --bi)
80    ac_prev=bindir ;;
81  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82    bindir="$ac_optarg" ;;
83
84  -build | --build | --buil | --bui | --bu)
85    ac_prev=build ;;
86  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87    build="$ac_optarg" ;;
88
89  -cache-file | --cache-file | --cache-fil | --cache-fi \
90  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91    ac_prev=cache_file ;;
92  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94    cache_file="$ac_optarg" ;;
95
96  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97    ac_prev=datadir ;;
98  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99  | --da=*)
100    datadir="$ac_optarg" ;;
101
102  -disable-* | --disable-*)
103    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104    # Reject names that are not valid shell variable names.
105    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107    fi
108    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109    eval "enable_${ac_feature}=no" ;;
110
111  -enable-* | --enable-*)
112    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113    # Reject names that are not valid shell variable names.
114    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116    fi
117    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118    case "$ac_option" in
119      *=*) ;;
120      *) ac_optarg=yes ;;
121    esac
122    eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126  | --exec | --exe | --ex)
127    ac_prev=exec_prefix ;;
128  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130  | --exec=* | --exe=* | --ex=*)
131    exec_prefix="$ac_optarg" ;;
132
133  -gas | --gas | --ga | --g)
134    # Obsolete; use --with-gas.
135    with_gas=yes ;;
136
137  -help | --help | --hel | --he)
138    # Omit some internal or obsolete options to make the list less imposing.
139    # This message is too long to be a string in the A/UX 3.1 sh.
140    cat << EOF
141Usage: configure [options] [host]
142Options: [defaults in brackets after descriptions]
143Configuration:
144  --cache-file=FILE       cache test results in FILE
145  --help                  print this message
146  --no-create             do not create output files
147  --quiet, --silent       do not print \`checking...' messages
148  --version               print the version of autoconf that created configure
149Directory and file names:
150  --prefix=PREFIX         install architecture-independent files in PREFIX
151                          [$ac_default_prefix]
152  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
153                          [same as prefix]
154  --bindir=DIR            user executables in DIR [EPREFIX/bin]
155  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
156  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
157  --datadir=DIR           read-only architecture-independent data in DIR
158                          [PREFIX/share]
159  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
160  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
161                          [PREFIX/com]
162  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
163  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
164  --includedir=DIR        C header files in DIR [PREFIX/include]
165  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
166  --infodir=DIR           info documentation in DIR [PREFIX/info]
167  --mandir=DIR            man documentation in DIR [PREFIX/man]
168  --srcdir=DIR            find the sources in DIR [configure dir or ..]
169  --program-prefix=PREFIX prepend PREFIX to installed program names
170  --program-suffix=SUFFIX append SUFFIX to installed program names
171  --program-transform-name=PROGRAM
172                          run sed PROGRAM on installed program names
173EOF
174    cat << EOF
175Host type:
176  --build=BUILD           configure for building on BUILD [BUILD=HOST]
177  --host=HOST             configure for HOST [guessed]
178  --target=TARGET         configure for TARGET [TARGET=HOST]
179Features and packages:
180  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
181  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
182  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
183  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
184  --x-includes=DIR        X include files are in DIR
185  --x-libraries=DIR       X library files are in DIR
186EOF
187    if test -n "$ac_help"; then
188      echo "--enable and --with options recognized:$ac_help"
189    fi
190    exit 0 ;;
191
192  -host | --host | --hos | --ho)
193    ac_prev=host ;;
194  -host=* | --host=* | --hos=* | --ho=*)
195    host="$ac_optarg" ;;
196
197  -includedir | --includedir | --includedi | --included | --include \
198  | --includ | --inclu | --incl | --inc)
199    ac_prev=includedir ;;
200  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201  | --includ=* | --inclu=* | --incl=* | --inc=*)
202    includedir="$ac_optarg" ;;
203
204  -infodir | --infodir | --infodi | --infod | --info | --inf)
205    ac_prev=infodir ;;
206  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207    infodir="$ac_optarg" ;;
208
209  -libdir | --libdir | --libdi | --libd)
210    ac_prev=libdir ;;
211  -libdir=* | --libdir=* | --libdi=* | --libd=*)
212    libdir="$ac_optarg" ;;
213
214  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215  | --libexe | --libex | --libe)
216    ac_prev=libexecdir ;;
217  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218  | --libexe=* | --libex=* | --libe=*)
219    libexecdir="$ac_optarg" ;;
220
221  -localstatedir | --localstatedir | --localstatedi | --localstated \
222  | --localstate | --localstat | --localsta | --localst \
223  | --locals | --local | --loca | --loc | --lo)
224    ac_prev=localstatedir ;;
225  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228    localstatedir="$ac_optarg" ;;
229
230  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231    ac_prev=mandir ;;
232  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233    mandir="$ac_optarg" ;;
234
235  -nfp | --nfp | --nf)
236    # Obsolete; use --without-fp.
237    with_fp=no ;;
238
239  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240  | --no-cr | --no-c)
241    no_create=yes ;;
242
243  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245    no_recursion=yes ;;
246
247  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249  | --oldin | --oldi | --old | --ol | --o)
250    ac_prev=oldincludedir ;;
251  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254    oldincludedir="$ac_optarg" ;;
255
256  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257    ac_prev=prefix ;;
258  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259    prefix="$ac_optarg" ;;
260
261  -program-prefix | --program-prefix | --program-prefi | --program-pref \
262  | --program-pre | --program-pr | --program-p)
263    ac_prev=program_prefix ;;
264  -program-prefix=* | --program-prefix=* | --program-prefi=* \
265  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266    program_prefix="$ac_optarg" ;;
267
268  -program-suffix | --program-suffix | --program-suffi | --program-suff \
269  | --program-suf | --program-su | --program-s)
270    ac_prev=program_suffix ;;
271  -program-suffix=* | --program-suffix=* | --program-suffi=* \
272  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273    program_suffix="$ac_optarg" ;;
274
275  -program-transform-name | --program-transform-name \
276  | --program-transform-nam | --program-transform-na \
277  | --program-transform-n | --program-transform- \
278  | --program-transform | --program-transfor \
279  | --program-transfo | --program-transf \
280  | --program-trans | --program-tran \
281  | --progr-tra | --program-tr | --program-t)
282    ac_prev=program_transform_name ;;
283  -program-transform-name=* | --program-transform-name=* \
284  | --program-transform-nam=* | --program-transform-na=* \
285  | --program-transform-n=* | --program-transform-=* \
286  | --program-transform=* | --program-transfor=* \
287  | --program-transfo=* | --program-transf=* \
288  | --program-trans=* | --program-tran=* \
289  | --progr-tra=* | --program-tr=* | --program-t=*)
290    program_transform_name="$ac_optarg" ;;
291
292  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293  | -silent | --silent | --silen | --sile | --sil)
294    silent=yes ;;
295
296  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297    ac_prev=sbindir ;;
298  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299  | --sbi=* | --sb=*)
300    sbindir="$ac_optarg" ;;
301
302  -sharedstatedir | --sharedstatedir | --sharedstatedi \
303  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304  | --sharedst | --shareds | --shared | --share | --shar \
305  | --sha | --sh)
306    ac_prev=sharedstatedir ;;
307  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310  | --sha=* | --sh=*)
311    sharedstatedir="$ac_optarg" ;;
312
313  -site | --site | --sit)
314    ac_prev=site ;;
315  -site=* | --site=* | --sit=*)
316    site="$ac_optarg" ;;
317
318  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319    ac_prev=srcdir ;;
320  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321    srcdir="$ac_optarg" ;;
322
323  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324  | --syscon | --sysco | --sysc | --sys | --sy)
325    ac_prev=sysconfdir ;;
326  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328    sysconfdir="$ac_optarg" ;;
329
330  -target | --target | --targe | --targ | --tar | --ta | --t)
331    ac_prev=target ;;
332  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333    target="$ac_optarg" ;;
334
335  -v | -verbose | --verbose | --verbos | --verbo | --verb)
336    verbose=yes ;;
337
338  -version | --version | --versio | --versi | --vers)
339    echo "configure generated by autoconf version 2.13"
340    exit 0 ;;
341
342  -with-* | --with-*)
343    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344    # Reject names that are not valid shell variable names.
345    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347    fi
348    ac_package=`echo $ac_package| sed 's/-/_/g'`
349    case "$ac_option" in
350      *=*) ;;
351      *) ac_optarg=yes ;;
352    esac
353    eval "with_${ac_package}='$ac_optarg'" ;;
354
355  -without-* | --without-*)
356    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357    # Reject names that are not valid shell variable names.
358    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360    fi
361    ac_package=`echo $ac_package| sed 's/-/_/g'`
362    eval "with_${ac_package}=no" ;;
363
364  --x)
365    # Obsolete; use --with-x.
366    with_x=yes ;;
367
368  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369  | --x-incl | --x-inc | --x-in | --x-i)
370    ac_prev=x_includes ;;
371  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373    x_includes="$ac_optarg" ;;
374
375  -x-libraries | --x-libraries | --x-librarie | --x-librari \
376  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377    ac_prev=x_libraries ;;
378  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380    x_libraries="$ac_optarg" ;;
381
382  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383    ;;
384
385  *)
386    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387      echo "configure: warning: $ac_option: invalid host type" 1>&2
388    fi
389    if test "x$nonopt" != xNONE; then
390      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391    fi
392    nonopt="$ac_option"
393    ;;
394
395  esac
396done
397
398if test -n "$ac_prev"; then
399  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400fi
401
402trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404# File descriptor usage:
405# 0 standard input
406# 1 file creation
407# 2 errors and warnings
408# 3 some systems may open it to /dev/tty
409# 4 used on the Kubota Titan
410# 6 checking for... messages and results
411# 5 compiler messages saved in config.log
412if test "$silent" = yes; then
413  exec 6>/dev/null
414else
415  exec 6>&1
416fi
417exec 5>./config.log
418
419echo "\
420This file contains any messages produced by compilers while
421running configure, to aid debugging if configure makes a mistake.
422" 1>&5
423
424# Strip out --no-create and --no-recursion so they do not pile up.
425# Also quote any args containing shell metacharacters.
426ac_configure_args=
427for ac_arg
428do
429  case "$ac_arg" in
430  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431  | --no-cr | --no-c) ;;
432  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437  esac
438done
439
440# NLS nuisances.
441# Only set these to C if already set.  These must not be set unconditionally
442# because not all systems understand e.g. LANG=C (notably SCO).
443# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
444# Non-C LC_CTYPE values break the ctype check.
445if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
446if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
447if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
448if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
449
450# confdefs.h avoids OS command line length limits that DEFS can exceed.
451rm -rf conftest* confdefs.h
452# AIX cpp loses on an empty file, so make sure it contains at least a newline.
453echo > confdefs.h
454
455# A filename unique to this package, relative to the directory that
456# configure is in, which we can look for to find out if srcdir is correct.
457ac_unique_file=include/mcsysinfo.h
458
459# Find the source files, if location was not specified.
460if test -z "$srcdir"; then
461  ac_srcdir_defaulted=yes
462  # Try the directory containing this script, then its parent.
463  ac_prog=$0
464  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
465  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
466  srcdir=$ac_confdir
467  if test ! -r $srcdir/$ac_unique_file; then
468    srcdir=..
469  fi
470else
471  ac_srcdir_defaulted=no
472fi
473if test ! -r $srcdir/$ac_unique_file; then
474  if test "$ac_srcdir_defaulted" = yes; then
475    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
476  else
477    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
478  fi
479fi
480srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
481
482# Prefer explicitly selected file to automatically selected ones.
483if test -z "$CONFIG_SITE"; then
484  if test "x$prefix" != xNONE; then
485    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
486  else
487    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
488  fi
489fi
490for ac_site_file in $CONFIG_SITE; do
491  if test -r "$ac_site_file"; then
492    echo "loading site script $ac_site_file"
493    . "$ac_site_file"
494  fi
495done
496
497if test -r "$cache_file"; then
498  echo "loading cache $cache_file"
499  . $cache_file
500else
501  echo "creating cache $cache_file"
502  > $cache_file
503fi
504
505ac_ext=c
506# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
507ac_cpp='$CPP $CPPFLAGS'
508ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
509ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
510cross_compiling=$ac_cv_prog_cc_cross
511
512ac_exeext=
513ac_objext=o
514if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517    ac_n= ac_c='
518' ac_t='        '
519  else
520    ac_n=-n ac_c= ac_t=
521  fi
522else
523  ac_n= ac_c='\c' ac_t=
524fi
525
526
527
528echo $ac_n "checking OS name""... $ac_c" 1>&6
529echo "configure:530: checking OS name" >&5
530osname=`$srcdir/build/buildinfo -osname`
531osnameReal=$osname
532case "${osname}" in
533        irix*)
534                # Change irix64 to irix
535                osname="irix";
536                ;;
537esac
538
539if test "$osname" = "$osnameReal"; then
540        osinfodef="-D${osname}"
541else
542        osinfodef="-D${osname} -D${osnameReal}"
543fi
544
545
546
547cat >> confdefs.h <<EOF
548#define ${osname} 1
549EOF
550
551echo "$ac_t""$osname" 1>&6
552
553echo $ac_n "checking OS version""... $ac_c" 1>&6
554echo "configure:555: checking OS version" >&5
555osver=`$srcdir/build/buildinfo -osvernodot`
556
557cat >> confdefs.h <<EOF
558#define OSVER $osver
559EOF
560
561echo "$ac_t""$osver" 1>&6
562
563echo $ac_n "checking OS name + major version""... $ac_c" 1>&6
564echo "configure:565: checking OS name + major version" >&5
565ostype=`$srcdir/build/buildinfo -osnamemver`
566case "${ostype}" in
567        irix64*)
568                # Change irix64 to irix
569                ostype=`echo $ostype | sed -e 's;irix64;irix;'`
570                ;;
571esac
572
573cat >> confdefs.h <<EOF
574#define OSTYPE "$ostype"
575EOF
576
577echo "$ac_t""$ostype" 1>&6
578
579echo $ac_n "checking OS major version""... $ac_c" 1>&6
580echo "configure:581: checking OS major version" >&5
581osmver=`$srcdir/build/buildinfo -osmver`
582
583cat >> confdefs.h <<EOF
584#define OSMVER $osmver
585EOF
586
587echo "$ac_t""$osmver" 1>&6
588
589echo $ac_n "checking kernel instruction set arch""... $ac_c" 1>&6
590echo "configure:591: checking kernel instruction set arch" >&5
591if test ! -z "$KISA"; then
592        kisa=$KISA
593else
594        kisa=`$srcdir/build/buildinfo -kisa`
595fi
596
597cat >> confdefs.h <<EOF
598#define KISA "$kisa"
599EOF
600
601echo "$ac_t""$kisa" 1>&6
602
603
604OSNAMEmf=$srcdir/lib/os/$osname/$osname.mf
605
606OSNAMEMVERmf=$srcdir/lib/os/$osname/${osname}${osmver}.mf
607
608OSNAMEVERmf=$srcdir/lib/os/$osname/${osname}${osver}.mf
609
610echo $ac_n "checking prefix""... $ac_c" 1>&6
611echo "configure:612: checking prefix" >&5
612defaultprefix=/usr/local/sysinfo
613case "${kisa}-${osname}-${osver}" in
614        *-aix-*)
615                defaultprefix="/opt/sysinfo";
616                ;;
617        *-hpux-*)
618                defaultprefix="/opt/sysinfo";
619                ;;
620        *-irix-*)
621                defaultprefix="/opt/sysinfo";
622                if test "$CC" = "cc"; then
623                        CFLAGS="$CFLAGS -woff 1174,1552"
624                fi
625                ;;
626        *-sunos-*)
627                if test $osmver -ge 5 ; then
628                        defaultprefix="/opt/sysinfo";
629                fi
630                ;;
631esac
632if test -z "$prefix" -o "$prefix" = "NONE"; then
633        prefix=$defaultprefix
634fi
635
636echo "$ac_t""$prefix" 1>&6
637
638echo $ac_n "checking cfdir""... $ac_c" 1>&6
639echo "configure:640: checking cfdir" >&5
640# Check whether --with-cfdir or --without-cfdir was given.
641if test "${with_cfdir+set}" = set; then
642  withval="$with_cfdir"
643  cfdir=$withval
644else
645  cfdir=$prefix/config
646fi
647
648
649cat >> confdefs.h <<EOF
650#define CFDIR "$cfdir"
651EOF
652
653echo "$ac_t""$cfdir" 1>&6
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
658echo "configure:659: checking for $ac_word" >&5
659if 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
665  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
666  ac_dummy="$PATH"
667  for ac_dir in $ac_dummy; do
668    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
688echo "configure:689: checking for $ac_word" >&5
689if 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
695  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
696  ac_prog_rejected=no
697  ac_dummy="$PATH"
698  for ac_dir in $ac_dummy; do
699    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
733  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
767  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
771echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
772
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'
777ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
778cross_compiling=$ac_cv_prog_cc_cross
779
780cat > conftest.$ac_ext << EOF
781
782#line 783 "configure"
783#include "confdefs.h"
784
785main(){return(0);}
786EOF
787if { (eval echo configure:788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
788  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*
801ac_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
807
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
813echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
814echo "$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
818echo "configure:819: checking whether we are using GNU C" >&5
819if 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
827if { 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
828  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
838else
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
847if 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
861if 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
865    CFLAGS="-g -O2"
866  else
867    CFLAGS="-g"
868  fi
869else
870  if test "$GCC" = yes; then
871    CFLAGS="-O2"
872  else
873    CFLAGS=
874  fi
875fi
876
877if test "$osname" = "sunos" && test $osver -ge 57 && \
878        test "$kisa" = "sparcv9"; then
879        case "$CC" in
880                *gcc*)
881                        ORIG_CFLAGS=$CFLAGS
882                        xarch="-m64"
883                        ans="no"
884                        CFLAGS="$CFLAGS $xarch"
885                        echo $ac_n "checking whether $CC supports $xarch""... $ac_c" 1>&6
886echo "configure:887: checking whether $CC supports $xarch" >&5
887                        cat > conftest.$ac_ext <<EOF
888#line 889 "configure"
889#include "confdefs.h"
890
891int main() {
892
893; return 0; }
894EOF
895if { (eval echo configure:896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
896  rm -rf conftest*
897  ans="yes"
898else
899  echo "configure: failed program was:" >&5
900  cat conftest.$ac_ext >&5
901  rm -rf conftest*
902  CFLAGS="$ORIG_CFLAGS"
903fi
904rm -f conftest*
905                        echo "$ac_t""$ans" 1>&6
906                        ;;
907                cc|*/cc)
908                        ORIG_CFLAGS=$CFLAGS
909                        xarch="-xarch=v9"
910                        ans="no"
911                        CFLAGS="$CFLAGS $xarch"
912                        echo $ac_n "checking whether $CC supports $xarch""... $ac_c" 1>&6
913echo "configure:914: checking whether $CC supports $xarch" >&5
914                        cat > conftest.$ac_ext <<EOF
915#line 916 "configure"
916#include "confdefs.h"
917
918int main() {
919
920; return 0; }
921EOF
922if { (eval echo configure:923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
923  rm -rf conftest*
924  ans="yes"
925else
926  echo "configure: failed program was:" >&5
927  cat conftest.$ac_ext >&5
928  rm -rf conftest*
929  CFLAGS="$ORIG_CFLAGS"
930fi
931rm -f conftest*
932                        echo "$ac_t""$ans" 1>&6
933                        ;;
934        esac
935        if test "$ans" = "no"; then
936                cat <<__MSG__
937
938WARNING: You must use Sun WorkShop (Forte) C Compiler 5.0 or later or
939Gnu GCC 2.95.2 or later that supports 64-bit compiles if you wish to
940compile SysInfo on a 64-bit Sun system.
941
942To compile using Sun WorkShop C Compiler, set the environment variable \$CC
943to the Sun WorkShop C Compiler program, then rerun \`configure'.
944
945__MSG__
946        fi
947fi
948
949for ac_prog in mawk gawk nawk awk
950do
951# Extract the first word of "$ac_prog", so it can be a program name with args.
952set dummy $ac_prog; ac_word=$2
953echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
954echo "configure:955: checking for $ac_word" >&5
955if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
956  echo $ac_n "(cached) $ac_c" 1>&6
957else
958  if test -n "$AWK"; then
959  ac_cv_prog_AWK="$AWK" # Let the user override the test.
960else
961  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
962  ac_dummy="$PATH"
963  for ac_dir in $ac_dummy; do
964    test -z "$ac_dir" && ac_dir=.
965    if test -f $ac_dir/$ac_word; then
966      ac_cv_prog_AWK="$ac_prog"
967      break
968    fi
969  done
970  IFS="$ac_save_ifs"
971fi
972fi
973AWK="$ac_cv_prog_AWK"
974if test -n "$AWK"; then
975  echo "$ac_t""$AWK" 1>&6
976else
977  echo "$ac_t""no" 1>&6
978fi
979
980test -n "$AWK" && break
981done
982
983echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
984echo "configure:985: checking whether ln -s works" >&5
985if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
986  echo $ac_n "(cached) $ac_c" 1>&6
987else
988  rm -f conftestdata
989if ln -s X conftestdata 2>/dev/null
990then
991  rm -f conftestdata
992  ac_cv_prog_LN_S="ln -s"
993else
994  ac_cv_prog_LN_S=ln
995fi
996fi
997LN_S="$ac_cv_prog_LN_S"
998if test "$ac_cv_prog_LN_S" = "ln -s"; then
999  echo "$ac_t""yes" 1>&6
1000else
1001  echo "$ac_t""no" 1>&6
1002fi
1003
1004ac_aux_dir=
1005for ac_dir in build $srcdir/build; do
1006  if test -f $ac_dir/install-sh; then
1007    ac_aux_dir=$ac_dir
1008    ac_install_sh="$ac_aux_dir/install-sh -c"
1009    break
1010  elif test -f $ac_dir/install.sh; then
1011    ac_aux_dir=$ac_dir
1012    ac_install_sh="$ac_aux_dir/install.sh -c"
1013    break
1014  fi
1015done
1016if test -z "$ac_aux_dir"; then
1017  { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
1018fi
1019ac_config_guess=$ac_aux_dir/config.guess
1020ac_config_sub=$ac_aux_dir/config.sub
1021ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1022
1023# Find a good install program.  We prefer a C program (faster),
1024# so one script is as good as another.  But avoid the broken or
1025# incompatible versions:
1026# SysV /etc/install, /usr/sbin/install
1027# SunOS /usr/etc/install
1028# IRIX /sbin/install
1029# AIX /bin/install
1030# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1031# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1032# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1033# ./install, which can be erroneously created by make from ./install.sh.
1034echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1035echo "configure:1036: checking for a BSD compatible install" >&5
1036if test -z "$INSTALL"; then
1037if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1038  echo $ac_n "(cached) $ac_c" 1>&6
1039else
1040    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1041  for ac_dir in $PATH; do
1042    # Account for people who put trailing slashes in PATH elements.
1043    case "$ac_dir/" in
1044    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1045    *)
1046      # OSF1 and SCO ODT 3.0 have their own names for install.
1047      # Don't use installbsd from OSF since it installs stuff as root
1048      # by default.
1049      for ac_prog in ginstall scoinst install; do
1050        if test -f $ac_dir/$ac_prog; then
1051          if test $ac_prog = install &&
1052            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1053            # AIX install.  It has an incompatible calling convention.
1054            :
1055          else
1056            ac_cv_path_install="$ac_dir/$ac_prog -c"
1057            break 2
1058          fi
1059        fi
1060      done
1061      ;;
1062    esac
1063  done
1064  IFS="$ac_save_IFS"
1065
1066fi
1067  if test "${ac_cv_path_install+set}" = set; then
1068    INSTALL="$ac_cv_path_install"
1069  else
1070    # As a last resort, use the slow shell script.  We don't cache a
1071    # path for INSTALL within a source directory, because that will
1072    # break other packages using the cache if that directory is
1073    # removed, or if the path is relative.
1074    INSTALL="$ac_install_sh"
1075  fi
1076fi
1077echo "$ac_t""$INSTALL" 1>&6
1078
1079# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1080# It thinks the first close brace ends the variable substitution.
1081test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1082
1083test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1084
1085test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1086
1087# Extract the first word of "ranlib", so it can be a program name with args.
1088set dummy ranlib; ac_word=$2
1089echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1090echo "configure:1091: checking for $ac_word" >&5
1091if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1092  echo $ac_n "(cached) $ac_c" 1>&6
1093else
1094  if test -n "$RANLIB"; then
1095  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1096else
1097  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1098  ac_dummy="$PATH"
1099  for ac_dir in $ac_dummy; do
1100    test -z "$ac_dir" && ac_dir=.
1101    if test -f $ac_dir/$ac_word; then
1102      ac_cv_prog_RANLIB="ranlib"
1103      break
1104    fi
1105  done
1106  IFS="$ac_save_ifs"
1107  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1108fi
1109fi
1110RANLIB="$ac_cv_prog_RANLIB"
1111if test -n "$RANLIB"; then
1112  echo "$ac_t""$RANLIB" 1>&6
1113else
1114  echo "$ac_t""no" 1>&6
1115fi
1116
1117# Extract the first word of "ar", so it can be a program name with args.
1118set dummy ar; ac_word=$2
1119echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1120echo "configure:1121: checking for $ac_word" >&5
1121if eval "test \"`echo '$''{'ac_cv_path_ar'+set}'`\" = set"; then
1122  echo $ac_n "(cached) $ac_c" 1>&6
1123else
1124  case "$ar" in
1125  /*)
1126  ac_cv_path_ar="$ar" # Let the user override the test with a path.
1127  ;;
1128  ?:/*)                 
1129  ac_cv_path_ar="$ar" # Let the user override the test with a dos path.
1130  ;;
1131  *)
1132  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1133  ac_dummy="$PATH:/usr/ccs/bin:/bin:/usr/bin:/usr/local/bin"
1134  for ac_dir in $ac_dummy; do
1135    test -z "$ac_dir" && ac_dir=.
1136    if test -f $ac_dir/$ac_word; then
1137      ac_cv_path_ar="$ac_dir/$ac_word"
1138      break
1139    fi
1140  done
1141  IFS="$ac_save_ifs"
1142  test -z "$ac_cv_path_ar" && ac_cv_path_ar="no"
1143  ;;
1144esac
1145fi
1146ar="$ac_cv_path_ar"
1147if test -n "$ar"; then
1148  echo "$ac_t""$ar" 1>&6
1149else
1150  echo "$ac_t""no" 1>&6
1151fi
1152
1153if test -z "$ar" -o "$ar" = "no"; then
1154        cat <<__ERRMSG__
1155Cannot find the "ar" program.  Adjust your \$PATH to include
1156it's location and rerun $0
1157__ERRMSG__
1158        exit 1
1159fi
1160
1161echo $ac_n "checking for volmgt_acquire in -lvolmgt""... $ac_c" 1>&6
1162echo "configure:1163: checking for volmgt_acquire in -lvolmgt" >&5
1163ac_lib_var=`echo volmgt'_'volmgt_acquire | sed 'y%./+-%__p_%'`
1164if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1165  echo $ac_n "(cached) $ac_c" 1>&6
1166else
1167  ac_save_LIBS="$LIBS"
1168LIBS="-lvolmgt  $LIBS"
1169cat > conftest.$ac_ext <<EOF
1170#line 1171 "configure"
1171#include "confdefs.h"
1172/* Override any gcc2 internal prototype to avoid an error.  */
1173/* We use char because int might match the return type of a gcc2
1174    builtin and then its argument prototype would still apply.  */
1175char volmgt_acquire();
1176
1177int main() {
1178volmgt_acquire()
1179; return 0; }
1180EOF
1181if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1182  rm -rf conftest*
1183  eval "ac_cv_lib_$ac_lib_var=yes"
1184else
1185  echo "configure: failed program was:" >&5
1186  cat conftest.$ac_ext >&5
1187  rm -rf conftest*
1188  eval "ac_cv_lib_$ac_lib_var=no"
1189fi
1190rm -f conftest*
1191LIBS="$ac_save_LIBS"
1192
1193fi
1194if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1195  echo "$ac_t""yes" 1>&6
1196    ac_tr_lib=HAVE_LIB`echo volmgt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1197    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1198  cat >> confdefs.h <<EOF
1199#define $ac_tr_lib 1
1200EOF
1201
1202  LIBS="-lvolmgt $LIBS"
1203
1204else
1205  echo "$ac_t""no" 1>&6
1206fi
1207
1208echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1209echo "configure:1210: checking for socket in -lsocket" >&5
1210ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1211if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1212  echo $ac_n "(cached) $ac_c" 1>&6
1213else
1214  ac_save_LIBS="$LIBS"
1215LIBS="-lsocket -lnsl $LIBS"
1216cat > conftest.$ac_ext <<EOF
1217#line 1218 "configure"
1218#include "confdefs.h"
1219/* Override any gcc2 internal prototype to avoid an error.  */
1220/* We use char because int might match the return type of a gcc2
1221    builtin and then its argument prototype would still apply.  */
1222char socket();
1223
1224int main() {
1225socket()
1226; return 0; }
1227EOF
1228if { (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1229  rm -rf conftest*
1230  eval "ac_cv_lib_$ac_lib_var=yes"
1231else
1232  echo "configure: failed program was:" >&5
1233  cat conftest.$ac_ext >&5
1234  rm -rf conftest*
1235  eval "ac_cv_lib_$ac_lib_var=no"
1236fi
1237rm -f conftest*
1238LIBS="$ac_save_LIBS"
1239
1240fi
1241if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1242  echo "$ac_t""yes" 1>&6
1243    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1244    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1245  cat >> confdefs.h <<EOF
1246#define $ac_tr_lib 1
1247EOF
1248
1249  LIBS="-lsocket $LIBS"
1250
1251else
1252  echo "$ac_t""no" 1>&6
1253fi
1254
1255echo $ac_n "checking for elf_version in -lelf""... $ac_c" 1>&6
1256echo "configure:1257: checking for elf_version in -lelf" >&5
1257ac_lib_var=`echo elf'_'elf_version | sed 'y%./+-%__p_%'`
1258if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1259  echo $ac_n "(cached) $ac_c" 1>&6
1260else
1261  ac_save_LIBS="$LIBS"
1262LIBS="-lelf  $LIBS"
1263cat > conftest.$ac_ext <<EOF
1264#line 1265 "configure"
1265#include "confdefs.h"
1266/* Override any gcc2 internal prototype to avoid an error.  */
1267/* We use char because int might match the return type of a gcc2
1268    builtin and then its argument prototype would still apply.  */
1269char elf_version();
1270
1271int main() {
1272elf_version()
1273; return 0; }
1274EOF
1275if { (eval echo configure:1276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1276  rm -rf conftest*
1277  eval "ac_cv_lib_$ac_lib_var=yes"
1278else
1279  echo "configure: failed program was:" >&5
1280  cat conftest.$ac_ext >&5
1281  rm -rf conftest*
1282  eval "ac_cv_lib_$ac_lib_var=no"
1283fi
1284rm -f conftest*
1285LIBS="$ac_save_LIBS"
1286
1287fi
1288if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1289  echo "$ac_t""yes" 1>&6
1290    ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1291    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1292  cat >> confdefs.h <<EOF
1293#define $ac_tr_lib 1
1294EOF
1295
1296  LIBS="-lelf $LIBS"
1297
1298else
1299  echo "$ac_t""no" 1>&6
1300fi
1301
1302echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6
1303echo "configure:1304: checking for kvm_open in -lkvm" >&5
1304ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'`
1305if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1306  echo $ac_n "(cached) $ac_c" 1>&6
1307else
1308  ac_save_LIBS="$LIBS"
1309LIBS="-lkvm  $LIBS"
1310cat > conftest.$ac_ext <<EOF
1311#line 1312 "configure"
1312#include "confdefs.h"
1313/* Override any gcc2 internal prototype to avoid an error.  */
1314/* We use char because int might match the return type of a gcc2
1315    builtin and then its argument prototype would still apply.  */
1316char kvm_open();
1317
1318int main() {
1319kvm_open()
1320; return 0; }
1321EOF
1322if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1323  rm -rf conftest*
1324  eval "ac_cv_lib_$ac_lib_var=yes"
1325else
1326  echo "configure: failed program was:" >&5
1327  cat conftest.$ac_ext >&5
1328  rm -rf conftest*
1329  eval "ac_cv_lib_$ac_lib_var=no"
1330fi
1331rm -f conftest*
1332LIBS="$ac_save_LIBS"
1333
1334fi
1335if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1336  echo "$ac_t""yes" 1>&6
1337    ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1338    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1339  cat >> confdefs.h <<EOF
1340#define $ac_tr_lib 1
1341EOF
1342
1343  LIBS="-lkvm $LIBS"
1344
1345else
1346  echo "$ac_t""no" 1>&6
1347$LIBS
1348fi
1349
1350echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
1351echo "configure:1352: checking for res_init in -lresolv" >&5
1352ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
1353if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1354  echo $ac_n "(cached) $ac_c" 1>&6
1355else
1356  ac_save_LIBS="$LIBS"
1357LIBS="-lresolv  $LIBS"
1358cat > conftest.$ac_ext <<EOF
1359#line 1360 "configure"
1360#include "confdefs.h"
1361/* Override any gcc2 internal prototype to avoid an error.  */
1362/* We use char because int might match the return type of a gcc2
1363    builtin and then its argument prototype would still apply.  */
1364char res_init();
1365
1366int main() {
1367res_init()
1368; return 0; }
1369EOF
1370if { (eval echo configure:1371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1371  rm -rf conftest*
1372  eval "ac_cv_lib_$ac_lib_var=yes"
1373else
1374  echo "configure: failed program was:" >&5
1375  cat conftest.$ac_ext >&5
1376  rm -rf conftest*
1377  eval "ac_cv_lib_$ac_lib_var=no"
1378fi
1379rm -f conftest*
1380LIBS="$ac_save_LIBS"
1381
1382fi
1383if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1384  echo "$ac_t""yes" 1>&6
1385    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1386    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1387  cat >> confdefs.h <<EOF
1388#define $ac_tr_lib 1
1389EOF
1390
1391  LIBS="-lresolv $LIBS"
1392
1393else
1394  echo "$ac_t""no" 1>&6
1395fi
1396
1397echo $ac_n "checking for exp in -lm""... $ac_c" 1>&6
1398echo "configure:1399: checking for exp in -lm" >&5
1399ac_lib_var=`echo m'_'exp | sed 'y%./+-%__p_%'`
1400if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1401  echo $ac_n "(cached) $ac_c" 1>&6
1402else
1403  ac_save_LIBS="$LIBS"
1404LIBS="-lm  $LIBS"
1405cat > conftest.$ac_ext <<EOF
1406#line 1407 "configure"
1407#include "confdefs.h"
1408/* Override any gcc2 internal prototype to avoid an error.  */
1409/* We use char because int might match the return type of a gcc2
1410    builtin and then its argument prototype would still apply.  */
1411char exp();
1412
1413int main() {
1414exp()
1415; return 0; }
1416EOF
1417if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1418  rm -rf conftest*
1419  eval "ac_cv_lib_$ac_lib_var=yes"
1420else
1421  echo "configure: failed program was:" >&5
1422  cat conftest.$ac_ext >&5
1423  rm -rf conftest*
1424  eval "ac_cv_lib_$ac_lib_var=no"
1425fi
1426rm -f conftest*
1427LIBS="$ac_save_LIBS"
1428
1429fi
1430if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1431  echo "$ac_t""yes" 1>&6
1432    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1433    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1434  cat >> confdefs.h <<EOF
1435#define $ac_tr_lib 1
1436EOF
1437
1438  LIBS="-lm $LIBS"
1439
1440else
1441  echo "$ac_t""no" 1>&6
1442fi
1443
1444echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
1445echo "configure:1446: checking for kstat_open in -lkstat" >&5
1446ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
1447if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1448  echo $ac_n "(cached) $ac_c" 1>&6
1449else
1450  ac_save_LIBS="$LIBS"
1451LIBS="-lkstat  $LIBS"
1452cat > conftest.$ac_ext <<EOF
1453#line 1454 "configure"
1454#include "confdefs.h"
1455/* Override any gcc2 internal prototype to avoid an error.  */
1456/* We use char because int might match the return type of a gcc2
1457    builtin and then its argument prototype would still apply.  */
1458char kstat_open();
1459
1460int main() {
1461kstat_open()
1462; return 0; }
1463EOF
1464if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1465  rm -rf conftest*
1466  eval "ac_cv_lib_$ac_lib_var=yes"
1467else
1468  echo "configure: failed program was:" >&5
1469  cat conftest.$ac_ext >&5
1470  rm -rf conftest*
1471  eval "ac_cv_lib_$ac_lib_var=no"
1472fi
1473rm -f conftest*
1474LIBS="$ac_save_LIBS"
1475
1476fi
1477if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1478  echo "$ac_t""yes" 1>&6
1479    ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1480    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1481  cat >> confdefs.h <<EOF
1482#define $ac_tr_lib 1
1483EOF
1484
1485  LIBS="-lkstat $LIBS"
1486
1487else
1488  echo "$ac_t""no" 1>&6
1489fi
1490
1491echo $ac_n "checking for cam_open_device in -lcam""... $ac_c" 1>&6
1492echo "configure:1493: checking for cam_open_device in -lcam" >&5
1493ac_lib_var=`echo cam'_'cam_open_device | sed 'y%./+-%__p_%'`
1494if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1495  echo $ac_n "(cached) $ac_c" 1>&6
1496else
1497  ac_save_LIBS="$LIBS"
1498LIBS="-lcam  $LIBS"
1499cat > conftest.$ac_ext <<EOF
1500#line 1501 "configure"
1501#include "confdefs.h"
1502/* Override any gcc2 internal prototype to avoid an error.  */
1503/* We use char because int might match the return type of a gcc2
1504    builtin and then its argument prototype would still apply.  */
1505char cam_open_device();
1506
1507int main() {
1508cam_open_device()
1509; return 0; }
1510EOF
1511if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1512  rm -rf conftest*
1513  eval "ac_cv_lib_$ac_lib_var=yes"
1514else
1515  echo "configure: failed program was:" >&5
1516  cat conftest.$ac_ext >&5
1517  rm -rf conftest*
1518  eval "ac_cv_lib_$ac_lib_var=no"
1519fi
1520rm -f conftest*
1521LIBS="$ac_save_LIBS"
1522
1523fi
1524if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1525  echo "$ac_t""yes" 1>&6
1526    ac_tr_lib=HAVE_LIB`echo cam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1527    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1528  cat >> confdefs.h <<EOF
1529#define $ac_tr_lib 1
1530EOF
1531
1532  LIBS="-lcam $LIBS"
1533
1534else
1535  echo "$ac_t""no" 1>&6
1536fi
1537
1538echo $ac_n "checking for main in -ladm""... $ac_c" 1>&6
1539echo "configure:1540: checking for main in -ladm" >&5
1540ac_lib_var=`echo adm'_'main | sed 'y%./+-%__p_%'`
1541if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1542  echo $ac_n "(cached) $ac_c" 1>&6
1543else
1544  ac_save_LIBS="$LIBS"
1545LIBS="-ladm  $LIBS"
1546cat > conftest.$ac_ext <<EOF
1547#line 1548 "configure"
1548#include "confdefs.h"
1549
1550int main() {
1551main()
1552; return 0; }
1553EOF
1554if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1555  rm -rf conftest*
1556  eval "ac_cv_lib_$ac_lib_var=yes"
1557else
1558  echo "configure: failed program was:" >&5
1559  cat conftest.$ac_ext >&5
1560  rm -rf conftest*
1561  eval "ac_cv_lib_$ac_lib_var=no"
1562fi
1563rm -f conftest*
1564LIBS="$ac_save_LIBS"
1565
1566fi
1567if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1568  echo "$ac_t""yes" 1>&6
1569    ac_tr_lib=HAVE_LIB`echo adm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1570    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1571  cat >> confdefs.h <<EOF
1572#define $ac_tr_lib 1
1573EOF
1574
1575  LIBS="-ladm $LIBS"
1576
1577else
1578  echo "$ac_t""no" 1>&6
1579fi
1580
1581echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1582echo "configure:1583: checking for main in -lnsl" >&5
1583ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1584if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1585  echo $ac_n "(cached) $ac_c" 1>&6
1586else
1587  ac_save_LIBS="$LIBS"
1588LIBS="-lnsl  $LIBS"
1589cat > conftest.$ac_ext <<EOF
1590#line 1591 "configure"
1591#include "confdefs.h"
1592
1593int main() {
1594main()
1595; return 0; }
1596EOF
1597if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1598  rm -rf conftest*
1599  eval "ac_cv_lib_$ac_lib_var=yes"
1600else
1601  echo "configure: failed program was:" >&5
1602  cat conftest.$ac_ext >&5
1603  rm -rf conftest*
1604  eval "ac_cv_lib_$ac_lib_var=no"
1605fi
1606rm -f conftest*
1607LIBS="$ac_save_LIBS"
1608
1609fi
1610if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1611  echo "$ac_t""yes" 1>&6
1612    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1613    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1614  cat >> confdefs.h <<EOF
1615#define $ac_tr_lib 1
1616EOF
1617
1618  LIBS="-lnsl $LIBS"
1619
1620else
1621  echo "$ac_t""no" 1>&6
1622fi
1623
1624echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
1625echo "configure:1626: checking for main in -lgen" >&5
1626ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
1627if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1628  echo $ac_n "(cached) $ac_c" 1>&6
1629else
1630  ac_save_LIBS="$LIBS"
1631LIBS="-lgen  $LIBS"
1632cat > conftest.$ac_ext <<EOF
1633#line 1634 "configure"
1634#include "confdefs.h"
1635
1636int main() {
1637main()
1638; return 0; }
1639EOF
1640if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1641  rm -rf conftest*
1642  eval "ac_cv_lib_$ac_lib_var=yes"
1643else
1644  echo "configure: failed program was:" >&5
1645  cat conftest.$ac_ext >&5
1646  rm -rf conftest*
1647  eval "ac_cv_lib_$ac_lib_var=no"
1648fi
1649rm -f conftest*
1650LIBS="$ac_save_LIBS"
1651
1652fi
1653if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1654  echo "$ac_t""yes" 1>&6
1655    ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1656    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1657  cat >> confdefs.h <<EOF
1658#define $ac_tr_lib 1
1659EOF
1660
1661  LIBS="-lgen $LIBS"
1662
1663else
1664  echo "$ac_t""no" 1>&6
1665fi
1666
1667echo $ac_n "checking for main in -lmld""... $ac_c" 1>&6
1668echo "configure:1669: checking for main in -lmld" >&5
1669ac_lib_var=`echo mld'_'main | sed 'y%./+-%__p_%'`
1670if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1671  echo $ac_n "(cached) $ac_c" 1>&6
1672else
1673  ac_save_LIBS="$LIBS"
1674LIBS="-lmld  $LIBS"
1675cat > conftest.$ac_ext <<EOF
1676#line 1677 "configure"
1677#include "confdefs.h"
1678
1679int main() {
1680main()
1681; return 0; }
1682EOF
1683if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1684  rm -rf conftest*
1685  eval "ac_cv_lib_$ac_lib_var=yes"
1686else
1687  echo "configure: failed program was:" >&5
1688  cat conftest.$ac_ext >&5
1689  rm -rf conftest*
1690  eval "ac_cv_lib_$ac_lib_var=no"
1691fi
1692rm -f conftest*
1693LIBS="$ac_save_LIBS"
1694
1695fi
1696if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1697  echo "$ac_t""yes" 1>&6
1698    ac_tr_lib=HAVE_LIB`echo mld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1699    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1700  cat >> confdefs.h <<EOF
1701#define $ac_tr_lib 1
1702EOF
1703
1704  LIBS="-lmld $LIBS"
1705
1706else
1707  echo "$ac_t""no" 1>&6
1708fi
1709
1710
1711ac_header_dirent=no
1712for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1713do
1714ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1715echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1716echo "configure:1717: checking for $ac_hdr that defines DIR" >&5
1717if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1718  echo $ac_n "(cached) $ac_c" 1>&6
1719else
1720  cat > conftest.$ac_ext <<EOF
1721#line 1722 "configure"
1722#include "confdefs.h"
1723#include <sys/types.h>
1724#include <$ac_hdr>
1725int main() {
1726DIR *dirp = 0;
1727; return 0; }
1728EOF
1729if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1730  rm -rf conftest*
1731  eval "ac_cv_header_dirent_$ac_safe=yes"
1732else
1733  echo "configure: failed program was:" >&5
1734  cat conftest.$ac_ext >&5
1735  rm -rf conftest*
1736  eval "ac_cv_header_dirent_$ac_safe=no"
1737fi
1738rm -f conftest*
1739fi
1740if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1741  echo "$ac_t""yes" 1>&6
1742    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1743  cat >> confdefs.h <<EOF
1744#define $ac_tr_hdr 1
1745EOF
1746 ac_header_dirent=$ac_hdr; break
1747else
1748  echo "$ac_t""no" 1>&6
1749fi
1750done
1751# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1752if test $ac_header_dirent = dirent.h; then
1753echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1754echo "configure:1755: checking for opendir in -ldir" >&5
1755ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1756if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1757  echo $ac_n "(cached) $ac_c" 1>&6
1758else
1759  ac_save_LIBS="$LIBS"
1760LIBS="-ldir  $LIBS"
1761cat > conftest.$ac_ext <<EOF
1762#line 1763 "configure"
1763#include "confdefs.h"
1764/* Override any gcc2 internal prototype to avoid an error.  */
1765/* We use char because int might match the return type of a gcc2
1766    builtin and then its argument prototype would still apply.  */
1767char opendir();
1768
1769int main() {
1770opendir()
1771; return 0; }
1772EOF
1773if { (eval echo configure:1774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1774  rm -rf conftest*
1775  eval "ac_cv_lib_$ac_lib_var=yes"
1776else
1777  echo "configure: failed program was:" >&5
1778  cat conftest.$ac_ext >&5
1779  rm -rf conftest*
1780  eval "ac_cv_lib_$ac_lib_var=no"
1781fi
1782rm -f conftest*
1783LIBS="$ac_save_LIBS"
1784
1785fi
1786if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1787  echo "$ac_t""yes" 1>&6
1788  LIBS="$LIBS -ldir"
1789else
1790  echo "$ac_t""no" 1>&6
1791fi
1792
1793else
1794echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1795echo "configure:1796: checking for opendir in -lx" >&5
1796ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1797if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1798  echo $ac_n "(cached) $ac_c" 1>&6
1799else
1800  ac_save_LIBS="$LIBS"
1801LIBS="-lx  $LIBS"
1802cat > conftest.$ac_ext <<EOF
1803#line 1804 "configure"
1804#include "confdefs.h"
1805/* Override any gcc2 internal prototype to avoid an error.  */
1806/* We use char because int might match the return type of a gcc2
1807    builtin and then its argument prototype would still apply.  */
1808char opendir();
1809
1810int main() {
1811opendir()
1812; return 0; }
1813EOF
1814if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1815  rm -rf conftest*
1816  eval "ac_cv_lib_$ac_lib_var=yes"
1817else
1818  echo "configure: failed program was:" >&5
1819  cat conftest.$ac_ext >&5
1820  rm -rf conftest*
1821  eval "ac_cv_lib_$ac_lib_var=no"
1822fi
1823rm -f conftest*
1824LIBS="$ac_save_LIBS"
1825
1826fi
1827if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1828  echo "$ac_t""yes" 1>&6
1829  LIBS="$LIBS -lx"
1830else
1831  echo "$ac_t""no" 1>&6
1832fi
1833
1834fi
1835
1836echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1837echo "configure:1838: checking how to run the C preprocessor" >&5
1838# On Suns, sometimes $CPP names a directory.
1839if test -n "$CPP" && test -d "$CPP"; then
1840  CPP=
1841fi
1842if test -z "$CPP"; then
1843if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1844  echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846    # This must be in double quotes, not single quotes, because CPP may get
1847  # substituted into the Makefile and "${CC-cc}" will confuse make.
1848  CPP="${CC-cc} -E"
1849  # On the NeXT, cc -E runs the code through the compiler's parser,
1850  # not just through cpp.
1851  cat > conftest.$ac_ext <<EOF
1852#line 1853 "configure"
1853#include "confdefs.h"
1854#include <assert.h>
1855Syntax Error
1856EOF
1857ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1858{ (eval echo configure:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1859ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1860if test -z "$ac_err"; then
1861  :
1862else
1863  echo "$ac_err" >&5
1864  echo "configure: failed program was:" >&5
1865  cat conftest.$ac_ext >&5
1866  rm -rf conftest*
1867  CPP="${CC-cc} -E -traditional-cpp"
1868  cat > conftest.$ac_ext <<EOF
1869#line 1870 "configure"
1870#include "confdefs.h"
1871#include <assert.h>
1872Syntax Error
1873EOF
1874ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1875{ (eval echo configure:1876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1876ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1877if test -z "$ac_err"; then
1878  :
1879else
1880  echo "$ac_err" >&5
1881  echo "configure: failed program was:" >&5
1882  cat conftest.$ac_ext >&5
1883  rm -rf conftest*
1884  CPP="${CC-cc} -nologo -E"
1885  cat > conftest.$ac_ext <<EOF
1886#line 1887 "configure"
1887#include "confdefs.h"
1888#include <assert.h>
1889Syntax Error
1890EOF
1891ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1892{ (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1893ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1894if test -z "$ac_err"; then
1895  :
1896else
1897  echo "$ac_err" >&5
1898  echo "configure: failed program was:" >&5
1899  cat conftest.$ac_ext >&5
1900  rm -rf conftest*
1901  CPP=/lib/cpp
1902fi
1903rm -f conftest*
1904fi
1905rm -f conftest*
1906fi
1907rm -f conftest*
1908  ac_cv_prog_CPP="$CPP"
1909fi
1910  CPP="$ac_cv_prog_CPP"
1911else
1912  ac_cv_prog_CPP="$CPP"
1913fi
1914echo "$ac_t""$CPP" 1>&6
1915
1916echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1917echo "configure:1918: checking for ANSI C header files" >&5
1918if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1919  echo $ac_n "(cached) $ac_c" 1>&6
1920else
1921  cat > conftest.$ac_ext <<EOF
1922#line 1923 "configure"
1923#include "confdefs.h"
1924#include <stdlib.h>
1925#include <stdarg.h>
1926#include <string.h>
1927#include <float.h>
1928EOF
1929ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1930{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1931ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1932if test -z "$ac_err"; then
1933  rm -rf conftest*
1934  ac_cv_header_stdc=yes
1935else
1936  echo "$ac_err" >&5
1937  echo "configure: failed program was:" >&5
1938  cat conftest.$ac_ext >&5
1939  rm -rf conftest*
1940  ac_cv_header_stdc=no
1941fi
1942rm -f conftest*
1943
1944if test $ac_cv_header_stdc = yes; then
1945  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1946cat > conftest.$ac_ext <<EOF
1947#line 1948 "configure"
1948#include "confdefs.h"
1949#include <string.h>
1950EOF
1951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1952  egrep "memchr" >/dev/null 2>&1; then
1953  :
1954else
1955  rm -rf conftest*
1956  ac_cv_header_stdc=no
1957fi
1958rm -f conftest*
1959
1960fi
1961
1962if test $ac_cv_header_stdc = yes; then
1963  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1964cat > conftest.$ac_ext <<EOF
1965#line 1966 "configure"
1966#include "confdefs.h"
1967#include <stdlib.h>
1968EOF
1969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1970  egrep "free" >/dev/null 2>&1; then
1971  :
1972else
1973  rm -rf conftest*
1974  ac_cv_header_stdc=no
1975fi
1976rm -f conftest*
1977
1978fi
1979
1980if test $ac_cv_header_stdc = yes; then
1981  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1982if test "$cross_compiling" = yes; then
1983  :
1984else
1985  cat > conftest.$ac_ext <<EOF
1986#line 1987 "configure"
1987#include "confdefs.h"
1988#include <ctype.h>
1989#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1990#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1991#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1992int main () { int i; for (i = 0; i < 256; i++)
1993if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1994exit (0); }
1995
1996EOF
1997if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1998then
1999  :
2000else
2001  echo "configure: failed program was:" >&5
2002  cat conftest.$ac_ext >&5
2003  rm -fr conftest*
2004  ac_cv_header_stdc=no
2005fi
2006rm -fr conftest*
2007fi
2008
2009fi
2010fi
2011
2012echo "$ac_t""$ac_cv_header_stdc" 1>&6
2013if test $ac_cv_header_stdc = yes; then
2014  cat >> confdefs.h <<\EOF
2015#define STDC_HEADERS 1
2016EOF
2017
2018fi
2019
2020echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2021echo "configure:2022: checking for sys/wait.h that is POSIX.1 compatible" >&5
2022if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2023  echo $ac_n "(cached) $ac_c" 1>&6
2024else
2025  cat > conftest.$ac_ext <<EOF
2026#line 2027 "configure"
2027#include "confdefs.h"
2028#include <sys/types.h>
2029#include <sys/wait.h>
2030#ifndef WEXITSTATUS
2031#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2032#endif
2033#ifndef WIFEXITED
2034#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2035#endif
2036int main() {
2037int s;
2038wait (&s);
2039s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2040; return 0; }
2041EOF
2042if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2043  rm -rf conftest*
2044  ac_cv_header_sys_wait_h=yes
2045else
2046  echo "configure: failed program was:" >&5
2047  cat conftest.$ac_ext >&5
2048  rm -rf conftest*
2049  ac_cv_header_sys_wait_h=no
2050fi
2051rm -f conftest*
2052fi
2053
2054echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2055if test $ac_cv_header_sys_wait_h = yes; then
2056  cat >> confdefs.h <<\EOF
2057#define HAVE_SYS_WAIT_H 1
2058EOF
2059
2060fi
2061
2062for ac_hdr in \
2063arpa/inet.h \
2064fcntl.h limits.h \
2065sys/file.h sys/ioctl.h sys/time.h sys/sockio.h sys/systeminfo.h \
2066sys/uio.h \
2067net/if.h net/if_types.h net/if_var.h \
2068stdarg.h stdlib.h string.h strings.h \
2069netinet/in.h \
2070unistd.h \
2071
2072do
2073ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2074echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2075echo "configure:2076: checking for $ac_hdr" >&5
2076if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2077  echo $ac_n "(cached) $ac_c" 1>&6
2078else
2079  cat > conftest.$ac_ext <<EOF
2080#line 2081 "configure"
2081#include "confdefs.h"
2082#include <$ac_hdr>
2083EOF
2084ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2085{ (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2086ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2087if test -z "$ac_err"; then
2088  rm -rf conftest*
2089  eval "ac_cv_header_$ac_safe=yes"
2090else
2091  echo "$ac_err" >&5
2092  echo "configure: failed program was:" >&5
2093  cat conftest.$ac_ext >&5
2094  rm -rf conftest*
2095  eval "ac_cv_header_$ac_safe=no"
2096fi
2097rm -f conftest*
2098fi
2099if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2100  echo "$ac_t""yes" 1>&6
2101    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2102  cat >> confdefs.h <<EOF
2103#define $ac_tr_hdr 1
2104EOF
2105 
2106else
2107  echo "$ac_t""no" 1>&6
2108fi
2109done
2110
2111for ac_hdr in \
2112sys/diskio.h sys/hilioctl.h sys/audio.h sys/framebuf.h \
2113sys/scsi.h \
2114
2115do
2116ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2117echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2118echo "configure:2119: checking for $ac_hdr" >&5
2119if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2120  echo $ac_n "(cached) $ac_c" 1>&6
2121else
2122  cat > conftest.$ac_ext <<EOF
2123#line 2124 "configure"
2124#include "confdefs.h"
2125#include <$ac_hdr>
2126EOF
2127ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2128{ (eval echo configure:2129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2129ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2130if test -z "$ac_err"; then
2131  rm -rf conftest*
2132  eval "ac_cv_header_$ac_safe=yes"
2133else
2134  echo "$ac_err" >&5
2135  echo "configure: failed program was:" >&5
2136  cat conftest.$ac_ext >&5
2137  rm -rf conftest*
2138  eval "ac_cv_header_$ac_safe=no"
2139fi
2140rm -f conftest*
2141fi
2142if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2143  echo "$ac_t""yes" 1>&6
2144    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2145  cat >> confdefs.h <<EOF
2146#define $ac_tr_hdr 1
2147EOF
2148 
2149else
2150  echo "$ac_t""no" 1>&6
2151fi
2152done
2153
2154
2155for ac_hdr in \
2156scsi/scsi.h scsi/sg.h \
2157/usr/src/linux/include/scsi/scsi.h /usr/src/linux/include/scsi/sg.h \
2158
2159do
2160ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2161echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2162echo "configure:2163: checking for $ac_hdr" >&5
2163if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2164  echo $ac_n "(cached) $ac_c" 1>&6
2165else
2166  cat > conftest.$ac_ext <<EOF
2167#line 2168 "configure"
2168#include "confdefs.h"
2169#include <$ac_hdr>
2170EOF
2171ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2172{ (eval echo configure:2173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2173ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2174if test -z "$ac_err"; then
2175  rm -rf conftest*
2176  eval "ac_cv_header_$ac_safe=yes"
2177else
2178  echo "$ac_err" >&5
2179  echo "configure: failed program was:" >&5
2180  cat conftest.$ac_ext >&5
2181  rm -rf conftest*
2182  eval "ac_cv_header_$ac_safe=no"
2183fi
2184rm -f conftest*
2185fi
2186if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2187  echo "$ac_t""yes" 1>&6
2188    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2189  cat >> confdefs.h <<EOF
2190#define $ac_tr_hdr 1
2191EOF
2192 
2193else
2194  echo "$ac_t""no" 1>&6
2195fi
2196done
2197
2198
2199for ac_hdr in \
2200sys/gfx.h sys/ng1.h sys/gr1new.h sys/gr2.h sys/lg1hw.h sys/lg1.h \
2201sys/venice.h \
2202
2203do
2204ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2205echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2206echo "configure:2207: checking for $ac_hdr" >&5
2207if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2208  echo $ac_n "(cached) $ac_c" 1>&6
2209else
2210  cat > conftest.$ac_ext <<EOF
2211#line 2212 "configure"
2212#include "confdefs.h"
2213#include <$ac_hdr>
2214EOF
2215ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2216{ (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2217ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2218if test -z "$ac_err"; then
2219  rm -rf conftest*
2220  eval "ac_cv_header_$ac_safe=yes"
2221else
2222  echo "$ac_err" >&5
2223  echo "configure: failed program was:" >&5
2224  cat conftest.$ac_ext >&5
2225  rm -rf conftest*
2226  eval "ac_cv_header_$ac_safe=no"
2227fi
2228rm -f conftest*
2229fi
2230if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2231  echo "$ac_t""yes" 1>&6
2232    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2233  cat >> confdefs.h <<EOF
2234#define $ac_tr_hdr 1
2235EOF
2236 
2237else
2238  echo "$ac_t""no" 1>&6
2239fi
2240done
2241
2242
2243ac_safe=`echo "sys/dlpi.h" | sed 'y%./+-%__p_%'`
2244echo $ac_n "checking for sys/dlpi.h""... $ac_c" 1>&6
2245echo "configure:2246: checking for sys/dlpi.h" >&5
2246if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2247  echo $ac_n "(cached) $ac_c" 1>&6
2248else
2249  cat > conftest.$ac_ext <<EOF
2250#line 2251 "configure"
2251#include "confdefs.h"
2252#include <sys/dlpi.h>
2253EOF
2254ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2255{ (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2256ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2257if test -z "$ac_err"; then
2258  rm -rf conftest*
2259  eval "ac_cv_header_$ac_safe=yes"
2260else
2261  echo "$ac_err" >&5
2262  echo "configure: failed program was:" >&5
2263  cat conftest.$ac_ext >&5
2264  rm -rf conftest*
2265  eval "ac_cv_header_$ac_safe=no"
2266fi
2267rm -f conftest*
2268fi
2269if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2270  echo "$ac_t""yes" 1>&6
2271  cat >> confdefs.h <<\EOF
2272#define HAVE_DLPI 1
2273EOF
2274
2275else
2276  echo "$ac_t""no" 1>&6
2277fi
2278
2279ac_safe=`echo "varargs.h" | sed 'y%./+-%__p_%'`
2280echo $ac_n "checking for varargs.h""... $ac_c" 1>&6
2281echo "configure:2282: checking for varargs.h" >&5
2282if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2283  echo $ac_n "(cached) $ac_c" 1>&6
2284else
2285  cat > conftest.$ac_ext <<EOF
2286#line 2287 "configure"
2287#include "confdefs.h"
2288#include <varargs.h>
2289EOF
2290ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2291{ (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2292ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2293if test -z "$ac_err"; then
2294  rm -rf conftest*
2295  eval "ac_cv_header_$ac_safe=yes"
2296else
2297  echo "$ac_err" >&5
2298  echo "configure: failed program was:" >&5
2299  cat conftest.$ac_ext >&5
2300  rm -rf conftest*
2301  eval "ac_cv_header_$ac_safe=no"
2302fi
2303rm -f conftest*
2304fi
2305if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2306  echo "$ac_t""yes" 1>&6
2307  cat >> confdefs.h <<\EOF
2308#define HAVE_VARARGS 1
2309EOF
2310
2311else
2312  echo "$ac_t""no" 1>&6
2313fi
2314
2315ac_safe=`echo "kvm.h" | sed 'y%./+-%__p_%'`
2316echo $ac_n "checking for kvm.h""... $ac_c" 1>&6
2317echo "configure:2318: checking for kvm.h" >&5
2318if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2319  echo $ac_n "(cached) $ac_c" 1>&6
2320else
2321  cat > conftest.$ac_ext <<EOF
2322#line 2323 "configure"
2323#include "confdefs.h"
2324#include <kvm.h>
2325EOF
2326ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2327{ (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2328ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2329if test -z "$ac_err"; then
2330  rm -rf conftest*
2331  eval "ac_cv_header_$ac_safe=yes"
2332else
2333  echo "$ac_err" >&5
2334  echo "configure: failed program was:" >&5
2335  cat conftest.$ac_ext >&5
2336  rm -rf conftest*
2337  eval "ac_cv_header_$ac_safe=no"
2338fi
2339rm -f conftest*
2340fi
2341if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2342  echo "$ac_t""yes" 1>&6
2343  cat >> confdefs.h <<\EOF
2344#define HAVE_KVM_H 1
2345EOF
2346
2347else
2348  echo "$ac_t""no" 1>&6
2349fi
2350
2351ac_safe=`echo "sys/ddipropdefs.h" | sed 'y%./+-%__p_%'`
2352echo $ac_n "checking for sys/ddipropdefs.h""... $ac_c" 1>&6
2353echo "configure:2354: checking for sys/ddipropdefs.h" >&5
2354if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2355  echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357  cat > conftest.$ac_ext <<EOF
2358#line 2359 "configure"
2359#include "confdefs.h"
2360#include <sys/ddipropdefs.h>
2361EOF
2362ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2363{ (eval echo configure:2364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2364ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2365if test -z "$ac_err"; then
2366  rm -rf conftest*
2367  eval "ac_cv_header_$ac_safe=yes"
2368else
2369  echo "$ac_err" >&5
2370  echo "configure: failed program was:" >&5
2371  cat conftest.$ac_ext >&5
2372  rm -rf conftest*
2373  eval "ac_cv_header_$ac_safe=no"
2374fi
2375rm -f conftest*
2376fi
2377if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2378  echo "$ac_t""yes" 1>&6
2379  cat >> confdefs.h <<\EOF
2380#define HAVE_DDI_PROP 1
2381EOF
2382
2383else
2384  echo "$ac_t""no" 1>&6
2385fi
2386
2387ac_safe=`echo "sys/dktp/dadkio.h" | sed 'y%./+-%__p_%'`
2388echo $ac_n "checking for sys/dktp/dadkio.h""... $ac_c" 1>&6
2389echo "configure:2390: checking for sys/dktp/dadkio.h" >&5
2390if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2391  echo $ac_n "(cached) $ac_c" 1>&6
2392else
2393  cat > conftest.$ac_ext <<EOF
2394#line 2395 "configure"
2395#include "confdefs.h"
2396#include <sys/dktp/dadkio.h>
2397EOF
2398ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2399{ (eval echo configure:2400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2400ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2401if test -z "$ac_err"; then
2402  rm -rf conftest*
2403  eval "ac_cv_header_$ac_safe=yes"
2404else
2405  echo "$ac_err" >&5
2406  echo "configure: failed program was:" >&5
2407  cat conftest.$ac_ext >&5
2408  rm -rf conftest*
2409  eval "ac_cv_header_$ac_safe=no"
2410fi
2411rm -f conftest*
2412fi
2413if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2414  echo "$ac_t""yes" 1>&6
2415  cat >> confdefs.h <<\EOF
2416#define HAVE_DADKIO 1
2417EOF
2418
2419else
2420  echo "$ac_t""no" 1>&6
2421fi
2422
2423
2424echo $ac_n "checking for working const""... $ac_c" 1>&6
2425echo "configure:2426: checking for working const" >&5
2426if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2427  echo $ac_n "(cached) $ac_c" 1>&6
2428else
2429  cat > conftest.$ac_ext <<EOF
2430#line 2431 "configure"
2431#include "confdefs.h"
2432
2433int main() {
2434
2435/* Ultrix mips cc rejects this.  */
2436typedef int charset[2]; const charset x;
2437/* SunOS 4.1.1 cc rejects this.  */
2438char const *const *ccp;
2439char **p;
2440/* NEC SVR4.0.2 mips cc rejects this.  */
2441struct point {int x, y;};
2442static struct point const zero = {0,0};
2443/* AIX XL C 1.02.0.0 rejects this.
2444   It does not let you subtract one const X* pointer from another in an arm
2445   of an if-expression whose if-part is not a constant expression */
2446const char *g = "string";
2447ccp = &g + (g ? g-g : 0);
2448/* HPUX 7.0 cc rejects these. */
2449++ccp;
2450p = (char**) ccp;
2451ccp = (char const *const *) p;
2452{ /* SCO 3.2v4 cc rejects this.  */
2453  char *t;
2454  char const *s = 0 ? (char *) 0 : (char const *) 0;
2455
2456  *t++ = 0;
2457}
2458{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2459  int x[] = {25, 17};
2460  const int *foo = &x[0];
2461  ++foo;
2462}
2463{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2464  typedef const int *iptr;
2465  iptr p = 0;
2466  ++p;
2467}
2468{ /* AIX XL C 1.02.0.0 rejects this saying
2469     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2470  struct s { int j; const int *ap[3]; };
2471  struct s *b; b->j = 5;
2472}
2473{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2474  const int foo = 10;
2475}
2476
2477; return 0; }
2478EOF
2479if { (eval echo configure:2480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2480  rm -rf conftest*
2481  ac_cv_c_const=yes
2482else
2483  echo "configure: failed program was:" >&5
2484  cat conftest.$ac_ext >&5
2485  rm -rf conftest*
2486  ac_cv_c_const=no
2487fi
2488rm -f conftest*
2489fi
2490
2491echo "$ac_t""$ac_cv_c_const" 1>&6
2492if test $ac_cv_c_const = no; then
2493  cat >> confdefs.h <<\EOF
2494#define const
2495EOF
2496
2497fi
2498
2499echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2500echo "configure:2501: checking whether byte ordering is bigendian" >&5
2501if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2502  echo $ac_n "(cached) $ac_c" 1>&6
2503else
2504  ac_cv_c_bigendian=unknown
2505# See if sys/param.h defines the BYTE_ORDER macro.
2506cat > conftest.$ac_ext <<EOF
2507#line 2508 "configure"
2508#include "confdefs.h"
2509#include <sys/types.h>
2510#include <sys/param.h>
2511int main() {
2512
2513#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2514 bogus endian macros
2515#endif
2516; return 0; }
2517EOF
2518if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2519  rm -rf conftest*
2520  # It does; now see whether it defined to BIG_ENDIAN or not.
2521cat > conftest.$ac_ext <<EOF
2522#line 2523 "configure"
2523#include "confdefs.h"
2524#include <sys/types.h>
2525#include <sys/param.h>
2526int main() {
2527
2528#if BYTE_ORDER != BIG_ENDIAN
2529 not big endian
2530#endif
2531; return 0; }
2532EOF
2533if { (eval echo configure:2534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2534  rm -rf conftest*
2535  ac_cv_c_bigendian=yes
2536else
2537  echo "configure: failed program was:" >&5
2538  cat conftest.$ac_ext >&5
2539  rm -rf conftest*
2540  ac_cv_c_bigendian=no
2541fi
2542rm -f conftest*
2543else
2544  echo "configure: failed program was:" >&5
2545  cat conftest.$ac_ext >&5
2546fi
2547rm -f conftest*
2548if test $ac_cv_c_bigendian = unknown; then
2549if test "$cross_compiling" = yes; then
2550    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2551else
2552  cat > conftest.$ac_ext <<EOF
2553#line 2554 "configure"
2554#include "confdefs.h"
2555main () {
2556  /* Are we little or big endian?  From Harbison&Steele.  */
2557  union
2558  {
2559    long l;
2560    char c[sizeof (long)];
2561  } u;
2562  u.l = 1;
2563  exit (u.c[sizeof (long) - 1] == 1);
2564}
2565EOF
2566if { (eval echo configure:2567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2567then
2568  ac_cv_c_bigendian=no
2569else
2570  echo "configure: failed program was:" >&5
2571  cat conftest.$ac_ext >&5
2572  rm -fr conftest*
2573  ac_cv_c_bigendian=yes
2574fi
2575rm -fr conftest*
2576fi
2577
2578fi
2579fi
2580
2581echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2582if test $ac_cv_c_bigendian = yes; then
2583  cat >> confdefs.h <<\EOF
2584#define WORDS_BIGENDIAN 1
2585EOF
2586
2587fi
2588
2589echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2590echo "configure:2591: checking for uid_t in sys/types.h" >&5
2591if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2592  echo $ac_n "(cached) $ac_c" 1>&6
2593else
2594  cat > conftest.$ac_ext <<EOF
2595#line 2596 "configure"
2596#include "confdefs.h"
2597#include <sys/types.h>
2598EOF
2599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2600  egrep "uid_t" >/dev/null 2>&1; then
2601  rm -rf conftest*
2602  ac_cv_type_uid_t=yes
2603else
2604  rm -rf conftest*
2605  ac_cv_type_uid_t=no
2606fi
2607rm -f conftest*
2608
2609fi
2610
2611echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2612if test $ac_cv_type_uid_t = no; then
2613  cat >> confdefs.h <<\EOF
2614#define uid_t int
2615EOF
2616
2617  cat >> confdefs.h <<\EOF
2618#define gid_t int
2619EOF
2620
2621fi
2622
2623echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2624echo "configure:2625: checking for mode_t" >&5
2625if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2626  echo $ac_n "(cached) $ac_c" 1>&6
2627else
2628  cat > conftest.$ac_ext <<EOF
2629#line 2630 "configure"
2630#include "confdefs.h"
2631#include <sys/types.h>
2632#if STDC_HEADERS
2633#include <stdlib.h>
2634#include <stddef.h>
2635#endif
2636EOF
2637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2638  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2639  rm -rf conftest*
2640  ac_cv_type_mode_t=yes
2641else
2642  rm -rf conftest*
2643  ac_cv_type_mode_t=no
2644fi
2645rm -f conftest*
2646
2647fi
2648echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2649if test $ac_cv_type_mode_t = no; then
2650  cat >> confdefs.h <<\EOF
2651#define mode_t int
2652EOF
2653
2654fi
2655
2656echo $ac_n "checking for off_t""... $ac_c" 1>&6
2657echo "configure:2658: checking for off_t" >&5
2658if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2659  echo $ac_n "(cached) $ac_c" 1>&6
2660else
2661  cat > conftest.$ac_ext <<EOF
2662#line 2663 "configure"
2663#include "confdefs.h"
2664#include <sys/types.h>
2665#if STDC_HEADERS
2666#include <stdlib.h>
2667#include <stddef.h>
2668#endif
2669EOF
2670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2671  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2672  rm -rf conftest*
2673  ac_cv_type_off_t=yes
2674else
2675  rm -rf conftest*
2676  ac_cv_type_off_t=no
2677fi
2678rm -f conftest*
2679
2680fi
2681echo "$ac_t""$ac_cv_type_off_t" 1>&6
2682if test $ac_cv_type_off_t = no; then
2683  cat >> confdefs.h <<\EOF
2684#define off_t long
2685EOF
2686
2687fi
2688
2689echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2690echo "configure:2691: checking for pid_t" >&5
2691if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2692  echo $ac_n "(cached) $ac_c" 1>&6
2693else
2694  cat > conftest.$ac_ext <<EOF
2695#line 2696 "configure"
2696#include "confdefs.h"
2697#include <sys/types.h>
2698#if STDC_HEADERS
2699#include <stdlib.h>
2700#include <stddef.h>
2701#endif
2702EOF
2703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2704  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2705  rm -rf conftest*
2706  ac_cv_type_pid_t=yes
2707else
2708  rm -rf conftest*
2709  ac_cv_type_pid_t=no
2710fi
2711rm -f conftest*
2712
2713fi
2714echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2715if test $ac_cv_type_pid_t = no; then
2716  cat >> confdefs.h <<\EOF
2717#define pid_t int
2718EOF
2719
2720fi
2721
2722echo $ac_n "checking for size_t""... $ac_c" 1>&6
2723echo "configure:2724: checking for size_t" >&5
2724if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2725  echo $ac_n "(cached) $ac_c" 1>&6
2726else
2727  cat > conftest.$ac_ext <<EOF
2728#line 2729 "configure"
2729#include "confdefs.h"
2730#include <sys/types.h>
2731#if STDC_HEADERS
2732#include <stdlib.h>
2733#include <stddef.h>
2734#endif
2735EOF
2736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2737  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2738  rm -rf conftest*
2739  ac_cv_type_size_t=yes
2740else
2741  rm -rf conftest*
2742  ac_cv_type_size_t=no
2743fi
2744rm -f conftest*
2745
2746fi
2747echo "$ac_t""$ac_cv_type_size_t" 1>&6
2748if test $ac_cv_type_size_t = no; then
2749  cat >> confdefs.h <<\EOF
2750#define size_t unsigned
2751EOF
2752
2753fi
2754
2755echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2756echo "configure:2757: checking for st_blksize in struct stat" >&5
2757if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2758  echo $ac_n "(cached) $ac_c" 1>&6
2759else
2760  cat > conftest.$ac_ext <<EOF
2761#line 2762 "configure"
2762#include "confdefs.h"
2763#include <sys/types.h>
2764#include <sys/stat.h>
2765int main() {
2766struct stat s; s.st_blksize;
2767; return 0; }
2768EOF
2769if { (eval echo configure:2770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2770  rm -rf conftest*
2771  ac_cv_struct_st_blksize=yes
2772else
2773  echo "configure: failed program was:" >&5
2774  cat conftest.$ac_ext >&5
2775  rm -rf conftest*
2776  ac_cv_struct_st_blksize=no
2777fi
2778rm -f conftest*
2779fi
2780
2781echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2782if test $ac_cv_struct_st_blksize = yes; then
2783  cat >> confdefs.h <<\EOF
2784#define HAVE_ST_BLKSIZE 1
2785EOF
2786
2787fi
2788
2789echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
2790echo "configure:2791: checking for st_blocks in struct stat" >&5
2791if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
2792  echo $ac_n "(cached) $ac_c" 1>&6
2793else
2794  cat > conftest.$ac_ext <<EOF
2795#line 2796 "configure"
2796#include "confdefs.h"
2797#include <sys/types.h>
2798#include <sys/stat.h>
2799int main() {
2800struct stat s; s.st_blocks;
2801; return 0; }
2802EOF
2803if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2804  rm -rf conftest*
2805  ac_cv_struct_st_blocks=yes
2806else
2807  echo "configure: failed program was:" >&5
2808  cat conftest.$ac_ext >&5
2809  rm -rf conftest*
2810  ac_cv_struct_st_blocks=no
2811fi
2812rm -f conftest*
2813fi
2814
2815echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
2816if test $ac_cv_struct_st_blocks = yes; then
2817  cat >> confdefs.h <<\EOF
2818#define HAVE_ST_BLOCKS 1
2819EOF
2820
2821else
2822  LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
2823fi
2824
2825echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2826echo "configure:2827: checking for st_rdev in struct stat" >&5
2827if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2828  echo $ac_n "(cached) $ac_c" 1>&6
2829else
2830  cat > conftest.$ac_ext <<EOF
2831#line 2832 "configure"
2832#include "confdefs.h"
2833#include <sys/types.h>
2834#include <sys/stat.h>
2835int main() {
2836struct stat s; s.st_rdev;
2837; return 0; }
2838EOF
2839if { (eval echo configure:2840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2840  rm -rf conftest*
2841  ac_cv_struct_st_rdev=yes
2842else
2843  echo "configure: failed program was:" >&5
2844  cat conftest.$ac_ext >&5
2845  rm -rf conftest*
2846  ac_cv_struct_st_rdev=no
2847fi
2848rm -f conftest*
2849fi
2850
2851echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2852if test $ac_cv_struct_st_rdev = yes; then
2853  cat >> confdefs.h <<\EOF
2854#define HAVE_ST_RDEV 1
2855EOF
2856
2857fi
2858
2859echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2860echo "configure:2861: checking whether time.h and sys/time.h may both be included" >&5
2861if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2862  echo $ac_n "(cached) $ac_c" 1>&6
2863else
2864  cat > conftest.$ac_ext <<EOF
2865#line 2866 "configure"
2866#include "confdefs.h"
2867#include <sys/types.h>
2868#include <sys/time.h>
2869#include <time.h>
2870int main() {
2871struct tm *tp;
2872; return 0; }
2873EOF
2874if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2875  rm -rf conftest*
2876  ac_cv_header_time=yes
2877else
2878  echo "configure: failed program was:" >&5
2879  cat conftest.$ac_ext >&5
2880  rm -rf conftest*
2881  ac_cv_header_time=no
2882fi
2883rm -f conftest*
2884fi
2885
2886echo "$ac_t""$ac_cv_header_time" 1>&6
2887if test $ac_cv_header_time = yes; then
2888  cat >> confdefs.h <<\EOF
2889#define TIME_WITH_SYS_TIME 1
2890EOF
2891
2892fi
2893
2894echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2895echo "configure:2896: checking whether struct tm is in sys/time.h or time.h" >&5
2896if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2897  echo $ac_n "(cached) $ac_c" 1>&6
2898else
2899  cat > conftest.$ac_ext <<EOF
2900#line 2901 "configure"
2901#include "confdefs.h"
2902#include <sys/types.h>
2903#include <time.h>
2904int main() {
2905struct tm *tp; tp->tm_sec;
2906; return 0; }
2907EOF
2908if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2909  rm -rf conftest*
2910  ac_cv_struct_tm=time.h
2911else
2912  echo "configure: failed program was:" >&5
2913  cat conftest.$ac_ext >&5
2914  rm -rf conftest*
2915  ac_cv_struct_tm=sys/time.h
2916fi
2917rm -f conftest*
2918fi
2919
2920echo "$ac_t""$ac_cv_struct_tm" 1>&6
2921if test $ac_cv_struct_tm = sys/time.h; then
2922  cat >> confdefs.h <<\EOF
2923#define TM_IN_SYS_TIME 1
2924EOF
2925
2926fi
2927
2928echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2929echo "configure:2930: checking for tm_zone in struct tm" >&5
2930if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2931  echo $ac_n "(cached) $ac_c" 1>&6
2932else
2933  cat > conftest.$ac_ext <<EOF
2934#line 2935 "configure"
2935#include "confdefs.h"
2936#include <sys/types.h>
2937#include <$ac_cv_struct_tm>
2938int main() {
2939struct tm tm; tm.tm_zone;
2940; return 0; }
2941EOF
2942if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2943  rm -rf conftest*
2944  ac_cv_struct_tm_zone=yes
2945else
2946  echo "configure: failed program was:" >&5
2947  cat conftest.$ac_ext >&5
2948  rm -rf conftest*
2949  ac_cv_struct_tm_zone=no
2950fi
2951rm -f conftest*
2952fi
2953
2954echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2955if test "$ac_cv_struct_tm_zone" = yes; then
2956  cat >> confdefs.h <<\EOF
2957#define HAVE_TM_ZONE 1
2958EOF
2959
2960else
2961  echo $ac_n "checking for tzname""... $ac_c" 1>&6
2962echo "configure:2963: checking for tzname" >&5
2963if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2964  echo $ac_n "(cached) $ac_c" 1>&6
2965else
2966  cat > conftest.$ac_ext <<EOF
2967#line 2968 "configure"
2968#include "confdefs.h"
2969#include <time.h>
2970#ifndef tzname /* For SGI.  */
2971extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
2972#endif
2973int main() {
2974atoi(*tzname);
2975; return 0; }
2976EOF
2977if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2978  rm -rf conftest*
2979  ac_cv_var_tzname=yes
2980else
2981  echo "configure: failed program was:" >&5
2982  cat conftest.$ac_ext >&5
2983  rm -rf conftest*
2984  ac_cv_var_tzname=no
2985fi
2986rm -f conftest*
2987fi
2988
2989echo "$ac_t""$ac_cv_var_tzname" 1>&6
2990  if test $ac_cv_var_tzname = yes; then
2991    cat >> confdefs.h <<\EOF
2992#define HAVE_TZNAME 1
2993EOF
2994
2995  fi
2996fi
2997
2998echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
2999echo "configure:3000: checking size of unsigned long long" >&5
3000if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
3001  echo $ac_n "(cached) $ac_c" 1>&6
3002else
3003  if test "$cross_compiling" = yes; then
3004    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3005else
3006  cat > conftest.$ac_ext <<EOF
3007#line 3008 "configure"
3008#include "confdefs.h"
3009#include <stdio.h>
3010main()
3011{
3012  FILE *f=fopen("conftestval", "w");
3013  if (!f) exit(1);
3014  fprintf(f, "%d\n", sizeof(unsigned long long));
3015  exit(0);
3016}
3017EOF
3018if { (eval echo configure:3019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3019then
3020  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
3021else
3022  echo "configure: failed program was:" >&5
3023  cat conftest.$ac_ext >&5
3024  rm -fr conftest*
3025  ac_cv_sizeof_unsigned_long_long=0
3026fi
3027rm -fr conftest*
3028fi
3029
3030fi
3031echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
3032cat >> confdefs.h <<EOF
3033#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
3034EOF
3035
3036
3037echo $ac_n "checking size of long long""... $ac_c" 1>&6
3038echo "configure:3039: checking size of long long" >&5
3039if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3040  echo $ac_n "(cached) $ac_c" 1>&6
3041else
3042  if test "$cross_compiling" = yes; then
3043    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3044else
3045  cat > conftest.$ac_ext <<EOF
3046#line 3047 "configure"
3047#include "confdefs.h"
3048#include <stdio.h>
3049main()
3050{
3051  FILE *f=fopen("conftestval", "w");
3052  if (!f) exit(1);
3053  fprintf(f, "%d\n", sizeof(long long));
3054  exit(0);
3055}
3056EOF
3057if { (eval echo configure:3058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3058then
3059  ac_cv_sizeof_long_long=`cat conftestval`
3060else
3061  echo "configure: failed program was:" >&5
3062  cat conftest.$ac_ext >&5
3063  rm -fr conftest*
3064  ac_cv_sizeof_long_long=0
3065fi
3066rm -fr conftest*
3067fi
3068
3069fi
3070echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3071cat >> confdefs.h <<EOF
3072#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3073EOF
3074
3075
3076echo $ac_n "checking size of longlong""... $ac_c" 1>&6
3077echo "configure:3078: checking size of longlong" >&5
3078if eval "test \"`echo '$''{'ac_cv_sizeof_longlong'+set}'`\" = set"; then
3079  echo $ac_n "(cached) $ac_c" 1>&6
3080else
3081  if test "$cross_compiling" = yes; then
3082    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3083else
3084  cat > conftest.$ac_ext <<EOF
3085#line 3086 "configure"
3086#include "confdefs.h"
3087#include <stdio.h>
3088main()
3089{
3090  FILE *f=fopen("conftestval", "w");
3091  if (!f) exit(1);
3092  fprintf(f, "%d\n", sizeof(longlong));
3093  exit(0);
3094}
3095EOF
3096if { (eval echo configure:3097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3097then
3098  ac_cv_sizeof_longlong=`cat conftestval`
3099else
3100  echo "configure: failed program was:" >&5
3101  cat conftest.$ac_ext >&5
3102  rm -fr conftest*
3103  ac_cv_sizeof_longlong=0
3104fi
3105rm -fr conftest*
3106fi
3107
3108fi
3109echo "$ac_t""$ac_cv_sizeof_longlong" 1>&6
3110cat >> confdefs.h <<EOF
3111#define SIZEOF_LONGLONG $ac_cv_sizeof_longlong
3112EOF
3113
3114
3115echo $ac_n "checking size of long int""... $ac_c" 1>&6
3116echo "configure:3117: checking size of long int" >&5
3117if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then
3118  echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120  if test "$cross_compiling" = yes; then
3121    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3122else
3123  cat > conftest.$ac_ext <<EOF
3124#line 3125 "configure"
3125#include "confdefs.h"
3126#include <stdio.h>
3127main()
3128{
3129  FILE *f=fopen("conftestval", "w");
3130  if (!f) exit(1);
3131  fprintf(f, "%d\n", sizeof(long int));
3132  exit(0);
3133}
3134EOF
3135if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3136then
3137  ac_cv_sizeof_long_int=`cat conftestval`
3138else
3139  echo "configure: failed program was:" >&5
3140  cat conftest.$ac_ext >&5
3141  rm -fr conftest*
3142  ac_cv_sizeof_long_int=0
3143fi
3144rm -fr conftest*
3145fi
3146
3147fi
3148echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6
3149cat >> confdefs.h <<EOF
3150#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
3151EOF
3152
3153
3154echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6
3155echo "configure:3156: checking size of uint64_t" >&5
3156if eval "test \"`echo '$''{'ac_cv_sizeof_uint64_t'+set}'`\" = set"; then
3157  echo $ac_n "(cached) $ac_c" 1>&6
3158else
3159  if test "$cross_compiling" = yes; then
3160    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3161else
3162  cat > conftest.$ac_ext <<EOF
3163#line 3164 "configure"
3164#include "confdefs.h"
3165#include <stdio.h>
3166main()
3167{
3168  FILE *f=fopen("conftestval", "w");
3169  if (!f) exit(1);
3170  fprintf(f, "%d\n", sizeof(uint64_t));
3171  exit(0);
3172}
3173EOF
3174if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3175then
3176  ac_cv_sizeof_uint64_t=`cat conftestval`
3177else
3178  echo "configure: failed program was:" >&5
3179  cat conftest.$ac_ext >&5
3180  rm -fr conftest*
3181  ac_cv_sizeof_uint64_t=0
3182fi
3183rm -fr conftest*
3184fi
3185
3186fi
3187echo "$ac_t""$ac_cv_sizeof_uint64_t" 1>&6
3188cat >> confdefs.h <<EOF
3189#define SIZEOF_UINT64_T $ac_cv_sizeof_uint64_t
3190EOF
3191
3192
3193echo $ac_n "checking size of int64_t""... $ac_c" 1>&6
3194echo "configure:3195: checking size of int64_t" >&5
3195if eval "test \"`echo '$''{'ac_cv_sizeof_int64_t'+set}'`\" = set"; then
3196  echo $ac_n "(cached) $ac_c" 1>&6
3197else
3198  if test "$cross_compiling" = yes; then
3199    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3200else
3201  cat > conftest.$ac_ext <<EOF
3202#line 3203 "configure"
3203#include "confdefs.h"
3204#include <stdio.h>
3205main()
3206{
3207  FILE *f=fopen("conftestval", "w");
3208  if (!f) exit(1);
3209  fprintf(f, "%d\n", sizeof(int64_t));
3210  exit(0);
3211}
3212EOF
3213if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3214then
3215  ac_cv_sizeof_int64_t=`cat conftestval`
3216else
3217  echo "configure: failed program was:" >&5
3218  cat conftest.$ac_ext >&5
3219  rm -fr conftest*
3220  ac_cv_sizeof_int64_t=0
3221fi
3222rm -fr conftest*
3223fi
3224
3225fi
3226echo "$ac_t""$ac_cv_sizeof_int64_t" 1>&6
3227cat >> confdefs.h <<EOF
3228#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t
3229EOF
3230
3231
3232
3233
3234echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3235echo "configure:3236: checking type of array argument to getgroups" >&5
3236if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
3237  echo $ac_n "(cached) $ac_c" 1>&6
3238else
3239  if test "$cross_compiling" = yes; then
3240  ac_cv_type_getgroups=cross
3241else
3242  cat > conftest.$ac_ext <<EOF
3243#line 3244 "configure"
3244#include "confdefs.h"
3245
3246/* Thanks to Mike Rendell for this test.  */
3247#include <sys/types.h>
3248#define NGID 256
3249#undef MAX
3250#define MAX(x, y) ((x) > (y) ? (x) : (y))
3251main()
3252{
3253  gid_t gidset[NGID];
3254  int i, n;
3255  union { gid_t gval; long lval; }  val;
3256
3257  val.lval = -1;
3258  for (i = 0; i < NGID; i++)
3259    gidset[i] = val.gval;
3260  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
3261                 gidset);
3262  /* Exit non-zero if getgroups seems to require an array of ints.  This
3263     happens when gid_t is short but getgroups modifies an array of ints.  */
3264  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
3265}
3266
3267EOF
3268if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3269then
3270    ac_cv_type_getgroups=gid_t
3271else
3272  echo "configure: failed program was:" >&5
3273  cat conftest.$ac_ext >&5
3274  rm -fr conftest*
3275  ac_cv_type_getgroups=int
3276fi
3277rm -fr conftest*
3278fi
3279
3280if test $ac_cv_type_getgroups = cross; then
3281        cat > conftest.$ac_ext <<EOF
3282#line 3283 "configure"
3283#include "confdefs.h"
3284#include <unistd.h>
3285EOF
3286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3287  egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
3288  rm -rf conftest*
3289  ac_cv_type_getgroups=gid_t
3290else
3291  rm -rf conftest*
3292  ac_cv_type_getgroups=int
3293fi
3294rm -f conftest*
3295
3296fi
3297fi
3298
3299echo "$ac_t""$ac_cv_type_getgroups" 1>&6
3300cat >> confdefs.h <<EOF
3301#define GETGROUPS_T $ac_cv_type_getgroups
3302EOF
3303
3304
3305echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
3306echo "configure:3307: checking whether getpgrp takes no argument" >&5
3307if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
3308  echo $ac_n "(cached) $ac_c" 1>&6
3309else
3310  if test "$cross_compiling" = yes; then
3311  { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
3312else
3313  cat > conftest.$ac_ext <<EOF
3314#line 3315 "configure"
3315#include "confdefs.h"
3316
3317/*
3318 * If this system has a BSD-style getpgrp(),
3319 * which takes a pid argument, exit unsuccessfully.
3320 *
3321 * Snarfed from Chet Ramey's bash pgrp.c test program
3322 */
3323#include <stdio.h>
3324#include <sys/types.h>
3325
3326int     pid;
3327int     pg1, pg2, pg3, pg4;
3328int     ng, np, s, child;
3329
3330main()
3331{
3332        pid = getpid();
3333        pg1 = getpgrp(0);
3334        pg2 = getpgrp();
3335        pg3 = getpgrp(pid);
3336        pg4 = getpgrp(1);
3337
3338        /*
3339         * If all of these values are the same, it's pretty sure that
3340         * we're on a system that ignores getpgrp's first argument.
3341         */
3342        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
3343                exit(0);
3344
3345        child = fork();
3346        if (child < 0)
3347                exit(1);
3348        else if (child == 0) {
3349                np = getpid();
3350                /*
3351                 * If this is Sys V, this will not work; pgrp will be
3352                 * set to np because setpgrp just changes a pgrp to be
3353                 * the same as the pid.
3354                 */
3355                setpgrp(np, pg1);
3356                ng = getpgrp(0);        /* Same result for Sys V and BSD */
3357                if (ng == pg1) {
3358                        exit(1);
3359                } else {
3360                        exit(0);
3361                }
3362        } else {
3363                wait(&s);
3364                exit(s>>8);
3365        }
3366}
3367
3368EOF
3369if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3370then
3371  ac_cv_func_getpgrp_void=yes
3372else
3373  echo "configure: failed program was:" >&5
3374  cat conftest.$ac_ext >&5
3375  rm -fr conftest*
3376  ac_cv_func_getpgrp_void=no
3377fi
3378rm -fr conftest*
3379fi
3380
3381
3382fi
3383
3384echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
3385if test $ac_cv_func_getpgrp_void = yes; then
3386  cat >> confdefs.h <<\EOF
3387#define GETPGRP_VOID 1
3388EOF
3389
3390fi
3391
3392if test $ac_cv_prog_gcc = yes; then
3393    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3394echo "configure:3395: checking whether ${CC-cc} needs -traditional" >&5
3395if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3396  echo $ac_n "(cached) $ac_c" 1>&6
3397else
3398    ac_pattern="Autoconf.*'x'"
3399  cat > conftest.$ac_ext <<EOF
3400#line 3401 "configure"
3401#include "confdefs.h"
3402#include <sgtty.h>
3403Autoconf TIOCGETP
3404EOF
3405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3406  egrep "$ac_pattern" >/dev/null 2>&1; then
3407  rm -rf conftest*
3408  ac_cv_prog_gcc_traditional=yes
3409else
3410  rm -rf conftest*
3411  ac_cv_prog_gcc_traditional=no
3412fi
3413rm -f conftest*
3414
3415
3416  if test $ac_cv_prog_gcc_traditional = no; then
3417    cat > conftest.$ac_ext <<EOF
3418#line 3419 "configure"
3419#include "confdefs.h"
3420#include <termio.h>
3421Autoconf TCGETA
3422EOF
3423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3424  egrep "$ac_pattern" >/dev/null 2>&1; then
3425  rm -rf conftest*
3426  ac_cv_prog_gcc_traditional=yes
3427fi
3428rm -f conftest*
3429
3430  fi
3431fi
3432
3433echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3434  if test $ac_cv_prog_gcc_traditional = yes; then
3435    CC="$CC -traditional"
3436  fi
3437fi
3438
3439echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3440echo "configure:3441: checking for 8-bit clean memcmp" >&5
3441if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3442  echo $ac_n "(cached) $ac_c" 1>&6
3443else
3444  if test "$cross_compiling" = yes; then
3445  ac_cv_func_memcmp_clean=no
3446else
3447  cat > conftest.$ac_ext <<EOF
3448#line 3449 "configure"
3449#include "confdefs.h"
3450
3451main()
3452{
3453  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3454  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3455}
3456
3457EOF
3458if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3459then
3460  ac_cv_func_memcmp_clean=yes
3461else
3462  echo "configure: failed program was:" >&5
3463  cat conftest.$ac_ext >&5
3464  rm -fr conftest*
3465  ac_cv_func_memcmp_clean=no
3466fi
3467rm -fr conftest*
3468fi
3469
3470fi
3471
3472echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3473test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
3474
3475for ac_hdr in unistd.h
3476do
3477ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3478echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3479echo "configure:3480: checking for $ac_hdr" >&5
3480if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3481  echo $ac_n "(cached) $ac_c" 1>&6
3482else
3483  cat > conftest.$ac_ext <<EOF
3484#line 3485 "configure"
3485#include "confdefs.h"
3486#include <$ac_hdr>
3487EOF
3488ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3489{ (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3490ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3491if test -z "$ac_err"; then
3492  rm -rf conftest*
3493  eval "ac_cv_header_$ac_safe=yes"
3494else
3495  echo "$ac_err" >&5
3496  echo "configure: failed program was:" >&5
3497  cat conftest.$ac_ext >&5
3498  rm -rf conftest*
3499  eval "ac_cv_header_$ac_safe=no"
3500fi
3501rm -f conftest*
3502fi
3503if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3504  echo "$ac_t""yes" 1>&6
3505    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3506  cat >> confdefs.h <<EOF
3507#define $ac_tr_hdr 1
3508EOF
3509 
3510else
3511  echo "$ac_t""no" 1>&6
3512fi
3513done
3514
3515for ac_func in getpagesize
3516do
3517echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3518echo "configure:3519: checking for $ac_func" >&5
3519if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3520  echo $ac_n "(cached) $ac_c" 1>&6
3521else
3522  cat > conftest.$ac_ext <<EOF
3523#line 3524 "configure"
3524#include "confdefs.h"
3525/* System header to define __stub macros and hopefully few prototypes,
3526    which can conflict with char $ac_func(); below.  */
3527#include <assert.h>
3528/* Override any gcc2 internal prototype to avoid an error.  */
3529/* We use char because int might match the return type of a gcc2
3530    builtin and then its argument prototype would still apply.  */
3531char $ac_func();
3532
3533int main() {
3534
3535/* The GNU C library defines this for functions which it implements
3536    to always fail with ENOSYS.  Some functions are actually named
3537    something starting with __ and the normal name is an alias.  */
3538#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3539choke me
3540#else
3541$ac_func();
3542#endif
3543
3544; return 0; }
3545EOF
3546if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547  rm -rf conftest*
3548  eval "ac_cv_func_$ac_func=yes"
3549else
3550  echo "configure: failed program was:" >&5
3551  cat conftest.$ac_ext >&5
3552  rm -rf conftest*
3553  eval "ac_cv_func_$ac_func=no"
3554fi
3555rm -f conftest*
3556fi
3557
3558if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3559  echo "$ac_t""yes" 1>&6
3560    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3561  cat >> confdefs.h <<EOF
3562#define $ac_tr_func 1
3563EOF
3564 
3565else
3566  echo "$ac_t""no" 1>&6
3567fi
3568done
3569
3570echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3571echo "configure:3572: checking for working mmap" >&5
3572if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3573  echo $ac_n "(cached) $ac_c" 1>&6
3574else
3575  if test "$cross_compiling" = yes; then
3576  ac_cv_func_mmap_fixed_mapped=no
3577else
3578  cat > conftest.$ac_ext <<EOF
3579#line 3580 "configure"
3580#include "confdefs.h"
3581
3582/* Thanks to Mike Haertel and Jim Avera for this test.
3583   Here is a matrix of mmap possibilities:
3584        mmap private not fixed
3585        mmap private fixed at somewhere currently unmapped
3586        mmap private fixed at somewhere already mapped
3587        mmap shared not fixed
3588        mmap shared fixed at somewhere currently unmapped
3589        mmap shared fixed at somewhere already mapped
3590   For private mappings, we should verify that changes cannot be read()
3591   back from the file, nor mmap's back from the file at a different
3592   address.  (There have been systems where private was not correctly
3593   implemented like the infamous i386 svr4.0, and systems where the
3594   VM page cache was not coherent with the filesystem buffer cache
3595   like early versions of FreeBSD and possibly contemporary NetBSD.)
3596   For shared mappings, we should conversely verify that changes get
3597   propogated back to all the places they're supposed to be.
3598
3599   Grep wants private fixed already mapped.
3600   The main things grep needs to know about mmap are:
3601   * does it exist and is it safe to write into the mmap'd area
3602   * how to use it (BSD variants)  */
3603#include <sys/types.h>
3604#include <fcntl.h>
3605#include <sys/mman.h>
3606
3607/* This mess was copied from the GNU getpagesize.h.  */
3608#ifndef HAVE_GETPAGESIZE
3609# ifdef HAVE_UNISTD_H
3610#  include <unistd.h>
3611# endif
3612
3613/* Assume that all systems that can run configure have sys/param.h.  */
3614# ifndef HAVE_SYS_PARAM_H
3615#  define HAVE_SYS_PARAM_H 1
3616# endif
3617
3618# ifdef _SC_PAGESIZE
3619#  define getpagesize() sysconf(_SC_PAGESIZE)
3620# else /* no _SC_PAGESIZE */
3621#  ifdef HAVE_SYS_PARAM_H
3622#   include <sys/param.h>
3623#   ifdef EXEC_PAGESIZE
3624#    define getpagesize() EXEC_PAGESIZE
3625#   else /* no EXEC_PAGESIZE */
3626#    ifdef NBPG
3627#     define getpagesize() NBPG * CLSIZE
3628#     ifndef CLSIZE
3629#      define CLSIZE 1
3630#     endif /* no CLSIZE */
3631#    else /* no NBPG */
3632#     ifdef NBPC
3633#      define getpagesize() NBPC
3634#     else /* no NBPC */
3635#      ifdef PAGESIZE
3636#       define getpagesize() PAGESIZE
3637#      endif /* PAGESIZE */
3638#     endif /* no NBPC */
3639#    endif /* no NBPG */
3640#   endif /* no EXEC_PAGESIZE */
3641#  else /* no HAVE_SYS_PARAM_H */
3642#   define getpagesize() 8192   /* punt totally */
3643#  endif /* no HAVE_SYS_PARAM_H */
3644# endif /* no _SC_PAGESIZE */
3645
3646#endif /* no HAVE_GETPAGESIZE */
3647
3648#ifdef __cplusplus
3649extern "C" { void *malloc(unsigned); }
3650#else
3651char *malloc();
3652#endif
3653
3654int
3655main()
3656{
3657        char *data, *data2, *data3;
3658        int i, pagesize;
3659        int fd;
3660
3661        pagesize = getpagesize();
3662
3663        /*
3664         * First, make a file with some known garbage in it.
3665         */
3666        data = malloc(pagesize);
3667        if (!data)
3668                exit(1);
3669        for (i = 0; i < pagesize; ++i)
3670                *(data + i) = rand();
3671        umask(0);
3672        fd = creat("conftestmmap", 0600);
3673        if (fd < 0)
3674                exit(1);
3675        if (write(fd, data, pagesize) != pagesize)
3676                exit(1);
3677        close(fd);
3678
3679        /*
3680         * Next, try to mmap the file at a fixed address which
3681         * already has something else allocated at it.  If we can,
3682         * also make sure that we see the same garbage.
3683         */
3684        fd = open("conftestmmap", O_RDWR);
3685        if (fd < 0)
3686                exit(1);
3687        data2 = malloc(2 * pagesize);
3688        if (!data2)
3689                exit(1);
3690        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3691        if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3692            MAP_PRIVATE | MAP_FIXED, fd, 0L))
3693                exit(1);
3694        for (i = 0; i < pagesize; ++i)
3695                if (*(data + i) != *(data2 + i))
3696                        exit(1);
3697
3698        /*
3699         * Finally, make sure that changes to the mapped area
3700         * do not percolate back to the file as seen by read().
3701         * (This is a bug on some variants of i386 svr4.0.)
3702         */
3703        for (i = 0; i < pagesize; ++i)
3704                *(data2 + i) = *(data2 + i) + 1;
3705        data3 = malloc(pagesize);
3706        if (!data3)
3707                exit(1);
3708        if (read(fd, data3, pagesize) != pagesize)
3709                exit(1);
3710        for (i = 0; i < pagesize; ++i)
3711                if (*(data + i) != *(data3 + i))
3712                        exit(1);
3713        close(fd);
3714        unlink("conftestmmap");
3715        exit(0);
3716}
3717
3718EOF
3719if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3720then
3721  ac_cv_func_mmap_fixed_mapped=yes
3722else
3723  echo "configure: failed program was:" >&5
3724  cat conftest.$ac_ext >&5
3725  rm -fr conftest*
3726  ac_cv_func_mmap_fixed_mapped=no
3727fi
3728rm -fr conftest*
3729fi
3730
3731fi
3732
3733echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3734if test $ac_cv_func_mmap_fixed_mapped = yes; then
3735  cat >> confdefs.h <<\EOF
3736#define HAVE_MMAP 1
3737EOF
3738
3739fi
3740
3741echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
3742echo "configure:3743: checking whether setpgrp takes no argument" >&5
3743if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
3744  echo $ac_n "(cached) $ac_c" 1>&6
3745else
3746  if test "$cross_compiling" = yes; then
3747  { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
3748else
3749  cat > conftest.$ac_ext <<EOF
3750#line 3751 "configure"
3751#include "confdefs.h"
3752
3753#ifdef HAVE_UNISTD_H
3754#include <unistd.h>
3755#endif
3756
3757/*
3758 * If this system has a BSD-style setpgrp, which takes arguments, exit
3759 * successfully.
3760 */
3761main()
3762{
3763    if (setpgrp(1,1) == -1)
3764        exit(0);
3765    else
3766        exit(1);
3767}
3768
3769EOF
3770if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3771then
3772  ac_cv_func_setpgrp_void=no
3773else
3774  echo "configure: failed program was:" >&5
3775  cat conftest.$ac_ext >&5
3776  rm -fr conftest*
3777  ac_cv_func_setpgrp_void=yes
3778fi
3779rm -fr conftest*
3780fi
3781
3782
3783fi
3784
3785echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
3786if test $ac_cv_func_setpgrp_void = yes; then
3787  cat >> confdefs.h <<\EOF
3788#define SETPGRP_VOID 1
3789EOF
3790
3791fi
3792
3793echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
3794echo "configure:3795: checking whether setvbuf arguments are reversed" >&5
3795if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
3796  echo $ac_n "(cached) $ac_c" 1>&6
3797else
3798  if test "$cross_compiling" = yes; then
3799    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3800else
3801  cat > conftest.$ac_ext <<EOF
3802#line 3803 "configure"
3803#include "confdefs.h"
3804#include <stdio.h>
3805/* If setvbuf has the reversed format, exit 0. */
3806main () {
3807  /* This call has the arguments reversed.
3808     A reversed system may check and see that the address of main
3809     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
3810  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
3811    exit(1);
3812  putc('\r', stdout);
3813  exit(0);                      /* Non-reversed systems segv here.  */
3814}
3815EOF
3816if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3817then
3818  ac_cv_func_setvbuf_reversed=yes
3819else
3820  echo "configure: failed program was:" >&5
3821  cat conftest.$ac_ext >&5
3822  rm -fr conftest*
3823  ac_cv_func_setvbuf_reversed=no
3824fi
3825rm -fr conftest*
3826fi
3827
3828rm -f core core.* *.core
3829fi
3830
3831echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
3832if test $ac_cv_func_setvbuf_reversed = yes; then
3833  cat >> confdefs.h <<\EOF
3834#define SETVBUF_REVERSED 1
3835EOF
3836
3837fi
3838
3839echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3840echo "configure:3841: checking return type of signal handlers" >&5
3841if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3842  echo $ac_n "(cached) $ac_c" 1>&6
3843else
3844  cat > conftest.$ac_ext <<EOF
3845#line 3846 "configure"
3846#include "confdefs.h"
3847#include <sys/types.h>
3848#include <signal.h>
3849#ifdef signal
3850#undef signal
3851#endif
3852#ifdef __cplusplus
3853extern "C" void (*signal (int, void (*)(int)))(int);
3854#else
3855void (*signal ()) ();
3856#endif
3857
3858int main() {
3859int i;
3860; return 0; }
3861EOF
3862if { (eval echo configure:3863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3863  rm -rf conftest*
3864  ac_cv_type_signal=void
3865else
3866  echo "configure: failed program was:" >&5
3867  cat conftest.$ac_ext >&5
3868  rm -rf conftest*
3869  ac_cv_type_signal=int
3870fi
3871rm -f conftest*
3872fi
3873
3874echo "$ac_t""$ac_cv_type_signal" 1>&6
3875cat >> confdefs.h <<EOF
3876#define RETSIGTYPE $ac_cv_type_signal
3877EOF
3878
3879
3880echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
3881echo "configure:3882: checking for working strcoll" >&5
3882if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
3883  echo $ac_n "(cached) $ac_c" 1>&6
3884else
3885  if test "$cross_compiling" = yes; then
3886  ac_cv_func_strcoll_works=no
3887else
3888  cat > conftest.$ac_ext <<EOF
3889#line 3890 "configure"
3890#include "confdefs.h"
3891#include <string.h>
3892main ()
3893{
3894  exit (strcoll ("abc", "def") >= 0 ||
3895        strcoll ("ABC", "DEF") >= 0 ||
3896        strcoll ("123", "456") >= 0);
3897}
3898EOF
3899if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3900then
3901  ac_cv_func_strcoll_works=yes
3902else
3903  echo "configure: failed program was:" >&5
3904  cat conftest.$ac_ext >&5
3905  rm -fr conftest*
3906  ac_cv_func_strcoll_works=no
3907fi
3908rm -fr conftest*
3909fi
3910
3911fi
3912
3913echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
3914if test $ac_cv_func_strcoll_works = yes; then
3915  cat >> confdefs.h <<\EOF
3916#define HAVE_STRCOLL 1
3917EOF
3918
3919fi
3920
3921echo $ac_n "checking for strftime""... $ac_c" 1>&6
3922echo "configure:3923: checking for strftime" >&5
3923if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
3924  echo $ac_n "(cached) $ac_c" 1>&6
3925else
3926  cat > conftest.$ac_ext <<EOF
3927#line 3928 "configure"
3928#include "confdefs.h"
3929/* System header to define __stub macros and hopefully few prototypes,
3930    which can conflict with char strftime(); below.  */
3931#include <assert.h>
3932/* Override any gcc2 internal prototype to avoid an error.  */
3933/* We use char because int might match the return type of a gcc2
3934    builtin and then its argument prototype would still apply.  */
3935char strftime();
3936
3937int main() {
3938
3939/* The GNU C library defines this for functions which it implements
3940    to always fail with ENOSYS.  Some functions are actually named
3941    something starting with __ and the normal name is an alias.  */
3942#if defined (__stub_strftime) || defined (__stub___strftime)
3943choke me
3944#else
3945strftime();
3946#endif
3947
3948; return 0; }
3949EOF
3950if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3951  rm -rf conftest*
3952  eval "ac_cv_func_strftime=yes"
3953else
3954  echo "configure: failed program was:" >&5
3955  cat conftest.$ac_ext >&5
3956  rm -rf conftest*
3957  eval "ac_cv_func_strftime=no"
3958fi
3959rm -f conftest*
3960fi
3961
3962if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
3963  echo "$ac_t""yes" 1>&6
3964  cat >> confdefs.h <<\EOF
3965#define HAVE_STRFTIME 1
3966EOF
3967
3968else
3969  echo "$ac_t""no" 1>&6
3970# strftime is in -lintl on SCO UNIX.
3971echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
3972echo "configure:3973: checking for strftime in -lintl" >&5
3973ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
3974if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3975  echo $ac_n "(cached) $ac_c" 1>&6
3976else
3977  ac_save_LIBS="$LIBS"
3978LIBS="-lintl  $LIBS"
3979cat > conftest.$ac_ext <<EOF
3980#line 3981 "configure"
3981#include "confdefs.h"
3982/* Override any gcc2 internal prototype to avoid an error.  */
3983/* We use char because int might match the return type of a gcc2
3984    builtin and then its argument prototype would still apply.  */
3985char strftime();
3986
3987int main() {
3988strftime()
3989; return 0; }
3990EOF
3991if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992  rm -rf conftest*
3993  eval "ac_cv_lib_$ac_lib_var=yes"
3994else
3995  echo "configure: failed program was:" >&5
3996  cat conftest.$ac_ext >&5
3997  rm -rf conftest*
3998  eval "ac_cv_lib_$ac_lib_var=no"
3999fi
4000rm -f conftest*
4001LIBS="$ac_save_LIBS"
4002
4003fi
4004if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4005  echo "$ac_t""yes" 1>&6
4006  cat >> confdefs.h <<\EOF
4007#define HAVE_STRFTIME 1
4008EOF
4009
4010LIBS="-lintl $LIBS"
4011else
4012  echo "$ac_t""no" 1>&6
4013fi
4014
4015fi
4016
4017ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4018echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4019echo "configure:4020: checking for vfork.h" >&5
4020if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4021  echo $ac_n "(cached) $ac_c" 1>&6
4022else
4023  cat > conftest.$ac_ext <<EOF
4024#line 4025 "configure"
4025#include "confdefs.h"
4026#include <vfork.h>
4027EOF
4028ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4029{ (eval echo configure:4030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4030ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4031if test -z "$ac_err"; then
4032  rm -rf conftest*
4033  eval "ac_cv_header_$ac_safe=yes"
4034else
4035  echo "$ac_err" >&5
4036  echo "configure: failed program was:" >&5
4037  cat conftest.$ac_ext >&5
4038  rm -rf conftest*
4039  eval "ac_cv_header_$ac_safe=no"
4040fi
4041rm -f conftest*
4042fi
4043if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4044  echo "$ac_t""yes" 1>&6
4045  cat >> confdefs.h <<\EOF
4046#define HAVE_VFORK_H 1
4047EOF
4048
4049else
4050  echo "$ac_t""no" 1>&6
4051fi
4052
4053echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4054echo "configure:4055: checking for working vfork" >&5
4055if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4056  echo $ac_n "(cached) $ac_c" 1>&6
4057else
4058  if test "$cross_compiling" = yes; then
4059  echo $ac_n "checking for vfork""... $ac_c" 1>&6
4060echo "configure:4061: checking for vfork" >&5
4061if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4062  echo $ac_n "(cached) $ac_c" 1>&6
4063else
4064  cat > conftest.$ac_ext <<EOF
4065#line 4066 "configure"
4066#include "confdefs.h"
4067/* System header to define __stub macros and hopefully few prototypes,
4068    which can conflict with char vfork(); below.  */
4069#include <assert.h>
4070/* Override any gcc2 internal prototype to avoid an error.  */
4071/* We use char because int might match the return type of a gcc2
4072    builtin and then its argument prototype would still apply.  */
4073char vfork();
4074
4075int main() {
4076
4077/* The GNU C library defines this for functions which it implements
4078    to always fail with ENOSYS.  Some functions are actually named
4079    something starting with __ and the normal name is an alias.  */
4080#if defined (__stub_vfork) || defined (__stub___vfork)
4081choke me
4082#else
4083vfork();
4084#endif
4085
4086; return 0; }
4087EOF
4088if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4089  rm -rf conftest*
4090  eval "ac_cv_func_vfork=yes"
4091else
4092  echo "configure: failed program was:" >&5
4093  cat conftest.$ac_ext >&5
4094  rm -rf conftest*
4095  eval "ac_cv_func_vfork=no"
4096fi
4097rm -f conftest*
4098fi
4099
4100if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4101  echo "$ac_t""yes" 1>&6
4102  :
4103else
4104  echo "$ac_t""no" 1>&6
4105fi
4106
4107ac_cv_func_vfork_works=$ac_cv_func_vfork
4108else
4109  cat > conftest.$ac_ext <<EOF
4110#line 4111 "configure"
4111#include "confdefs.h"
4112/* Thanks to Paul Eggert for this test.  */
4113#include <stdio.h>
4114#include <sys/types.h>
4115#include <sys/stat.h>
4116#ifdef HAVE_UNISTD_H
4117#include <unistd.h>
4118#endif
4119#ifdef HAVE_VFORK_H
4120#include <vfork.h>
4121#endif
4122/* On some sparc systems, changes by the child to local and incoming
4123   argument registers are propagated back to the parent.
4124   The compiler is told about this with #include <vfork.h>,
4125   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4126   Test for this by using a static variable whose address
4127   is put into a register that is clobbered by the vfork.  */
4128static
4129#ifdef __cplusplus
4130sparc_address_test (int arg)
4131#else
4132sparc_address_test (arg) int arg;
4133#endif
4134{
4135  static pid_t child;
4136  if (!child) {
4137    child = vfork ();
4138    if (child < 0) {
4139      perror ("vfork");
4140      _exit(2);
4141    }
4142    if (!child) {
4143      arg = getpid();
4144      write(-1, "", 0);
4145      _exit (arg);
4146    }
4147  }
4148}
4149main() {
4150  pid_t parent = getpid ();
4151  pid_t child;
4152
4153  sparc_address_test ();
4154
4155  child = vfork ();
4156
4157  if (child == 0) {
4158    /* Here is another test for sparc vfork register problems.
4159       This test uses lots of local variables, at least
4160       as many local variables as main has allocated so far
4161       including compiler temporaries.  4 locals are enough for
4162       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4163       A buggy compiler should reuse the register of parent
4164       for one of the local variables, since it will think that
4165       parent can't possibly be used any more in this routine.
4166       Assigning to the local variable will thus munge parent
4167       in the parent process.  */
4168    pid_t
4169      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4170      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4171    /* Convince the compiler that p..p7 are live; otherwise, it might
4172       use the same hardware register for all 8 local variables.  */
4173    if (p != p1 || p != p2 || p != p3 || p != p4
4174        || p != p5 || p != p6 || p != p7)
4175      _exit(1);
4176
4177    /* On some systems (e.g. IRIX 3.3),
4178       vfork doesn't separate parent from child file descriptors.
4179       If the child closes a descriptor before it execs or exits,
4180       this munges the parent's descriptor as well.
4181       Test for this by closing stdout in the child.  */
4182    _exit(close(fileno(stdout)) != 0);
4183  } else {
4184    int status;
4185    struct stat st;
4186
4187    while (wait(&status) != child)
4188      ;
4189    exit(
4190         /* Was there some problem with vforking?  */
4191         child < 0
4192
4193         /* Did the child fail?  (This shouldn't happen.)  */
4194         || status
4195
4196         /* Did the vfork/compiler bug occur?  */
4197         || parent != getpid()
4198
4199         /* Did the file descriptor bug occur?  */
4200         || fstat(fileno(stdout), &st) != 0
4201         );
4202  }
4203}
4204EOF
4205if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4206then
4207  ac_cv_func_vfork_works=yes
4208else
4209  echo "configure: failed program was:" >&5
4210  cat conftest.$ac_ext >&5
4211  rm -fr conftest*
4212  ac_cv_func_vfork_works=no
4213fi
4214rm -fr conftest*
4215fi
4216
4217fi
4218
4219echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4220if test $ac_cv_func_vfork_works = no; then
4221  cat >> confdefs.h <<\EOF
4222#define vfork fork
4223EOF
4224
4225fi
4226
4227echo $ac_n "checking for vprintf""... $ac_c" 1>&6
4228echo "configure:4229: checking for vprintf" >&5
4229if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
4230  echo $ac_n "(cached) $ac_c" 1>&6
4231else
4232  cat > conftest.$ac_ext <<EOF
4233#line 4234 "configure"
4234#include "confdefs.h"
4235/* System header to define __stub macros and hopefully few prototypes,
4236    which can conflict with char vprintf(); below.  */
4237#include <assert.h>
4238/* Override any gcc2 internal prototype to avoid an error.  */
4239/* We use char because int might match the return type of a gcc2
4240    builtin and then its argument prototype would still apply.  */
4241char vprintf();
4242
4243int main() {
4244
4245/* The GNU C library defines this for functions which it implements
4246    to always fail with ENOSYS.  Some functions are actually named
4247    something starting with __ and the normal name is an alias.  */
4248#if defined (__stub_vprintf) || defined (__stub___vprintf)
4249choke me
4250#else
4251vprintf();
4252#endif
4253
4254; return 0; }
4255EOF
4256if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4257  rm -rf conftest*
4258  eval "ac_cv_func_vprintf=yes"
4259else
4260  echo "configure: failed program was:" >&5
4261  cat conftest.$ac_ext >&5
4262  rm -rf conftest*
4263  eval "ac_cv_func_vprintf=no"
4264fi
4265rm -f conftest*
4266fi
4267
4268if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
4269  echo "$ac_t""yes" 1>&6
4270  cat >> confdefs.h <<\EOF
4271#define HAVE_VPRINTF 1
4272EOF
4273
4274else
4275  echo "$ac_t""no" 1>&6
4276fi
4277
4278if test "$ac_cv_func_vprintf" != yes; then
4279echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
4280echo "configure:4281: checking for _doprnt" >&5
4281if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
4282  echo $ac_n "(cached) $ac_c" 1>&6
4283else
4284  cat > conftest.$ac_ext <<EOF
4285#line 4286 "configure"
4286#include "confdefs.h"
4287/* System header to define __stub macros and hopefully few prototypes,
4288    which can conflict with char _doprnt(); below.  */
4289#include <assert.h>
4290/* Override any gcc2 internal prototype to avoid an error.  */
4291/* We use char because int might match the return type of a gcc2
4292    builtin and then its argument prototype would still apply.  */
4293char _doprnt();
4294
4295int main() {
4296
4297/* The GNU C library defines this for functions which it implements
4298    to always fail with ENOSYS.  Some functions are actually named
4299    something starting with __ and the normal name is an alias.  */
4300#if defined (__stub__doprnt) || defined (__stub____doprnt)
4301choke me
4302#else
4303_doprnt();
4304#endif
4305
4306; return 0; }
4307EOF
4308if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4309  rm -rf conftest*
4310  eval "ac_cv_func__doprnt=yes"
4311else
4312  echo "configure: failed program was:" >&5
4313  cat conftest.$ac_ext >&5
4314  rm -rf conftest*
4315  eval "ac_cv_func__doprnt=no"
4316fi
4317rm -f conftest*
4318fi
4319
4320if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
4321  echo "$ac_t""yes" 1>&6
4322  cat >> confdefs.h <<\EOF
4323#define HAVE_DOPRNT 1
4324EOF
4325
4326else
4327  echo "$ac_t""no" 1>&6
4328fi
4329
4330fi
4331
4332echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
4333echo "configure:4334: checking for wait3 that fills in rusage" >&5
4334if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
4335  echo $ac_n "(cached) $ac_c" 1>&6
4336else
4337  if test "$cross_compiling" = yes; then
4338  ac_cv_func_wait3_rusage=no
4339else
4340  cat > conftest.$ac_ext <<EOF
4341#line 4342 "configure"
4342#include "confdefs.h"
4343#include <sys/types.h>
4344#include <sys/time.h>
4345#include <sys/resource.h>
4346#include <stdio.h>
4347/* HP-UX has wait3 but does not fill in rusage at all.  */
4348main() {
4349  struct rusage r;
4350  int i;
4351  /* Use a field that we can force nonzero --
4352     voluntary context switches.
4353     For systems like NeXT and OSF/1 that don't set it,
4354     also use the system CPU time.  And page faults (I/O) for Linux.  */
4355  r.ru_nvcsw = 0;
4356  r.ru_stime.tv_sec = 0;
4357  r.ru_stime.tv_usec = 0;
4358  r.ru_majflt = r.ru_minflt = 0;
4359  switch (fork()) {
4360  case 0: /* Child.  */
4361    sleep(1); /* Give up the CPU.  */
4362    _exit(0);
4363  case -1: _exit(0); /* What can we do?  */
4364  default: /* Parent.  */
4365    wait3(&i, 0, &r);
4366    sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
4367    exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
4368         && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
4369  }
4370}
4371EOF
4372if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4373then
4374  ac_cv_func_wait3_rusage=yes
4375else
4376  echo "configure: failed program was:" >&5
4377  cat conftest.$ac_ext >&5
4378  rm -fr conftest*
4379  ac_cv_func_wait3_rusage=no
4380fi
4381rm -fr conftest*
4382fi
4383
4384fi
4385
4386echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
4387if test $ac_cv_func_wait3_rusage = yes; then
4388  cat >> confdefs.h <<\EOF
4389#define HAVE_WAIT3 1
4390EOF
4391
4392fi
4393
4394for ac_func in \
4395ether_ntoa \
4396ether_ntohost \
4397kvm_getswapinfo \
4398gethostname gethostid \
4399getutid \
4400memcpy memset \
4401re_comp regcmp regcomp \
4402strtol strtoll \
4403uname asctime \
4404statfs statvfs \
4405putenv setenv \
4406strchr strrchr \
4407strdup strerror snprintf strcasecmp \
4408swapctl setreuid sysconf \
4409llseek lseek64 \
4410wait4 waitpid \
4411
4412do
4413echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4414echo "configure:4415: checking for $ac_func" >&5
4415if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4416  echo $ac_n "(cached) $ac_c" 1>&6
4417else
4418  cat > conftest.$ac_ext <<EOF
4419#line 4420 "configure"
4420#include "confdefs.h"
4421/* System header to define __stub macros and hopefully few prototypes,
4422    which can conflict with char $ac_func(); below.  */
4423#include <assert.h>
4424/* Override any gcc2 internal prototype to avoid an error.  */
4425/* We use char because int might match the return type of a gcc2
4426    builtin and then its argument prototype would still apply.  */
4427char $ac_func();
4428
4429int main() {
4430
4431/* The GNU C library defines this for functions which it implements
4432    to always fail with ENOSYS.  Some functions are actually named
4433    something starting with __ and the normal name is an alias.  */
4434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4435choke me
4436#else
4437$ac_func();
4438#endif
4439
4440; return 0; }
4441EOF
4442if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4443  rm -rf conftest*
4444  eval "ac_cv_func_$ac_func=yes"
4445else
4446  echo "configure: failed program was:" >&5
4447  cat conftest.$ac_ext >&5
4448  rm -rf conftest*
4449  eval "ac_cv_func_$ac_func=no"
4450fi
4451rm -f conftest*
4452fi
4453
4454if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4455  echo "$ac_t""yes" 1>&6
4456    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4457  cat >> confdefs.h <<EOF
4458#define $ac_tr_func 1
4459EOF
4460 
4461else
4462  echo "$ac_t""no" 1>&6
4463fi
4464done
4465
4466
4467if test "$osname" != "linux"; then
4468for ac_func in \
4469nlist nlist64 knlist \
4470
4471do
4472echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4473echo "configure:4474: checking for $ac_func" >&5
4474if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4475  echo $ac_n "(cached) $ac_c" 1>&6
4476else
4477  cat > conftest.$ac_ext <<EOF
4478#line 4479 "configure"
4479#include "confdefs.h"
4480/* System header to define __stub macros and hopefully few prototypes,
4481    which can conflict with char $ac_func(); below.  */
4482#include <assert.h>
4483/* Override any gcc2 internal prototype to avoid an error.  */
4484/* We use char because int might match the return type of a gcc2
4485    builtin and then its argument prototype would still apply.  */
4486char $ac_func();
4487
4488int main() {
4489
4490/* The GNU C library defines this for functions which it implements
4491    to always fail with ENOSYS.  Some functions are actually named
4492    something starting with __ and the normal name is an alias.  */
4493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4494choke me
4495#else
4496$ac_func();
4497#endif
4498
4499; return 0; }
4500EOF
4501if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4502  rm -rf conftest*
4503  eval "ac_cv_func_$ac_func=yes"
4504else
4505  echo "configure: failed program was:" >&5
4506  cat conftest.$ac_ext >&5
4507  rm -rf conftest*
4508  eval "ac_cv_func_$ac_func=no"
4509fi
4510rm -f conftest*
4511fi
4512
4513if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4514  echo "$ac_t""yes" 1>&6
4515    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4516  cat >> confdefs.h <<EOF
4517#define $ac_tr_func 1
4518EOF
4519 
4520else
4521  echo "$ac_t""no" 1>&6
4522fi
4523done
4524
4525fi
4526
4527echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
4528echo "configure:4529: checking for sysinfo" >&5
4529have_sysinfo="no"
4530have_systeminfo_h="no"
4531cat > conftest.$ac_ext <<EOF
4532#line 4533 "configure"
4533#include "confdefs.h"
4534#include <sys/systeminfo.h>
4535EOF
4536ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4537{ (eval echo configure:4538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4538ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4539if test -z "$ac_err"; then
4540  rm -rf conftest*
4541  have_systeminfo_h="yes"
4542else
4543  echo "$ac_err" >&5
4544  echo "configure: failed program was:" >&5
4545  cat conftest.$ac_ext >&5
4546fi
4547rm -f conftest*
4548if test $have_systeminfo_h = "yes"; then
4549        cat > conftest.$ac_ext <<EOF
4550#line 4551 "configure"
4551#include "confdefs.h"
4552
4553#include <sys/systeminfo.h>
4554
4555int main() {
4556
4557char b[100];
4558sysinfo(SI_RELEASE, b, 100);
4559
4560; return 0; }
4561EOF
4562if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4563  rm -rf conftest*
4564  have_sysinfo="yes"
4565else
4566  echo "configure: failed program was:" >&5
4567  cat conftest.$ac_ext >&5
4568fi
4569rm -f conftest*
4570fi
4571
4572if test $have_sysinfo = "yes"; then
4573        cat >> confdefs.h <<\EOF
4574#define HAVE_SYSINFO 1
4575EOF
4576
4577fi
4578echo "$ac_t""$have_sysinfo" 1>&6
4579
4580echo $ac_n "checking for struct in_ifaddr""... $ac_c" 1>&6
4581echo "configure:4582: checking for struct in_ifaddr" >&5
4582ans="yes"
4583cat > conftest.$ac_ext <<EOF
4584#line 4585 "configure"
4585#include "confdefs.h"
4586
4587#include <sys/types.h>
4588#include <sys/socket.h>
4589#include <net/if.h>
4590#include <netinet/in.h>
4591#include <netinet/in_var.h>
4592
4593int main() {
4594struct in_ifaddr f
4595; return 0; }
4596EOF
4597if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4598  rm -rf conftest*
4599  cat >> confdefs.h <<\EOF
4600#define HAVE_IN_IFADDR 1
4601EOF
4602
4603else
4604  echo "configure: failed program was:" >&5
4605  cat conftest.$ac_ext >&5
4606  rm -rf conftest*
4607  ans=no
4608fi
4609rm -f conftest*
4610echo "$ac_t""$ans" 1>&6
4611
4612echo $ac_n "checking for struct ifnet""... $ac_c" 1>&6
4613echo "configure:4614: checking for struct ifnet" >&5
4614ans="yes"
4615cat > conftest.$ac_ext <<EOF
4616#line 4617 "configure"
4617#include "confdefs.h"
4618
4619#include <sys/types.h>
4620#include <sys/socket.h>
4621#include <net/if.h>
4622
4623int main() {
4624
4625struct ifnet f;
4626struct ifaddr ifa;
4627ifa.ifa_addr.sa_family = (sa_family_t) 0;
4628
4629; return 0; }
4630EOF
4631if { (eval echo configure:4632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4632  rm -rf conftest*
4633  cat >> confdefs.h <<\EOF
4634#define HAVE_IFNET 1
4635EOF
4636
4637else
4638  echo "configure: failed program was:" >&5
4639  cat conftest.$ac_ext >&5
4640  rm -rf conftest*
4641  ans=no
4642fi
4643rm -f conftest*
4644echo "$ac_t""$ans" 1>&6
4645
4646echo $ac_n "checking for struct ifnet->if_version""... $ac_c" 1>&6
4647echo "configure:4648: checking for struct ifnet->if_version" >&5
4648ans="yes"
4649cat > conftest.$ac_ext <<EOF
4650#line 4651 "configure"
4651#include "confdefs.h"
4652
4653#include <sys/types.h>
4654#include <sys/socket.h>
4655#include <net/if.h>
4656
4657int main() {
4658
4659struct ifnet f;
4660char *s;
4661s = f.if_version;
4662
4663; return 0; }
4664EOF
4665if { (eval echo configure:4666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4666  rm -rf conftest*
4667  cat >> confdefs.h <<\EOF
4668#define HAVE_IF_VERSION 1
4669EOF
4670
4671else
4672  echo "configure: failed program was:" >&5
4673  cat conftest.$ac_ext >&5
4674  rm -rf conftest*
4675  ans=no
4676fi
4677rm -f conftest*
4678echo "$ac_t""$ans" 1>&6
4679
4680echo $ac_n "checking for struct ether_addr""... $ac_c" 1>&6
4681echo "configure:4682: checking for struct ether_addr" >&5
4682ans="yes"
4683cat > conftest.$ac_ext <<EOF
4684#line 4685 "configure"
4685#include "confdefs.h"
4686
4687#include <sys/types.h>
4688#include <sys/socket.h>
4689#include <net/if.h>
4690#include <netinet/in.h>
4691#include <netinet/if_ether.h>
4692
4693int main() {
4694struct ether_addr ea
4695; return 0; }
4696EOF
4697if { (eval echo configure:4698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4698  rm -rf conftest*
4699  cat >> confdefs.h <<\EOF
4700#define HAVE_ETHER_ADDR 1
4701EOF
4702
4703else
4704  echo "configure: failed program was:" >&5
4705  cat conftest.$ac_ext >&5
4706  rm -rf conftest*
4707  ans=no
4708fi
4709rm -f conftest*
4710echo "$ac_t""$ans" 1>&6
4711
4712echo $ac_n "checking for struct anoninfo""... $ac_c" 1>&6
4713echo "configure:4714: checking for struct anoninfo" >&5
4714ans="yes"
4715cat > conftest.$ac_ext <<EOF
4716#line 4717 "configure"
4717#include "confdefs.h"
4718
4719#include <sys/types.h>
4720#include <vm/anon.h>
4721
4722int main() {
4723struct anoninfo f
4724; return 0; }
4725EOF
4726if { (eval echo configure:4727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4727  rm -rf conftest*
4728  cat >> confdefs.h <<\EOF
4729#define HAVE_ANONINFO 1
4730EOF
4731
4732else
4733  echo "configure: failed program was:" >&5
4734  cat conftest.$ac_ext >&5
4735  rm -rf conftest*
4736  ans=no
4737fi
4738rm -f conftest*
4739echo "$ac_t""$ans" 1>&6
4740
4741echo $ac_n "checking if printf supports "%lld"""... $ac_c" 1>&6
4742echo "configure:4743: checking if printf supports "%lld"" >&5
4743ans="no"
4744cat > conftest.c <<EOF
4745int main()
4746{
4747printf("%lld\n", 1);
4748return 0;
4749}
4750EOF
4751${CC-cc} $CFLAGS $CPPFLAGS conftest.c -o conftest > /dev/null 2>&1 && \
4752        result=`./conftest`
4753if test "$result" = "1"; then
4754cat >> confdefs.h <<\EOF
4755#define HAVE_PRINTF_LL 1
4756EOF
4757
4758ans=yes
4759fi
4760rm -f conftest conftest.c
4761echo "$ac_t""$ans" 1>&6
4762
4763rm -f core
4764
4765
4766VarsMF=$srcdir/mf/Vars.mf
4767
4768RulesMF=$srcdir/mf/Rules.mf
4769
4770
4771
4772
4773
4774
4775trap '' 1 2 15
4776cat > confcache <<\EOF
4777# This file is a shell script that caches the results of configure
4778# tests run on this system so they can be shared between configure
4779# scripts and configure runs.  It is not useful on other systems.
4780# If it contains results you don't want to keep, you may remove or edit it.
4781#
4782# By default, configure uses ./config.cache as the cache file,
4783# creating it if it does not exist already.  You can give configure
4784# the --cache-file=FILE option to use a different cache file; that is
4785# what configure does when it calls configure scripts in
4786# subdirectories, so they share the cache.
4787# Giving --cache-file=/dev/null disables caching, for debugging configure.
4788# config.status only pays attention to the cache file if you give it the
4789# --recheck option to rerun configure.
4790#
4791EOF
4792# The following way of writing the cache mishandles newlines in values,
4793# but we know of no workaround that is simple, portable, and efficient.
4794# So, don't put newlines in cache variables' values.
4795# Ultrix sh set writes to stderr and can't be redirected directly,
4796# and sets the high bit in the cache file unless we assign to the vars.
4797(set) 2>&1 |
4798  case `(ac_space=' '; set | grep ac_space) 2>&1` in
4799  *ac_space=\ *)
4800    # `set' does not quote correctly, so add quotes (double-quote substitution
4801    # turns \\\\ into \\, and sed turns \\ into \).
4802    sed -n \
4803      -e "s/'/'\\\\''/g" \
4804      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4805    ;;
4806  *)
4807    # `set' quotes correctly as required by POSIX, so do not add quotes.
4808    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4809    ;;
4810  esac >> confcache
4811if cmp -s $cache_file confcache; then
4812  :
4813else
4814  if test -w $cache_file; then
4815    echo "updating cache $cache_file"
4816    cat confcache > $cache_file
4817  else
4818    echo "not updating unwritable cache $cache_file"
4819  fi
4820fi
4821rm -f confcache
4822
4823trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4824
4825test "x$prefix" = xNONE && prefix=$ac_default_prefix
4826# Let make expand exec_prefix.
4827test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4828
4829# Any assignment to VPATH causes Sun make to only execute
4830# the first set of double-colon rules, so remove it if not needed.
4831# If there is a colon in the path, we need to keep it.
4832if test "x$srcdir" = x.; then
4833  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4834fi
4835
4836trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4837
4838DEFS=-DHAVE_CONFIG_H
4839
4840# Without the "./", some shells look in PATH for config.status.
4841: ${CONFIG_STATUS=./config.status}
4842
4843echo creating $CONFIG_STATUS
4844rm -f $CONFIG_STATUS
4845cat > $CONFIG_STATUS <<EOF
4846#! /bin/sh
4847# Generated automatically by configure.
4848# Run this file to recreate the current configuration.
4849# This directory was configured as follows,
4850# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4851#
4852# $0 $ac_configure_args
4853#
4854# Compiler output produced by configure, useful for debugging
4855# configure, is in ./config.log if it exists.
4856
4857ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4858for ac_option
4859do
4860  case "\$ac_option" in
4861  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4862    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4863    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4864  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4865    echo "$CONFIG_STATUS generated by autoconf version 2.13"
4866    exit 0 ;;
4867  -help | --help | --hel | --he | --h)
4868    echo "\$ac_cs_usage"; exit 0 ;;
4869  *) echo "\$ac_cs_usage"; exit 1 ;;
4870  esac
4871done
4872
4873ac_given_srcdir=$srcdir
4874ac_given_INSTALL="$INSTALL"
4875
4876trap 'rm -fr `echo "
4877Makefile
4878config/Makefile
4879doc/Makefile
4880doc/mcsysinfo.man
4881doc/sysinfo.man
4882doc/sysinfo.cf.man
4883include/Makefile
4884lib/Makefile
4885mcd/Makefile
4886sysinfo/Makefile
4887sysinfo/sysinfowrapper
4888configvars.sh
4889 include/autoconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4890EOF
4891cat >> $CONFIG_STATUS <<EOF
4892
4893# Protect against being on the right side of a sed subst in config.status.
4894sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4895 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4896$ac_vpsub
4897$extrasub
4898s%@SHELL@%$SHELL%g
4899s%@CFLAGS@%$CFLAGS%g
4900s%@CPPFLAGS@%$CPPFLAGS%g
4901s%@CXXFLAGS@%$CXXFLAGS%g
4902s%@FFLAGS@%$FFLAGS%g
4903s%@DEFS@%$DEFS%g
4904s%@LDFLAGS@%$LDFLAGS%g
4905s%@LIBS@%$LIBS%g
4906s%@exec_prefix@%$exec_prefix%g
4907s%@prefix@%$prefix%g
4908s%@program_transform_name@%$program_transform_name%g
4909s%@bindir@%$bindir%g
4910s%@sbindir@%$sbindir%g
4911s%@libexecdir@%$libexecdir%g
4912s%@datadir@%$datadir%g
4913s%@sysconfdir@%$sysconfdir%g
4914s%@sharedstatedir@%$sharedstatedir%g
4915s%@localstatedir@%$localstatedir%g
4916s%@libdir@%$libdir%g
4917s%@includedir@%$includedir%g
4918s%@oldincludedir@%$oldincludedir%g
4919s%@infodir@%$infodir%g
4920s%@mandir@%$mandir%g
4921s%@osinfodef@%$osinfodef%g
4922s%@osname@%$osname%g
4923s%@osver@%$osver%g
4924s%@ostype@%$ostype%g
4925s%@osmver@%$osmver%g
4926s%@kisa@%$kisa%g
4927/@OSNAMEmf@/r $OSNAMEmf
4928s%@OSNAMEmf@%%g
4929/@OSNAMEMVERmf@/r $OSNAMEMVERmf
4930s%@OSNAMEMVERmf@%%g
4931/@OSNAMEVERmf@/r $OSNAMEVERmf
4932s%@OSNAMEVERmf@%%g
4933s%@cfdir@%$cfdir%g
4934s%@CC@%$CC%g
4935s%@AWK@%$AWK%g
4936s%@LN_S@%$LN_S%g
4937s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4938s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4939s%@INSTALL_DATA@%$INSTALL_DATA%g
4940s%@RANLIB@%$RANLIB%g
4941s%@ar@%$ar%g
4942s%@CPP@%$CPP%g
4943s%@LIBOBJS@%$LIBOBJS%g
4944/@VarsMF@/r $VarsMF
4945s%@VarsMF@%%g
4946/@RulesMF@/r $RulesMF
4947s%@RulesMF@%%g
4948
4949CEOF
4950EOF
4951
4952cat >> $CONFIG_STATUS <<\EOF
4953
4954# Split the substitutions into bite-sized pieces for seds with
4955# small command number limits, like on Digital OSF/1 and HP-UX.
4956ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4957ac_file=1 # Number of current file.
4958ac_beg=1 # First line for current file.
4959ac_end=$ac_max_sed_cmds # Line after last line for current file.
4960ac_more_lines=:
4961ac_sed_cmds=""
4962while $ac_more_lines; do
4963  if test $ac_beg -gt 1; then
4964    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4965  else
4966    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4967  fi
4968  if test ! -s conftest.s$ac_file; then
4969    ac_more_lines=false
4970    rm -f conftest.s$ac_file
4971  else
4972    if test -z "$ac_sed_cmds"; then
4973      ac_sed_cmds="sed -f conftest.s$ac_file"
4974    else
4975      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4976    fi
4977    ac_file=`expr $ac_file + 1`
4978    ac_beg=$ac_end
4979    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4980  fi
4981done
4982if test -z "$ac_sed_cmds"; then
4983  ac_sed_cmds=cat
4984fi
4985EOF
4986
4987cat >> $CONFIG_STATUS <<EOF
4988
4989CONFIG_FILES=\${CONFIG_FILES-"Makefile
4990config/Makefile
4991doc/Makefile
4992doc/mcsysinfo.man
4993doc/sysinfo.man
4994doc/sysinfo.cf.man
4995include/Makefile
4996lib/Makefile
4997mcd/Makefile
4998sysinfo/Makefile
4999sysinfo/sysinfowrapper
5000configvars.sh
5001"}
5002EOF
5003cat >> $CONFIG_STATUS <<\EOF
5004for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5005  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5006  case "$ac_file" in
5007  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5008       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5009  *) ac_file_in="${ac_file}.in" ;;
5010  esac
5011
5012  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5013
5014  # Remove last slash and all that follows it.  Not all systems have dirname.
5015  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5016  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5017    # The file is in a subdirectory.
5018    test ! -d "$ac_dir" && mkdir "$ac_dir"
5019    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5020    # A "../" for each directory in $ac_dir_suffix.
5021    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5022  else
5023    ac_dir_suffix= ac_dots=
5024  fi
5025
5026  case "$ac_given_srcdir" in
5027  .)  srcdir=.
5028      if test -z "$ac_dots"; then top_srcdir=.
5029      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5030  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5031  *) # Relative path.
5032    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5033    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5034  esac
5035
5036  case "$ac_given_INSTALL" in
5037  [/$]*) INSTALL="$ac_given_INSTALL" ;;
5038  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5039  esac
5040
5041  echo creating "$ac_file"
5042  rm -f "$ac_file"
5043  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5044  case "$ac_file" in
5045  *Makefile*) ac_comsub="1i\\
5046# $configure_input" ;;
5047  *) ac_comsub= ;;
5048  esac
5049
5050  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5051  sed -e "$ac_comsub
5052s%@configure_input@%$configure_input%g
5053s%@srcdir@%$srcdir%g
5054s%@top_srcdir@%$top_srcdir%g
5055s%@INSTALL@%$INSTALL%g
5056" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5057fi; done
5058rm -f conftest.s*
5059
5060# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5061# NAME is the cpp macro being defined and VALUE is the value it is being given.
5062#
5063# ac_d sets the value in "#define NAME VALUE" lines.
5064ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5065ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5066ac_dC='\3'
5067ac_dD='%g'
5068# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5069ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5070ac_uB='\([      ]\)%\1#\2define\3'
5071ac_uC=' '
5072ac_uD='\4%g'
5073# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5074ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5075ac_eB='$%\1#\2define\3'
5076ac_eC=' '
5077ac_eD='%g'
5078
5079if test "${CONFIG_HEADERS+set}" != set; then
5080EOF
5081cat >> $CONFIG_STATUS <<EOF
5082  CONFIG_HEADERS="include/autoconfig.h"
5083EOF
5084cat >> $CONFIG_STATUS <<\EOF
5085fi
5086for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5087  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5088  case "$ac_file" in
5089  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5090       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5091  *) ac_file_in="${ac_file}.in" ;;
5092  esac
5093
5094  echo creating $ac_file
5095
5096  rm -f conftest.frag conftest.in conftest.out
5097  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5098  cat $ac_file_inputs > conftest.in
5099
5100EOF
5101
5102# Transform confdefs.h into a sed script conftest.vals that substitutes
5103# the proper values into config.h.in to produce config.h.  And first:
5104# Protect against being on the right side of a sed subst in config.status.
5105# Protect against being in an unquoted here document in config.status.
5106rm -f conftest.vals
5107cat > conftest.hdr <<\EOF
5108s/[\\&%]/\\&/g
5109s%[\\$`]%\\&%g
5110s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5111s%ac_d%ac_u%gp
5112s%ac_u%ac_e%gp
5113EOF
5114sed -n -f conftest.hdr confdefs.h > conftest.vals
5115rm -f conftest.hdr
5116
5117# This sed command replaces #undef with comments.  This is necessary, for
5118# example, in the case of _POSIX_SOURCE, which is predefined and required
5119# on some systems where configure will not decide to define it.
5120cat >> conftest.vals <<\EOF
5121s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5122EOF
5123
5124# Break up conftest.vals because some shells have a limit on
5125# the size of here documents, and old seds have small limits too.
5126
5127rm -f conftest.tail
5128while :
5129do
5130  ac_lines=`grep -c . conftest.vals`
5131  # grep -c gives empty output for an empty file on some AIX systems.
5132  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5133  # Write a limited-size here document to conftest.frag.
5134  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5135  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5136  echo 'CEOF
5137  sed -f conftest.frag conftest.in > conftest.out
5138  rm -f conftest.in
5139  mv conftest.out conftest.in
5140' >> $CONFIG_STATUS
5141  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5142  rm -f conftest.vals
5143  mv conftest.tail conftest.vals
5144done
5145rm -f conftest.vals
5146
5147cat >> $CONFIG_STATUS <<\EOF
5148  rm -f conftest.frag conftest.h
5149  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5150  cat conftest.in >> conftest.h
5151  rm -f conftest.in
5152  if cmp -s $ac_file conftest.h 2>/dev/null; then
5153    echo "$ac_file is unchanged"
5154    rm -f conftest.h
5155  else
5156    # Remove last slash and all that follows it.  Not all systems have dirname.
5157      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5158      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5159      # The file is in a subdirectory.
5160      test ! -d "$ac_dir" && mkdir "$ac_dir"
5161    fi
5162    rm -f $ac_file
5163    mv conftest.h $ac_file
5164  fi
5165fi; done
5166
5167EOF
5168cat >> $CONFIG_STATUS <<EOF
5169
5170EOF
5171cat >> $CONFIG_STATUS <<\EOF
5172echo timestamp > stamp-h
5173exit 0
5174EOF
5175chmod +x $CONFIG_STATUS
5176rm -fr confdefs* $ac_clean_files
5177test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5178
Note: See TracBrowser for help on using the repository browser.