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