9f2910e661a550b827c9bc7d18388c6125618931
[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
773
774
775 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
776 echo "configure:777: checking for ${CC-cc} option to accept ANSI C" >&5
777 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
778   echo $ac_n "(cached) $ac_c" 1>&6
779 else
780   am_cv_prog_cc_stdc=no
781 ac_save_CC="$CC"
782 # Don't try gcc -ansi; that turns off useful extensions and
783 # breaks some systems' header files.
784 # AIX                   -qlanglvl=ansi
785 # Ultrix and OSF/1      -std1
786 # HP-UX                 -Aa -D_HPUX_SOURCE
787 # SVR4                  -Xc -D__EXTENSIONS__
788 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
789 do
790   CC="$ac_save_CC $ac_arg"
791   cat > conftest.$ac_ext <<EOF
792 #line 793 "configure"
793 #include "confdefs.h"
794 #include <stdarg.h>
795 #include <stdio.h>
796 #include <sys/types.h>
797 #include <sys/stat.h>
798 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
799 struct buf { int x; };
800 FILE * (*rcsopen) (struct buf *, struct stat *, int);
801 static char *e (p, i)
802      char **p;
803      int i;
804 {
805   return p[i];
806 }
807 static char *f (char * (*g) (char **, int), char **p, ...)
808 {
809   char *s;
810   va_list v;
811   va_start (v,p);
812   s = g (p, va_arg (v,int));
813   va_end (v);
814   return s;
815 }
816 int test (int i, double x);
817 struct s1 {int (*f) (int a);};
818 struct s2 {int (*f) (double a);};
819 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
820 int argc;
821 char **argv;
822
823 int main() {
824
825 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
826
827 ; return 0; }
828 EOF
829 if { (eval echo configure:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
830   rm -rf conftest*
831   am_cv_prog_cc_stdc="$ac_arg"; break
832 else
833   echo "configure: failed program was:" >&5
834   cat conftest.$ac_ext >&5
835 fi
836 rm -f conftest*
837 done
838 CC="$ac_save_CC"
839
840 fi
841
842 if test -z "$am_cv_prog_cc_stdc"; then
843   echo "$ac_t""none needed" 1>&6
844 else
845   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
846 fi
847 case "x$am_cv_prog_cc_stdc" in
848   x|xno) ;;
849   *) CC="$CC $am_cv_prog_cc_stdc" ;;
850 esac
851
852 if test "$CFLAGS" != "" ; then
853   CFLAGS=`echo "$CFLAGS" | sed -e 's/-O2/-O3/'`
854 fi
855 if test "$CFLAGS" != "" ; then
856   CFLAGS=`echo "$CFLAGS" | sed -e 's/-pipe//g'`
857 fi
858
859 echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
860 echo "configure:861: checking for crypt in -lc" >&5
861 ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
862 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
863   echo $ac_n "(cached) $ac_c" 1>&6
864 else
865   ac_save_LIBS="$LIBS"
866 LIBS="-lc  $LIBS"
867 cat > conftest.$ac_ext <<EOF
868 #line 869 "configure"
869 #include "confdefs.h"
870 /* Override any gcc2 internal prototype to avoid an error.  */
871 /* We use char because int might match the return type of a gcc2
872     builtin and then its argument prototype would still apply.  */
873 char crypt();
874
875 int main() {
876 crypt()
877 ; return 0; }
878 EOF
879 if { (eval echo configure:880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
880   rm -rf conftest*
881   eval "ac_cv_lib_$ac_lib_var=yes"
882 else
883   echo "configure: failed program was:" >&5
884   cat conftest.$ac_ext >&5
885   rm -rf conftest*
886   eval "ac_cv_lib_$ac_lib_var=no"
887 fi
888 rm -f conftest*
889 LIBS="$ac_save_LIBS"
890
891 fi
892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
893   echo "$ac_t""yes" 1>&6
894   true
895 else
896   echo "$ac_t""no" 1>&6
897 echo $ac_n "checking for crypt in -ldescrypt""... $ac_c" 1>&6
898 echo "configure:899: checking for crypt in -ldescrypt" >&5
899 ac_lib_var=`echo descrypt'_'crypt | sed 'y%./+-%__p_%'`
900 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
901   echo $ac_n "(cached) $ac_c" 1>&6
902 else
903   ac_save_LIBS="$LIBS"
904 LIBS="-ldescrypt  $LIBS"
905 cat > conftest.$ac_ext <<EOF
906 #line 907 "configure"
907 #include "confdefs.h"
908 /* Override any gcc2 internal prototype to avoid an error.  */
909 /* We use char because int might match the return type of a gcc2
910     builtin and then its argument prototype would still apply.  */
911 char crypt();
912
913 int main() {
914 crypt()
915 ; return 0; }
916 EOF
917 if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
918   rm -rf conftest*
919   eval "ac_cv_lib_$ac_lib_var=yes"
920 else
921   echo "configure: failed program was:" >&5
922   cat conftest.$ac_ext >&5
923   rm -rf conftest*
924   eval "ac_cv_lib_$ac_lib_var=no"
925 fi
926 rm -f conftest*
927 LIBS="$ac_save_LIBS"
928
929 fi
930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
931   echo "$ac_t""yes" 1>&6
932   LIBS="-ldescrypt $LIBS"
933 else
934   echo "$ac_t""no" 1>&6
935 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
936 echo "configure:937: checking for crypt in -lcrypt" >&5
937 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
938 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
939   echo $ac_n "(cached) $ac_c" 1>&6
940 else
941   ac_save_LIBS="$LIBS"
942 LIBS="-lcrypt  $LIBS"
943 cat > conftest.$ac_ext <<EOF
944 #line 945 "configure"
945 #include "confdefs.h"
946 /* Override any gcc2 internal prototype to avoid an error.  */
947 /* We use char because int might match the return type of a gcc2
948     builtin and then its argument prototype would still apply.  */
949 char crypt();
950
951 int main() {
952 crypt()
953 ; return 0; }
954 EOF
955 if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
956   rm -rf conftest*
957   eval "ac_cv_lib_$ac_lib_var=yes"
958 else
959   echo "configure: failed program was:" >&5
960   cat conftest.$ac_ext >&5
961   rm -rf conftest*
962   eval "ac_cv_lib_$ac_lib_var=no"
963 fi
964 rm -f conftest*
965 LIBS="$ac_save_LIBS"
966
967 fi
968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
969   echo "$ac_t""yes" 1>&6
970     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/^a-zA-Z0-9_/_/g' \
971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
972   cat >> confdefs.h <<EOF
973 #define $ac_tr_lib 1
974 EOF
975
976   LIBS="-lcrypt $LIBS"
977
978 else
979   echo "$ac_t""no" 1>&6
980 fi
981
982 fi
983
984 fi
985
986 echo $ac_n "checking for gethostbyname in -lc""... $ac_c" 1>&6
987 echo "configure:988: checking for gethostbyname in -lc" >&5
988 ac_lib_var=`echo c'_'gethostbyname | sed 'y%./+-%__p_%'`
989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
990   echo $ac_n "(cached) $ac_c" 1>&6
991 else
992   ac_save_LIBS="$LIBS"
993 LIBS="-lc  $LIBS"
994 cat > conftest.$ac_ext <<EOF
995 #line 996 "configure"
996 #include "confdefs.h"
997 /* Override any gcc2 internal prototype to avoid an error.  */
998 /* We use char because int might match the return type of a gcc2
999     builtin and then its argument prototype would still apply.  */
1000 char gethostbyname();
1001
1002 int main() {
1003 gethostbyname()
1004 ; return 0; }
1005 EOF
1006 if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1007   rm -rf conftest*
1008   eval "ac_cv_lib_$ac_lib_var=yes"
1009 else
1010   echo "configure: failed program was:" >&5
1011   cat conftest.$ac_ext >&5
1012   rm -rf conftest*
1013   eval "ac_cv_lib_$ac_lib_var=no"
1014 fi
1015 rm -f conftest*
1016 LIBS="$ac_save_LIBS"
1017
1018 fi
1019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1020   echo "$ac_t""yes" 1>&6
1021   true
1022 else
1023   echo "$ac_t""no" 1>&6
1024 echo $ac_n "checking for gethostbyaddr in -lnsl""... $ac_c" 1>&6
1025 echo "configure:1026: checking for gethostbyaddr in -lnsl" >&5
1026 ac_lib_var=`echo nsl'_'gethostbyaddr | sed 'y%./+-%__p_%'`
1027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1028   echo $ac_n "(cached) $ac_c" 1>&6
1029 else
1030   ac_save_LIBS="$LIBS"
1031 LIBS="-lnsl  $LIBS"
1032 cat > conftest.$ac_ext <<EOF
1033 #line 1034 "configure"
1034 #include "confdefs.h"
1035 /* Override any gcc2 internal prototype to avoid an error.  */
1036 /* We use char because int might match the return type of a gcc2
1037     builtin and then its argument prototype would still apply.  */
1038 char gethostbyaddr();
1039
1040 int main() {
1041 gethostbyaddr()
1042 ; return 0; }
1043 EOF
1044 if { (eval echo configure:1045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1045   rm -rf conftest*
1046   eval "ac_cv_lib_$ac_lib_var=yes"
1047 else
1048   echo "configure: failed program was:" >&5
1049   cat conftest.$ac_ext >&5
1050   rm -rf conftest*
1051   eval "ac_cv_lib_$ac_lib_var=no"
1052 fi
1053 rm -f conftest*
1054 LIBS="$ac_save_LIBS"
1055
1056 fi
1057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1058   echo "$ac_t""yes" 1>&6
1059   LIBS="-lnsl $LIBS"
1060 else
1061   echo "$ac_t""no" 1>&6
1062 fi
1063
1064 fi
1065
1066 echo $ac_n "checking for socket in -lc""... $ac_c" 1>&6
1067 echo "configure:1068: checking for socket in -lc" >&5
1068 ac_lib_var=`echo c'_'socket | sed 'y%./+-%__p_%'`
1069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1070   echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072   ac_save_LIBS="$LIBS"
1073 LIBS="-lc  $LIBS"
1074 cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 /* Override any gcc2 internal prototype to avoid an error.  */
1078 /* We use char because int might match the return type of a gcc2
1079     builtin and then its argument prototype would still apply.  */
1080 char socket();
1081
1082 int main() {
1083 socket()
1084 ; return 0; }
1085 EOF
1086 if { (eval echo configure:1087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1087   rm -rf conftest*
1088   eval "ac_cv_lib_$ac_lib_var=yes"
1089 else
1090   echo "configure: failed program was:" >&5
1091   cat conftest.$ac_ext >&5
1092   rm -rf conftest*
1093   eval "ac_cv_lib_$ac_lib_var=no"
1094 fi
1095 rm -f conftest*
1096 LIBS="$ac_save_LIBS"
1097
1098 fi
1099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1100   echo "$ac_t""yes" 1>&6
1101   true
1102 else
1103   echo "$ac_t""no" 1>&6
1104 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1105 echo "configure:1106: checking for socket in -lsocket" >&5
1106 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1107 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1108   echo $ac_n "(cached) $ac_c" 1>&6
1109 else
1110   ac_save_LIBS="$LIBS"
1111 LIBS="-lsocket  $LIBS"
1112 cat > conftest.$ac_ext <<EOF
1113 #line 1114 "configure"
1114 #include "confdefs.h"
1115 /* Override any gcc2 internal prototype to avoid an error.  */
1116 /* We use char because int might match the return type of a gcc2
1117     builtin and then its argument prototype would still apply.  */
1118 char socket();
1119
1120 int main() {
1121 socket()
1122 ; return 0; }
1123 EOF
1124 if { (eval echo configure:1125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1125   rm -rf conftest*
1126   eval "ac_cv_lib_$ac_lib_var=yes"
1127 else
1128   echo "configure: failed program was:" >&5
1129   cat conftest.$ac_ext >&5
1130   rm -rf conftest*
1131   eval "ac_cv_lib_$ac_lib_var=no"
1132 fi
1133 rm -f conftest*
1134 LIBS="$ac_save_LIBS"
1135
1136 fi
1137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1138   echo "$ac_t""yes" 1>&6
1139   LIBS="-lsocket $LIBS"
1140 else
1141   echo "$ac_t""no" 1>&6
1142 fi
1143
1144 fi
1145
1146 echo $ac_n "checking for res_mkquery in -lresolv""... $ac_c" 1>&6
1147 echo "configure:1148: checking for res_mkquery in -lresolv" >&5
1148 if eval "test \"`echo '$''{'unet_cv_lib_resolv'+set}'`\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1154 struct rrec;
1155 extern int res_mkquery(int, const char *, int, int, const char *,
1156     int, struct rrec *, unsigned char *, int);
1157 int main() {
1158 int op;
1159 const char *dname;
1160 int class, type;
1161 const char *data;
1162 int datalen;
1163 struct rrec *newrr;
1164 unsigned char *buf;
1165 int buflen;
1166 res_mkquery(op,dname,class,type,data,datalen,newrr,buf,buflen)
1167 ; return 0; }
1168 EOF
1169 if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1170   rm -rf conftest*
1171   unet_cv_lib_resolv=no
1172 else
1173   echo "configure: failed program was:" >&5
1174   cat conftest.$ac_ext >&5
1175   rm -rf conftest*
1176   OLD_LIBS="$LIBS"
1177 LIBS="$LIBS -lresolv"
1178 cat > conftest.$ac_ext <<EOF
1179 #line 1180 "configure"
1180 #include "confdefs.h"
1181 extern char *_res;
1182 int main() {
1183 *_res=0
1184 ; return 0; }
1185 EOF
1186 if { (eval echo configure:1187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1187   rm -rf conftest*
1188   unet_cv_lib_resolv=yes
1189 else
1190   echo "configure: failed program was:" >&5
1191   cat conftest.$ac_ext >&5
1192   rm -rf conftest*
1193   unet_cv_lib_resolv=no
1194 fi
1195 rm -f conftest*
1196 LIBS="$OLD_LIBS"
1197 fi
1198 rm -f conftest*
1199 fi
1200
1201 echo "$ac_t""$unet_cv_lib_resolv" 1>&6
1202 if test $unet_cv_lib_resolv = yes; then
1203   cat >> confdefs.h <<\EOF
1204 #define HAVE_LIB_RESOLV 1
1205 EOF
1206
1207   LIBS="$LIBS -lresolv"
1208 fi
1209
1210 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1211 echo "configure:1212: checking how to run the C preprocessor" >&5
1212 # On Suns, sometimes $CPP names a directory.
1213 if test -n "$CPP" && test -d "$CPP"; then
1214   CPP=
1215 fi
1216 if test -z "$CPP"; then
1217 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1218   echo $ac_n "(cached) $ac_c" 1>&6
1219 else
1220     # This must be in double quotes, not single quotes, because CPP may get
1221   # substituted into the Makefile and "${CC-cc}" will confuse make.
1222   CPP="${CC-cc} -E"
1223   # On the NeXT, cc -E runs the code through the compiler's parser,
1224   # not just through cpp.
1225   cat > conftest.$ac_ext <<EOF
1226 #line 1227 "configure"
1227 #include "confdefs.h"
1228 #include <assert.h>
1229 Syntax Error
1230 EOF
1231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1232 { (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1234 if test -z "$ac_err"; then
1235   :
1236 else
1237   echo "$ac_err" >&5
1238   echo "configure: failed program was:" >&5
1239   cat conftest.$ac_ext >&5
1240   rm -rf conftest*
1241   CPP="${CC-cc} -E -traditional-cpp"
1242   cat > conftest.$ac_ext <<EOF
1243 #line 1244 "configure"
1244 #include "confdefs.h"
1245 #include <assert.h>
1246 Syntax Error
1247 EOF
1248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1249 { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1251 if test -z "$ac_err"; then
1252   :
1253 else
1254   echo "$ac_err" >&5
1255   echo "configure: failed program was:" >&5
1256   cat conftest.$ac_ext >&5
1257   rm -rf conftest*
1258   CPP="${CC-cc} -nologo -E"
1259   cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 #include <assert.h>
1263 Syntax Error
1264 EOF
1265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1266 { (eval echo configure:1267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1268 if test -z "$ac_err"; then
1269   :
1270 else
1271   echo "$ac_err" >&5
1272   echo "configure: failed program was:" >&5
1273   cat conftest.$ac_ext >&5
1274   rm -rf conftest*
1275   CPP=/lib/cpp
1276 fi
1277 rm -f conftest*
1278 fi
1279 rm -f conftest*
1280 fi
1281 rm -f conftest*
1282   ac_cv_prog_CPP="$CPP"
1283 fi
1284   CPP="$ac_cv_prog_CPP"
1285 else
1286   ac_cv_prog_CPP="$CPP"
1287 fi
1288 echo "$ac_t""$CPP" 1>&6
1289
1290 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1291 echo "configure:1292: checking for ANSI C header files" >&5
1292 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1293   echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295   cat > conftest.$ac_ext <<EOF
1296 #line 1297 "configure"
1297 #include "confdefs.h"
1298 #include <stdlib.h>
1299 #include <stdarg.h>
1300 #include <string.h>
1301 #include <float.h>
1302 EOF
1303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1304 { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1306 if test -z "$ac_err"; then
1307   rm -rf conftest*
1308   ac_cv_header_stdc=yes
1309 else
1310   echo "$ac_err" >&5
1311   echo "configure: failed program was:" >&5
1312   cat conftest.$ac_ext >&5
1313   rm -rf conftest*
1314   ac_cv_header_stdc=no
1315 fi
1316 rm -f conftest*
1317
1318 if test $ac_cv_header_stdc = yes; then
1319   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1320 cat > conftest.$ac_ext <<EOF
1321 #line 1322 "configure"
1322 #include "confdefs.h"
1323 #include <string.h>
1324 EOF
1325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1326   egrep "memchr" >/dev/null 2>&1; then
1327   :
1328 else
1329   rm -rf conftest*
1330   ac_cv_header_stdc=no
1331 fi
1332 rm -f conftest*
1333
1334 fi
1335
1336 if test $ac_cv_header_stdc = yes; then
1337   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1338 cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1341 #include <stdlib.h>
1342 EOF
1343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1344   egrep "free" >/dev/null 2>&1; then
1345   :
1346 else
1347   rm -rf conftest*
1348   ac_cv_header_stdc=no
1349 fi
1350 rm -f conftest*
1351
1352 fi
1353
1354 if test $ac_cv_header_stdc = yes; then
1355   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1356 if test "$cross_compiling" = yes; then
1357   :
1358 else
1359   cat > conftest.$ac_ext <<EOF
1360 #line 1361 "configure"
1361 #include "confdefs.h"
1362 #include <ctype.h>
1363 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1364 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1365 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1366 int main () { int i; for (i = 0; i < 256; i++)
1367 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1368 exit (0); }
1369
1370 EOF
1371 if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1372 then
1373   :
1374 else
1375   echo "configure: failed program was:" >&5
1376   cat conftest.$ac_ext >&5
1377   rm -fr conftest*
1378   ac_cv_header_stdc=no
1379 fi
1380 rm -fr conftest*
1381 fi
1382
1383 fi
1384 fi
1385
1386 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1387 if test $ac_cv_header_stdc = yes; then
1388   cat >> confdefs.h <<\EOF
1389 #define STDC_HEADERS 1
1390 EOF
1391
1392 fi
1393
1394
1395 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1396 echo "configure:1397: checking whether byte ordering is bigendian" >&5
1397 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1398   echo $ac_n "(cached) $ac_c" 1>&6
1399 else
1400   ac_cv_c_bigendian=unknown
1401 # See if sys/param.h defines the BYTE_ORDER macro.
1402 cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405 #include <sys/types.h>
1406 #include <sys/param.h>
1407 int main() {
1408
1409 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1410  bogus endian macros
1411 #endif
1412 ; return 0; }
1413 EOF
1414 if { (eval echo configure:1415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1415   rm -rf conftest*
1416   # It does; now see whether it defined to BIG_ENDIAN or not.
1417 cat > conftest.$ac_ext <<EOF
1418 #line 1419 "configure"
1419 #include "confdefs.h"
1420 #include <sys/types.h>
1421 #include <sys/param.h>
1422 int main() {
1423
1424 #if BYTE_ORDER != BIG_ENDIAN
1425  not big endian
1426 #endif
1427 ; return 0; }
1428 EOF
1429 if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1430   rm -rf conftest*
1431   ac_cv_c_bigendian=yes
1432 else
1433   echo "configure: failed program was:" >&5
1434   cat conftest.$ac_ext >&5
1435   rm -rf conftest*
1436   ac_cv_c_bigendian=no
1437 fi
1438 rm -f conftest*
1439 else
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442 fi
1443 rm -f conftest*
1444 if test $ac_cv_c_bigendian = unknown; then
1445 if test "$cross_compiling" = yes; then
1446     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1447 else
1448   cat > conftest.$ac_ext <<EOF
1449 #line 1450 "configure"
1450 #include "confdefs.h"
1451 main () {
1452   /* Are we little or big endian?  From Harbison&Steele.  */
1453   union
1454   {
1455     long l;
1456     char c[sizeof (long)];
1457   } u;
1458   u.l = 1;
1459   exit (u.c[sizeof (long) - 1] == 1);
1460 }
1461 EOF
1462 if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1463 then
1464   ac_cv_c_bigendian=no
1465 else
1466   echo "configure: failed program was:" >&5
1467   cat conftest.$ac_ext >&5
1468   rm -fr conftest*
1469   ac_cv_c_bigendian=yes
1470 fi
1471 rm -fr conftest*
1472 fi
1473
1474 fi
1475 fi
1476
1477 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1478 if test $ac_cv_c_bigendian = yes; then
1479   cat >> confdefs.h <<\EOF
1480 #define WORDS_BIGENDIAN 1
1481 EOF
1482
1483 fi
1484
1485 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1486 echo "configure:1487: checking for size_t" >&5
1487 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1488   echo $ac_n "(cached) $ac_c" 1>&6
1489 else
1490   cat > conftest.$ac_ext <<EOF
1491 #line 1492 "configure"
1492 #include "confdefs.h"
1493 #include <sys/types.h>
1494 #if STDC_HEADERS
1495 #include <stdlib.h>
1496 #include <stddef.h>
1497 #endif
1498 EOF
1499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1500   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1501   rm -rf conftest*
1502   ac_cv_type_size_t=yes
1503 else
1504   rm -rf conftest*
1505   ac_cv_type_size_t=no
1506 fi
1507 rm -f conftest*
1508
1509 fi
1510 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1511 if test $ac_cv_type_size_t = no; then
1512   cat >> confdefs.h <<\EOF
1513 #define size_t unsigned
1514 EOF
1515
1516 fi
1517
1518 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1519 echo "configure:1520: checking whether time.h and sys/time.h may both be included" >&5
1520 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1521   echo $ac_n "(cached) $ac_c" 1>&6
1522 else
1523   cat > conftest.$ac_ext <<EOF
1524 #line 1525 "configure"
1525 #include "confdefs.h"
1526 #include <sys/types.h>
1527 #include <sys/time.h>
1528 #include <time.h>
1529 int main() {
1530 struct tm *tp;
1531 ; return 0; }
1532 EOF
1533 if { (eval echo configure:1534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1534   rm -rf conftest*
1535   ac_cv_header_time=yes
1536 else
1537   echo "configure: failed program was:" >&5
1538   cat conftest.$ac_ext >&5
1539   rm -rf conftest*
1540   ac_cv_header_time=no
1541 fi
1542 rm -f conftest*
1543 fi
1544
1545 echo "$ac_t""$ac_cv_header_time" 1>&6
1546 if test $ac_cv_header_time = yes; then
1547   cat >> confdefs.h <<\EOF
1548 #define TIME_WITH_SYS_TIME 1
1549 EOF
1550
1551 fi
1552
1553 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1554 echo "configure:1555: checking whether struct tm is in sys/time.h or time.h" >&5
1555 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1556   echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558   cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 #include <sys/types.h>
1562 #include <time.h>
1563 int main() {
1564 struct tm *tp; tp->tm_sec;
1565 ; return 0; }
1566 EOF
1567 if { (eval echo configure:1568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1568   rm -rf conftest*
1569   ac_cv_struct_tm=time.h
1570 else
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   ac_cv_struct_tm=sys/time.h
1575 fi
1576 rm -f conftest*
1577 fi
1578
1579 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1580 if test $ac_cv_struct_tm = sys/time.h; then
1581   cat >> confdefs.h <<\EOF
1582 #define TM_IN_SYS_TIME 1
1583 EOF
1584
1585 fi
1586
1587 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1588 echo "configure:1589: checking for uid_t in sys/types.h" >&5
1589 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1590   echo $ac_n "(cached) $ac_c" 1>&6
1591 else
1592   cat > conftest.$ac_ext <<EOF
1593 #line 1594 "configure"
1594 #include "confdefs.h"
1595 #include <sys/types.h>
1596 EOF
1597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1598   egrep "uid_t" >/dev/null 2>&1; then
1599   rm -rf conftest*
1600   ac_cv_type_uid_t=yes
1601 else
1602   rm -rf conftest*
1603   ac_cv_type_uid_t=no
1604 fi
1605 rm -f conftest*
1606
1607 fi
1608
1609 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1610 if test $ac_cv_type_uid_t = no; then
1611   cat >> confdefs.h <<\EOF
1612 #define uid_t int
1613 EOF
1614
1615   cat >> confdefs.h <<\EOF
1616 #define gid_t int
1617 EOF
1618
1619 fi
1620
1621 echo $ac_n "checking size of short""... $ac_c" 1>&6
1622 echo "configure:1623: checking size of short" >&5
1623 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1624   echo $ac_n "(cached) $ac_c" 1>&6
1625 else
1626   if test "$cross_compiling" = yes; then
1627     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1628 else
1629   cat > conftest.$ac_ext <<EOF
1630 #line 1631 "configure"
1631 #include "confdefs.h"
1632 #include <stdio.h>
1633 main()
1634 {
1635   FILE *f=fopen("conftestval", "w");
1636   if (!f) exit(1);
1637   fprintf(f, "%d\n", sizeof(short));
1638   exit(0);
1639 }
1640 EOF
1641 if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1642 then
1643   ac_cv_sizeof_short=`cat conftestval`
1644 else
1645   echo "configure: failed program was:" >&5
1646   cat conftest.$ac_ext >&5
1647   rm -fr conftest*
1648   ac_cv_sizeof_short=0
1649 fi
1650 rm -fr conftest*
1651 fi
1652
1653 fi
1654 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1655 cat >> confdefs.h <<EOF
1656 #define SIZEOF_SHORT $ac_cv_sizeof_short
1657 EOF
1658
1659
1660 echo $ac_n "checking size of int""... $ac_c" 1>&6
1661 echo "configure:1662: checking size of int" >&5
1662 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1663   echo $ac_n "(cached) $ac_c" 1>&6
1664 else
1665   if test "$cross_compiling" = yes; then
1666     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1667 else
1668   cat > conftest.$ac_ext <<EOF
1669 #line 1670 "configure"
1670 #include "confdefs.h"
1671 #include <stdio.h>
1672 main()
1673 {
1674   FILE *f=fopen("conftestval", "w");
1675   if (!f) exit(1);
1676   fprintf(f, "%d\n", sizeof(int));
1677   exit(0);
1678 }
1679 EOF
1680 if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1681 then
1682   ac_cv_sizeof_int=`cat conftestval`
1683 else
1684   echo "configure: failed program was:" >&5
1685   cat conftest.$ac_ext >&5
1686   rm -fr conftest*
1687   ac_cv_sizeof_int=0
1688 fi
1689 rm -fr conftest*
1690 fi
1691
1692 fi
1693 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1694 cat >> confdefs.h <<EOF
1695 #define SIZEOF_INT $ac_cv_sizeof_int
1696 EOF
1697
1698
1699 echo $ac_n "checking size of long""... $ac_c" 1>&6
1700 echo "configure:1701: checking size of long" >&5
1701 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1702   echo $ac_n "(cached) $ac_c" 1>&6
1703 else
1704   if test "$cross_compiling" = yes; then
1705     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1706 else
1707   cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 #include <stdio.h>
1711 main()
1712 {
1713   FILE *f=fopen("conftestval", "w");
1714   if (!f) exit(1);
1715   fprintf(f, "%d\n", sizeof(long));
1716   exit(0);
1717 }
1718 EOF
1719 if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1720 then
1721   ac_cv_sizeof_long=`cat conftestval`
1722 else
1723   echo "configure: failed program was:" >&5
1724   cat conftest.$ac_ext >&5
1725   rm -fr conftest*
1726   ac_cv_sizeof_long=0
1727 fi
1728 rm -fr conftest*
1729 fi
1730
1731 fi
1732 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1733 cat >> confdefs.h <<EOF
1734 #define SIZEOF_LONG $ac_cv_sizeof_long
1735 EOF
1736
1737
1738 echo $ac_n "checking size of void *""... $ac_c" 1>&6
1739 echo "configure:1740: checking size of void *" >&5
1740 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1741   echo $ac_n "(cached) $ac_c" 1>&6
1742 else
1743   if test "$cross_compiling" = yes; then
1744     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1745 else
1746   cat > conftest.$ac_ext <<EOF
1747 #line 1748 "configure"
1748 #include "confdefs.h"
1749 #include <stdio.h>
1750 main()
1751 {
1752   FILE *f=fopen("conftestval", "w");
1753   if (!f) exit(1);
1754   fprintf(f, "%d\n", sizeof(void *));
1755   exit(0);
1756 }
1757 EOF
1758 if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1759 then
1760   ac_cv_sizeof_void_p=`cat conftestval`
1761 else
1762   echo "configure: failed program was:" >&5
1763   cat conftest.$ac_ext >&5
1764   rm -fr conftest*
1765   ac_cv_sizeof_void_p=0
1766 fi
1767 rm -fr conftest*
1768 fi
1769
1770 fi
1771 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
1772 cat >> confdefs.h <<EOF
1773 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
1774 EOF
1775
1776
1777 if test "$ac_cv_sizeof_int" = 2 ; then
1778   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1779 echo "configure:1780: checking for int16_t" >&5
1780 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
1781   echo $ac_n "(cached) $ac_c" 1>&6
1782 else
1783   cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 #include <sys/types.h>
1787 #if STDC_HEADERS
1788 #include <stdlib.h>
1789 #include <stddef.h>
1790 #endif
1791 EOF
1792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1793   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1794   rm -rf conftest*
1795   ac_cv_type_int16_t=yes
1796 else
1797   rm -rf conftest*
1798   ac_cv_type_int16_t=no
1799 fi
1800 rm -f conftest*
1801
1802 fi
1803 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
1804 if test $ac_cv_type_int16_t = no; then
1805   cat >> confdefs.h <<\EOF
1806 #define int16_t int
1807 EOF
1808
1809 fi
1810
1811   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
1812 echo "configure:1813: checking for u_int16_t" >&5
1813 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
1814   echo $ac_n "(cached) $ac_c" 1>&6
1815 else
1816   cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819 #include <sys/types.h>
1820 #if STDC_HEADERS
1821 #include <stdlib.h>
1822 #include <stddef.h>
1823 #endif
1824 EOF
1825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1826   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1827   rm -rf conftest*
1828   ac_cv_type_u_int16_t=yes
1829 else
1830   rm -rf conftest*
1831   ac_cv_type_u_int16_t=no
1832 fi
1833 rm -f conftest*
1834
1835 fi
1836 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
1837 if test $ac_cv_type_u_int16_t = no; then
1838   cat >> confdefs.h <<\EOF
1839 #define u_int16_t unsigned int
1840 EOF
1841
1842 fi
1843
1844 elif test "$ac_cv_sizeof_short" = 2 ; then
1845   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1846 echo "configure:1847: checking for int16_t" >&5
1847 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
1848   echo $ac_n "(cached) $ac_c" 1>&6
1849 else
1850   cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853 #include <sys/types.h>
1854 #if STDC_HEADERS
1855 #include <stdlib.h>
1856 #include <stddef.h>
1857 #endif
1858 EOF
1859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1860   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1861   rm -rf conftest*
1862   ac_cv_type_int16_t=yes
1863 else
1864   rm -rf conftest*
1865   ac_cv_type_int16_t=no
1866 fi
1867 rm -f conftest*
1868
1869 fi
1870 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
1871 if test $ac_cv_type_int16_t = no; then
1872   cat >> confdefs.h <<\EOF
1873 #define int16_t short
1874 EOF
1875
1876 fi
1877
1878   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
1879 echo "configure:1880: checking for u_int16_t" >&5
1880 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886 #include <sys/types.h>
1887 #if STDC_HEADERS
1888 #include <stdlib.h>
1889 #include <stddef.h>
1890 #endif
1891 EOF
1892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1893   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1894   rm -rf conftest*
1895   ac_cv_type_u_int16_t=yes
1896 else
1897   rm -rf conftest*
1898   ac_cv_type_u_int16_t=no
1899 fi
1900 rm -f conftest*
1901
1902 fi
1903 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
1904 if test $ac_cv_type_u_int16_t = no; then
1905   cat >> confdefs.h <<\EOF
1906 #define u_int16_t unsigned short
1907 EOF
1908
1909 fi
1910
1911 else
1912   { echo "configure: error: Cannot find a type with size of 16 bits" 1>&2; exit 1; }
1913 fi
1914 if test "$ac_cv_sizeof_int" = 4 ; then
1915   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1916 echo "configure:1917: checking for int32_t" >&5
1917 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1918   echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920   cat > conftest.$ac_ext <<EOF
1921 #line 1922 "configure"
1922 #include "confdefs.h"
1923 #include <sys/types.h>
1924 #if STDC_HEADERS
1925 #include <stdlib.h>
1926 #include <stddef.h>
1927 #endif
1928 EOF
1929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1930   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1931   rm -rf conftest*
1932   ac_cv_type_int32_t=yes
1933 else
1934   rm -rf conftest*
1935   ac_cv_type_int32_t=no
1936 fi
1937 rm -f conftest*
1938
1939 fi
1940 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
1941 if test $ac_cv_type_int32_t = no; then
1942   cat >> confdefs.h <<\EOF
1943 #define int32_t int
1944 EOF
1945
1946 fi
1947
1948   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
1949 echo "configure:1950: checking for u_int32_t" >&5
1950 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
1951   echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953   cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956 #include <sys/types.h>
1957 #if STDC_HEADERS
1958 #include <stdlib.h>
1959 #include <stddef.h>
1960 #endif
1961 EOF
1962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1963   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1964   rm -rf conftest*
1965   ac_cv_type_u_int32_t=yes
1966 else
1967   rm -rf conftest*
1968   ac_cv_type_u_int32_t=no
1969 fi
1970 rm -f conftest*
1971
1972 fi
1973 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
1974 if test $ac_cv_type_u_int32_t = no; then
1975   cat >> confdefs.h <<\EOF
1976 #define u_int32_t unsigned int
1977 EOF
1978
1979 fi
1980
1981 elif test "$ac_cv_sizeof_short" = 4 ; then
1982   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1983 echo "configure:1984: checking for int32_t" >&5
1984 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1985   echo $ac_n "(cached) $ac_c" 1>&6
1986 else
1987   cat > conftest.$ac_ext <<EOF
1988 #line 1989 "configure"
1989 #include "confdefs.h"
1990 #include <sys/types.h>
1991 #if STDC_HEADERS
1992 #include <stdlib.h>
1993 #include <stddef.h>
1994 #endif
1995 EOF
1996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1997   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1998   rm -rf conftest*
1999   ac_cv_type_int32_t=yes
2000 else
2001   rm -rf conftest*
2002   ac_cv_type_int32_t=no
2003 fi
2004 rm -f conftest*
2005
2006 fi
2007 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2008 if test $ac_cv_type_int32_t = no; then
2009   cat >> confdefs.h <<\EOF
2010 #define int32_t short
2011 EOF
2012
2013 fi
2014
2015   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2016 echo "configure:2017: checking for u_int32_t" >&5
2017 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2018   echo $ac_n "(cached) $ac_c" 1>&6
2019 else
2020   cat > conftest.$ac_ext <<EOF
2021 #line 2022 "configure"
2022 #include "confdefs.h"
2023 #include <sys/types.h>
2024 #if STDC_HEADERS
2025 #include <stdlib.h>
2026 #include <stddef.h>
2027 #endif
2028 EOF
2029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2030   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2031   rm -rf conftest*
2032   ac_cv_type_u_int32_t=yes
2033 else
2034   rm -rf conftest*
2035   ac_cv_type_u_int32_t=no
2036 fi
2037 rm -f conftest*
2038
2039 fi
2040 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2041 if test $ac_cv_type_u_int32_t = no; then
2042   cat >> confdefs.h <<\EOF
2043 #define u_int32_t unsigned short
2044 EOF
2045
2046 fi
2047
2048 elif test "$ac_cv_sizeof_long" = 4 ; then
2049   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
2050 echo "configure:2051: checking for int32_t" >&5
2051 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
2052   echo $ac_n "(cached) $ac_c" 1>&6
2053 else
2054   cat > conftest.$ac_ext <<EOF
2055 #line 2056 "configure"
2056 #include "confdefs.h"
2057 #include <sys/types.h>
2058 #if STDC_HEADERS
2059 #include <stdlib.h>
2060 #include <stddef.h>
2061 #endif
2062 EOF
2063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2064   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2065   rm -rf conftest*
2066   ac_cv_type_int32_t=yes
2067 else
2068   rm -rf conftest*
2069   ac_cv_type_int32_t=no
2070 fi
2071 rm -f conftest*
2072
2073 fi
2074 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2075 if test $ac_cv_type_int32_t = no; then
2076   cat >> confdefs.h <<\EOF
2077 #define int32_t long
2078 EOF
2079
2080 fi
2081
2082   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2083 echo "configure:2084: checking for u_int32_t" >&5
2084 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2085   echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087   cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 #include <sys/types.h>
2091 #if STDC_HEADERS
2092 #include <stdlib.h>
2093 #include <stddef.h>
2094 #endif
2095 EOF
2096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2097   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2098   rm -rf conftest*
2099   ac_cv_type_u_int32_t=yes
2100 else
2101   rm -rf conftest*
2102   ac_cv_type_u_int32_t=no
2103 fi
2104 rm -f conftest*
2105
2106 fi
2107 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2108 if test $ac_cv_type_u_int32_t = no; then
2109   cat >> confdefs.h <<\EOF
2110 #define u_int32_t unsigned long
2111 EOF
2112
2113 fi
2114
2115 else
2116   { echo "configure: error: Cannot find a type with size of 32 bits" 1>&2; exit 1; }
2117 fi
2118
2119 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
2120 echo "configure:2121: checking size of size_t" >&5
2121 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   if test "$cross_compiling" = yes; then
2125     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2126 else
2127   cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2130 #include <stdio.h>
2131 main()
2132 {
2133   FILE *f=fopen("conftestval", "w");
2134   if (!f) exit(1);
2135   fprintf(f, "%d\n", sizeof(size_t));
2136   exit(0);
2137 }
2138 EOF
2139 if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2140 then
2141   ac_cv_sizeof_size_t=`cat conftestval`
2142 else
2143   echo "configure: failed program was:" >&5
2144   cat conftest.$ac_ext >&5
2145   rm -fr conftest*
2146   ac_cv_sizeof_size_t=0
2147 fi
2148 rm -fr conftest*
2149 fi
2150
2151 fi
2152 echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
2153 cat >> confdefs.h <<EOF
2154 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
2155 EOF
2156
2157 echo $ac_n "checking printf format of size_t""... $ac_c" 1>&6
2158 echo "configure:2159: checking printf format of size_t" >&5
2159 if test "$ac_cv_sizeof_size_t" = 4 ; then
2160   echo "$ac_t"""%u"" 1>&6
2161   cat >> confdefs.h <<\EOF
2162 #define SIZE_T_FMT "%u"
2163 EOF
2164
2165 else
2166   echo "$ac_t"""%lu"" 1>&6
2167   cat >> confdefs.h <<\EOF
2168 #define SIZE_T_FMT "%lu"
2169 EOF
2170
2171 fi
2172 echo $ac_n "checking size of time_t""... $ac_c" 1>&6
2173 echo "configure:2174: checking size of time_t" >&5
2174 if eval "test \"`echo '$''{'unet_cv_sizeof_time_t'+set}'`\" = set"; then
2175   echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177   if test "$cross_compiling" = yes; then
2178   unet_cv_sizeof_time_t=0
2179 else
2180   cat > conftest.$ac_ext <<EOF
2181 #line 2182 "configure"
2182 #include "confdefs.h"
2183 #include <stdio.h>
2184 #include <sys/types.h>
2185 main()
2186 {
2187   FILE *f=fopen("conftestval", "w");
2188   if (!f) exit(1);
2189   fprintf(f, "%d\n", sizeof(time_t));
2190   exit(0);
2191 }
2192 EOF
2193 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2194 then
2195   unet_cv_sizeof_time_t=`cat conftestval`
2196 else
2197   echo "configure: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   rm -fr conftest*
2200   unet_cv_sizeof_time_t=0
2201 fi
2202 rm -fr conftest*
2203 fi
2204
2205 fi
2206
2207 if test "$unet_cv_sizeof_time_t" = 0 ; then
2208   echo "$ac_t""unknown" 1>&6
2209   cat >> confdefs.h <<\EOF
2210 #define TIME_T_FMT "%lu"
2211 EOF
2212
2213   cat >> confdefs.h <<\EOF
2214 #define STIME_T_FMT "%ld"
2215 EOF
2216
2217 else
2218   echo "$ac_t""$unet_cv_sizeof_time_t" 1>&6
2219   echo $ac_n "checking printf format of time_t""... $ac_c" 1>&6
2220 echo "configure:2221: checking printf format of time_t" >&5
2221   if test "$unet_cv_sizeof_time_t" = "$ac_cv_sizeof_long" ; then
2222     echo "$ac_t"""%lu"" 1>&6
2223     cat >> confdefs.h <<\EOF
2224 #define TIME_T_FMT "%lu"
2225 EOF
2226
2227     cat >> confdefs.h <<\EOF
2228 #define STIME_T_FMT "%ld"
2229 EOF
2230
2231   else
2232     echo "$ac_t"""%u"" 1>&6
2233     cat >> confdefs.h <<\EOF
2234 #define TIME_T_FMT "%u"
2235 EOF
2236
2237     cat >> confdefs.h <<\EOF
2238 #define STIME_T_FMT "%d"
2239 EOF
2240
2241   fi
2242 fi
2243
2244
2245 for ac_hdr in poll.h
2246 do
2247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2249 echo "configure:2250: checking for $ac_hdr" >&5
2250 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2251   echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253   cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 #include <$ac_hdr>
2257 EOF
2258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2259 { (eval echo configure:2260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2261 if test -z "$ac_err"; then
2262   rm -rf conftest*
2263   eval "ac_cv_header_$ac_safe=yes"
2264 else
2265   echo "$ac_err" >&5
2266   echo "configure: failed program was:" >&5
2267   cat conftest.$ac_ext >&5
2268   rm -rf conftest*
2269   eval "ac_cv_header_$ac_safe=no"
2270 fi
2271 rm -f conftest*
2272 fi
2273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2274   echo "$ac_t""yes" 1>&6
2275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2276   cat >> confdefs.h <<EOF
2277 #define $ac_tr_hdr 1
2278 EOF
2279  
2280 else
2281   echo "$ac_t""no" 1>&6
2282 fi
2283 done
2284 if test -z "$unet_cv_func_poll_syscall" ; then
2285   echo $ac_n "checking if poll is a system call (please wait)""... $ac_c" 1>&6
2286 echo "configure:2287: checking if poll is a system call (please wait)" >&5
2287 else
2288   echo $ac_n "checking if poll is a system call""... $ac_c" 1>&6
2289 echo "configure:2290: checking if poll is a system call" >&5
2290 fi
2291 if eval "test \"`echo '$''{'unet_cv_func_poll_syscall'+set}'`\" = set"; then
2292   echo $ac_n "(cached) $ac_c" 1>&6
2293 else
2294   unet_cv_func_poll_syscall=no
2295 if test "$ac_cv_header_poll_h" = yes; then
2296   unet_dirs=`find /usr/include/sys -type f -name '*.h' -exec egrep '^#include <[^/]*/.*>' {} \; | sed -e 's/^.*<//' -e 's%/.*$%%' | sort | uniq`
2297   for i in $unet_dirs ; do
2298     if test "$unet_cv_func_poll_syscall" = no ; then
2299       unet_files=`ls /usr/include/$i/*.h 2> /dev/null`
2300       if test -n "$unet_files" ; then
2301         for j in $unet_files ; do
2302           if test "$unet_cv_func_poll_syscall" = no ; then
2303             unet_line=`egrep '^#define[[:space:]]+[[:alnum:]_]*[Pp][Oo][Ll][Ll]' $j`
2304             if test -n "$unet_line" ; then
2305               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'`
2306               unet_set=`for k in "$unet_sig" ; do echo $k; done | sed -e 's% %|%g'`
2307               unet_match=`sed -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g' $j | egrep "$unet_set"`
2308               if test -n "$unet_match" ; then
2309                 unet_cv_func_poll_syscall=yes
2310               fi
2311             fi
2312           fi
2313         done
2314       fi
2315     fi
2316   done
2317 fi
2318
2319 fi
2320
2321 echo "$ac_t""$unet_cv_func_poll_syscall" 1>&6
2322
2323
2324 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
2325 echo "configure:2326: checking for restartable system calls" >&5
2326 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
2327   echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329   if test "$cross_compiling" = yes; then
2330     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2331 else
2332   cat > conftest.$ac_ext <<EOF
2333 #line 2334 "configure"
2334 #include "confdefs.h"
2335 /* Exit 0 (true) if wait returns something other than -1,
2336    i.e. the pid of the child, which means that wait was restarted
2337    after getting the signal.  */
2338 #include <sys/types.h>
2339 #include <signal.h>
2340 ucatch (isig) { }
2341 main () {
2342   int i = fork (), status;
2343   if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
2344   signal (SIGINT, ucatch);
2345   status = wait(&i);
2346   if (status == -1) wait(&i);
2347   exit (status == -1);
2348 }
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_sys_restartable_syscalls=yes
2354 else
2355   echo "configure: failed program was:" >&5
2356   cat conftest.$ac_ext >&5
2357   rm -fr conftest*
2358   ac_cv_sys_restartable_syscalls=no
2359 fi
2360 rm -fr conftest*
2361 fi
2362
2363 fi
2364
2365 echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
2366 if test $ac_cv_sys_restartable_syscalls = yes; then
2367   cat >> confdefs.h <<\EOF
2368 #define HAVE_RESTARTABLE_SYSCALLS 1
2369 EOF
2370
2371 fi
2372
2373
2374 echo $ac_n "checking for donuts""... $ac_c" 1>&6
2375 echo "configure:2376: checking for donuts" >&5
2376 echo "$ac_t""yes" 1>&6
2377
2378 for ac_prog in gawk mawk nawk awk
2379 do
2380 # Extract the first word of "$ac_prog", so it can be a program name with args.
2381 set dummy $ac_prog; ac_word=$2
2382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2383 echo "configure:2384: checking for $ac_word" >&5
2384 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2385   echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387   if test -n "$AWK"; then
2388   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2389 else
2390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2391   ac_dummy="$PATH"
2392   for ac_dir in $ac_dummy; do
2393     test -z "$ac_dir" && ac_dir=.
2394     if test -f $ac_dir/$ac_word; then
2395       ac_cv_prog_AWK="$ac_prog"
2396       break
2397     fi
2398   done
2399   IFS="$ac_save_ifs"
2400 fi
2401 fi
2402 AWK="$ac_cv_prog_AWK"
2403 if test -n "$AWK"; then
2404   echo "$ac_t""$AWK" 1>&6
2405 else
2406   echo "$ac_t""no" 1>&6
2407 fi
2408
2409 test -n "$AWK" && break
2410 done
2411
2412 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2413 echo "configure:2414: checking whether ${MAKE-make} sets \${MAKE}" >&5
2414 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2415 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2416   echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418   cat > conftestmake <<\EOF
2419 all:
2420         @echo 'ac_maketemp="${MAKE}"'
2421 EOF
2422 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2423 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2424 if test -n "$ac_maketemp"; then
2425   eval ac_cv_prog_make_${ac_make}_set=yes
2426 else
2427   eval ac_cv_prog_make_${ac_make}_set=no
2428 fi
2429 rm -f conftestmake
2430 fi
2431 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2432   echo "$ac_t""yes" 1>&6
2433   SET_MAKE=
2434 else
2435   echo "$ac_t""no" 1>&6
2436   SET_MAKE="MAKE=${MAKE-make}"
2437 fi
2438
2439 # Find a good install program.  We prefer a C program (faster),
2440 # so one script is as good as another.  But avoid the broken or
2441 # incompatible versions:
2442 # SysV /etc/install, /usr/sbin/install
2443 # SunOS /usr/etc/install
2444 # IRIX /sbin/install
2445 # AIX /bin/install
2446 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2447 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2448 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2449 # ./install, which can be erroneously created by make from ./install.sh.
2450 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2451 echo "configure:2452: checking for a BSD compatible install" >&5
2452 if test -z "$INSTALL"; then
2453 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2454   echo $ac_n "(cached) $ac_c" 1>&6
2455 else
2456     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2457   for ac_dir in $PATH; do
2458     # Account for people who put trailing slashes in PATH elements.
2459     case "$ac_dir/" in
2460     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2461     *)
2462       # OSF1 and SCO ODT 3.0 have their own names for install.
2463       # Don't use installbsd from OSF since it installs stuff as root
2464       # by default.
2465       for ac_prog in ginstall scoinst install; do
2466         if test -f $ac_dir/$ac_prog; then
2467           if test $ac_prog = install &&
2468             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2469             # AIX install.  It has an incompatible calling convention.
2470             :
2471           else
2472             ac_cv_path_install="$ac_dir/$ac_prog -c"
2473             break 2
2474           fi
2475         fi
2476       done
2477       ;;
2478     esac
2479   done
2480   IFS="$ac_save_IFS"
2481
2482 fi
2483   if test "${ac_cv_path_install+set}" = set; then
2484     INSTALL="$ac_cv_path_install"
2485   else
2486     # As a last resort, use the slow shell script.  We don't cache a
2487     # path for INSTALL within a source directory, because that will
2488     # break other packages using the cache if that directory is
2489     # removed, or if the path is relative.
2490     INSTALL="$ac_install_sh"
2491   fi
2492 fi
2493 echo "$ac_t""$INSTALL" 1>&6
2494
2495 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2496 # It thinks the first close brace ends the variable substitution.
2497 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2498
2499 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2500
2501 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2502
2503 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2504 echo "configure:2505: checking whether ln -s works" >&5
2505 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2506   echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508   rm -f conftestdata
2509 if ln -s X conftestdata 2>/dev/null
2510 then
2511   rm -f conftestdata
2512   ac_cv_prog_LN_S="ln -s"
2513 else
2514   ac_cv_prog_LN_S=ln
2515 fi
2516 fi
2517 LN_S="$ac_cv_prog_LN_S"
2518 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2519   echo "$ac_t""yes" 1>&6
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523
2524 for ac_prog in rm
2525 do
2526 # Extract the first word of "$ac_prog", so it can be a program name with args.
2527 set dummy $ac_prog; ac_word=$2
2528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_word" >&5
2530 if eval "test \"`echo '$''{'ac_cv_path_RMPROG'+set}'`\" = set"; then
2531   echo $ac_n "(cached) $ac_c" 1>&6
2532 else
2533   case "$RMPROG" in
2534   /*)
2535   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a path.
2536   ;;
2537   ?:/*)                  
2538   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a dos path.
2539   ;;
2540   *)
2541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2542   ac_dummy="$PATH"
2543   for ac_dir in $ac_dummy; do 
2544     test -z "$ac_dir" && ac_dir=.
2545     if test -f $ac_dir/$ac_word; then
2546       ac_cv_path_RMPROG="$ac_dir/$ac_word"
2547       break
2548     fi
2549   done
2550   IFS="$ac_save_ifs"
2551   ;;
2552 esac
2553 fi
2554 RMPROG="$ac_cv_path_RMPROG"
2555 if test -n "$RMPROG"; then
2556   echo "$ac_t""$RMPROG" 1>&6
2557 else
2558   echo "$ac_t""no" 1>&6
2559 fi
2560
2561 test -n "$RMPROG" && break
2562 done
2563 test -n "$RMPROG" || RMPROG="/bin/rm"
2564
2565 for ac_prog in sh
2566 do
2567 # Extract the first word of "$ac_prog", so it can be a program name with args.
2568 set dummy $ac_prog; ac_word=$2
2569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2570 echo "configure:2571: checking for $ac_word" >&5
2571 if eval "test \"`echo '$''{'ac_cv_path_SHPROG'+set}'`\" = set"; then
2572   echo $ac_n "(cached) $ac_c" 1>&6
2573 else
2574   case "$SHPROG" in
2575   /*)
2576   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a path.
2577   ;;
2578   ?:/*)                  
2579   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a dos path.
2580   ;;
2581   *)
2582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2583   ac_dummy="$PATH"
2584   for ac_dir in $ac_dummy; do 
2585     test -z "$ac_dir" && ac_dir=.
2586     if test -f $ac_dir/$ac_word; then
2587       ac_cv_path_SHPROG="$ac_dir/$ac_word"
2588       break
2589     fi
2590   done
2591   IFS="$ac_save_ifs"
2592   ;;
2593 esac
2594 fi
2595 SHPROG="$ac_cv_path_SHPROG"
2596 if test -n "$SHPROG"; then
2597   echo "$ac_t""$SHPROG" 1>&6
2598 else
2599   echo "$ac_t""no" 1>&6
2600 fi
2601
2602 test -n "$SHPROG" && break
2603 done
2604 test -n "$SHPROG" || SHPROG="/bin/sh"
2605
2606
2607 echo $ac_n "checking for set -h""... $ac_c" 1>&6
2608 echo "configure:2609: checking for set -h" >&5
2609 if eval "test \"`echo '$''{'unet_cv_sys_set_h'+set}'`\" = set"; then
2610   echo $ac_n "(cached) $ac_c" 1>&6
2611 else
2612   echo "set -h; exit $?" > conftest ;
2613 $SHPROG ./conftest 2> conftest.out
2614 ac_err=`grep -v '^ *+' conftest.out`
2615 if test -z "$ac_err"; then
2616   unet_cv_sys_set_h=yes
2617 else
2618   unet_cv_sys_set_h=no
2619 fi
2620 $RMPROG -fr conftest*
2621 fi
2622
2623 echo "$ac_t""$unet_cv_sys_set_h" 1>&6
2624
2625
2626 echo $ac_n "checking for posix non-blocking""... $ac_c" 1>&6
2627 echo "configure:2628: checking for posix non-blocking" >&5
2628 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_posix'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   if test "$cross_compiling" = yes; then
2632     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2633 else
2634   cat > conftest.$ac_ext <<EOF
2635 #line 2636 "configure"
2636 #include "confdefs.h"
2637 #include <sys/types.h>
2638 #include <sys/socket.h>
2639 #include <fcntl.h>
2640 #include <sys/ioctl.h>
2641 #include <sys/file.h>
2642 #include <signal.h>
2643 $ac_cv_type_signal alarmed() { exit(1); }
2644 int main(void)
2645 {
2646   char b[12];
2647   struct sockaddr x;
2648   size_t l = sizeof(x);
2649   int f = socket(AF_INET, SOCK_DGRAM, 0);
2650   if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK)))
2651   {
2652     signal(SIGALRM, alarmed);
2653     alarm(2);
2654     recvfrom(f, b, 12, 0, &x, &l);
2655     alarm(0);
2656     exit(0);
2657   }
2658   exit(1);
2659 }
2660 EOF
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2662 then
2663   unet_cv_sys_nonblocking_posix=yes
2664 else
2665   echo "configure: failed program was:" >&5
2666   cat conftest.$ac_ext >&5
2667   rm -fr conftest*
2668   unet_cv_sys_nonblocking_posix=no
2669 fi
2670 rm -fr conftest*
2671 fi
2672
2673 fi
2674
2675 echo "$ac_t""$unet_cv_sys_nonblocking_posix" 1>&6
2676 if test $unet_cv_sys_nonblocking_posix = yes; then
2677   cat >> confdefs.h <<\EOF
2678 #define NBLOCK_POSIX 1
2679 EOF
2680
2681 else
2682 echo $ac_n "checking for bsd non-blocking""... $ac_c" 1>&6
2683 echo "configure:2684: checking for bsd non-blocking" >&5
2684 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_bsd'+set}'`\" = set"; then
2685   echo $ac_n "(cached) $ac_c" 1>&6
2686 else
2687   if test "$cross_compiling" = yes; then
2688     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2689 else
2690   cat > conftest.$ac_ext <<EOF
2691 #line 2692 "configure"
2692 #include "confdefs.h"
2693 #include <sys/types.h>
2694 #include <sys/socket.h>
2695 #include <fcntl.h>
2696 #include <sys/ioctl.h>
2697 #include <sys/file.h>
2698 #include <signal.h>
2699 $ac_cv_type_signal alarmed() { exit(1); }
2700 int main(void)
2701 {
2702   char b[12];
2703   struct sockaddr x;
2704   size_t l = sizeof(x);
2705   int f = socket(AF_INET, SOCK_DGRAM, 0);
2706   if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY)))
2707   {
2708     signal(SIGALRM, alarmed);
2709     alarm(2);
2710     recvfrom(f, b, 12, 0, &x, &l);
2711     alarm(0);
2712     exit(0);
2713   }
2714   exit(1);
2715 }
2716 EOF
2717 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2718 then
2719   unet_cv_sys_nonblocking_bsd=yes
2720 else
2721   echo "configure: failed program was:" >&5
2722   cat conftest.$ac_ext >&5
2723   rm -fr conftest*
2724   unet_cv_sys_nonblocking_bsd=no
2725 fi
2726 rm -fr conftest*
2727 fi
2728
2729 fi
2730
2731 echo "$ac_t""$unet_cv_sys_nonblocking_bsd" 1>&6
2732 if test $unet_cv_sys_nonblocking_bsd = yes; then
2733   cat >> confdefs.h <<\EOF
2734 #define NBLOCK_BSD 1
2735 EOF
2736
2737 else
2738   cat >> confdefs.h <<\EOF
2739 #define NBLOCK_SYSV 1
2740 EOF
2741
2742 fi
2743 fi
2744 echo $ac_n "checking for posix signals""... $ac_c" 1>&6
2745 echo "configure:2746: checking for posix signals" >&5
2746 if eval "test \"`echo '$''{'unet_cv_sys_signal_posix'+set}'`\" = set"; then
2747   echo $ac_n "(cached) $ac_c" 1>&6
2748 else
2749   cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 #include <signal.h>
2753 int main() {
2754 sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)
2755 ; return 0; }
2756 EOF
2757 if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2758   rm -rf conftest*
2759   unet_cv_sys_signal_posix=yes
2760 else
2761   echo "configure: failed program was:" >&5
2762   cat conftest.$ac_ext >&5
2763   rm -rf conftest*
2764   unet_cv_sys_signal_posix=no
2765 fi
2766 rm -f conftest*
2767 fi
2768
2769 echo "$ac_t""$unet_cv_sys_signal_posix" 1>&6
2770 if test $unet_cv_sys_signal_posix = yes; then
2771   cat >> confdefs.h <<\EOF
2772 #define POSIX_SIGNALS 1
2773 EOF
2774
2775 else
2776 echo $ac_n "checking for bsd reliable signals""... $ac_c" 1>&6
2777 echo "configure:2778: checking for bsd reliable signals" >&5
2778 if eval "test \"`echo '$''{'unet_cv_sys_signal_bsd'+set}'`\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   if test "$cross_compiling" = yes; then
2782     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2783 else
2784   cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 #include <signal.h>
2788 int calls = 0;
2789 $ac_cv_type_signal handler()
2790 {
2791   if (calls) return;
2792   calls++;
2793   kill(getpid(), SIGTERM);
2794   sleep(1);
2795 }
2796 int main(void)
2797 {
2798   signal(SIGTERM, handler);
2799   kill(getpid(), SIGTERM);
2800   exit (0);
2801 }
2802 EOF
2803 if { (eval echo configure:2804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2804 then
2805   unet_cv_sys_signal_bsd=yes
2806 else
2807   echo "configure: failed program was:" >&5
2808   cat conftest.$ac_ext >&5
2809   rm -fr conftest*
2810   unet_cv_sys_signal_bsd=no
2811 fi
2812 rm -fr conftest*
2813 fi
2814
2815 fi
2816
2817 echo "$ac_t""$unet_cv_sys_signal_bsd" 1>&6
2818 if test $unet_cv_sys_signal_bsd = yes; then
2819   cat >> confdefs.h <<\EOF
2820 #define BSD_RELIABLE_SIGNALS 1
2821 EOF
2822
2823 else
2824   cat >> confdefs.h <<\EOF
2825 #define SYSV_UNRELIABLE_SIGNALS 1
2826 EOF
2827
2828 fi
2829 fi
2830
2831 echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
2832 echo "configure:2833: checking if the compiler understands -pipe" >&5
2833 unet_cv_pipe_flags="$ac_cv_prog_gcc"
2834 if test "$ac_cv_prog_gcc" = no; then
2835   OLDCFLAGS="$CFLAGS"
2836   CFLAGS="$CFLAGS -pipe"
2837   cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840
2841 int main() {
2842
2843 ; return 0; }
2844 EOF
2845 if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2846   rm -rf conftest*
2847   unet_cv_pipe_flags=yes
2848 else
2849   echo "configure: failed program was:" >&5
2850   cat conftest.$ac_ext >&5
2851 fi
2852 rm -f conftest*
2853   CFLAGS="$OLDCFLAGS"
2854 fi
2855 echo "$ac_t""$unet_cv_pipe_flags" 1>&6
2856 if test "$unet_cv_pipe_flags" = yes ; then
2857   x=`echo $CFLAGS | grep 'pipe' 2>/dev/null`
2858   if test "$x" = "" ; then
2859     CFLAGS="$CFLAGS -pipe"
2860   fi
2861 fi
2862
2863
2864
2865
2866
2867
2868 uname=`uname`
2869 echo $ac_n "checking for OS type""... $ac_c" 1>&6
2870 echo "configure:2871: checking for OS type" >&5
2871 case "$uname" in
2872   *inux*)
2873     echo "$ac_t""$uname found." 1>&6
2874     OSDEP_C="os_linux.c"
2875   ;;
2876   *olaris*)
2877     echo "$ac_t""$uname found." 1>&6
2878     OSDEP_C="os_solaris.c"
2879   ;;
2880   *SunOS*)
2881     echo "$ac_t""$uname found." 1>&6
2882     OSDEP_C="os_solaris.c"
2883   ;;
2884   *OpenBSD*)
2885     echo "$ac_t""$uname found." 1>&6
2886     OSDEP_C="os_openbsd.c"
2887   ;;
2888   *BSD*)
2889     echo "$ac_t""$uname found." 1>&6
2890     OSDEP_C="os_bsd.c"
2891   ;;
2892   *)
2893     echo "$ac_t""Unknown OS. Using generic routines." 1>&6
2894     OSDEP_C="os_generic.c"
2895   ;;
2896 esac
2897
2898
2899 trap '' 1 2 15
2900 cat > confcache <<\EOF
2901 # This file is a shell script that caches the results of configure
2902 # tests run on this system so they can be shared between configure
2903 # scripts and configure runs.  It is not useful on other systems.
2904 # If it contains results you don't want to keep, you may remove or edit it.
2905 #
2906 # By default, configure uses ./config.cache as the cache file,
2907 # creating it if it does not exist already.  You can give configure
2908 # the --cache-file=FILE option to use a different cache file; that is
2909 # what configure does when it calls configure scripts in
2910 # subdirectories, so they share the cache.
2911 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2912 # config.status only pays attention to the cache file if you give it the
2913 # --recheck option to rerun configure.
2914 #
2915 EOF
2916 # The following way of writing the cache mishandles newlines in values,
2917 # but we know of no workaround that is simple, portable, and efficient.
2918 # So, don't put newlines in cache variables' values.
2919 # Ultrix sh set writes to stderr and can't be redirected directly,
2920 # and sets the high bit in the cache file unless we assign to the vars.
2921 (set) 2>&1 |
2922   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2923   *ac_space=\ *)
2924     # `set' does not quote correctly, so add quotes (double-quote substitution
2925     # turns \\\\ into \\, and sed turns \\ into \).
2926     sed -n \
2927       -e "s/'/'\\\\''/g" \
2928       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2929     ;;
2930   *)
2931     # `set' quotes correctly as required by POSIX, so do not add quotes.
2932     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2933     ;;
2934   esac >> confcache
2935 if cmp -s $cache_file confcache; then
2936   :
2937 else
2938   if test -w $cache_file; then
2939     echo "updating cache $cache_file"
2940     cat confcache > $cache_file
2941   else
2942     echo "not updating unwritable cache $cache_file"
2943   fi
2944 fi
2945 rm -f confcache
2946
2947 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2948
2949 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2950 # Let make expand exec_prefix.
2951 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2952
2953 # Any assignment to VPATH causes Sun make to only execute
2954 # the first set of double-colon rules, so remove it if not needed.
2955 # If there is a colon in the path, we need to keep it.
2956 if test "x$srcdir" = x.; then
2957   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2958 fi
2959
2960 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2961
2962 DEFS=-DHAVE_CONFIG_H
2963
2964 # Without the "./", some shells look in PATH for config.status.
2965 : ${CONFIG_STATUS=./config.status}
2966
2967 echo creating $CONFIG_STATUS
2968 rm -f $CONFIG_STATUS
2969 cat > $CONFIG_STATUS <<EOF
2970 #! /bin/sh
2971 # Generated automatically by configure.
2972 # Run this file to recreate the current configuration.
2973 # This directory was configured as follows,
2974 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2975 #
2976 # $0 $ac_configure_args
2977 #
2978 # Compiler output produced by configure, useful for debugging
2979 # configure, is in ./config.log if it exists.
2980
2981 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2982 for ac_option
2983 do
2984   case "\$ac_option" in
2985   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2986     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2987     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2988   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2989     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2990     exit 0 ;;
2991   -help | --help | --hel | --he | --h)
2992     echo "\$ac_cs_usage"; exit 0 ;;
2993   *) echo "\$ac_cs_usage"; exit 1 ;;
2994   esac
2995 done
2996
2997 ac_given_srcdir=$srcdir
2998 ac_given_INSTALL="$INSTALL"
2999
3000 trap 'rm -fr `echo "config-sh Configure ../Makefile ../ircd/Makefile ../doc/Makefile Makefile setup.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3001 EOF
3002 cat >> $CONFIG_STATUS <<EOF
3003
3004 # Protect against being on the right side of a sed subst in config.status.
3005 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3006  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3007 $ac_vpsub
3008 $extrasub
3009 s%@SHELL@%$SHELL%g
3010 s%@CFLAGS@%$CFLAGS%g
3011 s%@CPPFLAGS@%$CPPFLAGS%g
3012 s%@CXXFLAGS@%$CXXFLAGS%g
3013 s%@FFLAGS@%$FFLAGS%g
3014 s%@DEFS@%$DEFS%g
3015 s%@LDFLAGS@%$LDFLAGS%g
3016 s%@LIBS@%$LIBS%g
3017 s%@exec_prefix@%$exec_prefix%g
3018 s%@prefix@%$prefix%g
3019 s%@program_transform_name@%$program_transform_name%g
3020 s%@bindir@%$bindir%g
3021 s%@sbindir@%$sbindir%g
3022 s%@libexecdir@%$libexecdir%g
3023 s%@datadir@%$datadir%g
3024 s%@sysconfdir@%$sysconfdir%g
3025 s%@sharedstatedir@%$sharedstatedir%g
3026 s%@localstatedir@%$localstatedir%g
3027 s%@libdir@%$libdir%g
3028 s%@includedir@%$includedir%g
3029 s%@oldincludedir@%$oldincludedir%g
3030 s%@infodir@%$infodir%g
3031 s%@mandir@%$mandir%g
3032 s%@CC@%$CC%g
3033 s%@CPP@%$CPP%g
3034 s%@AWK@%$AWK%g
3035 s%@SET_MAKE@%$SET_MAKE%g
3036 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3037 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3038 s%@INSTALL_DATA@%$INSTALL_DATA%g
3039 s%@LN_S@%$LN_S%g
3040 s%@RMPROG@%$RMPROG%g
3041 s%@SHPROG@%$SHPROG%g
3042 s%@unet_cv_sys_set_h@%$unet_cv_sys_set_h%g
3043 s%@ac_cv_header_poll_h@%$ac_cv_header_poll_h%g
3044 s%@ac_cv_header_syslog_h@%$ac_cv_header_syslog_h%g
3045 s%@unet_cv_func_poll_syscall@%$unet_cv_func_poll_syscall%g
3046 s%@OSDEP_C@%$OSDEP_C%g
3047
3048 CEOF
3049 EOF
3050
3051 cat >> $CONFIG_STATUS <<\EOF
3052
3053 # Split the substitutions into bite-sized pieces for seds with
3054 # small command number limits, like on Digital OSF/1 and HP-UX.
3055 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3056 ac_file=1 # Number of current file.
3057 ac_beg=1 # First line for current file.
3058 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3059 ac_more_lines=:
3060 ac_sed_cmds=""
3061 while $ac_more_lines; do
3062   if test $ac_beg -gt 1; then
3063     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3064   else
3065     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3066   fi
3067   if test ! -s conftest.s$ac_file; then
3068     ac_more_lines=false
3069     rm -f conftest.s$ac_file
3070   else
3071     if test -z "$ac_sed_cmds"; then
3072       ac_sed_cmds="sed -f conftest.s$ac_file"
3073     else
3074       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3075     fi
3076     ac_file=`expr $ac_file + 1`
3077     ac_beg=$ac_end
3078     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3079   fi
3080 done
3081 if test -z "$ac_sed_cmds"; then
3082   ac_sed_cmds=cat
3083 fi
3084 EOF
3085
3086 cat >> $CONFIG_STATUS <<EOF
3087
3088 CONFIG_FILES=\${CONFIG_FILES-"config-sh Configure ../Makefile ../ircd/Makefile ../doc/Makefile Makefile"}
3089 EOF
3090 cat >> $CONFIG_STATUS <<\EOF
3091 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3092   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3093   case "$ac_file" in
3094   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3095        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3096   *) ac_file_in="${ac_file}.in" ;;
3097   esac
3098
3099   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3100
3101   # Remove last slash and all that follows it.  Not all systems have dirname.
3102   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3103   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3104     # The file is in a subdirectory.
3105     test ! -d "$ac_dir" && mkdir "$ac_dir"
3106     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3107     # A "../" for each directory in $ac_dir_suffix.
3108     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3109   else
3110     ac_dir_suffix= ac_dots=
3111   fi
3112
3113   case "$ac_given_srcdir" in
3114   .)  srcdir=.
3115       if test -z "$ac_dots"; then top_srcdir=.
3116       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3117   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3118   *) # Relative path.
3119     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3120     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3121   esac
3122
3123   case "$ac_given_INSTALL" in
3124   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3125   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3126   esac
3127
3128   echo creating "$ac_file"
3129   rm -f "$ac_file"
3130   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3131   case "$ac_file" in
3132   *Makefile*) ac_comsub="1i\\
3133 # $configure_input" ;;
3134   *) ac_comsub= ;;
3135   esac
3136
3137   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3138   sed -e "$ac_comsub
3139 s%@configure_input@%$configure_input%g
3140 s%@srcdir@%$srcdir%g
3141 s%@top_srcdir@%$top_srcdir%g
3142 s%@INSTALL@%$INSTALL%g
3143 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3144 fi; done
3145 rm -f conftest.s*
3146
3147 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3148 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3149 #
3150 # ac_d sets the value in "#define NAME VALUE" lines.
3151 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3152 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3153 ac_dC='\3'
3154 ac_dD='%g'
3155 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3156 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3157 ac_uB='\([      ]\)%\1#\2define\3'
3158 ac_uC=' '
3159 ac_uD='\4%g'
3160 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3161 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3162 ac_eB='$%\1#\2define\3'
3163 ac_eC=' '
3164 ac_eD='%g'
3165
3166 if test "${CONFIG_HEADERS+set}" != set; then
3167 EOF
3168 cat >> $CONFIG_STATUS <<EOF
3169   CONFIG_HEADERS="setup.h"
3170 EOF
3171 cat >> $CONFIG_STATUS <<\EOF
3172 fi
3173 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3174   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3175   case "$ac_file" in
3176   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3177        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3178   *) ac_file_in="${ac_file}.in" ;;
3179   esac
3180
3181   echo creating $ac_file
3182
3183   rm -f conftest.frag conftest.in conftest.out
3184   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3185   cat $ac_file_inputs > conftest.in
3186
3187 EOF
3188
3189 # Transform confdefs.h into a sed script conftest.vals that substitutes
3190 # the proper values into config.h.in to produce config.h.  And first:
3191 # Protect against being on the right side of a sed subst in config.status.
3192 # Protect against being in an unquoted here document in config.status.
3193 rm -f conftest.vals
3194 cat > conftest.hdr <<\EOF
3195 s/[\\&%]/\\&/g
3196 s%[\\$`]%\\&%g
3197 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3198 s%ac_d%ac_u%gp
3199 s%ac_u%ac_e%gp
3200 EOF
3201 sed -n -f conftest.hdr confdefs.h > conftest.vals
3202 rm -f conftest.hdr
3203
3204 # This sed command replaces #undef with comments.  This is necessary, for
3205 # example, in the case of _POSIX_SOURCE, which is predefined and required
3206 # on some systems where configure will not decide to define it.
3207 cat >> conftest.vals <<\EOF
3208 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3209 EOF
3210
3211 # Break up conftest.vals because some shells have a limit on
3212 # the size of here documents, and old seds have small limits too.
3213
3214 rm -f conftest.tail
3215 while :
3216 do
3217   ac_lines=`grep -c . conftest.vals`
3218   # grep -c gives empty output for an empty file on some AIX systems.
3219   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3220   # Write a limited-size here document to conftest.frag.
3221   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3222   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3223   echo 'CEOF
3224   sed -f conftest.frag conftest.in > conftest.out
3225   rm -f conftest.in
3226   mv conftest.out conftest.in
3227 ' >> $CONFIG_STATUS
3228   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3229   rm -f conftest.vals
3230   mv conftest.tail conftest.vals
3231 done
3232 rm -f conftest.vals
3233
3234 cat >> $CONFIG_STATUS <<\EOF
3235   rm -f conftest.frag conftest.h
3236   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3237   cat conftest.in >> conftest.h
3238   rm -f conftest.in
3239   if cmp -s $ac_file conftest.h 2>/dev/null; then
3240     echo "$ac_file is unchanged"
3241     rm -f conftest.h
3242   else
3243     # Remove last slash and all that follows it.  Not all systems have dirname.
3244       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3245       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3246       # The file is in a subdirectory.
3247       test ! -d "$ac_dir" && mkdir "$ac_dir"
3248     fi
3249     rm -f $ac_file
3250     mv conftest.h $ac_file
3251   fi
3252 fi; done
3253
3254 EOF
3255 cat >> $CONFIG_STATUS <<EOF
3256
3257 EOF
3258 cat >> $CONFIG_STATUS <<\EOF
3259 echo timestamp > stamp-h;
3260 exit 0
3261 EOF
3262 chmod +x $CONFIG_STATUS
3263 rm -fr confdefs* $ac_clean_files
3264 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3265