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