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:
14ac_help="$ac_help
15  --with-x                use the X Window System"
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38
39# Initialize some other variables.
40subdirs=
41
42ac_prev=
43for ac_option
44do
45
46  # If the previous option needs an argument, assign it.
47  if test -n "$ac_prev"; then
48    eval "$ac_prev=\$ac_option"
49    ac_prev=
50    continue
51  fi
52
53  case "$ac_option" in
54  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
55  *) ac_optarg= ;;
56  esac
57
58  # Accept the important Cygnus configure options, so we can diagnose typos.
59
60  case "$ac_option" in
61
62  -build | --build | --buil | --bui | --bu | --b)
63    ac_prev=build ;;
64  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
65    build="$ac_optarg" ;;
66
67  -cache-file | --cache-file | --cache-fil | --cache-fi \
68  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
69    ac_prev=cache_file ;;
70  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
71  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
72    cache_file="$ac_optarg" ;;
73
74  -disable-* | --disable-*)
75    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
76    # Reject names that are not valid shell variable names.
77    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
78      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
79    fi
80    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
81    eval "enable_${ac_feature}=no" ;;
82
83  -enable-* | --enable-*)
84    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
85    # Reject names that are not valid shell variable names.
86    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
87      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
88    fi
89    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
90    case "$ac_option" in
91      *=*) ;;
92      *) ac_optarg=yes ;;
93    esac
94    eval "enable_${ac_feature}='$ac_optarg'" ;;
95
96  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
97  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
98  | --exec | --exe | --ex)
99    ac_prev=exec_prefix ;;
100  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
101  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
102  | --exec=* | --exe=* | --ex=*)
103    exec_prefix="$ac_optarg" ;;
104
105  -gas | --gas | --ga | --g)
106    # Obsolete; use --with-gas.
107    with_gas=yes ;;
108
109  -help | --help | --hel | --he)
110    # Omit some internal or obsolete options to make the list less imposing.
111    # This message is too long to be a string in the A/UX 3.1 sh.
112    cat << EOF
113Usage: configure [options] [host]
114Options: [defaults in brackets after descriptions]
115Configuration:
116  --cache-file=FILE       cache test results in FILE
117  --help                  print this message
118  --no-create             do not create output files
119  --quiet, --silent       do not print \`checking...' messages
120  --version               print the version of autoconf that created configure
121Directory and file names:
122  --prefix=PREFIX         install architecture-independent files in PREFIX
123                          [$ac_default_prefix]
124  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
125                          [same as prefix]
126  --srcdir=DIR            find the sources in DIR [configure dir or ..]
127  --program-prefix=PREFIX prepend PREFIX to installed program names
128  --program-suffix=SUFFIX append SUFFIX to installed program names
129  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
130Host type:
131  --build=BUILD           configure for building on BUILD [BUILD=HOST]
132  --host=HOST             configure for HOST [guessed]
133  --target=TARGET         configure for TARGET [TARGET=HOST]
134Features and packages:
135  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
136  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
137  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
138  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
139  --x-includes=DIR        X include files are in DIR
140  --x-libraries=DIR       X library files are in DIR
141--enable and --with options recognized:$ac_help
142EOF
143    exit 0 ;;
144
145  -host | --host | --hos | --ho)
146    ac_prev=host ;;
147  -host=* | --host=* | --hos=* | --ho=*)
148    host="$ac_optarg" ;;
149
150  -nfp | --nfp | --nf)
151    # Obsolete; use --without-fp.
152    with_fp=no ;;
153
154  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
155  | --no-cr | --no-c)
156    no_create=yes ;;
157
158  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
159  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
160    no_recursion=yes ;;
161
162  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
163    ac_prev=prefix ;;
164  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
165    prefix="$ac_optarg" ;;
166
167  -program-prefix | --program-prefix | --program-prefi | --program-pref \
168  | --program-pre | --program-pr | --program-p)
169    ac_prev=program_prefix ;;
170  -program-prefix=* | --program-prefix=* | --program-prefi=* \
171  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
172    program_prefix="$ac_optarg" ;;
173
174  -program-suffix | --program-suffix | --program-suffi | --program-suff \
175  | --program-suf | --program-su | --program-s)
176    ac_prev=program_suffix ;;
177  -program-suffix=* | --program-suffix=* | --program-suffi=* \
178  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
179    program_suffix="$ac_optarg" ;;
180
181  -program-transform-name | --program-transform-name \
182  | --program-transform-nam | --program-transform-na \
183  | --program-transform-n | --program-transform- \
184  | --program-transform | --program-transfor \
185  | --program-transfo | --program-transf \
186  | --program-trans | --program-tran \
187  | --progr-tra | --program-tr | --program-t)
188    ac_prev=program_transform_name ;;
189  -program-transform-name=* | --program-transform-name=* \
190  | --program-transform-nam=* | --program-transform-na=* \
191  | --program-transform-n=* | --program-transform-=* \
192  | --program-transform=* | --program-transfor=* \
193  | --program-transfo=* | --program-transf=* \
194  | --program-trans=* | --program-tran=* \
195  | --progr-tra=* | --program-tr=* | --program-t=*)
196    program_transform_name="$ac_optarg" ;;
197
198  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
199  | -silent | --silent | --silen | --sile | --sil)
200    silent=yes ;;
201
202  -site | --site | --sit)
203    ac_prev=site ;;
204  -site=* | --site=* | --sit=*)
205    site="$ac_optarg" ;;
206
207  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
208    ac_prev=srcdir ;;
209  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
210    srcdir="$ac_optarg" ;;
211
212  -target | --target | --targe | --targ | --tar | --ta | --t)
213    ac_prev=target ;;
214  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
215    target="$ac_optarg" ;;
216
217  -v | -verbose | --verbose | --verbos | --verbo | --verb)
218    verbose=yes ;;
219
220  -version | --version | --versio | --versi | --vers)
221    echo "configure generated by autoconf version 2.3"
222    exit 0 ;;
223
224  -with-* | --with-*)
225    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
226    # Reject names that are not valid shell variable names.
227    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
228      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
229    fi
230    ac_package=`echo $ac_package| sed 's/-/_/g'`
231    case "$ac_option" in
232      *=*) ;;
233      *) ac_optarg=yes ;;
234    esac
235    eval "with_${ac_package}='$ac_optarg'" ;;
236
237  -without-* | --without-*)
238    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
239    # Reject names that are not valid shell variable names.
240    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
241      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
242    fi
243    ac_package=`echo $ac_package| sed 's/-/_/g'`
244    eval "with_${ac_package}=no" ;;
245
246  --x)
247    # Obsolete; use --with-x.
248    with_x=yes ;;
249
250  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
251  | --x-incl | --x-inc | --x-in | --x-i)
252    ac_prev=x_includes ;;
253  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
254  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
255    x_includes="$ac_optarg" ;;
256
257  -x-libraries | --x-libraries | --x-librarie | --x-librari \
258  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
259    ac_prev=x_libraries ;;
260  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
261  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
262    x_libraries="$ac_optarg" ;;
263
264  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
265    ;;
266
267  *)
268    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
269      echo "configure: warning: $ac_option: invalid host type" 1>&2
270    fi
271    if test "x$nonopt" != xNONE; then
272      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
273    fi
274    nonopt="$ac_option"
275    ;;
276
277  esac
278done
279
280if test -n "$ac_prev"; then
281  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
282fi
283
284trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
285
286# File descriptor usage:
287# 0 standard input
288# 1 file creation
289# 2 errors and warnings
290# 3 some systems may open it to /dev/tty
291# 4 used on the Kubota Titan
292# 6 checking for... messages and results
293# 5 compiler messages saved in config.log
294if test "$silent" = yes; then
295  exec 6>/dev/null
296else
297  exec 6>&1
298fi
299exec 5>./config.log
300
301echo "\
302This file contains any messages produced by compilers while
303running configure, to aid debugging if configure makes a mistake.
304" 1>&5
305
306# Strip out --no-create and --no-recursion so they do not pile up.
307# Also quote any args containing shell metacharacters.
308ac_configure_args=
309for ac_arg
310do
311  case "$ac_arg" in
312  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
313  | --no-cr | --no-c) ;;
314  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
315  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
316  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
317  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
318  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
319  esac
320done
321
322# NLS nuisances.
323# Only set LANG and LC_ALL to C if already set.
324# These must not be set unconditionally because not all systems understand
325# e.g. LANG=C (notably SCO).
326if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
327if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
328
329# confdefs.h avoids OS command line length limits that DEFS can exceed.
330rm -rf conftest* confdefs.h
331# AIX cpp loses on an empty file, so make sure it contains at least a newline.
332echo > confdefs.h
333
334# A filename unique to this package, relative to the directory that
335# configure is in, which we can look for to find out if srcdir is correct.
336ac_unique_file=./infocom.c
337
338# Find the source files, if location was not specified.
339if test -z "$srcdir"; then
340  ac_srcdir_defaulted=yes
341  # Try the directory containing this script, then its parent.
342  ac_prog=$0
343  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
344  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
345  srcdir=$ac_confdir
346  if test ! -r $srcdir/$ac_unique_file; then
347    srcdir=..
348  fi
349else
350  ac_srcdir_defaulted=no
351fi
352if test ! -r $srcdir/$ac_unique_file; then
353  if test "$ac_srcdir_defaulted" = yes; then
354    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
355  else
356    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
357  fi
358fi
359srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
360
361# Prefer explicitly selected file to automatically selected ones.
362if test -z "$CONFIG_SITE"; then
363  if test "x$prefix" != xNONE; then
364    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
365  else
366    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
367  fi
368fi
369for ac_site_file in $CONFIG_SITE; do
370  if test -r "$ac_site_file"; then
371    echo "loading site script $ac_site_file"
372    . "$ac_site_file"
373  fi
374done
375
376if test -r "$cache_file"; then
377  echo "loading cache $cache_file"
378  . $cache_file
379else
380  echo "creating cache $cache_file"
381  > $cache_file
382fi
383
384ac_ext=c
385# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
386ac_cpp='$CPP $CPPFLAGS'
387ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
388ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
389
390if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
391  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
392  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
393    ac_n= ac_c='
394' ac_t='	'
395  else
396    ac_n=-n ac_c= ac_t=
397  fi
398else
399  ac_n= ac_c='\c' ac_t=
400fi
401
402
403echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
404if test -d /etc/conf/kconfig.d &&
405  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
406then
407  echo "$ac_t""yes" 1>&6
408  ISC=yes # If later tests want to check for ISC.
409  cat >> confdefs.h <<\EOF
410#define _POSIX_SOURCE 1
411EOF
412
413  if test "$GCC" = yes; then
414    CC="$CC -posix"
415  else
416    CC="$CC -Xp"
417  fi
418else
419  echo "$ac_t""no" 1>&6
420  ISC=
421fi
422
423# Extract the first word of "gcc", so it can be a program name with args.
424set dummy gcc; ac_word=$2
425echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
426if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
427  echo $ac_n "(cached) $ac_c" 1>&6
428else
429  if test -n "$CC"; then
430  ac_cv_prog_CC="$CC" # Let the user override the test.
431else
432  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
433  for ac_dir in $PATH; do
434    test -z "$ac_dir" && ac_dir=.
435    if test -f $ac_dir/$ac_word; then
436      ac_cv_prog_CC="gcc"
437      break
438    fi
439  done
440  IFS="$ac_save_ifs"
441  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
442fi
443fi
444CC="$ac_cv_prog_CC"
445if test -n "$CC"; then
446  echo "$ac_t""$CC" 1>&6
447else
448  echo "$ac_t""no" 1>&6
449fi
450
451
452echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
453if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
454  echo $ac_n "(cached) $ac_c" 1>&6
455else
456  cat > conftest.c <<EOF
457#ifdef __GNUC__
458  yes;
459#endif
460EOF
461if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
462  ac_cv_prog_gcc=yes
463else
464  ac_cv_prog_gcc=no
465fi
466fi
467echo "$ac_t""$ac_cv_prog_gcc" 1>&6
468if test $ac_cv_prog_gcc = yes; then
469  GCC=yes
470  if test "${CFLAGS+set}" != set; then
471    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
472if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
473  echo $ac_n "(cached) $ac_c" 1>&6
474else
475  echo 'void f(){}' > conftest.c
476if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
477  ac_cv_prog_gcc_g=yes
478else
479  ac_cv_prog_gcc_g=no
480fi
481rm -f conftest*
482
483fi
484    echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
485    if test $ac_cv_prog_gcc_g = yes; then
486      CFLAGS="-g -O"
487    else
488      CFLAGS="-O"
489    fi
490  fi
491else
492  GCC=
493  test "${CFLAGS+set}" = set || CFLAGS="-g"
494fi
495
496ac_aux_dir=
497for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
498  if test -f $ac_dir/install-sh; then
499    ac_aux_dir=$ac_dir
500    ac_install_sh="$ac_aux_dir/install-sh -c"
501    break
502  elif test -f $ac_dir/install.sh; then
503    ac_aux_dir=$ac_dir
504    ac_install_sh="$ac_aux_dir/install.sh -c"
505    break
506  fi
507done
508if test -z "$ac_aux_dir"; then
509  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
510fi
511ac_config_guess=$ac_aux_dir/config.guess
512ac_config_sub=$ac_aux_dir/config.sub
513ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
514
515# Find a good install program.  We prefer a C program (faster),
516# so one script is as good as another.  But avoid the broken or
517# incompatible versions:
518# SysV /etc/install, /usr/sbin/install
519# SunOS /usr/etc/install
520# IRIX /sbin/install
521# AIX /bin/install
522# AFS /usr/afsws/bin/install, which mishandles nonexistent args
523# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
524# ./install, which can be erroneously created by make from ./install.sh.
525echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
526if test -z "$INSTALL"; then
527if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
528  echo $ac_n "(cached) $ac_c" 1>&6
529else
530    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
531  for ac_dir in $PATH; do
532    # Account for people who put trailing slashes in PATH elements.
533    case "$ac_dir/" in
534    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
535    *)
536      # OSF1 and SCO ODT 3.0 have their own names for install.
537      for ac_prog in ginstall installbsd scoinst install; do
538        if test -f $ac_dir/$ac_prog; then
539	  if test $ac_prog = install &&
540            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
541	    # AIX install.  It has an incompatible calling convention.
542	    # OSF/1 installbsd also uses dspmsg, but is usable.
543	    :
544	  else
545	    ac_cv_path_install="$ac_dir/$ac_prog -c"
546	    break 2
547	  fi
548	fi
549      done
550      ;;
551    esac
552  done
553  IFS="$ac_save_ifs"
554  # As a last resort, use the slow shell script.
555  test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
556fi
557  INSTALL="$ac_cv_path_install"
558fi
559echo "$ac_t""$INSTALL" 1>&6
560
561# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
562# It thinks the first close brace ends the variable substitution.
563test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
564
565test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
566
567echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
568# On Suns, sometimes $CPP names a directory.
569if test -n "$CPP" && test -d "$CPP"; then
570  CPP=
571fi
572if test -z "$CPP"; then
573if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
574  echo $ac_n "(cached) $ac_c" 1>&6
575else
576    # This must be in double quotes, not single quotes, because CPP may get
577  # substituted into the Makefile and "${CC-cc}" will confuse make.
578  CPP="${CC-cc} -E"
579  # On the NeXT, cc -E runs the code through the compiler's parser,
580  # not just through cpp.
581  cat > conftest.$ac_ext <<EOF
582#line 583 "configure"
583#include "confdefs.h"
584#include <assert.h>
585Syntax Error
586EOF
587eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
588ac_err=`grep -v '^ *+' conftest.out`
589if test -z "$ac_err"; then
590  :
591else
592  echo "$ac_err" >&5
593  rm -rf conftest*
594  CPP="${CC-cc} -E -traditional-cpp"
595  cat > conftest.$ac_ext <<EOF
596#line 597 "configure"
597#include "confdefs.h"
598#include <assert.h>
599Syntax Error
600EOF
601eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
602ac_err=`grep -v '^ *+' conftest.out`
603if test -z "$ac_err"; then
604  :
605else
606  echo "$ac_err" >&5
607  rm -rf conftest*
608  CPP=/lib/cpp
609fi
610rm -f conftest*
611fi
612rm -f conftest*
613  ac_cv_prog_CPP="$CPP"
614fi
615fi
616CPP="$ac_cv_prog_CPP"
617echo "$ac_t""$CPP" 1>&6
618
619# If we cannot run a trivial program, we must be cross compiling.
620echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
621if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
622  echo $ac_n "(cached) $ac_c" 1>&6
623else
624  if test "$cross_compiling" = yes; then
625  ac_cv_c_cross=yes
626else
627cat > conftest.$ac_ext <<EOF
628#line 629 "configure"
629#include "confdefs.h"
630main(){return(0);}
631EOF
632eval $ac_link
633if test -s conftest && (./conftest; exit) 2>/dev/null; then
634  ac_cv_c_cross=no
635else
636  ac_cv_c_cross=yes
637fi
638fi
639rm -fr conftest*
640fi
641cross_compiling=$ac_cv_c_cross
642echo "$ac_t""$ac_cv_c_cross" 1>&6
643
644echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
645if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
646  echo $ac_n "(cached) $ac_c" 1>&6
647else
648  cat > conftest.$ac_ext <<EOF
649#line 650 "configure"
650#include "confdefs.h"
651#include <stdlib.h>
652#include <stdarg.h>
653#include <string.h>
654#include <float.h>
655EOF
656eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
657ac_err=`grep -v '^ *+' conftest.out`
658if test -z "$ac_err"; then
659  rm -rf conftest*
660  ac_cv_header_stdc=yes
661else
662  echo "$ac_err" >&5
663  rm -rf conftest*
664  ac_cv_header_stdc=no
665fi
666rm -f conftest*
667
668if test $ac_cv_header_stdc = yes; then
669  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
670cat > conftest.$ac_ext <<EOF
671#line 672 "configure"
672#include "confdefs.h"
673#include <string.h>
674EOF
675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
676  egrep "memchr" >/dev/null 2>&1; then
677  :
678else
679  rm -rf conftest*
680  ac_cv_header_stdc=no
681fi
682rm -f conftest*
683
684fi
685
686if test $ac_cv_header_stdc = yes; then
687  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
688cat > conftest.$ac_ext <<EOF
689#line 690 "configure"
690#include "confdefs.h"
691#include <stdlib.h>
692EOF
693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
694  egrep "free" >/dev/null 2>&1; then
695  :
696else
697  rm -rf conftest*
698  ac_cv_header_stdc=no
699fi
700rm -f conftest*
701
702fi
703
704if test $ac_cv_header_stdc = yes; then
705  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
706if test "$cross_compiling" = yes; then
707  ac_cv_header_stdc=no
708else
709cat > conftest.$ac_ext <<EOF
710#line 711 "configure"
711#include "confdefs.h"
712#include <ctype.h>
713#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
714#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
715#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
716int main () { int i; for (i = 0; i < 256; i++)
717if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
718exit (0); }
719
720EOF
721eval $ac_link
722if test -s conftest && (./conftest; exit) 2>/dev/null; then
723  :
724else
725  ac_cv_header_stdc=no
726fi
727fi
728rm -fr conftest*
729fi
730fi
731echo "$ac_t""$ac_cv_header_stdc" 1>&6
732if test $ac_cv_header_stdc = yes; then
733  cat >> confdefs.h <<\EOF
734#define STDC_HEADERS 1
735EOF
736
737fi
738
739for ac_hdr in memory.h strings.h time.h
740do
741ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
742echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
743if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
744  echo $ac_n "(cached) $ac_c" 1>&6
745else
746  cat > conftest.$ac_ext <<EOF
747#line 748 "configure"
748#include "confdefs.h"
749#include <$ac_hdr>
750EOF
751eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
752ac_err=`grep -v '^ *+' conftest.out`
753if test -z "$ac_err"; then
754  rm -rf conftest*
755  eval "ac_cv_header_$ac_safe=yes"
756else
757  echo "$ac_err" >&5
758  rm -rf conftest*
759  eval "ac_cv_header_$ac_safe=no"
760fi
761rm -f conftest*
762fi
763if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
764  echo "$ac_t""yes" 1>&6
765    ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
766  cat >> confdefs.h <<EOF
767#define $ac_tr_hdr 1
768EOF
769
770else
771  echo "$ac_t""no" 1>&6
772fi
773done
774
775echo $ac_n "checking for working const""... $ac_c" 1>&6
776if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
777  echo $ac_n "(cached) $ac_c" 1>&6
778else
779  cat > conftest.$ac_ext <<EOF
780#line 781 "configure"
781#include "confdefs.h"
782
783int main() { return 0; }
784int t() {
785
786/* Ultrix mips cc rejects this.  */
787typedef int charset[2]; const charset x;
788/* SunOS 4.1.1 cc rejects this.  */
789char const *const *ccp;
790char **p;
791/* NEC SVR4.0.2 mips cc rejects this.  */
792struct point {int x, y;};
793static struct point const zero;
794/* AIX XL C 1.02.0.0 rejects this.
795   It does not let you subtract one const X* pointer from another in an arm
796   of an if-expression whose if-part is not a constant expression */
797const char *g = "string";
798ccp = &g + (g ? g-g : 0);
799/* HPUX 7.0 cc rejects these. */
800++ccp;
801p = (char**) ccp;
802ccp = (char const *const *) p;
803{ /* SCO 3.2v4 cc rejects this.  */
804  char *t;
805  char const *s = 0 ? (char *) 0 : (char const *) 0;
806
807  *t++ = 0;
808}
809{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
810  int x[] = {25, 17};
811  const int *foo = &x[0];
812  ++foo;
813}
814{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
815  typedef const int *iptr;
816  iptr p = 0;
817  ++p;
818}
819{ /* AIX XL C 1.02.0.0 rejects this saying
820     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
821  struct s { int j; const int *ap[3]; };
822  struct s *b; b->j = 5;
823}
824{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
825  const int foo = 10;
826}
827
828; return 0; }
829EOF
830if eval $ac_compile; then
831  rm -rf conftest*
832  ac_cv_c_const=yes
833else
834  rm -rf conftest*
835  ac_cv_c_const=no
836fi
837rm -f conftest*
838
839fi
840echo "$ac_t""$ac_cv_c_const" 1>&6
841if test $ac_cv_c_const = no; then
842  cat >> confdefs.h <<\EOF
843#define const
844EOF
845
846fi
847
848for ac_func in memcpy memset strchr
849do
850echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
851if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
852  echo $ac_n "(cached) $ac_c" 1>&6
853else
854  cat > conftest.$ac_ext <<EOF
855#line 856 "configure"
856#include "confdefs.h"
857/* System header to define __stub macros and hopefully few prototypes,
858    which can conflict with char $ac_func(); below.  */
859#include <assert.h>
860/* Override any gcc2 internal prototype to avoid an error.  */
861char $ac_func(); 
862
863int main() { return 0; }
864int t() {
865
866/* The GNU C library defines this for functions which it implements
867    to always fail with ENOSYS.  Some functions are actually named
868    something starting with __ and the normal name is an alias.  */
869#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
870choke me
871#else
872$ac_func();
873#endif
874
875; return 0; }
876EOF
877if eval $ac_link; then
878  rm -rf conftest*
879  eval "ac_cv_func_$ac_func=yes"
880else
881  rm -rf conftest*
882  eval "ac_cv_func_$ac_func=no"
883fi
884rm -f conftest*
885
886fi
887if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
888  echo "$ac_t""yes" 1>&6
889    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
890  cat >> confdefs.h <<EOF
891#define $ac_tr_func 1
892EOF
893
894else
895  echo "$ac_t""no" 1>&6
896fi
897done
898
899echo $ac_n "checking for size_t""... $ac_c" 1>&6
900if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
901  echo $ac_n "(cached) $ac_c" 1>&6
902else
903  cat > conftest.$ac_ext <<EOF
904#line 905 "configure"
905#include "confdefs.h"
906#include <sys/types.h>
907#if STDC_HEADERS
908#include <stdlib.h>
909#endif
910EOF
911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
912  egrep "size_t" >/dev/null 2>&1; then
913  rm -rf conftest*
914  ac_cv_type_size_t=yes
915else
916  rm -rf conftest*
917  ac_cv_type_size_t=no
918fi
919rm -f conftest*
920
921fi
922echo "$ac_t""$ac_cv_type_size_t" 1>&6
923if test $ac_cv_type_size_t = no; then
924  cat >> confdefs.h <<\EOF
925#define size_t unsigned
926EOF
927
928fi
929
930# If we find X, set shell vars x_includes and x_libraries to the
931# paths, otherwise set no_x=yes.
932# Uses ac_ vars as temps to allow command line to override cache and checks.
933# --without-x overrides everything else, but does not touch the cache.
934echo $ac_n "checking for X""... $ac_c" 1>&6
935
936# Check whether --with-x or --without-x was given.
937withval="$with_x"
938if test -n "$withval"; then
939  :
940fi
941
942if test "x$with_x" = xno; then
943  no_x=yes
944else
945  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
946    no_x=
947  else
948if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
949  echo $ac_n "(cached) $ac_c" 1>&6
950else
951  # One or both of the vars are not set, and there is no cached value.
952no_x=yes
953rm -fr conftestdir
954if mkdir conftestdir; then
955  cd conftestdir
956  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
957  cat > Imakefile <<'EOF'
958acfindx:
959	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
960EOF
961  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
962    no_x=
963    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
964    eval `make acfindx 2>/dev/null | grep -v make`
965    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
966    if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
967    then
968      ac_im_usrlibdir=$ac_im_libdir
969    fi
970    # Screen out bogus values from the imake configuration.
971    case "$ac_im_incroot" in
972	/usr/include) ;;
973	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
974    esac
975    case "$ac_im_usrlibdir" in
976	/usr/lib | /lib) ;;
977	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
978    esac
979  fi
980  cd ..
981  rm -fr conftestdir
982fi
983
984if test "$no_x" = yes; then
985test -z "$x_direct_test_library" && x_direct_test_library=Xt
986test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
987test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
988cat > conftest.$ac_ext <<EOF
989#line 990 "configure"
990#include "confdefs.h"
991#include <$x_direct_test_include>
992EOF
993eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
994ac_err=`grep -v '^ *+' conftest.out`
995if test -z "$ac_err"; then
996  rm -rf conftest*
997  no_x= ac_x_includes=
998else
999  echo "$ac_err" >&5
1000  rm -rf conftest*
1001    for ac_dir in               \
1002    /usr/X11R6/include        \
1003    /usr/X11R5/include        \
1004    /usr/X11R4/include        \
1005                              \
1006    /usr/include/X11R6        \
1007    /usr/include/X11R5        \
1008    /usr/include/X11R4        \
1009                              \
1010    /usr/local/X11R6/include  \
1011    /usr/local/X11R5/include  \
1012    /usr/local/X11R4/include  \
1013                              \
1014    /usr/local/include/X11R6  \
1015    /usr/local/include/X11R5  \
1016    /usr/local/include/X11R4  \
1017                              \
1018    /usr/X11/include          \
1019    /usr/include/X11          \
1020    /usr/local/X11/include    \
1021    /usr/local/include/X11    \
1022                              \
1023    /usr/X386/include         \
1024    /usr/x386/include         \
1025    /usr/XFree86/include/X11  \
1026                              \
1027    /usr/include              \
1028    /usr/local/include        \
1029    /usr/unsupported/include  \
1030    /usr/athena/include       \
1031    /usr/local/x11r5/include  \
1032    /usr/lpp/Xamples/include  \
1033                              \
1034    /usr/openwin/include      \
1035    /usr/openwin/share/include \
1036    ; \
1037  do
1038    if test -r "$ac_dir/$x_direct_test_include"; then
1039      no_x= ac_x_includes=$ac_dir
1040      break
1041    fi
1042  done
1043fi
1044rm -f conftest*
1045
1046# Check for the libraries.
1047# See if we find them without any special options.
1048# Don't add to $LIBS permanently.
1049ac_save_LIBS="$LIBS"
1050LIBS="-l$x_direct_test_library $LIBS"
1051cat > conftest.$ac_ext <<EOF
1052#line 1053 "configure"
1053#include "confdefs.h"
1054
1055int main() { return 0; }
1056int t() {
1057${x_direct_test_function}()
1058; return 0; }
1059EOF
1060if eval $ac_link; then
1061  rm -rf conftest*
1062  LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1063else
1064  rm -rf conftest*
1065  LIBS="$ac_save_LIBS"
1066# First see if replacing the include by lib works.
1067for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1068    /usr/X11R6/lib        \
1069    /usr/X11R5/lib        \
1070    /usr/X11R4/lib        \
1071                          \
1072    /usr/lib/X11R6        \
1073    /usr/lib/X11R5        \
1074    /usr/lib/X11R4        \
1075                          \
1076    /usr/local/X11R6/lib  \
1077    /usr/local/X11R5/lib  \
1078    /usr/local/X11R4/lib  \
1079                          \
1080    /usr/local/lib/X11R6  \
1081    /usr/local/lib/X11R5  \
1082    /usr/local/lib/X11R4  \
1083                          \
1084    /usr/X11/lib          \
1085    /usr/lib/X11          \
1086    /usr/local/X11/lib    \
1087    /usr/local/lib/X11    \
1088                          \
1089    /usr/X386/lib         \
1090    /usr/x386/lib         \
1091    /usr/XFree86/lib/X11  \
1092                          \
1093    /usr/lib              \
1094    /usr/local/lib        \
1095    /usr/unsupported/lib  \
1096    /usr/athena/lib       \
1097    /usr/local/x11r5/lib  \
1098    /usr/lpp/Xamples/lib  \
1099                          \
1100    /usr/openwin/lib      \
1101    /usr/openwin/share/lib \
1102    ; \
1103do
1104  for ac_extension in a so sl; do
1105    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1106      no_x= ac_x_libraries=$ac_dir
1107      break 2
1108    fi
1109  done
1110done
1111fi
1112rm -f conftest*
1113
1114fi
1115if test "$no_x" = yes; then
1116  ac_cv_path_x="no_x=yes"
1117else
1118  ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1119fi
1120fi
1121  fi
1122  eval "$ac_cv_path_x"
1123fi # $with_x != no
1124
1125if test "$no_x" = yes; then
1126  echo "$ac_t""no" 1>&6
1127else
1128  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1129  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1130  ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1131  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1132fi
1133
1134if test "$no_x" = yes; then
1135  # Not all programs may use this symbol, but it does not hurt to define it.
1136  X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1137else
1138  if test -n "$x_includes"; then
1139    X_CFLAGS="$X_CFLAGS -I$x_includes"
1140  fi
1141
1142  # It would be nice to have a more robust check for the -R ld option than
1143  # just checking for Solaris.
1144  # It would also be nice to do this for all -L options, not just this one.
1145  if test -n "$x_libraries"; then
1146    X_LIBS="$X_LIBS -L$x_libraries"
1147    if test "`(uname) 2>/dev/null`" = SunOS &&
1148      uname -r | grep '^5' >/dev/null; then
1149      X_LIBS="$X_LIBS -R$x_libraries"
1150    fi
1151  fi
1152
1153  # Check for libraries that X11R6 Xt/Xaw programs need.
1154
1155  ac_save_LDFLAGS="$LDFLAGS"
1156  LDFLAGS="$LDFLAGS -L$x_libraries"
1157  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1158  # check for ICE first), but we must link in the order -lSM -lICE or
1159  # we get undefined symbols.  So assume we have SM if we have ICE.
1160  # These have to be linked with before -lX11, unlike the other
1161  # libraries we check for below, so use a different variable.
1162  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1163  echo $ac_n "checking for -lICE""... $ac_c" 1>&6
1164if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
1165  echo $ac_n "(cached) $ac_c" 1>&6
1166else
1167  ac_save_LIBS="$LIBS"
1168LIBS="-lICE  $LIBS"
1169cat > conftest.$ac_ext <<EOF
1170#line 1171 "configure"
1171#include "confdefs.h"
1172
1173int main() { return 0; }
1174int t() {
1175IceConnectionNumber()
1176; return 0; }
1177EOF
1178if eval $ac_link; then
1179  rm -rf conftest*
1180  eval "ac_cv_lib_ICE=yes"
1181else
1182  rm -rf conftest*
1183  eval "ac_cv_lib_ICE=no"
1184fi
1185rm -f conftest*
1186LIBS="$ac_save_LIBS"
1187
1188fi
1189if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
1190  echo "$ac_t""yes" 1>&6
1191  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1192else
1193  echo "$ac_t""no" 1>&6
1194fi
1195
1196  LDFLAGS="$ac_save_LDFLAGS"
1197
1198  # Check for system-dependent libraries X programs must link with.
1199
1200  if test "$ISC" = yes; then
1201    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1202  else
1203    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1204    # libraries were built with DECnet support.  And karl@cs.umb.edu says
1205    # the Alpha needs dnet_stub (dnet does not exist).
1206    echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
1207if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
1208  echo $ac_n "(cached) $ac_c" 1>&6
1209else
1210  ac_save_LIBS="$LIBS"
1211LIBS="-ldnet  $LIBS"
1212cat > conftest.$ac_ext <<EOF
1213#line 1214 "configure"
1214#include "confdefs.h"
1215
1216int main() { return 0; }
1217int t() {
1218dnet_ntoa()
1219; return 0; }
1220EOF
1221if eval $ac_link; then
1222  rm -rf conftest*
1223  eval "ac_cv_lib_dnet=yes"
1224else
1225  rm -rf conftest*
1226  eval "ac_cv_lib_dnet=no"
1227fi
1228rm -f conftest*
1229LIBS="$ac_save_LIBS"
1230
1231fi
1232if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
1233  echo "$ac_t""yes" 1>&6
1234  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1235else
1236  echo "$ac_t""no" 1>&6
1237fi
1238
1239    if test $ac_cv_lib_dnet = no; then
1240      echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
1241if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
1242  echo $ac_n "(cached) $ac_c" 1>&6
1243else
1244  ac_save_LIBS="$LIBS"
1245LIBS="-ldnet_stub  $LIBS"
1246cat > conftest.$ac_ext <<EOF
1247#line 1248 "configure"
1248#include "confdefs.h"
1249
1250int main() { return 0; }
1251int t() {
1252dnet_ntoa()
1253; return 0; }
1254EOF
1255if eval $ac_link; then
1256  rm -rf conftest*
1257  eval "ac_cv_lib_dnet_stub=yes"
1258else
1259  rm -rf conftest*
1260  eval "ac_cv_lib_dnet_stub=no"
1261fi
1262rm -f conftest*
1263LIBS="$ac_save_LIBS"
1264
1265fi
1266if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
1267  echo "$ac_t""yes" 1>&6
1268  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1269else
1270  echo "$ac_t""no" 1>&6
1271fi
1272
1273    fi
1274
1275    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1276    # to get the SysV transport functions.
1277    # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1278    # check for it.
1279    echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
1280if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
1281  echo $ac_n "(cached) $ac_c" 1>&6
1282else
1283  ac_save_LIBS="$LIBS"
1284LIBS="-lnsl  $LIBS"
1285cat > conftest.$ac_ext <<EOF
1286#line 1287 "configure"
1287#include "confdefs.h"
1288
1289int main() { return 0; }
1290int t() {
1291t_accept()
1292; return 0; }
1293EOF
1294if eval $ac_link; then
1295  rm -rf conftest*
1296  eval "ac_cv_lib_nsl=yes"
1297else
1298  rm -rf conftest*
1299  eval "ac_cv_lib_nsl=no"
1300fi
1301rm -f conftest*
1302LIBS="$ac_save_LIBS"
1303
1304fi
1305if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
1306  echo "$ac_t""yes" 1>&6
1307  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1308else
1309  echo "$ac_t""no" 1>&6
1310fi
1311
1312
1313    # lieder@skyler.mavd.honeywell.com says without -lsocket,
1314    # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1315    # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1316    if test "`(uname) 2>/dev/null`" != IRIX; then
1317      echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
1318if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
1319  echo $ac_n "(cached) $ac_c" 1>&6
1320else
1321  ac_save_LIBS="$LIBS"
1322LIBS="-lsocket  $LIBS"
1323cat > conftest.$ac_ext <<EOF
1324#line 1325 "configure"
1325#include "confdefs.h"
1326
1327int main() { return 0; }
1328int t() {
1329socket()
1330; return 0; }
1331EOF
1332if eval $ac_link; then
1333  rm -rf conftest*
1334  eval "ac_cv_lib_socket=yes"
1335else
1336  rm -rf conftest*
1337  eval "ac_cv_lib_socket=no"
1338fi
1339rm -f conftest*
1340LIBS="$ac_save_LIBS"
1341
1342fi
1343if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
1344  echo "$ac_t""yes" 1>&6
1345  X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1346else
1347  echo "$ac_t""no" 1>&6
1348fi
1349
1350    fi
1351  fi
1352fi
1353
1354trap '' 1 2 15
1355cat > confcache <<\EOF
1356# This file is a shell script that caches the results of configure
1357# tests run on this system so they can be shared between configure
1358# scripts and configure runs.  It is not useful on other systems.
1359# If it contains results you don't want to keep, you may remove or edit it.
1360#
1361# By default, configure uses ./config.cache as the cache file,
1362# creating it if it does not exist already.  You can give configure
1363# the --cache-file=FILE option to use a different cache file; that is
1364# what configure does when it calls configure scripts in
1365# subdirectories, so they share the cache.
1366# Giving --cache-file=/dev/null disables caching, for debugging configure.
1367# config.status only pays attention to the cache file if you give it the
1368# --recheck option to rerun configure.
1369#
1370EOF
1371# Ultrix sh set writes to stderr and can't be redirected directly,
1372# and sets the high bit in the cache file unless we assign to the vars.
1373(set) 2>&1 |
1374  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1375  >> confcache
1376if cmp -s $cache_file confcache; then
1377  :
1378else
1379  if test -w $cache_file; then
1380    echo "updating cache $cache_file"
1381    cat confcache > $cache_file
1382  else
1383    echo "not updating unwritable cache $cache_file"
1384  fi
1385fi
1386rm -f confcache
1387
1388trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1389
1390test "x$prefix" = xNONE && prefix=$ac_default_prefix
1391# Let make expand exec_prefix.
1392test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1393
1394# Any assignment to VPATH causes Sun make to only execute
1395# the first set of double-colon rules, so remove it if not needed.
1396# If there is a colon in the path, we need to keep it.
1397if test "x$srcdir" = x.; then
1398  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
1399fi
1400
1401trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1402
1403# Transform confdefs.h into DEFS.
1404# Protect against shell expansion while executing Makefile rules.
1405# Protect against Makefile macro expansion.
1406cat > conftest.defs <<\EOF
1407s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
1408s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
1409s%\[%\\&%g
1410s%\]%\\&%g
1411s%\$%$$%g
1412EOF
1413DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1414rm -f conftest.defs
1415
1416
1417# Without the "./", some shells look in PATH for config.status.
1418: ${CONFIG_STATUS=./config.status}
1419
1420echo creating $CONFIG_STATUS
1421rm -f $CONFIG_STATUS
1422cat > $CONFIG_STATUS <<EOF
1423#! /bin/sh
1424# Generated automatically by configure.
1425# Run this file to recreate the current configuration.
1426# This directory was configured as follows,
1427# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1428#
1429# $0 $ac_configure_args
1430#
1431# Compiler output produced by configure, useful for debugging
1432# configure, is in ./config.log if it exists.
1433
1434ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1435for ac_option
1436do
1437  case "\$ac_option" in
1438  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1439    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1440    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1441  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1442    echo "$CONFIG_STATUS generated by autoconf version 2.3"
1443    exit 0 ;;
1444  -help | --help | --hel | --he | --h)
1445    echo "\$ac_cs_usage"; exit 0 ;;
1446  *) echo "\$ac_cs_usage"; exit 1 ;;
1447  esac
1448done
1449
1450ac_given_srcdir=$srcdir
1451ac_given_INSTALL="$INSTALL"
1452
1453trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1454
1455# Protect against being on the right side of a sed subst in config.status. 
1456sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
1457 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1458$ac_vpsub
1459$extrasub
1460s%@CFLAGS@%$CFLAGS%g
1461s%@CPPFLAGS@%$CPPFLAGS%g
1462s%@CXXFLAGS@%$CXXFLAGS%g
1463s%@DEFS@%$DEFS%g
1464s%@LDFLAGS@%$LDFLAGS%g
1465s%@LIBS@%$LIBS%g
1466s%@exec_prefix@%$exec_prefix%g
1467s%@prefix@%$prefix%g
1468s%@program_transform_name@%$program_transform_name%g
1469s%@CC@%$CC%g
1470s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1471s%@INSTALL_DATA@%$INSTALL_DATA%g
1472s%@CPP@%$CPP%g
1473s%@X_CFLAGS@%$X_CFLAGS%g
1474s%@X_PRE_LIBS@%$X_PRE_LIBS%g
1475s%@X_LIBS@%$X_LIBS%g
1476s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
1477
1478CEOF
1479EOF
1480cat >> $CONFIG_STATUS <<EOF
1481
1482CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1483EOF
1484cat >> $CONFIG_STATUS <<\EOF
1485for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1486  # Support "outfile[:infile]", defaulting infile="outfile.in".
1487  case "$ac_file" in
1488  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1489       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1490  *) ac_file_in="${ac_file}.in" ;;
1491  esac
1492
1493  # Adjust relative srcdir, etc. for subdirectories.
1494
1495  # Remove last slash and all that follows it.  Not all systems have dirname.
1496  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1497  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1498    # The file is in a subdirectory.
1499    test ! -d "$ac_dir" && mkdir "$ac_dir"
1500    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1501    # A "../" for each directory in $ac_dir_suffix.
1502    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1503  else
1504    ac_dir_suffix= ac_dots=
1505  fi
1506
1507  case "$ac_given_srcdir" in
1508  .)  srcdir=.
1509      if test -z "$ac_dots"; then top_srcdir=.
1510      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1511  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1512  *) # Relative path.
1513    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1514    top_srcdir="$ac_dots$ac_given_srcdir" ;;
1515  esac
1516
1517  case "$ac_given_INSTALL" in
1518  [/$]*) INSTALL="$ac_given_INSTALL" ;;
1519  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1520  esac
1521  echo creating "$ac_file"
1522  rm -f "$ac_file"
1523  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1524  case "$ac_file" in
1525  *Makefile*) ac_comsub="1i\\
1526# $configure_input" ;;
1527  *) ac_comsub= ;;
1528  esac
1529  sed -e "$ac_comsub
1530s%@configure_input@%$configure_input%g
1531s%@srcdir@%$srcdir%g
1532s%@top_srcdir@%$top_srcdir%g
1533s%@INSTALL@%$INSTALL%g
1534" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1535fi; done
1536rm -f conftest.subs
1537
1538
1539
1540exit 0
1541EOF
1542chmod +x $CONFIG_STATUS
1543rm -fr confdefs* $ac_clean_files
1544test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1545