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