Author: Isomer <isomer@coders.net>
[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 if test "$ac_cv_sizeof_int" = 2 ; then
1739   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1740 echo "configure:1741: checking for int16_t" >&5
1741 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
1742   echo $ac_n "(cached) $ac_c" 1>&6
1743 else
1744   cat > conftest.$ac_ext <<EOF
1745 #line 1746 "configure"
1746 #include "confdefs.h"
1747 #include <sys/types.h>
1748 #if STDC_HEADERS
1749 #include <stdlib.h>
1750 #include <stddef.h>
1751 #endif
1752 EOF
1753 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1754   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1755   rm -rf conftest*
1756   ac_cv_type_int16_t=yes
1757 else
1758   rm -rf conftest*
1759   ac_cv_type_int16_t=no
1760 fi
1761 rm -f conftest*
1762
1763 fi
1764 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
1765 if test $ac_cv_type_int16_t = no; then
1766   cat >> confdefs.h <<\EOF
1767 #define int16_t int
1768 EOF
1769
1770 fi
1771
1772   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
1773 echo "configure:1774: checking for u_int16_t" >&5
1774 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include <sys/types.h>
1781 #if STDC_HEADERS
1782 #include <stdlib.h>
1783 #include <stddef.h>
1784 #endif
1785 EOF
1786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1787   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1788   rm -rf conftest*
1789   ac_cv_type_u_int16_t=yes
1790 else
1791   rm -rf conftest*
1792   ac_cv_type_u_int16_t=no
1793 fi
1794 rm -f conftest*
1795
1796 fi
1797 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
1798 if test $ac_cv_type_u_int16_t = no; then
1799   cat >> confdefs.h <<\EOF
1800 #define u_int16_t unsigned int
1801 EOF
1802
1803 fi
1804
1805 elif test "$ac_cv_sizeof_short" = 2 ; then
1806   echo $ac_n "checking for int16_t""... $ac_c" 1>&6
1807 echo "configure:1808: checking for int16_t" >&5
1808 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
1809   echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811   cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 #include <sys/types.h>
1815 #if STDC_HEADERS
1816 #include <stdlib.h>
1817 #include <stddef.h>
1818 #endif
1819 EOF
1820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1821   egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1822   rm -rf conftest*
1823   ac_cv_type_int16_t=yes
1824 else
1825   rm -rf conftest*
1826   ac_cv_type_int16_t=no
1827 fi
1828 rm -f conftest*
1829
1830 fi
1831 echo "$ac_t""$ac_cv_type_int16_t" 1>&6
1832 if test $ac_cv_type_int16_t = no; then
1833   cat >> confdefs.h <<\EOF
1834 #define int16_t short
1835 EOF
1836
1837 fi
1838
1839   echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
1840 echo "configure:1841: checking for u_int16_t" >&5
1841 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
1842   echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844   cat > conftest.$ac_ext <<EOF
1845 #line 1846 "configure"
1846 #include "confdefs.h"
1847 #include <sys/types.h>
1848 #if STDC_HEADERS
1849 #include <stdlib.h>
1850 #include <stddef.h>
1851 #endif
1852 EOF
1853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1854   egrep "(^|[^a-zA-Z_0-9])u_int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1855   rm -rf conftest*
1856   ac_cv_type_u_int16_t=yes
1857 else
1858   rm -rf conftest*
1859   ac_cv_type_u_int16_t=no
1860 fi
1861 rm -f conftest*
1862
1863 fi
1864 echo "$ac_t""$ac_cv_type_u_int16_t" 1>&6
1865 if test $ac_cv_type_u_int16_t = no; then
1866   cat >> confdefs.h <<\EOF
1867 #define u_int16_t unsigned short
1868 EOF
1869
1870 fi
1871
1872 else
1873   { echo "configure: error: Cannot find a type with size of 16 bits" 1>&2; exit 1; }
1874 fi
1875 if test "$ac_cv_sizeof_int" = 4 ; then
1876   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1877 echo "configure:1878: checking for int32_t" >&5
1878 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1879   echo $ac_n "(cached) $ac_c" 1>&6
1880 else
1881   cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884 #include <sys/types.h>
1885 #if STDC_HEADERS
1886 #include <stdlib.h>
1887 #include <stddef.h>
1888 #endif
1889 EOF
1890 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1891   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1892   rm -rf conftest*
1893   ac_cv_type_int32_t=yes
1894 else
1895   rm -rf conftest*
1896   ac_cv_type_int32_t=no
1897 fi
1898 rm -f conftest*
1899
1900 fi
1901 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
1902 if test $ac_cv_type_int32_t = no; then
1903   cat >> confdefs.h <<\EOF
1904 #define int32_t int
1905 EOF
1906
1907 fi
1908
1909   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
1910 echo "configure:1911: checking for u_int32_t" >&5
1911 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
1912   echo $ac_n "(cached) $ac_c" 1>&6
1913 else
1914   cat > conftest.$ac_ext <<EOF
1915 #line 1916 "configure"
1916 #include "confdefs.h"
1917 #include <sys/types.h>
1918 #if STDC_HEADERS
1919 #include <stdlib.h>
1920 #include <stddef.h>
1921 #endif
1922 EOF
1923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1924   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1925   rm -rf conftest*
1926   ac_cv_type_u_int32_t=yes
1927 else
1928   rm -rf conftest*
1929   ac_cv_type_u_int32_t=no
1930 fi
1931 rm -f conftest*
1932
1933 fi
1934 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
1935 if test $ac_cv_type_u_int32_t = no; then
1936   cat >> confdefs.h <<\EOF
1937 #define u_int32_t unsigned int
1938 EOF
1939
1940 fi
1941
1942 elif test "$ac_cv_sizeof_short" = 4 ; then
1943   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
1944 echo "configure:1945: checking for int32_t" >&5
1945 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
1946   echo $ac_n "(cached) $ac_c" 1>&6
1947 else
1948   cat > conftest.$ac_ext <<EOF
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951 #include <sys/types.h>
1952 #if STDC_HEADERS
1953 #include <stdlib.h>
1954 #include <stddef.h>
1955 #endif
1956 EOF
1957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1958   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1959   rm -rf conftest*
1960   ac_cv_type_int32_t=yes
1961 else
1962   rm -rf conftest*
1963   ac_cv_type_int32_t=no
1964 fi
1965 rm -f conftest*
1966
1967 fi
1968 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
1969 if test $ac_cv_type_int32_t = no; then
1970   cat >> confdefs.h <<\EOF
1971 #define int32_t short
1972 EOF
1973
1974 fi
1975
1976   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
1977 echo "configure:1978: checking for u_int32_t" >&5
1978 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
1979   echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981   cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984 #include <sys/types.h>
1985 #if STDC_HEADERS
1986 #include <stdlib.h>
1987 #include <stddef.h>
1988 #endif
1989 EOF
1990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1991   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1992   rm -rf conftest*
1993   ac_cv_type_u_int32_t=yes
1994 else
1995   rm -rf conftest*
1996   ac_cv_type_u_int32_t=no
1997 fi
1998 rm -f conftest*
1999
2000 fi
2001 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2002 if test $ac_cv_type_u_int32_t = no; then
2003   cat >> confdefs.h <<\EOF
2004 #define u_int32_t unsigned short
2005 EOF
2006
2007 fi
2008
2009 elif test "$ac_cv_sizeof_long" = 4 ; then
2010   echo $ac_n "checking for int32_t""... $ac_c" 1>&6
2011 echo "configure:2012: checking for int32_t" >&5
2012 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
2013   echo $ac_n "(cached) $ac_c" 1>&6
2014 else
2015   cat > conftest.$ac_ext <<EOF
2016 #line 2017 "configure"
2017 #include "confdefs.h"
2018 #include <sys/types.h>
2019 #if STDC_HEADERS
2020 #include <stdlib.h>
2021 #include <stddef.h>
2022 #endif
2023 EOF
2024 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2025   egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2026   rm -rf conftest*
2027   ac_cv_type_int32_t=yes
2028 else
2029   rm -rf conftest*
2030   ac_cv_type_int32_t=no
2031 fi
2032 rm -f conftest*
2033
2034 fi
2035 echo "$ac_t""$ac_cv_type_int32_t" 1>&6
2036 if test $ac_cv_type_int32_t = no; then
2037   cat >> confdefs.h <<\EOF
2038 #define int32_t long
2039 EOF
2040
2041 fi
2042
2043   echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
2044 echo "configure:2045: checking for u_int32_t" >&5
2045 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
2046   echo $ac_n "(cached) $ac_c" 1>&6
2047 else
2048   cat > conftest.$ac_ext <<EOF
2049 #line 2050 "configure"
2050 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #if STDC_HEADERS
2053 #include <stdlib.h>
2054 #include <stddef.h>
2055 #endif
2056 EOF
2057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2058   egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2059   rm -rf conftest*
2060   ac_cv_type_u_int32_t=yes
2061 else
2062   rm -rf conftest*
2063   ac_cv_type_u_int32_t=no
2064 fi
2065 rm -f conftest*
2066
2067 fi
2068 echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
2069 if test $ac_cv_type_u_int32_t = no; then
2070   cat >> confdefs.h <<\EOF
2071 #define u_int32_t unsigned long
2072 EOF
2073
2074 fi
2075
2076 else
2077   { echo "configure: error: Cannot find a type with size of 32 bits" 1>&2; exit 1; }
2078 fi
2079
2080 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
2081 echo "configure:2082: checking size of size_t" >&5
2082 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
2083   echo $ac_n "(cached) $ac_c" 1>&6
2084 else
2085   if test "$cross_compiling" = yes; then
2086     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2087 else
2088   cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 #include <stdio.h>
2092 main()
2093 {
2094   FILE *f=fopen("conftestval", "w");
2095   if (!f) exit(1);
2096   fprintf(f, "%d\n", sizeof(size_t));
2097   exit(0);
2098 }
2099 EOF
2100 if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2101 then
2102   ac_cv_sizeof_size_t=`cat conftestval`
2103 else
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -fr conftest*
2107   ac_cv_sizeof_size_t=0
2108 fi
2109 rm -fr conftest*
2110 fi
2111
2112 fi
2113 echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
2114 cat >> confdefs.h <<EOF
2115 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
2116 EOF
2117
2118 echo $ac_n "checking printf format of size_t""... $ac_c" 1>&6
2119 echo "configure:2120: checking printf format of size_t" >&5
2120 if test "$ac_cv_sizeof_size_t" = 4 ; then
2121   echo "$ac_t"""%u"" 1>&6
2122   cat >> confdefs.h <<\EOF
2123 #define SIZE_T_FMT "%u"
2124 EOF
2125
2126 else
2127   echo "$ac_t"""%lu"" 1>&6
2128   cat >> confdefs.h <<\EOF
2129 #define SIZE_T_FMT "%lu"
2130 EOF
2131
2132 fi
2133 echo $ac_n "checking size of time_t""... $ac_c" 1>&6
2134 echo "configure:2135: checking size of time_t" >&5
2135 if eval "test \"`echo '$''{'unet_cv_sizeof_time_t'+set}'`\" = set"; then
2136   echo $ac_n "(cached) $ac_c" 1>&6
2137 else
2138   if test "$cross_compiling" = yes; then
2139   unet_cv_sizeof_time_t=0
2140 else
2141   cat > conftest.$ac_ext <<EOF
2142 #line 2143 "configure"
2143 #include "confdefs.h"
2144 #include <stdio.h>
2145 #include <sys/types.h>
2146 main()
2147 {
2148   FILE *f=fopen("conftestval", "w");
2149   if (!f) exit(1);
2150   fprintf(f, "%d\n", sizeof(time_t));
2151   exit(0);
2152 }
2153 EOF
2154 if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2155 then
2156   unet_cv_sizeof_time_t=`cat conftestval`
2157 else
2158   echo "configure: failed program was:" >&5
2159   cat conftest.$ac_ext >&5
2160   rm -fr conftest*
2161   unet_cv_sizeof_time_t=0
2162 fi
2163 rm -fr conftest*
2164 fi
2165
2166 fi
2167
2168 if test "$unet_cv_sizeof_time_t" = 0 ; then
2169   echo "$ac_t""unknown" 1>&6
2170   cat >> confdefs.h <<\EOF
2171 #define TIME_T_FMT "%lu"
2172 EOF
2173
2174   cat >> confdefs.h <<\EOF
2175 #define STIME_T_FMT "%ld"
2176 EOF
2177
2178 else
2179   echo "$ac_t""$unet_cv_sizeof_time_t" 1>&6
2180   echo $ac_n "checking printf format of time_t""... $ac_c" 1>&6
2181 echo "configure:2182: checking printf format of time_t" >&5
2182   if test "$unet_cv_sizeof_time_t" = "$ac_cv_sizeof_long" ; then
2183     echo "$ac_t"""%lu"" 1>&6
2184     cat >> confdefs.h <<\EOF
2185 #define TIME_T_FMT "%lu"
2186 EOF
2187
2188     cat >> confdefs.h <<\EOF
2189 #define STIME_T_FMT "%ld"
2190 EOF
2191
2192   else
2193     echo "$ac_t"""%u"" 1>&6
2194     cat >> confdefs.h <<\EOF
2195 #define TIME_T_FMT "%u"
2196 EOF
2197
2198     cat >> confdefs.h <<\EOF
2199 #define STIME_T_FMT "%d"
2200 EOF
2201
2202   fi
2203 fi
2204
2205
2206 for ac_hdr in poll.h
2207 do
2208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2210 echo "configure:2211: checking for $ac_hdr" >&5
2211 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2212   echo $ac_n "(cached) $ac_c" 1>&6
2213 else
2214   cat > conftest.$ac_ext <<EOF
2215 #line 2216 "configure"
2216 #include "confdefs.h"
2217 #include <$ac_hdr>
2218 EOF
2219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2220 { (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2222 if test -z "$ac_err"; then
2223   rm -rf conftest*
2224   eval "ac_cv_header_$ac_safe=yes"
2225 else
2226   echo "$ac_err" >&5
2227   echo "configure: failed program was:" >&5
2228   cat conftest.$ac_ext >&5
2229   rm -rf conftest*
2230   eval "ac_cv_header_$ac_safe=no"
2231 fi
2232 rm -f conftest*
2233 fi
2234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2235   echo "$ac_t""yes" 1>&6
2236     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2237   cat >> confdefs.h <<EOF
2238 #define $ac_tr_hdr 1
2239 EOF
2240  
2241 else
2242   echo "$ac_t""no" 1>&6
2243 fi
2244 done
2245 if test -z "$unet_cv_func_poll_syscall" ; then
2246   echo $ac_n "checking if poll is a system call (please wait)""... $ac_c" 1>&6
2247 echo "configure:2248: checking if poll is a system call (please wait)" >&5
2248 else
2249   echo $ac_n "checking if poll is a system call""... $ac_c" 1>&6
2250 echo "configure:2251: checking if poll is a system call" >&5
2251 fi
2252 if eval "test \"`echo '$''{'unet_cv_func_poll_syscall'+set}'`\" = set"; then
2253   echo $ac_n "(cached) $ac_c" 1>&6
2254 else
2255   unet_cv_func_poll_syscall=no
2256 if test "$ac_cv_header_poll_h" = yes; then
2257   unet_dirs=`find /usr/include/sys -type f -name '*.h' -exec egrep '^#include <[^/]*/.*>' {} \; | sed -e 's/^.*<//' -e 's%/.*$%%' | sort | uniq`
2258   for i in $unet_dirs ; do
2259     if test "$unet_cv_func_poll_syscall" = no ; then
2260       unet_files=`ls /usr/include/$i/*.h 2> /dev/null`
2261       if test -n "$unet_files" ; then
2262         for j in $unet_files ; do
2263           if test "$unet_cv_func_poll_syscall" = no ; then
2264             unet_line=`egrep '^#define[[:space:]]+[[:alnum:]_]*[Pp][Oo][Ll][Ll]' $j`
2265             if test -n "$unet_line" ; then
2266               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'`
2267               unet_set=`for k in "$unet_sig" ; do echo $k; done | sed -e 's% %|%g'`
2268               unet_match=`sed -e 's/[[:space:]]//g' -e 's%/\*.*\*/%%g' -e 's/[0-9]//g' $j | egrep "$unet_set"`
2269               if test -n "$unet_match" ; then
2270                 unet_cv_func_poll_syscall=yes
2271               fi
2272             fi
2273           fi
2274         done
2275       fi
2276     fi
2277   done
2278 fi
2279
2280 fi
2281
2282 echo "$ac_t""$unet_cv_func_poll_syscall" 1>&6
2283
2284
2285 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
2286 echo "configure:2287: checking for restartable system calls" >&5
2287 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
2288   echo $ac_n "(cached) $ac_c" 1>&6
2289 else
2290   if test "$cross_compiling" = yes; then
2291     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2292 else
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 /* Exit 0 (true) if wait returns something other than -1,
2297    i.e. the pid of the child, which means that wait was restarted
2298    after getting the signal.  */
2299 #include <sys/types.h>
2300 #include <signal.h>
2301 ucatch (isig) { }
2302 main () {
2303   int i = fork (), status;
2304   if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
2305   signal (SIGINT, ucatch);
2306   status = wait(&i);
2307   if (status == -1) wait(&i);
2308   exit (status == -1);
2309 }
2310
2311 EOF
2312 if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2313 then
2314   ac_cv_sys_restartable_syscalls=yes
2315 else
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -fr conftest*
2319   ac_cv_sys_restartable_syscalls=no
2320 fi
2321 rm -fr conftest*
2322 fi
2323
2324 fi
2325
2326 echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6
2327 if test $ac_cv_sys_restartable_syscalls = yes; then
2328   cat >> confdefs.h <<\EOF
2329 #define HAVE_RESTARTABLE_SYSCALLS 1
2330 EOF
2331
2332 fi
2333
2334
2335 for ac_prog in gawk mawk nawk awk
2336 do
2337 # Extract the first word of "$ac_prog", so it can be a program name with args.
2338 set dummy $ac_prog; ac_word=$2
2339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2340 echo "configure:2341: checking for $ac_word" >&5
2341 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2342   echo $ac_n "(cached) $ac_c" 1>&6
2343 else
2344   if test -n "$AWK"; then
2345   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2346 else
2347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2348   ac_dummy="$PATH"
2349   for ac_dir in $ac_dummy; do
2350     test -z "$ac_dir" && ac_dir=.
2351     if test -f $ac_dir/$ac_word; then
2352       ac_cv_prog_AWK="$ac_prog"
2353       break
2354     fi
2355   done
2356   IFS="$ac_save_ifs"
2357 fi
2358 fi
2359 AWK="$ac_cv_prog_AWK"
2360 if test -n "$AWK"; then
2361   echo "$ac_t""$AWK" 1>&6
2362 else
2363   echo "$ac_t""no" 1>&6
2364 fi
2365
2366 test -n "$AWK" && break
2367 done
2368
2369 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2370 echo "configure:2371: checking whether ${MAKE-make} sets \${MAKE}" >&5
2371 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2372 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2373   echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375   cat > conftestmake <<\EOF
2376 all:
2377         @echo 'ac_maketemp="${MAKE}"'
2378 EOF
2379 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2380 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2381 if test -n "$ac_maketemp"; then
2382   eval ac_cv_prog_make_${ac_make}_set=yes
2383 else
2384   eval ac_cv_prog_make_${ac_make}_set=no
2385 fi
2386 rm -f conftestmake
2387 fi
2388 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2389   echo "$ac_t""yes" 1>&6
2390   SET_MAKE=
2391 else
2392   echo "$ac_t""no" 1>&6
2393   SET_MAKE="MAKE=${MAKE-make}"
2394 fi
2395
2396 # Find a good install program.  We prefer a C program (faster),
2397 # so one script is as good as another.  But avoid the broken or
2398 # incompatible versions:
2399 # SysV /etc/install, /usr/sbin/install
2400 # SunOS /usr/etc/install
2401 # IRIX /sbin/install
2402 # AIX /bin/install
2403 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2404 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2405 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2406 # ./install, which can be erroneously created by make from ./install.sh.
2407 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2408 echo "configure:2409: checking for a BSD compatible install" >&5
2409 if test -z "$INSTALL"; then
2410 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2411   echo $ac_n "(cached) $ac_c" 1>&6
2412 else
2413     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2414   for ac_dir in $PATH; do
2415     # Account for people who put trailing slashes in PATH elements.
2416     case "$ac_dir/" in
2417     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2418     *)
2419       # OSF1 and SCO ODT 3.0 have their own names for install.
2420       # Don't use installbsd from OSF since it installs stuff as root
2421       # by default.
2422       for ac_prog in ginstall scoinst install; do
2423         if test -f $ac_dir/$ac_prog; then
2424           if test $ac_prog = install &&
2425             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2426             # AIX install.  It has an incompatible calling convention.
2427             :
2428           else
2429             ac_cv_path_install="$ac_dir/$ac_prog -c"
2430             break 2
2431           fi
2432         fi
2433       done
2434       ;;
2435     esac
2436   done
2437   IFS="$ac_save_IFS"
2438
2439 fi
2440   if test "${ac_cv_path_install+set}" = set; then
2441     INSTALL="$ac_cv_path_install"
2442   else
2443     # As a last resort, use the slow shell script.  We don't cache a
2444     # path for INSTALL within a source directory, because that will
2445     # break other packages using the cache if that directory is
2446     # removed, or if the path is relative.
2447     INSTALL="$ac_install_sh"
2448   fi
2449 fi
2450 echo "$ac_t""$INSTALL" 1>&6
2451
2452 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2453 # It thinks the first close brace ends the variable substitution.
2454 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2455
2456 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2457
2458 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2459
2460 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2461 echo "configure:2462: checking whether ln -s works" >&5
2462 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2463   echo $ac_n "(cached) $ac_c" 1>&6
2464 else
2465   rm -f conftestdata
2466 if ln -s X conftestdata 2>/dev/null
2467 then
2468   rm -f conftestdata
2469   ac_cv_prog_LN_S="ln -s"
2470 else
2471   ac_cv_prog_LN_S=ln
2472 fi
2473 fi
2474 LN_S="$ac_cv_prog_LN_S"
2475 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2476   echo "$ac_t""yes" 1>&6
2477 else
2478   echo "$ac_t""no" 1>&6
2479 fi
2480
2481 for ac_prog in rm
2482 do
2483 # Extract the first word of "$ac_prog", so it can be a program name with args.
2484 set dummy $ac_prog; ac_word=$2
2485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_word" >&5
2487 if eval "test \"`echo '$''{'ac_cv_path_RMPROG'+set}'`\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   case "$RMPROG" in
2491   /*)
2492   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a path.
2493   ;;
2494   ?:/*)                  
2495   ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a dos path.
2496   ;;
2497   *)
2498   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2499   ac_dummy="$PATH"
2500   for ac_dir in $ac_dummy; do 
2501     test -z "$ac_dir" && ac_dir=.
2502     if test -f $ac_dir/$ac_word; then
2503       ac_cv_path_RMPROG="$ac_dir/$ac_word"
2504       break
2505     fi
2506   done
2507   IFS="$ac_save_ifs"
2508   ;;
2509 esac
2510 fi
2511 RMPROG="$ac_cv_path_RMPROG"
2512 if test -n "$RMPROG"; then
2513   echo "$ac_t""$RMPROG" 1>&6
2514 else
2515   echo "$ac_t""no" 1>&6
2516 fi
2517
2518 test -n "$RMPROG" && break
2519 done
2520 test -n "$RMPROG" || RMPROG="/bin/rm"
2521
2522 for ac_prog in sh
2523 do
2524 # Extract the first word of "$ac_prog", so it can be a program name with args.
2525 set dummy $ac_prog; ac_word=$2
2526 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2527 echo "configure:2528: checking for $ac_word" >&5
2528 if eval "test \"`echo '$''{'ac_cv_path_SHPROG'+set}'`\" = set"; then
2529   echo $ac_n "(cached) $ac_c" 1>&6
2530 else
2531   case "$SHPROG" in
2532   /*)
2533   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a path.
2534   ;;
2535   ?:/*)                  
2536   ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a dos path.
2537   ;;
2538   *)
2539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2540   ac_dummy="$PATH"
2541   for ac_dir in $ac_dummy; do 
2542     test -z "$ac_dir" && ac_dir=.
2543     if test -f $ac_dir/$ac_word; then
2544       ac_cv_path_SHPROG="$ac_dir/$ac_word"
2545       break
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   ;;
2550 esac
2551 fi
2552 SHPROG="$ac_cv_path_SHPROG"
2553 if test -n "$SHPROG"; then
2554   echo "$ac_t""$SHPROG" 1>&6
2555 else
2556   echo "$ac_t""no" 1>&6
2557 fi
2558
2559 test -n "$SHPROG" && break
2560 done
2561 test -n "$SHPROG" || SHPROG="/bin/sh"
2562
2563
2564 echo $ac_n "checking for set -h""... $ac_c" 1>&6
2565 echo "configure:2566: checking for set -h" >&5
2566 if eval "test \"`echo '$''{'unet_cv_sys_set_h'+set}'`\" = set"; then
2567   echo $ac_n "(cached) $ac_c" 1>&6
2568 else
2569   echo "set -h; exit $?" > conftest ;
2570 $SHPROG ./conftest 2> conftest.out
2571 ac_err=`grep -v '^ *+' conftest.out`
2572 if test -z "$ac_err"; then
2573   unet_cv_sys_set_h=yes
2574 else
2575   unet_cv_sys_set_h=no
2576 fi
2577 $RMPROG -fr conftest*
2578 fi
2579
2580 echo "$ac_t""$unet_cv_sys_set_h" 1>&6
2581
2582
2583 echo $ac_n "checking for posix non-blocking""... $ac_c" 1>&6
2584 echo "configure:2585: checking for posix non-blocking" >&5
2585 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_posix'+set}'`\" = set"; then
2586   echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588   if test "$cross_compiling" = yes; then
2589     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2590 else
2591   cat > conftest.$ac_ext <<EOF
2592 #line 2593 "configure"
2593 #include "confdefs.h"
2594 #include <sys/types.h>
2595 #include <sys/socket.h>
2596 #include <fcntl.h>
2597 #include <sys/ioctl.h>
2598 #include <sys/file.h>
2599 #include <signal.h>
2600 $ac_cv_type_signal alarmed() { exit(1); }
2601 int main(void)
2602 {
2603   char b[12];
2604   struct sockaddr x;
2605   size_t l = sizeof(x);
2606   int f = socket(AF_INET, SOCK_DGRAM, 0);
2607   if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK)))
2608   {
2609     signal(SIGALRM, alarmed);
2610     alarm(2);
2611     recvfrom(f, b, 12, 0, &x, &l);
2612     alarm(0);
2613     exit(0);
2614   }
2615   exit(1);
2616 }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2619 then
2620   unet_cv_sys_nonblocking_posix=yes
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   rm -fr conftest*
2625   unet_cv_sys_nonblocking_posix=no
2626 fi
2627 rm -fr conftest*
2628 fi
2629
2630 fi
2631
2632 echo "$ac_t""$unet_cv_sys_nonblocking_posix" 1>&6
2633 if test $unet_cv_sys_nonblocking_posix = yes; then
2634   cat >> confdefs.h <<\EOF
2635 #define NBLOCK_POSIX 1
2636 EOF
2637
2638 else
2639 echo $ac_n "checking for bsd non-blocking""... $ac_c" 1>&6
2640 echo "configure:2641: checking for bsd non-blocking" >&5
2641 if eval "test \"`echo '$''{'unet_cv_sys_nonblocking_bsd'+set}'`\" = set"; then
2642   echo $ac_n "(cached) $ac_c" 1>&6
2643 else
2644   if test "$cross_compiling" = yes; then
2645     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2646 else
2647   cat > conftest.$ac_ext <<EOF
2648 #line 2649 "configure"
2649 #include "confdefs.h"
2650 #include <sys/types.h>
2651 #include <sys/socket.h>
2652 #include <fcntl.h>
2653 #include <sys/ioctl.h>
2654 #include <sys/file.h>
2655 #include <signal.h>
2656 $ac_cv_type_signal alarmed() { exit(1); }
2657 int main(void)
2658 {
2659   char b[12];
2660   struct sockaddr x;
2661   size_t l = sizeof(x);
2662   int f = socket(AF_INET, SOCK_DGRAM, 0);
2663   if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY)))
2664   {
2665     signal(SIGALRM, alarmed);
2666     alarm(2);
2667     recvfrom(f, b, 12, 0, &x, &l);
2668     alarm(0);
2669     exit(0);
2670   }
2671   exit(1);
2672 }
2673 EOF
2674 if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2675 then
2676   unet_cv_sys_nonblocking_bsd=yes
2677 else
2678   echo "configure: failed program was:" >&5
2679   cat conftest.$ac_ext >&5
2680   rm -fr conftest*
2681   unet_cv_sys_nonblocking_bsd=no
2682 fi
2683 rm -fr conftest*
2684 fi
2685
2686 fi
2687
2688 echo "$ac_t""$unet_cv_sys_nonblocking_bsd" 1>&6
2689 if test $unet_cv_sys_nonblocking_bsd = yes; then
2690   cat >> confdefs.h <<\EOF
2691 #define NBLOCK_BSD 1
2692 EOF
2693
2694 else
2695   cat >> confdefs.h <<\EOF
2696 #define NBLOCK_SYSV 1
2697 EOF
2698
2699 fi
2700 fi
2701 echo $ac_n "checking for posix signals""... $ac_c" 1>&6
2702 echo "configure:2703: checking for posix signals" >&5
2703 if eval "test \"`echo '$''{'unet_cv_sys_signal_posix'+set}'`\" = set"; then
2704   echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #include <signal.h>
2710 int main() {
2711 sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)
2712 ; return 0; }
2713 EOF
2714 if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2715   rm -rf conftest*
2716   unet_cv_sys_signal_posix=yes
2717 else
2718   echo "configure: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   rm -rf conftest*
2721   unet_cv_sys_signal_posix=no
2722 fi
2723 rm -f conftest*
2724 fi
2725
2726 echo "$ac_t""$unet_cv_sys_signal_posix" 1>&6
2727 if test $unet_cv_sys_signal_posix = yes; then
2728   cat >> confdefs.h <<\EOF
2729 #define POSIX_SIGNALS 1
2730 EOF
2731
2732 else
2733 echo $ac_n "checking for bsd reliable signals""... $ac_c" 1>&6
2734 echo "configure:2735: checking for bsd reliable signals" >&5
2735 if eval "test \"`echo '$''{'unet_cv_sys_signal_bsd'+set}'`\" = set"; then
2736   echo $ac_n "(cached) $ac_c" 1>&6
2737 else
2738   if test "$cross_compiling" = yes; then
2739     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2740 else
2741   cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <signal.h>
2745 int calls = 0;
2746 $ac_cv_type_signal handler()
2747 {
2748   if (calls) return;
2749   calls++;
2750   kill(getpid(), SIGTERM);
2751   sleep(1);
2752 }
2753 int main(void)
2754 {
2755   signal(SIGTERM, handler);
2756   kill(getpid(), SIGTERM);
2757   exit (0);
2758 }
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2761 then
2762   unet_cv_sys_signal_bsd=yes
2763 else
2764   echo "configure: failed program was:" >&5
2765   cat conftest.$ac_ext >&5
2766   rm -fr conftest*
2767   unet_cv_sys_signal_bsd=no
2768 fi
2769 rm -fr conftest*
2770 fi
2771
2772 fi
2773
2774 echo "$ac_t""$unet_cv_sys_signal_bsd" 1>&6
2775 if test $unet_cv_sys_signal_bsd = yes; then
2776   cat >> confdefs.h <<\EOF
2777 #define BSD_RELIABLE_SIGNALS 1
2778 EOF
2779
2780 else
2781   cat >> confdefs.h <<\EOF
2782 #define SYSV_UNRELIABLE_SIGNALS 1
2783 EOF
2784
2785 fi
2786 fi
2787
2788 echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
2789 echo "configure:2790: checking if the compiler understands -pipe" >&5
2790 unet_cv_pipe_flags="$ac_cv_prog_gcc"
2791 if test "$ac_cv_prog_gcc" = no; then
2792   OLDCFLAGS="$CFLAGS"
2793   CFLAGS="$CFLAGS -pipe"
2794   cat > conftest.$ac_ext <<EOF
2795 #line 2796 "configure"
2796 #include "confdefs.h"
2797
2798 int main() {
2799
2800 ; return 0; }
2801 EOF
2802 if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2803   rm -rf conftest*
2804   unet_cv_pipe_flags=yes
2805 else
2806   echo "configure: failed program was:" >&5
2807   cat conftest.$ac_ext >&5
2808 fi
2809 rm -f conftest*
2810   CFLAGS="$OLDCFLAGS"
2811 fi
2812 echo "$ac_t""$unet_cv_pipe_flags" 1>&6
2813 if test "$unet_cv_pipe_flags" = yes ; then
2814   x=`echo $CFLAGS | grep 'pipe' 2>/dev/null`
2815   if test "$x" = "" ; then
2816     CFLAGS="$CFLAGS -pipe"
2817   fi
2818 fi
2819
2820
2821
2822
2823
2824
2825 uname=`uname`
2826 echo $ac_n "checking for OS type""... $ac_c" 1>&6
2827 echo "configure:2828: checking for OS type" >&5
2828 case "$uname" in
2829   *inux*)
2830     echo "$ac_t""$uname found." 1>&6
2831     OSDEP_C="os_linux.c"
2832   ;;
2833   *olaris*)
2834     echo "$ac_t""$uname found." 1>&6
2835     OSDEP_C="os_solaris.c"
2836   ;;
2837   *SunOS*)
2838     echo "$ac_t""$uname found." 1>&6
2839     OSDEP_C="os_solaris.c"
2840   ;;
2841   *BSD*)
2842     echo "$ac_t""$uname found." 1>&6
2843     OSDEP_C="os_bsd.c"
2844   ;;
2845   *)
2846     echo "$ac_t""Unknown OS. Using generic routines." 1>&6
2847     OSDEP_C="os_generic.c"
2848   ;;
2849 esac
2850
2851
2852 trap '' 1 2 15
2853 cat > confcache <<\EOF
2854 # This file is a shell script that caches the results of configure
2855 # tests run on this system so they can be shared between configure
2856 # scripts and configure runs.  It is not useful on other systems.
2857 # If it contains results you don't want to keep, you may remove or edit it.
2858 #
2859 # By default, configure uses ./config.cache as the cache file,
2860 # creating it if it does not exist already.  You can give configure
2861 # the --cache-file=FILE option to use a different cache file; that is
2862 # what configure does when it calls configure scripts in
2863 # subdirectories, so they share the cache.
2864 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2865 # config.status only pays attention to the cache file if you give it the
2866 # --recheck option to rerun configure.
2867 #
2868 EOF
2869 # The following way of writing the cache mishandles newlines in values,
2870 # but we know of no workaround that is simple, portable, and efficient.
2871 # So, don't put newlines in cache variables' values.
2872 # Ultrix sh set writes to stderr and can't be redirected directly,
2873 # and sets the high bit in the cache file unless we assign to the vars.
2874 (set) 2>&1 |
2875   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2876   *ac_space=\ *)
2877     # `set' does not quote correctly, so add quotes (double-quote substitution
2878     # turns \\\\ into \\, and sed turns \\ into \).
2879     sed -n \
2880       -e "s/'/'\\\\''/g" \
2881       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2882     ;;
2883   *)
2884     # `set' quotes correctly as required by POSIX, so do not add quotes.
2885     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2886     ;;
2887   esac >> confcache
2888 if cmp -s $cache_file confcache; then
2889   :
2890 else
2891   if test -w $cache_file; then
2892     echo "updating cache $cache_file"
2893     cat confcache > $cache_file
2894   else
2895     echo "not updating unwritable cache $cache_file"
2896   fi
2897 fi
2898 rm -f confcache
2899
2900 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2901
2902 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2903 # Let make expand exec_prefix.
2904 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2905
2906 # Any assignment to VPATH causes Sun make to only execute
2907 # the first set of double-colon rules, so remove it if not needed.
2908 # If there is a colon in the path, we need to keep it.
2909 if test "x$srcdir" = x.; then
2910   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2911 fi
2912
2913 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2914
2915 DEFS=-DHAVE_CONFIG_H
2916
2917 # Without the "./", some shells look in PATH for config.status.
2918 : ${CONFIG_STATUS=./config.status}
2919
2920 echo creating $CONFIG_STATUS
2921 rm -f $CONFIG_STATUS
2922 cat > $CONFIG_STATUS <<EOF
2923 #! /bin/sh
2924 # Generated automatically by configure.
2925 # Run this file to recreate the current configuration.
2926 # This directory was configured as follows,
2927 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2928 #
2929 # $0 $ac_configure_args
2930 #
2931 # Compiler output produced by configure, useful for debugging
2932 # configure, is in ./config.log if it exists.
2933
2934 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2935 for ac_option
2936 do
2937   case "\$ac_option" in
2938   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2939     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2940     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2941   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2942     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2943     exit 0 ;;
2944   -help | --help | --hel | --he | --h)
2945     echo "\$ac_cs_usage"; exit 0 ;;
2946   *) echo "\$ac_cs_usage"; exit 1 ;;
2947   esac
2948 done
2949
2950 ac_given_srcdir=$srcdir
2951 ac_given_INSTALL="$INSTALL"
2952
2953 trap 'rm -fr `echo "config-sh Configure ../Makefile ../ircd/Makefile ../doc/Makefile Makefile setup.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2954 EOF
2955 cat >> $CONFIG_STATUS <<EOF
2956
2957 # Protect against being on the right side of a sed subst in config.status.
2958 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2959  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2960 $ac_vpsub
2961 $extrasub
2962 s%@SHELL@%$SHELL%g
2963 s%@CFLAGS@%$CFLAGS%g
2964 s%@CPPFLAGS@%$CPPFLAGS%g
2965 s%@CXXFLAGS@%$CXXFLAGS%g
2966 s%@FFLAGS@%$FFLAGS%g
2967 s%@DEFS@%$DEFS%g
2968 s%@LDFLAGS@%$LDFLAGS%g
2969 s%@LIBS@%$LIBS%g
2970 s%@exec_prefix@%$exec_prefix%g
2971 s%@prefix@%$prefix%g
2972 s%@program_transform_name@%$program_transform_name%g
2973 s%@bindir@%$bindir%g
2974 s%@sbindir@%$sbindir%g
2975 s%@libexecdir@%$libexecdir%g
2976 s%@datadir@%$datadir%g
2977 s%@sysconfdir@%$sysconfdir%g
2978 s%@sharedstatedir@%$sharedstatedir%g
2979 s%@localstatedir@%$localstatedir%g
2980 s%@libdir@%$libdir%g
2981 s%@includedir@%$includedir%g
2982 s%@oldincludedir@%$oldincludedir%g
2983 s%@infodir@%$infodir%g
2984 s%@mandir@%$mandir%g
2985 s%@CC@%$CC%g
2986 s%@CPP@%$CPP%g
2987 s%@AWK@%$AWK%g
2988 s%@SET_MAKE@%$SET_MAKE%g
2989 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2990 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2991 s%@INSTALL_DATA@%$INSTALL_DATA%g
2992 s%@LN_S@%$LN_S%g
2993 s%@RMPROG@%$RMPROG%g
2994 s%@SHPROG@%$SHPROG%g
2995 s%@unet_cv_sys_set_h@%$unet_cv_sys_set_h%g
2996 s%@ac_cv_header_poll_h@%$ac_cv_header_poll_h%g
2997 s%@ac_cv_header_syslog_h@%$ac_cv_header_syslog_h%g
2998 s%@unet_cv_func_poll_syscall@%$unet_cv_func_poll_syscall%g
2999 s%@OSDEP_C@%$OSDEP_C%g
3000
3001 CEOF
3002 EOF
3003
3004 cat >> $CONFIG_STATUS <<\EOF
3005
3006 # Split the substitutions into bite-sized pieces for seds with
3007 # small command number limits, like on Digital OSF/1 and HP-UX.
3008 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3009 ac_file=1 # Number of current file.
3010 ac_beg=1 # First line for current file.
3011 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3012 ac_more_lines=:
3013 ac_sed_cmds=""
3014 while $ac_more_lines; do
3015   if test $ac_beg -gt 1; then
3016     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3017   else
3018     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3019   fi
3020   if test ! -s conftest.s$ac_file; then
3021     ac_more_lines=false
3022     rm -f conftest.s$ac_file
3023   else
3024     if test -z "$ac_sed_cmds"; then
3025       ac_sed_cmds="sed -f conftest.s$ac_file"
3026     else
3027       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3028     fi
3029     ac_file=`expr $ac_file + 1`
3030     ac_beg=$ac_end
3031     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3032   fi
3033 done
3034 if test -z "$ac_sed_cmds"; then
3035   ac_sed_cmds=cat
3036 fi
3037 EOF
3038
3039 cat >> $CONFIG_STATUS <<EOF
3040
3041 CONFIG_FILES=\${CONFIG_FILES-"config-sh Configure ../Makefile ../ircd/Makefile ../doc/Makefile Makefile"}
3042 EOF
3043 cat >> $CONFIG_STATUS <<\EOF
3044 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3045   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3046   case "$ac_file" in
3047   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3048        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3049   *) ac_file_in="${ac_file}.in" ;;
3050   esac
3051
3052   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3053
3054   # Remove last slash and all that follows it.  Not all systems have dirname.
3055   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3056   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3057     # The file is in a subdirectory.
3058     test ! -d "$ac_dir" && mkdir "$ac_dir"
3059     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3060     # A "../" for each directory in $ac_dir_suffix.
3061     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3062   else
3063     ac_dir_suffix= ac_dots=
3064   fi
3065
3066   case "$ac_given_srcdir" in
3067   .)  srcdir=.
3068       if test -z "$ac_dots"; then top_srcdir=.
3069       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3070   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3071   *) # Relative path.
3072     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3073     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3074   esac
3075
3076   case "$ac_given_INSTALL" in
3077   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3078   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3079   esac
3080
3081   echo creating "$ac_file"
3082   rm -f "$ac_file"
3083   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3084   case "$ac_file" in
3085   *Makefile*) ac_comsub="1i\\
3086 # $configure_input" ;;
3087   *) ac_comsub= ;;
3088   esac
3089
3090   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3091   sed -e "$ac_comsub
3092 s%@configure_input@%$configure_input%g
3093 s%@srcdir@%$srcdir%g
3094 s%@top_srcdir@%$top_srcdir%g
3095 s%@INSTALL@%$INSTALL%g
3096 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3097 fi; done
3098 rm -f conftest.s*
3099
3100 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3101 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3102 #
3103 # ac_d sets the value in "#define NAME VALUE" lines.
3104 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3105 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3106 ac_dC='\3'
3107 ac_dD='%g'
3108 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3109 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3110 ac_uB='\([      ]\)%\1#\2define\3'
3111 ac_uC=' '
3112 ac_uD='\4%g'
3113 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3114 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3115 ac_eB='$%\1#\2define\3'
3116 ac_eC=' '
3117 ac_eD='%g'
3118
3119 if test "${CONFIG_HEADERS+set}" != set; then
3120 EOF
3121 cat >> $CONFIG_STATUS <<EOF
3122   CONFIG_HEADERS="setup.h"
3123 EOF
3124 cat >> $CONFIG_STATUS <<\EOF
3125 fi
3126 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3127   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3128   case "$ac_file" in
3129   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3130        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3131   *) ac_file_in="${ac_file}.in" ;;
3132   esac
3133
3134   echo creating $ac_file
3135
3136   rm -f conftest.frag conftest.in conftest.out
3137   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3138   cat $ac_file_inputs > conftest.in
3139
3140 EOF
3141
3142 # Transform confdefs.h into a sed script conftest.vals that substitutes
3143 # the proper values into config.h.in to produce config.h.  And first:
3144 # Protect against being on the right side of a sed subst in config.status.
3145 # Protect against being in an unquoted here document in config.status.
3146 rm -f conftest.vals
3147 cat > conftest.hdr <<\EOF
3148 s/[\\&%]/\\&/g
3149 s%[\\$`]%\\&%g
3150 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3151 s%ac_d%ac_u%gp
3152 s%ac_u%ac_e%gp
3153 EOF
3154 sed -n -f conftest.hdr confdefs.h > conftest.vals
3155 rm -f conftest.hdr
3156
3157 # This sed command replaces #undef with comments.  This is necessary, for
3158 # example, in the case of _POSIX_SOURCE, which is predefined and required
3159 # on some systems where configure will not decide to define it.
3160 cat >> conftest.vals <<\EOF
3161 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3162 EOF
3163
3164 # Break up conftest.vals because some shells have a limit on
3165 # the size of here documents, and old seds have small limits too.
3166
3167 rm -f conftest.tail
3168 while :
3169 do
3170   ac_lines=`grep -c . conftest.vals`
3171   # grep -c gives empty output for an empty file on some AIX systems.
3172   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3173   # Write a limited-size here document to conftest.frag.
3174   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3175   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3176   echo 'CEOF
3177   sed -f conftest.frag conftest.in > conftest.out
3178   rm -f conftest.in
3179   mv conftest.out conftest.in
3180 ' >> $CONFIG_STATUS
3181   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3182   rm -f conftest.vals
3183   mv conftest.tail conftest.vals
3184 done
3185 rm -f conftest.vals
3186
3187 cat >> $CONFIG_STATUS <<\EOF
3188   rm -f conftest.frag conftest.h
3189   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3190   cat conftest.in >> conftest.h
3191   rm -f conftest.in
3192   if cmp -s $ac_file conftest.h 2>/dev/null; then
3193     echo "$ac_file is unchanged"
3194     rm -f conftest.h
3195   else
3196     # Remove last slash and all that follows it.  Not all systems have dirname.
3197       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3198       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3199       # The file is in a subdirectory.
3200       test ! -d "$ac_dir" && mkdir "$ac_dir"
3201     fi
3202     rm -f $ac_file
3203     mv conftest.h $ac_file
3204   fi
3205 fi; done
3206
3207 EOF
3208 cat >> $CONFIG_STATUS <<EOF
3209
3210 EOF
3211 cat >> $CONFIG_STATUS <<\EOF
3212 echo timestamp > stamp-h;
3213 exit 0
3214 EOF
3215 chmod +x $CONFIG_STATUS
3216 rm -fr confdefs* $ac_clean_files
3217 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3218