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