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