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