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