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