1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20200802.
4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25  emulate sh
26  NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28  set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35  as_expr=expr
36else
37  as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43  # We could just check for DJGPP; but this test a) works b) is more generic
44  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45  if test -f conf$$.exe; then
46    # Don't use ln at all; we don't have any links
47    as_ln_s='cp -p'
48  else
49    as_ln_s='ln -s'
50  fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52  as_ln_s=ln
53else
54  as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62  as_unset=unset
63else
64  as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" 	$as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
96ac_default_prefix=/usr/local
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete.  It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="include/cdk.h"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122#  include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127#  include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138#  include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
144
145# Initialize some variables set by options.
146ac_init_help=
147ac_init_version=false
148# The variables have the same names as the options, with
149# dashes changed to underlines.
150cache_file=/dev/null
151exec_prefix=NONE
152no_create=
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
161verbose=
162x_includes=NONE
163x_libraries=NONE
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datarootdir='${prefix}/share'
174datadir='${datarootdir}'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178runstatedir='${localstatedir}/run'
179libdir='${exec_prefix}/lib'
180includedir='${prefix}/include'
181oldincludedir='/usr/include'
182infodir='${datarootdir}/info'
183mandir='${datarootdir}/man'
184
185# Identity of this package.
186PACKAGE_NAME=
187PACKAGE_TARNAME=
188PACKAGE_VERSION=
189PACKAGE_STRING=
190PACKAGE_BUGREPORT=
191
192ac_prev=
193for ac_option
194do
195  # If the previous option needs an argument, assign it.
196  if test -n "$ac_prev"; then
197    eval "$ac_prev=\$ac_option"
198    ac_prev=
199    continue
200  fi
201
202  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204  # Accept the important Cygnus configure options, so we can diagnose typos.
205
206  case $ac_option in
207
208  -bindir | --bindir | --bindi | --bind | --bin | --bi)
209    ac_prev=bindir ;;
210  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211    bindir=$ac_optarg ;;
212
213  -build | --build | --buil | --bui | --bu)
214    ac_prev=build_alias ;;
215  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216    build_alias=$ac_optarg ;;
217
218  -cache-file | --cache-file | --cache-fil | --cache-fi \
219  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220    ac_prev=cache_file ;;
221  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223    cache_file=$ac_optarg ;;
224
225  --config-cache | -C)
226    cache_file=config.cache ;;
227
228  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229    ac_prev=datadir ;;
230  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231  | --da=*)
232    datadir=$ac_optarg ;;
233
234  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235  | --dataroo | --dataro | --datar)
236    ac_prev=datarootdir ;;
237  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239    datarootdir=$ac_optarg ;;
240
241  -disable-* | --disable-*)
242    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243    # Reject names that are not valid shell variable names.
244    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246   { (exit 1); exit 1; }; }
247    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248    eval "enable_$ac_feature=no" ;;
249
250  -enable-* | --enable-*)
251    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252    # Reject names that are not valid shell variable names.
253    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255   { (exit 1); exit 1; }; }
256    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257    case $ac_option in
258      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259      *) ac_optarg=yes ;;
260    esac
261    eval "enable_$ac_feature='$ac_optarg'" ;;
262
263  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265  | --exec | --exe | --ex)
266    ac_prev=exec_prefix ;;
267  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269  | --exec=* | --exe=* | --ex=*)
270    exec_prefix=$ac_optarg ;;
271
272  -gas | --gas | --ga | --g)
273    # Obsolete; use --with-gas.
274    with_gas=yes ;;
275
276  -help | --help | --hel | --he | -h)
277    ac_init_help=long ;;
278  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279    ac_init_help=recursive ;;
280  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281    ac_init_help=short ;;
282
283  -host | --host | --hos | --ho)
284    ac_prev=host_alias ;;
285  -host=* | --host=* | --hos=* | --ho=*)
286    host_alias=$ac_optarg ;;
287
288  -includedir | --includedir | --includedi | --included | --include \
289  | --includ | --inclu | --incl | --inc)
290    ac_prev=includedir ;;
291  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292  | --includ=* | --inclu=* | --incl=* | --inc=*)
293    includedir=$ac_optarg ;;
294
295  -infodir | --infodir | --infodi | --infod | --info | --inf)
296    ac_prev=infodir ;;
297  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298    infodir=$ac_optarg ;;
299
300  -libdir | --libdir | --libdi | --libd)
301    ac_prev=libdir ;;
302  -libdir=* | --libdir=* | --libdi=* | --libd=*)
303    libdir=$ac_optarg ;;
304
305  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306  | --libexe | --libex | --libe)
307    ac_prev=libexecdir ;;
308  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309  | --libexe=* | --libex=* | --libe=*)
310    libexecdir=$ac_optarg ;;
311
312  -localstatedir | --localstatedir | --localstatedi | --localstated \
313  | --localstate | --localstat | --localsta | --localst \
314  | --locals | --local | --loca | --loc | --lo)
315    ac_prev=localstatedir ;;
316  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319    localstatedir=$ac_optarg ;;
320
321  -runstatedir | --runstatedir | --runstatedi | --runstated \
322  | --runstate | --runstat | --runsta | --runst \
323  | --runs | --run | --ru)
324    ac_prev=runstatedir ;;
325  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
326  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
327  | --runs=* | --run=* | --ru=*)
328    runstatedir=$ac_optarg ;;
329
330  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
331    ac_prev=mandir ;;
332  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
333    mandir=$ac_optarg ;;
334
335  -nfp | --nfp | --nf)
336    # Obsolete; use --without-fp.
337    with_fp=no ;;
338
339  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
340  | --no-cr | --no-c)
341    no_create=yes ;;
342
343  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
344  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
345    no_recursion=yes ;;
346
347  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
348  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
349  | --oldin | --oldi | --old | --ol | --o)
350    ac_prev=oldincludedir ;;
351  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
352  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
353  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
354    oldincludedir=$ac_optarg ;;
355
356  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
357    ac_prev=prefix ;;
358  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
359    prefix=$ac_optarg ;;
360
361  -program-prefix | --program-prefix | --program-prefi | --program-pref \
362  | --program-pre | --program-pr | --program-p)
363    ac_prev=program_prefix ;;
364  -program-prefix=* | --program-prefix=* | --program-prefi=* \
365  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
366    program_prefix=$ac_optarg ;;
367
368  -program-suffix | --program-suffix | --program-suffi | --program-suff \
369  | --program-suf | --program-su | --program-s)
370    ac_prev=program_suffix ;;
371  -program-suffix=* | --program-suffix=* | --program-suffi=* \
372  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
373    program_suffix=$ac_optarg ;;
374
375  -program-transform-name | --program-transform-name \
376  | --program-transform-nam | --program-transform-na \
377  | --program-transform-n | --program-transform- \
378  | --program-transform | --program-transfor \
379  | --program-transfo | --program-transf \
380  | --program-trans | --program-tran \
381  | --progr-tra | --program-tr | --program-t)
382    ac_prev=program_transform_name ;;
383  -program-transform-name=* | --program-transform-name=* \
384  | --program-transform-nam=* | --program-transform-na=* \
385  | --program-transform-n=* | --program-transform-=* \
386  | --program-transform=* | --program-transfor=* \
387  | --program-transfo=* | --program-transf=* \
388  | --program-trans=* | --program-tran=* \
389  | --progr-tra=* | --program-tr=* | --program-t=*)
390    program_transform_name=$ac_optarg ;;
391
392  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
393  | -silent | --silent | --silen | --sile | --sil)
394    silent=yes ;;
395
396  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
397    ac_prev=sbindir ;;
398  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
399  | --sbi=* | --sb=*)
400    sbindir=$ac_optarg ;;
401
402  -sharedstatedir | --sharedstatedir | --sharedstatedi \
403  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
404  | --sharedst | --shareds | --shared | --share | --shar \
405  | --sha | --sh)
406    ac_prev=sharedstatedir ;;
407  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
408  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
409  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
410  | --sha=* | --sh=*)
411    sharedstatedir=$ac_optarg ;;
412
413  -site | --site | --sit)
414    ac_prev=site ;;
415  -site=* | --site=* | --sit=*)
416    site=$ac_optarg ;;
417
418  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
419    ac_prev=srcdir ;;
420  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
421    srcdir=$ac_optarg ;;
422
423  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
424  | --syscon | --sysco | --sysc | --sys | --sy)
425    ac_prev=sysconfdir ;;
426  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
427  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
428    sysconfdir=$ac_optarg ;;
429
430  -target | --target | --targe | --targ | --tar | --ta | --t)
431    ac_prev=target_alias ;;
432  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
433    target_alias=$ac_optarg ;;
434
435  -v | -verbose | --verbose | --verbos | --verbo | --verb)
436    verbose=yes ;;
437
438  -version | --version | --versio | --versi | --vers | -V)
439    ac_init_version=: ;;
440
441  -with-* | --with-*)
442    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
443    # Reject names that are not valid shell variable names.
444    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
445      { echo "$as_me: error: invalid package name: $ac_package" >&2
446   { (exit 1); exit 1; }; }
447    ac_package=`echo $ac_package| sed 's/-/_/g'`
448    case $ac_option in
449      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
450      *) ac_optarg=yes ;;
451    esac
452    eval "with_$ac_package='$ac_optarg'" ;;
453
454  -without-* | --without-*)
455    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
456    # Reject names that are not valid shell variable names.
457    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
458      { echo "$as_me: error: invalid package name: $ac_package" >&2
459   { (exit 1); exit 1; }; }
460    ac_package=`echo $ac_package | sed 's/-/_/g'`
461    eval "with_$ac_package=no" ;;
462
463  --x)
464    # Obsolete; use --with-x.
465    with_x=yes ;;
466
467  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
468  | --x-incl | --x-inc | --x-in | --x-i)
469    ac_prev=x_includes ;;
470  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
471  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
472    x_includes=$ac_optarg ;;
473
474  -x-libraries | --x-libraries | --x-librarie | --x-librari \
475  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
476    ac_prev=x_libraries ;;
477  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
478  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
479    x_libraries=$ac_optarg ;;
480
481  -*) { echo "$as_me: error: unrecognized option: $ac_option
482Try \`$0 --help' for more information." >&2
483   { (exit 1); exit 1; }; }
484    ;;
485
486  *=*)
487    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
488    # Reject names that are not valid shell variable names.
489    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
490      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
491   { (exit 1); exit 1; }; }
492    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
493    eval "$ac_envvar='$ac_optarg'"
494    export $ac_envvar ;;
495
496  *)
497    # FIXME: should be removed in autoconf 3.0.
498    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
499    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
500      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
501    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
502    ;;
503
504  esac
505done
506
507if test -n "$ac_prev"; then
508  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
509  { echo "$as_me: error: missing argument to $ac_option" >&2
510   { (exit 1); exit 1; }; }
511fi
512
513# Be sure to have absolute paths.
514for ac_var in exec_prefix prefix
515do
516  eval ac_val=$`echo $ac_var`
517  case $ac_val in
518    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
519    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
520   { (exit 1); exit 1; }; };;
521  esac
522done
523
524# Be sure to have absolute paths.
525for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
526              localstatedir libdir includedir oldincludedir infodir mandir
527do
528  eval ac_val=$`echo $ac_var`
529  case $ac_val in
530    [\\/$]* | ?:[\\/]* ) ;;
531    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
532   { (exit 1); exit 1; }; };;
533  esac
534done
535
536# There might be people who depend on the old broken behavior: `$host'
537# used to hold the argument of --host etc.
538build=$build_alias
539host=$host_alias
540target=$target_alias
541
542# FIXME: should be removed in autoconf 3.0.
543if test "x$host_alias" != x; then
544  if test "x$build_alias" = x; then
545    cross_compiling=maybe
546    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
547    If a cross compiler is detected then cross compile mode will be used." >&2
548  elif test "x$build_alias" != "x$host_alias"; then
549    cross_compiling=yes
550  fi
551fi
552
553ac_tool_prefix=
554test -n "$host_alias" && ac_tool_prefix=$host_alias-
555
556test "$silent" = yes && exec 6>/dev/null
557
558# Find the source files, if location was not specified.
559if test -z "$srcdir"; then
560  ac_srcdir_defaulted=yes
561  # Try the directory containing this script, then its parent.
562  ac_prog=$0
563  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
564  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
565  srcdir=$ac_confdir
566  if test ! -r $srcdir/$ac_unique_file; then
567    srcdir=..
568  fi
569else
570  ac_srcdir_defaulted=no
571fi
572if test ! -r $srcdir/$ac_unique_file; then
573  if test "$ac_srcdir_defaulted" = yes; then
574    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
575   { (exit 1); exit 1; }; }
576  else
577    { echo "$as_me: error: cannot find sources in $srcdir" >&2
578   { (exit 1); exit 1; }; }
579  fi
580fi
581srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
582ac_env_build_alias_set=${build_alias+set}
583ac_env_build_alias_value=$build_alias
584ac_cv_env_build_alias_set=${build_alias+set}
585ac_cv_env_build_alias_value=$build_alias
586ac_env_host_alias_set=${host_alias+set}
587ac_env_host_alias_value=$host_alias
588ac_cv_env_host_alias_set=${host_alias+set}
589ac_cv_env_host_alias_value=$host_alias
590ac_env_target_alias_set=${target_alias+set}
591ac_env_target_alias_value=$target_alias
592ac_cv_env_target_alias_set=${target_alias+set}
593ac_cv_env_target_alias_value=$target_alias
594ac_env_CC_set=${CC+set}
595ac_env_CC_value=$CC
596ac_cv_env_CC_set=${CC+set}
597ac_cv_env_CC_value=$CC
598ac_env_CFLAGS_set=${CFLAGS+set}
599ac_env_CFLAGS_value=$CFLAGS
600ac_cv_env_CFLAGS_set=${CFLAGS+set}
601ac_cv_env_CFLAGS_value=$CFLAGS
602ac_env_LDFLAGS_set=${LDFLAGS+set}
603ac_env_LDFLAGS_value=$LDFLAGS
604ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
605ac_cv_env_LDFLAGS_value=$LDFLAGS
606ac_env_CPPFLAGS_set=${CPPFLAGS+set}
607ac_env_CPPFLAGS_value=$CPPFLAGS
608ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
609ac_cv_env_CPPFLAGS_value=$CPPFLAGS
610ac_env_CPP_set=${CPP+set}
611ac_env_CPP_value=$CPP
612ac_cv_env_CPP_set=${CPP+set}
613ac_cv_env_CPP_value=$CPP
614
615#
616# Report the --help message.
617#
618if test "$ac_init_help" = "long"; then
619  # Omit some internal or obsolete options to make the list less imposing.
620  # This message is too long to be a string in the A/UX 3.1 sh.
621  cat <<EOF
622\`configure' configures this package to adapt to many kinds of systems.
623
624Usage: $0 [OPTION]... [VAR=VALUE]...
625
626To assign environment variables (e.g., CC, CFLAGS...), specify them as
627VAR=VALUE.  See below for descriptions of some of the useful variables.
628
629Defaults for the options are specified in brackets.
630
631Configuration:
632  -h, --help              display this help and exit
633      --help=short        display options specific to this package
634      --help=recursive    display the short help of all the included packages
635  -V, --version           display version information and exit
636  -q, --quiet, --silent   do not print \`checking...' messages
637      --cache-file=FILE   cache test results in FILE [disabled]
638  -C, --config-cache      alias for \`--cache-file=config.cache'
639  -n, --no-create         do not create output files
640      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
641
642EOF
643
644  cat <<EOF
645Installation directories:
646  --prefix=PREFIX         install architecture-independent files in PREFIX
647                          [$ac_default_prefix]
648  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
649                          [PREFIX]
650
651By default, \`make install' will install all the files in
652\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
653an installation prefix other than \`$ac_default_prefix' using \`--prefix',
654for instance \`--prefix=\$HOME'.
655
656For better control, use the options below.
657
658Fine tuning of the installation directories:
659  --bindir=DIR            user executables [EPREFIX/bin]
660  --sbindir=DIR           system admin executables [EPREFIX/sbin]
661  --libexecdir=DIR        program executables [EPREFIX/libexec]
662  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
663  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
664  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
665  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
666  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
667  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
668  --libdir=DIR            object code libraries [EPREFIX/lib]
669  --includedir=DIR        C header files [PREFIX/include]
670  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
671  --infodir=DIR           info documentation [DATAROOTDIR/info]
672  --mandir=DIR            man documentation [DATAROOTDIR/man]
673EOF
674
675  cat <<\EOF
676
677X features:
678  --x-includes=DIR    X include files are in DIR
679  --x-libraries=DIR   X library files are in DIR
680
681System types:
682  --build=BUILD           configure for building on BUILD [guessed]
683  --host=HOST       build programs to run on HOST [BUILD]
684EOF
685fi
686
687if test -n "$ac_init_help"; then
688
689  cat <<\EOF
690
691Optional Features:
692  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
693  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
694
695Optional Packages:
696  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699  --disable-echo          do not display "compiling" commands
700  --with-man-section=XXX  change manpage section (default 3)
701  --with-curses-dir=DIR   directory in which (n)curses is installed
702  --with-x                use the X Window System
703  --enable-warnings       test: turn on gcc compiler warnings
704  --with-pkg-config{=path} enable/disable use of pkg-config
705  --enable-rpath          use rpath option when generating shared libraries
706  --disable-rpath-hack    don't add rpath options for additional libraries
707  --with-rel-version=XXX  override derived release version
708  --with-abi-version=XXX  override derived ABI version
709  --disable-libtool-version  enable to use libtool's incompatible naming scheme
710  --with-libtool          generate libraries with libtool
711  --with-libtool-opts=XXX specify additional libtool options
712  --with-export-syms=XXX  limit exported symbols using libtool
713  --with-shared           generate shared-libraries
714  --with-shlib-version=X  Specify rel or abi version for shared libs
715  --with-versioned-syms=X markup versioned symbols using ld
716  --with-dmalloc          test: use Gray Watson's dmalloc library
717  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
718  --with-valgrind         test: use valgrind
719  --disable-leaks         test: free permanent memory, analyze leaks
720  --with-screen=XXX       use specified curses-libraries
721  --with-ncursesw         use wide ncurses-libraries
722  --with-ncurses          use ncurses-libraries
723  --with-pdcurses         compile/link with pdcurses X11 library
724  --with-curses-colr      compile/link with HPUX 10.x color-curses
725  --with-curses-5lib      compile/link with SunOS 5lib curses
726  --with-Xaw3d            link with Xaw 3d library
727  --with-Xaw3dxft         link with Xaw 3d xft library
728  --with-neXtaw           link with neXT Athena library
729  --with-XawPlus          link with Athena-Plus library
730  --with-cfgname=XXX      override the XXX-config rootname
731  --enable-hdr-subdir     install cdk.h in the header subdirectory
732  --with-hdrname=XXX      override the header subdirectory
733  --with-libname=XXX      override the library name
734  --enable-const          use improved const-typing
735
736Some influential environment variables:
737  CC          C compiler command
738  CFLAGS      C compiler flags
739  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
740              nonstandard directory <lib dir>
741  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
742              headers in a nonstandard directory <include dir>
743  CPP         C preprocessor
744
745Use these variables to override the choices made by `configure' or to help
746it to find libraries and programs with nonstandard names/locations.
747
748EOF
749fi
750
751if test "$ac_init_help" = "recursive"; then
752  # If there are subdirs, report their specific --help.
753  ac_popdir=`pwd`
754  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
755    cd $ac_subdir
756    # A "../" for each directory in /$ac_subdir.
757    ac_dots=`echo $ac_subdir |
758             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
759
760    case $srcdir in
761    .) # No --srcdir option.  We are building in place.
762      ac_sub_srcdir=$srcdir ;;
763    [\\/]* | ?:[\\/]* ) # Absolute path.
764      ac_sub_srcdir=$srcdir/$ac_subdir ;;
765    *) # Relative path.
766      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
767    esac
768
769    # Check for guested configure; otherwise get Cygnus style configure.
770    if test -f $ac_sub_srcdir/configure.gnu; then
771      echo
772      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
773    elif test -f $ac_sub_srcdir/configure; then
774      echo
775      $SHELL $ac_sub_srcdir/configure  --help=recursive
776    elif test -f $ac_sub_srcdir/configure.ac ||
777           test -f $ac_sub_srcdir/configure.in; then
778      echo
779      $ac_configure --help
780    else
781      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
782    fi
783    cd $ac_popdir
784  done
785fi
786
787test -n "$ac_init_help" && exit 0
788if $ac_init_version; then
789  cat <<\EOF
790
791Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
792Free Software Foundation, Inc.
793This configure script is free software; the Free Software Foundation
794gives unlimited permission to copy, distribute and modify it.
795EOF
796  exit 0
797fi
798exec 5>config.log
799cat >&5 <<EOF
800This file contains any messages produced by compilers while
801running configure, to aid debugging if configure makes a mistake.
802
803It was created by $as_me, which was
804generated by GNU Autoconf 2.52.20200802.  Invocation command line was
805
806  $ $0 $@
807
808EOF
809{
810cat <<_ASUNAME
811## ---------- ##
812## Platform.  ##
813## ---------- ##
814
815hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
816uname -m = `(uname -m) 2>/dev/null || echo unknown`
817uname -r = `(uname -r) 2>/dev/null || echo unknown`
818uname -s = `(uname -s) 2>/dev/null || echo unknown`
819uname -v = `(uname -v) 2>/dev/null || echo unknown`
820
821/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
822/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
823
824/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
825/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
826/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
827hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
828/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
829/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
830/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
831
832PATH = $PATH
833
834_ASUNAME
835} >&5
836
837cat >&5 <<EOF
838## ------------ ##
839## Core tests.  ##
840## ------------ ##
841
842EOF
843
844# Keep a trace of the command line.
845# Strip out --no-create and --no-recursion so they do not pile up.
846# Also quote any args containing shell meta-characters.
847ac_configure_args=
848ac_sep=
849for ac_arg
850do
851  case $ac_arg in
852  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
853  | --no-cr | --no-c) ;;
854  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
855  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
856  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
857    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
858    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
859    ac_sep=" " ;;
860  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
861     ac_sep=" " ;;
862  esac
863  # Get rid of the leading space.
864done
865
866# When interrupted or exit'd, cleanup temporary files, and complete
867# config.log.  We remove comments because anyway the quotes in there
868# would cause problems or look ugly.
869trap 'exit_status=$?
870  # Save into config.log some information that might help in debugging.
871  echo >&5
872  echo "## ----------------- ##" >&5
873  echo "## Cache variables.  ##" >&5
874  echo "## ----------------- ##" >&5
875  echo >&5
876  # The following way of writing the cache mishandles newlines in values,
877{
878  (set) 2>&1 |
879    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
880    *ac_space=\ *)
881      sed -n \
882        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
883    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
884      ;;
885    *)
886      sed -n \
887        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
888      ;;
889    esac;
890} >&5
891  sed "/^$/d" confdefs.h >conftest.log
892  if test -s conftest.log; then
893    echo >&5
894    echo "## ------------ ##" >&5
895    echo "## confdefs.h.  ##" >&5
896    echo "## ------------ ##" >&5
897    echo >&5
898    cat conftest.log >&5
899  fi
900  (echo; echo) >&5
901  test "$ac_signal" != 0 &&
902    echo "$as_me: caught signal $ac_signal" >&5
903  echo "$as_me: exit $exit_status" >&5
904  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
905    exit $exit_status
906     ' 0
907for ac_signal in 1 2 13 15; do
908  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
909done
910ac_signal=0
911
912# confdefs.h avoids OS command line length limits that DEFS can exceed.
913rm -rf conftest* confdefs.h
914# AIX cpp loses on an empty file, so make sure it contains at least a newline.
915echo >confdefs.h
916
917# Let the site file select an alternate cache file if it wants to.
918# Prefer explicitly selected file to automatically selected ones.
919if test -z "$CONFIG_SITE"; then
920  if test "x$prefix" != xNONE; then
921    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
922  else
923    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
924  fi
925fi
926for ac_site_file in $CONFIG_SITE; do
927  if test -r "$ac_site_file"; then
928    { echo "$as_me:928: loading site script $ac_site_file" >&5
929echo "$as_me: loading site script $ac_site_file" >&6;}
930    cat "$ac_site_file" >&5
931    . "$ac_site_file"
932  fi
933done
934
935if test -r "$cache_file"; then
936  # Some versions of bash will fail to source /dev/null (special
937  # files actually), so we avoid doing that.
938  if test -f "$cache_file"; then
939    { echo "$as_me:939: loading cache $cache_file" >&5
940echo "$as_me: loading cache $cache_file" >&6;}
941    case $cache_file in
942      [\\/]* | ?:[\\/]* ) . $cache_file;;
943      *)                      . ./$cache_file;;
944    esac
945  fi
946else
947  { echo "$as_me:947: creating cache $cache_file" >&5
948echo "$as_me: creating cache $cache_file" >&6;}
949  >$cache_file
950fi
951
952# Check that the precious variables saved in the cache have kept the same
953# value.
954ac_cache_corrupted=false
955for ac_var in `(set) 2>&1 |
956               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
957  eval ac_old_set=\$ac_cv_env_${ac_var}_set
958  eval ac_new_set=\$ac_env_${ac_var}_set
959  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
960  eval ac_new_val="\$ac_env_${ac_var}_value"
961  case $ac_old_set,$ac_new_set in
962    set,)
963      { echo "$as_me:963: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
964echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
965      ac_cache_corrupted=: ;;
966    ,set)
967      { echo "$as_me:967: error: \`$ac_var' was not set in the previous run" >&5
968echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
969      ac_cache_corrupted=: ;;
970    ,);;
971    *)
972      if test "x$ac_old_val" != "x$ac_new_val"; then
973        { echo "$as_me:973: error: \`$ac_var' has changed since the previous run:" >&5
974echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
975        { echo "$as_me:975:   former value:  $ac_old_val" >&5
976echo "$as_me:   former value:  $ac_old_val" >&2;}
977        { echo "$as_me:977:   current value: $ac_new_val" >&5
978echo "$as_me:   current value: $ac_new_val" >&2;}
979        ac_cache_corrupted=:
980      fi;;
981  esac
982  # Pass precious variables to config.status.  It doesn't matter if
983  # we pass some twice (in addition to the command line arguments).
984  if test "$ac_new_set" = set; then
985    case $ac_new_val in
986    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
987      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
988      ac_configure_args="$ac_configure_args '$ac_arg'"
989      ;;
990    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
991       ;;
992    esac
993  fi
994done
995if $ac_cache_corrupted; then
996  { echo "$as_me:996: error: changes in the environment can compromise the build" >&5
997echo "$as_me: error: changes in the environment can compromise the build" >&2;}
998  { { echo "$as_me:998: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
999echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1000   { (exit 1); exit 1; }; }
1001fi
1002
1003ac_ext=c
1004ac_cpp='$CPP $CPPFLAGS'
1005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1007ac_compiler_gnu=$ac_cv_c_compiler_gnu
1008ac_main_return=return
1009
1010case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1011  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1012		   ECHO_T='	' ;;
1013  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1014  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1015esac
1016echo "#! $SHELL" >conftest.sh
1017echo  "exit 0"   >>conftest.sh
1018chmod +x conftest.sh
1019if { (echo "$as_me:1019: PATH=\".;.\"; conftest.sh") >&5
1020  (PATH=".;."; conftest.sh) 2>&5
1021  ac_status=$?
1022  echo "$as_me:1022: \$? = $ac_status" >&5
1023  (exit $ac_status); }; then
1024  ac_path_separator=';'
1025else
1026  ac_path_separator=:
1027fi
1028PATH_SEPARATOR="$ac_path_separator"
1029rm -f conftest.sh
1030
1031ac_config_headers="$ac_config_headers include/cdk_config.h:include/config.hin"
1032
1033ac_aux_dir=
1034for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1035  if test -f $ac_dir/install-sh; then
1036    ac_aux_dir=$ac_dir
1037    ac_install_sh="$ac_aux_dir/install-sh -c"
1038    break
1039  elif test -f $ac_dir/install.sh; then
1040    ac_aux_dir=$ac_dir
1041    ac_install_sh="$ac_aux_dir/install.sh -c"
1042    break
1043  elif test -f $ac_dir/shtool; then
1044    ac_aux_dir=$ac_dir
1045    ac_install_sh="$ac_aux_dir/shtool install -c"
1046    break
1047  fi
1048done
1049if test -z "$ac_aux_dir"; then
1050  { { echo "$as_me:1050: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1051echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1052   { (exit 1); exit 1; }; }
1053fi
1054ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1055ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1056ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1057
1058# Make sure we can run config.sub.
1059$ac_config_sub sun4 >/dev/null 2>&1 ||
1060  { { echo "$as_me:1060: error: cannot run $ac_config_sub" >&5
1061echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1062   { (exit 1); exit 1; }; }
1063
1064echo "$as_me:1064: checking build system type" >&5
1065echo $ECHO_N "checking build system type... $ECHO_C" >&6
1066if test "${ac_cv_build+set}" = set; then
1067  echo $ECHO_N "(cached) $ECHO_C" >&6
1068else
1069  ac_cv_build_alias=$build_alias
1070test -z "$ac_cv_build_alias" &&
1071  ac_cv_build_alias=`$ac_config_guess`
1072test -z "$ac_cv_build_alias" &&
1073  { { echo "$as_me:1073: error: cannot guess build type; you must specify one" >&5
1074echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1075   { (exit 1); exit 1; }; }
1076ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1077  { { echo "$as_me:1077: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1078echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1079   { (exit 1); exit 1; }; }
1080
1081fi
1082echo "$as_me:1082: result: $ac_cv_build" >&5
1083echo "${ECHO_T}$ac_cv_build" >&6
1084build=$ac_cv_build
1085build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1086build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1087build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1088
1089if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1090	echo "$as_me:1090: checking host system type" >&5
1091echo $ECHO_N "checking host system type... $ECHO_C" >&6
1092if test "${ac_cv_host+set}" = set; then
1093  echo $ECHO_N "(cached) $ECHO_C" >&6
1094else
1095  ac_cv_host_alias=$host_alias
1096test -z "$ac_cv_host_alias" &&
1097  ac_cv_host_alias=$ac_cv_build_alias
1098ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1099  { { echo "$as_me:1099: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1100echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1101   { (exit 1); exit 1; }; }
1102
1103fi
1104echo "$as_me:1104: result: $ac_cv_host" >&5
1105echo "${ECHO_T}$ac_cv_host" >&6
1106host=$ac_cv_host
1107host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110
1111	system_name="$host_os"
1112else
1113	system_name="`(uname -s -r) 2>/dev/null`"
1114	if test -z "$system_name" ; then
1115		system_name="`(hostname) 2>/dev/null`"
1116	fi
1117fi
1118test -n "$system_name" &&
1119cat >>confdefs.h <<EOF
1120#define SYSTEM_NAME "$system_name"
1121EOF
1122
1123if test "${cf_cv_system_name+set}" = set; then
1124  echo $ECHO_N "(cached) $ECHO_C" >&6
1125else
1126  cf_cv_system_name="$system_name"
1127fi
1128
1129test -z "$system_name" && system_name="$cf_cv_system_name"
1130test -n "$cf_cv_system_name" && echo "$as_me:1130: result: Configuring for $cf_cv_system_name" >&5
1131echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1132
1133if test ".$system_name" != ".$cf_cv_system_name" ; then
1134	echo "$as_me:1134: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1135echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1136	{ { echo "$as_me:1136: error: \"Please remove config.cache and try again.\"" >&5
1137echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1138   { (exit 1); exit 1; }; }
1139fi
1140
1141if test -f $srcdir/VERSION ; then
1142	echo "$as_me:1142: checking for package version" >&5
1143echo $ECHO_N "checking for package version... $ECHO_C" >&6
1144
1145	# if there are not enough fields, cut returns the last one...
1146	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1147	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1148	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1149
1150	# this is how CF_BUNDLED_INTL uses $VERSION:
1151	VERSION="$cf_field1"
1152
1153	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1154	test -z "$VERSION_MAJOR" && { { echo "$as_me:1154: error: missing major-version" >&5
1155echo "$as_me: error: missing major-version" >&2;}
1156   { (exit 1); exit 1; }; }
1157
1158	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1159	test -z "$VERSION_MINOR" && { { echo "$as_me:1159: error: missing minor-version" >&5
1160echo "$as_me: error: missing minor-version" >&2;}
1161   { (exit 1); exit 1; }; }
1162
1163	echo "$as_me:1163: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1164echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1165
1166	echo "$as_me:1166: checking for package patch date" >&5
1167echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1168	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1169	case .$VERSION_PATCH in
1170	(.)
1171		{ { echo "$as_me:1171: error: missing patch-date $VERSION_PATCH" >&5
1172echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1173   { (exit 1); exit 1; }; }
1174		;;
1175	(.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1176		;;
1177	(*)
1178		{ { echo "$as_me:1178: error: illegal patch-date $VERSION_PATCH" >&5
1179echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1180   { (exit 1); exit 1; }; }
1181		;;
1182	esac
1183	echo "$as_me:1183: result: $VERSION_PATCH" >&5
1184echo "${ECHO_T}$VERSION_PATCH" >&6
1185else
1186	{ { echo "$as_me:1186: error: did not find $srcdir/VERSION" >&5
1187echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1188   { (exit 1); exit 1; }; }
1189fi
1190
1191# show the actual data that we have for versions:
1192test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
1193
1194echo "${as_me:-configure}:1194: testing ABI VERSION $VERSION ..." 1>&5
1195
1196test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
1197
1198echo "${as_me:-configure}:1198: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1199
1200test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
1201
1202echo "${as_me:-configure}:1202: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1203
1204test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
1205
1206echo "${as_me:-configure}:1206: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1207
1208	cf_PACKAGE=cdk
1209	PACKAGE=cdk
1210
1211cat >>confdefs.h <<EOF
1212#define PACKAGE "$PACKAGE"
1213EOF
1214
1215cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1216
1217	cat >>confdefs.h <<EOF
1218#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1219EOF
1220
1221	cat >>confdefs.h <<EOF
1222#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1223EOF
1224
1225top_builddir=.
1226
1227ac_ext=c
1228ac_cpp='$CPP $CPPFLAGS'
1229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1231ac_compiler_gnu=$ac_cv_c_compiler_gnu
1232ac_main_return=return
1233if test -n "$ac_tool_prefix"; then
1234  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1235set dummy ${ac_tool_prefix}gcc; ac_word=$2
1236echo "$as_me:1236: checking for $ac_word" >&5
1237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238if test "${ac_cv_prog_CC+set}" = set; then
1239  echo $ECHO_N "(cached) $ECHO_C" >&6
1240else
1241  if test -n "$CC"; then
1242  ac_cv_prog_CC="$CC" # Let the user override the test.
1243else
1244  ac_save_IFS=$IFS; IFS=$ac_path_separator
1245ac_dummy="$PATH"
1246for ac_dir in $ac_dummy; do
1247  IFS=$ac_save_IFS
1248  test -z "$ac_dir" && ac_dir=.
1249  $as_executable_p "$ac_dir/$ac_word" || continue
1250ac_cv_prog_CC="${ac_tool_prefix}gcc"
1251echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252break
1253done
1254
1255fi
1256fi
1257CC=$ac_cv_prog_CC
1258if test -n "$CC"; then
1259  echo "$as_me:1259: result: $CC" >&5
1260echo "${ECHO_T}$CC" >&6
1261else
1262  echo "$as_me:1262: result: no" >&5
1263echo "${ECHO_T}no" >&6
1264fi
1265
1266fi
1267if test -z "$ac_cv_prog_CC"; then
1268  ac_ct_CC=$CC
1269  # Extract the first word of "gcc", so it can be a program name with args.
1270set dummy gcc; ac_word=$2
1271echo "$as_me:1271: checking for $ac_word" >&5
1272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1273if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1274  echo $ECHO_N "(cached) $ECHO_C" >&6
1275else
1276  if test -n "$ac_ct_CC"; then
1277  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1278else
1279  ac_save_IFS=$IFS; IFS=$ac_path_separator
1280ac_dummy="$PATH"
1281for ac_dir in $ac_dummy; do
1282  IFS=$ac_save_IFS
1283  test -z "$ac_dir" && ac_dir=.
1284  $as_executable_p "$ac_dir/$ac_word" || continue
1285ac_cv_prog_ac_ct_CC="gcc"
1286echo "$as_me:1286: found $ac_dir/$ac_word" >&5
1287break
1288done
1289
1290fi
1291fi
1292ac_ct_CC=$ac_cv_prog_ac_ct_CC
1293if test -n "$ac_ct_CC"; then
1294  echo "$as_me:1294: result: $ac_ct_CC" >&5
1295echo "${ECHO_T}$ac_ct_CC" >&6
1296else
1297  echo "$as_me:1297: result: no" >&5
1298echo "${ECHO_T}no" >&6
1299fi
1300
1301  CC=$ac_ct_CC
1302else
1303  CC="$ac_cv_prog_CC"
1304fi
1305
1306if test -z "$CC"; then
1307  if test -n "$ac_tool_prefix"; then
1308  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1309set dummy ${ac_tool_prefix}cc; ac_word=$2
1310echo "$as_me:1310: checking for $ac_word" >&5
1311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1312if test "${ac_cv_prog_CC+set}" = set; then
1313  echo $ECHO_N "(cached) $ECHO_C" >&6
1314else
1315  if test -n "$CC"; then
1316  ac_cv_prog_CC="$CC" # Let the user override the test.
1317else
1318  ac_save_IFS=$IFS; IFS=$ac_path_separator
1319ac_dummy="$PATH"
1320for ac_dir in $ac_dummy; do
1321  IFS=$ac_save_IFS
1322  test -z "$ac_dir" && ac_dir=.
1323  $as_executable_p "$ac_dir/$ac_word" || continue
1324ac_cv_prog_CC="${ac_tool_prefix}cc"
1325echo "$as_me:1325: found $ac_dir/$ac_word" >&5
1326break
1327done
1328
1329fi
1330fi
1331CC=$ac_cv_prog_CC
1332if test -n "$CC"; then
1333  echo "$as_me:1333: result: $CC" >&5
1334echo "${ECHO_T}$CC" >&6
1335else
1336  echo "$as_me:1336: result: no" >&5
1337echo "${ECHO_T}no" >&6
1338fi
1339
1340fi
1341if test -z "$ac_cv_prog_CC"; then
1342  ac_ct_CC=$CC
1343  # Extract the first word of "cc", so it can be a program name with args.
1344set dummy cc; ac_word=$2
1345echo "$as_me:1345: checking for $ac_word" >&5
1346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1347if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1348  echo $ECHO_N "(cached) $ECHO_C" >&6
1349else
1350  if test -n "$ac_ct_CC"; then
1351  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1352else
1353  ac_save_IFS=$IFS; IFS=$ac_path_separator
1354ac_dummy="$PATH"
1355for ac_dir in $ac_dummy; do
1356  IFS=$ac_save_IFS
1357  test -z "$ac_dir" && ac_dir=.
1358  $as_executable_p "$ac_dir/$ac_word" || continue
1359ac_cv_prog_ac_ct_CC="cc"
1360echo "$as_me:1360: found $ac_dir/$ac_word" >&5
1361break
1362done
1363
1364fi
1365fi
1366ac_ct_CC=$ac_cv_prog_ac_ct_CC
1367if test -n "$ac_ct_CC"; then
1368  echo "$as_me:1368: result: $ac_ct_CC" >&5
1369echo "${ECHO_T}$ac_ct_CC" >&6
1370else
1371  echo "$as_me:1371: result: no" >&5
1372echo "${ECHO_T}no" >&6
1373fi
1374
1375  CC=$ac_ct_CC
1376else
1377  CC="$ac_cv_prog_CC"
1378fi
1379
1380fi
1381if test -z "$CC"; then
1382  # Extract the first word of "cc", so it can be a program name with args.
1383set dummy cc; ac_word=$2
1384echo "$as_me:1384: checking for $ac_word" >&5
1385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1386if test "${ac_cv_prog_CC+set}" = set; then
1387  echo $ECHO_N "(cached) $ECHO_C" >&6
1388else
1389  if test -n "$CC"; then
1390  ac_cv_prog_CC="$CC" # Let the user override the test.
1391else
1392  ac_prog_rejected=no
1393  ac_save_IFS=$IFS; IFS=$ac_path_separator
1394ac_dummy="$PATH"
1395for ac_dir in $ac_dummy; do
1396  IFS=$ac_save_IFS
1397  test -z "$ac_dir" && ac_dir=.
1398  $as_executable_p "$ac_dir/$ac_word" || continue
1399if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1400  ac_prog_rejected=yes
1401  continue
1402fi
1403ac_cv_prog_CC="cc"
1404echo "$as_me:1404: found $ac_dir/$ac_word" >&5
1405break
1406done
1407
1408if test $ac_prog_rejected = yes; then
1409  # We found a bogon in the path, so make sure we never use it.
1410  set dummy $ac_cv_prog_CC
1411  shift
1412  if test $# != 0; then
1413    # We chose a different compiler from the bogus one.
1414    # However, it has the same basename, so the bogon will be chosen
1415    # first if we set CC to just the basename; use the full file name.
1416    shift
1417    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1418    shift
1419    ac_cv_prog_CC="$@"
1420  fi
1421fi
1422fi
1423fi
1424CC=$ac_cv_prog_CC
1425if test -n "$CC"; then
1426  echo "$as_me:1426: result: $CC" >&5
1427echo "${ECHO_T}$CC" >&6
1428else
1429  echo "$as_me:1429: result: no" >&5
1430echo "${ECHO_T}no" >&6
1431fi
1432
1433fi
1434if test -z "$CC"; then
1435  if test -n "$ac_tool_prefix"; then
1436  for ac_prog in cl
1437  do
1438    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1440echo "$as_me:1440: checking for $ac_word" >&5
1441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1442if test "${ac_cv_prog_CC+set}" = set; then
1443  echo $ECHO_N "(cached) $ECHO_C" >&6
1444else
1445  if test -n "$CC"; then
1446  ac_cv_prog_CC="$CC" # Let the user override the test.
1447else
1448  ac_save_IFS=$IFS; IFS=$ac_path_separator
1449ac_dummy="$PATH"
1450for ac_dir in $ac_dummy; do
1451  IFS=$ac_save_IFS
1452  test -z "$ac_dir" && ac_dir=.
1453  $as_executable_p "$ac_dir/$ac_word" || continue
1454ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1455echo "$as_me:1455: found $ac_dir/$ac_word" >&5
1456break
1457done
1458
1459fi
1460fi
1461CC=$ac_cv_prog_CC
1462if test -n "$CC"; then
1463  echo "$as_me:1463: result: $CC" >&5
1464echo "${ECHO_T}$CC" >&6
1465else
1466  echo "$as_me:1466: result: no" >&5
1467echo "${ECHO_T}no" >&6
1468fi
1469
1470    test -n "$CC" && break
1471  done
1472fi
1473if test -z "$CC"; then
1474  ac_ct_CC=$CC
1475  for ac_prog in cl
1476do
1477  # Extract the first word of "$ac_prog", so it can be a program name with args.
1478set dummy $ac_prog; ac_word=$2
1479echo "$as_me:1479: checking for $ac_word" >&5
1480echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1481if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1482  echo $ECHO_N "(cached) $ECHO_C" >&6
1483else
1484  if test -n "$ac_ct_CC"; then
1485  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1486else
1487  ac_save_IFS=$IFS; IFS=$ac_path_separator
1488ac_dummy="$PATH"
1489for ac_dir in $ac_dummy; do
1490  IFS=$ac_save_IFS
1491  test -z "$ac_dir" && ac_dir=.
1492  $as_executable_p "$ac_dir/$ac_word" || continue
1493ac_cv_prog_ac_ct_CC="$ac_prog"
1494echo "$as_me:1494: found $ac_dir/$ac_word" >&5
1495break
1496done
1497
1498fi
1499fi
1500ac_ct_CC=$ac_cv_prog_ac_ct_CC
1501if test -n "$ac_ct_CC"; then
1502  echo "$as_me:1502: result: $ac_ct_CC" >&5
1503echo "${ECHO_T}$ac_ct_CC" >&6
1504else
1505  echo "$as_me:1505: result: no" >&5
1506echo "${ECHO_T}no" >&6
1507fi
1508
1509  test -n "$ac_ct_CC" && break
1510done
1511
1512  CC=$ac_ct_CC
1513fi
1514
1515fi
1516
1517test -z "$CC" && { { echo "$as_me:1517: error: no acceptable cc found in \$PATH" >&5
1518echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1519   { (exit 1); exit 1; }; }
1520
1521# Provide some information about the compiler.
1522echo "$as_me:1522:" \
1523     "checking for C compiler version" >&5
1524ac_compiler=`set X $ac_compile; echo $2`
1525{ (eval echo "$as_me:1525: \"$ac_compiler --version </dev/null >&5\"") >&5
1526  (eval $ac_compiler --version </dev/null >&5) 2>&5
1527  ac_status=$?
1528  echo "$as_me:1528: \$? = $ac_status" >&5
1529  (exit $ac_status); }
1530{ (eval echo "$as_me:1530: \"$ac_compiler -v </dev/null >&5\"") >&5
1531  (eval $ac_compiler -v </dev/null >&5) 2>&5
1532  ac_status=$?
1533  echo "$as_me:1533: \$? = $ac_status" >&5
1534  (exit $ac_status); }
1535{ (eval echo "$as_me:1535: \"$ac_compiler -V </dev/null >&5\"") >&5
1536  (eval $ac_compiler -V </dev/null >&5) 2>&5
1537  ac_status=$?
1538  echo "$as_me:1538: \$? = $ac_status" >&5
1539  (exit $ac_status); }
1540
1541cat >conftest.$ac_ext <<_ACEOF
1542#line 1542 "configure"
1543#include "confdefs.h"
1544
1545int
1546main (void)
1547{
1548
1549  ;
1550  return 0;
1551}
1552_ACEOF
1553ac_clean_files_save=$ac_clean_files
1554ac_clean_files="$ac_clean_files a.out a.exe"
1555# Try to create an executable without -o first, disregard a.out.
1556# It will help us diagnose broken compilers, and finding out an intuition
1557# of exeext.
1558echo "$as_me:1558: checking for C compiler default output" >&5
1559echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1560ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1561if { (eval echo "$as_me:1561: \"$ac_link_default\"") >&5
1562  (eval $ac_link_default) 2>&5
1563  ac_status=$?
1564  echo "$as_me:1564: \$? = $ac_status" >&5
1565  (exit $ac_status); }; then
1566  # Find the output, starting from the most likely.  This scheme is
1567# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1568# resort.
1569for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1570                ls a.out conftest 2>/dev/null;
1571                ls a.* conftest.* 2>/dev/null`; do
1572  case $ac_file in
1573    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1574    a.out ) # We found the default executable, but exeext='' is most
1575            # certainly right.
1576            break;;
1577    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1578          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1579          export ac_cv_exeext
1580          break;;
1581    * ) break;;
1582  esac
1583done
1584else
1585  echo "$as_me: failed program was:" >&5
1586cat conftest.$ac_ext >&5
1587{ { echo "$as_me:1587: error: C compiler cannot create executables" >&5
1588echo "$as_me: error: C compiler cannot create executables" >&2;}
1589   { (exit 77); exit 77; }; }
1590fi
1591
1592ac_exeext=$ac_cv_exeext
1593echo "$as_me:1593: result: $ac_file" >&5
1594echo "${ECHO_T}$ac_file" >&6
1595
1596# Check the compiler produces executables we can run.  If not, either
1597# the compiler is broken, or we cross compile.
1598echo "$as_me:1598: checking whether the C compiler works" >&5
1599echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1600# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1601# If not cross compiling, check that we can run a simple program.
1602if test "$cross_compiling" != yes; then
1603  if { ac_try='./$ac_file'
1604  { (eval echo "$as_me:1604: \"$ac_try\"") >&5
1605  (eval $ac_try) 2>&5
1606  ac_status=$?
1607  echo "$as_me:1607: \$? = $ac_status" >&5
1608  (exit $ac_status); }; }; then
1609    cross_compiling=no
1610  else
1611    if test "$cross_compiling" = maybe; then
1612	cross_compiling=yes
1613    else
1614	{ { echo "$as_me:1614: error: cannot run C compiled programs.
1615If you meant to cross compile, use \`--host'." >&5
1616echo "$as_me: error: cannot run C compiled programs.
1617If you meant to cross compile, use \`--host'." >&2;}
1618   { (exit 1); exit 1; }; }
1619    fi
1620  fi
1621fi
1622echo "$as_me:1622: result: yes" >&5
1623echo "${ECHO_T}yes" >&6
1624
1625rm -f a.out a.exe conftest$ac_cv_exeext
1626ac_clean_files=$ac_clean_files_save
1627# Check the compiler produces executables we can run.  If not, either
1628# the compiler is broken, or we cross compile.
1629echo "$as_me:1629: checking whether we are cross compiling" >&5
1630echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1631echo "$as_me:1631: result: $cross_compiling" >&5
1632echo "${ECHO_T}$cross_compiling" >&6
1633
1634echo "$as_me:1634: checking for executable suffix" >&5
1635echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1636if { (eval echo "$as_me:1636: \"$ac_link\"") >&5
1637  (eval $ac_link) 2>&5
1638  ac_status=$?
1639  echo "$as_me:1639: \$? = $ac_status" >&5
1640  (exit $ac_status); }; then
1641  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1642# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1643# work properly (i.e., refer to `conftest.exe'), while it won't with
1644# `rm'.
1645for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1646  case $ac_file in
1647    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1648    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1649          export ac_cv_exeext
1650          break;;
1651    * ) break;;
1652  esac
1653done
1654else
1655  { { echo "$as_me:1655: error: cannot compute EXEEXT: cannot compile and link" >&5
1656echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1657   { (exit 1); exit 1; }; }
1658fi
1659
1660rm -f conftest$ac_cv_exeext
1661echo "$as_me:1661: result: $ac_cv_exeext" >&5
1662echo "${ECHO_T}$ac_cv_exeext" >&6
1663
1664rm -f conftest.$ac_ext
1665EXEEXT=$ac_cv_exeext
1666ac_exeext=$EXEEXT
1667echo "$as_me:1667: checking for object suffix" >&5
1668echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1669if test "${ac_cv_objext+set}" = set; then
1670  echo $ECHO_N "(cached) $ECHO_C" >&6
1671else
1672  cat >conftest.$ac_ext <<_ACEOF
1673#line 1673 "configure"
1674#include "confdefs.h"
1675
1676int
1677main (void)
1678{
1679
1680  ;
1681  return 0;
1682}
1683_ACEOF
1684rm -f conftest.o conftest.obj
1685if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686  (eval $ac_compile) 2>&5
1687  ac_status=$?
1688  echo "$as_me:1688: \$? = $ac_status" >&5
1689  (exit $ac_status); }; then
1690  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1691  case $ac_file in
1692    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1693    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1694       break;;
1695  esac
1696done
1697else
1698  echo "$as_me: failed program was:" >&5
1699cat conftest.$ac_ext >&5
1700{ { echo "$as_me:1700: error: cannot compute OBJEXT: cannot compile" >&5
1701echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1702   { (exit 1); exit 1; }; }
1703fi
1704
1705rm -f conftest.$ac_cv_objext conftest.$ac_ext
1706fi
1707echo "$as_me:1707: result: $ac_cv_objext" >&5
1708echo "${ECHO_T}$ac_cv_objext" >&6
1709OBJEXT=$ac_cv_objext
1710ac_objext=$OBJEXT
1711echo "$as_me:1711: checking whether we are using the GNU C compiler" >&5
1712echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1713if test "${ac_cv_c_compiler_gnu+set}" = set; then
1714  echo $ECHO_N "(cached) $ECHO_C" >&6
1715else
1716  cat >conftest.$ac_ext <<_ACEOF
1717#line 1717 "configure"
1718#include "confdefs.h"
1719
1720int
1721main (void)
1722{
1723#ifndef __GNUC__
1724       choke me
1725#endif
1726
1727  ;
1728  return 0;
1729}
1730_ACEOF
1731rm -f conftest.$ac_objext
1732if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
1733  (eval $ac_compile) 2>&5
1734  ac_status=$?
1735  echo "$as_me:1735: \$? = $ac_status" >&5
1736  (exit $ac_status); } &&
1737         { ac_try='test -s conftest.$ac_objext'
1738  { (eval echo "$as_me:1738: \"$ac_try\"") >&5
1739  (eval $ac_try) 2>&5
1740  ac_status=$?
1741  echo "$as_me:1741: \$? = $ac_status" >&5
1742  (exit $ac_status); }; }; then
1743  ac_compiler_gnu=yes
1744else
1745  echo "$as_me: failed program was:" >&5
1746cat conftest.$ac_ext >&5
1747ac_compiler_gnu=no
1748fi
1749rm -f conftest.$ac_objext conftest.$ac_ext
1750ac_cv_c_compiler_gnu=$ac_compiler_gnu
1751
1752fi
1753echo "$as_me:1753: result: $ac_cv_c_compiler_gnu" >&5
1754echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1755GCC=`test $ac_compiler_gnu = yes && echo yes`
1756ac_test_CFLAGS=${CFLAGS+set}
1757ac_save_CFLAGS=$CFLAGS
1758CFLAGS="-g"
1759echo "$as_me:1759: checking whether $CC accepts -g" >&5
1760echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1761if test "${ac_cv_prog_cc_g+set}" = set; then
1762  echo $ECHO_N "(cached) $ECHO_C" >&6
1763else
1764  cat >conftest.$ac_ext <<_ACEOF
1765#line 1765 "configure"
1766#include "confdefs.h"
1767
1768int
1769main (void)
1770{
1771
1772  ;
1773  return 0;
1774}
1775_ACEOF
1776rm -f conftest.$ac_objext
1777if { (eval echo "$as_me:1777: \"$ac_compile\"") >&5
1778  (eval $ac_compile) 2>&5
1779  ac_status=$?
1780  echo "$as_me:1780: \$? = $ac_status" >&5
1781  (exit $ac_status); } &&
1782         { ac_try='test -s conftest.$ac_objext'
1783  { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784  (eval $ac_try) 2>&5
1785  ac_status=$?
1786  echo "$as_me:1786: \$? = $ac_status" >&5
1787  (exit $ac_status); }; }; then
1788  ac_cv_prog_cc_g=yes
1789else
1790  echo "$as_me: failed program was:" >&5
1791cat conftest.$ac_ext >&5
1792ac_cv_prog_cc_g=no
1793fi
1794rm -f conftest.$ac_objext conftest.$ac_ext
1795fi
1796echo "$as_me:1796: result: $ac_cv_prog_cc_g" >&5
1797echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1798if test "$ac_test_CFLAGS" = set; then
1799  CFLAGS=$ac_save_CFLAGS
1800elif test $ac_cv_prog_cc_g = yes; then
1801  if test "$GCC" = yes; then
1802    CFLAGS="-g -O2"
1803  else
1804    CFLAGS="-g"
1805  fi
1806else
1807  if test "$GCC" = yes; then
1808    CFLAGS="-O2"
1809  else
1810    CFLAGS=
1811  fi
1812fi
1813# Some people use a C++ compiler to compile C.  Since we use `exit',
1814# in C++ we need to declare it.  In case someone uses the same compiler
1815# for both compiling C and C++ we need to have the C++ compiler decide
1816# the declaration of exit, since it's the most demanding environment.
1817cat >conftest.$ac_ext <<_ACEOF
1818#ifndef __cplusplus
1819  choke me
1820#endif
1821_ACEOF
1822rm -f conftest.$ac_objext
1823if { (eval echo "$as_me:1823: \"$ac_compile\"") >&5
1824  (eval $ac_compile) 2>&5
1825  ac_status=$?
1826  echo "$as_me:1826: \$? = $ac_status" >&5
1827  (exit $ac_status); } &&
1828         { ac_try='test -s conftest.$ac_objext'
1829  { (eval echo "$as_me:1829: \"$ac_try\"") >&5
1830  (eval $ac_try) 2>&5
1831  ac_status=$?
1832  echo "$as_me:1832: \$? = $ac_status" >&5
1833  (exit $ac_status); }; }; then
1834  for ac_declaration in \
1835   ''\
1836   '#include <stdlib.h>' \
1837   'extern "C" void std::exit (int) throw (); using std::exit;' \
1838   'extern "C" void std::exit (int); using std::exit;' \
1839   'extern "C" void exit (int) throw ();' \
1840   'extern "C" void exit (int);' \
1841   'void exit (int);'
1842do
1843  cat >conftest.$ac_ext <<_ACEOF
1844#line 1844 "configure"
1845#include "confdefs.h"
1846#include <stdlib.h>
1847$ac_declaration
1848int
1849main (void)
1850{
1851exit (42);
1852  ;
1853  return 0;
1854}
1855_ACEOF
1856rm -f conftest.$ac_objext
1857if { (eval echo "$as_me:1857: \"$ac_compile\"") >&5
1858  (eval $ac_compile) 2>&5
1859  ac_status=$?
1860  echo "$as_me:1860: \$? = $ac_status" >&5
1861  (exit $ac_status); } &&
1862         { ac_try='test -s conftest.$ac_objext'
1863  { (eval echo "$as_me:1863: \"$ac_try\"") >&5
1864  (eval $ac_try) 2>&5
1865  ac_status=$?
1866  echo "$as_me:1866: \$? = $ac_status" >&5
1867  (exit $ac_status); }; }; then
1868  :
1869else
1870  echo "$as_me: failed program was:" >&5
1871cat conftest.$ac_ext >&5
1872continue
1873fi
1874rm -f conftest.$ac_objext conftest.$ac_ext
1875  cat >conftest.$ac_ext <<_ACEOF
1876#line 1876 "configure"
1877#include "confdefs.h"
1878$ac_declaration
1879int
1880main (void)
1881{
1882exit (42);
1883  ;
1884  return 0;
1885}
1886_ACEOF
1887rm -f conftest.$ac_objext
1888if { (eval echo "$as_me:1888: \"$ac_compile\"") >&5
1889  (eval $ac_compile) 2>&5
1890  ac_status=$?
1891  echo "$as_me:1891: \$? = $ac_status" >&5
1892  (exit $ac_status); } &&
1893         { ac_try='test -s conftest.$ac_objext'
1894  { (eval echo "$as_me:1894: \"$ac_try\"") >&5
1895  (eval $ac_try) 2>&5
1896  ac_status=$?
1897  echo "$as_me:1897: \$? = $ac_status" >&5
1898  (exit $ac_status); }; }; then
1899  break
1900else
1901  echo "$as_me: failed program was:" >&5
1902cat conftest.$ac_ext >&5
1903fi
1904rm -f conftest.$ac_objext conftest.$ac_ext
1905done
1906rm -rf conftest*
1907if test -n "$ac_declaration"; then
1908  echo '#ifdef __cplusplus' >>confdefs.h
1909  echo $ac_declaration      >>confdefs.h
1910  echo '#endif'             >>confdefs.h
1911fi
1912
1913else
1914  echo "$as_me: failed program was:" >&5
1915cat conftest.$ac_ext >&5
1916fi
1917rm -f conftest.$ac_objext conftest.$ac_ext
1918ac_ext=c
1919ac_cpp='$CPP $CPPFLAGS'
1920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1922ac_compiler_gnu=$ac_cv_c_compiler_gnu
1923ac_main_return=return
1924
1925GCC_VERSION=none
1926if test "$GCC" = yes ; then
1927	echo "$as_me:1927: checking version of $CC" >&5
1928echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1929	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1930	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1931	echo "$as_me:1931: result: $GCC_VERSION" >&5
1932echo "${ECHO_T}$GCC_VERSION" >&6
1933fi
1934
1935INTEL_COMPILER=no
1936
1937if test "$GCC" = yes ; then
1938	case $host_os in
1939	(linux*|gnu*)
1940		echo "$as_me:1940: checking if this is really Intel C compiler" >&5
1941echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1942		cf_save_CFLAGS="$CFLAGS"
1943		CFLAGS="$CFLAGS -no-gcc"
1944		cat >conftest.$ac_ext <<_ACEOF
1945#line 1945 "configure"
1946#include "confdefs.h"
1947
1948int
1949main (void)
1950{
1951
1952#ifdef __INTEL_COMPILER
1953#else
1954make an error
1955#endif
1956
1957  ;
1958  return 0;
1959}
1960_ACEOF
1961rm -f conftest.$ac_objext
1962if { (eval echo "$as_me:1962: \"$ac_compile\"") >&5
1963  (eval $ac_compile) 2>&5
1964  ac_status=$?
1965  echo "$as_me:1965: \$? = $ac_status" >&5
1966  (exit $ac_status); } &&
1967         { ac_try='test -s conftest.$ac_objext'
1968  { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969  (eval $ac_try) 2>&5
1970  ac_status=$?
1971  echo "$as_me:1971: \$? = $ac_status" >&5
1972  (exit $ac_status); }; }; then
1973  INTEL_COMPILER=yes
1974cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1975
1976else
1977  echo "$as_me: failed program was:" >&5
1978cat conftest.$ac_ext >&5
1979fi
1980rm -f conftest.$ac_objext conftest.$ac_ext
1981		CFLAGS="$cf_save_CFLAGS"
1982		echo "$as_me:1982: result: $INTEL_COMPILER" >&5
1983echo "${ECHO_T}$INTEL_COMPILER" >&6
1984		;;
1985	esac
1986fi
1987
1988CLANG_COMPILER=no
1989
1990if test "$GCC" = yes ; then
1991	echo "$as_me:1991: checking if this is really Clang C compiler" >&5
1992echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1993	cf_save_CFLAGS="$CFLAGS"
1994	CFLAGS="$CFLAGS -Qunused-arguments"
1995	cat >conftest.$ac_ext <<_ACEOF
1996#line 1996 "configure"
1997#include "confdefs.h"
1998
1999int
2000main (void)
2001{
2002
2003#ifdef __clang__
2004#else
2005make an error
2006#endif
2007
2008  ;
2009  return 0;
2010}
2011_ACEOF
2012rm -f conftest.$ac_objext
2013if { (eval echo "$as_me:2013: \"$ac_compile\"") >&5
2014  (eval $ac_compile) 2>&5
2015  ac_status=$?
2016  echo "$as_me:2016: \$? = $ac_status" >&5
2017  (exit $ac_status); } &&
2018         { ac_try='test -s conftest.$ac_objext'
2019  { (eval echo "$as_me:2019: \"$ac_try\"") >&5
2020  (eval $ac_try) 2>&5
2021  ac_status=$?
2022  echo "$as_me:2022: \$? = $ac_status" >&5
2023  (exit $ac_status); }; }; then
2024  CLANG_COMPILER=yes
2025cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2026
2027else
2028  echo "$as_me: failed program was:" >&5
2029cat conftest.$ac_ext >&5
2030fi
2031rm -f conftest.$ac_objext conftest.$ac_ext
2032	CFLAGS="$cf_save_CFLAGS"
2033	echo "$as_me:2033: result: $CLANG_COMPILER" >&5
2034echo "${ECHO_T}$CLANG_COMPILER" >&6
2035fi
2036
2037if test "x$CLANG_COMPILER" = "xyes" ; then
2038
2039	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2040	CFLAGS="${CFLAGS}-Wno-error=implicit-function-declaration"
2041
2042fi
2043
2044echo "$as_me:2044: checking for $CC option to accept ANSI C" >&5
2045echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2046if test "${ac_cv_prog_cc_stdc+set}" = set; then
2047  echo $ECHO_N "(cached) $ECHO_C" >&6
2048else
2049  ac_cv_prog_cc_stdc=no
2050ac_save_CC=$CC
2051cat >conftest.$ac_ext <<_ACEOF
2052#line 2052 "configure"
2053#include "confdefs.h"
2054#include <stdarg.h>
2055#include <stdio.h>
2056#include <sys/types.h>
2057#include <sys/stat.h>
2058/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2059struct buf { int x; };
2060FILE * (*rcsopen) (struct buf *, struct stat *, int);
2061static char *e (p, i)
2062     char **p;
2063     int i;
2064{
2065  return p[i];
2066}
2067static char *f (char * (*g) (char **, int), char **p, ...)
2068{
2069  char *s;
2070  va_list v;
2071  va_start (v,p);
2072  s = g (p, va_arg (v,int));
2073  va_end (v);
2074  return s;
2075}
2076int test (int i, double x);
2077struct s1 {int (*f) (int a);};
2078struct s2 {int (*f) (double a);};
2079int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2080int argc;
2081char **argv;
2082int
2083main (void)
2084{
2085return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2086  ;
2087  return 0;
2088}
2089_ACEOF
2090# Don't try gcc -ansi; that turns off useful extensions and
2091# breaks some systems' header files.
2092# AIX			-qlanglvl=ansi
2093# Ultrix and OSF/1	-std1
2094# HP-UX 10.20 and later	-Ae
2095# HP-UX older versions	-Aa -D_HPUX_SOURCE
2096# SVR4			-Xc -D__EXTENSIONS__
2097for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2098do
2099  CC="$ac_save_CC $ac_arg"
2100  rm -f conftest.$ac_objext
2101if { (eval echo "$as_me:2101: \"$ac_compile\"") >&5
2102  (eval $ac_compile) 2>&5
2103  ac_status=$?
2104  echo "$as_me:2104: \$? = $ac_status" >&5
2105  (exit $ac_status); } &&
2106         { ac_try='test -s conftest.$ac_objext'
2107  { (eval echo "$as_me:2107: \"$ac_try\"") >&5
2108  (eval $ac_try) 2>&5
2109  ac_status=$?
2110  echo "$as_me:2110: \$? = $ac_status" >&5
2111  (exit $ac_status); }; }; then
2112  ac_cv_prog_cc_stdc=$ac_arg
2113break
2114else
2115  echo "$as_me: failed program was:" >&5
2116cat conftest.$ac_ext >&5
2117fi
2118rm -f conftest.$ac_objext
2119done
2120rm -f conftest.$ac_ext conftest.$ac_objext
2121CC=$ac_save_CC
2122
2123fi
2124
2125case "x$ac_cv_prog_cc_stdc" in
2126  x|xno)
2127    echo "$as_me:2127: result: none needed" >&5
2128echo "${ECHO_T}none needed" >&6 ;;
2129  *)
2130    echo "$as_me:2130: result: $ac_cv_prog_cc_stdc" >&5
2131echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2132    CC="$CC $ac_cv_prog_cc_stdc" ;;
2133esac
2134
2135# This should have been defined by AC_PROG_CC
2136: ${CC:=cc}
2137
2138echo "$as_me:2138: checking \$CFLAGS variable" >&5
2139echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2140case "x$CFLAGS" in
2141(*-[IUD]*)
2142	echo "$as_me:2142: result: broken" >&5
2143echo "${ECHO_T}broken" >&6
2144	{ echo "$as_me:2144: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2145echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2146	cf_flags="$CFLAGS"
2147	CFLAGS=
2148	for cf_arg in $cf_flags
2149	do
2150
2151cf_fix_cppflags=no
2152cf_new_cflags=
2153cf_new_cppflags=
2154cf_new_extra_cppflags=
2155
2156for cf_add_cflags in $cf_arg
2157do
2158case $cf_fix_cppflags in
2159(no)
2160	case $cf_add_cflags in
2161	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2162		case $cf_add_cflags in
2163		(-D*)
2164			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2165
2166			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2167				&& test -z "${cf_tst_cflags}" \
2168				&& cf_fix_cppflags=yes
2169
2170			if test $cf_fix_cppflags = yes ; then
2171
2172	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2173	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2174
2175				continue
2176			elif test "${cf_tst_cflags}" = "\"'" ; then
2177
2178	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2179	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2180
2181				continue
2182			fi
2183			;;
2184		esac
2185		case "$CPPFLAGS" in
2186		(*$cf_add_cflags)
2187			;;
2188		(*)
2189			case $cf_add_cflags in
2190			(-D*)
2191				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2192
2193CPPFLAGS=`echo "$CPPFLAGS" | \
2194	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2195		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2196
2197				;;
2198			esac
2199
2200	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2201	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2202
2203			;;
2204		esac
2205		;;
2206	(*)
2207
2208	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2209	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2210
2211		;;
2212	esac
2213	;;
2214(yes)
2215
2216	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2217	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2218
2219	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2220
2221	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2222		&& test -z "${cf_tst_cflags}" \
2223		&& cf_fix_cppflags=no
2224	;;
2225esac
2226done
2227
2228if test -n "$cf_new_cflags" ; then
2229
2230	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2231	CFLAGS="${CFLAGS}$cf_new_cflags"
2232
2233fi
2234
2235if test -n "$cf_new_cppflags" ; then
2236
2237	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2238	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2239
2240fi
2241
2242if test -n "$cf_new_extra_cppflags" ; then
2243
2244	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2245	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2246
2247fi
2248
2249	done
2250	;;
2251(*)
2252	echo "$as_me:2252: result: ok" >&5
2253echo "${ECHO_T}ok" >&6
2254	;;
2255esac
2256
2257echo "$as_me:2257: checking \$CC variable" >&5
2258echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2259case "$CC" in
2260(*[\ \	]-*)
2261	echo "$as_me:2261: result: broken" >&5
2262echo "${ECHO_T}broken" >&6
2263	{ echo "$as_me:2263: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2264echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2265	# humor him...
2266	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2267	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2268	CC="$cf_prog"
2269	for cf_arg in $cf_flags
2270	do
2271		case "x$cf_arg" in
2272		(x-[IUDfgOW]*)
2273
2274cf_fix_cppflags=no
2275cf_new_cflags=
2276cf_new_cppflags=
2277cf_new_extra_cppflags=
2278
2279for cf_add_cflags in $cf_arg
2280do
2281case $cf_fix_cppflags in
2282(no)
2283	case $cf_add_cflags in
2284	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2285		case $cf_add_cflags in
2286		(-D*)
2287			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2288
2289			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2290				&& test -z "${cf_tst_cflags}" \
2291				&& cf_fix_cppflags=yes
2292
2293			if test $cf_fix_cppflags = yes ; then
2294
2295	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2296	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2297
2298				continue
2299			elif test "${cf_tst_cflags}" = "\"'" ; then
2300
2301	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2302	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2303
2304				continue
2305			fi
2306			;;
2307		esac
2308		case "$CPPFLAGS" in
2309		(*$cf_add_cflags)
2310			;;
2311		(*)
2312			case $cf_add_cflags in
2313			(-D*)
2314				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2315
2316CPPFLAGS=`echo "$CPPFLAGS" | \
2317	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2318		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2319
2320				;;
2321			esac
2322
2323	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2324	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2325
2326			;;
2327		esac
2328		;;
2329	(*)
2330
2331	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2332	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2333
2334		;;
2335	esac
2336	;;
2337(yes)
2338
2339	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2340	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2341
2342	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2343
2344	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345		&& test -z "${cf_tst_cflags}" \
2346		&& cf_fix_cppflags=no
2347	;;
2348esac
2349done
2350
2351if test -n "$cf_new_cflags" ; then
2352
2353	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2354	CFLAGS="${CFLAGS}$cf_new_cflags"
2355
2356fi
2357
2358if test -n "$cf_new_cppflags" ; then
2359
2360	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2361	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2362
2363fi
2364
2365if test -n "$cf_new_extra_cppflags" ; then
2366
2367	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2368	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2369
2370fi
2371
2372			;;
2373		(*)
2374			CC="$CC $cf_arg"
2375			;;
2376		esac
2377	done
2378	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2379
2380echo "${as_me:-configure}:2380: testing resulting CC: '$CC' ..." 1>&5
2381
2382	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2383
2384echo "${as_me:-configure}:2384: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2385
2386	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2387
2388echo "${as_me:-configure}:2388: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2389
2390	;;
2391(*)
2392	echo "$as_me:2392: result: ok" >&5
2393echo "${ECHO_T}ok" >&6
2394	;;
2395esac
2396
2397ac_ext=c
2398ac_cpp='$CPP $CPPFLAGS'
2399ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402ac_main_return=return
2403echo "$as_me:2403: checking how to run the C preprocessor" >&5
2404echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2405# On Suns, sometimes $CPP names a directory.
2406if test -n "$CPP" && test -d "$CPP"; then
2407  CPP=
2408fi
2409if test -z "$CPP"; then
2410  if test "${ac_cv_prog_CPP+set}" = set; then
2411  echo $ECHO_N "(cached) $ECHO_C" >&6
2412else
2413      # Double quotes because CPP needs to be expanded
2414    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2415    do
2416      ac_preproc_ok=false
2417for ac_c_preproc_warn_flag in '' yes
2418do
2419  # Use a header file that comes with gcc, so configuring glibc
2420  # with a fresh cross-compiler works.
2421  # On the NeXT, cc -E runs the code through the compiler's parser,
2422  # not just through cpp. "Syntax error" is here to catch this case.
2423  cat >conftest.$ac_ext <<_ACEOF
2424#line 2424 "configure"
2425#include "confdefs.h"
2426#include <assert.h>
2427                     Syntax error
2428_ACEOF
2429if { (eval echo "$as_me:2429: \"$ac_cpp conftest.$ac_ext\"") >&5
2430  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2431  ac_status=$?
2432  egrep -v '^ *\+' conftest.er1 >conftest.err
2433  rm -f conftest.er1
2434  cat conftest.err >&5
2435  echo "$as_me:2435: \$? = $ac_status" >&5
2436  (exit $ac_status); } >/dev/null; then
2437  if test -s conftest.err; then
2438    ac_cpp_err=$ac_c_preproc_warn_flag
2439  else
2440    ac_cpp_err=
2441  fi
2442else
2443  ac_cpp_err=yes
2444fi
2445if test -z "$ac_cpp_err"; then
2446  :
2447else
2448  echo "$as_me: failed program was:" >&5
2449  cat conftest.$ac_ext >&5
2450  # Broken: fails on valid input.
2451continue
2452fi
2453rm -f conftest.err conftest.$ac_ext
2454
2455  # OK, works on sane cases.  Now check whether non-existent headers
2456  # can be detected and how.
2457  cat >conftest.$ac_ext <<_ACEOF
2458#line 2458 "configure"
2459#include "confdefs.h"
2460#include <ac_nonexistent.h>
2461_ACEOF
2462if { (eval echo "$as_me:2462: \"$ac_cpp conftest.$ac_ext\"") >&5
2463  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2464  ac_status=$?
2465  egrep -v '^ *\+' conftest.er1 >conftest.err
2466  rm -f conftest.er1
2467  cat conftest.err >&5
2468  echo "$as_me:2468: \$? = $ac_status" >&5
2469  (exit $ac_status); } >/dev/null; then
2470  if test -s conftest.err; then
2471    ac_cpp_err=$ac_c_preproc_warn_flag
2472  else
2473    ac_cpp_err=
2474  fi
2475else
2476  ac_cpp_err=yes
2477fi
2478if test -z "$ac_cpp_err"; then
2479  # Broken: success on invalid input.
2480continue
2481else
2482  echo "$as_me: failed program was:" >&5
2483  cat conftest.$ac_ext >&5
2484  # Passes both tests.
2485ac_preproc_ok=:
2486break
2487fi
2488rm -f conftest.err conftest.$ac_ext
2489
2490done
2491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2492rm -f conftest.err conftest.$ac_ext
2493if $ac_preproc_ok; then
2494  break
2495fi
2496
2497    done
2498    ac_cv_prog_CPP=$CPP
2499
2500fi
2501  CPP=$ac_cv_prog_CPP
2502else
2503  ac_cv_prog_CPP=$CPP
2504fi
2505echo "$as_me:2505: result: $CPP" >&5
2506echo "${ECHO_T}$CPP" >&6
2507ac_preproc_ok=false
2508for ac_c_preproc_warn_flag in '' yes
2509do
2510  # Use a header file that comes with gcc, so configuring glibc
2511  # with a fresh cross-compiler works.
2512  # On the NeXT, cc -E runs the code through the compiler's parser,
2513  # not just through cpp. "Syntax error" is here to catch this case.
2514  cat >conftest.$ac_ext <<_ACEOF
2515#line 2515 "configure"
2516#include "confdefs.h"
2517#include <assert.h>
2518                     Syntax error
2519_ACEOF
2520if { (eval echo "$as_me:2520: \"$ac_cpp conftest.$ac_ext\"") >&5
2521  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2522  ac_status=$?
2523  egrep -v '^ *\+' conftest.er1 >conftest.err
2524  rm -f conftest.er1
2525  cat conftest.err >&5
2526  echo "$as_me:2526: \$? = $ac_status" >&5
2527  (exit $ac_status); } >/dev/null; then
2528  if test -s conftest.err; then
2529    ac_cpp_err=$ac_c_preproc_warn_flag
2530  else
2531    ac_cpp_err=
2532  fi
2533else
2534  ac_cpp_err=yes
2535fi
2536if test -z "$ac_cpp_err"; then
2537  :
2538else
2539  echo "$as_me: failed program was:" >&5
2540  cat conftest.$ac_ext >&5
2541  # Broken: fails on valid input.
2542continue
2543fi
2544rm -f conftest.err conftest.$ac_ext
2545
2546  # OK, works on sane cases.  Now check whether non-existent headers
2547  # can be detected and how.
2548  cat >conftest.$ac_ext <<_ACEOF
2549#line 2549 "configure"
2550#include "confdefs.h"
2551#include <ac_nonexistent.h>
2552_ACEOF
2553if { (eval echo "$as_me:2553: \"$ac_cpp conftest.$ac_ext\"") >&5
2554  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2555  ac_status=$?
2556  egrep -v '^ *\+' conftest.er1 >conftest.err
2557  rm -f conftest.er1
2558  cat conftest.err >&5
2559  echo "$as_me:2559: \$? = $ac_status" >&5
2560  (exit $ac_status); } >/dev/null; then
2561  if test -s conftest.err; then
2562    ac_cpp_err=$ac_c_preproc_warn_flag
2563  else
2564    ac_cpp_err=
2565  fi
2566else
2567  ac_cpp_err=yes
2568fi
2569if test -z "$ac_cpp_err"; then
2570  # Broken: success on invalid input.
2571continue
2572else
2573  echo "$as_me: failed program was:" >&5
2574  cat conftest.$ac_ext >&5
2575  # Passes both tests.
2576ac_preproc_ok=:
2577break
2578fi
2579rm -f conftest.err conftest.$ac_ext
2580
2581done
2582# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2583rm -f conftest.err conftest.$ac_ext
2584if $ac_preproc_ok; then
2585  :
2586else
2587  { { echo "$as_me:2587: error: C preprocessor \"$CPP\" fails sanity check" >&5
2588echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2589   { (exit 1); exit 1; }; }
2590fi
2591
2592ac_ext=c
2593ac_cpp='$CPP $CPPFLAGS'
2594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2596ac_compiler_gnu=$ac_cv_c_compiler_gnu
2597ac_main_return=return
2598
2599if test -n "$ac_tool_prefix"; then
2600  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2601set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2602echo "$as_me:2602: checking for $ac_word" >&5
2603echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2604if test "${ac_cv_prog_RANLIB+set}" = set; then
2605  echo $ECHO_N "(cached) $ECHO_C" >&6
2606else
2607  if test -n "$RANLIB"; then
2608  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2609else
2610  ac_save_IFS=$IFS; IFS=$ac_path_separator
2611ac_dummy="$PATH"
2612for ac_dir in $ac_dummy; do
2613  IFS=$ac_save_IFS
2614  test -z "$ac_dir" && ac_dir=.
2615  $as_executable_p "$ac_dir/$ac_word" || continue
2616ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2617echo "$as_me:2617: found $ac_dir/$ac_word" >&5
2618break
2619done
2620
2621fi
2622fi
2623RANLIB=$ac_cv_prog_RANLIB
2624if test -n "$RANLIB"; then
2625  echo "$as_me:2625: result: $RANLIB" >&5
2626echo "${ECHO_T}$RANLIB" >&6
2627else
2628  echo "$as_me:2628: result: no" >&5
2629echo "${ECHO_T}no" >&6
2630fi
2631
2632fi
2633if test -z "$ac_cv_prog_RANLIB"; then
2634  ac_ct_RANLIB=$RANLIB
2635  # Extract the first word of "ranlib", so it can be a program name with args.
2636set dummy ranlib; ac_word=$2
2637echo "$as_me:2637: checking for $ac_word" >&5
2638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2639if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2640  echo $ECHO_N "(cached) $ECHO_C" >&6
2641else
2642  if test -n "$ac_ct_RANLIB"; then
2643  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2644else
2645  ac_save_IFS=$IFS; IFS=$ac_path_separator
2646ac_dummy="$PATH"
2647for ac_dir in $ac_dummy; do
2648  IFS=$ac_save_IFS
2649  test -z "$ac_dir" && ac_dir=.
2650  $as_executable_p "$ac_dir/$ac_word" || continue
2651ac_cv_prog_ac_ct_RANLIB="ranlib"
2652echo "$as_me:2652: found $ac_dir/$ac_word" >&5
2653break
2654done
2655
2656  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2657fi
2658fi
2659ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2660if test -n "$ac_ct_RANLIB"; then
2661  echo "$as_me:2661: result: $ac_ct_RANLIB" >&5
2662echo "${ECHO_T}$ac_ct_RANLIB" >&6
2663else
2664  echo "$as_me:2664: result: no" >&5
2665echo "${ECHO_T}no" >&6
2666fi
2667
2668  RANLIB=$ac_ct_RANLIB
2669else
2670  RANLIB="$ac_cv_prog_RANLIB"
2671fi
2672
2673# Find a good install program.  We prefer a C program (faster),
2674# so one script is as good as another.  But avoid the broken or
2675# incompatible versions:
2676# SysV /etc/install, /usr/sbin/install
2677# SunOS /usr/etc/install
2678# IRIX /sbin/install
2679# AIX /bin/install
2680# AmigaOS /C/install, which installs bootblocks on floppy discs
2681# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2682# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2683# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2684# ./install, which can be erroneously created by make from ./install.sh.
2685echo "$as_me:2685: checking for a BSD compatible install" >&5
2686echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2687if test -z "$INSTALL"; then
2688if test "${ac_cv_path_install+set}" = set; then
2689  echo $ECHO_N "(cached) $ECHO_C" >&6
2690else
2691    ac_save_IFS=$IFS; IFS=$ac_path_separator
2692  for ac_dir in $PATH; do
2693    IFS=$ac_save_IFS
2694    # Account for people who put trailing slashes in PATH elements.
2695    case $ac_dir/ in
2696    / | ./ | .// | /cC/* \
2697    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2698    | /usr/ucb/* ) ;;
2699    *)
2700      # OSF1 and SCO ODT 3.0 have their own names for install.
2701      # Don't use installbsd from OSF since it installs stuff as root
2702      # by default.
2703      for ac_prog in ginstall scoinst install; do
2704        if $as_executable_p "$ac_dir/$ac_prog"; then
2705	  if test $ac_prog = install &&
2706            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2707	    # AIX install.  It has an incompatible calling convention.
2708	    :
2709	  elif test $ac_prog = install &&
2710	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2711	    # program-specific install script used by HP pwplus--don't use.
2712	    :
2713	  else
2714	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2715	    break 2
2716	  fi
2717	fi
2718      done
2719      ;;
2720    esac
2721  done
2722
2723fi
2724  if test "${ac_cv_path_install+set}" = set; then
2725    INSTALL=$ac_cv_path_install
2726  else
2727    # As a last resort, use the slow shell script.  We don't cache a
2728    # path for INSTALL within a source directory, because that will
2729    # break other packages using the cache if that directory is
2730    # removed, or if the path is relative.
2731    INSTALL=$ac_install_sh
2732  fi
2733fi
2734echo "$as_me:2734: result: $INSTALL" >&5
2735echo "${ECHO_T}$INSTALL" >&6
2736
2737# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2738# It thinks the first close brace ends the variable substitution.
2739test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2740
2741test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2742
2743test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2744
2745echo "$as_me:2745: checking whether ln -s works" >&5
2746echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2747LN_S=$as_ln_s
2748if test "$LN_S" = "ln -s"; then
2749  echo "$as_me:2749: result: yes" >&5
2750echo "${ECHO_T}yes" >&6
2751else
2752  echo "$as_me:2752: result: no, using $LN_S" >&5
2753echo "${ECHO_T}no, using $LN_S" >&6
2754fi
2755
2756echo "$as_me:2756: checking if $LN_S -f options work" >&5
2757echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2758
2759rm -f conf$$.src conf$$dst
2760echo >conf$$.dst
2761echo first >conf$$.src
2762if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2763	cf_prog_ln_sf=yes
2764else
2765	cf_prog_ln_sf=no
2766fi
2767rm -f conf$$.dst conf$$src
2768echo "$as_me:2768: result: $cf_prog_ln_sf" >&5
2769echo "${ECHO_T}$cf_prog_ln_sf" >&6
2770
2771test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2772
2773for ac_prog in lint cppcheck splint
2774do
2775  # Extract the first word of "$ac_prog", so it can be a program name with args.
2776set dummy $ac_prog; ac_word=$2
2777echo "$as_me:2777: checking for $ac_word" >&5
2778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2779if test "${ac_cv_prog_LINT+set}" = set; then
2780  echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782  if test -n "$LINT"; then
2783  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2784else
2785  ac_save_IFS=$IFS; IFS=$ac_path_separator
2786ac_dummy="$PATH"
2787for ac_dir in $ac_dummy; do
2788  IFS=$ac_save_IFS
2789  test -z "$ac_dir" && ac_dir=.
2790  $as_executable_p "$ac_dir/$ac_word" || continue
2791ac_cv_prog_LINT="$ac_prog"
2792echo "$as_me:2792: found $ac_dir/$ac_word" >&5
2793break
2794done
2795
2796fi
2797fi
2798LINT=$ac_cv_prog_LINT
2799if test -n "$LINT"; then
2800  echo "$as_me:2800: result: $LINT" >&5
2801echo "${ECHO_T}$LINT" >&6
2802else
2803  echo "$as_me:2803: result: no" >&5
2804echo "${ECHO_T}no" >&6
2805fi
2806
2807  test -n "$LINT" && break
2808done
2809
2810case "x$LINT" in
2811(xcppcheck|x*/cppcheck)
2812	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2813	;;
2814esac
2815
2816if test -n "$ac_tool_prefix"; then
2817  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2818set dummy ${ac_tool_prefix}ar; ac_word=$2
2819echo "$as_me:2819: checking for $ac_word" >&5
2820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2821if test "${ac_cv_prog_AR+set}" = set; then
2822  echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824  if test -n "$AR"; then
2825  ac_cv_prog_AR="$AR" # Let the user override the test.
2826else
2827  ac_save_IFS=$IFS; IFS=$ac_path_separator
2828ac_dummy="$PATH"
2829for ac_dir in $ac_dummy; do
2830  IFS=$ac_save_IFS
2831  test -z "$ac_dir" && ac_dir=.
2832  $as_executable_p "$ac_dir/$ac_word" || continue
2833ac_cv_prog_AR="${ac_tool_prefix}ar"
2834echo "$as_me:2834: found $ac_dir/$ac_word" >&5
2835break
2836done
2837
2838fi
2839fi
2840AR=$ac_cv_prog_AR
2841if test -n "$AR"; then
2842  echo "$as_me:2842: result: $AR" >&5
2843echo "${ECHO_T}$AR" >&6
2844else
2845  echo "$as_me:2845: result: no" >&5
2846echo "${ECHO_T}no" >&6
2847fi
2848
2849fi
2850if test -z "$ac_cv_prog_AR"; then
2851  ac_ct_AR=$AR
2852  # Extract the first word of "ar", so it can be a program name with args.
2853set dummy ar; ac_word=$2
2854echo "$as_me:2854: checking for $ac_word" >&5
2855echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2856if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2857  echo $ECHO_N "(cached) $ECHO_C" >&6
2858else
2859  if test -n "$ac_ct_AR"; then
2860  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2861else
2862  ac_save_IFS=$IFS; IFS=$ac_path_separator
2863ac_dummy="$PATH"
2864for ac_dir in $ac_dummy; do
2865  IFS=$ac_save_IFS
2866  test -z "$ac_dir" && ac_dir=.
2867  $as_executable_p "$ac_dir/$ac_word" || continue
2868ac_cv_prog_ac_ct_AR="ar"
2869echo "$as_me:2869: found $ac_dir/$ac_word" >&5
2870break
2871done
2872
2873  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2874fi
2875fi
2876ac_ct_AR=$ac_cv_prog_ac_ct_AR
2877if test -n "$ac_ct_AR"; then
2878  echo "$as_me:2878: result: $ac_ct_AR" >&5
2879echo "${ECHO_T}$ac_ct_AR" >&6
2880else
2881  echo "$as_me:2881: result: no" >&5
2882echo "${ECHO_T}no" >&6
2883fi
2884
2885  AR=$ac_ct_AR
2886else
2887  AR="$ac_cv_prog_AR"
2888fi
2889
2890echo "$as_me:2890: checking whether ${MAKE-make} sets \${MAKE}" >&5
2891echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2892set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2893if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2894  echo $ECHO_N "(cached) $ECHO_C" >&6
2895else
2896  cat >conftest.make <<\EOF
2897all:
2898	@echo 'ac_maketemp="${MAKE}"'
2899EOF
2900# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2901eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2902if test -n "$ac_maketemp"; then
2903  eval ac_cv_prog_make_${ac_make}_set=yes
2904else
2905  eval ac_cv_prog_make_${ac_make}_set=no
2906fi
2907rm -f conftest.make
2908fi
2909if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2910  echo "$as_me:2910: result: yes" >&5
2911echo "${ECHO_T}yes" >&6
2912  SET_MAKE=
2913else
2914  echo "$as_me:2914: result: no" >&5
2915echo "${ECHO_T}no" >&6
2916  SET_MAKE="MAKE=${MAKE-make}"
2917fi
2918
2919echo "$as_me:2919: checking for makeflags variable" >&5
2920echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2921if test "${cf_cv_makeflags+set}" = set; then
2922  echo $ECHO_N "(cached) $ECHO_C" >&6
2923else
2924
2925	cf_cv_makeflags=''
2926	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2927	do
2928		cat >cf_makeflags.tmp <<CF_EOF
2929SHELL = $SHELL
2930all :
2931	@ echo '.$cf_option'
2932CF_EOF
2933		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
2934		case "$cf_result" in
2935		(.*k|.*kw)
2936			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2937			case "$cf_result" in
2938			(.*CC=*)	cf_cv_makeflags=
2939				;;
2940			(*)	cf_cv_makeflags=$cf_option
2941				;;
2942			esac
2943			break
2944			;;
2945		(.-)
2946			;;
2947		(*)
2948
2949echo "${as_me:-configure}:2949: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
2950
2951			;;
2952		esac
2953	done
2954	rm -f cf_makeflags.tmp
2955
2956fi
2957echo "$as_me:2957: result: $cf_cv_makeflags" >&5
2958echo "${ECHO_T}$cf_cv_makeflags" >&6
2959
2960echo "$as_me:2960: checking for \".PHONY\" make-support" >&5
2961echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
2962if test "${cf_cv_make_PHONY+set}" = set; then
2963  echo $ECHO_N "(cached) $ECHO_C" >&6
2964else
2965
2966	rm -rf conftest*
2967	(
2968		mkdir conftest || exit 1
2969		cd conftest
2970		cat >makefile <<'CF_EOF'
2971.PHONY: always
2972DATA=0
2973always:	always.out
2974	@echo "** making $@ $(DATA)"
2975once: once.out
2976	@echo "** making $@ $(DATA)"
2977always.out:
2978	@echo "** making $@ $(DATA)"
2979	echo $(DATA) > $@
2980once.out:
2981	@echo "** making $@ $(DATA)"
2982	echo $(DATA) > $@
2983CF_EOF
2984		for cf_data in 1 2 3
2985		do
2986			${MAKE:-make} always DATA=$cf_data
2987			${MAKE:-make} once   DATA=$cf_data
2988			${MAKE:-make} -t always once
2989			if test -f always ; then
2990				echo "no (case 1)" > ../conftest.tmp
2991			elif test ! -f always.out ; then
2992				echo "no (case 2)" > ../conftest.tmp
2993			elif test ! -f once.out ; then
2994				echo "no (case 3)" > ../conftest.tmp
2995			elif ! cmp -s always.out once.out ; then
2996				echo "no (case 4)" > ../conftest.tmp
2997				diff always.out once.out
2998			else
2999				cf_check=`cat always.out`
3000				if test "x$cf_check" != "x$cf_data" ; then
3001					echo "no (case 5)" > ../conftest.tmp
3002				else
3003					echo yes > ../conftest.tmp
3004					rm -f *.out
3005					continue
3006				fi
3007			fi
3008			break
3009		done
3010	) >&5 2>&1
3011	cf_cv_make_PHONY=`cat conftest.tmp`
3012	rm -rf conftest*
3013
3014fi
3015echo "$as_me:3015: result: $cf_cv_make_PHONY" >&5
3016echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3017MAKE_NO_PHONY="#"
3018MAKE_PHONY="#"
3019test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3020test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3021
3022echo "$as_me:3022: checking if filesystem supports mixed-case filenames" >&5
3023echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3024if test "${cf_cv_mixedcase+set}" = set; then
3025  echo $ECHO_N "(cached) $ECHO_C" >&6
3026else
3027
3028if test "$cross_compiling" = yes ; then
3029	case $target_alias in
3030	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3031		cf_cv_mixedcase=no
3032		;;
3033	(*)
3034		cf_cv_mixedcase=yes
3035		;;
3036	esac
3037else
3038	rm -f conftest CONFTEST
3039	echo test >conftest
3040	if test -f CONFTEST ; then
3041		cf_cv_mixedcase=no
3042	else
3043		cf_cv_mixedcase=yes
3044	fi
3045	rm -f conftest CONFTEST
3046fi
3047
3048fi
3049echo "$as_me:3049: result: $cf_cv_mixedcase" >&5
3050echo "${ECHO_T}$cf_cv_mixedcase" >&6
3051test "$cf_cv_mixedcase" = yes &&
3052cat >>confdefs.h <<\EOF
3053#define MIXEDCASE_FILENAMES 1
3054EOF
3055
3056for ac_prog in exctags ctags
3057do
3058  # Extract the first word of "$ac_prog", so it can be a program name with args.
3059set dummy $ac_prog; ac_word=$2
3060echo "$as_me:3060: checking for $ac_word" >&5
3061echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3062if test "${ac_cv_prog_CTAGS+set}" = set; then
3063  echo $ECHO_N "(cached) $ECHO_C" >&6
3064else
3065  if test -n "$CTAGS"; then
3066  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3067else
3068  ac_save_IFS=$IFS; IFS=$ac_path_separator
3069ac_dummy="$PATH"
3070for ac_dir in $ac_dummy; do
3071  IFS=$ac_save_IFS
3072  test -z "$ac_dir" && ac_dir=.
3073  $as_executable_p "$ac_dir/$ac_word" || continue
3074ac_cv_prog_CTAGS="$ac_prog"
3075echo "$as_me:3075: found $ac_dir/$ac_word" >&5
3076break
3077done
3078
3079fi
3080fi
3081CTAGS=$ac_cv_prog_CTAGS
3082if test -n "$CTAGS"; then
3083  echo "$as_me:3083: result: $CTAGS" >&5
3084echo "${ECHO_T}$CTAGS" >&6
3085else
3086  echo "$as_me:3086: result: no" >&5
3087echo "${ECHO_T}no" >&6
3088fi
3089
3090  test -n "$CTAGS" && break
3091done
3092
3093for ac_prog in exetags etags
3094do
3095  # Extract the first word of "$ac_prog", so it can be a program name with args.
3096set dummy $ac_prog; ac_word=$2
3097echo "$as_me:3097: checking for $ac_word" >&5
3098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3099if test "${ac_cv_prog_ETAGS+set}" = set; then
3100  echo $ECHO_N "(cached) $ECHO_C" >&6
3101else
3102  if test -n "$ETAGS"; then
3103  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3104else
3105  ac_save_IFS=$IFS; IFS=$ac_path_separator
3106ac_dummy="$PATH"
3107for ac_dir in $ac_dummy; do
3108  IFS=$ac_save_IFS
3109  test -z "$ac_dir" && ac_dir=.
3110  $as_executable_p "$ac_dir/$ac_word" || continue
3111ac_cv_prog_ETAGS="$ac_prog"
3112echo "$as_me:3112: found $ac_dir/$ac_word" >&5
3113break
3114done
3115
3116fi
3117fi
3118ETAGS=$ac_cv_prog_ETAGS
3119if test -n "$ETAGS"; then
3120  echo "$as_me:3120: result: $ETAGS" >&5
3121echo "${ECHO_T}$ETAGS" >&6
3122else
3123  echo "$as_me:3123: result: no" >&5
3124echo "${ECHO_T}no" >&6
3125fi
3126
3127  test -n "$ETAGS" && break
3128done
3129
3130# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3131set dummy ${CTAGS:-ctags}; ac_word=$2
3132echo "$as_me:3132: checking for $ac_word" >&5
3133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3134if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3135  echo $ECHO_N "(cached) $ECHO_C" >&6
3136else
3137  if test -n "$MAKE_LOWER_TAGS"; then
3138  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3139else
3140  ac_save_IFS=$IFS; IFS=$ac_path_separator
3141ac_dummy="$PATH"
3142for ac_dir in $ac_dummy; do
3143  IFS=$ac_save_IFS
3144  test -z "$ac_dir" && ac_dir=.
3145  $as_executable_p "$ac_dir/$ac_word" || continue
3146ac_cv_prog_MAKE_LOWER_TAGS="yes"
3147echo "$as_me:3147: found $ac_dir/$ac_word" >&5
3148break
3149done
3150
3151  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3152fi
3153fi
3154MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3155if test -n "$MAKE_LOWER_TAGS"; then
3156  echo "$as_me:3156: result: $MAKE_LOWER_TAGS" >&5
3157echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3158else
3159  echo "$as_me:3159: result: no" >&5
3160echo "${ECHO_T}no" >&6
3161fi
3162
3163if test "$cf_cv_mixedcase" = yes ; then
3164	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3165set dummy ${ETAGS:-etags}; ac_word=$2
3166echo "$as_me:3166: checking for $ac_word" >&5
3167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3169  echo $ECHO_N "(cached) $ECHO_C" >&6
3170else
3171  if test -n "$MAKE_UPPER_TAGS"; then
3172  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3173else
3174  ac_save_IFS=$IFS; IFS=$ac_path_separator
3175ac_dummy="$PATH"
3176for ac_dir in $ac_dummy; do
3177  IFS=$ac_save_IFS
3178  test -z "$ac_dir" && ac_dir=.
3179  $as_executable_p "$ac_dir/$ac_word" || continue
3180ac_cv_prog_MAKE_UPPER_TAGS="yes"
3181echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182break
3183done
3184
3185  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3186fi
3187fi
3188MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3189if test -n "$MAKE_UPPER_TAGS"; then
3190  echo "$as_me:3190: result: $MAKE_UPPER_TAGS" >&5
3191echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3192else
3193  echo "$as_me:3193: result: no" >&5
3194echo "${ECHO_T}no" >&6
3195fi
3196
3197else
3198	MAKE_UPPER_TAGS=no
3199fi
3200
3201if test "$MAKE_UPPER_TAGS" = yes ; then
3202	MAKE_UPPER_TAGS=
3203else
3204	MAKE_UPPER_TAGS="#"
3205fi
3206
3207if test "$MAKE_LOWER_TAGS" = yes ; then
3208	MAKE_LOWER_TAGS=
3209else
3210	MAKE_LOWER_TAGS="#"
3211fi
3212
3213echo "$as_me:3213: checking if the POSIX test-macros are already defined" >&5
3214echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3215if test "${cf_cv_posix_visible+set}" = set; then
3216  echo $ECHO_N "(cached) $ECHO_C" >&6
3217else
3218
3219cat >conftest.$ac_ext <<_ACEOF
3220#line 3220 "configure"
3221#include "confdefs.h"
3222#include <stdio.h>
3223int
3224main (void)
3225{
3226
3227#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3228	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3229	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3230	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3231#error conflicting symbols found
3232#endif
3233
3234  ;
3235  return 0;
3236}
3237_ACEOF
3238rm -f conftest.$ac_objext
3239if { (eval echo "$as_me:3239: \"$ac_compile\"") >&5
3240  (eval $ac_compile) 2>&5
3241  ac_status=$?
3242  echo "$as_me:3242: \$? = $ac_status" >&5
3243  (exit $ac_status); } &&
3244         { ac_try='test -s conftest.$ac_objext'
3245  { (eval echo "$as_me:3245: \"$ac_try\"") >&5
3246  (eval $ac_try) 2>&5
3247  ac_status=$?
3248  echo "$as_me:3248: \$? = $ac_status" >&5
3249  (exit $ac_status); }; }; then
3250  cf_cv_posix_visible=no
3251else
3252  echo "$as_me: failed program was:" >&5
3253cat conftest.$ac_ext >&5
3254cf_cv_posix_visible=yes
3255fi
3256rm -f conftest.$ac_objext conftest.$ac_ext
3257
3258fi
3259echo "$as_me:3259: result: $cf_cv_posix_visible" >&5
3260echo "${ECHO_T}$cf_cv_posix_visible" >&6
3261
3262if test "$cf_cv_posix_visible" = no; then
3263
3264cf_XOPEN_SOURCE=500
3265cf_POSIX_C_SOURCE=199506L
3266cf_xopen_source=
3267
3268case $host_os in
3269(aix[4-7]*)
3270	cf_xopen_source="-D_ALL_SOURCE"
3271	;;
3272(msys)
3273	cf_XOPEN_SOURCE=600
3274	;;
3275(darwin[0-8].*)
3276	cf_xopen_source="-D_APPLE_C_SOURCE"
3277	;;
3278(darwin*)
3279	cf_xopen_source="-D_DARWIN_C_SOURCE"
3280	cf_XOPEN_SOURCE=
3281	;;
3282(freebsd*|dragonfly*|midnightbsd*)
3283	# 5.x headers associate
3284	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3285	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3286	cf_POSIX_C_SOURCE=200112L
3287	cf_XOPEN_SOURCE=600
3288	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3289	;;
3290(hpux11*)
3291	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3292	;;
3293(hpux*)
3294	cf_xopen_source="-D_HPUX_SOURCE"
3295	;;
3296(irix[56].*)
3297	cf_xopen_source="-D_SGI_SOURCE"
3298	cf_XOPEN_SOURCE=
3299	;;
3300(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3301
3302cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3303
3304echo "$as_me:3304: checking if this is the GNU C library" >&5
3305echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3306if test "${cf_cv_gnu_library+set}" = set; then
3307  echo $ECHO_N "(cached) $ECHO_C" >&6
3308else
3309
3310cat >conftest.$ac_ext <<_ACEOF
3311#line 3311 "configure"
3312#include "confdefs.h"
3313#include <sys/types.h>
3314int
3315main (void)
3316{
3317
3318	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3319		return 0;
3320	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3321		return 0;
3322	#else
3323	#	error not GNU C library
3324	#endif
3325  ;
3326  return 0;
3327}
3328_ACEOF
3329rm -f conftest.$ac_objext
3330if { (eval echo "$as_me:3330: \"$ac_compile\"") >&5
3331  (eval $ac_compile) 2>&5
3332  ac_status=$?
3333  echo "$as_me:3333: \$? = $ac_status" >&5
3334  (exit $ac_status); } &&
3335         { ac_try='test -s conftest.$ac_objext'
3336  { (eval echo "$as_me:3336: \"$ac_try\"") >&5
3337  (eval $ac_try) 2>&5
3338  ac_status=$?
3339  echo "$as_me:3339: \$? = $ac_status" >&5
3340  (exit $ac_status); }; }; then
3341  cf_cv_gnu_library=yes
3342else
3343  echo "$as_me: failed program was:" >&5
3344cat conftest.$ac_ext >&5
3345cf_cv_gnu_library=no
3346fi
3347rm -f conftest.$ac_objext conftest.$ac_ext
3348
3349fi
3350echo "$as_me:3350: result: $cf_cv_gnu_library" >&5
3351echo "${ECHO_T}$cf_cv_gnu_library" >&6
3352
3353if test x$cf_cv_gnu_library = xyes; then
3354
3355	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3356	# was changed to help a little.  newlib incorporated the change about 4
3357	# years later.
3358	echo "$as_me:3358: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3359echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3360if test "${cf_cv_gnu_library_219+set}" = set; then
3361  echo $ECHO_N "(cached) $ECHO_C" >&6
3362else
3363
3364		cf_save="$CPPFLAGS"
3365
3366	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3367	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3368
3369		cat >conftest.$ac_ext <<_ACEOF
3370#line 3370 "configure"
3371#include "confdefs.h"
3372#include <sys/types.h>
3373int
3374main (void)
3375{
3376
3377			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3378				return 0;
3379			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3380				return 0;
3381			#else
3382			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3383			#endif
3384  ;
3385  return 0;
3386}
3387_ACEOF
3388rm -f conftest.$ac_objext
3389if { (eval echo "$as_me:3389: \"$ac_compile\"") >&5
3390  (eval $ac_compile) 2>&5
3391  ac_status=$?
3392  echo "$as_me:3392: \$? = $ac_status" >&5
3393  (exit $ac_status); } &&
3394         { ac_try='test -s conftest.$ac_objext'
3395  { (eval echo "$as_me:3395: \"$ac_try\"") >&5
3396  (eval $ac_try) 2>&5
3397  ac_status=$?
3398  echo "$as_me:3398: \$? = $ac_status" >&5
3399  (exit $ac_status); }; }; then
3400  cf_cv_gnu_library_219=yes
3401else
3402  echo "$as_me: failed program was:" >&5
3403cat conftest.$ac_ext >&5
3404cf_cv_gnu_library_219=no
3405fi
3406rm -f conftest.$ac_objext conftest.$ac_ext
3407		CPPFLAGS="$cf_save"
3408
3409fi
3410echo "$as_me:3410: result: $cf_cv_gnu_library_219" >&5
3411echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3412
3413	if test "x$cf_cv_gnu_library_219" = xyes; then
3414		cf_save="$CPPFLAGS"
3415		echo "$as_me:3415: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3416echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3417if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3418  echo $ECHO_N "(cached) $ECHO_C" >&6
3419else
3420
3421cf_fix_cppflags=no
3422cf_new_cflags=
3423cf_new_cppflags=
3424cf_new_extra_cppflags=
3425
3426for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3427do
3428case $cf_fix_cppflags in
3429(no)
3430	case $cf_add_cflags in
3431	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3432		case $cf_add_cflags in
3433		(-D*)
3434			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3435
3436			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3437				&& test -z "${cf_tst_cflags}" \
3438				&& cf_fix_cppflags=yes
3439
3440			if test $cf_fix_cppflags = yes ; then
3441
3442	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3443	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3444
3445				continue
3446			elif test "${cf_tst_cflags}" = "\"'" ; then
3447
3448	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3449	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3450
3451				continue
3452			fi
3453			;;
3454		esac
3455		case "$CPPFLAGS" in
3456		(*$cf_add_cflags)
3457			;;
3458		(*)
3459			case $cf_add_cflags in
3460			(-D*)
3461				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3462
3463CPPFLAGS=`echo "$CPPFLAGS" | \
3464	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3465		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3466
3467				;;
3468			esac
3469
3470	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3471	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3472
3473			;;
3474		esac
3475		;;
3476	(*)
3477
3478	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3479	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3480
3481		;;
3482	esac
3483	;;
3484(yes)
3485
3486	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3487	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3488
3489	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3490
3491	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3492		&& test -z "${cf_tst_cflags}" \
3493		&& cf_fix_cppflags=no
3494	;;
3495esac
3496done
3497
3498if test -n "$cf_new_cflags" ; then
3499
3500	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3501	CFLAGS="${CFLAGS}$cf_new_cflags"
3502
3503fi
3504
3505if test -n "$cf_new_cppflags" ; then
3506
3507	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3508	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3509
3510fi
3511
3512if test -n "$cf_new_extra_cppflags" ; then
3513
3514	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3515	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3516
3517fi
3518
3519			cat >conftest.$ac_ext <<_ACEOF
3520#line 3520 "configure"
3521#include "confdefs.h"
3522
3523				#include <limits.h>
3524				#include <sys/types.h>
3525
3526int
3527main (void)
3528{
3529
3530				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3531					return 0;
3532				#else
3533				#	error GNU C library is too old
3534				#endif
3535  ;
3536  return 0;
3537}
3538_ACEOF
3539rm -f conftest.$ac_objext
3540if { (eval echo "$as_me:3540: \"$ac_compile\"") >&5
3541  (eval $ac_compile) 2>&5
3542  ac_status=$?
3543  echo "$as_me:3543: \$? = $ac_status" >&5
3544  (exit $ac_status); } &&
3545         { ac_try='test -s conftest.$ac_objext'
3546  { (eval echo "$as_me:3546: \"$ac_try\"") >&5
3547  (eval $ac_try) 2>&5
3548  ac_status=$?
3549  echo "$as_me:3549: \$? = $ac_status" >&5
3550  (exit $ac_status); }; }; then
3551  cf_cv_gnu_dftsrc_219=yes
3552else
3553  echo "$as_me: failed program was:" >&5
3554cat conftest.$ac_ext >&5
3555cf_cv_gnu_dftsrc_219=no
3556fi
3557rm -f conftest.$ac_objext conftest.$ac_ext
3558
3559fi
3560echo "$as_me:3560: result: $cf_cv_gnu_dftsrc_219" >&5
3561echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3562		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3563	else
3564		cf_cv_gnu_dftsrc_219=maybe
3565	fi
3566
3567	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3568
3569		echo "$as_me:3569: checking if we must define _GNU_SOURCE" >&5
3570echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3571if test "${cf_cv_gnu_source+set}" = set; then
3572  echo $ECHO_N "(cached) $ECHO_C" >&6
3573else
3574
3575		cat >conftest.$ac_ext <<_ACEOF
3576#line 3576 "configure"
3577#include "confdefs.h"
3578#include <sys/types.h>
3579int
3580main (void)
3581{
3582
3583			#ifndef _XOPEN_SOURCE
3584			#error	expected _XOPEN_SOURCE to be defined
3585			#endif
3586  ;
3587  return 0;
3588}
3589_ACEOF
3590rm -f conftest.$ac_objext
3591if { (eval echo "$as_me:3591: \"$ac_compile\"") >&5
3592  (eval $ac_compile) 2>&5
3593  ac_status=$?
3594  echo "$as_me:3594: \$? = $ac_status" >&5
3595  (exit $ac_status); } &&
3596         { ac_try='test -s conftest.$ac_objext'
3597  { (eval echo "$as_me:3597: \"$ac_try\"") >&5
3598  (eval $ac_try) 2>&5
3599  ac_status=$?
3600  echo "$as_me:3600: \$? = $ac_status" >&5
3601  (exit $ac_status); }; }; then
3602  cf_cv_gnu_source=no
3603else
3604  echo "$as_me: failed program was:" >&5
3605cat conftest.$ac_ext >&5
3606cf_save="$CPPFLAGS"
3607
3608cf_fix_cppflags=no
3609cf_new_cflags=
3610cf_new_cppflags=
3611cf_new_extra_cppflags=
3612
3613for cf_add_cflags in -D_GNU_SOURCE
3614do
3615case $cf_fix_cppflags in
3616(no)
3617	case $cf_add_cflags in
3618	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3619		case $cf_add_cflags in
3620		(-D*)
3621			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3622
3623			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3624				&& test -z "${cf_tst_cflags}" \
3625				&& cf_fix_cppflags=yes
3626
3627			if test $cf_fix_cppflags = yes ; then
3628
3629	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3630	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3631
3632				continue
3633			elif test "${cf_tst_cflags}" = "\"'" ; then
3634
3635	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3636	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3637
3638				continue
3639			fi
3640			;;
3641		esac
3642		case "$CPPFLAGS" in
3643		(*$cf_add_cflags)
3644			;;
3645		(*)
3646			case $cf_add_cflags in
3647			(-D*)
3648				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3649
3650CPPFLAGS=`echo "$CPPFLAGS" | \
3651	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3652		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3653
3654				;;
3655			esac
3656
3657	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3658	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3659
3660			;;
3661		esac
3662		;;
3663	(*)
3664
3665	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3666	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3667
3668		;;
3669	esac
3670	;;
3671(yes)
3672
3673	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3674	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3675
3676	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3677
3678	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3679		&& test -z "${cf_tst_cflags}" \
3680		&& cf_fix_cppflags=no
3681	;;
3682esac
3683done
3684
3685if test -n "$cf_new_cflags" ; then
3686
3687	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3688	CFLAGS="${CFLAGS}$cf_new_cflags"
3689
3690fi
3691
3692if test -n "$cf_new_cppflags" ; then
3693
3694	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3695	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3696
3697fi
3698
3699if test -n "$cf_new_extra_cppflags" ; then
3700
3701	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3702	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3703
3704fi
3705
3706			 cat >conftest.$ac_ext <<_ACEOF
3707#line 3707 "configure"
3708#include "confdefs.h"
3709#include <sys/types.h>
3710int
3711main (void)
3712{
3713
3714				#ifdef _XOPEN_SOURCE
3715				#error	expected _XOPEN_SOURCE to be undefined
3716				#endif
3717  ;
3718  return 0;
3719}
3720_ACEOF
3721rm -f conftest.$ac_objext
3722if { (eval echo "$as_me:3722: \"$ac_compile\"") >&5
3723  (eval $ac_compile) 2>&5
3724  ac_status=$?
3725  echo "$as_me:3725: \$? = $ac_status" >&5
3726  (exit $ac_status); } &&
3727         { ac_try='test -s conftest.$ac_objext'
3728  { (eval echo "$as_me:3728: \"$ac_try\"") >&5
3729  (eval $ac_try) 2>&5
3730  ac_status=$?
3731  echo "$as_me:3731: \$? = $ac_status" >&5
3732  (exit $ac_status); }; }; then
3733  cf_cv_gnu_source=no
3734else
3735  echo "$as_me: failed program was:" >&5
3736cat conftest.$ac_ext >&5
3737cf_cv_gnu_source=yes
3738fi
3739rm -f conftest.$ac_objext conftest.$ac_ext
3740			CPPFLAGS="$cf_save"
3741
3742fi
3743rm -f conftest.$ac_objext conftest.$ac_ext
3744
3745fi
3746echo "$as_me:3746: result: $cf_cv_gnu_source" >&5
3747echo "${ECHO_T}$cf_cv_gnu_source" >&6
3748
3749		if test "$cf_cv_gnu_source" = yes
3750		then
3751		echo "$as_me:3751: checking if we should also define _DEFAULT_SOURCE" >&5
3752echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3753if test "${cf_cv_default_source+set}" = set; then
3754  echo $ECHO_N "(cached) $ECHO_C" >&6
3755else
3756
3757	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3758	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3759
3760			cat >conftest.$ac_ext <<_ACEOF
3761#line 3761 "configure"
3762#include "confdefs.h"
3763#include <sys/types.h>
3764int
3765main (void)
3766{
3767
3768				#ifdef _DEFAULT_SOURCE
3769				#error	expected _DEFAULT_SOURCE to be undefined
3770				#endif
3771  ;
3772  return 0;
3773}
3774_ACEOF
3775rm -f conftest.$ac_objext
3776if { (eval echo "$as_me:3776: \"$ac_compile\"") >&5
3777  (eval $ac_compile) 2>&5
3778  ac_status=$?
3779  echo "$as_me:3779: \$? = $ac_status" >&5
3780  (exit $ac_status); } &&
3781         { ac_try='test -s conftest.$ac_objext'
3782  { (eval echo "$as_me:3782: \"$ac_try\"") >&5
3783  (eval $ac_try) 2>&5
3784  ac_status=$?
3785  echo "$as_me:3785: \$? = $ac_status" >&5
3786  (exit $ac_status); }; }; then
3787  cf_cv_default_source=no
3788else
3789  echo "$as_me: failed program was:" >&5
3790cat conftest.$ac_ext >&5
3791cf_cv_default_source=yes
3792fi
3793rm -f conftest.$ac_objext conftest.$ac_ext
3794
3795fi
3796echo "$as_me:3796: result: $cf_cv_default_source" >&5
3797echo "${ECHO_T}$cf_cv_default_source" >&6
3798			if test "$cf_cv_default_source" = yes
3799			then
3800
3801	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3802	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3803
3804			fi
3805		fi
3806	fi
3807
3808fi
3809
3810	;;
3811(minix*)
3812	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3813	;;
3814(mirbsd*)
3815	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3816	cf_XOPEN_SOURCE=
3817
3818if test "$cf_cv_posix_visible" = no; then
3819
3820cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3821
3822cf_save_CFLAGS="$CFLAGS"
3823cf_save_CPPFLAGS="$CPPFLAGS"
3824
3825cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3826	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3827		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3828
3829cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3830	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3831		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3832
3833echo "$as_me:3833: checking if we should define _POSIX_C_SOURCE" >&5
3834echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3835if test "${cf_cv_posix_c_source+set}" = set; then
3836  echo $ECHO_N "(cached) $ECHO_C" >&6
3837else
3838
3839echo "${as_me:-configure}:3839: testing if the symbol is already defined go no further ..." 1>&5
3840
3841	cat >conftest.$ac_ext <<_ACEOF
3842#line 3842 "configure"
3843#include "confdefs.h"
3844#include <sys/types.h>
3845int
3846main (void)
3847{
3848
3849#ifndef _POSIX_C_SOURCE
3850make an error
3851#endif
3852  ;
3853  return 0;
3854}
3855_ACEOF
3856rm -f conftest.$ac_objext
3857if { (eval echo "$as_me:3857: \"$ac_compile\"") >&5
3858  (eval $ac_compile) 2>&5
3859  ac_status=$?
3860  echo "$as_me:3860: \$? = $ac_status" >&5
3861  (exit $ac_status); } &&
3862         { ac_try='test -s conftest.$ac_objext'
3863  { (eval echo "$as_me:3863: \"$ac_try\"") >&5
3864  (eval $ac_try) 2>&5
3865  ac_status=$?
3866  echo "$as_me:3866: \$? = $ac_status" >&5
3867  (exit $ac_status); }; }; then
3868  cf_cv_posix_c_source=no
3869else
3870  echo "$as_me: failed program was:" >&5
3871cat conftest.$ac_ext >&5
3872cf_want_posix_source=no
3873	 case .$cf_POSIX_C_SOURCE in
3874	 (.[12]??*)
3875		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3876		;;
3877	 (.2)
3878		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3879		cf_want_posix_source=yes
3880		;;
3881	 (.*)
3882		cf_want_posix_source=yes
3883		;;
3884	 esac
3885	 if test "$cf_want_posix_source" = yes ; then
3886		cat >conftest.$ac_ext <<_ACEOF
3887#line 3887 "configure"
3888#include "confdefs.h"
3889#include <sys/types.h>
3890int
3891main (void)
3892{
3893
3894#ifdef _POSIX_SOURCE
3895make an error
3896#endif
3897  ;
3898  return 0;
3899}
3900_ACEOF
3901rm -f conftest.$ac_objext
3902if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5
3903  (eval $ac_compile) 2>&5
3904  ac_status=$?
3905  echo "$as_me:3905: \$? = $ac_status" >&5
3906  (exit $ac_status); } &&
3907         { ac_try='test -s conftest.$ac_objext'
3908  { (eval echo "$as_me:3908: \"$ac_try\"") >&5
3909  (eval $ac_try) 2>&5
3910  ac_status=$?
3911  echo "$as_me:3911: \$? = $ac_status" >&5
3912  (exit $ac_status); }; }; then
3913  :
3914else
3915  echo "$as_me: failed program was:" >&5
3916cat conftest.$ac_ext >&5
3917cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3918fi
3919rm -f conftest.$ac_objext conftest.$ac_ext
3920	 fi
3921
3922echo "${as_me:-configure}:3922: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3923
3924	 CFLAGS="$cf_trim_CFLAGS"
3925	 CPPFLAGS="$cf_trim_CPPFLAGS"
3926
3927	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3928	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3929
3930echo "${as_me:-configure}:3930: testing if the second compile does not leave our definition intact error ..." 1>&5
3931
3932	 cat >conftest.$ac_ext <<_ACEOF
3933#line 3933 "configure"
3934#include "confdefs.h"
3935#include <sys/types.h>
3936int
3937main (void)
3938{
3939
3940#ifndef _POSIX_C_SOURCE
3941make an error
3942#endif
3943  ;
3944  return 0;
3945}
3946_ACEOF
3947rm -f conftest.$ac_objext
3948if { (eval echo "$as_me:3948: \"$ac_compile\"") >&5
3949  (eval $ac_compile) 2>&5
3950  ac_status=$?
3951  echo "$as_me:3951: \$? = $ac_status" >&5
3952  (exit $ac_status); } &&
3953         { ac_try='test -s conftest.$ac_objext'
3954  { (eval echo "$as_me:3954: \"$ac_try\"") >&5
3955  (eval $ac_try) 2>&5
3956  ac_status=$?
3957  echo "$as_me:3957: \$? = $ac_status" >&5
3958  (exit $ac_status); }; }; then
3959  :
3960else
3961  echo "$as_me: failed program was:" >&5
3962cat conftest.$ac_ext >&5
3963cf_cv_posix_c_source=no
3964fi
3965rm -f conftest.$ac_objext conftest.$ac_ext
3966	 CFLAGS="$cf_save_CFLAGS"
3967	 CPPFLAGS="$cf_save_CPPFLAGS"
3968
3969fi
3970rm -f conftest.$ac_objext conftest.$ac_ext
3971
3972fi
3973echo "$as_me:3973: result: $cf_cv_posix_c_source" >&5
3974echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3975
3976if test "$cf_cv_posix_c_source" != no ; then
3977	CFLAGS="$cf_trim_CFLAGS"
3978	CPPFLAGS="$cf_trim_CPPFLAGS"
3979
3980cf_fix_cppflags=no
3981cf_new_cflags=
3982cf_new_cppflags=
3983cf_new_extra_cppflags=
3984
3985for cf_add_cflags in $cf_cv_posix_c_source
3986do
3987case $cf_fix_cppflags in
3988(no)
3989	case $cf_add_cflags in
3990	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3991		case $cf_add_cflags in
3992		(-D*)
3993			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3994
3995			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3996				&& test -z "${cf_tst_cflags}" \
3997				&& cf_fix_cppflags=yes
3998
3999			if test $cf_fix_cppflags = yes ; then
4000
4001	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4002	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4003
4004				continue
4005			elif test "${cf_tst_cflags}" = "\"'" ; then
4006
4007	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4008	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4009
4010				continue
4011			fi
4012			;;
4013		esac
4014		case "$CPPFLAGS" in
4015		(*$cf_add_cflags)
4016			;;
4017		(*)
4018			case $cf_add_cflags in
4019			(-D*)
4020				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4021
4022CPPFLAGS=`echo "$CPPFLAGS" | \
4023	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4024		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4025
4026				;;
4027			esac
4028
4029	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4030	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4031
4032			;;
4033		esac
4034		;;
4035	(*)
4036
4037	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4038	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4039
4040		;;
4041	esac
4042	;;
4043(yes)
4044
4045	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4046	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4047
4048	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4049
4050	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4051		&& test -z "${cf_tst_cflags}" \
4052		&& cf_fix_cppflags=no
4053	;;
4054esac
4055done
4056
4057if test -n "$cf_new_cflags" ; then
4058
4059	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4060	CFLAGS="${CFLAGS}$cf_new_cflags"
4061
4062fi
4063
4064if test -n "$cf_new_cppflags" ; then
4065
4066	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4067	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4068
4069fi
4070
4071if test -n "$cf_new_extra_cppflags" ; then
4072
4073	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4074	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4075
4076fi
4077
4078fi
4079
4080fi # cf_cv_posix_visible
4081
4082	;;
4083(netbsd*)
4084	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4085	;;
4086(openbsd[4-9]*)
4087	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4088	cf_xopen_source="-D_BSD_SOURCE"
4089	cf_XOPEN_SOURCE=600
4090	;;
4091(openbsd*)
4092	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4093	;;
4094(osf[45]*)
4095	cf_xopen_source="-D_OSF_SOURCE"
4096	;;
4097(nto-qnx*)
4098	cf_xopen_source="-D_QNX_SOURCE"
4099	;;
4100(sco*)
4101	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4102	;;
4103(solaris2.*)
4104	cf_xopen_source="-D__EXTENSIONS__"
4105	cf_cv_xopen_source=broken
4106	;;
4107(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4108	cf_XOPEN_SOURCE=
4109	cf_POSIX_C_SOURCE=
4110	;;
4111(*)
4112
4113echo "$as_me:4113: checking if we should define _XOPEN_SOURCE" >&5
4114echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4115if test "${cf_cv_xopen_source+set}" = set; then
4116  echo $ECHO_N "(cached) $ECHO_C" >&6
4117else
4118
4119	cat >conftest.$ac_ext <<_ACEOF
4120#line 4120 "configure"
4121#include "confdefs.h"
4122
4123#include <stdlib.h>
4124#include <string.h>
4125#include <sys/types.h>
4126
4127int
4128main (void)
4129{
4130
4131#ifndef _XOPEN_SOURCE
4132make an error
4133#endif
4134  ;
4135  return 0;
4136}
4137_ACEOF
4138rm -f conftest.$ac_objext
4139if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
4140  (eval $ac_compile) 2>&5
4141  ac_status=$?
4142  echo "$as_me:4142: \$? = $ac_status" >&5
4143  (exit $ac_status); } &&
4144         { ac_try='test -s conftest.$ac_objext'
4145  { (eval echo "$as_me:4145: \"$ac_try\"") >&5
4146  (eval $ac_try) 2>&5
4147  ac_status=$?
4148  echo "$as_me:4148: \$? = $ac_status" >&5
4149  (exit $ac_status); }; }; then
4150  cf_cv_xopen_source=no
4151else
4152  echo "$as_me: failed program was:" >&5
4153cat conftest.$ac_ext >&5
4154cf_save="$CPPFLAGS"
4155
4156	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4157	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4158
4159	 cat >conftest.$ac_ext <<_ACEOF
4160#line 4160 "configure"
4161#include "confdefs.h"
4162
4163#include <stdlib.h>
4164#include <string.h>
4165#include <sys/types.h>
4166
4167int
4168main (void)
4169{
4170
4171#ifdef _XOPEN_SOURCE
4172make an error
4173#endif
4174  ;
4175  return 0;
4176}
4177_ACEOF
4178rm -f conftest.$ac_objext
4179if { (eval echo "$as_me:4179: \"$ac_compile\"") >&5
4180  (eval $ac_compile) 2>&5
4181  ac_status=$?
4182  echo "$as_me:4182: \$? = $ac_status" >&5
4183  (exit $ac_status); } &&
4184         { ac_try='test -s conftest.$ac_objext'
4185  { (eval echo "$as_me:4185: \"$ac_try\"") >&5
4186  (eval $ac_try) 2>&5
4187  ac_status=$?
4188  echo "$as_me:4188: \$? = $ac_status" >&5
4189  (exit $ac_status); }; }; then
4190  cf_cv_xopen_source=no
4191else
4192  echo "$as_me: failed program was:" >&5
4193cat conftest.$ac_ext >&5
4194cf_cv_xopen_source=$cf_XOPEN_SOURCE
4195fi
4196rm -f conftest.$ac_objext conftest.$ac_ext
4197	CPPFLAGS="$cf_save"
4198
4199fi
4200rm -f conftest.$ac_objext conftest.$ac_ext
4201
4202fi
4203echo "$as_me:4203: result: $cf_cv_xopen_source" >&5
4204echo "${ECHO_T}$cf_cv_xopen_source" >&6
4205
4206if test "$cf_cv_xopen_source" != no ; then
4207
4208CFLAGS=`echo "$CFLAGS" | \
4209	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4210		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4211
4212CPPFLAGS=`echo "$CPPFLAGS" | \
4213	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4214		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4215
4216	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4217
4218cf_fix_cppflags=no
4219cf_new_cflags=
4220cf_new_cppflags=
4221cf_new_extra_cppflags=
4222
4223for cf_add_cflags in $cf_temp_xopen_source
4224do
4225case $cf_fix_cppflags in
4226(no)
4227	case $cf_add_cflags in
4228	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4229		case $cf_add_cflags in
4230		(-D*)
4231			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4232
4233			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4234				&& test -z "${cf_tst_cflags}" \
4235				&& cf_fix_cppflags=yes
4236
4237			if test $cf_fix_cppflags = yes ; then
4238
4239	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4240	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4241
4242				continue
4243			elif test "${cf_tst_cflags}" = "\"'" ; then
4244
4245	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4246	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4247
4248				continue
4249			fi
4250			;;
4251		esac
4252		case "$CPPFLAGS" in
4253		(*$cf_add_cflags)
4254			;;
4255		(*)
4256			case $cf_add_cflags in
4257			(-D*)
4258				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4259
4260CPPFLAGS=`echo "$CPPFLAGS" | \
4261	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4262		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4263
4264				;;
4265			esac
4266
4267	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4268	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4269
4270			;;
4271		esac
4272		;;
4273	(*)
4274
4275	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4276	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4277
4278		;;
4279	esac
4280	;;
4281(yes)
4282
4283	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4284	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4285
4286	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4287
4288	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4289		&& test -z "${cf_tst_cflags}" \
4290		&& cf_fix_cppflags=no
4291	;;
4292esac
4293done
4294
4295if test -n "$cf_new_cflags" ; then
4296
4297	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4298	CFLAGS="${CFLAGS}$cf_new_cflags"
4299
4300fi
4301
4302if test -n "$cf_new_cppflags" ; then
4303
4304	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4305	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4306
4307fi
4308
4309if test -n "$cf_new_extra_cppflags" ; then
4310
4311	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4312	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4313
4314fi
4315
4316fi
4317
4318if test "$cf_cv_posix_visible" = no; then
4319
4320cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4321
4322cf_save_CFLAGS="$CFLAGS"
4323cf_save_CPPFLAGS="$CPPFLAGS"
4324
4325cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4326	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4327		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4328
4329cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4330	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4331		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4332
4333echo "$as_me:4333: checking if we should define _POSIX_C_SOURCE" >&5
4334echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4335if test "${cf_cv_posix_c_source+set}" = set; then
4336  echo $ECHO_N "(cached) $ECHO_C" >&6
4337else
4338
4339echo "${as_me:-configure}:4339: testing if the symbol is already defined go no further ..." 1>&5
4340
4341	cat >conftest.$ac_ext <<_ACEOF
4342#line 4342 "configure"
4343#include "confdefs.h"
4344#include <sys/types.h>
4345int
4346main (void)
4347{
4348
4349#ifndef _POSIX_C_SOURCE
4350make an error
4351#endif
4352  ;
4353  return 0;
4354}
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (eval echo "$as_me:4357: \"$ac_compile\"") >&5
4358  (eval $ac_compile) 2>&5
4359  ac_status=$?
4360  echo "$as_me:4360: \$? = $ac_status" >&5
4361  (exit $ac_status); } &&
4362         { ac_try='test -s conftest.$ac_objext'
4363  { (eval echo "$as_me:4363: \"$ac_try\"") >&5
4364  (eval $ac_try) 2>&5
4365  ac_status=$?
4366  echo "$as_me:4366: \$? = $ac_status" >&5
4367  (exit $ac_status); }; }; then
4368  cf_cv_posix_c_source=no
4369else
4370  echo "$as_me: failed program was:" >&5
4371cat conftest.$ac_ext >&5
4372cf_want_posix_source=no
4373	 case .$cf_POSIX_C_SOURCE in
4374	 (.[12]??*)
4375		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4376		;;
4377	 (.2)
4378		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4379		cf_want_posix_source=yes
4380		;;
4381	 (.*)
4382		cf_want_posix_source=yes
4383		;;
4384	 esac
4385	 if test "$cf_want_posix_source" = yes ; then
4386		cat >conftest.$ac_ext <<_ACEOF
4387#line 4387 "configure"
4388#include "confdefs.h"
4389#include <sys/types.h>
4390int
4391main (void)
4392{
4393
4394#ifdef _POSIX_SOURCE
4395make an error
4396#endif
4397  ;
4398  return 0;
4399}
4400_ACEOF
4401rm -f conftest.$ac_objext
4402if { (eval echo "$as_me:4402: \"$ac_compile\"") >&5
4403  (eval $ac_compile) 2>&5
4404  ac_status=$?
4405  echo "$as_me:4405: \$? = $ac_status" >&5
4406  (exit $ac_status); } &&
4407         { ac_try='test -s conftest.$ac_objext'
4408  { (eval echo "$as_me:4408: \"$ac_try\"") >&5
4409  (eval $ac_try) 2>&5
4410  ac_status=$?
4411  echo "$as_me:4411: \$? = $ac_status" >&5
4412  (exit $ac_status); }; }; then
4413  :
4414else
4415  echo "$as_me: failed program was:" >&5
4416cat conftest.$ac_ext >&5
4417cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4418fi
4419rm -f conftest.$ac_objext conftest.$ac_ext
4420	 fi
4421
4422echo "${as_me:-configure}:4422: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4423
4424	 CFLAGS="$cf_trim_CFLAGS"
4425	 CPPFLAGS="$cf_trim_CPPFLAGS"
4426
4427	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4428	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4429
4430echo "${as_me:-configure}:4430: testing if the second compile does not leave our definition intact error ..." 1>&5
4431
4432	 cat >conftest.$ac_ext <<_ACEOF
4433#line 4433 "configure"
4434#include "confdefs.h"
4435#include <sys/types.h>
4436int
4437main (void)
4438{
4439
4440#ifndef _POSIX_C_SOURCE
4441make an error
4442#endif
4443  ;
4444  return 0;
4445}
4446_ACEOF
4447rm -f conftest.$ac_objext
4448if { (eval echo "$as_me:4448: \"$ac_compile\"") >&5
4449  (eval $ac_compile) 2>&5
4450  ac_status=$?
4451  echo "$as_me:4451: \$? = $ac_status" >&5
4452  (exit $ac_status); } &&
4453         { ac_try='test -s conftest.$ac_objext'
4454  { (eval echo "$as_me:4454: \"$ac_try\"") >&5
4455  (eval $ac_try) 2>&5
4456  ac_status=$?
4457  echo "$as_me:4457: \$? = $ac_status" >&5
4458  (exit $ac_status); }; }; then
4459  :
4460else
4461  echo "$as_me: failed program was:" >&5
4462cat conftest.$ac_ext >&5
4463cf_cv_posix_c_source=no
4464fi
4465rm -f conftest.$ac_objext conftest.$ac_ext
4466	 CFLAGS="$cf_save_CFLAGS"
4467	 CPPFLAGS="$cf_save_CPPFLAGS"
4468
4469fi
4470rm -f conftest.$ac_objext conftest.$ac_ext
4471
4472fi
4473echo "$as_me:4473: result: $cf_cv_posix_c_source" >&5
4474echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4475
4476if test "$cf_cv_posix_c_source" != no ; then
4477	CFLAGS="$cf_trim_CFLAGS"
4478	CPPFLAGS="$cf_trim_CPPFLAGS"
4479
4480cf_fix_cppflags=no
4481cf_new_cflags=
4482cf_new_cppflags=
4483cf_new_extra_cppflags=
4484
4485for cf_add_cflags in $cf_cv_posix_c_source
4486do
4487case $cf_fix_cppflags in
4488(no)
4489	case $cf_add_cflags in
4490	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4491		case $cf_add_cflags in
4492		(-D*)
4493			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4494
4495			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4496				&& test -z "${cf_tst_cflags}" \
4497				&& cf_fix_cppflags=yes
4498
4499			if test $cf_fix_cppflags = yes ; then
4500
4501	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4502	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4503
4504				continue
4505			elif test "${cf_tst_cflags}" = "\"'" ; then
4506
4507	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4508	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4509
4510				continue
4511			fi
4512			;;
4513		esac
4514		case "$CPPFLAGS" in
4515		(*$cf_add_cflags)
4516			;;
4517		(*)
4518			case $cf_add_cflags in
4519			(-D*)
4520				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4521
4522CPPFLAGS=`echo "$CPPFLAGS" | \
4523	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4524		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4525
4526				;;
4527			esac
4528
4529	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4530	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4531
4532			;;
4533		esac
4534		;;
4535	(*)
4536
4537	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4538	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4539
4540		;;
4541	esac
4542	;;
4543(yes)
4544
4545	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4546	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4547
4548	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4549
4550	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4551		&& test -z "${cf_tst_cflags}" \
4552		&& cf_fix_cppflags=no
4553	;;
4554esac
4555done
4556
4557if test -n "$cf_new_cflags" ; then
4558
4559	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4560	CFLAGS="${CFLAGS}$cf_new_cflags"
4561
4562fi
4563
4564if test -n "$cf_new_cppflags" ; then
4565
4566	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4567	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4568
4569fi
4570
4571if test -n "$cf_new_extra_cppflags" ; then
4572
4573	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4574	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4575
4576fi
4577
4578fi
4579
4580fi # cf_cv_posix_visible
4581
4582	;;
4583esac
4584
4585if test -n "$cf_xopen_source" ; then
4586
4587cf_fix_cppflags=no
4588cf_new_cflags=
4589cf_new_cppflags=
4590cf_new_extra_cppflags=
4591
4592for cf_add_cflags in $cf_xopen_source
4593do
4594case $cf_fix_cppflags in
4595(no)
4596	case $cf_add_cflags in
4597	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4598		case $cf_add_cflags in
4599		(-D*)
4600			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4601
4602			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4603				&& test -z "${cf_tst_cflags}" \
4604				&& cf_fix_cppflags=yes
4605
4606			if test $cf_fix_cppflags = yes ; then
4607
4608	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4609	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4610
4611				continue
4612			elif test "${cf_tst_cflags}" = "\"'" ; then
4613
4614	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4615	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4616
4617				continue
4618			fi
4619			;;
4620		esac
4621		case "$CPPFLAGS" in
4622		(*$cf_add_cflags)
4623			;;
4624		(*)
4625			case $cf_add_cflags in
4626			(-D*)
4627				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4628
4629CPPFLAGS=`echo "$CPPFLAGS" | \
4630	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4631		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4632
4633				;;
4634			esac
4635
4636	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4637	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4638
4639			;;
4640		esac
4641		;;
4642	(*)
4643
4644	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4645	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4646
4647		;;
4648	esac
4649	;;
4650(yes)
4651
4652	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4653	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4654
4655	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4656
4657	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4658		&& test -z "${cf_tst_cflags}" \
4659		&& cf_fix_cppflags=no
4660	;;
4661esac
4662done
4663
4664if test -n "$cf_new_cflags" ; then
4665	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4666
4667echo "${as_me:-configure}:4667: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4668
4669	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4670	CFLAGS="${CFLAGS}$cf_new_cflags"
4671
4672fi
4673
4674if test -n "$cf_new_cppflags" ; then
4675	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4676
4677echo "${as_me:-configure}:4677: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4678
4679	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4680	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4681
4682fi
4683
4684if test -n "$cf_new_extra_cppflags" ; then
4685	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4686
4687echo "${as_me:-configure}:4687: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4688
4689	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4690	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4691
4692fi
4693
4694fi
4695
4696if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4697	echo "$as_me:4697: checking if _XOPEN_SOURCE really is set" >&5
4698echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4699	cat >conftest.$ac_ext <<_ACEOF
4700#line 4700 "configure"
4701#include "confdefs.h"
4702#include <stdlib.h>
4703int
4704main (void)
4705{
4706
4707#ifndef _XOPEN_SOURCE
4708make an error
4709#endif
4710  ;
4711  return 0;
4712}
4713_ACEOF
4714rm -f conftest.$ac_objext
4715if { (eval echo "$as_me:4715: \"$ac_compile\"") >&5
4716  (eval $ac_compile) 2>&5
4717  ac_status=$?
4718  echo "$as_me:4718: \$? = $ac_status" >&5
4719  (exit $ac_status); } &&
4720         { ac_try='test -s conftest.$ac_objext'
4721  { (eval echo "$as_me:4721: \"$ac_try\"") >&5
4722  (eval $ac_try) 2>&5
4723  ac_status=$?
4724  echo "$as_me:4724: \$? = $ac_status" >&5
4725  (exit $ac_status); }; }; then
4726  cf_XOPEN_SOURCE_set=yes
4727else
4728  echo "$as_me: failed program was:" >&5
4729cat conftest.$ac_ext >&5
4730cf_XOPEN_SOURCE_set=no
4731fi
4732rm -f conftest.$ac_objext conftest.$ac_ext
4733	echo "$as_me:4733: result: $cf_XOPEN_SOURCE_set" >&5
4734echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4735	if test $cf_XOPEN_SOURCE_set = yes
4736	then
4737		cat >conftest.$ac_ext <<_ACEOF
4738#line 4738 "configure"
4739#include "confdefs.h"
4740#include <stdlib.h>
4741int
4742main (void)
4743{
4744
4745#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4746make an error
4747#endif
4748  ;
4749  return 0;
4750}
4751_ACEOF
4752rm -f conftest.$ac_objext
4753if { (eval echo "$as_me:4753: \"$ac_compile\"") >&5
4754  (eval $ac_compile) 2>&5
4755  ac_status=$?
4756  echo "$as_me:4756: \$? = $ac_status" >&5
4757  (exit $ac_status); } &&
4758         { ac_try='test -s conftest.$ac_objext'
4759  { (eval echo "$as_me:4759: \"$ac_try\"") >&5
4760  (eval $ac_try) 2>&5
4761  ac_status=$?
4762  echo "$as_me:4762: \$? = $ac_status" >&5
4763  (exit $ac_status); }; }; then
4764  cf_XOPEN_SOURCE_set_ok=yes
4765else
4766  echo "$as_me: failed program was:" >&5
4767cat conftest.$ac_ext >&5
4768cf_XOPEN_SOURCE_set_ok=no
4769fi
4770rm -f conftest.$ac_objext conftest.$ac_ext
4771		if test $cf_XOPEN_SOURCE_set_ok = no
4772		then
4773			{ echo "$as_me:4773: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4774echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4775		fi
4776	else
4777
4778echo "$as_me:4778: checking if we should define _XOPEN_SOURCE" >&5
4779echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4780if test "${cf_cv_xopen_source+set}" = set; then
4781  echo $ECHO_N "(cached) $ECHO_C" >&6
4782else
4783
4784	cat >conftest.$ac_ext <<_ACEOF
4785#line 4785 "configure"
4786#include "confdefs.h"
4787
4788#include <stdlib.h>
4789#include <string.h>
4790#include <sys/types.h>
4791
4792int
4793main (void)
4794{
4795
4796#ifndef _XOPEN_SOURCE
4797make an error
4798#endif
4799  ;
4800  return 0;
4801}
4802_ACEOF
4803rm -f conftest.$ac_objext
4804if { (eval echo "$as_me:4804: \"$ac_compile\"") >&5
4805  (eval $ac_compile) 2>&5
4806  ac_status=$?
4807  echo "$as_me:4807: \$? = $ac_status" >&5
4808  (exit $ac_status); } &&
4809         { ac_try='test -s conftest.$ac_objext'
4810  { (eval echo "$as_me:4810: \"$ac_try\"") >&5
4811  (eval $ac_try) 2>&5
4812  ac_status=$?
4813  echo "$as_me:4813: \$? = $ac_status" >&5
4814  (exit $ac_status); }; }; then
4815  cf_cv_xopen_source=no
4816else
4817  echo "$as_me: failed program was:" >&5
4818cat conftest.$ac_ext >&5
4819cf_save="$CPPFLAGS"
4820
4821	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4822	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4823
4824	 cat >conftest.$ac_ext <<_ACEOF
4825#line 4825 "configure"
4826#include "confdefs.h"
4827
4828#include <stdlib.h>
4829#include <string.h>
4830#include <sys/types.h>
4831
4832int
4833main (void)
4834{
4835
4836#ifdef _XOPEN_SOURCE
4837make an error
4838#endif
4839  ;
4840  return 0;
4841}
4842_ACEOF
4843rm -f conftest.$ac_objext
4844if { (eval echo "$as_me:4844: \"$ac_compile\"") >&5
4845  (eval $ac_compile) 2>&5
4846  ac_status=$?
4847  echo "$as_me:4847: \$? = $ac_status" >&5
4848  (exit $ac_status); } &&
4849         { ac_try='test -s conftest.$ac_objext'
4850  { (eval echo "$as_me:4850: \"$ac_try\"") >&5
4851  (eval $ac_try) 2>&5
4852  ac_status=$?
4853  echo "$as_me:4853: \$? = $ac_status" >&5
4854  (exit $ac_status); }; }; then
4855  cf_cv_xopen_source=no
4856else
4857  echo "$as_me: failed program was:" >&5
4858cat conftest.$ac_ext >&5
4859cf_cv_xopen_source=$cf_XOPEN_SOURCE
4860fi
4861rm -f conftest.$ac_objext conftest.$ac_ext
4862	CPPFLAGS="$cf_save"
4863
4864fi
4865rm -f conftest.$ac_objext conftest.$ac_ext
4866
4867fi
4868echo "$as_me:4868: result: $cf_cv_xopen_source" >&5
4869echo "${ECHO_T}$cf_cv_xopen_source" >&6
4870
4871if test "$cf_cv_xopen_source" != no ; then
4872
4873CFLAGS=`echo "$CFLAGS" | \
4874	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4875		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4876
4877CPPFLAGS=`echo "$CPPFLAGS" | \
4878	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4879		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4880
4881	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4882
4883cf_fix_cppflags=no
4884cf_new_cflags=
4885cf_new_cppflags=
4886cf_new_extra_cppflags=
4887
4888for cf_add_cflags in $cf_temp_xopen_source
4889do
4890case $cf_fix_cppflags in
4891(no)
4892	case $cf_add_cflags in
4893	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4894		case $cf_add_cflags in
4895		(-D*)
4896			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4897
4898			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4899				&& test -z "${cf_tst_cflags}" \
4900				&& cf_fix_cppflags=yes
4901
4902			if test $cf_fix_cppflags = yes ; then
4903
4904	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4905	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4906
4907				continue
4908			elif test "${cf_tst_cflags}" = "\"'" ; then
4909
4910	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4911	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4912
4913				continue
4914			fi
4915			;;
4916		esac
4917		case "$CPPFLAGS" in
4918		(*$cf_add_cflags)
4919			;;
4920		(*)
4921			case $cf_add_cflags in
4922			(-D*)
4923				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4924
4925CPPFLAGS=`echo "$CPPFLAGS" | \
4926	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4927		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4928
4929				;;
4930			esac
4931
4932	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4933	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4934
4935			;;
4936		esac
4937		;;
4938	(*)
4939
4940	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4941	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4942
4943		;;
4944	esac
4945	;;
4946(yes)
4947
4948	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4949	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4950
4951	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4952
4953	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4954		&& test -z "${cf_tst_cflags}" \
4955		&& cf_fix_cppflags=no
4956	;;
4957esac
4958done
4959
4960if test -n "$cf_new_cflags" ; then
4961
4962	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4963	CFLAGS="${CFLAGS}$cf_new_cflags"
4964
4965fi
4966
4967if test -n "$cf_new_cppflags" ; then
4968
4969	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4970	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4971
4972fi
4973
4974if test -n "$cf_new_extra_cppflags" ; then
4975
4976	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4977	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4978
4979fi
4980
4981fi
4982
4983	fi
4984fi
4985fi # cf_cv_posix_visible
4986
4987echo "$as_me:4987: checking if you want to see long compiling messages" >&5
4988echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4989
4990# Check whether --enable-echo or --disable-echo was given.
4991if test "${enable_echo+set}" = set; then
4992  enableval="$enable_echo"
4993  test "$enableval" != no && enableval=yes
4994	if test "$enableval" != "yes" ; then
4995
4996	ECHO_LT='--silent'
4997	ECHO_LD='@echo linking $@;'
4998	RULE_CC='@echo compiling $<'
4999	SHOW_CC='@echo compiling $@'
5000	ECHO_CC='@'
5001
5002	else
5003
5004	ECHO_LT=''
5005	ECHO_LD=''
5006	RULE_CC=''
5007	SHOW_CC=''
5008	ECHO_CC=''
5009
5010	fi
5011else
5012  enableval=yes
5013
5014	ECHO_LT=''
5015	ECHO_LD=''
5016	RULE_CC=''
5017	SHOW_CC=''
5018	ECHO_CC=''
5019
5020fi;
5021echo "$as_me:5021: result: $enableval" >&5
5022echo "${ECHO_T}$enableval" >&6
5023
5024case $cf_cv_system_name in
5025(os2*)
5026	CFLAGS="$CFLAGS -Zmt"
5027
5028	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5029	CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
5030
5031	CXXFLAGS="$CXXFLAGS -Zmt"
5032	# autoconf's macro sets -Zexe and suffix both, which conflict:w
5033	LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
5034	ac_cv_exeext=.exe
5035	;;
5036esac
5037
5038PROG_EXT="$EXEEXT"
5039
5040test -n "$PROG_EXT" &&
5041cat >>confdefs.h <<EOF
5042#define PROG_EXT "$PROG_EXT"
5043EOF
5044
5045	case $cf_cv_system_name in
5046	(OS/2*|os2*)
5047		if test "$DFT_LWR_MODEL" = libtool; then
5048			LIB_PREFIX='lib'
5049		else
5050			LIB_PREFIX=''
5051		fi
5052		;;
5053	(*-msvc*)
5054		LIB_PREFIX=''
5055		;;
5056	(*)	LIB_PREFIX='lib'
5057		;;
5058	esac
5059
5060# Check whether --with-man-section or --without-man-section was given.
5061if test "${with_man_section+set}" = set; then
5062  withval="$with_man_section"
5063  MANSECT=$with_man_section
5064else
5065  MANSECT=3
5066fi;
5067case .$MANSECT in
5068.yes|.no)
5069	MANSECT=3
5070	;;
5071esac
5072MAN_TAG=`echo $MANSECT | sed -e 's/^\(.\).*/\1/'`
5073
5074echo "$as_me:5074: checking for specific curses-directory" >&5
5075echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5076
5077# Check whether --with-curses-dir or --without-curses-dir was given.
5078if test "${with_curses_dir+set}" = set; then
5079  withval="$with_curses_dir"
5080  cf_cv_curses_dir=$withval
5081else
5082  cf_cv_curses_dir=no
5083fi;
5084echo "$as_me:5084: result: $cf_cv_curses_dir" >&5
5085echo "${ECHO_T}$cf_cv_curses_dir" >&6
5086
5087if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5088then
5089
5090if test "x$prefix" != xNONE; then
5091	cf_path_syntax="$prefix"
5092else
5093	cf_path_syntax="$ac_default_prefix"
5094fi
5095
5096case ".$withval" in
5097(.\$\(*\)*|.\'*\'*)
5098	;;
5099(..|./*|.\\*)
5100	;;
5101(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5102	;;
5103(.\${*prefix}*|.\${*dir}*)
5104	eval withval="$withval"
5105	case ".$withval" in
5106	(.NONE/*)
5107		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5108		;;
5109	esac
5110	;;
5111(.no|.NONE/*)
5112	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5113	;;
5114(*)
5115	{ { echo "$as_me:5115: error: expected a pathname, not \"$withval\"" >&5
5116echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5117   { (exit 1); exit 1; }; }
5118	;;
5119esac
5120
5121	if test -d "$cf_cv_curses_dir"
5122	then
5123
5124if test -n "$cf_cv_curses_dir/include" ; then
5125  for cf_add_incdir in $cf_cv_curses_dir/include
5126  do
5127	while test $cf_add_incdir != /usr/include
5128	do
5129	  if test -d $cf_add_incdir
5130	  then
5131		cf_have_incdir=no
5132		if test -n "$CFLAGS$CPPFLAGS" ; then
5133		  # a loop is needed to ensure we can add subdirs of existing dirs
5134		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5135			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5136			  cf_have_incdir=yes; break
5137			fi
5138		  done
5139		fi
5140
5141		if test "$cf_have_incdir" = no ; then
5142		  if test "$cf_add_incdir" = /usr/local/include ; then
5143			if test "$GCC" = yes
5144			then
5145			  cf_save_CPPFLAGS=$CPPFLAGS
5146
5147	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5148	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5149
5150			  cat >conftest.$ac_ext <<_ACEOF
5151#line 5151 "configure"
5152#include "confdefs.h"
5153#include <stdio.h>
5154int
5155main (void)
5156{
5157printf("Hello")
5158  ;
5159  return 0;
5160}
5161_ACEOF
5162rm -f conftest.$ac_objext
5163if { (eval echo "$as_me:5163: \"$ac_compile\"") >&5
5164  (eval $ac_compile) 2>&5
5165  ac_status=$?
5166  echo "$as_me:5166: \$? = $ac_status" >&5
5167  (exit $ac_status); } &&
5168         { ac_try='test -s conftest.$ac_objext'
5169  { (eval echo "$as_me:5169: \"$ac_try\"") >&5
5170  (eval $ac_try) 2>&5
5171  ac_status=$?
5172  echo "$as_me:5172: \$? = $ac_status" >&5
5173  (exit $ac_status); }; }; then
5174  :
5175else
5176  echo "$as_me: failed program was:" >&5
5177cat conftest.$ac_ext >&5
5178cf_have_incdir=yes
5179fi
5180rm -f conftest.$ac_objext conftest.$ac_ext
5181			  CPPFLAGS=$cf_save_CPPFLAGS
5182			fi
5183		  fi
5184		fi
5185
5186		if test "$cf_have_incdir" = no ; then
5187		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
5188
5189echo "${as_me:-configure}:5189: testing adding $cf_add_incdir to include-path ..." 1>&5
5190
5191		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5192
5193		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5194		  test "$cf_top_incdir" = "$cf_add_incdir" && break
5195		  cf_add_incdir="$cf_top_incdir"
5196		else
5197		  break
5198		fi
5199	  else
5200		break
5201	  fi
5202	done
5203  done
5204fi
5205
5206if test -n "$cf_cv_curses_dir/lib" ; then
5207	for cf_add_libdir in $cf_cv_curses_dir/lib
5208	do
5209		if test $cf_add_libdir = /usr/lib ; then
5210			:
5211		elif test -d $cf_add_libdir
5212		then
5213			cf_have_libdir=no
5214			if test -n "$LDFLAGS$LIBS" ; then
5215				# a loop is needed to ensure we can add subdirs of existing dirs
5216				for cf_test_libdir in $LDFLAGS $LIBS ; do
5217					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5218						cf_have_libdir=yes; break
5219					fi
5220				done
5221			fi
5222			if test "$cf_have_libdir" = no ; then
5223				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
5224
5225echo "${as_me:-configure}:5225: testing adding $cf_add_libdir to library-path ..." 1>&5
5226
5227				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5228			fi
5229		fi
5230	done
5231fi
5232
5233	fi
5234fi
5235
5236if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
5237then
5238	echo "$as_me:5238: checking for X" >&5
5239echo $ECHO_N "checking for X... $ECHO_C" >&6
5240
5241# Check whether --with-x or --without-x was given.
5242if test "${with_x+set}" = set; then
5243  withval="$with_x"
5244
5245fi;
5246# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5247if test "x$with_x" = xno; then
5248  # The user explicitly disabled X.
5249  have_x=disabled
5250else
5251  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5252    # Both variables are already set.
5253    have_x=yes
5254  else
5255    if test "${ac_cv_have_x+set}" = set; then
5256  echo $ECHO_N "(cached) $ECHO_C" >&6
5257else
5258  # One or both of the vars are not set, and there is no cached value.
5259ac_x_includes=no ac_x_libraries=no
5260rm -fr conftest.dir
5261if mkdir conftest.dir; then
5262  cd conftest.dir
5263  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5264  cat >Imakefile <<'EOF'
5265acfindx:
5266	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5267EOF
5268  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5269    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5270    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5271    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5272    for ac_extension in a so sl dylib dll; do
5273      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5274         test -f $ac_im_libdir/libX11.$ac_extension; then
5275        ac_im_usrlibdir=$ac_im_libdir; break
5276      fi
5277    done
5278    # Screen out bogus values from the imake configuration.  They are
5279    # bogus both because they are the default anyway, and because
5280    # using them would break gcc on systems where it needs fixed includes.
5281    case $ac_im_incroot in
5282	/usr/include) ;;
5283	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5284    esac
5285    case $ac_im_usrlibdir in
5286	/usr/lib | /lib) ;;
5287	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5288    esac
5289  fi
5290  cd ..
5291  rm -fr conftest.dir
5292fi
5293
5294# Standard set of common directories for X headers.
5295# Check X11 before X11Rn because it is often a symlink to the current release.
5296ac_x_header_dirs='
5297/usr/X11/include
5298/usr/X11R7/include
5299/usr/X11R6/include
5300/usr/X11R5/include
5301/usr/X11R4/include
5302
5303/opt/local/include
5304/opt/X11/include
5305
5306/usr/include/X11
5307/usr/include/X11R7
5308/usr/include/X11R6
5309/usr/include/X11R5
5310/usr/include/X11R4
5311
5312/usr/local/X11/include
5313/usr/local/X11R7/include
5314/usr/local/X11R6/include
5315/usr/local/X11R5/include
5316/usr/local/X11R4/include
5317
5318/usr/local/include/X11
5319/usr/local/include/X11R7
5320/usr/local/include/X11R6
5321/usr/local/include/X11R5
5322/usr/local/include/X11R4
5323
5324/usr/X386/include
5325/usr/x386/include
5326/usr/XFree86/include/X11
5327
5328/usr/include
5329/usr/local/include
5330/usr/unsupported/include
5331/usr/athena/include
5332/usr/local/x11r5/include
5333/usr/lpp/Xamples/include
5334
5335/usr/openwin/include
5336/usr/openwin/share/include'
5337
5338if test "$ac_x_includes" = no; then
5339  # Guess where to find include files, by looking for Intrinsic.h.
5340  # First, try using that file with no special directory specified.
5341  cat >conftest.$ac_ext <<_ACEOF
5342#line 5342 "configure"
5343#include "confdefs.h"
5344#include <X11/Intrinsic.h>
5345_ACEOF
5346if { (eval echo "$as_me:5346: \"$ac_cpp conftest.$ac_ext\"") >&5
5347  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5348  ac_status=$?
5349  egrep -v '^ *\+' conftest.er1 >conftest.err
5350  rm -f conftest.er1
5351  cat conftest.err >&5
5352  echo "$as_me:5352: \$? = $ac_status" >&5
5353  (exit $ac_status); } >/dev/null; then
5354  if test -s conftest.err; then
5355    ac_cpp_err=$ac_c_preproc_warn_flag
5356  else
5357    ac_cpp_err=
5358  fi
5359else
5360  ac_cpp_err=yes
5361fi
5362if test -z "$ac_cpp_err"; then
5363  # We can compile using X headers with no special include directory.
5364ac_x_includes=
5365else
5366  echo "$as_me: failed program was:" >&5
5367  cat conftest.$ac_ext >&5
5368  for ac_dir in $ac_x_header_dirs; do
5369  if test -r "$ac_dir/X11/Intrinsic.h"; then
5370    ac_x_includes=$ac_dir
5371    break
5372  fi
5373done
5374fi
5375rm -f conftest.err conftest.$ac_ext
5376fi # $ac_x_includes = no
5377
5378if test "$ac_x_libraries" = no; then
5379  # Check for the libraries.
5380  # See if we find them without any special options.
5381  # Don't add to $LIBS permanently.
5382  ac_save_LIBS=$LIBS
5383  LIBS="-lXt $LIBS"
5384  cat >conftest.$ac_ext <<_ACEOF
5385#line 5385 "configure"
5386#include "confdefs.h"
5387#include <X11/Intrinsic.h>
5388int
5389main (void)
5390{
5391XtMalloc (0)
5392  ;
5393  return 0;
5394}
5395_ACEOF
5396rm -f conftest.$ac_objext conftest$ac_exeext
5397if { (eval echo "$as_me:5397: \"$ac_link\"") >&5
5398  (eval $ac_link) 2>&5
5399  ac_status=$?
5400  echo "$as_me:5400: \$? = $ac_status" >&5
5401  (exit $ac_status); } &&
5402         { ac_try='test -s conftest$ac_exeext'
5403  { (eval echo "$as_me:5403: \"$ac_try\"") >&5
5404  (eval $ac_try) 2>&5
5405  ac_status=$?
5406  echo "$as_me:5406: \$? = $ac_status" >&5
5407  (exit $ac_status); }; }; then
5408  LIBS=$ac_save_LIBS
5409# We can link X programs with no special library path.
5410ac_x_libraries=
5411else
5412  echo "$as_me: failed program was:" >&5
5413cat conftest.$ac_ext >&5
5414LIBS=$ac_save_LIBS
5415for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5416do
5417  # Don't even attempt the hair of trying to link an X program!
5418  for ac_extension in a so sl dylib dll; do
5419    if test -r $ac_dir/libXt.$ac_extension; then
5420      ac_x_libraries=$ac_dir
5421      break 2
5422    fi
5423  done
5424done
5425fi
5426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5427fi # $ac_x_libraries = no
5428
5429if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5430  # Didn't find X anywhere.  Cache the known absence of X.
5431  ac_cv_have_x="have_x=no"
5432else
5433  # Record where we found X for the cache.
5434  ac_cv_have_x="have_x=yes \
5435	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5436fi
5437fi
5438
5439  fi
5440  eval "$ac_cv_have_x"
5441fi # $with_x != no
5442
5443if test "$have_x" != yes; then
5444  echo "$as_me:5444: result: $have_x" >&5
5445echo "${ECHO_T}$have_x" >&6
5446  no_x=yes
5447else
5448  # If each of the values was on the command line, it overrides each guess.
5449  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5450  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5451  # Update the cache value to reflect the command line values.
5452  ac_cv_have_x="have_x=yes \
5453		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5454  echo "$as_me:5454: result: libraries $x_libraries, headers $x_includes" >&5
5455echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5456fi
5457
5458	if test "$no_x" = yes; then
5459  # Not all programs may use this symbol, but it does not hurt to define it.
5460
5461cat >>confdefs.h <<\EOF
5462#define X_DISPLAY_MISSING 1
5463EOF
5464
5465  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5466else
5467  if test -n "$x_includes"; then
5468    X_CFLAGS="$X_CFLAGS -I$x_includes"
5469  fi
5470
5471  # It would also be nice to do this for all -L options, not just this one.
5472  if test -n "$x_libraries"; then
5473    X_LIBS="$X_LIBS -L$x_libraries"
5474    # For Solaris; some versions of Sun CC require a space after -R and
5475    # others require no space.  Words are not sufficient . . . .
5476    case `(uname -sr) 2>/dev/null` in
5477    "SunOS 5"*)
5478      echo "$as_me:5478: checking whether -R must be followed by a space" >&5
5479echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5480      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5481      cat >conftest.$ac_ext <<_ACEOF
5482#line 5482 "configure"
5483#include "confdefs.h"
5484
5485int
5486main (void)
5487{
5488
5489  ;
5490  return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext conftest$ac_exeext
5494if { (eval echo "$as_me:5494: \"$ac_link\"") >&5
5495  (eval $ac_link) 2>&5
5496  ac_status=$?
5497  echo "$as_me:5497: \$? = $ac_status" >&5
5498  (exit $ac_status); } &&
5499         { ac_try='test -s conftest$ac_exeext'
5500  { (eval echo "$as_me:5500: \"$ac_try\"") >&5
5501  (eval $ac_try) 2>&5
5502  ac_status=$?
5503  echo "$as_me:5503: \$? = $ac_status" >&5
5504  (exit $ac_status); }; }; then
5505  ac_R_nospace=yes
5506else
5507  echo "$as_me: failed program was:" >&5
5508cat conftest.$ac_ext >&5
5509ac_R_nospace=no
5510fi
5511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5512      if test $ac_R_nospace = yes; then
5513	echo "$as_me:5513: result: no" >&5
5514echo "${ECHO_T}no" >&6
5515	X_LIBS="$X_LIBS -R$x_libraries"
5516      else
5517	LIBS="$ac_xsave_LIBS -R $x_libraries"
5518	cat >conftest.$ac_ext <<_ACEOF
5519#line 5519 "configure"
5520#include "confdefs.h"
5521
5522int
5523main (void)
5524{
5525
5526  ;
5527  return 0;
5528}
5529_ACEOF
5530rm -f conftest.$ac_objext conftest$ac_exeext
5531if { (eval echo "$as_me:5531: \"$ac_link\"") >&5
5532  (eval $ac_link) 2>&5
5533  ac_status=$?
5534  echo "$as_me:5534: \$? = $ac_status" >&5
5535  (exit $ac_status); } &&
5536         { ac_try='test -s conftest$ac_exeext'
5537  { (eval echo "$as_me:5537: \"$ac_try\"") >&5
5538  (eval $ac_try) 2>&5
5539  ac_status=$?
5540  echo "$as_me:5540: \$? = $ac_status" >&5
5541  (exit $ac_status); }; }; then
5542  ac_R_space=yes
5543else
5544  echo "$as_me: failed program was:" >&5
5545cat conftest.$ac_ext >&5
5546ac_R_space=no
5547fi
5548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5549	if test $ac_R_space = yes; then
5550	  echo "$as_me:5550: result: yes" >&5
5551echo "${ECHO_T}yes" >&6
5552	  X_LIBS="$X_LIBS -R $x_libraries"
5553	else
5554	  echo "$as_me:5554: result: neither works" >&5
5555echo "${ECHO_T}neither works" >&6
5556	fi
5557      fi
5558      LIBS=$ac_xsave_LIBS
5559    esac
5560  fi
5561
5562  # Check for system-dependent libraries X programs must link with.
5563  # Do this before checking for the system-independent R6 libraries
5564  # (-lICE), since we may need -lsocket or whatever for X linking.
5565
5566  if test "$ISC" = yes; then
5567    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5568  else
5569    # Martyn Johnson says this is needed for Ultrix, if the X
5570    # libraries were built with DECnet support.  And Karl Berry says
5571    # the Alpha needs dnet_stub (dnet does not exist).
5572    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5573    cat >conftest.$ac_ext <<_ACEOF
5574#line 5574 "configure"
5575#include "confdefs.h"
5576
5577/* Override any gcc2 internal prototype to avoid an error.  */
5578#ifdef __cplusplus
5579extern "C"
5580#endif
5581/* We use char because int might match the return type of a gcc2
5582   builtin and then its argument prototype would still apply.  */
5583char XOpenDisplay ();
5584int
5585main (void)
5586{
5587XOpenDisplay ();
5588  ;
5589  return 0;
5590}
5591_ACEOF
5592rm -f conftest.$ac_objext conftest$ac_exeext
5593if { (eval echo "$as_me:5593: \"$ac_link\"") >&5
5594  (eval $ac_link) 2>&5
5595  ac_status=$?
5596  echo "$as_me:5596: \$? = $ac_status" >&5
5597  (exit $ac_status); } &&
5598         { ac_try='test -s conftest$ac_exeext'
5599  { (eval echo "$as_me:5599: \"$ac_try\"") >&5
5600  (eval $ac_try) 2>&5
5601  ac_status=$?
5602  echo "$as_me:5602: \$? = $ac_status" >&5
5603  (exit $ac_status); }; }; then
5604  :
5605else
5606  echo "$as_me: failed program was:" >&5
5607cat conftest.$ac_ext >&5
5608echo "$as_me:5608: checking for dnet_ntoa in -ldnet" >&5
5609echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5610if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5611  echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613  ac_check_lib_save_LIBS=$LIBS
5614LIBS="-ldnet  $LIBS"
5615cat >conftest.$ac_ext <<_ACEOF
5616#line 5616 "configure"
5617#include "confdefs.h"
5618
5619/* Override any gcc2 internal prototype to avoid an error.  */
5620#ifdef __cplusplus
5621extern "C"
5622#endif
5623/* We use char because int might match the return type of a gcc2
5624   builtin and then its argument prototype would still apply.  */
5625char dnet_ntoa ();
5626int
5627main (void)
5628{
5629dnet_ntoa ();
5630  ;
5631  return 0;
5632}
5633_ACEOF
5634rm -f conftest.$ac_objext conftest$ac_exeext
5635if { (eval echo "$as_me:5635: \"$ac_link\"") >&5
5636  (eval $ac_link) 2>&5
5637  ac_status=$?
5638  echo "$as_me:5638: \$? = $ac_status" >&5
5639  (exit $ac_status); } &&
5640         { ac_try='test -s conftest$ac_exeext'
5641  { (eval echo "$as_me:5641: \"$ac_try\"") >&5
5642  (eval $ac_try) 2>&5
5643  ac_status=$?
5644  echo "$as_me:5644: \$? = $ac_status" >&5
5645  (exit $ac_status); }; }; then
5646  ac_cv_lib_dnet_dnet_ntoa=yes
5647else
5648  echo "$as_me: failed program was:" >&5
5649cat conftest.$ac_ext >&5
5650ac_cv_lib_dnet_dnet_ntoa=no
5651fi
5652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5653LIBS=$ac_check_lib_save_LIBS
5654fi
5655echo "$as_me:5655: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5656echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5657if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5658  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5659fi
5660
5661    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5662      echo "$as_me:5662: checking for dnet_ntoa in -ldnet_stub" >&5
5663echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5664if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5665  echo $ECHO_N "(cached) $ECHO_C" >&6
5666else
5667  ac_check_lib_save_LIBS=$LIBS
5668LIBS="-ldnet_stub  $LIBS"
5669cat >conftest.$ac_ext <<_ACEOF
5670#line 5670 "configure"
5671#include "confdefs.h"
5672
5673/* Override any gcc2 internal prototype to avoid an error.  */
5674#ifdef __cplusplus
5675extern "C"
5676#endif
5677/* We use char because int might match the return type of a gcc2
5678   builtin and then its argument prototype would still apply.  */
5679char dnet_ntoa ();
5680int
5681main (void)
5682{
5683dnet_ntoa ();
5684  ;
5685  return 0;
5686}
5687_ACEOF
5688rm -f conftest.$ac_objext conftest$ac_exeext
5689if { (eval echo "$as_me:5689: \"$ac_link\"") >&5
5690  (eval $ac_link) 2>&5
5691  ac_status=$?
5692  echo "$as_me:5692: \$? = $ac_status" >&5
5693  (exit $ac_status); } &&
5694         { ac_try='test -s conftest$ac_exeext'
5695  { (eval echo "$as_me:5695: \"$ac_try\"") >&5
5696  (eval $ac_try) 2>&5
5697  ac_status=$?
5698  echo "$as_me:5698: \$? = $ac_status" >&5
5699  (exit $ac_status); }; }; then
5700  ac_cv_lib_dnet_stub_dnet_ntoa=yes
5701else
5702  echo "$as_me: failed program was:" >&5
5703cat conftest.$ac_ext >&5
5704ac_cv_lib_dnet_stub_dnet_ntoa=no
5705fi
5706rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5707LIBS=$ac_check_lib_save_LIBS
5708fi
5709echo "$as_me:5709: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5710echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5711if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5712  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5713fi
5714
5715    fi
5716fi
5717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5718    LIBS="$ac_xsave_LIBS"
5719
5720    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5721    # to get the SysV transport functions.
5722    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5723    # needs -lnsl.
5724    # The nsl library prevents programs from opening the X display
5725    # on Irix 5.2, according to T.E. Dickey.
5726    # The functions gethostbyname, getservbyname, and inet_addr are
5727    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5728    echo "$as_me:5728: checking for gethostbyname" >&5
5729echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5730if test "${ac_cv_func_gethostbyname+set}" = set; then
5731  echo $ECHO_N "(cached) $ECHO_C" >&6
5732else
5733  cat >conftest.$ac_ext <<_ACEOF
5734#line 5734 "configure"
5735#include "confdefs.h"
5736#define gethostbyname autoconf_temporary
5737#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5738#undef gethostbyname
5739
5740#ifdef __cplusplus
5741extern "C"
5742#endif
5743
5744/* We use char because int might match the return type of a gcc2
5745   builtin and then its argument prototype would still apply.  */
5746char gethostbyname (void);
5747
5748int
5749main (void)
5750{
5751
5752/* The GNU C library defines stubs for functions which it implements
5753    to always fail with ENOSYS.  Some functions are actually named
5754    something starting with __ and the normal name is an alias.  */
5755#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5756#error found stub for gethostbyname
5757#endif
5758
5759	return gethostbyname ();
5760  ;
5761  return 0;
5762}
5763_ACEOF
5764rm -f conftest.$ac_objext conftest$ac_exeext
5765if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
5766  (eval $ac_link) 2>&5
5767  ac_status=$?
5768  echo "$as_me:5768: \$? = $ac_status" >&5
5769  (exit $ac_status); } &&
5770         { ac_try='test -s conftest$ac_exeext'
5771  { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772  (eval $ac_try) 2>&5
5773  ac_status=$?
5774  echo "$as_me:5774: \$? = $ac_status" >&5
5775  (exit $ac_status); }; }; then
5776  ac_cv_func_gethostbyname=yes
5777else
5778  echo "$as_me: failed program was:" >&5
5779cat conftest.$ac_ext >&5
5780ac_cv_func_gethostbyname=no
5781fi
5782rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783fi
5784echo "$as_me:5784: result: $ac_cv_func_gethostbyname" >&5
5785echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5786
5787    if test $ac_cv_func_gethostbyname = no; then
5788      echo "$as_me:5788: checking for gethostbyname in -lnsl" >&5
5789echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5790if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5791  echo $ECHO_N "(cached) $ECHO_C" >&6
5792else
5793  ac_check_lib_save_LIBS=$LIBS
5794LIBS="-lnsl  $LIBS"
5795cat >conftest.$ac_ext <<_ACEOF
5796#line 5796 "configure"
5797#include "confdefs.h"
5798
5799/* Override any gcc2 internal prototype to avoid an error.  */
5800#ifdef __cplusplus
5801extern "C"
5802#endif
5803/* We use char because int might match the return type of a gcc2
5804   builtin and then its argument prototype would still apply.  */
5805char gethostbyname ();
5806int
5807main (void)
5808{
5809gethostbyname ();
5810  ;
5811  return 0;
5812}
5813_ACEOF
5814rm -f conftest.$ac_objext conftest$ac_exeext
5815if { (eval echo "$as_me:5815: \"$ac_link\"") >&5
5816  (eval $ac_link) 2>&5
5817  ac_status=$?
5818  echo "$as_me:5818: \$? = $ac_status" >&5
5819  (exit $ac_status); } &&
5820         { ac_try='test -s conftest$ac_exeext'
5821  { (eval echo "$as_me:5821: \"$ac_try\"") >&5
5822  (eval $ac_try) 2>&5
5823  ac_status=$?
5824  echo "$as_me:5824: \$? = $ac_status" >&5
5825  (exit $ac_status); }; }; then
5826  ac_cv_lib_nsl_gethostbyname=yes
5827else
5828  echo "$as_me: failed program was:" >&5
5829cat conftest.$ac_ext >&5
5830ac_cv_lib_nsl_gethostbyname=no
5831fi
5832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5833LIBS=$ac_check_lib_save_LIBS
5834fi
5835echo "$as_me:5835: result: $ac_cv_lib_nsl_gethostbyname" >&5
5836echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5837if test $ac_cv_lib_nsl_gethostbyname = yes; then
5838  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5839fi
5840
5841      if test $ac_cv_lib_nsl_gethostbyname = no; then
5842        echo "$as_me:5842: checking for gethostbyname in -lbsd" >&5
5843echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5844if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5845  echo $ECHO_N "(cached) $ECHO_C" >&6
5846else
5847  ac_check_lib_save_LIBS=$LIBS
5848LIBS="-lbsd  $LIBS"
5849cat >conftest.$ac_ext <<_ACEOF
5850#line 5850 "configure"
5851#include "confdefs.h"
5852
5853/* Override any gcc2 internal prototype to avoid an error.  */
5854#ifdef __cplusplus
5855extern "C"
5856#endif
5857/* We use char because int might match the return type of a gcc2
5858   builtin and then its argument prototype would still apply.  */
5859char gethostbyname ();
5860int
5861main (void)
5862{
5863gethostbyname ();
5864  ;
5865  return 0;
5866}
5867_ACEOF
5868rm -f conftest.$ac_objext conftest$ac_exeext
5869if { (eval echo "$as_me:5869: \"$ac_link\"") >&5
5870  (eval $ac_link) 2>&5
5871  ac_status=$?
5872  echo "$as_me:5872: \$? = $ac_status" >&5
5873  (exit $ac_status); } &&
5874         { ac_try='test -s conftest$ac_exeext'
5875  { (eval echo "$as_me:5875: \"$ac_try\"") >&5
5876  (eval $ac_try) 2>&5
5877  ac_status=$?
5878  echo "$as_me:5878: \$? = $ac_status" >&5
5879  (exit $ac_status); }; }; then
5880  ac_cv_lib_bsd_gethostbyname=yes
5881else
5882  echo "$as_me: failed program was:" >&5
5883cat conftest.$ac_ext >&5
5884ac_cv_lib_bsd_gethostbyname=no
5885fi
5886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5887LIBS=$ac_check_lib_save_LIBS
5888fi
5889echo "$as_me:5889: result: $ac_cv_lib_bsd_gethostbyname" >&5
5890echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5891if test $ac_cv_lib_bsd_gethostbyname = yes; then
5892  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5893fi
5894
5895      fi
5896    fi
5897
5898    # lieder@skyler.mavd.honeywell.com says without -lsocket,
5899    # socket/setsockopt and other routines are undefined under SCO ODT
5900    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5901    # on later versions), says Simon Leinen: it contains gethostby*
5902    # variants that don't use the nameserver (or something).  -lsocket
5903    # must be given before -lnsl if both are needed.  We assume that
5904    # if connect needs -lnsl, so does gethostbyname.
5905    echo "$as_me:5905: checking for connect" >&5
5906echo $ECHO_N "checking for connect... $ECHO_C" >&6
5907if test "${ac_cv_func_connect+set}" = set; then
5908  echo $ECHO_N "(cached) $ECHO_C" >&6
5909else
5910  cat >conftest.$ac_ext <<_ACEOF
5911#line 5911 "configure"
5912#include "confdefs.h"
5913#define connect autoconf_temporary
5914#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5915#undef connect
5916
5917#ifdef __cplusplus
5918extern "C"
5919#endif
5920
5921/* We use char because int might match the return type of a gcc2
5922   builtin and then its argument prototype would still apply.  */
5923char connect (void);
5924
5925int
5926main (void)
5927{
5928
5929/* The GNU C library defines stubs for functions which it implements
5930    to always fail with ENOSYS.  Some functions are actually named
5931    something starting with __ and the normal name is an alias.  */
5932#if defined (__stub_connect) || defined (__stub___connect)
5933#error found stub for connect
5934#endif
5935
5936	return connect ();
5937  ;
5938  return 0;
5939}
5940_ACEOF
5941rm -f conftest.$ac_objext conftest$ac_exeext
5942if { (eval echo "$as_me:5942: \"$ac_link\"") >&5
5943  (eval $ac_link) 2>&5
5944  ac_status=$?
5945  echo "$as_me:5945: \$? = $ac_status" >&5
5946  (exit $ac_status); } &&
5947         { ac_try='test -s conftest$ac_exeext'
5948  { (eval echo "$as_me:5948: \"$ac_try\"") >&5
5949  (eval $ac_try) 2>&5
5950  ac_status=$?
5951  echo "$as_me:5951: \$? = $ac_status" >&5
5952  (exit $ac_status); }; }; then
5953  ac_cv_func_connect=yes
5954else
5955  echo "$as_me: failed program was:" >&5
5956cat conftest.$ac_ext >&5
5957ac_cv_func_connect=no
5958fi
5959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5960fi
5961echo "$as_me:5961: result: $ac_cv_func_connect" >&5
5962echo "${ECHO_T}$ac_cv_func_connect" >&6
5963
5964    if test $ac_cv_func_connect = no; then
5965      echo "$as_me:5965: checking for connect in -lsocket" >&5
5966echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5967if test "${ac_cv_lib_socket_connect+set}" = set; then
5968  echo $ECHO_N "(cached) $ECHO_C" >&6
5969else
5970  ac_check_lib_save_LIBS=$LIBS
5971LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5972cat >conftest.$ac_ext <<_ACEOF
5973#line 5973 "configure"
5974#include "confdefs.h"
5975
5976/* Override any gcc2 internal prototype to avoid an error.  */
5977#ifdef __cplusplus
5978extern "C"
5979#endif
5980/* We use char because int might match the return type of a gcc2
5981   builtin and then its argument prototype would still apply.  */
5982char connect ();
5983int
5984main (void)
5985{
5986connect ();
5987  ;
5988  return 0;
5989}
5990_ACEOF
5991rm -f conftest.$ac_objext conftest$ac_exeext
5992if { (eval echo "$as_me:5992: \"$ac_link\"") >&5
5993  (eval $ac_link) 2>&5
5994  ac_status=$?
5995  echo "$as_me:5995: \$? = $ac_status" >&5
5996  (exit $ac_status); } &&
5997         { ac_try='test -s conftest$ac_exeext'
5998  { (eval echo "$as_me:5998: \"$ac_try\"") >&5
5999  (eval $ac_try) 2>&5
6000  ac_status=$?
6001  echo "$as_me:6001: \$? = $ac_status" >&5
6002  (exit $ac_status); }; }; then
6003  ac_cv_lib_socket_connect=yes
6004else
6005  echo "$as_me: failed program was:" >&5
6006cat conftest.$ac_ext >&5
6007ac_cv_lib_socket_connect=no
6008fi
6009rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6010LIBS=$ac_check_lib_save_LIBS
6011fi
6012echo "$as_me:6012: result: $ac_cv_lib_socket_connect" >&5
6013echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6014if test $ac_cv_lib_socket_connect = yes; then
6015  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6016fi
6017
6018    fi
6019
6020    # Guillermo Gomez says -lposix is necessary on A/UX.
6021    echo "$as_me:6021: checking for remove" >&5
6022echo $ECHO_N "checking for remove... $ECHO_C" >&6
6023if test "${ac_cv_func_remove+set}" = set; then
6024  echo $ECHO_N "(cached) $ECHO_C" >&6
6025else
6026  cat >conftest.$ac_ext <<_ACEOF
6027#line 6027 "configure"
6028#include "confdefs.h"
6029#define remove autoconf_temporary
6030#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6031#undef remove
6032
6033#ifdef __cplusplus
6034extern "C"
6035#endif
6036
6037/* We use char because int might match the return type of a gcc2
6038   builtin and then its argument prototype would still apply.  */
6039char remove (void);
6040
6041int
6042main (void)
6043{
6044
6045/* The GNU C library defines stubs for functions which it implements
6046    to always fail with ENOSYS.  Some functions are actually named
6047    something starting with __ and the normal name is an alias.  */
6048#if defined (__stub_remove) || defined (__stub___remove)
6049#error found stub for remove
6050#endif
6051
6052	return remove ();
6053  ;
6054  return 0;
6055}
6056_ACEOF
6057rm -f conftest.$ac_objext conftest$ac_exeext
6058if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059  (eval $ac_link) 2>&5
6060  ac_status=$?
6061  echo "$as_me:6061: \$? = $ac_status" >&5
6062  (exit $ac_status); } &&
6063         { ac_try='test -s conftest$ac_exeext'
6064  { (eval echo "$as_me:6064: \"$ac_try\"") >&5
6065  (eval $ac_try) 2>&5
6066  ac_status=$?
6067  echo "$as_me:6067: \$? = $ac_status" >&5
6068  (exit $ac_status); }; }; then
6069  ac_cv_func_remove=yes
6070else
6071  echo "$as_me: failed program was:" >&5
6072cat conftest.$ac_ext >&5
6073ac_cv_func_remove=no
6074fi
6075rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6076fi
6077echo "$as_me:6077: result: $ac_cv_func_remove" >&5
6078echo "${ECHO_T}$ac_cv_func_remove" >&6
6079
6080    if test $ac_cv_func_remove = no; then
6081      echo "$as_me:6081: checking for remove in -lposix" >&5
6082echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6083if test "${ac_cv_lib_posix_remove+set}" = set; then
6084  echo $ECHO_N "(cached) $ECHO_C" >&6
6085else
6086  ac_check_lib_save_LIBS=$LIBS
6087LIBS="-lposix  $LIBS"
6088cat >conftest.$ac_ext <<_ACEOF
6089#line 6089 "configure"
6090#include "confdefs.h"
6091
6092/* Override any gcc2 internal prototype to avoid an error.  */
6093#ifdef __cplusplus
6094extern "C"
6095#endif
6096/* We use char because int might match the return type of a gcc2
6097   builtin and then its argument prototype would still apply.  */
6098char remove ();
6099int
6100main (void)
6101{
6102remove ();
6103  ;
6104  return 0;
6105}
6106_ACEOF
6107rm -f conftest.$ac_objext conftest$ac_exeext
6108if { (eval echo "$as_me:6108: \"$ac_link\"") >&5
6109  (eval $ac_link) 2>&5
6110  ac_status=$?
6111  echo "$as_me:6111: \$? = $ac_status" >&5
6112  (exit $ac_status); } &&
6113         { ac_try='test -s conftest$ac_exeext'
6114  { (eval echo "$as_me:6114: \"$ac_try\"") >&5
6115  (eval $ac_try) 2>&5
6116  ac_status=$?
6117  echo "$as_me:6117: \$? = $ac_status" >&5
6118  (exit $ac_status); }; }; then
6119  ac_cv_lib_posix_remove=yes
6120else
6121  echo "$as_me: failed program was:" >&5
6122cat conftest.$ac_ext >&5
6123ac_cv_lib_posix_remove=no
6124fi
6125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6126LIBS=$ac_check_lib_save_LIBS
6127fi
6128echo "$as_me:6128: result: $ac_cv_lib_posix_remove" >&5
6129echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6130if test $ac_cv_lib_posix_remove = yes; then
6131  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6132fi
6133
6134    fi
6135
6136    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6137    echo "$as_me:6137: checking for shmat" >&5
6138echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6139if test "${ac_cv_func_shmat+set}" = set; then
6140  echo $ECHO_N "(cached) $ECHO_C" >&6
6141else
6142  cat >conftest.$ac_ext <<_ACEOF
6143#line 6143 "configure"
6144#include "confdefs.h"
6145#define shmat autoconf_temporary
6146#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6147#undef shmat
6148
6149#ifdef __cplusplus
6150extern "C"
6151#endif
6152
6153/* We use char because int might match the return type of a gcc2
6154   builtin and then its argument prototype would still apply.  */
6155char shmat (void);
6156
6157int
6158main (void)
6159{
6160
6161/* The GNU C library defines stubs for functions which it implements
6162    to always fail with ENOSYS.  Some functions are actually named
6163    something starting with __ and the normal name is an alias.  */
6164#if defined (__stub_shmat) || defined (__stub___shmat)
6165#error found stub for shmat
6166#endif
6167
6168	return shmat ();
6169  ;
6170  return 0;
6171}
6172_ACEOF
6173rm -f conftest.$ac_objext conftest$ac_exeext
6174if { (eval echo "$as_me:6174: \"$ac_link\"") >&5
6175  (eval $ac_link) 2>&5
6176  ac_status=$?
6177  echo "$as_me:6177: \$? = $ac_status" >&5
6178  (exit $ac_status); } &&
6179         { ac_try='test -s conftest$ac_exeext'
6180  { (eval echo "$as_me:6180: \"$ac_try\"") >&5
6181  (eval $ac_try) 2>&5
6182  ac_status=$?
6183  echo "$as_me:6183: \$? = $ac_status" >&5
6184  (exit $ac_status); }; }; then
6185  ac_cv_func_shmat=yes
6186else
6187  echo "$as_me: failed program was:" >&5
6188cat conftest.$ac_ext >&5
6189ac_cv_func_shmat=no
6190fi
6191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6192fi
6193echo "$as_me:6193: result: $ac_cv_func_shmat" >&5
6194echo "${ECHO_T}$ac_cv_func_shmat" >&6
6195
6196    if test $ac_cv_func_shmat = no; then
6197      echo "$as_me:6197: checking for shmat in -lipc" >&5
6198echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6199if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6200  echo $ECHO_N "(cached) $ECHO_C" >&6
6201else
6202  ac_check_lib_save_LIBS=$LIBS
6203LIBS="-lipc  $LIBS"
6204cat >conftest.$ac_ext <<_ACEOF
6205#line 6205 "configure"
6206#include "confdefs.h"
6207
6208/* Override any gcc2 internal prototype to avoid an error.  */
6209#ifdef __cplusplus
6210extern "C"
6211#endif
6212/* We use char because int might match the return type of a gcc2
6213   builtin and then its argument prototype would still apply.  */
6214char shmat ();
6215int
6216main (void)
6217{
6218shmat ();
6219  ;
6220  return 0;
6221}
6222_ACEOF
6223rm -f conftest.$ac_objext conftest$ac_exeext
6224if { (eval echo "$as_me:6224: \"$ac_link\"") >&5
6225  (eval $ac_link) 2>&5
6226  ac_status=$?
6227  echo "$as_me:6227: \$? = $ac_status" >&5
6228  (exit $ac_status); } &&
6229         { ac_try='test -s conftest$ac_exeext'
6230  { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6231  (eval $ac_try) 2>&5
6232  ac_status=$?
6233  echo "$as_me:6233: \$? = $ac_status" >&5
6234  (exit $ac_status); }; }; then
6235  ac_cv_lib_ipc_shmat=yes
6236else
6237  echo "$as_me: failed program was:" >&5
6238cat conftest.$ac_ext >&5
6239ac_cv_lib_ipc_shmat=no
6240fi
6241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6242LIBS=$ac_check_lib_save_LIBS
6243fi
6244echo "$as_me:6244: result: $ac_cv_lib_ipc_shmat" >&5
6245echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6246if test $ac_cv_lib_ipc_shmat = yes; then
6247  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6248fi
6249
6250    fi
6251  fi
6252
6253  # Check for libraries that X11R6 Xt/Xaw programs need.
6254  ac_save_LDFLAGS=$LDFLAGS
6255  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6256  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6257  # check for ICE first), but we must link in the order -lSM -lICE or
6258  # we get undefined symbols.  So assume we have SM if we have ICE.
6259  # These have to be linked with before -lX11, unlike the other
6260  # libraries we check for below, so use a different variable.
6261  # John Interrante, Karl Berry
6262  echo "$as_me:6262: checking for IceConnectionNumber in -lICE" >&5
6263echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6264if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6265  echo $ECHO_N "(cached) $ECHO_C" >&6
6266else
6267  ac_check_lib_save_LIBS=$LIBS
6268LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6269cat >conftest.$ac_ext <<_ACEOF
6270#line 6270 "configure"
6271#include "confdefs.h"
6272
6273/* Override any gcc2 internal prototype to avoid an error.  */
6274#ifdef __cplusplus
6275extern "C"
6276#endif
6277/* We use char because int might match the return type of a gcc2
6278   builtin and then its argument prototype would still apply.  */
6279char IceConnectionNumber ();
6280int
6281main (void)
6282{
6283IceConnectionNumber ();
6284  ;
6285  return 0;
6286}
6287_ACEOF
6288rm -f conftest.$ac_objext conftest$ac_exeext
6289if { (eval echo "$as_me:6289: \"$ac_link\"") >&5
6290  (eval $ac_link) 2>&5
6291  ac_status=$?
6292  echo "$as_me:6292: \$? = $ac_status" >&5
6293  (exit $ac_status); } &&
6294         { ac_try='test -s conftest$ac_exeext'
6295  { (eval echo "$as_me:6295: \"$ac_try\"") >&5
6296  (eval $ac_try) 2>&5
6297  ac_status=$?
6298  echo "$as_me:6298: \$? = $ac_status" >&5
6299  (exit $ac_status); }; }; then
6300  ac_cv_lib_ICE_IceConnectionNumber=yes
6301else
6302  echo "$as_me: failed program was:" >&5
6303cat conftest.$ac_ext >&5
6304ac_cv_lib_ICE_IceConnectionNumber=no
6305fi
6306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6307LIBS=$ac_check_lib_save_LIBS
6308fi
6309echo "$as_me:6309: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6310echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6311if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6312  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6313fi
6314
6315  LDFLAGS=$ac_save_LDFLAGS
6316
6317fi
6318
6319fi
6320
6321if ( test "$GCC" = yes || test "$GXX" = yes )
6322then
6323
6324if ( test "$GCC" = yes || test "$GXX" = yes )
6325then
6326	case $CFLAGS in
6327	(*-Werror=*)
6328		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
6329
6330echo "${as_me:-configure}:6330: testing repairing CFLAGS: $CFLAGS ..." 1>&5
6331
6332		cf_temp_flags=
6333		for cf_temp_scan in $CFLAGS
6334		do
6335			case "x$cf_temp_scan" in
6336			(x-Werror=*)
6337
6338	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6339	EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
6340
6341				;;
6342			(*)
6343
6344	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6345	cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
6346
6347				;;
6348			esac
6349		done
6350		CFLAGS="$cf_temp_flags"
6351		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
6352
6353echo "${as_me:-configure}:6353: testing ... fixed $CFLAGS ..." 1>&5
6354
6355		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
6356
6357echo "${as_me:-configure}:6357: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6358
6359		;;
6360	esac
6361fi
6362
6363if ( test "$GCC" = yes || test "$GXX" = yes )
6364then
6365	case $CPPFLAGS in
6366	(*-Werror=*)
6367		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
6368
6369echo "${as_me:-configure}:6369: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
6370
6371		cf_temp_flags=
6372		for cf_temp_scan in $CPPFLAGS
6373		do
6374			case "x$cf_temp_scan" in
6375			(x-Werror=*)
6376
6377	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6378	EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
6379
6380				;;
6381			(*)
6382
6383	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6384	cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
6385
6386				;;
6387			esac
6388		done
6389		CPPFLAGS="$cf_temp_flags"
6390		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
6391
6392echo "${as_me:-configure}:6392: testing ... fixed $CPPFLAGS ..." 1>&5
6393
6394		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
6395
6396echo "${as_me:-configure}:6396: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6397
6398		;;
6399	esac
6400fi
6401
6402if ( test "$GCC" = yes || test "$GXX" = yes )
6403then
6404	case $LDFLAGS in
6405	(*-Werror=*)
6406		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
6407
6408echo "${as_me:-configure}:6408: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
6409
6410		cf_temp_flags=
6411		for cf_temp_scan in $LDFLAGS
6412		do
6413			case "x$cf_temp_scan" in
6414			(x-Werror=*)
6415
6416	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6417	EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
6418
6419				;;
6420			(*)
6421
6422	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6423	cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
6424
6425				;;
6426			esac
6427		done
6428		LDFLAGS="$cf_temp_flags"
6429		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
6430
6431echo "${as_me:-configure}:6431: testing ... fixed $LDFLAGS ..." 1>&5
6432
6433		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
6434
6435echo "${as_me:-configure}:6435: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6436
6437		;;
6438	esac
6439fi
6440
6441echo "$as_me:6441: checking if you want to turn on gcc warnings" >&5
6442echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
6443
6444# Check whether --enable-warnings or --disable-warnings was given.
6445if test "${enable_warnings+set}" = set; then
6446  enableval="$enable_warnings"
6447  test "$enableval" != yes && enableval=no
6448	if test "$enableval" != "no" ; then
6449    with_warnings=yes
6450	else
6451		with_warnings=no
6452	fi
6453else
6454  enableval=no
6455	with_warnings=no
6456
6457fi;
6458echo "$as_me:6458: result: $with_warnings" >&5
6459echo "${ECHO_T}$with_warnings" >&6
6460if test "$with_warnings" = "yes"
6461then
6462
6463if ( test "$GCC" = yes || test "$GXX" = yes )
6464then
6465cat > conftest.i <<EOF
6466#ifndef GCC_PRINTF
6467#define GCC_PRINTF 0
6468#endif
6469#ifndef GCC_SCANF
6470#define GCC_SCANF 0
6471#endif
6472#ifndef GCC_NORETURN
6473#define GCC_NORETURN /* nothing */
6474#endif
6475#ifndef GCC_UNUSED
6476#define GCC_UNUSED /* nothing */
6477#endif
6478EOF
6479if test "$GCC" = yes
6480then
6481	{ echo "$as_me:6481: checking for $CC __attribute__ directives..." >&5
6482echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
6483cat > conftest.$ac_ext <<EOF
6484#line 6484 "${as_me:-configure}"
6485#include "confdefs.h"
6486#include "conftest.h"
6487#include "conftest.i"
6488#if	GCC_PRINTF
6489#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
6490#else
6491#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
6492#endif
6493#if	GCC_SCANF
6494#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
6495#else
6496#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
6497#endif
6498extern void wow(char *,...) GCC_SCANFLIKE(1,2);
6499extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
6500extern void foo(void) GCC_NORETURN;
6501int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
6502EOF
6503	cf_printf_attribute=no
6504	cf_scanf_attribute=no
6505	for cf_attribute in scanf printf unused noreturn
6506	do
6507
6508cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6509
6510		cf_directive="__attribute__(($cf_attribute))"
6511		echo "checking for $CC $cf_directive" 1>&5
6512
6513		case $cf_attribute in
6514		(printf)
6515			cf_printf_attribute=yes
6516			cat >conftest.h <<EOF
6517#define GCC_$cf_ATTRIBUTE 1
6518EOF
6519			;;
6520		(scanf)
6521			cf_scanf_attribute=yes
6522			cat >conftest.h <<EOF
6523#define GCC_$cf_ATTRIBUTE 1
6524EOF
6525			;;
6526		(*)
6527			cat >conftest.h <<EOF
6528#define GCC_$cf_ATTRIBUTE $cf_directive
6529EOF
6530			;;
6531		esac
6532
6533		if { (eval echo "$as_me:6533: \"$ac_compile\"") >&5
6534  (eval $ac_compile) 2>&5
6535  ac_status=$?
6536  echo "$as_me:6536: \$? = $ac_status" >&5
6537  (exit $ac_status); }; then
6538			test -n "$verbose" && echo "$as_me:6538: result: ... $cf_attribute" >&5
6539echo "${ECHO_T}... $cf_attribute" >&6
6540			cat conftest.h >>confdefs.h
6541			case $cf_attribute in
6542			(noreturn)
6543
6544cat >>confdefs.h <<EOF
6545#define GCC_NORETURN $cf_directive
6546EOF
6547
6548				;;
6549			(printf)
6550				cf_value='/* nothing */'
6551				if test "$cf_printf_attribute" != no ; then
6552					cf_value='__attribute__((format(printf,fmt,var)))'
6553
6554cat >>confdefs.h <<\EOF
6555#define GCC_PRINTF 1
6556EOF
6557
6558				fi
6559
6560cat >>confdefs.h <<EOF
6561#define GCC_PRINTFLIKE(fmt,var) $cf_value
6562EOF
6563
6564				;;
6565			(scanf)
6566				cf_value='/* nothing */'
6567				if test "$cf_scanf_attribute" != no ; then
6568					cf_value='__attribute__((format(scanf,fmt,var)))'
6569
6570cat >>confdefs.h <<\EOF
6571#define GCC_SCANF 1
6572EOF
6573
6574				fi
6575
6576cat >>confdefs.h <<EOF
6577#define GCC_SCANFLIKE(fmt,var) $cf_value
6578EOF
6579
6580				;;
6581			(unused)
6582
6583cat >>confdefs.h <<EOF
6584#define GCC_UNUSED $cf_directive
6585EOF
6586
6587				;;
6588			esac
6589		fi
6590	done
6591else
6592	fgrep define conftest.i >>confdefs.h
6593fi
6594rm -rf conftest*
6595fi
6596
6597if test "x$have_x" = xyes; then
6598
6599cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
6600cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
6601cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
6602LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
6603for cf_X_CFLAGS in $X_CFLAGS
6604do
6605	case "x$cf_X_CFLAGS" in
6606	x-[IUD]*)
6607		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
6608		;;
6609	*)
6610		CFLAGS="$CFLAGS $cf_X_CFLAGS"
6611		;;
6612	esac
6613done
6614
6615cat >conftest.$ac_ext <<_ACEOF
6616#line 6616 "configure"
6617#include "confdefs.h"
6618
6619#include <stdlib.h>
6620#include <X11/Intrinsic.h>
6621
6622int
6623main (void)
6624{
6625String foo = malloc(1); (void)foo
6626  ;
6627  return 0;
6628}
6629_ACEOF
6630rm -f conftest.$ac_objext
6631if { (eval echo "$as_me:6631: \"$ac_compile\"") >&5
6632  (eval $ac_compile) 2>&5
6633  ac_status=$?
6634  echo "$as_me:6634: \$? = $ac_status" >&5
6635  (exit $ac_status); } &&
6636         { ac_try='test -s conftest.$ac_objext'
6637  { (eval echo "$as_me:6637: \"$ac_try\"") >&5
6638  (eval $ac_try) 2>&5
6639  ac_status=$?
6640  echo "$as_me:6640: \$? = $ac_status" >&5
6641  (exit $ac_status); }; }; then
6642
6643echo "$as_me:6643: checking for X11/Xt const-feature" >&5
6644echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
6645if test "${cf_cv_const_x_string+set}" = set; then
6646  echo $ECHO_N "(cached) $ECHO_C" >&6
6647else
6648
6649	cat >conftest.$ac_ext <<_ACEOF
6650#line 6650 "configure"
6651#include "confdefs.h"
6652
6653#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
6654#undef  XTSTRINGDEFINES	/* X11R5 and later */
6655#include <stdlib.h>
6656#include <X11/Intrinsic.h>
6657
6658int
6659main (void)
6660{
6661String foo = malloc(1); *foo = 0
6662  ;
6663  return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext
6667if { (eval echo "$as_me:6667: \"$ac_compile\"") >&5
6668  (eval $ac_compile) 2>&5
6669  ac_status=$?
6670  echo "$as_me:6670: \$? = $ac_status" >&5
6671  (exit $ac_status); } &&
6672         { ac_try='test -s conftest.$ac_objext'
6673  { (eval echo "$as_me:6673: \"$ac_try\"") >&5
6674  (eval $ac_try) 2>&5
6675  ac_status=$?
6676  echo "$as_me:6676: \$? = $ac_status" >&5
6677  (exit $ac_status); }; }; then
6678
6679			cf_cv_const_x_string=no
6680
6681else
6682  echo "$as_me: failed program was:" >&5
6683cat conftest.$ac_ext >&5
6684
6685			cf_cv_const_x_string=yes
6686
6687fi
6688rm -f conftest.$ac_objext conftest.$ac_ext
6689
6690fi
6691echo "$as_me:6691: result: $cf_cv_const_x_string" >&5
6692echo "${ECHO_T}$cf_cv_const_x_string" >&6
6693
6694LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
6695CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
6696CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
6697
6698case $cf_cv_const_x_string in
6699(no)
6700
6701	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6702	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
6703
6704	;;
6705(*)
6706
6707	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6708	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
6709
6710	;;
6711esac
6712
6713else
6714  echo "$as_me: failed program was:" >&5
6715cat conftest.$ac_ext >&5
6716fi
6717rm -f conftest.$ac_objext conftest.$ac_ext
6718 fi
6719cat > conftest.$ac_ext <<EOF
6720#line 6720 "${as_me:-configure}"
6721int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
6722EOF
6723if test "$INTEL_COMPILER" = yes
6724then
6725# The "-wdXXX" options suppress warnings:
6726# remark #1419: external declaration in primary source file
6727# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
6728# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
6729# remark #193: zero used for undefined preprocessing identifier
6730# remark #593: variable "curs_sb_left_arrow" was set but never used
6731# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
6732# remark #869: parameter "tw" was never referenced
6733# remark #981: operands are evaluated in unspecified order
6734# warning #279: controlling expression is constant
6735
6736	{ echo "$as_me:6736: checking for $CC warning options..." >&5
6737echo "$as_me: checking for $CC warning options..." >&6;}
6738	cf_save_CFLAGS="$CFLAGS"
6739	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
6740	for cf_opt in \
6741		wd1419 \
6742		wd1683 \
6743		wd1684 \
6744		wd193 \
6745		wd593 \
6746		wd279 \
6747		wd810 \
6748		wd869 \
6749		wd981
6750	do
6751		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
6752		if { (eval echo "$as_me:6752: \"$ac_compile\"") >&5
6753  (eval $ac_compile) 2>&5
6754  ac_status=$?
6755  echo "$as_me:6755: \$? = $ac_status" >&5
6756  (exit $ac_status); }; then
6757			test -n "$verbose" && echo "$as_me:6757: result: ... -$cf_opt" >&5
6758echo "${ECHO_T}... -$cf_opt" >&6
6759			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
6760		fi
6761	done
6762	CFLAGS="$cf_save_CFLAGS"
6763elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
6764then
6765	{ echo "$as_me:6765: checking for $CC warning options..." >&5
6766echo "$as_me: checking for $CC warning options..." >&6;}
6767	cf_save_CFLAGS="$CFLAGS"
6768	cf_warn_CONST=""
6769	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
6770	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
6771	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
6772	for cf_opt in W Wall \
6773		Wbad-function-cast \
6774		Wcast-align \
6775		Wcast-qual \
6776		Wdeclaration-after-statement \
6777		Wextra \
6778		Winline \
6779		Wmissing-declarations \
6780		Wmissing-prototypes \
6781		Wnested-externs \
6782		Wpointer-arith \
6783		Wshadow \
6784		Wstrict-prototypes \
6785		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
6786	do
6787		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
6788		if { (eval echo "$as_me:6788: \"$ac_compile\"") >&5
6789  (eval $ac_compile) 2>&5
6790  ac_status=$?
6791  echo "$as_me:6791: \$? = $ac_status" >&5
6792  (exit $ac_status); }; then
6793			test -n "$verbose" && echo "$as_me:6793: result: ... -$cf_opt" >&5
6794echo "${ECHO_T}... -$cf_opt" >&6
6795			case $cf_opt in
6796			(Winline)
6797				case $GCC_VERSION in
6798				([34].*)
6799					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
6800
6801echo "${as_me:-configure}:6801: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
6802
6803					continue;;
6804				esac
6805				;;
6806			(Wpointer-arith)
6807				case $GCC_VERSION in
6808				([12].*)
6809					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
6810
6811echo "${as_me:-configure}:6811: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
6812
6813					continue;;
6814				esac
6815				;;
6816			esac
6817			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
6818		fi
6819	done
6820	CFLAGS="$cf_save_CFLAGS"
6821fi
6822rm -rf conftest*
6823
6824fi
6825
6826fi
6827
6828echo "$as_me:6828: checking if you want to use pkg-config" >&5
6829echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6830
6831# Check whether --with-pkg-config or --without-pkg-config was given.
6832if test "${with_pkg_config+set}" = set; then
6833  withval="$with_pkg_config"
6834  cf_pkg_config=$withval
6835else
6836  cf_pkg_config=yes
6837fi;
6838echo "$as_me:6838: result: $cf_pkg_config" >&5
6839echo "${ECHO_T}$cf_pkg_config" >&6
6840
6841case $cf_pkg_config in
6842(no)
6843	PKG_CONFIG=none
6844	;;
6845(yes)
6846
6847if test -n "$ac_tool_prefix"; then
6848  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6849set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6850echo "$as_me:6850: checking for $ac_word" >&5
6851echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6852if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6853  echo $ECHO_N "(cached) $ECHO_C" >&6
6854else
6855  case $PKG_CONFIG in
6856  [\\/]* | ?:[\\/]*)
6857  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6858  ;;
6859  *)
6860  ac_save_IFS=$IFS; IFS=$ac_path_separator
6861ac_dummy="$PATH"
6862for ac_dir in $ac_dummy; do
6863  IFS=$ac_save_IFS
6864  test -z "$ac_dir" && ac_dir=.
6865  if $as_executable_p "$ac_dir/$ac_word"; then
6866   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6867   echo "$as_me:6867: found $ac_dir/$ac_word" >&5
6868   break
6869fi
6870done
6871
6872  ;;
6873esac
6874fi
6875PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6876
6877if test -n "$PKG_CONFIG"; then
6878  echo "$as_me:6878: result: $PKG_CONFIG" >&5
6879echo "${ECHO_T}$PKG_CONFIG" >&6
6880else
6881  echo "$as_me:6881: result: no" >&5
6882echo "${ECHO_T}no" >&6
6883fi
6884
6885fi
6886if test -z "$ac_cv_path_PKG_CONFIG"; then
6887  ac_pt_PKG_CONFIG=$PKG_CONFIG
6888  # Extract the first word of "pkg-config", so it can be a program name with args.
6889set dummy pkg-config; ac_word=$2
6890echo "$as_me:6890: checking for $ac_word" >&5
6891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6892if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6893  echo $ECHO_N "(cached) $ECHO_C" >&6
6894else
6895  case $ac_pt_PKG_CONFIG in
6896  [\\/]* | ?:[\\/]*)
6897  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6898  ;;
6899  *)
6900  ac_save_IFS=$IFS; IFS=$ac_path_separator
6901ac_dummy="$PATH"
6902for ac_dir in $ac_dummy; do
6903  IFS=$ac_save_IFS
6904  test -z "$ac_dir" && ac_dir=.
6905  if $as_executable_p "$ac_dir/$ac_word"; then
6906   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6907   echo "$as_me:6907: found $ac_dir/$ac_word" >&5
6908   break
6909fi
6910done
6911
6912  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6913  ;;
6914esac
6915fi
6916ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6917
6918if test -n "$ac_pt_PKG_CONFIG"; then
6919  echo "$as_me:6919: result: $ac_pt_PKG_CONFIG" >&5
6920echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6921else
6922  echo "$as_me:6922: result: no" >&5
6923echo "${ECHO_T}no" >&6
6924fi
6925
6926  PKG_CONFIG=$ac_pt_PKG_CONFIG
6927else
6928  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6929fi
6930
6931	;;
6932(*)
6933	PKG_CONFIG=$withval
6934	;;
6935esac
6936
6937test -z "$PKG_CONFIG" && PKG_CONFIG=none
6938if test "$PKG_CONFIG" != none ; then
6939
6940if test "x$prefix" != xNONE; then
6941	cf_path_syntax="$prefix"
6942else
6943	cf_path_syntax="$ac_default_prefix"
6944fi
6945
6946case ".$PKG_CONFIG" in
6947(.\$\(*\)*|.\'*\'*)
6948	;;
6949(..|./*|.\\*)
6950	;;
6951(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6952	;;
6953(.\${*prefix}*|.\${*dir}*)
6954	eval PKG_CONFIG="$PKG_CONFIG"
6955	case ".$PKG_CONFIG" in
6956	(.NONE/*)
6957		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6958		;;
6959	esac
6960	;;
6961(.no|.NONE/*)
6962	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6963	;;
6964(*)
6965	{ { echo "$as_me:6965: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6966echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6967   { (exit 1); exit 1; }; }
6968	;;
6969esac
6970
6971elif test "x$cf_pkg_config" != xno ; then
6972	{ echo "$as_me:6972: WARNING: pkg-config is not installed" >&5
6973echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6974fi
6975
6976echo "$as_me:6976: checking if rpath option should be used" >&5
6977echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6978
6979# Check whether --enable-rpath or --disable-rpath was given.
6980if test "${enable_rpath+set}" = set; then
6981  enableval="$enable_rpath"
6982  cf_cv_enable_rpath=$enableval
6983else
6984  cf_cv_enable_rpath=no
6985fi;
6986echo "$as_me:6986: result: $cf_cv_enable_rpath" >&5
6987echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6988
6989LD_RPATH_OPT=
6990if test "x$cf_cv_enable_rpath" != xno
6991then
6992	echo "$as_me:6992: checking for an rpath option" >&5
6993echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6994	case $cf_cv_system_name in
6995	(irix*)
6996		if test "$GCC" = yes; then
6997			LD_RPATH_OPT="-Wl,-rpath,"
6998		else
6999			LD_RPATH_OPT="-rpath "
7000		fi
7001		;;
7002	(linux*|gnu*|k*bsd*-gnu|freebsd*)
7003		LD_RPATH_OPT="-Wl,-rpath,"
7004		;;
7005	(openbsd[2-9].*|mirbsd*)
7006		LD_RPATH_OPT="-Wl,-rpath,"
7007		;;
7008	(dragonfly*)
7009		LD_RPATH_OPT="-rpath "
7010		;;
7011	(netbsd*)
7012		LD_RPATH_OPT="-Wl,-rpath,"
7013		;;
7014	(osf*|mls+*)
7015		LD_RPATH_OPT="-rpath "
7016		;;
7017	(solaris2*)
7018		LD_RPATH_OPT="-R"
7019		;;
7020	(*)
7021		;;
7022	esac
7023	echo "$as_me:7023: result: $LD_RPATH_OPT" >&5
7024echo "${ECHO_T}$LD_RPATH_OPT" >&6
7025
7026	case "x$LD_RPATH_OPT" in
7027	(x-R*)
7028		echo "$as_me:7028: checking if we need a space after rpath option" >&5
7029echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7030		cf_save_LIBS="$LIBS"
7031
7032cf_add_libs="$LIBS"
7033# reverse order
7034cf_add_0lib=
7035for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7036# filter duplicates
7037for cf_add_1lib in $cf_add_0lib; do
7038	for cf_add_2lib in $cf_add_libs; do
7039		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7040			cf_add_1lib=
7041			break
7042		fi
7043	done
7044	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7045done
7046LIBS="$cf_add_libs"
7047
7048		cat >conftest.$ac_ext <<_ACEOF
7049#line 7049 "configure"
7050#include "confdefs.h"
7051
7052int
7053main (void)
7054{
7055
7056  ;
7057  return 0;
7058}
7059_ACEOF
7060rm -f conftest.$ac_objext conftest$ac_exeext
7061if { (eval echo "$as_me:7061: \"$ac_link\"") >&5
7062  (eval $ac_link) 2>&5
7063  ac_status=$?
7064  echo "$as_me:7064: \$? = $ac_status" >&5
7065  (exit $ac_status); } &&
7066         { ac_try='test -s conftest$ac_exeext'
7067  { (eval echo "$as_me:7067: \"$ac_try\"") >&5
7068  (eval $ac_try) 2>&5
7069  ac_status=$?
7070  echo "$as_me:7070: \$? = $ac_status" >&5
7071  (exit $ac_status); }; }; then
7072  cf_rpath_space=no
7073else
7074  echo "$as_me: failed program was:" >&5
7075cat conftest.$ac_ext >&5
7076cf_rpath_space=yes
7077fi
7078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7079		LIBS="$cf_save_LIBS"
7080		echo "$as_me:7080: result: $cf_rpath_space" >&5
7081echo "${ECHO_T}$cf_rpath_space" >&6
7082		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7083		;;
7084	esac
7085fi
7086
7087echo "$as_me:7087: checking if rpath-hack should be disabled" >&5
7088echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7089
7090# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7091if test "${enable_rpath_hack+set}" = set; then
7092  enableval="$enable_rpath_hack"
7093  test "$enableval" != no && enableval=yes
7094	if test "$enableval" != "yes" ; then
7095    cf_disable_rpath_hack=yes
7096	else
7097		cf_disable_rpath_hack=no
7098	fi
7099else
7100  enableval=yes
7101	cf_disable_rpath_hack=no
7102
7103fi;
7104echo "$as_me:7104: result: $cf_disable_rpath_hack" >&5
7105echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7106if test "$cf_disable_rpath_hack" = no ; then
7107
7108echo "$as_me:7108: checking for updated LDFLAGS" >&5
7109echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7110if test -n "$LD_RPATH_OPT" ; then
7111	echo "$as_me:7111: result: maybe" >&5
7112echo "${ECHO_T}maybe" >&6
7113
7114	for ac_prog in ldd
7115do
7116  # Extract the first word of "$ac_prog", so it can be a program name with args.
7117set dummy $ac_prog; ac_word=$2
7118echo "$as_me:7118: checking for $ac_word" >&5
7119echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7120if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7121  echo $ECHO_N "(cached) $ECHO_C" >&6
7122else
7123  if test -n "$cf_ldd_prog"; then
7124  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7125else
7126  ac_save_IFS=$IFS; IFS=$ac_path_separator
7127ac_dummy="$PATH"
7128for ac_dir in $ac_dummy; do
7129  IFS=$ac_save_IFS
7130  test -z "$ac_dir" && ac_dir=.
7131  $as_executable_p "$ac_dir/$ac_word" || continue
7132ac_cv_prog_cf_ldd_prog="$ac_prog"
7133echo "$as_me:7133: found $ac_dir/$ac_word" >&5
7134break
7135done
7136
7137fi
7138fi
7139cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7140if test -n "$cf_ldd_prog"; then
7141  echo "$as_me:7141: result: $cf_ldd_prog" >&5
7142echo "${ECHO_T}$cf_ldd_prog" >&6
7143else
7144  echo "$as_me:7144: result: no" >&5
7145echo "${ECHO_T}no" >&6
7146fi
7147
7148  test -n "$cf_ldd_prog" && break
7149done
7150test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7151
7152	cf_rpath_list="/usr/lib /lib"
7153	if test "$cf_ldd_prog" != no
7154	then
7155		cf_rpath_oops=
7156
7157cat >conftest.$ac_ext <<_ACEOF
7158#line 7158 "configure"
7159#include "confdefs.h"
7160#include <stdio.h>
7161int
7162main (void)
7163{
7164printf("Hello");
7165  ;
7166  return 0;
7167}
7168_ACEOF
7169rm -f conftest.$ac_objext conftest$ac_exeext
7170if { (eval echo "$as_me:7170: \"$ac_link\"") >&5
7171  (eval $ac_link) 2>&5
7172  ac_status=$?
7173  echo "$as_me:7173: \$? = $ac_status" >&5
7174  (exit $ac_status); } &&
7175         { ac_try='test -s conftest$ac_exeext'
7176  { (eval echo "$as_me:7176: \"$ac_try\"") >&5
7177  (eval $ac_try) 2>&5
7178  ac_status=$?
7179  echo "$as_me:7179: \$? = $ac_status" >&5
7180  (exit $ac_status); }; }; then
7181  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7182		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7183else
7184  echo "$as_me: failed program was:" >&5
7185cat conftest.$ac_ext >&5
7186fi
7187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7188
7189		# If we passed the link-test, but get a "not found" on a given library,
7190		# this could be due to inept reconfiguration of gcc to make it only
7191		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7192		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
7193		# /usr/local libraries.
7194		if test -n "$cf_rpath_oops"
7195		then
7196			for cf_rpath_src in $cf_rpath_oops
7197			do
7198				for cf_rpath_dir in \
7199					/usr/local \
7200					/usr/pkg \
7201					/opt/sfw
7202				do
7203					if test -f $cf_rpath_dir/lib/$cf_rpath_src
7204					then
7205						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7206
7207echo "${as_me:-configure}:7207: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7208
7209						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7210						break
7211					fi
7212				done
7213			done
7214		fi
7215	fi
7216
7217	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7218
7219echo "${as_me:-configure}:7219: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7220
7221test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
7222
7223echo "${as_me:-configure}:7223: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7224
7225cf_rpath_dst=
7226for cf_rpath_src in $LDFLAGS
7227do
7228	case $cf_rpath_src in
7229	(-L*)
7230
7231		# check if this refers to a directory which we will ignore
7232		cf_rpath_skip=no
7233		if test -n "$cf_rpath_list"
7234		then
7235			for cf_rpath_item in $cf_rpath_list
7236			do
7237				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7238				then
7239					cf_rpath_skip=yes
7240					break
7241				fi
7242			done
7243		fi
7244
7245		if test "$cf_rpath_skip" = no
7246		then
7247			# transform the option
7248			if test "$LD_RPATH_OPT" = "-R " ; then
7249				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7250			else
7251				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7252			fi
7253
7254			# if we have not already added this, add it now
7255			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7256			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7257			then
7258				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7259
7260echo "${as_me:-configure}:7260: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7261
7262				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7263			fi
7264		fi
7265		;;
7266	esac
7267	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7268done
7269LDFLAGS=$cf_rpath_dst
7270
7271test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
7272
7273echo "${as_me:-configure}:7273: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7274
7275test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
7276
7277echo "${as_me:-configure}:7277: testing ...checking LIBS $LIBS ..." 1>&5
7278
7279cf_rpath_dst=
7280for cf_rpath_src in $LIBS
7281do
7282	case $cf_rpath_src in
7283	(-L*)
7284
7285		# check if this refers to a directory which we will ignore
7286		cf_rpath_skip=no
7287		if test -n "$cf_rpath_list"
7288		then
7289			for cf_rpath_item in $cf_rpath_list
7290			do
7291				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7292				then
7293					cf_rpath_skip=yes
7294					break
7295				fi
7296			done
7297		fi
7298
7299		if test "$cf_rpath_skip" = no
7300		then
7301			# transform the option
7302			if test "$LD_RPATH_OPT" = "-R " ; then
7303				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7304			else
7305				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7306			fi
7307
7308			# if we have not already added this, add it now
7309			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7310			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7311			then
7312				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7313
7314echo "${as_me:-configure}:7314: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7315
7316				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7317			fi
7318		fi
7319		;;
7320	esac
7321	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7322done
7323LIBS=$cf_rpath_dst
7324
7325test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
7326
7327echo "${as_me:-configure}:7327: testing ...checked LIBS $LIBS ..." 1>&5
7328
7329	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7330
7331echo "${as_me:-configure}:7331: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7332
7333else
7334	echo "$as_me:7334: result: no" >&5
7335echo "${ECHO_T}no" >&6
7336fi
7337
7338fi
7339
7340REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
7341ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
7342cf_cv_rel_version=$REL_VERSION
7343
7344test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
7345
7346# Check whether --with-rel-version or --without-rel-version was given.
7347if test "${with_rel_version+set}" = set; then
7348  withval="$with_rel_version"
7349  { echo "$as_me:7349: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
7350echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
7351 cf_cv_rel_version=$withval
7352fi;
7353
7354 CDK_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
7355 CDK_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
7356
7357if test -n "$CDK_MAJOR" ; then
7358  case $CDK_MAJOR in
7359  ([0-9]*)
7360 	;;
7361  (*)
7362	{ { echo "$as_me:7362: error: Release major-version is not a number: $CDK_MAJOR" >&5
7363echo "$as_me: error: Release major-version is not a number: $CDK_MAJOR" >&2;}
7364   { (exit 1); exit 1; }; }
7365 	;;
7366  esac
7367else
7368  { { echo "$as_me:7368: error: Release major-version value is empty" >&5
7369echo "$as_me: error: Release major-version value is empty" >&2;}
7370   { (exit 1); exit 1; }; }
7371fi
7372
7373if test -n "$CDK_MINOR" ; then
7374  case $CDK_MINOR in
7375  ([0-9]*)
7376 	;;
7377  (*)
7378	{ { echo "$as_me:7378: error: Release minor-version is not a number: $CDK_MINOR" >&5
7379echo "$as_me: error: Release minor-version is not a number: $CDK_MINOR" >&2;}
7380   { (exit 1); exit 1; }; }
7381 	;;
7382  esac
7383else
7384  { { echo "$as_me:7384: error: Release minor-version value is empty" >&5
7385echo "$as_me: error: Release minor-version value is empty" >&2;}
7386   { (exit 1); exit 1; }; }
7387fi
7388
7389test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
7390
7391# Check whether --with-abi-version or --without-abi-version was given.
7392if test "${with_abi_version+set}" = set; then
7393  withval="$with_abi_version"
7394
7395	if test "x$cf_cv_abi_version" != "x$withval"
7396	then
7397		{ echo "$as_me:7397: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
7398echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
7399		case $cf_cv_rel_version in
7400		(5.*)
7401			cf_cv_rel_version=$withval.0
7402			;;
7403		(6.*)
7404			cf_cv_rel_version=$withval.9	# FIXME: should be 10 as of 6.0 release
7405			;;
7406		esac
7407	fi
7408	cf_cv_abi_version=$withval
7409fi;
7410
7411if test -n "$cf_cv_abi_version" ; then
7412  case $cf_cv_abi_version in
7413  ([0-9]*)
7414 	;;
7415  (*)
7416	{ { echo "$as_me:7416: error: ABI version is not a number: $cf_cv_abi_version" >&5
7417echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
7418   { (exit 1); exit 1; }; }
7419 	;;
7420  esac
7421else
7422  { { echo "$as_me:7422: error: ABI version value is empty" >&5
7423echo "$as_me: error: ABI version value is empty" >&2;}
7424   { (exit 1); exit 1; }; }
7425fi
7426
7427LIB_MODEL=static
7428DFT_LWR_MODEL=$LIB_MODEL
7429LIBTOOL_MAKE="#"
7430
7431# use to comment-out makefile lines
7432MAKE_NORMAL=
7433MAKE_STATIC=
7434MAKE_SHARED="#"
7435MAKE_DLLS="#"
7436
7437shlibdir=$libdir
7438
7439echo "$as_me:7439: checking if libtool -version-number should be used" >&5
7440echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
7441
7442# Check whether --enable-libtool-version or --disable-libtool-version was given.
7443if test "${enable_libtool_version+set}" = set; then
7444  enableval="$enable_libtool_version"
7445  test "$enableval" != no && enableval=yes
7446	if test "$enableval" != "yes" ; then
7447    cf_libtool_version=no
7448	else
7449		cf_libtool_version=yes
7450	fi
7451else
7452  enableval=yes
7453	cf_libtool_version=yes
7454
7455fi;
7456echo "$as_me:7456: result: $cf_libtool_version" >&5
7457echo "${ECHO_T}$cf_libtool_version" >&6
7458
7459if test "$cf_libtool_version" = yes ; then
7460	LIBTOOL_VERSION="-version-number"
7461else
7462	LIBTOOL_VERSION="-version-info"
7463	case "x$VERSION" in
7464	(x)
7465		{ echo "$as_me:7465: WARNING: VERSION was not set" >&5
7466echo "$as_me: WARNING: VERSION was not set" >&2;}
7467		;;
7468	(x*.*.*)
7469		ABI_VERSION="$VERSION"
7470		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
7471
7472echo "${as_me:-configure}:7472: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
7473
7474		;;
7475	(x*:*:*)
7476		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
7477		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
7478
7479echo "${as_me:-configure}:7479: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
7480
7481		;;
7482	(*)
7483		{ echo "$as_me:7483: WARNING: unexpected VERSION value: $VERSION" >&5
7484echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
7485		;;
7486	esac
7487fi
7488
7489LIBTOOL=
7490
7491# common library maintenance symbols that are convenient for libtool scripts:
7492LIB_CREATE='${AR} -cr'
7493LIB_OBJECT='${OBJECTS}'
7494LIB_SUFFIX=.a
7495LIB_PREP="$RANLIB"
7496
7497# symbols used to prop libtool up to enable it to determine what it should be
7498# doing:
7499LIB_CLEAN=
7500LIB_COMPILE=
7501LIB_LINK='${CC}'
7502LIB_INSTALL=
7503LIB_UNINSTALL=
7504
7505echo "$as_me:7505: checking if you want to build libraries with libtool" >&5
7506echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
7507
7508# Check whether --with-libtool or --without-libtool was given.
7509if test "${with_libtool+set}" = set; then
7510  withval="$with_libtool"
7511  with_libtool=$withval
7512else
7513  with_libtool=no
7514fi;
7515echo "$as_me:7515: result: $with_libtool" >&5
7516echo "${ECHO_T}$with_libtool" >&6
7517if test "$with_libtool" != "no"; then
7518
7519	if test "$with_libtool" != "yes" ; then
7520
7521if test "x$prefix" != xNONE; then
7522	cf_path_syntax="$prefix"
7523else
7524	cf_path_syntax="$ac_default_prefix"
7525fi
7526
7527case ".$with_libtool" in
7528(.\$\(*\)*|.\'*\'*)
7529	;;
7530(..|./*|.\\*)
7531	;;
7532(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7533	;;
7534(.\${*prefix}*|.\${*dir}*)
7535	eval with_libtool="$with_libtool"
7536	case ".$with_libtool" in
7537	(.NONE/*)
7538		with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
7539		;;
7540	esac
7541	;;
7542(.no|.NONE/*)
7543	with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
7544	;;
7545(*)
7546	{ { echo "$as_me:7546: error: expected a pathname, not \"$with_libtool\"" >&5
7547echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
7548   { (exit 1); exit 1; }; }
7549	;;
7550esac
7551
7552		LIBTOOL=$with_libtool
7553	else
7554		if test -n "$ac_tool_prefix"; then
7555  for ac_prog in libtool glibtool
7556  do
7557    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7558set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7559echo "$as_me:7559: checking for $ac_word" >&5
7560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7561if test "${ac_cv_prog_LIBTOOL+set}" = set; then
7562  echo $ECHO_N "(cached) $ECHO_C" >&6
7563else
7564  if test -n "$LIBTOOL"; then
7565  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
7566else
7567  ac_save_IFS=$IFS; IFS=$ac_path_separator
7568ac_dummy="$PATH"
7569for ac_dir in $ac_dummy; do
7570  IFS=$ac_save_IFS
7571  test -z "$ac_dir" && ac_dir=.
7572  $as_executable_p "$ac_dir/$ac_word" || continue
7573ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
7574echo "$as_me:7574: found $ac_dir/$ac_word" >&5
7575break
7576done
7577
7578fi
7579fi
7580LIBTOOL=$ac_cv_prog_LIBTOOL
7581if test -n "$LIBTOOL"; then
7582  echo "$as_me:7582: result: $LIBTOOL" >&5
7583echo "${ECHO_T}$LIBTOOL" >&6
7584else
7585  echo "$as_me:7585: result: no" >&5
7586echo "${ECHO_T}no" >&6
7587fi
7588
7589    test -n "$LIBTOOL" && break
7590  done
7591fi
7592if test -z "$LIBTOOL"; then
7593  ac_ct_LIBTOOL=$LIBTOOL
7594  for ac_prog in libtool glibtool
7595do
7596  # Extract the first word of "$ac_prog", so it can be a program name with args.
7597set dummy $ac_prog; ac_word=$2
7598echo "$as_me:7598: checking for $ac_word" >&5
7599echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7600if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
7601  echo $ECHO_N "(cached) $ECHO_C" >&6
7602else
7603  if test -n "$ac_ct_LIBTOOL"; then
7604  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
7605else
7606  ac_save_IFS=$IFS; IFS=$ac_path_separator
7607ac_dummy="$PATH"
7608for ac_dir in $ac_dummy; do
7609  IFS=$ac_save_IFS
7610  test -z "$ac_dir" && ac_dir=.
7611  $as_executable_p "$ac_dir/$ac_word" || continue
7612ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
7613echo "$as_me:7613: found $ac_dir/$ac_word" >&5
7614break
7615done
7616
7617fi
7618fi
7619ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
7620if test -n "$ac_ct_LIBTOOL"; then
7621  echo "$as_me:7621: result: $ac_ct_LIBTOOL" >&5
7622echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
7623else
7624  echo "$as_me:7624: result: no" >&5
7625echo "${ECHO_T}no" >&6
7626fi
7627
7628  test -n "$ac_ct_LIBTOOL" && break
7629done
7630test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
7631
7632  LIBTOOL=$ac_ct_LIBTOOL
7633fi
7634
7635if test -n "$LIBTOOL" && test "$LIBTOOL" != none
7636then
7637	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
7638else
7639	cf_cv_libtool_version=
7640fi
7641test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
7642
7643		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
7644		then
7645
7646unset ac_cv_prog_ac_ct_LIBTOOL
7647unset ac_ct_LIBTOOL
7648unset LIBTOOL
7649
7650			if test -n "$ac_tool_prefix"; then
7651  for ac_prog in glibtool
7652  do
7653    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7654set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7655echo "$as_me:7655: checking for $ac_word" >&5
7656echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7657if test "${ac_cv_prog_LIBTOOL+set}" = set; then
7658  echo $ECHO_N "(cached) $ECHO_C" >&6
7659else
7660  if test -n "$LIBTOOL"; then
7661  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
7662else
7663  ac_save_IFS=$IFS; IFS=$ac_path_separator
7664ac_dummy="$PATH"
7665for ac_dir in $ac_dummy; do
7666  IFS=$ac_save_IFS
7667  test -z "$ac_dir" && ac_dir=.
7668  $as_executable_p "$ac_dir/$ac_word" || continue
7669ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
7670echo "$as_me:7670: found $ac_dir/$ac_word" >&5
7671break
7672done
7673
7674fi
7675fi
7676LIBTOOL=$ac_cv_prog_LIBTOOL
7677if test -n "$LIBTOOL"; then
7678  echo "$as_me:7678: result: $LIBTOOL" >&5
7679echo "${ECHO_T}$LIBTOOL" >&6
7680else
7681  echo "$as_me:7681: result: no" >&5
7682echo "${ECHO_T}no" >&6
7683fi
7684
7685    test -n "$LIBTOOL" && break
7686  done
7687fi
7688if test -z "$LIBTOOL"; then
7689  ac_ct_LIBTOOL=$LIBTOOL
7690  for ac_prog in glibtool
7691do
7692  # Extract the first word of "$ac_prog", so it can be a program name with args.
7693set dummy $ac_prog; ac_word=$2
7694echo "$as_me:7694: checking for $ac_word" >&5
7695echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7696if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
7697  echo $ECHO_N "(cached) $ECHO_C" >&6
7698else
7699  if test -n "$ac_ct_LIBTOOL"; then
7700  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
7701else
7702  ac_save_IFS=$IFS; IFS=$ac_path_separator
7703ac_dummy="$PATH"
7704for ac_dir in $ac_dummy; do
7705  IFS=$ac_save_IFS
7706  test -z "$ac_dir" && ac_dir=.
7707  $as_executable_p "$ac_dir/$ac_word" || continue
7708ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
7709echo "$as_me:7709: found $ac_dir/$ac_word" >&5
7710break
7711done
7712
7713fi
7714fi
7715ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
7716if test -n "$ac_ct_LIBTOOL"; then
7717  echo "$as_me:7717: result: $ac_ct_LIBTOOL" >&5
7718echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
7719else
7720  echo "$as_me:7720: result: no" >&5
7721echo "${ECHO_T}no" >&6
7722fi
7723
7724  test -n "$ac_ct_LIBTOOL" && break
7725done
7726test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
7727
7728  LIBTOOL=$ac_ct_LIBTOOL
7729fi
7730
7731if test -n "$LIBTOOL" && test "$LIBTOOL" != none
7732then
7733	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
7734else
7735	cf_cv_libtool_version=
7736fi
7737test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
7738
7739		fi
7740	fi
7741	if test -z "$LIBTOOL" ; then
7742		{ { echo "$as_me:7742: error: Cannot find libtool" >&5
7743echo "$as_me: error: Cannot find libtool" >&2;}
7744   { (exit 1); exit 1; }; }
7745	fi
7746	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
7747	LIB_OBJECT='${OBJECTS:.o=.lo}'
7748	LIB_SUFFIX=.la
7749	LIB_CLEAN='${LIBTOOL} --mode=clean'
7750	LIB_COMPILE='${LIBTOOL} --mode=compile'
7751	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
7752	LIB_INSTALL='${LIBTOOL} --mode=install'
7753	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
7754	LIB_PREP=:
7755
7756if test -n "$LIBTOOL" && test "$LIBTOOL" != none
7757then
7758	echo "$as_me:7758: checking version of $LIBTOOL" >&5
7759echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
7760
7761if test -n "$LIBTOOL" && test "$LIBTOOL" != none
7762then
7763	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
7764else
7765	cf_cv_libtool_version=
7766fi
7767test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
7768
7769	echo "$as_me:7769: result: $cf_cv_libtool_version" >&5
7770echo "${ECHO_T}$cf_cv_libtool_version" >&6
7771	if test -z "$cf_cv_libtool_version" ; then
7772		{ { echo "$as_me:7772: error: This is not GNU libtool" >&5
7773echo "$as_me: error: This is not GNU libtool" >&2;}
7774   { (exit 1); exit 1; }; }
7775	fi
7776else
7777	{ { echo "$as_me:7777: error: GNU libtool has not been found" >&5
7778echo "$as_me: error: GNU libtool has not been found" >&2;}
7779   { (exit 1); exit 1; }; }
7780fi
7781
7782	# special hack to add -no-undefined (which libtool should do for itself)
7783	LT_UNDEF=
7784	case "$cf_cv_system_name" in
7785	(cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
7786		LT_UNDEF=-no-undefined
7787		;;
7788	esac
7789
7790	# special hack to add --tag option for C++ compiler
7791	case $cf_cv_libtool_version in
7792	(1.[5-9]*|[2-9].[0-9.a-z]*)
7793		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
7794		LIBTOOL="$LIBTOOL --tag=CC"
7795		;;
7796	(*)
7797		LIBTOOL_CXX="$LIBTOOL"
7798		;;
7799	esac
7800else
7801	LIBTOOL=""
7802	LIBTOOL_CXX=""
7803fi
7804
7805test -z "$LIBTOOL" && ECHO_LT=
7806
7807LIB_CREATE="$LIB_CREATE \$@"
7808
7809if test "$with_libtool" = "yes" ; then
7810	OBJEXT="lo"
7811	LIB_MODEL=libtool
7812	DFT_LWR_MODEL=$LIB_MODEL
7813	LIBTOOL_MAKE=
7814
7815echo "$as_me:7815: checking for additional libtool options" >&5
7816echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7817
7818# Check whether --with-libtool-opts or --without-libtool-opts was given.
7819if test "${with_libtool_opts+set}" = set; then
7820  withval="$with_libtool_opts"
7821  with_libtool_opts=$withval
7822else
7823  with_libtool_opts=no
7824fi;
7825echo "$as_me:7825: result: $with_libtool_opts" >&5
7826echo "${ECHO_T}$with_libtool_opts" >&6
7827
7828case .$with_libtool_opts in
7829(.yes|.no|.)
7830	;;
7831(*)
7832	LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7833	;;
7834esac
7835
7836echo "$as_me:7836: checking if exported-symbols file should be used" >&5
7837echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7838
7839# Check whether --with-export-syms or --without-export-syms was given.
7840if test "${with_export_syms+set}" = set; then
7841  withval="$with_export_syms"
7842  with_export_syms=$withval
7843else
7844  with_export_syms=no
7845fi;
7846if test "x$with_export_syms" = xyes
7847then
7848	with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7849
7850fi
7851echo "$as_me:7851: result: $with_export_syms" >&5
7852echo "${ECHO_T}$with_export_syms" >&6
7853if test "x$with_export_syms" != xno
7854then
7855	EXPORT_SYMS="-export-symbols $with_export_syms"
7856
7857fi
7858
7859	MAKE_NORMAL="#"
7860	MAKE_STATIC="#"
7861	MAKE_SHARED=
7862else
7863	echo "$as_me:7863: checking if you want to build shared libraries" >&5
7864echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
7865
7866# Check whether --with-shared or --without-shared was given.
7867if test "${with_shared+set}" = set; then
7868  withval="$with_shared"
7869  with_shared=$withval
7870else
7871  with_shared=no
7872fi;
7873	echo "$as_me:7873: result: $with_shared" >&5
7874echo "${ECHO_T}$with_shared" >&6
7875	if test "$with_shared" = "yes" ; then
7876		LIB_MODEL=shared
7877		DFT_LWR_MODEL=$LIB_MODEL
7878
7879	RM_SHARED_OPTS=
7880	LOCAL_LDFLAGS=
7881	LOCAL_LDFLAGS2=
7882	LD_SHARED_OPTS=
7883	INSTALL_LIB="-m 644"
7884	: ${rel_builddir:=.}
7885
7886	shlibdir=$libdir
7887
7888	MAKE_DLLS="#"
7889
7890	cf_cv_do_symlinks=no
7891	cf_ld_rpath_opt=
7892	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7893
7894	echo "$as_me:7894: checking if release/abi version should be used for shared libs" >&5
7895echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7896
7897# Check whether --with-shlib-version or --without-shlib-version was given.
7898if test "${with_shlib_version+set}" = set; then
7899  withval="$with_shlib_version"
7900  test -z "$withval" && withval=auto
7901	case $withval in
7902	(yes)
7903		cf_cv_shlib_version=auto
7904		;;
7905	(rel|abi|auto)
7906		cf_cv_shlib_version=$withval
7907		;;
7908	(*)
7909		echo "$as_me:7909: result: $withval" >&5
7910echo "${ECHO_T}$withval" >&6
7911		{ { echo "$as_me:7911: error: option value must be one of: rel, abi, or auto" >&5
7912echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
7913   { (exit 1); exit 1; }; }
7914		;;
7915	esac
7916
7917else
7918  cf_cv_shlib_version=auto
7919fi;
7920	echo "$as_me:7920: result: $cf_cv_shlib_version" >&5
7921echo "${ECHO_T}$cf_cv_shlib_version" >&6
7922
7923	cf_cv_rm_so_locs=no
7924	cf_try_cflags=
7925
7926	# Some less-capable ports of gcc support only -fpic
7927	CC_SHARED_OPTS=
7928
7929	cf_try_fPIC=no
7930	if test "$GCC" = yes
7931	then
7932		cf_try_fPIC=yes
7933	else
7934		case $cf_cv_system_name in
7935		(*linux*)	# e.g., PGI compiler
7936			cf_try_fPIC=yes
7937			;;
7938		esac
7939	fi
7940
7941	if test "$cf_try_fPIC" = yes
7942	then
7943		echo "$as_me:7943: checking which $CC option to use" >&5
7944echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7945		cf_save_CFLAGS="$CFLAGS"
7946		for CC_SHARED_OPTS in -fPIC -fpic ''
7947		do
7948			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7949			cat >conftest.$ac_ext <<_ACEOF
7950#line 7950 "configure"
7951#include "confdefs.h"
7952#include <stdio.h>
7953int
7954main (void)
7955{
7956int x = 1
7957  ;
7958  return 0;
7959}
7960_ACEOF
7961rm -f conftest.$ac_objext
7962if { (eval echo "$as_me:7962: \"$ac_compile\"") >&5
7963  (eval $ac_compile) 2>&5
7964  ac_status=$?
7965  echo "$as_me:7965: \$? = $ac_status" >&5
7966  (exit $ac_status); } &&
7967         { ac_try='test -s conftest.$ac_objext'
7968  { (eval echo "$as_me:7968: \"$ac_try\"") >&5
7969  (eval $ac_try) 2>&5
7970  ac_status=$?
7971  echo "$as_me:7971: \$? = $ac_status" >&5
7972  (exit $ac_status); }; }; then
7973  break
7974else
7975  echo "$as_me: failed program was:" >&5
7976cat conftest.$ac_ext >&5
7977fi
7978rm -f conftest.$ac_objext conftest.$ac_ext
7979		done
7980		echo "$as_me:7980: result: $CC_SHARED_OPTS" >&5
7981echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7982		CFLAGS="$cf_save_CFLAGS"
7983	fi
7984
7985	cf_cv_shlib_version_infix=no
7986
7987	case $cf_cv_system_name in
7988	(aix4.3-9*|aix[5-7]*)
7989		if test "$GCC" = yes; then
7990			CC_SHARED_OPTS='-Wl,-brtl'
7991			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7992		else
7993			CC_SHARED_OPTS='-brtl'
7994			# as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
7995			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7996		fi
7997		;;
7998	(beos*)
7999		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
8000		;;
8001	(cygwin*)
8002		CC_SHARED_OPTS=
8003		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
8004		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
8005		cf_cv_shlib_version=cygdll
8006		cf_cv_shlib_version_infix=cygdll
8007		shlibdir=$bindir
8008		MAKE_DLLS=
8009		cat >mk_shared_lib.sh <<-CF_EOF
8010		#!$SHELL
8011		SHARED_LIB=\$1
8012		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
8013		shift
8014		cat <<-EOF
8015		Linking shared library
8016		** SHARED_LIB \$SHARED_LIB
8017		** IMPORT_LIB \$IMPORT_LIB
8018EOF
8019		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
8020CF_EOF
8021		chmod +x mk_shared_lib.sh
8022		;;
8023	(msys*)
8024		CC_SHARED_OPTS=
8025		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
8026		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
8027		cf_cv_shlib_version=msysdll
8028		cf_cv_shlib_version_infix=msysdll
8029		shlibdir=$bindir
8030		MAKE_DLLS=
8031		cat >mk_shared_lib.sh <<-CF_EOF
8032		#!$SHELL
8033		SHARED_LIB=\$1
8034		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
8035		shift
8036		cat <<-EOF
8037		Linking shared library
8038		** SHARED_LIB \$SHARED_LIB
8039		** IMPORT_LIB \$IMPORT_LIB
8040EOF
8041		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
8042CF_EOF
8043		chmod +x mk_shared_lib.sh
8044		;;
8045	(darwin*)
8046		cf_try_cflags="no-cpp-precomp"
8047		CC_SHARED_OPTS="-dynamic"
8048		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
8049		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
8050		cf_cv_shlib_version_infix=yes
8051		echo "$as_me:8051: checking if ld -search_paths_first works" >&5
8052echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
8053if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
8054  echo $ECHO_N "(cached) $ECHO_C" >&6
8055else
8056
8057			cf_save_LDFLAGS=$LDFLAGS
8058			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8059			cat >conftest.$ac_ext <<_ACEOF
8060#line 8060 "configure"
8061#include "confdefs.h"
8062
8063int
8064main (void)
8065{
8066int i;
8067  ;
8068  return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext conftest$ac_exeext
8072if { (eval echo "$as_me:8072: \"$ac_link\"") >&5
8073  (eval $ac_link) 2>&5
8074  ac_status=$?
8075  echo "$as_me:8075: \$? = $ac_status" >&5
8076  (exit $ac_status); } &&
8077         { ac_try='test -s conftest$ac_exeext'
8078  { (eval echo "$as_me:8078: \"$ac_try\"") >&5
8079  (eval $ac_try) 2>&5
8080  ac_status=$?
8081  echo "$as_me:8081: \$? = $ac_status" >&5
8082  (exit $ac_status); }; }; then
8083  cf_cv_ldflags_search_paths_first=yes
8084else
8085  echo "$as_me: failed program was:" >&5
8086cat conftest.$ac_ext >&5
8087cf_cv_ldflags_search_paths_first=no
8088fi
8089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8090				LDFLAGS=$cf_save_LDFLAGS
8091fi
8092echo "$as_me:8092: result: $cf_cv_ldflags_search_paths_first" >&5
8093echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
8094		if test $cf_cv_ldflags_search_paths_first = yes; then
8095			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8096		fi
8097		;;
8098	(hpux[7-8]*)
8099		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
8100		if test "$GCC" != yes; then
8101			CC_SHARED_OPTS='+Z'
8102		fi
8103		MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
8104		INSTALL_LIB="-m 555"
8105		;;
8106	(hpux*)
8107		# (tested with gcc 2.7.2 -- I don't have c89)
8108		if test "$GCC" = yes; then
8109			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
8110		else
8111			CC_SHARED_OPTS='+Z'
8112			LD_SHARED_OPTS='-Wl,+b,${libdir}'
8113		fi
8114		MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
8115		# HP-UX shared libraries must be executable, and should be
8116		# readonly to exploit a quirk in the memory manager.
8117		INSTALL_LIB="-m 555"
8118		;;
8119	(interix*)
8120		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8121		if test "$cf_cv_shlib_version" = rel; then
8122			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8123		else
8124			cf_shared_soname='`basename $@`'
8125		fi
8126		CC_SHARED_OPTS=
8127		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
8128		;;
8129	(irix*)
8130		if test "$cf_cv_enable_rpath" = yes ; then
8131			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
8132		fi
8133		# tested with IRIX 5.2 and 'cc'.
8134		if test "$GCC" != yes; then
8135			CC_SHARED_OPTS='-KPIC'
8136			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
8137		else
8138			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
8139		fi
8140		cf_cv_rm_so_locs=yes
8141		;;
8142	(linux*|gnu*|k*bsd*-gnu)
8143		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
8144			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
8145			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8146		fi
8147		if test "$cf_cv_enable_rpath" = yes ; then
8148			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
8149		fi
8150
8151	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8152	if test "$cf_cv_shlib_version" = rel; then
8153		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8154	else
8155		cf_cv_shared_soname='`basename $@`'
8156	fi
8157
8158		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
8159		;;
8160	(mingw*msvc*)
8161		cf_cv_shlib_version=msvcdll
8162		cf_cv_shlib_version_infix=msvcdll
8163		shlibdir=$bindir
8164		MAKE_DLLS=
8165		if test "$DFT_LWR_MODEL" = "shared" ; then
8166			LOCAL_LDFLAGS="-link -dll"
8167			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8168			EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
8169		fi
8170		CC_SHARED_OPTS=
8171		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
8172		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
8173		cat >mk_shared_lib.sh <<-CF_EOF
8174		#!$SHELL
8175		SHARED_LIB=\$1
8176		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
8177		shift
8178		my_ld=\$1
8179		shift
8180		cat <<-EOF
8181		Linking shared library
8182		** SHARED LIB \$SHARED_LIB
8183		** IMPORT_LIB \$IMPORT_LIB
8184EOF
8185		args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
8186		exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
8187		mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
8188CF_EOF
8189		chmod +x mk_shared_lib.sh
8190		cat >mk_prog.sh <<-CF_EOF
8191		#!$SHELL
8192		shift
8193		# Ignore first argument (compiler) and use LD (link.exe) unconditionally
8194		LD="$LD"
8195		clopts=()
8196		ldopts=("/subsystem:console")
8197		libs=()
8198		isdll=0
8199		while test \$# -gt 0; do
8200			case "\$1" in
8201				-link)
8202					# ignore -link argument
8203					;;
8204				-M[TD] | -M[TD]d)
8205					# ignore runtime-library option
8206					;;
8207				-dll)
8208					isdll=1
8209					;;
8210				-W* | -w*)
8211					# ignore warnings
8212					;;
8213				-D*)
8214					clopts+=("\$1")
8215					;;
8216				-I*)
8217					clopts+=("\$1")
8218					;;
8219				-l*)
8220					libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
8221					;;
8222				-L*)
8223					ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
8224					;;
8225				*.obj | *.o)
8226					ldopts+=("\$1")
8227					;;
8228				-Wl,*)
8229					for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
8230						ldopts+=("\${linkarg}")
8231					done
8232					;;
8233				*.lib)
8234					ldopts+=("\$1")
8235					;;
8236				-o)
8237					shift
8238					ldopts+=("-out:\$1")
8239					;;
8240				*)
8241					clopts+=("\$1")
8242					ldopts+=("\$1")
8243					;;
8244			esac
8245			shift
8246		done
8247		if [ "\$isdll" -ne 0 ]; then
8248			for lib in \${libs[*]}; do
8249				ldopts+=("\$lib.dll.lib")
8250			done
8251		else
8252			for lib in \${libs[*]}; do
8253				ldopts+=("\$lib.lib")
8254			done
8255		fi
8256		cat <<-EOF
8257		Creating program
8258		** ld options:   "\${ldopts[@]}"
8259EOF
8260		exec \$LD \${ldopts[@]}
8261CF_EOF
8262		chmod +x mk_prog.sh
8263		LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
8264		LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
8265		;;
8266	(mingw*)
8267		cf_cv_shlib_version=mingw
8268		cf_cv_shlib_version_infix=mingw
8269		shlibdir=$bindir
8270		MAKE_DLLS=
8271		if test "$DFT_LWR_MODEL" = "shared" ; then
8272			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
8273			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8274			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
8275		fi
8276		CC_SHARED_OPTS=
8277		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
8278		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
8279		cat >mk_shared_lib.sh <<-CF_EOF
8280		#!$SHELL
8281		SHARED_LIB=\$1
8282		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
8283		shift
8284		cat <<-EOF
8285		Linking shared library
8286		** SHARED_LIB \$SHARED_LIB
8287		** IMPORT_LIB \$IMPORT_LIB
8288EOF
8289		exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
8290CF_EOF
8291		chmod +x mk_shared_lib.sh
8292		;;
8293	(openbsd[2-9].*|mirbsd*)
8294		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
8295			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
8296			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8297		fi
8298		if test "$cf_cv_enable_rpath" = yes ; then
8299			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
8300		fi
8301		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
8302
8303	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8304	if test "$cf_cv_shlib_version" = rel; then
8305		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8306	else
8307		cf_cv_shared_soname='`basename $@`'
8308	fi
8309
8310		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
8311		;;
8312	(nskJ*)
8313		CC_SHARED_OPTS=
8314		MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
8315		;;
8316	(nskL*)
8317		CC_SHARED_OPTS=
8318		MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
8319		;;
8320	(nto-qnx*|openbsd*|freebsd[12].*)
8321		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
8322		MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
8323		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8324		;;
8325	(dragonfly*|freebsd*)
8326		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
8327		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
8328			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
8329			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
8330			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
8331		fi
8332
8333	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8334	if test "$cf_cv_shlib_version" = rel; then
8335		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8336	else
8337		cf_cv_shared_soname='`basename $@`'
8338	fi
8339
8340		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
8341		;;
8342	(netbsd*)
8343		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
8344		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
8345			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
8346			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8347			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
8348			if test "$cf_cv_shlib_version" = auto; then
8349			if test -f /usr/libexec/ld.elf_so; then
8350				cf_cv_shlib_version=abi
8351			else
8352				cf_cv_shlib_version=rel
8353			fi
8354			fi
8355
8356	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8357	if test "$cf_cv_shlib_version" = rel; then
8358		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8359	else
8360		cf_cv_shared_soname='`basename $@`'
8361	fi
8362
8363			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
8364		else
8365			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
8366		fi
8367		;;
8368	(osf*|mls+*)
8369		# tested with OSF/1 V3.2 and 'cc'
8370		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
8371		# link with shared libs).
8372		MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
8373		case $host_os in
8374		(osf4*)
8375			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
8376			;;
8377		esac
8378		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
8379		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
8380			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
8381			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8382		fi
8383		cf_cv_rm_so_locs=yes
8384		;;
8385	(sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
8386		# tested with osr5.0.5
8387		if test "$GCC" != yes; then
8388			CC_SHARED_OPTS='-belf -KPIC'
8389		fi
8390		MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
8391		if test "$cf_cv_enable_rpath" = yes ; then
8392			# only way is to set LD_RUN_PATH but no switch for it
8393			RUN_PATH=$libdir
8394		fi
8395		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8396		LINK_PROGS='LD_RUN_PATH=${libdir}'
8397		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
8398		;;
8399	(sunos4*)
8400		# tested with SunOS 4.1.1 and gcc 2.7.0
8401		if test "$GCC" != yes; then
8402			CC_SHARED_OPTS='-KPIC'
8403		fi
8404		MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
8405		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8406		;;
8407	(solaris2*)
8408		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
8409		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
8410		if test "$DFT_LWR_MODEL" = "shared" ; then
8411			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
8412			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
8413		fi
8414		if test "$cf_cv_enable_rpath" = yes ; then
8415			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
8416		fi
8417
8418	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
8419	if test "$cf_cv_shlib_version" = rel; then
8420		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
8421	else
8422		cf_cv_shared_soname='`basename $@`'
8423	fi
8424
8425		if test "$GCC" != yes; then
8426			cf_save_CFLAGS="$CFLAGS"
8427			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
8428			do
8429				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
8430				cat >conftest.$ac_ext <<_ACEOF
8431#line 8431 "configure"
8432#include "confdefs.h"
8433#include <stdio.h>
8434int
8435main (void)
8436{
8437printf("Hello\n");
8438  ;
8439  return 0;
8440}
8441_ACEOF
8442rm -f conftest.$ac_objext
8443if { (eval echo "$as_me:8443: \"$ac_compile\"") >&5
8444  (eval $ac_compile) 2>&5
8445  ac_status=$?
8446  echo "$as_me:8446: \$? = $ac_status" >&5
8447  (exit $ac_status); } &&
8448         { ac_try='test -s conftest.$ac_objext'
8449  { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8450  (eval $ac_try) 2>&5
8451  ac_status=$?
8452  echo "$as_me:8452: \$? = $ac_status" >&5
8453  (exit $ac_status); }; }; then
8454  break
8455else
8456  echo "$as_me: failed program was:" >&5
8457cat conftest.$ac_ext >&5
8458fi
8459rm -f conftest.$ac_objext conftest.$ac_ext
8460			done
8461			CFLAGS="$cf_save_CFLAGS"
8462			CC_SHARED_OPTS=$cf_shared_opts
8463			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
8464		else
8465			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
8466		fi
8467		;;
8468	(sysv5uw7*|unix_sv*)
8469		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
8470		if test "$GCC" != yes; then
8471			CC_SHARED_OPTS='-KPIC'
8472		fi
8473		MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
8474		;;
8475	(*)
8476		CC_SHARED_OPTS='unknown'
8477		MK_SHARED_LIB='echo unknown'
8478		;;
8479	esac
8480
8481	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
8482	case "$cf_cv_shlib_version" in
8483	(rel|abi)
8484		case "$MK_SHARED_LIB" in
8485		(*'-o $@')
8486			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
8487			;;
8488		(*)
8489			{ echo "$as_me:8489: WARNING: ignored --with-shlib-version" >&5
8490echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
8491			;;
8492		esac
8493		;;
8494	esac
8495
8496	if test -n "$cf_try_cflags"
8497	then
8498cat > conftest.$ac_ext <<EOF
8499#line 8499 "${as_me:-configure}"
8500#include <stdio.h>
8501int main(int argc, char *argv[])
8502{
8503	printf("hello\n");
8504	return (argv[argc-1] == 0) ;
8505}
8506EOF
8507		cf_save_CFLAGS="$CFLAGS"
8508		for cf_opt in $cf_try_cflags
8509		do
8510			CFLAGS="$cf_save_CFLAGS -$cf_opt"
8511			echo "$as_me:8511: checking if CFLAGS option -$cf_opt works" >&5
8512echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
8513			if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5
8514  (eval $ac_compile) 2>&5
8515  ac_status=$?
8516  echo "$as_me:8516: \$? = $ac_status" >&5
8517  (exit $ac_status); }; then
8518				echo "$as_me:8518: result: yes" >&5
8519echo "${ECHO_T}yes" >&6
8520				cf_save_CFLAGS="$CFLAGS"
8521			else
8522				echo "$as_me:8522: result: no" >&5
8523echo "${ECHO_T}no" >&6
8524			fi
8525		done
8526		CFLAGS="$cf_save_CFLAGS"
8527	fi
8528
8529	# RPATH_LIST is a colon-separated list of directories
8530	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
8531	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
8532
8533	test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
8534
8535	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
8536
8537echo "${as_me:-configure}:8537: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
8538
8539	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
8540
8541echo "${as_me:-configure}:8541: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
8542
8543echo "$as_me:8543: checking if versioned-symbols file should be used" >&5
8544echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
8545
8546# Check whether --with-versioned-syms or --without-versioned-syms was given.
8547if test "${with_versioned_syms+set}" = set; then
8548  withval="$with_versioned_syms"
8549  with_versioned_syms=$withval
8550else
8551  with_versioned_syms=no
8552fi;
8553case "x$with_versioned_syms" in
8554(xyes)
8555	with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
8556
8557	;;
8558(xno)
8559	;;
8560(x/*)
8561	test -f "$with_versioned_syms" || { { echo "$as_me:8561: error: expected a filename: $with_versioned_syms" >&5
8562echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
8563   { (exit 1); exit 1; }; }
8564	;;
8565(*)
8566	test -f "$with_versioned_syms" || { { echo "$as_me:8566: error: expected a filename: $with_versioned_syms" >&5
8567echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
8568   { (exit 1); exit 1; }; }
8569	with_versioned_syms=`pwd`/"$with_versioned_syms"
8570	;;
8571esac
8572echo "$as_me:8572: result: $with_versioned_syms" >&5
8573echo "${ECHO_T}$with_versioned_syms" >&6
8574
8575RESULTING_SYMS=
8576VERSIONED_SYMS=
8577WILDCARD_SYMS=
8578
8579if test "x$with_versioned_syms" != xno
8580then
8581	RESULTING_SYMS=$with_versioned_syms
8582	case "x$MK_SHARED_LIB" in
8583	(*-Wl,*)
8584		VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
8585		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
8586		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
8587
8588echo "${as_me:-configure}:8588: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
8589
8590		;;
8591	(*-dy\ *)
8592		VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
8593		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
8594		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
8595
8596echo "${as_me:-configure}:8596: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
8597
8598		;;
8599	(*)
8600		{ echo "$as_me:8600: WARNING: this system does not support versioned-symbols" >&5
8601echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
8602		;;
8603	esac
8604
8605	# Linux ld can selectively override scope, e.g., of symbols beginning with
8606	# "_" by first declaring some as global, and then using a wildcard to
8607	# declare the others as local.  Some other loaders cannot do this.  Check
8608	# by constructing a (very) simple shared library and inspecting its
8609	# symbols.
8610	if test "x$VERSIONED_SYMS" != "x"
8611	then
8612		echo "$as_me:8612: checking if wildcards can be used to selectively omit symbols" >&5
8613echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
8614		WILDCARD_SYMS=no
8615
8616		# make sources
8617		rm -f conftest.*
8618
8619		cat >conftest.ver <<EOF
8620module_1.0 {
8621global:
8622	globalf1;
8623local:
8624	localf1;
8625};
8626module_2.0 {
8627global:
8628	globalf2;
8629local:
8630	localf2;
8631	_*;
8632} module_1.0;
8633submodule_1.0 {
8634global:
8635	subglobalf1;
8636	_ismissing;
8637local:
8638	sublocalf1;
8639};
8640submodule_2.0 {
8641global:
8642	subglobalf2;
8643local:
8644	sublocalf2;
8645	_*;
8646} submodule_1.0;
8647EOF
8648		cat >conftest.$ac_ext <<EOF
8649#line 8649 "configure"
8650int	_ismissing(void) { return 1; }
8651int	_localf1(void) { return 1; }
8652int	_localf2(void) { return 2; }
8653int	globalf1(void) { return 1; }
8654int	globalf2(void) { return 2; }
8655int	_sublocalf1(void) { return 1; }
8656int	_sublocalf2(void) { return 2; }
8657int	subglobalf1(void) { return 1; }
8658int	subglobalf2(void) { return 2; }
8659EOF
8660		cat >conftest.mk <<EOF
8661CC=${CC}
8662CFLAGS=${CFLAGS}
8663CPPFLAGS=${CPPFLAGS}
8664LDFLAGS=${LDFLAGS}
8665LIBS=${LIBS}
8666VERSIONED_SYMS=${VERSIONED_SYMS}
8667RESULTING_SYMS=conftest.ver
8668MK_SHARED_LIB=${MK_SHARED_LIB}
8669conftest.so: conftest.$ac_cv_objext
8670		\$(MK_SHARED_LIB) conftest.$ac_cv_objext
8671EOF
8672
8673		# compile source, make library
8674		if make -f conftest.mk 2>&5 >/dev/null
8675		then
8676			# test for missing symbol in either Data or Text section
8677			cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[ 	][DT][ 	]'`
8678			test -n "$cf_missing" && WILDCARD_SYMS=yes
8679		fi
8680		echo "$as_me:8680: result: $WILDCARD_SYMS" >&5
8681echo "${ECHO_T}$WILDCARD_SYMS" >&6
8682		rm -f conftest.*
8683	fi
8684fi
8685
8686		LIB_PREP=:
8687		LIB_CREATE="$MK_SHARED_LIB"
8688		CFLAGS="$CFLAGS $CC_SHARED_OPTS"
8689		MAKE_NORMAL="#"
8690		MAKE_STATIC="#"
8691		MAKE_SHARED=
8692	fi
8693fi
8694
8695LIB_SUFFIX=
8696
8697	case X$LIB_MODEL in
8698	(Xlibtool)
8699		DFT_LIB_SUFFIX='.la'
8700		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8701		;;
8702	(Xdebug)
8703		case $cf_cv_system_name in
8704		(*-msvc*)
8705			DFT_LIB_SUFFIX='_g.lib'
8706			;;
8707		(*)
8708			DFT_LIB_SUFFIX='_g.a'
8709			;;
8710		esac
8711		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8712		;;
8713	(Xprofile)
8714		case $cf_cv_system_name in
8715		(*-msvc*)
8716			DFT_LIB_SUFFIX='_p.lib'
8717			;;
8718		(*)
8719			DFT_LIB_SUFFIX='_p.a'
8720			;;
8721		esac
8722		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8723		;;
8724	(Xshared)
8725		case $cf_cv_system_name in
8726		(aix[5-7]*)
8727			DFT_LIB_SUFFIX='.so'
8728			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8729			;;
8730		(*-msvc*)
8731			DFT_LIB_SUFFIX='.dll'
8732			DFT_DEP_SUFFIX='.dll.lib'
8733			;;
8734		(cygwin*|msys*|mingw*)
8735			DFT_LIB_SUFFIX='.dll'
8736			DFT_DEP_SUFFIX='.dll.a'
8737			;;
8738		(darwin*)
8739			DFT_LIB_SUFFIX='.dylib'
8740			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8741			;;
8742		(hpux*)
8743			case $target in
8744			(ia64*)
8745				DFT_LIB_SUFFIX='.so'
8746				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8747				;;
8748			(*)
8749				DFT_LIB_SUFFIX='.sl'
8750				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8751				;;
8752			esac
8753			;;
8754		(*)
8755			DFT_LIB_SUFFIX='.so'
8756			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8757			;;
8758		esac
8759		;;
8760	(*)
8761		case $target in
8762		(*-msvc*)
8763			DFT_LIB_SUFFIX='.lib'
8764			;;
8765		(*)
8766			DFT_LIB_SUFFIX='.a'
8767			;;
8768		esac
8769		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
8770		;;
8771	esac
8772	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
8773	then
8774		DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
8775		DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
8776	fi
8777
8778LIB_SUFFIX=$DFT_LIB_SUFFIX
8779
8780echo "$as_me:8780: checking if you want to use dmalloc for testing" >&5
8781echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
8782
8783# Check whether --with-dmalloc or --without-dmalloc was given.
8784if test "${with_dmalloc+set}" = set; then
8785  withval="$with_dmalloc"
8786
8787cat >>confdefs.h <<EOF
8788#define USE_DMALLOC 1
8789EOF
8790
8791	: ${with_cflags:=-g}
8792	: ${with_no_leaks:=yes}
8793	 with_dmalloc=yes
8794else
8795  with_dmalloc=
8796fi;
8797echo "$as_me:8797: result: ${with_dmalloc:-no}" >&5
8798echo "${ECHO_T}${with_dmalloc:-no}" >&6
8799
8800case .$with_cflags in
8801(.*-g*)
8802	case .$CFLAGS in
8803	(.*-g*)
8804		;;
8805	(*)
8806
8807cf_fix_cppflags=no
8808cf_new_cflags=
8809cf_new_cppflags=
8810cf_new_extra_cppflags=
8811
8812for cf_add_cflags in -g
8813do
8814case $cf_fix_cppflags in
8815(no)
8816	case $cf_add_cflags in
8817	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8818		case $cf_add_cflags in
8819		(-D*)
8820			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8821
8822			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8823				&& test -z "${cf_tst_cflags}" \
8824				&& cf_fix_cppflags=yes
8825
8826			if test $cf_fix_cppflags = yes ; then
8827
8828	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8829	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8830
8831				continue
8832			elif test "${cf_tst_cflags}" = "\"'" ; then
8833
8834	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8835	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8836
8837				continue
8838			fi
8839			;;
8840		esac
8841		case "$CPPFLAGS" in
8842		(*$cf_add_cflags)
8843			;;
8844		(*)
8845			case $cf_add_cflags in
8846			(-D*)
8847				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8848
8849CPPFLAGS=`echo "$CPPFLAGS" | \
8850	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8851		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8852
8853				;;
8854			esac
8855
8856	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8857	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8858
8859			;;
8860		esac
8861		;;
8862	(*)
8863
8864	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8865	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8866
8867		;;
8868	esac
8869	;;
8870(yes)
8871
8872	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8873	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8874
8875	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8876
8877	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8878		&& test -z "${cf_tst_cflags}" \
8879		&& cf_fix_cppflags=no
8880	;;
8881esac
8882done
8883
8884if test -n "$cf_new_cflags" ; then
8885
8886	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8887	CFLAGS="${CFLAGS}$cf_new_cflags"
8888
8889fi
8890
8891if test -n "$cf_new_cppflags" ; then
8892
8893	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8894	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8895
8896fi
8897
8898if test -n "$cf_new_extra_cppflags" ; then
8899
8900	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8901	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8902
8903fi
8904
8905		;;
8906	esac
8907	;;
8908esac
8909
8910if test "$with_dmalloc" = yes ; then
8911	echo "$as_me:8911: checking for dmalloc.h" >&5
8912echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
8913if test "${ac_cv_header_dmalloc_h+set}" = set; then
8914  echo $ECHO_N "(cached) $ECHO_C" >&6
8915else
8916  cat >conftest.$ac_ext <<_ACEOF
8917#line 8917 "configure"
8918#include "confdefs.h"
8919#include <dmalloc.h>
8920_ACEOF
8921if { (eval echo "$as_me:8921: \"$ac_cpp conftest.$ac_ext\"") >&5
8922  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8923  ac_status=$?
8924  egrep -v '^ *\+' conftest.er1 >conftest.err
8925  rm -f conftest.er1
8926  cat conftest.err >&5
8927  echo "$as_me:8927: \$? = $ac_status" >&5
8928  (exit $ac_status); } >/dev/null; then
8929  if test -s conftest.err; then
8930    ac_cpp_err=$ac_c_preproc_warn_flag
8931  else
8932    ac_cpp_err=
8933  fi
8934else
8935  ac_cpp_err=yes
8936fi
8937if test -z "$ac_cpp_err"; then
8938  ac_cv_header_dmalloc_h=yes
8939else
8940  echo "$as_me: failed program was:" >&5
8941  cat conftest.$ac_ext >&5
8942  ac_cv_header_dmalloc_h=no
8943fi
8944rm -f conftest.err conftest.$ac_ext
8945fi
8946echo "$as_me:8946: result: $ac_cv_header_dmalloc_h" >&5
8947echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
8948if test $ac_cv_header_dmalloc_h = yes; then
8949
8950echo "$as_me:8950: checking for dmalloc_debug in -ldmalloc" >&5
8951echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
8952if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
8953  echo $ECHO_N "(cached) $ECHO_C" >&6
8954else
8955  ac_check_lib_save_LIBS=$LIBS
8956LIBS="-ldmalloc  $LIBS"
8957cat >conftest.$ac_ext <<_ACEOF
8958#line 8958 "configure"
8959#include "confdefs.h"
8960
8961/* Override any gcc2 internal prototype to avoid an error.  */
8962#ifdef __cplusplus
8963extern "C"
8964#endif
8965/* We use char because int might match the return type of a gcc2
8966   builtin and then its argument prototype would still apply.  */
8967char dmalloc_debug ();
8968int
8969main (void)
8970{
8971dmalloc_debug ();
8972  ;
8973  return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext conftest$ac_exeext
8977if { (eval echo "$as_me:8977: \"$ac_link\"") >&5
8978  (eval $ac_link) 2>&5
8979  ac_status=$?
8980  echo "$as_me:8980: \$? = $ac_status" >&5
8981  (exit $ac_status); } &&
8982         { ac_try='test -s conftest$ac_exeext'
8983  { (eval echo "$as_me:8983: \"$ac_try\"") >&5
8984  (eval $ac_try) 2>&5
8985  ac_status=$?
8986  echo "$as_me:8986: \$? = $ac_status" >&5
8987  (exit $ac_status); }; }; then
8988  ac_cv_lib_dmalloc_dmalloc_debug=yes
8989else
8990  echo "$as_me: failed program was:" >&5
8991cat conftest.$ac_ext >&5
8992ac_cv_lib_dmalloc_dmalloc_debug=no
8993fi
8994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8995LIBS=$ac_check_lib_save_LIBS
8996fi
8997echo "$as_me:8997: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
8998echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
8999if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9000  cat >>confdefs.h <<EOF
9001#define HAVE_LIBDMALLOC 1
9002EOF
9003
9004  LIBS="-ldmalloc $LIBS"
9005
9006fi
9007
9008fi
9009
9010fi
9011
9012echo "$as_me:9012: checking if you want to use dbmalloc for testing" >&5
9013echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9014
9015# Check whether --with-dbmalloc or --without-dbmalloc was given.
9016if test "${with_dbmalloc+set}" = set; then
9017  withval="$with_dbmalloc"
9018
9019cat >>confdefs.h <<EOF
9020#define USE_DBMALLOC 1
9021EOF
9022
9023	: ${with_cflags:=-g}
9024	: ${with_no_leaks:=yes}
9025	 with_dbmalloc=yes
9026else
9027  with_dbmalloc=
9028fi;
9029echo "$as_me:9029: result: ${with_dbmalloc:-no}" >&5
9030echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9031
9032case .$with_cflags in
9033(.*-g*)
9034	case .$CFLAGS in
9035	(.*-g*)
9036		;;
9037	(*)
9038
9039cf_fix_cppflags=no
9040cf_new_cflags=
9041cf_new_cppflags=
9042cf_new_extra_cppflags=
9043
9044for cf_add_cflags in -g
9045do
9046case $cf_fix_cppflags in
9047(no)
9048	case $cf_add_cflags in
9049	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9050		case $cf_add_cflags in
9051		(-D*)
9052			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9053
9054			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9055				&& test -z "${cf_tst_cflags}" \
9056				&& cf_fix_cppflags=yes
9057
9058			if test $cf_fix_cppflags = yes ; then
9059
9060	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9061	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9062
9063				continue
9064			elif test "${cf_tst_cflags}" = "\"'" ; then
9065
9066	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9067	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9068
9069				continue
9070			fi
9071			;;
9072		esac
9073		case "$CPPFLAGS" in
9074		(*$cf_add_cflags)
9075			;;
9076		(*)
9077			case $cf_add_cflags in
9078			(-D*)
9079				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9080
9081CPPFLAGS=`echo "$CPPFLAGS" | \
9082	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9083		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9084
9085				;;
9086			esac
9087
9088	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9089	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9090
9091			;;
9092		esac
9093		;;
9094	(*)
9095
9096	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9097	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9098
9099		;;
9100	esac
9101	;;
9102(yes)
9103
9104	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9105	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9106
9107	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9108
9109	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9110		&& test -z "${cf_tst_cflags}" \
9111		&& cf_fix_cppflags=no
9112	;;
9113esac
9114done
9115
9116if test -n "$cf_new_cflags" ; then
9117
9118	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9119	CFLAGS="${CFLAGS}$cf_new_cflags"
9120
9121fi
9122
9123if test -n "$cf_new_cppflags" ; then
9124
9125	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9126	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9127
9128fi
9129
9130if test -n "$cf_new_extra_cppflags" ; then
9131
9132	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9133	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9134
9135fi
9136
9137		;;
9138	esac
9139	;;
9140esac
9141
9142if test "$with_dbmalloc" = yes ; then
9143	echo "$as_me:9143: checking for dbmalloc.h" >&5
9144echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9145if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9146  echo $ECHO_N "(cached) $ECHO_C" >&6
9147else
9148  cat >conftest.$ac_ext <<_ACEOF
9149#line 9149 "configure"
9150#include "confdefs.h"
9151#include <dbmalloc.h>
9152_ACEOF
9153if { (eval echo "$as_me:9153: \"$ac_cpp conftest.$ac_ext\"") >&5
9154  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9155  ac_status=$?
9156  egrep -v '^ *\+' conftest.er1 >conftest.err
9157  rm -f conftest.er1
9158  cat conftest.err >&5
9159  echo "$as_me:9159: \$? = $ac_status" >&5
9160  (exit $ac_status); } >/dev/null; then
9161  if test -s conftest.err; then
9162    ac_cpp_err=$ac_c_preproc_warn_flag
9163  else
9164    ac_cpp_err=
9165  fi
9166else
9167  ac_cpp_err=yes
9168fi
9169if test -z "$ac_cpp_err"; then
9170  ac_cv_header_dbmalloc_h=yes
9171else
9172  echo "$as_me: failed program was:" >&5
9173  cat conftest.$ac_ext >&5
9174  ac_cv_header_dbmalloc_h=no
9175fi
9176rm -f conftest.err conftest.$ac_ext
9177fi
9178echo "$as_me:9178: result: $ac_cv_header_dbmalloc_h" >&5
9179echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9180if test $ac_cv_header_dbmalloc_h = yes; then
9181
9182echo "$as_me:9182: checking for debug_malloc in -ldbmalloc" >&5
9183echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9184if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9185  echo $ECHO_N "(cached) $ECHO_C" >&6
9186else
9187  ac_check_lib_save_LIBS=$LIBS
9188LIBS="-ldbmalloc  $LIBS"
9189cat >conftest.$ac_ext <<_ACEOF
9190#line 9190 "configure"
9191#include "confdefs.h"
9192
9193/* Override any gcc2 internal prototype to avoid an error.  */
9194#ifdef __cplusplus
9195extern "C"
9196#endif
9197/* We use char because int might match the return type of a gcc2
9198   builtin and then its argument prototype would still apply.  */
9199char debug_malloc ();
9200int
9201main (void)
9202{
9203debug_malloc ();
9204  ;
9205  return 0;
9206}
9207_ACEOF
9208rm -f conftest.$ac_objext conftest$ac_exeext
9209if { (eval echo "$as_me:9209: \"$ac_link\"") >&5
9210  (eval $ac_link) 2>&5
9211  ac_status=$?
9212  echo "$as_me:9212: \$? = $ac_status" >&5
9213  (exit $ac_status); } &&
9214         { ac_try='test -s conftest$ac_exeext'
9215  { (eval echo "$as_me:9215: \"$ac_try\"") >&5
9216  (eval $ac_try) 2>&5
9217  ac_status=$?
9218  echo "$as_me:9218: \$? = $ac_status" >&5
9219  (exit $ac_status); }; }; then
9220  ac_cv_lib_dbmalloc_debug_malloc=yes
9221else
9222  echo "$as_me: failed program was:" >&5
9223cat conftest.$ac_ext >&5
9224ac_cv_lib_dbmalloc_debug_malloc=no
9225fi
9226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9227LIBS=$ac_check_lib_save_LIBS
9228fi
9229echo "$as_me:9229: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9230echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9231if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9232  cat >>confdefs.h <<EOF
9233#define HAVE_LIBDBMALLOC 1
9234EOF
9235
9236  LIBS="-ldbmalloc $LIBS"
9237
9238fi
9239
9240fi
9241
9242fi
9243
9244echo "$as_me:9244: checking if you want to use valgrind for testing" >&5
9245echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9246
9247# Check whether --with-valgrind or --without-valgrind was given.
9248if test "${with_valgrind+set}" = set; then
9249  withval="$with_valgrind"
9250
9251cat >>confdefs.h <<EOF
9252#define USE_VALGRIND 1
9253EOF
9254
9255	: ${with_cflags:=-g}
9256	: ${with_no_leaks:=yes}
9257	 with_valgrind=yes
9258else
9259  with_valgrind=
9260fi;
9261echo "$as_me:9261: result: ${with_valgrind:-no}" >&5
9262echo "${ECHO_T}${with_valgrind:-no}" >&6
9263
9264case .$with_cflags in
9265(.*-g*)
9266	case .$CFLAGS in
9267	(.*-g*)
9268		;;
9269	(*)
9270
9271cf_fix_cppflags=no
9272cf_new_cflags=
9273cf_new_cppflags=
9274cf_new_extra_cppflags=
9275
9276for cf_add_cflags in -g
9277do
9278case $cf_fix_cppflags in
9279(no)
9280	case $cf_add_cflags in
9281	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9282		case $cf_add_cflags in
9283		(-D*)
9284			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9285
9286			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9287				&& test -z "${cf_tst_cflags}" \
9288				&& cf_fix_cppflags=yes
9289
9290			if test $cf_fix_cppflags = yes ; then
9291
9292	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9293	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9294
9295				continue
9296			elif test "${cf_tst_cflags}" = "\"'" ; then
9297
9298	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9299	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9300
9301				continue
9302			fi
9303			;;
9304		esac
9305		case "$CPPFLAGS" in
9306		(*$cf_add_cflags)
9307			;;
9308		(*)
9309			case $cf_add_cflags in
9310			(-D*)
9311				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9312
9313CPPFLAGS=`echo "$CPPFLAGS" | \
9314	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9315		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9316
9317				;;
9318			esac
9319
9320	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9321	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9322
9323			;;
9324		esac
9325		;;
9326	(*)
9327
9328	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9329	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9330
9331		;;
9332	esac
9333	;;
9334(yes)
9335
9336	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9337	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9338
9339	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9340
9341	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9342		&& test -z "${cf_tst_cflags}" \
9343		&& cf_fix_cppflags=no
9344	;;
9345esac
9346done
9347
9348if test -n "$cf_new_cflags" ; then
9349
9350	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9351	CFLAGS="${CFLAGS}$cf_new_cflags"
9352
9353fi
9354
9355if test -n "$cf_new_cppflags" ; then
9356
9357	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9358	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9359
9360fi
9361
9362if test -n "$cf_new_extra_cppflags" ; then
9363
9364	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9365	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9366
9367fi
9368
9369		;;
9370	esac
9371	;;
9372esac
9373
9374echo "$as_me:9374: checking if you want to perform memory-leak testing" >&5
9375echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
9376
9377# Check whether --enable-leaks or --disable-leaks was given.
9378if test "${enable_leaks+set}" = set; then
9379  enableval="$enable_leaks"
9380  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
9381else
9382  : ${with_no_leaks:=no}
9383fi;
9384echo "$as_me:9384: result: $with_no_leaks" >&5
9385echo "${ECHO_T}$with_no_leaks" >&6
9386
9387if test "$with_no_leaks" = yes ; then
9388
9389cat >>confdefs.h <<\EOF
9390#define NO_LEAKS 1
9391EOF
9392
9393cat >>confdefs.h <<\EOF
9394#define YY_NO_LEAKS 1
9395EOF
9396
9397fi
9398
9399ac_header_dirent=no
9400for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9401  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9402echo "$as_me:9402: checking for $ac_hdr that defines DIR" >&5
9403echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9404if eval "test \"\${$as_ac_Header+set}\" = set"; then
9405  echo $ECHO_N "(cached) $ECHO_C" >&6
9406else
9407  cat >conftest.$ac_ext <<_ACEOF
9408#line 9408 "configure"
9409#include "confdefs.h"
9410#include <sys/types.h>
9411#include <$ac_hdr>
9412
9413int
9414main (void)
9415{
9416if ((DIR *) 0)
9417return 0;
9418  ;
9419  return 0;
9420}
9421_ACEOF
9422rm -f conftest.$ac_objext
9423if { (eval echo "$as_me:9423: \"$ac_compile\"") >&5
9424  (eval $ac_compile) 2>&5
9425  ac_status=$?
9426  echo "$as_me:9426: \$? = $ac_status" >&5
9427  (exit $ac_status); } &&
9428         { ac_try='test -s conftest.$ac_objext'
9429  { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430  (eval $ac_try) 2>&5
9431  ac_status=$?
9432  echo "$as_me:9432: \$? = $ac_status" >&5
9433  (exit $ac_status); }; }; then
9434  eval "$as_ac_Header=yes"
9435else
9436  echo "$as_me: failed program was:" >&5
9437cat conftest.$ac_ext >&5
9438eval "$as_ac_Header=no"
9439fi
9440rm -f conftest.$ac_objext conftest.$ac_ext
9441fi
9442echo "$as_me:9442: result: `eval echo '${'$as_ac_Header'}'`" >&5
9443echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9444if test `eval echo '${'$as_ac_Header'}'` = yes; then
9445  cat >>confdefs.h <<EOF
9446#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9447EOF
9448
9449ac_header_dirent=$ac_hdr; break
9450fi
9451
9452done
9453# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9454if test $ac_header_dirent = dirent.h; then
9455  echo "$as_me:9455: checking for opendir in -ldir" >&5
9456echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9457if test "${ac_cv_lib_dir_opendir+set}" = set; then
9458  echo $ECHO_N "(cached) $ECHO_C" >&6
9459else
9460  ac_check_lib_save_LIBS=$LIBS
9461LIBS="-ldir  $LIBS"
9462cat >conftest.$ac_ext <<_ACEOF
9463#line 9463 "configure"
9464#include "confdefs.h"
9465
9466/* Override any gcc2 internal prototype to avoid an error.  */
9467#ifdef __cplusplus
9468extern "C"
9469#endif
9470/* We use char because int might match the return type of a gcc2
9471   builtin and then its argument prototype would still apply.  */
9472char opendir ();
9473int
9474main (void)
9475{
9476opendir ();
9477  ;
9478  return 0;
9479}
9480_ACEOF
9481rm -f conftest.$ac_objext conftest$ac_exeext
9482if { (eval echo "$as_me:9482: \"$ac_link\"") >&5
9483  (eval $ac_link) 2>&5
9484  ac_status=$?
9485  echo "$as_me:9485: \$? = $ac_status" >&5
9486  (exit $ac_status); } &&
9487         { ac_try='test -s conftest$ac_exeext'
9488  { (eval echo "$as_me:9488: \"$ac_try\"") >&5
9489  (eval $ac_try) 2>&5
9490  ac_status=$?
9491  echo "$as_me:9491: \$? = $ac_status" >&5
9492  (exit $ac_status); }; }; then
9493  ac_cv_lib_dir_opendir=yes
9494else
9495  echo "$as_me: failed program was:" >&5
9496cat conftest.$ac_ext >&5
9497ac_cv_lib_dir_opendir=no
9498fi
9499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9500LIBS=$ac_check_lib_save_LIBS
9501fi
9502echo "$as_me:9502: result: $ac_cv_lib_dir_opendir" >&5
9503echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9504if test $ac_cv_lib_dir_opendir = yes; then
9505  LIBS="$LIBS -ldir"
9506fi
9507
9508else
9509  echo "$as_me:9509: checking for opendir in -lx" >&5
9510echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9511if test "${ac_cv_lib_x_opendir+set}" = set; then
9512  echo $ECHO_N "(cached) $ECHO_C" >&6
9513else
9514  ac_check_lib_save_LIBS=$LIBS
9515LIBS="-lx  $LIBS"
9516cat >conftest.$ac_ext <<_ACEOF
9517#line 9517 "configure"
9518#include "confdefs.h"
9519
9520/* Override any gcc2 internal prototype to avoid an error.  */
9521#ifdef __cplusplus
9522extern "C"
9523#endif
9524/* We use char because int might match the return type of a gcc2
9525   builtin and then its argument prototype would still apply.  */
9526char opendir ();
9527int
9528main (void)
9529{
9530opendir ();
9531  ;
9532  return 0;
9533}
9534_ACEOF
9535rm -f conftest.$ac_objext conftest$ac_exeext
9536if { (eval echo "$as_me:9536: \"$ac_link\"") >&5
9537  (eval $ac_link) 2>&5
9538  ac_status=$?
9539  echo "$as_me:9539: \$? = $ac_status" >&5
9540  (exit $ac_status); } &&
9541         { ac_try='test -s conftest$ac_exeext'
9542  { (eval echo "$as_me:9542: \"$ac_try\"") >&5
9543  (eval $ac_try) 2>&5
9544  ac_status=$?
9545  echo "$as_me:9545: \$? = $ac_status" >&5
9546  (exit $ac_status); }; }; then
9547  ac_cv_lib_x_opendir=yes
9548else
9549  echo "$as_me: failed program was:" >&5
9550cat conftest.$ac_ext >&5
9551ac_cv_lib_x_opendir=no
9552fi
9553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9554LIBS=$ac_check_lib_save_LIBS
9555fi
9556echo "$as_me:9556: result: $ac_cv_lib_x_opendir" >&5
9557echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
9558if test $ac_cv_lib_x_opendir = yes; then
9559  LIBS="$LIBS -lx"
9560fi
9561
9562fi
9563
9564echo "$as_me:9564: checking for ANSI C header files" >&5
9565echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9566if test "${ac_cv_header_stdc+set}" = set; then
9567  echo $ECHO_N "(cached) $ECHO_C" >&6
9568else
9569  cat >conftest.$ac_ext <<_ACEOF
9570#line 9570 "configure"
9571#include "confdefs.h"
9572#include <stdlib.h>
9573#include <stdarg.h>
9574#include <string.h>
9575#include <float.h>
9576
9577_ACEOF
9578if { (eval echo "$as_me:9578: \"$ac_cpp conftest.$ac_ext\"") >&5
9579  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9580  ac_status=$?
9581  egrep -v '^ *\+' conftest.er1 >conftest.err
9582  rm -f conftest.er1
9583  cat conftest.err >&5
9584  echo "$as_me:9584: \$? = $ac_status" >&5
9585  (exit $ac_status); } >/dev/null; then
9586  if test -s conftest.err; then
9587    ac_cpp_err=$ac_c_preproc_warn_flag
9588  else
9589    ac_cpp_err=
9590  fi
9591else
9592  ac_cpp_err=yes
9593fi
9594if test -z "$ac_cpp_err"; then
9595  ac_cv_header_stdc=yes
9596else
9597  echo "$as_me: failed program was:" >&5
9598  cat conftest.$ac_ext >&5
9599  ac_cv_header_stdc=no
9600fi
9601rm -f conftest.err conftest.$ac_ext
9602
9603if test $ac_cv_header_stdc = yes; then
9604  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9605  cat >conftest.$ac_ext <<_ACEOF
9606#line 9606 "configure"
9607#include "confdefs.h"
9608#include <string.h>
9609
9610_ACEOF
9611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9612  egrep "memchr" >/dev/null 2>&1; then
9613  :
9614else
9615  ac_cv_header_stdc=no
9616fi
9617rm -rf conftest*
9618
9619fi
9620
9621if test $ac_cv_header_stdc = yes; then
9622  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9623  cat >conftest.$ac_ext <<_ACEOF
9624#line 9624 "configure"
9625#include "confdefs.h"
9626#include <stdlib.h>
9627
9628_ACEOF
9629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9630  egrep "free" >/dev/null 2>&1; then
9631  :
9632else
9633  ac_cv_header_stdc=no
9634fi
9635rm -rf conftest*
9636
9637fi
9638
9639if test $ac_cv_header_stdc = yes; then
9640  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9641  if test "$cross_compiling" = yes; then
9642  :
9643else
9644  cat >conftest.$ac_ext <<_ACEOF
9645#line 9645 "configure"
9646#include "confdefs.h"
9647#include <ctype.h>
9648#if ((' ' & 0x0FF) == 0x020)
9649# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9650# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9651#else
9652# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9653                     || ('j' <= (c) && (c) <= 'r') \
9654                     || ('s' <= (c) && (c) <= 'z'))
9655# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9656#endif
9657
9658#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9659int
9660main (void)
9661{
9662  int i;
9663  for (i = 0; i < 256; i++)
9664    if (XOR (islower (i), ISLOWER (i))
9665        || toupper (i) != TOUPPER (i))
9666      $ac_main_return(2);
9667  $ac_main_return (0);
9668}
9669_ACEOF
9670rm -f conftest$ac_exeext
9671if { (eval echo "$as_me:9671: \"$ac_link\"") >&5
9672  (eval $ac_link) 2>&5
9673  ac_status=$?
9674  echo "$as_me:9674: \$? = $ac_status" >&5
9675  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9676  { (eval echo "$as_me:9676: \"$ac_try\"") >&5
9677  (eval $ac_try) 2>&5
9678  ac_status=$?
9679  echo "$as_me:9679: \$? = $ac_status" >&5
9680  (exit $ac_status); }; }; then
9681  :
9682else
9683  echo "$as_me: program exited with status $ac_status" >&5
9684echo "$as_me: failed program was:" >&5
9685cat conftest.$ac_ext >&5
9686ac_cv_header_stdc=no
9687fi
9688rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9689fi
9690fi
9691fi
9692echo "$as_me:9692: result: $ac_cv_header_stdc" >&5
9693echo "${ECHO_T}$ac_cv_header_stdc" >&6
9694if test $ac_cv_header_stdc = yes; then
9695
9696cat >>confdefs.h <<\EOF
9697#define STDC_HEADERS 1
9698EOF
9699
9700fi
9701
9702for ac_header in \
9703limits.h \
9704unistd.h \
9705pwd.h \
9706grp.h \
9707
9708do
9709as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9710echo "$as_me:9710: checking for $ac_header" >&5
9711echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9712if eval "test \"\${$as_ac_Header+set}\" = set"; then
9713  echo $ECHO_N "(cached) $ECHO_C" >&6
9714else
9715  cat >conftest.$ac_ext <<_ACEOF
9716#line 9716 "configure"
9717#include "confdefs.h"
9718#include <$ac_header>
9719_ACEOF
9720if { (eval echo "$as_me:9720: \"$ac_cpp conftest.$ac_ext\"") >&5
9721  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9722  ac_status=$?
9723  egrep -v '^ *\+' conftest.er1 >conftest.err
9724  rm -f conftest.er1
9725  cat conftest.err >&5
9726  echo "$as_me:9726: \$? = $ac_status" >&5
9727  (exit $ac_status); } >/dev/null; then
9728  if test -s conftest.err; then
9729    ac_cpp_err=$ac_c_preproc_warn_flag
9730  else
9731    ac_cpp_err=
9732  fi
9733else
9734  ac_cpp_err=yes
9735fi
9736if test -z "$ac_cpp_err"; then
9737  eval "$as_ac_Header=yes"
9738else
9739  echo "$as_me: failed program was:" >&5
9740  cat conftest.$ac_ext >&5
9741  eval "$as_ac_Header=no"
9742fi
9743rm -f conftest.err conftest.$ac_ext
9744fi
9745echo "$as_me:9745: result: `eval echo '${'$as_ac_Header'}'`" >&5
9746echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9747if test `eval echo '${'$as_ac_Header'}'` = yes; then
9748  cat >>confdefs.h <<EOF
9749#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9750EOF
9751
9752fi
9753done
9754
9755# On IRIX 5.3, sys/types and inttypes.h are conflicting.
9756
9757for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9758                  inttypes.h stdint.h unistd.h
9759do
9760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9761echo "$as_me:9761: checking for $ac_header" >&5
9762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9763if eval "test \"\${$as_ac_Header+set}\" = set"; then
9764  echo $ECHO_N "(cached) $ECHO_C" >&6
9765else
9766  cat >conftest.$ac_ext <<_ACEOF
9767#line 9767 "configure"
9768#include "confdefs.h"
9769$ac_includes_default
9770#include <$ac_header>
9771_ACEOF
9772rm -f conftest.$ac_objext
9773if { (eval echo "$as_me:9773: \"$ac_compile\"") >&5
9774  (eval $ac_compile) 2>&5
9775  ac_status=$?
9776  echo "$as_me:9776: \$? = $ac_status" >&5
9777  (exit $ac_status); } &&
9778         { ac_try='test -s conftest.$ac_objext'
9779  { (eval echo "$as_me:9779: \"$ac_try\"") >&5
9780  (eval $ac_try) 2>&5
9781  ac_status=$?
9782  echo "$as_me:9782: \$? = $ac_status" >&5
9783  (exit $ac_status); }; }; then
9784  eval "$as_ac_Header=yes"
9785else
9786  echo "$as_me: failed program was:" >&5
9787cat conftest.$ac_ext >&5
9788eval "$as_ac_Header=no"
9789fi
9790rm -f conftest.$ac_objext conftest.$ac_ext
9791fi
9792echo "$as_me:9792: result: `eval echo '${'$as_ac_Header'}'`" >&5
9793echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9794if test `eval echo '${'$as_ac_Header'}'` = yes; then
9795  cat >>confdefs.h <<EOF
9796#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9797EOF
9798
9799fi
9800done
9801
9802echo "$as_me:9802: checking for mode_t" >&5
9803echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
9804if test "${ac_cv_type_mode_t+set}" = set; then
9805  echo $ECHO_N "(cached) $ECHO_C" >&6
9806else
9807  cat >conftest.$ac_ext <<_ACEOF
9808#line 9808 "configure"
9809#include "confdefs.h"
9810$ac_includes_default
9811int
9812main (void)
9813{
9814if ((mode_t *) 0)
9815  return 0;
9816if (sizeof (mode_t))
9817  return 0;
9818  ;
9819  return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
9823if { (eval echo "$as_me:9823: \"$ac_compile\"") >&5
9824  (eval $ac_compile) 2>&5
9825  ac_status=$?
9826  echo "$as_me:9826: \$? = $ac_status" >&5
9827  (exit $ac_status); } &&
9828         { ac_try='test -s conftest.$ac_objext'
9829  { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9830  (eval $ac_try) 2>&5
9831  ac_status=$?
9832  echo "$as_me:9832: \$? = $ac_status" >&5
9833  (exit $ac_status); }; }; then
9834  ac_cv_type_mode_t=yes
9835else
9836  echo "$as_me: failed program was:" >&5
9837cat conftest.$ac_ext >&5
9838ac_cv_type_mode_t=no
9839fi
9840rm -f conftest.$ac_objext conftest.$ac_ext
9841fi
9842echo "$as_me:9842: result: $ac_cv_type_mode_t" >&5
9843echo "${ECHO_T}$ac_cv_type_mode_t" >&6
9844if test $ac_cv_type_mode_t = yes; then
9845  :
9846else
9847
9848cat >>confdefs.h <<EOF
9849#define mode_t int
9850EOF
9851
9852fi
9853
9854echo "$as_me:9854: checking whether struct tm is in sys/time.h or time.h" >&5
9855echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
9856if test "${ac_cv_struct_tm+set}" = set; then
9857  echo $ECHO_N "(cached) $ECHO_C" >&6
9858else
9859  cat >conftest.$ac_ext <<_ACEOF
9860#line 9860 "configure"
9861#include "confdefs.h"
9862#include <sys/types.h>
9863#include <time.h>
9864
9865int
9866main (void)
9867{
9868struct tm *tp; tp->tm_sec;
9869  ;
9870  return 0;
9871}
9872_ACEOF
9873rm -f conftest.$ac_objext
9874if { (eval echo "$as_me:9874: \"$ac_compile\"") >&5
9875  (eval $ac_compile) 2>&5
9876  ac_status=$?
9877  echo "$as_me:9877: \$? = $ac_status" >&5
9878  (exit $ac_status); } &&
9879         { ac_try='test -s conftest.$ac_objext'
9880  { (eval echo "$as_me:9880: \"$ac_try\"") >&5
9881  (eval $ac_try) 2>&5
9882  ac_status=$?
9883  echo "$as_me:9883: \$? = $ac_status" >&5
9884  (exit $ac_status); }; }; then
9885  ac_cv_struct_tm=time.h
9886else
9887  echo "$as_me: failed program was:" >&5
9888cat conftest.$ac_ext >&5
9889ac_cv_struct_tm=sys/time.h
9890fi
9891rm -f conftest.$ac_objext conftest.$ac_ext
9892fi
9893echo "$as_me:9893: result: $ac_cv_struct_tm" >&5
9894echo "${ECHO_T}$ac_cv_struct_tm" >&6
9895if test $ac_cv_struct_tm = sys/time.h; then
9896
9897cat >>confdefs.h <<\EOF
9898#define TM_IN_SYS_TIME 1
9899EOF
9900
9901fi
9902
9903echo "$as_me:9903: checking for extra include directories" >&5
9904echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
9905if test "${cf_cv_curses_incdir+set}" = set; then
9906  echo $ECHO_N "(cached) $ECHO_C" >&6
9907else
9908
9909cf_cv_curses_incdir=no
9910case $host_os in
9911(hpux10.*)
9912	if test "x$cf_cv_screen" = "xcurses_colr"
9913	then
9914		test -d /usr/include/curses_colr && \
9915		cf_cv_curses_incdir="-I/usr/include/curses_colr"
9916	fi
9917	;;
9918(sunos3*|sunos4*)
9919	if test "x$cf_cv_screen" = "xcurses_5lib"
9920	then
9921		test -d /usr/5lib && \
9922		test -d /usr/5include && \
9923		cf_cv_curses_incdir="-I/usr/5include"
9924	fi
9925	;;
9926esac
9927
9928fi
9929echo "$as_me:9929: result: $cf_cv_curses_incdir" >&5
9930echo "${ECHO_T}$cf_cv_curses_incdir" >&6
9931if test "$cf_cv_curses_incdir" != no
9932then
9933
9934	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9935	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
9936
9937fi
9938
9939echo "$as_me:9939: checking if we have identified curses headers" >&5
9940echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9941if test "${cf_cv_ncurses_header+set}" = set; then
9942  echo $ECHO_N "(cached) $ECHO_C" >&6
9943else
9944
9945cf_cv_ncurses_header=none
9946for cf_header in \
9947	ncurses.h  \
9948	curses.h  ncurses/ncurses.h ncurses/curses.h
9949do
9950cat >conftest.$ac_ext <<_ACEOF
9951#line 9951 "configure"
9952#include "confdefs.h"
9953#include <${cf_header}>
9954int
9955main (void)
9956{
9957initscr(); tgoto("?", 0,0)
9958  ;
9959  return 0;
9960}
9961_ACEOF
9962rm -f conftest.$ac_objext
9963if { (eval echo "$as_me:9963: \"$ac_compile\"") >&5
9964  (eval $ac_compile) 2>&5
9965  ac_status=$?
9966  echo "$as_me:9966: \$? = $ac_status" >&5
9967  (exit $ac_status); } &&
9968         { ac_try='test -s conftest.$ac_objext'
9969  { (eval echo "$as_me:9969: \"$ac_try\"") >&5
9970  (eval $ac_try) 2>&5
9971  ac_status=$?
9972  echo "$as_me:9972: \$? = $ac_status" >&5
9973  (exit $ac_status); }; }; then
9974  cf_cv_ncurses_header=$cf_header; break
9975else
9976  echo "$as_me: failed program was:" >&5
9977cat conftest.$ac_ext >&5
9978fi
9979rm -f conftest.$ac_objext conftest.$ac_ext
9980done
9981
9982fi
9983echo "$as_me:9983: result: $cf_cv_ncurses_header" >&5
9984echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9985
9986if test "$cf_cv_ncurses_header" = none ; then
9987	{ { echo "$as_me:9987: error: No curses header-files found" >&5
9988echo "$as_me: error: No curses header-files found" >&2;}
9989   { (exit 1); exit 1; }; }
9990fi
9991
9992# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9993
9994for ac_header in $cf_cv_ncurses_header
9995do
9996as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9997echo "$as_me:9997: checking for $ac_header" >&5
9998echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9999if eval "test \"\${$as_ac_Header+set}\" = set"; then
10000  echo $ECHO_N "(cached) $ECHO_C" >&6
10001else
10002  cat >conftest.$ac_ext <<_ACEOF
10003#line 10003 "configure"
10004#include "confdefs.h"
10005#include <$ac_header>
10006_ACEOF
10007if { (eval echo "$as_me:10007: \"$ac_cpp conftest.$ac_ext\"") >&5
10008  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10009  ac_status=$?
10010  egrep -v '^ *\+' conftest.er1 >conftest.err
10011  rm -f conftest.er1
10012  cat conftest.err >&5
10013  echo "$as_me:10013: \$? = $ac_status" >&5
10014  (exit $ac_status); } >/dev/null; then
10015  if test -s conftest.err; then
10016    ac_cpp_err=$ac_c_preproc_warn_flag
10017  else
10018    ac_cpp_err=
10019  fi
10020else
10021  ac_cpp_err=yes
10022fi
10023if test -z "$ac_cpp_err"; then
10024  eval "$as_ac_Header=yes"
10025else
10026  echo "$as_me: failed program was:" >&5
10027  cat conftest.$ac_ext >&5
10028  eval "$as_ac_Header=no"
10029fi
10030rm -f conftest.err conftest.$ac_ext
10031fi
10032echo "$as_me:10032: result: `eval echo '${'$as_ac_Header'}'`" >&5
10033echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10034if test `eval echo '${'$as_ac_Header'}'` = yes; then
10035  cat >>confdefs.h <<EOF
10036#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10037EOF
10038
10039fi
10040done
10041
10042echo "$as_me:10042: checking for terminfo header" >&5
10043echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10044if test "${cf_cv_term_header+set}" = set; then
10045  echo $ECHO_N "(cached) $ECHO_C" >&6
10046else
10047
10048case ${cf_cv_ncurses_header} in
10049(*/ncurses.h|*/ncursesw.h)
10050	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10051	;;
10052(*)
10053	cf_term_header=term.h
10054	;;
10055esac
10056
10057for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10058do
10059cat >conftest.$ac_ext <<_ACEOF
10060#line 10060 "configure"
10061#include "confdefs.h"
10062#include <stdio.h>
10063#include <${cf_cv_ncurses_header:-curses.h}>
10064#include <$cf_test>
10065
10066int
10067main (void)
10068{
10069int x = auto_left_margin; (void)x
10070  ;
10071  return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
10075if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076  (eval $ac_compile) 2>&5
10077  ac_status=$?
10078  echo "$as_me:10078: \$? = $ac_status" >&5
10079  (exit $ac_status); } &&
10080         { ac_try='test -s conftest.$ac_objext'
10081  { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082  (eval $ac_try) 2>&5
10083  ac_status=$?
10084  echo "$as_me:10084: \$? = $ac_status" >&5
10085  (exit $ac_status); }; }; then
10086
10087	cf_cv_term_header="$cf_test"
10088else
10089  echo "$as_me: failed program was:" >&5
10090cat conftest.$ac_ext >&5
10091
10092	cf_cv_term_header=unknown
10093
10094fi
10095rm -f conftest.$ac_objext conftest.$ac_ext
10096	test "$cf_cv_term_header" != unknown && break
10097done
10098
10099fi
10100echo "$as_me:10100: result: $cf_cv_term_header" >&5
10101echo "${ECHO_T}$cf_cv_term_header" >&6
10102
10103# Set definitions to allow ifdef'ing to accommodate subdirectories
10104
10105case $cf_cv_term_header in
10106(*term.h)
10107
10108cat >>confdefs.h <<\EOF
10109#define HAVE_TERM_H 1
10110EOF
10111
10112	;;
10113esac
10114
10115case $cf_cv_term_header in
10116(ncurses/term.h)
10117
10118cat >>confdefs.h <<\EOF
10119#define HAVE_NCURSES_TERM_H 1
10120EOF
10121
10122	;;
10123(ncursesw/term.h)
10124
10125cat >>confdefs.h <<\EOF
10126#define HAVE_NCURSESW_TERM_H 1
10127EOF
10128
10129	;;
10130esac
10131
10132echo "$as_me:10132: checking for chtype typedef" >&5
10133echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
10134if test "${cf_cv_chtype_decl+set}" = set; then
10135  echo $ECHO_N "(cached) $ECHO_C" >&6
10136else
10137
10138	cat >conftest.$ac_ext <<_ACEOF
10139#line 10139 "configure"
10140#include "confdefs.h"
10141#include <${cf_cv_ncurses_header:-curses.h}>
10142int
10143main (void)
10144{
10145chtype foo; (void)foo
10146  ;
10147  return 0;
10148}
10149_ACEOF
10150rm -f conftest.$ac_objext
10151if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152  (eval $ac_compile) 2>&5
10153  ac_status=$?
10154  echo "$as_me:10154: \$? = $ac_status" >&5
10155  (exit $ac_status); } &&
10156         { ac_try='test -s conftest.$ac_objext'
10157  { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158  (eval $ac_try) 2>&5
10159  ac_status=$?
10160  echo "$as_me:10160: \$? = $ac_status" >&5
10161  (exit $ac_status); }; }; then
10162  cf_cv_chtype_decl=yes
10163else
10164  echo "$as_me: failed program was:" >&5
10165cat conftest.$ac_ext >&5
10166cf_cv_chtype_decl=no
10167fi
10168rm -f conftest.$ac_objext conftest.$ac_ext
10169fi
10170echo "$as_me:10170: result: $cf_cv_chtype_decl" >&5
10171echo "${ECHO_T}$cf_cv_chtype_decl" >&6
10172if test $cf_cv_chtype_decl = yes ; then
10173
10174cat >>confdefs.h <<\EOF
10175#define HAVE_TYPE_CHTYPE 1
10176EOF
10177
10178	echo "$as_me:10178: checking if chtype is scalar or struct" >&5
10179echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
10180if test "${cf_cv_chtype_type+set}" = set; then
10181  echo $ECHO_N "(cached) $ECHO_C" >&6
10182else
10183
10184		cat >conftest.$ac_ext <<_ACEOF
10185#line 10185 "configure"
10186#include "confdefs.h"
10187#include <${cf_cv_ncurses_header:-curses.h}>
10188int
10189main (void)
10190{
10191static chtype foo; long x = foo; (void)x
10192  ;
10193  return 0;
10194}
10195_ACEOF
10196rm -f conftest.$ac_objext
10197if { (eval echo "$as_me:10197: \"$ac_compile\"") >&5
10198  (eval $ac_compile) 2>&5
10199  ac_status=$?
10200  echo "$as_me:10200: \$? = $ac_status" >&5
10201  (exit $ac_status); } &&
10202         { ac_try='test -s conftest.$ac_objext'
10203  { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204  (eval $ac_try) 2>&5
10205  ac_status=$?
10206  echo "$as_me:10206: \$? = $ac_status" >&5
10207  (exit $ac_status); }; }; then
10208  cf_cv_chtype_type=scalar
10209else
10210  echo "$as_me: failed program was:" >&5
10211cat conftest.$ac_ext >&5
10212cf_cv_chtype_type=struct
10213fi
10214rm -f conftest.$ac_objext conftest.$ac_ext
10215fi
10216echo "$as_me:10216: result: $cf_cv_chtype_type" >&5
10217echo "${ECHO_T}$cf_cv_chtype_type" >&6
10218	if test $cf_cv_chtype_type = scalar ; then
10219
10220cat >>confdefs.h <<\EOF
10221#define TYPE_CHTYPE_IS_SCALAR 1
10222EOF
10223
10224	fi
10225fi
10226
10227for ac_header in unistd.h getopt.h
10228do
10229as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10230echo "$as_me:10230: checking for $ac_header" >&5
10231echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10232if eval "test \"\${$as_ac_Header+set}\" = set"; then
10233  echo $ECHO_N "(cached) $ECHO_C" >&6
10234else
10235  cat >conftest.$ac_ext <<_ACEOF
10236#line 10236 "configure"
10237#include "confdefs.h"
10238#include <$ac_header>
10239_ACEOF
10240if { (eval echo "$as_me:10240: \"$ac_cpp conftest.$ac_ext\"") >&5
10241  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10242  ac_status=$?
10243  egrep -v '^ *\+' conftest.er1 >conftest.err
10244  rm -f conftest.er1
10245  cat conftest.err >&5
10246  echo "$as_me:10246: \$? = $ac_status" >&5
10247  (exit $ac_status); } >/dev/null; then
10248  if test -s conftest.err; then
10249    ac_cpp_err=$ac_c_preproc_warn_flag
10250  else
10251    ac_cpp_err=
10252  fi
10253else
10254  ac_cpp_err=yes
10255fi
10256if test -z "$ac_cpp_err"; then
10257  eval "$as_ac_Header=yes"
10258else
10259  echo "$as_me: failed program was:" >&5
10260  cat conftest.$ac_ext >&5
10261  eval "$as_ac_Header=no"
10262fi
10263rm -f conftest.err conftest.$ac_ext
10264fi
10265echo "$as_me:10265: result: `eval echo '${'$as_ac_Header'}'`" >&5
10266echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10267if test `eval echo '${'$as_ac_Header'}'` = yes; then
10268  cat >>confdefs.h <<EOF
10269#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10270EOF
10271
10272fi
10273done
10274
10275echo "$as_me:10275: checking for header declaring getopt variables" >&5
10276echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
10277if test "${cf_cv_getopt_header+set}" = set; then
10278  echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280
10281cf_cv_getopt_header=none
10282for cf_header in stdio.h stdlib.h unistd.h getopt.h
10283do
10284cat >conftest.$ac_ext <<_ACEOF
10285#line 10285 "configure"
10286#include "confdefs.h"
10287
10288#include <$cf_header>
10289int
10290main (void)
10291{
10292int x = optind; char *y = optarg
10293  ;
10294  return 0;
10295}
10296_ACEOF
10297rm -f conftest.$ac_objext
10298if { (eval echo "$as_me:10298: \"$ac_compile\"") >&5
10299  (eval $ac_compile) 2>&5
10300  ac_status=$?
10301  echo "$as_me:10301: \$? = $ac_status" >&5
10302  (exit $ac_status); } &&
10303         { ac_try='test -s conftest.$ac_objext'
10304  { (eval echo "$as_me:10304: \"$ac_try\"") >&5
10305  (eval $ac_try) 2>&5
10306  ac_status=$?
10307  echo "$as_me:10307: \$? = $ac_status" >&5
10308  (exit $ac_status); }; }; then
10309  cf_cv_getopt_header=$cf_header
10310 break
10311else
10312  echo "$as_me: failed program was:" >&5
10313cat conftest.$ac_ext >&5
10314fi
10315rm -f conftest.$ac_objext conftest.$ac_ext
10316done
10317
10318fi
10319echo "$as_me:10319: result: $cf_cv_getopt_header" >&5
10320echo "${ECHO_T}$cf_cv_getopt_header" >&6
10321if test $cf_cv_getopt_header != none ; then
10322
10323cat >>confdefs.h <<\EOF
10324#define HAVE_GETOPT_HEADER 1
10325EOF
10326
10327fi
10328if test $cf_cv_getopt_header = getopt.h ; then
10329
10330cat >>confdefs.h <<\EOF
10331#define NEED_GETOPT_H 1
10332EOF
10333
10334fi
10335
10336for ac_func in \
10337getcwd \
10338mktime \
10339strdup \
10340strerror \
10341getlogin \
10342sleep \
10343
10344do
10345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10346echo "$as_me:10346: checking for $ac_func" >&5
10347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10348if eval "test \"\${$as_ac_var+set}\" = set"; then
10349  echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351  cat >conftest.$ac_ext <<_ACEOF
10352#line 10352 "configure"
10353#include "confdefs.h"
10354#define $ac_func autoconf_temporary
10355#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10356#undef $ac_func
10357
10358#ifdef __cplusplus
10359extern "C"
10360#endif
10361
10362/* We use char because int might match the return type of a gcc2
10363   builtin and then its argument prototype would still apply.  */
10364char $ac_func (void);
10365
10366int
10367main (void)
10368{
10369
10370/* The GNU C library defines stubs for functions which it implements
10371    to always fail with ENOSYS.  Some functions are actually named
10372    something starting with __ and the normal name is an alias.  */
10373#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10374#error found stub for $ac_func
10375#endif
10376
10377	return $ac_func ();
10378  ;
10379  return 0;
10380}
10381_ACEOF
10382rm -f conftest.$ac_objext conftest$ac_exeext
10383if { (eval echo "$as_me:10383: \"$ac_link\"") >&5
10384  (eval $ac_link) 2>&5
10385  ac_status=$?
10386  echo "$as_me:10386: \$? = $ac_status" >&5
10387  (exit $ac_status); } &&
10388         { ac_try='test -s conftest$ac_exeext'
10389  { (eval echo "$as_me:10389: \"$ac_try\"") >&5
10390  (eval $ac_try) 2>&5
10391  ac_status=$?
10392  echo "$as_me:10392: \$? = $ac_status" >&5
10393  (exit $ac_status); }; }; then
10394  eval "$as_ac_var=yes"
10395else
10396  echo "$as_me: failed program was:" >&5
10397cat conftest.$ac_ext >&5
10398eval "$as_ac_var=no"
10399fi
10400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10401fi
10402echo "$as_me:10402: result: `eval echo '${'$as_ac_var'}'`" >&5
10403echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10404if test `eval echo '${'$as_ac_var'}'` = yes; then
10405  cat >>confdefs.h <<EOF
10406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10407EOF
10408
10409fi
10410done
10411
10412echo "$as_me:10412: checking for lstat" >&5
10413echo $ECHO_N "checking for lstat... $ECHO_C" >&6
10414if test "${ac_cv_func_lstat+set}" = set; then
10415  echo $ECHO_N "(cached) $ECHO_C" >&6
10416else
10417
10418cat >conftest.$ac_ext <<_ACEOF
10419#line 10419 "configure"
10420#include "confdefs.h"
10421
10422#include <sys/types.h>
10423#include <sys/stat.h>
10424int
10425main (void)
10426{
10427lstat(".", (struct stat *)0)
10428  ;
10429  return 0;
10430}
10431_ACEOF
10432rm -f conftest.$ac_objext conftest$ac_exeext
10433if { (eval echo "$as_me:10433: \"$ac_link\"") >&5
10434  (eval $ac_link) 2>&5
10435  ac_status=$?
10436  echo "$as_me:10436: \$? = $ac_status" >&5
10437  (exit $ac_status); } &&
10438         { ac_try='test -s conftest$ac_exeext'
10439  { (eval echo "$as_me:10439: \"$ac_try\"") >&5
10440  (eval $ac_try) 2>&5
10441  ac_status=$?
10442  echo "$as_me:10442: \$? = $ac_status" >&5
10443  (exit $ac_status); }; }; then
10444  ac_cv_func_lstat=yes
10445else
10446  echo "$as_me: failed program was:" >&5
10447cat conftest.$ac_ext >&5
10448ac_cv_func_lstat=no
10449fi
10450rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10451
10452fi
10453
10454echo "$as_me:10454: result: $ac_cv_func_lstat " >&5
10455echo "${ECHO_T}$ac_cv_func_lstat " >&6
10456if test $ac_cv_func_lstat = yes; then
10457
10458cat >>confdefs.h <<\EOF
10459#define HAVE_LSTAT 1
10460EOF
10461
10462fi
10463
10464echo "$as_me:10464: checking for setlocale()" >&5
10465echo $ECHO_N "checking for setlocale()... $ECHO_C" >&6
10466if test "${cf_cv_locale+set}" = set; then
10467  echo $ECHO_N "(cached) $ECHO_C" >&6
10468else
10469
10470cat >conftest.$ac_ext <<_ACEOF
10471#line 10471 "configure"
10472#include "confdefs.h"
10473#include <locale.h>
10474int
10475main (void)
10476{
10477setlocale(LC_ALL, "")
10478  ;
10479  return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext conftest$ac_exeext
10483if { (eval echo "$as_me:10483: \"$ac_link\"") >&5
10484  (eval $ac_link) 2>&5
10485  ac_status=$?
10486  echo "$as_me:10486: \$? = $ac_status" >&5
10487  (exit $ac_status); } &&
10488         { ac_try='test -s conftest$ac_exeext'
10489  { (eval echo "$as_me:10489: \"$ac_try\"") >&5
10490  (eval $ac_try) 2>&5
10491  ac_status=$?
10492  echo "$as_me:10492: \$? = $ac_status" >&5
10493  (exit $ac_status); }; }; then
10494  cf_cv_locale=yes
10495else
10496  echo "$as_me: failed program was:" >&5
10497cat conftest.$ac_ext >&5
10498cf_cv_locale=no
10499fi
10500rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10501
10502fi
10503
10504echo "$as_me:10504: result: $cf_cv_locale" >&5
10505echo "${ECHO_T}$cf_cv_locale" >&6
10506test $cf_cv_locale = yes && {
10507cat >>confdefs.h <<\EOF
10508#define HAVE_SETLOCALE 1
10509EOF
10510 }
10511
10512echo "$as_me:10512: checking for specific curses-directory" >&5
10513echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
10514
10515# Check whether --with-curses-dir or --without-curses-dir was given.
10516if test "${with_curses_dir+set}" = set; then
10517  withval="$with_curses_dir"
10518  cf_cv_curses_dir=$withval
10519else
10520  cf_cv_curses_dir=no
10521fi;
10522echo "$as_me:10522: result: $cf_cv_curses_dir" >&5
10523echo "${ECHO_T}$cf_cv_curses_dir" >&6
10524
10525if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10526then
10527
10528if test "x$prefix" != xNONE; then
10529	cf_path_syntax="$prefix"
10530else
10531	cf_path_syntax="$ac_default_prefix"
10532fi
10533
10534case ".$withval" in
10535(.\$\(*\)*|.\'*\'*)
10536	;;
10537(..|./*|.\\*)
10538	;;
10539(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10540	;;
10541(.\${*prefix}*|.\${*dir}*)
10542	eval withval="$withval"
10543	case ".$withval" in
10544	(.NONE/*)
10545		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10546		;;
10547	esac
10548	;;
10549(.no|.NONE/*)
10550	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10551	;;
10552(*)
10553	{ { echo "$as_me:10553: error: expected a pathname, not \"$withval\"" >&5
10554echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10555   { (exit 1); exit 1; }; }
10556	;;
10557esac
10558
10559	if test -d "$cf_cv_curses_dir"
10560	then
10561
10562if test -n "$cf_cv_curses_dir/include" ; then
10563  for cf_add_incdir in $cf_cv_curses_dir/include
10564  do
10565	while test $cf_add_incdir != /usr/include
10566	do
10567	  if test -d $cf_add_incdir
10568	  then
10569		cf_have_incdir=no
10570		if test -n "$CFLAGS$CPPFLAGS" ; then
10571		  # a loop is needed to ensure we can add subdirs of existing dirs
10572		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10573			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10574			  cf_have_incdir=yes; break
10575			fi
10576		  done
10577		fi
10578
10579		if test "$cf_have_incdir" = no ; then
10580		  if test "$cf_add_incdir" = /usr/local/include ; then
10581			if test "$GCC" = yes
10582			then
10583			  cf_save_CPPFLAGS=$CPPFLAGS
10584
10585	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10586	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10587
10588			  cat >conftest.$ac_ext <<_ACEOF
10589#line 10589 "configure"
10590#include "confdefs.h"
10591#include <stdio.h>
10592int
10593main (void)
10594{
10595printf("Hello")
10596  ;
10597  return 0;
10598}
10599_ACEOF
10600rm -f conftest.$ac_objext
10601if { (eval echo "$as_me:10601: \"$ac_compile\"") >&5
10602  (eval $ac_compile) 2>&5
10603  ac_status=$?
10604  echo "$as_me:10604: \$? = $ac_status" >&5
10605  (exit $ac_status); } &&
10606         { ac_try='test -s conftest.$ac_objext'
10607  { (eval echo "$as_me:10607: \"$ac_try\"") >&5
10608  (eval $ac_try) 2>&5
10609  ac_status=$?
10610  echo "$as_me:10610: \$? = $ac_status" >&5
10611  (exit $ac_status); }; }; then
10612  :
10613else
10614  echo "$as_me: failed program was:" >&5
10615cat conftest.$ac_ext >&5
10616cf_have_incdir=yes
10617fi
10618rm -f conftest.$ac_objext conftest.$ac_ext
10619			  CPPFLAGS=$cf_save_CPPFLAGS
10620			fi
10621		  fi
10622		fi
10623
10624		if test "$cf_have_incdir" = no ; then
10625		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10626
10627echo "${as_me:-configure}:10627: testing adding $cf_add_incdir to include-path ..." 1>&5
10628
10629		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10630
10631		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10632		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10633		  cf_add_incdir="$cf_top_incdir"
10634		else
10635		  break
10636		fi
10637	  else
10638		break
10639	  fi
10640	done
10641  done
10642fi
10643
10644if test -n "$cf_cv_curses_dir/lib" ; then
10645	for cf_add_libdir in $cf_cv_curses_dir/lib
10646	do
10647		if test $cf_add_libdir = /usr/lib ; then
10648			:
10649		elif test -d $cf_add_libdir
10650		then
10651			cf_have_libdir=no
10652			if test -n "$LDFLAGS$LIBS" ; then
10653				# a loop is needed to ensure we can add subdirs of existing dirs
10654				for cf_test_libdir in $LDFLAGS $LIBS ; do
10655					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10656						cf_have_libdir=yes; break
10657					fi
10658				done
10659			fi
10660			if test "$cf_have_libdir" = no ; then
10661				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10662
10663echo "${as_me:-configure}:10663: testing adding $cf_add_libdir to library-path ..." 1>&5
10664
10665				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10666			fi
10667		fi
10668	done
10669fi
10670
10671	fi
10672fi
10673
10674cf_cv_screen=curses
10675
10676echo "$as_me:10676: checking for specified curses library type" >&5
10677echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
10678
10679# Check whether --with-screen or --without-screen was given.
10680if test "${with_screen+set}" = set; then
10681  withval="$with_screen"
10682  cf_cv_screen=$withval
10683else
10684
10685# Check whether --with-ncursesw or --without-ncursesw was given.
10686if test "${with_ncursesw+set}" = set; then
10687  withval="$with_ncursesw"
10688  cf_cv_screen=ncursesw
10689else
10690
10691# Check whether --with-ncurses or --without-ncurses was given.
10692if test "${with_ncurses+set}" = set; then
10693  withval="$with_ncurses"
10694  cf_cv_screen=ncurses
10695else
10696
10697# Check whether --with-pdcurses or --without-pdcurses was given.
10698if test "${with_pdcurses+set}" = set; then
10699  withval="$with_pdcurses"
10700  cf_cv_screen=pdcurses
10701else
10702
10703# Check whether --with-curses-colr or --without-curses-colr was given.
10704if test "${with_curses_colr+set}" = set; then
10705  withval="$with_curses_colr"
10706  cf_cv_screen=curses_colr
10707else
10708
10709# Check whether --with-curses-5lib or --without-curses-5lib was given.
10710if test "${with_curses_5lib+set}" = set; then
10711  withval="$with_curses_5lib"
10712  cf_cv_screen=curses_5lib
10713fi;
10714fi;
10715fi;
10716fi;
10717fi;
10718fi;
10719
10720echo "$as_me:10720: result: $cf_cv_screen" >&5
10721echo "${ECHO_T}$cf_cv_screen" >&6
10722
10723case $cf_cv_screen in
10724(curses|curses_*)
10725
10726echo "$as_me:10726: checking for extra include directories" >&5
10727echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
10728if test "${cf_cv_curses_incdir+set}" = set; then
10729  echo $ECHO_N "(cached) $ECHO_C" >&6
10730else
10731
10732cf_cv_curses_incdir=no
10733case $host_os in
10734(hpux10.*)
10735	if test "x$cf_cv_screen" = "xcurses_colr"
10736	then
10737		test -d /usr/include/curses_colr && \
10738		cf_cv_curses_incdir="-I/usr/include/curses_colr"
10739	fi
10740	;;
10741(sunos3*|sunos4*)
10742	if test "x$cf_cv_screen" = "xcurses_5lib"
10743	then
10744		test -d /usr/5lib && \
10745		test -d /usr/5include && \
10746		cf_cv_curses_incdir="-I/usr/5include"
10747	fi
10748	;;
10749esac
10750
10751fi
10752echo "$as_me:10752: result: $cf_cv_curses_incdir" >&5
10753echo "${ECHO_T}$cf_cv_curses_incdir" >&6
10754if test "$cf_cv_curses_incdir" != no
10755then
10756
10757	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10758	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
10759
10760fi
10761
10762echo "$as_me:10762: checking if we have identified curses headers" >&5
10763echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10764if test "${cf_cv_ncurses_header+set}" = set; then
10765  echo $ECHO_N "(cached) $ECHO_C" >&6
10766else
10767
10768cf_cv_ncurses_header=none
10769for cf_header in \
10770	ncurses.h  \
10771	curses.h  ncurses/ncurses.h ncurses/curses.h
10772do
10773cat >conftest.$ac_ext <<_ACEOF
10774#line 10774 "configure"
10775#include "confdefs.h"
10776#include <${cf_header}>
10777int
10778main (void)
10779{
10780initscr(); tgoto("?", 0,0)
10781  ;
10782  return 0;
10783}
10784_ACEOF
10785rm -f conftest.$ac_objext
10786if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
10787  (eval $ac_compile) 2>&5
10788  ac_status=$?
10789  echo "$as_me:10789: \$? = $ac_status" >&5
10790  (exit $ac_status); } &&
10791         { ac_try='test -s conftest.$ac_objext'
10792  { (eval echo "$as_me:10792: \"$ac_try\"") >&5
10793  (eval $ac_try) 2>&5
10794  ac_status=$?
10795  echo "$as_me:10795: \$? = $ac_status" >&5
10796  (exit $ac_status); }; }; then
10797  cf_cv_ncurses_header=$cf_header; break
10798else
10799  echo "$as_me: failed program was:" >&5
10800cat conftest.$ac_ext >&5
10801fi
10802rm -f conftest.$ac_objext conftest.$ac_ext
10803done
10804
10805fi
10806echo "$as_me:10806: result: $cf_cv_ncurses_header" >&5
10807echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10808
10809if test "$cf_cv_ncurses_header" = none ; then
10810	{ { echo "$as_me:10810: error: No curses header-files found" >&5
10811echo "$as_me: error: No curses header-files found" >&2;}
10812   { (exit 1); exit 1; }; }
10813fi
10814
10815# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10816
10817for ac_header in $cf_cv_ncurses_header
10818do
10819as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10820echo "$as_me:10820: checking for $ac_header" >&5
10821echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10822if eval "test \"\${$as_ac_Header+set}\" = set"; then
10823  echo $ECHO_N "(cached) $ECHO_C" >&6
10824else
10825  cat >conftest.$ac_ext <<_ACEOF
10826#line 10826 "configure"
10827#include "confdefs.h"
10828#include <$ac_header>
10829_ACEOF
10830if { (eval echo "$as_me:10830: \"$ac_cpp conftest.$ac_ext\"") >&5
10831  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10832  ac_status=$?
10833  egrep -v '^ *\+' conftest.er1 >conftest.err
10834  rm -f conftest.er1
10835  cat conftest.err >&5
10836  echo "$as_me:10836: \$? = $ac_status" >&5
10837  (exit $ac_status); } >/dev/null; then
10838  if test -s conftest.err; then
10839    ac_cpp_err=$ac_c_preproc_warn_flag
10840  else
10841    ac_cpp_err=
10842  fi
10843else
10844  ac_cpp_err=yes
10845fi
10846if test -z "$ac_cpp_err"; then
10847  eval "$as_ac_Header=yes"
10848else
10849  echo "$as_me: failed program was:" >&5
10850  cat conftest.$ac_ext >&5
10851  eval "$as_ac_Header=no"
10852fi
10853rm -f conftest.err conftest.$ac_ext
10854fi
10855echo "$as_me:10855: result: `eval echo '${'$as_ac_Header'}'`" >&5
10856echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10857if test `eval echo '${'$as_ac_Header'}'` = yes; then
10858  cat >>confdefs.h <<EOF
10859#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10860EOF
10861
10862fi
10863done
10864
10865echo "$as_me:10865: checking for terminfo header" >&5
10866echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10867if test "${cf_cv_term_header+set}" = set; then
10868  echo $ECHO_N "(cached) $ECHO_C" >&6
10869else
10870
10871case ${cf_cv_ncurses_header} in
10872(*/ncurses.h|*/ncursesw.h)
10873	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10874	;;
10875(*)
10876	cf_term_header=term.h
10877	;;
10878esac
10879
10880for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10881do
10882cat >conftest.$ac_ext <<_ACEOF
10883#line 10883 "configure"
10884#include "confdefs.h"
10885#include <stdio.h>
10886#include <${cf_cv_ncurses_header:-curses.h}>
10887#include <$cf_test>
10888
10889int
10890main (void)
10891{
10892int x = auto_left_margin; (void)x
10893  ;
10894  return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext
10898if { (eval echo "$as_me:10898: \"$ac_compile\"") >&5
10899  (eval $ac_compile) 2>&5
10900  ac_status=$?
10901  echo "$as_me:10901: \$? = $ac_status" >&5
10902  (exit $ac_status); } &&
10903         { ac_try='test -s conftest.$ac_objext'
10904  { (eval echo "$as_me:10904: \"$ac_try\"") >&5
10905  (eval $ac_try) 2>&5
10906  ac_status=$?
10907  echo "$as_me:10907: \$? = $ac_status" >&5
10908  (exit $ac_status); }; }; then
10909
10910	cf_cv_term_header="$cf_test"
10911else
10912  echo "$as_me: failed program was:" >&5
10913cat conftest.$ac_ext >&5
10914
10915	cf_cv_term_header=unknown
10916
10917fi
10918rm -f conftest.$ac_objext conftest.$ac_ext
10919	test "$cf_cv_term_header" != unknown && break
10920done
10921
10922fi
10923echo "$as_me:10923: result: $cf_cv_term_header" >&5
10924echo "${ECHO_T}$cf_cv_term_header" >&6
10925
10926# Set definitions to allow ifdef'ing to accommodate subdirectories
10927
10928case $cf_cv_term_header in
10929(*term.h)
10930
10931cat >>confdefs.h <<\EOF
10932#define HAVE_TERM_H 1
10933EOF
10934
10935	;;
10936esac
10937
10938case $cf_cv_term_header in
10939(ncurses/term.h)
10940
10941cat >>confdefs.h <<\EOF
10942#define HAVE_NCURSES_TERM_H 1
10943EOF
10944
10945	;;
10946(ncursesw/term.h)
10947
10948cat >>confdefs.h <<\EOF
10949#define HAVE_NCURSESW_TERM_H 1
10950EOF
10951
10952	;;
10953esac
10954
10955echo "$as_me:10955: checking for ncurses version" >&5
10956echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10957if test "${cf_cv_ncurses_version+set}" = set; then
10958  echo $ECHO_N "(cached) $ECHO_C" >&6
10959else
10960
10961	cf_cv_ncurses_version=no
10962	cf_tempfile=out$$
10963	rm -f $cf_tempfile
10964	if test "$cross_compiling" = yes; then
10965
10966	# This will not work if the preprocessor splits the line after the
10967	# Autoconf token.  The 'unproto' program does that.
10968	cat > conftest.$ac_ext <<EOF
10969#include <${cf_cv_ncurses_header:-curses.h}>
10970#undef Autoconf
10971#ifdef NCURSES_VERSION
10972Autoconf NCURSES_VERSION
10973#else
10974#ifdef __NCURSES_H
10975Autoconf "old"
10976#endif
10977;
10978#endif
10979EOF
10980	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10981	{ (eval echo "$as_me:10981: \"$cf_try\"") >&5
10982  (eval $cf_try) 2>&5
10983  ac_status=$?
10984  echo "$as_me:10984: \$? = $ac_status" >&5
10985  (exit $ac_status); }
10986	if test -f conftest.out ; then
10987		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10988		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10989		rm -f conftest.out
10990	fi
10991
10992else
10993  cat >conftest.$ac_ext <<_ACEOF
10994#line 10994 "configure"
10995#include "confdefs.h"
10996
10997#include <${cf_cv_ncurses_header:-curses.h}>
10998#include <stdio.h>
10999int main(void)
11000{
11001	FILE *fp = fopen("$cf_tempfile", "w");
11002#ifdef NCURSES_VERSION
11003# ifdef NCURSES_VERSION_PATCH
11004	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11005# else
11006	fprintf(fp, "%s\n", NCURSES_VERSION);
11007# endif
11008#else
11009# ifdef __NCURSES_H
11010	fprintf(fp, "old\n");
11011# else
11012	make an error
11013# endif
11014#endif
11015	${cf_cv_main_return:-return}(0);
11016}
11017_ACEOF
11018rm -f conftest$ac_exeext
11019if { (eval echo "$as_me:11019: \"$ac_link\"") >&5
11020  (eval $ac_link) 2>&5
11021  ac_status=$?
11022  echo "$as_me:11022: \$? = $ac_status" >&5
11023  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11024  { (eval echo "$as_me:11024: \"$ac_try\"") >&5
11025  (eval $ac_try) 2>&5
11026  ac_status=$?
11027  echo "$as_me:11027: \$? = $ac_status" >&5
11028  (exit $ac_status); }; }; then
11029
11030	cf_cv_ncurses_version=`cat $cf_tempfile`
11031else
11032  echo "$as_me: program exited with status $ac_status" >&5
11033echo "$as_me: failed program was:" >&5
11034cat conftest.$ac_ext >&5
11035fi
11036rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11037fi
11038	rm -f $cf_tempfile
11039
11040fi
11041echo "$as_me:11041: result: $cf_cv_ncurses_version" >&5
11042echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11043test "$cf_cv_ncurses_version" = no ||
11044cat >>confdefs.h <<\EOF
11045#define NCURSES 1
11046EOF
11047
11048echo "$as_me:11048: checking if we have identified curses libraries" >&5
11049echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
11050cat >conftest.$ac_ext <<_ACEOF
11051#line 11051 "configure"
11052#include "confdefs.h"
11053#include <${cf_cv_ncurses_header:-curses.h}>
11054int
11055main (void)
11056{
11057initscr(); tgoto("?", 0,0)
11058  ;
11059  return 0;
11060}
11061_ACEOF
11062rm -f conftest.$ac_objext conftest$ac_exeext
11063if { (eval echo "$as_me:11063: \"$ac_link\"") >&5
11064  (eval $ac_link) 2>&5
11065  ac_status=$?
11066  echo "$as_me:11066: \$? = $ac_status" >&5
11067  (exit $ac_status); } &&
11068         { ac_try='test -s conftest$ac_exeext'
11069  { (eval echo "$as_me:11069: \"$ac_try\"") >&5
11070  (eval $ac_try) 2>&5
11071  ac_status=$?
11072  echo "$as_me:11072: \$? = $ac_status" >&5
11073  (exit $ac_status); }; }; then
11074  cf_result=yes
11075else
11076  echo "$as_me: failed program was:" >&5
11077cat conftest.$ac_ext >&5
11078cf_result=no
11079fi
11080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11081echo "$as_me:11081: result: $cf_result" >&5
11082echo "${ECHO_T}$cf_result" >&6
11083
11084if test "$cf_result" = no ; then
11085case $host_os in
11086(freebsd*)
11087	echo "$as_me:11087: checking for tgoto in -lmytinfo" >&5
11088echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11089if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11090  echo $ECHO_N "(cached) $ECHO_C" >&6
11091else
11092  ac_check_lib_save_LIBS=$LIBS
11093LIBS="-lmytinfo  $LIBS"
11094cat >conftest.$ac_ext <<_ACEOF
11095#line 11095 "configure"
11096#include "confdefs.h"
11097
11098/* Override any gcc2 internal prototype to avoid an error.  */
11099#ifdef __cplusplus
11100extern "C"
11101#endif
11102/* We use char because int might match the return type of a gcc2
11103   builtin and then its argument prototype would still apply.  */
11104char tgoto ();
11105int
11106main (void)
11107{
11108tgoto ();
11109  ;
11110  return 0;
11111}
11112_ACEOF
11113rm -f conftest.$ac_objext conftest$ac_exeext
11114if { (eval echo "$as_me:11114: \"$ac_link\"") >&5
11115  (eval $ac_link) 2>&5
11116  ac_status=$?
11117  echo "$as_me:11117: \$? = $ac_status" >&5
11118  (exit $ac_status); } &&
11119         { ac_try='test -s conftest$ac_exeext'
11120  { (eval echo "$as_me:11120: \"$ac_try\"") >&5
11121  (eval $ac_try) 2>&5
11122  ac_status=$?
11123  echo "$as_me:11123: \$? = $ac_status" >&5
11124  (exit $ac_status); }; }; then
11125  ac_cv_lib_mytinfo_tgoto=yes
11126else
11127  echo "$as_me: failed program was:" >&5
11128cat conftest.$ac_ext >&5
11129ac_cv_lib_mytinfo_tgoto=no
11130fi
11131rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11132LIBS=$ac_check_lib_save_LIBS
11133fi
11134echo "$as_me:11134: result: $ac_cv_lib_mytinfo_tgoto" >&5
11135echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11136if test $ac_cv_lib_mytinfo_tgoto = yes; then
11137
11138cf_add_libs="$LIBS"
11139# reverse order
11140cf_add_0lib=
11141for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11142# filter duplicates
11143for cf_add_1lib in $cf_add_0lib; do
11144	for cf_add_2lib in $cf_add_libs; do
11145		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11146			cf_add_1lib=
11147			break
11148		fi
11149	done
11150	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11151done
11152LIBS="$cf_add_libs"
11153
11154fi
11155
11156	;;
11157(hpux10.*)
11158	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
11159	# next (1998), and xcurses "newer" (2000).  There is no header file for
11160	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
11161	# term.h) for cur_colr
11162	if test "x$cf_cv_screen" = "xcurses_colr"
11163	then
11164		echo "$as_me:11164: checking for initscr in -lcur_colr" >&5
11165echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
11166if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
11167  echo $ECHO_N "(cached) $ECHO_C" >&6
11168else
11169  ac_check_lib_save_LIBS=$LIBS
11170LIBS="-lcur_colr  $LIBS"
11171cat >conftest.$ac_ext <<_ACEOF
11172#line 11172 "configure"
11173#include "confdefs.h"
11174
11175/* Override any gcc2 internal prototype to avoid an error.  */
11176#ifdef __cplusplus
11177extern "C"
11178#endif
11179/* We use char because int might match the return type of a gcc2
11180   builtin and then its argument prototype would still apply.  */
11181char initscr ();
11182int
11183main (void)
11184{
11185initscr ();
11186  ;
11187  return 0;
11188}
11189_ACEOF
11190rm -f conftest.$ac_objext conftest$ac_exeext
11191if { (eval echo "$as_me:11191: \"$ac_link\"") >&5
11192  (eval $ac_link) 2>&5
11193  ac_status=$?
11194  echo "$as_me:11194: \$? = $ac_status" >&5
11195  (exit $ac_status); } &&
11196         { ac_try='test -s conftest$ac_exeext'
11197  { (eval echo "$as_me:11197: \"$ac_try\"") >&5
11198  (eval $ac_try) 2>&5
11199  ac_status=$?
11200  echo "$as_me:11200: \$? = $ac_status" >&5
11201  (exit $ac_status); }; }; then
11202  ac_cv_lib_cur_colr_initscr=yes
11203else
11204  echo "$as_me: failed program was:" >&5
11205cat conftest.$ac_ext >&5
11206ac_cv_lib_cur_colr_initscr=no
11207fi
11208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209LIBS=$ac_check_lib_save_LIBS
11210fi
11211echo "$as_me:11211: result: $ac_cv_lib_cur_colr_initscr" >&5
11212echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
11213if test $ac_cv_lib_cur_colr_initscr = yes; then
11214
11215cf_add_libs="$LIBS"
11216# reverse order
11217cf_add_0lib=
11218for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11219# filter duplicates
11220for cf_add_1lib in $cf_add_0lib; do
11221	for cf_add_2lib in $cf_add_libs; do
11222		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11223			cf_add_1lib=
11224			break
11225		fi
11226	done
11227	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11228done
11229LIBS="$cf_add_libs"
11230
11231			ac_cv_func_initscr=yes
11232
11233else
11234
11235		echo "$as_me:11235: checking for initscr in -lHcurses" >&5
11236echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
11237if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
11238  echo $ECHO_N "(cached) $ECHO_C" >&6
11239else
11240  ac_check_lib_save_LIBS=$LIBS
11241LIBS="-lHcurses  $LIBS"
11242cat >conftest.$ac_ext <<_ACEOF
11243#line 11243 "configure"
11244#include "confdefs.h"
11245
11246/* Override any gcc2 internal prototype to avoid an error.  */
11247#ifdef __cplusplus
11248extern "C"
11249#endif
11250/* We use char because int might match the return type of a gcc2
11251   builtin and then its argument prototype would still apply.  */
11252char initscr ();
11253int
11254main (void)
11255{
11256initscr ();
11257  ;
11258  return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext conftest$ac_exeext
11262if { (eval echo "$as_me:11262: \"$ac_link\"") >&5
11263  (eval $ac_link) 2>&5
11264  ac_status=$?
11265  echo "$as_me:11265: \$? = $ac_status" >&5
11266  (exit $ac_status); } &&
11267         { ac_try='test -s conftest$ac_exeext'
11268  { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269  (eval $ac_try) 2>&5
11270  ac_status=$?
11271  echo "$as_me:11271: \$? = $ac_status" >&5
11272  (exit $ac_status); }; }; then
11273  ac_cv_lib_Hcurses_initscr=yes
11274else
11275  echo "$as_me: failed program was:" >&5
11276cat conftest.$ac_ext >&5
11277ac_cv_lib_Hcurses_initscr=no
11278fi
11279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11280LIBS=$ac_check_lib_save_LIBS
11281fi
11282echo "$as_me:11282: result: $ac_cv_lib_Hcurses_initscr" >&5
11283echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
11284if test $ac_cv_lib_Hcurses_initscr = yes; then
11285
11286			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
11287
11288cf_add_libs="$LIBS"
11289# reverse order
11290cf_add_0lib=
11291for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11292# filter duplicates
11293for cf_add_1lib in $cf_add_0lib; do
11294	for cf_add_2lib in $cf_add_libs; do
11295		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11296			cf_add_1lib=
11297			break
11298		fi
11299	done
11300	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11301done
11302LIBS="$cf_add_libs"
11303
11304	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11305	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
11306
11307			ac_cv_func_initscr=yes
11308
11309fi
11310
11311fi
11312
11313	fi
11314	;;
11315(linux*)
11316	case `arch 2>/dev/null` in
11317	(x86_64)
11318		if test -d /lib64
11319		then
11320
11321if test -n "/lib64" ; then
11322	for cf_add_libdir in /lib64
11323	do
11324		if test $cf_add_libdir = /usr/lib ; then
11325			:
11326		elif test -d $cf_add_libdir
11327		then
11328			cf_have_libdir=no
11329			if test -n "$LDFLAGS$LIBS" ; then
11330				# a loop is needed to ensure we can add subdirs of existing dirs
11331				for cf_test_libdir in $LDFLAGS $LIBS ; do
11332					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11333						cf_have_libdir=yes; break
11334					fi
11335				done
11336			fi
11337			if test "$cf_have_libdir" = no ; then
11338				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11339
11340echo "${as_me:-configure}:11340: testing adding $cf_add_libdir to library-path ..." 1>&5
11341
11342				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11343			fi
11344		fi
11345	done
11346fi
11347
11348		else
11349
11350if test -n "/lib" ; then
11351	for cf_add_libdir in /lib
11352	do
11353		if test $cf_add_libdir = /usr/lib ; then
11354			:
11355		elif test -d $cf_add_libdir
11356		then
11357			cf_have_libdir=no
11358			if test -n "$LDFLAGS$LIBS" ; then
11359				# a loop is needed to ensure we can add subdirs of existing dirs
11360				for cf_test_libdir in $LDFLAGS $LIBS ; do
11361					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11362						cf_have_libdir=yes; break
11363					fi
11364				done
11365			fi
11366			if test "$cf_have_libdir" = no ; then
11367				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11368
11369echo "${as_me:-configure}:11369: testing adding $cf_add_libdir to library-path ..." 1>&5
11370
11371				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11372			fi
11373		fi
11374	done
11375fi
11376
11377		fi
11378		;;
11379	(*)
11380
11381if test -n "/lib" ; then
11382	for cf_add_libdir in /lib
11383	do
11384		if test $cf_add_libdir = /usr/lib ; then
11385			:
11386		elif test -d $cf_add_libdir
11387		then
11388			cf_have_libdir=no
11389			if test -n "$LDFLAGS$LIBS" ; then
11390				# a loop is needed to ensure we can add subdirs of existing dirs
11391				for cf_test_libdir in $LDFLAGS $LIBS ; do
11392					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11393						cf_have_libdir=yes; break
11394					fi
11395				done
11396			fi
11397			if test "$cf_have_libdir" = no ; then
11398				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11399
11400echo "${as_me:-configure}:11400: testing adding $cf_add_libdir to library-path ..." 1>&5
11401
11402				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11403			fi
11404		fi
11405	done
11406fi
11407
11408		;;
11409	esac
11410	;;
11411(sunos3*|sunos4*)
11412	if test "x$cf_cv_screen" = "xcurses_5lib"
11413	then
11414		if test -d /usr/5lib ; then
11415
11416if test -n "/usr/5lib" ; then
11417	for cf_add_libdir in /usr/5lib
11418	do
11419		if test $cf_add_libdir = /usr/lib ; then
11420			:
11421		elif test -d $cf_add_libdir
11422		then
11423			cf_have_libdir=no
11424			if test -n "$LDFLAGS$LIBS" ; then
11425				# a loop is needed to ensure we can add subdirs of existing dirs
11426				for cf_test_libdir in $LDFLAGS $LIBS ; do
11427					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11428						cf_have_libdir=yes; break
11429					fi
11430				done
11431			fi
11432			if test "$cf_have_libdir" = no ; then
11433				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11434
11435echo "${as_me:-configure}:11435: testing adding $cf_add_libdir to library-path ..." 1>&5
11436
11437				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11438			fi
11439		fi
11440	done
11441fi
11442
11443cf_add_libs="$LIBS"
11444# reverse order
11445cf_add_0lib=
11446for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11447# filter duplicates
11448for cf_add_1lib in $cf_add_0lib; do
11449	for cf_add_2lib in $cf_add_libs; do
11450		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11451			cf_add_1lib=
11452			break
11453		fi
11454	done
11455	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11456done
11457LIBS="$cf_add_libs"
11458
11459		fi
11460	fi
11461	ac_cv_func_initscr=yes
11462	;;
11463esac
11464
11465if test ".$ac_cv_func_initscr" != .yes ; then
11466	cf_save_LIBS="$LIBS"
11467
11468	if test ".${cf_cv_ncurses_version:-no}" != .no
11469	then
11470		cf_check_list="ncurses curses cursesX"
11471	else
11472		cf_check_list="cursesX curses ncurses"
11473	fi
11474
11475	# Check for library containing tgoto.  Do this before curses library
11476	# because it may be needed to link the test-case for initscr.
11477	if test "x$cf_term_lib" = x
11478	then
11479		echo "$as_me:11479: checking for tgoto" >&5
11480echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
11481if test "${ac_cv_func_tgoto+set}" = set; then
11482  echo $ECHO_N "(cached) $ECHO_C" >&6
11483else
11484  cat >conftest.$ac_ext <<_ACEOF
11485#line 11485 "configure"
11486#include "confdefs.h"
11487#define tgoto autoconf_temporary
11488#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11489#undef tgoto
11490
11491#ifdef __cplusplus
11492extern "C"
11493#endif
11494
11495/* We use char because int might match the return type of a gcc2
11496   builtin and then its argument prototype would still apply.  */
11497char tgoto (void);
11498
11499int
11500main (void)
11501{
11502
11503/* The GNU C library defines stubs for functions which it implements
11504    to always fail with ENOSYS.  Some functions are actually named
11505    something starting with __ and the normal name is an alias.  */
11506#if defined (__stub_tgoto) || defined (__stub___tgoto)
11507#error found stub for tgoto
11508#endif
11509
11510	return tgoto ();
11511  ;
11512  return 0;
11513}
11514_ACEOF
11515rm -f conftest.$ac_objext conftest$ac_exeext
11516if { (eval echo "$as_me:11516: \"$ac_link\"") >&5
11517  (eval $ac_link) 2>&5
11518  ac_status=$?
11519  echo "$as_me:11519: \$? = $ac_status" >&5
11520  (exit $ac_status); } &&
11521         { ac_try='test -s conftest$ac_exeext'
11522  { (eval echo "$as_me:11522: \"$ac_try\"") >&5
11523  (eval $ac_try) 2>&5
11524  ac_status=$?
11525  echo "$as_me:11525: \$? = $ac_status" >&5
11526  (exit $ac_status); }; }; then
11527  ac_cv_func_tgoto=yes
11528else
11529  echo "$as_me: failed program was:" >&5
11530cat conftest.$ac_ext >&5
11531ac_cv_func_tgoto=no
11532fi
11533rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11534fi
11535echo "$as_me:11535: result: $ac_cv_func_tgoto" >&5
11536echo "${ECHO_T}$ac_cv_func_tgoto" >&6
11537if test $ac_cv_func_tgoto = yes; then
11538  cf_term_lib=predefined
11539else
11540
11541			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
11542			do
11543				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
11544echo "$as_me:11544: checking for tgoto in -l$cf_term_lib" >&5
11545echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
11546if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11547  echo $ECHO_N "(cached) $ECHO_C" >&6
11548else
11549  ac_check_lib_save_LIBS=$LIBS
11550LIBS="-l$cf_term_lib  $LIBS"
11551cat >conftest.$ac_ext <<_ACEOF
11552#line 11552 "configure"
11553#include "confdefs.h"
11554
11555/* Override any gcc2 internal prototype to avoid an error.  */
11556#ifdef __cplusplus
11557extern "C"
11558#endif
11559/* We use char because int might match the return type of a gcc2
11560   builtin and then its argument prototype would still apply.  */
11561char tgoto ();
11562int
11563main (void)
11564{
11565tgoto ();
11566  ;
11567  return 0;
11568}
11569_ACEOF
11570rm -f conftest.$ac_objext conftest$ac_exeext
11571if { (eval echo "$as_me:11571: \"$ac_link\"") >&5
11572  (eval $ac_link) 2>&5
11573  ac_status=$?
11574  echo "$as_me:11574: \$? = $ac_status" >&5
11575  (exit $ac_status); } &&
11576         { ac_try='test -s conftest$ac_exeext'
11577  { (eval echo "$as_me:11577: \"$ac_try\"") >&5
11578  (eval $ac_try) 2>&5
11579  ac_status=$?
11580  echo "$as_me:11580: \$? = $ac_status" >&5
11581  (exit $ac_status); }; }; then
11582  eval "$as_ac_Lib=yes"
11583else
11584  echo "$as_me: failed program was:" >&5
11585cat conftest.$ac_ext >&5
11586eval "$as_ac_Lib=no"
11587fi
11588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11589LIBS=$ac_check_lib_save_LIBS
11590fi
11591echo "$as_me:11591: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11592echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11593if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11594
11595					: ${cf_nculib_root:=$cf_term_lib}
11596					break
11597
11598fi
11599
11600			done
11601
11602fi
11603
11604	fi
11605
11606	# Check for library containing initscr
11607	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
11608	if test "x$cf_curs_lib" = x
11609	then
11610		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
11611		do
11612			LIBS="-l$cf_curs_lib $cf_save_LIBS"
11613			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
11614				echo "$as_me:11614: checking if we can link with $cf_curs_lib library" >&5
11615echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
11616				cat >conftest.$ac_ext <<_ACEOF
11617#line 11617 "configure"
11618#include "confdefs.h"
11619#include <${cf_cv_ncurses_header:-curses.h}>
11620int
11621main (void)
11622{
11623initscr()
11624  ;
11625  return 0;
11626}
11627_ACEOF
11628rm -f conftest.$ac_objext conftest$ac_exeext
11629if { (eval echo "$as_me:11629: \"$ac_link\"") >&5
11630  (eval $ac_link) 2>&5
11631  ac_status=$?
11632  echo "$as_me:11632: \$? = $ac_status" >&5
11633  (exit $ac_status); } &&
11634         { ac_try='test -s conftest$ac_exeext'
11635  { (eval echo "$as_me:11635: \"$ac_try\"") >&5
11636  (eval $ac_try) 2>&5
11637  ac_status=$?
11638  echo "$as_me:11638: \$? = $ac_status" >&5
11639  (exit $ac_status); }; }; then
11640  cf_result=yes
11641else
11642  echo "$as_me: failed program was:" >&5
11643cat conftest.$ac_ext >&5
11644cf_result=no
11645fi
11646rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11647				echo "$as_me:11647: result: $cf_result" >&5
11648echo "${ECHO_T}$cf_result" >&6
11649				test $cf_result = yes && break
11650			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
11651				cf_result=no
11652			elif test "$cf_term_lib" != predefined ; then
11653				echo "$as_me:11653: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
11654echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
11655				cat >conftest.$ac_ext <<_ACEOF
11656#line 11656 "configure"
11657#include "confdefs.h"
11658#include <${cf_cv_ncurses_header:-curses.h}>
11659int
11660main (void)
11661{
11662initscr(); tgoto((char *)0, 0, 0);
11663  ;
11664  return 0;
11665}
11666_ACEOF
11667rm -f conftest.$ac_objext conftest$ac_exeext
11668if { (eval echo "$as_me:11668: \"$ac_link\"") >&5
11669  (eval $ac_link) 2>&5
11670  ac_status=$?
11671  echo "$as_me:11671: \$? = $ac_status" >&5
11672  (exit $ac_status); } &&
11673         { ac_try='test -s conftest$ac_exeext'
11674  { (eval echo "$as_me:11674: \"$ac_try\"") >&5
11675  (eval $ac_try) 2>&5
11676  ac_status=$?
11677  echo "$as_me:11677: \$? = $ac_status" >&5
11678  (exit $ac_status); }; }; then
11679  cf_result=no
11680else
11681  echo "$as_me: failed program was:" >&5
11682cat conftest.$ac_ext >&5
11683
11684					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
11685					cat >conftest.$ac_ext <<_ACEOF
11686#line 11686 "configure"
11687#include "confdefs.h"
11688#include <${cf_cv_ncurses_header:-curses.h}>
11689int
11690main (void)
11691{
11692initscr()
11693  ;
11694  return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext conftest$ac_exeext
11698if { (eval echo "$as_me:11698: \"$ac_link\"") >&5
11699  (eval $ac_link) 2>&5
11700  ac_status=$?
11701  echo "$as_me:11701: \$? = $ac_status" >&5
11702  (exit $ac_status); } &&
11703         { ac_try='test -s conftest$ac_exeext'
11704  { (eval echo "$as_me:11704: \"$ac_try\"") >&5
11705  (eval $ac_try) 2>&5
11706  ac_status=$?
11707  echo "$as_me:11707: \$? = $ac_status" >&5
11708  (exit $ac_status); }; }; then
11709  cf_result=yes
11710else
11711  echo "$as_me: failed program was:" >&5
11712cat conftest.$ac_ext >&5
11713cf_result=error
11714fi
11715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11716
11717fi
11718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11719				echo "$as_me:11719: result: $cf_result" >&5
11720echo "${ECHO_T}$cf_result" >&6
11721				test $cf_result != error && break
11722			fi
11723		done
11724	fi
11725	test $cf_curs_lib = unknown && { { echo "$as_me:11725: error: no curses library found" >&5
11726echo "$as_me: error: no curses library found" >&2;}
11727   { (exit 1); exit 1; }; }
11728fi
11729fi
11730
11731	;;
11732(ncursesw*)
11733
11734echo "$as_me:11734: checking for multibyte character support" >&5
11735echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11736if test "${cf_cv_utf8_lib+set}" = set; then
11737  echo $ECHO_N "(cached) $ECHO_C" >&6
11738else
11739
11740	cf_save_LIBS="$LIBS"
11741	cat >conftest.$ac_ext <<_ACEOF
11742#line 11742 "configure"
11743#include "confdefs.h"
11744
11745#include <stdlib.h>
11746int
11747main (void)
11748{
11749putwc(0,0);
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (eval echo "$as_me:11755: \"$ac_link\"") >&5
11756  (eval $ac_link) 2>&5
11757  ac_status=$?
11758  echo "$as_me:11758: \$? = $ac_status" >&5
11759  (exit $ac_status); } &&
11760         { ac_try='test -s conftest$ac_exeext'
11761  { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762  (eval $ac_try) 2>&5
11763  ac_status=$?
11764  echo "$as_me:11764: \$? = $ac_status" >&5
11765  (exit $ac_status); }; }; then
11766  cf_cv_utf8_lib=yes
11767else
11768  echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770
11771# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11772# will be set on completion of the AC_TRY_LINK below.
11773cf_cv_header_path_utf8=
11774cf_cv_library_path_utf8=
11775
11776echo "${as_me:-configure}:11776: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11777
11778cf_save_LIBS="$LIBS"
11779
11780cat >conftest.$ac_ext <<_ACEOF
11781#line 11781 "configure"
11782#include "confdefs.h"
11783
11784#include <libutf8.h>
11785int
11786main (void)
11787{
11788putwc(0,0);
11789  ;
11790  return 0;
11791}
11792_ACEOF
11793rm -f conftest.$ac_objext conftest$ac_exeext
11794if { (eval echo "$as_me:11794: \"$ac_link\"") >&5
11795  (eval $ac_link) 2>&5
11796  ac_status=$?
11797  echo "$as_me:11797: \$? = $ac_status" >&5
11798  (exit $ac_status); } &&
11799         { ac_try='test -s conftest$ac_exeext'
11800  { (eval echo "$as_me:11800: \"$ac_try\"") >&5
11801  (eval $ac_try) 2>&5
11802  ac_status=$?
11803  echo "$as_me:11803: \$? = $ac_status" >&5
11804  (exit $ac_status); }; }; then
11805
11806	cf_cv_find_linkage_utf8=yes
11807	cf_cv_header_path_utf8=/usr/include
11808	cf_cv_library_path_utf8=/usr/lib
11809
11810else
11811  echo "$as_me: failed program was:" >&5
11812cat conftest.$ac_ext >&5
11813
11814LIBS="-lutf8  $cf_save_LIBS"
11815
11816cat >conftest.$ac_ext <<_ACEOF
11817#line 11817 "configure"
11818#include "confdefs.h"
11819
11820#include <libutf8.h>
11821int
11822main (void)
11823{
11824putwc(0,0);
11825  ;
11826  return 0;
11827}
11828_ACEOF
11829rm -f conftest.$ac_objext conftest$ac_exeext
11830if { (eval echo "$as_me:11830: \"$ac_link\"") >&5
11831  (eval $ac_link) 2>&5
11832  ac_status=$?
11833  echo "$as_me:11833: \$? = $ac_status" >&5
11834  (exit $ac_status); } &&
11835         { ac_try='test -s conftest$ac_exeext'
11836  { (eval echo "$as_me:11836: \"$ac_try\"") >&5
11837  (eval $ac_try) 2>&5
11838  ac_status=$?
11839  echo "$as_me:11839: \$? = $ac_status" >&5
11840  (exit $ac_status); }; }; then
11841
11842	cf_cv_find_linkage_utf8=yes
11843	cf_cv_header_path_utf8=/usr/include
11844	cf_cv_library_path_utf8=/usr/lib
11845	cf_cv_library_file_utf8="-lutf8"
11846
11847else
11848  echo "$as_me: failed program was:" >&5
11849cat conftest.$ac_ext >&5
11850
11851	cf_cv_find_linkage_utf8=no
11852	LIBS="$cf_save_LIBS"
11853
11854	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
11855
11856echo "${as_me:-configure}:11856: testing find linkage for utf8 library ..." 1>&5
11857
11858echo "${as_me:-configure}:11858: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11859
11860	cf_save_CPPFLAGS="$CPPFLAGS"
11861	cf_test_CPPFLAGS="$CPPFLAGS"
11862
11863cf_search=
11864
11865# collect the current set of include-directories from compiler flags
11866cf_header_path_list=""
11867if test -n "${CFLAGS}${CPPFLAGS}" ; then
11868	for cf_header_path in $CPPFLAGS $CFLAGS
11869	do
11870		case $cf_header_path in
11871		(-I*)
11872			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11873
11874test "x$cf_header_path" != "xNONE" && \
11875test -d "$cf_header_path" && \
11876 {
11877	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
11878	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11879	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11880	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11881	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11882	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11883}
11884
11885			cf_header_path_list="$cf_header_path_list $cf_search"
11886			;;
11887		esac
11888	done
11889fi
11890
11891# add the variations for the package we are looking for
11892
11893cf_search=
11894
11895test "x$prefix" != "xNONE" && \
11896test -d "$prefix" && \
11897 {
11898	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
11899	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11900	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11901	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11902	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11903	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11904}
11905
11906for cf_subdir_prefix in \
11907	/usr \
11908	/usr/local \
11909	/usr/pkg \
11910	/opt \
11911	/opt/local \
11912	$HOME
11913do
11914
11915test "x$cf_subdir_prefix" != "x$prefix" && \
11916test -d "$cf_subdir_prefix" && \
11917(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11918	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
11919	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11920	test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11921	test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11922	test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11923	test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11924}
11925
11926done
11927
11928test "$includedir" != NONE && \
11929test "$includedir" != "/usr/include" && \
11930test -d "$includedir" && {
11931	test -d $includedir &&    cf_search="$cf_search $includedir"
11932	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11933}
11934
11935test "$oldincludedir" != NONE && \
11936test "$oldincludedir" != "/usr/include" && \
11937test -d "$oldincludedir" && {
11938	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11939	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11940}
11941
11942cf_search="$cf_search $cf_header_path_list"
11943
11944	for cf_cv_header_path_utf8 in $cf_search
11945	do
11946		if test -d $cf_cv_header_path_utf8 ; then
11947			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
11948
11949echo "${as_me:-configure}:11949: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11950
11951			CPPFLAGS="$cf_save_CPPFLAGS"
11952
11953	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11954	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11955
11956			cat >conftest.$ac_ext <<_ACEOF
11957#line 11957 "configure"
11958#include "confdefs.h"
11959
11960#include <libutf8.h>
11961int
11962main (void)
11963{
11964putwc(0,0);
11965  ;
11966  return 0;
11967}
11968_ACEOF
11969rm -f conftest.$ac_objext
11970if { (eval echo "$as_me:11970: \"$ac_compile\"") >&5
11971  (eval $ac_compile) 2>&5
11972  ac_status=$?
11973  echo "$as_me:11973: \$? = $ac_status" >&5
11974  (exit $ac_status); } &&
11975         { ac_try='test -s conftest.$ac_objext'
11976  { (eval echo "$as_me:11976: \"$ac_try\"") >&5
11977  (eval $ac_try) 2>&5
11978  ac_status=$?
11979  echo "$as_me:11979: \$? = $ac_status" >&5
11980  (exit $ac_status); }; }; then
11981
11982				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11983
11984echo "${as_me:-configure}:11984: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11985
11986				cf_cv_find_linkage_utf8=maybe
11987				cf_test_CPPFLAGS="$CPPFLAGS"
11988				break
11989else
11990  echo "$as_me: failed program was:" >&5
11991cat conftest.$ac_ext >&5
11992
11993				CPPFLAGS="$cf_save_CPPFLAGS"
11994
11995fi
11996rm -f conftest.$ac_objext conftest.$ac_ext
11997		fi
11998	done
11999
12000	if test "$cf_cv_find_linkage_utf8" = maybe ; then
12001
12002echo "${as_me:-configure}:12002: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12003
12004		cf_save_LIBS="$LIBS"
12005		cf_save_LDFLAGS="$LDFLAGS"
12006
12007		if test "$cf_cv_find_linkage_utf8" != yes ; then
12008
12009cf_search=
12010cf_library_path_list=""
12011if test -n "${LDFLAGS}${LIBS}" ; then
12012	for cf_library_path in $LDFLAGS $LIBS
12013	do
12014		case $cf_library_path in
12015		(-L*)
12016			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12017
12018test "x$cf_library_path" != "xNONE" && \
12019test -d "$cf_library_path" && \
12020 {
12021	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
12022	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12023	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12024	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12025	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12026	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12027}
12028
12029			cf_library_path_list="$cf_library_path_list $cf_search"
12030			;;
12031		esac
12032	done
12033fi
12034
12035cf_search=
12036
12037test "x$prefix" != "xNONE" && \
12038test -d "$prefix" && \
12039 {
12040	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
12041	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12042	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12043	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12044	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12045	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12046}
12047
12048for cf_subdir_prefix in \
12049	/usr \
12050	/usr/local \
12051	/usr/pkg \
12052	/opt \
12053	/opt/local \
12054	$HOME
12055do
12056
12057test "x$cf_subdir_prefix" != "x$prefix" && \
12058test -d "$cf_subdir_prefix" && \
12059(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12060	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
12061	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12062	test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12063	test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12064	test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12065	test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12066}
12067
12068done
12069
12070cf_search="$cf_library_path_list $cf_search"
12071
12072			for cf_cv_library_path_utf8 in $cf_search
12073			do
12074				if test -d $cf_cv_library_path_utf8 ; then
12075					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
12076
12077echo "${as_me:-configure}:12077: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12078
12079					CPPFLAGS="$cf_test_CPPFLAGS"
12080					LIBS="-lutf8  $cf_save_LIBS"
12081					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12082					cat >conftest.$ac_ext <<_ACEOF
12083#line 12083 "configure"
12084#include "confdefs.h"
12085
12086#include <libutf8.h>
12087int
12088main (void)
12089{
12090putwc(0,0);
12091  ;
12092  return 0;
12093}
12094_ACEOF
12095rm -f conftest.$ac_objext conftest$ac_exeext
12096if { (eval echo "$as_me:12096: \"$ac_link\"") >&5
12097  (eval $ac_link) 2>&5
12098  ac_status=$?
12099  echo "$as_me:12099: \$? = $ac_status" >&5
12100  (exit $ac_status); } &&
12101         { ac_try='test -s conftest$ac_exeext'
12102  { (eval echo "$as_me:12102: \"$ac_try\"") >&5
12103  (eval $ac_try) 2>&5
12104  ac_status=$?
12105  echo "$as_me:12105: \$? = $ac_status" >&5
12106  (exit $ac_status); }; }; then
12107
12108					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12109
12110echo "${as_me:-configure}:12110: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12111
12112					cf_cv_find_linkage_utf8=yes
12113					cf_cv_library_file_utf8="-lutf8"
12114					break
12115else
12116  echo "$as_me: failed program was:" >&5
12117cat conftest.$ac_ext >&5
12118
12119					CPPFLAGS="$cf_save_CPPFLAGS"
12120					LIBS="$cf_save_LIBS"
12121					LDFLAGS="$cf_save_LDFLAGS"
12122
12123fi
12124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12125				fi
12126			done
12127			CPPFLAGS="$cf_save_CPPFLAGS"
12128			LDFLAGS="$cf_save_LDFLAGS"
12129		fi
12130
12131	else
12132		cf_cv_find_linkage_utf8=no
12133	fi
12134
12135fi
12136rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12137
12138fi
12139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12140
12141LIBS="$cf_save_LIBS"
12142
12143if test "$cf_cv_find_linkage_utf8" = yes ; then
12144cf_cv_utf8_lib=add-on
12145else
12146cf_cv_utf8_lib=no
12147fi
12148
12149fi
12150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12151fi
12152echo "$as_me:12152: result: $cf_cv_utf8_lib" >&5
12153echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12154
12155# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12156# ncurses/ncursesw:
12157if test "$cf_cv_utf8_lib" = "add-on" ; then
12158
12159cat >>confdefs.h <<\EOF
12160#define HAVE_LIBUTF8_H 1
12161EOF
12162
12163if test -n "$cf_cv_header_path_utf8" ; then
12164  for cf_add_incdir in $cf_cv_header_path_utf8
12165  do
12166	while test $cf_add_incdir != /usr/include
12167	do
12168	  if test -d $cf_add_incdir
12169	  then
12170		cf_have_incdir=no
12171		if test -n "$CFLAGS$CPPFLAGS" ; then
12172		  # a loop is needed to ensure we can add subdirs of existing dirs
12173		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12174			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12175			  cf_have_incdir=yes; break
12176			fi
12177		  done
12178		fi
12179
12180		if test "$cf_have_incdir" = no ; then
12181		  if test "$cf_add_incdir" = /usr/local/include ; then
12182			if test "$GCC" = yes
12183			then
12184			  cf_save_CPPFLAGS=$CPPFLAGS
12185
12186	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12187	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12188
12189			  cat >conftest.$ac_ext <<_ACEOF
12190#line 12190 "configure"
12191#include "confdefs.h"
12192#include <stdio.h>
12193int
12194main (void)
12195{
12196printf("Hello")
12197  ;
12198  return 0;
12199}
12200_ACEOF
12201rm -f conftest.$ac_objext
12202if { (eval echo "$as_me:12202: \"$ac_compile\"") >&5
12203  (eval $ac_compile) 2>&5
12204  ac_status=$?
12205  echo "$as_me:12205: \$? = $ac_status" >&5
12206  (exit $ac_status); } &&
12207         { ac_try='test -s conftest.$ac_objext'
12208  { (eval echo "$as_me:12208: \"$ac_try\"") >&5
12209  (eval $ac_try) 2>&5
12210  ac_status=$?
12211  echo "$as_me:12211: \$? = $ac_status" >&5
12212  (exit $ac_status); }; }; then
12213  :
12214else
12215  echo "$as_me: failed program was:" >&5
12216cat conftest.$ac_ext >&5
12217cf_have_incdir=yes
12218fi
12219rm -f conftest.$ac_objext conftest.$ac_ext
12220			  CPPFLAGS=$cf_save_CPPFLAGS
12221			fi
12222		  fi
12223		fi
12224
12225		if test "$cf_have_incdir" = no ; then
12226		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
12227
12228echo "${as_me:-configure}:12228: testing adding $cf_add_incdir to include-path ..." 1>&5
12229
12230		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12231
12232		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12233		  test "$cf_top_incdir" = "$cf_add_incdir" && break
12234		  cf_add_incdir="$cf_top_incdir"
12235		else
12236		  break
12237		fi
12238	  else
12239		break
12240	  fi
12241	done
12242  done
12243fi
12244
12245if test -n "$cf_cv_library_path_utf8" ; then
12246	for cf_add_libdir in $cf_cv_library_path_utf8
12247	do
12248		if test $cf_add_libdir = /usr/lib ; then
12249			:
12250		elif test -d $cf_add_libdir
12251		then
12252			cf_have_libdir=no
12253			if test -n "$LDFLAGS$LIBS" ; then
12254				# a loop is needed to ensure we can add subdirs of existing dirs
12255				for cf_test_libdir in $LDFLAGS $LIBS ; do
12256					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12257						cf_have_libdir=yes; break
12258					fi
12259				done
12260			fi
12261			if test "$cf_have_libdir" = no ; then
12262				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12263
12264echo "${as_me:-configure}:12264: testing adding $cf_add_libdir to library-path ..." 1>&5
12265
12266				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12267			fi
12268		fi
12269	done
12270fi
12271
12272cf_add_libs="$LIBS"
12273# reverse order
12274cf_add_0lib=
12275for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12276# filter duplicates
12277for cf_add_1lib in $cf_add_0lib; do
12278	for cf_add_2lib in $cf_add_libs; do
12279		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12280			cf_add_1lib=
12281			break
12282		fi
12283	done
12284	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12285done
12286LIBS="$cf_add_libs"
12287
12288fi
12289
12290cf_ncuconfig_root=$cf_cv_screen
12291cf_have_ncuconfig=no
12292
12293if test "x${PKG_CONFIG:=none}" != xnone; then
12294	echo "$as_me:12294: checking pkg-config for $cf_ncuconfig_root" >&5
12295echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
12296	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
12297		echo "$as_me:12297: result: yes" >&5
12298echo "${ECHO_T}yes" >&6
12299
12300		echo "$as_me:12300: checking if the $cf_ncuconfig_root package files work" >&5
12301echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
12302		cf_have_ncuconfig=unknown
12303
12304		cf_save_CFLAGS="$CFLAGS"
12305		cf_save_CPPFLAGS="$CPPFLAGS"
12306		cf_save_LIBS="$LIBS"
12307
12308		cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
12309		cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
12310
12311		# while -W for passing linker flags is prevalent, it is not "standard".
12312		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
12313		# incompatible _and_ non-standard -W option which gives an error.  Work
12314		# around that pitfall.
12315		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
12316		(x*c[89]9@@*-W*)
12317
12318cf_fix_cppflags=no
12319cf_new_cflags=
12320cf_new_cppflags=
12321cf_new_extra_cppflags=
12322
12323for cf_add_cflags in $cf_pkg_cflags
12324do
12325case $cf_fix_cppflags in
12326(no)
12327	case $cf_add_cflags in
12328	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12329		case $cf_add_cflags in
12330		(-D*)
12331			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12332
12333			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12334				&& test -z "${cf_tst_cflags}" \
12335				&& cf_fix_cppflags=yes
12336
12337			if test $cf_fix_cppflags = yes ; then
12338
12339	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12340	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12341
12342				continue
12343			elif test "${cf_tst_cflags}" = "\"'" ; then
12344
12345	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12346	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12347
12348				continue
12349			fi
12350			;;
12351		esac
12352		case "$CPPFLAGS" in
12353		(*$cf_add_cflags)
12354			;;
12355		(*)
12356			case $cf_add_cflags in
12357			(-D*)
12358				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12359
12360CPPFLAGS=`echo "$CPPFLAGS" | \
12361	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12362		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12363
12364				;;
12365			esac
12366
12367	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12368	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12369
12370			;;
12371		esac
12372		;;
12373	(*)
12374
12375	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12376	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12377
12378		;;
12379	esac
12380	;;
12381(yes)
12382
12383	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12384	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12385
12386	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12387
12388	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12389		&& test -z "${cf_tst_cflags}" \
12390		&& cf_fix_cppflags=no
12391	;;
12392esac
12393done
12394
12395if test -n "$cf_new_cflags" ; then
12396
12397	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12398	CFLAGS="${CFLAGS}$cf_new_cflags"
12399
12400fi
12401
12402if test -n "$cf_new_cppflags" ; then
12403
12404	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12405	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12406
12407fi
12408
12409if test -n "$cf_new_extra_cppflags" ; then
12410
12411	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12412	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12413
12414fi
12415
12416cf_add_libs="$LIBS"
12417# reverse order
12418cf_add_0lib=
12419for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12420# filter duplicates
12421for cf_add_1lib in $cf_add_0lib; do
12422	for cf_add_2lib in $cf_add_libs; do
12423		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12424			cf_add_1lib=
12425			break
12426		fi
12427	done
12428	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12429done
12430LIBS="$cf_add_libs"
12431
12432			cat >conftest.$ac_ext <<_ACEOF
12433#line 12433 "configure"
12434#include "confdefs.h"
12435#include <${cf_cv_ncurses_header:-curses.h}>
12436int
12437main (void)
12438{
12439initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
12440  ;
12441  return 0;
12442}
12443_ACEOF
12444rm -f conftest.$ac_objext conftest$ac_exeext
12445if { (eval echo "$as_me:12445: \"$ac_link\"") >&5
12446  (eval $ac_link) 2>&5
12447  ac_status=$?
12448  echo "$as_me:12448: \$? = $ac_status" >&5
12449  (exit $ac_status); } &&
12450         { ac_try='test -s conftest$ac_exeext'
12451  { (eval echo "$as_me:12451: \"$ac_try\"") >&5
12452  (eval $ac_try) 2>&5
12453  ac_status=$?
12454  echo "$as_me:12454: \$? = $ac_status" >&5
12455  (exit $ac_status); }; }; then
12456  if test "$cross_compiling" = yes; then
12457  cf_test_ncuconfig=maybe
12458else
12459  cat >conftest.$ac_ext <<_ACEOF
12460#line 12460 "configure"
12461#include "confdefs.h"
12462#include <${cf_cv_ncurses_header:-curses.h}>
12463					int main(void)
12464					{ char *xx = curses_version(); return (xx == 0); }
12465_ACEOF
12466rm -f conftest$ac_exeext
12467if { (eval echo "$as_me:12467: \"$ac_link\"") >&5
12468  (eval $ac_link) 2>&5
12469  ac_status=$?
12470  echo "$as_me:12470: \$? = $ac_status" >&5
12471  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12472  { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473  (eval $ac_try) 2>&5
12474  ac_status=$?
12475  echo "$as_me:12475: \$? = $ac_status" >&5
12476  (exit $ac_status); }; }; then
12477  cf_test_ncuconfig=yes
12478else
12479  echo "$as_me: program exited with status $ac_status" >&5
12480echo "$as_me: failed program was:" >&5
12481cat conftest.$ac_ext >&5
12482cf_test_ncuconfig=no
12483fi
12484rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12485fi
12486else
12487  echo "$as_me: failed program was:" >&5
12488cat conftest.$ac_ext >&5
12489cf_test_ncuconfig=no
12490fi
12491rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12492
12493			CFLAGS="$cf_save_CFLAGS"
12494			CPPFLAGS="$cf_save_CPPFLAGS"
12495			LIBS="$cf_save_LIBS"
12496
12497			if test "x$cf_test_ncuconfig" != xyes; then
12498				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
12499				cf_pkg_cflags="$cf_temp"
12500				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
12501				cf_pkg_libs="$cf_temp"
12502			fi
12503			;;
12504		esac
12505
12506cf_fix_cppflags=no
12507cf_new_cflags=
12508cf_new_cppflags=
12509cf_new_extra_cppflags=
12510
12511for cf_add_cflags in $cf_pkg_cflags
12512do
12513case $cf_fix_cppflags in
12514(no)
12515	case $cf_add_cflags in
12516	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12517		case $cf_add_cflags in
12518		(-D*)
12519			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12520
12521			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12522				&& test -z "${cf_tst_cflags}" \
12523				&& cf_fix_cppflags=yes
12524
12525			if test $cf_fix_cppflags = yes ; then
12526
12527	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12528	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12529
12530				continue
12531			elif test "${cf_tst_cflags}" = "\"'" ; then
12532
12533	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12534	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12535
12536				continue
12537			fi
12538			;;
12539		esac
12540		case "$CPPFLAGS" in
12541		(*$cf_add_cflags)
12542			;;
12543		(*)
12544			case $cf_add_cflags in
12545			(-D*)
12546				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12547
12548CPPFLAGS=`echo "$CPPFLAGS" | \
12549	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12550		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12551
12552				;;
12553			esac
12554
12555	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12556	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12557
12558			;;
12559		esac
12560		;;
12561	(*)
12562
12563	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12564	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12565
12566		;;
12567	esac
12568	;;
12569(yes)
12570
12571	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12572	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12573
12574	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12575
12576	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12577		&& test -z "${cf_tst_cflags}" \
12578		&& cf_fix_cppflags=no
12579	;;
12580esac
12581done
12582
12583if test -n "$cf_new_cflags" ; then
12584
12585	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12586	CFLAGS="${CFLAGS}$cf_new_cflags"
12587
12588fi
12589
12590if test -n "$cf_new_cppflags" ; then
12591
12592	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12593	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12594
12595fi
12596
12597if test -n "$cf_new_extra_cppflags" ; then
12598
12599	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12600	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12601
12602fi
12603
12604cf_add_libs="$LIBS"
12605# reverse order
12606cf_add_0lib=
12607for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12608# filter duplicates
12609for cf_add_1lib in $cf_add_0lib; do
12610	for cf_add_2lib in $cf_add_libs; do
12611		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12612			cf_add_1lib=
12613			break
12614		fi
12615	done
12616	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12617done
12618LIBS="$cf_add_libs"
12619
12620		cat >conftest.$ac_ext <<_ACEOF
12621#line 12621 "configure"
12622#include "confdefs.h"
12623#include <${cf_cv_ncurses_header:-curses.h}>
12624int
12625main (void)
12626{
12627initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
12628  ;
12629  return 0;
12630}
12631_ACEOF
12632rm -f conftest.$ac_objext conftest$ac_exeext
12633if { (eval echo "$as_me:12633: \"$ac_link\"") >&5
12634  (eval $ac_link) 2>&5
12635  ac_status=$?
12636  echo "$as_me:12636: \$? = $ac_status" >&5
12637  (exit $ac_status); } &&
12638         { ac_try='test -s conftest$ac_exeext'
12639  { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640  (eval $ac_try) 2>&5
12641  ac_status=$?
12642  echo "$as_me:12642: \$? = $ac_status" >&5
12643  (exit $ac_status); }; }; then
12644  if test "$cross_compiling" = yes; then
12645  cf_have_ncuconfig=maybe
12646else
12647  cat >conftest.$ac_ext <<_ACEOF
12648#line 12648 "configure"
12649#include "confdefs.h"
12650#include <${cf_cv_ncurses_header:-curses.h}>
12651				int main(void)
12652				{ char *xx = curses_version(); return (xx == 0); }
12653_ACEOF
12654rm -f conftest$ac_exeext
12655if { (eval echo "$as_me:12655: \"$ac_link\"") >&5
12656  (eval $ac_link) 2>&5
12657  ac_status=$?
12658  echo "$as_me:12658: \$? = $ac_status" >&5
12659  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12660  { (eval echo "$as_me:12660: \"$ac_try\"") >&5
12661  (eval $ac_try) 2>&5
12662  ac_status=$?
12663  echo "$as_me:12663: \$? = $ac_status" >&5
12664  (exit $ac_status); }; }; then
12665  cf_have_ncuconfig=yes
12666else
12667  echo "$as_me: program exited with status $ac_status" >&5
12668echo "$as_me: failed program was:" >&5
12669cat conftest.$ac_ext >&5
12670cf_have_ncuconfig=no
12671fi
12672rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12673fi
12674else
12675  echo "$as_me: failed program was:" >&5
12676cat conftest.$ac_ext >&5
12677cf_have_ncuconfig=no
12678fi
12679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12680		echo "$as_me:12680: result: $cf_have_ncuconfig" >&5
12681echo "${ECHO_T}$cf_have_ncuconfig" >&6
12682		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
12683		if test "$cf_have_ncuconfig" != "yes"
12684		then
12685			CPPFLAGS="$cf_save_CPPFLAGS"
12686			LIBS="$cf_save_LIBS"
12687			NCURSES_CONFIG_PKG=none
12688		else
12689
12690cat >>confdefs.h <<\EOF
12691#define NCURSES 1
12692EOF
12693
12694			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
12695
12696echo "$as_me:12696: checking for terminfo header" >&5
12697echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12698if test "${cf_cv_term_header+set}" = set; then
12699  echo $ECHO_N "(cached) $ECHO_C" >&6
12700else
12701
12702case ${cf_cv_ncurses_header} in
12703(*/ncurses.h|*/ncursesw.h)
12704	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12705	;;
12706(*)
12707	cf_term_header=term.h
12708	;;
12709esac
12710
12711for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12712do
12713cat >conftest.$ac_ext <<_ACEOF
12714#line 12714 "configure"
12715#include "confdefs.h"
12716#include <stdio.h>
12717#include <${cf_cv_ncurses_header:-curses.h}>
12718#include <$cf_test>
12719
12720int
12721main (void)
12722{
12723int x = auto_left_margin; (void)x
12724  ;
12725  return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
12729if { (eval echo "$as_me:12729: \"$ac_compile\"") >&5
12730  (eval $ac_compile) 2>&5
12731  ac_status=$?
12732  echo "$as_me:12732: \$? = $ac_status" >&5
12733  (exit $ac_status); } &&
12734         { ac_try='test -s conftest.$ac_objext'
12735  { (eval echo "$as_me:12735: \"$ac_try\"") >&5
12736  (eval $ac_try) 2>&5
12737  ac_status=$?
12738  echo "$as_me:12738: \$? = $ac_status" >&5
12739  (exit $ac_status); }; }; then
12740
12741	cf_cv_term_header="$cf_test"
12742else
12743  echo "$as_me: failed program was:" >&5
12744cat conftest.$ac_ext >&5
12745
12746	cf_cv_term_header=unknown
12747
12748fi
12749rm -f conftest.$ac_objext conftest.$ac_ext
12750	test "$cf_cv_term_header" != unknown && break
12751done
12752
12753fi
12754echo "$as_me:12754: result: $cf_cv_term_header" >&5
12755echo "${ECHO_T}$cf_cv_term_header" >&6
12756
12757# Set definitions to allow ifdef'ing to accommodate subdirectories
12758
12759case $cf_cv_term_header in
12760(*term.h)
12761
12762cat >>confdefs.h <<\EOF
12763#define HAVE_TERM_H 1
12764EOF
12765
12766	;;
12767esac
12768
12769case $cf_cv_term_header in
12770(ncurses/term.h)
12771
12772cat >>confdefs.h <<\EOF
12773#define HAVE_NCURSES_TERM_H 1
12774EOF
12775
12776	;;
12777(ncursesw/term.h)
12778
12779cat >>confdefs.h <<\EOF
12780#define HAVE_NCURSESW_TERM_H 1
12781EOF
12782
12783	;;
12784esac
12785
12786		fi
12787
12788	else
12789		echo "$as_me:12789: result: no" >&5
12790echo "${ECHO_T}no" >&6
12791		NCURSES_CONFIG_PKG=none
12792	fi
12793else
12794	NCURSES_CONFIG_PKG=none
12795fi
12796
12797if test "x$cf_have_ncuconfig" = "xno"; then
12798	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
12799
12800if test -n "$ac_tool_prefix"; then
12801  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
12802  do
12803    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12805echo "$as_me:12805: checking for $ac_word" >&5
12806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12807if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
12808  echo $ECHO_N "(cached) $ECHO_C" >&6
12809else
12810  if test -n "$NCURSES_CONFIG"; then
12811  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
12812else
12813  ac_save_IFS=$IFS; IFS=$ac_path_separator
12814ac_dummy="$PATH"
12815for ac_dir in $ac_dummy; do
12816  IFS=$ac_save_IFS
12817  test -z "$ac_dir" && ac_dir=.
12818  $as_executable_p "$ac_dir/$ac_word" || continue
12819ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12820echo "$as_me:12820: found $ac_dir/$ac_word" >&5
12821break
12822done
12823
12824fi
12825fi
12826NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
12827if test -n "$NCURSES_CONFIG"; then
12828  echo "$as_me:12828: result: $NCURSES_CONFIG" >&5
12829echo "${ECHO_T}$NCURSES_CONFIG" >&6
12830else
12831  echo "$as_me:12831: result: no" >&5
12832echo "${ECHO_T}no" >&6
12833fi
12834
12835    test -n "$NCURSES_CONFIG" && break
12836  done
12837fi
12838if test -z "$NCURSES_CONFIG"; then
12839  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
12840  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
12841do
12842  # Extract the first word of "$ac_prog", so it can be a program name with args.
12843set dummy $ac_prog; ac_word=$2
12844echo "$as_me:12844: checking for $ac_word" >&5
12845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12846if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
12847  echo $ECHO_N "(cached) $ECHO_C" >&6
12848else
12849  if test -n "$ac_ct_NCURSES_CONFIG"; then
12850  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
12851else
12852  ac_save_IFS=$IFS; IFS=$ac_path_separator
12853ac_dummy="$PATH"
12854for ac_dir in $ac_dummy; do
12855  IFS=$ac_save_IFS
12856  test -z "$ac_dir" && ac_dir=.
12857  $as_executable_p "$ac_dir/$ac_word" || continue
12858ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
12859echo "$as_me:12859: found $ac_dir/$ac_word" >&5
12860break
12861done
12862
12863fi
12864fi
12865ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
12866if test -n "$ac_ct_NCURSES_CONFIG"; then
12867  echo "$as_me:12867: result: $ac_ct_NCURSES_CONFIG" >&5
12868echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
12869else
12870  echo "$as_me:12870: result: no" >&5
12871echo "${ECHO_T}no" >&6
12872fi
12873
12874  test -n "$ac_ct_NCURSES_CONFIG" && break
12875done
12876test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
12877
12878  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
12879fi
12880
12881	if test "$NCURSES_CONFIG" != none ; then
12882
12883cf_fix_cppflags=no
12884cf_new_cflags=
12885cf_new_cppflags=
12886cf_new_extra_cppflags=
12887
12888for cf_add_cflags in `$NCURSES_CONFIG --cflags`
12889do
12890case $cf_fix_cppflags in
12891(no)
12892	case $cf_add_cflags in
12893	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12894		case $cf_add_cflags in
12895		(-D*)
12896			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12897
12898			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12899				&& test -z "${cf_tst_cflags}" \
12900				&& cf_fix_cppflags=yes
12901
12902			if test $cf_fix_cppflags = yes ; then
12903
12904	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12905	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12906
12907				continue
12908			elif test "${cf_tst_cflags}" = "\"'" ; then
12909
12910	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12911	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12912
12913				continue
12914			fi
12915			;;
12916		esac
12917		case "$CPPFLAGS" in
12918		(*$cf_add_cflags)
12919			;;
12920		(*)
12921			case $cf_add_cflags in
12922			(-D*)
12923				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12924
12925CPPFLAGS=`echo "$CPPFLAGS" | \
12926	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12927		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12928
12929				;;
12930			esac
12931
12932	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12933	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12934
12935			;;
12936		esac
12937		;;
12938	(*)
12939
12940	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12941	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12942
12943		;;
12944	esac
12945	;;
12946(yes)
12947
12948	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12949	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12950
12951	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12952
12953	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12954		&& test -z "${cf_tst_cflags}" \
12955		&& cf_fix_cppflags=no
12956	;;
12957esac
12958done
12959
12960if test -n "$cf_new_cflags" ; then
12961
12962	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12963	CFLAGS="${CFLAGS}$cf_new_cflags"
12964
12965fi
12966
12967if test -n "$cf_new_cppflags" ; then
12968
12969	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12970	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12971
12972fi
12973
12974if test -n "$cf_new_extra_cppflags" ; then
12975
12976	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12977	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12978
12979fi
12980
12981cf_add_libs="$LIBS"
12982# reverse order
12983cf_add_0lib=
12984for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12985# filter duplicates
12986for cf_add_1lib in $cf_add_0lib; do
12987	for cf_add_2lib in $cf_add_libs; do
12988		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12989			cf_add_1lib=
12990			break
12991		fi
12992	done
12993	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12994done
12995LIBS="$cf_add_libs"
12996
12997		# even with config script, some packages use no-override for curses.h
12998
12999echo "$as_me:12999: checking if we have identified curses headers" >&5
13000echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
13001if test "${cf_cv_ncurses_header+set}" = set; then
13002  echo $ECHO_N "(cached) $ECHO_C" >&6
13003else
13004
13005cf_cv_ncurses_header=none
13006for cf_header in \
13007	ncurses.h $cf_cv_screen/ncurses.h \
13008	curses.h $cf_cv_screen/curses.h
13009do
13010cat >conftest.$ac_ext <<_ACEOF
13011#line 13011 "configure"
13012#include "confdefs.h"
13013#include <${cf_header}>
13014int
13015main (void)
13016{
13017initscr(); tgoto("?", 0,0)
13018  ;
13019  return 0;
13020}
13021_ACEOF
13022rm -f conftest.$ac_objext
13023if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
13024  (eval $ac_compile) 2>&5
13025  ac_status=$?
13026  echo "$as_me:13026: \$? = $ac_status" >&5
13027  (exit $ac_status); } &&
13028         { ac_try='test -s conftest.$ac_objext'
13029  { (eval echo "$as_me:13029: \"$ac_try\"") >&5
13030  (eval $ac_try) 2>&5
13031  ac_status=$?
13032  echo "$as_me:13032: \$? = $ac_status" >&5
13033  (exit $ac_status); }; }; then
13034  cf_cv_ncurses_header=$cf_header; break
13035else
13036  echo "$as_me: failed program was:" >&5
13037cat conftest.$ac_ext >&5
13038fi
13039rm -f conftest.$ac_objext conftest.$ac_ext
13040done
13041
13042fi
13043echo "$as_me:13043: result: $cf_cv_ncurses_header" >&5
13044echo "${ECHO_T}$cf_cv_ncurses_header" >&6
13045
13046if test "$cf_cv_ncurses_header" = none ; then
13047	{ { echo "$as_me:13047: error: No curses header-files found" >&5
13048echo "$as_me: error: No curses header-files found" >&2;}
13049   { (exit 1); exit 1; }; }
13050fi
13051
13052# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
13053
13054for ac_header in $cf_cv_ncurses_header
13055do
13056as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13057echo "$as_me:13057: checking for $ac_header" >&5
13058echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13059if eval "test \"\${$as_ac_Header+set}\" = set"; then
13060  echo $ECHO_N "(cached) $ECHO_C" >&6
13061else
13062  cat >conftest.$ac_ext <<_ACEOF
13063#line 13063 "configure"
13064#include "confdefs.h"
13065#include <$ac_header>
13066_ACEOF
13067if { (eval echo "$as_me:13067: \"$ac_cpp conftest.$ac_ext\"") >&5
13068  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13069  ac_status=$?
13070  egrep -v '^ *\+' conftest.er1 >conftest.err
13071  rm -f conftest.er1
13072  cat conftest.err >&5
13073  echo "$as_me:13073: \$? = $ac_status" >&5
13074  (exit $ac_status); } >/dev/null; then
13075  if test -s conftest.err; then
13076    ac_cpp_err=$ac_c_preproc_warn_flag
13077  else
13078    ac_cpp_err=
13079  fi
13080else
13081  ac_cpp_err=yes
13082fi
13083if test -z "$ac_cpp_err"; then
13084  eval "$as_ac_Header=yes"
13085else
13086  echo "$as_me: failed program was:" >&5
13087  cat conftest.$ac_ext >&5
13088  eval "$as_ac_Header=no"
13089fi
13090rm -f conftest.err conftest.$ac_ext
13091fi
13092echo "$as_me:13092: result: `eval echo '${'$as_ac_Header'}'`" >&5
13093echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13094if test `eval echo '${'$as_ac_Header'}'` = yes; then
13095  cat >>confdefs.h <<EOF
13096#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13097EOF
13098
13099fi
13100done
13101
13102cat >>confdefs.h <<\EOF
13103#define NCURSES 1
13104EOF
13105
13106cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13107
13108		cat >>confdefs.h <<EOF
13109#define $cf_nculib_ROOT 1
13110EOF
13111
13112				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
13113
13114	else
13115
13116cf_ncuhdr_root=$cf_cv_screen
13117
13118test -n "$cf_cv_curses_dir" && \
13119test "$cf_cv_curses_dir" != "no" && { \
13120
13121if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
13122  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
13123  do
13124	while test $cf_add_incdir != /usr/include
13125	do
13126	  if test -d $cf_add_incdir
13127	  then
13128		cf_have_incdir=no
13129		if test -n "$CFLAGS$CPPFLAGS" ; then
13130		  # a loop is needed to ensure we can add subdirs of existing dirs
13131		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13132			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13133			  cf_have_incdir=yes; break
13134			fi
13135		  done
13136		fi
13137
13138		if test "$cf_have_incdir" = no ; then
13139		  if test "$cf_add_incdir" = /usr/local/include ; then
13140			if test "$GCC" = yes
13141			then
13142			  cf_save_CPPFLAGS=$CPPFLAGS
13143
13144	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13145	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13146
13147			  cat >conftest.$ac_ext <<_ACEOF
13148#line 13148 "configure"
13149#include "confdefs.h"
13150#include <stdio.h>
13151int
13152main (void)
13153{
13154printf("Hello")
13155  ;
13156  return 0;
13157}
13158_ACEOF
13159rm -f conftest.$ac_objext
13160if { (eval echo "$as_me:13160: \"$ac_compile\"") >&5
13161  (eval $ac_compile) 2>&5
13162  ac_status=$?
13163  echo "$as_me:13163: \$? = $ac_status" >&5
13164  (exit $ac_status); } &&
13165         { ac_try='test -s conftest.$ac_objext'
13166  { (eval echo "$as_me:13166: \"$ac_try\"") >&5
13167  (eval $ac_try) 2>&5
13168  ac_status=$?
13169  echo "$as_me:13169: \$? = $ac_status" >&5
13170  (exit $ac_status); }; }; then
13171  :
13172else
13173  echo "$as_me: failed program was:" >&5
13174cat conftest.$ac_ext >&5
13175cf_have_incdir=yes
13176fi
13177rm -f conftest.$ac_objext conftest.$ac_ext
13178			  CPPFLAGS=$cf_save_CPPFLAGS
13179			fi
13180		  fi
13181		fi
13182
13183		if test "$cf_have_incdir" = no ; then
13184		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13185
13186echo "${as_me:-configure}:13186: testing adding $cf_add_incdir to include-path ..." 1>&5
13187
13188		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13189
13190		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13191		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13192		  cf_add_incdir="$cf_top_incdir"
13193		else
13194		  break
13195		fi
13196	  else
13197		break
13198	  fi
13199	done
13200  done
13201fi
13202
13203}
13204
13205echo "$as_me:13205: checking for $cf_ncuhdr_root header in include-path" >&5
13206echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
13207if test "${cf_cv_ncurses_h+set}" = set; then
13208  echo $ECHO_N "(cached) $ECHO_C" >&6
13209else
13210
13211	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
13212	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
13213	for cf_header in $cf_header_list
13214	do
13215
13216	cat >conftest.$ac_ext <<_ACEOF
13217#line 13217 "configure"
13218#include "confdefs.h"
13219
13220#include <$cf_header>
13221int
13222main (void)
13223{
13224
13225#ifdef NCURSES_VERSION
13226
13227printf("%s\n", NCURSES_VERSION);
13228#else
13229#ifdef __NCURSES_H
13230printf("old\n");
13231#else
13232	make an error
13233#endif
13234#endif
13235
13236  ;
13237  return 0;
13238}
13239_ACEOF
13240rm -f conftest.$ac_objext
13241if { (eval echo "$as_me:13241: \"$ac_compile\"") >&5
13242  (eval $ac_compile) 2>&5
13243  ac_status=$?
13244  echo "$as_me:13244: \$? = $ac_status" >&5
13245  (exit $ac_status); } &&
13246         { ac_try='test -s conftest.$ac_objext'
13247  { (eval echo "$as_me:13247: \"$ac_try\"") >&5
13248  (eval $ac_try) 2>&5
13249  ac_status=$?
13250  echo "$as_me:13250: \$? = $ac_status" >&5
13251  (exit $ac_status); }; }; then
13252  cf_cv_ncurses_h=$cf_header
13253
13254else
13255  echo "$as_me: failed program was:" >&5
13256cat conftest.$ac_ext >&5
13257cf_cv_ncurses_h=no
13258fi
13259rm -f conftest.$ac_objext conftest.$ac_ext
13260
13261		test "$cf_cv_ncurses_h" != no && break
13262	done
13263
13264fi
13265echo "$as_me:13265: result: $cf_cv_ncurses_h" >&5
13266echo "${ECHO_T}$cf_cv_ncurses_h" >&6
13267
13268if test "$cf_cv_ncurses_h" != no ; then
13269	cf_cv_ncurses_header=$cf_cv_ncurses_h
13270else
13271
13272echo "$as_me:13272: checking for $cf_ncuhdr_root include-path" >&5
13273echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
13274if test "${cf_cv_ncurses_h2+set}" = set; then
13275  echo $ECHO_N "(cached) $ECHO_C" >&6
13276else
13277
13278	test -n "$verbose" && echo
13279
13280cf_search=
13281
13282# collect the current set of include-directories from compiler flags
13283cf_header_path_list=""
13284if test -n "${CFLAGS}${CPPFLAGS}" ; then
13285	for cf_header_path in $CPPFLAGS $CFLAGS
13286	do
13287		case $cf_header_path in
13288		(-I*)
13289			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13290
13291test "x$cf_header_path" != "xNONE" && \
13292test -d "$cf_header_path" && \
13293 {
13294	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
13295	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
13296	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
13297	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
13298	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
13299	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
13300}
13301
13302			cf_header_path_list="$cf_header_path_list $cf_search"
13303			;;
13304		esac
13305	done
13306fi
13307
13308# add the variations for the package we are looking for
13309
13310cf_search=
13311
13312test "x$prefix" != "xNONE" && \
13313test -d "$prefix" && \
13314 {
13315	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
13316	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
13317	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
13318	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
13319	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
13320	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
13321}
13322
13323for cf_subdir_prefix in \
13324	/usr \
13325	/usr/local \
13326	/usr/pkg \
13327	/opt \
13328	/opt/local \
13329	$HOME
13330do
13331
13332test "x$cf_subdir_prefix" != "x$prefix" && \
13333test -d "$cf_subdir_prefix" && \
13334(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13335	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
13336	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
13337	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
13338	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
13339	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
13340	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
13341}
13342
13343done
13344
13345test "$includedir" != NONE && \
13346test "$includedir" != "/usr/include" && \
13347test -d "$includedir" && {
13348	test -d $includedir &&    cf_search="$cf_search $includedir"
13349	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
13350}
13351
13352test "$oldincludedir" != NONE && \
13353test "$oldincludedir" != "/usr/include" && \
13354test -d "$oldincludedir" && {
13355	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
13356	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
13357}
13358
13359cf_search="$cf_search $cf_header_path_list"
13360
13361	test -n "$verbose" && echo search path $cf_search
13362	cf_save2_CPPFLAGS="$CPPFLAGS"
13363	for cf_incdir in $cf_search
13364	do
13365
13366if test -n "$cf_incdir" ; then
13367  for cf_add_incdir in $cf_incdir
13368  do
13369	while test $cf_add_incdir != /usr/include
13370	do
13371	  if test -d $cf_add_incdir
13372	  then
13373		cf_have_incdir=no
13374		if test -n "$CFLAGS$CPPFLAGS" ; then
13375		  # a loop is needed to ensure we can add subdirs of existing dirs
13376		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13377			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13378			  cf_have_incdir=yes; break
13379			fi
13380		  done
13381		fi
13382
13383		if test "$cf_have_incdir" = no ; then
13384		  if test "$cf_add_incdir" = /usr/local/include ; then
13385			if test "$GCC" = yes
13386			then
13387			  cf_save_CPPFLAGS=$CPPFLAGS
13388
13389	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13390	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13391
13392			  cat >conftest.$ac_ext <<_ACEOF
13393#line 13393 "configure"
13394#include "confdefs.h"
13395#include <stdio.h>
13396int
13397main (void)
13398{
13399printf("Hello")
13400  ;
13401  return 0;
13402}
13403_ACEOF
13404rm -f conftest.$ac_objext
13405if { (eval echo "$as_me:13405: \"$ac_compile\"") >&5
13406  (eval $ac_compile) 2>&5
13407  ac_status=$?
13408  echo "$as_me:13408: \$? = $ac_status" >&5
13409  (exit $ac_status); } &&
13410         { ac_try='test -s conftest.$ac_objext'
13411  { (eval echo "$as_me:13411: \"$ac_try\"") >&5
13412  (eval $ac_try) 2>&5
13413  ac_status=$?
13414  echo "$as_me:13414: \$? = $ac_status" >&5
13415  (exit $ac_status); }; }; then
13416  :
13417else
13418  echo "$as_me: failed program was:" >&5
13419cat conftest.$ac_ext >&5
13420cf_have_incdir=yes
13421fi
13422rm -f conftest.$ac_objext conftest.$ac_ext
13423			  CPPFLAGS=$cf_save_CPPFLAGS
13424			fi
13425		  fi
13426		fi
13427
13428		if test "$cf_have_incdir" = no ; then
13429		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13430
13431echo "${as_me:-configure}:13431: testing adding $cf_add_incdir to include-path ..." 1>&5
13432
13433		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13434
13435		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13436		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13437		  cf_add_incdir="$cf_top_incdir"
13438		else
13439		  break
13440		fi
13441	  else
13442		break
13443	  fi
13444	done
13445  done
13446fi
13447
13448		for cf_header in \
13449			ncurses.h \
13450			curses.h
13451		do
13452
13453	cat >conftest.$ac_ext <<_ACEOF
13454#line 13454 "configure"
13455#include "confdefs.h"
13456
13457#include <$cf_header>
13458int
13459main (void)
13460{
13461
13462#ifdef NCURSES_VERSION
13463
13464printf("%s\n", NCURSES_VERSION);
13465#else
13466#ifdef __NCURSES_H
13467printf("old\n");
13468#else
13469	make an error
13470#endif
13471#endif
13472
13473  ;
13474  return 0;
13475}
13476_ACEOF
13477rm -f conftest.$ac_objext
13478if { (eval echo "$as_me:13478: \"$ac_compile\"") >&5
13479  (eval $ac_compile) 2>&5
13480  ac_status=$?
13481  echo "$as_me:13481: \$? = $ac_status" >&5
13482  (exit $ac_status); } &&
13483         { ac_try='test -s conftest.$ac_objext'
13484  { (eval echo "$as_me:13484: \"$ac_try\"") >&5
13485  (eval $ac_try) 2>&5
13486  ac_status=$?
13487  echo "$as_me:13487: \$? = $ac_status" >&5
13488  (exit $ac_status); }; }; then
13489  cf_cv_ncurses_h2=$cf_header
13490
13491else
13492  echo "$as_me: failed program was:" >&5
13493cat conftest.$ac_ext >&5
13494cf_cv_ncurses_h2=no
13495fi
13496rm -f conftest.$ac_objext conftest.$ac_ext
13497
13498			if test "$cf_cv_ncurses_h2" != no ; then
13499				cf_cv_ncurses_h2=$cf_incdir/$cf_header
13500				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
13501				break
13502			fi
13503			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
13504		done
13505		CPPFLAGS="$cf_save2_CPPFLAGS"
13506		test "$cf_cv_ncurses_h2" != no && break
13507	done
13508	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13508: error: not found" >&5
13509echo "$as_me: error: not found" >&2;}
13510   { (exit 1); exit 1; }; }
13511
13512fi
13513echo "$as_me:13513: result: $cf_cv_ncurses_h2" >&5
13514echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
13515
13516	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
13517	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
13518	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
13519		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
13520	fi
13521
13522if test -n "$cf_1st_incdir" ; then
13523  for cf_add_incdir in $cf_1st_incdir
13524  do
13525	while test $cf_add_incdir != /usr/include
13526	do
13527	  if test -d $cf_add_incdir
13528	  then
13529		cf_have_incdir=no
13530		if test -n "$CFLAGS$CPPFLAGS" ; then
13531		  # a loop is needed to ensure we can add subdirs of existing dirs
13532		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13533			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13534			  cf_have_incdir=yes; break
13535			fi
13536		  done
13537		fi
13538
13539		if test "$cf_have_incdir" = no ; then
13540		  if test "$cf_add_incdir" = /usr/local/include ; then
13541			if test "$GCC" = yes
13542			then
13543			  cf_save_CPPFLAGS=$CPPFLAGS
13544
13545	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13546	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13547
13548			  cat >conftest.$ac_ext <<_ACEOF
13549#line 13549 "configure"
13550#include "confdefs.h"
13551#include <stdio.h>
13552int
13553main (void)
13554{
13555printf("Hello")
13556  ;
13557  return 0;
13558}
13559_ACEOF
13560rm -f conftest.$ac_objext
13561if { (eval echo "$as_me:13561: \"$ac_compile\"") >&5
13562  (eval $ac_compile) 2>&5
13563  ac_status=$?
13564  echo "$as_me:13564: \$? = $ac_status" >&5
13565  (exit $ac_status); } &&
13566         { ac_try='test -s conftest.$ac_objext'
13567  { (eval echo "$as_me:13567: \"$ac_try\"") >&5
13568  (eval $ac_try) 2>&5
13569  ac_status=$?
13570  echo "$as_me:13570: \$? = $ac_status" >&5
13571  (exit $ac_status); }; }; then
13572  :
13573else
13574  echo "$as_me: failed program was:" >&5
13575cat conftest.$ac_ext >&5
13576cf_have_incdir=yes
13577fi
13578rm -f conftest.$ac_objext conftest.$ac_ext
13579			  CPPFLAGS=$cf_save_CPPFLAGS
13580			fi
13581		  fi
13582		fi
13583
13584		if test "$cf_have_incdir" = no ; then
13585		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13586
13587echo "${as_me:-configure}:13587: testing adding $cf_add_incdir to include-path ..." 1>&5
13588
13589		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13590
13591		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13592		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13593		  cf_add_incdir="$cf_top_incdir"
13594		else
13595		  break
13596		fi
13597	  else
13598		break
13599	  fi
13600	done
13601  done
13602fi
13603
13604fi
13605
13606# Set definitions to allow ifdef'ing for ncurses.h
13607
13608case $cf_cv_ncurses_header in
13609(*ncurses.h)
13610
13611cat >>confdefs.h <<\EOF
13612#define HAVE_NCURSES_H 1
13613EOF
13614
13615	;;
13616esac
13617
13618case $cf_cv_ncurses_header in
13619(ncurses/curses.h|ncurses/ncurses.h)
13620
13621cat >>confdefs.h <<\EOF
13622#define HAVE_NCURSES_NCURSES_H 1
13623EOF
13624
13625	;;
13626(ncursesw/curses.h|ncursesw/ncurses.h)
13627
13628cat >>confdefs.h <<\EOF
13629#define HAVE_NCURSESW_NCURSES_H 1
13630EOF
13631
13632	;;
13633esac
13634
13635echo "$as_me:13635: checking for terminfo header" >&5
13636echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
13637if test "${cf_cv_term_header+set}" = set; then
13638  echo $ECHO_N "(cached) $ECHO_C" >&6
13639else
13640
13641case ${cf_cv_ncurses_header} in
13642(*/ncurses.h|*/ncursesw.h)
13643	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
13644	;;
13645(*)
13646	cf_term_header=term.h
13647	;;
13648esac
13649
13650for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
13651do
13652cat >conftest.$ac_ext <<_ACEOF
13653#line 13653 "configure"
13654#include "confdefs.h"
13655#include <stdio.h>
13656#include <${cf_cv_ncurses_header:-curses.h}>
13657#include <$cf_test>
13658
13659int
13660main (void)
13661{
13662int x = auto_left_margin; (void)x
13663  ;
13664  return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext
13668if { (eval echo "$as_me:13668: \"$ac_compile\"") >&5
13669  (eval $ac_compile) 2>&5
13670  ac_status=$?
13671  echo "$as_me:13671: \$? = $ac_status" >&5
13672  (exit $ac_status); } &&
13673         { ac_try='test -s conftest.$ac_objext'
13674  { (eval echo "$as_me:13674: \"$ac_try\"") >&5
13675  (eval $ac_try) 2>&5
13676  ac_status=$?
13677  echo "$as_me:13677: \$? = $ac_status" >&5
13678  (exit $ac_status); }; }; then
13679
13680	cf_cv_term_header="$cf_test"
13681else
13682  echo "$as_me: failed program was:" >&5
13683cat conftest.$ac_ext >&5
13684
13685	cf_cv_term_header=unknown
13686
13687fi
13688rm -f conftest.$ac_objext conftest.$ac_ext
13689	test "$cf_cv_term_header" != unknown && break
13690done
13691
13692fi
13693echo "$as_me:13693: result: $cf_cv_term_header" >&5
13694echo "${ECHO_T}$cf_cv_term_header" >&6
13695
13696# Set definitions to allow ifdef'ing to accommodate subdirectories
13697
13698case $cf_cv_term_header in
13699(*term.h)
13700
13701cat >>confdefs.h <<\EOF
13702#define HAVE_TERM_H 1
13703EOF
13704
13705	;;
13706esac
13707
13708case $cf_cv_term_header in
13709(ncurses/term.h)
13710
13711cat >>confdefs.h <<\EOF
13712#define HAVE_NCURSES_TERM_H 1
13713EOF
13714
13715	;;
13716(ncursesw/term.h)
13717
13718cat >>confdefs.h <<\EOF
13719#define HAVE_NCURSESW_TERM_H 1
13720EOF
13721
13722	;;
13723esac
13724
13725# some applications need this, but should check for NCURSES_VERSION
13726
13727cat >>confdefs.h <<\EOF
13728#define NCURSES 1
13729EOF
13730
13731echo "$as_me:13731: checking for ncurses version" >&5
13732echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
13733if test "${cf_cv_ncurses_version+set}" = set; then
13734  echo $ECHO_N "(cached) $ECHO_C" >&6
13735else
13736
13737	cf_cv_ncurses_version=no
13738	cf_tempfile=out$$
13739	rm -f $cf_tempfile
13740	if test "$cross_compiling" = yes; then
13741
13742	# This will not work if the preprocessor splits the line after the
13743	# Autoconf token.  The 'unproto' program does that.
13744	cat > conftest.$ac_ext <<EOF
13745#include <${cf_cv_ncurses_header:-curses.h}>
13746#undef Autoconf
13747#ifdef NCURSES_VERSION
13748Autoconf NCURSES_VERSION
13749#else
13750#ifdef __NCURSES_H
13751Autoconf "old"
13752#endif
13753;
13754#endif
13755EOF
13756	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
13757	{ (eval echo "$as_me:13757: \"$cf_try\"") >&5
13758  (eval $cf_try) 2>&5
13759  ac_status=$?
13760  echo "$as_me:13760: \$? = $ac_status" >&5
13761  (exit $ac_status); }
13762	if test -f conftest.out ; then
13763		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
13764		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
13765		rm -f conftest.out
13766	fi
13767
13768else
13769  cat >conftest.$ac_ext <<_ACEOF
13770#line 13770 "configure"
13771#include "confdefs.h"
13772
13773#include <${cf_cv_ncurses_header:-curses.h}>
13774#include <stdio.h>
13775int main(void)
13776{
13777	FILE *fp = fopen("$cf_tempfile", "w");
13778#ifdef NCURSES_VERSION
13779# ifdef NCURSES_VERSION_PATCH
13780	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
13781# else
13782	fprintf(fp, "%s\n", NCURSES_VERSION);
13783# endif
13784#else
13785# ifdef __NCURSES_H
13786	fprintf(fp, "old\n");
13787# else
13788	make an error
13789# endif
13790#endif
13791	${cf_cv_main_return:-return}(0);
13792}
13793_ACEOF
13794rm -f conftest$ac_exeext
13795if { (eval echo "$as_me:13795: \"$ac_link\"") >&5
13796  (eval $ac_link) 2>&5
13797  ac_status=$?
13798  echo "$as_me:13798: \$? = $ac_status" >&5
13799  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13800  { (eval echo "$as_me:13800: \"$ac_try\"") >&5
13801  (eval $ac_try) 2>&5
13802  ac_status=$?
13803  echo "$as_me:13803: \$? = $ac_status" >&5
13804  (exit $ac_status); }; }; then
13805
13806	cf_cv_ncurses_version=`cat $cf_tempfile`
13807else
13808  echo "$as_me: program exited with status $ac_status" >&5
13809echo "$as_me: failed program was:" >&5
13810cat conftest.$ac_ext >&5
13811fi
13812rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13813fi
13814	rm -f $cf_tempfile
13815
13816fi
13817echo "$as_me:13817: result: $cf_cv_ncurses_version" >&5
13818echo "${ECHO_T}$cf_cv_ncurses_version" >&6
13819test "$cf_cv_ncurses_version" = no ||
13820cat >>confdefs.h <<\EOF
13821#define NCURSES 1
13822EOF
13823
13824cf_nculib_root=$cf_cv_screen
13825	# This works, except for the special case where we find gpm, but
13826	# ncurses is in a nonstandard location via $LIBS, and we really want
13827	# to link gpm.
13828cf_ncurses_LIBS=""
13829cf_ncurses_SAVE="$LIBS"
13830echo "$as_me:13830: checking for Gpm_Open in -lgpm" >&5
13831echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
13832if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
13833  echo $ECHO_N "(cached) $ECHO_C" >&6
13834else
13835  ac_check_lib_save_LIBS=$LIBS
13836LIBS="-lgpm  $LIBS"
13837cat >conftest.$ac_ext <<_ACEOF
13838#line 13838 "configure"
13839#include "confdefs.h"
13840
13841/* Override any gcc2 internal prototype to avoid an error.  */
13842#ifdef __cplusplus
13843extern "C"
13844#endif
13845/* We use char because int might match the return type of a gcc2
13846   builtin and then its argument prototype would still apply.  */
13847char Gpm_Open ();
13848int
13849main (void)
13850{
13851Gpm_Open ();
13852  ;
13853  return 0;
13854}
13855_ACEOF
13856rm -f conftest.$ac_objext conftest$ac_exeext
13857if { (eval echo "$as_me:13857: \"$ac_link\"") >&5
13858  (eval $ac_link) 2>&5
13859  ac_status=$?
13860  echo "$as_me:13860: \$? = $ac_status" >&5
13861  (exit $ac_status); } &&
13862         { ac_try='test -s conftest$ac_exeext'
13863  { (eval echo "$as_me:13863: \"$ac_try\"") >&5
13864  (eval $ac_try) 2>&5
13865  ac_status=$?
13866  echo "$as_me:13866: \$? = $ac_status" >&5
13867  (exit $ac_status); }; }; then
13868  ac_cv_lib_gpm_Gpm_Open=yes
13869else
13870  echo "$as_me: failed program was:" >&5
13871cat conftest.$ac_ext >&5
13872ac_cv_lib_gpm_Gpm_Open=no
13873fi
13874rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13875LIBS=$ac_check_lib_save_LIBS
13876fi
13877echo "$as_me:13877: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13878echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
13879if test $ac_cv_lib_gpm_Gpm_Open = yes; then
13880  echo "$as_me:13880: checking for initscr in -lgpm" >&5
13881echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
13882if test "${ac_cv_lib_gpm_initscr+set}" = set; then
13883  echo $ECHO_N "(cached) $ECHO_C" >&6
13884else
13885  ac_check_lib_save_LIBS=$LIBS
13886LIBS="-lgpm  $LIBS"
13887cat >conftest.$ac_ext <<_ACEOF
13888#line 13888 "configure"
13889#include "confdefs.h"
13890
13891/* Override any gcc2 internal prototype to avoid an error.  */
13892#ifdef __cplusplus
13893extern "C"
13894#endif
13895/* We use char because int might match the return type of a gcc2
13896   builtin and then its argument prototype would still apply.  */
13897char initscr ();
13898int
13899main (void)
13900{
13901initscr ();
13902  ;
13903  return 0;
13904}
13905_ACEOF
13906rm -f conftest.$ac_objext conftest$ac_exeext
13907if { (eval echo "$as_me:13907: \"$ac_link\"") >&5
13908  (eval $ac_link) 2>&5
13909  ac_status=$?
13910  echo "$as_me:13910: \$? = $ac_status" >&5
13911  (exit $ac_status); } &&
13912         { ac_try='test -s conftest$ac_exeext'
13913  { (eval echo "$as_me:13913: \"$ac_try\"") >&5
13914  (eval $ac_try) 2>&5
13915  ac_status=$?
13916  echo "$as_me:13916: \$? = $ac_status" >&5
13917  (exit $ac_status); }; }; then
13918  ac_cv_lib_gpm_initscr=yes
13919else
13920  echo "$as_me: failed program was:" >&5
13921cat conftest.$ac_ext >&5
13922ac_cv_lib_gpm_initscr=no
13923fi
13924rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13925LIBS=$ac_check_lib_save_LIBS
13926fi
13927echo "$as_me:13927: result: $ac_cv_lib_gpm_initscr" >&5
13928echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
13929if test $ac_cv_lib_gpm_initscr = yes; then
13930  LIBS="$cf_ncurses_SAVE"
13931else
13932  cf_ncurses_LIBS="-lgpm"
13933fi
13934
13935fi
13936
13937case $host_os in
13938(freebsd*)
13939	# This is only necessary if you are linking against an obsolete
13940	# version of ncurses (but it should do no harm, since it's static).
13941	if test "$cf_nculib_root" = ncurses ; then
13942		echo "$as_me:13942: checking for tgoto in -lmytinfo" >&5
13943echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
13944if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
13945  echo $ECHO_N "(cached) $ECHO_C" >&6
13946else
13947  ac_check_lib_save_LIBS=$LIBS
13948LIBS="-lmytinfo  $LIBS"
13949cat >conftest.$ac_ext <<_ACEOF
13950#line 13950 "configure"
13951#include "confdefs.h"
13952
13953/* Override any gcc2 internal prototype to avoid an error.  */
13954#ifdef __cplusplus
13955extern "C"
13956#endif
13957/* We use char because int might match the return type of a gcc2
13958   builtin and then its argument prototype would still apply.  */
13959char tgoto ();
13960int
13961main (void)
13962{
13963tgoto ();
13964  ;
13965  return 0;
13966}
13967_ACEOF
13968rm -f conftest.$ac_objext conftest$ac_exeext
13969if { (eval echo "$as_me:13969: \"$ac_link\"") >&5
13970  (eval $ac_link) 2>&5
13971  ac_status=$?
13972  echo "$as_me:13972: \$? = $ac_status" >&5
13973  (exit $ac_status); } &&
13974         { ac_try='test -s conftest$ac_exeext'
13975  { (eval echo "$as_me:13975: \"$ac_try\"") >&5
13976  (eval $ac_try) 2>&5
13977  ac_status=$?
13978  echo "$as_me:13978: \$? = $ac_status" >&5
13979  (exit $ac_status); }; }; then
13980  ac_cv_lib_mytinfo_tgoto=yes
13981else
13982  echo "$as_me: failed program was:" >&5
13983cat conftest.$ac_ext >&5
13984ac_cv_lib_mytinfo_tgoto=no
13985fi
13986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13987LIBS=$ac_check_lib_save_LIBS
13988fi
13989echo "$as_me:13989: result: $ac_cv_lib_mytinfo_tgoto" >&5
13990echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
13991if test $ac_cv_lib_mytinfo_tgoto = yes; then
13992  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
13993fi
13994
13995	fi
13996	;;
13997esac
13998
13999cf_add_libs="$LIBS"
14000# reverse order
14001cf_add_0lib=
14002for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14003# filter duplicates
14004for cf_add_1lib in $cf_add_0lib; do
14005	for cf_add_2lib in $cf_add_libs; do
14006		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14007			cf_add_1lib=
14008			break
14009		fi
14010	done
14011	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14012done
14013LIBS="$cf_add_libs"
14014
14015if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
14016then
14017
14018cf_add_libs="$LIBS"
14019# reverse order
14020cf_add_0lib=
14021for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14022# filter duplicates
14023for cf_add_1lib in $cf_add_0lib; do
14024	for cf_add_2lib in $cf_add_libs; do
14025		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14026			cf_add_1lib=
14027			break
14028		fi
14029	done
14030	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14031done
14032LIBS="$cf_add_libs"
14033
14034else
14035
14036	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
14037	cf_libdir=""
14038	echo "$as_me:14038: checking for initscr" >&5
14039echo $ECHO_N "checking for initscr... $ECHO_C" >&6
14040if test "${ac_cv_func_initscr+set}" = set; then
14041  echo $ECHO_N "(cached) $ECHO_C" >&6
14042else
14043  cat >conftest.$ac_ext <<_ACEOF
14044#line 14044 "configure"
14045#include "confdefs.h"
14046#define initscr autoconf_temporary
14047#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14048#undef initscr
14049
14050#ifdef __cplusplus
14051extern "C"
14052#endif
14053
14054/* We use char because int might match the return type of a gcc2
14055   builtin and then its argument prototype would still apply.  */
14056char initscr (void);
14057
14058int
14059main (void)
14060{
14061
14062/* The GNU C library defines stubs for functions which it implements
14063    to always fail with ENOSYS.  Some functions are actually named
14064    something starting with __ and the normal name is an alias.  */
14065#if defined (__stub_initscr) || defined (__stub___initscr)
14066#error found stub for initscr
14067#endif
14068
14069	return initscr ();
14070  ;
14071  return 0;
14072}
14073_ACEOF
14074rm -f conftest.$ac_objext conftest$ac_exeext
14075if { (eval echo "$as_me:14075: \"$ac_link\"") >&5
14076  (eval $ac_link) 2>&5
14077  ac_status=$?
14078  echo "$as_me:14078: \$? = $ac_status" >&5
14079  (exit $ac_status); } &&
14080         { ac_try='test -s conftest$ac_exeext'
14081  { (eval echo "$as_me:14081: \"$ac_try\"") >&5
14082  (eval $ac_try) 2>&5
14083  ac_status=$?
14084  echo "$as_me:14084: \$? = $ac_status" >&5
14085  (exit $ac_status); }; }; then
14086  ac_cv_func_initscr=yes
14087else
14088  echo "$as_me: failed program was:" >&5
14089cat conftest.$ac_ext >&5
14090ac_cv_func_initscr=no
14091fi
14092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14093fi
14094echo "$as_me:14094: result: $ac_cv_func_initscr" >&5
14095echo "${ECHO_T}$ac_cv_func_initscr" >&6
14096if test $ac_cv_func_initscr = yes; then
14097  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
14098else
14099
14100		cf_save_LIBS="$LIBS"
14101		echo "$as_me:14101: checking for initscr in -l$cf_nculib_root" >&5
14102echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
14103		LIBS="-l$cf_nculib_root $LIBS"
14104		cat >conftest.$ac_ext <<_ACEOF
14105#line 14105 "configure"
14106#include "confdefs.h"
14107#include <${cf_cv_ncurses_header:-curses.h}>
14108int
14109main (void)
14110{
14111initscr()
14112  ;
14113  return 0;
14114}
14115_ACEOF
14116rm -f conftest.$ac_objext conftest$ac_exeext
14117if { (eval echo "$as_me:14117: \"$ac_link\"") >&5
14118  (eval $ac_link) 2>&5
14119  ac_status=$?
14120  echo "$as_me:14120: \$? = $ac_status" >&5
14121  (exit $ac_status); } &&
14122         { ac_try='test -s conftest$ac_exeext'
14123  { (eval echo "$as_me:14123: \"$ac_try\"") >&5
14124  (eval $ac_try) 2>&5
14125  ac_status=$?
14126  echo "$as_me:14126: \$? = $ac_status" >&5
14127  (exit $ac_status); }; }; then
14128  echo "$as_me:14128: result: yes" >&5
14129echo "${ECHO_T}yes" >&6
14130			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
14131
14132else
14133  echo "$as_me: failed program was:" >&5
14134cat conftest.$ac_ext >&5
14135echo "$as_me:14135: result: no" >&5
14136echo "${ECHO_T}no" >&6
14137
14138cf_search=
14139cf_library_path_list=""
14140if test -n "${LDFLAGS}${LIBS}" ; then
14141	for cf_library_path in $LDFLAGS $LIBS
14142	do
14143		case $cf_library_path in
14144		(-L*)
14145			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
14146
14147test "x$cf_library_path" != "xNONE" && \
14148test -d "$cf_library_path" && \
14149 {
14150	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
14151	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
14152	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
14153	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
14154	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
14155	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
14156}
14157
14158			cf_library_path_list="$cf_library_path_list $cf_search"
14159			;;
14160		esac
14161	done
14162fi
14163
14164cf_search=
14165
14166test "x$prefix" != "xNONE" && \
14167test -d "$prefix" && \
14168 {
14169	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
14170	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
14171	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
14172	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
14173	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
14174	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
14175}
14176
14177for cf_subdir_prefix in \
14178	/usr \
14179	/usr/local \
14180	/usr/pkg \
14181	/opt \
14182	/opt/local \
14183	$HOME
14184do
14185
14186test "x$cf_subdir_prefix" != "x$prefix" && \
14187test -d "$cf_subdir_prefix" && \
14188(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
14189	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
14190	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
14191	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
14192	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
14193	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
14194	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
14195}
14196
14197done
14198
14199cf_search="$cf_library_path_list $cf_search"
14200
14201			for cf_libdir in $cf_search
14202			do
14203				echo "$as_me:14203: checking for -l$cf_nculib_root in $cf_libdir" >&5
14204echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
14205				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
14206				cat >conftest.$ac_ext <<_ACEOF
14207#line 14207 "configure"
14208#include "confdefs.h"
14209#include <${cf_cv_ncurses_header:-curses.h}>
14210int
14211main (void)
14212{
14213initscr()
14214  ;
14215  return 0;
14216}
14217_ACEOF
14218rm -f conftest.$ac_objext conftest$ac_exeext
14219if { (eval echo "$as_me:14219: \"$ac_link\"") >&5
14220  (eval $ac_link) 2>&5
14221  ac_status=$?
14222  echo "$as_me:14222: \$? = $ac_status" >&5
14223  (exit $ac_status); } &&
14224         { ac_try='test -s conftest$ac_exeext'
14225  { (eval echo "$as_me:14225: \"$ac_try\"") >&5
14226  (eval $ac_try) 2>&5
14227  ac_status=$?
14228  echo "$as_me:14228: \$? = $ac_status" >&5
14229  (exit $ac_status); }; }; then
14230  echo "$as_me:14230: result: yes" >&5
14231echo "${ECHO_T}yes" >&6
14232			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
14233					 break
14234else
14235  echo "$as_me: failed program was:" >&5
14236cat conftest.$ac_ext >&5
14237echo "$as_me:14237: result: no" >&5
14238echo "${ECHO_T}no" >&6
14239					 LIBS="$cf_save_LIBS"
14240fi
14241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14242			done
14243
14244fi
14245rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246
14247fi
14248
14249eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
14250
14251if test $cf_found_library = no ; then
14252	{ { echo "$as_me:14252: error: Cannot link $cf_nculib_root library" >&5
14253echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
14254   { (exit 1); exit 1; }; }
14255fi
14256
14257fi
14258
14259if test -n "$cf_ncurses_LIBS" ; then
14260	echo "$as_me:14260: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
14261echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
14262	cf_ncurses_SAVE="$LIBS"
14263	for p in $cf_ncurses_LIBS ; do
14264		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
14265		if test "$q" != "$LIBS" ; then
14266			LIBS="$q"
14267		fi
14268	done
14269	cat >conftest.$ac_ext <<_ACEOF
14270#line 14270 "configure"
14271#include "confdefs.h"
14272#include <${cf_cv_ncurses_header:-curses.h}>
14273int
14274main (void)
14275{
14276initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
14277  ;
14278  return 0;
14279}
14280_ACEOF
14281rm -f conftest.$ac_objext conftest$ac_exeext
14282if { (eval echo "$as_me:14282: \"$ac_link\"") >&5
14283  (eval $ac_link) 2>&5
14284  ac_status=$?
14285  echo "$as_me:14285: \$? = $ac_status" >&5
14286  (exit $ac_status); } &&
14287         { ac_try='test -s conftest$ac_exeext'
14288  { (eval echo "$as_me:14288: \"$ac_try\"") >&5
14289  (eval $ac_try) 2>&5
14290  ac_status=$?
14291  echo "$as_me:14291: \$? = $ac_status" >&5
14292  (exit $ac_status); }; }; then
14293  echo "$as_me:14293: result: yes" >&5
14294echo "${ECHO_T}yes" >&6
14295else
14296  echo "$as_me: failed program was:" >&5
14297cat conftest.$ac_ext >&5
14298echo "$as_me:14298: result: no" >&5
14299echo "${ECHO_T}no" >&6
14300		 LIBS="$cf_ncurses_SAVE"
14301fi
14302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14303fi
14304
14305cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14306
14307cat >>confdefs.h <<EOF
14308#define $cf_nculib_ROOT 1
14309EOF
14310
14311	fi
14312else
14313	NCURSES_CONFIG=none
14314fi
14315
14316	;;
14317(ncurses*)
14318
14319cf_ncuconfig_root=$cf_cv_screen
14320cf_have_ncuconfig=no
14321
14322if test "x${PKG_CONFIG:=none}" != xnone; then
14323	echo "$as_me:14323: checking pkg-config for $cf_ncuconfig_root" >&5
14324echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
14325	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
14326		echo "$as_me:14326: result: yes" >&5
14327echo "${ECHO_T}yes" >&6
14328
14329		echo "$as_me:14329: checking if the $cf_ncuconfig_root package files work" >&5
14330echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
14331		cf_have_ncuconfig=unknown
14332
14333		cf_save_CFLAGS="$CFLAGS"
14334		cf_save_CPPFLAGS="$CPPFLAGS"
14335		cf_save_LIBS="$LIBS"
14336
14337		cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
14338		cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
14339
14340		# while -W for passing linker flags is prevalent, it is not "standard".
14341		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
14342		# incompatible _and_ non-standard -W option which gives an error.  Work
14343		# around that pitfall.
14344		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
14345		(x*c[89]9@@*-W*)
14346
14347cf_fix_cppflags=no
14348cf_new_cflags=
14349cf_new_cppflags=
14350cf_new_extra_cppflags=
14351
14352for cf_add_cflags in $cf_pkg_cflags
14353do
14354case $cf_fix_cppflags in
14355(no)
14356	case $cf_add_cflags in
14357	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14358		case $cf_add_cflags in
14359		(-D*)
14360			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14361
14362			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14363				&& test -z "${cf_tst_cflags}" \
14364				&& cf_fix_cppflags=yes
14365
14366			if test $cf_fix_cppflags = yes ; then
14367
14368	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14369	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14370
14371				continue
14372			elif test "${cf_tst_cflags}" = "\"'" ; then
14373
14374	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14375	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14376
14377				continue
14378			fi
14379			;;
14380		esac
14381		case "$CPPFLAGS" in
14382		(*$cf_add_cflags)
14383			;;
14384		(*)
14385			case $cf_add_cflags in
14386			(-D*)
14387				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14388
14389CPPFLAGS=`echo "$CPPFLAGS" | \
14390	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14391		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14392
14393				;;
14394			esac
14395
14396	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14397	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14398
14399			;;
14400		esac
14401		;;
14402	(*)
14403
14404	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14405	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14406
14407		;;
14408	esac
14409	;;
14410(yes)
14411
14412	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14413	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14414
14415	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14416
14417	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14418		&& test -z "${cf_tst_cflags}" \
14419		&& cf_fix_cppflags=no
14420	;;
14421esac
14422done
14423
14424if test -n "$cf_new_cflags" ; then
14425
14426	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14427	CFLAGS="${CFLAGS}$cf_new_cflags"
14428
14429fi
14430
14431if test -n "$cf_new_cppflags" ; then
14432
14433	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14434	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14435
14436fi
14437
14438if test -n "$cf_new_extra_cppflags" ; then
14439
14440	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14441	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14442
14443fi
14444
14445cf_add_libs="$LIBS"
14446# reverse order
14447cf_add_0lib=
14448for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14449# filter duplicates
14450for cf_add_1lib in $cf_add_0lib; do
14451	for cf_add_2lib in $cf_add_libs; do
14452		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14453			cf_add_1lib=
14454			break
14455		fi
14456	done
14457	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14458done
14459LIBS="$cf_add_libs"
14460
14461			cat >conftest.$ac_ext <<_ACEOF
14462#line 14462 "configure"
14463#include "confdefs.h"
14464#include <${cf_cv_ncurses_header:-curses.h}>
14465int
14466main (void)
14467{
14468initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
14469  ;
14470  return 0;
14471}
14472_ACEOF
14473rm -f conftest.$ac_objext conftest$ac_exeext
14474if { (eval echo "$as_me:14474: \"$ac_link\"") >&5
14475  (eval $ac_link) 2>&5
14476  ac_status=$?
14477  echo "$as_me:14477: \$? = $ac_status" >&5
14478  (exit $ac_status); } &&
14479         { ac_try='test -s conftest$ac_exeext'
14480  { (eval echo "$as_me:14480: \"$ac_try\"") >&5
14481  (eval $ac_try) 2>&5
14482  ac_status=$?
14483  echo "$as_me:14483: \$? = $ac_status" >&5
14484  (exit $ac_status); }; }; then
14485  if test "$cross_compiling" = yes; then
14486  cf_test_ncuconfig=maybe
14487else
14488  cat >conftest.$ac_ext <<_ACEOF
14489#line 14489 "configure"
14490#include "confdefs.h"
14491#include <${cf_cv_ncurses_header:-curses.h}>
14492					int main(void)
14493					{ char *xx = curses_version(); return (xx == 0); }
14494_ACEOF
14495rm -f conftest$ac_exeext
14496if { (eval echo "$as_me:14496: \"$ac_link\"") >&5
14497  (eval $ac_link) 2>&5
14498  ac_status=$?
14499  echo "$as_me:14499: \$? = $ac_status" >&5
14500  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14501  { (eval echo "$as_me:14501: \"$ac_try\"") >&5
14502  (eval $ac_try) 2>&5
14503  ac_status=$?
14504  echo "$as_me:14504: \$? = $ac_status" >&5
14505  (exit $ac_status); }; }; then
14506  cf_test_ncuconfig=yes
14507else
14508  echo "$as_me: program exited with status $ac_status" >&5
14509echo "$as_me: failed program was:" >&5
14510cat conftest.$ac_ext >&5
14511cf_test_ncuconfig=no
14512fi
14513rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14514fi
14515else
14516  echo "$as_me: failed program was:" >&5
14517cat conftest.$ac_ext >&5
14518cf_test_ncuconfig=no
14519fi
14520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14521
14522			CFLAGS="$cf_save_CFLAGS"
14523			CPPFLAGS="$cf_save_CPPFLAGS"
14524			LIBS="$cf_save_LIBS"
14525
14526			if test "x$cf_test_ncuconfig" != xyes; then
14527				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
14528				cf_pkg_cflags="$cf_temp"
14529				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
14530				cf_pkg_libs="$cf_temp"
14531			fi
14532			;;
14533		esac
14534
14535cf_fix_cppflags=no
14536cf_new_cflags=
14537cf_new_cppflags=
14538cf_new_extra_cppflags=
14539
14540for cf_add_cflags in $cf_pkg_cflags
14541do
14542case $cf_fix_cppflags in
14543(no)
14544	case $cf_add_cflags in
14545	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14546		case $cf_add_cflags in
14547		(-D*)
14548			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14549
14550			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14551				&& test -z "${cf_tst_cflags}" \
14552				&& cf_fix_cppflags=yes
14553
14554			if test $cf_fix_cppflags = yes ; then
14555
14556	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14557	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14558
14559				continue
14560			elif test "${cf_tst_cflags}" = "\"'" ; then
14561
14562	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14563	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14564
14565				continue
14566			fi
14567			;;
14568		esac
14569		case "$CPPFLAGS" in
14570		(*$cf_add_cflags)
14571			;;
14572		(*)
14573			case $cf_add_cflags in
14574			(-D*)
14575				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14576
14577CPPFLAGS=`echo "$CPPFLAGS" | \
14578	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14579		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14580
14581				;;
14582			esac
14583
14584	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14585	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14586
14587			;;
14588		esac
14589		;;
14590	(*)
14591
14592	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14593	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14594
14595		;;
14596	esac
14597	;;
14598(yes)
14599
14600	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14601	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14602
14603	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14604
14605	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14606		&& test -z "${cf_tst_cflags}" \
14607		&& cf_fix_cppflags=no
14608	;;
14609esac
14610done
14611
14612if test -n "$cf_new_cflags" ; then
14613
14614	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14615	CFLAGS="${CFLAGS}$cf_new_cflags"
14616
14617fi
14618
14619if test -n "$cf_new_cppflags" ; then
14620
14621	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14622	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14623
14624fi
14625
14626if test -n "$cf_new_extra_cppflags" ; then
14627
14628	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14629	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14630
14631fi
14632
14633cf_add_libs="$LIBS"
14634# reverse order
14635cf_add_0lib=
14636for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14637# filter duplicates
14638for cf_add_1lib in $cf_add_0lib; do
14639	for cf_add_2lib in $cf_add_libs; do
14640		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14641			cf_add_1lib=
14642			break
14643		fi
14644	done
14645	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14646done
14647LIBS="$cf_add_libs"
14648
14649		cat >conftest.$ac_ext <<_ACEOF
14650#line 14650 "configure"
14651#include "confdefs.h"
14652#include <${cf_cv_ncurses_header:-curses.h}>
14653int
14654main (void)
14655{
14656initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
14657  ;
14658  return 0;
14659}
14660_ACEOF
14661rm -f conftest.$ac_objext conftest$ac_exeext
14662if { (eval echo "$as_me:14662: \"$ac_link\"") >&5
14663  (eval $ac_link) 2>&5
14664  ac_status=$?
14665  echo "$as_me:14665: \$? = $ac_status" >&5
14666  (exit $ac_status); } &&
14667         { ac_try='test -s conftest$ac_exeext'
14668  { (eval echo "$as_me:14668: \"$ac_try\"") >&5
14669  (eval $ac_try) 2>&5
14670  ac_status=$?
14671  echo "$as_me:14671: \$? = $ac_status" >&5
14672  (exit $ac_status); }; }; then
14673  if test "$cross_compiling" = yes; then
14674  cf_have_ncuconfig=maybe
14675else
14676  cat >conftest.$ac_ext <<_ACEOF
14677#line 14677 "configure"
14678#include "confdefs.h"
14679#include <${cf_cv_ncurses_header:-curses.h}>
14680				int main(void)
14681				{ char *xx = curses_version(); return (xx == 0); }
14682_ACEOF
14683rm -f conftest$ac_exeext
14684if { (eval echo "$as_me:14684: \"$ac_link\"") >&5
14685  (eval $ac_link) 2>&5
14686  ac_status=$?
14687  echo "$as_me:14687: \$? = $ac_status" >&5
14688  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14689  { (eval echo "$as_me:14689: \"$ac_try\"") >&5
14690  (eval $ac_try) 2>&5
14691  ac_status=$?
14692  echo "$as_me:14692: \$? = $ac_status" >&5
14693  (exit $ac_status); }; }; then
14694  cf_have_ncuconfig=yes
14695else
14696  echo "$as_me: program exited with status $ac_status" >&5
14697echo "$as_me: failed program was:" >&5
14698cat conftest.$ac_ext >&5
14699cf_have_ncuconfig=no
14700fi
14701rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14702fi
14703else
14704  echo "$as_me: failed program was:" >&5
14705cat conftest.$ac_ext >&5
14706cf_have_ncuconfig=no
14707fi
14708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14709		echo "$as_me:14709: result: $cf_have_ncuconfig" >&5
14710echo "${ECHO_T}$cf_have_ncuconfig" >&6
14711		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
14712		if test "$cf_have_ncuconfig" != "yes"
14713		then
14714			CPPFLAGS="$cf_save_CPPFLAGS"
14715			LIBS="$cf_save_LIBS"
14716			NCURSES_CONFIG_PKG=none
14717		else
14718
14719cat >>confdefs.h <<\EOF
14720#define NCURSES 1
14721EOF
14722
14723			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
14724
14725echo "$as_me:14725: checking for terminfo header" >&5
14726echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14727if test "${cf_cv_term_header+set}" = set; then
14728  echo $ECHO_N "(cached) $ECHO_C" >&6
14729else
14730
14731case ${cf_cv_ncurses_header} in
14732(*/ncurses.h|*/ncursesw.h)
14733	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14734	;;
14735(*)
14736	cf_term_header=term.h
14737	;;
14738esac
14739
14740for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14741do
14742cat >conftest.$ac_ext <<_ACEOF
14743#line 14743 "configure"
14744#include "confdefs.h"
14745#include <stdio.h>
14746#include <${cf_cv_ncurses_header:-curses.h}>
14747#include <$cf_test>
14748
14749int
14750main (void)
14751{
14752int x = auto_left_margin; (void)x
14753  ;
14754  return 0;
14755}
14756_ACEOF
14757rm -f conftest.$ac_objext
14758if { (eval echo "$as_me:14758: \"$ac_compile\"") >&5
14759  (eval $ac_compile) 2>&5
14760  ac_status=$?
14761  echo "$as_me:14761: \$? = $ac_status" >&5
14762  (exit $ac_status); } &&
14763         { ac_try='test -s conftest.$ac_objext'
14764  { (eval echo "$as_me:14764: \"$ac_try\"") >&5
14765  (eval $ac_try) 2>&5
14766  ac_status=$?
14767  echo "$as_me:14767: \$? = $ac_status" >&5
14768  (exit $ac_status); }; }; then
14769
14770	cf_cv_term_header="$cf_test"
14771else
14772  echo "$as_me: failed program was:" >&5
14773cat conftest.$ac_ext >&5
14774
14775	cf_cv_term_header=unknown
14776
14777fi
14778rm -f conftest.$ac_objext conftest.$ac_ext
14779	test "$cf_cv_term_header" != unknown && break
14780done
14781
14782fi
14783echo "$as_me:14783: result: $cf_cv_term_header" >&5
14784echo "${ECHO_T}$cf_cv_term_header" >&6
14785
14786# Set definitions to allow ifdef'ing to accommodate subdirectories
14787
14788case $cf_cv_term_header in
14789(*term.h)
14790
14791cat >>confdefs.h <<\EOF
14792#define HAVE_TERM_H 1
14793EOF
14794
14795	;;
14796esac
14797
14798case $cf_cv_term_header in
14799(ncurses/term.h)
14800
14801cat >>confdefs.h <<\EOF
14802#define HAVE_NCURSES_TERM_H 1
14803EOF
14804
14805	;;
14806(ncursesw/term.h)
14807
14808cat >>confdefs.h <<\EOF
14809#define HAVE_NCURSESW_TERM_H 1
14810EOF
14811
14812	;;
14813esac
14814
14815		fi
14816
14817	else
14818		echo "$as_me:14818: result: no" >&5
14819echo "${ECHO_T}no" >&6
14820		NCURSES_CONFIG_PKG=none
14821	fi
14822else
14823	NCURSES_CONFIG_PKG=none
14824fi
14825
14826if test "x$cf_have_ncuconfig" = "xno"; then
14827	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
14828
14829if test -n "$ac_tool_prefix"; then
14830  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14831  do
14832    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14833set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14834echo "$as_me:14834: checking for $ac_word" >&5
14835echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14836if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
14837  echo $ECHO_N "(cached) $ECHO_C" >&6
14838else
14839  if test -n "$NCURSES_CONFIG"; then
14840  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
14841else
14842  ac_save_IFS=$IFS; IFS=$ac_path_separator
14843ac_dummy="$PATH"
14844for ac_dir in $ac_dummy; do
14845  IFS=$ac_save_IFS
14846  test -z "$ac_dir" && ac_dir=.
14847  $as_executable_p "$ac_dir/$ac_word" || continue
14848ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14849echo "$as_me:14849: found $ac_dir/$ac_word" >&5
14850break
14851done
14852
14853fi
14854fi
14855NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
14856if test -n "$NCURSES_CONFIG"; then
14857  echo "$as_me:14857: result: $NCURSES_CONFIG" >&5
14858echo "${ECHO_T}$NCURSES_CONFIG" >&6
14859else
14860  echo "$as_me:14860: result: no" >&5
14861echo "${ECHO_T}no" >&6
14862fi
14863
14864    test -n "$NCURSES_CONFIG" && break
14865  done
14866fi
14867if test -z "$NCURSES_CONFIG"; then
14868  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
14869  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14870do
14871  # Extract the first word of "$ac_prog", so it can be a program name with args.
14872set dummy $ac_prog; ac_word=$2
14873echo "$as_me:14873: checking for $ac_word" >&5
14874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14875if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
14876  echo $ECHO_N "(cached) $ECHO_C" >&6
14877else
14878  if test -n "$ac_ct_NCURSES_CONFIG"; then
14879  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
14880else
14881  ac_save_IFS=$IFS; IFS=$ac_path_separator
14882ac_dummy="$PATH"
14883for ac_dir in $ac_dummy; do
14884  IFS=$ac_save_IFS
14885  test -z "$ac_dir" && ac_dir=.
14886  $as_executable_p "$ac_dir/$ac_word" || continue
14887ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
14888echo "$as_me:14888: found $ac_dir/$ac_word" >&5
14889break
14890done
14891
14892fi
14893fi
14894ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
14895if test -n "$ac_ct_NCURSES_CONFIG"; then
14896  echo "$as_me:14896: result: $ac_ct_NCURSES_CONFIG" >&5
14897echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
14898else
14899  echo "$as_me:14899: result: no" >&5
14900echo "${ECHO_T}no" >&6
14901fi
14902
14903  test -n "$ac_ct_NCURSES_CONFIG" && break
14904done
14905test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
14906
14907  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
14908fi
14909
14910	if test "$NCURSES_CONFIG" != none ; then
14911
14912cf_fix_cppflags=no
14913cf_new_cflags=
14914cf_new_cppflags=
14915cf_new_extra_cppflags=
14916
14917for cf_add_cflags in `$NCURSES_CONFIG --cflags`
14918do
14919case $cf_fix_cppflags in
14920(no)
14921	case $cf_add_cflags in
14922	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14923		case $cf_add_cflags in
14924		(-D*)
14925			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14926
14927			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14928				&& test -z "${cf_tst_cflags}" \
14929				&& cf_fix_cppflags=yes
14930
14931			if test $cf_fix_cppflags = yes ; then
14932
14933	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14934	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14935
14936				continue
14937			elif test "${cf_tst_cflags}" = "\"'" ; then
14938
14939	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14940	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14941
14942				continue
14943			fi
14944			;;
14945		esac
14946		case "$CPPFLAGS" in
14947		(*$cf_add_cflags)
14948			;;
14949		(*)
14950			case $cf_add_cflags in
14951			(-D*)
14952				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14953
14954CPPFLAGS=`echo "$CPPFLAGS" | \
14955	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14956		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14957
14958				;;
14959			esac
14960
14961	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14962	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14963
14964			;;
14965		esac
14966		;;
14967	(*)
14968
14969	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14970	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14971
14972		;;
14973	esac
14974	;;
14975(yes)
14976
14977	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14978	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14979
14980	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14981
14982	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14983		&& test -z "${cf_tst_cflags}" \
14984		&& cf_fix_cppflags=no
14985	;;
14986esac
14987done
14988
14989if test -n "$cf_new_cflags" ; then
14990
14991	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14992	CFLAGS="${CFLAGS}$cf_new_cflags"
14993
14994fi
14995
14996if test -n "$cf_new_cppflags" ; then
14997
14998	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14999	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15000
15001fi
15002
15003if test -n "$cf_new_extra_cppflags" ; then
15004
15005	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15006	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15007
15008fi
15009
15010cf_add_libs="$LIBS"
15011# reverse order
15012cf_add_0lib=
15013for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15014# filter duplicates
15015for cf_add_1lib in $cf_add_0lib; do
15016	for cf_add_2lib in $cf_add_libs; do
15017		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15018			cf_add_1lib=
15019			break
15020		fi
15021	done
15022	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15023done
15024LIBS="$cf_add_libs"
15025
15026		# even with config script, some packages use no-override for curses.h
15027
15028echo "$as_me:15028: checking if we have identified curses headers" >&5
15029echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
15030if test "${cf_cv_ncurses_header+set}" = set; then
15031  echo $ECHO_N "(cached) $ECHO_C" >&6
15032else
15033
15034cf_cv_ncurses_header=none
15035for cf_header in \
15036	ncurses.h $cf_cv_screen/ncurses.h \
15037	curses.h $cf_cv_screen/curses.h
15038do
15039cat >conftest.$ac_ext <<_ACEOF
15040#line 15040 "configure"
15041#include "confdefs.h"
15042#include <${cf_header}>
15043int
15044main (void)
15045{
15046initscr(); tgoto("?", 0,0)
15047  ;
15048  return 0;
15049}
15050_ACEOF
15051rm -f conftest.$ac_objext
15052if { (eval echo "$as_me:15052: \"$ac_compile\"") >&5
15053  (eval $ac_compile) 2>&5
15054  ac_status=$?
15055  echo "$as_me:15055: \$? = $ac_status" >&5
15056  (exit $ac_status); } &&
15057         { ac_try='test -s conftest.$ac_objext'
15058  { (eval echo "$as_me:15058: \"$ac_try\"") >&5
15059  (eval $ac_try) 2>&5
15060  ac_status=$?
15061  echo "$as_me:15061: \$? = $ac_status" >&5
15062  (exit $ac_status); }; }; then
15063  cf_cv_ncurses_header=$cf_header; break
15064else
15065  echo "$as_me: failed program was:" >&5
15066cat conftest.$ac_ext >&5
15067fi
15068rm -f conftest.$ac_objext conftest.$ac_ext
15069done
15070
15071fi
15072echo "$as_me:15072: result: $cf_cv_ncurses_header" >&5
15073echo "${ECHO_T}$cf_cv_ncurses_header" >&6
15074
15075if test "$cf_cv_ncurses_header" = none ; then
15076	{ { echo "$as_me:15076: error: No curses header-files found" >&5
15077echo "$as_me: error: No curses header-files found" >&2;}
15078   { (exit 1); exit 1; }; }
15079fi
15080
15081# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
15082
15083for ac_header in $cf_cv_ncurses_header
15084do
15085as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15086echo "$as_me:15086: checking for $ac_header" >&5
15087echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15088if eval "test \"\${$as_ac_Header+set}\" = set"; then
15089  echo $ECHO_N "(cached) $ECHO_C" >&6
15090else
15091  cat >conftest.$ac_ext <<_ACEOF
15092#line 15092 "configure"
15093#include "confdefs.h"
15094#include <$ac_header>
15095_ACEOF
15096if { (eval echo "$as_me:15096: \"$ac_cpp conftest.$ac_ext\"") >&5
15097  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15098  ac_status=$?
15099  egrep -v '^ *\+' conftest.er1 >conftest.err
15100  rm -f conftest.er1
15101  cat conftest.err >&5
15102  echo "$as_me:15102: \$? = $ac_status" >&5
15103  (exit $ac_status); } >/dev/null; then
15104  if test -s conftest.err; then
15105    ac_cpp_err=$ac_c_preproc_warn_flag
15106  else
15107    ac_cpp_err=
15108  fi
15109else
15110  ac_cpp_err=yes
15111fi
15112if test -z "$ac_cpp_err"; then
15113  eval "$as_ac_Header=yes"
15114else
15115  echo "$as_me: failed program was:" >&5
15116  cat conftest.$ac_ext >&5
15117  eval "$as_ac_Header=no"
15118fi
15119rm -f conftest.err conftest.$ac_ext
15120fi
15121echo "$as_me:15121: result: `eval echo '${'$as_ac_Header'}'`" >&5
15122echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15123if test `eval echo '${'$as_ac_Header'}'` = yes; then
15124  cat >>confdefs.h <<EOF
15125#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15126EOF
15127
15128fi
15129done
15130
15131cat >>confdefs.h <<\EOF
15132#define NCURSES 1
15133EOF
15134
15135cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15136
15137		cat >>confdefs.h <<EOF
15138#define $cf_nculib_ROOT 1
15139EOF
15140
15141				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
15142
15143	else
15144
15145cf_ncuhdr_root=$cf_cv_screen
15146
15147test -n "$cf_cv_curses_dir" && \
15148test "$cf_cv_curses_dir" != "no" && { \
15149
15150if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
15151  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
15152  do
15153	while test $cf_add_incdir != /usr/include
15154	do
15155	  if test -d $cf_add_incdir
15156	  then
15157		cf_have_incdir=no
15158		if test -n "$CFLAGS$CPPFLAGS" ; then
15159		  # a loop is needed to ensure we can add subdirs of existing dirs
15160		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15161			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15162			  cf_have_incdir=yes; break
15163			fi
15164		  done
15165		fi
15166
15167		if test "$cf_have_incdir" = no ; then
15168		  if test "$cf_add_incdir" = /usr/local/include ; then
15169			if test "$GCC" = yes
15170			then
15171			  cf_save_CPPFLAGS=$CPPFLAGS
15172
15173	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15174	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15175
15176			  cat >conftest.$ac_ext <<_ACEOF
15177#line 15177 "configure"
15178#include "confdefs.h"
15179#include <stdio.h>
15180int
15181main (void)
15182{
15183printf("Hello")
15184  ;
15185  return 0;
15186}
15187_ACEOF
15188rm -f conftest.$ac_objext
15189if { (eval echo "$as_me:15189: \"$ac_compile\"") >&5
15190  (eval $ac_compile) 2>&5
15191  ac_status=$?
15192  echo "$as_me:15192: \$? = $ac_status" >&5
15193  (exit $ac_status); } &&
15194         { ac_try='test -s conftest.$ac_objext'
15195  { (eval echo "$as_me:15195: \"$ac_try\"") >&5
15196  (eval $ac_try) 2>&5
15197  ac_status=$?
15198  echo "$as_me:15198: \$? = $ac_status" >&5
15199  (exit $ac_status); }; }; then
15200  :
15201else
15202  echo "$as_me: failed program was:" >&5
15203cat conftest.$ac_ext >&5
15204cf_have_incdir=yes
15205fi
15206rm -f conftest.$ac_objext conftest.$ac_ext
15207			  CPPFLAGS=$cf_save_CPPFLAGS
15208			fi
15209		  fi
15210		fi
15211
15212		if test "$cf_have_incdir" = no ; then
15213		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15214
15215echo "${as_me:-configure}:15215: testing adding $cf_add_incdir to include-path ..." 1>&5
15216
15217		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15218
15219		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15220		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15221		  cf_add_incdir="$cf_top_incdir"
15222		else
15223		  break
15224		fi
15225	  else
15226		break
15227	  fi
15228	done
15229  done
15230fi
15231
15232}
15233
15234echo "$as_me:15234: checking for $cf_ncuhdr_root header in include-path" >&5
15235echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
15236if test "${cf_cv_ncurses_h+set}" = set; then
15237  echo $ECHO_N "(cached) $ECHO_C" >&6
15238else
15239
15240	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
15241	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
15242	for cf_header in $cf_header_list
15243	do
15244
15245	cat >conftest.$ac_ext <<_ACEOF
15246#line 15246 "configure"
15247#include "confdefs.h"
15248
15249#include <$cf_header>
15250int
15251main (void)
15252{
15253
15254#ifdef NCURSES_VERSION
15255
15256printf("%s\n", NCURSES_VERSION);
15257#else
15258#ifdef __NCURSES_H
15259printf("old\n");
15260#else
15261	make an error
15262#endif
15263#endif
15264
15265  ;
15266  return 0;
15267}
15268_ACEOF
15269rm -f conftest.$ac_objext
15270if { (eval echo "$as_me:15270: \"$ac_compile\"") >&5
15271  (eval $ac_compile) 2>&5
15272  ac_status=$?
15273  echo "$as_me:15273: \$? = $ac_status" >&5
15274  (exit $ac_status); } &&
15275         { ac_try='test -s conftest.$ac_objext'
15276  { (eval echo "$as_me:15276: \"$ac_try\"") >&5
15277  (eval $ac_try) 2>&5
15278  ac_status=$?
15279  echo "$as_me:15279: \$? = $ac_status" >&5
15280  (exit $ac_status); }; }; then
15281  cf_cv_ncurses_h=$cf_header
15282
15283else
15284  echo "$as_me: failed program was:" >&5
15285cat conftest.$ac_ext >&5
15286cf_cv_ncurses_h=no
15287fi
15288rm -f conftest.$ac_objext conftest.$ac_ext
15289
15290		test "$cf_cv_ncurses_h" != no && break
15291	done
15292
15293fi
15294echo "$as_me:15294: result: $cf_cv_ncurses_h" >&5
15295echo "${ECHO_T}$cf_cv_ncurses_h" >&6
15296
15297if test "$cf_cv_ncurses_h" != no ; then
15298	cf_cv_ncurses_header=$cf_cv_ncurses_h
15299else
15300
15301echo "$as_me:15301: checking for $cf_ncuhdr_root include-path" >&5
15302echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
15303if test "${cf_cv_ncurses_h2+set}" = set; then
15304  echo $ECHO_N "(cached) $ECHO_C" >&6
15305else
15306
15307	test -n "$verbose" && echo
15308
15309cf_search=
15310
15311# collect the current set of include-directories from compiler flags
15312cf_header_path_list=""
15313if test -n "${CFLAGS}${CPPFLAGS}" ; then
15314	for cf_header_path in $CPPFLAGS $CFLAGS
15315	do
15316		case $cf_header_path in
15317		(-I*)
15318			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
15319
15320test "x$cf_header_path" != "xNONE" && \
15321test -d "$cf_header_path" && \
15322 {
15323	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
15324	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
15325	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
15326	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
15327	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
15328	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15329}
15330
15331			cf_header_path_list="$cf_header_path_list $cf_search"
15332			;;
15333		esac
15334	done
15335fi
15336
15337# add the variations for the package we are looking for
15338
15339cf_search=
15340
15341test "x$prefix" != "xNONE" && \
15342test -d "$prefix" && \
15343 {
15344	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
15345	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
15346	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
15347	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
15348	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
15349	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15350}
15351
15352for cf_subdir_prefix in \
15353	/usr \
15354	/usr/local \
15355	/usr/pkg \
15356	/opt \
15357	/opt/local \
15358	$HOME
15359do
15360
15361test "x$cf_subdir_prefix" != "x$prefix" && \
15362test -d "$cf_subdir_prefix" && \
15363(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
15364	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
15365	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
15366	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
15367	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
15368	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
15369	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15370}
15371
15372done
15373
15374test "$includedir" != NONE && \
15375test "$includedir" != "/usr/include" && \
15376test -d "$includedir" && {
15377	test -d $includedir &&    cf_search="$cf_search $includedir"
15378	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
15379}
15380
15381test "$oldincludedir" != NONE && \
15382test "$oldincludedir" != "/usr/include" && \
15383test -d "$oldincludedir" && {
15384	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
15385	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
15386}
15387
15388cf_search="$cf_search $cf_header_path_list"
15389
15390	test -n "$verbose" && echo search path $cf_search
15391	cf_save2_CPPFLAGS="$CPPFLAGS"
15392	for cf_incdir in $cf_search
15393	do
15394
15395if test -n "$cf_incdir" ; then
15396  for cf_add_incdir in $cf_incdir
15397  do
15398	while test $cf_add_incdir != /usr/include
15399	do
15400	  if test -d $cf_add_incdir
15401	  then
15402		cf_have_incdir=no
15403		if test -n "$CFLAGS$CPPFLAGS" ; then
15404		  # a loop is needed to ensure we can add subdirs of existing dirs
15405		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15406			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15407			  cf_have_incdir=yes; break
15408			fi
15409		  done
15410		fi
15411
15412		if test "$cf_have_incdir" = no ; then
15413		  if test "$cf_add_incdir" = /usr/local/include ; then
15414			if test "$GCC" = yes
15415			then
15416			  cf_save_CPPFLAGS=$CPPFLAGS
15417
15418	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15419	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15420
15421			  cat >conftest.$ac_ext <<_ACEOF
15422#line 15422 "configure"
15423#include "confdefs.h"
15424#include <stdio.h>
15425int
15426main (void)
15427{
15428printf("Hello")
15429  ;
15430  return 0;
15431}
15432_ACEOF
15433rm -f conftest.$ac_objext
15434if { (eval echo "$as_me:15434: \"$ac_compile\"") >&5
15435  (eval $ac_compile) 2>&5
15436  ac_status=$?
15437  echo "$as_me:15437: \$? = $ac_status" >&5
15438  (exit $ac_status); } &&
15439         { ac_try='test -s conftest.$ac_objext'
15440  { (eval echo "$as_me:15440: \"$ac_try\"") >&5
15441  (eval $ac_try) 2>&5
15442  ac_status=$?
15443  echo "$as_me:15443: \$? = $ac_status" >&5
15444  (exit $ac_status); }; }; then
15445  :
15446else
15447  echo "$as_me: failed program was:" >&5
15448cat conftest.$ac_ext >&5
15449cf_have_incdir=yes
15450fi
15451rm -f conftest.$ac_objext conftest.$ac_ext
15452			  CPPFLAGS=$cf_save_CPPFLAGS
15453			fi
15454		  fi
15455		fi
15456
15457		if test "$cf_have_incdir" = no ; then
15458		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15459
15460echo "${as_me:-configure}:15460: testing adding $cf_add_incdir to include-path ..." 1>&5
15461
15462		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15463
15464		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15465		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15466		  cf_add_incdir="$cf_top_incdir"
15467		else
15468		  break
15469		fi
15470	  else
15471		break
15472	  fi
15473	done
15474  done
15475fi
15476
15477		for cf_header in \
15478			ncurses.h \
15479			curses.h
15480		do
15481
15482	cat >conftest.$ac_ext <<_ACEOF
15483#line 15483 "configure"
15484#include "confdefs.h"
15485
15486#include <$cf_header>
15487int
15488main (void)
15489{
15490
15491#ifdef NCURSES_VERSION
15492
15493printf("%s\n", NCURSES_VERSION);
15494#else
15495#ifdef __NCURSES_H
15496printf("old\n");
15497#else
15498	make an error
15499#endif
15500#endif
15501
15502  ;
15503  return 0;
15504}
15505_ACEOF
15506rm -f conftest.$ac_objext
15507if { (eval echo "$as_me:15507: \"$ac_compile\"") >&5
15508  (eval $ac_compile) 2>&5
15509  ac_status=$?
15510  echo "$as_me:15510: \$? = $ac_status" >&5
15511  (exit $ac_status); } &&
15512         { ac_try='test -s conftest.$ac_objext'
15513  { (eval echo "$as_me:15513: \"$ac_try\"") >&5
15514  (eval $ac_try) 2>&5
15515  ac_status=$?
15516  echo "$as_me:15516: \$? = $ac_status" >&5
15517  (exit $ac_status); }; }; then
15518  cf_cv_ncurses_h2=$cf_header
15519
15520else
15521  echo "$as_me: failed program was:" >&5
15522cat conftest.$ac_ext >&5
15523cf_cv_ncurses_h2=no
15524fi
15525rm -f conftest.$ac_objext conftest.$ac_ext
15526
15527			if test "$cf_cv_ncurses_h2" != no ; then
15528				cf_cv_ncurses_h2=$cf_incdir/$cf_header
15529				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
15530				break
15531			fi
15532			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
15533		done
15534		CPPFLAGS="$cf_save2_CPPFLAGS"
15535		test "$cf_cv_ncurses_h2" != no && break
15536	done
15537	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:15537: error: not found" >&5
15538echo "$as_me: error: not found" >&2;}
15539   { (exit 1); exit 1; }; }
15540
15541fi
15542echo "$as_me:15542: result: $cf_cv_ncurses_h2" >&5
15543echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
15544
15545	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
15546	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
15547	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
15548		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
15549	fi
15550
15551if test -n "$cf_1st_incdir" ; then
15552  for cf_add_incdir in $cf_1st_incdir
15553  do
15554	while test $cf_add_incdir != /usr/include
15555	do
15556	  if test -d $cf_add_incdir
15557	  then
15558		cf_have_incdir=no
15559		if test -n "$CFLAGS$CPPFLAGS" ; then
15560		  # a loop is needed to ensure we can add subdirs of existing dirs
15561		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15562			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15563			  cf_have_incdir=yes; break
15564			fi
15565		  done
15566		fi
15567
15568		if test "$cf_have_incdir" = no ; then
15569		  if test "$cf_add_incdir" = /usr/local/include ; then
15570			if test "$GCC" = yes
15571			then
15572			  cf_save_CPPFLAGS=$CPPFLAGS
15573
15574	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15575	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15576
15577			  cat >conftest.$ac_ext <<_ACEOF
15578#line 15578 "configure"
15579#include "confdefs.h"
15580#include <stdio.h>
15581int
15582main (void)
15583{
15584printf("Hello")
15585  ;
15586  return 0;
15587}
15588_ACEOF
15589rm -f conftest.$ac_objext
15590if { (eval echo "$as_me:15590: \"$ac_compile\"") >&5
15591  (eval $ac_compile) 2>&5
15592  ac_status=$?
15593  echo "$as_me:15593: \$? = $ac_status" >&5
15594  (exit $ac_status); } &&
15595         { ac_try='test -s conftest.$ac_objext'
15596  { (eval echo "$as_me:15596: \"$ac_try\"") >&5
15597  (eval $ac_try) 2>&5
15598  ac_status=$?
15599  echo "$as_me:15599: \$? = $ac_status" >&5
15600  (exit $ac_status); }; }; then
15601  :
15602else
15603  echo "$as_me: failed program was:" >&5
15604cat conftest.$ac_ext >&5
15605cf_have_incdir=yes
15606fi
15607rm -f conftest.$ac_objext conftest.$ac_ext
15608			  CPPFLAGS=$cf_save_CPPFLAGS
15609			fi
15610		  fi
15611		fi
15612
15613		if test "$cf_have_incdir" = no ; then
15614		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15615
15616echo "${as_me:-configure}:15616: testing adding $cf_add_incdir to include-path ..." 1>&5
15617
15618		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15619
15620		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15621		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15622		  cf_add_incdir="$cf_top_incdir"
15623		else
15624		  break
15625		fi
15626	  else
15627		break
15628	  fi
15629	done
15630  done
15631fi
15632
15633fi
15634
15635# Set definitions to allow ifdef'ing for ncurses.h
15636
15637case $cf_cv_ncurses_header in
15638(*ncurses.h)
15639
15640cat >>confdefs.h <<\EOF
15641#define HAVE_NCURSES_H 1
15642EOF
15643
15644	;;
15645esac
15646
15647case $cf_cv_ncurses_header in
15648(ncurses/curses.h|ncurses/ncurses.h)
15649
15650cat >>confdefs.h <<\EOF
15651#define HAVE_NCURSES_NCURSES_H 1
15652EOF
15653
15654	;;
15655(ncursesw/curses.h|ncursesw/ncurses.h)
15656
15657cat >>confdefs.h <<\EOF
15658#define HAVE_NCURSESW_NCURSES_H 1
15659EOF
15660
15661	;;
15662esac
15663
15664echo "$as_me:15664: checking for terminfo header" >&5
15665echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
15666if test "${cf_cv_term_header+set}" = set; then
15667  echo $ECHO_N "(cached) $ECHO_C" >&6
15668else
15669
15670case ${cf_cv_ncurses_header} in
15671(*/ncurses.h|*/ncursesw.h)
15672	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
15673	;;
15674(*)
15675	cf_term_header=term.h
15676	;;
15677esac
15678
15679for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
15680do
15681cat >conftest.$ac_ext <<_ACEOF
15682#line 15682 "configure"
15683#include "confdefs.h"
15684#include <stdio.h>
15685#include <${cf_cv_ncurses_header:-curses.h}>
15686#include <$cf_test>
15687
15688int
15689main (void)
15690{
15691int x = auto_left_margin; (void)x
15692  ;
15693  return 0;
15694}
15695_ACEOF
15696rm -f conftest.$ac_objext
15697if { (eval echo "$as_me:15697: \"$ac_compile\"") >&5
15698  (eval $ac_compile) 2>&5
15699  ac_status=$?
15700  echo "$as_me:15700: \$? = $ac_status" >&5
15701  (exit $ac_status); } &&
15702         { ac_try='test -s conftest.$ac_objext'
15703  { (eval echo "$as_me:15703: \"$ac_try\"") >&5
15704  (eval $ac_try) 2>&5
15705  ac_status=$?
15706  echo "$as_me:15706: \$? = $ac_status" >&5
15707  (exit $ac_status); }; }; then
15708
15709	cf_cv_term_header="$cf_test"
15710else
15711  echo "$as_me: failed program was:" >&5
15712cat conftest.$ac_ext >&5
15713
15714	cf_cv_term_header=unknown
15715
15716fi
15717rm -f conftest.$ac_objext conftest.$ac_ext
15718	test "$cf_cv_term_header" != unknown && break
15719done
15720
15721fi
15722echo "$as_me:15722: result: $cf_cv_term_header" >&5
15723echo "${ECHO_T}$cf_cv_term_header" >&6
15724
15725# Set definitions to allow ifdef'ing to accommodate subdirectories
15726
15727case $cf_cv_term_header in
15728(*term.h)
15729
15730cat >>confdefs.h <<\EOF
15731#define HAVE_TERM_H 1
15732EOF
15733
15734	;;
15735esac
15736
15737case $cf_cv_term_header in
15738(ncurses/term.h)
15739
15740cat >>confdefs.h <<\EOF
15741#define HAVE_NCURSES_TERM_H 1
15742EOF
15743
15744	;;
15745(ncursesw/term.h)
15746
15747cat >>confdefs.h <<\EOF
15748#define HAVE_NCURSESW_TERM_H 1
15749EOF
15750
15751	;;
15752esac
15753
15754# some applications need this, but should check for NCURSES_VERSION
15755
15756cat >>confdefs.h <<\EOF
15757#define NCURSES 1
15758EOF
15759
15760echo "$as_me:15760: checking for ncurses version" >&5
15761echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
15762if test "${cf_cv_ncurses_version+set}" = set; then
15763  echo $ECHO_N "(cached) $ECHO_C" >&6
15764else
15765
15766	cf_cv_ncurses_version=no
15767	cf_tempfile=out$$
15768	rm -f $cf_tempfile
15769	if test "$cross_compiling" = yes; then
15770
15771	# This will not work if the preprocessor splits the line after the
15772	# Autoconf token.  The 'unproto' program does that.
15773	cat > conftest.$ac_ext <<EOF
15774#include <${cf_cv_ncurses_header:-curses.h}>
15775#undef Autoconf
15776#ifdef NCURSES_VERSION
15777Autoconf NCURSES_VERSION
15778#else
15779#ifdef __NCURSES_H
15780Autoconf "old"
15781#endif
15782;
15783#endif
15784EOF
15785	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
15786	{ (eval echo "$as_me:15786: \"$cf_try\"") >&5
15787  (eval $cf_try) 2>&5
15788  ac_status=$?
15789  echo "$as_me:15789: \$? = $ac_status" >&5
15790  (exit $ac_status); }
15791	if test -f conftest.out ; then
15792		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
15793		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
15794		rm -f conftest.out
15795	fi
15796
15797else
15798  cat >conftest.$ac_ext <<_ACEOF
15799#line 15799 "configure"
15800#include "confdefs.h"
15801
15802#include <${cf_cv_ncurses_header:-curses.h}>
15803#include <stdio.h>
15804int main(void)
15805{
15806	FILE *fp = fopen("$cf_tempfile", "w");
15807#ifdef NCURSES_VERSION
15808# ifdef NCURSES_VERSION_PATCH
15809	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
15810# else
15811	fprintf(fp, "%s\n", NCURSES_VERSION);
15812# endif
15813#else
15814# ifdef __NCURSES_H
15815	fprintf(fp, "old\n");
15816# else
15817	make an error
15818# endif
15819#endif
15820	${cf_cv_main_return:-return}(0);
15821}
15822_ACEOF
15823rm -f conftest$ac_exeext
15824if { (eval echo "$as_me:15824: \"$ac_link\"") >&5
15825  (eval $ac_link) 2>&5
15826  ac_status=$?
15827  echo "$as_me:15827: \$? = $ac_status" >&5
15828  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15829  { (eval echo "$as_me:15829: \"$ac_try\"") >&5
15830  (eval $ac_try) 2>&5
15831  ac_status=$?
15832  echo "$as_me:15832: \$? = $ac_status" >&5
15833  (exit $ac_status); }; }; then
15834
15835	cf_cv_ncurses_version=`cat $cf_tempfile`
15836else
15837  echo "$as_me: program exited with status $ac_status" >&5
15838echo "$as_me: failed program was:" >&5
15839cat conftest.$ac_ext >&5
15840fi
15841rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15842fi
15843	rm -f $cf_tempfile
15844
15845fi
15846echo "$as_me:15846: result: $cf_cv_ncurses_version" >&5
15847echo "${ECHO_T}$cf_cv_ncurses_version" >&6
15848test "$cf_cv_ncurses_version" = no ||
15849cat >>confdefs.h <<\EOF
15850#define NCURSES 1
15851EOF
15852
15853cf_nculib_root=$cf_cv_screen
15854	# This works, except for the special case where we find gpm, but
15855	# ncurses is in a nonstandard location via $LIBS, and we really want
15856	# to link gpm.
15857cf_ncurses_LIBS=""
15858cf_ncurses_SAVE="$LIBS"
15859echo "$as_me:15859: checking for Gpm_Open in -lgpm" >&5
15860echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
15861if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
15862  echo $ECHO_N "(cached) $ECHO_C" >&6
15863else
15864  ac_check_lib_save_LIBS=$LIBS
15865LIBS="-lgpm  $LIBS"
15866cat >conftest.$ac_ext <<_ACEOF
15867#line 15867 "configure"
15868#include "confdefs.h"
15869
15870/* Override any gcc2 internal prototype to avoid an error.  */
15871#ifdef __cplusplus
15872extern "C"
15873#endif
15874/* We use char because int might match the return type of a gcc2
15875   builtin and then its argument prototype would still apply.  */
15876char Gpm_Open ();
15877int
15878main (void)
15879{
15880Gpm_Open ();
15881  ;
15882  return 0;
15883}
15884_ACEOF
15885rm -f conftest.$ac_objext conftest$ac_exeext
15886if { (eval echo "$as_me:15886: \"$ac_link\"") >&5
15887  (eval $ac_link) 2>&5
15888  ac_status=$?
15889  echo "$as_me:15889: \$? = $ac_status" >&5
15890  (exit $ac_status); } &&
15891         { ac_try='test -s conftest$ac_exeext'
15892  { (eval echo "$as_me:15892: \"$ac_try\"") >&5
15893  (eval $ac_try) 2>&5
15894  ac_status=$?
15895  echo "$as_me:15895: \$? = $ac_status" >&5
15896  (exit $ac_status); }; }; then
15897  ac_cv_lib_gpm_Gpm_Open=yes
15898else
15899  echo "$as_me: failed program was:" >&5
15900cat conftest.$ac_ext >&5
15901ac_cv_lib_gpm_Gpm_Open=no
15902fi
15903rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15904LIBS=$ac_check_lib_save_LIBS
15905fi
15906echo "$as_me:15906: result: $ac_cv_lib_gpm_Gpm_Open" >&5
15907echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
15908if test $ac_cv_lib_gpm_Gpm_Open = yes; then
15909  echo "$as_me:15909: checking for initscr in -lgpm" >&5
15910echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
15911if test "${ac_cv_lib_gpm_initscr+set}" = set; then
15912  echo $ECHO_N "(cached) $ECHO_C" >&6
15913else
15914  ac_check_lib_save_LIBS=$LIBS
15915LIBS="-lgpm  $LIBS"
15916cat >conftest.$ac_ext <<_ACEOF
15917#line 15917 "configure"
15918#include "confdefs.h"
15919
15920/* Override any gcc2 internal prototype to avoid an error.  */
15921#ifdef __cplusplus
15922extern "C"
15923#endif
15924/* We use char because int might match the return type of a gcc2
15925   builtin and then its argument prototype would still apply.  */
15926char initscr ();
15927int
15928main (void)
15929{
15930initscr ();
15931  ;
15932  return 0;
15933}
15934_ACEOF
15935rm -f conftest.$ac_objext conftest$ac_exeext
15936if { (eval echo "$as_me:15936: \"$ac_link\"") >&5
15937  (eval $ac_link) 2>&5
15938  ac_status=$?
15939  echo "$as_me:15939: \$? = $ac_status" >&5
15940  (exit $ac_status); } &&
15941         { ac_try='test -s conftest$ac_exeext'
15942  { (eval echo "$as_me:15942: \"$ac_try\"") >&5
15943  (eval $ac_try) 2>&5
15944  ac_status=$?
15945  echo "$as_me:15945: \$? = $ac_status" >&5
15946  (exit $ac_status); }; }; then
15947  ac_cv_lib_gpm_initscr=yes
15948else
15949  echo "$as_me: failed program was:" >&5
15950cat conftest.$ac_ext >&5
15951ac_cv_lib_gpm_initscr=no
15952fi
15953rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15954LIBS=$ac_check_lib_save_LIBS
15955fi
15956echo "$as_me:15956: result: $ac_cv_lib_gpm_initscr" >&5
15957echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
15958if test $ac_cv_lib_gpm_initscr = yes; then
15959  LIBS="$cf_ncurses_SAVE"
15960else
15961  cf_ncurses_LIBS="-lgpm"
15962fi
15963
15964fi
15965
15966case $host_os in
15967(freebsd*)
15968	# This is only necessary if you are linking against an obsolete
15969	# version of ncurses (but it should do no harm, since it's static).
15970	if test "$cf_nculib_root" = ncurses ; then
15971		echo "$as_me:15971: checking for tgoto in -lmytinfo" >&5
15972echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
15973if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
15974  echo $ECHO_N "(cached) $ECHO_C" >&6
15975else
15976  ac_check_lib_save_LIBS=$LIBS
15977LIBS="-lmytinfo  $LIBS"
15978cat >conftest.$ac_ext <<_ACEOF
15979#line 15979 "configure"
15980#include "confdefs.h"
15981
15982/* Override any gcc2 internal prototype to avoid an error.  */
15983#ifdef __cplusplus
15984extern "C"
15985#endif
15986/* We use char because int might match the return type of a gcc2
15987   builtin and then its argument prototype would still apply.  */
15988char tgoto ();
15989int
15990main (void)
15991{
15992tgoto ();
15993  ;
15994  return 0;
15995}
15996_ACEOF
15997rm -f conftest.$ac_objext conftest$ac_exeext
15998if { (eval echo "$as_me:15998: \"$ac_link\"") >&5
15999  (eval $ac_link) 2>&5
16000  ac_status=$?
16001  echo "$as_me:16001: \$? = $ac_status" >&5
16002  (exit $ac_status); } &&
16003         { ac_try='test -s conftest$ac_exeext'
16004  { (eval echo "$as_me:16004: \"$ac_try\"") >&5
16005  (eval $ac_try) 2>&5
16006  ac_status=$?
16007  echo "$as_me:16007: \$? = $ac_status" >&5
16008  (exit $ac_status); }; }; then
16009  ac_cv_lib_mytinfo_tgoto=yes
16010else
16011  echo "$as_me: failed program was:" >&5
16012cat conftest.$ac_ext >&5
16013ac_cv_lib_mytinfo_tgoto=no
16014fi
16015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16016LIBS=$ac_check_lib_save_LIBS
16017fi
16018echo "$as_me:16018: result: $ac_cv_lib_mytinfo_tgoto" >&5
16019echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
16020if test $ac_cv_lib_mytinfo_tgoto = yes; then
16021  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
16022fi
16023
16024	fi
16025	;;
16026esac
16027
16028cf_add_libs="$LIBS"
16029# reverse order
16030cf_add_0lib=
16031for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16032# filter duplicates
16033for cf_add_1lib in $cf_add_0lib; do
16034	for cf_add_2lib in $cf_add_libs; do
16035		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16036			cf_add_1lib=
16037			break
16038		fi
16039	done
16040	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16041done
16042LIBS="$cf_add_libs"
16043
16044if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
16045then
16046
16047cf_add_libs="$LIBS"
16048# reverse order
16049cf_add_0lib=
16050for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16051# filter duplicates
16052for cf_add_1lib in $cf_add_0lib; do
16053	for cf_add_2lib in $cf_add_libs; do
16054		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16055			cf_add_1lib=
16056			break
16057		fi
16058	done
16059	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16060done
16061LIBS="$cf_add_libs"
16062
16063else
16064
16065	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
16066	cf_libdir=""
16067	echo "$as_me:16067: checking for initscr" >&5
16068echo $ECHO_N "checking for initscr... $ECHO_C" >&6
16069if test "${ac_cv_func_initscr+set}" = set; then
16070  echo $ECHO_N "(cached) $ECHO_C" >&6
16071else
16072  cat >conftest.$ac_ext <<_ACEOF
16073#line 16073 "configure"
16074#include "confdefs.h"
16075#define initscr autoconf_temporary
16076#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16077#undef initscr
16078
16079#ifdef __cplusplus
16080extern "C"
16081#endif
16082
16083/* We use char because int might match the return type of a gcc2
16084   builtin and then its argument prototype would still apply.  */
16085char initscr (void);
16086
16087int
16088main (void)
16089{
16090
16091/* The GNU C library defines stubs for functions which it implements
16092    to always fail with ENOSYS.  Some functions are actually named
16093    something starting with __ and the normal name is an alias.  */
16094#if defined (__stub_initscr) || defined (__stub___initscr)
16095#error found stub for initscr
16096#endif
16097
16098	return initscr ();
16099  ;
16100  return 0;
16101}
16102_ACEOF
16103rm -f conftest.$ac_objext conftest$ac_exeext
16104if { (eval echo "$as_me:16104: \"$ac_link\"") >&5
16105  (eval $ac_link) 2>&5
16106  ac_status=$?
16107  echo "$as_me:16107: \$? = $ac_status" >&5
16108  (exit $ac_status); } &&
16109         { ac_try='test -s conftest$ac_exeext'
16110  { (eval echo "$as_me:16110: \"$ac_try\"") >&5
16111  (eval $ac_try) 2>&5
16112  ac_status=$?
16113  echo "$as_me:16113: \$? = $ac_status" >&5
16114  (exit $ac_status); }; }; then
16115  ac_cv_func_initscr=yes
16116else
16117  echo "$as_me: failed program was:" >&5
16118cat conftest.$ac_ext >&5
16119ac_cv_func_initscr=no
16120fi
16121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16122fi
16123echo "$as_me:16123: result: $ac_cv_func_initscr" >&5
16124echo "${ECHO_T}$ac_cv_func_initscr" >&6
16125if test $ac_cv_func_initscr = yes; then
16126  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
16127else
16128
16129		cf_save_LIBS="$LIBS"
16130		echo "$as_me:16130: checking for initscr in -l$cf_nculib_root" >&5
16131echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
16132		LIBS="-l$cf_nculib_root $LIBS"
16133		cat >conftest.$ac_ext <<_ACEOF
16134#line 16134 "configure"
16135#include "confdefs.h"
16136#include <${cf_cv_ncurses_header:-curses.h}>
16137int
16138main (void)
16139{
16140initscr()
16141  ;
16142  return 0;
16143}
16144_ACEOF
16145rm -f conftest.$ac_objext conftest$ac_exeext
16146if { (eval echo "$as_me:16146: \"$ac_link\"") >&5
16147  (eval $ac_link) 2>&5
16148  ac_status=$?
16149  echo "$as_me:16149: \$? = $ac_status" >&5
16150  (exit $ac_status); } &&
16151         { ac_try='test -s conftest$ac_exeext'
16152  { (eval echo "$as_me:16152: \"$ac_try\"") >&5
16153  (eval $ac_try) 2>&5
16154  ac_status=$?
16155  echo "$as_me:16155: \$? = $ac_status" >&5
16156  (exit $ac_status); }; }; then
16157  echo "$as_me:16157: result: yes" >&5
16158echo "${ECHO_T}yes" >&6
16159			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
16160
16161else
16162  echo "$as_me: failed program was:" >&5
16163cat conftest.$ac_ext >&5
16164echo "$as_me:16164: result: no" >&5
16165echo "${ECHO_T}no" >&6
16166
16167cf_search=
16168cf_library_path_list=""
16169if test -n "${LDFLAGS}${LIBS}" ; then
16170	for cf_library_path in $LDFLAGS $LIBS
16171	do
16172		case $cf_library_path in
16173		(-L*)
16174			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
16175
16176test "x$cf_library_path" != "xNONE" && \
16177test -d "$cf_library_path" && \
16178 {
16179	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
16180	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
16181	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
16182	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
16183	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
16184	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
16185}
16186
16187			cf_library_path_list="$cf_library_path_list $cf_search"
16188			;;
16189		esac
16190	done
16191fi
16192
16193cf_search=
16194
16195test "x$prefix" != "xNONE" && \
16196test -d "$prefix" && \
16197 {
16198	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
16199	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
16200	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
16201	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
16202	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
16203	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
16204}
16205
16206for cf_subdir_prefix in \
16207	/usr \
16208	/usr/local \
16209	/usr/pkg \
16210	/opt \
16211	/opt/local \
16212	$HOME
16213do
16214
16215test "x$cf_subdir_prefix" != "x$prefix" && \
16216test -d "$cf_subdir_prefix" && \
16217(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
16218	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
16219	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
16220	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
16221	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
16222	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
16223	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
16224}
16225
16226done
16227
16228cf_search="$cf_library_path_list $cf_search"
16229
16230			for cf_libdir in $cf_search
16231			do
16232				echo "$as_me:16232: checking for -l$cf_nculib_root in $cf_libdir" >&5
16233echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
16234				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
16235				cat >conftest.$ac_ext <<_ACEOF
16236#line 16236 "configure"
16237#include "confdefs.h"
16238#include <${cf_cv_ncurses_header:-curses.h}>
16239int
16240main (void)
16241{
16242initscr()
16243  ;
16244  return 0;
16245}
16246_ACEOF
16247rm -f conftest.$ac_objext conftest$ac_exeext
16248if { (eval echo "$as_me:16248: \"$ac_link\"") >&5
16249  (eval $ac_link) 2>&5
16250  ac_status=$?
16251  echo "$as_me:16251: \$? = $ac_status" >&5
16252  (exit $ac_status); } &&
16253         { ac_try='test -s conftest$ac_exeext'
16254  { (eval echo "$as_me:16254: \"$ac_try\"") >&5
16255  (eval $ac_try) 2>&5
16256  ac_status=$?
16257  echo "$as_me:16257: \$? = $ac_status" >&5
16258  (exit $ac_status); }; }; then
16259  echo "$as_me:16259: result: yes" >&5
16260echo "${ECHO_T}yes" >&6
16261			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
16262					 break
16263else
16264  echo "$as_me: failed program was:" >&5
16265cat conftest.$ac_ext >&5
16266echo "$as_me:16266: result: no" >&5
16267echo "${ECHO_T}no" >&6
16268					 LIBS="$cf_save_LIBS"
16269fi
16270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16271			done
16272
16273fi
16274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16275
16276fi
16277
16278eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
16279
16280if test $cf_found_library = no ; then
16281	{ { echo "$as_me:16281: error: Cannot link $cf_nculib_root library" >&5
16282echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
16283   { (exit 1); exit 1; }; }
16284fi
16285
16286fi
16287
16288if test -n "$cf_ncurses_LIBS" ; then
16289	echo "$as_me:16289: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
16290echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
16291	cf_ncurses_SAVE="$LIBS"
16292	for p in $cf_ncurses_LIBS ; do
16293		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
16294		if test "$q" != "$LIBS" ; then
16295			LIBS="$q"
16296		fi
16297	done
16298	cat >conftest.$ac_ext <<_ACEOF
16299#line 16299 "configure"
16300#include "confdefs.h"
16301#include <${cf_cv_ncurses_header:-curses.h}>
16302int
16303main (void)
16304{
16305initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
16306  ;
16307  return 0;
16308}
16309_ACEOF
16310rm -f conftest.$ac_objext conftest$ac_exeext
16311if { (eval echo "$as_me:16311: \"$ac_link\"") >&5
16312  (eval $ac_link) 2>&5
16313  ac_status=$?
16314  echo "$as_me:16314: \$? = $ac_status" >&5
16315  (exit $ac_status); } &&
16316         { ac_try='test -s conftest$ac_exeext'
16317  { (eval echo "$as_me:16317: \"$ac_try\"") >&5
16318  (eval $ac_try) 2>&5
16319  ac_status=$?
16320  echo "$as_me:16320: \$? = $ac_status" >&5
16321  (exit $ac_status); }; }; then
16322  echo "$as_me:16322: result: yes" >&5
16323echo "${ECHO_T}yes" >&6
16324else
16325  echo "$as_me: failed program was:" >&5
16326cat conftest.$ac_ext >&5
16327echo "$as_me:16327: result: no" >&5
16328echo "${ECHO_T}no" >&6
16329		 LIBS="$cf_ncurses_SAVE"
16330fi
16331rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16332fi
16333
16334cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16335
16336cat >>confdefs.h <<EOF
16337#define $cf_nculib_ROOT 1
16338EOF
16339
16340	fi
16341else
16342	NCURSES_CONFIG=none
16343fi
16344
16345	;;
16346(pdcurses)
16347
16348cf_x_athena=${cf_x_athena:-Xaw}
16349
16350echo "$as_me:16350: checking if you want to link with Xaw 3d library" >&5
16351echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
16352withval=
16353
16354# Check whether --with-Xaw3d or --without-Xaw3d was given.
16355if test "${with_Xaw3d+set}" = set; then
16356  withval="$with_Xaw3d"
16357
16358fi;
16359if test "$withval" = yes ; then
16360	cf_x_athena=Xaw3d
16361	echo "$as_me:16361: result: yes" >&5
16362echo "${ECHO_T}yes" >&6
16363else
16364	echo "$as_me:16364: result: no" >&5
16365echo "${ECHO_T}no" >&6
16366fi
16367
16368echo "$as_me:16368: checking if you want to link with Xaw 3d xft library" >&5
16369echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
16370withval=
16371
16372# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
16373if test "${with_Xaw3dxft+set}" = set; then
16374  withval="$with_Xaw3dxft"
16375
16376fi;
16377if test "$withval" = yes ; then
16378	cf_x_athena=Xaw3dxft
16379	echo "$as_me:16379: result: yes" >&5
16380echo "${ECHO_T}yes" >&6
16381else
16382	echo "$as_me:16382: result: no" >&5
16383echo "${ECHO_T}no" >&6
16384fi
16385
16386echo "$as_me:16386: checking if you want to link with neXT Athena library" >&5
16387echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
16388withval=
16389
16390# Check whether --with-neXtaw or --without-neXtaw was given.
16391if test "${with_neXtaw+set}" = set; then
16392  withval="$with_neXtaw"
16393
16394fi;
16395if test "$withval" = yes ; then
16396	cf_x_athena=neXtaw
16397	echo "$as_me:16397: result: yes" >&5
16398echo "${ECHO_T}yes" >&6
16399else
16400	echo "$as_me:16400: result: no" >&5
16401echo "${ECHO_T}no" >&6
16402fi
16403
16404echo "$as_me:16404: checking if you want to link with Athena-Plus library" >&5
16405echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
16406withval=
16407
16408# Check whether --with-XawPlus or --without-XawPlus was given.
16409if test "${with_XawPlus+set}" = set; then
16410  withval="$with_XawPlus"
16411
16412fi;
16413if test "$withval" = yes ; then
16414	cf_x_athena=XawPlus
16415	echo "$as_me:16415: result: yes" >&5
16416echo "${ECHO_T}yes" >&6
16417else
16418	echo "$as_me:16418: result: no" >&5
16419echo "${ECHO_T}no" >&6
16420fi
16421
16422cf_x_athena_lib=""
16423
16424if test "$PKG_CONFIG" != none ; then
16425	cf_athena_list=
16426	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
16427	for cf_athena_pkg in \
16428		$cf_athena_list \
16429		${cf_x_athena} \
16430		${cf_x_athena}-devel \
16431		lib${cf_x_athena} \
16432		lib${cf_x_athena}-devel
16433	do
16434
16435if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
16436	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
16437
16438echo "${as_me:-configure}:16438: testing found package $cf_athena_pkg ..." 1>&5
16439
16440	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
16441	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
16442	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
16443
16444echo "${as_me:-configure}:16444: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
16445
16446	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
16447
16448echo "${as_me:-configure}:16448: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
16449
16450cf_fix_cppflags=no
16451cf_new_cflags=
16452cf_new_cppflags=
16453cf_new_extra_cppflags=
16454
16455for cf_add_cflags in $cf_pkgconfig_incs
16456do
16457case $cf_fix_cppflags in
16458(no)
16459	case $cf_add_cflags in
16460	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16461		case $cf_add_cflags in
16462		(-D*)
16463			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16464
16465			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16466				&& test -z "${cf_tst_cflags}" \
16467				&& cf_fix_cppflags=yes
16468
16469			if test $cf_fix_cppflags = yes ; then
16470
16471	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16472	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16473
16474				continue
16475			elif test "${cf_tst_cflags}" = "\"'" ; then
16476
16477	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16478	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16479
16480				continue
16481			fi
16482			;;
16483		esac
16484		case "$CPPFLAGS" in
16485		(*$cf_add_cflags)
16486			;;
16487		(*)
16488			case $cf_add_cflags in
16489			(-D*)
16490				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16491
16492CPPFLAGS=`echo "$CPPFLAGS" | \
16493	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16494		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16495
16496				;;
16497			esac
16498
16499	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16500	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16501
16502			;;
16503		esac
16504		;;
16505	(*)
16506
16507	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16508	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16509
16510		;;
16511	esac
16512	;;
16513(yes)
16514
16515	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16516	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16517
16518	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16519
16520	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16521		&& test -z "${cf_tst_cflags}" \
16522		&& cf_fix_cppflags=no
16523	;;
16524esac
16525done
16526
16527if test -n "$cf_new_cflags" ; then
16528
16529	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16530	CFLAGS="${CFLAGS}$cf_new_cflags"
16531
16532fi
16533
16534if test -n "$cf_new_cppflags" ; then
16535
16536	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16537	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16538
16539fi
16540
16541if test -n "$cf_new_extra_cppflags" ; then
16542
16543	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16544	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16545
16546fi
16547
16548cf_add_libs="$LIBS"
16549# reverse order
16550cf_add_0lib=
16551for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16552# filter duplicates
16553for cf_add_1lib in $cf_add_0lib; do
16554	for cf_add_2lib in $cf_add_libs; do
16555		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16556			cf_add_1lib=
16557			break
16558		fi
16559	done
16560	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16561done
16562LIBS="$cf_add_libs"
16563
16564			cf_x_athena_lib="$cf_pkgconfig_libs"
16565
16566cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16567
16568			cat >>confdefs.h <<EOF
16569#define $cf_x_athena_LIBS 1
16570EOF
16571
16572	for cf_trim_lib in Xmu Xt X11
16573	do
16574		case "$LIBS" in
16575		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
16576			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
16577			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
16578
16579echo "${as_me:-configure}:16579: testing ..trimmed $LIBS ..." 1>&5
16580
16581			;;
16582		esac
16583	done
16584
16585echo "$as_me:16585: checking for usable $cf_x_athena/Xmu package" >&5
16586echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
16587if test "${cf_cv_xaw_compat+set}" = set; then
16588  echo $ECHO_N "(cached) $ECHO_C" >&6
16589else
16590
16591cat >conftest.$ac_ext <<_ACEOF
16592#line 16592 "configure"
16593#include "confdefs.h"
16594
16595#include <X11/Xmu/CharSet.h>
16596
16597int
16598main (void)
16599{
16600
16601int check = XmuCompareISOLatin1("big", "small");
16602(void)check;
16603
16604  ;
16605  return 0;
16606}
16607_ACEOF
16608rm -f conftest.$ac_objext conftest$ac_exeext
16609if { (eval echo "$as_me:16609: \"$ac_link\"") >&5
16610  (eval $ac_link) 2>&5
16611  ac_status=$?
16612  echo "$as_me:16612: \$? = $ac_status" >&5
16613  (exit $ac_status); } &&
16614         { ac_try='test -s conftest$ac_exeext'
16615  { (eval echo "$as_me:16615: \"$ac_try\"") >&5
16616  (eval $ac_try) 2>&5
16617  ac_status=$?
16618  echo "$as_me:16618: \$? = $ac_status" >&5
16619  (exit $ac_status); }; }; then
16620  cf_cv_xaw_compat=yes
16621else
16622  echo "$as_me: failed program was:" >&5
16623cat conftest.$ac_ext >&5
16624cf_cv_xaw_compat=no
16625fi
16626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16627fi
16628echo "$as_me:16628: result: $cf_cv_xaw_compat" >&5
16629echo "${ECHO_T}$cf_cv_xaw_compat" >&6
16630
16631			if test "$cf_cv_xaw_compat" = no
16632			then
16633				# workaround for broken ".pc" files...
16634				case "$cf_x_athena_lib" in
16635				(*-lXmu*)
16636					;;
16637				(*)
16638					test -n "$verbose" && echo "	work around broken package" 1>&6
16639
16640echo "${as_me:-configure}:16640: testing work around broken package ..." 1>&5
16641
16642					cf_save_xmu="$LIBS"
16643					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
16644
16645if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
16646	test -n "$verbose" && echo "	found package xmu" 1>&6
16647
16648echo "${as_me:-configure}:16648: testing found package xmu ..." 1>&5
16649
16650	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
16651	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
16652	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
16653
16654echo "${as_me:-configure}:16654: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
16655
16656	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
16657
16658echo "${as_me:-configure}:16658: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
16659
16660cf_fix_cppflags=no
16661cf_new_cflags=
16662cf_new_cppflags=
16663cf_new_extra_cppflags=
16664
16665for cf_add_cflags in $cf_pkgconfig_incs
16666do
16667case $cf_fix_cppflags in
16668(no)
16669	case $cf_add_cflags in
16670	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16671		case $cf_add_cflags in
16672		(-D*)
16673			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16674
16675			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16676				&& test -z "${cf_tst_cflags}" \
16677				&& cf_fix_cppflags=yes
16678
16679			if test $cf_fix_cppflags = yes ; then
16680
16681	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16682	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16683
16684				continue
16685			elif test "${cf_tst_cflags}" = "\"'" ; then
16686
16687	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16688	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16689
16690				continue
16691			fi
16692			;;
16693		esac
16694		case "$CPPFLAGS" in
16695		(*$cf_add_cflags)
16696			;;
16697		(*)
16698			case $cf_add_cflags in
16699			(-D*)
16700				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16701
16702CPPFLAGS=`echo "$CPPFLAGS" | \
16703	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16704		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16705
16706				;;
16707			esac
16708
16709	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16710	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16711
16712			;;
16713		esac
16714		;;
16715	(*)
16716
16717	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16718	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16719
16720		;;
16721	esac
16722	;;
16723(yes)
16724
16725	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16726	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16727
16728	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16729
16730	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16731		&& test -z "${cf_tst_cflags}" \
16732		&& cf_fix_cppflags=no
16733	;;
16734esac
16735done
16736
16737if test -n "$cf_new_cflags" ; then
16738
16739	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16740	CFLAGS="${CFLAGS}$cf_new_cflags"
16741
16742fi
16743
16744if test -n "$cf_new_cppflags" ; then
16745
16746	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16747	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16748
16749fi
16750
16751if test -n "$cf_new_extra_cppflags" ; then
16752
16753	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16754	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16755
16756fi
16757
16758cf_add_libs="$LIBS"
16759# reverse order
16760cf_add_0lib=
16761for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16762# filter duplicates
16763for cf_add_1lib in $cf_add_0lib; do
16764	for cf_add_2lib in $cf_add_libs; do
16765		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16766			cf_add_1lib=
16767			break
16768		fi
16769	done
16770	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16771done
16772LIBS="$cf_add_libs"
16773
16774							LIBS="$cf_save_xmu"
16775
16776test -n "$verbose" && echo "	...before $LIBS" 1>&6
16777
16778echo "${as_me:-configure}:16778: testing ...before $LIBS ..." 1>&5
16779
16780LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
16781test -n "$verbose" && echo "	...after  $LIBS" 1>&6
16782
16783echo "${as_me:-configure}:16783: testing ...after  $LIBS ..." 1>&5
16784
16785else
16786	cf_pkgconfig_incs=
16787	cf_pkgconfig_libs=
16788
16789test -n "$verbose" && echo "	...before $LIBS" 1>&6
16790
16791echo "${as_me:-configure}:16791: testing ...before $LIBS ..." 1>&5
16792
16793LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
16794test -n "$verbose" && echo "	...after  $LIBS" 1>&6
16795
16796echo "${as_me:-configure}:16796: testing ...after  $LIBS ..." 1>&5
16797
16798fi
16799
16800	for cf_trim_lib in Xmu Xt X11
16801	do
16802		case "$LIBS" in
16803		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
16804			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
16805			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
16806
16807echo "${as_me:-configure}:16807: testing ..trimmed $LIBS ..." 1>&5
16808
16809			;;
16810		esac
16811	done
16812
16813					;;
16814				esac
16815			fi
16816
16817			break
16818else
16819	cf_pkgconfig_incs=
16820	cf_pkgconfig_libs=
16821	:
16822fi
16823
16824	done
16825fi
16826
16827if test -z "$cf_x_athena_lib" ; then
16828
16829if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
16830	test -n "$verbose" && echo "	found package Xext" 1>&6
16831
16832echo "${as_me:-configure}:16832: testing found package Xext ..." 1>&5
16833
16834	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
16835	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
16836	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
16837
16838echo "${as_me:-configure}:16838: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
16839
16840	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
16841
16842echo "${as_me:-configure}:16842: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
16843
16844cf_fix_cppflags=no
16845cf_new_cflags=
16846cf_new_cppflags=
16847cf_new_extra_cppflags=
16848
16849for cf_add_cflags in $cf_pkgconfig_incs
16850do
16851case $cf_fix_cppflags in
16852(no)
16853	case $cf_add_cflags in
16854	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16855		case $cf_add_cflags in
16856		(-D*)
16857			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16858
16859			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16860				&& test -z "${cf_tst_cflags}" \
16861				&& cf_fix_cppflags=yes
16862
16863			if test $cf_fix_cppflags = yes ; then
16864
16865	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16866	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16867
16868				continue
16869			elif test "${cf_tst_cflags}" = "\"'" ; then
16870
16871	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16872	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16873
16874				continue
16875			fi
16876			;;
16877		esac
16878		case "$CPPFLAGS" in
16879		(*$cf_add_cflags)
16880			;;
16881		(*)
16882			case $cf_add_cflags in
16883			(-D*)
16884				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16885
16886CPPFLAGS=`echo "$CPPFLAGS" | \
16887	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16888		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16889
16890				;;
16891			esac
16892
16893	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16894	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16895
16896			;;
16897		esac
16898		;;
16899	(*)
16900
16901	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16902	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16903
16904		;;
16905	esac
16906	;;
16907(yes)
16908
16909	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16910	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16911
16912	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16913
16914	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16915		&& test -z "${cf_tst_cflags}" \
16916		&& cf_fix_cppflags=no
16917	;;
16918esac
16919done
16920
16921if test -n "$cf_new_cflags" ; then
16922
16923	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16924	CFLAGS="${CFLAGS}$cf_new_cflags"
16925
16926fi
16927
16928if test -n "$cf_new_cppflags" ; then
16929
16930	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16931	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16932
16933fi
16934
16935if test -n "$cf_new_extra_cppflags" ; then
16936
16937	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16938	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16939
16940fi
16941
16942cf_add_libs="$LIBS"
16943# reverse order
16944cf_add_0lib=
16945for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16946# filter duplicates
16947for cf_add_1lib in $cf_add_0lib; do
16948	for cf_add_2lib in $cf_add_libs; do
16949		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16950			cf_add_1lib=
16951			break
16952		fi
16953	done
16954	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16955done
16956LIBS="$cf_add_libs"
16957
16958	:
16959else
16960	cf_pkgconfig_incs=
16961	cf_pkgconfig_libs=
16962
16963	echo "$as_me:16963: checking for XextCreateExtension in -lXext" >&5
16964echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
16965if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
16966  echo $ECHO_N "(cached) $ECHO_C" >&6
16967else
16968  ac_check_lib_save_LIBS=$LIBS
16969LIBS="-lXext  $LIBS"
16970cat >conftest.$ac_ext <<_ACEOF
16971#line 16971 "configure"
16972#include "confdefs.h"
16973
16974/* Override any gcc2 internal prototype to avoid an error.  */
16975#ifdef __cplusplus
16976extern "C"
16977#endif
16978/* We use char because int might match the return type of a gcc2
16979   builtin and then its argument prototype would still apply.  */
16980char XextCreateExtension ();
16981int
16982main (void)
16983{
16984XextCreateExtension ();
16985  ;
16986  return 0;
16987}
16988_ACEOF
16989rm -f conftest.$ac_objext conftest$ac_exeext
16990if { (eval echo "$as_me:16990: \"$ac_link\"") >&5
16991  (eval $ac_link) 2>&5
16992  ac_status=$?
16993  echo "$as_me:16993: \$? = $ac_status" >&5
16994  (exit $ac_status); } &&
16995         { ac_try='test -s conftest$ac_exeext'
16996  { (eval echo "$as_me:16996: \"$ac_try\"") >&5
16997  (eval $ac_try) 2>&5
16998  ac_status=$?
16999  echo "$as_me:16999: \$? = $ac_status" >&5
17000  (exit $ac_status); }; }; then
17001  ac_cv_lib_Xext_XextCreateExtension=yes
17002else
17003  echo "$as_me: failed program was:" >&5
17004cat conftest.$ac_ext >&5
17005ac_cv_lib_Xext_XextCreateExtension=no
17006fi
17007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17008LIBS=$ac_check_lib_save_LIBS
17009fi
17010echo "$as_me:17010: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
17011echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
17012if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
17013
17014cf_add_libs="$LIBS"
17015# reverse order
17016cf_add_0lib=
17017for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17018# filter duplicates
17019for cf_add_1lib in $cf_add_0lib; do
17020	for cf_add_2lib in $cf_add_libs; do
17021		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17022			cf_add_1lib=
17023			break
17024		fi
17025	done
17026	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17027done
17028LIBS="$cf_add_libs"
17029
17030fi
17031
17032fi
17033
17034# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
17035# in some cases has installed dummy files in the former, other cases replaced
17036# it with a link to the new location).  This complicates the configure script.
17037# Check for that pitfall, and recover using pkg-config
17038#
17039# If none of these are set, the configuration is almost certainly broken.
17040if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
17041then
17042
17043if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
17044	test -n "$verbose" && echo "	found package x11" 1>&6
17045
17046echo "${as_me:-configure}:17046: testing found package x11 ..." 1>&5
17047
17048	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
17049	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
17050	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
17051
17052echo "${as_me:-configure}:17052: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17053
17054	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
17055
17056echo "${as_me:-configure}:17056: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
17057
17058cf_fix_cppflags=no
17059cf_new_cflags=
17060cf_new_cppflags=
17061cf_new_extra_cppflags=
17062
17063for cf_add_cflags in $cf_pkgconfig_incs
17064do
17065case $cf_fix_cppflags in
17066(no)
17067	case $cf_add_cflags in
17068	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17069		case $cf_add_cflags in
17070		(-D*)
17071			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17072
17073			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17074				&& test -z "${cf_tst_cflags}" \
17075				&& cf_fix_cppflags=yes
17076
17077			if test $cf_fix_cppflags = yes ; then
17078
17079	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17080	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17081
17082				continue
17083			elif test "${cf_tst_cflags}" = "\"'" ; then
17084
17085	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17086	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17087
17088				continue
17089			fi
17090			;;
17091		esac
17092		case "$CPPFLAGS" in
17093		(*$cf_add_cflags)
17094			;;
17095		(*)
17096			case $cf_add_cflags in
17097			(-D*)
17098				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17099
17100CPPFLAGS=`echo "$CPPFLAGS" | \
17101	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17102		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17103
17104				;;
17105			esac
17106
17107	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17108	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17109
17110			;;
17111		esac
17112		;;
17113	(*)
17114
17115	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17116	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17117
17118		;;
17119	esac
17120	;;
17121(yes)
17122
17123	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17124	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17125
17126	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17127
17128	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17129		&& test -z "${cf_tst_cflags}" \
17130		&& cf_fix_cppflags=no
17131	;;
17132esac
17133done
17134
17135if test -n "$cf_new_cflags" ; then
17136
17137	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17138	CFLAGS="${CFLAGS}$cf_new_cflags"
17139
17140fi
17141
17142if test -n "$cf_new_cppflags" ; then
17143
17144	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17145	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17146
17147fi
17148
17149if test -n "$cf_new_extra_cppflags" ; then
17150
17151	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17152	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17153
17154fi
17155
17156cf_add_libs="$LIBS"
17157# reverse order
17158cf_add_0lib=
17159for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17160# filter duplicates
17161for cf_add_1lib in $cf_add_0lib; do
17162	for cf_add_2lib in $cf_add_libs; do
17163		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17164			cf_add_1lib=
17165			break
17166		fi
17167	done
17168	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17169done
17170LIBS="$cf_add_libs"
17171
17172	:
17173else
17174	cf_pkgconfig_incs=
17175	cf_pkgconfig_libs=
17176	{ echo "$as_me:17176: WARNING: unable to find X11 library" >&5
17177echo "$as_me: WARNING: unable to find X11 library" >&2;}
17178fi
17179
17180if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
17181	test -n "$verbose" && echo "	found package ice" 1>&6
17182
17183echo "${as_me:-configure}:17183: testing found package ice ..." 1>&5
17184
17185	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
17186	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
17187	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
17188
17189echo "${as_me:-configure}:17189: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17190
17191	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
17192
17193echo "${as_me:-configure}:17193: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
17194
17195cf_fix_cppflags=no
17196cf_new_cflags=
17197cf_new_cppflags=
17198cf_new_extra_cppflags=
17199
17200for cf_add_cflags in $cf_pkgconfig_incs
17201do
17202case $cf_fix_cppflags in
17203(no)
17204	case $cf_add_cflags in
17205	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17206		case $cf_add_cflags in
17207		(-D*)
17208			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17209
17210			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17211				&& test -z "${cf_tst_cflags}" \
17212				&& cf_fix_cppflags=yes
17213
17214			if test $cf_fix_cppflags = yes ; then
17215
17216	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17217	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17218
17219				continue
17220			elif test "${cf_tst_cflags}" = "\"'" ; then
17221
17222	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17223	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17224
17225				continue
17226			fi
17227			;;
17228		esac
17229		case "$CPPFLAGS" in
17230		(*$cf_add_cflags)
17231			;;
17232		(*)
17233			case $cf_add_cflags in
17234			(-D*)
17235				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17236
17237CPPFLAGS=`echo "$CPPFLAGS" | \
17238	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17239		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17240
17241				;;
17242			esac
17243
17244	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17245	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17246
17247			;;
17248		esac
17249		;;
17250	(*)
17251
17252	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17253	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17254
17255		;;
17256	esac
17257	;;
17258(yes)
17259
17260	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17261	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17262
17263	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17264
17265	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17266		&& test -z "${cf_tst_cflags}" \
17267		&& cf_fix_cppflags=no
17268	;;
17269esac
17270done
17271
17272if test -n "$cf_new_cflags" ; then
17273
17274	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17275	CFLAGS="${CFLAGS}$cf_new_cflags"
17276
17277fi
17278
17279if test -n "$cf_new_cppflags" ; then
17280
17281	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17282	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17283
17284fi
17285
17286if test -n "$cf_new_extra_cppflags" ; then
17287
17288	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17289	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17290
17291fi
17292
17293cf_add_libs="$LIBS"
17294# reverse order
17295cf_add_0lib=
17296for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17297# filter duplicates
17298for cf_add_1lib in $cf_add_0lib; do
17299	for cf_add_2lib in $cf_add_libs; do
17300		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17301			cf_add_1lib=
17302			break
17303		fi
17304	done
17305	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17306done
17307LIBS="$cf_add_libs"
17308
17309	:
17310else
17311	cf_pkgconfig_incs=
17312	cf_pkgconfig_libs=
17313	{ echo "$as_me:17313: WARNING: unable to find ICE library" >&5
17314echo "$as_me: WARNING: unable to find ICE library" >&2;}
17315fi
17316
17317if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
17318	test -n "$verbose" && echo "	found package sm" 1>&6
17319
17320echo "${as_me:-configure}:17320: testing found package sm ..." 1>&5
17321
17322	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
17323	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
17324	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
17325
17326echo "${as_me:-configure}:17326: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17327
17328	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
17329
17330echo "${as_me:-configure}:17330: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
17331
17332cf_fix_cppflags=no
17333cf_new_cflags=
17334cf_new_cppflags=
17335cf_new_extra_cppflags=
17336
17337for cf_add_cflags in $cf_pkgconfig_incs
17338do
17339case $cf_fix_cppflags in
17340(no)
17341	case $cf_add_cflags in
17342	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17343		case $cf_add_cflags in
17344		(-D*)
17345			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17346
17347			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17348				&& test -z "${cf_tst_cflags}" \
17349				&& cf_fix_cppflags=yes
17350
17351			if test $cf_fix_cppflags = yes ; then
17352
17353	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17354	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17355
17356				continue
17357			elif test "${cf_tst_cflags}" = "\"'" ; then
17358
17359	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17360	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17361
17362				continue
17363			fi
17364			;;
17365		esac
17366		case "$CPPFLAGS" in
17367		(*$cf_add_cflags)
17368			;;
17369		(*)
17370			case $cf_add_cflags in
17371			(-D*)
17372				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17373
17374CPPFLAGS=`echo "$CPPFLAGS" | \
17375	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17376		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17377
17378				;;
17379			esac
17380
17381	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17382	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17383
17384			;;
17385		esac
17386		;;
17387	(*)
17388
17389	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17390	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17391
17392		;;
17393	esac
17394	;;
17395(yes)
17396
17397	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17398	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17399
17400	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17401
17402	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17403		&& test -z "${cf_tst_cflags}" \
17404		&& cf_fix_cppflags=no
17405	;;
17406esac
17407done
17408
17409if test -n "$cf_new_cflags" ; then
17410
17411	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17412	CFLAGS="${CFLAGS}$cf_new_cflags"
17413
17414fi
17415
17416if test -n "$cf_new_cppflags" ; then
17417
17418	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17419	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17420
17421fi
17422
17423if test -n "$cf_new_extra_cppflags" ; then
17424
17425	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17426	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17427
17428fi
17429
17430cf_add_libs="$LIBS"
17431# reverse order
17432cf_add_0lib=
17433for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17434# filter duplicates
17435for cf_add_1lib in $cf_add_0lib; do
17436	for cf_add_2lib in $cf_add_libs; do
17437		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17438			cf_add_1lib=
17439			break
17440		fi
17441	done
17442	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17443done
17444LIBS="$cf_add_libs"
17445
17446	:
17447else
17448	cf_pkgconfig_incs=
17449	cf_pkgconfig_libs=
17450	{ echo "$as_me:17450: WARNING: unable to find SM library" >&5
17451echo "$as_me: WARNING: unable to find SM library" >&2;}
17452fi
17453
17454if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
17455	test -n "$verbose" && echo "	found package xt" 1>&6
17456
17457echo "${as_me:-configure}:17457: testing found package xt ..." 1>&5
17458
17459	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
17460	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
17461	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
17462
17463echo "${as_me:-configure}:17463: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17464
17465	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
17466
17467echo "${as_me:-configure}:17467: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
17468
17469cf_fix_cppflags=no
17470cf_new_cflags=
17471cf_new_cppflags=
17472cf_new_extra_cppflags=
17473
17474for cf_add_cflags in $cf_pkgconfig_incs
17475do
17476case $cf_fix_cppflags in
17477(no)
17478	case $cf_add_cflags in
17479	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17480		case $cf_add_cflags in
17481		(-D*)
17482			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17483
17484			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17485				&& test -z "${cf_tst_cflags}" \
17486				&& cf_fix_cppflags=yes
17487
17488			if test $cf_fix_cppflags = yes ; then
17489
17490	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17491	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17492
17493				continue
17494			elif test "${cf_tst_cflags}" = "\"'" ; then
17495
17496	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17497	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17498
17499				continue
17500			fi
17501			;;
17502		esac
17503		case "$CPPFLAGS" in
17504		(*$cf_add_cflags)
17505			;;
17506		(*)
17507			case $cf_add_cflags in
17508			(-D*)
17509				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17510
17511CPPFLAGS=`echo "$CPPFLAGS" | \
17512	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17513		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17514
17515				;;
17516			esac
17517
17518	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17519	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17520
17521			;;
17522		esac
17523		;;
17524	(*)
17525
17526	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17527	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17528
17529		;;
17530	esac
17531	;;
17532(yes)
17533
17534	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17535	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17536
17537	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17538
17539	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17540		&& test -z "${cf_tst_cflags}" \
17541		&& cf_fix_cppflags=no
17542	;;
17543esac
17544done
17545
17546if test -n "$cf_new_cflags" ; then
17547
17548	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17549	CFLAGS="${CFLAGS}$cf_new_cflags"
17550
17551fi
17552
17553if test -n "$cf_new_cppflags" ; then
17554
17555	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17556	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17557
17558fi
17559
17560if test -n "$cf_new_extra_cppflags" ; then
17561
17562	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17563	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17564
17565fi
17566
17567cf_add_libs="$LIBS"
17568# reverse order
17569cf_add_0lib=
17570for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17571# filter duplicates
17572for cf_add_1lib in $cf_add_0lib; do
17573	for cf_add_2lib in $cf_add_libs; do
17574		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17575			cf_add_1lib=
17576			break
17577		fi
17578	done
17579	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17580done
17581LIBS="$cf_add_libs"
17582
17583	:
17584else
17585	cf_pkgconfig_incs=
17586	cf_pkgconfig_libs=
17587	{ echo "$as_me:17587: WARNING: unable to find Xt library" >&5
17588echo "$as_me: WARNING: unable to find Xt library" >&2;}
17589fi
17590
17591else
17592	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
17593fi
17594
17595cf_have_X_LIBS=no
17596
17597if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
17598	test -n "$verbose" && echo "	found package xt" 1>&6
17599
17600echo "${as_me:-configure}:17600: testing found package xt ..." 1>&5
17601
17602	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
17603	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
17604	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
17605
17606echo "${as_me:-configure}:17606: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17607
17608	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
17609
17610echo "${as_me:-configure}:17610: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
17611
17612cf_fix_cppflags=no
17613cf_new_cflags=
17614cf_new_cppflags=
17615cf_new_extra_cppflags=
17616
17617for cf_add_cflags in $cf_pkgconfig_incs
17618do
17619case $cf_fix_cppflags in
17620(no)
17621	case $cf_add_cflags in
17622	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17623		case $cf_add_cflags in
17624		(-D*)
17625			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17626
17627			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17628				&& test -z "${cf_tst_cflags}" \
17629				&& cf_fix_cppflags=yes
17630
17631			if test $cf_fix_cppflags = yes ; then
17632
17633	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17634	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17635
17636				continue
17637			elif test "${cf_tst_cflags}" = "\"'" ; then
17638
17639	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17640	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17641
17642				continue
17643			fi
17644			;;
17645		esac
17646		case "$CPPFLAGS" in
17647		(*$cf_add_cflags)
17648			;;
17649		(*)
17650			case $cf_add_cflags in
17651			(-D*)
17652				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17653
17654CPPFLAGS=`echo "$CPPFLAGS" | \
17655	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17656		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17657
17658				;;
17659			esac
17660
17661	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17662	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17663
17664			;;
17665		esac
17666		;;
17667	(*)
17668
17669	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17670	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17671
17672		;;
17673	esac
17674	;;
17675(yes)
17676
17677	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17678	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17679
17680	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17681
17682	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17683		&& test -z "${cf_tst_cflags}" \
17684		&& cf_fix_cppflags=no
17685	;;
17686esac
17687done
17688
17689if test -n "$cf_new_cflags" ; then
17690
17691	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17692	CFLAGS="${CFLAGS}$cf_new_cflags"
17693
17694fi
17695
17696if test -n "$cf_new_cppflags" ; then
17697
17698	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17699	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17700
17701fi
17702
17703if test -n "$cf_new_extra_cppflags" ; then
17704
17705	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17706	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17707
17708fi
17709
17710cf_add_libs="$LIBS"
17711# reverse order
17712cf_add_0lib=
17713for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17714# filter duplicates
17715for cf_add_1lib in $cf_add_0lib; do
17716	for cf_add_2lib in $cf_add_libs; do
17717		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17718			cf_add_1lib=
17719			break
17720		fi
17721	done
17722	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17723done
17724LIBS="$cf_add_libs"
17725
17726	case "x$LIBS" in
17727	(*-lX11*)
17728		;;
17729	(*)
17730# we have an "xt" package, but it may omit Xt's dependency on X11
17731echo "$as_me:17731: checking for usable X dependency" >&5
17732echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
17733if test "${cf_cv_xt_x11_compat+set}" = set; then
17734  echo $ECHO_N "(cached) $ECHO_C" >&6
17735else
17736
17737cat >conftest.$ac_ext <<_ACEOF
17738#line 17738 "configure"
17739#include "confdefs.h"
17740
17741#include <X11/Xlib.h>
17742
17743int
17744main (void)
17745{
17746
17747	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
17748	int rc2 = XClearWindow((Display*) 0, (Window) 0);
17749	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
17750	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
17751
17752  ;
17753  return 0;
17754}
17755_ACEOF
17756rm -f conftest.$ac_objext conftest$ac_exeext
17757if { (eval echo "$as_me:17757: \"$ac_link\"") >&5
17758  (eval $ac_link) 2>&5
17759  ac_status=$?
17760  echo "$as_me:17760: \$? = $ac_status" >&5
17761  (exit $ac_status); } &&
17762         { ac_try='test -s conftest$ac_exeext'
17763  { (eval echo "$as_me:17763: \"$ac_try\"") >&5
17764  (eval $ac_try) 2>&5
17765  ac_status=$?
17766  echo "$as_me:17766: \$? = $ac_status" >&5
17767  (exit $ac_status); }; }; then
17768  cf_cv_xt_x11_compat=yes
17769else
17770  echo "$as_me: failed program was:" >&5
17771cat conftest.$ac_ext >&5
17772cf_cv_xt_x11_compat=no
17773fi
17774rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17775fi
17776echo "$as_me:17776: result: $cf_cv_xt_x11_compat" >&5
17777echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
17778		if test "$cf_cv_xt_x11_compat" = no
17779		then
17780			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
17781
17782echo "${as_me:-configure}:17782: testing work around broken X11 dependency ..." 1>&5
17783
17784			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
17785
17786if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
17787	test -n "$verbose" && echo "	found package x11" 1>&6
17788
17789echo "${as_me:-configure}:17789: testing found package x11 ..." 1>&5
17790
17791	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
17792	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
17793	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
17794
17795echo "${as_me:-configure}:17795: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17796
17797	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
17798
17799echo "${as_me:-configure}:17799: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
17800
17801cf_fix_cppflags=no
17802cf_new_cflags=
17803cf_new_cppflags=
17804cf_new_extra_cppflags=
17805
17806for cf_add_cflags in $cf_pkgconfig_incs
17807do
17808case $cf_fix_cppflags in
17809(no)
17810	case $cf_add_cflags in
17811	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17812		case $cf_add_cflags in
17813		(-D*)
17814			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17815
17816			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17817				&& test -z "${cf_tst_cflags}" \
17818				&& cf_fix_cppflags=yes
17819
17820			if test $cf_fix_cppflags = yes ; then
17821
17822	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17823	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17824
17825				continue
17826			elif test "${cf_tst_cflags}" = "\"'" ; then
17827
17828	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17829	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17830
17831				continue
17832			fi
17833			;;
17834		esac
17835		case "$CPPFLAGS" in
17836		(*$cf_add_cflags)
17837			;;
17838		(*)
17839			case $cf_add_cflags in
17840			(-D*)
17841				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17842
17843CPPFLAGS=`echo "$CPPFLAGS" | \
17844	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17845		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17846
17847				;;
17848			esac
17849
17850	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17851	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17852
17853			;;
17854		esac
17855		;;
17856	(*)
17857
17858	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17859	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17860
17861		;;
17862	esac
17863	;;
17864(yes)
17865
17866	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17867	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17868
17869	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17870
17871	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17872		&& test -z "${cf_tst_cflags}" \
17873		&& cf_fix_cppflags=no
17874	;;
17875esac
17876done
17877
17878if test -n "$cf_new_cflags" ; then
17879
17880	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17881	CFLAGS="${CFLAGS}$cf_new_cflags"
17882
17883fi
17884
17885if test -n "$cf_new_cppflags" ; then
17886
17887	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17888	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17889
17890fi
17891
17892if test -n "$cf_new_extra_cppflags" ; then
17893
17894	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17895	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17896
17897fi
17898
17899cf_add_libs="$LIBS"
17900# reverse order
17901cf_add_0lib=
17902for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17903# filter duplicates
17904for cf_add_1lib in $cf_add_0lib; do
17905	for cf_add_2lib in $cf_add_libs; do
17906		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17907			cf_add_1lib=
17908			break
17909		fi
17910	done
17911	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17912done
17913LIBS="$cf_add_libs"
17914
17915	:
17916else
17917	cf_pkgconfig_incs=
17918	cf_pkgconfig_libs=
17919
17920test -n "$verbose" && echo "	...before $LIBS" 1>&6
17921
17922echo "${as_me:-configure}:17922: testing ...before $LIBS ..." 1>&5
17923
17924LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
17925test -n "$verbose" && echo "	...after  $LIBS" 1>&6
17926
17927echo "${as_me:-configure}:17927: testing ...after  $LIBS ..." 1>&5
17928
17929fi
17930
17931		fi
17932		;;
17933	esac
17934
17935echo "$as_me:17935: checking for usable X Toolkit package" >&5
17936echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
17937if test "${cf_cv_xt_ice_compat+set}" = set; then
17938  echo $ECHO_N "(cached) $ECHO_C" >&6
17939else
17940
17941cat >conftest.$ac_ext <<_ACEOF
17942#line 17942 "configure"
17943#include "confdefs.h"
17944
17945#include <X11/Shell.h>
17946
17947int
17948main (void)
17949{
17950int num = IceConnectionNumber(0); (void) num
17951
17952  ;
17953  return 0;
17954}
17955_ACEOF
17956rm -f conftest.$ac_objext conftest$ac_exeext
17957if { (eval echo "$as_me:17957: \"$ac_link\"") >&5
17958  (eval $ac_link) 2>&5
17959  ac_status=$?
17960  echo "$as_me:17960: \$? = $ac_status" >&5
17961  (exit $ac_status); } &&
17962         { ac_try='test -s conftest$ac_exeext'
17963  { (eval echo "$as_me:17963: \"$ac_try\"") >&5
17964  (eval $ac_try) 2>&5
17965  ac_status=$?
17966  echo "$as_me:17966: \$? = $ac_status" >&5
17967  (exit $ac_status); }; }; then
17968  cf_cv_xt_ice_compat=yes
17969else
17970  echo "$as_me: failed program was:" >&5
17971cat conftest.$ac_ext >&5
17972cf_cv_xt_ice_compat=no
17973fi
17974rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17975fi
17976echo "$as_me:17976: result: $cf_cv_xt_ice_compat" >&5
17977echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
17978
17979	if test "$cf_cv_xt_ice_compat" = no
17980	then
17981		# workaround for broken ".pc" files used for X Toolkit.
17982		case "x$X_PRE_LIBS" in
17983		(*-lICE*)
17984			case "x$LIBS" in
17985			(*-lICE*)
17986				;;
17987			(*)
17988				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
17989
17990echo "${as_me:-configure}:17990: testing work around broken ICE dependency ..." 1>&5
17991
17992if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
17993	test -n "$verbose" && echo "	found package ice" 1>&6
17994
17995echo "${as_me:-configure}:17995: testing found package ice ..." 1>&5
17996
17997	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
17998	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
17999	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
18000
18001echo "${as_me:-configure}:18001: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18002
18003	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
18004
18005echo "${as_me:-configure}:18005: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
18006
18007cf_fix_cppflags=no
18008cf_new_cflags=
18009cf_new_cppflags=
18010cf_new_extra_cppflags=
18011
18012for cf_add_cflags in $cf_pkgconfig_incs
18013do
18014case $cf_fix_cppflags in
18015(no)
18016	case $cf_add_cflags in
18017	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18018		case $cf_add_cflags in
18019		(-D*)
18020			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18021
18022			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18023				&& test -z "${cf_tst_cflags}" \
18024				&& cf_fix_cppflags=yes
18025
18026			if test $cf_fix_cppflags = yes ; then
18027
18028	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18029	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18030
18031				continue
18032			elif test "${cf_tst_cflags}" = "\"'" ; then
18033
18034	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18035	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18036
18037				continue
18038			fi
18039			;;
18040		esac
18041		case "$CPPFLAGS" in
18042		(*$cf_add_cflags)
18043			;;
18044		(*)
18045			case $cf_add_cflags in
18046			(-D*)
18047				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18048
18049CPPFLAGS=`echo "$CPPFLAGS" | \
18050	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18051		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18052
18053				;;
18054			esac
18055
18056	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18057	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18058
18059			;;
18060		esac
18061		;;
18062	(*)
18063
18064	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18065	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18066
18067		;;
18068	esac
18069	;;
18070(yes)
18071
18072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18074
18075	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18076
18077	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18078		&& test -z "${cf_tst_cflags}" \
18079		&& cf_fix_cppflags=no
18080	;;
18081esac
18082done
18083
18084if test -n "$cf_new_cflags" ; then
18085
18086	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18087	CFLAGS="${CFLAGS}$cf_new_cflags"
18088
18089fi
18090
18091if test -n "$cf_new_cppflags" ; then
18092
18093	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18094	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18095
18096fi
18097
18098if test -n "$cf_new_extra_cppflags" ; then
18099
18100	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18101	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18102
18103fi
18104
18105cf_add_libs="$LIBS"
18106# reverse order
18107cf_add_0lib=
18108for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18109# filter duplicates
18110for cf_add_1lib in $cf_add_0lib; do
18111	for cf_add_2lib in $cf_add_libs; do
18112		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18113			cf_add_1lib=
18114			break
18115		fi
18116	done
18117	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18118done
18119LIBS="$cf_add_libs"
18120
18121if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
18122	test -n "$verbose" && echo "	found package sm" 1>&6
18123
18124echo "${as_me:-configure}:18124: testing found package sm ..." 1>&5
18125
18126	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
18127	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
18128	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
18129
18130echo "${as_me:-configure}:18130: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18131
18132	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
18133
18134echo "${as_me:-configure}:18134: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
18135
18136cf_fix_cppflags=no
18137cf_new_cflags=
18138cf_new_cppflags=
18139cf_new_extra_cppflags=
18140
18141for cf_add_cflags in $cf_pkgconfig_incs
18142do
18143case $cf_fix_cppflags in
18144(no)
18145	case $cf_add_cflags in
18146	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18147		case $cf_add_cflags in
18148		(-D*)
18149			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18150
18151			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18152				&& test -z "${cf_tst_cflags}" \
18153				&& cf_fix_cppflags=yes
18154
18155			if test $cf_fix_cppflags = yes ; then
18156
18157	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18158	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18159
18160				continue
18161			elif test "${cf_tst_cflags}" = "\"'" ; then
18162
18163	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18164	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18165
18166				continue
18167			fi
18168			;;
18169		esac
18170		case "$CPPFLAGS" in
18171		(*$cf_add_cflags)
18172			;;
18173		(*)
18174			case $cf_add_cflags in
18175			(-D*)
18176				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18177
18178CPPFLAGS=`echo "$CPPFLAGS" | \
18179	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18180		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18181
18182				;;
18183			esac
18184
18185	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18186	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18187
18188			;;
18189		esac
18190		;;
18191	(*)
18192
18193	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18194	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18195
18196		;;
18197	esac
18198	;;
18199(yes)
18200
18201	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18202	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18203
18204	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18205
18206	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18207		&& test -z "${cf_tst_cflags}" \
18208		&& cf_fix_cppflags=no
18209	;;
18210esac
18211done
18212
18213if test -n "$cf_new_cflags" ; then
18214
18215	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18216	CFLAGS="${CFLAGS}$cf_new_cflags"
18217
18218fi
18219
18220if test -n "$cf_new_cppflags" ; then
18221
18222	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18223	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18224
18225fi
18226
18227if test -n "$cf_new_extra_cppflags" ; then
18228
18229	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18230	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18231
18232fi
18233
18234cf_add_libs="$LIBS"
18235# reverse order
18236cf_add_0lib=
18237for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18238# filter duplicates
18239for cf_add_1lib in $cf_add_0lib; do
18240	for cf_add_2lib in $cf_add_libs; do
18241		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18242			cf_add_1lib=
18243			break
18244		fi
18245	done
18246	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18247done
18248LIBS="$cf_add_libs"
18249
18250	:
18251else
18252	cf_pkgconfig_incs=
18253	cf_pkgconfig_libs=
18254	:
18255fi
18256
18257else
18258	cf_pkgconfig_incs=
18259	cf_pkgconfig_libs=
18260
18261test -n "$verbose" && echo "	...before $LIBS" 1>&6
18262
18263echo "${as_me:-configure}:18263: testing ...before $LIBS ..." 1>&5
18264
18265LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
18266test -n "$verbose" && echo "	...after  $LIBS" 1>&6
18267
18268echo "${as_me:-configure}:18268: testing ...after  $LIBS ..." 1>&5
18269
18270fi
18271
18272				;;
18273			esac
18274			;;
18275		esac
18276	fi
18277
18278	cf_have_X_LIBS=yes
18279
18280else
18281	cf_pkgconfig_incs=
18282	cf_pkgconfig_libs=
18283
18284	LDFLAGS="$X_LIBS $LDFLAGS"
18285
18286test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
18287
18288echo "${as_me:-configure}:18288: testing checking additions to CFLAGS ..." 1>&5
18289
18290cf_check_cflags="$CFLAGS"
18291cf_check_cppflags="$CPPFLAGS"
18292
18293cf_fix_cppflags=no
18294cf_new_cflags=
18295cf_new_cppflags=
18296cf_new_extra_cppflags=
18297
18298for cf_add_cflags in $X_CFLAGS
18299do
18300case $cf_fix_cppflags in
18301(no)
18302	case $cf_add_cflags in
18303	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18304		case $cf_add_cflags in
18305		(-D*)
18306			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18307
18308			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18309				&& test -z "${cf_tst_cflags}" \
18310				&& cf_fix_cppflags=yes
18311
18312			if test $cf_fix_cppflags = yes ; then
18313
18314	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18315	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18316
18317				continue
18318			elif test "${cf_tst_cflags}" = "\"'" ; then
18319
18320	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18321	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18322
18323				continue
18324			fi
18325			;;
18326		esac
18327		case "$CPPFLAGS" in
18328		(*$cf_add_cflags)
18329			;;
18330		(*)
18331			case $cf_add_cflags in
18332			(-D*)
18333				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18334
18335CPPFLAGS=`echo "$CPPFLAGS" | \
18336	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18337		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18338
18339				;;
18340			esac
18341
18342	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18343	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18344
18345			;;
18346		esac
18347		;;
18348	(*)
18349
18350	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18351	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18352
18353		;;
18354	esac
18355	;;
18356(yes)
18357
18358	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18359	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18360
18361	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18362
18363	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18364		&& test -z "${cf_tst_cflags}" \
18365		&& cf_fix_cppflags=no
18366	;;
18367esac
18368done
18369
18370if test -n "$cf_new_cflags" ; then
18371	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
18372
18373echo "${as_me:-configure}:18373: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
18374
18375	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18376	CFLAGS="${CFLAGS}$cf_new_cflags"
18377
18378fi
18379
18380if test -n "$cf_new_cppflags" ; then
18381	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
18382
18383echo "${as_me:-configure}:18383: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
18384
18385	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18386	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18387
18388fi
18389
18390if test -n "$cf_new_extra_cppflags" ; then
18391	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
18392
18393echo "${as_me:-configure}:18393: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
18394
18395	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18396	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18397
18398fi
18399
18400if test "x$cf_check_cflags" != "x$CFLAGS" ; then
18401cat >conftest.$ac_ext <<_ACEOF
18402#line 18402 "configure"
18403#include "confdefs.h"
18404#include <stdio.h>
18405int
18406main (void)
18407{
18408printf("Hello world");
18409  ;
18410  return 0;
18411}
18412_ACEOF
18413rm -f conftest.$ac_objext conftest$ac_exeext
18414if { (eval echo "$as_me:18414: \"$ac_link\"") >&5
18415  (eval $ac_link) 2>&5
18416  ac_status=$?
18417  echo "$as_me:18417: \$? = $ac_status" >&5
18418  (exit $ac_status); } &&
18419         { ac_try='test -s conftest$ac_exeext'
18420  { (eval echo "$as_me:18420: \"$ac_try\"") >&5
18421  (eval $ac_try) 2>&5
18422  ac_status=$?
18423  echo "$as_me:18423: \$? = $ac_status" >&5
18424  (exit $ac_status); }; }; then
18425  :
18426else
18427  echo "$as_me: failed program was:" >&5
18428cat conftest.$ac_ext >&5
18429test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
18430
18431echo "${as_me:-configure}:18431: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
18432
18433	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
18434		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
18435
18436echo "${as_me:-configure}:18436: testing but keeping change to \$CPPFLAGS ..." 1>&5
18437
18438	 fi
18439	 CFLAGS="$cf_check_flags"
18440fi
18441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18442fi
18443
18444	echo "$as_me:18444: checking for XOpenDisplay" >&5
18445echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
18446if test "${ac_cv_func_XOpenDisplay+set}" = set; then
18447  echo $ECHO_N "(cached) $ECHO_C" >&6
18448else
18449  cat >conftest.$ac_ext <<_ACEOF
18450#line 18450 "configure"
18451#include "confdefs.h"
18452#define XOpenDisplay autoconf_temporary
18453#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18454#undef XOpenDisplay
18455
18456#ifdef __cplusplus
18457extern "C"
18458#endif
18459
18460/* We use char because int might match the return type of a gcc2
18461   builtin and then its argument prototype would still apply.  */
18462char XOpenDisplay (void);
18463
18464int
18465main (void)
18466{
18467
18468/* The GNU C library defines stubs for functions which it implements
18469    to always fail with ENOSYS.  Some functions are actually named
18470    something starting with __ and the normal name is an alias.  */
18471#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
18472#error found stub for XOpenDisplay
18473#endif
18474
18475	return XOpenDisplay ();
18476  ;
18477  return 0;
18478}
18479_ACEOF
18480rm -f conftest.$ac_objext conftest$ac_exeext
18481if { (eval echo "$as_me:18481: \"$ac_link\"") >&5
18482  (eval $ac_link) 2>&5
18483  ac_status=$?
18484  echo "$as_me:18484: \$? = $ac_status" >&5
18485  (exit $ac_status); } &&
18486         { ac_try='test -s conftest$ac_exeext'
18487  { (eval echo "$as_me:18487: \"$ac_try\"") >&5
18488  (eval $ac_try) 2>&5
18489  ac_status=$?
18490  echo "$as_me:18490: \$? = $ac_status" >&5
18491  (exit $ac_status); }; }; then
18492  ac_cv_func_XOpenDisplay=yes
18493else
18494  echo "$as_me: failed program was:" >&5
18495cat conftest.$ac_ext >&5
18496ac_cv_func_XOpenDisplay=no
18497fi
18498rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18499fi
18500echo "$as_me:18500: result: $ac_cv_func_XOpenDisplay" >&5
18501echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
18502if test $ac_cv_func_XOpenDisplay = yes; then
18503  :
18504else
18505
18506	echo "$as_me:18506: checking for XOpenDisplay in -lX11" >&5
18507echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
18508if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
18509  echo $ECHO_N "(cached) $ECHO_C" >&6
18510else
18511  ac_check_lib_save_LIBS=$LIBS
18512LIBS="-lX11  $LIBS"
18513cat >conftest.$ac_ext <<_ACEOF
18514#line 18514 "configure"
18515#include "confdefs.h"
18516
18517/* Override any gcc2 internal prototype to avoid an error.  */
18518#ifdef __cplusplus
18519extern "C"
18520#endif
18521/* We use char because int might match the return type of a gcc2
18522   builtin and then its argument prototype would still apply.  */
18523char XOpenDisplay ();
18524int
18525main (void)
18526{
18527XOpenDisplay ();
18528  ;
18529  return 0;
18530}
18531_ACEOF
18532rm -f conftest.$ac_objext conftest$ac_exeext
18533if { (eval echo "$as_me:18533: \"$ac_link\"") >&5
18534  (eval $ac_link) 2>&5
18535  ac_status=$?
18536  echo "$as_me:18536: \$? = $ac_status" >&5
18537  (exit $ac_status); } &&
18538         { ac_try='test -s conftest$ac_exeext'
18539  { (eval echo "$as_me:18539: \"$ac_try\"") >&5
18540  (eval $ac_try) 2>&5
18541  ac_status=$?
18542  echo "$as_me:18542: \$? = $ac_status" >&5
18543  (exit $ac_status); }; }; then
18544  ac_cv_lib_X11_XOpenDisplay=yes
18545else
18546  echo "$as_me: failed program was:" >&5
18547cat conftest.$ac_ext >&5
18548ac_cv_lib_X11_XOpenDisplay=no
18549fi
18550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18551LIBS=$ac_check_lib_save_LIBS
18552fi
18553echo "$as_me:18553: result: $ac_cv_lib_X11_XOpenDisplay" >&5
18554echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
18555if test $ac_cv_lib_X11_XOpenDisplay = yes; then
18556
18557cf_add_libs="$LIBS"
18558# reverse order
18559cf_add_0lib=
18560for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18561# filter duplicates
18562for cf_add_1lib in $cf_add_0lib; do
18563	for cf_add_2lib in $cf_add_libs; do
18564		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18565			cf_add_1lib=
18566			break
18567		fi
18568	done
18569	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18570done
18571LIBS="$cf_add_libs"
18572
18573fi
18574
18575fi
18576
18577	echo "$as_me:18577: checking for XtAppInitialize" >&5
18578echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
18579if test "${ac_cv_func_XtAppInitialize+set}" = set; then
18580  echo $ECHO_N "(cached) $ECHO_C" >&6
18581else
18582  cat >conftest.$ac_ext <<_ACEOF
18583#line 18583 "configure"
18584#include "confdefs.h"
18585#define XtAppInitialize autoconf_temporary
18586#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18587#undef XtAppInitialize
18588
18589#ifdef __cplusplus
18590extern "C"
18591#endif
18592
18593/* We use char because int might match the return type of a gcc2
18594   builtin and then its argument prototype would still apply.  */
18595char XtAppInitialize (void);
18596
18597int
18598main (void)
18599{
18600
18601/* The GNU C library defines stubs for functions which it implements
18602    to always fail with ENOSYS.  Some functions are actually named
18603    something starting with __ and the normal name is an alias.  */
18604#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
18605#error found stub for XtAppInitialize
18606#endif
18607
18608	return XtAppInitialize ();
18609  ;
18610  return 0;
18611}
18612_ACEOF
18613rm -f conftest.$ac_objext conftest$ac_exeext
18614if { (eval echo "$as_me:18614: \"$ac_link\"") >&5
18615  (eval $ac_link) 2>&5
18616  ac_status=$?
18617  echo "$as_me:18617: \$? = $ac_status" >&5
18618  (exit $ac_status); } &&
18619         { ac_try='test -s conftest$ac_exeext'
18620  { (eval echo "$as_me:18620: \"$ac_try\"") >&5
18621  (eval $ac_try) 2>&5
18622  ac_status=$?
18623  echo "$as_me:18623: \$? = $ac_status" >&5
18624  (exit $ac_status); }; }; then
18625  ac_cv_func_XtAppInitialize=yes
18626else
18627  echo "$as_me: failed program was:" >&5
18628cat conftest.$ac_ext >&5
18629ac_cv_func_XtAppInitialize=no
18630fi
18631rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18632fi
18633echo "$as_me:18633: result: $ac_cv_func_XtAppInitialize" >&5
18634echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
18635if test $ac_cv_func_XtAppInitialize = yes; then
18636  :
18637else
18638
18639	echo "$as_me:18639: checking for XtAppInitialize in -lXt" >&5
18640echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
18641if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
18642  echo $ECHO_N "(cached) $ECHO_C" >&6
18643else
18644  ac_check_lib_save_LIBS=$LIBS
18645LIBS="-lXt  $LIBS"
18646cat >conftest.$ac_ext <<_ACEOF
18647#line 18647 "configure"
18648#include "confdefs.h"
18649
18650/* Override any gcc2 internal prototype to avoid an error.  */
18651#ifdef __cplusplus
18652extern "C"
18653#endif
18654/* We use char because int might match the return type of a gcc2
18655   builtin and then its argument prototype would still apply.  */
18656char XtAppInitialize ();
18657int
18658main (void)
18659{
18660XtAppInitialize ();
18661  ;
18662  return 0;
18663}
18664_ACEOF
18665rm -f conftest.$ac_objext conftest$ac_exeext
18666if { (eval echo "$as_me:18666: \"$ac_link\"") >&5
18667  (eval $ac_link) 2>&5
18668  ac_status=$?
18669  echo "$as_me:18669: \$? = $ac_status" >&5
18670  (exit $ac_status); } &&
18671         { ac_try='test -s conftest$ac_exeext'
18672  { (eval echo "$as_me:18672: \"$ac_try\"") >&5
18673  (eval $ac_try) 2>&5
18674  ac_status=$?
18675  echo "$as_me:18675: \$? = $ac_status" >&5
18676  (exit $ac_status); }; }; then
18677  ac_cv_lib_Xt_XtAppInitialize=yes
18678else
18679  echo "$as_me: failed program was:" >&5
18680cat conftest.$ac_ext >&5
18681ac_cv_lib_Xt_XtAppInitialize=no
18682fi
18683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18684LIBS=$ac_check_lib_save_LIBS
18685fi
18686echo "$as_me:18686: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
18687echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
18688if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
18689
18690cat >>confdefs.h <<\EOF
18691#define HAVE_LIBXT 1
18692EOF
18693
18694		 cf_have_X_LIBS=Xt
18695		 LIBS="-lXt $LIBS"
18696fi
18697
18698fi
18699
18700fi
18701
18702if test $cf_have_X_LIBS = no ; then
18703	{ echo "$as_me:18703: WARNING: Unable to successfully link X Toolkit library (-lXt) with
18704test program.  You will have to check and add the proper libraries by hand
18705to makefile." >&5
18706echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
18707test program.  You will have to check and add the proper libraries by hand
18708to makefile." >&2;}
18709fi
18710
18711cf_x_athena_root=$cf_x_athena
18712cf_x_athena_inc=""
18713
18714for cf_path in default \
18715	/usr/contrib/X11R6 \
18716	/usr/contrib/X11R5 \
18717	/usr/lib/X11R5 \
18718	/usr/local
18719do
18720	if test -z "$cf_x_athena_inc" ; then
18721
18722cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
18723cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
18724cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
18725LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
18726for cf_X_CFLAGS in $X_CFLAGS
18727do
18728	case "x$cf_X_CFLAGS" in
18729	x-[IUD]*)
18730		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
18731		;;
18732	*)
18733		CFLAGS="$CFLAGS $cf_X_CFLAGS"
18734		;;
18735	esac
18736done
18737
18738		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
18739		if test $cf_path != default ; then
18740
18741	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18742	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
18743
18744			echo "$as_me:18744: checking for $cf_test in $cf_path" >&5
18745echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
18746		else
18747			echo "$as_me:18747: checking for $cf_test" >&5
18748echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
18749		fi
18750		cat >conftest.$ac_ext <<_ACEOF
18751#line 18751 "configure"
18752#include "confdefs.h"
18753
18754#include <X11/Intrinsic.h>
18755#include <$cf_test>
18756int
18757main (void)
18758{
18759
18760  ;
18761  return 0;
18762}
18763_ACEOF
18764rm -f conftest.$ac_objext
18765if { (eval echo "$as_me:18765: \"$ac_compile\"") >&5
18766  (eval $ac_compile) 2>&5
18767  ac_status=$?
18768  echo "$as_me:18768: \$? = $ac_status" >&5
18769  (exit $ac_status); } &&
18770         { ac_try='test -s conftest.$ac_objext'
18771  { (eval echo "$as_me:18771: \"$ac_try\"") >&5
18772  (eval $ac_try) 2>&5
18773  ac_status=$?
18774  echo "$as_me:18774: \$? = $ac_status" >&5
18775  (exit $ac_status); }; }; then
18776  cf_result=yes
18777else
18778  echo "$as_me: failed program was:" >&5
18779cat conftest.$ac_ext >&5
18780cf_result=no
18781fi
18782rm -f conftest.$ac_objext conftest.$ac_ext
18783		echo "$as_me:18783: result: $cf_result" >&5
18784echo "${ECHO_T}$cf_result" >&6
18785
18786LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
18787CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
18788CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
18789
18790		if test "$cf_result" = yes ; then
18791			test "$cf_path"  = default && cf_x_athena_inc=default
18792			test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
18793			break
18794		fi
18795	fi
18796done
18797
18798if test -z "$cf_x_athena_inc" ; then
18799	{ echo "$as_me:18799: WARNING: Unable to find Athena header files" >&5
18800echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
18801elif test "$cf_x_athena_inc" != default ; then
18802
18803	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18804	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
18805
18806fi
18807
18808cf_x_athena_root=$cf_x_athena
18809cf_x_athena_lib=""
18810
18811for cf_path in default \
18812	/usr/contrib/X11R6 \
18813	/usr/contrib/X11R5 \
18814	/usr/lib/X11R5 \
18815	/usr/local
18816do
18817	for cf_lib in \
18818		${cf_x_athena_root} \
18819		${cf_x_athena_root}7 \
18820		${cf_x_athena_root}6
18821	do
18822	for cf_libs in \
18823		"-l$cf_lib -lXmu" \
18824		"-l$cf_lib -lXpm -lXmu" \
18825		"-l${cf_lib}_s -lXmu_s"
18826	do
18827		test -n "$cf_x_athena_lib" && break
18828
18829cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
18830cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
18831cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
18832LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
18833for cf_X_CFLAGS in $X_CFLAGS
18834do
18835	case "x$cf_X_CFLAGS" in
18836	x-[IUD]*)
18837		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
18838		;;
18839	*)
18840		CFLAGS="$CFLAGS $cf_X_CFLAGS"
18841		;;
18842	esac
18843done
18844
18845		cf_test=XawSimpleMenuAddGlobalActions
18846		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
18847
18848cf_add_libs="$LIBS"
18849# reverse order
18850cf_add_0lib=
18851for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18852# filter duplicates
18853for cf_add_1lib in $cf_add_0lib; do
18854	for cf_add_2lib in $cf_add_libs; do
18855		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18856			cf_add_1lib=
18857			break
18858		fi
18859	done
18860	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18861done
18862LIBS="$cf_add_libs"
18863
18864		echo "$as_me:18864: checking for $cf_test in $cf_libs" >&5
18865echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
18866		cat >conftest.$ac_ext <<_ACEOF
18867#line 18867 "configure"
18868#include "confdefs.h"
18869
18870#include <X11/Intrinsic.h>
18871#include <X11/$cf_x_athena_root/SimpleMenu.h>
18872
18873int
18874main (void)
18875{
18876
18877$cf_test((XtAppContext) 0)
18878  ;
18879  return 0;
18880}
18881_ACEOF
18882rm -f conftest.$ac_objext conftest$ac_exeext
18883if { (eval echo "$as_me:18883: \"$ac_link\"") >&5
18884  (eval $ac_link) 2>&5
18885  ac_status=$?
18886  echo "$as_me:18886: \$? = $ac_status" >&5
18887  (exit $ac_status); } &&
18888         { ac_try='test -s conftest$ac_exeext'
18889  { (eval echo "$as_me:18889: \"$ac_try\"") >&5
18890  (eval $ac_try) 2>&5
18891  ac_status=$?
18892  echo "$as_me:18892: \$? = $ac_status" >&5
18893  (exit $ac_status); }; }; then
18894  cf_result=yes
18895else
18896  echo "$as_me: failed program was:" >&5
18897cat conftest.$ac_ext >&5
18898cf_result=no
18899fi
18900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18901		echo "$as_me:18901: result: $cf_result" >&5
18902echo "${ECHO_T}$cf_result" >&6
18903
18904LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
18905CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
18906CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
18907
18908		if test "$cf_result" = yes ; then
18909			cf_x_athena_lib="$cf_libs"
18910			break
18911		fi
18912	done # cf_libs
18913		test -n "$cf_x_athena_lib" && break
18914	done # cf_lib
18915done
18916
18917if test -z "$cf_x_athena_lib" ; then
18918	{ { echo "$as_me:18918: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
18919echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
18920   { (exit 1); exit 1; }; }
18921fi
18922
18923cf_add_libs="$LIBS"
18924# reverse order
18925cf_add_0lib=
18926for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18927# filter duplicates
18928for cf_add_1lib in $cf_add_0lib; do
18929	for cf_add_2lib in $cf_add_libs; do
18930		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18931			cf_add_1lib=
18932			break
18933		fi
18934	done
18935	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18936done
18937LIBS="$cf_add_libs"
18938
18939cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18940
18941cat >>confdefs.h <<EOF
18942#define $cf_x_athena_LIBS 1
18943EOF
18944
18945fi
18946
18947if test -n "$ac_tool_prefix"; then
18948  for ac_prog in xcurses-config
18949  do
18950    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18951set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18952echo "$as_me:18952: checking for $ac_word" >&5
18953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18954if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
18955  echo $ECHO_N "(cached) $ECHO_C" >&6
18956else
18957  if test -n "$XCURSES_CONFIG"; then
18958  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
18959else
18960  ac_save_IFS=$IFS; IFS=$ac_path_separator
18961ac_dummy="$PATH"
18962for ac_dir in $ac_dummy; do
18963  IFS=$ac_save_IFS
18964  test -z "$ac_dir" && ac_dir=.
18965  $as_executable_p "$ac_dir/$ac_word" || continue
18966ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
18967echo "$as_me:18967: found $ac_dir/$ac_word" >&5
18968break
18969done
18970
18971fi
18972fi
18973XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
18974if test -n "$XCURSES_CONFIG"; then
18975  echo "$as_me:18975: result: $XCURSES_CONFIG" >&5
18976echo "${ECHO_T}$XCURSES_CONFIG" >&6
18977else
18978  echo "$as_me:18978: result: no" >&5
18979echo "${ECHO_T}no" >&6
18980fi
18981
18982    test -n "$XCURSES_CONFIG" && break
18983  done
18984fi
18985if test -z "$XCURSES_CONFIG"; then
18986  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
18987  for ac_prog in xcurses-config
18988do
18989  # Extract the first word of "$ac_prog", so it can be a program name with args.
18990set dummy $ac_prog; ac_word=$2
18991echo "$as_me:18991: checking for $ac_word" >&5
18992echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18993if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
18994  echo $ECHO_N "(cached) $ECHO_C" >&6
18995else
18996  if test -n "$ac_ct_XCURSES_CONFIG"; then
18997  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
18998else
18999  ac_save_IFS=$IFS; IFS=$ac_path_separator
19000ac_dummy="$PATH"
19001for ac_dir in $ac_dummy; do
19002  IFS=$ac_save_IFS
19003  test -z "$ac_dir" && ac_dir=.
19004  $as_executable_p "$ac_dir/$ac_word" || continue
19005ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
19006echo "$as_me:19006: found $ac_dir/$ac_word" >&5
19007break
19008done
19009
19010fi
19011fi
19012ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
19013if test -n "$ac_ct_XCURSES_CONFIG"; then
19014  echo "$as_me:19014: result: $ac_ct_XCURSES_CONFIG" >&5
19015echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
19016else
19017  echo "$as_me:19017: result: no" >&5
19018echo "${ECHO_T}no" >&6
19019fi
19020
19021  test -n "$ac_ct_XCURSES_CONFIG" && break
19022done
19023test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
19024
19025  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
19026fi
19027
19028if test "$XCURSES_CONFIG" != none ; then
19029
19030cf_fix_cppflags=no
19031cf_new_cflags=
19032cf_new_cppflags=
19033cf_new_extra_cppflags=
19034
19035for cf_add_cflags in `$XCURSES_CONFIG --cflags`
19036do
19037case $cf_fix_cppflags in
19038(no)
19039	case $cf_add_cflags in
19040	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19041		case $cf_add_cflags in
19042		(-D*)
19043			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19044
19045			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19046				&& test -z "${cf_tst_cflags}" \
19047				&& cf_fix_cppflags=yes
19048
19049			if test $cf_fix_cppflags = yes ; then
19050
19051	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19052	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19053
19054				continue
19055			elif test "${cf_tst_cflags}" = "\"'" ; then
19056
19057	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19058	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19059
19060				continue
19061			fi
19062			;;
19063		esac
19064		case "$CPPFLAGS" in
19065		(*$cf_add_cflags)
19066			;;
19067		(*)
19068			case $cf_add_cflags in
19069			(-D*)
19070				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19071
19072CPPFLAGS=`echo "$CPPFLAGS" | \
19073	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19074		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19075
19076				;;
19077			esac
19078
19079	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19080	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19081
19082			;;
19083		esac
19084		;;
19085	(*)
19086
19087	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19088	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19089
19090		;;
19091	esac
19092	;;
19093(yes)
19094
19095	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19096	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19097
19098	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19099
19100	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19101		&& test -z "${cf_tst_cflags}" \
19102		&& cf_fix_cppflags=no
19103	;;
19104esac
19105done
19106
19107if test -n "$cf_new_cflags" ; then
19108
19109	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19110	CFLAGS="${CFLAGS}$cf_new_cflags"
19111
19112fi
19113
19114if test -n "$cf_new_cppflags" ; then
19115
19116	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19117	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19118
19119fi
19120
19121if test -n "$cf_new_extra_cppflags" ; then
19122
19123	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19124	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19125
19126fi
19127
19128cf_add_libs="$LIBS"
19129# reverse order
19130cf_add_0lib=
19131for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19132# filter duplicates
19133for cf_add_1lib in $cf_add_0lib; do
19134	for cf_add_2lib in $cf_add_libs; do
19135		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19136			cf_add_1lib=
19137			break
19138		fi
19139	done
19140	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19141done
19142LIBS="$cf_add_libs"
19143
19144cf_cv_lib_XCurses=yes
19145
19146else
19147
19148LDFLAGS="$LDFLAGS $X_LIBS"
19149
19150test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
19151
19152echo "${as_me:-configure}:19152: testing checking additions to CFLAGS ..." 1>&5
19153
19154cf_check_cflags="$CFLAGS"
19155cf_check_cppflags="$CPPFLAGS"
19156
19157cf_fix_cppflags=no
19158cf_new_cflags=
19159cf_new_cppflags=
19160cf_new_extra_cppflags=
19161
19162for cf_add_cflags in $X_CFLAGS
19163do
19164case $cf_fix_cppflags in
19165(no)
19166	case $cf_add_cflags in
19167	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19168		case $cf_add_cflags in
19169		(-D*)
19170			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19171
19172			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19173				&& test -z "${cf_tst_cflags}" \
19174				&& cf_fix_cppflags=yes
19175
19176			if test $cf_fix_cppflags = yes ; then
19177
19178	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19179	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19180
19181				continue
19182			elif test "${cf_tst_cflags}" = "\"'" ; then
19183
19184	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19185	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19186
19187				continue
19188			fi
19189			;;
19190		esac
19191		case "$CPPFLAGS" in
19192		(*$cf_add_cflags)
19193			;;
19194		(*)
19195			case $cf_add_cflags in
19196			(-D*)
19197				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19198
19199CPPFLAGS=`echo "$CPPFLAGS" | \
19200	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19201		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19202
19203				;;
19204			esac
19205
19206	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19207	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19208
19209			;;
19210		esac
19211		;;
19212	(*)
19213
19214	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19215	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19216
19217		;;
19218	esac
19219	;;
19220(yes)
19221
19222	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19223	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19224
19225	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19226
19227	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19228		&& test -z "${cf_tst_cflags}" \
19229		&& cf_fix_cppflags=no
19230	;;
19231esac
19232done
19233
19234if test -n "$cf_new_cflags" ; then
19235	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
19236
19237echo "${as_me:-configure}:19237: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
19238
19239	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19240	CFLAGS="${CFLAGS}$cf_new_cflags"
19241
19242fi
19243
19244if test -n "$cf_new_cppflags" ; then
19245	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
19246
19247echo "${as_me:-configure}:19247: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
19248
19249	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19250	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19251
19252fi
19253
19254if test -n "$cf_new_extra_cppflags" ; then
19255	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
19256
19257echo "${as_me:-configure}:19257: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
19258
19259	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19260	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19261
19262fi
19263
19264if test "x$cf_check_cflags" != "x$CFLAGS" ; then
19265cat >conftest.$ac_ext <<_ACEOF
19266#line 19266 "configure"
19267#include "confdefs.h"
19268#include <stdio.h>
19269int
19270main (void)
19271{
19272printf("Hello world");
19273  ;
19274  return 0;
19275}
19276_ACEOF
19277rm -f conftest.$ac_objext conftest$ac_exeext
19278if { (eval echo "$as_me:19278: \"$ac_link\"") >&5
19279  (eval $ac_link) 2>&5
19280  ac_status=$?
19281  echo "$as_me:19281: \$? = $ac_status" >&5
19282  (exit $ac_status); } &&
19283         { ac_try='test -s conftest$ac_exeext'
19284  { (eval echo "$as_me:19284: \"$ac_try\"") >&5
19285  (eval $ac_try) 2>&5
19286  ac_status=$?
19287  echo "$as_me:19287: \$? = $ac_status" >&5
19288  (exit $ac_status); }; }; then
19289  :
19290else
19291  echo "$as_me: failed program was:" >&5
19292cat conftest.$ac_ext >&5
19293test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
19294
19295echo "${as_me:-configure}:19295: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
19296
19297	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
19298		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
19299
19300echo "${as_me:-configure}:19300: testing but keeping change to \$CPPFLAGS ..." 1>&5
19301
19302	 fi
19303	 CFLAGS="$cf_check_flags"
19304fi
19305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19306fi
19307
19308echo "$as_me:19308: checking for XOpenDisplay in -lX11" >&5
19309echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
19310if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
19311  echo $ECHO_N "(cached) $ECHO_C" >&6
19312else
19313  ac_check_lib_save_LIBS=$LIBS
19314LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
19315cat >conftest.$ac_ext <<_ACEOF
19316#line 19316 "configure"
19317#include "confdefs.h"
19318
19319/* Override any gcc2 internal prototype to avoid an error.  */
19320#ifdef __cplusplus
19321extern "C"
19322#endif
19323/* We use char because int might match the return type of a gcc2
19324   builtin and then its argument prototype would still apply.  */
19325char XOpenDisplay ();
19326int
19327main (void)
19328{
19329XOpenDisplay ();
19330  ;
19331  return 0;
19332}
19333_ACEOF
19334rm -f conftest.$ac_objext conftest$ac_exeext
19335if { (eval echo "$as_me:19335: \"$ac_link\"") >&5
19336  (eval $ac_link) 2>&5
19337  ac_status=$?
19338  echo "$as_me:19338: \$? = $ac_status" >&5
19339  (exit $ac_status); } &&
19340         { ac_try='test -s conftest$ac_exeext'
19341  { (eval echo "$as_me:19341: \"$ac_try\"") >&5
19342  (eval $ac_try) 2>&5
19343  ac_status=$?
19344  echo "$as_me:19344: \$? = $ac_status" >&5
19345  (exit $ac_status); }; }; then
19346  ac_cv_lib_X11_XOpenDisplay=yes
19347else
19348  echo "$as_me: failed program was:" >&5
19349cat conftest.$ac_ext >&5
19350ac_cv_lib_X11_XOpenDisplay=no
19351fi
19352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19353LIBS=$ac_check_lib_save_LIBS
19354fi
19355echo "$as_me:19355: result: $ac_cv_lib_X11_XOpenDisplay" >&5
19356echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
19357if test $ac_cv_lib_X11_XOpenDisplay = yes; then
19358
19359cf_add_libs="$LIBS"
19360# reverse order
19361cf_add_0lib=
19362for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19363# filter duplicates
19364for cf_add_1lib in $cf_add_0lib; do
19365	for cf_add_2lib in $cf_add_libs; do
19366		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19367			cf_add_1lib=
19368			break
19369		fi
19370	done
19371	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19372done
19373LIBS="$cf_add_libs"
19374
19375fi
19376
19377echo "$as_me:19377: checking for XCurses library" >&5
19378echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
19379if test "${cf_cv_lib_XCurses+set}" = set; then
19380  echo $ECHO_N "(cached) $ECHO_C" >&6
19381else
19382
19383cf_add_libs="$LIBS"
19384# reverse order
19385cf_add_0lib=
19386for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19387# filter duplicates
19388for cf_add_1lib in $cf_add_0lib; do
19389	for cf_add_2lib in $cf_add_libs; do
19390		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19391			cf_add_1lib=
19392			break
19393		fi
19394	done
19395	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19396done
19397LIBS="$cf_add_libs"
19398
19399cat >conftest.$ac_ext <<_ACEOF
19400#line 19400 "configure"
19401#include "confdefs.h"
19402
19403#include <xcurses.h>
19404char *XCursesProgramName = "test";
19405
19406int
19407main (void)
19408{
19409XCursesExit();
19410  ;
19411  return 0;
19412}
19413_ACEOF
19414rm -f conftest.$ac_objext conftest$ac_exeext
19415if { (eval echo "$as_me:19415: \"$ac_link\"") >&5
19416  (eval $ac_link) 2>&5
19417  ac_status=$?
19418  echo "$as_me:19418: \$? = $ac_status" >&5
19419  (exit $ac_status); } &&
19420         { ac_try='test -s conftest$ac_exeext'
19421  { (eval echo "$as_me:19421: \"$ac_try\"") >&5
19422  (eval $ac_try) 2>&5
19423  ac_status=$?
19424  echo "$as_me:19424: \$? = $ac_status" >&5
19425  (exit $ac_status); }; }; then
19426  cf_cv_lib_XCurses=yes
19427else
19428  echo "$as_me: failed program was:" >&5
19429cat conftest.$ac_ext >&5
19430cf_cv_lib_XCurses=no
19431fi
19432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19433
19434fi
19435echo "$as_me:19435: result: $cf_cv_lib_XCurses" >&5
19436echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
19437
19438fi
19439
19440if test $cf_cv_lib_XCurses = yes ; then
19441
19442cat >>confdefs.h <<\EOF
19443#define UNIX 1
19444EOF
19445
19446cat >>confdefs.h <<\EOF
19447#define XCURSES 1
19448EOF
19449
19450	echo "$as_me:19450: checking for xcurses.h" >&5
19451echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
19452if test "${ac_cv_header_xcurses_h+set}" = set; then
19453  echo $ECHO_N "(cached) $ECHO_C" >&6
19454else
19455  cat >conftest.$ac_ext <<_ACEOF
19456#line 19456 "configure"
19457#include "confdefs.h"
19458#include <xcurses.h>
19459_ACEOF
19460if { (eval echo "$as_me:19460: \"$ac_cpp conftest.$ac_ext\"") >&5
19461  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19462  ac_status=$?
19463  egrep -v '^ *\+' conftest.er1 >conftest.err
19464  rm -f conftest.er1
19465  cat conftest.err >&5
19466  echo "$as_me:19466: \$? = $ac_status" >&5
19467  (exit $ac_status); } >/dev/null; then
19468  if test -s conftest.err; then
19469    ac_cpp_err=$ac_c_preproc_warn_flag
19470  else
19471    ac_cpp_err=
19472  fi
19473else
19474  ac_cpp_err=yes
19475fi
19476if test -z "$ac_cpp_err"; then
19477  ac_cv_header_xcurses_h=yes
19478else
19479  echo "$as_me: failed program was:" >&5
19480  cat conftest.$ac_ext >&5
19481  ac_cv_header_xcurses_h=no
19482fi
19483rm -f conftest.err conftest.$ac_ext
19484fi
19485echo "$as_me:19485: result: $ac_cv_header_xcurses_h" >&5
19486echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
19487if test $ac_cv_header_xcurses_h = yes; then
19488
19489cat >>confdefs.h <<\EOF
19490#define HAVE_XCURSES 1
19491EOF
19492
19493fi
19494
19495else
19496	{ { echo "$as_me:19496: error: Cannot link with XCurses" >&5
19497echo "$as_me: error: Cannot link with XCurses" >&2;}
19498   { (exit 1); exit 1; }; }
19499fi
19500
19501	;;
19502(*)
19503	{ { echo "$as_me:19503: error: unexpected screen-value: $cf_cv_screen" >&5
19504echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
19505   { (exit 1); exit 1; }; }
19506	;;
19507esac
19508
19509: ${cf_nculib_root:=$cf_cv_screen}
19510as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
19511echo "$as_me:19511: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
19512echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
19513if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19514  echo $ECHO_N "(cached) $ECHO_C" >&6
19515else
19516  ac_check_lib_save_LIBS=$LIBS
19517LIBS="-l$cf_nculib_root  $LIBS"
19518cat >conftest.$ac_ext <<_ACEOF
19519#line 19519 "configure"
19520#include "confdefs.h"
19521
19522/* Override any gcc2 internal prototype to avoid an error.  */
19523#ifdef __cplusplus
19524extern "C"
19525#endif
19526/* We use char because int might match the return type of a gcc2
19527   builtin and then its argument prototype would still apply.  */
19528char _nc_init_pthreads ();
19529int
19530main (void)
19531{
19532_nc_init_pthreads ();
19533  ;
19534  return 0;
19535}
19536_ACEOF
19537rm -f conftest.$ac_objext conftest$ac_exeext
19538if { (eval echo "$as_me:19538: \"$ac_link\"") >&5
19539  (eval $ac_link) 2>&5
19540  ac_status=$?
19541  echo "$as_me:19541: \$? = $ac_status" >&5
19542  (exit $ac_status); } &&
19543         { ac_try='test -s conftest$ac_exeext'
19544  { (eval echo "$as_me:19544: \"$ac_try\"") >&5
19545  (eval $ac_try) 2>&5
19546  ac_status=$?
19547  echo "$as_me:19547: \$? = $ac_status" >&5
19548  (exit $ac_status); }; }; then
19549  eval "$as_ac_Lib=yes"
19550else
19551  echo "$as_me: failed program was:" >&5
19552cat conftest.$ac_ext >&5
19553eval "$as_ac_Lib=no"
19554fi
19555rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19556LIBS=$ac_check_lib_save_LIBS
19557fi
19558echo "$as_me:19558: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19559echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19560if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19561  cf_cv_ncurses_pthreads=yes
19562else
19563  cf_cv_ncurses_pthreads=no
19564fi
19565
19566if test "$cf_cv_ncurses_pthreads" = yes
19567then
19568
19569cf_add_libs="$LIBS"
19570# reverse order
19571cf_add_0lib=
19572for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19573# filter duplicates
19574for cf_add_1lib in $cf_add_0lib; do
19575	for cf_add_2lib in $cf_add_libs; do
19576		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19577			cf_add_1lib=
19578			break
19579		fi
19580	done
19581	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19582done
19583LIBS="$cf_add_libs"
19584
19585fi
19586
19587CFG_ROOTNAME=cdk
19588HDR_ROOTNAME=cdk
19589LIB_ROOTNAME=cdk
19590
19591case $cf_cv_screen in #(vi
19592ncurses) #(vi
19593	;;
19594ncursesw)
19595	LIB_ROOTNAME=cdkw
19596	;;
19597pdcurses) #(vi
19598	LIB_ROOTNAME=cdkX
19599	;;
19600esac
19601
19602echo "$as_me:19602: checking for XXX-config rootname" >&5
19603echo $ECHO_N "checking for XXX-config rootname... $ECHO_C" >&6
19604
19605# Check whether --with-cfgname or --without-cfgname was given.
19606if test "${with_cfgname+set}" = set; then
19607  withval="$with_cfgname"
19608  CFG_ROOTNAME=$withval
19609fi;
19610echo "$as_me:19610: result: $CFG_ROOTNAME" >&5
19611echo "${ECHO_T}$CFG_ROOTNAME" >&6
19612
19613echo "$as_me:19613: checking if cdk.h should be in header subdirectory" >&5
19614echo $ECHO_N "checking if cdk.h should be in header subdirectory... $ECHO_C" >&6
19615
19616# Check whether --with-hdrname or --without-hdrname was given.
19617if test "${with_hdrname+set}" = set; then
19618  withval="$with_hdrname"
19619  HDR_ROOTNAME=no
19620fi;
19621echo "$as_me:19621: result: $HDR_SUBDIR" >&5
19622echo "${ECHO_T}$HDR_SUBDIR" >&6
19623
19624if test "$HDR_SUBDIR" = yes
19625then
19626	HDR_SUBDIR="#"
19627else
19628	HDR_SUBDIR=
19629fi
19630
19631echo "$as_me:19631: checking for header subdirectory" >&5
19632echo $ECHO_N "checking for header subdirectory... $ECHO_C" >&6
19633
19634# Check whether --with-hdrname or --without-hdrname was given.
19635if test "${with_hdrname+set}" = set; then
19636  withval="$with_hdrname"
19637  HDR_ROOTNAME=$withval
19638fi;
19639echo "$as_me:19639: result: $HDR_ROOTNAME" >&5
19640echo "${ECHO_T}$HDR_ROOTNAME" >&6
19641
19642echo "$as_me:19642: checking for library name" >&5
19643echo $ECHO_N "checking for library name... $ECHO_C" >&6
19644
19645# Check whether --with-libname or --without-libname was given.
19646if test "${with_libname+set}" = set; then
19647  withval="$with_libname"
19648  LIB_ROOTNAME=$withval
19649fi;
19650echo "$as_me:19650: result: $LIB_ROOTNAME" >&5
19651echo "${ECHO_T}$LIB_ROOTNAME" >&6
19652
19653echo "$as_me:19653: checking if improved const-typing should be used" >&5
19654echo $ECHO_N "checking if improved const-typing should be used... $ECHO_C" >&6
19655
19656# Check whether --enable-const or --disable-const was given.
19657if test "${enable_const+set}" = set; then
19658  enableval="$enable_const"
19659  CDK_CONST=$enableval
19660else
19661  CDK_CONST=no
19662fi;
19663echo "$as_me:19663: result: $CDK_CONST" >&5
19664echo "${ECHO_T}$CDK_CONST" >&6
19665if test "$CDK_CONST" = yes
19666then
19667
19668cat >>confdefs.h <<\EOF
19669#define CDK_CONST const
19670EOF
19671
19672else
19673	cat >>confdefs.h <<\EOF
19674#define CDK_CONST /*nothing*/
19675EOF
19676
19677fi
19678
19679# define these for casting convenience
19680
19681cat >>confdefs.h <<\EOF
19682#define CDK_CSTRING CDK_CONST char *
19683EOF
19684
19685cat >>confdefs.h <<\EOF
19686#define CDK_CSTRING2 CDK_CONST char * CDK_CONST *
19687EOF
19688
19689echo "$as_me:19689: checking definition to turn on extended curses functions" >&5
19690echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
19691if test "${cf_cv_need_xopen_extension+set}" = set; then
19692  echo $ECHO_N "(cached) $ECHO_C" >&6
19693else
19694
19695cf_cv_need_xopen_extension=unknown
19696cat >conftest.$ac_ext <<_ACEOF
19697#line 19697 "configure"
19698#include "confdefs.h"
19699
19700#include <stdlib.h>
19701#include <${cf_cv_ncurses_header:-curses.h}>
19702int
19703main (void)
19704{
19705
19706#if defined(NCURSES_VERSION_PATCH)
19707#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
19708	make an error
19709#endif
19710#endif
19711#ifdef NCURSES_VERSION
19712	cchar_t check;
19713	int check2 = curs_set((int)sizeof(check));
19714#endif
19715	long x = winnstr(stdscr, "", 0);
19716	int x1, y1;
19717#ifdef NCURSES_VERSION
19718	(void)check2;
19719#endif
19720	getbegyx(stdscr, y1, x1);
19721	(void)x;
19722	(void)y1;
19723	(void)x1;
19724
19725  ;
19726  return 0;
19727}
19728_ACEOF
19729rm -f conftest.$ac_objext conftest$ac_exeext
19730if { (eval echo "$as_me:19730: \"$ac_link\"") >&5
19731  (eval $ac_link) 2>&5
19732  ac_status=$?
19733  echo "$as_me:19733: \$? = $ac_status" >&5
19734  (exit $ac_status); } &&
19735         { ac_try='test -s conftest$ac_exeext'
19736  { (eval echo "$as_me:19736: \"$ac_try\"") >&5
19737  (eval $ac_try) 2>&5
19738  ac_status=$?
19739  echo "$as_me:19739: \$? = $ac_status" >&5
19740  (exit $ac_status); }; }; then
19741  cf_cv_need_xopen_extension=none
19742else
19743  echo "$as_me: failed program was:" >&5
19744cat conftest.$ac_ext >&5
19745
19746	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
19747	do
19748		cat >conftest.$ac_ext <<_ACEOF
19749#line 19749 "configure"
19750#include "confdefs.h"
19751
19752#define $cf_try_xopen_extension 1
19753#include <stdlib.h>
19754#include <${cf_cv_ncurses_header:-curses.h}>
19755int
19756main (void)
19757{
19758
19759#ifdef NCURSES_VERSION
19760		cchar_t check;
19761		int check2 = curs_set((int)sizeof(check));
19762#endif
19763		long x = winnstr(stdscr, "", 0);
19764		int x1, y1;
19765		getbegyx(stdscr, y1, x1);
19766#ifdef NCURSES_VERSION
19767		(void)check2;
19768#endif
19769		(void)x;
19770		(void)y1;
19771		(void)x1;
19772
19773  ;
19774  return 0;
19775}
19776_ACEOF
19777rm -f conftest.$ac_objext conftest$ac_exeext
19778if { (eval echo "$as_me:19778: \"$ac_link\"") >&5
19779  (eval $ac_link) 2>&5
19780  ac_status=$?
19781  echo "$as_me:19781: \$? = $ac_status" >&5
19782  (exit $ac_status); } &&
19783         { ac_try='test -s conftest$ac_exeext'
19784  { (eval echo "$as_me:19784: \"$ac_try\"") >&5
19785  (eval $ac_try) 2>&5
19786  ac_status=$?
19787  echo "$as_me:19787: \$? = $ac_status" >&5
19788  (exit $ac_status); }; }; then
19789  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
19790else
19791  echo "$as_me: failed program was:" >&5
19792cat conftest.$ac_ext >&5
19793fi
19794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19795	done
19796
19797fi
19798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19799
19800fi
19801echo "$as_me:19801: result: $cf_cv_need_xopen_extension" >&5
19802echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
19803
19804case $cf_cv_need_xopen_extension in
19805(*_*)
19806
19807	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19808	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
19809
19810	;;
19811esac
19812
19813echo "$as_me:19813: checking for term.h" >&5
19814echo $ECHO_N "checking for term.h... $ECHO_C" >&6
19815if test "${cf_cv_term_header+set}" = set; then
19816  echo $ECHO_N "(cached) $ECHO_C" >&6
19817else
19818
19819# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
19820# for <term.h> if we do not find the variant.
19821
19822cf_header_list="term.h ncurses/term.h ncursesw/term.h"
19823
19824case ${cf_cv_ncurses_header:-curses.h} in
19825(*/*)
19826	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
19827	cf_header_list="$cf_header_item $cf_header_list"
19828	;;
19829esac
19830
19831for cf_header in $cf_header_list
19832do
19833	cat >conftest.$ac_ext <<_ACEOF
19834#line 19834 "configure"
19835#include "confdefs.h"
19836
19837#include <${cf_cv_ncurses_header:-curses.h}>
19838#include <${cf_header}>
19839int
19840main (void)
19841{
19842WINDOW *x; (void)x
19843  ;
19844  return 0;
19845}
19846_ACEOF
19847rm -f conftest.$ac_objext
19848if { (eval echo "$as_me:19848: \"$ac_compile\"") >&5
19849  (eval $ac_compile) 2>&5
19850  ac_status=$?
19851  echo "$as_me:19851: \$? = $ac_status" >&5
19852  (exit $ac_status); } &&
19853         { ac_try='test -s conftest.$ac_objext'
19854  { (eval echo "$as_me:19854: \"$ac_try\"") >&5
19855  (eval $ac_try) 2>&5
19856  ac_status=$?
19857  echo "$as_me:19857: \$? = $ac_status" >&5
19858  (exit $ac_status); }; }; then
19859  cf_cv_term_header=$cf_header
19860	 break
19861else
19862  echo "$as_me: failed program was:" >&5
19863cat conftest.$ac_ext >&5
19864cf_cv_term_header=no
19865fi
19866rm -f conftest.$ac_objext conftest.$ac_ext
19867done
19868
19869case $cf_cv_term_header in
19870(no)
19871	# If curses is ncurses, some packagers still mess it up by trying to make
19872	# us use GNU termcap.  This handles the most common case.
19873	for cf_header in ncurses/term.h ncursesw/term.h
19874	do
19875		cat >conftest.$ac_ext <<_ACEOF
19876#line 19876 "configure"
19877#include "confdefs.h"
19878
19879#include <${cf_cv_ncurses_header:-curses.h}>
19880#ifdef NCURSES_VERSION
19881#include <${cf_header}>
19882#else
19883make an error
19884#endif
19885int
19886main (void)
19887{
19888WINDOW *x; (void)x
19889  ;
19890  return 0;
19891}
19892_ACEOF
19893rm -f conftest.$ac_objext
19894if { (eval echo "$as_me:19894: \"$ac_compile\"") >&5
19895  (eval $ac_compile) 2>&5
19896  ac_status=$?
19897  echo "$as_me:19897: \$? = $ac_status" >&5
19898  (exit $ac_status); } &&
19899         { ac_try='test -s conftest.$ac_objext'
19900  { (eval echo "$as_me:19900: \"$ac_try\"") >&5
19901  (eval $ac_try) 2>&5
19902  ac_status=$?
19903  echo "$as_me:19903: \$? = $ac_status" >&5
19904  (exit $ac_status); }; }; then
19905  cf_cv_term_header=$cf_header
19906			 break
19907else
19908  echo "$as_me: failed program was:" >&5
19909cat conftest.$ac_ext >&5
19910cf_cv_term_header=no
19911fi
19912rm -f conftest.$ac_objext conftest.$ac_ext
19913	done
19914	;;
19915esac
19916
19917fi
19918echo "$as_me:19918: result: $cf_cv_term_header" >&5
19919echo "${ECHO_T}$cf_cv_term_header" >&6
19920
19921case $cf_cv_term_header in
19922(term.h)
19923
19924cat >>confdefs.h <<\EOF
19925#define HAVE_TERM_H 1
19926EOF
19927
19928	;;
19929(ncurses/term.h)
19930
19931cat >>confdefs.h <<\EOF
19932#define HAVE_NCURSES_TERM_H 1
19933EOF
19934
19935	;;
19936(ncursesw/term.h)
19937
19938cat >>confdefs.h <<\EOF
19939#define HAVE_NCURSESW_TERM_H 1
19940EOF
19941
19942	;;
19943esac
19944
19945echo "$as_me:19945: checking for unctrl.h" >&5
19946echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
19947if test "${cf_cv_unctrl_header+set}" = set; then
19948  echo $ECHO_N "(cached) $ECHO_C" >&6
19949else
19950
19951# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
19952# for <unctrl.h> if we do not find the variant.
19953
19954cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
19955
19956case ${cf_cv_ncurses_header:-curses.h} in
19957(*/*)
19958	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
19959	cf_header_list="$cf_header_item $cf_header_list"
19960	;;
19961esac
19962
19963for cf_header in $cf_header_list
19964do
19965	cat >conftest.$ac_ext <<_ACEOF
19966#line 19966 "configure"
19967#include "confdefs.h"
19968
19969#include <${cf_cv_ncurses_header:-curses.h}>
19970#include <${cf_header}>
19971int
19972main (void)
19973{
19974WINDOW *x; (void)x
19975  ;
19976  return 0;
19977}
19978_ACEOF
19979rm -f conftest.$ac_objext
19980if { (eval echo "$as_me:19980: \"$ac_compile\"") >&5
19981  (eval $ac_compile) 2>&5
19982  ac_status=$?
19983  echo "$as_me:19983: \$? = $ac_status" >&5
19984  (exit $ac_status); } &&
19985         { ac_try='test -s conftest.$ac_objext'
19986  { (eval echo "$as_me:19986: \"$ac_try\"") >&5
19987  (eval $ac_try) 2>&5
19988  ac_status=$?
19989  echo "$as_me:19989: \$? = $ac_status" >&5
19990  (exit $ac_status); }; }; then
19991  cf_cv_unctrl_header=$cf_header
19992	 break
19993else
19994  echo "$as_me: failed program was:" >&5
19995cat conftest.$ac_ext >&5
19996cf_cv_unctrl_header=no
19997fi
19998rm -f conftest.$ac_objext conftest.$ac_ext
19999done
20000
20001fi
20002echo "$as_me:20002: result: $cf_cv_unctrl_header" >&5
20003echo "${ECHO_T}$cf_cv_unctrl_header" >&6
20004
20005case $cf_cv_unctrl_header in
20006(no)
20007	{ echo "$as_me:20007: WARNING: unctrl.h header not found" >&5
20008echo "$as_me: WARNING: unctrl.h header not found" >&2;}
20009	;;
20010esac
20011
20012case $cf_cv_unctrl_header in
20013(unctrl.h)
20014
20015cat >>confdefs.h <<\EOF
20016#define HAVE_UNCTRL_H 1
20017EOF
20018
20019	;;
20020(ncurses/unctrl.h)
20021
20022cat >>confdefs.h <<\EOF
20023#define HAVE_NCURSES_UNCTRL_H 1
20024EOF
20025
20026	;;
20027(ncursesw/unctrl.h)
20028
20029cat >>confdefs.h <<\EOF
20030#define HAVE_NCURSESW_UNCTRL_H 1
20031EOF
20032
20033	;;
20034esac
20035
20036for cf_func in \
20037	Xinitscr\
20038	getbegx \
20039	getbegy \
20040	getmaxx \
20041	getmaxy \
20042	start_color \
20043	\
20044
20045do
20046
20047cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20048
20049	echo "$as_me:20049: checking for ${cf_func}" >&5
20050echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
20051
20052echo "${as_me:-configure}:20052: testing ${cf_func} ..." 1>&5
20053
20054	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
20055  echo $ECHO_N "(cached) $ECHO_C" >&6
20056else
20057
20058		eval cf_result='$ac_cv_func_'$cf_func
20059		if test ".$cf_result" != ".no"; then
20060			cat >conftest.$ac_ext <<_ACEOF
20061#line 20061 "configure"
20062#include "confdefs.h"
20063
20064#ifdef HAVE_XCURSES
20065#include <xcurses.h>
20066char * XCursesProgramName = "test";
20067#else
20068#include <${cf_cv_ncurses_header:-curses.h}>
20069#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20070#include <ncursesw/term.h>
20071#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20072#include <ncurses/term.h>
20073#elif defined(HAVE_TERM_H)
20074#include <term.h>
20075#endif
20076#endif
20077
20078int
20079main (void)
20080{
20081
20082#ifndef ${cf_func}
20083long foo = (long)(&${cf_func});
20084fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
20085if (foo + 1234L > 5678L)
20086	${cf_cv_main_return:-return}(foo != 0);
20087#endif
20088
20089  ;
20090  return 0;
20091}
20092_ACEOF
20093rm -f conftest.$ac_objext conftest$ac_exeext
20094if { (eval echo "$as_me:20094: \"$ac_link\"") >&5
20095  (eval $ac_link) 2>&5
20096  ac_status=$?
20097  echo "$as_me:20097: \$? = $ac_status" >&5
20098  (exit $ac_status); } &&
20099         { ac_try='test -s conftest$ac_exeext'
20100  { (eval echo "$as_me:20100: \"$ac_try\"") >&5
20101  (eval $ac_try) 2>&5
20102  ac_status=$?
20103  echo "$as_me:20103: \$? = $ac_status" >&5
20104  (exit $ac_status); }; }; then
20105  cf_result=yes
20106else
20107  echo "$as_me: failed program was:" >&5
20108cat conftest.$ac_ext >&5
20109cf_result=no
20110fi
20111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20112		fi
20113		eval 'cf_cv_func_'$cf_func'=$cf_result'
20114
20115fi
20116
20117	# use the computed/retrieved cache-value:
20118	eval 'cf_result=$cf_cv_func_'$cf_func
20119	echo "$as_me:20119: result: $cf_result" >&5
20120echo "${ECHO_T}$cf_result" >&6
20121	if test $cf_result != no; then
20122		cat >>confdefs.h <<EOF
20123#define HAVE_${cf_tr_func} 1
20124EOF
20125
20126	fi
20127done
20128
20129case $LIBS in #(vi
20130*ncurses*)
20131
20132if test "$with_no_leaks" = yes ; then
20133	echo "$as_me:20133: checking for nc_alloc.h" >&5
20134echo $ECHO_N "checking for nc_alloc.h... $ECHO_C" >&6
20135if test "${ac_cv_header_nc_alloc_h+set}" = set; then
20136  echo $ECHO_N "(cached) $ECHO_C" >&6
20137else
20138  cat >conftest.$ac_ext <<_ACEOF
20139#line 20139 "configure"
20140#include "confdefs.h"
20141#include <nc_alloc.h>
20142_ACEOF
20143if { (eval echo "$as_me:20143: \"$ac_cpp conftest.$ac_ext\"") >&5
20144  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20145  ac_status=$?
20146  egrep -v '^ *\+' conftest.er1 >conftest.err
20147  rm -f conftest.er1
20148  cat conftest.err >&5
20149  echo "$as_me:20149: \$? = $ac_status" >&5
20150  (exit $ac_status); } >/dev/null; then
20151  if test -s conftest.err; then
20152    ac_cpp_err=$ac_c_preproc_warn_flag
20153  else
20154    ac_cpp_err=
20155  fi
20156else
20157  ac_cpp_err=yes
20158fi
20159if test -z "$ac_cpp_err"; then
20160  ac_cv_header_nc_alloc_h=yes
20161else
20162  echo "$as_me: failed program was:" >&5
20163  cat conftest.$ac_ext >&5
20164  ac_cv_header_nc_alloc_h=no
20165fi
20166rm -f conftest.err conftest.$ac_ext
20167fi
20168echo "$as_me:20168: result: $ac_cv_header_nc_alloc_h" >&5
20169echo "${ECHO_T}$ac_cv_header_nc_alloc_h" >&6
20170
20171for ac_func in _nc_free_and_exit
20172do
20173as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20174echo "$as_me:20174: checking for $ac_func" >&5
20175echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20176if eval "test \"\${$as_ac_var+set}\" = set"; then
20177  echo $ECHO_N "(cached) $ECHO_C" >&6
20178else
20179  cat >conftest.$ac_ext <<_ACEOF
20180#line 20180 "configure"
20181#include "confdefs.h"
20182#define $ac_func autoconf_temporary
20183#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20184#undef $ac_func
20185
20186#ifdef __cplusplus
20187extern "C"
20188#endif
20189
20190/* We use char because int might match the return type of a gcc2
20191   builtin and then its argument prototype would still apply.  */
20192char $ac_func (void);
20193
20194int
20195main (void)
20196{
20197
20198/* The GNU C library defines stubs for functions which it implements
20199    to always fail with ENOSYS.  Some functions are actually named
20200    something starting with __ and the normal name is an alias.  */
20201#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20202#error found stub for $ac_func
20203#endif
20204
20205	return $ac_func ();
20206  ;
20207  return 0;
20208}
20209_ACEOF
20210rm -f conftest.$ac_objext conftest$ac_exeext
20211if { (eval echo "$as_me:20211: \"$ac_link\"") >&5
20212  (eval $ac_link) 2>&5
20213  ac_status=$?
20214  echo "$as_me:20214: \$? = $ac_status" >&5
20215  (exit $ac_status); } &&
20216         { ac_try='test -s conftest$ac_exeext'
20217  { (eval echo "$as_me:20217: \"$ac_try\"") >&5
20218  (eval $ac_try) 2>&5
20219  ac_status=$?
20220  echo "$as_me:20220: \$? = $ac_status" >&5
20221  (exit $ac_status); }; }; then
20222  eval "$as_ac_var=yes"
20223else
20224  echo "$as_me: failed program was:" >&5
20225cat conftest.$ac_ext >&5
20226eval "$as_ac_var=no"
20227fi
20228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20229fi
20230echo "$as_me:20230: result: `eval echo '${'$as_ac_var'}'`" >&5
20231echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20232if test `eval echo '${'$as_ac_var'}'` = yes; then
20233  cat >>confdefs.h <<EOF
20234#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20235EOF
20236
20237fi
20238done
20239
20240fi
20241;;
20242esac
20243
20244echo "$as_me:20244: checking how to define setbegyx" >&5
20245echo $ECHO_N "checking how to define setbegyx... $ECHO_C" >&6
20246cf_result=ERR
20247for cf_check in \
20248	'((win)->_begy = (y), (win)->_begx = (x), OK)'
20249do
20250	cat >conftest.$ac_ext <<_ACEOF
20251#line 20251 "configure"
20252#include "confdefs.h"
20253
20254#include <${cf_cv_ncurses_header:-curses.h}>
20255
20256int
20257main (void)
20258{
20259
20260WINDOW *win = 0;
20261#define setbegyx(win,y,x) $cf_check
20262setbegyx(win, 2, 3);
20263
20264  ;
20265  return 0;
20266}
20267_ACEOF
20268rm -f conftest.$ac_objext
20269if { (eval echo "$as_me:20269: \"$ac_compile\"") >&5
20270  (eval $ac_compile) 2>&5
20271  ac_status=$?
20272  echo "$as_me:20272: \$? = $ac_status" >&5
20273  (exit $ac_status); } &&
20274         { ac_try='test -s conftest.$ac_objext'
20275  { (eval echo "$as_me:20275: \"$ac_try\"") >&5
20276  (eval $ac_try) 2>&5
20277  ac_status=$?
20278  echo "$as_me:20278: \$? = $ac_status" >&5
20279  (exit $ac_status); }; }; then
20280  cf_result=$cf_check; break
20281else
20282  echo "$as_me: failed program was:" >&5
20283cat conftest.$ac_ext >&5
20284fi
20285rm -f conftest.$ac_objext conftest.$ac_ext
20286done
20287echo "$as_me:20287: result: \"$cf_result\"" >&5
20288echo "${ECHO_T}\"$cf_result\"" >&6
20289
20290cat >>confdefs.h <<EOF
20291#define setbegyx(win,y,x) $cf_result
20292EOF
20293
20294cf_libname=\${LIB_BASENAME}
20295cf_liblink=$cf_libname
20296cf_libroot=$cf_libname
20297
20298if test "x$cf_cv_do_symlinks" = xyes
20299then
20300	case "x$cf_cv_shlib_version" in
20301	(xrel)
20302		cf_liblink="\${LIB_ABI_NAME}"
20303		cf_libname="\${LIB_REL_NAME}"
20304		;;
20305	(xabi)
20306		cf_liblink="\${LIB_REL_NAME}"
20307		cf_libname="\${LIB_ABI_NAME}"
20308		;;
20309	esac
20310fi
20311LIB_TARGET=$cf_libname
20312
20313SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
20314LIB_BASENAME	= \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
20315LIB_REL_NAME	= \${LIB_BASENAME}.\${REL_VERSION}\\
20316LIB_ABI_NAME	= \${LIB_BASENAME}.\${ABI_VERSION}\\
20317LIB_TARGET	= $LIB_TARGET\\
20318RM_SHARED_OPTS	= $RM_SHARED_OPTS\\
20319# end CF__DEFINE_SHLIB_VARS"
20320
20321ac_config_files="$ac_config_files cdk-config include/cdk_version.h:include/cdk_version.hin Makefile cli/Makefile examples/Makefile demos/Makefile"
20322ac_config_commands="$ac_config_commands default"
20323cat >confcache <<\_ACEOF
20324# This file is a shell script that caches the results of configure
20325# tests run on this system so they can be shared between configure
20326# scripts and configure runs, see configure's option --config-cache.
20327# It is not useful on other systems.  If it contains results you don't
20328# want to keep, you may remove or edit it.
20329#
20330# config.status only pays attention to the cache file if you give it
20331# the --recheck option to rerun configure.
20332#
20333# `ac_cv_env_foo' variables (set or unset) will be overriden when
20334# loading this file, other *unset* `ac_cv_foo' will be assigned the
20335# following values.
20336
20337_ACEOF
20338
20339# The following way of writing the cache mishandles newlines in values,
20340# but we know of no workaround that is simple, portable, and efficient.
20341# So, don't put newlines in cache variables' values.
20342# Ultrix sh set writes to stderr and can't be redirected directly,
20343# and sets the high bit in the cache file unless we assign to the vars.
20344{
20345  (set) 2>&1 |
20346    case `(ac_space=' '; set | grep ac_space) 2>&1` in
20347    *ac_space=\ *)
20348      # `set' does not quote correctly, so add quotes (double-quote
20349      # substitution turns \\\\ into \\, and sed turns \\ into \).
20350      sed -n \
20351        "s/'/'\\\\''/g;
20352    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20353      ;;
20354    *)
20355      # `set' quotes correctly as required by POSIX, so do not add quotes.
20356      sed -n \
20357        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20358      ;;
20359    esac;
20360} |
20361  sed '
20362     t clear
20363     : clear
20364     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20365     t end
20366     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20367     : end' >>confcache
20368if cmp -s $cache_file confcache; then :; else
20369  if test -w $cache_file; then
20370    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20371    cat confcache >$cache_file
20372  else
20373    echo "not updating unwritable cache $cache_file"
20374  fi
20375fi
20376rm -f confcache
20377
20378test "x$prefix" = xNONE && prefix=$ac_default_prefix
20379# Let make expand exec_prefix.
20380test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20381
20382# VPATH may cause trouble with some makes, so we remove $(srcdir),
20383# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20384# trailing colons and then remove the whole line if VPATH becomes empty
20385# (actually we leave an empty line to preserve line numbers).
20386if test "x$srcdir" = x.; then
20387  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
20388s/:*\$(srcdir):*/:/;
20389s/:*\${srcdir}:*/:/;
20390s/:*@srcdir@:*/:/;
20391s/^\([^=]*=[ 	]*\):*/\1/;
20392s/:*$//;
20393s/^[^=]*=[ 	]*$//;
20394}'
20395fi
20396
20397DEFS=-DHAVE_CONFIG_H
20398
20399: ${CONFIG_STATUS=./config.status}
20400ac_clean_files_save=$ac_clean_files
20401ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20402{ echo "$as_me:20402: creating $CONFIG_STATUS" >&5
20403echo "$as_me: creating $CONFIG_STATUS" >&6;}
20404cat >$CONFIG_STATUS <<_ACEOF
20405#! $SHELL
20406# Generated automatically by configure.
20407# Run this file to recreate the current configuration.
20408# Compiler output produced by configure, useful for debugging
20409# configure, is in config.log if it exists.
20410
20411debug=false
20412SHELL=\${CONFIG_SHELL-$SHELL}
20413ac_cs_invocation="\$0 \$@"
20414
20415CLICOLOR_FORCE= GREP_OPTIONS=
20416unset CLICOLOR_FORCE GREP_OPTIONS
20417_ACEOF
20418
20419cat >>$CONFIG_STATUS <<\_ACEOF
20420# Be Bourne compatible
20421if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20422  emulate sh
20423  NULLCMD=:
20424elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20425  set -o posix
20426fi
20427
20428# Name of the executable.
20429as_me=`echo "$0" |sed 's,.*[\\/],,'`
20430
20431if expr a : '\(a\)' >/dev/null 2>&1; then
20432  as_expr=expr
20433else
20434  as_expr=false
20435fi
20436
20437rm -f conf$$ conf$$.exe conf$$.file
20438echo >conf$$.file
20439if ln -s conf$$.file conf$$ 2>/dev/null; then
20440  # We could just check for DJGPP; but this test a) works b) is more generic
20441  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20442  if test -f conf$$.exe; then
20443    # Don't use ln at all; we don't have any links
20444    as_ln_s='cp -p'
20445  else
20446    as_ln_s='ln -s'
20447  fi
20448elif ln conf$$.file conf$$ 2>/dev/null; then
20449  as_ln_s=ln
20450else
20451  as_ln_s='cp -p'
20452fi
20453rm -f conf$$ conf$$.exe conf$$.file
20454
20455as_executable_p="test -f"
20456
20457# Support unset when possible.
20458if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20459  as_unset=unset
20460else
20461  as_unset=false
20462fi
20463
20464# NLS nuisances.
20465$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20466$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20467$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20468$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20469$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20470$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20471$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20472$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20473
20474# IFS
20475# We need space, tab and new line, in precisely that order.
20476as_nl='
20477'
20478IFS=" 	$as_nl"
20479
20480# CDPATH.
20481$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20482
20483exec 6>&1
20484
20485_ACEOF
20486
20487# Files that config.status was made for.
20488if test -n "$ac_config_files"; then
20489  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20490fi
20491
20492if test -n "$ac_config_headers"; then
20493  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20494fi
20495
20496if test -n "$ac_config_links"; then
20497  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20498fi
20499
20500if test -n "$ac_config_commands"; then
20501  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20502fi
20503
20504cat >>$CONFIG_STATUS <<\EOF
20505
20506ac_cs_usage="\
20507\`$as_me' instantiates files from templates according to the
20508current configuration.
20509
20510Usage: $0 [OPTIONS] [FILE]...
20511
20512  -h, --help       print this help, then exit
20513  -V, --version    print version number, then exit
20514  -d, --debug      don't remove temporary files
20515      --recheck    update $as_me by reconfiguring in the same conditions
20516  --file=FILE[:TEMPLATE]
20517                   instantiate the configuration file FILE
20518  --header=FILE[:TEMPLATE]
20519                   instantiate the configuration header FILE
20520
20521Configuration files:
20522$config_files
20523
20524Configuration headers:
20525$config_headers
20526
20527Configuration commands:
20528$config_commands
20529
20530Report bugs to <dickey@invisible-island.net>."
20531EOF
20532
20533cat >>$CONFIG_STATUS <<EOF
20534ac_cs_version="\\
20535config.status
20536configured by $0, generated by GNU Autoconf 2.52.20200802,
20537  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20538
20539Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20540Free Software Foundation, Inc.
20541This config.status script is free software; the Free Software Foundation
20542gives unlimited permission to copy, distribute and modify it."
20543srcdir=$srcdir
20544INSTALL="$INSTALL"
20545EOF
20546
20547cat >>$CONFIG_STATUS <<\EOF
20548# If no file are specified by the user, then we need to provide default
20549# value.  By we need to know if files were specified by the user.
20550ac_need_defaults=:
20551while test $# != 0
20552do
20553  case $1 in
20554  --*=*)
20555    ac_option=`expr "x$1" : 'x\([^=]*\)='`
20556    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20557    shift
20558    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20559    shift
20560    ;;
20561  -*);;
20562  *) # This is not an option, so the user has probably given explicit
20563     # arguments.
20564     ac_need_defaults=false;;
20565  esac
20566
20567  case $1 in
20568  # Handling of the options.
20569EOF
20570cat >>$CONFIG_STATUS <<EOF
20571  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20572    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20573    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20574EOF
20575cat >>$CONFIG_STATUS <<\EOF
20576  --version | --vers* | -V )
20577    echo "$ac_cs_version"; exit 0 ;;
20578  --he | --h)
20579    # Conflict between --help and --header
20580    { { echo "$as_me:20580: error: ambiguous option: $1
20581Try \`$0 --help' for more information." >&5
20582echo "$as_me: error: ambiguous option: $1
20583Try \`$0 --help' for more information." >&2;}
20584   { (exit 1); exit 1; }; };;
20585  --help | --hel | -h )
20586    echo "$ac_cs_usage"; exit 0 ;;
20587  --debug | --d* | -d )
20588    debug=: ;;
20589  --file | --fil | --fi | --f )
20590    shift
20591    CONFIG_FILES="$CONFIG_FILES $1"
20592    ac_need_defaults=false;;
20593  --header | --heade | --head | --hea )
20594    shift
20595    CONFIG_HEADERS="$CONFIG_HEADERS $1"
20596    ac_need_defaults=false;;
20597
20598  # This is an error.
20599  -*) { { echo "$as_me:20599: error: unrecognized option: $1
20600Try \`$0 --help' for more information." >&5
20601echo "$as_me: error: unrecognized option: $1
20602Try \`$0 --help' for more information." >&2;}
20603   { (exit 1); exit 1; }; } ;;
20604
20605  *) ac_config_targets="$ac_config_targets $1" ;;
20606
20607  esac
20608  shift
20609done
20610
20611exec 5>>config.log
20612cat >&5 << _ACEOF
20613
20614## ----------------------- ##
20615## Running config.status.  ##
20616## ----------------------- ##
20617
20618This file was extended by $as_me 2.52.20200802, executed with
20619  CONFIG_FILES    = $CONFIG_FILES
20620  CONFIG_HEADERS  = $CONFIG_HEADERS
20621  CONFIG_LINKS    = $CONFIG_LINKS
20622  CONFIG_COMMANDS = $CONFIG_COMMANDS
20623  > $ac_cs_invocation
20624on `(hostname || uname -n) 2>/dev/null | sed 1q`
20625
20626_ACEOF
20627EOF
20628
20629cat >>$CONFIG_STATUS <<EOF
20630#
20631# INIT-COMMANDS section.
20632#
20633
20634ABI_VERSION="$ABI_VERSION"
20635REL_VERSION="$REL_VERSION"
20636LIB_MODEL="$LIB_MODEL"
20637LIB_PREFIX="$LIB_PREFIX"
20638LIB_ROOTNAME="$LIB_ROOTNAME"
20639DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
20640RM_SHARED_OPTS="$RM_SHARED_OPTS"
20641cf_cv_do_symlinks="$cf_cv_do_symlinks"
20642cf_cv_shlib_version="$cf_cv_shlib_version"
20643
20644EOF
20645
20646cat >>$CONFIG_STATUS <<\EOF
20647for ac_config_target in $ac_config_targets
20648do
20649  case "$ac_config_target" in
20650  # Handling of arguments.
20651  "cdk-config" ) CONFIG_FILES="$CONFIG_FILES cdk-config" ;;
20652  "include/cdk_version.h" ) CONFIG_FILES="$CONFIG_FILES include/cdk_version.h:include/cdk_version.hin" ;;
20653  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20654  "cli/Makefile" ) CONFIG_FILES="$CONFIG_FILES cli/Makefile" ;;
20655  "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
20656  "demos/Makefile" ) CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;;
20657  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20658  "include/cdk_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/cdk_config.h:include/config.hin" ;;
20659  *) { { echo "$as_me:20659: error: invalid argument: $ac_config_target" >&5
20660echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20661   { (exit 1); exit 1; }; };;
20662  esac
20663done
20664
20665# If the user did not use the arguments to specify the items to instantiate,
20666# then the envvar interface is used.  Set only those that are not.
20667# We use the long form for the default assignment because of an extremely
20668# bizarre bug on SunOS 4.1.3.
20669if $ac_need_defaults; then
20670  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20671  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20672  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20673fi
20674
20675# Create a temporary directory, and hook for its removal unless debugging.
20676$debug ||
20677{
20678  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20679  trap '{ (exit 1); exit 1; }' 1 2 13 15
20680}
20681
20682# Create a (secure) tmp directory for tmp files.
20683: ${TMPDIR=/tmp}
20684{
20685  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20686  test -n "$tmp" && test -d "$tmp"
20687}  ||
20688{
20689  tmp=$TMPDIR/cs$$-$RANDOM
20690  (umask 077 && mkdir $tmp)
20691} ||
20692{
20693   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20694   { (exit 1); exit 1; }
20695}
20696
20697EOF
20698
20699cat >>$CONFIG_STATUS <<EOF
20700
20701#
20702# CONFIG_FILES section.
20703#
20704
20705# No need to generate the scripts if there are no CONFIG_FILES.
20706# This happens for instance when ./config.status config.h
20707if test -n "\$CONFIG_FILES"; then
20708  # Protect against being on the right side of a sed subst in config.status.
20709  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20710   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20711s,@SHELL@,$SHELL,;t t
20712s,@exec_prefix@,$exec_prefix,;t t
20713s,@prefix@,$prefix,;t t
20714s,@program_transform_name@,$program_transform_name,;t t
20715s,@bindir@,$bindir,;t t
20716s,@sbindir@,$sbindir,;t t
20717s,@libexecdir@,$libexecdir,;t t
20718s,@datarootdir@,$datarootdir,;t t
20719s,@datadir@,$datadir,;t t
20720s,@sysconfdir@,$sysconfdir,;t t
20721s,@sharedstatedir@,$sharedstatedir,;t t
20722s,@localstatedir@,$localstatedir,;t t
20723s,@runstatedir@,$runstatedir,;t t
20724s,@libdir@,$libdir,;t t
20725s,@includedir@,$includedir,;t t
20726s,@oldincludedir@,$oldincludedir,;t t
20727s,@infodir@,$infodir,;t t
20728s,@mandir@,$mandir,;t t
20729s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20730s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20731s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20732s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20733s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20734s,@build_alias@,$build_alias,;t t
20735s,@host_alias@,$host_alias,;t t
20736s,@target_alias@,$target_alias,;t t
20737s,@ECHO_C@,$ECHO_C,;t t
20738s,@ECHO_N@,$ECHO_N,;t t
20739s,@ECHO_T@,$ECHO_T,;t t
20740s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20741s,@DEFS@,$DEFS,;t t
20742s,@LIBS@,$LIBS,;t t
20743s,@build@,$build,;t t
20744s,@build_cpu@,$build_cpu,;t t
20745s,@build_vendor@,$build_vendor,;t t
20746s,@build_os@,$build_os,;t t
20747s,@host@,$host,;t t
20748s,@host_cpu@,$host_cpu,;t t
20749s,@host_vendor@,$host_vendor,;t t
20750s,@host_os@,$host_os,;t t
20751s,@VERSION@,$VERSION,;t t
20752s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
20753s,@VERSION_MINOR@,$VERSION_MINOR,;t t
20754s,@VERSION_PATCH@,$VERSION_PATCH,;t t
20755s,@PACKAGE@,$PACKAGE,;t t
20756s,@top_builddir@,$top_builddir,;t t
20757s,@CC@,$CC,;t t
20758s,@CFLAGS@,$CFLAGS,;t t
20759s,@LDFLAGS@,$LDFLAGS,;t t
20760s,@CPPFLAGS@,$CPPFLAGS,;t t
20761s,@ac_ct_CC@,$ac_ct_CC,;t t
20762s,@EXEEXT@,$EXEEXT,;t t
20763s,@OBJEXT@,$OBJEXT,;t t
20764s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20765s,@CPP@,$CPP,;t t
20766s,@RANLIB@,$RANLIB,;t t
20767s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20768s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20769s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20770s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20771s,@LN_S@,$LN_S,;t t
20772s,@LINT@,$LINT,;t t
20773s,@LINT_OPTS@,$LINT_OPTS,;t t
20774s,@AR@,$AR,;t t
20775s,@ac_ct_AR@,$ac_ct_AR,;t t
20776s,@SET_MAKE@,$SET_MAKE,;t t
20777s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20778s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
20779s,@MAKE_PHONY@,$MAKE_PHONY,;t t
20780s,@CTAGS@,$CTAGS,;t t
20781s,@ETAGS@,$ETAGS,;t t
20782s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20783s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20784s,@ECHO_LT@,$ECHO_LT,;t t
20785s,@ECHO_LD@,$ECHO_LD,;t t
20786s,@RULE_CC@,$RULE_CC,;t t
20787s,@SHOW_CC@,$SHOW_CC,;t t
20788s,@ECHO_CC@,$ECHO_CC,;t t
20789s,@PROG_EXT@,$PROG_EXT,;t t
20790s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20791s,@MAN_TAG@,$MAN_TAG,;t t
20792s,@MANSECT@,$MANSECT,;t t
20793s,@X_CFLAGS@,$X_CFLAGS,;t t
20794s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20795s,@X_LIBS@,$X_LIBS,;t t
20796s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20797s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20798s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20799s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20800s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20801s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20802s,@ABI_VERSION@,$ABI_VERSION,;t t
20803s,@REL_VERSION@,$REL_VERSION,;t t
20804s,@shlibdir@,$shlibdir,;t t
20805s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20806s,@LIBTOOL@,$LIBTOOL,;t t
20807s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
20808s,@LT_UNDEF@,$LT_UNDEF,;t t
20809s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20810s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20811s,@LIB_CREATE@,$LIB_CREATE,;t t
20812s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20813s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20814s,@LIB_PREP@,$LIB_PREP,;t t
20815s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20816s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20817s,@LIB_LINK@,$LIB_LINK,;t t
20818s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20819s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20820s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
20821s,@MAKE_DLLS@,$MAKE_DLLS,;t t
20822s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20823s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20824s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20825s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20826s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
20827s,@LINK_PROGS@,$LINK_PROGS,;t t
20828s,@LINK_TESTS@,$LINK_TESTS,;t t
20829s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20830s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20831s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20832s,@RPATH_LIST@,$RPATH_LIST,;t t
20833s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
20834s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
20835s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
20836s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20837s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
20838s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20839s,@LIB_MODEL@,$LIB_MODEL,;t t
20840s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
20841s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
20842s,@MAKE_SHARED@,$MAKE_SHARED,;t t
20843s,@MAKE_STATIC@,$MAKE_STATIC,;t t
20844s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
20845s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
20846s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
20847s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
20848s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
20849s,@HDR_SUBDIR@,$HDR_SUBDIR,;t t
20850s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
20851s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
20852s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
20853s,@LIB_TARGET@,$LIB_TARGET,;t t
20854CEOF
20855
20856EOF
20857
20858  cat >>$CONFIG_STATUS <<\EOF
20859  # Split the substitutions into bite-sized pieces for seds with
20860  # small command number limits, like on Digital OSF/1 and HP-UX.
20861  ac_max_sed_lines=48
20862  ac_sed_frag=1 # Number of current file.
20863  ac_beg=1 # First line for current file.
20864  ac_end=$ac_max_sed_lines # Line after last line for current file.
20865  ac_more_lines=:
20866  ac_sed_cmds=
20867  while $ac_more_lines; do
20868    if test $ac_beg -gt 1; then
20869      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20870    else
20871      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20872    fi
20873    if test ! -s $tmp/subs.frag; then
20874      ac_more_lines=false
20875    else
20876      # The purpose of the label and of the branching condition is to
20877      # speed up the sed processing (if there are no `@' at all, there
20878      # is no need to browse any of the substitutions).
20879      # These are the two extra sed commands mentioned above.
20880      (echo ':t
20881  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20882      # It is possible to make a multiline substitution using escaped newlines.
20883      # Ensure that we do not split the substitution between script fragments.
20884      ac_BEG=$ac_end
20885      ac_END=`expr $ac_end + $ac_max_sed_lines`
20886      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
20887      if test -s $tmp/subs.next; then
20888        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
20889        if test ! -s $tmp/subs.edit; then
20890          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
20891          if test ! -s $tmp/subs.edit; then
20892            if test $ac_beg -gt 1; then
20893              ac_end=`expr $ac_end - 1`
20894              continue
20895            fi
20896          fi
20897        fi
20898      fi
20899
20900      if test -z "$ac_sed_cmds"; then
20901        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20902      else
20903        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20904      fi
20905      ac_sed_frag=`expr $ac_sed_frag + 1`
20906      ac_beg=$ac_end
20907      ac_end=`expr $ac_end + $ac_max_sed_lines`
20908    fi
20909  done
20910  if test -z "$ac_sed_cmds"; then
20911    ac_sed_cmds=cat
20912  fi
20913fi # test -n "$CONFIG_FILES"
20914
20915EOF
20916cat >>$CONFIG_STATUS <<\EOF
20917for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20918  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20919  case $ac_file in
20920  - | *:- | *:-:* ) # input from stdin
20921        cat >$tmp/stdin
20922        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20923        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20924  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20925        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20926  * )   ac_file_in=$ac_file.in ;;
20927  esac
20928
20929  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20930  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20931         X"$ac_file" : 'X\(//\)[^/]' \| \
20932         X"$ac_file" : 'X\(//\)$' \| \
20933         X"$ac_file" : 'X\(/\)' \| \
20934         .     : '\(.\)' 2>/dev/null ||
20935echo X"$ac_file" |
20936    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20937  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20938  	  /^X\(\/\/\)$/{ s//\1/; q; }
20939  	  /^X\(\/\).*/{ s//\1/; q; }
20940  	  s/.*/./; q'`
20941  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20942    { case "$ac_dir" in
20943  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20944  *)                      as_incr_dir=.;;
20945esac
20946as_dummy="$ac_dir"
20947for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20948  case $as_mkdir_dir in
20949    # Skip DOS drivespec
20950    ?:) as_incr_dir=$as_mkdir_dir ;;
20951    *)
20952      as_incr_dir=$as_incr_dir/$as_mkdir_dir
20953      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20954    ;;
20955  esac
20956done; }
20957
20958    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20959    # A "../" for each directory in $ac_dir_suffix.
20960    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20961  else
20962    ac_dir_suffix= ac_dots=
20963  fi
20964
20965  case $srcdir in
20966  .)  ac_srcdir=.
20967      if test -z "$ac_dots"; then
20968         ac_top_srcdir=.
20969      else
20970         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20971      fi ;;
20972  [\\/]* | ?:[\\/]* )
20973      ac_srcdir=$srcdir$ac_dir_suffix;
20974      ac_top_srcdir=$srcdir ;;
20975  *) # Relative path.
20976    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20977    ac_top_srcdir=$ac_dots$srcdir ;;
20978  esac
20979
20980  case $INSTALL in
20981  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20982  *) ac_INSTALL=$ac_dots$INSTALL ;;
20983  esac
20984
20985  if test x"$ac_file" != x-; then
20986    { echo "$as_me:20986: creating $ac_file" >&5
20987echo "$as_me: creating $ac_file" >&6;}
20988    rm -f "$ac_file"
20989  fi
20990  # Let's still pretend it is `configure' which instantiates (i.e., don't
20991  # use $as_me), people would be surprised to read:
20992  #    /* config.h.  Generated automatically by config.status.  */
20993  configure_input="Generated automatically from `echo $ac_file_in |
20994                                                 sed 's,.*/,,'` by configure."
20995
20996  # First look for the input files in the build tree, otherwise in the
20997  # src tree.
20998  ac_file_inputs=`IFS=:
20999    for f in $ac_file_in; do
21000      case $f in
21001      -) echo $tmp/stdin ;;
21002      [\\/$]*)
21003         # Absolute (can't be DOS-style, as IFS=:)
21004         test -f "$f" || { { echo "$as_me:21004: error: cannot find input file: $f" >&5
21005echo "$as_me: error: cannot find input file: $f" >&2;}
21006   { (exit 1); exit 1; }; }
21007         echo $f;;
21008      *) # Relative
21009         if test -f "$f"; then
21010           # Build tree
21011           echo $f
21012         elif test -f "$srcdir/$f"; then
21013           # Source tree
21014           echo $srcdir/$f
21015         else
21016           # /dev/null tree
21017           { { echo "$as_me:21017: error: cannot find input file: $f" >&5
21018echo "$as_me: error: cannot find input file: $f" >&2;}
21019   { (exit 1); exit 1; }; }
21020         fi;;
21021      esac
21022    done` || { (exit 1); exit 1; }
21023EOF
21024cat >>$CONFIG_STATUS <<\EOF
21025  ac_warn_datarootdir=no
21026  if test x"$ac_file" != x-; then
21027    for ac_item in $ac_file_inputs
21028    do
21029      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21030      if test -n "$ac_seen"; then
21031        ac_used=`grep '@datarootdir@' $ac_item`
21032        if test -z "$ac_used"; then
21033          { echo "$as_me:21033: WARNING: datarootdir was used implicitly but not set:
21034$ac_seen" >&5
21035echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21036$ac_seen" >&2;}
21037          ac_warn_datarootdir=yes
21038        fi
21039      fi
21040      ac_seen=`grep '${datarootdir}' $ac_item`
21041      if test -n "$ac_seen"; then
21042        { echo "$as_me:21042: WARNING: datarootdir was used explicitly but not set:
21043$ac_seen" >&5
21044echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21045$ac_seen" >&2;}
21046        ac_warn_datarootdir=yes
21047      fi
21048    done
21049  fi
21050
21051if test "x$ac_warn_datarootdir" = xyes; then
21052  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21053fi
21054
21055EOF
21056cat >>$CONFIG_STATUS <<EOF
21057  sed "$ac_vpsub
21058$extrasub
21059EOF
21060cat >>$CONFIG_STATUS <<\EOF
21061:t
21062/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21063s,@configure_input@,$configure_input,;t t
21064s,@srcdir@,$ac_srcdir,;t t
21065s,@top_srcdir@,$ac_top_srcdir,;t t
21066s,@INSTALL@,$ac_INSTALL,;t t
21067" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21068  rm -f $tmp/stdin
21069  if test x"$ac_file" != x-; then
21070    cp $tmp/out $ac_file
21071
21072    for ac_name in prefix exec_prefix datarootdir
21073    do
21074        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21075        if test -n "$ac_seen"; then
21076            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
21077            if test -z "$ac_init"; then
21078              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21079              { echo "$as_me:21079: WARNING: Variable $ac_name is used but was not set:
21080$ac_seen" >&5
21081echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21082$ac_seen" >&2;}
21083            fi
21084        fi
21085    done
21086    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21087    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21088    if test -s $tmp/out; then
21089      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21090      { echo "$as_me:21090: WARNING: Some variables may not be substituted:
21091$ac_seen" >&5
21092echo "$as_me: WARNING: Some variables may not be substituted:
21093$ac_seen" >&2;}
21094    fi
21095  else
21096    cat $tmp/out
21097  fi
21098  rm -f $tmp/out
21099
21100done
21101EOF
21102cat >>$CONFIG_STATUS <<\EOF
21103
21104#
21105# CONFIG_HEADER section.
21106#
21107
21108# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21109# NAME is the cpp macro being defined and VALUE is the value it is being given.
21110#
21111# ac_d sets the value in "#define NAME VALUE" lines.
21112ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
21113ac_dB='[ 	].*$,\1#\2'
21114ac_dC=' '
21115ac_dD=',;t'
21116# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21117ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
21118ac_iB='\([ 	]\),\1#\2define\3'
21119ac_iC=' '
21120ac_iD='\4,;t'
21121# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21122ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
21123ac_uB='$,\1#\2define\3'
21124ac_uC=' '
21125ac_uD=',;t'
21126
21127for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21128  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21129  case $ac_file in
21130  - | *:- | *:-:* ) # input from stdin
21131        cat >$tmp/stdin
21132        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21133        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21134  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21135        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21136  * )   ac_file_in=$ac_file.in ;;
21137  esac
21138
21139  test x"$ac_file" != x- && { echo "$as_me:21139: creating $ac_file" >&5
21140echo "$as_me: creating $ac_file" >&6;}
21141
21142  # First look for the input files in the build tree, otherwise in the
21143  # src tree.
21144  ac_file_inputs=`IFS=:
21145    for f in $ac_file_in; do
21146      case $f in
21147      -) echo $tmp/stdin ;;
21148      [\\/$]*)
21149         # Absolute (can't be DOS-style, as IFS=:)
21150         test -f "$f" || { { echo "$as_me:21150: error: cannot find input file: $f" >&5
21151echo "$as_me: error: cannot find input file: $f" >&2;}
21152   { (exit 1); exit 1; }; }
21153         echo $f;;
21154      *) # Relative
21155         if test -f "$f"; then
21156           # Build tree
21157           echo $f
21158         elif test -f "$srcdir/$f"; then
21159           # Source tree
21160           echo $srcdir/$f
21161         else
21162           # /dev/null tree
21163           { { echo "$as_me:21163: error: cannot find input file: $f" >&5
21164echo "$as_me: error: cannot find input file: $f" >&2;}
21165   { (exit 1); exit 1; }; }
21166         fi;;
21167      esac
21168    done` || { (exit 1); exit 1; }
21169  # Remove the trailing spaces.
21170  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
21171
21172EOF
21173
21174# Transform confdefs.h into a list of #define's.  We won't use it as a sed
21175# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21176# be either 'cat' or 'sort'.
21177sort confdefs.h | uniq >conftest.vals
21178
21179# Break up conftest.vals because some shells have a limit on
21180# the size of here documents, and old seds have small limits too.
21181
21182rm -f conftest.tail
21183echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21184while grep . conftest.vals >/dev/null
21185do
21186  # Write chunks of a limited-size here document to conftest.frag.
21187  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21188  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21189  echo 'CEOF' >> $CONFIG_STATUS
21190  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21191  rm -f conftest.vals
21192  mv conftest.tail conftest.vals
21193done
21194rm -f conftest.vals
21195
21196# Run sed to substitute the contents of conftest.frag into $tmp/in at the
21197# marker @DEFS@.
21198echo '  cat >> conftest.edit <<CEOF
21199/@DEFS@/r conftest.frag
21200/@DEFS@/d
21201CEOF
21202sed -f conftest.edit $tmp/in > $tmp/out
21203rm -f $tmp/in
21204mv $tmp/out $tmp/in
21205rm -f conftest.edit conftest.frag
21206' >> $CONFIG_STATUS
21207
21208cat >>$CONFIG_STATUS <<\EOF
21209  # Let's still pretend it is `configure' which instantiates (i.e., don't
21210  # use $as_me), people would be surprised to read:
21211  #    /* config.h.  Generated automatically by config.status.  */
21212  if test x"$ac_file" = x-; then
21213    echo "/* Generated automatically by configure.  */" >$tmp/config.h
21214  else
21215    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21216  fi
21217  cat $tmp/in >>$tmp/config.h
21218  rm -f $tmp/in
21219  if test x"$ac_file" != x-; then
21220    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21221      { echo "$as_me:21221: $ac_file is unchanged" >&5
21222echo "$as_me: $ac_file is unchanged" >&6;}
21223    else
21224      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21225         X"$ac_file" : 'X\(//\)[^/]' \| \
21226         X"$ac_file" : 'X\(//\)$' \| \
21227         X"$ac_file" : 'X\(/\)' \| \
21228         .     : '\(.\)' 2>/dev/null ||
21229echo X"$ac_file" |
21230    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21231  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21232  	  /^X\(\/\/\)$/{ s//\1/; q; }
21233  	  /^X\(\/\).*/{ s//\1/; q; }
21234  	  s/.*/./; q'`
21235      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21236        { case "$ac_dir" in
21237  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21238  *)                      as_incr_dir=.;;
21239esac
21240as_dummy="$ac_dir"
21241for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21242  case $as_mkdir_dir in
21243    # Skip DOS drivespec
21244    ?:) as_incr_dir=$as_mkdir_dir ;;
21245    *)
21246      as_incr_dir=$as_incr_dir/$as_mkdir_dir
21247      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21248    ;;
21249  esac
21250done; }
21251
21252      fi
21253      rm -f $ac_file
21254      mv $tmp/config.h $ac_file
21255    fi
21256  else
21257    cat $tmp/config.h
21258    rm -f $tmp/config.h
21259  fi
21260done
21261EOF
21262cat >>$CONFIG_STATUS <<\EOF
21263#
21264# CONFIG_COMMANDS section.
21265#
21266for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21267  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21268  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21269
21270  case $ac_dest in
21271    default )
21272
21273cf_libname=\${LIB_BASENAME}
21274cf_liblink=$cf_libname
21275cf_libroot=$cf_libname
21276
21277if test "x$cf_cv_do_symlinks" = xyes
21278then
21279	case "x$cf_cv_shlib_version" in
21280	(xrel)
21281		cf_liblink="\${LIB_ABI_NAME}"
21282		cf_libname="\${LIB_REL_NAME}"
21283		;;
21284	(xabi)
21285		cf_liblink="\${LIB_REL_NAME}"
21286		cf_libname="\${LIB_ABI_NAME}"
21287		;;
21288	esac
21289fi
21290LIB_TARGET=$cf_libname
21291
21292case x$LIB_MODEL in
21293(xlibtool|xshared)
21294	cf_libdeps="\${LIBS} \${LDFLAGS}"
21295	;;
21296(x*)
21297	cf_libdeps=
21298	;;
21299esac
21300
21301cat >>Makefile <<CF_EOF
21302
21303# generated by CF__ADD_SHLIB_RULES
21304# libmodel: $LIB_MODEL
21305# symlinks: $cf_cv_do_symlinks
21306# shlibver: $cf_cv_shlib_version
21307
21308CF_EOF
21309
21310cat >>Makefile <<CF_EOF
21311$cf_libname :: \\
21312CF_EOF
21313
21314cat >>Makefile <<CF_EOF
21315		\${LIB_OBJECT}
21316	@echo linking \$@
21317	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
21318CF_EOF
21319
21320if test "x$cf_cv_do_symlinks" = xyes
21321then
21322cat >>Makefile <<CF_EOF
21323	\$(LN_S) $cf_libname $cf_liblink
21324	\$(LN_S) $cf_liblink $cf_libroot
21325CF_EOF
21326fi
21327
21328cat >>Makefile <<CF_EOF
21329
21330install \\
21331install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
21332
21333\$(DESTDIR)\$(libdir)/$cf_libname :: \\
21334		\$(DESTDIR)\$(libdir) \\
21335		\${LIB_OBJECT}
21336	@echo linking \$@
21337	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
21338CF_EOF
21339
21340if test "x$cf_cv_do_symlinks" = xyes
21341then
21342cat >>Makefile <<CF_EOF
21343	cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
21344CF_EOF
21345fi
21346
21347if test x$LIB_MODEL = xshared
21348then
21349cat >>Makefile <<CF_EOF
21350	- \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
21351CF_EOF
21352fi
21353
21354cat >>Makefile <<CF_EOF
21355
21356uninstall \\
21357uninstall.libs ::
21358	@echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
21359CF_EOF
21360
21361if test "x$cf_cv_do_symlinks" = xyes
21362then
21363cat >>Makefile <<CF_EOF
21364	-rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
21365	-rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
21366CF_EOF
21367fi
21368
21369cat >>Makefile <<CF_EOF
21370	-rm -f \$(DESTDIR)\$(libdir)/$cf_libname
21371
21372clean \\
21373clean.libs ::
21374CF_EOF
21375
21376if test "x$cf_cv_do_symlinks" = xyes
21377then
21378cat >>Makefile <<CF_EOF
21379	-rm -f $cf_libroot
21380	-rm -f $cf_liblink
21381CF_EOF
21382fi
21383
21384cat >>Makefile <<CF_EOF
21385	-rm -f $cf_libname
21386
21387mostlyclean::
21388	-rm -f \${LIB_OBJECT}
21389# end generated by CF__ADD_SHLIB_RULES
21390CF_EOF
21391
21392 ;;
21393  esac
21394done
21395EOF
21396
21397cat >>$CONFIG_STATUS <<\EOF
21398
21399{ (exit 0); exit 0; }
21400EOF
21401chmod +x $CONFIG_STATUS
21402ac_clean_files=$ac_clean_files_save
21403
21404# configure is writing to config.log, and then calls config.status.
21405# config.status does its own redirection, appending to config.log.
21406# Unfortunately, on DOS this fails, as config.log is still kept open
21407# by configure, so config.status won't be able to write to it; its
21408# output is simply discarded.  So we exec the FD to /dev/null,
21409# effectively closing config.log, so it can be properly (re)opened and
21410# appended to by config.status.  When coming back to configure, we
21411# need to make the FD available again.
21412if test "$no_create" != yes; then
21413  ac_cs_success=:
21414  exec 5>/dev/null
21415  $SHELL $CONFIG_STATUS || ac_cs_success=false
21416  exec 5>>config.log
21417  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21418  # would make configure fail if this is the last instruction.
21419  $ac_cs_success || { (exit 1); exit 1; }
21420fi
21421
21422