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