Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=$HOME
15 ac_help="$ac_help
16   --enable-poll           Force poll to be used regardless of whether or not
17                           it is a system call"
18 ac_help="$ac_help
19   --enable-debug          Turn on debugging mode"
20 ac_help="$ac_help
21   --enable-asserts        Enable asserts"
22 ac_help="$ac_help
23   --disable-symbols       Disable debugging symbols (remove -g from CFLAGS)"
24 ac_help="$ac_help
25   --enable-profile        Enable profiling support (add -pg to CFLAGS)"
26 ac_help="$ac_help
27   --enable-pedantic       Enable pedantic warnings (add -pedantic to CFLAGS)"
28 ac_help="$ac_help
29   --enable-warnings       Enable warnings (add -Wall to CFLAGS)"
30 ac_help="$ac_help
31   --disable-inlines       Disable inlining for a few critical functions"
32 ac_help="$ac_help
33   --enable-devpoll        Enable the experimental /dev/poll-based engine"
34 ac_help="$ac_help
35   --enable-kqueue         Enable the experimental kqueue-based engine"
36 ac_help="$ac_help
37   --with-symlink=name     Name to give the symlink; if name is "no," no
38                           symlink will be created."
39 ac_help="$ac_help
40   --with-mode=mode        Permissions (in octal) to give the binary"
41 ac_help="$ac_help
42   --with-owner=owner      Specify owner of the installed binary"
43 ac_help="$ac_help
44   --with-group=group      Specify group owner of the installed binary"
45 ac_help="$ac_help
46   --with-domain=domain    Domain name to use in local statistics gathering"
47 ac_help="$ac_help
48   --with-chroot=dir       Specify that the server will be operated under
49                           a different root directory given by dir.  See
50                           doc/readme.chroot for more information."
51 ac_help="$ac_help
52   --with-dpath=dir        Directory for all server data files"
53 ac_help="$ac_help
54   --with-cpath=file       Set server configuration file"
55 ac_help="$ac_help
56   --with-lpath=file       Set the debugging log file"
57 ac_help="$ac_help
58   --with-maxcon=maxcon    Maximum number of connections server will accept"
59
60 # Initialize some variables set by options.
61 # The variables have the same names as the options, with
62 # dashes changed to underlines.
63 build=NONE
64 cache_file=./config.cache
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81 bindir='${exec_prefix}/bin'
82 sbindir='${exec_prefix}/sbin'
83 libexecdir='${exec_prefix}/libexec'
84 datadir='${prefix}/share'
85 sysconfdir='${prefix}/etc'
86 sharedstatedir='${prefix}/com'
87 localstatedir='${prefix}/var'
88 libdir='${exec_prefix}/lib'
89 includedir='${prefix}/include'
90 oldincludedir='/usr/include'
91 infodir='${prefix}/info'
92 mandir='${prefix}/man'
93
94 # Initialize some other variables.
95 subdirs=
96 MFLAGS= MAKEFLAGS=
97 SHELL=${CONFIG_SHELL-/bin/sh}
98 # Maximum number of lines to put in a shell here document.
99 ac_max_here_lines=12
100
101 ac_prev=
102 for ac_option
103 do
104
105   # If the previous option needs an argument, assign it.
106   if test -n "$ac_prev"; then
107     eval "$ac_prev=\$ac_option"
108     ac_prev=
109     continue
110   fi
111
112   case "$ac_option" in
113   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
114   *) ac_optarg= ;;
115   esac
116
117   # Accept the important Cygnus configure options, so we can diagnose typos.
118
119   case "$ac_option" in
120
121   -bindir | --bindir | --bindi | --bind | --bin | --bi)
122     ac_prev=bindir ;;
123   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
124     bindir="$ac_optarg" ;;
125
126   -build | --build | --buil | --bui | --bu)
127     ac_prev=build ;;
128   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
129     build="$ac_optarg" ;;
130
131   -cache-file | --cache-file | --cache-fil | --cache-fi \
132   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
133     ac_prev=cache_file ;;
134   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
135   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
136     cache_file="$ac_optarg" ;;
137
138   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
139     ac_prev=datadir ;;
140   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
141   | --da=*)
142     datadir="$ac_optarg" ;;
143
144   -disable-* | --disable-*)
145     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
146     # Reject names that are not valid shell variable names.
147     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
148       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
149     fi
150     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
151     eval "enable_${ac_feature}=no" ;;
152
153   -enable-* | --enable-*)
154     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
155     # Reject names that are not valid shell variable names.
156     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
157       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158     fi
159     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160     case "$ac_option" in
161       *=*) ;;
162       *) ac_optarg=yes ;;
163     esac
164     eval "enable_${ac_feature}='$ac_optarg'" ;;
165
166   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
167   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
168   | --exec | --exe | --ex)
169     ac_prev=exec_prefix ;;
170   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
171   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
172   | --exec=* | --exe=* | --ex=*)
173     exec_prefix="$ac_optarg" ;;
174
175   -gas | --gas | --ga | --g)
176     # Obsolete; use --with-gas.
177     with_gas=yes ;;
178
179   -help | --help | --hel | --he)
180     # Omit some internal or obsolete options to make the list less imposing.
181     # This message is too long to be a string in the A/UX 3.1 sh.
182     cat << EOF
183 Usage: configure [options] [host]
184 Options: [defaults in brackets after descriptions]
185 Configuration:
186   --cache-file=FILE       cache test results in FILE
187   --help                  print this message
188   --no-create             do not create output files
189   --quiet, --silent       do not print \`checking...' messages
190   --version               print the version of autoconf that created configure
191 Directory and file names:
192   --prefix=PREFIX         install architecture-independent files in PREFIX
193                           [$ac_default_prefix]
194   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
195                           [same as prefix]
196   --bindir=DIR            user executables in DIR [EPREFIX/bin]
197   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
198   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
199   --datadir=DIR           read-only architecture-independent data in DIR
200                           [PREFIX/share]
201   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
202   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
203                           [PREFIX/com]
204   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
205   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
206   --includedir=DIR        C header files in DIR [PREFIX/include]
207   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
208   --infodir=DIR           info documentation in DIR [PREFIX/info]
209   --mandir=DIR            man documentation in DIR [PREFIX/man]
210   --srcdir=DIR            find the sources in DIR [configure dir or ..]
211   --program-prefix=PREFIX prepend PREFIX to installed program names
212   --program-suffix=SUFFIX append SUFFIX to installed program names
213   --program-transform-name=PROGRAM
214                           run sed PROGRAM on installed program names
215 EOF
216     cat << EOF
217 Host type:
218   --build=BUILD           configure for building on BUILD [BUILD=HOST]
219   --host=HOST             configure for HOST [guessed]
220   --target=TARGET         configure for TARGET [TARGET=HOST]
221 Features and packages:
222   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
223   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
224   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
225   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
226   --x-includes=DIR        X include files are in DIR
227   --x-libraries=DIR       X library files are in DIR
228 EOF
229     if test -n "$ac_help"; then
230       echo "--enable and --with options recognized:$ac_help"
231     fi
232     exit 0 ;;
233
234   -host | --host | --hos | --ho)
235     ac_prev=host ;;
236   -host=* | --host=* | --hos=* | --ho=*)
237     host="$ac_optarg" ;;
238
239   -includedir | --includedir | --includedi | --included | --include \
240   | --includ | --inclu | --incl | --inc)
241     ac_prev=includedir ;;
242   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
243   | --includ=* | --inclu=* | --incl=* | --inc=*)
244     includedir="$ac_optarg" ;;
245
246   -infodir | --infodir | --infodi | --infod | --info | --inf)
247     ac_prev=infodir ;;
248   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
249     infodir="$ac_optarg" ;;
250
251   -libdir | --libdir | --libdi | --libd)
252     ac_prev=libdir ;;
253   -libdir=* | --libdir=* | --libdi=* | --libd=*)
254     libdir="$ac_optarg" ;;
255
256   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
257   | --libexe | --libex | --libe)
258     ac_prev=libexecdir ;;
259   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
260   | --libexe=* | --libex=* | --libe=*)
261     libexecdir="$ac_optarg" ;;
262
263   -localstatedir | --localstatedir | --localstatedi | --localstated \
264   | --localstate | --localstat | --localsta | --localst \
265   | --locals | --local | --loca | --loc | --lo)
266     ac_prev=localstatedir ;;
267   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
268   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
269   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
270     localstatedir="$ac_optarg" ;;
271
272   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
273     ac_prev=mandir ;;
274   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
275     mandir="$ac_optarg" ;;
276
277   -nfp | --nfp | --nf)
278     # Obsolete; use --without-fp.
279     with_fp=no ;;
280
281   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
282   | --no-cr | --no-c)
283     no_create=yes ;;
284
285   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
286   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
287     no_recursion=yes ;;
288
289   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
290   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
291   | --oldin | --oldi | --old | --ol | --o)
292     ac_prev=oldincludedir ;;
293   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
294   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
295   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
296     oldincludedir="$ac_optarg" ;;
297
298   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
299     ac_prev=prefix ;;
300   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
301     prefix="$ac_optarg" ;;
302
303   -program-prefix | --program-prefix | --program-prefi | --program-pref \
304   | --program-pre | --program-pr | --program-p)
305     ac_prev=program_prefix ;;
306   -program-prefix=* | --program-prefix=* | --program-prefi=* \
307   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
308     program_prefix="$ac_optarg" ;;
309
310   -program-suffix | --program-suffix | --program-suffi | --program-suff \
311   | --program-suf | --program-su | --program-s)
312     ac_prev=program_suffix ;;
313   -program-suffix=* | --program-suffix=* | --program-suffi=* \
314   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
315     program_suffix="$ac_optarg" ;;
316
317   -program-transform-name | --program-transform-name \
318   | --program-transform-nam | --program-transform-na \
319   | --program-transform-n | --program-transform- \
320   | --program-transform | --program-transfor \
321   | --program-transfo | --program-transf \
322   | --program-trans | --program-tran \
323   | --progr-tra | --program-tr | --program-t)
324     ac_prev=program_transform_name ;;
325   -program-transform-name=* | --program-transform-name=* \
326   | --program-transform-nam=* | --program-transform-na=* \
327   | --program-transform-n=* | --program-transform-=* \
328   | --program-transform=* | --program-transfor=* \
329   | --program-transfo=* | --program-transf=* \
330   | --program-trans=* | --program-tran=* \
331   | --progr-tra=* | --program-tr=* | --program-t=*)
332     program_transform_name="$ac_optarg" ;;
333
334   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
335   | -silent | --silent | --silen | --sile | --sil)
336     silent=yes ;;
337
338   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
339     ac_prev=sbindir ;;
340   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
341   | --sbi=* | --sb=*)
342     sbindir="$ac_optarg" ;;
343
344   -sharedstatedir | --sharedstatedir | --sharedstatedi \
345   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
346   | --sharedst | --shareds | --shared | --share | --shar \
347   | --sha | --sh)
348     ac_prev=sharedstatedir ;;
349   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
350   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
351   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
352   | --sha=* | --sh=*)
353     sharedstatedir="$ac_optarg" ;;
354
355   -site | --site | --sit)
356     ac_prev=site ;;
357   -site=* | --site=* | --sit=*)
358     site="$ac_optarg" ;;
359
360   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
361     ac_prev=srcdir ;;
362   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
363     srcdir="$ac_optarg" ;;
364
365   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
366   | --syscon | --sysco | --sysc | --sys | --sy)
367     ac_prev=sysconfdir ;;
368   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
369   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
370     sysconfdir="$ac_optarg" ;;
371
372   -target | --target | --targe | --targ | --tar | --ta | --t)
373     ac_prev=target ;;
374   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
375     target="$ac_optarg" ;;
376
377   -v | -verbose | --verbose | --verbos | --verbo | --verb)
378     verbose=yes ;;
379
380   -version | --version | --versio | --versi | --vers)
381     echo "configure generated by autoconf version 2.13"
382     exit 0 ;;
383
384   -with-* | --with-*)
385     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
386     # Reject names that are not valid shell variable names.
387     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
388       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389     fi
390     ac_package=`echo $ac_package| sed 's/-/_/g'`
391     case "$ac_option" in
392       *=*) ;;
393       *) ac_optarg=yes ;;
394     esac
395     eval "with_${ac_package}='$ac_optarg'" ;;
396
397   -without-* | --without-*)
398     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
399     # Reject names that are not valid shell variable names.
400     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
401       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402     fi
403     ac_package=`echo $ac_package| sed 's/-/_/g'`
404     eval "with_${ac_package}=no" ;;
405
406   --x)
407     # Obsolete; use --with-x.
408     with_x=yes ;;
409
410   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
411   | --x-incl | --x-inc | --x-in | --x-i)
412     ac_prev=x_includes ;;
413   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
414   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
415     x_includes="$ac_optarg" ;;
416
417   -x-libraries | --x-libraries | --x-librarie | --x-librari \
418   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
419     ac_prev=x_libraries ;;
420   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
421   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
422     x_libraries="$ac_optarg" ;;
423
424   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
425     ;;
426
427   *)
428     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
429       echo "configure: warning: $ac_option: invalid host type" 1>&2
430     fi
431     if test "x$nonopt" != xNONE; then
432       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
433     fi
434     nonopt="$ac_option"
435     ;;
436
437   esac
438 done
439
440 if test -n "$ac_prev"; then
441   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
442 fi
443
444 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
445
446 # File descriptor usage:
447 # 0 standard input
448 # 1 file creation
449 # 2 errors and warnings
450 # 3 some systems may open it to /dev/tty
451 # 4 used on the Kubota Titan
452 # 6 checking for... messages and results
453 # 5 compiler messages saved in config.log
454 if test "$silent" = yes; then
455   exec 6>/dev/null
456 else
457   exec 6>&1
458 fi
459 exec 5>./config.log
460
461 echo "\
462 This file contains any messages produced by compilers while
463 running configure, to aid debugging if configure makes a mistake.
464 " 1>&5
465
466 # Strip out --no-create and --no-recursion so they do not pile up.
467 # Also quote any args containing shell metacharacters.
468 ac_configure_args=
469 for ac_arg
470 do
471   case "$ac_arg" in
472   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
473   | --no-cr | --no-c) ;;
474   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
476   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
477   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
478   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
479   esac
480 done
481
482 # NLS nuisances.
483 # Only set these to C if already set.  These must not be set unconditionally
484 # because not all systems understand e.g. LANG=C (notably SCO).
485 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
486 # Non-C LC_CTYPE values break the ctype check.
487 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
488 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
489 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
490 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
491
492 # confdefs.h avoids OS command line length limits that DEFS can exceed.
493 rm -rf conftest* confdefs.h
494 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
495 echo > confdefs.h
496
497 # A filename unique to this package, relative to the directory that
498 # configure is in, which we can look for to find out if srcdir is correct.
499 ac_unique_file=ircd/ircd.c
500
501 # Find the source files, if location was not specified.
502 if test -z "$srcdir"; then
503   ac_srcdir_defaulted=yes
504   # Try the directory containing this script, then its parent.
505   ac_prog=$0
506   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
507   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
508   srcdir=$ac_confdir
509   if test ! -r $srcdir/$ac_unique_file; then
510     srcdir=..
511   fi
512 else
513   ac_srcdir_defaulted=no
514 fi
515 if test ! -r $srcdir/$ac_unique_file; then
516   if test "$ac_srcdir_defaulted" = yes; then
517     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
518   else
519     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
520   fi
521 fi
522 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
523
524 # Prefer explicitly selected file to automatically selected ones.
525 if test -z "$CONFIG_SITE"; then
526   if test "x$prefix" != xNONE; then
527     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
528   else
529     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
530   fi
531 fi
532 for ac_site_file in $CONFIG_SITE; do
533   if test -r "$ac_site_file"; then
534     echo "loading site script $ac_site_file"
535     . "$ac_site_file"
536   fi
537 done
538
539 if test -r "$cache_file"; then
540   echo "loading cache $cache_file"
541   . $cache_file
542 else
543   echo "creating cache $cache_file"
544   > $cache_file
545 fi
546
547 ac_ext=c
548 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
549 ac_cpp='$CPP $CPPFLAGS'
550 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
551 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
552 cross_compiling=$ac_cv_prog_cc_cross
553
554 ac_exeext=
555 ac_objext=o
556 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
557   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
558   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
559     ac_n= ac_c='
560 ' ac_t='        '
561   else
562     ac_n=-n ac_c= ac_t=
563   fi
564 else
565   ac_n= ac_c='\c' ac_t=
566 fi
567
568
569
570
571 if eval "test \"`echo '$''{'unet_cv_prefix'+set}'`\" = set"; then
572   echo $ac_n "(cached) $ac_c" 1>&6
573 else
574   unet_cv_prefix=$HOME
575 fi
576
577 if test x"$prefix" != xNONE; then
578     unet_cv_prefix=$prefix
579 fi
580 ac_default_prefix=$unet_cv_prefix
581
582
583
584
585
586 ac_aux_dir=
587 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
588   if test -f $ac_dir/install-sh; then
589     ac_aux_dir=$ac_dir
590     ac_install_sh="$ac_aux_dir/install-sh -c"
591     break
592   elif test -f $ac_dir/install.sh; then
593     ac_aux_dir=$ac_dir
594     ac_install_sh="$ac_aux_dir/install.sh -c"
595     break
596   fi
597 done
598 if test -z "$ac_aux_dir"; then
599   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
600 fi
601 ac_config_guess=$ac_aux_dir/config.guess
602 ac_config_sub=$ac_aux_dir/config.sub
603 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
604
605
606 # Make sure we can run config.sub.
607 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
608 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
609 fi
610
611 echo $ac_n "checking host system type""... $ac_c" 1>&6
612 echo "configure:613: checking host system type" >&5
613
614 host_alias=$host
615 case "$host_alias" in
616 NONE)
617   case $nonopt in
618   NONE)
619     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
620     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
621     fi ;;
622   *) host_alias=$nonopt ;;
623   esac ;;
624 esac
625
626 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
627 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
628 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
629 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
630 echo "$ac_t""$host" 1>&6
631
632
633 # Extract the first word of "gcc", so it can be a program name with args.
634 set dummy gcc; ac_word=$2
635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
636 echo "configure:637: checking for $ac_word" >&5
637 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
638   echo $ac_n "(cached) $ac_c" 1>&6
639 else
640   if test -n "$CC"; then
641   ac_cv_prog_CC="$CC" # Let the user override the test.
642 else
643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
644   ac_dummy="$PATH"
645   for ac_dir in $ac_dummy; do
646     test -z "$ac_dir" && ac_dir=.
647     if test -f $ac_dir/$ac_word; then
648       ac_cv_prog_CC="gcc"
649       break
650     fi
651   done
652   IFS="$ac_save_ifs"
653 fi
654 fi
655 CC="$ac_cv_prog_CC"
656 if test -n "$CC"; then
657   echo "$ac_t""$CC" 1>&6
658 else
659   echo "$ac_t""no" 1>&6
660 fi
661
662 if test -z "$CC"; then
663   # Extract the first word of "cc", so it can be a program name with args.
664 set dummy cc; ac_word=$2
665 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
666 echo "configure:667: checking for $ac_word" >&5
667 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
668   echo $ac_n "(cached) $ac_c" 1>&6
669 else
670   if test -n "$CC"; then
671   ac_cv_prog_CC="$CC" # Let the user override the test.
672 else
673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
674   ac_prog_rejected=no
675   ac_dummy="$PATH"
676   for ac_dir in $ac_dummy; do
677     test -z "$ac_dir" && ac_dir=.
678     if test -f $ac_dir/$ac_word; then
679       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
680         ac_prog_rejected=yes
681         continue
682       fi
683       ac_cv_prog_CC="cc"
684       break
685     fi
686   done
687   IFS="$ac_save_ifs"
688 if test $ac_prog_rejected = yes; then
689   # We found a bogon in the path, so make sure we never use it.
690   set dummy $ac_cv_prog_CC
691   shift
692   if test $# -gt 0; then
693     # We chose a different compiler from the bogus one.
694     # However, it has the same basename, so the bogon will be chosen
695     # first if we set CC to just the basename; use the full file name.
696     shift
697     set dummy "$ac_dir/$ac_word" "$@"
698     shift
699     ac_cv_prog_CC="$@"
700   fi
701 fi
702 fi
703 fi
704 CC="$ac_cv_prog_CC"
705 if test -n "$CC"; then
706   echo "$ac_t""$CC" 1>&6
707 else
708   echo "$ac_t""no" 1>&6
709 fi
710
711   if test -z "$CC"; then
712     case "`uname -s`" in
713     *win32* | *WIN32*)
714       # Extract the first word of "cl", so it can be a program name with args.
715 set dummy cl; ac_word=$2
716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
717 echo "configure:718: checking for $ac_word" >&5
718 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
719   echo $ac_n "(cached) $ac_c" 1>&6
720 else
721   if test -n "$CC"; then
722   ac_cv_prog_CC="$CC" # Let the user override the test.
723 else
724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
725   ac_dummy="$PATH"
726   for ac_dir in $ac_dummy; do
727     test -z "$ac_dir" && ac_dir=.
728     if test -f $ac_dir/$ac_word; then
729       ac_cv_prog_CC="cl"
730       break
731     fi
732   done
733   IFS="$ac_save_ifs"
734 fi
735 fi
736 CC="$ac_cv_prog_CC"
737 if test -n "$CC"; then
738   echo "$ac_t""$CC" 1>&6
739 else
740   echo "$ac_t""no" 1>&6
741 fi
742  ;;
743     esac
744   fi
745   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
746 fi
747
748 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
749 echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
750
751 ac_ext=c
752 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
753 ac_cpp='$CPP $CPPFLAGS'
754 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
755 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
756 cross_compiling=$ac_cv_prog_cc_cross
757
758 cat > conftest.$ac_ext << EOF
759
760 #line 761 "configure"
761 #include "confdefs.h"
762
763 main(){return(0);}
764 EOF
765 if { (eval echo configure:766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
766   ac_cv_prog_cc_works=yes
767   # If we can't run a trivial program, we are probably using a cross compiler.
768   if (./conftest; exit) 2>/dev/null; then
769     ac_cv_prog_cc_cross=no
770   else
771     ac_cv_prog_cc_cross=yes
772   fi
773 else
774   echo "configure: failed program was:" >&5
775   cat conftest.$ac_ext >&5
776   ac_cv_prog_cc_works=no
777 fi
778 rm -fr conftest*
779 ac_ext=c
780 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
781 ac_cpp='$CPP $CPPFLAGS'
782 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
783 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
784 cross_compiling=$ac_cv_prog_cc_cross
785
786 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
787 if test $ac_cv_prog_cc_works = no; then
788   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
789 fi
790 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
791 echo "configure:792: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
792 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
793 cross_compiling=$ac_cv_prog_cc_cross
794
795 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
796 echo "configure:797: checking whether we are using GNU C" >&5
797 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
798   echo $ac_n "(cached) $ac_c" 1>&6
799 else
800   cat > conftest.c <<EOF
801 #ifdef __GNUC__
802   yes;
803 #endif
804 EOF
805 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
806   ac_cv_prog_gcc=yes
807 else
808   ac_cv_prog_gcc=no
809 fi
810 fi
811
812 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
813
814 if test $ac_cv_prog_gcc = yes; then
815   GCC=yes
816 else
817   GCC=
818 fi
819
820 ac_test_CFLAGS="${CFLAGS+set}"
821 ac_save_CFLAGS="$CFLAGS"
822 CFLAGS=
823 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
824 echo "configure:825: checking whether ${CC-cc} accepts -g" >&5
825 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
826   echo $ac_n "(cached) $ac_c" 1>&6
827 else
828   echo 'void f(){}' > conftest.c
829 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
830   ac_cv_prog_cc_g=yes
831 else
832   ac_cv_prog_cc_g=no
833 fi
834 rm -f conftest*
835
836 fi
837
838 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
839 if test "$ac_test_CFLAGS" = set; then
840   CFLAGS="$ac_save_CFLAGS"
841 elif test $ac_cv_prog_cc_g = yes; then
842   if test "$GCC" = yes; then
843     CFLAGS="-g -O2"
844   else
845     CFLAGS="-g"
846   fi
847 else
848   if test "$GCC" = yes; then
849     CFLAGS="-O2"
850   else
851     CFLAGS=
852   fi
853 fi
854
855
856
857
858
859 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
860 echo "configure:861: checking for ${CC-cc} option to accept ANSI C" >&5
861 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
862   echo $ac_n "(cached) $ac_c" 1>&6
863 else
864   am_cv_prog_cc_stdc=no
865 ac_save_CC="$CC"
866 # Don't try gcc -ansi; that turns off useful extensions and
867 # breaks some systems' header files.
868 # AIX                   -qlanglvl=ansi
869 # Ultrix and OSF/1      -std1
870 # HP-UX                 -Aa -D_HPUX_SOURCE
871 # SVR4                  -Xc -D__EXTENSIONS__
872 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
873 do
874   CC="$ac_save_CC $ac_arg"
875   cat > conftest.$ac_ext <<EOF
876 #line 877 "configure"
877 #include "confdefs.h"
878 #include <stdarg.h>
879 #include <stdio.h>
880 #include <sys/types.h>
881 #include <sys/stat.h>
882 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
883 struct buf { int x; };
884 FILE * (*rcsopen) (struct buf *, struct stat *, int);
885 static char *e (p, i)
886      char **p;
887      int i;
888 {
889   return p[i];
890 }
891 static char *f (char * (*g) (char **, int), char **p, ...)
892 {
893   char *s;
894   va_list v;
895   va_start (v,p);
896   s = g (p, va_arg (v,int));
897   va_end (v);
898   return s;
899 }
900 int test (int i, double x);
901 struct s1 {int (*f) (int a);};
902 struct s2 {int (*f) (double a);};
903 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
904 int argc;
905 char **argv;
906
907 int main() {
908
909 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
910
911 ; return 0; }
912 EOF
913 if { (eval echo configure:914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
914   rm -rf conftest*
915   am_cv_prog_cc_stdc="$ac_arg"; break
916 else
917   echo "configure: failed program was:" >&5
918   cat conftest.$ac_ext >&5
919 fi
920 rm -f conftest*
921 done
922 CC="$ac_save_CC"
923
924 fi
925
926 if test -z "$am_cv_prog_cc_stdc"; then
927   echo "$ac_t""none needed" 1>&6
928 else
929   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
930 fi
931 case "x$am_cv_prog_cc_stdc" in
932   x|xno) ;;
933   *) CC="$CC $am_cv_prog_cc_stdc" ;;
934 esac
935
936 if test x"$CFLAGS" != x; then
937     CFLAGS=`echo "$CFLAGS" | sed -e 's/-O2/-O3/'`
938 fi
939 if test x"$CFLAGS" != x; then
940     CFLAGS=`echo "$CFLAGS" | sed -e 's/-pipe//g'`
941 fi
942 if test x"$CFLAGS" != x; then
943     unet_old_cflags=$CFLAGS
944     CFLAGS=`echo "$CFLAGS" | sed -e 's/-g//g'`
945 fi
946 if test x"$CFLAGS" != x"$unet_old_cflags"; then
947     # If -g was already there, force symbols to be enabled
948     unet_cv_enable_symbols=yes
949 fi
950 if test x"$CFLAGS" != x; then
951     unet_old_cflags=$CFLAGS
952     CFLAGS=`echo "$CFLAGS" | sed -e 's/-pg//g'`
953 fi
954 if test x"$CFLAGS" != x"$unet_old_cflags"; then
955     # If -pg was already there, force profiling to be enabled
956     unet_cv_enable_profile=yes
957 fi
958 if test x"$CFLAGS" != x; then
959     unet_old_cflags=$CFLAGS
960     CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wall//g'`
961 fi
962 if test x"$CFLAGS" != x"$unet_old_cflags"; then
963     # If -Wall was already there, force warnings to be enabled
964     unet_cv_enable_warnings=yes
965 fi
966 if test x"$CFLAGS" != x; then
967     unet_old_cflags=$CFLAGS
968     CFLAGS=`echo "$CFLAGS" | sed -e 's/-pedantic//g'`
969 fi
970 if test x"$CFLAGS" != x"$unet_old_cflags"; then
971     # If -pedantic was already there, force pedatic to be enabled
972     unet_cv_enable_pedantic=yes
973 fi
974
975
976
977 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
978 echo "configure:979: checking for library containing crypt" >&5
979 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
980   echo $ac_n "(cached) $ac_c" 1>&6
981 else
982   ac_func_search_save_LIBS="$LIBS"
983 ac_cv_search_crypt="no"
984 cat > conftest.$ac_ext <<EOF
985 #line 986 "configure"
986 #include "confdefs.h"
987 /* Override any gcc2 internal prototype to avoid an error.  */
988 /* We use char because int might match the return type of a gcc2
989     builtin and then its argument prototype would still apply.  */
990 char crypt();
991
992 int main() {
993 crypt()
994 ; return 0; }
995 EOF
996 if { (eval echo configure:997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
997   rm -rf conftest*
998   ac_cv_search_crypt="none required"
999 else
1000   echo "configure: failed program was:" >&5
1001   cat conftest.$ac_ext >&5
1002 fi
1003 rm -f conftest*
1004 test "$ac_cv_search_crypt" = "no" && for i in descrypt crypt; do
1005 LIBS="-l$i  $ac_func_search_save_LIBS"
1006 cat > conftest.$ac_ext <<EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1009 /* Override any gcc2 internal prototype to avoid an error.  */
1010 /* We use char because int might match the return type of a gcc2
1011     builtin and then its argument prototype would still apply.  */
1012 char crypt();
1013
1014 int main() {
1015 crypt()
1016 ; return 0; }
1017 EOF
1018 if { (eval echo configure:1019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1019   rm -rf conftest*
1020   ac_cv_search_crypt="-l$i"
1021 break
1022 else
1023   echo "configure: failed program was:" >&5
1024   cat conftest.$ac_ext >&5
1025 fi
1026 rm -f conftest*
1027 done
1028 LIBS="$ac_func_search_save_LIBS"
1029 fi
1030
1031 echo "$ac_t""$ac_cv_search_crypt" 1>&6
1032 if test "$ac_cv_search_crypt" != "no"; then
1033   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
1034   
1035 else :
1036   { echo "configure: error: Unable to find library containing crypt()" 1>&2; exit 1; }
1037 fi
1038
1039
1040    # Most operating systems have gethostbyname() in the default searched
1041    # libraries (i.e. libc):
1042    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1043 echo "configure:1044: checking for gethostbyname" >&5
1044 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047   cat > conftest.$ac_ext <<EOF
1048 #line 1049 "configure"
1049 #include "confdefs.h"
1050 /* System header to define __stub macros and hopefully few prototypes,
1051     which can conflict with char gethostbyname(); below.  */
1052 #include <assert.h>
1053 /* Override any gcc2 internal prototype to avoid an error.  */
1054 /* We use char because int might match the return type of a gcc2
1055     builtin and then its argument prototype would still apply.  */
1056 char gethostbyname();
1057
1058 int main() {
1059
1060 /* The GNU C library defines this for functions which it implements
1061     to always fail with ENOSYS.  Some functions are actually named
1062     something starting with __ and the normal name is an alias.  */
1063 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1064 choke me
1065 #else
1066 gethostbyname();
1067 #endif
1068
1069 ; return 0; }
1070 EOF
1071 if { (eval echo configure:1072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1072   rm -rf conftest*
1073   eval "ac_cv_func_gethostbyname=yes"
1074 else
1075   echo "configure: failed program was:" >&5
1076   cat conftest.$ac_ext >&5
1077   rm -rf conftest*
1078   eval "ac_cv_func_gethostbyname=no"
1079 fi
1080 rm -f conftest*
1081 fi
1082
1083 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1084   echo "$ac_t""yes" 1>&6
1085   :
1086 else
1087   echo "$ac_t""no" 1>&6
1088 # Some OSes (eg. Solaris) place it in libnsl:
1089      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1090 echo "configure:1091: checking for gethostbyname in -lnsl" >&5
1091 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1092 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1093   echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095   ac_save_LIBS="$LIBS"
1096 LIBS="-lnsl  $LIBS"
1097 cat > conftest.$ac_ext <<EOF
1098 #line 1099 "configure"
1099 #include "confdefs.h"
1100 /* Override any gcc2 internal prototype to avoid an error.  */
1101 /* We use char because int might match the return type of a gcc2
1102     builtin and then its argument prototype would still apply.  */
1103 char gethostbyname();
1104
1105 int main() {
1106 gethostbyname()
1107 ; return 0; }
1108 EOF
1109 if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1110   rm -rf conftest*
1111   eval "ac_cv_lib_$ac_lib_var=yes"
1112 else
1113   echo "configure: failed program was:" >&5
1114   cat conftest.$ac_ext >&5
1115   rm -rf conftest*
1116   eval "ac_cv_lib_$ac_lib_var=no"
1117 fi
1118 rm -f conftest*
1119 LIBS="$ac_save_LIBS"
1120
1121 fi
1122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1123   echo "$ac_t""yes" 1>&6
1124     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
1125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1126   cat >> confdefs.h <<EOF
1127 #define $ac_tr_lib 1
1128 EOF
1129
1130   LIBS="-lnsl $LIBS"
1131
1132 else
1133   echo "$ac_t""no" 1>&6
1134 # Some strange OSes (SINIX) have it in libsocket:
1135        echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
1136 echo "configure:1137: checking for gethostbyname in -lsocket" >&5
1137 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1138 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1139   echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141   ac_save_LIBS="$LIBS"
1142 LIBS="-lsocket  $LIBS"
1143 cat > conftest.$ac_ext <<EOF
1144 #line 1145 "configure"
1145 #include "confdefs.h"
1146 /* Override any gcc2 internal prototype to avoid an error.  */
1147 /* We use char because int might match the return type of a gcc2
1148     builtin and then its argument prototype would still apply.  */
1149 char gethostbyname();
1150
1151 int main() {
1152 gethostbyname()
1153 ; return 0; }
1154 EOF
1155 if { (eval echo configure:1156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1156   rm -rf conftest*
1157   eval "ac_cv_lib_$ac_lib_var=yes"
1158 else
1159   echo "configure: failed program was:" >&5
1160   cat conftest.$ac_ext >&5
1161   rm -rf conftest*
1162   eval "ac_cv_lib_$ac_lib_var=no"
1163 fi
1164 rm -f conftest*
1165 LIBS="$ac_save_LIBS"
1166
1167 fi
1168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1169   echo "$ac_t""yes" 1>&6
1170     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
1171     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1172   cat >> confdefs.h <<EOF
1173 #define $ac_tr_lib 1
1174 EOF
1175
1176   LIBS="-lsocket $LIBS"
1177
1178 else
1179   echo "$ac_t""no" 1>&6
1180 # Unfortunately libsocket sometimes depends on libnsl.
1181           # AC_CHECK_LIB's API is essentially broken so the following
1182           # ugliness is necessary:
1183           echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
1184 echo "configure:1185: checking for gethostbyname in -lsocket" >&5
1185 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1186 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1187   echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189   ac_save_LIBS="$LIBS"
1190 LIBS="-lsocket -lnsl $LIBS"
1191 cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194 /* Override any gcc2 internal prototype to avoid an error.  */
1195 /* We use char because int might match the return type of a gcc2
1196     builtin and then its argument prototype would still apply.  */
1197 char gethostbyname();
1198
1199 int main() {
1200 gethostbyname()
1201 ; return 0; }
1202 EOF
1203 if { (eval echo configure:1204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1204   rm -rf conftest*
1205   eval "ac_cv_lib_$ac_lib_var=yes"
1206 else
1207   echo "configure: failed program was:" >&5
1208   cat conftest.$ac_ext >&5
1209   rm -rf conftest*
1210   eval "ac_cv_lib_$ac_lib_var=no"
1211 fi
1212 rm -f conftest*
1213 LIBS="$ac_save_LIBS"
1214
1215 fi
1216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1217   echo "$ac_t""yes" 1>&6
1218   LIBS="-lsocket -lnsl $LIBS"
1219 else
1220   echo "$ac_t""no" 1>&6
1221 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
1222 echo "configure:1223: checking for gethostbyname in -lresolv" >&5
1223 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
1224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1225   echo $ac_n "(cached) $ac_c" 1>&6
1226 else
1227   ac_save_LIBS="$LIBS"
1228 LIBS="-lresolv  $LIBS"
1229 cat > conftest.$ac_ext <<EOF
1230 #line 1231 "configure"
1231 #include "confdefs.h"
1232 /* Override any gcc2 internal prototype to avoid an error.  */
1233 /* We use char because int might match the return type of a gcc2
1234     builtin and then its argument prototype would still apply.  */
1235 char gethostbyname();
1236
1237 int main() {
1238 gethostbyname()
1239 ; return 0; }
1240 EOF
1241 if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1242   rm -rf conftest*
1243   eval "ac_cv_lib_$ac_lib_var=yes"
1244 else
1245   echo "configure: failed program was:" >&5
1246   cat conftest.$ac_ext >&5
1247   rm -rf conftest*
1248   eval "ac_cv_lib_$ac_lib_var=no"
1249 fi
1250 rm -f conftest*
1251 LIBS="$ac_save_LIBS"
1252
1253 fi
1254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1255   echo "$ac_t""yes" 1>&6
1256     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
1257     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1258   cat >> confdefs.h <<EOF
1259 #define $ac_tr_lib 1
1260 EOF
1261
1262   LIBS="-lresolv $LIBS"
1263
1264 else
1265   echo "$ac_t""no" 1>&6
1266 fi
1267
1268 fi
1269
1270        
1271 fi
1272
1273      
1274 fi
1275
1276    
1277 fi
1278
1279   echo $ac_n "checking for socket""... $ac_c" 1>&6
1280 echo "configure:1281: checking for socket" >&5
1281 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1282   echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284   cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1287 /* System header to define __stub macros and hopefully few prototypes,
1288     which can conflict with char socket(); below.  */
1289 #include <assert.h>
1290 /* Override any gcc2 internal prototype to avoid an error.  */
1291 /* We use char because int might match the return type of a gcc2
1292     builtin and then its argument prototype would still apply.  */
1293 char socket();
1294
1295 int main() {
1296
1297 /* The GNU C library defines this for functions which it implements
1298     to always fail with ENOSYS.  Some functions are actually named
1299     something starting with __ and the normal name is an alias.  */
1300 #if defined (__stub_socket) || defined (__stub___socket)
1301 choke me
1302 #else
1303 socket();
1304 #endif
1305
1306 ; return 0; }
1307 EOF
1308 if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1309   rm -rf conftest*
1310   eval "ac_cv_func_socket=yes"
1311 else
1312   echo "configure: failed program was:" >&5
1313   cat conftest.$ac_ext >&5
1314   rm -rf conftest*
1315   eval "ac_cv_func_socket=no"
1316 fi
1317 rm -f conftest*
1318 fi
1319
1320 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1321   echo "$ac_t""yes" 1>&6
1322   :
1323 else
1324   echo "$ac_t""no" 1>&6
1325 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1326 echo "configure:1327: checking for socket in -lsocket" >&5
1327 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1328 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1329   echo $ac_n "(cached) $ac_c" 1>&6
1330 else
1331   ac_save_LIBS="$LIBS"
1332 LIBS="-lsocket  $LIBS"
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1335 "configure"
1335 #include "confdefs.h"
1336 /* Override any gcc2 internal prototype to avoid an error.  */
1337 /* We use char because int might match the return type of a gcc2
1338     builtin and then its argument prototype would still apply.  */
1339 char socket();
1340
1341 int main() {
1342 socket()
1343 ; return 0; }
1344 EOF
1345 if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1346   rm -rf conftest*
1347   eval "ac_cv_lib_$ac_lib_var=yes"
1348 else
1349   echo "configure: failed program was:" >&5
1350   cat conftest.$ac_ext >&5
1351   rm -rf conftest*
1352   eval "ac_cv_lib_$ac_lib_var=no"
1353 fi
1354 rm -f conftest*
1355 LIBS="$ac_save_LIBS"
1356
1357 fi
1358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1359   echo "$ac_t""yes" 1>&6
1360     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
1361     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1362   cat >> confdefs.h <<EOF
1363 #define $ac_tr_lib 1
1364 EOF
1365
1366   LIBS="-lsocket $LIBS"
1367
1368 else
1369   echo "$ac_t""no" 1>&6
1370 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1371 echo "configure:1372: checking for socket in -lsocket" >&5
1372 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1374   echo $ac_n "(cached) $ac_c" 1>&6
1375 else
1376   ac_save_LIBS="$LIBS"
1377 LIBS="-lsocket -lnsl $LIBS"
1378 cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1381 /* Override any gcc2 internal prototype to avoid an error.  */
1382 /* We use char because int might match the return type of a gcc2
1383     builtin and then its argument prototype would still apply.  */
1384 char socket();
1385
1386 int main() {
1387 socket()
1388 ; return 0; }
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1391   rm -rf conftest*
1392   eval "ac_cv_lib_$ac_lib_var=yes"
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -rf conftest*
1397   eval "ac_cv_lib_$ac_lib_var=no"
1398 fi
1399 rm -f conftest*
1400 LIBS="$ac_save_LIBS"
1401
1402 fi
1403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1404   echo "$ac_t""yes" 1>&6
1405   LIBS="-lsocket -lnsl $LIBS"
1406 else
1407   echo "$ac_t""no" 1>&6
1408 fi
1409
1410 fi
1411
1412 fi
1413
1414   
1415
1416
1417 echo $ac_n "checking for library containing res_mkquery""... $ac_c" 1>&6
1418 echo "configure:1419: checking for library containing res_mkquery" >&5
1419 if eval "test \"`echo '$''{'ac_cv_search_res_mkquery'+set}'`\" = set"; then
1420   echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422   ac_func_search_save_LIBS="$LIBS"
1423 ac_cv_search_res_mkquery="no"
1424 cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427 /* Override any gcc2 internal prototype to avoid an error.  */
1428 /* We use char because int might match the return type of a gcc2
1429     builtin and then its argument prototype would still apply.  */
1430 char res_mkquery();
1431
1432 int main() {
1433 res_mkquery()
1434 ; return 0; }
1435 EOF
1436 if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1437   rm -rf conftest*
1438   ac_cv_search_res_mkquery="none required"
1439 else
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442 fi
1443 rm -f conftest*
1444 test "$ac_cv_search_res_mkquery" = "no" && for i in resolv; do
1445 LIBS="-l$i  $ac_func_search_save_LIBS"
1446 cat > conftest.$ac_ext <<EOF
1447 #line 1448 "configure"
1448 #include "confdefs.h"
1449 /* Override any gcc2 internal prototype to avoid an error.  */
1450 /* We use char because int might match the return type of a gcc2
1451     builtin and then its argument prototype would still apply.  */
1452 char res_mkquery();
1453
1454 int main() {
1455 res_mkquery()
1456 ; return 0; }
1457 EOF
1458 if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1459   rm -rf conftest*
1460   ac_cv_search_res_mkquery="-l$i"
1461 break
1462 else
1463   echo "configure: failed program was:" >&5
1464   cat conftest.$ac_ext >&5
1465 fi
1466 rm -f conftest*
1467 done
1468 LIBS="$ac_func_search_save_LIBS"
1469 fi
1470
1471 echo "$ac_t""$ac_cv_search_res_mkquery" 1>&6
1472 if test "$ac_cv_search_res_mkquery" != "no"; then
1473   test "$ac_cv_search_res_mkquery" = "none required" || LIBS="$ac_cv_search_res_mkquery $LIBS"
1474   
1475 else :
1476   { echo "configure: error: Unable to find library containing res_mkquery()" 1>&2; exit 1; }
1477 fi
1478
1479 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1480 echo "configure:1481: checking how to run the C preprocessor" >&5
1481 # On Suns, sometimes $CPP names a directory.
1482 if test -n "$CPP" && test -d "$CPP"; then
1483   CPP=
1484 fi
1485 if test -z "$CPP"; then
1486 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1487   echo $ac_n "(cached) $ac_c" 1>&6
1488 else
1489     # This must be in double quotes, not single quotes, because CPP may get
1490   # substituted into the Makefile and "${CC-cc}" will confuse make.
1491   CPP="${CC-cc} -E"
1492   # On the NeXT, cc -E runs the code through the compiler's parser,
1493   # not just through cpp.
1494   cat > conftest.$ac_ext <<EOF
1495 #line 1496 "configure"
1496 #include "confdefs.h"
1497 #include <assert.h>
1498 Syntax Error
1499 EOF
1500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1501 { (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1503 if test -z "$ac_err"; then
1504   :
1505 else
1506   echo "$ac_err" >&5
1507   echo "configure: failed program was:" >&5
1508   cat conftest.$ac_ext >&5
1509   rm -rf conftest*
1510   CPP="${CC-cc} -E -traditional-cpp"
1511   cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <assert.h>
1515 Syntax Error
1516 EOF
1517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1518 { (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1520 if test -z "$ac_err"; then
1521   :
1522 else
1523   echo "$ac_err" >&5
1524   echo "configure: failed program was:" >&5
1525   cat conftest.$ac_ext >&5
1526   rm -rf conftest*
1527   CPP="${CC-cc} -nologo -E"
1528   cat > conftest.$ac_ext <<EOF
1529 #line 1530 "configure"
1530 #include "confdefs.h"
1531 #include <assert.h>
1532 Syntax Error
1533 EOF
1534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1535 { (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1537 if test -z "$ac_err"; then
1538   :
1539 else
1540   echo "$ac_err" >&5
1541   echo "configure: failed program was:" >&5
1542   cat conftest.$ac_ext >&5
1543   rm -rf conftest*
1544   CPP=/lib/cpp
1545 fi
1546 rm -f conftest*
1547 fi
1548 rm -f conftest*
1549 fi
1550 rm -f conftest*
1551   ac_cv_prog_CPP="$CPP"
1552 fi
1553   CPP="$ac_cv_prog_CPP"
1554 else
1555   ac_cv_prog_CPP="$CPP"
1556 fi
1557 echo "$ac_t""$CPP" 1>&6
1558
1559 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1560 echo "configure:1561: checking for ANSI C header files" >&5
1561 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1562   echo $ac_n "(cached) $ac_c" 1>&6
1563 else
1564   cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 #include <stdlib.h>
1568 #include <stdarg.h>
1569 #include <string.h>
1570 #include <float.h>
1571 EOF
1572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1573 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1575 if test -z "$ac_err"; then
1576   rm -rf conftest*
1577   ac_cv_header_stdc=yes
1578 else
1579   echo "$ac_err" >&5
1580   echo "configure: failed program was:" >&5
1581   cat conftest.$ac_ext >&5
1582   rm -rf conftest*
1583   ac_cv_header_stdc=no
1584 fi
1585 rm -f conftest*
1586
1587 if test $ac_cv_header_stdc = yes; then
1588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1589 cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592 #include <string.h>
1593 EOF
1594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1595   egrep "memchr" >/dev/null 2>&1; then
1596   :
1597 else
1598   rm -rf conftest*
1599   ac_cv_header_stdc=no
1600 fi
1601 rm -f conftest*
1602
1603 fi
1604
1605 if test $ac_cv_header_stdc = yes; then
1606   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1607 cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <stdlib.h>
1611 EOF
1612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1613   egrep "free" >/dev/null 2>&1; then
1614   :
1615 else
1616   rm -rf conftest*
1617   ac_cv_header_stdc=no
1618 fi
1619 rm -f conftest*
1620
1621 fi
1622
1623 if test $ac_cv_header_stdc = yes; then
1624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1625 if test "$cross_compiling" = yes; then
1626   :
1627 else
1628   cat > conftest.$ac_ext <<EOF
1629 #line 1630 "configure"
1630 #include "confdefs.h"
1631 #include <ctype.h>
1632 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1633 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1634 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1635 int main () { int i; for (i = 0; i < 256; i++)
1636 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1637 exit (0); }
1638
1639 EOF
1640 if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1641 then
1642   :
1643 else
1644   echo "configure: failed program was:" >&5
1645   cat conftest.$ac_ext >&5
1646   rm -fr conftest*
1647   ac_cv_header_stdc=no
1648 fi
1649 rm -fr conftest*
1650 fi
1651
1652 fi
1653 fi
1654
1655 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1656 if test $ac_cv_header_stdc = yes; then
1657   cat >> confdefs.h <<\EOF
1658 #define STDC_HEADERS 1
1659 EOF
1660
1661 fi
1662
1663 for ac_hdr in poll.h sys/devpoll.h sys/event.h
1664 do
1665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1667 echo "configure:1668: checking for $ac_hdr" >&5
1668 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1669   echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671   cat > conftest.$ac_ext <<EOF
1672 #line 1673 "configure"
1673 #include "confdefs.h"
1674 #include <$ac_hdr>
1675 EOF
1676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1677 { (eval echo configure:1678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1679 if test -z "$ac_err"; then
1680   rm -rf conftest*
1681   eval "ac_cv_header_$ac_safe=yes"
1682 else
1683   echo "$ac_err" >&5
1684   echo "configure: failed program was:" >&5
1685   cat conftest.$ac_ext >&5
1686   rm -rf conftest*
1687   eval "ac_cv_header_$ac_safe=no"
1688 fi
1689 rm -f conftest*
1690 fi
1691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1692   echo "$ac_t""yes" 1>&6
1693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1694   cat >> confdefs.h <<EOF
1695 #define $ac_tr_hdr 1
1696 EOF
1697  
1698 else
1699   echo "$ac_t""no" 1>&6
1700 fi
1701 done
1702
1703
1704 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1705 echo "configure:1706: checking whether byte ordering is bigendian" >&5
1706 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1707   echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709   ac_cv_c_bigendian=unknown
1710 # See if sys/param.h defines the BYTE_ORDER macro.
1711 cat > conftest.$ac_ext <<EOF
1712 #line 1713 "configure"
1713 #include "confdefs.h"
1714 #include <sys/types.h>
1715 #include <sys/param.h>
1716 int main() {
1717
1718 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1719  bogus endian macros
1720 #endif
1721 ; return 0; }
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1724   rm -rf conftest*
1725   # It does; now see whether it defined to BIG_ENDIAN or not.
1726 cat > conftest.$ac_ext <<EOF
1727 #line 1728 "configure"
1728 #include "confdefs.h"
1729 #include <sys/types.h>
1730 #include <sys/param.h>
1731 int main() {
1732
1733 #if BYTE_ORDER != BIG_ENDIAN
1734  not big endian
1735 #endif
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1739   rm -rf conftest*
1740   ac_cv_c_bigendian=yes
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   ac_cv_c_bigendian=no
1746 fi
1747 rm -f conftest*
1748 else
1749   echo "configure: failed program was:" >&5
1750   cat conftest.$ac_ext >&5
1751 fi
1752 rm -f conftest*
1753 if test $ac_cv_c_bigendian = unknown; then
1754 if test "$cross_compiling" = yes; then
1755     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1756 else
1757   cat > conftest.$ac_ext <<EOF
1758 #line 1759 "configure"
1759 #include "confdefs.h"
1760 main () {
1761   /* Are we little or big endian?  From Harbison&Steele.  */
1762   union
1763   {
1764     long l;
1765     char c[sizeof (long)];
1766   } u;
1767   u.l = 1;
1768   exit (u.c[sizeof (long) - 1] == 1);
1769 }
1770 EOF
1771 if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1772 then
1773   ac_cv_c_bigendian=no
1774 else
1775   echo "configure: failed program was:" >&5
1776   cat conftest.$ac_ext >&5
1777   rm -fr conftest*
1778   ac_cv_c_bigendian=yes
1779 fi
1780 rm -fr conftest*
1781 fi
1782
1783 fi
1784 fi
1785
1786 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1787 if test $ac_cv_c_bigendian = yes; then
1788   cat >> confdefs.h <<\EOF
1789 #define WORDS_BIGENDIAN 1
1790 EOF
1791
1792 fi
1793
1794 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1795 echo "configure:1796: checking for size_t" >&5
1796 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1797   echo $ac_n "(cached) $ac_c" 1>&6
1798 else
1799   cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #include <sys/types.h>
1803 #if STDC_HEADERS
1804 #include <stdlib.h>
1805 #include <stddef.h>
1806 #endif
1807 EOF
1808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1809   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1810   rm -rf conftest*
1811   ac_cv_type_size_t=yes
1812 else
1813   rm -rf conftest*
1814   ac_cv_type_size_t=no
1815 fi
1816 rm -f conftest*
1817
1818 fi
1819 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1820 if test $ac_cv_type_size_t = no; then
1821   cat >> confdefs.h <<\EOF
1822 #define size_t unsigned
1823 EOF
1824
1825 fi
1826
1827 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1828 echo "configure:1829: checking whether time.h and sys/time.h may both be included" >&5
1829 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1830   echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832   cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 #include <sys/types.h>
1836 #include <sys/time.h>
1837 #include <time.h>
1838 int main() {
1839 struct tm *tp;
1840 ; return 0; }
1841 EOF
1842 if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1843   rm -rf conftest*
1844   ac_cv_header_time=yes
1845 else
1846   echo "configure: failed program was:" >&5
1847   cat conftest.$ac_ext >&5
1848   rm -rf conftest*
1849   ac_cv_header_time=no
1850 fi
1851 rm -f conftest*
1852 fi
1853
1854 echo "$ac_t""$ac_cv_header_time" 1>&6
1855 if test $ac_cv_header_time = yes; then
1856   cat >> confdefs.h <<\EOF
1857 #define TIME_WITH_SYS_TIME 1
1858 EOF
1859
1860 fi
1861
1862 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1863 echo "configure:1864: checking whether struct tm is in sys/time.h or time.h" >&5
1864 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1865   echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867   cat > conftest.$ac_ext <<EOF
1868 #line 1869 "configure"
1869 #include "confdefs.h"
1870 #include <sys/types.h>
1871 #include <time.h>
1872 int main() {
1873 struct tm *tp; tp->tm_sec;
1874 ; return 0; }
1875 EOF
1876 if { (eval echo configure:1877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1877   rm -rf conftest*
1878   ac_cv_struct_tm=time.h
1879 else
1880   echo "configure: failed program was:" >&5
1881   cat conftest.$ac_ext >&5
1882   rm -rf conftest*
1883   ac_cv_struct_tm=sys/time.h
1884 fi
1885 rm -f conftest*
1886 fi
1887
1888 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1889 if test $ac_cv_struct_tm = sys/time.h; then
1890   cat >> confdefs.h <<\EOF
1891 #define TM_IN_SYS_TIME 1
1892 EOF
1893
1894 fi
1895
1896 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1897 echo "configure:1898: checking for uid_t in sys/types.h" >&5
1898 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1899   echo $ac_n "(cached) $ac_c" 1>&6
1900 else
1901   cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 #include <sys/types.h>
1905 EOF
1906 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1907   egrep "uid_t" >/dev/null 2>&1; then
1908   rm -rf conftest*
1909   ac_cv_type_uid_t=yes
1910 else
1911   rm -rf conftest*
1912   ac_cv_type_uid_t=no
1913 fi
1914 rm -f conftest*
1915
1916 fi
1917
1918 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1919 if test $ac_cv_type_uid_t = no; then
1920   cat >> confdefs.h <<\EOF
1921 #define uid_t int
1922 EOF
1923
1924   cat >> confdefs.h <<\EOF
1925 #define gid_t int
1926 EOF
1927
1928 fi
1929
1930 echo $ac_n "checking size of short""... $ac_c" 1>&6
1931 echo "configure:1932: checking size of short" >&5
1932 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1933   echo $ac_n "(cached) $ac_c" 1>&6
1934 else
1935   if test "$cross_compiling" = yes; then
1936     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1937 else
1938   cat > conftest.$ac_ext <<EOF
1939 #line 1940 "configure"
1940 #include "confdefs.h"
1941 #include <stdio.h>
1942 main()
1943 {
1944   FILE *f=fopen("conftestval", "w");
1945   if (!f) exit(1);
1946   fprintf(f, "%d\n", sizeof(short));
1947   exit(0);
1948 }
1949 EOF
1950 if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1951 then
1952   ac_cv_sizeof_short=`cat conftestval`
1953 else
1954   echo "configure: failed program was:" >&5
1955   cat conftest.$ac_ext >&5
1956   rm -fr conftest*
1957   ac_cv_sizeof_short=0
1958 fi
1959 rm -fr conftest*
1960 fi
1961
1962 fi
1963 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1964 cat >> confdefs.h <<EOF
1965 #define SIZEOF_SHORT $ac_cv_sizeof_short
1966 EOF
1967
1968
1969 echo $ac_n "checking size of int""... $ac_c" 1>&6
1970 echo "configure:1971: checking size of int" >&5
1971 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1972   echo $ac_n "(cached) $ac_c" 1>&6
1973 else
1974   if test "$cross_compiling" = yes; then
1975     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1976 else
1977   cat > conftest.$ac_ext <<EOF
1978 #line 1979 "configure"
1979 #include "confdefs.h"
1980 #include <stdio.h>
1981 main()
1982 {
1983   FILE *f=fopen("conftestval", "w");
1984   if (!f) exit(1);
1985   fprintf(f, "%d\n", sizeof(int));
1986   exit(0);
1987 }
1988 EOF
1989 if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1990 then
1991   ac_cv_sizeof_int=`cat conftestval`
1992 else
1993   echo "configure: failed program was:" >&5
1994   cat conftest.$ac_ext >&5
1995   rm -fr conftest*
1996   ac_cv_sizeof_int=0
1997 fi
1998 rm -fr conftest*
1999 fi
2000
2001 fi
2002 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2003 cat >> confdefs.h <<EOF
2004 #define SIZEOF_INT $ac_cv_sizeof_int
2005 EOF
2006
2007
2008 echo $ac_n "checking size of long""... $ac_c" 1>&6
2009 echo "configure:2010: checking size of long" >&5
2010 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2011   echo $ac_n "(cached) $ac_c" 1>&6
2012 else
2013   if test "$cross_compiling" = yes; then
2014     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2015 else
2016   cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <stdio.h>
2020 main()
2021 {
2022   FILE *f=fopen("conftestval", "w");
2023   if (!f) exit(1);
2024   fprintf(f, "%d\n", sizeof(long));
2025   exit(0);
2026 }
2027 EOF
2028 if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2029 then
2030   ac_cv_sizeof_long=`cat conftestval`
2031 else
2032   echo "configure: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   rm -fr conftest*
2035   ac_cv_sizeof_long=0
2036 fi
2037 rm -fr conftest*
2038 fi
2039
2040 fi
2041 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2042 cat >> confdefs.h <<EOF
2043 #define SIZEOF_LONG $ac_cv_sizeof_long
2044 EOF
2045
2046
2047 echo $ac_n "checking size of void *""... $ac_c" 1>&6
2048 echo "configure:2049: checking size of void *" >&5
2049 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2050   echo $ac_n "(cached) $ac_c" 1>&6
2051 else
2052   if test "$cross_compiling" = yes; then
2053     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2054 else
2055   cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <stdio.h>
2059 main()
2060 {
2061   FILE *f=fopen("conftestval", "w");
2062   if (!f) exit(1);
2063   fprintf(f, "%d\n", sizeof(void *));
2064   exit(0);
2065 }
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2068 then
2069   ac_cv_sizeof_void_p=`cat conftestval`
2070 else
2071   echo "configure: failed program was:" >&5
2072   cat conftest.$ac_ext >&5
2073   rm -fr conftest*
2074   ac_cv_sizeof_void_p=0
2075 fi
2076 rm -fr conftest*
2077 fi
2078
2079 fi
2080 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2081 cat >> confdefs.h <<EOF
2082 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2083 EOF
2084
2085
2086 if test "$ac_cv_sizeof_int" = 2 ; then
2087   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
2088 echo "configure:2089: checking for int16_t" >&5
2089 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
2090   echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092   cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <sys/types.h>
2096 #if STDC_HEADERS
2097 #include <stdlib.h>
2098 #include <stddef.h>
2099 #endif
2100 EOF
2101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2102   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2103   rm -rf conftest*
2104   ac_cv_type_int16_t=yes
2105 else
2106   rm -rf conftest*
2107   ac_cv_type_int16_t=no
2108 fi
2109 rm -f conftest*
2110
2111 fi
2112 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
2113 if test $ac_cv_type_int16_t = no; then
2114   cat >> confdefs.h <<\EOF
2115 #define int16_t int
2116 EOF
2117
2118 fi
2119
2120   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
2121 echo "configure:2122: checking for u_int16_t" >&5
2122 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
2123   echo $ac_n "(cached) $ac_c" 1>&6
2124 else
2125   cat > conftest.$ac_ext <<EOF
2126 #line 2127 "configure"
2127 #include "confdefs.h"
2128 #include <sys/types.h>
2129 #if STDC_HEADERS
2130 #include <stdlib.h>
2131 #include <stddef.h>
2132 #endif
2133 EOF
2134 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2135   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2136   rm -rf conftest*
2137   ac_cv_type_u_int16_t=yes
2138 else
2139   rm -rf conftest*
2140   ac_cv_type_u_int16_t=no
2141 fi
2142 rm -f conftest*
2143
2144 fi
2145 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
2146 if test $ac_cv_type_u_int16_t = no; then
2147   cat >> confdefs.h <<\EOF
2148 #define u_int16_t unsigned int
2149 EOF
2150
2151 fi
2152
2153 elif test "$ac_cv_sizeof_short" = 2 ; then
2154   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
2155 echo "configure:2156: checking for int16_t" >&5
2156 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
2157   echo $ac_n "(cached) $ac_c" 1>&6
2158 else
2159   cat > conftest.$ac_ext <<EOF
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2162 #include <sys/types.h>
2163 #if STDC_HEADERS
2164 #include <stdlib.h>
2165 #include <stddef.h>
2166 #endif
2167 EOF
2168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2169   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2170   rm -rf conftest*
2171   ac_cv_type_int16_t=yes
2172 else
2173   rm -rf conftest*
2174   ac_cv_type_int16_t=no
2175 fi
2176 rm -f conftest*
2177
2178 fi
2179 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
2180 if test $ac_cv_type_int16_t = no; then
2181   cat >> confdefs.h <<\EOF
2182 #define int16_t short
2183 EOF
2184
2185 fi
2186
2187   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
2188 echo "configure:2189: checking for u_int16_t" >&5
2189 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   cat > conftest.$ac_ext <<EOF
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195 #include <sys/types.h>
2196 #if STDC_HEADERS
2197 #include <stdlib.h>
2198 #include <stddef.h>
2199 #endif
2200 EOF
2201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2202   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2203   rm -rf conftest*
2204   ac_cv_type_u_int16_t=yes
2205 else
2206   rm -rf conftest*
2207   ac_cv_type_u_int16_t=no
2208 fi
2209 rm -f conftest*
2210
2211 fi
2212 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
2213 if test $ac_cv_type_u_int16_t = no; then
2214   cat >> confdefs.h <<\EOF
2215 #define u_int16_t unsigned short
2216 EOF
2217
2218 fi
2219
2220 else
2221   { echo "configure: error: Cannot find a type with size of 16 bits" 1>&2; exit 1; }
2222 fi
2223 if test "$ac_cv_sizeof_int" = 4 ; then
2224   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
2225 echo "configure:2226: checking for int32_t" >&5
2226 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
2227   echo $ac_n "(cached) $ac_c" 1>&6
2228 else
2229   cat > conftest.$ac_ext <<EOF
2230 #line 2231 "configure"
2231 #include "confdefs.h"
2232 #include <sys/types.h>
2233 #if STDC_HEADERS
2234 #include <stdlib.h>
2235 #include <stddef.h>
2236 #endif
2237 EOF
2238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2239   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2240   rm -rf conftest*
2241   ac_cv_type_int32_t=yes
2242 else
2243   rm -rf conftest*
2244   ac_cv_type_int32_t=no
2245 fi
2246 rm -f conftest*
2247
2248 fi
2249 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2250 if test $ac_cv_type_int32_t = no; then
2251   cat >> confdefs.h <<\EOF
2252 #define int32_t int
2253 EOF
2254
2255 fi
2256
2257   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2258 echo "configure:2259: checking for u_int32_t" >&5
2259 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2260   echo $ac_n "(cached) $ac_c" 1>&6
2261 else
2262   cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 #include "confdefs.h"
2265 #include <sys/types.h>
2266 #if STDC_HEADERS
2267 #include <stdlib.h>
2268 #include <stddef.h>
2269 #endif
2270 EOF
2271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2272   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2273   rm -rf conftest*
2274   ac_cv_type_u_int32_t=yes
2275 else
2276   rm -rf conftest*
2277   ac_cv_type_u_int32_t=no
2278 fi
2279 rm -f conftest*
2280
2281 fi
2282 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2283 if test $ac_cv_type_u_int32_t = no; then
2284   cat >> confdefs.h <<\EOF
2285 #define u_int32_t unsigned int
2286 EOF
2287
2288 fi
2289
2290 elif test "$ac_cv_sizeof_short" = 4 ; then
2291   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
2292 echo "configure:2293: checking for int32_t" >&5
2293 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
2294   echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296   cat > conftest.$ac_ext <<EOF
2297 #line 2298 "configure"
2298 #include "confdefs.h"
2299 #include <sys/types.h>
2300 #if STDC_HEADERS
2301 #include <stdlib.h>
2302 #include <stddef.h>
2303 #endif
2304 EOF
2305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2306   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2307   rm -rf conftest*
2308   ac_cv_type_int32_t=yes
2309 else
2310   rm -rf conftest*
2311   ac_cv_type_int32_t=no
2312 fi
2313 rm -f conftest*
2314
2315 fi
2316 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2317 if test $ac_cv_type_int32_t = no; then
2318   cat >> confdefs.h <<\EOF
2319 #define int32_t short
2320 EOF
2321
2322 fi
2323
2324   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2325 echo "configure:2326: checking for u_int32_t" >&5
2326 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <sys/types.h>
2333 #if STDC_HEADERS
2334 #include <stdlib.h>
2335 #include <stddef.h>
2336 #endif
2337 EOF
2338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2339   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2340   rm -rf conftest*
2341   ac_cv_type_u_int32_t=yes
2342 else
2343   rm -rf conftest*
2344   ac_cv_type_u_int32_t=no
2345 fi
2346 rm -f conftest*
2347
2348 fi
2349 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2350 if test $ac_cv_type_u_int32_t = no; then
2351   cat >> confdefs.h <<\EOF
2352 #define u_int32_t unsigned short
2353 EOF
2354
2355 fi
2356
2357 elif test "$ac_cv_sizeof_long" = 4 ; then
2358   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
2359 echo "configure:2360: checking for int32_t" >&5
2360 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
2361   echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363   cat > conftest.$ac_ext <<EOF
2364 #line 2365 "configure"
2365 #include "confdefs.h"
2366 #include <sys/types.h>
2367 #if STDC_HEADERS
2368 #include <stdlib.h>
2369 #include <stddef.h>
2370 #endif
2371 EOF
2372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2373   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2374   rm -rf conftest*
2375   ac_cv_type_int32_t=yes
2376 else
2377   rm -rf conftest*
2378   ac_cv_type_int32_t=no
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2384 if test $ac_cv_type_int32_t = no; then
2385   cat >> confdefs.h <<\EOF
2386 #define int32_t long
2387 EOF
2388
2389 fi
2390
2391   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2392 echo "configure:2393: checking for u_int32_t" >&5
2393 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2394   echo $ac_n "(cached) $ac_c" 1>&6
2395 else
2396   cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 #include <sys/types.h>
2400 #if STDC_HEADERS
2401 #include <stdlib.h>
2402 #include <stddef.h>
2403 #endif
2404 EOF
2405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2406   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2407   rm -rf conftest*
2408   ac_cv_type_u_int32_t=yes
2409 else
2410   rm -rf conftest*
2411   ac_cv_type_u_int32_t=no
2412 fi
2413 rm -f conftest*
2414
2415 fi
2416 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2417 if test $ac_cv_type_u_int32_t = no; then
2418   cat >> confdefs.h <<\EOF
2419 #define u_int32_t unsigned long
2420 EOF
2421
2422 fi
2423
2424 else
2425   { echo "configure: error: Cannot find a type with size of 32 bits" 1>&2; exit 1; }
2426 fi
2427
2428 echo $ac_n "checking for kqueue""... $ac_c" 1>&6
2429 echo "configure:2430: checking for kqueue" >&5
2430 if eval "test \"`echo '$''{'ac_cv_func_kqueue'+set}'`\" = set"; then
2431   echo $ac_n "(cached) $ac_c" 1>&6
2432 else
2433   cat > conftest.$ac_ext <<EOF
2434 #line 2435 "configure"
2435 #include "confdefs.h"
2436 /* System header to define __stub macros and hopefully few prototypes,
2437     which can conflict with char kqueue(); below.  */
2438 #include <assert.h>
2439 /* Override any gcc2 internal prototype to avoid an error.  */
2440 /* We use char because int might match the return type of a gcc2
2441     builtin and then its argument prototype would still apply.  */
2442 char kqueue();
2443
2444 int main() {
2445
2446 /* The GNU C library defines this for functions which it implements
2447     to always fail with ENOSYS.  Some functions are actually named
2448     something starting with __ and the normal name is an alias.  */
2449 #if defined (__stub_kqueue) || defined (__stub___kqueue)
2450 choke me
2451 #else
2452 kqueue();
2453 #endif
2454
2455 ; return 0; }
2456 EOF
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2458   rm -rf conftest*
2459   eval "ac_cv_func_kqueue=yes"
2460 else
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -rf conftest*
2464   eval "ac_cv_func_kqueue=no"
2465 fi
2466 rm -f conftest*
2467 fi
2468
2469 if eval "test \"`echo '$ac_cv_func_'kqueue`\" = yes"; then
2470   echo "$ac_t""yes" 1>&6
2471   :
2472 else
2473   echo "$ac_t""no" 1>&6
2474 fi
2475
2476
2477 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
2478 echo "configure:2479: checking for restartable system calls" >&5
2479 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
2480   echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482   if test "$cross_compiling" = yes; then
2483     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2487 "configure"
2487 #include "confdefs.h"
2488 /* Exit 0 (true) if wait returns something other than -1,
2489    i.e. the pid of the child, which means that wait was restarted
2490    after getting the signal.  */
2491 #include <sys/types.h>
2492 #include <signal.h>
2493 ucatch (isig) { }
2494 main () {
2495   int i = fork (), status;
2496   if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
2497   signal (SIGINT, ucatch);
2498   status = wait(&i);
2499   if (status == -1) wait(&i);
2500   exit (status == -1);
2501 }
2502
2503 EOF
2504 if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2505 then
2506   ac_cv_sys_restartable_syscalls=yes
2507 else
2508   echo "configure: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   rm -fr conftest*
2511   ac_cv_sys_restartable_syscalls=no
2512 fi
2513 rm -fr conftest*
2514 fi
2515
2516 fi
2517
2518 echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
2519 if test $ac_cv_sys_restartable_syscalls = yes; then
2520   cat >> confdefs.h <<\EOF
2521 #define HAVE_RESTARTABLE_SYSCALLS 1
2522 EOF
2523
2524 fi
2525
2526
2527 echo $ac_n "checking for donuts""... $ac_c" 1>&6
2528 echo "configure:2529: checking for donuts" >&5
2529 echo "$ac_t""yes" 1>&6
2530
2531 for ac_prog in gawk mawk nawk awk
2532 do
2533 # Extract the first word of "$ac_prog", so it can be a program name with args.
2534 set dummy $ac_prog; ac_word=$2
2535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2536 echo "configure:2537: checking for $ac_word" >&5
2537 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2538   echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540   if test -n "$AWK"; then
2541   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2542 else
2543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2544   ac_dummy="$PATH"
2545   for ac_dir in $ac_dummy; do
2546     test -z "$ac_dir" && ac_dir=.
2547     if test -f $ac_dir/$ac_word; then
2548       ac_cv_prog_AWK="$ac_prog"
2549       break
2550     fi
2551   done
2552   IFS="$ac_save_ifs"
2553 fi
2554 fi
2555 AWK="$ac_cv_prog_AWK"
2556 if test -n "$AWK"; then
2557   echo "$ac_t""$AWK" 1>&6
2558 else
2559   echo "$ac_t""no" 1>&6
2560 fi
2561
2562 test -n "$AWK" && break
2563 done
2564
2565 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2566 echo "configure:2567: checking whether ${MAKE-make} sets \${MAKE}" >&5
2567 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2568 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2569   echo $ac_n "(cached) $ac_c" 1>&6
2570 else
2571   cat > conftestmake <<\EOF
2572 all:
2573         @echo 'ac_maketemp="${MAKE}"'
2574 EOF
2575 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2576 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2577 if test -n "$ac_maketemp"; then
2578   eval ac_cv_prog_make_${ac_make}_set=yes
2579 else
2580   eval ac_cv_prog_make_${ac_make}_set=no
2581 fi
2582 rm -f conftestmake
2583 fi
2584 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2585   echo "$ac_t""yes" 1>&6
2586   SET_MAKE=
2587 else
2588   echo "$ac_t""no" 1>&6
2589   SET_MAKE="MAKE=${MAKE-make}"
2590 fi
2591
2592 # Find a good install program.  We prefer a C program (faster),
2593 # so one script is as good as another.  But avoid the broken or
2594 # incompatible versions:
2595 # SysV /etc/install, /usr/sbin/install
2596 # SunOS /usr/etc/install
2597 # IRIX /sbin/install
2598 # AIX /bin/install
2599 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2600 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2601 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2602 # ./install, which can be erroneously created by make from ./install.sh.
2603 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2604 echo "configure:2605: checking for a BSD compatible install" >&5
2605 if test -z "$INSTALL"; then
2606 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2607   echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2610   for ac_dir in $PATH; do
2611     # Account for people who put trailing slashes in PATH elements.
2612     case "$ac_dir/" in
2613     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2614     *)
2615       # OSF1 and SCO ODT 3.0 have their own names for install.
2616       # Don't use installbsd from OSF since it installs stuff as root
2617       # by default.
2618       for ac_prog in ginstall scoinst install; do
2619         if test -f $ac_dir/$ac_prog; then
2620           if test $ac_prog = install &&
2621             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2622             # AIX install.  It has an incompatible calling convention.
2623             :
2624           else
2625             ac_cv_path_install="$ac_dir/$ac_prog -c"
2626             break 2
2627           fi
2628         fi
2629       done
2630       ;;
2631     esac
2632   done
2633   IFS="$ac_save_IFS"
2634
2635 fi
2636   if test "${ac_cv_path_install+set}" = set; then
2637     INSTALL="$ac_cv_path_install"
2638   else
2639     # As a last resort, use the slow shell script.  We don't cache a
2640     # path for INSTALL within a source directory, because that will
2641     # break other packages using the cache if that directory is
2642     # removed, or if the path is relative.
2643     INSTALL="$ac_install_sh"
2644   fi
2645 fi
2646 echo "$ac_t""$INSTALL" 1>&6
2647
2648 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2649 # It thinks the first close brace ends the variable substitution.
2650 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2651
2652 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2653
2654 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2655
2656 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2657 echo "configure:2658: checking whether ln -s works" >&5
2658 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   rm -f conftestdata
2662 if ln -s X conftestdata 2>/dev/null
2663 then
2664   rm -f conftestdata
2665   ac_cv_prog_LN_S="ln -s"
2666 else
2667   ac_cv_prog_LN_S=ln
2668 fi
2669 fi
2670 LN_S="$ac_cv_prog_LN_S"
2671 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2672   echo "$ac_t""yes" 1>&6
2673 else
2674   echo "$ac_t""no" 1>&6
2675 fi
2676
2677 for ac_prog in rm
2678 do
2679 # Extract the first word of "$ac_prog", so it can be a program name with args.
2680 set dummy $ac_prog; ac_word=$2
2681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2682 echo "configure:2683: checking for $ac_word" >&5
2683 if eval "test \"`echo '$''{'ac_cv_path_RMPROG'+set}'`\" = set"; then
2684   echo $ac_n "(cached) $ac_c" 1>&6
2685 else
2686   case "$RMPROG" in
2687   /*)
2688   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a path.
2689   ;;
2690   ?:/*)                  
2691   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a dos path.
2692   ;;
2693   *)
2694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2695   ac_dummy="$PATH"
2696   for ac_dir in $ac_dummy; do 
2697     test -z "$ac_dir" && ac_dir=.
2698     if test -f $ac_dir/$ac_word; then
2699       ac_cv_path_RMPROG="$ac_dir/$ac_word"
2700       break
2701     fi
2702   done
2703   IFS="$ac_save_ifs"
2704   ;;
2705 esac
2706 fi
2707 RMPROG="$ac_cv_path_RMPROG"
2708 if test -n "$RMPROG"; then
2709   echo "$ac_t""$RMPROG" 1>&6
2710 else
2711   echo "$ac_t""no" 1>&6
2712 fi
2713
2714 test -n "$RMPROG" && break
2715 done
2716 test -n "$RMPROG" || RMPROG="/bin/rm"
2717
2718 for ac_prog in sh
2719 do
2720 # Extract the first word of "$ac_prog", so it can be a program name with args.
2721 set dummy $ac_prog; ac_word=$2
2722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2723 echo "configure:2724: checking for $ac_word" >&5
2724 if eval "test \"`echo '$''{'ac_cv_path_SHPROG'+set}'`\" = set"; then
2725   echo $ac_n "(cached) $ac_c" 1>&6
2726 else
2727   case "$SHPROG" in
2728   /*)
2729   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a path.
2730   ;;
2731   ?:/*)                  
2732   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a dos path.
2733   ;;
2734   *)
2735   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2736   ac_dummy="$PATH"
2737   for ac_dir in $ac_dummy; do 
2738     test -z "$ac_dir" && ac_dir=.
2739     if test -f $ac_dir/$ac_word; then
2740       ac_cv_path_SHPROG="$ac_dir/$ac_word"
2741       break
2742     fi
2743   done
2744   IFS="$ac_save_ifs"
2745   ;;
2746 esac
2747 fi
2748 SHPROG="$ac_cv_path_SHPROG"
2749 if test -n "$SHPROG"; then
2750   echo "$ac_t""$SHPROG" 1>&6
2751 else
2752   echo "$ac_t""no" 1>&6
2753 fi
2754
2755 test -n "$SHPROG" && break
2756 done
2757 test -n "$SHPROG" || SHPROG="/bin/sh"
2758
2759
2760 echo $ac_n "checking for posix non-blocking""... $ac_c" 1>&6
2761 echo "configure:2762: checking for posix non-blocking" >&5
2762 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_posix'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   if test "$cross_compiling" = yes; then
2766     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2767 else
2768   cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771 #include <sys/types.h>
2772 #include <sys/socket.h>
2773 #include <fcntl.h>
2774 #include <sys/ioctl.h>
2775 #include <sys/file.h>
2776 #include <signal.h>
2777 $ac_cv_type_signal alarmed() { exit(1); }
2778 int main(void)
2779 {
2780   char b[12];
2781   struct sockaddr x;
2782   size_t l = sizeof(x);
2783   int f = socket(AF_INET, SOCK_DGRAM, 0);
2784   if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK)))
2785   {
2786     signal(SIGALRM, alarmed);
2787     alarm(2);
2788     recvfrom(f, b, 12, 0, &x, &l);
2789     alarm(0);
2790     exit(0);
2791   }
2792   exit(1);
2793 }
2794 EOF
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2796 then
2797   unet_cv_sys_nonblocking_posix=yes
2798 else
2799   echo "configure: failed program was:" >&5
2800   cat conftest.$ac_ext >&5
2801   rm -fr conftest*
2802   unet_cv_sys_nonblocking_posix=no
2803 fi
2804 rm -fr conftest*
2805 fi
2806
2807 fi
2808
2809 echo "$ac_t""$unet_cv_sys_nonblocking_posix" 1>&6
2810 if test $unet_cv_sys_nonblocking_posix = yes; then
2811   cat >> confdefs.h <<\EOF
2812 #define NBLOCK_POSIX 1
2813 EOF
2814
2815 else
2816 echo $ac_n "checking for bsd non-blocking""... $ac_c" 1>&6
2817 echo "configure:2818: checking for bsd non-blocking" >&5
2818 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_bsd'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   if test "$cross_compiling" = yes; then
2822     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2823 else
2824   cat > conftest.$ac_ext <<EOF
2825 #line 2826 "configure"
2826 #include "confdefs.h"
2827 #include <sys/types.h>
2828 #include <sys/socket.h>
2829 #include <fcntl.h>
2830 #include <sys/ioctl.h>
2831 #include <sys/file.h>
2832 #include <signal.h>
2833 $ac_cv_type_signal alarmed() { exit(1); }
2834 int main(void)
2835 {
2836   char b[12];
2837   struct sockaddr x;
2838   size_t l = sizeof(x);
2839   int f = socket(AF_INET, SOCK_DGRAM, 0);
2840   if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY)))
2841   {
2842     signal(SIGALRM, alarmed);
2843     alarm(2);
2844     recvfrom(f, b, 12, 0, &x, &l);
2845     alarm(0);
2846     exit(0);
2847   }
2848   exit(1);
2849 }
2850 EOF
2851 if { (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2852 then
2853   unet_cv_sys_nonblocking_bsd=yes
2854 else
2855   echo "configure: failed program was:" >&5
2856   cat conftest.$ac_ext >&5
2857   rm -fr conftest*
2858   unet_cv_sys_nonblocking_bsd=no
2859 fi
2860 rm -fr conftest*
2861 fi
2862
2863 fi
2864
2865 echo "$ac_t""$unet_cv_sys_nonblocking_bsd" 1>&6
2866 if test $unet_cv_sys_nonblocking_bsd = yes; then
2867   cat >> confdefs.h <<\EOF
2868 #define NBLOCK_BSD 1
2869 EOF
2870
2871 else
2872   cat >> confdefs.h <<\EOF
2873 #define NBLOCK_SYSV 1
2874 EOF
2875
2876 fi
2877 fi
2878 echo $ac_n "checking for posix signals""... $ac_c" 1>&6
2879 echo "configure:2880: checking for posix signals" >&5
2880 if eval "test \"`echo '$''{'unet_cv_sys_signal_posix'+set}'`\" = set"; then
2881   echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883   cat > conftest.$ac_ext <<EOF
2884 #line 2885 "configure"
2885 #include "confdefs.h"
2886 #include <signal.h>
2887 int main() {
2888 sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)
2889 ; return 0; }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2892   rm -rf conftest*
2893   unet_cv_sys_signal_posix=yes
2894 else
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -rf conftest*
2898   unet_cv_sys_signal_posix=no
2899 fi
2900 rm -f conftest*
2901 fi
2902
2903 echo "$ac_t""$unet_cv_sys_signal_posix" 1>&6
2904 if test $unet_cv_sys_signal_posix = yes; then
2905   cat >> confdefs.h <<\EOF
2906 #define POSIX_SIGNALS 1
2907 EOF
2908
2909 else
2910 echo $ac_n "checking for bsd reliable signals""... $ac_c" 1>&6
2911 echo "configure:2912: checking for bsd reliable signals" >&5
2912 if eval "test \"`echo '$''{'unet_cv_sys_signal_bsd'+set}'`\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   if test "$cross_compiling" = yes; then
2916     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2917 else
2918   cat > conftest.$ac_ext <<EOF
2919 #line 2920 "configure"
2920 #include "confdefs.h"
2921 #include <signal.h>
2922 int calls = 0;
2923 $ac_cv_type_signal handler()
2924 {
2925   if (calls) return;
2926   calls++;
2927   kill(getpid(), SIGTERM);
2928   sleep(1);
2929 }
2930 int main(void)
2931 {
2932   signal(SIGTERM, handler);
2933   kill(getpid(), SIGTERM);
2934   exit (0);
2935 }
2936 EOF
2937 if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2938 then
2939   unet_cv_sys_signal_bsd=yes
2940 else
2941   echo "configure: failed program was:" >&5
2942   cat conftest.$ac_ext >&5
2943   rm -fr conftest*
2944   unet_cv_sys_signal_bsd=no
2945 fi
2946 rm -fr conftest*
2947 fi
2948
2949 fi
2950
2951 echo "$ac_t""$unet_cv_sys_signal_bsd" 1>&6
2952 if test $unet_cv_sys_signal_bsd = yes; then
2953   cat >> confdefs.h <<\EOF
2954 #define BSD_RELIABLE_SIGNALS 1
2955 EOF
2956
2957 else
2958   cat >> confdefs.h <<\EOF
2959 #define SYSV_UNRELIABLE_SIGNALS 1
2960 EOF
2961
2962 fi
2963 fi
2964
2965 echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
2966 echo "configure:2967: checking if the compiler understands -pipe" >&5
2967 unet_cv_pipe_flags="$ac_cv_prog_gcc"
2968 if test "$ac_cv_prog_gcc" = no; then
2969   OLDCFLAGS="$CFLAGS"
2970   CFLAGS="$CFLAGS -pipe"
2971   cat > conftest.$ac_ext <<EOF
2972 #line 2973 "configure"
2973 #include "confdefs.h"
2974
2975 int main() {
2976
2977 ; return 0; }
2978 EOF
2979 if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2980   rm -rf conftest*
2981   unet_cv_pipe_flags=yes
2982 else
2983   echo "configure: failed program was:" >&5
2984   cat conftest.$ac_ext >&5
2985 fi
2986 rm -f conftest*
2987   CFLAGS="$OLDCFLAGS"
2988 fi
2989 echo "$ac_t""$unet_cv_pipe_flags" 1>&6
2990 if test "$unet_cv_pipe_flags" = yes ; then
2991   x=`echo $CFLAGS | grep 'pipe' 2>/dev/null`
2992   if test "$x" = "" ; then
2993     CFLAGS="$CFLAGS -pipe"
2994   fi
2995 fi
2996
2997
2998 echo $ac_n "checking for OS-dependent information""... $ac_c" 1>&6
2999 echo "configure:3000: checking for OS-dependent information" >&5
3000 case "$host" in
3001     *-linux*)
3002         echo "$ac_t""Linux ($host) found." 1>&6
3003         unet_poll_syscall=yes
3004         OSDEP_C=os_linux.c
3005         ;;
3006
3007     *-solaris*)
3008         echo "$ac_t""Solaris ($host) found." 1>&6
3009         if test x"$ac_cv_header_poll_h" = xyes; then
3010             unet_poll_syscall=yes
3011         else
3012             unet_poll_syscall=no
3013         fi
3014         OSDEP_C=os_solaris.c
3015         ;;
3016
3017     *-sunos*)
3018         echo "$ac_t""Solaris ($host) found." 1>&6
3019         unet_poll_syscall=no
3020         OSDEP_C=os_solaris.c
3021         ;;
3022
3023     *-openbsd*)
3024         echo "$ac_t""OpenBSD ($host) found." 1>&6
3025         if test x"$ac_cv_header_poll_h" = xyes; then
3026             unet_poll_syscall=yes
3027         else
3028             unet_poll_syscall=no
3029         fi
3030         OSDEP_C=os_openbsd.c
3031         ;;
3032
3033     *-*bsd*)
3034         echo "$ac_t""Generic BSD ($host) found." 1>&6
3035         if test x"$ac_cv_header_poll_h" = xyes; then
3036             unet_poll_syscall=yes
3037         else
3038             unet_poll_syscall=no
3039         fi
3040         OSDEP_C=os_bsd.c
3041         ;;
3042
3043     *)
3044         echo "$ac_t""Unknown system type $host found." 1>&6
3045         echo "configure: warning: Unknown OS type; using generic routines." 1>&2
3046         unet_poll_syscall=no
3047         OSDEP_C=os_generic.c
3048         ;;
3049 esac
3050
3051
3052 echo $ac_n "checking whether to enable use of poll()""... $ac_c" 1>&6
3053 echo "configure:3054: checking whether to enable use of poll()" >&5
3054 # Check whether --enable-poll or --disable-poll was given.
3055 if test "${enable_poll+set}" = set; then
3056   enableval="$enable_poll"
3057   unet_cv_enable_poll=$enable_poll
3058 else
3059   if eval "test \"`echo '$''{'unet_cv_enable_poll'+set}'`\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   unet_cv_enable_poll=$unet_poll_syscall
3063 fi
3064
3065 fi
3066
3067
3068 # Force poll to be disabled if there is no poll.h
3069 if test x"$ac_cv_header_poll_h" != xyes; then
3070     unet_cv_enable_poll=no
3071 fi
3072
3073 echo "$ac_t""$unet_cv_enable_poll" 1>&6
3074
3075 if test x"$unet_cv_enable_poll" = xyes; then
3076     cat >> confdefs.h <<\EOF
3077 #define USE_POLL 
3078 EOF
3079
3080     ENGINE_C=engine_poll.c
3081 else
3082     ENGINE_C=engine_select.c
3083 fi
3084
3085
3086 echo $ac_n "checking whether to enable debug mode""... $ac_c" 1>&6
3087 echo "configure:3088: checking whether to enable debug mode" >&5
3088 # Check whether --enable-debug or --disable-debug was given.
3089 if test "${enable_debug+set}" = set; then
3090   enableval="$enable_debug"
3091   unet_cv_enable_debug=$enable_debug
3092 else
3093   if eval "test \"`echo '$''{'unet_cv_enable_debug'+set}'`\" = set"; then
3094   echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096   unet_cv_enable_debug=no
3097 fi
3098
3099 fi
3100
3101 echo "$ac_t""$unet_cv_enable_debug" 1>&6
3102
3103 if test x"$unet_cv_enable_debug" = xyes; then
3104     cat >> confdefs.h <<\EOF
3105 #define DEBUGMODE 
3106 EOF
3107
3108 fi
3109
3110 echo $ac_n "checking whether to enable asserts""... $ac_c" 1>&6
3111 echo "configure:3112: checking whether to enable asserts" >&5
3112 # Check whether --enable-asserts or --disable-asserts was given.
3113 if test "${enable_asserts+set}" = set; then
3114   enableval="$enable_asserts"
3115   unet_cv_enable_asserts=$enable_asserts
3116 else
3117   if eval "test \"`echo '$''{'unet_cv_enable_asserts'+set}'`\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   unet_cv_enable_asserts=no
3121 fi
3122
3123 fi
3124
3125 echo "$ac_t""$unet_cv_enable_asserts" 1>&6
3126
3127 if test x"$unet_cv_enable_asserts" = xno; then
3128     cat >> confdefs.h <<\EOF
3129 #define NDEBUG 
3130 EOF
3131
3132 fi
3133
3134 echo $ac_n "checking whether to enable debugging symbols""... $ac_c" 1>&6
3135 echo "configure:3136: checking whether to enable debugging symbols" >&5
3136 # Check whether --enable-symbols or --disable-symbols was given.
3137 if test "${enable_symbols+set}" = set; then
3138   enableval="$enable_symbols"
3139   unet_cv_enable_symbols=$enable_symbols
3140 else
3141   if eval "test \"`echo '$''{'unet_cv_enable_symbols'+set}'`\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   unet_cv_enable_symbols=yes
3145 fi
3146
3147 fi
3148
3149 echo "$ac_t""$unet_cv_enable_symbols" 1>&6
3150
3151 if test x"$unet_cv_enable_symbols" = xyes; then
3152     CFLAGS="-g $CFLAGS"
3153 fi
3154
3155 echo $ac_n "checking whether to enable profiling support (gprof)""... $ac_c" 1>&6
3156 echo "configure:3157: checking whether to enable profiling support (gprof)" >&5
3157 # Check whether --enable-profile or --disable-profile was given.
3158 if test "${enable_profile+set}" = set; then
3159   enableval="$enable_profile"
3160   unet_cv_enable_profile=$enable_profile
3161 else
3162   if eval "test \"`echo '$''{'unet_cv_enable_profile'+set}'`\" = set"; then
3163   echo $ac_n "(cached) $ac_c" 1>&6
3164 else
3165   unet_cv_enable_profile=no
3166 fi
3167
3168 fi
3169
3170 echo "$ac_t""$unet_cv_enable_profile" 1>&6
3171
3172 if test x"$unet_cv_enable_profile" = xyes; then
3173     CFLAGS="-pg $CFLAGS"
3174 fi
3175
3176 echo $ac_n "checking whether to enable pedantic compiler warnings""... $ac_c" 1>&6
3177 echo "configure:3178: checking whether to enable pedantic compiler warnings" >&5
3178 # Check whether --enable-pedantic or --disable-pedantic was given.
3179 if test "${enable_pedantic+set}" = set; then
3180   enableval="$enable_pedantic"
3181   unet_cv_enable_pedantic=$enable_pedantic
3182 else
3183   if eval "test \"`echo '$''{'unet_cv_enable_pedantic'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   unet_cv_enable_pedantic=no
3187 fi
3188
3189 fi
3190
3191 echo "$ac_t""$unet_cv_enable_pedantic" 1>&6
3192
3193 if test x"$unet_cv_enable_pedantic" = xyes; then
3194     CFLAGS="-pedantic $CFLAGS"
3195 fi
3196
3197 echo $ac_n "checking whether to enable compiler warnings""... $ac_c" 1>&6
3198 echo "configure:3199: checking whether to enable compiler warnings" >&5
3199 # Check whether --enable-warnings or --disable-warnings was given.
3200 if test "${enable_warnings+set}" = set; then
3201   enableval="$enable_warnings"
3202   unet_cv_enable_warnings=$enable_warnings
3203 else
3204   if eval "test \"`echo '$''{'unet_cv_enable_warnings'+set}'`\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   unet_cv_enable_warnings=no
3208 fi
3209
3210 fi
3211
3212 echo "$ac_t""$unet_cv_enable_warnings" 1>&6
3213
3214 if test x"$unet_cv_enable_warnings" = xyes; then
3215     CFLAGS="-Wall $CFLAGS"
3216 fi
3217
3218 echo $ac_n "checking whether to enable inlining for a few critical functions""... $ac_c" 1>&6
3219 echo "configure:3220: checking whether to enable inlining for a few critical functions" >&5
3220 # Check whether --enable-inlines or --disable-inlines was given.
3221 if test "${enable_inlines+set}" = set; then
3222   enableval="$enable_inlines"
3223   unet_cv_enable_inlines=$enable_inlines
3224 else
3225   if eval "test \"`echo '$''{'unet_cv_enable_inlines'+set}'`\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   unet_cv_enable_inlines=yes
3229 fi
3230
3231 fi
3232
3233 echo "$ac_t""$unet_cv_enable_inlines" 1>&6
3234
3235 if test x"$unet_cv_enable_inlines" = xyes; then
3236     cat >> confdefs.h <<\EOF
3237 #define FORCEINLINE 
3238 EOF
3239
3240 fi
3241
3242 echo $ac_n "checking whether to enable the /dev/poll event engine""... $ac_c" 1>&6
3243 echo "configure:3244: checking whether to enable the /dev/poll event engine" >&5
3244 # Check whether --enable-devpoll or --disable-devpoll was given.
3245 if test "${enable_devpoll+set}" = set; then
3246   enableval="$enable_devpoll"
3247   unet_cv_enable_devpoll=$enable_devpoll
3248 else
3249   if eval "test \"`echo '$''{'unet_cv_enable_devpoll'+set}'`\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   unet_cv_enable_devpoll=no
3253 fi
3254
3255 fi
3256
3257
3258 if test x"$ac_cv_header_sys_devpoll_h" = xno; then
3259     unet_cv_enable_devpoll=no
3260 fi
3261
3262 echo "$ac_t""$unet_cv_enable_devpoll" 1>&6
3263
3264 if test x"$unet_cv_enable_devpoll" != xno; then
3265     cat >> confdefs.h <<\EOF
3266 #define USE_DEVPOLL 
3267 EOF
3268
3269     ENGINE_C="engine_devpoll.c $ENGINE_C"
3270 fi
3271
3272 echo $ac_n "checking whether to enable the kqueue event engine""... $ac_c" 1>&6
3273 echo "configure:3274: checking whether to enable the kqueue event engine" >&5
3274 # Check whether --enable-kqueue or --disable-kqueue was given.
3275 if test "${enable_kqueue+set}" = set; then
3276   enableval="$enable_kqueue"
3277   unet_cv_enable_kqueue=$enable_kqueue
3278 else
3279   if eval "test \"`echo '$''{'unet_cv_enable_kqueue'+set}'`\" = set"; then
3280   echo $ac_n "(cached) $ac_c" 1>&6
3281 else
3282   unet_cv_enable_kqueue=no
3283 fi
3284
3285 fi
3286
3287
3288 if test x"$ac_cv_header_sys_event_h" = xno -o x"$ac_cv_func_kqueue" = xno; then
3289     unet_cv_enable_kqueue=no
3290 fi
3291
3292 echo "$ac_t""$unet_cv_enable_kqueue" 1>&6
3293
3294 if test x"$unet_cv_enable_kqueue" != xno; then
3295     cat >> confdefs.h <<\EOF
3296 #define USE_KQUEUE 
3297 EOF
3298
3299     ENGINE_C="engine_kqueue.c $ENGINE_C"
3300 fi
3301
3302 echo $ac_n "checking what name to give the symlink""... $ac_c" 1>&6
3303 echo "configure:3304: checking what name to give the symlink" >&5
3304 # Check whether --with-symlink or --without-symlink was given.
3305 if test "${with_symlink+set}" = set; then
3306   withval="$with_symlink"
3307   unet_cv_with_symlink=$with_symlink
3308 else
3309   if eval "test \"`echo '$''{'unet_cv_with_symlink'+set}'`\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   unet_cv_with_symlink="ircd"
3313 fi
3314
3315 fi
3316
3317
3318 if test x"$unet_cv_with_symlink" = xyes; then
3319     unet_cv_with_symlink="ircd"
3320 fi
3321
3322 echo "$ac_t""$unet_cv_with_symlink" 1>&6
3323
3324 if test x"$unet_cv_with_symlink" = xno; then
3325     INSTALL_RULE=install-no-symlink
3326     SYMLINK=
3327 else
3328     INSTALL_RULE=install-with-symlink
3329     SYMLINK=$unet_cv_with_symlink
3330 fi
3331
3332
3333
3334 echo $ac_n "checking what permissions to set on the installed binary""... $ac_c" 1>&6
3335 echo "configure:3336: checking what permissions to set on the installed binary" >&5
3336 # Check whether --with-mode or --without-mode was given.
3337 if test "${with_mode+set}" = set; then
3338   withval="$with_mode"
3339   unet_cv_with_mode=$with_mode
3340 else
3341   if eval "test \"`echo '$''{'unet_cv_with_mode'+set}'`\" = set"; then
3342   echo $ac_n "(cached) $ac_c" 1>&6
3343 else
3344   unet_cv_with_mode=711
3345 fi
3346
3347 fi
3348
3349
3350 if test x"$unet_cv_with_mode" = xyes -o x"$unet_cv_with_mode" = xno; then
3351     unet_cv_with_mode=711
3352 fi
3353
3354 echo "$ac_t""$unet_cv_with_mode" 1>&6
3355
3356 IRCDMODE=$unet_cv_with_mode
3357
3358
3359 unet_uid=`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`
3360 echo $ac_n "checking which user should own the installed binary""... $ac_c" 1>&6
3361 echo "configure:3362: checking which user should own the installed binary" >&5
3362 # Check whether --with-owner or --without-owner was given.
3363 if test "${with_owner+set}" = set; then
3364   withval="$with_owner"
3365   unet_cv_with_owner=$with_owner
3366 else
3367   if eval "test \"`echo '$''{'unet_cv_with_owner'+set}'`\" = set"; then
3368   echo $ac_n "(cached) $ac_c" 1>&6
3369 else
3370   unet_cv_with_owner=$unet_uid
3371 fi
3372
3373 fi
3374
3375
3376 if test x"$unet_cv_with_owner" = xyes -o x"$unet_cv_with_owner" = xno; then
3377     unet_cv_with_owner=$unet_uid
3378 fi
3379
3380 echo "$ac_t""$unet_cv_with_owner" 1>&6
3381
3382 IRCDOWN=$unet_cv_with_owner
3383
3384
3385 unet_gid=`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`
3386 echo $ac_n "checking which group should own the installed binary""... $ac_c" 1>&6
3387 echo "configure:3388: checking which group should own the installed binary" >&5
3388 # Check whether --with-group or --without-group was given.
3389 if test "${with_group+set}" = set; then
3390   withval="$with_group"
3391   unet_cv_with_group=$with_group
3392 else
3393   if eval "test \"`echo '$''{'unet_cv_with_group'+set}'`\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396   unet_cv_with_group=$unet_gid
3397 fi
3398
3399 fi
3400
3401
3402 if test x"$unet_cv_with_group" = xyes -o x"$unet_cv_with_group" = xno; then
3403     unet_cv_with_group=$unet_gid
3404 fi
3405
3406 echo "$ac_t""$unet_cv_with_group" 1>&6
3407
3408 IRCDGRP=$unet_cv_with_group
3409
3410
3411 unet_domain=
3412 if test -f /etc/resolv.conf; then
3413     unet_domain=`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`
3414     if test x"$unet_domain" = x; then
3415         unet_domain=`awk '/^search/ { print $2; exit }' /etc/resolv.conf`
3416     fi
3417 fi
3418 echo $ac_n "checking for site domain name""... $ac_c" 1>&6
3419 echo "configure:3420: checking for site domain name" >&5
3420 # Check whether --with-domain or --without-domain was given.
3421 if test "${with_domain+set}" = set; then
3422   withval="$with_domain"
3423   unet_cv_with_domain=$with_domain
3424 else
3425   if eval "test \"`echo '$''{'unet_cv_with_domain'+set}'`\" = set"; then
3426   echo $ac_n "(cached) $ac_c" 1>&6
3427 else
3428   unet_cv_with_domain=$unet_domain
3429 fi
3430
3431 fi
3432
3433
3434 if test x"$unet_cv_with_domain" = xyes -o x"$unet_cv_with_domain" = xno; then
3435     unet_cv_with_domain=$unet_domain
3436 fi
3437 if test x"$unet_cv_with_domain" = xno; then
3438     { echo "configure: error: Unable to determine server DNS domain; use --with-domain to set it" 1>&2; exit 1; }
3439 fi
3440
3441 echo "$ac_t""$unet_cv_with_domain" 1>&6
3442
3443 cat >> confdefs.h <<EOF
3444 #define DOMAINNAME "*$unet_cv_with_domain"
3445 EOF
3446
3447
3448 echo $ac_n "checking if chroot operation is desired""... $ac_c" 1>&6
3449 echo "configure:3450: checking if chroot operation is desired" >&5
3450 # Check whether --with-chroot or --without-chroot was given.
3451 if test "${with_chroot+set}" = set; then
3452   withval="$with_chroot"
3453   unet_cv_with_chroot=$with_chroot
3454 else
3455   if eval "test \"`echo '$''{'unet_cv_with_chroot'+set}'`\" = set"; then
3456   echo $ac_n "(cached) $ac_c" 1>&6
3457 else
3458   unet_cv_with_chroot=no
3459 fi
3460
3461 fi
3462
3463
3464 if test x"$unet_cv_with_chroot" = xyes; then
3465     { echo "configure: error: --with-chroot given with no directory.  See doc/readme.chroot." 1>&2; exit 1; }
3466 fi
3467
3468 # Ensure there are no trailing /'s to mess us up
3469 unet_cv_with_chroot=`echo "$unet_cv_with_chroot" | sed 's%/*$%%'`
3470
3471 echo "$ac_t""$unet_cv_with_chroot" 1>&6
3472
3473 # Deal with the annoying value "NONE" here
3474 unet_save_prefix=$prefix
3475 if test x"$prefix" = xNONE; then
3476     prefix=$ac_default_prefix
3477 else
3478     prefix=$prefix
3479 fi
3480
3481 unet_save_exec_prefix=$exec_prefix
3482 if test x"$exec_prefix" = xNONE; then
3483     exec_prefix=$prefix
3484 else
3485     exec_prefix=$exec_prefix
3486 fi
3487
3488 # Obtain the actual interesting directories
3489 unet_bindir=`eval echo "$bindir"`
3490 unet_libdir=`eval echo "$libdir"`
3491
3492 # Restore the original settings of $prefix and $exec_prefix
3493 prefix=$unet_save_prefix
3494 exec_prefix=$unet_save_exec_prefix
3495
3496 echo $ac_n "checking where the binary will be for /restart""... $ac_c" 1>&6
3497 echo "configure:3498: checking where the binary will be for /restart" >&5
3498 if test x"$unet_cv_with_symlink" = xno; then
3499     unet_spath="$unet_bindir/ircd"
3500 else
3501     unet_spath="$unet_bindir/$unet_cv_with_symlink"
3502 fi
3503 echo "$ac_t""$unet_spath" 1>&6
3504
3505 if test x"$unet_cv_with_chroot" != xno; then
3506     if echo "$unet_spath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then
3507         unet_spath=`echo "$unet_spath" | sed "s%^$unet_cv_with_chroot%%"`
3508     else
3509         echo "configure: warning: Binary $unet_spath not relative to root directory $unet_cv_with_chroot; restarts will probably fail" 1>&2
3510     fi
3511 fi
3512
3513 cat >> confdefs.h <<EOF
3514 #define SPATH "$unet_spath"
3515 EOF
3516
3517
3518 echo $ac_n "checking what the data directory should be""... $ac_c" 1>&6
3519 echo "configure:3520: checking what the data directory should be" >&5
3520 # Check whether --with-dpath or --without-dpath was given.
3521 if test "${with_dpath+set}" = set; then
3522   withval="$with_dpath"
3523   unet_cv_with_dpath=$with_dpath
3524 else
3525   if eval "test \"`echo '$''{'unet_cv_with_dpath'+set}'`\" = set"; then
3526   echo $ac_n "(cached) $ac_c" 1>&6
3527 else
3528   unet_cv_with_dpath=$unet_libdir
3529 fi
3530
3531 fi
3532
3533
3534 if test x"$unet_cv_with_dpath" = xyes -o x"$unet_cv_with_dpath" = xno; then
3535     unet_cv_with_dpath=$unet_libdir
3536 fi
3537
3538 # Ensure there are no trailing /'s to mess us up
3539 unet_cv_with_dpath=`echo "$unet_cv_with_dpath" | sed 's%/*$%%'`
3540
3541 echo "$ac_t""$unet_cv_with_dpath" 1>&6
3542
3543 if test x"$unet_cv_with_chroot" != xno; then
3544     if echo "$unet_cv_with_dpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then
3545         unet_dpath=`echo "$unet_cv_with_dpath" | sed "s%^$unet_cv_with_chroot%%"`
3546     else
3547         { echo "configure: error: Data directory $unet_cv_with_dpath not relative to root directory $unet_cv_with_chroot" 1>&2; exit 1; }
3548     fi
3549 else
3550     unet_dpath=$unet_cv_with_dpath
3551 fi
3552
3553 cat >> confdefs.h <<EOF
3554 #define DPATH "$unet_dpath"
3555 EOF
3556
3557
3558 DPATH=$unet_cv_with_dpath
3559
3560
3561 echo $ac_n "checking where the default configuration file resides""... $ac_c" 1>&6
3562 echo "configure:3563: checking where the default configuration file resides" >&5
3563 # Check whether --with-cpath or --without-cpath was given.
3564 if test "${with_cpath+set}" = set; then
3565   withval="$with_cpath"
3566   unet_cv_with_cpath=$with_cpath
3567 else
3568   if eval "test \"`echo '$''{'unet_cv_with_cpath'+set}'`\" = set"; then
3569   echo $ac_n "(cached) $ac_c" 1>&6
3570 else
3571   unet_cv_with_cpath="ircd.conf"
3572 fi
3573
3574 fi
3575
3576
3577 if test x"$unet_cv_with_cpath" = xyes -o x"$unet_cv_with_cpath" = xno; then
3578     unet_cv_with_cpath="ircd.conf"
3579 fi
3580
3581 echo "$ac_t""$unet_cv_with_cpath" 1>&6
3582
3583 if echo "$unet_cv_with_cpath" | grep '^/' > /dev/null 2>&1; then
3584     # Absolute path; check against chroot stuff
3585     if test x"$unet_cv_with_chroot" != xno; then
3586         if echo "$unet_cv_with_cpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then
3587             unet_cpath=`echo "$unet_cv_with_cpath" | sed "s%^$unet_cv_with_chroot%%"`
3588         else
3589             { echo "configure: error: Configuration file $unet_cv_with_cpath not relative to root directory $unet_cv_with_chroot" 1>&2; exit 1; }
3590         fi
3591     else
3592         unet_cpath=$unet_cv_with_cpath
3593     fi
3594 else
3595     unet_cpath=$unet_cv_with_cpath
3596 fi
3597
3598 cat >> confdefs.h <<EOF
3599 #define CPATH "$unet_cpath"
3600 EOF
3601
3602
3603 echo $ac_n "checking where to put the debugging log if debugging enabled""... $ac_c" 1>&6
3604 echo "configure:3605: checking where to put the debugging log if debugging enabled" >&5
3605 # Check whether --with-lpath or --without-lpath was given.
3606 if test "${with_lpath+set}" = set; then
3607   withval="$with_lpath"
3608   unet_cv_with_lpath=$with_lpath
3609 else
3610   if eval "test \"`echo '$''{'unet_cv_with_lpath'+set}'`\" = set"; then
3611   echo $ac_n "(cached) $ac_c" 1>&6
3612 else
3613   unet_cv_with_lpath="ircd.log"
3614 fi
3615
3616 fi
3617
3618
3619 if test x"$unet_cv_with_lpath" = xyes -o x"$unet_cv_with_lpath" = xno; then
3620     unet_cv_with_lpath="ircd.log"
3621 fi
3622
3623 echo "$ac_t""$unet_cv_with_lpath" 1>&6
3624
3625 if echo "$unet_cv_with_lpath" | grep '^/' > /dev/null 2>&1; then
3626     # Absolute path; check against chroot stuff
3627     if test x"$unet_cv_with_chroot" != xno; then
3628         if echo "$unet_cv_with_lpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then
3629             unet_lpath=`echo "$unet_cv_with_lpath" | sed "s%^$unet_cv_with_chroot%%"`
3630         else
3631             echo "configure: warning: Log file $unet_cv_with_lpath not relative to root directory $unet_cv_with_chroot; using default ircd.log instead" 1>&2
3632             unet_cv_with_lpath="ircd.log"
3633             unet_lpath="ircd.log"
3634         fi
3635     else
3636         unet_lpath=$unet_cv_with_lpath
3637     fi
3638 else
3639     unet_lpath=$unet_cv_with_lpath
3640 fi
3641
3642 cat >> confdefs.h <<EOF
3643 #define LPATH "$unet_lpath"
3644 EOF
3645
3646
3647 unet_maxcon=`ulimit -Hn`
3648 unet_maxcon=`expr $unet_maxcon - 4`
3649 echo $ac_n "checking max connections""... $ac_c" 1>&6
3650 echo "configure:3651: checking max connections" >&5
3651 # Check whether --with-maxcon or --without-maxcon was given.
3652 if test "${with_maxcon+set}" = set; then
3653   withval="$with_maxcon"
3654   unet_cv_with_maxcon=$with_maxcon
3655 else
3656   if eval "test \"`echo '$''{'unet_cv_with_maxcon'+set}'`\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   unet_cv_with_maxcon=$unet_maxcon
3660 fi
3661
3662 fi
3663
3664
3665 if test x"$unet_cv_with_maxcon" = xyes -o x"$unet_cv_with_maxcon" = xno; then
3666     unet_cv_with_maxcon=$unet_maxcon
3667 fi
3668
3669 echo "$ac_t""$unet_cv_with_maxcon" 1>&6
3670
3671 cat >> confdefs.h <<EOF
3672 #define MAXCONNECTIONS $unet_cv_with_maxcon
3673 EOF
3674
3675
3676 trap '' 1 2 15
3677 cat > confcache <<\EOF
3678 # This file is a shell script that caches the results of configure
3679 # tests run on this system so they can be shared between configure
3680 # scripts and configure runs.  It is not useful on other systems.
3681 # If it contains results you don't want to keep, you may remove or edit it.
3682 #
3683 # By default, configure uses ./config.cache as the cache file,
3684 # creating it if it does not exist already.  You can give configure
3685 # the --cache-file=FILE option to use a different cache file; that is
3686 # what configure does when it calls configure scripts in
3687 # subdirectories, so they share the cache.
3688 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3689 # config.status only pays attention to the cache file if you give it the
3690 # --recheck option to rerun configure.
3691 #
3692 EOF
3693 # The following way of writing the cache mishandles newlines in values,
3694 # but we know of no workaround that is simple, portable, and efficient.
3695 # So, don't put newlines in cache variables' values.
3696 # Ultrix sh set writes to stderr and can't be redirected directly,
3697 # and sets the high bit in the cache file unless we assign to the vars.
3698 (set) 2>&1 |
3699   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3700   *ac_space=\ *)
3701     # `set' does not quote correctly, so add quotes (double-quote substitution
3702     # turns \\\\ into \\, and sed turns \\ into \).
3703     sed -n \
3704       -e "s/'/'\\\\''/g" \
3705       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3706     ;;
3707   *)
3708     # `set' quotes correctly as required by POSIX, so do not add quotes.
3709     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3710     ;;
3711   esac >> confcache
3712 if cmp -s $cache_file confcache; then
3713   :
3714 else
3715   if test -w $cache_file; then
3716     echo "updating cache $cache_file"
3717     cat confcache > $cache_file
3718   else
3719     echo "not updating unwritable cache $cache_file"
3720   fi
3721 fi
3722 rm -f confcache
3723
3724 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3725
3726 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3727 # Let make expand exec_prefix.
3728 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3729
3730 # Any assignment to VPATH causes Sun make to only execute
3731 # the first set of double-colon rules, so remove it if not needed.
3732 # If there is a colon in the path, we need to keep it.
3733 if test "x$srcdir" = x.; then
3734   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3735 fi
3736
3737 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3738
3739 DEFS=-DHAVE_CONFIG_H
3740
3741 # Without the "./", some shells look in PATH for config.status.
3742 : ${CONFIG_STATUS=./config.status}
3743
3744 echo creating $CONFIG_STATUS
3745 rm -f $CONFIG_STATUS
3746 cat > $CONFIG_STATUS <<EOF
3747 #! /bin/sh
3748 # Generated automatically by configure.
3749 # Run this file to recreate the current configuration.
3750 # This directory was configured as follows,
3751 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3752 #
3753 # $0 $ac_configure_args
3754 #
3755 # Compiler output produced by configure, useful for debugging
3756 # configure, is in ./config.log if it exists.
3757
3758 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3759 for ac_option
3760 do
3761   case "\$ac_option" in
3762   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3763     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3764     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3765   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3766     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3767     exit 0 ;;
3768   -help | --help | --hel | --he | --h)
3769     echo "\$ac_cs_usage"; exit 0 ;;
3770   *) echo "\$ac_cs_usage"; exit 1 ;;
3771   esac
3772 done
3773
3774 ac_given_srcdir=$srcdir
3775 ac_given_INSTALL="$INSTALL"
3776
3777 trap 'rm -fr `echo "Makefile ircd/Makefile doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3778 EOF
3779 cat >> $CONFIG_STATUS <<EOF
3780
3781 # Protect against being on the right side of a sed subst in config.status.
3782 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3783  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3784 $ac_vpsub
3785 $extrasub
3786 s%@SHELL@%$SHELL%g
3787 s%@CFLAGS@%$CFLAGS%g
3788 s%@CPPFLAGS@%$CPPFLAGS%g
3789 s%@CXXFLAGS@%$CXXFLAGS%g
3790 s%@FFLAGS@%$FFLAGS%g
3791 s%@DEFS@%$DEFS%g
3792 s%@LDFLAGS@%$LDFLAGS%g
3793 s%@LIBS@%$LIBS%g
3794 s%@exec_prefix@%$exec_prefix%g
3795 s%@prefix@%$prefix%g
3796 s%@program_transform_name@%$program_transform_name%g
3797 s%@bindir@%$bindir%g
3798 s%@sbindir@%$sbindir%g
3799 s%@libexecdir@%$libexecdir%g
3800 s%@datadir@%$datadir%g
3801 s%@sysconfdir@%$sysconfdir%g
3802 s%@sharedstatedir@%$sharedstatedir%g
3803 s%@localstatedir@%$localstatedir%g
3804 s%@libdir@%$libdir%g
3805 s%@includedir@%$includedir%g
3806 s%@oldincludedir@%$oldincludedir%g
3807 s%@infodir@%$infodir%g
3808 s%@mandir@%$mandir%g
3809 s%@host@%$host%g
3810 s%@host_alias@%$host_alias%g
3811 s%@host_cpu@%$host_cpu%g
3812 s%@host_vendor@%$host_vendor%g
3813 s%@host_os@%$host_os%g
3814 s%@CC@%$CC%g
3815 s%@CPP@%$CPP%g
3816 s%@AWK@%$AWK%g
3817 s%@SET_MAKE@%$SET_MAKE%g
3818 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3819 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3820 s%@INSTALL_DATA@%$INSTALL_DATA%g
3821 s%@LN_S@%$LN_S%g
3822 s%@RMPROG@%$RMPROG%g
3823 s%@SHPROG@%$SHPROG%g
3824 s%@OSDEP_C@%$OSDEP_C%g
3825 s%@ENGINE_C@%$ENGINE_C%g
3826 s%@INSTALL_RULE@%$INSTALL_RULE%g
3827 s%@SYMLINK@%$SYMLINK%g
3828 s%@IRCDMODE@%$IRCDMODE%g
3829 s%@IRCDOWN@%$IRCDOWN%g
3830 s%@IRCDGRP@%$IRCDGRP%g
3831 s%@DPATH@%$DPATH%g
3832
3833 CEOF
3834 EOF
3835
3836 cat >> $CONFIG_STATUS <<\EOF
3837
3838 # Split the substitutions into bite-sized pieces for seds with
3839 # small command number limits, like on Digital OSF/1 and HP-UX.
3840 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3841 ac_file=1 # Number of current file.
3842 ac_beg=1 # First line for current file.
3843 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3844 ac_more_lines=:
3845 ac_sed_cmds=""
3846 while $ac_more_lines; do
3847   if test $ac_beg -gt 1; then
3848     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3849   else
3850     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3851   fi
3852   if test ! -s conftest.s$ac_file; then
3853     ac_more_lines=false
3854     rm -f conftest.s$ac_file
3855   else
3856     if test -z "$ac_sed_cmds"; then
3857       ac_sed_cmds="sed -f conftest.s$ac_file"
3858     else
3859       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3860     fi
3861     ac_file=`expr $ac_file + 1`
3862     ac_beg=$ac_end
3863     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3864   fi
3865 done
3866 if test -z "$ac_sed_cmds"; then
3867   ac_sed_cmds=cat
3868 fi
3869 EOF
3870
3871 cat >> $CONFIG_STATUS <<EOF
3872
3873 CONFIG_FILES=\${CONFIG_FILES-"Makefile ircd/Makefile doc/Makefile"}
3874 EOF
3875 cat >> $CONFIG_STATUS <<\EOF
3876 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3877   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3878   case "$ac_file" in
3879   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3880        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3881   *) ac_file_in="${ac_file}.in" ;;
3882   esac
3883
3884   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3885
3886   # Remove last slash and all that follows it.  Not all systems have dirname.
3887   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3888   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3889     # The file is in a subdirectory.
3890     test ! -d "$ac_dir" && mkdir "$ac_dir"
3891     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3892     # A "../" for each directory in $ac_dir_suffix.
3893     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3894   else
3895     ac_dir_suffix= ac_dots=
3896   fi
3897
3898   case "$ac_given_srcdir" in
3899   .)  srcdir=.
3900       if test -z "$ac_dots"; then top_srcdir=.
3901       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3902   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3903   *) # Relative path.
3904     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3905     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3906   esac
3907
3908   case "$ac_given_INSTALL" in
3909   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3910   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3911   esac
3912
3913   echo creating "$ac_file"
3914   rm -f "$ac_file"
3915   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3916   case "$ac_file" in
3917   *Makefile*) ac_comsub="1i\\
3918 # $configure_input" ;;
3919   *) ac_comsub= ;;
3920   esac
3921
3922   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3923   sed -e "$ac_comsub
3924 s%@configure_input@%$configure_input%g
3925 s%@srcdir@%$srcdir%g
3926 s%@top_srcdir@%$top_srcdir%g
3927 s%@INSTALL@%$INSTALL%g
3928 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3929 fi; done
3930 rm -f conftest.s*
3931
3932 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3933 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3934 #
3935 # ac_d sets the value in "#define NAME VALUE" lines.
3936 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3937 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3938 ac_dC='\3'
3939 ac_dD='%g'
3940 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3941 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3942 ac_uB='\([      ]\)%\1#\2define\3'
3943 ac_uC=' '
3944 ac_uD='\4%g'
3945 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3946 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3947 ac_eB='$%\1#\2define\3'
3948 ac_eC=' '
3949 ac_eD='%g'
3950
3951 if test "${CONFIG_HEADERS+set}" != set; then
3952 EOF
3953 cat >> $CONFIG_STATUS <<EOF
3954   CONFIG_HEADERS="config.h"
3955 EOF
3956 cat >> $CONFIG_STATUS <<\EOF
3957 fi
3958 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3959   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3960   case "$ac_file" in
3961   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3962        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3963   *) ac_file_in="${ac_file}.in" ;;
3964   esac
3965
3966   echo creating $ac_file
3967
3968   rm -f conftest.frag conftest.in conftest.out
3969   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3970   cat $ac_file_inputs > conftest.in
3971
3972 EOF
3973
3974 # Transform confdefs.h into a sed script conftest.vals that substitutes
3975 # the proper values into config.h.in to produce config.h.  And first:
3976 # Protect against being on the right side of a sed subst in config.status.
3977 # Protect against being in an unquoted here document in config.status.
3978 rm -f conftest.vals
3979 cat > conftest.hdr <<\EOF
3980 s/[\\&%]/\\&/g
3981 s%[\\$`]%\\&%g
3982 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3983 s%ac_d%ac_u%gp
3984 s%ac_u%ac_e%gp
3985 EOF
3986 sed -n -f conftest.hdr confdefs.h > conftest.vals
3987 rm -f conftest.hdr
3988
3989 # This sed command replaces #undef with comments.  This is necessary, for
3990 # example, in the case of _POSIX_SOURCE, which is predefined and required
3991 # on some systems where configure will not decide to define it.
3992 cat >> conftest.vals <<\EOF
3993 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3994 EOF
3995
3996 # Break up conftest.vals because some shells have a limit on
3997 # the size of here documents, and old seds have small limits too.
3998
3999 rm -f conftest.tail
4000 while :
4001 do
4002   ac_lines=`grep -c . conftest.vals`
4003   # grep -c gives empty output for an empty file on some AIX systems.
4004   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4005   # Write a limited-size here document to conftest.frag.
4006   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4007   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4008   echo 'CEOF
4009   sed -f conftest.frag conftest.in > conftest.out
4010   rm -f conftest.in
4011   mv conftest.out conftest.in
4012 ' >> $CONFIG_STATUS
4013   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4014   rm -f conftest.vals
4015   mv conftest.tail conftest.vals
4016 done
4017 rm -f conftest.vals
4018
4019 cat >> $CONFIG_STATUS <<\EOF
4020   rm -f conftest.frag conftest.h
4021   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4022   cat conftest.in >> conftest.h
4023   rm -f conftest.in
4024   if cmp -s $ac_file conftest.h 2>/dev/null; then
4025     echo "$ac_file is unchanged"
4026     rm -f conftest.h
4027   else
4028     # Remove last slash and all that follows it.  Not all systems have dirname.
4029       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4030       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4031       # The file is in a subdirectory.
4032       test ! -d "$ac_dir" && mkdir "$ac_dir"
4033     fi
4034     rm -f $ac_file
4035     mv conftest.h $ac_file
4036   fi
4037 fi; done
4038
4039 EOF
4040 cat >> $CONFIG_STATUS <<EOF
4041
4042 EOF
4043 cat >> $CONFIG_STATUS <<\EOF
4044 echo timestamp > stamp-h
4045 exit 0
4046 EOF
4047 chmod +x $CONFIG_STATUS
4048 rm -fr confdefs* $ac_clean_files
4049 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4050