Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adapt to lastest changes in dict: Create dicts before use
[simgrid.git] / src / nws_portability / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-debug         include debugging info when compiling"
16 ac_help="$ac_help
17   --enable-threads        test for threads support"
18 ac_help="$ac_help
19   --disable-sigalarm        don't use SIGALRM"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 SHELL=${CONFIG_SHELL-/bin/sh}
59 # Maximum number of lines to put in a shell here document.
60 ac_max_here_lines=12
61
62 ac_prev=
63 for ac_option
64 do
65
66   # If the previous option needs an argument, assign it.
67   if test -n "$ac_prev"; then
68     eval "$ac_prev=\$ac_option"
69     ac_prev=
70     continue
71   fi
72
73   case "$ac_option" in
74   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
75   *) ac_optarg= ;;
76   esac
77
78   # Accept the important Cygnus configure options, so we can diagnose typos.
79
80   case "$ac_option" in
81
82   -bindir | --bindir | --bindi | --bind | --bin | --bi)
83     ac_prev=bindir ;;
84   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
85     bindir="$ac_optarg" ;;
86
87   -build | --build | --buil | --bui | --bu)
88     ac_prev=build ;;
89   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90     build="$ac_optarg" ;;
91
92   -cache-file | --cache-file | --cache-fil | --cache-fi \
93   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
94     ac_prev=cache_file ;;
95   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
96   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
97     cache_file="$ac_optarg" ;;
98
99   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
100     ac_prev=datadir ;;
101   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
102   | --da=*)
103     datadir="$ac_optarg" ;;
104
105   -disable-* | --disable-*)
106     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
107     # Reject names that are not valid shell variable names.
108     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
109       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
110     fi
111     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
112     eval "enable_${ac_feature}=no" ;;
113
114   -enable-* | --enable-*)
115     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
116     # Reject names that are not valid shell variable names.
117     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
118       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119     fi
120     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121     case "$ac_option" in
122       *=*) ;;
123       *) ac_optarg=yes ;;
124     esac
125     eval "enable_${ac_feature}='$ac_optarg'" ;;
126
127   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
128   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
129   | --exec | --exe | --ex)
130     ac_prev=exec_prefix ;;
131   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
132   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
133   | --exec=* | --exe=* | --ex=*)
134     exec_prefix="$ac_optarg" ;;
135
136   -gas | --gas | --ga | --g)
137     # Obsolete; use --with-gas.
138     with_gas=yes ;;
139
140   -help | --help | --hel | --he)
141     # Omit some internal or obsolete options to make the list less imposing.
142     # This message is too long to be a string in the A/UX 3.1 sh.
143     cat << EOF
144 Usage: configure [options] [host]
145 Options: [defaults in brackets after descriptions]
146 Configuration:
147   --cache-file=FILE       cache test results in FILE
148   --help                  print this message
149   --no-create             do not create output files
150   --quiet, --silent       do not print \`checking...' messages
151   --version               print the version of autoconf that created configure
152 Directory and file names:
153   --prefix=PREFIX         install architecture-independent files in PREFIX
154                           [$ac_default_prefix]
155   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
156                           [same as prefix]
157   --bindir=DIR            user executables in DIR [EPREFIX/bin]
158   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
159   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
160   --datadir=DIR           read-only architecture-independent data in DIR
161                           [PREFIX/share]
162   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
163   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
164                           [PREFIX/com]
165   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
166   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
167   --includedir=DIR        C header files in DIR [PREFIX/include]
168   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
169   --infodir=DIR           info documentation in DIR [PREFIX/info]
170   --mandir=DIR            man documentation in DIR [PREFIX/man]
171   --srcdir=DIR            find the sources in DIR [configure dir or ..]
172   --program-prefix=PREFIX prepend PREFIX to installed program names
173   --program-suffix=SUFFIX append SUFFIX to installed program names
174   --program-transform-name=PROGRAM
175                           run sed PROGRAM on installed program names
176 EOF
177     cat << EOF
178 Host type:
179   --build=BUILD           configure for building on BUILD [BUILD=HOST]
180   --host=HOST             configure for HOST [guessed]
181   --target=TARGET         configure for TARGET [TARGET=HOST]
182 Features and packages:
183   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
184   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
185   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
186   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
187   --x-includes=DIR        X include files are in DIR
188   --x-libraries=DIR       X library files are in DIR
189 EOF
190     if test -n "$ac_help"; then
191       echo "--enable and --with options recognized:$ac_help"
192     fi
193     exit 0 ;;
194
195   -host | --host | --hos | --ho)
196     ac_prev=host ;;
197   -host=* | --host=* | --hos=* | --ho=*)
198     host="$ac_optarg" ;;
199
200   -includedir | --includedir | --includedi | --included | --include \
201   | --includ | --inclu | --incl | --inc)
202     ac_prev=includedir ;;
203   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
204   | --includ=* | --inclu=* | --incl=* | --inc=*)
205     includedir="$ac_optarg" ;;
206
207   -infodir | --infodir | --infodi | --infod | --info | --inf)
208     ac_prev=infodir ;;
209   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
210     infodir="$ac_optarg" ;;
211
212   -libdir | --libdir | --libdi | --libd)
213     ac_prev=libdir ;;
214   -libdir=* | --libdir=* | --libdi=* | --libd=*)
215     libdir="$ac_optarg" ;;
216
217   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
218   | --libexe | --libex | --libe)
219     ac_prev=libexecdir ;;
220   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
221   | --libexe=* | --libex=* | --libe=*)
222     libexecdir="$ac_optarg" ;;
223
224   -localstatedir | --localstatedir | --localstatedi | --localstated \
225   | --localstate | --localstat | --localsta | --localst \
226   | --locals | --local | --loca | --loc | --lo)
227     ac_prev=localstatedir ;;
228   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
229   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
230   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
231     localstatedir="$ac_optarg" ;;
232
233   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
234     ac_prev=mandir ;;
235   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
236     mandir="$ac_optarg" ;;
237
238   -nfp | --nfp | --nf)
239     # Obsolete; use --without-fp.
240     with_fp=no ;;
241
242   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
243   | --no-cr | --no-c)
244     no_create=yes ;;
245
246   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
247   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248     no_recursion=yes ;;
249
250   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
251   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
252   | --oldin | --oldi | --old | --ol | --o)
253     ac_prev=oldincludedir ;;
254   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
255   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
256   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
257     oldincludedir="$ac_optarg" ;;
258
259   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
260     ac_prev=prefix ;;
261   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
262     prefix="$ac_optarg" ;;
263
264   -program-prefix | --program-prefix | --program-prefi | --program-pref \
265   | --program-pre | --program-pr | --program-p)
266     ac_prev=program_prefix ;;
267   -program-prefix=* | --program-prefix=* | --program-prefi=* \
268   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
269     program_prefix="$ac_optarg" ;;
270
271   -program-suffix | --program-suffix | --program-suffi | --program-suff \
272   | --program-suf | --program-su | --program-s)
273     ac_prev=program_suffix ;;
274   -program-suffix=* | --program-suffix=* | --program-suffi=* \
275   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
276     program_suffix="$ac_optarg" ;;
277
278   -program-transform-name | --program-transform-name \
279   | --program-transform-nam | --program-transform-na \
280   | --program-transform-n | --program-transform- \
281   | --program-transform | --program-transfor \
282   | --program-transfo | --program-transf \
283   | --program-trans | --program-tran \
284   | --progr-tra | --program-tr | --program-t)
285     ac_prev=program_transform_name ;;
286   -program-transform-name=* | --program-transform-name=* \
287   | --program-transform-nam=* | --program-transform-na=* \
288   | --program-transform-n=* | --program-transform-=* \
289   | --program-transform=* | --program-transfor=* \
290   | --program-transfo=* | --program-transf=* \
291   | --program-trans=* | --program-tran=* \
292   | --progr-tra=* | --program-tr=* | --program-t=*)
293     program_transform_name="$ac_optarg" ;;
294
295   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
296   | -silent | --silent | --silen | --sile | --sil)
297     silent=yes ;;
298
299   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
300     ac_prev=sbindir ;;
301   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
302   | --sbi=* | --sb=*)
303     sbindir="$ac_optarg" ;;
304
305   -sharedstatedir | --sharedstatedir | --sharedstatedi \
306   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
307   | --sharedst | --shareds | --shared | --share | --shar \
308   | --sha | --sh)
309     ac_prev=sharedstatedir ;;
310   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
311   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
312   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
313   | --sha=* | --sh=*)
314     sharedstatedir="$ac_optarg" ;;
315
316   -site | --site | --sit)
317     ac_prev=site ;;
318   -site=* | --site=* | --sit=*)
319     site="$ac_optarg" ;;
320
321   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
322     ac_prev=srcdir ;;
323   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
324     srcdir="$ac_optarg" ;;
325
326   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
327   | --syscon | --sysco | --sysc | --sys | --sy)
328     ac_prev=sysconfdir ;;
329   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
330   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
331     sysconfdir="$ac_optarg" ;;
332
333   -target | --target | --targe | --targ | --tar | --ta | --t)
334     ac_prev=target ;;
335   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
336     target="$ac_optarg" ;;
337
338   -v | -verbose | --verbose | --verbos | --verbo | --verb)
339     verbose=yes ;;
340
341   -version | --version | --versio | --versi | --vers)
342     echo "configure generated by autoconf version 2.13"
343     exit 0 ;;
344
345   -with-* | --with-*)
346     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
347     # Reject names that are not valid shell variable names.
348     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
349       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
350     fi
351     ac_package=`echo $ac_package| sed 's/-/_/g'`
352     case "$ac_option" in
353       *=*) ;;
354       *) ac_optarg=yes ;;
355     esac
356     eval "with_${ac_package}='$ac_optarg'" ;;
357
358   -without-* | --without-*)
359     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
360     # Reject names that are not valid shell variable names.
361     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
362       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363     fi
364     ac_package=`echo $ac_package| sed 's/-/_/g'`
365     eval "with_${ac_package}=no" ;;
366
367   --x)
368     # Obsolete; use --with-x.
369     with_x=yes ;;
370
371   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
372   | --x-incl | --x-inc | --x-in | --x-i)
373     ac_prev=x_includes ;;
374   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
375   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
376     x_includes="$ac_optarg" ;;
377
378   -x-libraries | --x-libraries | --x-librarie | --x-librari \
379   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
380     ac_prev=x_libraries ;;
381   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
382   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
383     x_libraries="$ac_optarg" ;;
384
385   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
386     ;;
387
388   *)
389     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
390       echo "configure: warning: $ac_option: invalid host type" 1>&2
391     fi
392     if test "x$nonopt" != xNONE; then
393       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
394     fi
395     nonopt="$ac_option"
396     ;;
397
398   esac
399 done
400
401 if test -n "$ac_prev"; then
402   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 fi
404
405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
406
407 # File descriptor usage:
408 # 0 standard input
409 # 1 file creation
410 # 2 errors and warnings
411 # 3 some systems may open it to /dev/tty
412 # 4 used on the Kubota Titan
413 # 6 checking for... messages and results
414 # 5 compiler messages saved in config.log
415 if test "$silent" = yes; then
416   exec 6>/dev/null
417 else
418   exec 6>&1
419 fi
420 exec 5>./config.log
421
422 echo "\
423 This file contains any messages produced by compilers while
424 running configure, to aid debugging if configure makes a mistake.
425 " 1>&5
426
427 # Strip out --no-create and --no-recursion so they do not pile up.
428 # Also quote any args containing shell metacharacters.
429 ac_configure_args=
430 for ac_arg
431 do
432   case "$ac_arg" in
433   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
434   | --no-cr | --no-c) ;;
435   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
436   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
437   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
438   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
439   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
440   esac
441 done
442
443 # NLS nuisances.
444 # Only set these to C if already set.  These must not be set unconditionally
445 # because not all systems understand e.g. LANG=C (notably SCO).
446 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
447 # Non-C LC_CTYPE values break the ctype check.
448 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
449 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
450 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
451 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
452
453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
454 rm -rf conftest* confdefs.h
455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 echo > confdefs.h
457
458 # A filename unique to this package, relative to the directory that
459 # configure is in, which we can look for to find out if srcdir is correct.
460 ac_unique_file=protocol.c
461
462 # Find the source files, if location was not specified.
463 if test -z "$srcdir"; then
464   ac_srcdir_defaulted=yes
465   # Try the directory containing this script, then its parent.
466   ac_prog=$0
467   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
468   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
469   srcdir=$ac_confdir
470   if test ! -r $srcdir/$ac_unique_file; then
471     srcdir=..
472   fi
473 else
474   ac_srcdir_defaulted=no
475 fi
476 if test ! -r $srcdir/$ac_unique_file; then
477   if test "$ac_srcdir_defaulted" = yes; then
478     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
479   else
480     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481   fi
482 fi
483 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
484
485 # Prefer explicitly selected file to automatically selected ones.
486 if test -z "$CONFIG_SITE"; then
487   if test "x$prefix" != xNONE; then
488     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
489   else
490     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491   fi
492 fi
493 for ac_site_file in $CONFIG_SITE; do
494   if test -r "$ac_site_file"; then
495     echo "loading site script $ac_site_file"
496     . "$ac_site_file"
497   fi
498 done
499
500 if test -r "$cache_file"; then
501   echo "loading cache $cache_file"
502   . $cache_file
503 else
504   echo "creating cache $cache_file"
505   > $cache_file
506 fi
507
508 ac_ext=c
509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
510 ac_cpp='$CPP $CPPFLAGS'
511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
513 cross_compiling=$ac_cv_prog_cc_cross
514
515 ac_exeext=
516 ac_objext=o
517 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
518   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
519   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
520     ac_n= ac_c='
521 ' ac_t='        '
522   else
523     ac_n=-n ac_c= ac_t=
524   fi
525 else
526   ac_n= ac_c='\c' ac_t=
527 fi
528
529
530
531
532 # Checks the host we are running on.
533 ac_aux_dir=
534 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
535   if test -f $ac_dir/install-sh; then
536     ac_aux_dir=$ac_dir
537     ac_install_sh="$ac_aux_dir/install-sh -c"
538     break
539   elif test -f $ac_dir/install.sh; then
540     ac_aux_dir=$ac_dir
541     ac_install_sh="$ac_aux_dir/install.sh -c"
542     break
543   fi
544 done
545 if test -z "$ac_aux_dir"; then
546   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
547 fi
548 ac_config_guess=$ac_aux_dir/config.guess
549 ac_config_sub=$ac_aux_dir/config.sub
550 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
551
552
553 # Make sure we can run config.sub.
554 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
555 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
556 fi
557
558 echo $ac_n "checking host system type""... $ac_c" 1>&6
559 echo "configure:560: checking host system type" >&5
560
561 host_alias=$host
562 case "$host_alias" in
563 NONE)
564   case $nonopt in
565   NONE)
566     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
567     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
568     fi ;;
569   *) host_alias=$nonopt ;;
570   esac ;;
571 esac
572
573 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
574 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
575 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
576 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
577 echo "$ac_t""$host" 1>&6
578
579
580 # Set paths and common variables and NWS top directory (if compiling with
581 # NWS)
582 if test -n "$TOP"; then
583         NWS_TOP="${TOP}"
584 else 
585         NWS_TOP=`pwd`
586 fi
587 TOP=`pwd`
588 INCLUDES="-I${TOP}/Include"
589 ARFLAGS="cr"
590 test_debug="no"
591 test_thread="no"
592 use_alarm_signal="no"
593
594 # Set default for CFLAGS
595 CFLAGS="-DHAVE_CONFIG_H"
596
597 # test for command line options
598 # Check whether --enable-debug or --disable-debug was given.
599 if test "${enable_debug+set}" = set; then
600   enableval="$enable_debug"
601   if test "${withval}" != "yes"; then
602                         test_debug="yes"
603                 fi
604 fi
605
606
607 # Check whether --enable-threads or --disable-threads was given.
608 if test "${enable_threads+set}" = set; then
609   enableval="$enable_threads"
610   if test "${enableval}" != "no"; then
611                         test_thread="yes"
612                 fi
613 fi
614
615
616 # Check whether --enable-sigalarm or --disable-sigalarm was given.
617 if test "${enable_sigalarm+set}" = set; then
618   enableval="$enable_sigalarm"
619   if test "${enableval}" != "no"; then
620                         use_alarm_signal="yes"
621                         cat >> confdefs.h <<\EOF
622 #define USE_ALARM_SIGNAL 1
623 EOF
624
625                 fi
626 else
627   cat >> confdefs.h <<\EOF
628 #define USE_ALARM_SIGNAL 1
629 EOF
630
631          use_alarm_signal="yes"
632 fi
633
634
635 # Checks for programs.
636 # Extract the first word of "ar", so it can be a program name with args.
637 set dummy ar; ac_word=$2
638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
639 echo "configure:640: checking for $ac_word" >&5
640 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
641   echo $ac_n "(cached) $ac_c" 1>&6
642 else
643   case "$AR" in
644   /*)
645   ac_cv_path_AR="$AR" # Let the user override the test with a path.
646   ;;
647   ?:/*)                  
648   ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
649   ;;
650   *)
651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
652   ac_dummy="$PATH"
653   for ac_dir in $ac_dummy; do 
654     test -z "$ac_dir" && ac_dir=.
655     if test -f $ac_dir/$ac_word; then
656       ac_cv_path_AR="$ac_dir/$ac_word"
657       break
658     fi
659   done
660   IFS="$ac_save_ifs"
661   ;;
662 esac
663 fi
664 AR="$ac_cv_path_AR"
665 if test -n "$AR"; then
666   echo "$ac_t""$AR" 1>&6
667 else
668   echo "$ac_t""no" 1>&6
669 fi
670
671 # Extract the first word of "gcc", so it can be a program name with args.
672 set dummy gcc; ac_word=$2
673 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
674 echo "configure:675: checking for $ac_word" >&5
675 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
676   echo $ac_n "(cached) $ac_c" 1>&6
677 else
678   if test -n "$CC"; then
679   ac_cv_prog_CC="$CC" # Let the user override the test.
680 else
681   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
682   ac_dummy="$PATH"
683   for ac_dir in $ac_dummy; do
684     test -z "$ac_dir" && ac_dir=.
685     if test -f $ac_dir/$ac_word; then
686       ac_cv_prog_CC="gcc"
687       break
688     fi
689   done
690   IFS="$ac_save_ifs"
691 fi
692 fi
693 CC="$ac_cv_prog_CC"
694 if test -n "$CC"; then
695   echo "$ac_t""$CC" 1>&6
696 else
697   echo "$ac_t""no" 1>&6
698 fi
699
700 if test -z "$CC"; then
701   # Extract the first word of "cc", so it can be a program name with args.
702 set dummy cc; ac_word=$2
703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
704 echo "configure:705: checking for $ac_word" >&5
705 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
706   echo $ac_n "(cached) $ac_c" 1>&6
707 else
708   if test -n "$CC"; then
709   ac_cv_prog_CC="$CC" # Let the user override the test.
710 else
711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
712   ac_prog_rejected=no
713   ac_dummy="$PATH"
714   for ac_dir in $ac_dummy; do
715     test -z "$ac_dir" && ac_dir=.
716     if test -f $ac_dir/$ac_word; then
717       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
718         ac_prog_rejected=yes
719         continue
720       fi
721       ac_cv_prog_CC="cc"
722       break
723     fi
724   done
725   IFS="$ac_save_ifs"
726 if test $ac_prog_rejected = yes; then
727   # We found a bogon in the path, so make sure we never use it.
728   set dummy $ac_cv_prog_CC
729   shift
730   if test $# -gt 0; then
731     # We chose a different compiler from the bogus one.
732     # However, it has the same basename, so the bogon will be chosen
733     # first if we set CC to just the basename; use the full file name.
734     shift
735     set dummy "$ac_dir/$ac_word" "$@"
736     shift
737     ac_cv_prog_CC="$@"
738   fi
739 fi
740 fi
741 fi
742 CC="$ac_cv_prog_CC"
743 if test -n "$CC"; then
744   echo "$ac_t""$CC" 1>&6
745 else
746   echo "$ac_t""no" 1>&6
747 fi
748
749   if test -z "$CC"; then
750     case "`uname -s`" in
751     *win32* | *WIN32*)
752       # Extract the first word of "cl", so it can be a program name with args.
753 set dummy cl; ac_word=$2
754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
755 echo "configure:756: checking for $ac_word" >&5
756 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
757   echo $ac_n "(cached) $ac_c" 1>&6
758 else
759   if test -n "$CC"; then
760   ac_cv_prog_CC="$CC" # Let the user override the test.
761 else
762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
763   ac_dummy="$PATH"
764   for ac_dir in $ac_dummy; do
765     test -z "$ac_dir" && ac_dir=.
766     if test -f $ac_dir/$ac_word; then
767       ac_cv_prog_CC="cl"
768       break
769     fi
770   done
771   IFS="$ac_save_ifs"
772 fi
773 fi
774 CC="$ac_cv_prog_CC"
775 if test -n "$CC"; then
776   echo "$ac_t""$CC" 1>&6
777 else
778   echo "$ac_t""no" 1>&6
779 fi
780  ;;
781     esac
782   fi
783   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
784 fi
785
786 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
787 echo "configure:788: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
788
789 ac_ext=c
790 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791 ac_cpp='$CPP $CPPFLAGS'
792 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794 cross_compiling=$ac_cv_prog_cc_cross
795
796 cat > conftest.$ac_ext << EOF
797
798 #line 799 "configure"
799 #include "confdefs.h"
800
801 main(){return(0);}
802 EOF
803 if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
804   ac_cv_prog_cc_works=yes
805   # If we can't run a trivial program, we are probably using a cross compiler.
806   if (./conftest; exit) 2>/dev/null; then
807     ac_cv_prog_cc_cross=no
808   else
809     ac_cv_prog_cc_cross=yes
810   fi
811 else
812   echo "configure: failed program was:" >&5
813   cat conftest.$ac_ext >&5
814   ac_cv_prog_cc_works=no
815 fi
816 rm -fr conftest*
817 ac_ext=c
818 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819 ac_cpp='$CPP $CPPFLAGS'
820 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822 cross_compiling=$ac_cv_prog_cc_cross
823
824 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
825 if test $ac_cv_prog_cc_works = no; then
826   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
827 fi
828 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
829 echo "configure:830: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
830 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
831 cross_compiling=$ac_cv_prog_cc_cross
832
833 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
834 echo "configure:835: checking whether we are using GNU C" >&5
835 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838   cat > conftest.c <<EOF
839 #ifdef __GNUC__
840   yes;
841 #endif
842 EOF
843 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
844   ac_cv_prog_gcc=yes
845 else
846   ac_cv_prog_gcc=no
847 fi
848 fi
849
850 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
851
852 if test $ac_cv_prog_gcc = yes; then
853   GCC=yes
854 else
855   GCC=
856 fi
857
858 ac_test_CFLAGS="${CFLAGS+set}"
859 ac_save_CFLAGS="$CFLAGS"
860 CFLAGS=
861 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
862 echo "configure:863: checking whether ${CC-cc} accepts -g" >&5
863 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
864   echo $ac_n "(cached) $ac_c" 1>&6
865 else
866   echo 'void f(){}' > conftest.c
867 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
868   ac_cv_prog_cc_g=yes
869 else
870   ac_cv_prog_cc_g=no
871 fi
872 rm -f conftest*
873
874 fi
875
876 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
877 if test "$ac_test_CFLAGS" = set; then
878   CFLAGS="$ac_save_CFLAGS"
879 elif test $ac_cv_prog_cc_g = yes; then
880   if test "$GCC" = yes; then
881     CFLAGS="-g -O2"
882   else
883     CFLAGS="-g"
884   fi
885 else
886   if test "$GCC" = yes; then
887     CFLAGS="-O2"
888   else
889     CFLAGS=
890   fi
891 fi
892
893 # Setting up debug options
894 if test "${test_debug}" = "yes"; then
895         CFLAGS="${CFLAGS} -g "
896 else 
897         CFLAGS="${CFLAGS} -O2"
898         if test "${GCC}" = "yes" ; then
899                 CFLAGS="${CFLAGS} -finline-functions"
900         fi
901 fi
902
903 # Find a good install program.  We prefer a C program (faster),
904 # so one script is as good as another.  But avoid the broken or
905 # incompatible versions:
906 # SysV /etc/install, /usr/sbin/install
907 # SunOS /usr/etc/install
908 # IRIX /sbin/install
909 # AIX /bin/install
910 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
911 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
912 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
913 # ./install, which can be erroneously created by make from ./install.sh.
914 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
915 echo "configure:916: checking for a BSD compatible install" >&5
916 if test -z "$INSTALL"; then
917 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
918   echo $ac_n "(cached) $ac_c" 1>&6
919 else
920     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
921   for ac_dir in $PATH; do
922     # Account for people who put trailing slashes in PATH elements.
923     case "$ac_dir/" in
924     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
925     *)
926       # OSF1 and SCO ODT 3.0 have their own names for install.
927       # Don't use installbsd from OSF since it installs stuff as root
928       # by default.
929       for ac_prog in ginstall scoinst install; do
930         if test -f $ac_dir/$ac_prog; then
931           if test $ac_prog = install &&
932             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
933             # AIX install.  It has an incompatible calling convention.
934             :
935           else
936             ac_cv_path_install="$ac_dir/$ac_prog -c"
937             break 2
938           fi
939         fi
940       done
941       ;;
942     esac
943   done
944   IFS="$ac_save_IFS"
945
946 fi
947   if test "${ac_cv_path_install+set}" = set; then
948     INSTALL="$ac_cv_path_install"
949   else
950     # As a last resort, use the slow shell script.  We don't cache a
951     # path for INSTALL within a source directory, because that will
952     # break other packages using the cache if that directory is
953     # removed, or if the path is relative.
954     INSTALL="$ac_install_sh"
955   fi
956 fi
957 echo "$ac_t""$INSTALL" 1>&6
958
959 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
960 # It thinks the first close brace ends the variable substitution.
961 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
962
963 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
964
965 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
966
967 # Extract the first word of "ranlib", so it can be a program name with args.
968 set dummy ranlib; ac_word=$2
969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
970 echo "configure:971: checking for $ac_word" >&5
971 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
972   echo $ac_n "(cached) $ac_c" 1>&6
973 else
974   if test -n "$RANLIB"; then
975   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
976 else
977   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
978   ac_dummy="$PATH"
979   for ac_dir in $ac_dummy; do
980     test -z "$ac_dir" && ac_dir=.
981     if test -f $ac_dir/$ac_word; then
982       ac_cv_prog_RANLIB="ranlib"
983       break
984     fi
985   done
986   IFS="$ac_save_ifs"
987   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
988 fi
989 fi
990 RANLIB="$ac_cv_prog_RANLIB"
991 if test -n "$RANLIB"; then
992   echo "$ac_t""$RANLIB" 1>&6
993 else
994   echo "$ac_t""no" 1>&6
995 fi
996
997 # Extract the first word of "rm", so it can be a program name with args.
998 set dummy rm; ac_word=$2
999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1000 echo "configure:1001: checking for $ac_word" >&5
1001 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 else
1004   case "$RM" in
1005   /*)
1006   ac_cv_path_RM="$RM" # Let the user override the test with a path.
1007   ;;
1008   ?:/*)                  
1009   ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
1010   ;;
1011   *)
1012   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1013   ac_dummy="$PATH"
1014   for ac_dir in $ac_dummy; do 
1015     test -z "$ac_dir" && ac_dir=.
1016     if test -f $ac_dir/$ac_word; then
1017       ac_cv_path_RM="$ac_dir/$ac_word"
1018       break
1019     fi
1020   done
1021   IFS="$ac_save_ifs"
1022   ;;
1023 esac
1024 fi
1025 RM="$ac_cv_path_RM"
1026 if test -n "$RM"; then
1027   echo "$ac_t""$RM" 1>&6
1028 else
1029   echo "$ac_t""no" 1>&6
1030 fi
1031
1032 # Extract the first word of "cp", so it can be a program name with args.
1033 set dummy cp; ac_word=$2
1034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1035 echo "configure:1036: checking for $ac_word" >&5
1036 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039   case "$CP" in
1040   /*)
1041   ac_cv_path_CP="$CP" # Let the user override the test with a path.
1042   ;;
1043   ?:/*)                  
1044   ac_cv_path_CP="$CP" # Let the user override the test with a dos path.
1045   ;;
1046   *)
1047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1048   ac_dummy="$PATH"
1049   for ac_dir in $ac_dummy; do 
1050     test -z "$ac_dir" && ac_dir=.
1051     if test -f $ac_dir/$ac_word; then
1052       ac_cv_path_CP="$ac_dir/$ac_word"
1053       break
1054     fi
1055   done
1056   IFS="$ac_save_ifs"
1057   ;;
1058 esac
1059 fi
1060 CP="$ac_cv_path_CP"
1061 if test -n "$CP"; then
1062   echo "$ac_t""$CP" 1>&6
1063 else
1064   echo "$ac_t""no" 1>&6
1065 fi
1066
1067 # Extract the first word of "tar", so it can be a program name with args.
1068 set dummy tar; ac_word=$2
1069 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1070 echo "configure:1071: checking for $ac_word" >&5
1071 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
1072   echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074   case "$TAR" in
1075   /*)
1076   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
1077   ;;
1078   ?:/*)                  
1079   ac_cv_path_TAR="$TAR" # Let the user override the test with a dos path.
1080   ;;
1081   *)
1082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1083   ac_dummy="$PATH"
1084   for ac_dir in $ac_dummy; do 
1085     test -z "$ac_dir" && ac_dir=.
1086     if test -f $ac_dir/$ac_word; then
1087       ac_cv_path_TAR="$ac_dir/$ac_word"
1088       break
1089     fi
1090   done
1091   IFS="$ac_save_ifs"
1092   ;;
1093 esac
1094 fi
1095 TAR="$ac_cv_path_TAR"
1096 if test -n "$TAR"; then
1097   echo "$ac_t""$TAR" 1>&6
1098 else
1099   echo "$ac_t""no" 1>&6
1100 fi
1101
1102 # Extract the first word of "ctags", so it can be a program name with args.
1103 set dummy ctags; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 echo "configure:1106: checking for $ac_word" >&5
1106 if eval "test \"`echo '$''{'ac_cv_path_CTAGS'+set}'`\" = set"; then
1107   echo $ac_n "(cached) $ac_c" 1>&6
1108 else
1109   case "$CTAGS" in
1110   /*)
1111   ac_cv_path_CTAGS="$CTAGS" # Let the user override the test with a path.
1112   ;;
1113   ?:/*)                  
1114   ac_cv_path_CTAGS="$CTAGS" # Let the user override the test with a dos path.
1115   ;;
1116   *)
1117   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1118   ac_dummy="$PATH"
1119   for ac_dir in $ac_dummy; do 
1120     test -z "$ac_dir" && ac_dir=.
1121     if test -f $ac_dir/$ac_word; then
1122       ac_cv_path_CTAGS="$ac_dir/$ac_word"
1123       break
1124     fi
1125   done
1126   IFS="$ac_save_ifs"
1127   ;;
1128 esac
1129 fi
1130 CTAGS="$ac_cv_path_CTAGS"
1131 if test -n "$CTAGS"; then
1132   echo "$ac_t""$CTAGS" 1>&6
1133 else
1134   echo "$ac_t""no" 1>&6
1135 fi
1136
1137
1138 # Set compiler and linker switches 
1139 if test "${CC}" = "gcc"; then
1140         # Adding all annoying warning compilers message
1141         CFLAGS="${CFLAGS} -Wall -pedantic -Wshadow -Wpointer-arith -Wwrite-strings"
1142         # Extract the first word of "gprof", so it can be a program name with args.
1143 set dummy gprof; ac_word=$2
1144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1145 echo "configure:1146: checking for $ac_word" >&5
1146 if eval "test \"`echo '$''{'ac_cv_path_PROFILE'+set}'`\" = set"; then
1147   echo $ac_n "(cached) $ac_c" 1>&6
1148 else
1149   case "$PROFILE" in
1150   /*)
1151   ac_cv_path_PROFILE="$PROFILE" # Let the user override the test with a path.
1152   ;;
1153   ?:/*)                  
1154   ac_cv_path_PROFILE="$PROFILE" # Let the user override the test with a dos path.
1155   ;;
1156   *)
1157   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1158   ac_dummy="$PATH"
1159   for ac_dir in $ac_dummy; do 
1160     test -z "$ac_dir" && ac_dir=.
1161     if test -f $ac_dir/$ac_word; then
1162       ac_cv_path_PROFILE="$ac_dir/$ac_word"
1163       break
1164     fi
1165   done
1166   IFS="$ac_save_ifs"
1167   ;;
1168 esac
1169 fi
1170 PROFILE="$ac_cv_path_PROFILE"
1171 if test -n "$PROFILE"; then
1172   echo "$ac_t""$PROFILE" 1>&6
1173 else
1174   echo "$ac_t""no" 1>&6
1175 fi
1176
1177 else
1178         # Extract the first word of "prof", so it can be a program name with args.
1179 set dummy prof; ac_word=$2
1180 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1181 echo "configure:1182: checking for $ac_word" >&5
1182 if eval "test \"`echo '$''{'ac_cv_path_PROFILE'+set}'`\" = set"; then
1183   echo $ac_n "(cached) $ac_c" 1>&6
1184 else
1185   case "$PROFILE" in
1186   /*)
1187   ac_cv_path_PROFILE="$PROFILE" # Let the user override the test with a path.
1188   ;;
1189   ?:/*)                  
1190   ac_cv_path_PROFILE="$PROFILE" # Let the user override the test with a dos path.
1191   ;;
1192   *)
1193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1194   ac_dummy="$PATH"
1195   for ac_dir in $ac_dummy; do 
1196     test -z "$ac_dir" && ac_dir=.
1197     if test -f $ac_dir/$ac_word; then
1198       ac_cv_path_PROFILE="$ac_dir/$ac_word"
1199       break
1200     fi
1201   done
1202   IFS="$ac_save_ifs"
1203   ;;
1204 esac
1205 fi
1206 PROFILE="$ac_cv_path_PROFILE"
1207 if test -n "$PROFILE"; then
1208   echo "$ac_t""$PROFILE" 1>&6
1209 else
1210   echo "$ac_t""no" 1>&6
1211 fi
1212
1213 fi
1214
1215 # Checks for libraries.
1216 echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
1217 echo "configure:1218: checking for inet_ntoa in -lnsl" >&5
1218 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
1219 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1220   echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222   ac_save_LIBS="$LIBS"
1223 LIBS="-lnsl  $LIBS"
1224 cat > conftest.$ac_ext <<EOF
1225 #line 1226 "configure"
1226 #include "confdefs.h"
1227 /* Override any gcc2 internal prototype to avoid an error.  */
1228 /* We use char because int might match the return type of a gcc2
1229     builtin and then its argument prototype would still apply.  */
1230 char inet_ntoa();
1231
1232 int main() {
1233 inet_ntoa()
1234 ; return 0; }
1235 EOF
1236 if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1237   rm -rf conftest*
1238   eval "ac_cv_lib_$ac_lib_var=yes"
1239 else
1240   echo "configure: failed program was:" >&5
1241   cat conftest.$ac_ext >&5
1242   rm -rf conftest*
1243   eval "ac_cv_lib_$ac_lib_var=no"
1244 fi
1245 rm -f conftest*
1246 LIBS="$ac_save_LIBS"
1247
1248 fi
1249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1250   echo "$ac_t""yes" 1>&6
1251     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1252     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1253   cat >> confdefs.h <<EOF
1254 #define $ac_tr_lib 1
1255 EOF
1256
1257   LIBS="-lnsl $LIBS"
1258
1259 else
1260   echo "$ac_t""no" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1264 echo "configure:1265: checking for socket in -lsocket" >&5
1265 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1266 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1267   echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269   ac_save_LIBS="$LIBS"
1270 LIBS="-lsocket  $LIBS"
1271 cat > conftest.$ac_ext <<EOF
1272 #line 1273 "configure"
1273 #include "confdefs.h"
1274 /* Override any gcc2 internal prototype to avoid an error.  */
1275 /* We use char because int might match the return type of a gcc2
1276     builtin and then its argument prototype would still apply.  */
1277 char socket();
1278
1279 int main() {
1280 socket()
1281 ; return 0; }
1282 EOF
1283 if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1284   rm -rf conftest*
1285   eval "ac_cv_lib_$ac_lib_var=yes"
1286 else
1287   echo "configure: failed program was:" >&5
1288   cat conftest.$ac_ext >&5
1289   rm -rf conftest*
1290   eval "ac_cv_lib_$ac_lib_var=no"
1291 fi
1292 rm -f conftest*
1293 LIBS="$ac_save_LIBS"
1294
1295 fi
1296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1297   echo "$ac_t""yes" 1>&6
1298     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1299     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1300   cat >> confdefs.h <<EOF
1301 #define $ac_tr_lib 1
1302 EOF
1303
1304   LIBS="-lsocket $LIBS"
1305
1306 else
1307   echo "$ac_t""no" 1>&6
1308 fi
1309
1310 if test "${test_thread}" = "yes"; then
1311         echo $ac_n "checking for pthread_mutex_lock in -lpthread""... $ac_c" 1>&6
1312 echo "configure:1313: checking for pthread_mutex_lock in -lpthread" >&5
1313 ac_lib_var=`echo pthread'_'pthread_mutex_lock | sed 'y%./+-%__p_%'`
1314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1315   echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317   ac_save_LIBS="$LIBS"
1318 LIBS="-lpthread  $LIBS"
1319 cat > conftest.$ac_ext <<EOF
1320 #line 1321 "configure"
1321 #include "confdefs.h"
1322 /* Override any gcc2 internal prototype to avoid an error.  */
1323 /* We use char because int might match the return type of a gcc2
1324     builtin and then its argument prototype would still apply.  */
1325 char pthread_mutex_lock();
1326
1327 int main() {
1328 pthread_mutex_lock()
1329 ; return 0; }
1330 EOF
1331 if { (eval echo configure:1332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1332   rm -rf conftest*
1333   eval "ac_cv_lib_$ac_lib_var=yes"
1334 else
1335   echo "configure: failed program was:" >&5
1336   cat conftest.$ac_ext >&5
1337   rm -rf conftest*
1338   eval "ac_cv_lib_$ac_lib_var=no"
1339 fi
1340 rm -f conftest*
1341 LIBS="$ac_save_LIBS"
1342
1343 fi
1344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1345   echo "$ac_t""yes" 1>&6
1346     ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1347     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1348   cat >> confdefs.h <<EOF
1349 #define $ac_tr_lib 1
1350 EOF
1351
1352   LIBS="-lpthread $LIBS"
1353
1354 else
1355   echo "$ac_t""no" 1>&6
1356 fi
1357
1358 fi
1359
1360 # Checks for header files and symbols declared in headers.
1361 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1362 echo "configure:1363: checking how to run the C preprocessor" >&5
1363 # On Suns, sometimes $CPP names a directory.
1364 if test -n "$CPP" && test -d "$CPP"; then
1365   CPP=
1366 fi
1367 if test -z "$CPP"; then
1368 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1369   echo $ac_n "(cached) $ac_c" 1>&6
1370 else
1371     # This must be in double quotes, not single quotes, because CPP may get
1372   # substituted into the Makefile and "${CC-cc}" will confuse make.
1373   CPP="${CC-cc} -E"
1374   # On the NeXT, cc -E runs the code through the compiler's parser,
1375   # not just through cpp.
1376   cat > conftest.$ac_ext <<EOF
1377 #line 1378 "configure"
1378 #include "confdefs.h"
1379 #include <assert.h>
1380 Syntax Error
1381 EOF
1382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1383 { (eval echo configure:1384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1385 if test -z "$ac_err"; then
1386   :
1387 else
1388   echo "$ac_err" >&5
1389   echo "configure: failed program was:" >&5
1390   cat conftest.$ac_ext >&5
1391   rm -rf conftest*
1392   CPP="${CC-cc} -E -traditional-cpp"
1393   cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <assert.h>
1397 Syntax Error
1398 EOF
1399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1400 { (eval echo configure:1401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1402 if test -z "$ac_err"; then
1403   :
1404 else
1405   echo "$ac_err" >&5
1406   echo "configure: failed program was:" >&5
1407   cat conftest.$ac_ext >&5
1408   rm -rf conftest*
1409   CPP="${CC-cc} -nologo -E"
1410   cat > conftest.$ac_ext <<EOF
1411 #line 1412 "configure"
1412 #include "confdefs.h"
1413 #include <assert.h>
1414 Syntax Error
1415 EOF
1416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1417 { (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1419 if test -z "$ac_err"; then
1420   :
1421 else
1422   echo "$ac_err" >&5
1423   echo "configure: failed program was:" >&5
1424   cat conftest.$ac_ext >&5
1425   rm -rf conftest*
1426   CPP=/lib/cpp
1427 fi
1428 rm -f conftest*
1429 fi
1430 rm -f conftest*
1431 fi
1432 rm -f conftest*
1433   ac_cv_prog_CPP="$CPP"
1434 fi
1435   CPP="$ac_cv_prog_CPP"
1436 else
1437   ac_cv_prog_CPP="$CPP"
1438 fi
1439 echo "$ac_t""$CPP" 1>&6
1440
1441 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1442 echo "configure:1443: checking for ANSI C header files" >&5
1443 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1444   echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446   cat > conftest.$ac_ext <<EOF
1447 #line 1448 "configure"
1448 #include "confdefs.h"
1449 #include <stdlib.h>
1450 #include <stdarg.h>
1451 #include <string.h>
1452 #include <float.h>
1453 EOF
1454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1455 { (eval echo configure:1456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1457 if test -z "$ac_err"; then
1458   rm -rf conftest*
1459   ac_cv_header_stdc=yes
1460 else
1461   echo "$ac_err" >&5
1462   echo "configure: failed program was:" >&5
1463   cat conftest.$ac_ext >&5
1464   rm -rf conftest*
1465   ac_cv_header_stdc=no
1466 fi
1467 rm -f conftest*
1468
1469 if test $ac_cv_header_stdc = yes; then
1470   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1471 cat > conftest.$ac_ext <<EOF
1472 #line 1473 "configure"
1473 #include "confdefs.h"
1474 #include <string.h>
1475 EOF
1476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1477   egrep "memchr" >/dev/null 2>&1; then
1478   :
1479 else
1480   rm -rf conftest*
1481   ac_cv_header_stdc=no
1482 fi
1483 rm -f conftest*
1484
1485 fi
1486
1487 if test $ac_cv_header_stdc = yes; then
1488   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492 #include <stdlib.h>
1493 EOF
1494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1495   egrep "free" >/dev/null 2>&1; then
1496   :
1497 else
1498   rm -rf conftest*
1499   ac_cv_header_stdc=no
1500 fi
1501 rm -f conftest*
1502
1503 fi
1504
1505 if test $ac_cv_header_stdc = yes; then
1506   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1507 if test "$cross_compiling" = yes; then
1508   :
1509 else
1510   cat > conftest.$ac_ext <<EOF
1511 #line 1512 "configure"
1512 #include "confdefs.h"
1513 #include <ctype.h>
1514 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1515 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1516 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1517 int main () { int i; for (i = 0; i < 256; i++)
1518 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1519 exit (0); }
1520
1521 EOF
1522 if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1523 then
1524   :
1525 else
1526   echo "configure: failed program was:" >&5
1527   cat conftest.$ac_ext >&5
1528   rm -fr conftest*
1529   ac_cv_header_stdc=no
1530 fi
1531 rm -fr conftest*
1532 fi
1533
1534 fi
1535 fi
1536
1537 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1538 if test $ac_cv_header_stdc = yes; then
1539   cat >> confdefs.h <<\EOF
1540 #define STDC_HEADERS 1
1541 EOF
1542
1543 fi
1544
1545 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1546 echo "configure:1547: checking for sys/wait.h that is POSIX.1 compatible" >&5
1547 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1548   echo $ac_n "(cached) $ac_c" 1>&6
1549 else
1550   cat > conftest.$ac_ext <<EOF
1551 #line 1552 "configure"
1552 #include "confdefs.h"
1553 #include <sys/types.h>
1554 #include <sys/wait.h>
1555 #ifndef WEXITSTATUS
1556 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1557 #endif
1558 #ifndef WIFEXITED
1559 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1560 #endif
1561 int main() {
1562 int s;
1563 wait (&s);
1564 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
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_header_sys_wait_h=yes
1570 else
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   ac_cv_header_sys_wait_h=no
1575 fi
1576 rm -f conftest*
1577 fi
1578
1579 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1580 if test $ac_cv_header_sys_wait_h = yes; then
1581   cat >> confdefs.h <<\EOF
1582 #define HAVE_SYS_WAIT_H 1
1583 EOF
1584
1585 fi
1586
1587 for ac_hdr in arpa/inet.h errno.h netdb.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h math.h inttypes.h
1588 do
1589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1591 echo "configure:1592: checking for $ac_hdr" >&5
1592 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1593   echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595   cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598 #include <$ac_hdr>
1599 EOF
1600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1601 { (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1603 if test -z "$ac_err"; then
1604   rm -rf conftest*
1605   eval "ac_cv_header_$ac_safe=yes"
1606 else
1607   echo "$ac_err" >&5
1608   echo "configure: failed program was:" >&5
1609   cat conftest.$ac_ext >&5
1610   rm -rf conftest*
1611   eval "ac_cv_header_$ac_safe=no"
1612 fi
1613 rm -f conftest*
1614 fi
1615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1616   echo "$ac_t""yes" 1>&6
1617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1618   cat >> confdefs.h <<EOF
1619 #define $ac_tr_hdr 1
1620 EOF
1621  
1622 else
1623   echo "$ac_t""no" 1>&6
1624 fi
1625 done
1626
1627 if test "${test_thread}" = "yes"; then
1628         for ac_hdr in pthread.h
1629 do
1630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1632 echo "configure:1633: checking for $ac_hdr" >&5
1633 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1634   echo $ac_n "(cached) $ac_c" 1>&6
1635 else
1636   cat > conftest.$ac_ext <<EOF
1637 #line 1638 "configure"
1638 #include "confdefs.h"
1639 #include <$ac_hdr>
1640 EOF
1641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1642 { (eval echo configure:1643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1644 if test -z "$ac_err"; then
1645   rm -rf conftest*
1646   eval "ac_cv_header_$ac_safe=yes"
1647 else
1648   echo "$ac_err" >&5
1649   echo "configure: failed program was:" >&5
1650   cat conftest.$ac_ext >&5
1651   rm -rf conftest*
1652   eval "ac_cv_header_$ac_safe=no"
1653 fi
1654 rm -f conftest*
1655 fi
1656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1657   echo "$ac_t""yes" 1>&6
1658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1659   cat >> confdefs.h <<EOF
1660 #define $ac_tr_hdr 1
1661 EOF
1662  
1663 else
1664   echo "$ac_t""no" 1>&6
1665 fi
1666 done
1667
1668 fi
1669 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
1670 echo "configure:1671: checking for uint32_t" >&5
1671 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
1672   echo $ac_n "(cached) $ac_c" 1>&6
1673 else
1674   cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677 #include <sys/types.h>
1678 #if STDC_HEADERS
1679 #include <stdlib.h>
1680 #include <stddef.h>
1681 #endif
1682 EOF
1683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1684   egrep "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1685   rm -rf conftest*
1686   ac_cv_type_uint32_t=yes
1687 else
1688   rm -rf conftest*
1689   ac_cv_type_uint32_t=no
1690 fi
1691 rm -f conftest*
1692
1693 fi
1694 echo "$ac_t""$ac_cv_type_uint32_t" 1>&6
1695 if test $ac_cv_type_uint32_t = no; then
1696   cat >> confdefs.h <<\EOF
1697 #define uint32_t unsigned long
1698 EOF
1699
1700 fi
1701
1702
1703
1704
1705
1706
1707 # The third parameter to getpeername() is a pointer to socklen_t, size_t, or
1708 # int on various systems.  Worse yet, some systems define socklen_t but use a
1709 # different type in the getpeername() prototype, and Solaris Intel defines
1710 # Psocklen_t, which is a pointer to either socklen_t or void.  We use SOCKLEN_T
1711 # in the NWS code, defining it the proper type for the system.
1712 cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715 #include <sys/types.h>
1716    #include <sys/socket.h>
1717 int main() {
1718 extern int getpeername(int socket, struct sockaddr *addr, socklen_t *len);
1719 ; return 0; }
1720 EOF
1721 if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1722   rm -rf conftest*
1723   SOCKLEN_T=socklen_t
1724 else
1725   echo "configure: failed program was:" >&5
1726   cat conftest.$ac_ext >&5
1727   rm -rf conftest*
1728   cat > conftest.$ac_ext <<EOF
1729 #line 1730 "configure"
1730 #include "confdefs.h"
1731 #include <sys/types.h>
1732      #include <sys/socket.h>
1733 int main() {
1734 extern int getpeername(int socket, struct sockaddr *addr, size_t *len);
1735 ; return 0; }
1736 EOF
1737 if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1738   rm -rf conftest*
1739   SOCKLEN_T=size_t
1740 else
1741   echo "configure: failed program was:" >&5
1742   cat conftest.$ac_ext >&5
1743   rm -rf conftest*
1744   cat > conftest.$ac_ext <<EOF
1745 #line 1746 "configure"
1746 #include "confdefs.h"
1747 #include <sys/types.h>
1748        #include <sys/socket.h>
1749 int main() {
1750 socklen_t len; Psocklen_t lenP = &len;
1751        (void)getpeername(0, 0, lenP);
1752 ; return 0; }
1753 EOF
1754 if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1755   rm -rf conftest*
1756   SOCKLEN_T=socklen_t
1757 else
1758   echo "configure: failed program was:" >&5
1759   cat conftest.$ac_ext >&5
1760   rm -rf conftest*
1761   SOCKLEN_T=int
1762     
1763 fi
1764 rm -f conftest*
1765   
1766 fi
1767 rm -f conftest*
1768
1769 fi
1770 rm -f conftest*
1771
1772
1773 # Checks for typedefs, structures, and compiler characteristics.
1774 echo $ac_n "checking for working const""... $ac_c" 1>&6
1775 echo "configure:1776: checking for working const" >&5
1776 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1777   echo $ac_n "(cached) $ac_c" 1>&6
1778 else
1779   cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782
1783 int main() {
1784
1785 /* Ultrix mips cc rejects this.  */
1786 typedef int charset[2]; const charset x;
1787 /* SunOS 4.1.1 cc rejects this.  */
1788 char const *const *ccp;
1789 char **p;
1790 /* NEC SVR4.0.2 mips cc rejects this.  */
1791 struct point {int x, y;};
1792 static struct point const zero = {0,0};
1793 /* AIX XL C 1.02.0.0 rejects this.
1794    It does not let you subtract one const X* pointer from another in an arm
1795    of an if-expression whose if-part is not a constant expression */
1796 const char *g = "string";
1797 ccp = &g + (g ? g-g : 0);
1798 /* HPUX 7.0 cc rejects these. */
1799 ++ccp;
1800 p = (char**) ccp;
1801 ccp = (char const *const *) p;
1802 { /* SCO 3.2v4 cc rejects this.  */
1803   char *t;
1804   char const *s = 0 ? (char *) 0 : (char const *) 0;
1805
1806   *t++ = 0;
1807 }
1808 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1809   int x[] = {25, 17};
1810   const int *foo = &x[0];
1811   ++foo;
1812 }
1813 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1814   typedef const int *iptr;
1815   iptr p = 0;
1816   ++p;
1817 }
1818 { /* AIX XL C 1.02.0.0 rejects this saying
1819      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1820   struct s { int j; const int *ap[3]; };
1821   struct s *b; b->j = 5;
1822 }
1823 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1824   const int foo = 10;
1825 }
1826
1827 ; return 0; }
1828 EOF
1829 if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1830   rm -rf conftest*
1831   ac_cv_c_const=yes
1832 else
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   ac_cv_c_const=no
1837 fi
1838 rm -f conftest*
1839 fi
1840
1841 echo "$ac_t""$ac_cv_c_const" 1>&6
1842 if test $ac_cv_c_const = no; then
1843   cat >> confdefs.h <<\EOF
1844 #define const 
1845 EOF
1846
1847 fi
1848
1849 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1850 echo "configure:1851: checking for mode_t" >&5
1851 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1852   echo $ac_n "(cached) $ac_c" 1>&6
1853 else
1854   cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857 #include <sys/types.h>
1858 #if STDC_HEADERS
1859 #include <stdlib.h>
1860 #include <stddef.h>
1861 #endif
1862 EOF
1863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1864   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1865   rm -rf conftest*
1866   ac_cv_type_mode_t=yes
1867 else
1868   rm -rf conftest*
1869   ac_cv_type_mode_t=no
1870 fi
1871 rm -f conftest*
1872
1873 fi
1874 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1875 if test $ac_cv_type_mode_t = no; then
1876   cat >> confdefs.h <<\EOF
1877 #define mode_t int
1878 EOF
1879
1880 fi
1881
1882 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1883 echo "configure:1884: checking for pid_t" >&5
1884 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1885   echo $ac_n "(cached) $ac_c" 1>&6
1886 else
1887   cat > conftest.$ac_ext <<EOF
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890 #include <sys/types.h>
1891 #if STDC_HEADERS
1892 #include <stdlib.h>
1893 #include <stddef.h>
1894 #endif
1895 EOF
1896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1897   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1898   rm -rf conftest*
1899   ac_cv_type_pid_t=yes
1900 else
1901   rm -rf conftest*
1902   ac_cv_type_pid_t=no
1903 fi
1904 rm -f conftest*
1905
1906 fi
1907 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1908 if test $ac_cv_type_pid_t = no; then
1909   cat >> confdefs.h <<\EOF
1910 #define pid_t int
1911 EOF
1912
1913 fi
1914
1915 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1916 echo "configure:1917: checking for size_t" >&5
1917 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1918   echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920   cat > conftest.$ac_ext <<EOF
1921 #line 1922 "configure"
1922 #include "confdefs.h"
1923 #include <sys/types.h>
1924 #if STDC_HEADERS
1925 #include <stdlib.h>
1926 #include <stddef.h>
1927 #endif
1928 EOF
1929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1930   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1931   rm -rf conftest*
1932   ac_cv_type_size_t=yes
1933 else
1934   rm -rf conftest*
1935   ac_cv_type_size_t=no
1936 fi
1937 rm -f conftest*
1938
1939 fi
1940 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1941 if test $ac_cv_type_size_t = no; then
1942   cat >> confdefs.h <<\EOF
1943 #define size_t unsigned
1944 EOF
1945
1946 fi
1947
1948 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1949 echo "configure:1950: checking whether time.h and sys/time.h may both be included" >&5
1950 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1951   echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953   cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956 #include <sys/types.h>
1957 #include <sys/time.h>
1958 #include <time.h>
1959 int main() {
1960 struct tm *tp;
1961 ; return 0; }
1962 EOF
1963 if { (eval echo configure:1964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1964   rm -rf conftest*
1965   ac_cv_header_time=yes
1966 else
1967   echo "configure: failed program was:" >&5
1968   cat conftest.$ac_ext >&5
1969   rm -rf conftest*
1970   ac_cv_header_time=no
1971 fi
1972 rm -f conftest*
1973 fi
1974
1975 echo "$ac_t""$ac_cv_header_time" 1>&6
1976 if test $ac_cv_header_time = yes; then
1977   cat >> confdefs.h <<\EOF
1978 #define TIME_WITH_SYS_TIME 1
1979 EOF
1980
1981 fi
1982
1983 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1984 echo "configure:1985: checking whether struct tm is in sys/time.h or time.h" >&5
1985 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1986   echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988   cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 #include <sys/types.h>
1992 #include <time.h>
1993 int main() {
1994 struct tm *tp; tp->tm_sec;
1995 ; return 0; }
1996 EOF
1997 if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1998   rm -rf conftest*
1999   ac_cv_struct_tm=time.h
2000 else
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003   rm -rf conftest*
2004   ac_cv_struct_tm=sys/time.h
2005 fi
2006 rm -f conftest*
2007 fi
2008
2009 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2010 if test $ac_cv_struct_tm = sys/time.h; then
2011   cat >> confdefs.h <<\EOF
2012 #define TM_IN_SYS_TIME 1
2013 EOF
2014
2015 fi
2016
2017
2018 # Checks for library functions.
2019 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2020 echo "configure:2021: checking return type of signal handlers" >&5
2021 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2022   echo $ac_n "(cached) $ac_c" 1>&6
2023 else
2024   cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2027 #include <sys/types.h>
2028 #include <signal.h>
2029 #ifdef signal
2030 #undef signal
2031 #endif
2032 #ifdef __cplusplus
2033 extern "C" void (*signal (int, void (*)(int)))(int);
2034 #else
2035 void (*signal ()) ();
2036 #endif
2037
2038 int main() {
2039 int i;
2040 ; return 0; }
2041 EOF
2042 if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2043   rm -rf conftest*
2044   ac_cv_type_signal=void
2045 else
2046   echo "configure: failed program was:" >&5
2047   cat conftest.$ac_ext >&5
2048   rm -rf conftest*
2049   ac_cv_type_signal=int
2050 fi
2051 rm -f conftest*
2052 fi
2053
2054 echo "$ac_t""$ac_cv_type_signal" 1>&6
2055 cat >> confdefs.h <<EOF
2056 #define RETSIGTYPE $ac_cv_type_signal
2057 EOF
2058
2059
2060 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
2061 echo "configure:2062: checking for vprintf" >&5
2062 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
2063   echo $ac_n "(cached) $ac_c" 1>&6
2064 else
2065   cat > conftest.$ac_ext <<EOF
2066 #line 2067 "configure"
2067 #include "confdefs.h"
2068 /* System header to define __stub macros and hopefully few prototypes,
2069     which can conflict with char vprintf(); below.  */
2070 #include <assert.h>
2071 /* Override any gcc2 internal prototype to avoid an error.  */
2072 /* We use char because int might match the return type of a gcc2
2073     builtin and then its argument prototype would still apply.  */
2074 char vprintf();
2075
2076 int main() {
2077
2078 /* The GNU C library defines this for functions which it implements
2079     to always fail with ENOSYS.  Some functions are actually named
2080     something starting with __ and the normal name is an alias.  */
2081 #if defined (__stub_vprintf) || defined (__stub___vprintf)
2082 choke me
2083 #else
2084 vprintf();
2085 #endif
2086
2087 ; return 0; }
2088 EOF
2089 if { (eval echo configure:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2090   rm -rf conftest*
2091   eval "ac_cv_func_vprintf=yes"
2092 else
2093   echo "configure: failed program was:" >&5
2094   cat conftest.$ac_ext >&5
2095   rm -rf conftest*
2096   eval "ac_cv_func_vprintf=no"
2097 fi
2098 rm -f conftest*
2099 fi
2100
2101 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
2102   echo "$ac_t""yes" 1>&6
2103   cat >> confdefs.h <<\EOF
2104 #define HAVE_VPRINTF 1
2105 EOF
2106
2107 else
2108   echo "$ac_t""no" 1>&6
2109 fi
2110
2111 if test "$ac_cv_func_vprintf" != yes; then
2112 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
2113 echo "configure:2114: checking for _doprnt" >&5
2114 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
2115   echo $ac_n "(cached) $ac_c" 1>&6
2116 else
2117   cat > conftest.$ac_ext <<EOF
2118 #line 2119 "configure"
2119 #include "confdefs.h"
2120 /* System header to define __stub macros and hopefully few prototypes,
2121     which can conflict with char _doprnt(); below.  */
2122 #include <assert.h>
2123 /* Override any gcc2 internal prototype to avoid an error.  */
2124 /* We use char because int might match the return type of a gcc2
2125     builtin and then its argument prototype would still apply.  */
2126 char _doprnt();
2127
2128 int main() {
2129
2130 /* The GNU C library defines this for functions which it implements
2131     to always fail with ENOSYS.  Some functions are actually named
2132     something starting with __ and the normal name is an alias.  */
2133 #if defined (__stub__doprnt) || defined (__stub____doprnt)
2134 choke me
2135 #else
2136 _doprnt();
2137 #endif
2138
2139 ; return 0; }
2140 EOF
2141 if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2142   rm -rf conftest*
2143   eval "ac_cv_func__doprnt=yes"
2144 else
2145   echo "configure: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   rm -rf conftest*
2148   eval "ac_cv_func__doprnt=no"
2149 fi
2150 rm -f conftest*
2151 fi
2152
2153 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
2154   echo "$ac_t""yes" 1>&6
2155   cat >> confdefs.h <<\EOF
2156 #define HAVE_DOPRNT 1
2157 EOF
2158
2159 else
2160   echo "$ac_t""no" 1>&6
2161 fi
2162
2163 fi
2164
2165
2166 if test "$use_alarm_signal" != "no"; then
2167         echo $ac_n "checking for alarm""... $ac_c" 1>&6
2168 echo "configure:2169: checking for alarm" >&5
2169 if eval "test \"`echo '$''{'ac_cv_func_alarm'+set}'`\" = set"; then
2170   echo $ac_n "(cached) $ac_c" 1>&6
2171 else
2172   cat > conftest.$ac_ext <<EOF
2173 #line 2174 "configure"
2174 #include "confdefs.h"
2175 /* System header to define __stub macros and hopefully few prototypes,
2176     which can conflict with char alarm(); below.  */
2177 #include <assert.h>
2178 /* Override any gcc2 internal prototype to avoid an error.  */
2179 /* We use char because int might match the return type of a gcc2
2180     builtin and then its argument prototype would still apply.  */
2181 char alarm();
2182
2183 int main() {
2184
2185 /* The GNU C library defines this for functions which it implements
2186     to always fail with ENOSYS.  Some functions are actually named
2187     something starting with __ and the normal name is an alias.  */
2188 #if defined (__stub_alarm) || defined (__stub___alarm)
2189 choke me
2190 #else
2191 alarm();
2192 #endif
2193
2194 ; return 0; }
2195 EOF
2196 if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2197   rm -rf conftest*
2198   eval "ac_cv_func_alarm=yes"
2199 else
2200   echo "configure: failed program was:" >&5
2201   cat conftest.$ac_ext >&5
2202   rm -rf conftest*
2203   eval "ac_cv_func_alarm=no"
2204 fi
2205 rm -f conftest*
2206 fi
2207
2208 if eval "test \"`echo '$ac_cv_func_'alarm`\" = yes"; then
2209   echo "$ac_t""yes" 1>&6
2210   cat >> confdefs.h <<\EOF
2211 #define HAVE_ALARM 1
2212 EOF
2213
2214 else
2215   echo "$ac_t""no" 1>&6
2216 { echo "configure: error: Can't do without alarm!! Try to configure with --disable-sigalarm" 1>&2; exit 1; }
2217 fi
2218
2219 fi
2220
2221 for ac_func in endpwent ftruncate gethostbyaddr gethostbyaddr_r gethostbyname gethostname uname gettimeofday inet_aton inet_ntoa memset mkdir select socket strcasecmp strchr strdup strerror sysconf getrusage siginterrupt sighold sigrelse strnlen fileno sqrt
2222 do
2223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2224 echo "configure:2225: checking for $ac_func" >&5
2225 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2226   echo $ac_n "(cached) $ac_c" 1>&6
2227 else
2228   cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 /* System header to define __stub macros and hopefully few prototypes,
2232     which can conflict with char $ac_func(); below.  */
2233 #include <assert.h>
2234 /* Override any gcc2 internal prototype to avoid an error.  */
2235 /* We use char because int might match the return type of a gcc2
2236     builtin and then its argument prototype would still apply.  */
2237 char $ac_func();
2238
2239 int main() {
2240
2241 /* The GNU C library defines this for functions which it implements
2242     to always fail with ENOSYS.  Some functions are actually named
2243     something starting with __ and the normal name is an alias.  */
2244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2245 choke me
2246 #else
2247 $ac_func();
2248 #endif
2249
2250 ; return 0; }
2251 EOF
2252 if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2253   rm -rf conftest*
2254   eval "ac_cv_func_$ac_func=yes"
2255 else
2256   echo "configure: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   rm -rf conftest*
2259   eval "ac_cv_func_$ac_func=no"
2260 fi
2261 rm -f conftest*
2262 fi
2263
2264 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2265   echo "$ac_t""yes" 1>&6
2266     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2267   cat >> confdefs.h <<EOF
2268 #define $ac_tr_func 1
2269 EOF
2270  
2271 else
2272   echo "$ac_t""no" 1>&6
2273 fi
2274 done
2275
2276
2277 # Substitute these variables.
2278
2279
2280
2281
2282 # the following should be automatically substitute by autoconf but for
2283 # consistency we put them here
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295 # Define new variables to substitute.
2296 cat >> confdefs.h <<EOF
2297 #define SOCKLEN_T ${SOCKLEN_T}
2298 EOF
2299
2300
2301
2302
2303 cat >> confdefs.h <<EOF
2304 #define TOP "$TOP"
2305 EOF
2306
2307
2308
2309 trap '' 1 2 15
2310 cat > confcache <<\EOF
2311 # This file is a shell script that caches the results of configure
2312 # tests run on this system so they can be shared between configure
2313 # scripts and configure runs.  It is not useful on other systems.
2314 # If it contains results you don't want to keep, you may remove or edit it.
2315 #
2316 # By default, configure uses ./config.cache as the cache file,
2317 # creating it if it does not exist already.  You can give configure
2318 # the --cache-file=FILE option to use a different cache file; that is
2319 # what configure does when it calls configure scripts in
2320 # subdirectories, so they share the cache.
2321 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2322 # config.status only pays attention to the cache file if you give it the
2323 # --recheck option to rerun configure.
2324 #
2325 EOF
2326 # The following way of writing the cache mishandles newlines in values,
2327 # but we know of no workaround that is simple, portable, and efficient.
2328 # So, don't put newlines in cache variables' values.
2329 # Ultrix sh set writes to stderr and can't be redirected directly,
2330 # and sets the high bit in the cache file unless we assign to the vars.
2331 (set) 2>&1 |
2332   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2333   *ac_space=\ *)
2334     # `set' does not quote correctly, so add quotes (double-quote substitution
2335     # turns \\\\ into \\, and sed turns \\ into \).
2336     sed -n \
2337       -e "s/'/'\\\\''/g" \
2338       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2339     ;;
2340   *)
2341     # `set' quotes correctly as required by POSIX, so do not add quotes.
2342     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2343     ;;
2344   esac >> confcache
2345 if cmp -s $cache_file confcache; then
2346   :
2347 else
2348   if test -w $cache_file; then
2349     echo "updating cache $cache_file"
2350     cat confcache > $cache_file
2351   else
2352     echo "not updating unwritable cache $cache_file"
2353   fi
2354 fi
2355 rm -f confcache
2356
2357 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2358
2359 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2360 # Let make expand exec_prefix.
2361 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2362
2363 # Any assignment to VPATH causes Sun make to only execute
2364 # the first set of double-colon rules, so remove it if not needed.
2365 # If there is a colon in the path, we need to keep it.
2366 if test "x$srcdir" = x.; then
2367   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2368 fi
2369
2370 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2371
2372 DEFS=-DHAVE_CONFIG_H
2373
2374 # Without the "./", some shells look in PATH for config.status.
2375 : ${CONFIG_STATUS=./config.status}
2376
2377 echo creating $CONFIG_STATUS
2378 rm -f $CONFIG_STATUS
2379 cat > $CONFIG_STATUS <<EOF
2380 #! /bin/sh
2381 # Generated automatically by configure.
2382 # Run this file to recreate the current configuration.
2383 # This directory was configured as follows,
2384 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2385 #
2386 # $0 $ac_configure_args
2387 #
2388 # Compiler output produced by configure, useful for debugging
2389 # configure, is in ./config.log if it exists.
2390
2391 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2392 for ac_option
2393 do
2394   case "\$ac_option" in
2395   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2396     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2397     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2398   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2399     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2400     exit 0 ;;
2401   -help | --help | --hel | --he | --h)
2402     echo "\$ac_cs_usage"; exit 0 ;;
2403   *) echo "\$ac_cs_usage"; exit 1 ;;
2404   esac
2405 done
2406
2407 ac_given_srcdir=$srcdir
2408 ac_given_INSTALL="$INSTALL"
2409
2410 trap 'rm -fr `echo "Makedefs Include/config_portability.h:Include/config_portability.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2411 EOF
2412 cat >> $CONFIG_STATUS <<EOF
2413
2414 # Protect against being on the right side of a sed subst in config.status.
2415 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2416  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2417 $ac_vpsub
2418 $extrasub
2419 s%@SHELL@%$SHELL%g
2420 s%@CFLAGS@%$CFLAGS%g
2421 s%@CPPFLAGS@%$CPPFLAGS%g
2422 s%@CXXFLAGS@%$CXXFLAGS%g
2423 s%@FFLAGS@%$FFLAGS%g
2424 s%@DEFS@%$DEFS%g
2425 s%@LDFLAGS@%$LDFLAGS%g
2426 s%@LIBS@%$LIBS%g
2427 s%@exec_prefix@%$exec_prefix%g
2428 s%@prefix@%$prefix%g
2429 s%@program_transform_name@%$program_transform_name%g
2430 s%@bindir@%$bindir%g
2431 s%@sbindir@%$sbindir%g
2432 s%@libexecdir@%$libexecdir%g
2433 s%@datadir@%$datadir%g
2434 s%@sysconfdir@%$sysconfdir%g
2435 s%@sharedstatedir@%$sharedstatedir%g
2436 s%@localstatedir@%$localstatedir%g
2437 s%@libdir@%$libdir%g
2438 s%@includedir@%$includedir%g
2439 s%@oldincludedir@%$oldincludedir%g
2440 s%@infodir@%$infodir%g
2441 s%@mandir@%$mandir%g
2442 s%@host@%$host%g
2443 s%@host_alias@%$host_alias%g
2444 s%@host_cpu@%$host_cpu%g
2445 s%@host_vendor@%$host_vendor%g
2446 s%@host_os@%$host_os%g
2447 s%@AR@%$AR%g
2448 s%@CC@%$CC%g
2449 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2450 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2451 s%@INSTALL_DATA@%$INSTALL_DATA%g
2452 s%@RANLIB@%$RANLIB%g
2453 s%@RM@%$RM%g
2454 s%@CP@%$CP%g
2455 s%@TAR@%$TAR%g
2456 s%@CTAGS@%$CTAGS%g
2457 s%@PROFILE@%$PROFILE%g
2458 s%@CPP@%$CPP%g
2459 s%@ARFLAGS@%$ARFLAGS%g
2460 s%@INCLUDES@%$INCLUDES%g
2461 s%@PREFIX_DIR@%$PREFIX_DIR%g
2462 s%@TOP@%$TOP%g
2463 s%@NWS_TOP@%$NWS_TOP%g
2464 s%@uint32_t@%$uint32_t%g
2465 s%@SOCKLEN_T@%$SOCKLEN_T%g
2466
2467 CEOF
2468 EOF
2469
2470 cat >> $CONFIG_STATUS <<\EOF
2471
2472 # Split the substitutions into bite-sized pieces for seds with
2473 # small command number limits, like on Digital OSF/1 and HP-UX.
2474 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2475 ac_file=1 # Number of current file.
2476 ac_beg=1 # First line for current file.
2477 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2478 ac_more_lines=:
2479 ac_sed_cmds=""
2480 while $ac_more_lines; do
2481   if test $ac_beg -gt 1; then
2482     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2483   else
2484     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2485   fi
2486   if test ! -s conftest.s$ac_file; then
2487     ac_more_lines=false
2488     rm -f conftest.s$ac_file
2489   else
2490     if test -z "$ac_sed_cmds"; then
2491       ac_sed_cmds="sed -f conftest.s$ac_file"
2492     else
2493       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2494     fi
2495     ac_file=`expr $ac_file + 1`
2496     ac_beg=$ac_end
2497     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2498   fi
2499 done
2500 if test -z "$ac_sed_cmds"; then
2501   ac_sed_cmds=cat
2502 fi
2503 EOF
2504
2505 cat >> $CONFIG_STATUS <<EOF
2506
2507 CONFIG_FILES=\${CONFIG_FILES-"Makedefs"}
2508 EOF
2509 cat >> $CONFIG_STATUS <<\EOF
2510 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2511   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2512   case "$ac_file" in
2513   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2514        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2515   *) ac_file_in="${ac_file}.in" ;;
2516   esac
2517
2518   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2519
2520   # Remove last slash and all that follows it.  Not all systems have dirname.
2521   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2522   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2523     # The file is in a subdirectory.
2524     test ! -d "$ac_dir" && mkdir "$ac_dir"
2525     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2526     # A "../" for each directory in $ac_dir_suffix.
2527     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2528   else
2529     ac_dir_suffix= ac_dots=
2530   fi
2531
2532   case "$ac_given_srcdir" in
2533   .)  srcdir=.
2534       if test -z "$ac_dots"; then top_srcdir=.
2535       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2536   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2537   *) # Relative path.
2538     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2539     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2540   esac
2541
2542   case "$ac_given_INSTALL" in
2543   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2544   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2545   esac
2546
2547   echo creating "$ac_file"
2548   rm -f "$ac_file"
2549   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2550   case "$ac_file" in
2551   *Makefile*) ac_comsub="1i\\
2552 # $configure_input" ;;
2553   *) ac_comsub= ;;
2554   esac
2555
2556   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2557   sed -e "$ac_comsub
2558 s%@configure_input@%$configure_input%g
2559 s%@srcdir@%$srcdir%g
2560 s%@top_srcdir@%$top_srcdir%g
2561 s%@INSTALL@%$INSTALL%g
2562 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2563 fi; done
2564 rm -f conftest.s*
2565
2566 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2567 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2568 #
2569 # ac_d sets the value in "#define NAME VALUE" lines.
2570 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2571 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2572 ac_dC='\3'
2573 ac_dD='%g'
2574 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2575 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2576 ac_uB='\([      ]\)%\1#\2define\3'
2577 ac_uC=' '
2578 ac_uD='\4%g'
2579 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2580 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2581 ac_eB='$%\1#\2define\3'
2582 ac_eC=' '
2583 ac_eD='%g'
2584
2585 if test "${CONFIG_HEADERS+set}" != set; then
2586 EOF
2587 cat >> $CONFIG_STATUS <<EOF
2588   CONFIG_HEADERS="Include/config_portability.h:Include/config_portability.h.in"
2589 EOF
2590 cat >> $CONFIG_STATUS <<\EOF
2591 fi
2592 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2593   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2594   case "$ac_file" in
2595   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2596        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2597   *) ac_file_in="${ac_file}.in" ;;
2598   esac
2599
2600   echo creating $ac_file
2601
2602   rm -f conftest.frag conftest.in conftest.out
2603   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2604   cat $ac_file_inputs > conftest.in
2605
2606 EOF
2607
2608 # Transform confdefs.h into a sed script conftest.vals that substitutes
2609 # the proper values into config.h.in to produce config.h.  And first:
2610 # Protect against being on the right side of a sed subst in config.status.
2611 # Protect against being in an unquoted here document in config.status.
2612 rm -f conftest.vals
2613 cat > conftest.hdr <<\EOF
2614 s/[\\&%]/\\&/g
2615 s%[\\$`]%\\&%g
2616 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2617 s%ac_d%ac_u%gp
2618 s%ac_u%ac_e%gp
2619 EOF
2620 sed -n -f conftest.hdr confdefs.h > conftest.vals
2621 rm -f conftest.hdr
2622
2623 # This sed command replaces #undef with comments.  This is necessary, for
2624 # example, in the case of _POSIX_SOURCE, which is predefined and required
2625 # on some systems where configure will not decide to define it.
2626 cat >> conftest.vals <<\EOF
2627 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2628 EOF
2629
2630 # Break up conftest.vals because some shells have a limit on
2631 # the size of here documents, and old seds have small limits too.
2632
2633 rm -f conftest.tail
2634 while :
2635 do
2636   ac_lines=`grep -c . conftest.vals`
2637   # grep -c gives empty output for an empty file on some AIX systems.
2638   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2639   # Write a limited-size here document to conftest.frag.
2640   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2641   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2642   echo 'CEOF
2643   sed -f conftest.frag conftest.in > conftest.out
2644   rm -f conftest.in
2645   mv conftest.out conftest.in
2646 ' >> $CONFIG_STATUS
2647   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2648   rm -f conftest.vals
2649   mv conftest.tail conftest.vals
2650 done
2651 rm -f conftest.vals
2652
2653 cat >> $CONFIG_STATUS <<\EOF
2654   rm -f conftest.frag conftest.h
2655   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2656   cat conftest.in >> conftest.h
2657   rm -f conftest.in
2658   if cmp -s $ac_file conftest.h 2>/dev/null; then
2659     echo "$ac_file is unchanged"
2660     rm -f conftest.h
2661   else
2662     # Remove last slash and all that follows it.  Not all systems have dirname.
2663       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2664       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2665       # The file is in a subdirectory.
2666       test ! -d "$ac_dir" && mkdir "$ac_dir"
2667     fi
2668     rm -f $ac_file
2669     mv conftest.h $ac_file
2670   fi
2671 fi; done
2672
2673 EOF
2674 cat >> $CONFIG_STATUS <<EOF
2675
2676 EOF
2677 cat >> $CONFIG_STATUS <<\EOF
2678
2679 exit 0
2680 EOF
2681 chmod +x $CONFIG_STATUS
2682 rm -fr confdefs* $ac_clean_files
2683 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2684