1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.3
5# Copyright (C) 1992, 1993, 1994 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:
11ac_help=
12ac_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.
18build=NONE
19cache_file=./config.cache
20exec_prefix=NONE
21host=NONE
22no_create=
23nonopt=NONE
24no_recursion=
25prefix=NONE
26program_prefix=NONE
27program_suffix=NONE
28program_transform_name=s,x,x,
29silent=
30site=
31srcdir=
32target=NONE
33verbose=
34x_includes=NONE
35x_libraries=NONE
36
37# Initialize some other variables.
38subdirs=
39
40ac_prev=
41for ac_option
42do
43
44  # If the previous option needs an argument, assign it.
45  if test -n "$ac_prev"; then
46    eval "$ac_prev=\$ac_option"
47    ac_prev=
48    continue
49  fi
50
51  case "$ac_option" in
52  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53  *) ac_optarg= ;;
54  esac
55
56  # Accept the important Cygnus configure options, so we can diagnose typos.
57
58  case "$ac_option" in
59
60  -build | --build | --buil | --bui | --bu | --b)
61    ac_prev=build ;;
62  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
63    build="$ac_optarg" ;;
64
65  -cache-file | --cache-file | --cache-fil | --cache-fi \
66  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
67    ac_prev=cache_file ;;
68  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
69  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
70    cache_file="$ac_optarg" ;;
71
72  -disable-* | --disable-*)
73    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
74    # Reject names that are not valid shell variable names.
75    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
76      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
77    fi
78    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
79    eval "enable_${ac_feature}=no" ;;
80
81  -enable-* | --enable-*)
82    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
83    # Reject names that are not valid shell variable names.
84    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
85      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
86    fi
87    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
88    case "$ac_option" in
89      *=*) ;;
90      *) ac_optarg=yes ;;
91    esac
92    eval "enable_${ac_feature}='$ac_optarg'" ;;
93
94  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
96  | --exec | --exe | --ex)
97    ac_prev=exec_prefix ;;
98  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
99  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
100  | --exec=* | --exe=* | --ex=*)
101    exec_prefix="$ac_optarg" ;;
102
103  -gas | --gas | --ga | --g)
104    # Obsolete; use --with-gas.
105    with_gas=yes ;;
106
107  -help | --help | --hel | --he)
108    # Omit some internal or obsolete options to make the list less imposing.
109    # This message is too long to be a string in the A/UX 3.1 sh.
110    cat << EOF
111Usage: configure [options] [host]
112Options: [defaults in brackets after descriptions]
113Configuration:
114  --cache-file=FILE       cache test results in FILE
115  --help                  print this message
116  --no-create             do not create output files
117  --quiet, --silent       do not print \`checking...' messages
118  --version               print the version of autoconf that created configure
119Directory and file names:
120  --prefix=PREFIX         install architecture-independent files in PREFIX
121                          [$ac_default_prefix]
122  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
123                          [same as prefix]
124  --srcdir=DIR            find the sources in DIR [configure dir or ..]
125  --program-prefix=PREFIX prepend PREFIX to installed program names
126  --program-suffix=SUFFIX append SUFFIX to installed program names
127  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
128Host type:
129  --build=BUILD           configure for building on BUILD [BUILD=HOST]
130  --host=HOST             configure for HOST [guessed]
131  --target=TARGET         configure for TARGET [TARGET=HOST]
132Features and packages:
133  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
134  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
135  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
136  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
137  --x-includes=DIR        X include files are in DIR
138  --x-libraries=DIR       X library files are in DIR
139--enable and --with options recognized:$ac_help
140EOF
141    exit 0 ;;
142
143  -host | --host | --hos | --ho)
144    ac_prev=host ;;
145  -host=* | --host=* | --hos=* | --ho=*)
146    host="$ac_optarg" ;;
147
148  -nfp | --nfp | --nf)
149    # Obsolete; use --without-fp.
150    with_fp=no ;;
151
152  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
153  | --no-cr | --no-c)
154    no_create=yes ;;
155
156  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
157  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
158    no_recursion=yes ;;
159
160  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
161    ac_prev=prefix ;;
162  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
163    prefix="$ac_optarg" ;;
164
165  -program-prefix | --program-prefix | --program-prefi | --program-pref \
166  | --program-pre | --program-pr | --program-p)
167    ac_prev=program_prefix ;;
168  -program-prefix=* | --program-prefix=* | --program-prefi=* \
169  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
170    program_prefix="$ac_optarg" ;;
171
172  -program-suffix | --program-suffix | --program-suffi | --program-suff \
173  | --program-suf | --program-su | --program-s)
174    ac_prev=program_suffix ;;
175  -program-suffix=* | --program-suffix=* | --program-suffi=* \
176  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
177    program_suffix="$ac_optarg" ;;
178
179  -program-transform-name | --program-transform-name \
180  | --program-transform-nam | --program-transform-na \
181  | --program-transform-n | --program-transform- \
182  | --program-transform | --program-transfor \
183  | --program-transfo | --program-transf \
184  | --program-trans | --program-tran \
185  | --progr-tra | --program-tr | --program-t)
186    ac_prev=program_transform_name ;;
187  -program-transform-name=* | --program-transform-name=* \
188  | --program-transform-nam=* | --program-transform-na=* \
189  | --program-transform-n=* | --program-transform-=* \
190  | --program-transform=* | --program-transfor=* \
191  | --program-transfo=* | --program-transf=* \
192  | --program-trans=* | --program-tran=* \
193  | --progr-tra=* | --program-tr=* | --program-t=*)
194    program_transform_name="$ac_optarg" ;;
195
196  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
197  | -silent | --silent | --silen | --sile | --sil)
198    silent=yes ;;
199
200  -site | --site | --sit)
201    ac_prev=site ;;
202  -site=* | --site=* | --sit=*)
203    site="$ac_optarg" ;;
204
205  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
206    ac_prev=srcdir ;;
207  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
208    srcdir="$ac_optarg" ;;
209
210  -target | --target | --targe | --targ | --tar | --ta | --t)
211    ac_prev=target ;;
212  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
213    target="$ac_optarg" ;;
214
215  -v | -verbose | --verbose | --verbos | --verbo | --verb)
216    verbose=yes ;;
217
218  -version | --version | --versio | --versi | --vers)
219    echo "configure generated by autoconf version 2.3"
220    exit 0 ;;
221
222  -with-* | --with-*)
223    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
224    # Reject names that are not valid shell variable names.
225    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
226      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
227    fi
228    ac_package=`echo $ac_package| sed 's/-/_/g'`
229    case "$ac_option" in
230      *=*) ;;
231      *) ac_optarg=yes ;;
232    esac
233    eval "with_${ac_package}='$ac_optarg'" ;;
234
235  -without-* | --without-*)
236    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
237    # Reject names that are not valid shell variable names.
238    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
239      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
240    fi
241    ac_package=`echo $ac_package| sed 's/-/_/g'`
242    eval "with_${ac_package}=no" ;;
243
244  --x)
245    # Obsolete; use --with-x.
246    with_x=yes ;;
247
248  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
249  | --x-incl | --x-inc | --x-in | --x-i)
250    ac_prev=x_includes ;;
251  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
252  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
253    x_includes="$ac_optarg" ;;
254
255  -x-libraries | --x-libraries | --x-librarie | --x-librari \
256  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
257    ac_prev=x_libraries ;;
258  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
259  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
260    x_libraries="$ac_optarg" ;;
261
262  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
263    ;;
264
265  *)
266    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
267      echo "configure: warning: $ac_option: invalid host type" 1>&2
268    fi
269    if test "x$nonopt" != xNONE; then
270      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
271    fi
272    nonopt="$ac_option"
273    ;;
274
275  esac
276done
277
278if test -n "$ac_prev"; then
279  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280fi
281
282trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
283
284# File descriptor usage:
285# 0 standard input
286# 1 file creation
287# 2 errors and warnings
288# 3 some systems may open it to /dev/tty
289# 4 used on the Kubota Titan
290# 6 checking for... messages and results
291# 5 compiler messages saved in config.log
292if test "$silent" = yes; then
293  exec 6>/dev/null
294else
295  exec 6>&1
296fi
297exec 5>./config.log
298
299echo "\
300This file contains any messages produced by compilers while
301running configure, to aid debugging if configure makes a mistake.
302" 1>&5
303
304# Strip out --no-create and --no-recursion so they do not pile up.
305# Also quote any args containing shell metacharacters.
306ac_configure_args=
307for ac_arg
308do
309  case "$ac_arg" in
310  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311  | --no-cr | --no-c) ;;
312  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
314  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
315  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
316  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
317  esac
318done
319
320# NLS nuisances.
321# Only set LANG and LC_ALL to C if already set.
322# These must not be set unconditionally because not all systems understand
323# e.g. LANG=C (notably SCO).
324if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
325if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
326
327# confdefs.h avoids OS command line length limits that DEFS can exceed.
328rm -rf conftest* confdefs.h
329# AIX cpp loses on an empty file, so make sure it contains at least a newline.
330echo > confdefs.h
331
332# A filename unique to this package, relative to the directory that
333# configure is in, which we can look for to find out if srcdir is correct.
334ac_unique_file=dancer.h
335
336# Find the source files, if location was not specified.
337if test -z "$srcdir"; then
338  ac_srcdir_defaulted=yes
339  # Try the directory containing this script, then its parent.
340  ac_prog=$0
341  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
342  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
343  srcdir=$ac_confdir
344  if test ! -r $srcdir/$ac_unique_file; then
345    srcdir=..
346  fi
347else
348  ac_srcdir_defaulted=no
349fi
350if test ! -r $srcdir/$ac_unique_file; then
351  if test "$ac_srcdir_defaulted" = yes; then
352    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
353  else
354    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
355  fi
356fi
357srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
358
359# Prefer explicitly selected file to automatically selected ones.
360if test -z "$CONFIG_SITE"; then
361  if test "x$prefix" != xNONE; then
362    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
363  else
364    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
365  fi
366fi
367for ac_site_file in $CONFIG_SITE; do
368  if test -r "$ac_site_file"; then
369    echo "loading site script $ac_site_file"
370    . "$ac_site_file"
371  fi
372done
373
374if test -r "$cache_file"; then
375  echo "loading cache $cache_file"
376  . $cache_file
377else
378  echo "creating cache $cache_file"
379  > $cache_file
380fi
381
382ac_ext=c
383# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
384ac_cpp='$CPP $CPPFLAGS'
385ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
386ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
387
388if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
389  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
390  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
391    ac_n= ac_c='
392' ac_t='	'
393  else
394    ac_n=-n ac_c= ac_t=
395  fi
396else
397  ac_n= ac_c='\c' ac_t=
398fi
399
400
401
402
403
404CFLAGS=""
405# Extract the first word of "gcc", so it can be a program name with args.
406set dummy gcc; ac_word=$2
407echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
408if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
409  echo $ac_n "(cached) $ac_c" 1>&6
410else
411  if test -n "$CC"; then
412  ac_cv_prog_CC="$CC" # Let the user override the test.
413else
414  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
415  for ac_dir in $PATH; do
416    test -z "$ac_dir" && ac_dir=.
417    if test -f $ac_dir/$ac_word; then
418      ac_cv_prog_CC="gcc"
419      break
420    fi
421  done
422  IFS="$ac_save_ifs"
423  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
424fi
425fi
426CC="$ac_cv_prog_CC"
427if test -n "$CC"; then
428  echo "$ac_t""$CC" 1>&6
429else
430  echo "$ac_t""no" 1>&6
431fi
432
433
434echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
435if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
436  echo $ac_n "(cached) $ac_c" 1>&6
437else
438  cat > conftest.c <<EOF
439#ifdef __GNUC__
440  yes;
441#endif
442EOF
443if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
444  ac_cv_prog_gcc=yes
445else
446  ac_cv_prog_gcc=no
447fi
448fi
449echo "$ac_t""$ac_cv_prog_gcc" 1>&6
450if test $ac_cv_prog_gcc = yes; then
451  GCC=yes
452  if test "${CFLAGS+set}" != set; then
453    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
454if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
455  echo $ac_n "(cached) $ac_c" 1>&6
456else
457  echo 'void f(){}' > conftest.c
458if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
459  ac_cv_prog_gcc_g=yes
460else
461  ac_cv_prog_gcc_g=no
462fi
463rm -f conftest*
464
465fi
466    echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
467    if test $ac_cv_prog_gcc_g = yes; then
468      CFLAGS="-g -O"
469    else
470      CFLAGS="-O"
471    fi
472  fi
473else
474  GCC=
475  test "${CFLAGS+set}" = set || CFLAGS="-g"
476fi
477
478echo $ac_n "checking for inline""... $ac_c" 1>&6
479if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
480  echo $ac_n "(cached) $ac_c" 1>&6
481else
482  ac_cv_c_inline=no
483for ac_kw in inline __inline__ __inline; do
484  cat > conftest.$ac_ext <<EOF
485#line 486 "configure"
486#include "confdefs.h"
487
488int main() { return 0; }
489int t() {
490} $ac_kw foo() {
491; return 0; }
492EOF
493if eval $ac_compile; then
494  rm -rf conftest*
495  ac_cv_c_inline=$ac_kw; break
496fi
497rm -f conftest*
498
499done
500
501fi
502echo "$ac_t""$ac_cv_c_inline" 1>&6
503case "$ac_cv_c_inline" in
504  inline | yes) ;;
505  no) cat >> confdefs.h <<\EOF
506#define inline
507EOF
508 ;;
509  *)  cat >> confdefs.h <<EOF
510#define inline $ac_cv_c_inline
511EOF
512 ;;
513esac
514
515
516
517echo $ac_n "checking for -lm""... $ac_c" 1>&6
518if eval "test \"`echo '$''{'ac_cv_lib_m'+set}'`\" = set"; then
519  echo $ac_n "(cached) $ac_c" 1>&6
520else
521  ac_save_LIBS="$LIBS"
522LIBS="-lm  $LIBS"
523cat > conftest.$ac_ext <<EOF
524#line 525 "configure"
525#include "confdefs.h"
526
527int main() { return 0; }
528int t() {
529exp()
530; return 0; }
531EOF
532if eval $ac_link; then
533  rm -rf conftest*
534  eval "ac_cv_lib_m=yes"
535else
536  rm -rf conftest*
537  eval "ac_cv_lib_m=no"
538fi
539rm -f conftest*
540LIBS="$ac_save_LIBS"
541
542fi
543if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
544  echo "$ac_t""yes" 1>&6
545    ac_tr_lib=HAVE_LIB`echo m | tr '[a-z]' '[A-Z]'`
546  cat >> confdefs.h <<EOF
547#define $ac_tr_lib 1
548EOF
549
550  LIBS="-lm $LIBS"
551
552else
553  echo "$ac_t""no" 1>&6
554fi
555
556echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
557if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
558  echo $ac_n "(cached) $ac_c" 1>&6
559else
560  ac_save_LIBS="$LIBS"
561LIBS="-lnsl  $LIBS"
562cat > conftest.$ac_ext <<EOF
563#line 564 "configure"
564#include "confdefs.h"
565
566int main() { return 0; }
567int t() {
568gethostbyname()
569; return 0; }
570EOF
571if eval $ac_link; then
572  rm -rf conftest*
573  eval "ac_cv_lib_nsl=yes"
574else
575  rm -rf conftest*
576  eval "ac_cv_lib_nsl=no"
577fi
578rm -f conftest*
579LIBS="$ac_save_LIBS"
580
581fi
582if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
583  echo "$ac_t""yes" 1>&6
584    ac_tr_lib=HAVE_LIB`echo nsl | tr '[a-z]' '[A-Z]'`
585  cat >> confdefs.h <<EOF
586#define $ac_tr_lib 1
587EOF
588
589  LIBS="-lnsl $LIBS"
590
591else
592  echo "$ac_t""no" 1>&6
593fi
594
595echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
596if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
597  echo $ac_n "(cached) $ac_c" 1>&6
598else
599  ac_save_LIBS="$LIBS"
600LIBS="-lsocket  $LIBS"
601cat > conftest.$ac_ext <<EOF
602#line 603 "configure"
603#include "confdefs.h"
604
605int main() { return 0; }
606int t() {
607socket()
608; return 0; }
609EOF
610if eval $ac_link; then
611  rm -rf conftest*
612  eval "ac_cv_lib_socket=yes"
613else
614  rm -rf conftest*
615  eval "ac_cv_lib_socket=no"
616fi
617rm -f conftest*
618LIBS="$ac_save_LIBS"
619
620fi
621if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
622  echo "$ac_t""yes" 1>&6
623    ac_tr_lib=HAVE_LIB`echo socket | tr '[a-z]' '[A-Z]'`
624  cat >> confdefs.h <<EOF
625#define $ac_tr_lib 1
626EOF
627
628  LIBS="-lsocket $LIBS"
629
630else
631  echo "$ac_t""no" 1>&6
632fi
633
634echo $ac_n "checking for -lucb""... $ac_c" 1>&6
635if eval "test \"`echo '$''{'ac_cv_lib_ucb'+set}'`\" = set"; then
636  echo $ac_n "(cached) $ac_c" 1>&6
637else
638  ac_save_LIBS="$LIBS"
639LIBS="-lucb  $LIBS"
640cat > conftest.$ac_ext <<EOF
641#line 642 "configure"
642#include "confdefs.h"
643
644int main() { return 0; }
645int t() {
646gethostname()
647; return 0; }
648EOF
649if eval $ac_link; then
650  rm -rf conftest*
651  eval "ac_cv_lib_ucb=yes"
652else
653  rm -rf conftest*
654  eval "ac_cv_lib_ucb=no"
655fi
656rm -f conftest*
657LIBS="$ac_save_LIBS"
658
659fi
660if eval "test \"`echo '$ac_cv_lib_'ucb`\" = yes"; then
661  echo "$ac_t""yes" 1>&6
662    ac_tr_lib=HAVE_LIB`echo ucb | tr '[a-z]' '[A-Z]'`
663  cat >> confdefs.h <<EOF
664#define $ac_tr_lib 1
665EOF
666
667  LIBS="-lucb $LIBS"
668
669else
670  echo "$ac_t""no" 1>&6
671fi
672
673echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6
674if eval "test \"`echo '$''{'ac_cv_lib_crypt'+set}'`\" = set"; then
675  echo $ac_n "(cached) $ac_c" 1>&6
676else
677  ac_save_LIBS="$LIBS"
678LIBS="-lcrypt  $LIBS"
679cat > conftest.$ac_ext <<EOF
680#line 681 "configure"
681#include "confdefs.h"
682
683int main() { return 0; }
684int t() {
685crypt()
686; return 0; }
687EOF
688if eval $ac_link; then
689  rm -rf conftest*
690  eval "ac_cv_lib_crypt=yes"
691else
692  rm -rf conftest*
693  eval "ac_cv_lib_crypt=no"
694fi
695rm -f conftest*
696LIBS="$ac_save_LIBS"
697
698fi
699if eval "test \"`echo '$ac_cv_lib_'crypt`\" = yes"; then
700  echo "$ac_t""yes" 1>&6
701    ac_tr_lib=HAVE_LIB`echo crypt | tr '[a-z]' '[A-Z]'`
702  cat >> confdefs.h <<EOF
703#define $ac_tr_lib 1
704EOF
705
706  LIBS="-lcrypt $LIBS"
707
708else
709  echo "$ac_t""no" 1>&6
710fi
711
712echo $ac_n "checking for -lfpl""... $ac_c" 1>&6
713if eval "test \"`echo '$''{'ac_cv_lib_fpl'+set}'`\" = set"; then
714  echo $ac_n "(cached) $ac_c" 1>&6
715else
716  ac_save_LIBS="$LIBS"
717LIBS="-lfpl  $LIBS"
718cat > conftest.$ac_ext <<EOF
719#line 720 "configure"
720#include "confdefs.h"
721
722int main() { return 0; }
723int t() {
724fplExecuteFile()
725; return 0; }
726EOF
727if eval $ac_link; then
728  rm -rf conftest*
729  eval "ac_cv_lib_fpl=yes"
730else
731  rm -rf conftest*
732  eval "ac_cv_lib_fpl=no"
733fi
734rm -f conftest*
735LIBS="$ac_save_LIBS"
736
737fi
738if eval "test \"`echo '$ac_cv_lib_'fpl`\" = yes"; then
739  echo "$ac_t""yes" 1>&6
740    ac_tr_lib=HAVE_LIB`echo fpl | tr '[a-z]' '[A-Z]'`
741  cat >> confdefs.h <<EOF
742#define $ac_tr_lib 1
743EOF
744
745  LIBS="-lfpl $LIBS"
746
747else
748  echo "$ac_t""no" 1>&6
749fi
750
751
752
753echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
754# On Suns, sometimes $CPP names a directory.
755if test -n "$CPP" && test -d "$CPP"; then
756  CPP=
757fi
758if test -z "$CPP"; then
759if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
760  echo $ac_n "(cached) $ac_c" 1>&6
761else
762    # This must be in double quotes, not single quotes, because CPP may get
763  # substituted into the Makefile and "${CC-cc}" will confuse make.
764  CPP="${CC-cc} -E"
765  # On the NeXT, cc -E runs the code through the compiler's parser,
766  # not just through cpp.
767  cat > conftest.$ac_ext <<EOF
768#line 769 "configure"
769#include "confdefs.h"
770#include <assert.h>
771Syntax Error
772EOF
773eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
774ac_err=`grep -v '^ *+' conftest.out`
775if test -z "$ac_err"; then
776  :
777else
778  echo "$ac_err" >&5
779  rm -rf conftest*
780  CPP="${CC-cc} -E -traditional-cpp"
781  cat > conftest.$ac_ext <<EOF
782#line 783 "configure"
783#include "confdefs.h"
784#include <assert.h>
785Syntax Error
786EOF
787eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
788ac_err=`grep -v '^ *+' conftest.out`
789if test -z "$ac_err"; then
790  :
791else
792  echo "$ac_err" >&5
793  rm -rf conftest*
794  CPP=/lib/cpp
795fi
796rm -f conftest*
797fi
798rm -f conftest*
799  ac_cv_prog_CPP="$CPP"
800fi
801fi
802CPP="$ac_cv_prog_CPP"
803echo "$ac_t""$CPP" 1>&6
804
805# If we cannot run a trivial program, we must be cross compiling.
806echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
807if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
808  echo $ac_n "(cached) $ac_c" 1>&6
809else
810  if test "$cross_compiling" = yes; then
811  ac_cv_c_cross=yes
812else
813cat > conftest.$ac_ext <<EOF
814#line 815 "configure"
815#include "confdefs.h"
816main(){return(0);}
817EOF
818eval $ac_link
819if test -s conftest && (./conftest; exit) 2>/dev/null; then
820  ac_cv_c_cross=no
821else
822  ac_cv_c_cross=yes
823fi
824fi
825rm -fr conftest*
826fi
827cross_compiling=$ac_cv_c_cross
828echo "$ac_t""$ac_cv_c_cross" 1>&6
829
830echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
831if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
832  echo $ac_n "(cached) $ac_c" 1>&6
833else
834  cat > conftest.$ac_ext <<EOF
835#line 836 "configure"
836#include "confdefs.h"
837#include <stdlib.h>
838#include <stdarg.h>
839#include <string.h>
840#include <float.h>
841EOF
842eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
843ac_err=`grep -v '^ *+' conftest.out`
844if test -z "$ac_err"; then
845  rm -rf conftest*
846  ac_cv_header_stdc=yes
847else
848  echo "$ac_err" >&5
849  rm -rf conftest*
850  ac_cv_header_stdc=no
851fi
852rm -f conftest*
853
854if test $ac_cv_header_stdc = yes; then
855  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
856cat > conftest.$ac_ext <<EOF
857#line 858 "configure"
858#include "confdefs.h"
859#include <string.h>
860EOF
861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
862  egrep "memchr" >/dev/null 2>&1; then
863  :
864else
865  rm -rf conftest*
866  ac_cv_header_stdc=no
867fi
868rm -f conftest*
869
870fi
871
872if test $ac_cv_header_stdc = yes; then
873  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
874cat > conftest.$ac_ext <<EOF
875#line 876 "configure"
876#include "confdefs.h"
877#include <stdlib.h>
878EOF
879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
880  egrep "free" >/dev/null 2>&1; then
881  :
882else
883  rm -rf conftest*
884  ac_cv_header_stdc=no
885fi
886rm -f conftest*
887
888fi
889
890if test $ac_cv_header_stdc = yes; then
891  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
892if test "$cross_compiling" = yes; then
893  ac_cv_header_stdc=no
894else
895cat > conftest.$ac_ext <<EOF
896#line 897 "configure"
897#include "confdefs.h"
898#include <ctype.h>
899#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
900#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
901#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
902int main () { int i; for (i = 0; i < 256; i++)
903if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
904exit (0); }
905
906EOF
907eval $ac_link
908if test -s conftest && (./conftest; exit) 2>/dev/null; then
909  :
910else
911  ac_cv_header_stdc=no
912fi
913fi
914rm -fr conftest*
915fi
916fi
917echo "$ac_t""$ac_cv_header_stdc" 1>&6
918if test $ac_cv_header_stdc = yes; then
919  cat >> confdefs.h <<\EOF
920#define STDC_HEADERS 1
921EOF
922
923fi
924
925for ac_hdr in limits.h sys/time.h unistd.h pwd.h
926do
927ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
928echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
929if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
930  echo $ac_n "(cached) $ac_c" 1>&6
931else
932  cat > conftest.$ac_ext <<EOF
933#line 934 "configure"
934#include "confdefs.h"
935#include <$ac_hdr>
936EOF
937eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
938ac_err=`grep -v '^ *+' conftest.out`
939if test -z "$ac_err"; then
940  rm -rf conftest*
941  eval "ac_cv_header_$ac_safe=yes"
942else
943  echo "$ac_err" >&5
944  rm -rf conftest*
945  eval "ac_cv_header_$ac_safe=no"
946fi
947rm -f conftest*
948fi
949if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
950  echo "$ac_t""yes" 1>&6
951    ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
952  cat >> confdefs.h <<EOF
953#define $ac_tr_hdr 1
954EOF
955
956else
957  echo "$ac_t""no" 1>&6
958fi
959done
960
961
962
963echo $ac_n "checking for working const""... $ac_c" 1>&6
964if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
965  echo $ac_n "(cached) $ac_c" 1>&6
966else
967  cat > conftest.$ac_ext <<EOF
968#line 969 "configure"
969#include "confdefs.h"
970
971int main() { return 0; }
972int t() {
973
974/* Ultrix mips cc rejects this.  */
975typedef int charset[2]; const charset x;
976/* SunOS 4.1.1 cc rejects this.  */
977char const *const *ccp;
978char **p;
979/* NEC SVR4.0.2 mips cc rejects this.  */
980struct point {int x, y;};
981static struct point const zero;
982/* AIX XL C 1.02.0.0 rejects this.
983   It does not let you subtract one const X* pointer from another in an arm
984   of an if-expression whose if-part is not a constant expression */
985const char *g = "string";
986ccp = &g + (g ? g-g : 0);
987/* HPUX 7.0 cc rejects these. */
988++ccp;
989p = (char**) ccp;
990ccp = (char const *const *) p;
991{ /* SCO 3.2v4 cc rejects this.  */
992  char *t;
993  char const *s = 0 ? (char *) 0 : (char const *) 0;
994
995  *t++ = 0;
996}
997{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
998  int x[] = {25, 17};
999  const int *foo = &x[0];
1000  ++foo;
1001}
1002{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1003  typedef const int *iptr;
1004  iptr p = 0;
1005  ++p;
1006}
1007{ /* AIX XL C 1.02.0.0 rejects this saying
1008     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1009  struct s { int j; const int *ap[3]; };
1010  struct s *b; b->j = 5;
1011}
1012{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1013  const int foo = 10;
1014}
1015
1016; return 0; }
1017EOF
1018if eval $ac_compile; then
1019  rm -rf conftest*
1020  ac_cv_c_const=yes
1021else
1022  rm -rf conftest*
1023  ac_cv_c_const=no
1024fi
1025rm -f conftest*
1026
1027fi
1028echo "$ac_t""$ac_cv_c_const" 1>&6
1029if test $ac_cv_c_const = no; then
1030  cat >> confdefs.h <<\EOF
1031#define const
1032EOF
1033
1034fi
1035
1036echo $ac_n "checking for size_t""... $ac_c" 1>&6
1037if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1038  echo $ac_n "(cached) $ac_c" 1>&6
1039else
1040  cat > conftest.$ac_ext <<EOF
1041#line 1042 "configure"
1042#include "confdefs.h"
1043#include <sys/types.h>
1044#if STDC_HEADERS
1045#include <stdlib.h>
1046#endif
1047EOF
1048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1049  egrep "size_t" >/dev/null 2>&1; then
1050  rm -rf conftest*
1051  ac_cv_type_size_t=yes
1052else
1053  rm -rf conftest*
1054  ac_cv_type_size_t=no
1055fi
1056rm -f conftest*
1057
1058fi
1059echo "$ac_t""$ac_cv_type_size_t" 1>&6
1060if test $ac_cv_type_size_t = no; then
1061  cat >> confdefs.h <<\EOF
1062#define size_t unsigned
1063EOF
1064
1065fi
1066
1067echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1068if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1069  echo $ac_n "(cached) $ac_c" 1>&6
1070else
1071  cat > conftest.$ac_ext <<EOF
1072#line 1073 "configure"
1073#include "confdefs.h"
1074#include <sys/types.h>
1075#include <sys/time.h>
1076#include <time.h>
1077int main() { return 0; }
1078int t() {
1079struct tm *tp;
1080; return 0; }
1081EOF
1082if eval $ac_compile; then
1083  rm -rf conftest*
1084  ac_cv_header_time=yes
1085else
1086  rm -rf conftest*
1087  ac_cv_header_time=no
1088fi
1089rm -f conftest*
1090
1091fi
1092echo "$ac_t""$ac_cv_header_time" 1>&6
1093if test $ac_cv_header_time = yes; then
1094  cat >> confdefs.h <<\EOF
1095#define TIME_WITH_SYS_TIME 1
1096EOF
1097
1098fi
1099
1100echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1101if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1102  echo $ac_n "(cached) $ac_c" 1>&6
1103else
1104  cat > conftest.$ac_ext <<EOF
1105#line 1106 "configure"
1106#include "confdefs.h"
1107#include <sys/types.h>
1108#include <time.h>
1109int main() { return 0; }
1110int t() {
1111struct tm *tp; tp->tm_sec;
1112; return 0; }
1113EOF
1114if eval $ac_compile; then
1115  rm -rf conftest*
1116  ac_cv_struct_tm=time.h
1117else
1118  rm -rf conftest*
1119  ac_cv_struct_tm=sys/time.h
1120fi
1121rm -f conftest*
1122
1123fi
1124echo "$ac_t""$ac_cv_struct_tm" 1>&6
1125if test $ac_cv_struct_tm = sys/time.h; then
1126  cat >> confdefs.h <<\EOF
1127#define TM_IN_SYS_TIME 1
1128EOF
1129
1130fi
1131
1132echo $ac_n "checking for ulong""... $ac_c" 1>&6
1133if eval "test \"`echo '$''{'ac_cv_type_ulong'+set}'`\" = set"; then
1134  echo $ac_n "(cached) $ac_c" 1>&6
1135else
1136  cat > conftest.$ac_ext <<EOF
1137#line 1138 "configure"
1138#include "confdefs.h"
1139#include <sys/types.h>
1140#if STDC_HEADERS
1141#include <stdlib.h>
1142#endif
1143EOF
1144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1145  egrep "ulong" >/dev/null 2>&1; then
1146  rm -rf conftest*
1147  ac_cv_type_ulong=yes
1148else
1149  rm -rf conftest*
1150  ac_cv_type_ulong=no
1151fi
1152rm -f conftest*
1153
1154fi
1155echo "$ac_t""$ac_cv_type_ulong" 1>&6
1156if test $ac_cv_type_ulong = no; then
1157  cat >> confdefs.h <<\EOF
1158#define ulong unsigned long
1159EOF
1160
1161fi
1162
1163
1164
1165# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1166# for constant arguments.  Useless!
1167echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1168if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1169  echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171  cat > conftest.$ac_ext <<EOF
1172#line 1173 "configure"
1173#include "confdefs.h"
1174#include <alloca.h>
1175int main() { return 0; }
1176int t() {
1177char *p = alloca(2 * sizeof(int));
1178; return 0; }
1179EOF
1180if eval $ac_link; then
1181  rm -rf conftest*
1182  ac_cv_header_alloca_h=yes
1183else
1184  rm -rf conftest*
1185  ac_cv_header_alloca_h=no
1186fi
1187rm -f conftest*
1188
1189fi
1190echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1191if test $ac_cv_header_alloca_h = yes; then
1192  cat >> confdefs.h <<\EOF
1193#define HAVE_ALLOCA_H 1
1194EOF
1195
1196fi
1197
1198echo $ac_n "checking for alloca""... $ac_c" 1>&6
1199if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1200  echo $ac_n "(cached) $ac_c" 1>&6
1201else
1202  cat > conftest.$ac_ext <<EOF
1203#line 1204 "configure"
1204#include "confdefs.h"
1205
1206#ifdef __GNUC__
1207# define alloca __builtin_alloca
1208#else
1209# if HAVE_ALLOCA_H
1210#  include <alloca.h>
1211# else
1212#  ifdef _AIX
1213 #pragma alloca
1214#  else
1215#   ifndef alloca /* predefined by HP cc +Olibcalls */
1216char *alloca ();
1217#   endif
1218#  endif
1219# endif
1220#endif
1221
1222int main() { return 0; }
1223int t() {
1224char *p = (char *) alloca(1);
1225; return 0; }
1226EOF
1227if eval $ac_link; then
1228  rm -rf conftest*
1229  ac_cv_func_alloca=yes
1230else
1231  rm -rf conftest*
1232  ac_cv_func_alloca=no
1233fi
1234rm -f conftest*
1235
1236fi
1237echo "$ac_t""$ac_cv_func_alloca" 1>&6
1238if test $ac_cv_func_alloca = yes; then
1239  cat >> confdefs.h <<\EOF
1240#define HAVE_ALLOCA 1
1241EOF
1242
1243fi
1244
1245if test $ac_cv_func_alloca = no; then
1246  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1247  # that cause trouble.  Some versions do not even contain alloca or
1248  # contain a buggy version.  If you still want to use their alloca,
1249  # use ar to extract alloca.o from them instead of compiling alloca.c.
1250  ALLOCA=alloca.o
1251  cat >> confdefs.h <<\EOF
1252#define C_ALLOCA 1
1253EOF
1254
1255
1256echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1257if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1258  echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260  cat > conftest.$ac_ext <<EOF
1261#line 1262 "configure"
1262#include "confdefs.h"
1263#if defined(CRAY) && ! defined(CRAY2)
1264webecray
1265#else
1266wenotbecray
1267#endif
1268
1269EOF
1270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1271  egrep "webecray" >/dev/null 2>&1; then
1272  rm -rf conftest*
1273  ac_cv_os_cray=yes
1274else
1275  rm -rf conftest*
1276  ac_cv_os_cray=no
1277fi
1278rm -f conftest*
1279
1280fi
1281echo "$ac_t""$ac_cv_os_cray" 1>&6
1282if test $ac_cv_os_cray = yes; then
1283for ac_func in _getb67 GETB67 getb67; do
1284  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1285if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1286  echo $ac_n "(cached) $ac_c" 1>&6
1287else
1288  cat > conftest.$ac_ext <<EOF
1289#line 1290 "configure"
1290#include "confdefs.h"
1291/* System header to define __stub macros and hopefully few prototypes,
1292    which can conflict with char $ac_func(); below.  */
1293#include <assert.h>
1294/* Override any gcc2 internal prototype to avoid an error.  */
1295char $ac_func(); 
1296
1297int main() { return 0; }
1298int t() {
1299
1300/* The GNU C library defines this for functions which it implements
1301    to always fail with ENOSYS.  Some functions are actually named
1302    something starting with __ and the normal name is an alias.  */
1303#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1304choke me
1305#else
1306$ac_func();
1307#endif
1308
1309; return 0; }
1310EOF
1311if eval $ac_link; then
1312  rm -rf conftest*
1313  eval "ac_cv_func_$ac_func=yes"
1314else
1315  rm -rf conftest*
1316  eval "ac_cv_func_$ac_func=no"
1317fi
1318rm -f conftest*
1319
1320fi
1321if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1322  echo "$ac_t""yes" 1>&6
1323  cat >> confdefs.h <<EOF
1324#define CRAY_STACKSEG_END $ac_func
1325EOF
1326
1327  break
1328else
1329  echo "$ac_t""no" 1>&6
1330fi
1331
1332done
1333fi
1334
1335echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1336if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1337  echo $ac_n "(cached) $ac_c" 1>&6
1338else
1339  if test "$cross_compiling" = yes; then
1340  ac_cv_c_stack_direction=0
1341else
1342cat > conftest.$ac_ext <<EOF
1343#line 1344 "configure"
1344#include "confdefs.h"
1345find_stack_direction ()
1346{
1347  static char *addr = 0;
1348  auto char dummy;
1349  if (addr == 0)
1350    {
1351      addr = &dummy;
1352      return find_stack_direction ();
1353    }
1354  else
1355    return (&dummy > addr) ? 1 : -1;
1356}
1357main ()
1358{
1359  exit (find_stack_direction() < 0);
1360}
1361EOF
1362eval $ac_link
1363if test -s conftest && (./conftest; exit) 2>/dev/null; then
1364  ac_cv_c_stack_direction=1
1365else
1366  ac_cv_c_stack_direction=-1
1367fi
1368fi
1369rm -fr conftest*
1370fi
1371echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1372cat >> confdefs.h <<EOF
1373#define STACK_DIRECTION $ac_cv_c_stack_direction
1374EOF
1375
1376fi
1377
1378echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1379if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1380  echo $ac_n "(cached) $ac_c" 1>&6
1381else
1382  cat > conftest.$ac_ext <<EOF
1383#line 1384 "configure"
1384#include "confdefs.h"
1385#include <sys/types.h>
1386#include <signal.h>
1387#ifdef signal
1388#undef signal
1389#endif
1390#ifdef __cplusplus
1391extern "C"
1392#endif
1393void (*signal ()) ();
1394int main() { return 0; }
1395int t() {
1396int i;
1397; return 0; }
1398EOF
1399if eval $ac_compile; then
1400  rm -rf conftest*
1401  ac_cv_type_signal=void
1402else
1403  rm -rf conftest*
1404  ac_cv_type_signal=int
1405fi
1406rm -f conftest*
1407
1408fi
1409echo "$ac_t""$ac_cv_type_signal" 1>&6
1410cat >> confdefs.h <<EOF
1411#define RETSIGTYPE $ac_cv_type_signal
1412EOF
1413
1414
1415echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1416if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1417  echo $ac_n "(cached) $ac_c" 1>&6
1418else
1419  cat > conftest.$ac_ext <<EOF
1420#line 1421 "configure"
1421#include "confdefs.h"
1422/* System header to define __stub macros and hopefully few prototypes,
1423    which can conflict with char vprintf(); below.  */
1424#include <assert.h>
1425/* Override any gcc2 internal prototype to avoid an error.  */
1426char vprintf(); 
1427
1428int main() { return 0; }
1429int t() {
1430
1431/* The GNU C library defines this for functions which it implements
1432    to always fail with ENOSYS.  Some functions are actually named
1433    something starting with __ and the normal name is an alias.  */
1434#if defined (__stub_vprintf) || defined (__stub___vprintf)
1435choke me
1436#else
1437vprintf();
1438#endif
1439
1440; return 0; }
1441EOF
1442if eval $ac_link; then
1443  rm -rf conftest*
1444  eval "ac_cv_func_vprintf=yes"
1445else
1446  rm -rf conftest*
1447  eval "ac_cv_func_vprintf=no"
1448fi
1449rm -f conftest*
1450
1451fi
1452if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1453  echo "$ac_t""yes" 1>&6
1454  cat >> confdefs.h <<\EOF
1455#define HAVE_VPRINTF 1
1456EOF
1457
1458else
1459  echo "$ac_t""no" 1>&6
1460fi
1461
1462if test "$ac_cv_func_vprintf" != yes; then
1463echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1464if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1465  echo $ac_n "(cached) $ac_c" 1>&6
1466else
1467  cat > conftest.$ac_ext <<EOF
1468#line 1469 "configure"
1469#include "confdefs.h"
1470/* System header to define __stub macros and hopefully few prototypes,
1471    which can conflict with char _doprnt(); below.  */
1472#include <assert.h>
1473/* Override any gcc2 internal prototype to avoid an error.  */
1474char _doprnt(); 
1475
1476int main() { return 0; }
1477int t() {
1478
1479/* The GNU C library defines this for functions which it implements
1480    to always fail with ENOSYS.  Some functions are actually named
1481    something starting with __ and the normal name is an alias.  */
1482#if defined (__stub__doprnt) || defined (__stub____doprnt)
1483choke me
1484#else
1485_doprnt();
1486#endif
1487
1488; return 0; }
1489EOF
1490if eval $ac_link; then
1491  rm -rf conftest*
1492  eval "ac_cv_func__doprnt=yes"
1493else
1494  rm -rf conftest*
1495  eval "ac_cv_func__doprnt=no"
1496fi
1497rm -f conftest*
1498
1499fi
1500if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1501  echo "$ac_t""yes" 1>&6
1502  cat >> confdefs.h <<\EOF
1503#define HAVE_DOPRNT 1
1504EOF
1505
1506else
1507  echo "$ac_t""no" 1>&6
1508fi
1509
1510fi
1511
1512for ac_func in gettimeofday mktime strftime
1513do
1514echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1515if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1516  echo $ac_n "(cached) $ac_c" 1>&6
1517else
1518  cat > conftest.$ac_ext <<EOF
1519#line 1520 "configure"
1520#include "confdefs.h"
1521/* System header to define __stub macros and hopefully few prototypes,
1522    which can conflict with char $ac_func(); below.  */
1523#include <assert.h>
1524/* Override any gcc2 internal prototype to avoid an error.  */
1525char $ac_func(); 
1526
1527int main() { return 0; }
1528int t() {
1529
1530/* The GNU C library defines this for functions which it implements
1531    to always fail with ENOSYS.  Some functions are actually named
1532    something starting with __ and the normal name is an alias.  */
1533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1534choke me
1535#else
1536$ac_func();
1537#endif
1538
1539; return 0; }
1540EOF
1541if eval $ac_link; then
1542  rm -rf conftest*
1543  eval "ac_cv_func_$ac_func=yes"
1544else
1545  rm -rf conftest*
1546  eval "ac_cv_func_$ac_func=no"
1547fi
1548rm -f conftest*
1549
1550fi
1551if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1552  echo "$ac_t""yes" 1>&6
1553    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1554  cat >> confdefs.h <<EOF
1555#define $ac_tr_func 1
1556EOF
1557
1558else
1559  echo "$ac_t""no" 1>&6
1560fi
1561done
1562
1563for ac_func in strdup strstr strtol strtoul atol strsep strcasecmp memmove
1564do
1565echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1566if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1567  echo $ac_n "(cached) $ac_c" 1>&6
1568else
1569  cat > conftest.$ac_ext <<EOF
1570#line 1571 "configure"
1571#include "confdefs.h"
1572/* System header to define __stub macros and hopefully few prototypes,
1573    which can conflict with char $ac_func(); below.  */
1574#include <assert.h>
1575/* Override any gcc2 internal prototype to avoid an error.  */
1576char $ac_func(); 
1577
1578int main() { return 0; }
1579int t() {
1580
1581/* The GNU C library defines this for functions which it implements
1582    to always fail with ENOSYS.  Some functions are actually named
1583    something starting with __ and the normal name is an alias.  */
1584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1585choke me
1586#else
1587$ac_func();
1588#endif
1589
1590; return 0; }
1591EOF
1592if eval $ac_link; then
1593  rm -rf conftest*
1594  eval "ac_cv_func_$ac_func=yes"
1595else
1596  rm -rf conftest*
1597  eval "ac_cv_func_$ac_func=no"
1598fi
1599rm -f conftest*
1600
1601fi
1602if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1603  echo "$ac_t""yes" 1>&6
1604    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1605  cat >> confdefs.h <<EOF
1606#define $ac_tr_func 1
1607EOF
1608
1609else
1610  echo "$ac_t""no" 1>&6
1611fi
1612done
1613
1614for ac_func in gethostname getdomainname select socket strerror getdtablesize
1615do
1616echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1617if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1618  echo $ac_n "(cached) $ac_c" 1>&6
1619else
1620  cat > conftest.$ac_ext <<EOF
1621#line 1622 "configure"
1622#include "confdefs.h"
1623/* System header to define __stub macros and hopefully few prototypes,
1624    which can conflict with char $ac_func(); below.  */
1625#include <assert.h>
1626/* Override any gcc2 internal prototype to avoid an error.  */
1627char $ac_func(); 
1628
1629int main() { return 0; }
1630int t() {
1631
1632/* The GNU C library defines this for functions which it implements
1633    to always fail with ENOSYS.  Some functions are actually named
1634    something starting with __ and the normal name is an alias.  */
1635#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1636choke me
1637#else
1638$ac_func();
1639#endif
1640
1641; return 0; }
1642EOF
1643if eval $ac_link; then
1644  rm -rf conftest*
1645  eval "ac_cv_func_$ac_func=yes"
1646else
1647  rm -rf conftest*
1648  eval "ac_cv_func_$ac_func=no"
1649fi
1650rm -f conftest*
1651
1652fi
1653if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1654  echo "$ac_t""yes" 1>&6
1655    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1656  cat >> confdefs.h <<EOF
1657#define $ac_tr_func 1
1658EOF
1659
1660else
1661  echo "$ac_t""no" 1>&6
1662fi
1663done
1664
1665for ac_func in yp_get_default_domain yp_master inet_ntoa
1666do
1667echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1668if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1669  echo $ac_n "(cached) $ac_c" 1>&6
1670else
1671  cat > conftest.$ac_ext <<EOF
1672#line 1673 "configure"
1673#include "confdefs.h"
1674/* System header to define __stub macros and hopefully few prototypes,
1675    which can conflict with char $ac_func(); below.  */
1676#include <assert.h>
1677/* Override any gcc2 internal prototype to avoid an error.  */
1678char $ac_func(); 
1679
1680int main() { return 0; }
1681int t() {
1682
1683/* The GNU C library defines this for functions which it implements
1684    to always fail with ENOSYS.  Some functions are actually named
1685    something starting with __ and the normal name is an alias.  */
1686#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1687choke me
1688#else
1689$ac_func();
1690#endif
1691
1692; return 0; }
1693EOF
1694if eval $ac_link; then
1695  rm -rf conftest*
1696  eval "ac_cv_func_$ac_func=yes"
1697else
1698  rm -rf conftest*
1699  eval "ac_cv_func_$ac_func=no"
1700fi
1701rm -f conftest*
1702
1703fi
1704if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1705  echo "$ac_t""yes" 1>&6
1706    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1707  cat >> confdefs.h <<EOF
1708#define $ac_tr_func 1
1709EOF
1710
1711else
1712  echo "$ac_t""no" 1>&6
1713fi
1714done
1715
1716for ac_func in re_comp regcomp _crypt
1717do
1718echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1719if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1720  echo $ac_n "(cached) $ac_c" 1>&6
1721else
1722  cat > conftest.$ac_ext <<EOF
1723#line 1724 "configure"
1724#include "confdefs.h"
1725/* System header to define __stub macros and hopefully few prototypes,
1726    which can conflict with char $ac_func(); below.  */
1727#include <assert.h>
1728/* Override any gcc2 internal prototype to avoid an error.  */
1729char $ac_func(); 
1730
1731int main() { return 0; }
1732int t() {
1733
1734/* The GNU C library defines this for functions which it implements
1735    to always fail with ENOSYS.  Some functions are actually named
1736    something starting with __ and the normal name is an alias.  */
1737#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1738choke me
1739#else
1740$ac_func();
1741#endif
1742
1743; return 0; }
1744EOF
1745if eval $ac_link; then
1746  rm -rf conftest*
1747  eval "ac_cv_func_$ac_func=yes"
1748else
1749  rm -rf conftest*
1750  eval "ac_cv_func_$ac_func=no"
1751fi
1752rm -f conftest*
1753
1754fi
1755if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1756  echo "$ac_t""yes" 1>&6
1757    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1758  cat >> confdefs.h <<EOF
1759#define $ac_tr_func 1
1760EOF
1761
1762else
1763  echo "$ac_t""no" 1>&6
1764fi
1765done
1766
1767
1768
1769echo $ac_n "checking for %n in scanf""... $ac_c" 1>&6
1770if test "$cross_compiling" = yes; then
1771  :
1772else
1773cat > conftest.$ac_ext <<EOF
1774#line 1775 "configure"
1775#include "confdefs.h"
1776
1777#include <stdio.h>
1778main()
1779{
1780  int a, b, i = 0;
1781  char buf[] = "1 2";
1782
1783  sscanf(buf, "%d %d %n", &a, &b, &i);
1784  exit (i-strlen(buf));
1785}
1786
1787EOF
1788eval $ac_link
1789if test -s conftest && (./conftest; exit) 2>/dev/null; then
1790  cat >> confdefs.h <<\EOF
1791#define HAVE_N_IN_SCANF 1
1792EOF
1793 echo "$ac_t""yes" 1>&6
1794else
1795  echo "$ac_t""no" 1>&6
1796fi
1797fi
1798rm -fr conftest*
1799
1800
1801
1802echo $ac_n "checking for non-blocking""... $ac_c" 1>&6
1803
1804precode='#include <sys/types.h>
1805#include <sys/socket.h>
1806#include <fcntl.h>
1807#include <sys/ioctl.h>
1808#include <sys/file.h>
1809#include <signal.h>
1810
1811alarmed()
1812{
1813        exit(1);
1814}
1815
1816main()
1817{
1818        char b[12], x[32];
1819        int f, l = sizeof(x);
1820        f = socket(AF_INET, SOCK_DGRAM, 0);
1821        if (f >= 0 && !(fcntl(f, F_SETFL,'
1822postcode='))) {
1823                signal(SIGALRM, alarmed);
1824                alarm(3);
1825                recvfrom(f, b, 12, 0, (struct sockaddr *)x, &l);
1826                alarm(0);
1827                exit(0);
1828        }
1829        exit(1);
1830}'
1831
1832
1833code="$precode O_NONBLOCK $postcode"
1834
1835if test "$cross_compiling" = yes; then
1836  :
1837else
1838cat > conftest.$ac_ext <<EOF
1839#line 1840 "configure"
1840#include "confdefs.h"
1841$code
1842EOF
1843eval $ac_link
1844if test -s conftest && (./conftest; exit) 2>/dev/null; then
1845  cat >> confdefs.h <<\EOF
1846#define NBLOCK_POSIX 1
1847EOF
1848
1849  echo "$ac_t""posix" 1>&6
1850else
1851  code="$precode O_NDELAY $postcode"
1852  if test "$cross_compiling" = yes; then
1853  :
1854else
1855cat > conftest.$ac_ext <<EOF
1856#line 1857 "configure"
1857#include "confdefs.h"
1858$code
1859EOF
1860eval $ac_link
1861if test -s conftest && (./conftest; exit) 2>/dev/null; then
1862  cat >> confdefs.h <<\EOF
1863#define NBLOCK_BSD 1
1864EOF
1865
1866    echo "$ac_t""bsd" 1>&6
1867else
1868  code="$precode FIONBIO $postcode"
1869    if test "$cross_compiling" = yes; then
1870  :
1871else
1872cat > conftest.$ac_ext <<EOF
1873#line 1874 "configure"
1874#include "confdefs.h"
1875$code
1876EOF
1877eval $ac_link
1878if test -s conftest && (./conftest; exit) 2>/dev/null; then
1879  cat >> confdefs.h <<\EOF
1880#define NBLOCK_SYSV 1
1881EOF
1882
1883      echo "$ac_t""system v" 1>&6
1884else
1885  echo "configure: warning: i can't find a working non blocking system" 1>&2
1886fi
1887fi
1888rm -fr conftest*
1889fi
1890fi
1891rm -fr conftest*
1892fi
1893fi
1894rm -fr conftest*
1895
1896
1897
1898echo $ac_n "checking for sys_errlist declaration""... $ac_c" 1>&6
1899if test "$cross_compiling" = yes; then
1900  :
1901else
1902cat > conftest.$ac_ext <<EOF
1903#line 1904 "configure"
1904#include "confdefs.h"
1905
1906#include <sys/types.h>
1907#include <stdio.h>
1908#include <errno.h>
1909main()
1910{
1911  char *s = sys_errlist[0];
1912  exit(0);
1913}
1914
1915EOF
1916eval $ac_link
1917if test -s conftest && (./conftest; exit) 2>/dev/null; then
1918  cat >> confdefs.h <<\EOF
1919#define SYS_ERRLIST_DECLARED 1
1920EOF
1921 echo "$ac_t""yes" 1>&6
1922else
1923  echo "$ac_t""no" 1>&6
1924fi
1925fi
1926rm -fr conftest*
1927
1928trap '' 1 2 15
1929cat > confcache <<\EOF
1930# This file is a shell script that caches the results of configure
1931# tests run on this system so they can be shared between configure
1932# scripts and configure runs.  It is not useful on other systems.
1933# If it contains results you don't want to keep, you may remove or edit it.
1934#
1935# By default, configure uses ./config.cache as the cache file,
1936# creating it if it does not exist already.  You can give configure
1937# the --cache-file=FILE option to use a different cache file; that is
1938# what configure does when it calls configure scripts in
1939# subdirectories, so they share the cache.
1940# Giving --cache-file=/dev/null disables caching, for debugging configure.
1941# config.status only pays attention to the cache file if you give it the
1942# --recheck option to rerun configure.
1943#
1944EOF
1945# Ultrix sh set writes to stderr and can't be redirected directly,
1946# and sets the high bit in the cache file unless we assign to the vars.
1947(set) 2>&1 |
1948  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1949  >> confcache
1950if cmp -s $cache_file confcache; then
1951  :
1952else
1953  if test -w $cache_file; then
1954    echo "updating cache $cache_file"
1955    cat confcache > $cache_file
1956  else
1957    echo "not updating unwritable cache $cache_file"
1958  fi
1959fi
1960rm -f confcache
1961
1962trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1963
1964test "x$prefix" = xNONE && prefix=$ac_default_prefix
1965# Let make expand exec_prefix.
1966test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1967
1968# Any assignment to VPATH causes Sun make to only execute
1969# the first set of double-colon rules, so remove it if not needed.
1970# If there is a colon in the path, we need to keep it.
1971if test "x$srcdir" = x.; then
1972  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
1973fi
1974
1975trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1976
1977DEFS=-DHAVE_CONFIG_H
1978
1979# Without the "./", some shells look in PATH for config.status.
1980: ${CONFIG_STATUS=./config.status}
1981
1982echo creating $CONFIG_STATUS
1983rm -f $CONFIG_STATUS
1984cat > $CONFIG_STATUS <<EOF
1985#! /bin/sh
1986# Generated automatically by configure.
1987# Run this file to recreate the current configuration.
1988# This directory was configured as follows,
1989# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1990#
1991# $0 $ac_configure_args
1992#
1993# Compiler output produced by configure, useful for debugging
1994# configure, is in ./config.log if it exists.
1995
1996ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1997for ac_option
1998do
1999  case "\$ac_option" in
2000  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2001    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2002    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2003  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2004    echo "$CONFIG_STATUS generated by autoconf version 2.3"
2005    exit 0 ;;
2006  -help | --help | --hel | --he | --h)
2007    echo "\$ac_cs_usage"; exit 0 ;;
2008  *) echo "\$ac_cs_usage"; exit 1 ;;
2009  esac
2010done
2011
2012ac_given_srcdir=$srcdir
2013
2014trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2015
2016# Protect against being on the right side of a sed subst in config.status. 
2017sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
2018 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2019$ac_vpsub
2020$extrasub
2021s%@CFLAGS@%$CFLAGS%g
2022s%@CPPFLAGS@%$CPPFLAGS%g
2023s%@CXXFLAGS@%$CXXFLAGS%g
2024s%@DEFS@%$DEFS%g
2025s%@LDFLAGS@%$LDFLAGS%g
2026s%@LIBS@%$LIBS%g
2027s%@exec_prefix@%$exec_prefix%g
2028s%@prefix@%$prefix%g
2029s%@program_transform_name@%$program_transform_name%g
2030s%@CC@%$CC%g
2031s%@CPP@%$CPP%g
2032s%@ALLOCA@%$ALLOCA%g
2033
2034CEOF
2035EOF
2036cat >> $CONFIG_STATUS <<EOF
2037
2038CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2039EOF
2040cat >> $CONFIG_STATUS <<\EOF
2041for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2042  # Support "outfile[:infile]", defaulting infile="outfile.in".
2043  case "$ac_file" in
2044  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2045       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2046  *) ac_file_in="${ac_file}.in" ;;
2047  esac
2048
2049  # Adjust relative srcdir, etc. for subdirectories.
2050
2051  # Remove last slash and all that follows it.  Not all systems have dirname.
2052  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2053  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2054    # The file is in a subdirectory.
2055    test ! -d "$ac_dir" && mkdir "$ac_dir"
2056    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2057    # A "../" for each directory in $ac_dir_suffix.
2058    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2059  else
2060    ac_dir_suffix= ac_dots=
2061  fi
2062
2063  case "$ac_given_srcdir" in
2064  .)  srcdir=.
2065      if test -z "$ac_dots"; then top_srcdir=.
2066      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2067  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2068  *) # Relative path.
2069    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2070    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2071  esac
2072
2073  echo creating "$ac_file"
2074  rm -f "$ac_file"
2075  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2076  case "$ac_file" in
2077  *Makefile*) ac_comsub="1i\\
2078# $configure_input" ;;
2079  *) ac_comsub= ;;
2080  esac
2081  sed -e "$ac_comsub
2082s%@configure_input@%$configure_input%g
2083s%@srcdir@%$srcdir%g
2084s%@top_srcdir@%$top_srcdir%g
2085" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2086fi; done
2087rm -f conftest.subs
2088
2089# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2090# NAME is the cpp macro being defined and VALUE is the value it is being given.
2091#
2092# ac_d sets the value in "#define NAME VALUE" lines.
2093ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
2094ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
2095ac_dC='\3'
2096ac_dD='%g'
2097# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2098ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2099ac_uB='\([ 	]\)%\1#\2define\3'
2100ac_uC=' '
2101ac_uD='\4%g'
2102# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2103ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2104ac_eB='$%\1#\2define\3'
2105ac_eC=' '
2106ac_eD='%g'
2107
2108CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2109for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2110  # Support "outfile[:infile]", defaulting infile="outfile.in".
2111  case "$ac_file" in
2112  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2113       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2114  *) ac_file_in="${ac_file}.in" ;;
2115  esac
2116
2117  echo creating $ac_file
2118
2119  rm -f conftest.frag conftest.in conftest.out
2120  cp $ac_given_srcdir/$ac_file_in conftest.in
2121
2122EOF
2123
2124# Transform confdefs.h into a sed script conftest.vals that substitutes
2125# the proper values into config.h.in to produce config.h.  And first:
2126# Protect against being on the right side of a sed subst in config.status.
2127# Protect against being in an unquoted here document in config.status.
2128rm -f conftest.vals
2129cat > conftest.hdr <<\EOF
2130s/[\\&%]/\\&/g
2131s%[\\$`]%\\&%g
2132s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2133s%ac_d%ac_u%gp
2134s%ac_u%ac_e%gp
2135EOF
2136sed -n -f conftest.hdr confdefs.h > conftest.vals
2137rm -f conftest.hdr
2138
2139# This sed command replaces #undef with comments.  This is necessary, for
2140# example, in the case of _POSIX_SOURCE, which is predefined and required
2141# on some systems where configure will not decide to define it.
2142cat >> conftest.vals <<\EOF
2143s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2144EOF
2145
2146# Break up conftest.vals because some shells have a limit on
2147# the size of here documents, and old seds have small limits too.
2148# Maximum number of lines to put in a single here document.
2149ac_max_here_lines=12
2150
2151rm -f conftest.tail
2152while :
2153do
2154  ac_lines=`grep -c . conftest.vals`
2155  # grep -c gives empty output for an empty file on some AIX systems.
2156  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2157  # Write a limited-size here document to conftest.frag.
2158  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2159  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2160  echo 'CEOF
2161  sed -f conftest.frag conftest.in > conftest.out
2162  rm -f conftest.in
2163  mv conftest.out conftest.in
2164' >> $CONFIG_STATUS
2165  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2166  rm -f conftest.vals
2167  mv conftest.tail conftest.vals
2168done
2169rm -f conftest.vals
2170
2171cat >> $CONFIG_STATUS <<\EOF
2172  rm -f conftest.frag conftest.h
2173  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2174  cat conftest.in >> conftest.h
2175  rm -f conftest.in
2176  if cmp -s $ac_file conftest.h 2>/dev/null; then
2177    echo "$ac_file is unchanged"
2178    rm -f conftest.h
2179  else
2180    rm -f $ac_file
2181    mv conftest.h $ac_file
2182  fi
2183fi; done
2184
2185
2186
2187exit 0
2188EOF
2189chmod +x $CONFIG_STATUS
2190rm -fr confdefs* $ac_clean_files
2191test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2192
2193