OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / at / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.10 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr
15 ac_help="$ac_help
16   --with-etcdir=PATH      Directory containing permission files (default /etc)."
17 ac_help="$ac_help
18   --with-jobdir=PATH      Directory containing at jobs (default SPOOLDIR/atjobs)."
19 ac_help="$ac_help
20   --with-atspool=PATH    Directory containing at spool (default SPOOLDIR/atspool)."
21 ac_help="$ac_help
22  --with-atqueue=DEFAULT_AT_QUEUE        Default queue for at (default a). "
23 ac_help="$ac_help
24  --with-batchqueue=DEFAULT_BATCH_QUEUE  Default queue for batch (default b). "
25 ac_help="$ac_help
26  --with-loadavg_mx=LOADAVG_MX   Default max. load average for batch (default 0.8). "
27 ac_help="$ac_help
28  --with-daemon_username=DAEMON_USERNAME Username to run under (default daemon) "
29 ac_help="$ac_help
30  --with-daemon_groupname=DAEMON_GROUPNAME       Groupname to run under (default daemon) "
31
32 # Initialize some variables set by options.
33 # The variables have the same names as the options, with
34 # dashes changed to underlines.
35 build=NONE
36 cache_file=./config.cache
37 exec_prefix=NONE
38 host=NONE
39 no_create=
40 nonopt=NONE
41 no_recursion=
42 prefix=NONE
43 program_prefix=NONE
44 program_suffix=NONE
45 program_transform_name=s,x,x,
46 silent=
47 site=
48 srcdir=
49 target=NONE
50 verbose=
51 x_includes=NONE
52 x_libraries=NONE
53 bindir='${exec_prefix}/bin'
54 sbindir='${exec_prefix}/sbin'
55 libexecdir='${exec_prefix}/libexec'
56 datadir='${prefix}/share'
57 sysconfdir='${prefix}/etc'
58 sharedstatedir='${prefix}/com'
59 localstatedir='${prefix}/var'
60 libdir='${exec_prefix}/lib'
61 includedir='${prefix}/include'
62 oldincludedir='/usr/include'
63 infodir='${prefix}/info'
64 mandir='${prefix}/man'
65
66 # Initialize some other variables.
67 subdirs=
68 MFLAGS= MAKEFLAGS=
69
70 ac_prev=
71 for ac_option
72 do
73
74   # If the previous option needs an argument, assign it.
75   if test -n "$ac_prev"; then
76     eval "$ac_prev=\$ac_option"
77     ac_prev=
78     continue
79   fi
80
81   case "$ac_option" in
82   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
83   *) ac_optarg= ;;
84   esac
85
86   # Accept the important Cygnus configure options, so we can diagnose typos.
87
88   case "$ac_option" in
89
90   -bindir | --bindir | --bindi | --bind | --bin | --bi)
91     ac_prev=bindir ;;
92   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
93     bindir="$ac_optarg" ;;
94
95   -build | --build | --buil | --bui | --bu)
96     ac_prev=build ;;
97   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
98     build="$ac_optarg" ;;
99
100   -cache-file | --cache-file | --cache-fil | --cache-fi \
101   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
102     ac_prev=cache_file ;;
103   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
104   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
105     cache_file="$ac_optarg" ;;
106
107   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
108     ac_prev=datadir ;;
109   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
110   | --da=*)
111     datadir="$ac_optarg" ;;
112
113   -disable-* | --disable-*)
114     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
115     # Reject names that are not valid shell variable names.
116     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
117       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118     fi
119     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120     eval "enable_${ac_feature}=no" ;;
121
122   -enable-* | --enable-*)
123     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
124     # Reject names that are not valid shell variable names.
125     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
126       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127     fi
128     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129     case "$ac_option" in
130       *=*) ;;
131       *) ac_optarg=yes ;;
132     esac
133     eval "enable_${ac_feature}='$ac_optarg'" ;;
134
135   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
136   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
137   | --exec | --exe | --ex)
138     ac_prev=exec_prefix ;;
139   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
140   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
141   | --exec=* | --exe=* | --ex=*)
142     exec_prefix="$ac_optarg" ;;
143
144   -gas | --gas | --ga | --g)
145     # Obsolete; use --with-gas.
146     with_gas=yes ;;
147
148   -help | --help | --hel | --he)
149     # Omit some internal or obsolete options to make the list less imposing.
150     # This message is too long to be a string in the A/UX 3.1 sh.
151     cat << EOF
152 Usage: configure [options] [host]
153 Options: [defaults in brackets after descriptions]
154 Configuration:
155   --cache-file=FILE       cache test results in FILE
156   --help                  print this message
157   --no-create             do not create output files
158   --quiet, --silent       do not print \`checking...' messages
159   --version               print the version of autoconf that created configure
160 Directory and file names:
161   --prefix=PREFIX         install architecture-independent files in PREFIX
162                           [$ac_default_prefix]
163   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
164                           [same as prefix]
165   --bindir=DIR            user executables in DIR [EPREFIX/bin]
166   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
167   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
168   --datadir=DIR           read-only architecture-independent data in DIR
169                           [PREFIX/share]
170   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
171   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
172                           [PREFIX/com]
173   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
174   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
175   --includedir=DIR        C header files in DIR [PREFIX/include]
176   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
177   --infodir=DIR           info documentation in DIR [PREFIX/info]
178   --mandir=DIR            man documentation in DIR [PREFIX/man]
179   --srcdir=DIR            find the sources in DIR [configure dir or ..]
180   --program-prefix=PREFIX prepend PREFIX to installed program names
181   --program-suffix=SUFFIX append SUFFIX to installed program names
182   --program-transform-name=PROGRAM
183                           run sed PROGRAM on installed program names
184 EOF
185     cat << EOF
186 Host type:
187   --build=BUILD           configure for building on BUILD [BUILD=HOST]
188   --host=HOST             configure for HOST [guessed]
189   --target=TARGET         configure for TARGET [TARGET=HOST]
190 Features and packages:
191   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
192   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
193   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
194   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
195   --x-includes=DIR        X include files are in DIR
196   --x-libraries=DIR       X library files are in DIR
197 EOF
198     if test -n "$ac_help"; then
199       echo "--enable and --with options recognized:$ac_help"
200     fi
201     exit 0 ;;
202
203   -host | --host | --hos | --ho)
204     ac_prev=host ;;
205   -host=* | --host=* | --hos=* | --ho=*)
206     host="$ac_optarg" ;;
207
208   -includedir | --includedir | --includedi | --included | --include \
209   | --includ | --inclu | --incl | --inc)
210     ac_prev=includedir ;;
211   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
212   | --includ=* | --inclu=* | --incl=* | --inc=*)
213     includedir="$ac_optarg" ;;
214
215   -infodir | --infodir | --infodi | --infod | --info | --inf)
216     ac_prev=infodir ;;
217   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
218     infodir="$ac_optarg" ;;
219
220   -libdir | --libdir | --libdi | --libd)
221     ac_prev=libdir ;;
222   -libdir=* | --libdir=* | --libdi=* | --libd=*)
223     libdir="$ac_optarg" ;;
224
225   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
226   | --libexe | --libex | --libe)
227     ac_prev=libexecdir ;;
228   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
229   | --libexe=* | --libex=* | --libe=*)
230     libexecdir="$ac_optarg" ;;
231
232   -localstatedir | --localstatedir | --localstatedi | --localstated \
233   | --localstate | --localstat | --localsta | --localst \
234   | --locals | --local | --loca | --loc | --lo)
235     ac_prev=localstatedir ;;
236   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
237   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
238   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
239     localstatedir="$ac_optarg" ;;
240
241   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
242     ac_prev=mandir ;;
243   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
244     mandir="$ac_optarg" ;;
245
246   -nfp | --nfp | --nf)
247     # Obsolete; use --without-fp.
248     with_fp=no ;;
249
250   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251   | --no-cr | --no-c)
252     no_create=yes ;;
253
254   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
255   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256     no_recursion=yes ;;
257
258   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
259   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
260   | --oldin | --oldi | --old | --ol | --o)
261     ac_prev=oldincludedir ;;
262   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
263   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
264   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
265     oldincludedir="$ac_optarg" ;;
266
267   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
268     ac_prev=prefix ;;
269   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
270     prefix="$ac_optarg" ;;
271
272   -program-prefix | --program-prefix | --program-prefi | --program-pref \
273   | --program-pre | --program-pr | --program-p)
274     ac_prev=program_prefix ;;
275   -program-prefix=* | --program-prefix=* | --program-prefi=* \
276   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
277     program_prefix="$ac_optarg" ;;
278
279   -program-suffix | --program-suffix | --program-suffi | --program-suff \
280   | --program-suf | --program-su | --program-s)
281     ac_prev=program_suffix ;;
282   -program-suffix=* | --program-suffix=* | --program-suffi=* \
283   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
284     program_suffix="$ac_optarg" ;;
285
286   -program-transform-name | --program-transform-name \
287   | --program-transform-nam | --program-transform-na \
288   | --program-transform-n | --program-transform- \
289   | --program-transform | --program-transfor \
290   | --program-transfo | --program-transf \
291   | --program-trans | --program-tran \
292   | --progr-tra | --program-tr | --program-t)
293     ac_prev=program_transform_name ;;
294   -program-transform-name=* | --program-transform-name=* \
295   | --program-transform-nam=* | --program-transform-na=* \
296   | --program-transform-n=* | --program-transform-=* \
297   | --program-transform=* | --program-transfor=* \
298   | --program-transfo=* | --program-transf=* \
299   | --program-trans=* | --program-tran=* \
300   | --progr-tra=* | --program-tr=* | --program-t=*)
301     program_transform_name="$ac_optarg" ;;
302
303   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
304   | -silent | --silent | --silen | --sile | --sil)
305     silent=yes ;;
306
307   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
308     ac_prev=sbindir ;;
309   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
310   | --sbi=* | --sb=*)
311     sbindir="$ac_optarg" ;;
312
313   -sharedstatedir | --sharedstatedir | --sharedstatedi \
314   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
315   | --sharedst | --shareds | --shared | --share | --shar \
316   | --sha | --sh)
317     ac_prev=sharedstatedir ;;
318   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
319   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
320   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
321   | --sha=* | --sh=*)
322     sharedstatedir="$ac_optarg" ;;
323
324   -site | --site | --sit)
325     ac_prev=site ;;
326   -site=* | --site=* | --sit=*)
327     site="$ac_optarg" ;;
328
329   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
330     ac_prev=srcdir ;;
331   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
332     srcdir="$ac_optarg" ;;
333
334   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
335   | --syscon | --sysco | --sysc | --sys | --sy)
336     ac_prev=sysconfdir ;;
337   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
338   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
339     sysconfdir="$ac_optarg" ;;
340
341   -target | --target | --targe | --targ | --tar | --ta | --t)
342     ac_prev=target ;;
343   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
344     target="$ac_optarg" ;;
345
346   -v | -verbose | --verbose | --verbos | --verbo | --verb)
347     verbose=yes ;;
348
349   -version | --version | --versio | --versi | --vers)
350     echo "configure generated by autoconf version 2.10"
351     exit 0 ;;
352
353   -with-* | --with-*)
354     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
355     # Reject names that are not valid shell variable names.
356     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
357       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358     fi
359     ac_package=`echo $ac_package| sed 's/-/_/g'`
360     case "$ac_option" in
361       *=*) ;;
362       *) ac_optarg=yes ;;
363     esac
364     eval "with_${ac_package}='$ac_optarg'" ;;
365
366   -without-* | --without-*)
367     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
368     # Reject names that are not valid shell variable names.
369     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
370       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371     fi
372     ac_package=`echo $ac_package| sed 's/-/_/g'`
373     eval "with_${ac_package}=no" ;;
374
375   --x)
376     # Obsolete; use --with-x.
377     with_x=yes ;;
378
379   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
380   | --x-incl | --x-inc | --x-in | --x-i)
381     ac_prev=x_includes ;;
382   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
383   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
384     x_includes="$ac_optarg" ;;
385
386   -x-libraries | --x-libraries | --x-librarie | --x-librari \
387   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
388     ac_prev=x_libraries ;;
389   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
390   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
391     x_libraries="$ac_optarg" ;;
392
393   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394     ;;
395
396   *)
397     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
398       echo "configure: warning: $ac_option: invalid host type" 1>&2
399     fi
400     if test "x$nonopt" != xNONE; then
401       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
402     fi
403     nonopt="$ac_option"
404     ;;
405
406   esac
407 done
408
409 if test -n "$ac_prev"; then
410   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 fi
412
413 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
414
415 # File descriptor usage:
416 # 0 standard input
417 # 1 file creation
418 # 2 errors and warnings
419 # 3 some systems may open it to /dev/tty
420 # 4 used on the Kubota Titan
421 # 6 checking for... messages and results
422 # 5 compiler messages saved in config.log
423 if test "$silent" = yes; then
424   exec 6>/dev/null
425 else
426   exec 6>&1
427 fi
428 exec 5>./config.log
429
430 echo "\
431 This file contains any messages produced by compilers while
432 running configure, to aid debugging if configure makes a mistake.
433 " 1>&5
434
435 # Strip out --no-create and --no-recursion so they do not pile up.
436 # Also quote any args containing shell metacharacters.
437 ac_configure_args=
438 for ac_arg
439 do
440   case "$ac_arg" in
441   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
442   | --no-cr | --no-c) ;;
443   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
444   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
445   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
446   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
447   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448   esac
449 done
450
451 # NLS nuisances.
452 # Only set LANG and LC_ALL to C if already set.
453 # These must not be set unconditionally because not all systems understand
454 # e.g. LANG=C (notably SCO).
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
457
458 # confdefs.h avoids OS command line length limits that DEFS can exceed.
459 rm -rf conftest* confdefs.h
460 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
461 echo > confdefs.h
462
463 # A filename unique to this package, relative to the directory that
464 # configure is in, which we can look for to find out if srcdir is correct.
465 ac_unique_file=at.c
466
467 # Find the source files, if location was not specified.
468 if test -z "$srcdir"; then
469   ac_srcdir_defaulted=yes
470   # Try the directory containing this script, then its parent.
471   ac_prog=$0
472   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
473   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474   srcdir=$ac_confdir
475   if test ! -r $srcdir/$ac_unique_file; then
476     srcdir=..
477   fi
478 else
479   ac_srcdir_defaulted=no
480 fi
481 if test ! -r $srcdir/$ac_unique_file; then
482   if test "$ac_srcdir_defaulted" = yes; then
483     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484   else
485     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
486   fi
487 fi
488 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489
490 # Prefer explicitly selected file to automatically selected ones.
491 if test -z "$CONFIG_SITE"; then
492   if test "x$prefix" != xNONE; then
493     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494   else
495     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
496   fi
497 fi
498 for ac_site_file in $CONFIG_SITE; do
499   if test -r "$ac_site_file"; then
500     echo "loading site script $ac_site_file"
501     . "$ac_site_file"
502   fi
503 done
504
505 if test -r "$cache_file"; then
506   echo "loading cache $cache_file"
507   . $cache_file
508 else
509   echo "creating cache $cache_file"
510   > $cache_file
511 fi
512
513 ac_ext=c
514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
515 ac_cpp='$CPP $CPPFLAGS'
516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
517 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
518
519 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522     ac_n= ac_c='
523 ' ac_t='        '
524   else
525     ac_n=-n ac_c= ac_t=
526   fi
527 else
528   ac_n= ac_c='\c' ac_t=
529 fi
530
531
532
533
534
535
536
537 VERSION="3.1.7"
538 if test "X$CFLAGS" = "X"; then
539 CFLAGS=-O2
540 fi
541
542
543
544 ac_aux_dir=
545 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
546   if test -f $ac_dir/install-sh; then
547     ac_aux_dir=$ac_dir
548     ac_install_sh="$ac_aux_dir/install-sh -c"
549     break
550   elif test -f $ac_dir/install.sh; then
551     ac_aux_dir=$ac_dir
552     ac_install_sh="$ac_aux_dir/install.sh -c"
553     break
554   fi
555 done
556 if test -z "$ac_aux_dir"; then
557   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
558 fi
559 ac_config_guess=$ac_aux_dir/config.guess
560 ac_config_sub=$ac_aux_dir/config.sub
561 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
562
563
564 # Make sure we can run config.sub.
565 if $ac_config_sub sun4 >/dev/null 2>&1; then :
566 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
567 fi
568
569 echo $ac_n "checking host system type""... $ac_c" 1>&6
570
571 host_alias=$host
572 case "$host_alias" in
573 NONE)
574   case $nonopt in
575   NONE)
576     if host_alias=`$ac_config_guess`; then :
577     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
578     fi ;;
579   *) host_alias=$nonopt ;;
580   esac ;;
581 esac
582
583 host=`$ac_config_sub $host_alias`
584 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
585 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
586 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
587 echo "$ac_t""$host" 1>&6
588
589
590
591 # If we cannot run a trivial program, we must be cross compiling.
592 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
593 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
594   echo $ac_n "(cached) $ac_c" 1>&6
595 else
596   if test "$cross_compiling" = yes; then
597   ac_cv_c_cross=yes
598 else
599 cat > conftest.$ac_ext <<EOF
600 #line 601 "configure"
601 #include "confdefs.h"
602 main(){return(0);}
603 EOF
604 { (eval echo configure:605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
605 if test -s conftest && (./conftest; exit) 2>/dev/null; then
606   ac_cv_c_cross=no
607 else
608   ac_cv_c_cross=yes
609 fi
610 fi
611 rm -fr conftest*
612 fi
613
614 echo "$ac_t""$ac_cv_c_cross" 1>&6
615 cross_compiling=$ac_cv_c_cross
616
617 # Extract the first word of "gcc", so it can be a program name with args.
618 set dummy gcc; ac_word=$2
619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
620 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
621   echo $ac_n "(cached) $ac_c" 1>&6
622 else
623   if test -n "$CC"; then
624   ac_cv_prog_CC="$CC" # Let the user override the test.
625 else
626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
627   for ac_dir in $PATH; do
628     test -z "$ac_dir" && ac_dir=.
629     if test -f $ac_dir/$ac_word; then
630       ac_cv_prog_CC="gcc"
631       break
632     fi
633   done
634   IFS="$ac_save_ifs"
635 fi
636 fi
637 CC="$ac_cv_prog_CC"
638 if test -n "$CC"; then
639   echo "$ac_t""$CC" 1>&6
640 else
641   echo "$ac_t""no" 1>&6
642 fi
643
644 if test -z "$CC"; then
645   # Extract the first word of "cc", so it can be a program name with args.
646 set dummy cc; ac_word=$2
647 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
648 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
649   echo $ac_n "(cached) $ac_c" 1>&6
650 else
651   if test -n "$CC"; then
652   ac_cv_prog_CC="$CC" # Let the user override the test.
653 else
654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
655   ac_prog_rejected=no
656   for ac_dir in $PATH; do
657     test -z "$ac_dir" && ac_dir=.
658     if test -f $ac_dir/$ac_word; then
659       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
660         ac_prog_rejected=yes
661         continue
662       fi
663       ac_cv_prog_CC="cc"
664       break
665     fi
666   done
667   IFS="$ac_save_ifs"
668 if test $ac_prog_rejected = yes; then
669   # We found a bogon in the path, so make sure we never use it.
670   set dummy $ac_cv_prog_CC
671   shift
672   if test $# -gt 0; then
673     # We chose a different compiler from the bogus one.
674     # However, it has the same basename, so the bogon will be chosen
675     # first if we set CC to just the basename; use the full file name.
676     shift
677     set dummy "$ac_dir/$ac_word" "$@"
678     shift
679     ac_cv_prog_CC="$@"
680   fi
681 fi
682 fi
683 fi
684 CC="$ac_cv_prog_CC"
685 if test -n "$CC"; then
686   echo "$ac_t""$CC" 1>&6
687 else
688   echo "$ac_t""no" 1>&6
689 fi
690
691   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
692 fi
693
694 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
695 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
696   echo $ac_n "(cached) $ac_c" 1>&6
697 else
698   cat > conftest.c <<EOF
699 #ifdef __GNUC__
700   yes;
701 #endif
702 EOF
703 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
704   ac_cv_prog_gcc=yes
705 else
706   ac_cv_prog_gcc=no
707 fi
708 fi
709
710 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
711 if test $ac_cv_prog_gcc = yes; then
712   GCC=yes
713   if test "${CFLAGS+set}" != set; then
714     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
715 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
716   echo $ac_n "(cached) $ac_c" 1>&6
717 else
718   echo 'void f(){}' > conftest.c
719 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
720   ac_cv_prog_gcc_g=yes
721 else
722   ac_cv_prog_gcc_g=no
723 fi
724 rm -f conftest*
725
726 fi
727
728 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
729     if test $ac_cv_prog_gcc_g = yes; then
730       CFLAGS="-g -O"
731     else
732       CFLAGS="-O"
733     fi
734   fi
735 else
736   GCC=
737   test "${CFLAGS+set}" = set || CFLAGS="-g"
738 fi
739
740 # Find a good install program.  We prefer a C program (faster),
741 # so one script is as good as another.  But avoid the broken or
742 # incompatible versions:
743 # SysV /etc/install, /usr/sbin/install
744 # SunOS /usr/etc/install
745 # IRIX /sbin/install
746 # AIX /bin/install
747 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
748 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
749 # ./install, which can be erroneously created by make from ./install.sh.
750 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
751 if test -z "$INSTALL"; then
752 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
753   echo $ac_n "(cached) $ac_c" 1>&6
754 else
755     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
756   for ac_dir in $PATH; do
757     # Account for people who put trailing slashes in PATH elements.
758     case "$ac_dir/" in
759     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
760     *)
761       # OSF1 and SCO ODT 3.0 have their own names for install.
762       for ac_prog in ginstall installbsd scoinst install; do
763         if test -f $ac_dir/$ac_prog; then
764           if test $ac_prog = install &&
765             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
766             # AIX install.  It has an incompatible calling convention.
767             # OSF/1 installbsd also uses dspmsg, but is usable.
768             :
769           else
770             ac_cv_path_install="$ac_dir/$ac_prog -c"
771             break 2
772           fi
773         fi
774       done
775       ;;
776     esac
777   done
778   IFS="$ac_save_ifs"
779
780 fi
781   if test "${ac_cv_path_install+set}" = set; then
782     INSTALL="$ac_cv_path_install"
783   else
784     # As a last resort, use the slow shell script.  We don't cache a
785     # path for INSTALL within a source directory, because that will
786     # break other packages using the cache if that directory is
787     # removed, or if the path is relative.
788     INSTALL="$ac_install_sh"
789   fi
790 fi
791 echo "$ac_t""$INSTALL" 1>&6
792
793 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
794 # It thinks the first close brace ends the variable substitution.
795 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
796
797 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
798
799 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
800 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
801   echo $ac_n "(cached) $ac_c" 1>&6
802 else
803   rm -f conftestdata
804 if ln -s X conftestdata 2>/dev/null
805 then
806   rm -f conftestdata
807   ac_cv_prog_LN_S="ln -s"
808 else
809   ac_cv_prog_LN_S=ln
810 fi
811 fi
812 LN_S="$ac_cv_prog_LN_S"
813 if test "$ac_cv_prog_LN_S" = "ln -s"; then
814   echo "$ac_t""yes" 1>&6
815 else
816   echo "$ac_t""no" 1>&6
817 fi
818
819 for ac_prog in 'bison -y' byacc
820 do
821 # Extract the first word of "$ac_prog", so it can be a program name with args.
822 set dummy $ac_prog; ac_word=$2
823 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
824 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
825   echo $ac_n "(cached) $ac_c" 1>&6
826 else
827   if test -n "$YACC"; then
828   ac_cv_prog_YACC="$YACC" # Let the user override the test.
829 else
830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
831   for ac_dir in $PATH; do
832     test -z "$ac_dir" && ac_dir=.
833     if test -f $ac_dir/$ac_word; then
834       ac_cv_prog_YACC="$ac_prog"
835       break
836     fi
837   done
838   IFS="$ac_save_ifs"
839 fi
840 fi
841 YACC="$ac_cv_prog_YACC"
842 if test -n "$YACC"; then
843   echo "$ac_t""$YACC" 1>&6
844 else
845   echo "$ac_t""no" 1>&6
846 fi
847
848 test -n "$YACC" && break
849 done
850 test -n "$YACC" || YACC="yacc"
851
852 # Extract the first word of "flex", so it can be a program name with args.
853 set dummy flex; ac_word=$2
854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
855 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
856   echo $ac_n "(cached) $ac_c" 1>&6
857 else
858   if test -n "$LEX"; then
859   ac_cv_prog_LEX="$LEX" # Let the user override the test.
860 else
861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
862   for ac_dir in $PATH; do
863     test -z "$ac_dir" && ac_dir=.
864     if test -f $ac_dir/$ac_word; then
865       ac_cv_prog_LEX="flex"
866       break
867     fi
868   done
869   IFS="$ac_save_ifs"
870   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
871 fi
872 fi
873 LEX="$ac_cv_prog_LEX"
874 if test -n "$LEX"; then
875   echo "$ac_t""$LEX" 1>&6
876 else
877   echo "$ac_t""no" 1>&6
878 fi
879
880 if test -z "$LEXLIB"
881 then
882   case "$LEX" in
883   flex*) ac_lib=fl ;;
884   *) ac_lib=l ;;
885   esac
886   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
887 ac_lib_var=`echo $ac_lib'_'yywrap | tr './+\055' '__p_'`
888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
889   echo $ac_n "(cached) $ac_c" 1>&6
890 else
891   ac_save_LIBS="$LIBS"
892 LIBS="-l$ac_lib  $LIBS"
893 cat > conftest.$ac_ext <<EOF
894 #line 895 "configure"
895 #include "confdefs.h"
896 /* Override any gcc2 internal prototype to avoid an error.  */
897 /* We use char because int might match the return type of a gcc2
898     builtin and then its argument prototype would still apply.  */
899 char yywrap();
900
901 int main() { return 0; }
902 int t() {
903 yywrap()
904 ; return 0; }
905 EOF
906 if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
907   rm -rf conftest*
908   eval "ac_cv_lib_$ac_lib_var=yes"
909 else
910   rm -rf conftest*
911   eval "ac_cv_lib_$ac_lib_var=no"
912 fi
913 rm -f conftest*
914 LIBS="$ac_save_LIBS"
915
916 fi
917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
918   echo "$ac_t""yes" 1>&6
919   LEXLIB="-l$ac_lib"
920 else
921   echo "$ac_t""no" 1>&6
922 fi
923
924 fi
925
926
927
928 echo $ac_n "checking Checking for HP-UX -Aa""... $ac_c" 1>&6
929
930 case "$host" in
931   *-*-hpux*)
932     # HPUX flags from jgotts@engin.umich.edu
933     if test -z "$GCC"; then
934       CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE"
935     fi
936     echo "$ac_t""yes" 1>&6
937     ;;
938   *)
939     echo "$ac_t""no" 1>&6
940     ;;
941 esac
942 echo $ac_n "checking Trying to compile a trivial ANSI C program""... $ac_c" 1>&6
943 if test "$cross_compiling" = yes; then
944   { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; }
945 else
946 cat > conftest.$ac_ext <<EOF
947 #line 948 "configure"
948 #include "confdefs.h"
949  main(int ac, char **av) { return 0; } 
950 EOF
951 { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
952 if test -s conftest && (./conftest; exit) 2>/dev/null; then
953   echo "$ac_t""yes" 1>&6
954 else
955   echo "$ac_t""no" 1>&6
956     { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; }
957 fi
958 fi
959 rm -fr conftest*
960
961 echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6
962 cat > conftest.$ac_ext <<EOF
963 #line 964 "configure"
964 #include "confdefs.h"
965
966 int main() { return 0; }
967 int t() {
968 void __attribute__((noreturn)) panic(void);
969 ; return 0; }
970 EOF
971 if { (eval echo configure:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
972   rm -rf conftest*
973   echo "$ac_t""yes" 1>&6
974     cat >> confdefs.h <<\EOF
975 #define HAVE_ATTRIBUTE_NORETURN 1
976 EOF
977
978 else
979   rm -rf conftest*
980   echo "$ac_t""no" 1>&6
981
982 fi
983 rm -f conftest*
984
985
986 echo $ac_n "checking for -lfl""... $ac_c" 1>&6
987 ac_lib_var=`echo fl'_'yywrap | tr './+\055' '__p_'`
988 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
989   echo $ac_n "(cached) $ac_c" 1>&6
990 else
991   ac_save_LIBS="$LIBS"
992 LIBS="-lfl  $LIBS"
993 cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
996 /* Override any gcc2 internal prototype to avoid an error.  */
997 /* We use char because int might match the return type of a gcc2
998     builtin and then its argument prototype would still apply.  */
999 char yywrap();
1000
1001 int main() { return 0; }
1002 int t() {
1003 yywrap()
1004 ; return 0; }
1005 EOF
1006 if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1007   rm -rf conftest*
1008   eval "ac_cv_lib_$ac_lib_var=yes"
1009 else
1010   rm -rf conftest*
1011   eval "ac_cv_lib_$ac_lib_var=no"
1012 fi
1013 rm -f conftest*
1014 LIBS="$ac_save_LIBS"
1015
1016 fi
1017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1018   echo "$ac_t""yes" 1>&6
1019     ac_tr_lib=HAVE_LIB`echo fl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1020   cat >> confdefs.h <<EOF
1021 #define $ac_tr_lib 1
1022 EOF
1023
1024   LIBS="-lfl $LIBS"
1025
1026 else
1027   echo "$ac_t""no" 1>&6
1028 cat >> confdefs.h <<\EOF
1029 #define NEED_YYWRAP 1
1030 EOF
1031
1032
1033 fi
1034
1035
1036 ac_header_dirent=no
1037 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1038 do
1039 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1040 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1041 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1042   echo $ac_n "(cached) $ac_c" 1>&6
1043 else
1044   cat > conftest.$ac_ext <<EOF
1045 #line 1046 "configure"
1046 #include "confdefs.h"
1047 #include <sys/types.h>
1048 #include <$ac_hdr>
1049 int main() { return 0; }
1050 int t() {
1051 DIR *dirp = 0;
1052 ; return 0; }
1053 EOF
1054 if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1055   rm -rf conftest*
1056   eval "ac_cv_header_dirent_$ac_safe=yes"
1057 else
1058   rm -rf conftest*
1059   eval "ac_cv_header_dirent_$ac_safe=no"
1060 fi
1061 rm -f conftest*
1062
1063 fi
1064 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1065   echo "$ac_t""yes" 1>&6
1066     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1067   cat >> confdefs.h <<EOF
1068 #define $ac_tr_hdr 1
1069 EOF
1070  ac_header_dirent=$ac_hdr; break
1071 else
1072   echo "$ac_t""no" 1>&6
1073 fi
1074 done
1075 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1076 if test $ac_header_dirent = dirent.h; then
1077 echo $ac_n "checking for -ldir""... $ac_c" 1>&6
1078 ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
1079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1080   echo $ac_n "(cached) $ac_c" 1>&6
1081 else
1082   ac_save_LIBS="$LIBS"
1083 LIBS="-ldir  $LIBS"
1084 cat > conftest.$ac_ext <<EOF
1085 #line 1086 "configure"
1086 #include "confdefs.h"
1087 /* Override any gcc2 internal prototype to avoid an error.  */
1088 /* We use char because int might match the return type of a gcc2
1089     builtin and then its argument prototype would still apply.  */
1090 char opendir();
1091
1092 int main() { return 0; }
1093 int t() {
1094 opendir()
1095 ; return 0; }
1096 EOF
1097 if { (eval echo configure:1098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1098   rm -rf conftest*
1099   eval "ac_cv_lib_$ac_lib_var=yes"
1100 else
1101   rm -rf conftest*
1102   eval "ac_cv_lib_$ac_lib_var=no"
1103 fi
1104 rm -f conftest*
1105 LIBS="$ac_save_LIBS"
1106
1107 fi
1108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1109   echo "$ac_t""yes" 1>&6
1110   LIBS="$LIBS -ldir"
1111 else
1112   echo "$ac_t""no" 1>&6
1113 fi
1114
1115 else
1116 echo $ac_n "checking for -lx""... $ac_c" 1>&6
1117 ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
1118 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1119   echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121   ac_save_LIBS="$LIBS"
1122 LIBS="-lx  $LIBS"
1123 cat > conftest.$ac_ext <<EOF
1124 #line 1125 "configure"
1125 #include "confdefs.h"
1126 /* Override any gcc2 internal prototype to avoid an error.  */
1127 /* We use char because int might match the return type of a gcc2
1128     builtin and then its argument prototype would still apply.  */
1129 char opendir();
1130
1131 int main() { return 0; }
1132 int t() {
1133 opendir()
1134 ; return 0; }
1135 EOF
1136 if { (eval echo configure:1137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1137   rm -rf conftest*
1138   eval "ac_cv_lib_$ac_lib_var=yes"
1139 else
1140   rm -rf conftest*
1141   eval "ac_cv_lib_$ac_lib_var=no"
1142 fi
1143 rm -f conftest*
1144 LIBS="$ac_save_LIBS"
1145
1146 fi
1147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1148   echo "$ac_t""yes" 1>&6
1149   LIBS="$LIBS -lx"
1150 else
1151   echo "$ac_t""no" 1>&6
1152 fi
1153
1154 fi
1155
1156 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1157 # On Suns, sometimes $CPP names a directory.
1158 if test -n "$CPP" && test -d "$CPP"; then
1159   CPP=
1160 fi
1161 if test -z "$CPP"; then
1162 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165     # This must be in double quotes, not single quotes, because CPP may get
1166   # substituted into the Makefile and "${CC-cc}" will confuse make.
1167   CPP="${CC-cc} -E"
1168   # On the NeXT, cc -E runs the code through the compiler's parser,
1169   # not just through cpp.
1170   cat > conftest.$ac_ext <<EOF
1171 #line 1172 "configure"
1172 #include "confdefs.h"
1173 #include <assert.h>
1174 Syntax Error
1175 EOF
1176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1177 { (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1178 ac_err=`grep -v '^ *+' conftest.out`
1179 if test -z "$ac_err"; then
1180   :
1181 else
1182   echo "$ac_err" >&5
1183   rm -rf conftest*
1184   CPP="${CC-cc} -E -traditional-cpp"
1185   cat > conftest.$ac_ext <<EOF
1186 #line 1187 "configure"
1187 #include "confdefs.h"
1188 #include <assert.h>
1189 Syntax Error
1190 EOF
1191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1192 { (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1193 ac_err=`grep -v '^ *+' conftest.out`
1194 if test -z "$ac_err"; then
1195   :
1196 else
1197   echo "$ac_err" >&5
1198   rm -rf conftest*
1199   CPP=/lib/cpp
1200 fi
1201 rm -f conftest*
1202 fi
1203 rm -f conftest*
1204   ac_cv_prog_CPP="$CPP"
1205 fi
1206   CPP="$ac_cv_prog_CPP"
1207 else
1208   ac_cv_prog_CPP="$CPP"
1209 fi
1210 echo "$ac_t""$CPP" 1>&6
1211
1212 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1213 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1214   echo $ac_n "(cached) $ac_c" 1>&6
1215 else
1216   cat > conftest.$ac_ext <<EOF
1217 #line 1218 "configure"
1218 #include "confdefs.h"
1219 #include <stdlib.h>
1220 #include <stdarg.h>
1221 #include <string.h>
1222 #include <float.h>
1223 EOF
1224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1225 { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1226 ac_err=`grep -v '^ *+' conftest.out`
1227 if test -z "$ac_err"; then
1228   rm -rf conftest*
1229   ac_cv_header_stdc=yes
1230 else
1231   echo "$ac_err" >&5
1232   rm -rf conftest*
1233   ac_cv_header_stdc=no
1234 fi
1235 rm -f conftest*
1236
1237 if test $ac_cv_header_stdc = yes; then
1238   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1239 cat > conftest.$ac_ext <<EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1242 #include <string.h>
1243 EOF
1244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1245   egrep "memchr" >/dev/null 2>&1; then
1246   :
1247 else
1248   rm -rf conftest*
1249   ac_cv_header_stdc=no
1250 fi
1251 rm -f conftest*
1252
1253 fi
1254
1255 if test $ac_cv_header_stdc = yes; then
1256   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1257 cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 #include <stdlib.h>
1261 EOF
1262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1263   egrep "free" >/dev/null 2>&1; then
1264   :
1265 else
1266   rm -rf conftest*
1267   ac_cv_header_stdc=no
1268 fi
1269 rm -f conftest*
1270
1271 fi
1272
1273 if test $ac_cv_header_stdc = yes; then
1274   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1275 if test "$cross_compiling" = yes; then
1276   :
1277 else
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 #include <ctype.h>
1282 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1283 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1284 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1285 int main () { int i; for (i = 0; i < 256; i++)
1286 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1287 exit (0); }
1288
1289 EOF
1290 { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1291 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1292   :
1293 else
1294   ac_cv_header_stdc=no
1295 fi
1296 fi
1297 rm -fr conftest*
1298 fi
1299 fi
1300
1301 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1302 if test $ac_cv_header_stdc = yes; then
1303   cat >> confdefs.h <<\EOF
1304 #define STDC_HEADERS 1
1305 EOF
1306
1307 fi
1308
1309 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1310 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1311   echo $ac_n "(cached) $ac_c" 1>&6
1312 else
1313   cat > conftest.$ac_ext <<EOF
1314 #line 1315 "configure"
1315 #include "confdefs.h"
1316 #include <sys/types.h>
1317 #include <sys/wait.h>
1318 #ifndef WEXITSTATUS
1319 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1320 #endif
1321 #ifndef WIFEXITED
1322 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1323 #endif
1324 int main() { return 0; }
1325 int t() {
1326 int s;
1327 wait (&s);
1328 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1329 ; return 0; }
1330 EOF
1331 if { (eval echo configure:1332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1332   rm -rf conftest*
1333   ac_cv_header_sys_wait_h=yes
1334 else
1335   rm -rf conftest*
1336   ac_cv_header_sys_wait_h=no
1337 fi
1338 rm -f conftest*
1339
1340 fi
1341
1342 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1343 if test $ac_cv_header_sys_wait_h = yes; then
1344   cat >> confdefs.h <<\EOF
1345 #define HAVE_SYS_WAIT_H 1
1346 EOF
1347
1348 fi
1349
1350 for ac_hdr in fcntl.h syslog.h unistd.h errno.h sys/fcntl.h getopt.h
1351 do
1352 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1354 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1355   echo $ac_n "(cached) $ac_c" 1>&6
1356 else
1357   cat > conftest.$ac_ext <<EOF
1358 #line 1359 "configure"
1359 #include "confdefs.h"
1360 #include <$ac_hdr>
1361 EOF
1362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1363 { (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1364 ac_err=`grep -v '^ *+' conftest.out`
1365 if test -z "$ac_err"; then
1366   rm -rf conftest*
1367   eval "ac_cv_header_$ac_safe=yes"
1368 else
1369   echo "$ac_err" >&5
1370   rm -rf conftest*
1371   eval "ac_cv_header_$ac_safe=no"
1372 fi
1373 rm -f conftest*
1374 fi
1375 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1376   echo "$ac_t""yes" 1>&6
1377     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1378   cat >> confdefs.h <<EOF
1379 #define $ac_tr_hdr 1
1380 EOF
1381  
1382 else
1383   echo "$ac_t""no" 1>&6
1384 fi
1385 done
1386
1387 for ac_hdr in stdarg.h
1388 do
1389 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1391 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1392   echo $ac_n "(cached) $ac_c" 1>&6
1393 else
1394   cat > conftest.$ac_ext <<EOF
1395 #line 1396 "configure"
1396 #include "confdefs.h"
1397 #include <$ac_hdr>
1398 EOF
1399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1400 { (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1401 ac_err=`grep -v '^ *+' conftest.out`
1402 if test -z "$ac_err"; then
1403   rm -rf conftest*
1404   eval "ac_cv_header_$ac_safe=yes"
1405 else
1406   echo "$ac_err" >&5
1407   rm -rf conftest*
1408   eval "ac_cv_header_$ac_safe=no"
1409 fi
1410 rm -f conftest*
1411 fi
1412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1413   echo "$ac_t""yes" 1>&6
1414     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1415   cat >> confdefs.h <<EOF
1416 #define $ac_tr_hdr 1
1417 EOF
1418  
1419 else
1420   echo "$ac_t""no" 1>&6
1421 fi
1422 done
1423
1424
1425 echo $ac_n "checking for working const""... $ac_c" 1>&6
1426 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1427   echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429   cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432
1433 int main() { return 0; }
1434 int t() {
1435
1436 /* Ultrix mips cc rejects this.  */
1437 typedef int charset[2]; const charset x;
1438 /* SunOS 4.1.1 cc rejects this.  */
1439 char const *const *ccp;
1440 char **p;
1441 /* NEC SVR4.0.2 mips cc rejects this.  */
1442 struct point {int x, y;};
1443 static struct point const zero = {0,0};
1444 /* AIX XL C 1.02.0.0 rejects this.
1445    It does not let you subtract one const X* pointer from another in an arm
1446    of an if-expression whose if-part is not a constant expression */
1447 const char *g = "string";
1448 ccp = &g + (g ? g-g : 0);
1449 /* HPUX 7.0 cc rejects these. */
1450 ++ccp;
1451 p = (char**) ccp;
1452 ccp = (char const *const *) p;
1453 { /* SCO 3.2v4 cc rejects this.  */
1454   char *t;
1455   char const *s = 0 ? (char *) 0 : (char const *) 0;
1456
1457   *t++ = 0;
1458 }
1459 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1460   int x[] = {25, 17};
1461   const int *foo = &x[0];
1462   ++foo;
1463 }
1464 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1465   typedef const int *iptr;
1466   iptr p = 0;
1467   ++p;
1468 }
1469 { /* AIX XL C 1.02.0.0 rejects this saying
1470      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1471   struct s { int j; const int *ap[3]; };
1472   struct s *b; b->j = 5;
1473 }
1474 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1475   const int foo = 10;
1476 }
1477
1478 ; return 0; }
1479 EOF
1480 if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1481   rm -rf conftest*
1482   ac_cv_c_const=yes
1483 else
1484   rm -rf conftest*
1485   ac_cv_c_const=no
1486 fi
1487 rm -f conftest*
1488
1489 fi
1490
1491 echo "$ac_t""$ac_cv_c_const" 1>&6
1492 if test $ac_cv_c_const = no; then
1493   cat >> confdefs.h <<\EOF
1494 #define const 
1495 EOF
1496
1497 fi
1498
1499 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1500 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1501   echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503   cat > conftest.$ac_ext <<EOF
1504 #line 1505 "configure"
1505 #include "confdefs.h"
1506 #include <sys/types.h>
1507 #include <signal.h>
1508 #ifdef signal
1509 #undef signal
1510 #endif
1511 #ifdef __cplusplus
1512 extern "C" void (*signal (int, void (*)(int)))(int);
1513 #else
1514 void (*signal ()) ();
1515 #endif
1516
1517 int main() { return 0; }
1518 int t() {
1519 int i;
1520 ; return 0; }
1521 EOF
1522 if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1523   rm -rf conftest*
1524   ac_cv_type_signal=void
1525 else
1526   rm -rf conftest*
1527   ac_cv_type_signal=int
1528 fi
1529 rm -f conftest*
1530
1531 fi
1532
1533 echo "$ac_t""$ac_cv_type_signal" 1>&6
1534 cat >> confdefs.h <<EOF
1535 #define RETSIGTYPE $ac_cv_type_signal
1536 EOF
1537
1538
1539 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1540 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1541   echo $ac_n "(cached) $ac_c" 1>&6
1542 else
1543   cat > conftest.$ac_ext <<EOF
1544 #line 1545 "configure"
1545 #include "confdefs.h"
1546 #include <sys/types.h>
1547 EOF
1548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1549   egrep "uid_t" >/dev/null 2>&1; then
1550   rm -rf conftest*
1551   ac_cv_type_uid_t=yes
1552 else
1553   rm -rf conftest*
1554   ac_cv_type_uid_t=no
1555 fi
1556 rm -f conftest*
1557
1558 fi
1559
1560 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1561 if test $ac_cv_type_uid_t = no; then
1562   cat >> confdefs.h <<\EOF
1563 #define uid_t int
1564 EOF
1565
1566   cat >> confdefs.h <<\EOF
1567 #define gid_t int
1568 EOF
1569
1570 fi
1571
1572 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1573 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1579 #include <sys/types.h>
1580 #if STDC_HEADERS
1581 #include <stdlib.h>
1582 #endif
1583 EOF
1584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1585   egrep "mode_t" >/dev/null 2>&1; then
1586   rm -rf conftest*
1587   ac_cv_type_mode_t=yes
1588 else
1589   rm -rf conftest*
1590   ac_cv_type_mode_t=no
1591 fi
1592 rm -f conftest*
1593
1594 fi
1595 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1596 if test $ac_cv_type_mode_t = no; then
1597   cat >> confdefs.h <<\EOF
1598 #define mode_t int
1599 EOF
1600
1601 fi
1602
1603 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1604 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1605   echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607   cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <sys/types.h>
1611 #if STDC_HEADERS
1612 #include <stdlib.h>
1613 #endif
1614 EOF
1615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1616   egrep "off_t" >/dev/null 2>&1; then
1617   rm -rf conftest*
1618   ac_cv_type_off_t=yes
1619 else
1620   rm -rf conftest*
1621   ac_cv_type_off_t=no
1622 fi
1623 rm -f conftest*
1624
1625 fi
1626 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1627 if test $ac_cv_type_off_t = no; then
1628   cat >> confdefs.h <<\EOF
1629 #define off_t long
1630 EOF
1631
1632 fi
1633
1634 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1635 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1636   echo $ac_n "(cached) $ac_c" 1>&6
1637 else
1638   cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641 #include <sys/types.h>
1642 #if STDC_HEADERS
1643 #include <stdlib.h>
1644 #endif
1645 EOF
1646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1647   egrep "pid_t" >/dev/null 2>&1; then
1648   rm -rf conftest*
1649   ac_cv_type_pid_t=yes
1650 else
1651   rm -rf conftest*
1652   ac_cv_type_pid_t=no
1653 fi
1654 rm -f conftest*
1655
1656 fi
1657 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1658 if test $ac_cv_type_pid_t = no; then
1659   cat >> confdefs.h <<\EOF
1660 #define pid_t int
1661 EOF
1662
1663 fi
1664
1665 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1666 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1667   echo $ac_n "(cached) $ac_c" 1>&6
1668 else
1669   cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1672 #include <sys/types.h>
1673 #if STDC_HEADERS
1674 #include <stdlib.h>
1675 #endif
1676 EOF
1677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1678   egrep "size_t" >/dev/null 2>&1; then
1679   rm -rf conftest*
1680   ac_cv_type_size_t=yes
1681 else
1682   rm -rf conftest*
1683   ac_cv_type_size_t=no
1684 fi
1685 rm -f conftest*
1686
1687 fi
1688 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1689 if test $ac_cv_type_size_t = no; then
1690   cat >> confdefs.h <<\EOF
1691 #define size_t unsigned
1692 EOF
1693
1694 fi
1695
1696 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1697 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1698   echo $ac_n "(cached) $ac_c" 1>&6
1699 else
1700   cat > conftest.$ac_ext <<EOF
1701 #line 1702 "configure"
1702 #include "confdefs.h"
1703 #include <sys/types.h>
1704 #include <time.h>
1705 int main() { return 0; }
1706 int t() {
1707 struct tm *tp; tp->tm_sec;
1708 ; return 0; }
1709 EOF
1710 if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1711   rm -rf conftest*
1712   ac_cv_struct_tm=time.h
1713 else
1714   rm -rf conftest*
1715   ac_cv_struct_tm=sys/time.h
1716 fi
1717 rm -f conftest*
1718
1719 fi
1720
1721 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1722 if test $ac_cv_struct_tm = sys/time.h; then
1723   cat >> confdefs.h <<\EOF
1724 #define TM_IN_SYS_TIME 1
1725 EOF
1726
1727 fi
1728
1729
1730
1731 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1732 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1733   echo $ac_n "(cached) $ac_c" 1>&6
1734 else
1735   cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 /* System header to define __stub macros and hopefully few prototypes,
1739     which can conflict with char vprintf(); below.  */
1740 #include <assert.h>
1741 /* Override any gcc2 internal prototype to avoid an error.  */
1742 /* We use char because int might match the return type of a gcc2
1743     builtin and then its argument prototype would still apply.  */
1744 char vprintf();
1745
1746 int main() { return 0; }
1747 int t() {
1748
1749 /* The GNU C library defines this for functions which it implements
1750     to always fail with ENOSYS.  Some functions are actually named
1751     something starting with __ and the normal name is an alias.  */
1752 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1753 choke me
1754 #else
1755 vprintf();
1756 #endif
1757
1758 ; return 0; }
1759 EOF
1760 if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1761   rm -rf conftest*
1762   eval "ac_cv_func_vprintf=yes"
1763 else
1764   rm -rf conftest*
1765   eval "ac_cv_func_vprintf=no"
1766 fi
1767 rm -f conftest*
1768
1769 fi
1770 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1771   echo "$ac_t""yes" 1>&6
1772   cat >> confdefs.h <<\EOF
1773 #define HAVE_VPRINTF 1
1774 EOF
1775
1776 else
1777   echo "$ac_t""no" 1>&6
1778 fi
1779
1780 if test "$ac_cv_func_vprintf" != yes; then
1781 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1782 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1783   echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785   cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 /* System header to define __stub macros and hopefully few prototypes,
1789     which can conflict with char _doprnt(); below.  */
1790 #include <assert.h>
1791 /* Override any gcc2 internal prototype to avoid an error.  */
1792 /* We use char because int might match the return type of a gcc2
1793     builtin and then its argument prototype would still apply.  */
1794 char _doprnt();
1795
1796 int main() { return 0; }
1797 int t() {
1798
1799 /* The GNU C library defines this for functions which it implements
1800     to always fail with ENOSYS.  Some functions are actually named
1801     something starting with __ and the normal name is an alias.  */
1802 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1803 choke me
1804 #else
1805 _doprnt();
1806 #endif
1807
1808 ; return 0; }
1809 EOF
1810 if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1811   rm -rf conftest*
1812   eval "ac_cv_func__doprnt=yes"
1813 else
1814   rm -rf conftest*
1815   eval "ac_cv_func__doprnt=no"
1816 fi
1817 rm -f conftest*
1818
1819 fi
1820 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1821   echo "$ac_t""yes" 1>&6
1822   cat >> confdefs.h <<\EOF
1823 #define HAVE_DOPRNT 1
1824 EOF
1825
1826 else
1827   echo "$ac_t""no" 1>&6
1828 fi
1829
1830 fi
1831
1832 ac_have_func=no # yes means we've found a way to get the load average.
1833
1834 # Some systems with -lutil have (and need) -lkvm as well, some do not.
1835 # On Solaris, -lkvm requires nlist from -lelf, so check that first
1836 # to get the right answer into the cache.
1837 echo $ac_n "checking for -lelf""... $ac_c" 1>&6
1838 ac_lib_var=`echo elf'_'elf_begin | tr './+\055' '__p_'`
1839 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1840   echo $ac_n "(cached) $ac_c" 1>&6
1841 else
1842   ac_save_LIBS="$LIBS"
1843 LIBS="-lelf  $LIBS"
1844 cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847 /* Override any gcc2 internal prototype to avoid an error.  */
1848 /* We use char because int might match the return type of a gcc2
1849     builtin and then its argument prototype would still apply.  */
1850 char elf_begin();
1851
1852 int main() { return 0; }
1853 int t() {
1854 elf_begin()
1855 ; return 0; }
1856 EOF
1857 if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1858   rm -rf conftest*
1859   eval "ac_cv_lib_$ac_lib_var=yes"
1860 else
1861   rm -rf conftest*
1862   eval "ac_cv_lib_$ac_lib_var=no"
1863 fi
1864 rm -f conftest*
1865 LIBS="$ac_save_LIBS"
1866
1867 fi
1868 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1869   echo "$ac_t""yes" 1>&6
1870   LIBS="-lelf $LIBS"
1871 else
1872   echo "$ac_t""no" 1>&6
1873 fi
1874
1875 echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
1876 ac_lib_var=`echo kvm'_'kvm_open | tr './+\055' '__p_'`
1877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   ac_save_LIBS="$LIBS"
1881 LIBS="-lkvm  $LIBS"
1882 cat > conftest.$ac_ext <<EOF
1883 #line 1884 "configure"
1884 #include "confdefs.h"
1885 /* Override any gcc2 internal prototype to avoid an error.  */
1886 /* We use char because int might match the return type of a gcc2
1887     builtin and then its argument prototype would still apply.  */
1888 char kvm_open();
1889
1890 int main() { return 0; }
1891 int t() {
1892 kvm_open()
1893 ; return 0; }
1894 EOF
1895 if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1896   rm -rf conftest*
1897   eval "ac_cv_lib_$ac_lib_var=yes"
1898 else
1899   rm -rf conftest*
1900   eval "ac_cv_lib_$ac_lib_var=no"
1901 fi
1902 rm -f conftest*
1903 LIBS="$ac_save_LIBS"
1904
1905 fi
1906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1907   echo "$ac_t""yes" 1>&6
1908   LIBS="-lkvm $LIBS"
1909 else
1910   echo "$ac_t""no" 1>&6
1911 fi
1912
1913 # Check for the 4.4BSD definition of getloadavg.
1914 echo $ac_n "checking for -lutil""... $ac_c" 1>&6
1915 ac_lib_var=`echo util'_'getloadavg | tr './+\055' '__p_'`
1916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1917   echo $ac_n "(cached) $ac_c" 1>&6
1918 else
1919   ac_save_LIBS="$LIBS"
1920 LIBS="-lutil  $LIBS"
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 /* Override any gcc2 internal prototype to avoid an error.  */
1925 /* We use char because int might match the return type of a gcc2
1926     builtin and then its argument prototype would still apply.  */
1927 char getloadavg();
1928
1929 int main() { return 0; }
1930 int t() {
1931 getloadavg()
1932 ; return 0; }
1933 EOF
1934 if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1935   rm -rf conftest*
1936   eval "ac_cv_lib_$ac_lib_var=yes"
1937 else
1938   rm -rf conftest*
1939   eval "ac_cv_lib_$ac_lib_var=no"
1940 fi
1941 rm -f conftest*
1942 LIBS="$ac_save_LIBS"
1943
1944 fi
1945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1946   echo "$ac_t""yes" 1>&6
1947   LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
1948 else
1949   echo "$ac_t""no" 1>&6
1950 fi
1951
1952
1953 if test $ac_have_func = no; then
1954   # There is a commonly available library for RS/6000 AIX.
1955   # Since it is not a standard part of AIX, it might be installed locally.
1956   ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
1957   echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
1958 ac_lib_var=`echo getloadavg'_'getloadavg | tr './+\055' '__p_'`
1959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1960   echo $ac_n "(cached) $ac_c" 1>&6
1961 else
1962   ac_save_LIBS="$LIBS"
1963 LIBS="-lgetloadavg  $LIBS"
1964 cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 /* Override any gcc2 internal prototype to avoid an error.  */
1968 /* We use char because int might match the return type of a gcc2
1969     builtin and then its argument prototype would still apply.  */
1970 char getloadavg();
1971
1972 int main() { return 0; }
1973 int t() {
1974 getloadavg()
1975 ; return 0; }
1976 EOF
1977 if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1978   rm -rf conftest*
1979   eval "ac_cv_lib_$ac_lib_var=yes"
1980 else
1981   rm -rf conftest*
1982   eval "ac_cv_lib_$ac_lib_var=no"
1983 fi
1984 rm -f conftest*
1985 LIBS="$ac_save_LIBS"
1986
1987 fi
1988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1989   echo "$ac_t""yes" 1>&6
1990   LIBS="-lgetloadavg $LIBS"
1991 else
1992   echo "$ac_t""no" 1>&6
1993 LIBS="$ac_save_LIBS"
1994 fi
1995
1996 fi
1997
1998 # Make sure it is really in the library, if we think we found it.
1999 for ac_func in getloadavg
2000 do
2001 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2003   echo $ac_n "(cached) $ac_c" 1>&6
2004 else
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 /* System header to define __stub macros and hopefully few prototypes,
2009     which can conflict with char $ac_func(); below.  */
2010 #include <assert.h>
2011 /* Override any gcc2 internal prototype to avoid an error.  */
2012 /* We use char because int might match the return type of a gcc2
2013     builtin and then its argument prototype would still apply.  */
2014 char $ac_func();
2015
2016 int main() { return 0; }
2017 int t() {
2018
2019 /* The GNU C library defines this for functions which it implements
2020     to always fail with ENOSYS.  Some functions are actually named
2021     something starting with __ and the normal name is an alias.  */
2022 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2023 choke me
2024 #else
2025 $ac_func();
2026 #endif
2027
2028 ; return 0; }
2029 EOF
2030 if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2031   rm -rf conftest*
2032   eval "ac_cv_func_$ac_func=yes"
2033 else
2034   rm -rf conftest*
2035   eval "ac_cv_func_$ac_func=no"
2036 fi
2037 rm -f conftest*
2038
2039 fi
2040 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2041   echo "$ac_t""yes" 1>&6
2042   :
2043 else
2044   echo "$ac_t""no" 1>&6
2045 LIBOBJS="$LIBOBJS ${ac_func}.o"
2046 fi
2047
2048 done
2049
2050
2051 if test $ac_cv_func_getloadavg = yes; then
2052   cat >> confdefs.h <<\EOF
2053 #define HAVE_GETLOADAVG 1
2054 EOF
2055
2056   ac_have_func=yes
2057 else
2058   # Figure out what our getloadavg.c needs.
2059   ac_have_func=no
2060   ac_safe=`echo "sys/dg_sys_info.h" | tr './\055' '___'`
2061 echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6
2062 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2063   echo $ac_n "(cached) $ac_c" 1>&6
2064 else
2065   cat > conftest.$ac_ext <<EOF
2066 #line 2067 "configure"
2067 #include "confdefs.h"
2068 #include <sys/dg_sys_info.h>
2069 EOF
2070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2071 { (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2072 ac_err=`grep -v '^ *+' conftest.out`
2073 if test -z "$ac_err"; then
2074   rm -rf conftest*
2075   eval "ac_cv_header_$ac_safe=yes"
2076 else
2077   echo "$ac_err" >&5
2078   rm -rf conftest*
2079   eval "ac_cv_header_$ac_safe=no"
2080 fi
2081 rm -f conftest*
2082 fi
2083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2084   echo "$ac_t""yes" 1>&6
2085   ac_have_func=yes; cat >> confdefs.h <<\EOF
2086 #define DGUX 1
2087 EOF
2088
2089   echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
2090 ac_lib_var=`echo dgc'_'dg_sys_info | tr './+\055' '__p_'`
2091 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2092   echo $ac_n "(cached) $ac_c" 1>&6
2093 else
2094   ac_save_LIBS="$LIBS"
2095 LIBS="-ldgc  $LIBS"
2096 cat > conftest.$ac_ext <<EOF
2097 #line 2098 "configure"
2098 #include "confdefs.h"
2099 /* Override any gcc2 internal prototype to avoid an error.  */
2100 /* We use char because int might match the return type of a gcc2
2101     builtin and then its argument prototype would still apply.  */
2102 char dg_sys_info();
2103
2104 int main() { return 0; }
2105 int t() {
2106 dg_sys_info()
2107 ; return 0; }
2108 EOF
2109 if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2110   rm -rf conftest*
2111   eval "ac_cv_lib_$ac_lib_var=yes"
2112 else
2113   rm -rf conftest*
2114   eval "ac_cv_lib_$ac_lib_var=no"
2115 fi
2116 rm -f conftest*
2117 LIBS="$ac_save_LIBS"
2118
2119 fi
2120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2121   echo "$ac_t""yes" 1>&6
2122     ac_tr_lib=HAVE_LIB`echo dgc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2123   cat >> confdefs.h <<EOF
2124 #define $ac_tr_lib 1
2125 EOF
2126
2127   LIBS="-ldgc $LIBS"
2128
2129 else
2130   echo "$ac_t""no" 1>&6
2131 fi
2132
2133 else
2134   echo "$ac_t""no" 1>&6
2135 fi
2136
2137
2138   # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
2139   # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
2140   # Irix 4.0.5F has the header but not the library.
2141   if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
2142     ac_have_func=yes; cat >> confdefs.h <<\EOF
2143 #define SVR4 1
2144 EOF
2145
2146   fi
2147
2148   if test $ac_have_func = no; then
2149     ac_safe=`echo "inq_stats/cpustats.h" | tr './\055' '___'`
2150 echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6
2151 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2152   echo $ac_n "(cached) $ac_c" 1>&6
2153 else
2154   cat > conftest.$ac_ext <<EOF
2155 #line 2156 "configure"
2156 #include "confdefs.h"
2157 #include <inq_stats/cpustats.h>
2158 EOF
2159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2160 { (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2161 ac_err=`grep -v '^ *+' conftest.out`
2162 if test -z "$ac_err"; then
2163   rm -rf conftest*
2164   eval "ac_cv_header_$ac_safe=yes"
2165 else
2166   echo "$ac_err" >&5
2167   rm -rf conftest*
2168   eval "ac_cv_header_$ac_safe=no"
2169 fi
2170 rm -f conftest*
2171 fi
2172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2173   echo "$ac_t""yes" 1>&6
2174   ac_have_func=yes; cat >> confdefs.h <<\EOF
2175 #define UMAX 1
2176 EOF
2177
2178     cat >> confdefs.h <<\EOF
2179 #define UMAX4_3 1
2180 EOF
2181
2182 else
2183   echo "$ac_t""no" 1>&6
2184 fi
2185
2186   fi
2187
2188   if test $ac_have_func = no; then
2189     ac_safe=`echo "sys/cpustats.h" | tr './\055' '___'`
2190 echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6
2191 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2192   echo $ac_n "(cached) $ac_c" 1>&6
2193 else
2194   cat > conftest.$ac_ext <<EOF
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197 #include <sys/cpustats.h>
2198 EOF
2199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2200 { (eval echo configure:2201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2201 ac_err=`grep -v '^ *+' conftest.out`
2202 if test -z "$ac_err"; then
2203   rm -rf conftest*
2204   eval "ac_cv_header_$ac_safe=yes"
2205 else
2206   echo "$ac_err" >&5
2207   rm -rf conftest*
2208   eval "ac_cv_header_$ac_safe=no"
2209 fi
2210 rm -f conftest*
2211 fi
2212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214   ac_have_func=yes; cat >> confdefs.h <<\EOF
2215 #define UMAX 1
2216 EOF
2217
2218 else
2219   echo "$ac_t""no" 1>&6
2220 fi
2221
2222   fi
2223
2224   if test $ac_have_func = no; then
2225     for ac_hdr in mach/mach.h
2226 do
2227 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2229 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2230   echo $ac_n "(cached) $ac_c" 1>&6
2231 else
2232   cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 #include <$ac_hdr>
2236 EOF
2237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2238 { (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2239 ac_err=`grep -v '^ *+' conftest.out`
2240 if test -z "$ac_err"; then
2241   rm -rf conftest*
2242   eval "ac_cv_header_$ac_safe=yes"
2243 else
2244   echo "$ac_err" >&5
2245   rm -rf conftest*
2246   eval "ac_cv_header_$ac_safe=no"
2247 fi
2248 rm -f conftest*
2249 fi
2250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2251   echo "$ac_t""yes" 1>&6
2252     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2253   cat >> confdefs.h <<EOF
2254 #define $ac_tr_hdr 1
2255 EOF
2256  
2257 else
2258   echo "$ac_t""no" 1>&6
2259 fi
2260 done
2261
2262   fi
2263
2264   ac_safe=`echo "nlist.h" | tr './\055' '___'`
2265 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
2266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2267   echo $ac_n "(cached) $ac_c" 1>&6
2268 else
2269   cat > conftest.$ac_ext <<EOF
2270 #line 2271 "configure"
2271 #include "confdefs.h"
2272 #include <nlist.h>
2273 EOF
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out`
2277 if test -z "$ac_err"; then
2278   rm -rf conftest*
2279   eval "ac_cv_header_$ac_safe=yes"
2280 else
2281   echo "$ac_err" >&5
2282   rm -rf conftest*
2283   eval "ac_cv_header_$ac_safe=no"
2284 fi
2285 rm -f conftest*
2286 fi
2287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2288   echo "$ac_t""yes" 1>&6
2289   cat >> confdefs.h <<\EOF
2290 #define NLIST_STRUCT 1
2291 EOF
2292
2293   echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
2294 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
2295   echo $ac_n "(cached) $ac_c" 1>&6
2296 else
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #include <nlist.h>
2301 int main() { return 0; }
2302 int t() {
2303 struct nlist n; n.n_un.n_name = 0;
2304 ; return 0; }
2305 EOF
2306 if { (eval echo configure:2307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2307   rm -rf conftest*
2308   ac_cv_struct_nlist_n_un=yes
2309 else
2310   rm -rf conftest*
2311   ac_cv_struct_nlist_n_un=no
2312 fi
2313 rm -f conftest*
2314
2315 fi
2316
2317 echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
2318   if test $ac_cv_struct_nlist_n_un = yes; then
2319     cat >> confdefs.h <<\EOF
2320 #define NLIST_NAME_UNION 1
2321 EOF
2322
2323   fi
2324   
2325 else
2326   echo "$ac_t""no" 1>&6
2327 fi
2328 fi # Do not have getloadavg in system libraries.
2329
2330 # Some definitions of getloadavg require that the program be installed setgid.
2331 echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6
2332 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
2333   echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335   cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 #include "$srcdir/getloadavg.c"
2339 #ifdef LDAV_PRIVILEGED
2340 Yowza Am I SETGID yet
2341 #endif
2342 EOF
2343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344   egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then
2345   rm -rf conftest*
2346   ac_cv_func_getloadavg_setgid=yes
2347 else
2348   rm -rf conftest*
2349   ac_cv_func_getloadavg_setgid=no
2350 fi
2351 rm -f conftest*
2352
2353 fi
2354
2355 echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6
2356 if test $ac_cv_func_getloadavg_setgid = yes; then
2357   NEED_SETGID=true; cat >> confdefs.h <<\EOF
2358 #define GETLOADAVG_PRIVILEGED 1
2359 EOF
2360
2361 else
2362   NEED_SETGID=false
2363 fi
2364
2365 if test $ac_cv_func_getloadavg_setgid = yes; then
2366   echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6
2367 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then
2368   echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370     # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
2371   ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
2372   # If we got an error (system does not support symlinks), try without -L.
2373   test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
2374   ac_cv_group_kmem=`echo $ac_ls_output \
2375     | sed -ne 's/[      ][      ]*/ /g;
2376                s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/;
2377                / /s/.* //;p;'`
2378
2379 fi
2380
2381 echo "$ac_t""$ac_cv_group_kmem" 1>&6
2382   KMEM_GROUP=$ac_cv_group_kmem
2383 fi
2384
2385 for ac_func in getcwd mktime strftime setreuid setresuid sigaction
2386 do
2387 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2388 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2389   echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391   cat > conftest.$ac_ext <<EOF
2392 #line 2393 "configure"
2393 #include "confdefs.h"
2394 /* System header to define __stub macros and hopefully few prototypes,
2395     which can conflict with char $ac_func(); below.  */
2396 #include <assert.h>
2397 /* Override any gcc2 internal prototype to avoid an error.  */
2398 /* We use char because int might match the return type of a gcc2
2399     builtin and then its argument prototype would still apply.  */
2400 char $ac_func();
2401
2402 int main() { return 0; }
2403 int t() {
2404
2405 /* The GNU C library defines this for functions which it implements
2406     to always fail with ENOSYS.  Some functions are actually named
2407     something starting with __ and the normal name is an alias.  */
2408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2409 choke me
2410 #else
2411 $ac_func();
2412 #endif
2413
2414 ; return 0; }
2415 EOF
2416 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2417   rm -rf conftest*
2418   eval "ac_cv_func_$ac_func=yes"
2419 else
2420   rm -rf conftest*
2421   eval "ac_cv_func_$ac_func=no"
2422 fi
2423 rm -f conftest*
2424
2425 fi
2426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2427   echo "$ac_t""yes" 1>&6
2428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2429   cat >> confdefs.h <<EOF
2430 #define $ac_tr_func 1
2431 EOF
2432  
2433 else
2434   echo "$ac_t""no" 1>&6
2435 fi
2436 done
2437
2438 for ac_func in waitpid
2439 do
2440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2441 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2442   echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444   cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 /* System header to define __stub macros and hopefully few prototypes,
2448     which can conflict with char $ac_func(); below.  */
2449 #include <assert.h>
2450 /* Override any gcc2 internal prototype to avoid an error.  */
2451 /* We use char because int might match the return type of a gcc2
2452     builtin and then its argument prototype would still apply.  */
2453 char $ac_func();
2454
2455 int main() { return 0; }
2456 int t() {
2457
2458 /* The GNU C library defines this for functions which it implements
2459     to always fail with ENOSYS.  Some functions are actually named
2460     something starting with __ and the normal name is an alias.  */
2461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2462 choke me
2463 #else
2464 $ac_func();
2465 #endif
2466
2467 ; return 0; }
2468 EOF
2469 if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2470   rm -rf conftest*
2471   eval "ac_cv_func_$ac_func=yes"
2472 else
2473   rm -rf conftest*
2474   eval "ac_cv_func_$ac_func=no"
2475 fi
2476 rm -f conftest*
2477
2478 fi
2479 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2480   echo "$ac_t""yes" 1>&6
2481     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2482   cat >> confdefs.h <<EOF
2483 #define $ac_tr_func 1
2484 EOF
2485  
2486 else
2487   echo "$ac_t""no" 1>&6
2488 fi
2489 done
2490
2491
2492
2493 # Extract the first word of "mailx", so it can be a program name with args.
2494 set dummy mailx; ac_word=$2
2495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2496 if eval "test \"`echo '$''{'ac_cv_path_MAILX'+set}'`\" = set"; then
2497   echo $ac_n "(cached) $ac_c" 1>&6
2498 else
2499   case "$MAILX" in
2500   /*)
2501   ac_cv_path_MAILX="$MAILX" # Let the user override the test with a path.
2502   ;;
2503   *)
2504   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2505   for ac_dir in $PATH; do
2506     test -z "$ac_dir" && ac_dir=.
2507     if test -f $ac_dir/$ac_word; then
2508       ac_cv_path_MAILX="$ac_dir/$ac_word"
2509       break
2510     fi
2511   done
2512   IFS="$ac_save_ifs"
2513   ;;
2514 esac
2515 fi
2516 MAILX="$ac_cv_path_MAILX"
2517 if test -n "$MAILX"; then
2518   echo "$ac_t""$MAILX" 1>&6
2519 else
2520   echo "$ac_t""no" 1>&6
2521 fi
2522
2523 if test "$ac_cv_path_MAILX" != "" ; then
2524 cat >> confdefs.h <<EOF
2525 #define MAILX "$ac_cv_path_MAILX"
2526 EOF
2527
2528 MAIL_CMD="$ac_cv_path_MAILX"
2529 fi
2530
2531 # Extract the first word of "mail", so it can be a program name with args.
2532 set dummy mail; ac_word=$2
2533 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2534 if eval "test \"`echo '$''{'ac_cv_path_MAILC'+set}'`\" = set"; then
2535   echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537   case "$MAILC" in
2538   /*)
2539   ac_cv_path_MAILC="$MAILC" # Let the user override the test with a path.
2540   ;;
2541   *)
2542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2543   for ac_dir in $PATH; do
2544     test -z "$ac_dir" && ac_dir=.
2545     if test -f $ac_dir/$ac_word; then
2546       ac_cv_path_MAILC="$ac_dir/$ac_word"
2547       break
2548     fi
2549   done
2550   IFS="$ac_save_ifs"
2551   ;;
2552 esac
2553 fi
2554 MAILC="$ac_cv_path_MAILC"
2555 if test -n "$MAILC"; then
2556   echo "$ac_t""$MAILC" 1>&6
2557 else
2558   echo "$ac_t""no" 1>&6
2559 fi
2560
2561 if test "$ac_cv_path_MAILC" != "" ; then
2562 cat >> confdefs.h <<EOF
2563 #define MAILC "$ac_cv_path_MAILC"
2564 EOF
2565
2566 MAIL_CMD="$ac_cv_path_MAILC"
2567 fi
2568
2569 # Extract the first word of "sendmail", so it can be a program name with args.
2570 set dummy sendmail; ac_word=$2
2571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2572 if eval "test \"`echo '$''{'ac_cv_path_SENDMAIL'+set}'`\" = set"; then
2573   echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575   case "$SENDMAIL" in
2576   /*)
2577   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
2578   ;;
2579   *)
2580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2581   for ac_dir in $PATH:/usr/lib:/usr/sbin ; do
2582     test -z "$ac_dir" && ac_dir=.
2583     if test -f $ac_dir/$ac_word; then
2584       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
2585       break
2586     fi
2587   done
2588   IFS="$ac_save_ifs"
2589   ;;
2590 esac
2591 fi
2592 SENDMAIL="$ac_cv_path_SENDMAIL"
2593 if test -n "$SENDMAIL"; then
2594   echo "$ac_t""$SENDMAIL" 1>&6
2595 else
2596   echo "$ac_t""no" 1>&6
2597 fi
2598
2599 if test "$ac_cv_path_SENDMAIL" != "" ; then
2600 cat >> confdefs.h <<EOF
2601 #define SENDMAIL "$ac_cv_path_SENDMAIL"
2602 EOF
2603
2604 MAIL_CMD="$ac_cv_path_SENDMAIL"
2605 fi
2606
2607
2608
2609 echo $ac_n "checking etcdir""... $ac_c" 1>&6
2610 # Check whether --with-etcdir or --without-etcdir was given.
2611 if test "${with_etcdir+set}" = set; then
2612   withval="$with_etcdir"
2613    case "$withval" in
2614   no)
2615     { echo "configure: error: Need ETCDIR." 1>&2; exit 1; }
2616     ;;
2617   yes)
2618     ETCDIR=/etc
2619     echo "$ac_t""/etc" 1>&6
2620     ;;
2621   *)
2622     ETCDIR="$withval"
2623     echo "$ac_t""$withval" 1>&6
2624     ;;
2625   esac 
2626 else
2627   ETCDIR="/etc"
2628   echo "$ac_t""/etc" 1>&6
2629
2630 fi
2631
2632
2633
2634 echo $ac_n "checking location of pid file""... $ac_c" 1>&6
2635 if test -d /var/run ; then
2636     cat >> confdefs.h <<EOF
2637 #define PIDFILE "/var/run/atd.pid"
2638 EOF
2639
2640     echo "$ac_t""/var/run" 1>&6
2641 elif test -d /usr/run ; then
2642     cat >> confdefs.h <<EOF
2643 #define PIDFILE "/usr/run/atd.pid"
2644 EOF
2645
2646     echo "$ac_t""/usr/run" 1>&6
2647 else
2648     cat >> confdefs.h <<EOF
2649 #define PIDFILE "$ETCDIR/atd.pid"
2650 EOF
2651
2652     echo "$ac_t""/etc" 1>&6
2653 fi
2654
2655 echo $ac_n "checking location of spool directory""... $ac_c" 1>&6
2656 if test -d /var/spool/atjobs ; then
2657   sp=/var/spool
2658   cat >> confdefs.h <<\EOF
2659 #define SPOOLDIR "/var/spool"
2660 EOF
2661
2662   echo "$ac_t""Using existing /var/spool/at{jobs|run}" 1>&6
2663 elif  test -d /var/spool/cron ; then
2664   sp=/var/spool/cron
2665   cat >> confdefs.h <<\EOF
2666 #define SPOOLDIR "/var/spool/cron"
2667 EOF
2668
2669   echo "$ac_t""/var/spool/cron" 1>&6
2670 elif test -d /usr/spool/cron ; then
2671   sp=/usr/spool/cron
2672   cat >> confdefs.h <<\EOF
2673 #define SPOOLDIR "/usr/spool/cron"
2674 EOF
2675
2676   echo "$ac_t""/usr/spool/cron" 1>&6
2677 else
2678   { echo "configure: error: Cannot determine value for spool directory" 1>&2; exit 1; }
2679 fi
2680
2681 echo $ac_n "checking jobdir""... $ac_c" 1>&6
2682 # Check whether --with-jobdir or --without-jobdir was given.
2683 if test "${with_jobdir+set}" = set; then
2684   withval="$with_jobdir"
2685    case "$withval" in
2686   no)
2687     { echo "configure: error: Need JOBDIR." 1>&2; exit 1; }
2688     ;;
2689   yes)
2690     cat >> confdefs.h <<EOF
2691 #define ATJOB_DIR "$sp/atjobs"
2692 EOF
2693
2694     echo "$ac_t""$ATJOB_DIR" 1>&6
2695     ATJBD="$sp/atjobs"
2696     ;;
2697   *)
2698     cat >> confdefs.h <<EOF
2699 #define ATJOB_DIR "$withval"
2700 EOF
2701
2702     echo "$ac_t""$withval" 1>&6
2703     ATJBD="$withval"
2704     ;;
2705   esac 
2706 else
2707   cat >> confdefs.h <<EOF
2708 #define ATJOB_DIR "$sp/atjobs"
2709 EOF
2710
2711   echo "$ac_t""$sp/atjobs" 1>&6
2712   ATJBD="$sp/atjobs"
2713
2714 fi
2715
2716
2717
2718 echo $ac_n "checking atspool""... $ac_c" 1>&6
2719 # Check whether --with-atspool or --without-atspool was given.
2720 if test "${with_atspool+set}" = set; then
2721   withval="$with_atspool"
2722    case "$withval" in
2723   no)
2724     { echo "configure: error: Need ATSPOOL." 1>&2; exit 1; }
2725     ;;
2726   yes)
2727     cat >> confdefs.h <<EOF
2728 #define ATSPOOL_DIR "$sp/atspool"
2729 EOF
2730
2731     echo "$ac_t""$sp/atspool" 1>&6
2732     ATSPD=$sp/atspool
2733     ;;
2734   *)
2735     cat >> confdefs.h <<EOF
2736 #define ATSPOOL_DIR "$withval"
2737 EOF
2738
2739     echo "$ac_t""$withval" 1>&6
2740     ATSPD=$withval
2741     ;;
2742   esac 
2743 else
2744   cat >> confdefs.h <<EOF
2745 #define ATSPOOL_DIR "$sp/atspool"
2746 EOF
2747
2748   echo "$ac_t""$sp/atspool" 1>&6
2749   ATSPD=$sp/atspool
2750
2751 fi
2752
2753
2754
2755 echo $ac_n "checking default at queue""... $ac_c" 1>&6
2756 # Check whether --with-atqueue or --without-atqueue was given.
2757 if test "${with_atqueue+set}" = set; then
2758   withval="$with_atqueue"
2759    case "$withval" in
2760   no)
2761     { echo "configure: error: Need DEFAULT_AT_QUEUE." 1>&2; exit 1; }
2762     ;;
2763   yes)
2764     cat >> confdefs.h <<EOF
2765 #define DEFAULT_AT_QUEUE 'a'
2766 EOF
2767
2768     echo "$ac_t""a" 1>&6
2769     DEFATQ=a
2770     ;;
2771   *)
2772     cat >> confdefs.h <<EOF
2773 #define DEFAULT_AT_QUEUE "$withval"
2774 EOF
2775
2776     echo "$ac_t""$withval" 1>&6
2777     DEFATQ=$withval
2778     ;;
2779     esac 
2780 else
2781   cat >> confdefs.h <<EOF
2782 #define DEFAULT_AT_QUEUE 'a'
2783 EOF
2784
2785     echo "$ac_t""a" 1>&6
2786     DEFATQ=a
2787
2788 fi
2789
2790
2791
2792
2793 echo $ac_n "checking default batch queue""... $ac_c" 1>&6
2794 # Check whether --with-batchqueue or --without-batchqueue was given.
2795 if test "${with_batchqueue+set}" = set; then
2796   withval="$with_batchqueue"
2797    case "$withval" in
2798   no)
2799     { echo "configure: error: Need DEFAULT_BATCH_QUEUE." 1>&2; exit 1; }
2800     ;;
2801   yes)
2802     cat >> confdefs.h <<EOF
2803 #define DEFAULT_BATCH_QUEUE 'b'
2804 EOF
2805
2806     echo "$ac_t""b" 1>&6
2807     DEFBQ=b
2808     ;;
2809   *)
2810     cat >> confdefs.h <<EOF
2811 #define DEFAULT_BATCH_QUEUE "$withval"
2812 EOF
2813
2814     echo "$ac_t""$withval" 1>&6
2815     DEFBQ=$withval
2816     ;;
2817     esac 
2818 else
2819   cat >> confdefs.h <<EOF
2820 #define DEFAULT_BATCH_QUEUE 'b'
2821 EOF
2822
2823     echo "$ac_t""b" 1>&6
2824     DEFBQ=b
2825
2826 fi
2827
2828
2829
2830
2831 echo $ac_n "checking maximum load average for batch to start jobs""... $ac_c" 1>&6
2832 # Check whether --with-loadavg_mx or --without-loadavg_mx was given.
2833 if test "${with_loadavg_mx+set}" = set; then
2834   withval="$with_loadavg_mx"
2835    case "$withval" in
2836   no)
2837     { echo "configure: error: Need LOADAVG_MX." 1>&2; exit 1; }
2838     ;;
2839   yes)
2840     LOADAVG_MX=0.8
2841     echo "$ac_t""0.8" 1>&6
2842     ;;
2843   *)
2844     LOADAVG_MX="$withval";
2845     echo "$ac_t""$withval" 1>&6
2846     ;;
2847     esac 
2848 else
2849   LOADAVG_MX=0.8
2850     echo "$ac_t""0.8" 1>&6
2851
2852 fi
2853
2854
2855
2856 echo $ac_n "checking username to run under""... $ac_c" 1>&6
2857 # Check whether --with-daemon_username or --without-daemon_username was given.
2858 if test "${with_daemon_username+set}" = set; then
2859   withval="$with_daemon_username"
2860    case "$withval" in
2861   no)
2862     { echo "configure: error: Need DAEMON_USERNAME." 1>&2; exit 1; }
2863     ;;
2864   yes)
2865     DAEMON_USERNAME=daemon
2866     echo "$ac_t""daemon" 1>&6
2867     ;;
2868   *)
2869     DAEMON_USERNAME="$withval";
2870     echo "$ac_t""$withval" 1>&6
2871     ;;
2872     esac 
2873 else
2874   DAEMON_USERNAME=daemon
2875     echo "$ac_t""daemon" 1>&6
2876
2877 fi
2878
2879
2880
2881 echo $ac_n "checking groupname to run under""... $ac_c" 1>&6
2882 # Check whether --with-daemon_groupname or --without-daemon_groupname was given.
2883 if test "${with_daemon_groupname+set}" = set; then
2884   withval="$with_daemon_groupname"
2885    case "$withval" in
2886   no)
2887     { echo "configure: error: Need DAEMON_GROUPNAME." 1>&2; exit 1; }
2888     ;;
2889   yes)
2890     DAEMON_GROUPNAME=daemon
2891     echo "$ac_t""daemon" 1>&6
2892     ;;
2893   *)
2894     DAEMON_GROUPNAME="$withval";
2895     echo "$ac_t""$withval" 1>&6
2896     ;;
2897     esac 
2898 else
2899   DAEMON_GROUPNAME=daemon
2900     echo "$ac_t""daemon" 1>&6
2901
2902 fi
2903
2904
2905
2906 trap '' 1 2 15
2907 cat > confcache <<\EOF
2908 # This file is a shell script that caches the results of configure
2909 # tests run on this system so they can be shared between configure
2910 # scripts and configure runs.  It is not useful on other systems.
2911 # If it contains results you don't want to keep, you may remove or edit it.
2912 #
2913 # By default, configure uses ./config.cache as the cache file,
2914 # creating it if it does not exist already.  You can give configure
2915 # the --cache-file=FILE option to use a different cache file; that is
2916 # what configure does when it calls configure scripts in
2917 # subdirectories, so they share the cache.
2918 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2919 # config.status only pays attention to the cache file if you give it the
2920 # --recheck option to rerun configure.
2921 #
2922 EOF
2923 # Ultrix sh set writes to stderr and can't be redirected directly,
2924 # and sets the high bit in the cache file unless we assign to the vars.
2925 (set) 2>&1 |
2926   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2927   >> confcache
2928 if cmp -s $cache_file confcache; then
2929   :
2930 else
2931   if test -w $cache_file; then
2932     echo "updating cache $cache_file"
2933     cat confcache > $cache_file
2934   else
2935     echo "not updating unwritable cache $cache_file"
2936   fi
2937 fi
2938 rm -f confcache
2939
2940 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2941
2942 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2943 # Let make expand exec_prefix.
2944 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2945
2946 # Any assignment to VPATH causes Sun make to only execute
2947 # the first set of double-colon rules, so remove it if not needed.
2948 # If there is a colon in the path, we need to keep it.
2949 if test "x$srcdir" = x.; then
2950   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2951 fi
2952
2953 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2954
2955 DEFS=-DHAVE_CONFIG_H
2956
2957 # Without the "./", some shells look in PATH for config.status.
2958 : ${CONFIG_STATUS=./config.status}
2959
2960 echo creating $CONFIG_STATUS
2961 rm -f $CONFIG_STATUS
2962 cat > $CONFIG_STATUS <<EOF
2963 #! /bin/sh
2964 # Generated automatically by configure.
2965 # Run this file to recreate the current configuration.
2966 # This directory was configured as follows,
2967 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2968 #
2969 # $0 $ac_configure_args
2970 #
2971 # Compiler output produced by configure, useful for debugging
2972 # configure, is in ./config.log if it exists.
2973
2974 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2975 for ac_option
2976 do
2977   case "\$ac_option" in
2978   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2979     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2980     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2981   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2982     echo "$CONFIG_STATUS generated by autoconf version 2.10"
2983     exit 0 ;;
2984   -help | --help | --hel | --he | --h)
2985     echo "\$ac_cs_usage"; exit 0 ;;
2986   *) echo "\$ac_cs_usage"; exit 1 ;;
2987   esac
2988 done
2989
2990 ac_given_srcdir=$srcdir
2991 ac_given_INSTALL="$INSTALL"
2992
2993 trap 'rm -fr `echo "Makefile atrun atd.8 atrun.8 at.1 batch config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2994 EOF
2995 cat >> $CONFIG_STATUS <<EOF
2996
2997 # Protect against being on the right side of a sed subst in config.status.
2998 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2999  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3000 $ac_vpsub
3001 $extrasub
3002 s%@CFLAGS@%$CFLAGS%g
3003 s%@CPPFLAGS@%$CPPFLAGS%g
3004 s%@CXXFLAGS@%$CXXFLAGS%g
3005 s%@DEFS@%$DEFS%g
3006 s%@LDFLAGS@%$LDFLAGS%g
3007 s%@LIBS@%$LIBS%g
3008 s%@exec_prefix@%$exec_prefix%g
3009 s%@prefix@%$prefix%g
3010 s%@program_transform_name@%$program_transform_name%g
3011 s%@bindir@%$bindir%g
3012 s%@sbindir@%$sbindir%g
3013 s%@libexecdir@%$libexecdir%g
3014 s%@datadir@%$datadir%g
3015 s%@sysconfdir@%$sysconfdir%g
3016 s%@sharedstatedir@%$sharedstatedir%g
3017 s%@localstatedir@%$localstatedir%g
3018 s%@libdir@%$libdir%g
3019 s%@includedir@%$includedir%g
3020 s%@oldincludedir@%$oldincludedir%g
3021 s%@infodir@%$infodir%g
3022 s%@mandir@%$mandir%g
3023 s%@VERSION@%$VERSION%g
3024 s%@host@%$host%g
3025 s%@host_alias@%$host_alias%g
3026 s%@host_cpu@%$host_cpu%g
3027 s%@host_vendor@%$host_vendor%g
3028 s%@host_os@%$host_os%g
3029 s%@CC@%$CC%g
3030 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3031 s%@INSTALL_DATA@%$INSTALL_DATA%g
3032 s%@LN_S@%$LN_S%g
3033 s%@YACC@%$YACC%g
3034 s%@LEX@%$LEX%g
3035 s%@LEXLIB@%$LEXLIB%g
3036 s%@CPP@%$CPP%g
3037 s%@LIBOBJS@%$LIBOBJS%g
3038 s%@NEED_SETGID@%$NEED_SETGID%g
3039 s%@KMEM_GROUP@%$KMEM_GROUP%g
3040 s%@MAILX@%$MAILX%g
3041 s%@MAILC@%$MAILC%g
3042 s%@SENDMAIL@%$SENDMAIL%g
3043 s%@MAIL_CMD@%$MAIL_CMD%g
3044 s%@ETCDIR@%$ETCDIR%g
3045 s%@ATJBD@%$ATJBD%g
3046 s%@ATSPD@%$ATSPD%g
3047 s%@DEFATQ@%$DEFATQ%g
3048 s%@DEFBQ@%$DEFBQ%g
3049 s%@LOADAVG_MX@%$LOADAVG_MX%g
3050 s%@DAEMON_USERNAME@%$DAEMON_USERNAME%g
3051 s%@DAEMON_GROUPNAME@%$DAEMON_GROUPNAME%g
3052
3053 CEOF
3054 EOF
3055 cat >> $CONFIG_STATUS <<EOF
3056
3057 CONFIG_FILES=\${CONFIG_FILES-"Makefile atrun atd.8 atrun.8 at.1 batch"}
3058 EOF
3059 cat >> $CONFIG_STATUS <<\EOF
3060 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3061   # Support "outfile[:infile]", defaulting infile="outfile.in".
3062   case "$ac_file" in
3063   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3064        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3065   *) ac_file_in="${ac_file}.in" ;;
3066   esac
3067
3068   # Adjust relative srcdir, etc. for subdirectories.
3069
3070   # Remove last slash and all that follows it.  Not all systems have dirname.
3071   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3072   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3073     # The file is in a subdirectory.
3074     test ! -d "$ac_dir" && mkdir "$ac_dir"
3075     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3076     # A "../" for each directory in $ac_dir_suffix.
3077     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3078   else
3079     ac_dir_suffix= ac_dots=
3080   fi
3081
3082   case "$ac_given_srcdir" in
3083   .)  srcdir=.
3084       if test -z "$ac_dots"; then top_srcdir=.
3085       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3086   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3087   *) # Relative path.
3088     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3089     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3090   esac
3091
3092   case "$ac_given_INSTALL" in
3093   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3094   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3095   esac
3096   echo creating "$ac_file"
3097   rm -f "$ac_file"
3098   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3099   case "$ac_file" in
3100   *Makefile*) ac_comsub="1i\\
3101 # $configure_input" ;;
3102   *) ac_comsub= ;;
3103   esac
3104   sed -e "$ac_comsub
3105 s%@configure_input@%$configure_input%g
3106 s%@srcdir@%$srcdir%g
3107 s%@top_srcdir@%$top_srcdir%g
3108 s%@INSTALL@%$INSTALL%g
3109 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3110 fi; done
3111 rm -f conftest.subs
3112
3113 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3114 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3115 #
3116 # ac_d sets the value in "#define NAME VALUE" lines.
3117 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3118 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3119 ac_dC='\3'
3120 ac_dD='%g'
3121 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3122 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3123 ac_uB='\([      ]\)%\1#\2define\3'
3124 ac_uC=' '
3125 ac_uD='\4%g'
3126 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3127 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3128 ac_eB='$%\1#\2define\3'
3129 ac_eC=' '
3130 ac_eD='%g'
3131
3132 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
3133 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3134   # Support "outfile[:infile]", defaulting infile="outfile.in".
3135   case "$ac_file" in
3136   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3137        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3138   *) ac_file_in="${ac_file}.in" ;;
3139   esac
3140
3141   echo creating $ac_file
3142
3143   rm -f conftest.frag conftest.in conftest.out
3144   cp $ac_given_srcdir/$ac_file_in conftest.in
3145
3146 EOF
3147
3148 # Transform confdefs.h into a sed script conftest.vals that substitutes
3149 # the proper values into config.h.in to produce config.h.  And first:
3150 # Protect against being on the right side of a sed subst in config.status.
3151 # Protect against being in an unquoted here document in config.status.
3152 rm -f conftest.vals
3153 cat > conftest.hdr <<\EOF
3154 s/[\\&%]/\\&/g
3155 s%[\\$`]%\\&%g
3156 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3157 s%ac_d%ac_u%gp
3158 s%ac_u%ac_e%gp
3159 EOF
3160 sed -n -f conftest.hdr confdefs.h > conftest.vals
3161 rm -f conftest.hdr
3162
3163 # This sed command replaces #undef with comments.  This is necessary, for
3164 # example, in the case of _POSIX_SOURCE, which is predefined and required
3165 # on some systems where configure will not decide to define it.
3166 cat >> conftest.vals <<\EOF
3167 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3168 EOF
3169
3170 # Break up conftest.vals because some shells have a limit on
3171 # the size of here documents, and old seds have small limits too.
3172 # Maximum number of lines to put in a single here document.
3173 ac_max_here_lines=12
3174
3175 rm -f conftest.tail
3176 while :
3177 do
3178   ac_lines=`grep -c . conftest.vals`
3179   # grep -c gives empty output for an empty file on some AIX systems.
3180   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3181   # Write a limited-size here document to conftest.frag.
3182   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3183   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3184   echo 'CEOF
3185   sed -f conftest.frag conftest.in > conftest.out
3186   rm -f conftest.in
3187   mv conftest.out conftest.in
3188 ' >> $CONFIG_STATUS
3189   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3190   rm -f conftest.vals
3191   mv conftest.tail conftest.vals
3192 done
3193 rm -f conftest.vals
3194
3195 cat >> $CONFIG_STATUS <<\EOF
3196   rm -f conftest.frag conftest.h
3197   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3198   cat conftest.in >> conftest.h
3199   rm -f conftest.in
3200   if cmp -s $ac_file conftest.h 2>/dev/null; then
3201     echo "$ac_file is unchanged"
3202     rm -f conftest.h
3203   else
3204     # Remove last slash and all that follows it.  Not all systems have dirname.
3205       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3206       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3207       # The file is in a subdirectory.
3208       test ! -d "$ac_dir" && mkdir "$ac_dir"
3209     fi
3210     rm -f $ac_file
3211     mv conftest.h $ac_file
3212   fi
3213 fi; done
3214
3215
3216
3217 exit 0
3218 EOF
3219 chmod +x $CONFIG_STATUS
3220 rm -fr confdefs* $ac_clean_files
3221 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3222