xref: /freebsd/contrib/dialog/configure (revision 732a02b4e77866604a120a275c082bb6221bd2ff)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20170501.
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="dialog.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'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${datarootdir}/info'
182mandir='${datarootdir}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234  | --dataroo | --dataro | --datar)
235    ac_prev=datarootdir ;;
236  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238    datarootdir=$ac_optarg ;;
239
240  -disable-* | --disable-*)
241    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242    # Reject names that are not valid shell variable names.
243    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245   { (exit 1); exit 1; }; }
246    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247    eval "enable_$ac_feature=no" ;;
248
249  -enable-* | --enable-*)
250    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251    # Reject names that are not valid shell variable names.
252    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254   { (exit 1); exit 1; }; }
255    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256    case $ac_option in
257      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258      *) ac_optarg=yes ;;
259    esac
260    eval "enable_$ac_feature='$ac_optarg'" ;;
261
262  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264  | --exec | --exe | --ex)
265    ac_prev=exec_prefix ;;
266  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268  | --exec=* | --exe=* | --ex=*)
269    exec_prefix=$ac_optarg ;;
270
271  -gas | --gas | --ga | --g)
272    # Obsolete; use --with-gas.
273    with_gas=yes ;;
274
275  -help | --help | --hel | --he | -h)
276    ac_init_help=long ;;
277  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278    ac_init_help=recursive ;;
279  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280    ac_init_help=short ;;
281
282  -host | --host | --hos | --ho)
283    ac_prev=host_alias ;;
284  -host=* | --host=* | --hos=* | --ho=*)
285    host_alias=$ac_optarg ;;
286
287  -includedir | --includedir | --includedi | --included | --include \
288  | --includ | --inclu | --incl | --inc)
289    ac_prev=includedir ;;
290  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291  | --includ=* | --inclu=* | --incl=* | --inc=*)
292    includedir=$ac_optarg ;;
293
294  -infodir | --infodir | --infodi | --infod | --info | --inf)
295    ac_prev=infodir ;;
296  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297    infodir=$ac_optarg ;;
298
299  -libdir | --libdir | --libdi | --libd)
300    ac_prev=libdir ;;
301  -libdir=* | --libdir=* | --libdi=* | --libd=*)
302    libdir=$ac_optarg ;;
303
304  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305  | --libexe | --libex | --libe)
306    ac_prev=libexecdir ;;
307  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308  | --libexe=* | --libex=* | --libe=*)
309    libexecdir=$ac_optarg ;;
310
311  -localstatedir | --localstatedir | --localstatedi | --localstated \
312  | --localstate | --localstat | --localsta | --localst \
313  | --locals | --local | --loca | --loc | --lo)
314    ac_prev=localstatedir ;;
315  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318    localstatedir=$ac_optarg ;;
319
320  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321    ac_prev=mandir ;;
322  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323    mandir=$ac_optarg ;;
324
325  -nfp | --nfp | --nf)
326    # Obsolete; use --without-fp.
327    with_fp=no ;;
328
329  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330  | --no-cr | --no-c)
331    no_create=yes ;;
332
333  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335    no_recursion=yes ;;
336
337  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339  | --oldin | --oldi | --old | --ol | --o)
340    ac_prev=oldincludedir ;;
341  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344    oldincludedir=$ac_optarg ;;
345
346  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347    ac_prev=prefix ;;
348  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349    prefix=$ac_optarg ;;
350
351  -program-prefix | --program-prefix | --program-prefi | --program-pref \
352  | --program-pre | --program-pr | --program-p)
353    ac_prev=program_prefix ;;
354  -program-prefix=* | --program-prefix=* | --program-prefi=* \
355  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356    program_prefix=$ac_optarg ;;
357
358  -program-suffix | --program-suffix | --program-suffi | --program-suff \
359  | --program-suf | --program-su | --program-s)
360    ac_prev=program_suffix ;;
361  -program-suffix=* | --program-suffix=* | --program-suffi=* \
362  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363    program_suffix=$ac_optarg ;;
364
365  -program-transform-name | --program-transform-name \
366  | --program-transform-nam | --program-transform-na \
367  | --program-transform-n | --program-transform- \
368  | --program-transform | --program-transfor \
369  | --program-transfo | --program-transf \
370  | --program-trans | --program-tran \
371  | --progr-tra | --program-tr | --program-t)
372    ac_prev=program_transform_name ;;
373  -program-transform-name=* | --program-transform-name=* \
374  | --program-transform-nam=* | --program-transform-na=* \
375  | --program-transform-n=* | --program-transform-=* \
376  | --program-transform=* | --program-transfor=* \
377  | --program-transfo=* | --program-transf=* \
378  | --program-trans=* | --program-tran=* \
379  | --progr-tra=* | --program-tr=* | --program-t=*)
380    program_transform_name=$ac_optarg ;;
381
382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383  | -silent | --silent | --silen | --sile | --sil)
384    silent=yes ;;
385
386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387    ac_prev=sbindir ;;
388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389  | --sbi=* | --sb=*)
390    sbindir=$ac_optarg ;;
391
392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394  | --sharedst | --shareds | --shared | --share | --shar \
395  | --sha | --sh)
396    ac_prev=sharedstatedir ;;
397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400  | --sha=* | --sh=*)
401    sharedstatedir=$ac_optarg ;;
402
403  -site | --site | --sit)
404    ac_prev=site ;;
405  -site=* | --site=* | --sit=*)
406    site=$ac_optarg ;;
407
408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409    ac_prev=srcdir ;;
410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411    srcdir=$ac_optarg ;;
412
413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414  | --syscon | --sysco | --sysc | --sys | --sy)
415    ac_prev=sysconfdir ;;
416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418    sysconfdir=$ac_optarg ;;
419
420  -target | --target | --targe | --targ | --tar | --ta | --t)
421    ac_prev=target_alias ;;
422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423    target_alias=$ac_optarg ;;
424
425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
426    verbose=yes ;;
427
428  -version | --version | --versio | --versi | --vers | -V)
429    ac_init_version=: ;;
430
431  -with-* | --with-*)
432    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433    # Reject names that are not valid shell variable names.
434    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435      { echo "$as_me: error: invalid package name: $ac_package" >&2
436   { (exit 1); exit 1; }; }
437    ac_package=`echo $ac_package| sed 's/-/_/g'`
438    case $ac_option in
439      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440      *) ac_optarg=yes ;;
441    esac
442    eval "with_$ac_package='$ac_optarg'" ;;
443
444  -without-* | --without-*)
445    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446    # Reject names that are not valid shell variable names.
447    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448      { echo "$as_me: error: invalid package name: $ac_package" >&2
449   { (exit 1); exit 1; }; }
450    ac_package=`echo $ac_package | sed 's/-/_/g'`
451    eval "with_$ac_package=no" ;;
452
453  --x)
454    # Obsolete; use --with-x.
455    with_x=yes ;;
456
457  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458  | --x-incl | --x-inc | --x-in | --x-i)
459    ac_prev=x_includes ;;
460  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462    x_includes=$ac_optarg ;;
463
464  -x-libraries | --x-libraries | --x-librarie | --x-librari \
465  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466    ac_prev=x_libraries ;;
467  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469    x_libraries=$ac_optarg ;;
470
471  -*) { echo "$as_me: error: unrecognized option: $ac_option
472Try \`$0 --help' for more information." >&2
473   { (exit 1); exit 1; }; }
474    ;;
475
476  *=*)
477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478    # Reject names that are not valid shell variable names.
479    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481   { (exit 1); exit 1; }; }
482    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483    eval "$ac_envvar='$ac_optarg'"
484    export $ac_envvar ;;
485
486  *)
487    # FIXME: should be removed in autoconf 3.0.
488    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492    ;;
493
494  esac
495done
496
497if test -n "$ac_prev"; then
498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499  { echo "$as_me: error: missing argument to $ac_option" >&2
500   { (exit 1); exit 1; }; }
501fi
502
503# Be sure to have absolute paths.
504for ac_var in exec_prefix prefix
505do
506  eval ac_val=$`echo $ac_var`
507  case $ac_val in
508    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510   { (exit 1); exit 1; }; };;
511  esac
512done
513
514# Be sure to have absolute paths.
515for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516              localstatedir libdir includedir oldincludedir infodir mandir
517do
518  eval ac_val=$`echo $ac_var`
519  case $ac_val in
520    [\\/$]* | ?:[\\/]* ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# There might be people who depend on the old broken behavior: `$host'
527# used to hold the argument of --host etc.
528build=$build_alias
529host=$host_alias
530target=$target_alias
531
532# FIXME: should be removed in autoconf 3.0.
533if test "x$host_alias" != x; then
534  if test "x$build_alias" = x; then
535    cross_compiling=maybe
536    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537    If a cross compiler is detected then cross compile mode will be used." >&2
538  elif test "x$build_alias" != "x$host_alias"; then
539    cross_compiling=yes
540  fi
541fi
542
543ac_tool_prefix=
544test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546test "$silent" = yes && exec 6>/dev/null
547
548# Find the source files, if location was not specified.
549if test -z "$srcdir"; then
550  ac_srcdir_defaulted=yes
551  # Try the directory containing this script, then its parent.
552  ac_prog=$0
553  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555  srcdir=$ac_confdir
556  if test ! -r $srcdir/$ac_unique_file; then
557    srcdir=..
558  fi
559else
560  ac_srcdir_defaulted=no
561fi
562if test ! -r $srcdir/$ac_unique_file; then
563  if test "$ac_srcdir_defaulted" = yes; then
564    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565   { (exit 1); exit 1; }; }
566  else
567    { echo "$as_me: error: cannot find sources in $srcdir" >&2
568   { (exit 1); exit 1; }; }
569  fi
570fi
571srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572ac_env_build_alias_set=${build_alias+set}
573ac_env_build_alias_value=$build_alias
574ac_cv_env_build_alias_set=${build_alias+set}
575ac_cv_env_build_alias_value=$build_alias
576ac_env_host_alias_set=${host_alias+set}
577ac_env_host_alias_value=$host_alias
578ac_cv_env_host_alias_set=${host_alias+set}
579ac_cv_env_host_alias_value=$host_alias
580ac_env_target_alias_set=${target_alias+set}
581ac_env_target_alias_value=$target_alias
582ac_cv_env_target_alias_set=${target_alias+set}
583ac_cv_env_target_alias_value=$target_alias
584ac_env_CC_set=${CC+set}
585ac_env_CC_value=$CC
586ac_cv_env_CC_set=${CC+set}
587ac_cv_env_CC_value=$CC
588ac_env_CFLAGS_set=${CFLAGS+set}
589ac_env_CFLAGS_value=$CFLAGS
590ac_cv_env_CFLAGS_set=${CFLAGS+set}
591ac_cv_env_CFLAGS_value=$CFLAGS
592ac_env_LDFLAGS_set=${LDFLAGS+set}
593ac_env_LDFLAGS_value=$LDFLAGS
594ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595ac_cv_env_LDFLAGS_value=$LDFLAGS
596ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597ac_env_CPPFLAGS_value=$CPPFLAGS
598ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600ac_env_CPP_set=${CPP+set}
601ac_env_CPP_value=$CPP
602ac_cv_env_CPP_set=${CPP+set}
603ac_cv_env_CPP_value=$CPP
604
605#
606# Report the --help message.
607#
608if test "$ac_init_help" = "long"; then
609  # Omit some internal or obsolete options to make the list less imposing.
610  # This message is too long to be a string in the A/UX 3.1 sh.
611  cat <<EOF
612\`configure' configures this package to adapt to many kinds of systems.
613
614Usage: $0 [OPTION]... [VAR=VALUE]...
615
616To assign environment variables (e.g., CC, CFLAGS...), specify them as
617VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619Defaults for the options are specified in brackets.
620
621Configuration:
622  -h, --help              display this help and exit
623      --help=short        display options specific to this package
624      --help=recursive    display the short help of all the included packages
625  -V, --version           display version information and exit
626  -q, --quiet, --silent   do not print \`checking...' messages
627      --cache-file=FILE   cache test results in FILE [disabled]
628  -C, --config-cache      alias for \`--cache-file=config.cache'
629  -n, --no-create         do not create output files
630      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632EOF
633
634  cat <<EOF
635Installation directories:
636  --prefix=PREFIX         install architecture-independent files in PREFIX
637                          [$ac_default_prefix]
638  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                          [PREFIX]
640
641By default, \`make install' will install all the files in
642\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644for instance \`--prefix=\$HOME'.
645
646For better control, use the options below.
647
648Fine tuning of the installation directories:
649  --bindir=DIR            user executables [EPREFIX/bin]
650  --sbindir=DIR           system admin executables [EPREFIX/sbin]
651  --libexecdir=DIR        program executables [EPREFIX/libexec]
652  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657  --libdir=DIR            object code libraries [EPREFIX/lib]
658  --includedir=DIR        C header files [PREFIX/include]
659  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660  --infodir=DIR           info documentation [DATAROOTDIR/info]
661  --mandir=DIR            man documentation [DATAROOTDIR/man]
662EOF
663
664  cat <<\EOF
665
666Program names:
667  --program-prefix=PREFIX            prepend PREFIX to installed program names
668  --program-suffix=SUFFIX            append SUFFIX to installed program names
669  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671X features:
672  --x-includes=DIR    X include files are in DIR
673  --x-libraries=DIR   X library files are in DIR
674
675System types:
676  --build=BUILD           configure for building on BUILD [guessed]
677  --host=HOST       build programs to run on HOST [BUILD]
678EOF
679fi
680
681if test -n "$ac_init_help"; then
682
683  cat <<\EOF
684
685Optional Features:
686  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
687  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
688
689Optional Packages:
690  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
691  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
692
693  --disable-echo          do not display "compiling" commands
694  --disable-largefile     omit support for large files
695  --with-install-prefix=XXX sets DESTDIR, useful for packaging
696  --with-warnings         test: turn on gcc warnings
697  --with-pkg-config{=path} enable/disable use of pkg-config
698  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
699  --enable-header-subdir  install dlg_XXX headers to subdirectory
700  --with-man2html=XXX     use XXX rather than groff
701  --with-libiconv-prefix=DIR
702                          search for libiconv in DIR/include and DIR/lib
703  --enable-nls            use Native Language Support
704  --with-included-gettext use the GNU gettext library included here
705  --with-textdomain=PKG   NLS text-domain (default is package name)
706  --disable-included-msgs use included messages, for i18n support
707  --with-dmalloc          test: use Gray Watson's dmalloc library
708  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
709  --with-purify           test: use Purify
710  --with-valgrind         test: use valgrind
711  --with-no-leaks         test: free permanent memory, analyze leaks
712  --disable-trace         do not support --trace option
713  --with-rel-version=XXX  override derived release version
714  --with-abi-version=XXX  override derived ABI version
715  --disable-libtool-version  enable to use libtool's incompatible naming scheme
716  --with-libtool          generate libraries with libtool
717  --with-libtool-opts=XXX specify additional libtool options
718  --with-export-syms=XXX  limit exported symbols using libtool
719  --with-shared           generate shared-libraries
720  --with-shlib-version=X  Specify rel or abi version for shared libs
721  --with-versioned-syms=X markup versioned symbols using ld
722  --with-curses-dir=DIR   directory in which (n)curses is installed
723  --enable-rpath          use rpath option when generating shared libraries
724  --with-screen=XXX       use specified curses-libraries
725  --with-ncursesw         use wide ncurses-libraries
726  --with-ncurses          use ncurses-libraries
727  --with-pdcurses         compile/link with pdcurses X11 library
728  --with-curses-colr      compile/link with HPUX 10.x color-curses
729  --with-curses-5lib      compile/link with SunOS 5lib curses
730  --with-Xaw3d            link with Xaw 3d library
731  --with-Xaw3dxft         link with Xaw 3d xft library
732  --with-neXtaw           link with neXT Athena library
733  --with-XawPlus          link with Athena-Plus library
734  --with-x                use the X Window System
735  --disable-extras        do not include extra dialogs
736  --disable-rc-file       do not include config-file support
737  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
738  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
739  --disable-whiptail      do not map extra whiptail options
740  --disable-form          do not include the form dialog
741  --disable-gauge         do not include the gauge dialogs
742  --disable-tailbox       do not include the tailbox dialog
743  --disable-mixedform     do not include the mixedform dialog
744  --disable-mixedgauge    do not include the mixedgauge dialog
745  --enable-widec          enable wide-curses features
746  --disable-rpath-hack    don't add rpath options for additional libraries
747
748Some influential environment variables:
749  CC          C compiler command
750  CFLAGS      C compiler flags
751  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
752              nonstandard directory <lib dir>
753  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
754              headers in a nonstandard directory <include dir>
755  CPP         C preprocessor
756
757Use these variables to override the choices made by `configure' or to help
758it to find libraries and programs with nonstandard names/locations.
759
760EOF
761fi
762
763if test "$ac_init_help" = "recursive"; then
764  # If there are subdirs, report their specific --help.
765  ac_popdir=`pwd`
766  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
767    cd $ac_subdir
768    # A "../" for each directory in /$ac_subdir.
769    ac_dots=`echo $ac_subdir |
770             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
771
772    case $srcdir in
773    .) # No --srcdir option.  We are building in place.
774      ac_sub_srcdir=$srcdir ;;
775    [\\/]* | ?:[\\/]* ) # Absolute path.
776      ac_sub_srcdir=$srcdir/$ac_subdir ;;
777    *) # Relative path.
778      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
779    esac
780
781    # Check for guested configure; otherwise get Cygnus style configure.
782    if test -f $ac_sub_srcdir/configure.gnu; then
783      echo
784      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
785    elif test -f $ac_sub_srcdir/configure; then
786      echo
787      $SHELL $ac_sub_srcdir/configure  --help=recursive
788    elif test -f $ac_sub_srcdir/configure.ac ||
789           test -f $ac_sub_srcdir/configure.in; then
790      echo
791      $ac_configure --help
792    else
793      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
794    fi
795    cd $ac_popdir
796  done
797fi
798
799test -n "$ac_init_help" && exit 0
800if $ac_init_version; then
801  cat <<\EOF
802
803Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
804Free Software Foundation, Inc.
805This configure script is free software; the Free Software Foundation
806gives unlimited permission to copy, distribute and modify it.
807EOF
808  exit 0
809fi
810exec 5>config.log
811cat >&5 <<EOF
812This file contains any messages produced by compilers while
813running configure, to aid debugging if configure makes a mistake.
814
815It was created by $as_me, which was
816generated by GNU Autoconf 2.52.20170501.  Invocation command line was
817
818  $ $0 $@
819
820EOF
821{
822cat <<_ASUNAME
823## ---------- ##
824## Platform.  ##
825## ---------- ##
826
827hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
828uname -m = `(uname -m) 2>/dev/null || echo unknown`
829uname -r = `(uname -r) 2>/dev/null || echo unknown`
830uname -s = `(uname -s) 2>/dev/null || echo unknown`
831uname -v = `(uname -v) 2>/dev/null || echo unknown`
832
833/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
834/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
835
836/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
837/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
838/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
839hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
840/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
841/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
842/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
843
844PATH = $PATH
845
846_ASUNAME
847} >&5
848
849cat >&5 <<EOF
850## ------------ ##
851## Core tests.  ##
852## ------------ ##
853
854EOF
855
856# Keep a trace of the command line.
857# Strip out --no-create and --no-recursion so they do not pile up.
858# Also quote any args containing shell meta-characters.
859ac_configure_args=
860ac_sep=
861for ac_arg
862do
863  case $ac_arg in
864  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
865  | --no-cr | --no-c) ;;
866  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
867  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
868  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
869    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
870    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
871    ac_sep=" " ;;
872  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
873     ac_sep=" " ;;
874  esac
875  # Get rid of the leading space.
876done
877
878# When interrupted or exit'd, cleanup temporary files, and complete
879# config.log.  We remove comments because anyway the quotes in there
880# would cause problems or look ugly.
881trap 'exit_status=$?
882  # Save into config.log some information that might help in debugging.
883  echo >&5
884  echo "## ----------------- ##" >&5
885  echo "## Cache variables.  ##" >&5
886  echo "## ----------------- ##" >&5
887  echo >&5
888  # The following way of writing the cache mishandles newlines in values,
889{
890  (set) 2>&1 |
891    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
892    *ac_space=\ *)
893      sed -n \
894        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
895    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
896      ;;
897    *)
898      sed -n \
899        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
900      ;;
901    esac;
902} >&5
903  sed "/^$/d" confdefs.h >conftest.log
904  if test -s conftest.log; then
905    echo >&5
906    echo "## ------------ ##" >&5
907    echo "## confdefs.h.  ##" >&5
908    echo "## ------------ ##" >&5
909    echo >&5
910    cat conftest.log >&5
911  fi
912  (echo; echo) >&5
913  test "$ac_signal" != 0 &&
914    echo "$as_me: caught signal $ac_signal" >&5
915  echo "$as_me: exit $exit_status" >&5
916  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
917    exit $exit_status
918     ' 0
919for ac_signal in 1 2 13 15; do
920  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
921done
922ac_signal=0
923
924# confdefs.h avoids OS command line length limits that DEFS can exceed.
925rm -rf conftest* confdefs.h
926# AIX cpp loses on an empty file, so make sure it contains at least a newline.
927echo >confdefs.h
928
929# Let the site file select an alternate cache file if it wants to.
930# Prefer explicitly selected file to automatically selected ones.
931if test -z "$CONFIG_SITE"; then
932  if test "x$prefix" != xNONE; then
933    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
934  else
935    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
936  fi
937fi
938for ac_site_file in $CONFIG_SITE; do
939  if test -r "$ac_site_file"; then
940    { echo "$as_me:940: loading site script $ac_site_file" >&5
941echo "$as_me: loading site script $ac_site_file" >&6;}
942    cat "$ac_site_file" >&5
943    . "$ac_site_file"
944  fi
945done
946
947if test -r "$cache_file"; then
948  # Some versions of bash will fail to source /dev/null (special
949  # files actually), so we avoid doing that.
950  if test -f "$cache_file"; then
951    { echo "$as_me:951: loading cache $cache_file" >&5
952echo "$as_me: loading cache $cache_file" >&6;}
953    case $cache_file in
954      [\\/]* | ?:[\\/]* ) . $cache_file;;
955      *)                      . ./$cache_file;;
956    esac
957  fi
958else
959  { echo "$as_me:959: creating cache $cache_file" >&5
960echo "$as_me: creating cache $cache_file" >&6;}
961  >$cache_file
962fi
963
964# Check that the precious variables saved in the cache have kept the same
965# value.
966ac_cache_corrupted=false
967for ac_var in `(set) 2>&1 |
968               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
969  eval ac_old_set=\$ac_cv_env_${ac_var}_set
970  eval ac_new_set=\$ac_env_${ac_var}_set
971  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
972  eval ac_new_val="\$ac_env_${ac_var}_value"
973  case $ac_old_set,$ac_new_set in
974    set,)
975      { echo "$as_me:975: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
976echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
977      ac_cache_corrupted=: ;;
978    ,set)
979      { echo "$as_me:979: error: \`$ac_var' was not set in the previous run" >&5
980echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
981      ac_cache_corrupted=: ;;
982    ,);;
983    *)
984      if test "x$ac_old_val" != "x$ac_new_val"; then
985        { echo "$as_me:985: error: \`$ac_var' has changed since the previous run:" >&5
986echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
987        { echo "$as_me:987:   former value:  $ac_old_val" >&5
988echo "$as_me:   former value:  $ac_old_val" >&2;}
989        { echo "$as_me:989:   current value: $ac_new_val" >&5
990echo "$as_me:   current value: $ac_new_val" >&2;}
991        ac_cache_corrupted=:
992      fi;;
993  esac
994  # Pass precious variables to config.status.  It doesn't matter if
995  # we pass some twice (in addition to the command line arguments).
996  if test "$ac_new_set" = set; then
997    case $ac_new_val in
998    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1000      ac_configure_args="$ac_configure_args '$ac_arg'"
1001      ;;
1002    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1003       ;;
1004    esac
1005  fi
1006done
1007if $ac_cache_corrupted; then
1008  { echo "$as_me:1008: error: changes in the environment can compromise the build" >&5
1009echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1010  { { echo "$as_me:1010: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1011echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1012   { (exit 1); exit 1; }; }
1013fi
1014
1015ac_ext=c
1016ac_cpp='$CPP $CPPFLAGS'
1017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1019ac_compiler_gnu=$ac_cv_c_compiler_gnu
1020ac_main_return=return
1021
1022case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1023  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1024		   ECHO_T='	' ;;
1025  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1026  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1027esac
1028echo "#! $SHELL" >conftest.sh
1029echo  "exit 0"   >>conftest.sh
1030chmod +x conftest.sh
1031if { (echo "$as_me:1031: PATH=\".;.\"; conftest.sh") >&5
1032  (PATH=".;."; conftest.sh) 2>&5
1033  ac_status=$?
1034  echo "$as_me:1034: \$? = $ac_status" >&5
1035  (exit $ac_status); }; then
1036  ac_path_separator=';'
1037else
1038  ac_path_separator=:
1039fi
1040PATH_SEPARATOR="$ac_path_separator"
1041rm -f conftest.sh
1042
1043ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1044
1045test "$program_prefix" != NONE &&
1046  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1047# Use a double $ so make ignores it.
1048test "$program_suffix" != NONE &&
1049  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1050# Double any \ or $.  echo might interpret backslashes.
1051# By default was `s,x,x', remove it if useless.
1052cat <<\_ACEOF >conftest.sed
1053s/[\\$]/&&/g;s/;s,x,x,$//
1054_ACEOF
1055program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1056rm conftest.sed
1057
1058DESTDIR=
1059
1060ac_ext=c
1061ac_cpp='$CPP $CPPFLAGS'
1062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1064ac_compiler_gnu=$ac_cv_c_compiler_gnu
1065ac_main_return=return
1066if test -n "$ac_tool_prefix"; then
1067  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1068set dummy ${ac_tool_prefix}gcc; ac_word=$2
1069echo "$as_me:1069: checking for $ac_word" >&5
1070echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1071if test "${ac_cv_prog_CC+set}" = set; then
1072  echo $ECHO_N "(cached) $ECHO_C" >&6
1073else
1074  if test -n "$CC"; then
1075  ac_cv_prog_CC="$CC" # Let the user override the test.
1076else
1077  ac_save_IFS=$IFS; IFS=$ac_path_separator
1078ac_dummy="$PATH"
1079for ac_dir in $ac_dummy; do
1080  IFS=$ac_save_IFS
1081  test -z "$ac_dir" && ac_dir=.
1082  $as_executable_p "$ac_dir/$ac_word" || continue
1083ac_cv_prog_CC="${ac_tool_prefix}gcc"
1084echo "$as_me:1084: found $ac_dir/$ac_word" >&5
1085break
1086done
1087
1088fi
1089fi
1090CC=$ac_cv_prog_CC
1091if test -n "$CC"; then
1092  echo "$as_me:1092: result: $CC" >&5
1093echo "${ECHO_T}$CC" >&6
1094else
1095  echo "$as_me:1095: result: no" >&5
1096echo "${ECHO_T}no" >&6
1097fi
1098
1099fi
1100if test -z "$ac_cv_prog_CC"; then
1101  ac_ct_CC=$CC
1102  # Extract the first word of "gcc", so it can be a program name with args.
1103set dummy gcc; ac_word=$2
1104echo "$as_me:1104: checking for $ac_word" >&5
1105echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1106if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1107  echo $ECHO_N "(cached) $ECHO_C" >&6
1108else
1109  if test -n "$ac_ct_CC"; then
1110  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1111else
1112  ac_save_IFS=$IFS; IFS=$ac_path_separator
1113ac_dummy="$PATH"
1114for ac_dir in $ac_dummy; do
1115  IFS=$ac_save_IFS
1116  test -z "$ac_dir" && ac_dir=.
1117  $as_executable_p "$ac_dir/$ac_word" || continue
1118ac_cv_prog_ac_ct_CC="gcc"
1119echo "$as_me:1119: found $ac_dir/$ac_word" >&5
1120break
1121done
1122
1123fi
1124fi
1125ac_ct_CC=$ac_cv_prog_ac_ct_CC
1126if test -n "$ac_ct_CC"; then
1127  echo "$as_me:1127: result: $ac_ct_CC" >&5
1128echo "${ECHO_T}$ac_ct_CC" >&6
1129else
1130  echo "$as_me:1130: result: no" >&5
1131echo "${ECHO_T}no" >&6
1132fi
1133
1134  CC=$ac_ct_CC
1135else
1136  CC="$ac_cv_prog_CC"
1137fi
1138
1139if test -z "$CC"; then
1140  if test -n "$ac_tool_prefix"; then
1141  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1142set dummy ${ac_tool_prefix}cc; ac_word=$2
1143echo "$as_me:1143: checking for $ac_word" >&5
1144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145if test "${ac_cv_prog_CC+set}" = set; then
1146  echo $ECHO_N "(cached) $ECHO_C" >&6
1147else
1148  if test -n "$CC"; then
1149  ac_cv_prog_CC="$CC" # Let the user override the test.
1150else
1151  ac_save_IFS=$IFS; IFS=$ac_path_separator
1152ac_dummy="$PATH"
1153for ac_dir in $ac_dummy; do
1154  IFS=$ac_save_IFS
1155  test -z "$ac_dir" && ac_dir=.
1156  $as_executable_p "$ac_dir/$ac_word" || continue
1157ac_cv_prog_CC="${ac_tool_prefix}cc"
1158echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1159break
1160done
1161
1162fi
1163fi
1164CC=$ac_cv_prog_CC
1165if test -n "$CC"; then
1166  echo "$as_me:1166: result: $CC" >&5
1167echo "${ECHO_T}$CC" >&6
1168else
1169  echo "$as_me:1169: result: no" >&5
1170echo "${ECHO_T}no" >&6
1171fi
1172
1173fi
1174if test -z "$ac_cv_prog_CC"; then
1175  ac_ct_CC=$CC
1176  # Extract the first word of "cc", so it can be a program name with args.
1177set dummy cc; ac_word=$2
1178echo "$as_me:1178: checking for $ac_word" >&5
1179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181  echo $ECHO_N "(cached) $ECHO_C" >&6
1182else
1183  if test -n "$ac_ct_CC"; then
1184  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1185else
1186  ac_save_IFS=$IFS; IFS=$ac_path_separator
1187ac_dummy="$PATH"
1188for ac_dir in $ac_dummy; do
1189  IFS=$ac_save_IFS
1190  test -z "$ac_dir" && ac_dir=.
1191  $as_executable_p "$ac_dir/$ac_word" || continue
1192ac_cv_prog_ac_ct_CC="cc"
1193echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1194break
1195done
1196
1197fi
1198fi
1199ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200if test -n "$ac_ct_CC"; then
1201  echo "$as_me:1201: result: $ac_ct_CC" >&5
1202echo "${ECHO_T}$ac_ct_CC" >&6
1203else
1204  echo "$as_me:1204: result: no" >&5
1205echo "${ECHO_T}no" >&6
1206fi
1207
1208  CC=$ac_ct_CC
1209else
1210  CC="$ac_cv_prog_CC"
1211fi
1212
1213fi
1214if test -z "$CC"; then
1215  # Extract the first word of "cc", so it can be a program name with args.
1216set dummy cc; ac_word=$2
1217echo "$as_me:1217: checking for $ac_word" >&5
1218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219if test "${ac_cv_prog_CC+set}" = set; then
1220  echo $ECHO_N "(cached) $ECHO_C" >&6
1221else
1222  if test -n "$CC"; then
1223  ac_cv_prog_CC="$CC" # Let the user override the test.
1224else
1225  ac_prog_rejected=no
1226  ac_save_IFS=$IFS; IFS=$ac_path_separator
1227ac_dummy="$PATH"
1228for ac_dir in $ac_dummy; do
1229  IFS=$ac_save_IFS
1230  test -z "$ac_dir" && ac_dir=.
1231  $as_executable_p "$ac_dir/$ac_word" || continue
1232if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1233  ac_prog_rejected=yes
1234  continue
1235fi
1236ac_cv_prog_CC="cc"
1237echo "$as_me:1237: found $ac_dir/$ac_word" >&5
1238break
1239done
1240
1241if test $ac_prog_rejected = yes; then
1242  # We found a bogon in the path, so make sure we never use it.
1243  set dummy $ac_cv_prog_CC
1244  shift
1245  if test $# != 0; then
1246    # We chose a different compiler from the bogus one.
1247    # However, it has the same basename, so the bogon will be chosen
1248    # first if we set CC to just the basename; use the full file name.
1249    shift
1250    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1251    shift
1252    ac_cv_prog_CC="$@"
1253  fi
1254fi
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 "$CC"; then
1268  if test -n "$ac_tool_prefix"; then
1269  for ac_prog in cl
1270  do
1271    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1272set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1273echo "$as_me:1273: checking for $ac_word" >&5
1274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1275if test "${ac_cv_prog_CC+set}" = set; then
1276  echo $ECHO_N "(cached) $ECHO_C" >&6
1277else
1278  if test -n "$CC"; then
1279  ac_cv_prog_CC="$CC" # Let the user override the test.
1280else
1281  ac_save_IFS=$IFS; IFS=$ac_path_separator
1282ac_dummy="$PATH"
1283for ac_dir in $ac_dummy; do
1284  IFS=$ac_save_IFS
1285  test -z "$ac_dir" && ac_dir=.
1286  $as_executable_p "$ac_dir/$ac_word" || continue
1287ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1288echo "$as_me:1288: found $ac_dir/$ac_word" >&5
1289break
1290done
1291
1292fi
1293fi
1294CC=$ac_cv_prog_CC
1295if test -n "$CC"; then
1296  echo "$as_me:1296: result: $CC" >&5
1297echo "${ECHO_T}$CC" >&6
1298else
1299  echo "$as_me:1299: result: no" >&5
1300echo "${ECHO_T}no" >&6
1301fi
1302
1303    test -n "$CC" && break
1304  done
1305fi
1306if test -z "$CC"; then
1307  ac_ct_CC=$CC
1308  for ac_prog in cl
1309do
1310  # Extract the first word of "$ac_prog", so it can be a program name with args.
1311set dummy $ac_prog; ac_word=$2
1312echo "$as_me:1312: checking for $ac_word" >&5
1313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1314if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1315  echo $ECHO_N "(cached) $ECHO_C" >&6
1316else
1317  if test -n "$ac_ct_CC"; then
1318  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1319else
1320  ac_save_IFS=$IFS; IFS=$ac_path_separator
1321ac_dummy="$PATH"
1322for ac_dir in $ac_dummy; do
1323  IFS=$ac_save_IFS
1324  test -z "$ac_dir" && ac_dir=.
1325  $as_executable_p "$ac_dir/$ac_word" || continue
1326ac_cv_prog_ac_ct_CC="$ac_prog"
1327echo "$as_me:1327: found $ac_dir/$ac_word" >&5
1328break
1329done
1330
1331fi
1332fi
1333ac_ct_CC=$ac_cv_prog_ac_ct_CC
1334if test -n "$ac_ct_CC"; then
1335  echo "$as_me:1335: result: $ac_ct_CC" >&5
1336echo "${ECHO_T}$ac_ct_CC" >&6
1337else
1338  echo "$as_me:1338: result: no" >&5
1339echo "${ECHO_T}no" >&6
1340fi
1341
1342  test -n "$ac_ct_CC" && break
1343done
1344
1345  CC=$ac_ct_CC
1346fi
1347
1348fi
1349
1350test -z "$CC" && { { echo "$as_me:1350: error: no acceptable cc found in \$PATH" >&5
1351echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1352   { (exit 1); exit 1; }; }
1353
1354# Provide some information about the compiler.
1355echo "$as_me:1355:" \
1356     "checking for C compiler version" >&5
1357ac_compiler=`set X $ac_compile; echo $2`
1358{ (eval echo "$as_me:1358: \"$ac_compiler --version </dev/null >&5\"") >&5
1359  (eval $ac_compiler --version </dev/null >&5) 2>&5
1360  ac_status=$?
1361  echo "$as_me:1361: \$? = $ac_status" >&5
1362  (exit $ac_status); }
1363{ (eval echo "$as_me:1363: \"$ac_compiler -v </dev/null >&5\"") >&5
1364  (eval $ac_compiler -v </dev/null >&5) 2>&5
1365  ac_status=$?
1366  echo "$as_me:1366: \$? = $ac_status" >&5
1367  (exit $ac_status); }
1368{ (eval echo "$as_me:1368: \"$ac_compiler -V </dev/null >&5\"") >&5
1369  (eval $ac_compiler -V </dev/null >&5) 2>&5
1370  ac_status=$?
1371  echo "$as_me:1371: \$? = $ac_status" >&5
1372  (exit $ac_status); }
1373
1374cat >conftest.$ac_ext <<_ACEOF
1375#line 1375 "configure"
1376#include "confdefs.h"
1377
1378int
1379main (void)
1380{
1381
1382  ;
1383  return 0;
1384}
1385_ACEOF
1386ac_clean_files_save=$ac_clean_files
1387ac_clean_files="$ac_clean_files a.out a.exe"
1388# Try to create an executable without -o first, disregard a.out.
1389# It will help us diagnose broken compilers, and finding out an intuition
1390# of exeext.
1391echo "$as_me:1391: checking for C compiler default output" >&5
1392echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1393ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1394if { (eval echo "$as_me:1394: \"$ac_link_default\"") >&5
1395  (eval $ac_link_default) 2>&5
1396  ac_status=$?
1397  echo "$as_me:1397: \$? = $ac_status" >&5
1398  (exit $ac_status); }; then
1399  # Find the output, starting from the most likely.  This scheme is
1400# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1401# resort.
1402for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1403                ls a.out conftest 2>/dev/null;
1404                ls a.* conftest.* 2>/dev/null`; do
1405  case $ac_file in
1406    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1407    a.out ) # We found the default executable, but exeext='' is most
1408            # certainly right.
1409            break;;
1410    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1411          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1412          export ac_cv_exeext
1413          break;;
1414    * ) break;;
1415  esac
1416done
1417else
1418  echo "$as_me: failed program was:" >&5
1419cat conftest.$ac_ext >&5
1420{ { echo "$as_me:1420: error: C compiler cannot create executables" >&5
1421echo "$as_me: error: C compiler cannot create executables" >&2;}
1422   { (exit 77); exit 77; }; }
1423fi
1424
1425ac_exeext=$ac_cv_exeext
1426echo "$as_me:1426: result: $ac_file" >&5
1427echo "${ECHO_T}$ac_file" >&6
1428
1429# Check the compiler produces executables we can run.  If not, either
1430# the compiler is broken, or we cross compile.
1431echo "$as_me:1431: checking whether the C compiler works" >&5
1432echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1433# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1434# If not cross compiling, check that we can run a simple program.
1435if test "$cross_compiling" != yes; then
1436  if { ac_try='./$ac_file'
1437  { (eval echo "$as_me:1437: \"$ac_try\"") >&5
1438  (eval $ac_try) 2>&5
1439  ac_status=$?
1440  echo "$as_me:1440: \$? = $ac_status" >&5
1441  (exit $ac_status); }; }; then
1442    cross_compiling=no
1443  else
1444    if test "$cross_compiling" = maybe; then
1445	cross_compiling=yes
1446    else
1447	{ { echo "$as_me:1447: error: cannot run C compiled programs.
1448If you meant to cross compile, use \`--host'." >&5
1449echo "$as_me: error: cannot run C compiled programs.
1450If you meant to cross compile, use \`--host'." >&2;}
1451   { (exit 1); exit 1; }; }
1452    fi
1453  fi
1454fi
1455echo "$as_me:1455: result: yes" >&5
1456echo "${ECHO_T}yes" >&6
1457
1458rm -f a.out a.exe conftest$ac_cv_exeext
1459ac_clean_files=$ac_clean_files_save
1460# Check the compiler produces executables we can run.  If not, either
1461# the compiler is broken, or we cross compile.
1462echo "$as_me:1462: checking whether we are cross compiling" >&5
1463echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1464echo "$as_me:1464: result: $cross_compiling" >&5
1465echo "${ECHO_T}$cross_compiling" >&6
1466
1467echo "$as_me:1467: checking for executable suffix" >&5
1468echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1469if { (eval echo "$as_me:1469: \"$ac_link\"") >&5
1470  (eval $ac_link) 2>&5
1471  ac_status=$?
1472  echo "$as_me:1472: \$? = $ac_status" >&5
1473  (exit $ac_status); }; then
1474  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1475# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1476# work properly (i.e., refer to `conftest.exe'), while it won't with
1477# `rm'.
1478for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1479  case $ac_file in
1480    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1482          export ac_cv_exeext
1483          break;;
1484    * ) break;;
1485  esac
1486done
1487else
1488  { { echo "$as_me:1488: error: cannot compute EXEEXT: cannot compile and link" >&5
1489echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1490   { (exit 1); exit 1; }; }
1491fi
1492
1493rm -f conftest$ac_cv_exeext
1494echo "$as_me:1494: result: $ac_cv_exeext" >&5
1495echo "${ECHO_T}$ac_cv_exeext" >&6
1496
1497rm -f conftest.$ac_ext
1498EXEEXT=$ac_cv_exeext
1499ac_exeext=$EXEEXT
1500echo "$as_me:1500: checking for object suffix" >&5
1501echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1502if test "${ac_cv_objext+set}" = set; then
1503  echo $ECHO_N "(cached) $ECHO_C" >&6
1504else
1505  cat >conftest.$ac_ext <<_ACEOF
1506#line 1506 "configure"
1507#include "confdefs.h"
1508
1509int
1510main (void)
1511{
1512
1513  ;
1514  return 0;
1515}
1516_ACEOF
1517rm -f conftest.o conftest.obj
1518if { (eval echo "$as_me:1518: \"$ac_compile\"") >&5
1519  (eval $ac_compile) 2>&5
1520  ac_status=$?
1521  echo "$as_me:1521: \$? = $ac_status" >&5
1522  (exit $ac_status); }; then
1523  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1524  case $ac_file in
1525    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1526    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1527       break;;
1528  esac
1529done
1530else
1531  echo "$as_me: failed program was:" >&5
1532cat conftest.$ac_ext >&5
1533{ { echo "$as_me:1533: error: cannot compute OBJEXT: cannot compile" >&5
1534echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1535   { (exit 1); exit 1; }; }
1536fi
1537
1538rm -f conftest.$ac_cv_objext conftest.$ac_ext
1539fi
1540echo "$as_me:1540: result: $ac_cv_objext" >&5
1541echo "${ECHO_T}$ac_cv_objext" >&6
1542OBJEXT=$ac_cv_objext
1543ac_objext=$OBJEXT
1544echo "$as_me:1544: checking whether we are using the GNU C compiler" >&5
1545echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1546if test "${ac_cv_c_compiler_gnu+set}" = set; then
1547  echo $ECHO_N "(cached) $ECHO_C" >&6
1548else
1549  cat >conftest.$ac_ext <<_ACEOF
1550#line 1550 "configure"
1551#include "confdefs.h"
1552
1553int
1554main (void)
1555{
1556#ifndef __GNUC__
1557       choke me
1558#endif
1559
1560  ;
1561  return 0;
1562}
1563_ACEOF
1564rm -f conftest.$ac_objext
1565if { (eval echo "$as_me:1565: \"$ac_compile\"") >&5
1566  (eval $ac_compile) 2>&5
1567  ac_status=$?
1568  echo "$as_me:1568: \$? = $ac_status" >&5
1569  (exit $ac_status); } &&
1570         { ac_try='test -s conftest.$ac_objext'
1571  { (eval echo "$as_me:1571: \"$ac_try\"") >&5
1572  (eval $ac_try) 2>&5
1573  ac_status=$?
1574  echo "$as_me:1574: \$? = $ac_status" >&5
1575  (exit $ac_status); }; }; then
1576  ac_compiler_gnu=yes
1577else
1578  echo "$as_me: failed program was:" >&5
1579cat conftest.$ac_ext >&5
1580ac_compiler_gnu=no
1581fi
1582rm -f conftest.$ac_objext conftest.$ac_ext
1583ac_cv_c_compiler_gnu=$ac_compiler_gnu
1584
1585fi
1586echo "$as_me:1586: result: $ac_cv_c_compiler_gnu" >&5
1587echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1588GCC=`test $ac_compiler_gnu = yes && echo yes`
1589ac_test_CFLAGS=${CFLAGS+set}
1590ac_save_CFLAGS=$CFLAGS
1591CFLAGS="-g"
1592echo "$as_me:1592: checking whether $CC accepts -g" >&5
1593echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1594if test "${ac_cv_prog_cc_g+set}" = set; then
1595  echo $ECHO_N "(cached) $ECHO_C" >&6
1596else
1597  cat >conftest.$ac_ext <<_ACEOF
1598#line 1598 "configure"
1599#include "confdefs.h"
1600
1601int
1602main (void)
1603{
1604
1605  ;
1606  return 0;
1607}
1608_ACEOF
1609rm -f conftest.$ac_objext
1610if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611  (eval $ac_compile) 2>&5
1612  ac_status=$?
1613  echo "$as_me:1613: \$? = $ac_status" >&5
1614  (exit $ac_status); } &&
1615         { ac_try='test -s conftest.$ac_objext'
1616  { (eval echo "$as_me:1616: \"$ac_try\"") >&5
1617  (eval $ac_try) 2>&5
1618  ac_status=$?
1619  echo "$as_me:1619: \$? = $ac_status" >&5
1620  (exit $ac_status); }; }; then
1621  ac_cv_prog_cc_g=yes
1622else
1623  echo "$as_me: failed program was:" >&5
1624cat conftest.$ac_ext >&5
1625ac_cv_prog_cc_g=no
1626fi
1627rm -f conftest.$ac_objext conftest.$ac_ext
1628fi
1629echo "$as_me:1629: result: $ac_cv_prog_cc_g" >&5
1630echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1631if test "$ac_test_CFLAGS" = set; then
1632  CFLAGS=$ac_save_CFLAGS
1633elif test $ac_cv_prog_cc_g = yes; then
1634  if test "$GCC" = yes; then
1635    CFLAGS="-g -O2"
1636  else
1637    CFLAGS="-g"
1638  fi
1639else
1640  if test "$GCC" = yes; then
1641    CFLAGS="-O2"
1642  else
1643    CFLAGS=
1644  fi
1645fi
1646# Some people use a C++ compiler to compile C.  Since we use `exit',
1647# in C++ we need to declare it.  In case someone uses the same compiler
1648# for both compiling C and C++ we need to have the C++ compiler decide
1649# the declaration of exit, since it's the most demanding environment.
1650cat >conftest.$ac_ext <<_ACEOF
1651#ifndef __cplusplus
1652  choke me
1653#endif
1654_ACEOF
1655rm -f conftest.$ac_objext
1656if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657  (eval $ac_compile) 2>&5
1658  ac_status=$?
1659  echo "$as_me:1659: \$? = $ac_status" >&5
1660  (exit $ac_status); } &&
1661         { ac_try='test -s conftest.$ac_objext'
1662  { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1663  (eval $ac_try) 2>&5
1664  ac_status=$?
1665  echo "$as_me:1665: \$? = $ac_status" >&5
1666  (exit $ac_status); }; }; then
1667  for ac_declaration in \
1668   ''\
1669   '#include <stdlib.h>' \
1670   'extern "C" void std::exit (int) throw (); using std::exit;' \
1671   'extern "C" void std::exit (int); using std::exit;' \
1672   'extern "C" void exit (int) throw ();' \
1673   'extern "C" void exit (int);' \
1674   'void exit (int);'
1675do
1676  cat >conftest.$ac_ext <<_ACEOF
1677#line 1677 "configure"
1678#include "confdefs.h"
1679#include <stdlib.h>
1680$ac_declaration
1681int
1682main (void)
1683{
1684exit (42);
1685  ;
1686  return 0;
1687}
1688_ACEOF
1689rm -f conftest.$ac_objext
1690if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691  (eval $ac_compile) 2>&5
1692  ac_status=$?
1693  echo "$as_me:1693: \$? = $ac_status" >&5
1694  (exit $ac_status); } &&
1695         { ac_try='test -s conftest.$ac_objext'
1696  { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1697  (eval $ac_try) 2>&5
1698  ac_status=$?
1699  echo "$as_me:1699: \$? = $ac_status" >&5
1700  (exit $ac_status); }; }; then
1701  :
1702else
1703  echo "$as_me: failed program was:" >&5
1704cat conftest.$ac_ext >&5
1705continue
1706fi
1707rm -f conftest.$ac_objext conftest.$ac_ext
1708  cat >conftest.$ac_ext <<_ACEOF
1709#line 1709 "configure"
1710#include "confdefs.h"
1711$ac_declaration
1712int
1713main (void)
1714{
1715exit (42);
1716  ;
1717  return 0;
1718}
1719_ACEOF
1720rm -f conftest.$ac_objext
1721if { (eval echo "$as_me:1721: \"$ac_compile\"") >&5
1722  (eval $ac_compile) 2>&5
1723  ac_status=$?
1724  echo "$as_me:1724: \$? = $ac_status" >&5
1725  (exit $ac_status); } &&
1726         { ac_try='test -s conftest.$ac_objext'
1727  { (eval echo "$as_me:1727: \"$ac_try\"") >&5
1728  (eval $ac_try) 2>&5
1729  ac_status=$?
1730  echo "$as_me:1730: \$? = $ac_status" >&5
1731  (exit $ac_status); }; }; then
1732  break
1733else
1734  echo "$as_me: failed program was:" >&5
1735cat conftest.$ac_ext >&5
1736fi
1737rm -f conftest.$ac_objext conftest.$ac_ext
1738done
1739rm -rf conftest*
1740if test -n "$ac_declaration"; then
1741  echo '#ifdef __cplusplus' >>confdefs.h
1742  echo $ac_declaration      >>confdefs.h
1743  echo '#endif'             >>confdefs.h
1744fi
1745
1746else
1747  echo "$as_me: failed program was:" >&5
1748cat conftest.$ac_ext >&5
1749fi
1750rm -f conftest.$ac_objext conftest.$ac_ext
1751ac_ext=c
1752ac_cpp='$CPP $CPPFLAGS'
1753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1755ac_compiler_gnu=$ac_cv_c_compiler_gnu
1756ac_main_return=return
1757
1758GCC_VERSION=none
1759if test "$GCC" = yes ; then
1760	echo "$as_me:1760: checking version of $CC" >&5
1761echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1762	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.].*//'`"
1763	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1764	echo "$as_me:1764: result: $GCC_VERSION" >&5
1765echo "${ECHO_T}$GCC_VERSION" >&6
1766fi
1767
1768echo "$as_me:1768: checking for $CC option to accept ANSI C" >&5
1769echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1770if test "${ac_cv_prog_cc_stdc+set}" = set; then
1771  echo $ECHO_N "(cached) $ECHO_C" >&6
1772else
1773  ac_cv_prog_cc_stdc=no
1774ac_save_CC=$CC
1775cat >conftest.$ac_ext <<_ACEOF
1776#line 1776 "configure"
1777#include "confdefs.h"
1778#include <stdarg.h>
1779#include <stdio.h>
1780#include <sys/types.h>
1781#include <sys/stat.h>
1782/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1783struct buf { int x; };
1784FILE * (*rcsopen) (struct buf *, struct stat *, int);
1785static char *e (p, i)
1786     char **p;
1787     int i;
1788{
1789  return p[i];
1790}
1791static char *f (char * (*g) (char **, int), char **p, ...)
1792{
1793  char *s;
1794  va_list v;
1795  va_start (v,p);
1796  s = g (p, va_arg (v,int));
1797  va_end (v);
1798  return s;
1799}
1800int test (int i, double x);
1801struct s1 {int (*f) (int a);};
1802struct s2 {int (*f) (double a);};
1803int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1804int argc;
1805char **argv;
1806int
1807main (void)
1808{
1809return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1810  ;
1811  return 0;
1812}
1813_ACEOF
1814# Don't try gcc -ansi; that turns off useful extensions and
1815# breaks some systems' header files.
1816# AIX			-qlanglvl=ansi
1817# Ultrix and OSF/1	-std1
1818# HP-UX 10.20 and later	-Ae
1819# HP-UX older versions	-Aa -D_HPUX_SOURCE
1820# SVR4			-Xc -D__EXTENSIONS__
1821for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1822do
1823  CC="$ac_save_CC $ac_arg"
1824  rm -f conftest.$ac_objext
1825if { (eval echo "$as_me:1825: \"$ac_compile\"") >&5
1826  (eval $ac_compile) 2>&5
1827  ac_status=$?
1828  echo "$as_me:1828: \$? = $ac_status" >&5
1829  (exit $ac_status); } &&
1830         { ac_try='test -s conftest.$ac_objext'
1831  { (eval echo "$as_me:1831: \"$ac_try\"") >&5
1832  (eval $ac_try) 2>&5
1833  ac_status=$?
1834  echo "$as_me:1834: \$? = $ac_status" >&5
1835  (exit $ac_status); }; }; then
1836  ac_cv_prog_cc_stdc=$ac_arg
1837break
1838else
1839  echo "$as_me: failed program was:" >&5
1840cat conftest.$ac_ext >&5
1841fi
1842rm -f conftest.$ac_objext
1843done
1844rm -f conftest.$ac_ext conftest.$ac_objext
1845CC=$ac_save_CC
1846
1847fi
1848
1849case "x$ac_cv_prog_cc_stdc" in
1850  x|xno)
1851    echo "$as_me:1851: result: none needed" >&5
1852echo "${ECHO_T}none needed" >&6 ;;
1853  *)
1854    echo "$as_me:1854: result: $ac_cv_prog_cc_stdc" >&5
1855echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1856    CC="$CC $ac_cv_prog_cc_stdc" ;;
1857esac
1858
1859# This should have been defined by AC_PROG_CC
1860: ${CC:=cc}
1861
1862echo "$as_me:1862: checking \$CC variable" >&5
1863echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1864case "$CC" in
1865(*[\ \	]-*)
1866	echo "$as_me:1866: result: broken" >&5
1867echo "${ECHO_T}broken" >&6
1868	{ echo "$as_me:1868: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1869echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1870	# humor him...
1871	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1872	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1873	CC="$cf_prog"
1874	for cf_arg in $cf_flags
1875	do
1876		case "x$cf_arg" in
1877		(x-[IUDfgOW]*)
1878
1879cf_fix_cppflags=no
1880cf_new_cflags=
1881cf_new_cppflags=
1882cf_new_extra_cppflags=
1883
1884for cf_add_cflags in $cf_arg
1885do
1886case $cf_fix_cppflags in
1887(no)
1888	case $cf_add_cflags in
1889	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1890		case $cf_add_cflags in
1891		(-D*)
1892			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1893
1894			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1895				&& test -z "${cf_tst_cflags}" \
1896				&& cf_fix_cppflags=yes
1897
1898			if test $cf_fix_cppflags = yes ; then
1899
1900	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1901	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1902
1903				continue
1904			elif test "${cf_tst_cflags}" = "\"'" ; then
1905
1906	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1907	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1908
1909				continue
1910			fi
1911			;;
1912		esac
1913		case "$CPPFLAGS" in
1914		(*$cf_add_cflags)
1915			;;
1916		(*)
1917			case $cf_add_cflags in
1918			(-D*)
1919				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1920
1921CPPFLAGS=`echo "$CPPFLAGS" | \
1922	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
1923		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
1924
1925				;;
1926			esac
1927
1928	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1929	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1930
1931			;;
1932		esac
1933		;;
1934	(*)
1935
1936	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1937	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1938
1939		;;
1940	esac
1941	;;
1942(yes)
1943
1944	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1945	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1946
1947	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1948
1949	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1950		&& test -z "${cf_tst_cflags}" \
1951		&& cf_fix_cppflags=no
1952	;;
1953esac
1954done
1955
1956if test -n "$cf_new_cflags" ; then
1957
1958	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1959	CFLAGS="${CFLAGS}$cf_new_cflags"
1960
1961fi
1962
1963if test -n "$cf_new_cppflags" ; then
1964
1965	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1966	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1967
1968fi
1969
1970if test -n "$cf_new_extra_cppflags" ; then
1971
1972	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1973	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1974
1975fi
1976
1977			;;
1978		(*)
1979			CC="$CC $cf_arg"
1980			;;
1981		esac
1982	done
1983	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
1984
1985echo "${as_me:-configure}:1985: testing resulting CC: '$CC' ..." 1>&5
1986
1987	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
1988
1989echo "${as_me:-configure}:1989: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1990
1991	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1992
1993echo "${as_me:-configure}:1993: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1994
1995	;;
1996(*)
1997	echo "$as_me:1997: result: ok" >&5
1998echo "${ECHO_T}ok" >&6
1999	;;
2000esac
2001
2002ac_ext=c
2003ac_cpp='$CPP $CPPFLAGS'
2004ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2005ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2006ac_compiler_gnu=$ac_cv_c_compiler_gnu
2007ac_main_return=return
2008echo "$as_me:2008: checking how to run the C preprocessor" >&5
2009echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2010# On Suns, sometimes $CPP names a directory.
2011if test -n "$CPP" && test -d "$CPP"; then
2012  CPP=
2013fi
2014if test -z "$CPP"; then
2015  if test "${ac_cv_prog_CPP+set}" = set; then
2016  echo $ECHO_N "(cached) $ECHO_C" >&6
2017else
2018      # Double quotes because CPP needs to be expanded
2019    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2020    do
2021      ac_preproc_ok=false
2022for ac_c_preproc_warn_flag in '' yes
2023do
2024  # Use a header file that comes with gcc, so configuring glibc
2025  # with a fresh cross-compiler works.
2026  # On the NeXT, cc -E runs the code through the compiler's parser,
2027  # not just through cpp. "Syntax error" is here to catch this case.
2028  cat >conftest.$ac_ext <<_ACEOF
2029#line 2029 "configure"
2030#include "confdefs.h"
2031#include <assert.h>
2032                     Syntax error
2033_ACEOF
2034if { (eval echo "$as_me:2034: \"$ac_cpp conftest.$ac_ext\"") >&5
2035  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2036  ac_status=$?
2037  egrep -v '^ *\+' conftest.er1 >conftest.err
2038  rm -f conftest.er1
2039  cat conftest.err >&5
2040  echo "$as_me:2040: \$? = $ac_status" >&5
2041  (exit $ac_status); } >/dev/null; then
2042  if test -s conftest.err; then
2043    ac_cpp_err=$ac_c_preproc_warn_flag
2044  else
2045    ac_cpp_err=
2046  fi
2047else
2048  ac_cpp_err=yes
2049fi
2050if test -z "$ac_cpp_err"; then
2051  :
2052else
2053  echo "$as_me: failed program was:" >&5
2054  cat conftest.$ac_ext >&5
2055  # Broken: fails on valid input.
2056continue
2057fi
2058rm -f conftest.err conftest.$ac_ext
2059
2060  # OK, works on sane cases.  Now check whether non-existent headers
2061  # can be detected and how.
2062  cat >conftest.$ac_ext <<_ACEOF
2063#line 2063 "configure"
2064#include "confdefs.h"
2065#include <ac_nonexistent.h>
2066_ACEOF
2067if { (eval echo "$as_me:2067: \"$ac_cpp conftest.$ac_ext\"") >&5
2068  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2069  ac_status=$?
2070  egrep -v '^ *\+' conftest.er1 >conftest.err
2071  rm -f conftest.er1
2072  cat conftest.err >&5
2073  echo "$as_me:2073: \$? = $ac_status" >&5
2074  (exit $ac_status); } >/dev/null; then
2075  if test -s conftest.err; then
2076    ac_cpp_err=$ac_c_preproc_warn_flag
2077  else
2078    ac_cpp_err=
2079  fi
2080else
2081  ac_cpp_err=yes
2082fi
2083if test -z "$ac_cpp_err"; then
2084  # Broken: success on invalid input.
2085continue
2086else
2087  echo "$as_me: failed program was:" >&5
2088  cat conftest.$ac_ext >&5
2089  # Passes both tests.
2090ac_preproc_ok=:
2091break
2092fi
2093rm -f conftest.err conftest.$ac_ext
2094
2095done
2096# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2097rm -f conftest.err conftest.$ac_ext
2098if $ac_preproc_ok; then
2099  break
2100fi
2101
2102    done
2103    ac_cv_prog_CPP=$CPP
2104
2105fi
2106  CPP=$ac_cv_prog_CPP
2107else
2108  ac_cv_prog_CPP=$CPP
2109fi
2110echo "$as_me:2110: result: $CPP" >&5
2111echo "${ECHO_T}$CPP" >&6
2112ac_preproc_ok=false
2113for ac_c_preproc_warn_flag in '' yes
2114do
2115  # Use a header file that comes with gcc, so configuring glibc
2116  # with a fresh cross-compiler works.
2117  # On the NeXT, cc -E runs the code through the compiler's parser,
2118  # not just through cpp. "Syntax error" is here to catch this case.
2119  cat >conftest.$ac_ext <<_ACEOF
2120#line 2120 "configure"
2121#include "confdefs.h"
2122#include <assert.h>
2123                     Syntax error
2124_ACEOF
2125if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5
2126  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2127  ac_status=$?
2128  egrep -v '^ *\+' conftest.er1 >conftest.err
2129  rm -f conftest.er1
2130  cat conftest.err >&5
2131  echo "$as_me:2131: \$? = $ac_status" >&5
2132  (exit $ac_status); } >/dev/null; then
2133  if test -s conftest.err; then
2134    ac_cpp_err=$ac_c_preproc_warn_flag
2135  else
2136    ac_cpp_err=
2137  fi
2138else
2139  ac_cpp_err=yes
2140fi
2141if test -z "$ac_cpp_err"; then
2142  :
2143else
2144  echo "$as_me: failed program was:" >&5
2145  cat conftest.$ac_ext >&5
2146  # Broken: fails on valid input.
2147continue
2148fi
2149rm -f conftest.err conftest.$ac_ext
2150
2151  # OK, works on sane cases.  Now check whether non-existent headers
2152  # can be detected and how.
2153  cat >conftest.$ac_ext <<_ACEOF
2154#line 2154 "configure"
2155#include "confdefs.h"
2156#include <ac_nonexistent.h>
2157_ACEOF
2158if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5
2159  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2160  ac_status=$?
2161  egrep -v '^ *\+' conftest.er1 >conftest.err
2162  rm -f conftest.er1
2163  cat conftest.err >&5
2164  echo "$as_me:2164: \$? = $ac_status" >&5
2165  (exit $ac_status); } >/dev/null; then
2166  if test -s conftest.err; then
2167    ac_cpp_err=$ac_c_preproc_warn_flag
2168  else
2169    ac_cpp_err=
2170  fi
2171else
2172  ac_cpp_err=yes
2173fi
2174if test -z "$ac_cpp_err"; then
2175  # Broken: success on invalid input.
2176continue
2177else
2178  echo "$as_me: failed program was:" >&5
2179  cat conftest.$ac_ext >&5
2180  # Passes both tests.
2181ac_preproc_ok=:
2182break
2183fi
2184rm -f conftest.err conftest.$ac_ext
2185
2186done
2187# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2188rm -f conftest.err conftest.$ac_ext
2189if $ac_preproc_ok; then
2190  :
2191else
2192  { { echo "$as_me:2192: error: C preprocessor \"$CPP\" fails sanity check" >&5
2193echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2194   { (exit 1); exit 1; }; }
2195fi
2196
2197ac_ext=c
2198ac_cpp='$CPP $CPPFLAGS'
2199ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2200ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2201ac_compiler_gnu=$ac_cv_c_compiler_gnu
2202ac_main_return=return
2203
2204echo "$as_me:2204: checking whether ${MAKE-make} sets \${MAKE}" >&5
2205echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2206set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2207if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2208  echo $ECHO_N "(cached) $ECHO_C" >&6
2209else
2210  cat >conftest.make <<\EOF
2211all:
2212	@echo 'ac_maketemp="${MAKE}"'
2213EOF
2214# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2215eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2216if test -n "$ac_maketemp"; then
2217  eval ac_cv_prog_make_${ac_make}_set=yes
2218else
2219  eval ac_cv_prog_make_${ac_make}_set=no
2220fi
2221rm -f conftest.make
2222fi
2223if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2224  echo "$as_me:2224: result: yes" >&5
2225echo "${ECHO_T}yes" >&6
2226  SET_MAKE=
2227else
2228  echo "$as_me:2228: result: no" >&5
2229echo "${ECHO_T}no" >&6
2230  SET_MAKE="MAKE=${MAKE-make}"
2231fi
2232
2233if test -n "$ac_tool_prefix"; then
2234  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2235set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2236echo "$as_me:2236: checking for $ac_word" >&5
2237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2238if test "${ac_cv_prog_RANLIB+set}" = set; then
2239  echo $ECHO_N "(cached) $ECHO_C" >&6
2240else
2241  if test -n "$RANLIB"; then
2242  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2243else
2244  ac_save_IFS=$IFS; IFS=$ac_path_separator
2245ac_dummy="$PATH"
2246for ac_dir in $ac_dummy; do
2247  IFS=$ac_save_IFS
2248  test -z "$ac_dir" && ac_dir=.
2249  $as_executable_p "$ac_dir/$ac_word" || continue
2250ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2251echo "$as_me:2251: found $ac_dir/$ac_word" >&5
2252break
2253done
2254
2255fi
2256fi
2257RANLIB=$ac_cv_prog_RANLIB
2258if test -n "$RANLIB"; then
2259  echo "$as_me:2259: result: $RANLIB" >&5
2260echo "${ECHO_T}$RANLIB" >&6
2261else
2262  echo "$as_me:2262: result: no" >&5
2263echo "${ECHO_T}no" >&6
2264fi
2265
2266fi
2267if test -z "$ac_cv_prog_RANLIB"; then
2268  ac_ct_RANLIB=$RANLIB
2269  # Extract the first word of "ranlib", so it can be a program name with args.
2270set dummy ranlib; ac_word=$2
2271echo "$as_me:2271: checking for $ac_word" >&5
2272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2273if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2274  echo $ECHO_N "(cached) $ECHO_C" >&6
2275else
2276  if test -n "$ac_ct_RANLIB"; then
2277  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2278else
2279  ac_save_IFS=$IFS; IFS=$ac_path_separator
2280ac_dummy="$PATH"
2281for ac_dir in $ac_dummy; do
2282  IFS=$ac_save_IFS
2283  test -z "$ac_dir" && ac_dir=.
2284  $as_executable_p "$ac_dir/$ac_word" || continue
2285ac_cv_prog_ac_ct_RANLIB="ranlib"
2286echo "$as_me:2286: found $ac_dir/$ac_word" >&5
2287break
2288done
2289
2290  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2291fi
2292fi
2293ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2294if test -n "$ac_ct_RANLIB"; then
2295  echo "$as_me:2295: result: $ac_ct_RANLIB" >&5
2296echo "${ECHO_T}$ac_ct_RANLIB" >&6
2297else
2298  echo "$as_me:2298: result: no" >&5
2299echo "${ECHO_T}no" >&6
2300fi
2301
2302  RANLIB=$ac_ct_RANLIB
2303else
2304  RANLIB="$ac_cv_prog_RANLIB"
2305fi
2306
2307ac_aux_dir=
2308for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2309  if test -f $ac_dir/install-sh; then
2310    ac_aux_dir=$ac_dir
2311    ac_install_sh="$ac_aux_dir/install-sh -c"
2312    break
2313  elif test -f $ac_dir/install.sh; then
2314    ac_aux_dir=$ac_dir
2315    ac_install_sh="$ac_aux_dir/install.sh -c"
2316    break
2317  elif test -f $ac_dir/shtool; then
2318    ac_aux_dir=$ac_dir
2319    ac_install_sh="$ac_aux_dir/shtool install -c"
2320    break
2321  fi
2322done
2323if test -z "$ac_aux_dir"; then
2324  { { echo "$as_me:2324: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2325echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2326   { (exit 1); exit 1; }; }
2327fi
2328ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2329ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2330ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2331
2332# Find a good install program.  We prefer a C program (faster),
2333# so one script is as good as another.  But avoid the broken or
2334# incompatible versions:
2335# SysV /etc/install, /usr/sbin/install
2336# SunOS /usr/etc/install
2337# IRIX /sbin/install
2338# AIX /bin/install
2339# AmigaOS /C/install, which installs bootblocks on floppy discs
2340# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2341# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2342# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2343# ./install, which can be erroneously created by make from ./install.sh.
2344echo "$as_me:2344: checking for a BSD compatible install" >&5
2345echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2346if test -z "$INSTALL"; then
2347if test "${ac_cv_path_install+set}" = set; then
2348  echo $ECHO_N "(cached) $ECHO_C" >&6
2349else
2350    ac_save_IFS=$IFS; IFS=$ac_path_separator
2351  for ac_dir in $PATH; do
2352    IFS=$ac_save_IFS
2353    # Account for people who put trailing slashes in PATH elements.
2354    case $ac_dir/ in
2355    / | ./ | .// | /cC/* \
2356    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2357    | /usr/ucb/* ) ;;
2358    *)
2359      # OSF1 and SCO ODT 3.0 have their own names for install.
2360      # Don't use installbsd from OSF since it installs stuff as root
2361      # by default.
2362      for ac_prog in ginstall scoinst install; do
2363        if $as_executable_p "$ac_dir/$ac_prog"; then
2364	  if test $ac_prog = install &&
2365            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2366	    # AIX install.  It has an incompatible calling convention.
2367	    :
2368	  elif test $ac_prog = install &&
2369	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2370	    # program-specific install script used by HP pwplus--don't use.
2371	    :
2372	  else
2373	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2374	    break 2
2375	  fi
2376	fi
2377      done
2378      ;;
2379    esac
2380  done
2381
2382fi
2383  if test "${ac_cv_path_install+set}" = set; then
2384    INSTALL=$ac_cv_path_install
2385  else
2386    # As a last resort, use the slow shell script.  We don't cache a
2387    # path for INSTALL within a source directory, because that will
2388    # break other packages using the cache if that directory is
2389    # removed, or if the path is relative.
2390    INSTALL=$ac_install_sh
2391  fi
2392fi
2393echo "$as_me:2393: result: $INSTALL" >&5
2394echo "${ECHO_T}$INSTALL" >&6
2395
2396# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2397# It thinks the first close brace ends the variable substitution.
2398test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2399
2400test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2401
2402test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2403
2404echo "$as_me:2404: checking whether ln -s works" >&5
2405echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2406LN_S=$as_ln_s
2407if test "$LN_S" = "ln -s"; then
2408  echo "$as_me:2408: result: yes" >&5
2409echo "${ECHO_T}yes" >&6
2410else
2411  echo "$as_me:2411: result: no, using $LN_S" >&5
2412echo "${ECHO_T}no, using $LN_S" >&6
2413fi
2414
2415echo "$as_me:2415: checking if $LN_S -f options work" >&5
2416echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2417
2418rm -f conf$$.src conf$$dst
2419echo >conf$$.dst
2420echo first >conf$$.src
2421if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2422	cf_prog_ln_sf=yes
2423else
2424	cf_prog_ln_sf=no
2425fi
2426rm -f conf$$.dst conf$$src
2427echo "$as_me:2427: result: $cf_prog_ln_sf" >&5
2428echo "${ECHO_T}$cf_prog_ln_sf" >&6
2429
2430test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2431
2432for ac_prog in lint cppcheck splint
2433do
2434  # Extract the first word of "$ac_prog", so it can be a program name with args.
2435set dummy $ac_prog; ac_word=$2
2436echo "$as_me:2436: checking for $ac_word" >&5
2437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2438if test "${ac_cv_prog_LINT+set}" = set; then
2439  echo $ECHO_N "(cached) $ECHO_C" >&6
2440else
2441  if test -n "$LINT"; then
2442  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2443else
2444  ac_save_IFS=$IFS; IFS=$ac_path_separator
2445ac_dummy="$PATH"
2446for ac_dir in $ac_dummy; do
2447  IFS=$ac_save_IFS
2448  test -z "$ac_dir" && ac_dir=.
2449  $as_executable_p "$ac_dir/$ac_word" || continue
2450ac_cv_prog_LINT="$ac_prog"
2451echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452break
2453done
2454
2455fi
2456fi
2457LINT=$ac_cv_prog_LINT
2458if test -n "$LINT"; then
2459  echo "$as_me:2459: result: $LINT" >&5
2460echo "${ECHO_T}$LINT" >&6
2461else
2462  echo "$as_me:2462: result: no" >&5
2463echo "${ECHO_T}no" >&6
2464fi
2465
2466  test -n "$LINT" && break
2467done
2468
2469# Extract the first word of "groff", so it can be a program name with args.
2470set dummy groff; ac_word=$2
2471echo "$as_me:2471: checking for $ac_word" >&5
2472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2473if test "${ac_cv_path_GROFF_PATH+set}" = set; then
2474  echo $ECHO_N "(cached) $ECHO_C" >&6
2475else
2476  case $GROFF_PATH in
2477  [\\/]* | ?:[\\/]*)
2478  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
2479  ;;
2480  *)
2481  ac_save_IFS=$IFS; IFS=$ac_path_separator
2482ac_dummy="$PATH"
2483for ac_dir in $ac_dummy; do
2484  IFS=$ac_save_IFS
2485  test -z "$ac_dir" && ac_dir=.
2486  if $as_executable_p "$ac_dir/$ac_word"; then
2487   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
2488   echo "$as_me:2488: found $ac_dir/$ac_word" >&5
2489   break
2490fi
2491done
2492
2493  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
2494  ;;
2495esac
2496fi
2497GROFF_PATH=$ac_cv_path_GROFF_PATH
2498
2499if test -n "$GROFF_PATH"; then
2500  echo "$as_me:2500: result: $GROFF_PATH" >&5
2501echo "${ECHO_T}$GROFF_PATH" >&6
2502else
2503  echo "$as_me:2503: result: no" >&5
2504echo "${ECHO_T}no" >&6
2505fi
2506
2507for ac_prog in nroff mandoc
2508do
2509  # Extract the first word of "$ac_prog", so it can be a program name with args.
2510set dummy $ac_prog; ac_word=$2
2511echo "$as_me:2511: checking for $ac_word" >&5
2512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2513if test "${ac_cv_path_NROFF_PATH+set}" = set; then
2514  echo $ECHO_N "(cached) $ECHO_C" >&6
2515else
2516  case $NROFF_PATH in
2517  [\\/]* | ?:[\\/]*)
2518  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
2519  ;;
2520  *)
2521  ac_save_IFS=$IFS; IFS=$ac_path_separator
2522ac_dummy="$PATH"
2523for ac_dir in $ac_dummy; do
2524  IFS=$ac_save_IFS
2525  test -z "$ac_dir" && ac_dir=.
2526  if $as_executable_p "$ac_dir/$ac_word"; then
2527   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
2528   echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2529   break
2530fi
2531done
2532
2533  ;;
2534esac
2535fi
2536NROFF_PATH=$ac_cv_path_NROFF_PATH
2537
2538if test -n "$NROFF_PATH"; then
2539  echo "$as_me:2539: result: $NROFF_PATH" >&5
2540echo "${ECHO_T}$NROFF_PATH" >&6
2541else
2542  echo "$as_me:2542: result: no" >&5
2543echo "${ECHO_T}no" >&6
2544fi
2545
2546  test -n "$NROFF_PATH" && break
2547done
2548test -n "$NROFF_PATH" || NROFF_PATH="no"
2549
2550# Extract the first word of "tbl", so it can be a program name with args.
2551set dummy tbl; ac_word=$2
2552echo "$as_me:2552: checking for $ac_word" >&5
2553echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2554if test "${ac_cv_path_TBL_PATH+set}" = set; then
2555  echo $ECHO_N "(cached) $ECHO_C" >&6
2556else
2557  case $TBL_PATH in
2558  [\\/]* | ?:[\\/]*)
2559  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
2560  ;;
2561  *)
2562  ac_save_IFS=$IFS; IFS=$ac_path_separator
2563ac_dummy="$PATH"
2564for ac_dir in $ac_dummy; do
2565  IFS=$ac_save_IFS
2566  test -z "$ac_dir" && ac_dir=.
2567  if $as_executable_p "$ac_dir/$ac_word"; then
2568   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
2569   echo "$as_me:2569: found $ac_dir/$ac_word" >&5
2570   break
2571fi
2572done
2573
2574  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
2575  ;;
2576esac
2577fi
2578TBL_PATH=$ac_cv_path_TBL_PATH
2579
2580if test -n "$TBL_PATH"; then
2581  echo "$as_me:2581: result: $TBL_PATH" >&5
2582echo "${ECHO_T}$TBL_PATH" >&6
2583else
2584  echo "$as_me:2584: result: no" >&5
2585echo "${ECHO_T}no" >&6
2586fi
2587
2588if test "x$GROFF_PATH" = xno
2589then
2590	NROFF_NOTE=
2591	GROFF_NOTE="#"
2592else
2593	NROFF_NOTE="#"
2594	GROFF_NOTE=
2595fi
2596
2597test -z "$GROFF_NOTE" && NROFF_NOTE=
2598
2599if test -n "$ac_tool_prefix"; then
2600  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2601set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then
2605  echo $ECHO_N "(cached) $ECHO_C" >&6
2606else
2607  if test -n "$AR"; then
2608  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
2617echo "$as_me:2617: found $ac_dir/$ac_word" >&5
2618break
2619done
2620
2621fi
2622fi
2623AR=$ac_cv_prog_AR
2624if test -n "$AR"; then
2625  echo "$as_me:2625: result: $AR" >&5
2626echo "${ECHO_T}$AR" >&6
2627else
2628  echo "$as_me:2628: result: no" >&5
2629echo "${ECHO_T}no" >&6
2630fi
2631
2632fi
2633if test -z "$ac_cv_prog_AR"; then
2634  ac_ct_AR=$AR
2635  # Extract the first word of "ar", so it can be a program name with args.
2636set dummy ar; 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_AR+set}" = set; then
2640  echo $ECHO_N "(cached) $ECHO_C" >&6
2641else
2642  if test -n "$ac_ct_AR"; then
2643  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
2652echo "$as_me:2652: found $ac_dir/$ac_word" >&5
2653break
2654done
2655
2656  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2657fi
2658fi
2659ac_ct_AR=$ac_cv_prog_ac_ct_AR
2660if test -n "$ac_ct_AR"; then
2661  echo "$as_me:2661: result: $ac_ct_AR" >&5
2662echo "${ECHO_T}$ac_ct_AR" >&6
2663else
2664  echo "$as_me:2664: result: no" >&5
2665echo "${ECHO_T}no" >&6
2666fi
2667
2668  AR=$ac_ct_AR
2669else
2670  AR="$ac_cv_prog_AR"
2671fi
2672
2673echo "$as_me:2673: checking for options to update archives" >&5
2674echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
2675if test "${cf_cv_ar_flags+set}" = set; then
2676  echo $ECHO_N "(cached) $ECHO_C" >&6
2677else
2678
2679	cf_cv_ar_flags=unknown
2680	for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
2681	do
2682
2683		# check if $ARFLAGS already contains this choice
2684		if test "x$ARFLAGS" != "x" ; then
2685			cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
2686			if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
2687				cf_cv_ar_flags=
2688				break
2689			fi
2690		fi
2691
2692		rm -f conftest.$ac_cv_objext
2693		rm -f conftest.a
2694
2695		cat >conftest.$ac_ext <<EOF
2696#line 2696 "configure"
2697int	testdata[3] = { 123, 456, 789 };
2698EOF
2699		if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
2700  (eval $ac_compile) 2>&5
2701  ac_status=$?
2702  echo "$as_me:2702: \$? = $ac_status" >&5
2703  (exit $ac_status); } ; then
2704			echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
2705			$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
2706			if test -f conftest.a ; then
2707				cf_cv_ar_flags=$cf_ar_flags
2708				break
2709			fi
2710		else
2711			test -n "$verbose" && echo "	cannot compile test-program" 1>&6
2712
2713echo "${as_me:-configure}:2713: testing cannot compile test-program ..." 1>&5
2714
2715			break
2716		fi
2717	done
2718	rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
2719
2720fi
2721echo "$as_me:2721: result: $cf_cv_ar_flags" >&5
2722echo "${ECHO_T}$cf_cv_ar_flags" >&6
2723
2724if test -n "$ARFLAGS" ; then
2725	if test -n "$cf_cv_ar_flags" ; then
2726		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
2727	fi
2728else
2729	ARFLAGS=$cf_cv_ar_flags
2730fi
2731
2732echo "$as_me:2732: checking for makeflags variable" >&5
2733echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2734if test "${cf_cv_makeflags+set}" = set; then
2735  echo $ECHO_N "(cached) $ECHO_C" >&6
2736else
2737
2738	cf_cv_makeflags=''
2739	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2740	do
2741		cat >cf_makeflags.tmp <<CF_EOF
2742SHELL = $SHELL
2743all :
2744	@ echo '.$cf_option'
2745CF_EOF
2746		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
2747		case "$cf_result" in
2748		(.*k|.*kw)
2749			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2750			case "$cf_result" in
2751			(.*CC=*)	cf_cv_makeflags=
2752				;;
2753			(*)	cf_cv_makeflags=$cf_option
2754				;;
2755			esac
2756			break
2757			;;
2758		(.-)
2759			;;
2760		(*)
2761
2762echo "${as_me:-configure}:2762: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
2763
2764			;;
2765		esac
2766	done
2767	rm -f cf_makeflags.tmp
2768
2769fi
2770echo "$as_me:2770: result: $cf_cv_makeflags" >&5
2771echo "${ECHO_T}$cf_cv_makeflags" >&6
2772
2773echo "$as_me:2773: checking if filesystem supports mixed-case filenames" >&5
2774echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2775if test "${cf_cv_mixedcase+set}" = set; then
2776  echo $ECHO_N "(cached) $ECHO_C" >&6
2777else
2778
2779if test "$cross_compiling" = yes ; then
2780	case $target_alias in
2781	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2782		cf_cv_mixedcase=no
2783		;;
2784	(*)
2785		cf_cv_mixedcase=yes
2786		;;
2787	esac
2788else
2789	rm -f conftest CONFTEST
2790	echo test >conftest
2791	if test -f CONFTEST ; then
2792		cf_cv_mixedcase=no
2793	else
2794		cf_cv_mixedcase=yes
2795	fi
2796	rm -f conftest CONFTEST
2797fi
2798
2799fi
2800echo "$as_me:2800: result: $cf_cv_mixedcase" >&5
2801echo "${ECHO_T}$cf_cv_mixedcase" >&6
2802test "$cf_cv_mixedcase" = yes &&
2803cat >>confdefs.h <<\EOF
2804#define MIXEDCASE_FILENAMES 1
2805EOF
2806
2807for ac_prog in exctags ctags
2808do
2809  # Extract the first word of "$ac_prog", so it can be a program name with args.
2810set dummy $ac_prog; ac_word=$2
2811echo "$as_me:2811: checking for $ac_word" >&5
2812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813if test "${ac_cv_prog_CTAGS+set}" = set; then
2814  echo $ECHO_N "(cached) $ECHO_C" >&6
2815else
2816  if test -n "$CTAGS"; then
2817  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2818else
2819  ac_save_IFS=$IFS; IFS=$ac_path_separator
2820ac_dummy="$PATH"
2821for ac_dir in $ac_dummy; do
2822  IFS=$ac_save_IFS
2823  test -z "$ac_dir" && ac_dir=.
2824  $as_executable_p "$ac_dir/$ac_word" || continue
2825ac_cv_prog_CTAGS="$ac_prog"
2826echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827break
2828done
2829
2830fi
2831fi
2832CTAGS=$ac_cv_prog_CTAGS
2833if test -n "$CTAGS"; then
2834  echo "$as_me:2834: result: $CTAGS" >&5
2835echo "${ECHO_T}$CTAGS" >&6
2836else
2837  echo "$as_me:2837: result: no" >&5
2838echo "${ECHO_T}no" >&6
2839fi
2840
2841  test -n "$CTAGS" && break
2842done
2843
2844for ac_prog in exetags etags
2845do
2846  # Extract the first word of "$ac_prog", so it can be a program name with args.
2847set dummy $ac_prog; ac_word=$2
2848echo "$as_me:2848: checking for $ac_word" >&5
2849echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850if test "${ac_cv_prog_ETAGS+set}" = set; then
2851  echo $ECHO_N "(cached) $ECHO_C" >&6
2852else
2853  if test -n "$ETAGS"; then
2854  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2855else
2856  ac_save_IFS=$IFS; IFS=$ac_path_separator
2857ac_dummy="$PATH"
2858for ac_dir in $ac_dummy; do
2859  IFS=$ac_save_IFS
2860  test -z "$ac_dir" && ac_dir=.
2861  $as_executable_p "$ac_dir/$ac_word" || continue
2862ac_cv_prog_ETAGS="$ac_prog"
2863echo "$as_me:2863: found $ac_dir/$ac_word" >&5
2864break
2865done
2866
2867fi
2868fi
2869ETAGS=$ac_cv_prog_ETAGS
2870if test -n "$ETAGS"; then
2871  echo "$as_me:2871: result: $ETAGS" >&5
2872echo "${ECHO_T}$ETAGS" >&6
2873else
2874  echo "$as_me:2874: result: no" >&5
2875echo "${ECHO_T}no" >&6
2876fi
2877
2878  test -n "$ETAGS" && break
2879done
2880
2881# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2882set dummy ${CTAGS:-ctags}; ac_word=$2
2883echo "$as_me:2883: checking for $ac_word" >&5
2884echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2885if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2886  echo $ECHO_N "(cached) $ECHO_C" >&6
2887else
2888  if test -n "$MAKE_LOWER_TAGS"; then
2889  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2890else
2891  ac_save_IFS=$IFS; IFS=$ac_path_separator
2892ac_dummy="$PATH"
2893for ac_dir in $ac_dummy; do
2894  IFS=$ac_save_IFS
2895  test -z "$ac_dir" && ac_dir=.
2896  $as_executable_p "$ac_dir/$ac_word" || continue
2897ac_cv_prog_MAKE_LOWER_TAGS="yes"
2898echo "$as_me:2898: found $ac_dir/$ac_word" >&5
2899break
2900done
2901
2902  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2903fi
2904fi
2905MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2906if test -n "$MAKE_LOWER_TAGS"; then
2907  echo "$as_me:2907: result: $MAKE_LOWER_TAGS" >&5
2908echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2909else
2910  echo "$as_me:2910: result: no" >&5
2911echo "${ECHO_T}no" >&6
2912fi
2913
2914if test "$cf_cv_mixedcase" = yes ; then
2915	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2916set dummy ${ETAGS:-etags}; ac_word=$2
2917echo "$as_me:2917: checking for $ac_word" >&5
2918echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2919if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2920  echo $ECHO_N "(cached) $ECHO_C" >&6
2921else
2922  if test -n "$MAKE_UPPER_TAGS"; then
2923  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2924else
2925  ac_save_IFS=$IFS; IFS=$ac_path_separator
2926ac_dummy="$PATH"
2927for ac_dir in $ac_dummy; do
2928  IFS=$ac_save_IFS
2929  test -z "$ac_dir" && ac_dir=.
2930  $as_executable_p "$ac_dir/$ac_word" || continue
2931ac_cv_prog_MAKE_UPPER_TAGS="yes"
2932echo "$as_me:2932: found $ac_dir/$ac_word" >&5
2933break
2934done
2935
2936  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2937fi
2938fi
2939MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2940if test -n "$MAKE_UPPER_TAGS"; then
2941  echo "$as_me:2941: result: $MAKE_UPPER_TAGS" >&5
2942echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2943else
2944  echo "$as_me:2944: result: no" >&5
2945echo "${ECHO_T}no" >&6
2946fi
2947
2948else
2949	MAKE_UPPER_TAGS=no
2950fi
2951
2952if test "$MAKE_UPPER_TAGS" = yes ; then
2953	MAKE_UPPER_TAGS=
2954else
2955	MAKE_UPPER_TAGS="#"
2956fi
2957
2958if test "$MAKE_LOWER_TAGS" = yes ; then
2959	MAKE_LOWER_TAGS=
2960else
2961	MAKE_LOWER_TAGS="#"
2962fi
2963
2964echo "$as_me:2964: checking if you want to see long compiling messages" >&5
2965echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2966
2967# Check whether --enable-echo or --disable-echo was given.
2968if test "${enable_echo+set}" = set; then
2969  enableval="$enable_echo"
2970  test "$enableval" != no && enableval=yes
2971	if test "$enableval" != "yes" ; then
2972
2973	ECHO_LT='--silent'
2974	ECHO_LD='@echo linking $@;'
2975	RULE_CC='@echo compiling $<'
2976	SHOW_CC='@echo compiling $@'
2977	ECHO_CC='@'
2978
2979	else
2980
2981	ECHO_LT=''
2982	ECHO_LD=''
2983	RULE_CC=''
2984	SHOW_CC=''
2985	ECHO_CC=''
2986
2987	fi
2988else
2989  enableval=yes
2990
2991	ECHO_LT=''
2992	ECHO_LD=''
2993	RULE_CC=''
2994	SHOW_CC=''
2995	ECHO_CC=''
2996
2997fi;
2998echo "$as_me:2998: result: $enableval" >&5
2999echo "${ECHO_T}$enableval" >&6
3000
3001# Make sure we can run config.sub.
3002$ac_config_sub sun4 >/dev/null 2>&1 ||
3003  { { echo "$as_me:3003: error: cannot run $ac_config_sub" >&5
3004echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3005   { (exit 1); exit 1; }; }
3006
3007echo "$as_me:3007: checking build system type" >&5
3008echo $ECHO_N "checking build system type... $ECHO_C" >&6
3009if test "${ac_cv_build+set}" = set; then
3010  echo $ECHO_N "(cached) $ECHO_C" >&6
3011else
3012  ac_cv_build_alias=$build_alias
3013test -z "$ac_cv_build_alias" &&
3014  ac_cv_build_alias=`$ac_config_guess`
3015test -z "$ac_cv_build_alias" &&
3016  { { echo "$as_me:3016: error: cannot guess build type; you must specify one" >&5
3017echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3018   { (exit 1); exit 1; }; }
3019ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3020  { { echo "$as_me:3020: error: $ac_config_sub $ac_cv_build_alias failed." >&5
3021echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
3022   { (exit 1); exit 1; }; }
3023
3024fi
3025echo "$as_me:3025: result: $ac_cv_build" >&5
3026echo "${ECHO_T}$ac_cv_build" >&6
3027build=$ac_cv_build
3028build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3029build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3030build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3031
3032if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
3033	echo "$as_me:3033: checking host system type" >&5
3034echo $ECHO_N "checking host system type... $ECHO_C" >&6
3035if test "${ac_cv_host+set}" = set; then
3036  echo $ECHO_N "(cached) $ECHO_C" >&6
3037else
3038  ac_cv_host_alias=$host_alias
3039test -z "$ac_cv_host_alias" &&
3040  ac_cv_host_alias=$ac_cv_build_alias
3041ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3042  { { echo "$as_me:3042: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3043echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3044   { (exit 1); exit 1; }; }
3045
3046fi
3047echo "$as_me:3047: result: $ac_cv_host" >&5
3048echo "${ECHO_T}$ac_cv_host" >&6
3049host=$ac_cv_host
3050host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3051host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3052host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3053
3054	system_name="$host_os"
3055else
3056	system_name="`(uname -s -r) 2>/dev/null`"
3057	if test -z "$system_name" ; then
3058		system_name="`(hostname) 2>/dev/null`"
3059	fi
3060fi
3061test -n "$system_name" &&
3062cat >>confdefs.h <<EOF
3063#define SYSTEM_NAME "$system_name"
3064EOF
3065
3066if test "${cf_cv_system_name+set}" = set; then
3067  echo $ECHO_N "(cached) $ECHO_C" >&6
3068else
3069  cf_cv_system_name="$system_name"
3070fi
3071
3072test -z "$system_name" && system_name="$cf_cv_system_name"
3073test -n "$cf_cv_system_name" && echo "$as_me:3073: result: Configuring for $cf_cv_system_name" >&5
3074echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
3075
3076if test ".$system_name" != ".$cf_cv_system_name" ; then
3077	echo "$as_me:3077: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
3078echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
3079	{ { echo "$as_me:3079: error: \"Please remove config.cache and try again.\"" >&5
3080echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
3081   { (exit 1); exit 1; }; }
3082fi
3083
3084case $cf_cv_system_name in
3085(os2*)
3086	CFLAGS="$CFLAGS -Zmt"
3087
3088	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3089	CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
3090
3091	CXXFLAGS="$CXXFLAGS -Zmt"
3092	# autoconf's macro sets -Zexe and suffix both, which conflict:w
3093	LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3094	ac_cv_exeext=.exe
3095	;;
3096esac
3097
3098PROG_EXT="$EXEEXT"
3099
3100test -n "$PROG_EXT" &&
3101cat >>confdefs.h <<EOF
3102#define PROG_EXT "$PROG_EXT"
3103EOF
3104
3105	echo "$as_me:3105: checking for PATH separator" >&5
3106echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3107	case $cf_cv_system_name in
3108	(os2*)	PATH_SEPARATOR=';'  ;;
3109	(*)	${PATH_SEPARATOR:=':'}  ;;
3110	esac
3111
3112	echo "$as_me:3112: result: $PATH_SEPARATOR" >&5
3113echo "${ECHO_T}$PATH_SEPARATOR" >&6
3114
3115	case $cf_cv_system_name in
3116	(OS/2*|os2*)
3117		if test "$DFT_LWR_MODEL" = libtool; then
3118			LIB_PREFIX='lib'
3119		else
3120			LIB_PREFIX=''
3121		fi
3122		;;
3123	(*)	LIB_PREFIX='lib'
3124		;;
3125	esac
3126
3127cf_XOPEN_SOURCE=500
3128cf_POSIX_C_SOURCE=199506L
3129cf_xopen_source=
3130
3131case $host_os in
3132(aix[4-7]*)
3133	cf_xopen_source="-D_ALL_SOURCE"
3134	;;
3135(msys)
3136	cf_XOPEN_SOURCE=600
3137	;;
3138(darwin[0-8].*)
3139	cf_xopen_source="-D_APPLE_C_SOURCE"
3140	;;
3141(darwin*)
3142	cf_xopen_source="-D_DARWIN_C_SOURCE"
3143	cf_XOPEN_SOURCE=
3144	;;
3145(freebsd*|dragonfly*)
3146	# 5.x headers associate
3147	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3148	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3149	cf_POSIX_C_SOURCE=200112L
3150	cf_XOPEN_SOURCE=600
3151	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3152	;;
3153(hpux11*)
3154	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3155	;;
3156(hpux*)
3157	cf_xopen_source="-D_HPUX_SOURCE"
3158	;;
3159(irix[56].*)
3160	cf_xopen_source="-D_SGI_SOURCE"
3161	cf_XOPEN_SOURCE=
3162	;;
3163(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3164
3165cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3166
3167echo "$as_me:3167: checking if this is the GNU C library" >&5
3168echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3169if test "${cf_cv_gnu_library+set}" = set; then
3170  echo $ECHO_N "(cached) $ECHO_C" >&6
3171else
3172
3173cat >conftest.$ac_ext <<_ACEOF
3174#line 3174 "configure"
3175#include "confdefs.h"
3176#include <sys/types.h>
3177int
3178main (void)
3179{
3180
3181	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3182		return 0;
3183	#else
3184	#	error not GNU C library
3185	#endif
3186  ;
3187  return 0;
3188}
3189_ACEOF
3190rm -f conftest.$ac_objext
3191if { (eval echo "$as_me:3191: \"$ac_compile\"") >&5
3192  (eval $ac_compile) 2>&5
3193  ac_status=$?
3194  echo "$as_me:3194: \$? = $ac_status" >&5
3195  (exit $ac_status); } &&
3196         { ac_try='test -s conftest.$ac_objext'
3197  { (eval echo "$as_me:3197: \"$ac_try\"") >&5
3198  (eval $ac_try) 2>&5
3199  ac_status=$?
3200  echo "$as_me:3200: \$? = $ac_status" >&5
3201  (exit $ac_status); }; }; then
3202  cf_cv_gnu_library=yes
3203else
3204  echo "$as_me: failed program was:" >&5
3205cat conftest.$ac_ext >&5
3206cf_cv_gnu_library=no
3207fi
3208rm -f conftest.$ac_objext conftest.$ac_ext
3209
3210fi
3211echo "$as_me:3211: result: $cf_cv_gnu_library" >&5
3212echo "${ECHO_T}$cf_cv_gnu_library" >&6
3213
3214if test x$cf_cv_gnu_library = xyes; then
3215
3216	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3217	# was changed to help a little...
3218	echo "$as_me:3218: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3219echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3220if test "${cf_cv_gnu_library_219+set}" = set; then
3221  echo $ECHO_N "(cached) $ECHO_C" >&6
3222else
3223
3224		cf_save="$CPPFLAGS"
3225
3226	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3227	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3228
3229		cat >conftest.$ac_ext <<_ACEOF
3230#line 3230 "configure"
3231#include "confdefs.h"
3232#include <sys/types.h>
3233int
3234main (void)
3235{
3236
3237			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3238				return 0;
3239			#else
3240			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3241			#endif
3242  ;
3243  return 0;
3244}
3245_ACEOF
3246rm -f conftest.$ac_objext
3247if { (eval echo "$as_me:3247: \"$ac_compile\"") >&5
3248  (eval $ac_compile) 2>&5
3249  ac_status=$?
3250  echo "$as_me:3250: \$? = $ac_status" >&5
3251  (exit $ac_status); } &&
3252         { ac_try='test -s conftest.$ac_objext'
3253  { (eval echo "$as_me:3253: \"$ac_try\"") >&5
3254  (eval $ac_try) 2>&5
3255  ac_status=$?
3256  echo "$as_me:3256: \$? = $ac_status" >&5
3257  (exit $ac_status); }; }; then
3258  cf_cv_gnu_library_219=yes
3259else
3260  echo "$as_me: failed program was:" >&5
3261cat conftest.$ac_ext >&5
3262cf_cv_gnu_library_219=no
3263fi
3264rm -f conftest.$ac_objext conftest.$ac_ext
3265		CPPFLAGS="$cf_save"
3266
3267fi
3268echo "$as_me:3268: result: $cf_cv_gnu_library_219" >&5
3269echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3270
3271	if test "x$cf_cv_gnu_library_219" = xyes; then
3272		cf_save="$CPPFLAGS"
3273		echo "$as_me:3273: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3274echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3275if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3276  echo $ECHO_N "(cached) $ECHO_C" >&6
3277else
3278
3279cf_fix_cppflags=no
3280cf_new_cflags=
3281cf_new_cppflags=
3282cf_new_extra_cppflags=
3283
3284for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3285do
3286case $cf_fix_cppflags in
3287(no)
3288	case $cf_add_cflags in
3289	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3290		case $cf_add_cflags in
3291		(-D*)
3292			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3293
3294			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3295				&& test -z "${cf_tst_cflags}" \
3296				&& cf_fix_cppflags=yes
3297
3298			if test $cf_fix_cppflags = yes ; then
3299
3300	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3301	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3302
3303				continue
3304			elif test "${cf_tst_cflags}" = "\"'" ; then
3305
3306	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3307	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3308
3309				continue
3310			fi
3311			;;
3312		esac
3313		case "$CPPFLAGS" in
3314		(*$cf_add_cflags)
3315			;;
3316		(*)
3317			case $cf_add_cflags in
3318			(-D*)
3319				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3320
3321CPPFLAGS=`echo "$CPPFLAGS" | \
3322	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3323		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3324
3325				;;
3326			esac
3327
3328	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3329	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3330
3331			;;
3332		esac
3333		;;
3334	(*)
3335
3336	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3337	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3338
3339		;;
3340	esac
3341	;;
3342(yes)
3343
3344	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3345	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3346
3347	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3348
3349	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3350		&& test -z "${cf_tst_cflags}" \
3351		&& cf_fix_cppflags=no
3352	;;
3353esac
3354done
3355
3356if test -n "$cf_new_cflags" ; then
3357
3358	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3359	CFLAGS="${CFLAGS}$cf_new_cflags"
3360
3361fi
3362
3363if test -n "$cf_new_cppflags" ; then
3364
3365	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3366	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3367
3368fi
3369
3370if test -n "$cf_new_extra_cppflags" ; then
3371
3372	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3373	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3374
3375fi
3376
3377			cat >conftest.$ac_ext <<_ACEOF
3378#line 3378 "configure"
3379#include "confdefs.h"
3380
3381				#include <limits.h>
3382				#include <sys/types.h>
3383
3384int
3385main (void)
3386{
3387
3388				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3389					return 0;
3390				#else
3391				#	error GNU C library is too old
3392				#endif
3393  ;
3394  return 0;
3395}
3396_ACEOF
3397rm -f conftest.$ac_objext
3398if { (eval echo "$as_me:3398: \"$ac_compile\"") >&5
3399  (eval $ac_compile) 2>&5
3400  ac_status=$?
3401  echo "$as_me:3401: \$? = $ac_status" >&5
3402  (exit $ac_status); } &&
3403         { ac_try='test -s conftest.$ac_objext'
3404  { (eval echo "$as_me:3404: \"$ac_try\"") >&5
3405  (eval $ac_try) 2>&5
3406  ac_status=$?
3407  echo "$as_me:3407: \$? = $ac_status" >&5
3408  (exit $ac_status); }; }; then
3409  cf_cv_gnu_dftsrc_219=yes
3410else
3411  echo "$as_me: failed program was:" >&5
3412cat conftest.$ac_ext >&5
3413cf_cv_gnu_dftsrc_219=no
3414fi
3415rm -f conftest.$ac_objext conftest.$ac_ext
3416
3417fi
3418echo "$as_me:3418: result: $cf_cv_gnu_dftsrc_219" >&5
3419echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3420		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3421	else
3422		cf_cv_gnu_dftsrc_219=maybe
3423	fi
3424
3425	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3426
3427		echo "$as_me:3427: checking if we must define _GNU_SOURCE" >&5
3428echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3429if test "${cf_cv_gnu_source+set}" = set; then
3430  echo $ECHO_N "(cached) $ECHO_C" >&6
3431else
3432
3433		cat >conftest.$ac_ext <<_ACEOF
3434#line 3434 "configure"
3435#include "confdefs.h"
3436#include <sys/types.h>
3437int
3438main (void)
3439{
3440
3441			#ifndef _XOPEN_SOURCE
3442			#error	expected _XOPEN_SOURCE to be defined
3443			#endif
3444  ;
3445  return 0;
3446}
3447_ACEOF
3448rm -f conftest.$ac_objext
3449if { (eval echo "$as_me:3449: \"$ac_compile\"") >&5
3450  (eval $ac_compile) 2>&5
3451  ac_status=$?
3452  echo "$as_me:3452: \$? = $ac_status" >&5
3453  (exit $ac_status); } &&
3454         { ac_try='test -s conftest.$ac_objext'
3455  { (eval echo "$as_me:3455: \"$ac_try\"") >&5
3456  (eval $ac_try) 2>&5
3457  ac_status=$?
3458  echo "$as_me:3458: \$? = $ac_status" >&5
3459  (exit $ac_status); }; }; then
3460  cf_cv_gnu_source=no
3461else
3462  echo "$as_me: failed program was:" >&5
3463cat conftest.$ac_ext >&5
3464cf_save="$CPPFLAGS"
3465
3466cf_fix_cppflags=no
3467cf_new_cflags=
3468cf_new_cppflags=
3469cf_new_extra_cppflags=
3470
3471for cf_add_cflags in -D_GNU_SOURCE
3472do
3473case $cf_fix_cppflags in
3474(no)
3475	case $cf_add_cflags in
3476	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3477		case $cf_add_cflags in
3478		(-D*)
3479			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3480
3481			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3482				&& test -z "${cf_tst_cflags}" \
3483				&& cf_fix_cppflags=yes
3484
3485			if test $cf_fix_cppflags = yes ; then
3486
3487	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3488	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3489
3490				continue
3491			elif test "${cf_tst_cflags}" = "\"'" ; then
3492
3493	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3494	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3495
3496				continue
3497			fi
3498			;;
3499		esac
3500		case "$CPPFLAGS" in
3501		(*$cf_add_cflags)
3502			;;
3503		(*)
3504			case $cf_add_cflags in
3505			(-D*)
3506				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3507
3508CPPFLAGS=`echo "$CPPFLAGS" | \
3509	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3510		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3511
3512				;;
3513			esac
3514
3515	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3516	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3517
3518			;;
3519		esac
3520		;;
3521	(*)
3522
3523	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3524	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3525
3526		;;
3527	esac
3528	;;
3529(yes)
3530
3531	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3532	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3533
3534	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3535
3536	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3537		&& test -z "${cf_tst_cflags}" \
3538		&& cf_fix_cppflags=no
3539	;;
3540esac
3541done
3542
3543if test -n "$cf_new_cflags" ; then
3544
3545	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3546	CFLAGS="${CFLAGS}$cf_new_cflags"
3547
3548fi
3549
3550if test -n "$cf_new_cppflags" ; then
3551
3552	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3553	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3554
3555fi
3556
3557if test -n "$cf_new_extra_cppflags" ; then
3558
3559	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3560	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3561
3562fi
3563
3564			 cat >conftest.$ac_ext <<_ACEOF
3565#line 3565 "configure"
3566#include "confdefs.h"
3567#include <sys/types.h>
3568int
3569main (void)
3570{
3571
3572				#ifdef _XOPEN_SOURCE
3573				#error	expected _XOPEN_SOURCE to be undefined
3574				#endif
3575  ;
3576  return 0;
3577}
3578_ACEOF
3579rm -f conftest.$ac_objext
3580if { (eval echo "$as_me:3580: \"$ac_compile\"") >&5
3581  (eval $ac_compile) 2>&5
3582  ac_status=$?
3583  echo "$as_me:3583: \$? = $ac_status" >&5
3584  (exit $ac_status); } &&
3585         { ac_try='test -s conftest.$ac_objext'
3586  { (eval echo "$as_me:3586: \"$ac_try\"") >&5
3587  (eval $ac_try) 2>&5
3588  ac_status=$?
3589  echo "$as_me:3589: \$? = $ac_status" >&5
3590  (exit $ac_status); }; }; then
3591  cf_cv_gnu_source=no
3592else
3593  echo "$as_me: failed program was:" >&5
3594cat conftest.$ac_ext >&5
3595cf_cv_gnu_source=yes
3596fi
3597rm -f conftest.$ac_objext conftest.$ac_ext
3598			CPPFLAGS="$cf_save"
3599
3600fi
3601rm -f conftest.$ac_objext conftest.$ac_ext
3602
3603fi
3604echo "$as_me:3604: result: $cf_cv_gnu_source" >&5
3605echo "${ECHO_T}$cf_cv_gnu_source" >&6
3606
3607		if test "$cf_cv_gnu_source" = yes
3608		then
3609		echo "$as_me:3609: checking if we should also define _DEFAULT_SOURCE" >&5
3610echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3611if test "${cf_cv_default_source+set}" = set; then
3612  echo $ECHO_N "(cached) $ECHO_C" >&6
3613else
3614
3615	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3616	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3617
3618			cat >conftest.$ac_ext <<_ACEOF
3619#line 3619 "configure"
3620#include "confdefs.h"
3621#include <sys/types.h>
3622int
3623main (void)
3624{
3625
3626				#ifdef _DEFAULT_SOURCE
3627				#error	expected _DEFAULT_SOURCE to be undefined
3628				#endif
3629  ;
3630  return 0;
3631}
3632_ACEOF
3633rm -f conftest.$ac_objext
3634if { (eval echo "$as_me:3634: \"$ac_compile\"") >&5
3635  (eval $ac_compile) 2>&5
3636  ac_status=$?
3637  echo "$as_me:3637: \$? = $ac_status" >&5
3638  (exit $ac_status); } &&
3639         { ac_try='test -s conftest.$ac_objext'
3640  { (eval echo "$as_me:3640: \"$ac_try\"") >&5
3641  (eval $ac_try) 2>&5
3642  ac_status=$?
3643  echo "$as_me:3643: \$? = $ac_status" >&5
3644  (exit $ac_status); }; }; then
3645  cf_cv_default_source=no
3646else
3647  echo "$as_me: failed program was:" >&5
3648cat conftest.$ac_ext >&5
3649cf_cv_default_source=yes
3650fi
3651rm -f conftest.$ac_objext conftest.$ac_ext
3652
3653fi
3654echo "$as_me:3654: result: $cf_cv_default_source" >&5
3655echo "${ECHO_T}$cf_cv_default_source" >&6
3656			if test "$cf_cv_default_source" = yes
3657			then
3658
3659	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3660	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3661
3662			fi
3663		fi
3664	fi
3665
3666fi
3667
3668	;;
3669(minix*)
3670	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3671	;;
3672(mirbsd*)
3673	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3674	cf_XOPEN_SOURCE=
3675
3676cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3677
3678cf_save_CFLAGS="$CFLAGS"
3679cf_save_CPPFLAGS="$CPPFLAGS"
3680
3681cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3682	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3683		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3684
3685cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3686	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3687		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3688
3689echo "$as_me:3689: checking if we should define _POSIX_C_SOURCE" >&5
3690echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3691if test "${cf_cv_posix_c_source+set}" = set; then
3692  echo $ECHO_N "(cached) $ECHO_C" >&6
3693else
3694
3695echo "${as_me:-configure}:3695: testing if the symbol is already defined go no further ..." 1>&5
3696
3697	cat >conftest.$ac_ext <<_ACEOF
3698#line 3698 "configure"
3699#include "confdefs.h"
3700#include <sys/types.h>
3701int
3702main (void)
3703{
3704
3705#ifndef _POSIX_C_SOURCE
3706make an error
3707#endif
3708  ;
3709  return 0;
3710}
3711_ACEOF
3712rm -f conftest.$ac_objext
3713if { (eval echo "$as_me:3713: \"$ac_compile\"") >&5
3714  (eval $ac_compile) 2>&5
3715  ac_status=$?
3716  echo "$as_me:3716: \$? = $ac_status" >&5
3717  (exit $ac_status); } &&
3718         { ac_try='test -s conftest.$ac_objext'
3719  { (eval echo "$as_me:3719: \"$ac_try\"") >&5
3720  (eval $ac_try) 2>&5
3721  ac_status=$?
3722  echo "$as_me:3722: \$? = $ac_status" >&5
3723  (exit $ac_status); }; }; then
3724  cf_cv_posix_c_source=no
3725else
3726  echo "$as_me: failed program was:" >&5
3727cat conftest.$ac_ext >&5
3728cf_want_posix_source=no
3729	 case .$cf_POSIX_C_SOURCE in
3730	 (.[12]??*)
3731		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3732		;;
3733	 (.2)
3734		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3735		cf_want_posix_source=yes
3736		;;
3737	 (.*)
3738		cf_want_posix_source=yes
3739		;;
3740	 esac
3741	 if test "$cf_want_posix_source" = yes ; then
3742		cat >conftest.$ac_ext <<_ACEOF
3743#line 3743 "configure"
3744#include "confdefs.h"
3745#include <sys/types.h>
3746int
3747main (void)
3748{
3749
3750#ifdef _POSIX_SOURCE
3751make an error
3752#endif
3753  ;
3754  return 0;
3755}
3756_ACEOF
3757rm -f conftest.$ac_objext
3758if { (eval echo "$as_me:3758: \"$ac_compile\"") >&5
3759  (eval $ac_compile) 2>&5
3760  ac_status=$?
3761  echo "$as_me:3761: \$? = $ac_status" >&5
3762  (exit $ac_status); } &&
3763         { ac_try='test -s conftest.$ac_objext'
3764  { (eval echo "$as_me:3764: \"$ac_try\"") >&5
3765  (eval $ac_try) 2>&5
3766  ac_status=$?
3767  echo "$as_me:3767: \$? = $ac_status" >&5
3768  (exit $ac_status); }; }; then
3769  :
3770else
3771  echo "$as_me: failed program was:" >&5
3772cat conftest.$ac_ext >&5
3773cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3774fi
3775rm -f conftest.$ac_objext conftest.$ac_ext
3776	 fi
3777
3778echo "${as_me:-configure}:3778: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3779
3780	 CFLAGS="$cf_trim_CFLAGS"
3781	 CPPFLAGS="$cf_trim_CPPFLAGS"
3782
3783	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3784	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3785
3786echo "${as_me:-configure}:3786: testing if the second compile does not leave our definition intact error ..." 1>&5
3787
3788	 cat >conftest.$ac_ext <<_ACEOF
3789#line 3789 "configure"
3790#include "confdefs.h"
3791#include <sys/types.h>
3792int
3793main (void)
3794{
3795
3796#ifndef _POSIX_C_SOURCE
3797make an error
3798#endif
3799  ;
3800  return 0;
3801}
3802_ACEOF
3803rm -f conftest.$ac_objext
3804if { (eval echo "$as_me:3804: \"$ac_compile\"") >&5
3805  (eval $ac_compile) 2>&5
3806  ac_status=$?
3807  echo "$as_me:3807: \$? = $ac_status" >&5
3808  (exit $ac_status); } &&
3809         { ac_try='test -s conftest.$ac_objext'
3810  { (eval echo "$as_me:3810: \"$ac_try\"") >&5
3811  (eval $ac_try) 2>&5
3812  ac_status=$?
3813  echo "$as_me:3813: \$? = $ac_status" >&5
3814  (exit $ac_status); }; }; then
3815  :
3816else
3817  echo "$as_me: failed program was:" >&5
3818cat conftest.$ac_ext >&5
3819cf_cv_posix_c_source=no
3820fi
3821rm -f conftest.$ac_objext conftest.$ac_ext
3822	 CFLAGS="$cf_save_CFLAGS"
3823	 CPPFLAGS="$cf_save_CPPFLAGS"
3824
3825fi
3826rm -f conftest.$ac_objext conftest.$ac_ext
3827
3828fi
3829echo "$as_me:3829: result: $cf_cv_posix_c_source" >&5
3830echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3831
3832if test "$cf_cv_posix_c_source" != no ; then
3833	CFLAGS="$cf_trim_CFLAGS"
3834	CPPFLAGS="$cf_trim_CPPFLAGS"
3835
3836cf_fix_cppflags=no
3837cf_new_cflags=
3838cf_new_cppflags=
3839cf_new_extra_cppflags=
3840
3841for cf_add_cflags in $cf_cv_posix_c_source
3842do
3843case $cf_fix_cppflags in
3844(no)
3845	case $cf_add_cflags in
3846	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3847		case $cf_add_cflags in
3848		(-D*)
3849			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3850
3851			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3852				&& test -z "${cf_tst_cflags}" \
3853				&& cf_fix_cppflags=yes
3854
3855			if test $cf_fix_cppflags = yes ; then
3856
3857	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3858	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3859
3860				continue
3861			elif test "${cf_tst_cflags}" = "\"'" ; then
3862
3863	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3864	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3865
3866				continue
3867			fi
3868			;;
3869		esac
3870		case "$CPPFLAGS" in
3871		(*$cf_add_cflags)
3872			;;
3873		(*)
3874			case $cf_add_cflags in
3875			(-D*)
3876				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3877
3878CPPFLAGS=`echo "$CPPFLAGS" | \
3879	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3880		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3881
3882				;;
3883			esac
3884
3885	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3886	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3887
3888			;;
3889		esac
3890		;;
3891	(*)
3892
3893	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3894	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3895
3896		;;
3897	esac
3898	;;
3899(yes)
3900
3901	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3902	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3903
3904	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3905
3906	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3907		&& test -z "${cf_tst_cflags}" \
3908		&& cf_fix_cppflags=no
3909	;;
3910esac
3911done
3912
3913if test -n "$cf_new_cflags" ; then
3914
3915	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3916	CFLAGS="${CFLAGS}$cf_new_cflags"
3917
3918fi
3919
3920if test -n "$cf_new_cppflags" ; then
3921
3922	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3923	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3924
3925fi
3926
3927if test -n "$cf_new_extra_cppflags" ; then
3928
3929	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3930	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3931
3932fi
3933
3934fi
3935
3936	;;
3937(netbsd*)
3938	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3939	;;
3940(openbsd[4-9]*)
3941	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3942	cf_xopen_source="-D_BSD_SOURCE"
3943	cf_XOPEN_SOURCE=600
3944	;;
3945(openbsd*)
3946	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3947	;;
3948(osf[45]*)
3949	cf_xopen_source="-D_OSF_SOURCE"
3950	;;
3951(nto-qnx*)
3952	cf_xopen_source="-D_QNX_SOURCE"
3953	;;
3954(sco*)
3955	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3956	;;
3957(solaris2.*)
3958	cf_xopen_source="-D__EXTENSIONS__"
3959	cf_cv_xopen_source=broken
3960	;;
3961(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3962	cf_XOPEN_SOURCE=
3963	cf_POSIX_C_SOURCE=
3964	;;
3965(*)
3966
3967echo "$as_me:3967: checking if we should define _XOPEN_SOURCE" >&5
3968echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3969if test "${cf_cv_xopen_source+set}" = set; then
3970  echo $ECHO_N "(cached) $ECHO_C" >&6
3971else
3972
3973	cat >conftest.$ac_ext <<_ACEOF
3974#line 3974 "configure"
3975#include "confdefs.h"
3976
3977#include <stdlib.h>
3978#include <string.h>
3979#include <sys/types.h>
3980
3981int
3982main (void)
3983{
3984
3985#ifndef _XOPEN_SOURCE
3986make an error
3987#endif
3988  ;
3989  return 0;
3990}
3991_ACEOF
3992rm -f conftest.$ac_objext
3993if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994  (eval $ac_compile) 2>&5
3995  ac_status=$?
3996  echo "$as_me:3996: \$? = $ac_status" >&5
3997  (exit $ac_status); } &&
3998         { ac_try='test -s conftest.$ac_objext'
3999  { (eval echo "$as_me:3999: \"$ac_try\"") >&5
4000  (eval $ac_try) 2>&5
4001  ac_status=$?
4002  echo "$as_me:4002: \$? = $ac_status" >&5
4003  (exit $ac_status); }; }; then
4004  cf_cv_xopen_source=no
4005else
4006  echo "$as_me: failed program was:" >&5
4007cat conftest.$ac_ext >&5
4008cf_save="$CPPFLAGS"
4009
4010	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4011	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4012
4013	 cat >conftest.$ac_ext <<_ACEOF
4014#line 4014 "configure"
4015#include "confdefs.h"
4016
4017#include <stdlib.h>
4018#include <string.h>
4019#include <sys/types.h>
4020
4021int
4022main (void)
4023{
4024
4025#ifdef _XOPEN_SOURCE
4026make an error
4027#endif
4028  ;
4029  return 0;
4030}
4031_ACEOF
4032rm -f conftest.$ac_objext
4033if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5
4034  (eval $ac_compile) 2>&5
4035  ac_status=$?
4036  echo "$as_me:4036: \$? = $ac_status" >&5
4037  (exit $ac_status); } &&
4038         { ac_try='test -s conftest.$ac_objext'
4039  { (eval echo "$as_me:4039: \"$ac_try\"") >&5
4040  (eval $ac_try) 2>&5
4041  ac_status=$?
4042  echo "$as_me:4042: \$? = $ac_status" >&5
4043  (exit $ac_status); }; }; then
4044  cf_cv_xopen_source=no
4045else
4046  echo "$as_me: failed program was:" >&5
4047cat conftest.$ac_ext >&5
4048cf_cv_xopen_source=$cf_XOPEN_SOURCE
4049fi
4050rm -f conftest.$ac_objext conftest.$ac_ext
4051	CPPFLAGS="$cf_save"
4052
4053fi
4054rm -f conftest.$ac_objext conftest.$ac_ext
4055
4056fi
4057echo "$as_me:4057: result: $cf_cv_xopen_source" >&5
4058echo "${ECHO_T}$cf_cv_xopen_source" >&6
4059
4060if test "$cf_cv_xopen_source" != no ; then
4061
4062CFLAGS=`echo "$CFLAGS" | \
4063	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4064		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4065
4066CPPFLAGS=`echo "$CPPFLAGS" | \
4067	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4068		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4069
4070	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4071
4072cf_fix_cppflags=no
4073cf_new_cflags=
4074cf_new_cppflags=
4075cf_new_extra_cppflags=
4076
4077for cf_add_cflags in $cf_temp_xopen_source
4078do
4079case $cf_fix_cppflags in
4080(no)
4081	case $cf_add_cflags in
4082	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4083		case $cf_add_cflags in
4084		(-D*)
4085			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4086
4087			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4088				&& test -z "${cf_tst_cflags}" \
4089				&& cf_fix_cppflags=yes
4090
4091			if test $cf_fix_cppflags = yes ; then
4092
4093	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4094	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4095
4096				continue
4097			elif test "${cf_tst_cflags}" = "\"'" ; then
4098
4099	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4100	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4101
4102				continue
4103			fi
4104			;;
4105		esac
4106		case "$CPPFLAGS" in
4107		(*$cf_add_cflags)
4108			;;
4109		(*)
4110			case $cf_add_cflags in
4111			(-D*)
4112				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4113
4114CPPFLAGS=`echo "$CPPFLAGS" | \
4115	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4116		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4117
4118				;;
4119			esac
4120
4121	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4122	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4123
4124			;;
4125		esac
4126		;;
4127	(*)
4128
4129	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4130	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4131
4132		;;
4133	esac
4134	;;
4135(yes)
4136
4137	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4138	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4139
4140	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4141
4142	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4143		&& test -z "${cf_tst_cflags}" \
4144		&& cf_fix_cppflags=no
4145	;;
4146esac
4147done
4148
4149if test -n "$cf_new_cflags" ; then
4150
4151	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4152	CFLAGS="${CFLAGS}$cf_new_cflags"
4153
4154fi
4155
4156if test -n "$cf_new_cppflags" ; then
4157
4158	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4159	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4160
4161fi
4162
4163if test -n "$cf_new_extra_cppflags" ; then
4164
4165	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4166	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4167
4168fi
4169
4170fi
4171
4172cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4173
4174cf_save_CFLAGS="$CFLAGS"
4175cf_save_CPPFLAGS="$CPPFLAGS"
4176
4177cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4178	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4179		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4180
4181cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4182	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4183		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4184
4185echo "$as_me:4185: checking if we should define _POSIX_C_SOURCE" >&5
4186echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4187if test "${cf_cv_posix_c_source+set}" = set; then
4188  echo $ECHO_N "(cached) $ECHO_C" >&6
4189else
4190
4191echo "${as_me:-configure}:4191: testing if the symbol is already defined go no further ..." 1>&5
4192
4193	cat >conftest.$ac_ext <<_ACEOF
4194#line 4194 "configure"
4195#include "confdefs.h"
4196#include <sys/types.h>
4197int
4198main (void)
4199{
4200
4201#ifndef _POSIX_C_SOURCE
4202make an error
4203#endif
4204  ;
4205  return 0;
4206}
4207_ACEOF
4208rm -f conftest.$ac_objext
4209if { (eval echo "$as_me:4209: \"$ac_compile\"") >&5
4210  (eval $ac_compile) 2>&5
4211  ac_status=$?
4212  echo "$as_me:4212: \$? = $ac_status" >&5
4213  (exit $ac_status); } &&
4214         { ac_try='test -s conftest.$ac_objext'
4215  { (eval echo "$as_me:4215: \"$ac_try\"") >&5
4216  (eval $ac_try) 2>&5
4217  ac_status=$?
4218  echo "$as_me:4218: \$? = $ac_status" >&5
4219  (exit $ac_status); }; }; then
4220  cf_cv_posix_c_source=no
4221else
4222  echo "$as_me: failed program was:" >&5
4223cat conftest.$ac_ext >&5
4224cf_want_posix_source=no
4225	 case .$cf_POSIX_C_SOURCE in
4226	 (.[12]??*)
4227		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4228		;;
4229	 (.2)
4230		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4231		cf_want_posix_source=yes
4232		;;
4233	 (.*)
4234		cf_want_posix_source=yes
4235		;;
4236	 esac
4237	 if test "$cf_want_posix_source" = yes ; then
4238		cat >conftest.$ac_ext <<_ACEOF
4239#line 4239 "configure"
4240#include "confdefs.h"
4241#include <sys/types.h>
4242int
4243main (void)
4244{
4245
4246#ifdef _POSIX_SOURCE
4247make an error
4248#endif
4249  ;
4250  return 0;
4251}
4252_ACEOF
4253rm -f conftest.$ac_objext
4254if { (eval echo "$as_me:4254: \"$ac_compile\"") >&5
4255  (eval $ac_compile) 2>&5
4256  ac_status=$?
4257  echo "$as_me:4257: \$? = $ac_status" >&5
4258  (exit $ac_status); } &&
4259         { ac_try='test -s conftest.$ac_objext'
4260  { (eval echo "$as_me:4260: \"$ac_try\"") >&5
4261  (eval $ac_try) 2>&5
4262  ac_status=$?
4263  echo "$as_me:4263: \$? = $ac_status" >&5
4264  (exit $ac_status); }; }; then
4265  :
4266else
4267  echo "$as_me: failed program was:" >&5
4268cat conftest.$ac_ext >&5
4269cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4270fi
4271rm -f conftest.$ac_objext conftest.$ac_ext
4272	 fi
4273
4274echo "${as_me:-configure}:4274: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4275
4276	 CFLAGS="$cf_trim_CFLAGS"
4277	 CPPFLAGS="$cf_trim_CPPFLAGS"
4278
4279	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4280	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4281
4282echo "${as_me:-configure}:4282: testing if the second compile does not leave our definition intact error ..." 1>&5
4283
4284	 cat >conftest.$ac_ext <<_ACEOF
4285#line 4285 "configure"
4286#include "confdefs.h"
4287#include <sys/types.h>
4288int
4289main (void)
4290{
4291
4292#ifndef _POSIX_C_SOURCE
4293make an error
4294#endif
4295  ;
4296  return 0;
4297}
4298_ACEOF
4299rm -f conftest.$ac_objext
4300if { (eval echo "$as_me:4300: \"$ac_compile\"") >&5
4301  (eval $ac_compile) 2>&5
4302  ac_status=$?
4303  echo "$as_me:4303: \$? = $ac_status" >&5
4304  (exit $ac_status); } &&
4305         { ac_try='test -s conftest.$ac_objext'
4306  { (eval echo "$as_me:4306: \"$ac_try\"") >&5
4307  (eval $ac_try) 2>&5
4308  ac_status=$?
4309  echo "$as_me:4309: \$? = $ac_status" >&5
4310  (exit $ac_status); }; }; then
4311  :
4312else
4313  echo "$as_me: failed program was:" >&5
4314cat conftest.$ac_ext >&5
4315cf_cv_posix_c_source=no
4316fi
4317rm -f conftest.$ac_objext conftest.$ac_ext
4318	 CFLAGS="$cf_save_CFLAGS"
4319	 CPPFLAGS="$cf_save_CPPFLAGS"
4320
4321fi
4322rm -f conftest.$ac_objext conftest.$ac_ext
4323
4324fi
4325echo "$as_me:4325: result: $cf_cv_posix_c_source" >&5
4326echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4327
4328if test "$cf_cv_posix_c_source" != no ; then
4329	CFLAGS="$cf_trim_CFLAGS"
4330	CPPFLAGS="$cf_trim_CPPFLAGS"
4331
4332cf_fix_cppflags=no
4333cf_new_cflags=
4334cf_new_cppflags=
4335cf_new_extra_cppflags=
4336
4337for cf_add_cflags in $cf_cv_posix_c_source
4338do
4339case $cf_fix_cppflags in
4340(no)
4341	case $cf_add_cflags in
4342	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4343		case $cf_add_cflags in
4344		(-D*)
4345			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4346
4347			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4348				&& test -z "${cf_tst_cflags}" \
4349				&& cf_fix_cppflags=yes
4350
4351			if test $cf_fix_cppflags = yes ; then
4352
4353	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4354	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4355
4356				continue
4357			elif test "${cf_tst_cflags}" = "\"'" ; then
4358
4359	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4360	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4361
4362				continue
4363			fi
4364			;;
4365		esac
4366		case "$CPPFLAGS" in
4367		(*$cf_add_cflags)
4368			;;
4369		(*)
4370			case $cf_add_cflags in
4371			(-D*)
4372				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4373
4374CPPFLAGS=`echo "$CPPFLAGS" | \
4375	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4376		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4377
4378				;;
4379			esac
4380
4381	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4382	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4383
4384			;;
4385		esac
4386		;;
4387	(*)
4388
4389	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4390	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4391
4392		;;
4393	esac
4394	;;
4395(yes)
4396
4397	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4398	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4399
4400	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4401
4402	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4403		&& test -z "${cf_tst_cflags}" \
4404		&& cf_fix_cppflags=no
4405	;;
4406esac
4407done
4408
4409if test -n "$cf_new_cflags" ; then
4410
4411	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4412	CFLAGS="${CFLAGS}$cf_new_cflags"
4413
4414fi
4415
4416if test -n "$cf_new_cppflags" ; then
4417
4418	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4419	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4420
4421fi
4422
4423if test -n "$cf_new_extra_cppflags" ; then
4424
4425	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4426	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4427
4428fi
4429
4430fi
4431
4432	;;
4433esac
4434
4435if test -n "$cf_xopen_source" ; then
4436
4437cf_fix_cppflags=no
4438cf_new_cflags=
4439cf_new_cppflags=
4440cf_new_extra_cppflags=
4441
4442for cf_add_cflags in $cf_xopen_source
4443do
4444case $cf_fix_cppflags in
4445(no)
4446	case $cf_add_cflags in
4447	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4448		case $cf_add_cflags in
4449		(-D*)
4450			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4451
4452			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4453				&& test -z "${cf_tst_cflags}" \
4454				&& cf_fix_cppflags=yes
4455
4456			if test $cf_fix_cppflags = yes ; then
4457
4458	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4459	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4460
4461				continue
4462			elif test "${cf_tst_cflags}" = "\"'" ; then
4463
4464	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4465	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4466
4467				continue
4468			fi
4469			;;
4470		esac
4471		case "$CPPFLAGS" in
4472		(*$cf_add_cflags)
4473			;;
4474		(*)
4475			case $cf_add_cflags in
4476			(-D*)
4477				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4478
4479CPPFLAGS=`echo "$CPPFLAGS" | \
4480	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4481		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4482
4483				;;
4484			esac
4485
4486	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4487	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4488
4489			;;
4490		esac
4491		;;
4492	(*)
4493
4494	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4495	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4496
4497		;;
4498	esac
4499	;;
4500(yes)
4501
4502	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4503	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4504
4505	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4506
4507	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4508		&& test -z "${cf_tst_cflags}" \
4509		&& cf_fix_cppflags=no
4510	;;
4511esac
4512done
4513
4514if test -n "$cf_new_cflags" ; then
4515	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4516
4517echo "${as_me:-configure}:4517: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4518
4519	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4520	CFLAGS="${CFLAGS}$cf_new_cflags"
4521
4522fi
4523
4524if test -n "$cf_new_cppflags" ; then
4525	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4526
4527echo "${as_me:-configure}:4527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4528
4529	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4530	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4531
4532fi
4533
4534if test -n "$cf_new_extra_cppflags" ; then
4535	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4536
4537echo "${as_me:-configure}:4537: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4538
4539	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4540	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4541
4542fi
4543
4544fi
4545
4546if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4547	echo "$as_me:4547: checking if _XOPEN_SOURCE really is set" >&5
4548echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4549	cat >conftest.$ac_ext <<_ACEOF
4550#line 4550 "configure"
4551#include "confdefs.h"
4552#include <stdlib.h>
4553int
4554main (void)
4555{
4556
4557#ifndef _XOPEN_SOURCE
4558make an error
4559#endif
4560  ;
4561  return 0;
4562}
4563_ACEOF
4564rm -f conftest.$ac_objext
4565if { (eval echo "$as_me:4565: \"$ac_compile\"") >&5
4566  (eval $ac_compile) 2>&5
4567  ac_status=$?
4568  echo "$as_me:4568: \$? = $ac_status" >&5
4569  (exit $ac_status); } &&
4570         { ac_try='test -s conftest.$ac_objext'
4571  { (eval echo "$as_me:4571: \"$ac_try\"") >&5
4572  (eval $ac_try) 2>&5
4573  ac_status=$?
4574  echo "$as_me:4574: \$? = $ac_status" >&5
4575  (exit $ac_status); }; }; then
4576  cf_XOPEN_SOURCE_set=yes
4577else
4578  echo "$as_me: failed program was:" >&5
4579cat conftest.$ac_ext >&5
4580cf_XOPEN_SOURCE_set=no
4581fi
4582rm -f conftest.$ac_objext conftest.$ac_ext
4583	echo "$as_me:4583: result: $cf_XOPEN_SOURCE_set" >&5
4584echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4585	if test $cf_XOPEN_SOURCE_set = yes
4586	then
4587		cat >conftest.$ac_ext <<_ACEOF
4588#line 4588 "configure"
4589#include "confdefs.h"
4590#include <stdlib.h>
4591int
4592main (void)
4593{
4594
4595#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4596make an error
4597#endif
4598  ;
4599  return 0;
4600}
4601_ACEOF
4602rm -f conftest.$ac_objext
4603if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
4604  (eval $ac_compile) 2>&5
4605  ac_status=$?
4606  echo "$as_me:4606: \$? = $ac_status" >&5
4607  (exit $ac_status); } &&
4608         { ac_try='test -s conftest.$ac_objext'
4609  { (eval echo "$as_me:4609: \"$ac_try\"") >&5
4610  (eval $ac_try) 2>&5
4611  ac_status=$?
4612  echo "$as_me:4612: \$? = $ac_status" >&5
4613  (exit $ac_status); }; }; then
4614  cf_XOPEN_SOURCE_set_ok=yes
4615else
4616  echo "$as_me: failed program was:" >&5
4617cat conftest.$ac_ext >&5
4618cf_XOPEN_SOURCE_set_ok=no
4619fi
4620rm -f conftest.$ac_objext conftest.$ac_ext
4621		if test $cf_XOPEN_SOURCE_set_ok = no
4622		then
4623			{ echo "$as_me:4623: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4624echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4625		fi
4626	else
4627
4628echo "$as_me:4628: checking if we should define _XOPEN_SOURCE" >&5
4629echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4630if test "${cf_cv_xopen_source+set}" = set; then
4631  echo $ECHO_N "(cached) $ECHO_C" >&6
4632else
4633
4634	cat >conftest.$ac_ext <<_ACEOF
4635#line 4635 "configure"
4636#include "confdefs.h"
4637
4638#include <stdlib.h>
4639#include <string.h>
4640#include <sys/types.h>
4641
4642int
4643main (void)
4644{
4645
4646#ifndef _XOPEN_SOURCE
4647make an error
4648#endif
4649  ;
4650  return 0;
4651}
4652_ACEOF
4653rm -f conftest.$ac_objext
4654if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655  (eval $ac_compile) 2>&5
4656  ac_status=$?
4657  echo "$as_me:4657: \$? = $ac_status" >&5
4658  (exit $ac_status); } &&
4659         { ac_try='test -s conftest.$ac_objext'
4660  { (eval echo "$as_me:4660: \"$ac_try\"") >&5
4661  (eval $ac_try) 2>&5
4662  ac_status=$?
4663  echo "$as_me:4663: \$? = $ac_status" >&5
4664  (exit $ac_status); }; }; then
4665  cf_cv_xopen_source=no
4666else
4667  echo "$as_me: failed program was:" >&5
4668cat conftest.$ac_ext >&5
4669cf_save="$CPPFLAGS"
4670
4671	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4672	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4673
4674	 cat >conftest.$ac_ext <<_ACEOF
4675#line 4675 "configure"
4676#include "confdefs.h"
4677
4678#include <stdlib.h>
4679#include <string.h>
4680#include <sys/types.h>
4681
4682int
4683main (void)
4684{
4685
4686#ifdef _XOPEN_SOURCE
4687make an error
4688#endif
4689  ;
4690  return 0;
4691}
4692_ACEOF
4693rm -f conftest.$ac_objext
4694if { (eval echo "$as_me:4694: \"$ac_compile\"") >&5
4695  (eval $ac_compile) 2>&5
4696  ac_status=$?
4697  echo "$as_me:4697: \$? = $ac_status" >&5
4698  (exit $ac_status); } &&
4699         { ac_try='test -s conftest.$ac_objext'
4700  { (eval echo "$as_me:4700: \"$ac_try\"") >&5
4701  (eval $ac_try) 2>&5
4702  ac_status=$?
4703  echo "$as_me:4703: \$? = $ac_status" >&5
4704  (exit $ac_status); }; }; then
4705  cf_cv_xopen_source=no
4706else
4707  echo "$as_me: failed program was:" >&5
4708cat conftest.$ac_ext >&5
4709cf_cv_xopen_source=$cf_XOPEN_SOURCE
4710fi
4711rm -f conftest.$ac_objext conftest.$ac_ext
4712	CPPFLAGS="$cf_save"
4713
4714fi
4715rm -f conftest.$ac_objext conftest.$ac_ext
4716
4717fi
4718echo "$as_me:4718: result: $cf_cv_xopen_source" >&5
4719echo "${ECHO_T}$cf_cv_xopen_source" >&6
4720
4721if test "$cf_cv_xopen_source" != no ; then
4722
4723CFLAGS=`echo "$CFLAGS" | \
4724	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4725		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4726
4727CPPFLAGS=`echo "$CPPFLAGS" | \
4728	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4729		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4730
4731	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4732
4733cf_fix_cppflags=no
4734cf_new_cflags=
4735cf_new_cppflags=
4736cf_new_extra_cppflags=
4737
4738for cf_add_cflags in $cf_temp_xopen_source
4739do
4740case $cf_fix_cppflags in
4741(no)
4742	case $cf_add_cflags in
4743	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4744		case $cf_add_cflags in
4745		(-D*)
4746			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4747
4748			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4749				&& test -z "${cf_tst_cflags}" \
4750				&& cf_fix_cppflags=yes
4751
4752			if test $cf_fix_cppflags = yes ; then
4753
4754	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4755	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4756
4757				continue
4758			elif test "${cf_tst_cflags}" = "\"'" ; then
4759
4760	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4761	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4762
4763				continue
4764			fi
4765			;;
4766		esac
4767		case "$CPPFLAGS" in
4768		(*$cf_add_cflags)
4769			;;
4770		(*)
4771			case $cf_add_cflags in
4772			(-D*)
4773				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4774
4775CPPFLAGS=`echo "$CPPFLAGS" | \
4776	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4777		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4778
4779				;;
4780			esac
4781
4782	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4783	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4784
4785			;;
4786		esac
4787		;;
4788	(*)
4789
4790	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4791	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4792
4793		;;
4794	esac
4795	;;
4796(yes)
4797
4798	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4799	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4800
4801	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4802
4803	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4804		&& test -z "${cf_tst_cflags}" \
4805		&& cf_fix_cppflags=no
4806	;;
4807esac
4808done
4809
4810if test -n "$cf_new_cflags" ; then
4811
4812	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4813	CFLAGS="${CFLAGS}$cf_new_cflags"
4814
4815fi
4816
4817if test -n "$cf_new_cppflags" ; then
4818
4819	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4820	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4821
4822fi
4823
4824if test -n "$cf_new_extra_cppflags" ; then
4825
4826	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4827	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4828
4829fi
4830
4831fi
4832
4833	fi
4834fi
4835
4836# Check whether --enable-largefile or --disable-largefile was given.
4837if test "${enable_largefile+set}" = set; then
4838  enableval="$enable_largefile"
4839
4840fi;
4841if test "$enable_largefile" != no; then
4842
4843  echo "$as_me:4843: checking for special C compiler options needed for large files" >&5
4844echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4845if test "${ac_cv_sys_largefile_CC+set}" = set; then
4846  echo $ECHO_N "(cached) $ECHO_C" >&6
4847else
4848  ac_cv_sys_largefile_CC=no
4849     if test "$GCC" != yes; then
4850       ac_save_CC=$CC
4851       while :; do
4852     	 # IRIX 6.2 and later do not support large files by default,
4853     	 # so use the C compiler's -n32 option if that helps.
4854         cat >conftest.$ac_ext <<_ACEOF
4855#line 4855 "configure"
4856#include "confdefs.h"
4857#include <sys/types.h>
4858 /* Check that off_t can represent 2**63 - 1 correctly.
4859    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4860    since some C++ compilers masquerading as C compilers
4861    incorrectly reject 9223372036854775807.  */
4862#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4863  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4864		       && LARGE_OFF_T % 2147483647 == 1)
4865		      ? 1 : -1];
4866int
4867main (void)
4868{
4869
4870  ;
4871  return 0;
4872}
4873_ACEOF
4874     	 rm -f conftest.$ac_objext
4875if { (eval echo "$as_me:4875: \"$ac_compile\"") >&5
4876  (eval $ac_compile) 2>&5
4877  ac_status=$?
4878  echo "$as_me:4878: \$? = $ac_status" >&5
4879  (exit $ac_status); } &&
4880         { ac_try='test -s conftest.$ac_objext'
4881  { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4882  (eval $ac_try) 2>&5
4883  ac_status=$?
4884  echo "$as_me:4884: \$? = $ac_status" >&5
4885  (exit $ac_status); }; }; then
4886  break
4887else
4888  echo "$as_me: failed program was:" >&5
4889cat conftest.$ac_ext >&5
4890fi
4891rm -f conftest.$ac_objext
4892     	 CC="$CC -n32"
4893     	 rm -f conftest.$ac_objext
4894if { (eval echo "$as_me:4894: \"$ac_compile\"") >&5
4895  (eval $ac_compile) 2>&5
4896  ac_status=$?
4897  echo "$as_me:4897: \$? = $ac_status" >&5
4898  (exit $ac_status); } &&
4899         { ac_try='test -s conftest.$ac_objext'
4900  { (eval echo "$as_me:4900: \"$ac_try\"") >&5
4901  (eval $ac_try) 2>&5
4902  ac_status=$?
4903  echo "$as_me:4903: \$? = $ac_status" >&5
4904  (exit $ac_status); }; }; then
4905  ac_cv_sys_largefile_CC=' -n32'; break
4906else
4907  echo "$as_me: failed program was:" >&5
4908cat conftest.$ac_ext >&5
4909fi
4910rm -f conftest.$ac_objext
4911         break
4912       done
4913       CC=$ac_save_CC
4914       rm -f conftest.$ac_ext
4915    fi
4916fi
4917echo "$as_me:4917: result: $ac_cv_sys_largefile_CC" >&5
4918echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4919  if test "$ac_cv_sys_largefile_CC" != no; then
4920    CC=$CC$ac_cv_sys_largefile_CC
4921  fi
4922
4923  echo "$as_me:4923: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4924echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4925if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4926  echo $ECHO_N "(cached) $ECHO_C" >&6
4927else
4928  while :; do
4929  ac_cv_sys_file_offset_bits=no
4930  cat >conftest.$ac_ext <<_ACEOF
4931#line 4931 "configure"
4932#include "confdefs.h"
4933#include <sys/types.h>
4934 /* Check that off_t can represent 2**63 - 1 correctly.
4935    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4936    since some C++ compilers masquerading as C compilers
4937    incorrectly reject 9223372036854775807.  */
4938#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4939  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4940		       && LARGE_OFF_T % 2147483647 == 1)
4941		      ? 1 : -1];
4942int
4943main (void)
4944{
4945
4946  ;
4947  return 0;
4948}
4949_ACEOF
4950rm -f conftest.$ac_objext
4951if { (eval echo "$as_me:4951: \"$ac_compile\"") >&5
4952  (eval $ac_compile) 2>&5
4953  ac_status=$?
4954  echo "$as_me:4954: \$? = $ac_status" >&5
4955  (exit $ac_status); } &&
4956         { ac_try='test -s conftest.$ac_objext'
4957  { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4958  (eval $ac_try) 2>&5
4959  ac_status=$?
4960  echo "$as_me:4960: \$? = $ac_status" >&5
4961  (exit $ac_status); }; }; then
4962  break
4963else
4964  echo "$as_me: failed program was:" >&5
4965cat conftest.$ac_ext >&5
4966fi
4967rm -f conftest.$ac_objext conftest.$ac_ext
4968  cat >conftest.$ac_ext <<_ACEOF
4969#line 4969 "configure"
4970#include "confdefs.h"
4971#define _FILE_OFFSET_BITS 64
4972#include <sys/types.h>
4973 /* Check that off_t can represent 2**63 - 1 correctly.
4974    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4975    since some C++ compilers masquerading as C compilers
4976    incorrectly reject 9223372036854775807.  */
4977#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4978  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4979		       && LARGE_OFF_T % 2147483647 == 1)
4980		      ? 1 : -1];
4981int
4982main (void)
4983{
4984
4985  ;
4986  return 0;
4987}
4988_ACEOF
4989rm -f conftest.$ac_objext
4990if { (eval echo "$as_me:4990: \"$ac_compile\"") >&5
4991  (eval $ac_compile) 2>&5
4992  ac_status=$?
4993  echo "$as_me:4993: \$? = $ac_status" >&5
4994  (exit $ac_status); } &&
4995         { ac_try='test -s conftest.$ac_objext'
4996  { (eval echo "$as_me:4996: \"$ac_try\"") >&5
4997  (eval $ac_try) 2>&5
4998  ac_status=$?
4999  echo "$as_me:4999: \$? = $ac_status" >&5
5000  (exit $ac_status); }; }; then
5001  ac_cv_sys_file_offset_bits=64; break
5002else
5003  echo "$as_me: failed program was:" >&5
5004cat conftest.$ac_ext >&5
5005fi
5006rm -f conftest.$ac_objext conftest.$ac_ext
5007  break
5008done
5009fi
5010echo "$as_me:5010: result: $ac_cv_sys_file_offset_bits" >&5
5011echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5012if test "$ac_cv_sys_file_offset_bits" != no; then
5013
5014cat >>confdefs.h <<EOF
5015#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5016EOF
5017
5018fi
5019rm -rf conftest*
5020  echo "$as_me:5020: checking for _LARGE_FILES value needed for large files" >&5
5021echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5022if test "${ac_cv_sys_large_files+set}" = set; then
5023  echo $ECHO_N "(cached) $ECHO_C" >&6
5024else
5025  while :; do
5026  ac_cv_sys_large_files=no
5027  cat >conftest.$ac_ext <<_ACEOF
5028#line 5028 "configure"
5029#include "confdefs.h"
5030#include <sys/types.h>
5031 /* Check that off_t can represent 2**63 - 1 correctly.
5032    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5033    since some C++ compilers masquerading as C compilers
5034    incorrectly reject 9223372036854775807.  */
5035#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5036  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5037		       && LARGE_OFF_T % 2147483647 == 1)
5038		      ? 1 : -1];
5039int
5040main (void)
5041{
5042
5043  ;
5044  return 0;
5045}
5046_ACEOF
5047rm -f conftest.$ac_objext
5048if { (eval echo "$as_me:5048: \"$ac_compile\"") >&5
5049  (eval $ac_compile) 2>&5
5050  ac_status=$?
5051  echo "$as_me:5051: \$? = $ac_status" >&5
5052  (exit $ac_status); } &&
5053         { ac_try='test -s conftest.$ac_objext'
5054  { (eval echo "$as_me:5054: \"$ac_try\"") >&5
5055  (eval $ac_try) 2>&5
5056  ac_status=$?
5057  echo "$as_me:5057: \$? = $ac_status" >&5
5058  (exit $ac_status); }; }; then
5059  break
5060else
5061  echo "$as_me: failed program was:" >&5
5062cat conftest.$ac_ext >&5
5063fi
5064rm -f conftest.$ac_objext conftest.$ac_ext
5065  cat >conftest.$ac_ext <<_ACEOF
5066#line 5066 "configure"
5067#include "confdefs.h"
5068#define _LARGE_FILES 1
5069#include <sys/types.h>
5070 /* Check that off_t can represent 2**63 - 1 correctly.
5071    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5072    since some C++ compilers masquerading as C compilers
5073    incorrectly reject 9223372036854775807.  */
5074#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5075  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5076		       && LARGE_OFF_T % 2147483647 == 1)
5077		      ? 1 : -1];
5078int
5079main (void)
5080{
5081
5082  ;
5083  return 0;
5084}
5085_ACEOF
5086rm -f conftest.$ac_objext
5087if { (eval echo "$as_me:5087: \"$ac_compile\"") >&5
5088  (eval $ac_compile) 2>&5
5089  ac_status=$?
5090  echo "$as_me:5090: \$? = $ac_status" >&5
5091  (exit $ac_status); } &&
5092         { ac_try='test -s conftest.$ac_objext'
5093  { (eval echo "$as_me:5093: \"$ac_try\"") >&5
5094  (eval $ac_try) 2>&5
5095  ac_status=$?
5096  echo "$as_me:5096: \$? = $ac_status" >&5
5097  (exit $ac_status); }; }; then
5098  ac_cv_sys_large_files=1; break
5099else
5100  echo "$as_me: failed program was:" >&5
5101cat conftest.$ac_ext >&5
5102fi
5103rm -f conftest.$ac_objext conftest.$ac_ext
5104  break
5105done
5106fi
5107echo "$as_me:5107: result: $ac_cv_sys_large_files" >&5
5108echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5109if test "$ac_cv_sys_large_files" != no; then
5110
5111cat >>confdefs.h <<EOF
5112#define _LARGE_FILES $ac_cv_sys_large_files
5113EOF
5114
5115fi
5116rm -rf conftest*
5117fi
5118
5119	if test "$enable_largefile" != no ; then
5120	echo "$as_me:5120: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5121echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
5122if test "${ac_cv_sys_largefile_source+set}" = set; then
5123  echo $ECHO_N "(cached) $ECHO_C" >&6
5124else
5125  while :; do
5126  ac_cv_sys_largefile_source=no
5127  cat >conftest.$ac_ext <<_ACEOF
5128#line 5128 "configure"
5129#include "confdefs.h"
5130#include <stdio.h>
5131int
5132main (void)
5133{
5134return !fseeko;
5135  ;
5136  return 0;
5137}
5138_ACEOF
5139rm -f conftest.$ac_objext
5140if { (eval echo "$as_me:5140: \"$ac_compile\"") >&5
5141  (eval $ac_compile) 2>&5
5142  ac_status=$?
5143  echo "$as_me:5143: \$? = $ac_status" >&5
5144  (exit $ac_status); } &&
5145         { ac_try='test -s conftest.$ac_objext'
5146  { (eval echo "$as_me:5146: \"$ac_try\"") >&5
5147  (eval $ac_try) 2>&5
5148  ac_status=$?
5149  echo "$as_me:5149: \$? = $ac_status" >&5
5150  (exit $ac_status); }; }; then
5151  break
5152else
5153  echo "$as_me: failed program was:" >&5
5154cat conftest.$ac_ext >&5
5155fi
5156rm -f conftest.$ac_objext conftest.$ac_ext
5157  cat >conftest.$ac_ext <<_ACEOF
5158#line 5158 "configure"
5159#include "confdefs.h"
5160#define _LARGEFILE_SOURCE 1
5161#include <stdio.h>
5162int
5163main (void)
5164{
5165return !fseeko;
5166  ;
5167  return 0;
5168}
5169_ACEOF
5170rm -f conftest.$ac_objext
5171if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
5172  (eval $ac_compile) 2>&5
5173  ac_status=$?
5174  echo "$as_me:5174: \$? = $ac_status" >&5
5175  (exit $ac_status); } &&
5176         { ac_try='test -s conftest.$ac_objext'
5177  { (eval echo "$as_me:5177: \"$ac_try\"") >&5
5178  (eval $ac_try) 2>&5
5179  ac_status=$?
5180  echo "$as_me:5180: \$? = $ac_status" >&5
5181  (exit $ac_status); }; }; then
5182  ac_cv_sys_largefile_source=1; break
5183else
5184  echo "$as_me: failed program was:" >&5
5185cat conftest.$ac_ext >&5
5186fi
5187rm -f conftest.$ac_objext conftest.$ac_ext
5188  break
5189done
5190fi
5191echo "$as_me:5191: result: $ac_cv_sys_largefile_source" >&5
5192echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
5193if test "$ac_cv_sys_largefile_source" != no; then
5194
5195cat >>confdefs.h <<EOF
5196#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5197EOF
5198
5199fi
5200rm -rf conftest*
5201
5202# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5203# in glibc 2.1.3, but that breaks too many other things.
5204# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5205echo "$as_me:5205: checking for fseeko" >&5
5206echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
5207if test "${ac_cv_func_fseeko+set}" = set; then
5208  echo $ECHO_N "(cached) $ECHO_C" >&6
5209else
5210  cat >conftest.$ac_ext <<_ACEOF
5211#line 5211 "configure"
5212#include "confdefs.h"
5213#include <stdio.h>
5214int
5215main (void)
5216{
5217return fseeko && fseeko (stdin, 0, 0);
5218  ;
5219  return 0;
5220}
5221_ACEOF
5222rm -f conftest.$ac_objext conftest$ac_exeext
5223if { (eval echo "$as_me:5223: \"$ac_link\"") >&5
5224  (eval $ac_link) 2>&5
5225  ac_status=$?
5226  echo "$as_me:5226: \$? = $ac_status" >&5
5227  (exit $ac_status); } &&
5228         { ac_try='test -s conftest$ac_exeext'
5229  { (eval echo "$as_me:5229: \"$ac_try\"") >&5
5230  (eval $ac_try) 2>&5
5231  ac_status=$?
5232  echo "$as_me:5232: \$? = $ac_status" >&5
5233  (exit $ac_status); }; }; then
5234  ac_cv_func_fseeko=yes
5235else
5236  echo "$as_me: failed program was:" >&5
5237cat conftest.$ac_ext >&5
5238ac_cv_func_fseeko=no
5239fi
5240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5241fi
5242echo "$as_me:5242: result: $ac_cv_func_fseeko" >&5
5243echo "${ECHO_T}$ac_cv_func_fseeko" >&6
5244if test $ac_cv_func_fseeko = yes; then
5245
5246cat >>confdefs.h <<\EOF
5247#define HAVE_FSEEKO 1
5248EOF
5249
5250fi
5251
5252	# Normally we would collect these definitions in the config.h,
5253	# but (like _XOPEN_SOURCE), some environments rely on having these
5254	# defined before any of the system headers are included.  Another
5255	# case comes up with C++, e.g., on AIX the compiler compiles the
5256	# header files by themselves before looking at the body files it is
5257	# told to compile.  For ncurses, those header files do not include
5258	# the config.h
5259	if test "$ac_cv_sys_large_files" != no
5260	then
5261
5262	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5263	CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
5264
5265	fi
5266	if test "$ac_cv_sys_largefile_source" != no
5267	then
5268
5269	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5270	CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
5271
5272	fi
5273	if test "$ac_cv_sys_file_offset_bits" != no
5274	then
5275
5276	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5277	CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5278
5279	fi
5280
5281	echo "$as_me:5281: checking whether to use struct dirent64" >&5
5282echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
5283if test "${cf_cv_struct_dirent64+set}" = set; then
5284  echo $ECHO_N "(cached) $ECHO_C" >&6
5285else
5286
5287		cat >conftest.$ac_ext <<_ACEOF
5288#line 5288 "configure"
5289#include "confdefs.h"
5290
5291#pragma GCC diagnostic error "-Wincompatible-pointer-types"
5292#include <sys/types.h>
5293#include <dirent.h>
5294
5295int
5296main (void)
5297{
5298
5299		/* if transitional largefile support is setup, this is true */
5300		extern struct dirent64 * readdir(DIR *);
5301		struct dirent64 *x = readdir((DIR *)0);
5302		struct dirent *y = readdir((DIR *)0);
5303		int z = x - y;
5304
5305  ;
5306  return 0;
5307}
5308_ACEOF
5309rm -f conftest.$ac_objext
5310if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311  (eval $ac_compile) 2>&5
5312  ac_status=$?
5313  echo "$as_me:5313: \$? = $ac_status" >&5
5314  (exit $ac_status); } &&
5315         { ac_try='test -s conftest.$ac_objext'
5316  { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5317  (eval $ac_try) 2>&5
5318  ac_status=$?
5319  echo "$as_me:5319: \$? = $ac_status" >&5
5320  (exit $ac_status); }; }; then
5321  cf_cv_struct_dirent64=yes
5322else
5323  echo "$as_me: failed program was:" >&5
5324cat conftest.$ac_ext >&5
5325cf_cv_struct_dirent64=no
5326fi
5327rm -f conftest.$ac_objext conftest.$ac_ext
5328
5329fi
5330echo "$as_me:5330: result: $cf_cv_struct_dirent64" >&5
5331echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
5332	test "$cf_cv_struct_dirent64" = yes &&
5333cat >>confdefs.h <<\EOF
5334#define HAVE_STRUCT_DIRENT64 1
5335EOF
5336
5337	fi
5338
5339echo "$as_me:5339: checking for install-prefix" >&5
5340echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
5341
5342# Check whether --with-install-prefix or --without-install-prefix was given.
5343if test "${with_install_prefix+set}" = set; then
5344  withval="$with_install_prefix"
5345  cf_opt_with_install_prefix=$withval
5346else
5347  cf_opt_with_install_prefix=${DESTDIR:-no}
5348fi;
5349echo "$as_me:5349: result: $cf_opt_with_install_prefix" >&5
5350echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
5351if test "$cf_opt_with_install_prefix" != no ; then
5352
5353if test "x$prefix" != xNONE; then
5354	cf_path_syntax="$prefix"
5355else
5356	cf_path_syntax="$ac_default_prefix"
5357fi
5358
5359case ".$cf_opt_with_install_prefix" in
5360(.\$\(*\)*|.\'*\'*)
5361	;;
5362(..|./*|.\\*)
5363	;;
5364(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5365	;;
5366(.\${*prefix}*|.\${*dir}*)
5367	eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
5368	case ".$cf_opt_with_install_prefix" in
5369	(.NONE/*)
5370		cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
5371		;;
5372	esac
5373	;;
5374(.no|.NONE/*)
5375	cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
5376	;;
5377(*)
5378	{ { echo "$as_me:5378: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
5379echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
5380   { (exit 1); exit 1; }; }
5381	;;
5382esac
5383
5384	DESTDIR=$cf_opt_with_install_prefix
5385fi
5386
5387if ( test "$GCC" = yes || test "$GXX" = yes )
5388then
5389echo "$as_me:5389: checking if you want to check for gcc warnings" >&5
5390echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
5391
5392# Check whether --with-warnings or --without-warnings was given.
5393if test "${with_warnings+set}" = set; then
5394  withval="$with_warnings"
5395  cf_opt_with_warnings=$withval
5396else
5397  cf_opt_with_warnings=no
5398fi;
5399echo "$as_me:5399: result: $cf_opt_with_warnings" >&5
5400echo "${ECHO_T}$cf_opt_with_warnings" >&6
5401if test "$cf_opt_with_warnings" != no ; then
5402
5403if test "$GCC" = yes
5404then
5405cat > conftest.i <<EOF
5406#ifndef GCC_PRINTF
5407#define GCC_PRINTF 0
5408#endif
5409#ifndef GCC_SCANF
5410#define GCC_SCANF 0
5411#endif
5412#ifndef GCC_NORETURN
5413#define GCC_NORETURN /* nothing */
5414#endif
5415#ifndef GCC_UNUSED
5416#define GCC_UNUSED /* nothing */
5417#endif
5418EOF
5419if test "$GCC" = yes
5420then
5421	{ echo "$as_me:5421: checking for $CC __attribute__ directives..." >&5
5422echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
5423cat > conftest.$ac_ext <<EOF
5424#line 5424 "${as_me:-configure}"
5425#include "confdefs.h"
5426#include "conftest.h"
5427#include "conftest.i"
5428#if	GCC_PRINTF
5429#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5430#else
5431#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5432#endif
5433#if	GCC_SCANF
5434#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
5435#else
5436#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
5437#endif
5438extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5439extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
5440extern void foo(void) GCC_NORETURN;
5441int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
5442EOF
5443	cf_printf_attribute=no
5444	cf_scanf_attribute=no
5445	for cf_attribute in scanf printf unused noreturn
5446	do
5447
5448cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5449
5450		cf_directive="__attribute__(($cf_attribute))"
5451		echo "checking for $CC $cf_directive" 1>&5
5452
5453		case $cf_attribute in
5454		(printf)
5455			cf_printf_attribute=yes
5456			cat >conftest.h <<EOF
5457#define GCC_$cf_ATTRIBUTE 1
5458EOF
5459			;;
5460		(scanf)
5461			cf_scanf_attribute=yes
5462			cat >conftest.h <<EOF
5463#define GCC_$cf_ATTRIBUTE 1
5464EOF
5465			;;
5466		(*)
5467			cat >conftest.h <<EOF
5468#define GCC_$cf_ATTRIBUTE $cf_directive
5469EOF
5470			;;
5471		esac
5472
5473		if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
5474  (eval $ac_compile) 2>&5
5475  ac_status=$?
5476  echo "$as_me:5476: \$? = $ac_status" >&5
5477  (exit $ac_status); }; then
5478			test -n "$verbose" && echo "$as_me:5478: result: ... $cf_attribute" >&5
5479echo "${ECHO_T}... $cf_attribute" >&6
5480			cat conftest.h >>confdefs.h
5481			case $cf_attribute in
5482			(noreturn)
5483
5484cat >>confdefs.h <<EOF
5485#define GCC_NORETURN $cf_directive
5486EOF
5487
5488				;;
5489			(printf)
5490				cf_value='/* nothing */'
5491				if test "$cf_printf_attribute" != no ; then
5492					cf_value='__attribute__((format(printf,fmt,var)))'
5493
5494cat >>confdefs.h <<\EOF
5495#define GCC_PRINTF 1
5496EOF
5497
5498				fi
5499
5500cat >>confdefs.h <<EOF
5501#define GCC_PRINTFLIKE(fmt,var) $cf_value
5502EOF
5503
5504				;;
5505			(scanf)
5506				cf_value='/* nothing */'
5507				if test "$cf_scanf_attribute" != no ; then
5508					cf_value='__attribute__((format(scanf,fmt,var)))'
5509
5510cat >>confdefs.h <<\EOF
5511#define GCC_SCANF 1
5512EOF
5513
5514				fi
5515
5516cat >>confdefs.h <<EOF
5517#define GCC_SCANFLIKE(fmt,var) $cf_value
5518EOF
5519
5520				;;
5521			(unused)
5522
5523cat >>confdefs.h <<EOF
5524#define GCC_UNUSED $cf_directive
5525EOF
5526
5527				;;
5528			esac
5529		fi
5530	done
5531else
5532	fgrep define conftest.i >>confdefs.h
5533fi
5534rm -rf conftest*
5535fi
5536
5537INTEL_COMPILER=no
5538
5539if test "$GCC" = yes ; then
5540	case $host_os in
5541	(linux*|gnu*)
5542		echo "$as_me:5542: checking if this is really Intel C compiler" >&5
5543echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
5544		cf_save_CFLAGS="$CFLAGS"
5545		CFLAGS="$CFLAGS -no-gcc"
5546		cat >conftest.$ac_ext <<_ACEOF
5547#line 5547 "configure"
5548#include "confdefs.h"
5549
5550int
5551main (void)
5552{
5553
5554#ifdef __INTEL_COMPILER
5555#else
5556make an error
5557#endif
5558
5559  ;
5560  return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext
5564if { (eval echo "$as_me:5564: \"$ac_compile\"") >&5
5565  (eval $ac_compile) 2>&5
5566  ac_status=$?
5567  echo "$as_me:5567: \$? = $ac_status" >&5
5568  (exit $ac_status); } &&
5569         { ac_try='test -s conftest.$ac_objext'
5570  { (eval echo "$as_me:5570: \"$ac_try\"") >&5
5571  (eval $ac_try) 2>&5
5572  ac_status=$?
5573  echo "$as_me:5573: \$? = $ac_status" >&5
5574  (exit $ac_status); }; }; then
5575  INTEL_COMPILER=yes
5576cf_save_CFLAGS="$cf_save_CFLAGS -we147"
5577
5578else
5579  echo "$as_me: failed program was:" >&5
5580cat conftest.$ac_ext >&5
5581fi
5582rm -f conftest.$ac_objext conftest.$ac_ext
5583		CFLAGS="$cf_save_CFLAGS"
5584		echo "$as_me:5584: result: $INTEL_COMPILER" >&5
5585echo "${ECHO_T}$INTEL_COMPILER" >&6
5586		;;
5587	esac
5588fi
5589
5590CLANG_COMPILER=no
5591
5592if test "$GCC" = yes ; then
5593	echo "$as_me:5593: checking if this is really Clang C compiler" >&5
5594echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
5595	cf_save_CFLAGS="$CFLAGS"
5596	CFLAGS="$CFLAGS -Qunused-arguments"
5597	cat >conftest.$ac_ext <<_ACEOF
5598#line 5598 "configure"
5599#include "confdefs.h"
5600
5601int
5602main (void)
5603{
5604
5605#ifdef __clang__
5606#else
5607make an error
5608#endif
5609
5610  ;
5611  return 0;
5612}
5613_ACEOF
5614rm -f conftest.$ac_objext
5615if { (eval echo "$as_me:5615: \"$ac_compile\"") >&5
5616  (eval $ac_compile) 2>&5
5617  ac_status=$?
5618  echo "$as_me:5618: \$? = $ac_status" >&5
5619  (exit $ac_status); } &&
5620         { ac_try='test -s conftest.$ac_objext'
5621  { (eval echo "$as_me:5621: \"$ac_try\"") >&5
5622  (eval $ac_try) 2>&5
5623  ac_status=$?
5624  echo "$as_me:5624: \$? = $ac_status" >&5
5625  (exit $ac_status); }; }; then
5626  CLANG_COMPILER=yes
5627cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
5628
5629else
5630  echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632fi
5633rm -f conftest.$ac_objext conftest.$ac_ext
5634	CFLAGS="$cf_save_CFLAGS"
5635	echo "$as_me:5635: result: $CLANG_COMPILER" >&5
5636echo "${ECHO_T}$CLANG_COMPILER" >&6
5637fi
5638
5639cat > conftest.$ac_ext <<EOF
5640#line 5640 "${as_me:-configure}"
5641int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
5642EOF
5643
5644if test "$INTEL_COMPILER" = yes
5645then
5646# The "-wdXXX" options suppress warnings:
5647# remark #1419: external declaration in primary source file
5648# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
5649# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
5650# remark #193: zero used for undefined preprocessing identifier
5651# remark #593: variable "curs_sb_left_arrow" was set but never used
5652# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
5653# remark #869: parameter "tw" was never referenced
5654# remark #981: operands are evaluated in unspecified order
5655# warning #279: controlling expression is constant
5656
5657	{ echo "$as_me:5657: checking for $CC warning options..." >&5
5658echo "$as_me: checking for $CC warning options..." >&6;}
5659	cf_save_CFLAGS="$CFLAGS"
5660	EXTRA_CFLAGS="-Wall"
5661	for cf_opt in \
5662		wd1419 \
5663		wd1683 \
5664		wd1684 \
5665		wd193 \
5666		wd593 \
5667		wd279 \
5668		wd810 \
5669		wd869 \
5670		wd981
5671	do
5672		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5673		if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674  (eval $ac_compile) 2>&5
5675  ac_status=$?
5676  echo "$as_me:5676: \$? = $ac_status" >&5
5677  (exit $ac_status); }; then
5678			test -n "$verbose" && echo "$as_me:5678: result: ... -$cf_opt" >&5
5679echo "${ECHO_T}... -$cf_opt" >&6
5680			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5681		fi
5682	done
5683	CFLAGS="$cf_save_CFLAGS"
5684
5685elif test "$GCC" = yes
5686then
5687	{ echo "$as_me:5687: checking for $CC warning options..." >&5
5688echo "$as_me: checking for $CC warning options..." >&6;}
5689	cf_save_CFLAGS="$CFLAGS"
5690	EXTRA_CFLAGS=
5691	cf_warn_CONST=""
5692	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5693	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
5694	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
5695	for cf_opt in W Wall \
5696		Wbad-function-cast \
5697		Wcast-align \
5698		Wcast-qual \
5699		Wdeclaration-after-statement \
5700		Wextra \
5701		Winline \
5702		Wmissing-declarations \
5703		Wmissing-prototypes \
5704		Wnested-externs \
5705		Wpointer-arith \
5706		Wshadow \
5707		Wstrict-prototypes \
5708		Wundef $cf_gcc_warnings $cf_warn_CONST
5709	do
5710		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5711		if { (eval echo "$as_me:5711: \"$ac_compile\"") >&5
5712  (eval $ac_compile) 2>&5
5713  ac_status=$?
5714  echo "$as_me:5714: \$? = $ac_status" >&5
5715  (exit $ac_status); }; then
5716			test -n "$verbose" && echo "$as_me:5716: result: ... -$cf_opt" >&5
5717echo "${ECHO_T}... -$cf_opt" >&6
5718			case $cf_opt in
5719			(Wcast-qual)
5720
5721	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5722	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
5723
5724				;;
5725			(Winline)
5726				case $GCC_VERSION in
5727				([34].*)
5728					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5729
5730echo "${as_me:-configure}:5730: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5731
5732					continue;;
5733				esac
5734				;;
5735			(Wpointer-arith)
5736				case $GCC_VERSION in
5737				([12].*)
5738					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5739
5740echo "${as_me:-configure}:5740: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5741
5742					continue;;
5743				esac
5744				;;
5745			esac
5746			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5747		fi
5748	done
5749	CFLAGS="$cf_save_CFLAGS"
5750fi
5751rm -rf conftest*
5752
5753fi
5754fi
5755
5756echo "$as_me:5756: checking if you want to use pkg-config" >&5
5757echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5758
5759# Check whether --with-pkg-config or --without-pkg-config was given.
5760if test "${with_pkg_config+set}" = set; then
5761  withval="$with_pkg_config"
5762  cf_pkg_config=$withval
5763else
5764  cf_pkg_config=yes
5765fi;
5766echo "$as_me:5766: result: $cf_pkg_config" >&5
5767echo "${ECHO_T}$cf_pkg_config" >&6
5768
5769case $cf_pkg_config in
5770(no)
5771	PKG_CONFIG=none
5772	;;
5773(yes)
5774
5775if test -n "$ac_tool_prefix"; then
5776  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5777set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5778echo "$as_me:5778: checking for $ac_word" >&5
5779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5780if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5781  echo $ECHO_N "(cached) $ECHO_C" >&6
5782else
5783  case $PKG_CONFIG in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  ac_save_IFS=$IFS; IFS=$ac_path_separator
5789ac_dummy="$PATH"
5790for ac_dir in $ac_dummy; do
5791  IFS=$ac_save_IFS
5792  test -z "$ac_dir" && ac_dir=.
5793  if $as_executable_p "$ac_dir/$ac_word"; then
5794   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5795   echo "$as_me:5795: found $ac_dir/$ac_word" >&5
5796   break
5797fi
5798done
5799
5800  ;;
5801esac
5802fi
5803PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5804
5805if test -n "$PKG_CONFIG"; then
5806  echo "$as_me:5806: result: $PKG_CONFIG" >&5
5807echo "${ECHO_T}$PKG_CONFIG" >&6
5808else
5809  echo "$as_me:5809: result: no" >&5
5810echo "${ECHO_T}no" >&6
5811fi
5812
5813fi
5814if test -z "$ac_cv_path_PKG_CONFIG"; then
5815  ac_pt_PKG_CONFIG=$PKG_CONFIG
5816  # Extract the first word of "pkg-config", so it can be a program name with args.
5817set dummy pkg-config; ac_word=$2
5818echo "$as_me:5818: checking for $ac_word" >&5
5819echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5820if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5821  echo $ECHO_N "(cached) $ECHO_C" >&6
5822else
5823  case $ac_pt_PKG_CONFIG in
5824  [\\/]* | ?:[\\/]*)
5825  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5826  ;;
5827  *)
5828  ac_save_IFS=$IFS; IFS=$ac_path_separator
5829ac_dummy="$PATH"
5830for ac_dir in $ac_dummy; do
5831  IFS=$ac_save_IFS
5832  test -z "$ac_dir" && ac_dir=.
5833  if $as_executable_p "$ac_dir/$ac_word"; then
5834   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5835   echo "$as_me:5835: found $ac_dir/$ac_word" >&5
5836   break
5837fi
5838done
5839
5840  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5841  ;;
5842esac
5843fi
5844ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5845
5846if test -n "$ac_pt_PKG_CONFIG"; then
5847  echo "$as_me:5847: result: $ac_pt_PKG_CONFIG" >&5
5848echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5849else
5850  echo "$as_me:5850: result: no" >&5
5851echo "${ECHO_T}no" >&6
5852fi
5853
5854  PKG_CONFIG=$ac_pt_PKG_CONFIG
5855else
5856  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5857fi
5858
5859	;;
5860(*)
5861	PKG_CONFIG=$withval
5862	;;
5863esac
5864
5865test -z "$PKG_CONFIG" && PKG_CONFIG=none
5866if test "$PKG_CONFIG" != none ; then
5867
5868if test "x$prefix" != xNONE; then
5869	cf_path_syntax="$prefix"
5870else
5871	cf_path_syntax="$ac_default_prefix"
5872fi
5873
5874case ".$PKG_CONFIG" in
5875(.\$\(*\)*|.\'*\'*)
5876	;;
5877(..|./*|.\\*)
5878	;;
5879(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5880	;;
5881(.\${*prefix}*|.\${*dir}*)
5882	eval PKG_CONFIG="$PKG_CONFIG"
5883	case ".$PKG_CONFIG" in
5884	(.NONE/*)
5885		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5886		;;
5887	esac
5888	;;
5889(.no|.NONE/*)
5890	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5891	;;
5892(*)
5893	{ { echo "$as_me:5893: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5894echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5895   { (exit 1); exit 1; }; }
5896	;;
5897esac
5898
5899elif test "x$cf_pkg_config" != xno ; then
5900	{ echo "$as_me:5900: WARNING: pkg-config is not installed" >&5
5901echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5902fi
5903
5904echo "$as_me:5904: checking for this package's name" >&5
5905echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
5906
5907# Check whether --with-package or --without-package was given.
5908if test "${with_package+set}" = set; then
5909  withval="$with_package"
5910  PACKAGE=$withval
5911else
5912  PACKAGE=dialog
5913fi;
5914echo "$as_me:5914: result: $PACKAGE" >&5
5915echo "${ECHO_T}$PACKAGE" >&6
5916
5917if test -f $srcdir/VERSION ; then
5918	echo "$as_me:5918: checking for package version" >&5
5919echo $ECHO_N "checking for package version... $ECHO_C" >&6
5920
5921	# if there are not enough fields, cut returns the last one...
5922	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5923	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
5924	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
5925
5926	# this is how CF_BUNDLED_INTL uses $VERSION:
5927	VERSION="$cf_field1"
5928
5929	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
5930	test -z "$VERSION_MAJOR" && { { echo "$as_me:5930: error: missing major-version" >&5
5931echo "$as_me: error: missing major-version" >&2;}
5932   { (exit 1); exit 1; }; }
5933
5934	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
5935	test -z "$VERSION_MINOR" && { { echo "$as_me:5935: error: missing minor-version" >&5
5936echo "$as_me: error: missing minor-version" >&2;}
5937   { (exit 1); exit 1; }; }
5938
5939	echo "$as_me:5939: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
5940echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
5941
5942	echo "$as_me:5942: checking for package patch date" >&5
5943echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
5944	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
5945	case .$VERSION_PATCH in
5946	(.)
5947		{ { echo "$as_me:5947: error: missing patch-date $VERSION_PATCH" >&5
5948echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
5949   { (exit 1); exit 1; }; }
5950		;;
5951	(.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
5952		;;
5953	(*)
5954		{ { echo "$as_me:5954: error: illegal patch-date $VERSION_PATCH" >&5
5955echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
5956   { (exit 1); exit 1; }; }
5957		;;
5958	esac
5959	echo "$as_me:5959: result: $VERSION_PATCH" >&5
5960echo "${ECHO_T}$VERSION_PATCH" >&6
5961else
5962	{ { echo "$as_me:5962: error: did not find $srcdir/VERSION" >&5
5963echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
5964   { (exit 1); exit 1; }; }
5965fi
5966
5967# show the actual data that we have for versions:
5968test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
5969
5970echo "${as_me:-configure}:5970: testing ABI VERSION $VERSION ..." 1>&5
5971
5972test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
5973
5974echo "${as_me:-configure}:5974: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
5975
5976test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
5977
5978echo "${as_me:-configure}:5978: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
5979
5980test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
5981
5982echo "${as_me:-configure}:5982: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
5983
5984	cf_PACKAGE=dialog
5985	PACKAGE=$PACKAGE
5986
5987cat >>confdefs.h <<EOF
5988#define PACKAGE "$PACKAGE"
5989EOF
5990
5991cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5992
5993	cat >>confdefs.h <<EOF
5994#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
5995EOF
5996
5997	cat >>confdefs.h <<EOF
5998#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
5999EOF
6000
6001CFG_ROOTNAME=$PACKAGE
6002HDR_ROOTNAME=$PACKAGE
6003LIB_ROOTNAME=$PACKAGE
6004
6005echo "$as_me:6005: checking if we should install dlg_XXX headers to subdirectory" >&5
6006echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
6007
6008# Check whether --enable-header-subdir or --disable-header-subdir was given.
6009if test "${enable_header_subdir+set}" = set; then
6010  enableval="$enable_header_subdir"
6011  SUB_INC=$enableval
6012else
6013  SUB_INC=no
6014fi;
6015echo "$as_me:6015: result: $SUB_INC" >&5
6016echo "${ECHO_T}$SUB_INC" >&6
6017
6018case "x${with_man2html}" in
6019(xno)
6020	cf_man2html=no
6021	;;
6022(x|xyes)
6023	# Extract the first word of "man2html", so it can be a program name with args.
6024set dummy man2html; ac_word=$2
6025echo "$as_me:6025: checking for $ac_word" >&5
6026echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6027if test "${ac_cv_path_cf_man2html+set}" = set; then
6028  echo $ECHO_N "(cached) $ECHO_C" >&6
6029else
6030  case $cf_man2html in
6031  [\\/]* | ?:[\\/]*)
6032  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
6033  ;;
6034  *)
6035  ac_save_IFS=$IFS; IFS=$ac_path_separator
6036ac_dummy="$PATH"
6037for ac_dir in $ac_dummy; do
6038  IFS=$ac_save_IFS
6039  test -z "$ac_dir" && ac_dir=.
6040  if $as_executable_p "$ac_dir/$ac_word"; then
6041   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
6042   echo "$as_me:6042: found $ac_dir/$ac_word" >&5
6043   break
6044fi
6045done
6046
6047  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
6048  ;;
6049esac
6050fi
6051cf_man2html=$ac_cv_path_cf_man2html
6052
6053if test -n "$cf_man2html"; then
6054  echo "$as_me:6054: result: $cf_man2html" >&5
6055echo "${ECHO_T}$cf_man2html" >&6
6056else
6057  echo "$as_me:6057: result: no" >&5
6058echo "${ECHO_T}no" >&6
6059fi
6060
6061	case "x$cf_man2html" in
6062	(x/*)
6063		echo "$as_me:6063: checking for the modified Earl Hood script" >&5
6064echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
6065		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
6066		then
6067			cf_man2html_ok=yes
6068		else
6069			cf_man2html=no
6070			cf_man2html_ok=no
6071		fi
6072		echo "$as_me:6072: result: $cf_man2html_ok" >&5
6073echo "${ECHO_T}$cf_man2html_ok" >&6
6074		;;
6075	(*)
6076		cf_man2html=no
6077		;;
6078	esac
6079esac
6080
6081echo "$as_me:6081: checking for program to convert manpage to html" >&5
6082echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
6083
6084# Check whether --with-man2html or --without-man2html was given.
6085if test "${with_man2html+set}" = set; then
6086  withval="$with_man2html"
6087  cf_man2html=$withval
6088else
6089  cf_man2html=$cf_man2html
6090fi;
6091
6092cf_with_groff=no
6093
6094case $cf_man2html in
6095(yes)
6096	echo "$as_me:6096: result: man2html" >&5
6097echo "${ECHO_T}man2html" >&6
6098	# Extract the first word of "man2html", so it can be a program name with args.
6099set dummy man2html; ac_word=$2
6100echo "$as_me:6100: checking for $ac_word" >&5
6101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6102if test "${ac_cv_path_cf_man2html+set}" = set; then
6103  echo $ECHO_N "(cached) $ECHO_C" >&6
6104else
6105  case $cf_man2html in
6106  [\\/]* | ?:[\\/]*)
6107  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
6108  ;;
6109  *)
6110  ac_save_IFS=$IFS; IFS=$ac_path_separator
6111ac_dummy="$PATH"
6112for ac_dir in $ac_dummy; do
6113  IFS=$ac_save_IFS
6114  test -z "$ac_dir" && ac_dir=.
6115  if $as_executable_p "$ac_dir/$ac_word"; then
6116   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
6117   echo "$as_me:6117: found $ac_dir/$ac_word" >&5
6118   break
6119fi
6120done
6121
6122  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
6123  ;;
6124esac
6125fi
6126cf_man2html=$ac_cv_path_cf_man2html
6127
6128if test -n "$cf_man2html"; then
6129  echo "$as_me:6129: result: $cf_man2html" >&5
6130echo "${ECHO_T}$cf_man2html" >&6
6131else
6132  echo "$as_me:6132: result: no" >&5
6133echo "${ECHO_T}no" >&6
6134fi
6135
6136	;;
6137(no|groff|*/groff*)
6138	cf_with_groff=yes
6139	cf_man2html=$GROFF_PATH
6140	echo "$as_me:6140: result: $cf_man2html" >&5
6141echo "${ECHO_T}$cf_man2html" >&6
6142	;;
6143(*)
6144	echo "$as_me:6144: result: $cf_man2html" >&5
6145echo "${ECHO_T}$cf_man2html" >&6
6146	;;
6147esac
6148
6149MAN2HTML_TEMP="man2html.tmp"
6150	cat >$MAN2HTML_TEMP <<CF_EOF
6151#!$SHELL
6152# Temporary script generated by CF_WITH_MAN2HTML
6153# Convert inputs to html, sending result to standard output.
6154#
6155# Parameters:
6156# \${1} = rootname of file to convert
6157# \${2} = suffix of file to convert, e.g., "1"
6158# \${3} = macros to use, e.g., "man"
6159#
6160ROOT=\$1
6161TYPE=\$2
6162MACS=\$3
6163
6164unset LANG
6165unset LC_ALL
6166unset LC_CTYPE
6167unset LANGUAGE
6168GROFF_NO_SGR=stupid
6169export GROFF_NO_SGR
6170
6171CF_EOF
6172
6173if test "x$cf_with_groff" = xyes
6174then
6175	MAN2HTML_NOTE="$GROFF_NOTE"
6176	MAN2HTML_PATH="$GROFF_PATH"
6177	cat >>$MAN2HTML_TEMP <<CF_EOF
6178$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
6179CF_EOF
6180else
6181	MAN2HTML_NOTE=""
6182
6183if test "x$prefix" != xNONE; then
6184	cf_path_syntax="$prefix"
6185else
6186	cf_path_syntax="$ac_default_prefix"
6187fi
6188
6189case ".$cf_man2html" in
6190(.\$\(*\)*|.\'*\'*)
6191	;;
6192(..|./*|.\\*)
6193	;;
6194(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6195	;;
6196(.\${*prefix}*|.\${*dir}*)
6197	eval cf_man2html="$cf_man2html"
6198	case ".$cf_man2html" in
6199	(.NONE/*)
6200		cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
6201		;;
6202	esac
6203	;;
6204(.no|.NONE/*)
6205	cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
6206	;;
6207(*)
6208	{ { echo "$as_me:6208: error: expected a pathname, not \"$cf_man2html\"" >&5
6209echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
6210   { (exit 1); exit 1; }; }
6211	;;
6212esac
6213
6214	MAN2HTML_PATH="$cf_man2html"
6215	echo "$as_me:6215: checking for $cf_man2html top/bottom margins" >&5
6216echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
6217
6218	# for this example, expect 3 lines of content, the remainder is head/foot
6219	cat >conftest.in <<CF_EOF
6220.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
6221.SH SECTION
6222MARKER
6223CF_EOF
6224
6225	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
6226
6227	cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
6228	cf_man2html_top=`expr $cf_man2html_1st - 2`
6229	cf_man2html_bot=`wc -l conftest.out |sed -e 's/[^0-9]//g'`
6230	cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
6231	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
6232
6233	echo "$as_me:6233: result: $cf_man2html_top_bot" >&5
6234echo "${ECHO_T}$cf_man2html_top_bot" >&6
6235
6236	echo "$as_me:6236: checking for pagesize to use" >&5
6237echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
6238	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
6239	do
6240	cat >>conftest.in <<CF_EOF
6241.nf
62420
62431
62442
62453
62464
62475
62486
62497
62508
62519
6252CF_EOF
6253	done
6254
6255	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
6256	cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
6257	test -z "$cf_man2html_page" && cf_man2html_page=99999
6258	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
6259
6260	rm -rf conftest*
6261	echo "$as_me:6261: result: $cf_man2html_page" >&5
6262echo "${ECHO_T}$cf_man2html_page" >&6
6263
6264	cat >>$MAN2HTML_TEMP <<CF_EOF
6265: \${MAN2HTML_PATH=$MAN2HTML_PATH}
6266MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
6267case \${TYPE} in
6268(ms)
6269	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
6270	;;
6271(*)
6272	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
6273	;;
6274esac
6275CF_EOF
6276fi
6277
6278chmod 700 $MAN2HTML_TEMP
6279
6280EXTRAOBJS=""
6281
6282echo "$as_me:6282: checking for ANSI C header files" >&5
6283echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6284if test "${ac_cv_header_stdc+set}" = set; then
6285  echo $ECHO_N "(cached) $ECHO_C" >&6
6286else
6287  cat >conftest.$ac_ext <<_ACEOF
6288#line 6288 "configure"
6289#include "confdefs.h"
6290#include <stdlib.h>
6291#include <stdarg.h>
6292#include <string.h>
6293#include <float.h>
6294
6295_ACEOF
6296if { (eval echo "$as_me:6296: \"$ac_cpp conftest.$ac_ext\"") >&5
6297  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6298  ac_status=$?
6299  egrep -v '^ *\+' conftest.er1 >conftest.err
6300  rm -f conftest.er1
6301  cat conftest.err >&5
6302  echo "$as_me:6302: \$? = $ac_status" >&5
6303  (exit $ac_status); } >/dev/null; then
6304  if test -s conftest.err; then
6305    ac_cpp_err=$ac_c_preproc_warn_flag
6306  else
6307    ac_cpp_err=
6308  fi
6309else
6310  ac_cpp_err=yes
6311fi
6312if test -z "$ac_cpp_err"; then
6313  ac_cv_header_stdc=yes
6314else
6315  echo "$as_me: failed program was:" >&5
6316  cat conftest.$ac_ext >&5
6317  ac_cv_header_stdc=no
6318fi
6319rm -f conftest.err conftest.$ac_ext
6320
6321if test $ac_cv_header_stdc = yes; then
6322  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6323  cat >conftest.$ac_ext <<_ACEOF
6324#line 6324 "configure"
6325#include "confdefs.h"
6326#include <string.h>
6327
6328_ACEOF
6329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6330  egrep "memchr" >/dev/null 2>&1; then
6331  :
6332else
6333  ac_cv_header_stdc=no
6334fi
6335rm -rf conftest*
6336
6337fi
6338
6339if test $ac_cv_header_stdc = yes; then
6340  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6341  cat >conftest.$ac_ext <<_ACEOF
6342#line 6342 "configure"
6343#include "confdefs.h"
6344#include <stdlib.h>
6345
6346_ACEOF
6347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6348  egrep "free" >/dev/null 2>&1; then
6349  :
6350else
6351  ac_cv_header_stdc=no
6352fi
6353rm -rf conftest*
6354
6355fi
6356
6357if test $ac_cv_header_stdc = yes; then
6358  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6359  if test "$cross_compiling" = yes; then
6360  :
6361else
6362  cat >conftest.$ac_ext <<_ACEOF
6363#line 6363 "configure"
6364#include "confdefs.h"
6365#include <ctype.h>
6366#if ((' ' & 0x0FF) == 0x020)
6367# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6368# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6369#else
6370# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6371                     || ('j' <= (c) && (c) <= 'r') \
6372                     || ('s' <= (c) && (c) <= 'z'))
6373# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6374#endif
6375
6376#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6377int
6378main (void)
6379{
6380  int i;
6381  for (i = 0; i < 256; i++)
6382    if (XOR (islower (i), ISLOWER (i))
6383        || toupper (i) != TOUPPER (i))
6384      $ac_main_return(2);
6385  $ac_main_return (0);
6386}
6387_ACEOF
6388rm -f conftest$ac_exeext
6389if { (eval echo "$as_me:6389: \"$ac_link\"") >&5
6390  (eval $ac_link) 2>&5
6391  ac_status=$?
6392  echo "$as_me:6392: \$? = $ac_status" >&5
6393  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6394  { (eval echo "$as_me:6394: \"$ac_try\"") >&5
6395  (eval $ac_try) 2>&5
6396  ac_status=$?
6397  echo "$as_me:6397: \$? = $ac_status" >&5
6398  (exit $ac_status); }; }; then
6399  :
6400else
6401  echo "$as_me: program exited with status $ac_status" >&5
6402echo "$as_me: failed program was:" >&5
6403cat conftest.$ac_ext >&5
6404ac_cv_header_stdc=no
6405fi
6406rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6407fi
6408fi
6409fi
6410echo "$as_me:6410: result: $ac_cv_header_stdc" >&5
6411echo "${ECHO_T}$ac_cv_header_stdc" >&6
6412if test $ac_cv_header_stdc = yes; then
6413
6414cat >>confdefs.h <<\EOF
6415#define STDC_HEADERS 1
6416EOF
6417
6418fi
6419
6420echo "$as_me:6420: checking for inline" >&5
6421echo $ECHO_N "checking for inline... $ECHO_C" >&6
6422if test "${ac_cv_c_inline+set}" = set; then
6423  echo $ECHO_N "(cached) $ECHO_C" >&6
6424else
6425  ac_cv_c_inline=no
6426for ac_kw in inline __inline__ __inline; do
6427  cat >conftest.$ac_ext <<_ACEOF
6428#line 6428 "configure"
6429#include "confdefs.h"
6430#ifndef __cplusplus
6431static $ac_kw int static_foo () {return 0; }
6432$ac_kw int foo () {return 0; }
6433#endif
6434
6435_ACEOF
6436rm -f conftest.$ac_objext
6437if { (eval echo "$as_me:6437: \"$ac_compile\"") >&5
6438  (eval $ac_compile) 2>&5
6439  ac_status=$?
6440  echo "$as_me:6440: \$? = $ac_status" >&5
6441  (exit $ac_status); } &&
6442         { ac_try='test -s conftest.$ac_objext'
6443  { (eval echo "$as_me:6443: \"$ac_try\"") >&5
6444  (eval $ac_try) 2>&5
6445  ac_status=$?
6446  echo "$as_me:6446: \$? = $ac_status" >&5
6447  (exit $ac_status); }; }; then
6448  ac_cv_c_inline=$ac_kw; break
6449else
6450  echo "$as_me: failed program was:" >&5
6451cat conftest.$ac_ext >&5
6452fi
6453rm -f conftest.$ac_objext conftest.$ac_ext
6454done
6455
6456fi
6457echo "$as_me:6457: result: $ac_cv_c_inline" >&5
6458echo "${ECHO_T}$ac_cv_c_inline" >&6
6459case $ac_cv_c_inline in
6460  inline | yes) ;;
6461  no)
6462cat >>confdefs.h <<\EOF
6463#define inline
6464EOF
6465 ;;
6466  *)  cat >>confdefs.h <<EOF
6467#define inline $ac_cv_c_inline
6468EOF
6469 ;;
6470esac
6471
6472# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6473
6474for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6475                  inttypes.h stdint.h unistd.h
6476do
6477as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6478echo "$as_me:6478: checking for $ac_header" >&5
6479echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6480if eval "test \"\${$as_ac_Header+set}\" = set"; then
6481  echo $ECHO_N "(cached) $ECHO_C" >&6
6482else
6483  cat >conftest.$ac_ext <<_ACEOF
6484#line 6484 "configure"
6485#include "confdefs.h"
6486$ac_includes_default
6487#include <$ac_header>
6488_ACEOF
6489rm -f conftest.$ac_objext
6490if { (eval echo "$as_me:6490: \"$ac_compile\"") >&5
6491  (eval $ac_compile) 2>&5
6492  ac_status=$?
6493  echo "$as_me:6493: \$? = $ac_status" >&5
6494  (exit $ac_status); } &&
6495         { ac_try='test -s conftest.$ac_objext'
6496  { (eval echo "$as_me:6496: \"$ac_try\"") >&5
6497  (eval $ac_try) 2>&5
6498  ac_status=$?
6499  echo "$as_me:6499: \$? = $ac_status" >&5
6500  (exit $ac_status); }; }; then
6501  eval "$as_ac_Header=yes"
6502else
6503  echo "$as_me: failed program was:" >&5
6504cat conftest.$ac_ext >&5
6505eval "$as_ac_Header=no"
6506fi
6507rm -f conftest.$ac_objext conftest.$ac_ext
6508fi
6509echo "$as_me:6509: result: `eval echo '${'$as_ac_Header'}'`" >&5
6510echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6511if test `eval echo '${'$as_ac_Header'}'` = yes; then
6512  cat >>confdefs.h <<EOF
6513#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6514EOF
6515
6516fi
6517done
6518
6519echo "$as_me:6519: checking for off_t" >&5
6520echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6521if test "${ac_cv_type_off_t+set}" = set; then
6522  echo $ECHO_N "(cached) $ECHO_C" >&6
6523else
6524  cat >conftest.$ac_ext <<_ACEOF
6525#line 6525 "configure"
6526#include "confdefs.h"
6527$ac_includes_default
6528int
6529main (void)
6530{
6531if ((off_t *) 0)
6532  return 0;
6533if (sizeof (off_t))
6534  return 0;
6535  ;
6536  return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext
6540if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
6541  (eval $ac_compile) 2>&5
6542  ac_status=$?
6543  echo "$as_me:6543: \$? = $ac_status" >&5
6544  (exit $ac_status); } &&
6545         { ac_try='test -s conftest.$ac_objext'
6546  { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547  (eval $ac_try) 2>&5
6548  ac_status=$?
6549  echo "$as_me:6549: \$? = $ac_status" >&5
6550  (exit $ac_status); }; }; then
6551  ac_cv_type_off_t=yes
6552else
6553  echo "$as_me: failed program was:" >&5
6554cat conftest.$ac_ext >&5
6555ac_cv_type_off_t=no
6556fi
6557rm -f conftest.$ac_objext conftest.$ac_ext
6558fi
6559echo "$as_me:6559: result: $ac_cv_type_off_t" >&5
6560echo "${ECHO_T}$ac_cv_type_off_t" >&6
6561if test $ac_cv_type_off_t = yes; then
6562  :
6563else
6564
6565cat >>confdefs.h <<EOF
6566#define off_t long
6567EOF
6568
6569fi
6570
6571echo "$as_me:6571: checking for size_t" >&5
6572echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6573if test "${ac_cv_type_size_t+set}" = set; then
6574  echo $ECHO_N "(cached) $ECHO_C" >&6
6575else
6576  cat >conftest.$ac_ext <<_ACEOF
6577#line 6577 "configure"
6578#include "confdefs.h"
6579$ac_includes_default
6580int
6581main (void)
6582{
6583if ((size_t *) 0)
6584  return 0;
6585if (sizeof (size_t))
6586  return 0;
6587  ;
6588  return 0;
6589}
6590_ACEOF
6591rm -f conftest.$ac_objext
6592if { (eval echo "$as_me:6592: \"$ac_compile\"") >&5
6593  (eval $ac_compile) 2>&5
6594  ac_status=$?
6595  echo "$as_me:6595: \$? = $ac_status" >&5
6596  (exit $ac_status); } &&
6597         { ac_try='test -s conftest.$ac_objext'
6598  { (eval echo "$as_me:6598: \"$ac_try\"") >&5
6599  (eval $ac_try) 2>&5
6600  ac_status=$?
6601  echo "$as_me:6601: \$? = $ac_status" >&5
6602  (exit $ac_status); }; }; then
6603  ac_cv_type_size_t=yes
6604else
6605  echo "$as_me: failed program was:" >&5
6606cat conftest.$ac_ext >&5
6607ac_cv_type_size_t=no
6608fi
6609rm -f conftest.$ac_objext conftest.$ac_ext
6610fi
6611echo "$as_me:6611: result: $ac_cv_type_size_t" >&5
6612echo "${ECHO_T}$ac_cv_type_size_t" >&6
6613if test $ac_cv_type_size_t = yes; then
6614  :
6615else
6616
6617cat >>confdefs.h <<EOF
6618#define size_t unsigned
6619EOF
6620
6621fi
6622
6623# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6624# for constant arguments.  Useless!
6625echo "$as_me:6625: checking for working alloca.h" >&5
6626echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6627if test "${ac_cv_working_alloca_h+set}" = set; then
6628  echo $ECHO_N "(cached) $ECHO_C" >&6
6629else
6630  cat >conftest.$ac_ext <<_ACEOF
6631#line 6631 "configure"
6632#include "confdefs.h"
6633#include <alloca.h>
6634int
6635main (void)
6636{
6637char *p = (char *) alloca (2 * sizeof (int));
6638  ;
6639  return 0;
6640}
6641_ACEOF
6642rm -f conftest.$ac_objext conftest$ac_exeext
6643if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
6644  (eval $ac_link) 2>&5
6645  ac_status=$?
6646  echo "$as_me:6646: \$? = $ac_status" >&5
6647  (exit $ac_status); } &&
6648         { ac_try='test -s conftest$ac_exeext'
6649  { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6650  (eval $ac_try) 2>&5
6651  ac_status=$?
6652  echo "$as_me:6652: \$? = $ac_status" >&5
6653  (exit $ac_status); }; }; then
6654  ac_cv_working_alloca_h=yes
6655else
6656  echo "$as_me: failed program was:" >&5
6657cat conftest.$ac_ext >&5
6658ac_cv_working_alloca_h=no
6659fi
6660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661fi
6662echo "$as_me:6662: result: $ac_cv_working_alloca_h" >&5
6663echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6664if test $ac_cv_working_alloca_h = yes; then
6665
6666cat >>confdefs.h <<\EOF
6667#define HAVE_ALLOCA_H 1
6668EOF
6669
6670fi
6671
6672echo "$as_me:6672: checking for alloca" >&5
6673echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6674if test "${ac_cv_func_alloca_works+set}" = set; then
6675  echo $ECHO_N "(cached) $ECHO_C" >&6
6676else
6677  cat >conftest.$ac_ext <<_ACEOF
6678#line 6678 "configure"
6679#include "confdefs.h"
6680#ifdef __GNUC__
6681# define alloca __builtin_alloca
6682#else
6683# ifdef _MSC_VER
6684#  include <malloc.h>
6685#  define alloca _alloca
6686# else
6687#  if HAVE_ALLOCA_H
6688#   include <alloca.h>
6689#  else
6690#   ifdef _AIX
6691 #pragma alloca
6692#   else
6693#    ifndef alloca /* predefined by HP cc +Olibcalls */
6694char *alloca ();
6695#    endif
6696#   endif
6697#  endif
6698# endif
6699#endif
6700
6701int
6702main (void)
6703{
6704char *p = (char *) alloca (1);
6705  ;
6706  return 0;
6707}
6708_ACEOF
6709rm -f conftest.$ac_objext conftest$ac_exeext
6710if { (eval echo "$as_me:6710: \"$ac_link\"") >&5
6711  (eval $ac_link) 2>&5
6712  ac_status=$?
6713  echo "$as_me:6713: \$? = $ac_status" >&5
6714  (exit $ac_status); } &&
6715         { ac_try='test -s conftest$ac_exeext'
6716  { (eval echo "$as_me:6716: \"$ac_try\"") >&5
6717  (eval $ac_try) 2>&5
6718  ac_status=$?
6719  echo "$as_me:6719: \$? = $ac_status" >&5
6720  (exit $ac_status); }; }; then
6721  ac_cv_func_alloca_works=yes
6722else
6723  echo "$as_me: failed program was:" >&5
6724cat conftest.$ac_ext >&5
6725ac_cv_func_alloca_works=no
6726fi
6727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6728fi
6729echo "$as_me:6729: result: $ac_cv_func_alloca_works" >&5
6730echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6731
6732if test $ac_cv_func_alloca_works = yes; then
6733
6734cat >>confdefs.h <<\EOF
6735#define HAVE_ALLOCA 1
6736EOF
6737
6738else
6739  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6740# that cause trouble.  Some versions do not even contain alloca or
6741# contain a buggy version.  If you still want to use their alloca,
6742# use ar to extract alloca.o from them instead of compiling alloca.c.
6743
6744ALLOCA=alloca.$ac_objext
6745
6746cat >>confdefs.h <<\EOF
6747#define C_ALLOCA 1
6748EOF
6749
6750echo "$as_me:6750: checking whether \`alloca.c' needs Cray hooks" >&5
6751echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6752if test "${ac_cv_os_cray+set}" = set; then
6753  echo $ECHO_N "(cached) $ECHO_C" >&6
6754else
6755  cat >conftest.$ac_ext <<_ACEOF
6756#line 6756 "configure"
6757#include "confdefs.h"
6758#if defined(CRAY) && ! defined(CRAY2)
6759webecray
6760#else
6761wenotbecray
6762#endif
6763
6764_ACEOF
6765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6766  egrep "webecray" >/dev/null 2>&1; then
6767  ac_cv_os_cray=yes
6768else
6769  ac_cv_os_cray=no
6770fi
6771rm -rf conftest*
6772
6773fi
6774echo "$as_me:6774: result: $ac_cv_os_cray" >&5
6775echo "${ECHO_T}$ac_cv_os_cray" >&6
6776if test $ac_cv_os_cray = yes; then
6777  for ac_func in _getb67 GETB67 getb67; do
6778    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6779echo "$as_me:6779: checking for $ac_func" >&5
6780echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6781if eval "test \"\${$as_ac_var+set}\" = set"; then
6782  echo $ECHO_N "(cached) $ECHO_C" >&6
6783else
6784  cat >conftest.$ac_ext <<_ACEOF
6785#line 6785 "configure"
6786#include "confdefs.h"
6787/* System header to define __stub macros and hopefully few prototypes,
6788    which can conflict with char $ac_func (); below.  */
6789#include <assert.h>
6790/* Override any gcc2 internal prototype to avoid an error.  */
6791#ifdef __cplusplus
6792extern "C"
6793#endif
6794/* We use char because int might match the return type of a gcc2
6795   builtin and then its argument prototype would still apply.  */
6796char $ac_func ();
6797char (*f) ();
6798
6799int
6800main (void)
6801{
6802/* The GNU C library defines this for functions which it implements
6803    to always fail with ENOSYS.  Some functions are actually named
6804    something starting with __ and the normal name is an alias.  */
6805#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6806choke me
6807#else
6808f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6809#endif
6810
6811  ;
6812  return 0;
6813}
6814_ACEOF
6815rm -f conftest.$ac_objext conftest$ac_exeext
6816if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817  (eval $ac_link) 2>&5
6818  ac_status=$?
6819  echo "$as_me:6819: \$? = $ac_status" >&5
6820  (exit $ac_status); } &&
6821         { ac_try='test -s conftest$ac_exeext'
6822  { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6823  (eval $ac_try) 2>&5
6824  ac_status=$?
6825  echo "$as_me:6825: \$? = $ac_status" >&5
6826  (exit $ac_status); }; }; then
6827  eval "$as_ac_var=yes"
6828else
6829  echo "$as_me: failed program was:" >&5
6830cat conftest.$ac_ext >&5
6831eval "$as_ac_var=no"
6832fi
6833rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834fi
6835echo "$as_me:6835: result: `eval echo '${'$as_ac_var'}'`" >&5
6836echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6837if test `eval echo '${'$as_ac_var'}'` = yes; then
6838
6839cat >>confdefs.h <<EOF
6840#define CRAY_STACKSEG_END $ac_func
6841EOF
6842
6843    break
6844fi
6845
6846  done
6847fi
6848
6849echo "$as_me:6849: checking stack direction for C alloca" >&5
6850echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6851if test "${ac_cv_c_stack_direction+set}" = set; then
6852  echo $ECHO_N "(cached) $ECHO_C" >&6
6853else
6854  if test "$cross_compiling" = yes; then
6855  ac_cv_c_stack_direction=0
6856else
6857  cat >conftest.$ac_ext <<_ACEOF
6858#line 6858 "configure"
6859#include "confdefs.h"
6860int
6861find_stack_direction (void)
6862{
6863  static char *addr = 0;
6864  auto char dummy;
6865  if (addr == 0)
6866    {
6867      addr = &dummy;
6868      return find_stack_direction ();
6869    }
6870  else
6871    return (&dummy > addr) ? 1 : -1;
6872}
6873
6874int
6875main (void)
6876{
6877  $ac_main_return (find_stack_direction () < 0);
6878}
6879_ACEOF
6880rm -f conftest$ac_exeext
6881if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882  (eval $ac_link) 2>&5
6883  ac_status=$?
6884  echo "$as_me:6884: \$? = $ac_status" >&5
6885  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6886  { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6887  (eval $ac_try) 2>&5
6888  ac_status=$?
6889  echo "$as_me:6889: \$? = $ac_status" >&5
6890  (exit $ac_status); }; }; then
6891  ac_cv_c_stack_direction=1
6892else
6893  echo "$as_me: program exited with status $ac_status" >&5
6894echo "$as_me: failed program was:" >&5
6895cat conftest.$ac_ext >&5
6896ac_cv_c_stack_direction=-1
6897fi
6898rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6899fi
6900fi
6901echo "$as_me:6901: result: $ac_cv_c_stack_direction" >&5
6902echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6903
6904cat >>confdefs.h <<EOF
6905#define STACK_DIRECTION $ac_cv_c_stack_direction
6906EOF
6907
6908fi
6909
6910for ac_header in stdlib.h unistd.h
6911do
6912as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6913echo "$as_me:6913: checking for $ac_header" >&5
6914echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6915if eval "test \"\${$as_ac_Header+set}\" = set"; then
6916  echo $ECHO_N "(cached) $ECHO_C" >&6
6917else
6918  cat >conftest.$ac_ext <<_ACEOF
6919#line 6919 "configure"
6920#include "confdefs.h"
6921#include <$ac_header>
6922_ACEOF
6923if { (eval echo "$as_me:6923: \"$ac_cpp conftest.$ac_ext\"") >&5
6924  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6925  ac_status=$?
6926  egrep -v '^ *\+' conftest.er1 >conftest.err
6927  rm -f conftest.er1
6928  cat conftest.err >&5
6929  echo "$as_me:6929: \$? = $ac_status" >&5
6930  (exit $ac_status); } >/dev/null; then
6931  if test -s conftest.err; then
6932    ac_cpp_err=$ac_c_preproc_warn_flag
6933  else
6934    ac_cpp_err=
6935  fi
6936else
6937  ac_cpp_err=yes
6938fi
6939if test -z "$ac_cpp_err"; then
6940  eval "$as_ac_Header=yes"
6941else
6942  echo "$as_me: failed program was:" >&5
6943  cat conftest.$ac_ext >&5
6944  eval "$as_ac_Header=no"
6945fi
6946rm -f conftest.err conftest.$ac_ext
6947fi
6948echo "$as_me:6948: result: `eval echo '${'$as_ac_Header'}'`" >&5
6949echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6950if test `eval echo '${'$as_ac_Header'}'` = yes; then
6951  cat >>confdefs.h <<EOF
6952#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6953EOF
6954
6955fi
6956done
6957
6958for ac_func in getpagesize
6959do
6960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6961echo "$as_me:6961: checking for $ac_func" >&5
6962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6963if eval "test \"\${$as_ac_var+set}\" = set"; then
6964  echo $ECHO_N "(cached) $ECHO_C" >&6
6965else
6966  cat >conftest.$ac_ext <<_ACEOF
6967#line 6967 "configure"
6968#include "confdefs.h"
6969/* System header to define __stub macros and hopefully few prototypes,
6970    which can conflict with char $ac_func (); below.  */
6971#include <assert.h>
6972/* Override any gcc2 internal prototype to avoid an error.  */
6973#ifdef __cplusplus
6974extern "C"
6975#endif
6976/* We use char because int might match the return type of a gcc2
6977   builtin and then its argument prototype would still apply.  */
6978char $ac_func ();
6979char (*f) ();
6980
6981int
6982main (void)
6983{
6984/* The GNU C library defines this for functions which it implements
6985    to always fail with ENOSYS.  Some functions are actually named
6986    something starting with __ and the normal name is an alias.  */
6987#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6988choke me
6989#else
6990f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6991#endif
6992
6993  ;
6994  return 0;
6995}
6996_ACEOF
6997rm -f conftest.$ac_objext conftest$ac_exeext
6998if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
6999  (eval $ac_link) 2>&5
7000  ac_status=$?
7001  echo "$as_me:7001: \$? = $ac_status" >&5
7002  (exit $ac_status); } &&
7003         { ac_try='test -s conftest$ac_exeext'
7004  { (eval echo "$as_me:7004: \"$ac_try\"") >&5
7005  (eval $ac_try) 2>&5
7006  ac_status=$?
7007  echo "$as_me:7007: \$? = $ac_status" >&5
7008  (exit $ac_status); }; }; then
7009  eval "$as_ac_var=yes"
7010else
7011  echo "$as_me: failed program was:" >&5
7012cat conftest.$ac_ext >&5
7013eval "$as_ac_var=no"
7014fi
7015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7016fi
7017echo "$as_me:7017: result: `eval echo '${'$as_ac_var'}'`" >&5
7018echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7019if test `eval echo '${'$as_ac_var'}'` = yes; then
7020  cat >>confdefs.h <<EOF
7021#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7022EOF
7023
7024fi
7025done
7026
7027echo "$as_me:7027: checking for working mmap" >&5
7028echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7029if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7030  echo $ECHO_N "(cached) $ECHO_C" >&6
7031else
7032  if test "$cross_compiling" = yes; then
7033  ac_cv_func_mmap_fixed_mapped=no
7034else
7035  cat >conftest.$ac_ext <<_ACEOF
7036#line 7036 "configure"
7037#include "confdefs.h"
7038$ac_includes_default
7039/* Thanks to Mike Haertel and Jim Avera for this test.
7040   Here is a matrix of mmap possibilities:
7041	mmap private not fixed
7042	mmap private fixed at somewhere currently unmapped
7043	mmap private fixed at somewhere already mapped
7044	mmap shared not fixed
7045	mmap shared fixed at somewhere currently unmapped
7046	mmap shared fixed at somewhere already mapped
7047   For private mappings, we should verify that changes cannot be read()
7048   back from the file, nor mmap's back from the file at a different
7049   address.  (There have been systems where private was not correctly
7050   implemented like the infamous i386 svr4.0, and systems where the
7051   VM page cache was not coherent with the file system buffer cache
7052   like early versions of FreeBSD and possibly contemporary NetBSD.)
7053   For shared mappings, we should conversely verify that changes get
7054   propogated back to all the places they're supposed to be.
7055
7056   Grep wants private fixed already mapped.
7057   The main things grep needs to know about mmap are:
7058   * does it exist and is it safe to write into the mmap'd area
7059   * how to use it (BSD variants)  */
7060
7061#include <fcntl.h>
7062#include <sys/mman.h>
7063
7064#if !STDC_HEADERS && !HAVE_STDLIB_H
7065char *malloc ();
7066#endif
7067
7068/* This mess was copied from the GNU getpagesize.h.  */
7069#if !HAVE_GETPAGESIZE
7070/* Assume that all systems that can run configure have sys/param.h.  */
7071# if !HAVE_SYS_PARAM_H
7072#  define HAVE_SYS_PARAM_H 1
7073# endif
7074
7075# ifdef _SC_PAGESIZE
7076#  define getpagesize() sysconf(_SC_PAGESIZE)
7077# else /* no _SC_PAGESIZE */
7078#  if HAVE_SYS_PARAM_H
7079#   include <sys/param.h>
7080#   ifdef EXEC_PAGESIZE
7081#    define getpagesize() EXEC_PAGESIZE
7082#   else /* no EXEC_PAGESIZE */
7083#    ifdef NBPG
7084#     define getpagesize() NBPG * CLSIZE
7085#     ifndef CLSIZE
7086#      define CLSIZE 1
7087#     endif /* no CLSIZE */
7088#    else /* no NBPG */
7089#     ifdef NBPC
7090#      define getpagesize() NBPC
7091#     else /* no NBPC */
7092#      ifdef PAGESIZE
7093#       define getpagesize() PAGESIZE
7094#      endif /* PAGESIZE */
7095#     endif /* no NBPC */
7096#    endif /* no NBPG */
7097#   endif /* no EXEC_PAGESIZE */
7098#  else /* no HAVE_SYS_PARAM_H */
7099#   define getpagesize() 8192	/* punt totally */
7100#  endif /* no HAVE_SYS_PARAM_H */
7101# endif /* no _SC_PAGESIZE */
7102
7103#endif /* no HAVE_GETPAGESIZE */
7104
7105int
7106main (void)
7107{
7108  char *data, *data2, *data3;
7109  int i, pagesize;
7110  int fd;
7111
7112  pagesize = getpagesize ();
7113
7114  /* First, make a file with some known garbage in it. */
7115  data = (char *) malloc (pagesize);
7116  if (!data)
7117    $ac_main_return (1);
7118  for (i = 0; i < pagesize; ++i)
7119    *(data + i) = rand ();
7120  umask (0);
7121  fd = creat ("conftest.mmap", 0600);
7122  if (fd < 0)
7123    $ac_main_return (1);
7124  if (write (fd, data, pagesize) != pagesize)
7125    $ac_main_return (1);
7126  close (fd);
7127
7128  /* Next, try to mmap the file at a fixed address which already has
7129     something else allocated at it.  If we can, also make sure that
7130     we see the same garbage.  */
7131  fd = open ("conftest.mmap", O_RDWR);
7132  if (fd < 0)
7133    $ac_main_return (1);
7134  data2 = (char *) malloc (2 * pagesize);
7135  if (!data2)
7136    $ac_main_return (1);
7137  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7138  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7139                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
7140    $ac_main_return (1);
7141  for (i = 0; i < pagesize; ++i)
7142    if (*(data + i) != *(data2 + i))
7143      $ac_main_return (1);
7144
7145  /* Finally, make sure that changes to the mapped area do not
7146     percolate back to the file as seen by read().  (This is a bug on
7147     some variants of i386 svr4.0.)  */
7148  for (i = 0; i < pagesize; ++i)
7149    *(data2 + i) = *(data2 + i) + 1;
7150  data3 = (char *) malloc (pagesize);
7151  if (!data3)
7152    $ac_main_return (1);
7153  if (read (fd, data3, pagesize) != pagesize)
7154    $ac_main_return (1);
7155  for (i = 0; i < pagesize; ++i)
7156    if (*(data + i) != *(data3 + i))
7157      $ac_main_return (1);
7158  close (fd);
7159  $ac_main_return (0);
7160}
7161_ACEOF
7162rm -f conftest$ac_exeext
7163if { (eval echo "$as_me:7163: \"$ac_link\"") >&5
7164  (eval $ac_link) 2>&5
7165  ac_status=$?
7166  echo "$as_me:7166: \$? = $ac_status" >&5
7167  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7168  { (eval echo "$as_me:7168: \"$ac_try\"") >&5
7169  (eval $ac_try) 2>&5
7170  ac_status=$?
7171  echo "$as_me:7171: \$? = $ac_status" >&5
7172  (exit $ac_status); }; }; then
7173  ac_cv_func_mmap_fixed_mapped=yes
7174else
7175  echo "$as_me: program exited with status $ac_status" >&5
7176echo "$as_me: failed program was:" >&5
7177cat conftest.$ac_ext >&5
7178ac_cv_func_mmap_fixed_mapped=no
7179fi
7180rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7181fi
7182fi
7183echo "$as_me:7183: result: $ac_cv_func_mmap_fixed_mapped" >&5
7184echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7185if test $ac_cv_func_mmap_fixed_mapped = yes; then
7186
7187cat >>confdefs.h <<\EOF
7188#define HAVE_MMAP 1
7189EOF
7190
7191fi
7192rm -f conftest.mmap
7193
7194echo "$as_me:7194: checking whether we are using the GNU C Library 2.1 or newer" >&5
7195echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
7196if test "${ac_cv_gnu_library_2_1+set}" = set; then
7197  echo $ECHO_N "(cached) $ECHO_C" >&6
7198else
7199  cat >conftest.$ac_ext <<_ACEOF
7200#line 7200 "configure"
7201#include "confdefs.h"
7202
7203#include <features.h>
7204#ifdef __GNU_LIBRARY__
7205 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7206  Lucky GNU user
7207 #endif
7208#endif
7209
7210_ACEOF
7211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7212  egrep "Lucky GNU user" >/dev/null 2>&1; then
7213  ac_cv_gnu_library_2_1=yes
7214else
7215  ac_cv_gnu_library_2_1=no
7216fi
7217rm -rf conftest*
7218
7219fi
7220echo "$as_me:7220: result: $ac_cv_gnu_library_2_1" >&5
7221echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
7222
7223	GLIBC21="$ac_cv_gnu_library_2_1"
7224
7225cf_makefile=makefile
7226
7227test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
7228
7229# Allow override of "config.h" definition:
7230: ${CONFIG_H:=config.h}
7231
7232if test -z "$PACKAGE" ; then
7233	{ { echo "$as_me:7233: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
7234echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
7235   { (exit 1); exit 1; }; }
7236fi
7237
7238if test -z "$VERSION" ; then
7239if test -f $srcdir/VERSION ; then
7240	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
7241else
7242	VERSION=unknown
7243fi
7244fi
7245
7246for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7247stdlib.h string.h unistd.h sys/param.h
7248do
7249as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7250echo "$as_me:7250: checking for $ac_header" >&5
7251echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7252if eval "test \"\${$as_ac_Header+set}\" = set"; then
7253  echo $ECHO_N "(cached) $ECHO_C" >&6
7254else
7255  cat >conftest.$ac_ext <<_ACEOF
7256#line 7256 "configure"
7257#include "confdefs.h"
7258#include <$ac_header>
7259_ACEOF
7260if { (eval echo "$as_me:7260: \"$ac_cpp conftest.$ac_ext\"") >&5
7261  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7262  ac_status=$?
7263  egrep -v '^ *\+' conftest.er1 >conftest.err
7264  rm -f conftest.er1
7265  cat conftest.err >&5
7266  echo "$as_me:7266: \$? = $ac_status" >&5
7267  (exit $ac_status); } >/dev/null; then
7268  if test -s conftest.err; then
7269    ac_cpp_err=$ac_c_preproc_warn_flag
7270  else
7271    ac_cpp_err=
7272  fi
7273else
7274  ac_cpp_err=yes
7275fi
7276if test -z "$ac_cpp_err"; then
7277  eval "$as_ac_Header=yes"
7278else
7279  echo "$as_me: failed program was:" >&5
7280  cat conftest.$ac_ext >&5
7281  eval "$as_ac_Header=no"
7282fi
7283rm -f conftest.err conftest.$ac_ext
7284fi
7285echo "$as_me:7285: result: `eval echo '${'$as_ac_Header'}'`" >&5
7286echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7287if test `eval echo '${'$as_ac_Header'}'` = yes; then
7288  cat >>confdefs.h <<EOF
7289#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7290EOF
7291
7292fi
7293done
7294
7295for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
7296getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
7297strdup strtoul tsearch __argz_count __argz_stringify __argz_next
7298do
7299as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7300echo "$as_me:7300: checking for $ac_func" >&5
7301echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7302if eval "test \"\${$as_ac_var+set}\" = set"; then
7303  echo $ECHO_N "(cached) $ECHO_C" >&6
7304else
7305  cat >conftest.$ac_ext <<_ACEOF
7306#line 7306 "configure"
7307#include "confdefs.h"
7308/* System header to define __stub macros and hopefully few prototypes,
7309    which can conflict with char $ac_func (); below.  */
7310#include <assert.h>
7311/* Override any gcc2 internal prototype to avoid an error.  */
7312#ifdef __cplusplus
7313extern "C"
7314#endif
7315/* We use char because int might match the return type of a gcc2
7316   builtin and then its argument prototype would still apply.  */
7317char $ac_func ();
7318char (*f) ();
7319
7320int
7321main (void)
7322{
7323/* The GNU C library defines this for functions which it implements
7324    to always fail with ENOSYS.  Some functions are actually named
7325    something starting with __ and the normal name is an alias.  */
7326#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7327choke me
7328#else
7329f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7330#endif
7331
7332  ;
7333  return 0;
7334}
7335_ACEOF
7336rm -f conftest.$ac_objext conftest$ac_exeext
7337if { (eval echo "$as_me:7337: \"$ac_link\"") >&5
7338  (eval $ac_link) 2>&5
7339  ac_status=$?
7340  echo "$as_me:7340: \$? = $ac_status" >&5
7341  (exit $ac_status); } &&
7342         { ac_try='test -s conftest$ac_exeext'
7343  { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344  (eval $ac_try) 2>&5
7345  ac_status=$?
7346  echo "$as_me:7346: \$? = $ac_status" >&5
7347  (exit $ac_status); }; }; then
7348  eval "$as_ac_var=yes"
7349else
7350  echo "$as_me: failed program was:" >&5
7351cat conftest.$ac_ext >&5
7352eval "$as_ac_var=no"
7353fi
7354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7355fi
7356echo "$as_me:7356: result: `eval echo '${'$as_ac_var'}'`" >&5
7357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7358if test `eval echo '${'$as_ac_var'}'` = yes; then
7359  cat >>confdefs.h <<EOF
7360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7361EOF
7362
7363fi
7364done
7365
7366# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
7367if test "${with_libiconv_prefix+set}" = set; then
7368  withval="$with_libiconv_prefix"
7369
7370case "$withval" in
7371(no)
7372	;;
7373(yes)
7374	;;
7375(*)
7376
7377for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
7378	if test -d $cf_searchpath/include; then
7379
7380if test -n "$cf_searchpath/include" ; then
7381  for cf_add_incdir in $cf_searchpath/include
7382  do
7383	while test $cf_add_incdir != /usr/include
7384	do
7385	  if test -d $cf_add_incdir
7386	  then
7387		cf_have_incdir=no
7388		if test -n "$CFLAGS$CPPFLAGS" ; then
7389		  # a loop is needed to ensure we can add subdirs of existing dirs
7390		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7391			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7392			  cf_have_incdir=yes; break
7393			fi
7394		  done
7395		fi
7396
7397		if test "$cf_have_incdir" = no ; then
7398		  if test "$cf_add_incdir" = /usr/local/include ; then
7399			if test "$GCC" = yes
7400			then
7401			  cf_save_CPPFLAGS=$CPPFLAGS
7402
7403	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7404	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7405
7406			  cat >conftest.$ac_ext <<_ACEOF
7407#line 7407 "configure"
7408#include "confdefs.h"
7409#include <stdio.h>
7410int
7411main (void)
7412{
7413printf("Hello")
7414  ;
7415  return 0;
7416}
7417_ACEOF
7418rm -f conftest.$ac_objext
7419if { (eval echo "$as_me:7419: \"$ac_compile\"") >&5
7420  (eval $ac_compile) 2>&5
7421  ac_status=$?
7422  echo "$as_me:7422: \$? = $ac_status" >&5
7423  (exit $ac_status); } &&
7424         { ac_try='test -s conftest.$ac_objext'
7425  { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7426  (eval $ac_try) 2>&5
7427  ac_status=$?
7428  echo "$as_me:7428: \$? = $ac_status" >&5
7429  (exit $ac_status); }; }; then
7430  :
7431else
7432  echo "$as_me: failed program was:" >&5
7433cat conftest.$ac_ext >&5
7434cf_have_incdir=yes
7435fi
7436rm -f conftest.$ac_objext conftest.$ac_ext
7437			  CPPFLAGS=$cf_save_CPPFLAGS
7438			fi
7439		  fi
7440		fi
7441
7442		if test "$cf_have_incdir" = no ; then
7443		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7444
7445echo "${as_me:-configure}:7445: testing adding $cf_add_incdir to include-path ..." 1>&5
7446
7447		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7448
7449		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7450		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7451		  cf_add_incdir="$cf_top_incdir"
7452		else
7453		  break
7454		fi
7455	  else
7456		break
7457	  fi
7458	done
7459  done
7460fi
7461
7462	elif test -d $cf_searchpath/../include ; then
7463
7464if test -n "$cf_searchpath/../include" ; then
7465  for cf_add_incdir in $cf_searchpath/../include
7466  do
7467	while test $cf_add_incdir != /usr/include
7468	do
7469	  if test -d $cf_add_incdir
7470	  then
7471		cf_have_incdir=no
7472		if test -n "$CFLAGS$CPPFLAGS" ; then
7473		  # a loop is needed to ensure we can add subdirs of existing dirs
7474		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7475			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7476			  cf_have_incdir=yes; break
7477			fi
7478		  done
7479		fi
7480
7481		if test "$cf_have_incdir" = no ; then
7482		  if test "$cf_add_incdir" = /usr/local/include ; then
7483			if test "$GCC" = yes
7484			then
7485			  cf_save_CPPFLAGS=$CPPFLAGS
7486
7487	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7488	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7489
7490			  cat >conftest.$ac_ext <<_ACEOF
7491#line 7491 "configure"
7492#include "confdefs.h"
7493#include <stdio.h>
7494int
7495main (void)
7496{
7497printf("Hello")
7498  ;
7499  return 0;
7500}
7501_ACEOF
7502rm -f conftest.$ac_objext
7503if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
7504  (eval $ac_compile) 2>&5
7505  ac_status=$?
7506  echo "$as_me:7506: \$? = $ac_status" >&5
7507  (exit $ac_status); } &&
7508         { ac_try='test -s conftest.$ac_objext'
7509  { (eval echo "$as_me:7509: \"$ac_try\"") >&5
7510  (eval $ac_try) 2>&5
7511  ac_status=$?
7512  echo "$as_me:7512: \$? = $ac_status" >&5
7513  (exit $ac_status); }; }; then
7514  :
7515else
7516  echo "$as_me: failed program was:" >&5
7517cat conftest.$ac_ext >&5
7518cf_have_incdir=yes
7519fi
7520rm -f conftest.$ac_objext conftest.$ac_ext
7521			  CPPFLAGS=$cf_save_CPPFLAGS
7522			fi
7523		  fi
7524		fi
7525
7526		if test "$cf_have_incdir" = no ; then
7527		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7528
7529echo "${as_me:-configure}:7529: testing adding $cf_add_incdir to include-path ..." 1>&5
7530
7531		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7532
7533		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7534		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7535		  cf_add_incdir="$cf_top_incdir"
7536		else
7537		  break
7538		fi
7539	  else
7540		break
7541	  fi
7542	done
7543  done
7544fi
7545
7546	else
7547{ { echo "$as_me:7547: error: cannot find libiconv under $withval" >&5
7548echo "$as_me: error: cannot find libiconv under $withval" >&2;}
7549   { (exit 1); exit 1; }; }
7550	fi
7551	if test -d $cf_searchpath/lib; then
7552
7553if test -n "$cf_searchpath/lib" ; then
7554	for cf_add_libdir in $cf_searchpath/lib
7555	do
7556		if test $cf_add_libdir = /usr/lib ; then
7557			:
7558		elif test -d $cf_add_libdir
7559		then
7560			cf_have_libdir=no
7561			if test -n "$LDFLAGS$LIBS" ; then
7562				# a loop is needed to ensure we can add subdirs of existing dirs
7563				for cf_test_libdir in $LDFLAGS $LIBS ; do
7564					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7565						cf_have_libdir=yes; break
7566					fi
7567				done
7568			fi
7569			if test "$cf_have_libdir" = no ; then
7570				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7571
7572echo "${as_me:-configure}:7572: testing adding $cf_add_libdir to library-path ..." 1>&5
7573
7574				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7575			fi
7576		fi
7577	done
7578fi
7579
7580	elif test -d $cf_searchpath ; then
7581
7582if test -n "$cf_searchpath" ; then
7583	for cf_add_libdir in $cf_searchpath
7584	do
7585		if test $cf_add_libdir = /usr/lib ; then
7586			:
7587		elif test -d $cf_add_libdir
7588		then
7589			cf_have_libdir=no
7590			if test -n "$LDFLAGS$LIBS" ; then
7591				# a loop is needed to ensure we can add subdirs of existing dirs
7592				for cf_test_libdir in $LDFLAGS $LIBS ; do
7593					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7594						cf_have_libdir=yes; break
7595					fi
7596				done
7597			fi
7598			if test "$cf_have_libdir" = no ; then
7599				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7600
7601echo "${as_me:-configure}:7601: testing adding $cf_add_libdir to library-path ..." 1>&5
7602
7603				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7604			fi
7605		fi
7606	done
7607fi
7608
7609	else
7610{ { echo "$as_me:7610: error: cannot find libiconv under $withval" >&5
7611echo "$as_me: error: cannot find libiconv under $withval" >&2;}
7612   { (exit 1); exit 1; }; }
7613	fi
7614done
7615
7616	;;
7617esac
7618
7619fi;
7620
7621  echo "$as_me:7621: checking for iconv" >&5
7622echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7623if test "${am_cv_func_iconv+set}" = set; then
7624  echo $ECHO_N "(cached) $ECHO_C" >&6
7625else
7626
7627# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7628# will be set on completion of the AC_TRY_LINK below.
7629cf_cv_header_path_iconv=
7630cf_cv_library_path_iconv=
7631
7632echo "${as_me:-configure}:7632: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
7633
7634cf_save_LIBS="$LIBS"
7635
7636cat >conftest.$ac_ext <<_ACEOF
7637#line 7637 "configure"
7638#include "confdefs.h"
7639
7640#include <stdlib.h>
7641#include <iconv.h>
7642
7643int
7644main (void)
7645{
7646
7647	iconv_t cd = iconv_open("","");
7648	iconv(cd,NULL,NULL,NULL,NULL);
7649	iconv_close(cd);
7650
7651  ;
7652  return 0;
7653}
7654_ACEOF
7655rm -f conftest.$ac_objext conftest$ac_exeext
7656if { (eval echo "$as_me:7656: \"$ac_link\"") >&5
7657  (eval $ac_link) 2>&5
7658  ac_status=$?
7659  echo "$as_me:7659: \$? = $ac_status" >&5
7660  (exit $ac_status); } &&
7661         { ac_try='test -s conftest$ac_exeext'
7662  { (eval echo "$as_me:7662: \"$ac_try\"") >&5
7663  (eval $ac_try) 2>&5
7664  ac_status=$?
7665  echo "$as_me:7665: \$? = $ac_status" >&5
7666  (exit $ac_status); }; }; then
7667
7668	cf_cv_find_linkage_iconv=yes
7669	cf_cv_header_path_iconv=/usr/include
7670	cf_cv_library_path_iconv=/usr/lib
7671
7672else
7673  echo "$as_me: failed program was:" >&5
7674cat conftest.$ac_ext >&5
7675
7676LIBS="-liconv  $cf_save_LIBS"
7677
7678cat >conftest.$ac_ext <<_ACEOF
7679#line 7679 "configure"
7680#include "confdefs.h"
7681
7682#include <stdlib.h>
7683#include <iconv.h>
7684
7685int
7686main (void)
7687{
7688
7689	iconv_t cd = iconv_open("","");
7690	iconv(cd,NULL,NULL,NULL,NULL);
7691	iconv_close(cd);
7692
7693  ;
7694  return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext conftest$ac_exeext
7698if { (eval echo "$as_me:7698: \"$ac_link\"") >&5
7699  (eval $ac_link) 2>&5
7700  ac_status=$?
7701  echo "$as_me:7701: \$? = $ac_status" >&5
7702  (exit $ac_status); } &&
7703         { ac_try='test -s conftest$ac_exeext'
7704  { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7705  (eval $ac_try) 2>&5
7706  ac_status=$?
7707  echo "$as_me:7707: \$? = $ac_status" >&5
7708  (exit $ac_status); }; }; then
7709
7710	cf_cv_find_linkage_iconv=yes
7711	cf_cv_header_path_iconv=/usr/include
7712	cf_cv_library_path_iconv=/usr/lib
7713	cf_cv_library_file_iconv="-liconv"
7714
7715else
7716  echo "$as_me: failed program was:" >&5
7717cat conftest.$ac_ext >&5
7718
7719	cf_cv_find_linkage_iconv=no
7720	LIBS="$cf_save_LIBS"
7721
7722	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
7723
7724echo "${as_me:-configure}:7724: testing find linkage for iconv library ..." 1>&5
7725
7726echo "${as_me:-configure}:7726: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
7727
7728	cf_save_CPPFLAGS="$CPPFLAGS"
7729	cf_test_CPPFLAGS="$CPPFLAGS"
7730
7731cf_search=
7732
7733# collect the current set of include-directories from compiler flags
7734cf_header_path_list=""
7735if test -n "${CFLAGS}${CPPFLAGS}" ; then
7736	for cf_header_path in $CPPFLAGS $CFLAGS
7737	do
7738		case $cf_header_path in
7739		(-I*)
7740			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7741
7742test "x$cf_header_path" != "xNONE" && \
7743test -d "$cf_header_path" && \
7744 {
7745	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
7746	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7747	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
7748	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
7749	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
7750	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
7751}
7752
7753			cf_header_path_list="$cf_header_path_list $cf_search"
7754			;;
7755		esac
7756	done
7757fi
7758
7759# add the variations for the package we are looking for
7760
7761cf_search=
7762
7763test "x$prefix" != "xNONE" && \
7764test -d "$prefix" && \
7765 {
7766	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
7767	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7768	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
7769	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
7770	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
7771	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
7772}
7773
7774for cf_subdir_prefix in \
7775	/usr \
7776	/usr/local \
7777	/usr/pkg \
7778	/opt \
7779	/opt/local \
7780	$HOME
7781do
7782
7783test "x$cf_subdir_prefix" != "x$prefix" && \
7784test -d "$cf_subdir_prefix" && \
7785(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7786	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
7787	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
7788	test -d $cf_subdir_prefix/include/iconv &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
7789	test -d $cf_subdir_prefix/include/iconv/include &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
7790	test -d $cf_subdir_prefix/iconv/include &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
7791	test -d $cf_subdir_prefix/iconv/include/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
7792}
7793
7794done
7795
7796test "$includedir" != NONE && \
7797test "$includedir" != "/usr/include" && \
7798test -d "$includedir" && {
7799	test -d $includedir &&    cf_search="$cf_search $includedir"
7800	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
7801}
7802
7803test "$oldincludedir" != NONE && \
7804test "$oldincludedir" != "/usr/include" && \
7805test -d "$oldincludedir" && {
7806	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7807	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
7808}
7809
7810cf_search="$cf_search $cf_header_path_list"
7811
7812	for cf_cv_header_path_iconv in $cf_search
7813	do
7814		if test -d $cf_cv_header_path_iconv ; then
7815			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
7816
7817echo "${as_me:-configure}:7817: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
7818
7819			CPPFLAGS="$cf_save_CPPFLAGS"
7820
7821	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7822	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
7823
7824			cat >conftest.$ac_ext <<_ACEOF
7825#line 7825 "configure"
7826#include "confdefs.h"
7827
7828#include <stdlib.h>
7829#include <iconv.h>
7830
7831int
7832main (void)
7833{
7834
7835	iconv_t cd = iconv_open("","");
7836	iconv(cd,NULL,NULL,NULL,NULL);
7837	iconv_close(cd);
7838
7839  ;
7840  return 0;
7841}
7842_ACEOF
7843rm -f conftest.$ac_objext
7844if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
7845  (eval $ac_compile) 2>&5
7846  ac_status=$?
7847  echo "$as_me:7847: \$? = $ac_status" >&5
7848  (exit $ac_status); } &&
7849         { ac_try='test -s conftest.$ac_objext'
7850  { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7851  (eval $ac_try) 2>&5
7852  ac_status=$?
7853  echo "$as_me:7853: \$? = $ac_status" >&5
7854  (exit $ac_status); }; }; then
7855
7856				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
7857
7858echo "${as_me:-configure}:7858: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
7859
7860				cf_cv_find_linkage_iconv=maybe
7861				cf_test_CPPFLAGS="$CPPFLAGS"
7862				break
7863else
7864  echo "$as_me: failed program was:" >&5
7865cat conftest.$ac_ext >&5
7866
7867				CPPFLAGS="$cf_save_CPPFLAGS"
7868
7869fi
7870rm -f conftest.$ac_objext conftest.$ac_ext
7871		fi
7872	done
7873
7874	if test "$cf_cv_find_linkage_iconv" = maybe ; then
7875
7876echo "${as_me:-configure}:7876: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
7877
7878		cf_save_LIBS="$LIBS"
7879		cf_save_LDFLAGS="$LDFLAGS"
7880
7881		if test "$cf_cv_find_linkage_iconv" != yes ; then
7882
7883cf_search=
7884cf_library_path_list=""
7885if test -n "${LDFLAGS}${LIBS}" ; then
7886	for cf_library_path in $LDFLAGS $LIBS
7887	do
7888		case $cf_library_path in
7889		(-L*)
7890			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7891
7892test "x$cf_library_path" != "xNONE" && \
7893test -d "$cf_library_path" && \
7894 {
7895	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
7896	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7897	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
7898	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
7899	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
7900	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
7901}
7902
7903			cf_library_path_list="$cf_library_path_list $cf_search"
7904			;;
7905		esac
7906	done
7907fi
7908
7909cf_search=
7910
7911test "x$prefix" != "xNONE" && \
7912test -d "$prefix" && \
7913 {
7914	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
7915	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7916	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
7917	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
7918	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
7919	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
7920}
7921
7922for cf_subdir_prefix in \
7923	/usr \
7924	/usr/local \
7925	/usr/pkg \
7926	/opt \
7927	/opt/local \
7928	$HOME
7929do
7930
7931test "x$cf_subdir_prefix" != "x$prefix" && \
7932test -d "$cf_subdir_prefix" && \
7933(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7934	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
7935	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
7936	test -d $cf_subdir_prefix/lib/iconv &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
7937	test -d $cf_subdir_prefix/lib/iconv/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
7938	test -d $cf_subdir_prefix/iconv/lib &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
7939	test -d $cf_subdir_prefix/iconv/lib/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
7940}
7941
7942done
7943
7944cf_search="$cf_library_path_list $cf_search"
7945
7946			for cf_cv_library_path_iconv in $cf_search
7947			do
7948				if test -d $cf_cv_library_path_iconv ; then
7949					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
7950
7951echo "${as_me:-configure}:7951: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
7952
7953					CPPFLAGS="$cf_test_CPPFLAGS"
7954					LIBS="-liconv  $cf_save_LIBS"
7955					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
7956					cat >conftest.$ac_ext <<_ACEOF
7957#line 7957 "configure"
7958#include "confdefs.h"
7959
7960#include <stdlib.h>
7961#include <iconv.h>
7962
7963int
7964main (void)
7965{
7966
7967	iconv_t cd = iconv_open("","");
7968	iconv(cd,NULL,NULL,NULL,NULL);
7969	iconv_close(cd);
7970
7971  ;
7972  return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext conftest$ac_exeext
7976if { (eval echo "$as_me:7976: \"$ac_link\"") >&5
7977  (eval $ac_link) 2>&5
7978  ac_status=$?
7979  echo "$as_me:7979: \$? = $ac_status" >&5
7980  (exit $ac_status); } &&
7981         { ac_try='test -s conftest$ac_exeext'
7982  { (eval echo "$as_me:7982: \"$ac_try\"") >&5
7983  (eval $ac_try) 2>&5
7984  ac_status=$?
7985  echo "$as_me:7985: \$? = $ac_status" >&5
7986  (exit $ac_status); }; }; then
7987
7988					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
7989
7990echo "${as_me:-configure}:7990: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
7991
7992					cf_cv_find_linkage_iconv=yes
7993					cf_cv_library_file_iconv="-liconv"
7994					break
7995else
7996  echo "$as_me: failed program was:" >&5
7997cat conftest.$ac_ext >&5
7998
7999					CPPFLAGS="$cf_save_CPPFLAGS"
8000					LIBS="$cf_save_LIBS"
8001					LDFLAGS="$cf_save_LDFLAGS"
8002
8003fi
8004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8005				fi
8006			done
8007			CPPFLAGS="$cf_save_CPPFLAGS"
8008			LDFLAGS="$cf_save_LDFLAGS"
8009		fi
8010
8011	else
8012		cf_cv_find_linkage_iconv=no
8013	fi
8014
8015fi
8016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8017
8018fi
8019rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8020
8021LIBS="$cf_save_LIBS"
8022
8023if test "$cf_cv_find_linkage_iconv" = yes ; then
8024am_cv_func_iconv=yes
8025else
8026am_cv_func_iconv="no, consider installing GNU libiconv"
8027fi
8028
8029fi
8030echo "$as_me:8030: result: $am_cv_func_iconv" >&5
8031echo "${ECHO_T}$am_cv_func_iconv" >&6
8032
8033  if test "$am_cv_func_iconv" = yes; then
8034
8035cat >>confdefs.h <<\EOF
8036#define HAVE_ICONV 1
8037EOF
8038
8039    echo "$as_me:8039: checking if the declaration of iconv() needs const." >&5
8040echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
8041if test "${am_cv_proto_iconv_const+set}" = set; then
8042  echo $ECHO_N "(cached) $ECHO_C" >&6
8043else
8044
8045      cat >conftest.$ac_ext <<_ACEOF
8046#line 8046 "configure"
8047#include "confdefs.h"
8048
8049#include <stdlib.h>
8050#include <iconv.h>
8051
8052extern
8053#ifdef __cplusplus
8054"C"
8055#endif
8056#if defined(__STDC__) || defined(__cplusplus)
8057size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8058#else
8059size_t iconv();
8060#endif
8061
8062int
8063main (void)
8064{
8065
8066  ;
8067  return 0;
8068}
8069_ACEOF
8070rm -f conftest.$ac_objext
8071if { (eval echo "$as_me:8071: \"$ac_compile\"") >&5
8072  (eval $ac_compile) 2>&5
8073  ac_status=$?
8074  echo "$as_me:8074: \$? = $ac_status" >&5
8075  (exit $ac_status); } &&
8076         { ac_try='test -s conftest.$ac_objext'
8077  { (eval echo "$as_me:8077: \"$ac_try\"") >&5
8078  (eval $ac_try) 2>&5
8079  ac_status=$?
8080  echo "$as_me:8080: \$? = $ac_status" >&5
8081  (exit $ac_status); }; }; then
8082  am_cv_proto_iconv_const=no
8083else
8084  echo "$as_me: failed program was:" >&5
8085cat conftest.$ac_ext >&5
8086am_cv_proto_iconv_const=yes
8087fi
8088rm -f conftest.$ac_objext conftest.$ac_ext
8089fi
8090echo "$as_me:8090: result: $am_cv_proto_iconv_const" >&5
8091echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
8092
8093    if test "$am_cv_proto_iconv_const" = yes ; then
8094      am_cv_proto_iconv_arg1="const"
8095    else
8096      am_cv_proto_iconv_arg1=""
8097    fi
8098
8099cat >>confdefs.h <<EOF
8100#define ICONV_CONST $am_cv_proto_iconv_arg1
8101EOF
8102
8103  fi
8104
8105  LIBICONV=
8106  if test "$cf_cv_find_linkage_iconv" = yes; then
8107
8108if test -n "$cf_cv_header_path_iconv" ; then
8109  for cf_add_incdir in $cf_cv_header_path_iconv
8110  do
8111	while test $cf_add_incdir != /usr/include
8112	do
8113	  if test -d $cf_add_incdir
8114	  then
8115		cf_have_incdir=no
8116		if test -n "$CFLAGS$CPPFLAGS" ; then
8117		  # a loop is needed to ensure we can add subdirs of existing dirs
8118		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8119			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8120			  cf_have_incdir=yes; break
8121			fi
8122		  done
8123		fi
8124
8125		if test "$cf_have_incdir" = no ; then
8126		  if test "$cf_add_incdir" = /usr/local/include ; then
8127			if test "$GCC" = yes
8128			then
8129			  cf_save_CPPFLAGS=$CPPFLAGS
8130
8131	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8132	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8133
8134			  cat >conftest.$ac_ext <<_ACEOF
8135#line 8135 "configure"
8136#include "confdefs.h"
8137#include <stdio.h>
8138int
8139main (void)
8140{
8141printf("Hello")
8142  ;
8143  return 0;
8144}
8145_ACEOF
8146rm -f conftest.$ac_objext
8147if { (eval echo "$as_me:8147: \"$ac_compile\"") >&5
8148  (eval $ac_compile) 2>&5
8149  ac_status=$?
8150  echo "$as_me:8150: \$? = $ac_status" >&5
8151  (exit $ac_status); } &&
8152         { ac_try='test -s conftest.$ac_objext'
8153  { (eval echo "$as_me:8153: \"$ac_try\"") >&5
8154  (eval $ac_try) 2>&5
8155  ac_status=$?
8156  echo "$as_me:8156: \$? = $ac_status" >&5
8157  (exit $ac_status); }; }; then
8158  :
8159else
8160  echo "$as_me: failed program was:" >&5
8161cat conftest.$ac_ext >&5
8162cf_have_incdir=yes
8163fi
8164rm -f conftest.$ac_objext conftest.$ac_ext
8165			  CPPFLAGS=$cf_save_CPPFLAGS
8166			fi
8167		  fi
8168		fi
8169
8170		if test "$cf_have_incdir" = no ; then
8171		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8172
8173echo "${as_me:-configure}:8173: testing adding $cf_add_incdir to include-path ..." 1>&5
8174
8175		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8176
8177		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8178		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8179		  cf_add_incdir="$cf_top_incdir"
8180		else
8181		  break
8182		fi
8183	  else
8184		break
8185	  fi
8186	done
8187  done
8188fi
8189
8190    if test -n "$cf_cv_library_file_iconv" ; then
8191      LIBICONV="-liconv"
8192
8193if test -n "$cf_cv_library_path_iconv" ; then
8194	for cf_add_libdir in $cf_cv_library_path_iconv
8195	do
8196		if test $cf_add_libdir = /usr/lib ; then
8197			:
8198		elif test -d $cf_add_libdir
8199		then
8200			cf_have_libdir=no
8201			if test -n "$LDFLAGS$LIBS" ; then
8202				# a loop is needed to ensure we can add subdirs of existing dirs
8203				for cf_test_libdir in $LDFLAGS $LIBS ; do
8204					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8205						cf_have_libdir=yes; break
8206					fi
8207				done
8208			fi
8209			if test "$cf_have_libdir" = no ; then
8210				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8211
8212echo "${as_me:-configure}:8212: testing adding $cf_add_libdir to library-path ..." 1>&5
8213
8214				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8215			fi
8216		fi
8217	done
8218fi
8219
8220    fi
8221  fi
8222
8223echo "$as_me:8223: checking for nl_langinfo and CODESET" >&5
8224echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8225if test "${am_cv_langinfo_codeset+set}" = set; then
8226  echo $ECHO_N "(cached) $ECHO_C" >&6
8227else
8228  cat >conftest.$ac_ext <<_ACEOF
8229#line 8229 "configure"
8230#include "confdefs.h"
8231#include <langinfo.h>
8232int
8233main (void)
8234{
8235char* cs = nl_langinfo(CODESET);
8236  ;
8237  return 0;
8238}
8239_ACEOF
8240rm -f conftest.$ac_objext conftest$ac_exeext
8241if { (eval echo "$as_me:8241: \"$ac_link\"") >&5
8242  (eval $ac_link) 2>&5
8243  ac_status=$?
8244  echo "$as_me:8244: \$? = $ac_status" >&5
8245  (exit $ac_status); } &&
8246         { ac_try='test -s conftest$ac_exeext'
8247  { (eval echo "$as_me:8247: \"$ac_try\"") >&5
8248  (eval $ac_try) 2>&5
8249  ac_status=$?
8250  echo "$as_me:8250: \$? = $ac_status" >&5
8251  (exit $ac_status); }; }; then
8252  am_cv_langinfo_codeset=yes
8253else
8254  echo "$as_me: failed program was:" >&5
8255cat conftest.$ac_ext >&5
8256am_cv_langinfo_codeset=no
8257fi
8258rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8259
8260fi
8261echo "$as_me:8261: result: $am_cv_langinfo_codeset" >&5
8262echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8263	if test $am_cv_langinfo_codeset = yes; then
8264
8265cat >>confdefs.h <<\EOF
8266#define HAVE_LANGINFO_CODESET 1
8267EOF
8268
8269	fi
8270
8271   if test $ac_cv_header_locale_h = yes; then
8272	echo "$as_me:8272: checking for LC_MESSAGES" >&5
8273echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8274if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8275  echo $ECHO_N "(cached) $ECHO_C" >&6
8276else
8277  cat >conftest.$ac_ext <<_ACEOF
8278#line 8278 "configure"
8279#include "confdefs.h"
8280#include <locale.h>
8281int
8282main (void)
8283{
8284return LC_MESSAGES
8285  ;
8286  return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext conftest$ac_exeext
8290if { (eval echo "$as_me:8290: \"$ac_link\"") >&5
8291  (eval $ac_link) 2>&5
8292  ac_status=$?
8293  echo "$as_me:8293: \$? = $ac_status" >&5
8294  (exit $ac_status); } &&
8295         { ac_try='test -s conftest$ac_exeext'
8296  { (eval echo "$as_me:8296: \"$ac_try\"") >&5
8297  (eval $ac_try) 2>&5
8298  ac_status=$?
8299  echo "$as_me:8299: \$? = $ac_status" >&5
8300  (exit $ac_status); }; }; then
8301  am_cv_val_LC_MESSAGES=yes
8302else
8303  echo "$as_me: failed program was:" >&5
8304cat conftest.$ac_ext >&5
8305am_cv_val_LC_MESSAGES=no
8306fi
8307rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8308fi
8309echo "$as_me:8309: result: $am_cv_val_LC_MESSAGES" >&5
8310echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8311	if test $am_cv_val_LC_MESSAGES = yes; then
8312
8313cat >>confdefs.h <<\EOF
8314#define HAVE_LC_MESSAGES 1
8315EOF
8316
8317	fi
8318fi
8319   echo "$as_me:8319: checking whether NLS is requested" >&5
8320echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
8321
8322# Check whether --enable-nls or --disable-nls was given.
8323if test "${enable_nls+set}" = set; then
8324  enableval="$enable_nls"
8325  USE_NLS=$enableval
8326else
8327  USE_NLS=no
8328fi;
8329  echo "$as_me:8329: result: $USE_NLS" >&5
8330echo "${ECHO_T}$USE_NLS" >&6
8331
8332  BUILD_INCLUDED_LIBINTL=no
8333  USE_INCLUDED_LIBINTL=no
8334  INTLLIBS=
8335
8336    if test "$USE_NLS" = "yes"; then
8337        POSUB=po
8338
8339cat >>confdefs.h <<\EOF
8340#define ENABLE_NLS 1
8341EOF
8342
8343    echo "$as_me:8343: checking whether included gettext is requested" >&5
8344echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
8345
8346# Check whether --with-included-gettext or --without-included-gettext was given.
8347if test "${with_included_gettext+set}" = set; then
8348  withval="$with_included_gettext"
8349  nls_cv_force_use_gnu_gettext=$withval
8350else
8351  nls_cv_force_use_gnu_gettext=no
8352fi;
8353    echo "$as_me:8353: result: $nls_cv_force_use_gnu_gettext" >&5
8354echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
8355
8356    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8357    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8358                        CATOBJEXT=NONE
8359
8360                                          cf_save_msgfmt_path="$MSGFMT"
8361      cf_save_xgettext_path="$XGETTEXT"
8362
8363            # Extract the first word of "msgfmt", so it can be a program name with args.
8364
8365set dummy msgfmt; ac_word=$2
8366echo "$as_me:8366: checking for $ac_word" >&5
8367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8368if test "${ac_cv_path_MSGFMT+set}" = set; then
8369  echo $ECHO_N "(cached) $ECHO_C" >&6
8370else
8371  case "$MSGFMT" in
8372  ([\\/]*|?:[\\/]*)
8373  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8374  ;;
8375  (*)
8376  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8377  for ac_dir in $PATH; do
8378    test -z "$ac_dir" && ac_dir=.
8379    if test -f $ac_dir/$ac_word$ac_exeext; then
8380      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
8381	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
8382	break
8383      fi
8384    fi
8385  done
8386  IFS="$ac_save_ifs"
8387  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
8388  ;;
8389esac
8390fi
8391MSGFMT="$ac_cv_path_MSGFMT"
8392if test "$MSGFMT" != ":"; then
8393  echo "$as_me:8393: result: $MSGFMT" >&5
8394echo "${ECHO_T}$MSGFMT" >&6
8395else
8396  echo "$as_me:8396: result: no" >&5
8397echo "${ECHO_T}no" >&6
8398fi
8399
8400      # Extract the first word of "gmsgfmt", so it can be a program name with args.
8401set dummy gmsgfmt; ac_word=$2
8402echo "$as_me:8402: checking for $ac_word" >&5
8403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8404if test "${ac_cv_path_GMSGFMT+set}" = set; then
8405  echo $ECHO_N "(cached) $ECHO_C" >&6
8406else
8407  case $GMSGFMT in
8408  [\\/]* | ?:[\\/]*)
8409  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8410  ;;
8411  *)
8412  ac_save_IFS=$IFS; IFS=$ac_path_separator
8413ac_dummy="$PATH"
8414for ac_dir in $ac_dummy; do
8415  IFS=$ac_save_IFS
8416  test -z "$ac_dir" && ac_dir=.
8417  if $as_executable_p "$ac_dir/$ac_word"; then
8418   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8419   echo "$as_me:8419: found $ac_dir/$ac_word" >&5
8420   break
8421fi
8422done
8423
8424  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8425  ;;
8426esac
8427fi
8428GMSGFMT=$ac_cv_path_GMSGFMT
8429
8430if test -n "$GMSGFMT"; then
8431  echo "$as_me:8431: result: $GMSGFMT" >&5
8432echo "${ECHO_T}$GMSGFMT" >&6
8433else
8434  echo "$as_me:8434: result: no" >&5
8435echo "${ECHO_T}no" >&6
8436fi
8437
8438            # Extract the first word of "xgettext", so it can be a program name with args.
8439
8440set dummy xgettext; ac_word=$2
8441echo "$as_me:8441: checking for $ac_word" >&5
8442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8443if test "${ac_cv_path_XGETTEXT+set}" = set; then
8444  echo $ECHO_N "(cached) $ECHO_C" >&6
8445else
8446  case "$XGETTEXT" in
8447  ([\\/]*|?:[\\/]*)
8448  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8449  ;;
8450  (*)
8451  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8452  for ac_dir in $PATH; do
8453    test -z "$ac_dir" && ac_dir=.
8454    if test -f $ac_dir/$ac_word$ac_exeext; then
8455      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
8456	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
8457	break
8458      fi
8459    fi
8460  done
8461  IFS="$ac_save_ifs"
8462  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8463  ;;
8464esac
8465fi
8466XGETTEXT="$ac_cv_path_XGETTEXT"
8467if test "$XGETTEXT" != ":"; then
8468  echo "$as_me:8468: result: $XGETTEXT" >&5
8469echo "${ECHO_T}$XGETTEXT" >&6
8470else
8471  echo "$as_me:8471: result: no" >&5
8472echo "${ECHO_T}no" >&6
8473fi
8474
8475      cf_save_OPTS_1="$CPPFLAGS"
8476      if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
8477         test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
8478
8479cf_fix_cppflags=no
8480cf_new_cflags=
8481cf_new_cppflags=
8482cf_new_extra_cppflags=
8483
8484for cf_add_cflags in -DIGNORE_MSGFMT_HACK
8485do
8486case $cf_fix_cppflags in
8487(no)
8488	case $cf_add_cflags in
8489	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8490		case $cf_add_cflags in
8491		(-D*)
8492			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8493
8494			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8495				&& test -z "${cf_tst_cflags}" \
8496				&& cf_fix_cppflags=yes
8497
8498			if test $cf_fix_cppflags = yes ; then
8499
8500	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8501	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8502
8503				continue
8504			elif test "${cf_tst_cflags}" = "\"'" ; then
8505
8506	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8507	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8508
8509				continue
8510			fi
8511			;;
8512		esac
8513		case "$CPPFLAGS" in
8514		(*$cf_add_cflags)
8515			;;
8516		(*)
8517			case $cf_add_cflags in
8518			(-D*)
8519				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8520
8521CPPFLAGS=`echo "$CPPFLAGS" | \
8522	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8523		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8524
8525				;;
8526			esac
8527
8528	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8529	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8530
8531			;;
8532		esac
8533		;;
8534	(*)
8535
8536	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8537	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8538
8539		;;
8540	esac
8541	;;
8542(yes)
8543
8544	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8545	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8546
8547	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8548
8549	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8550		&& test -z "${cf_tst_cflags}" \
8551		&& cf_fix_cppflags=no
8552	;;
8553esac
8554done
8555
8556if test -n "$cf_new_cflags" ; then
8557
8558	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8559	CFLAGS="${CFLAGS}$cf_new_cflags"
8560
8561fi
8562
8563if test -n "$cf_new_cppflags" ; then
8564
8565	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8566	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8567
8568fi
8569
8570if test -n "$cf_new_extra_cppflags" ; then
8571
8572	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8573	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8574
8575fi
8576
8577      fi
8578
8579      cf_save_LIBS_1="$LIBS"
8580
8581cf_add_libs="$LIBICONV"
8582# Filter out duplicates - this happens with badly-designed ".pc" files...
8583for cf_add_1lib in $LIBS
8584do
8585	for cf_add_2lib in $cf_add_libs
8586	do
8587		if test "x$cf_add_1lib" = "x$cf_add_2lib"
8588		then
8589			cf_add_1lib=
8590			break
8591		fi
8592	done
8593	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8594done
8595LIBS="$cf_add_libs"
8596
8597# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8598# will be set on completion of the AC_TRY_LINK below.
8599cf_cv_header_path_intl=
8600cf_cv_library_path_intl=
8601
8602echo "${as_me:-configure}:8602: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
8603
8604cf_save_LIBS="$LIBS"
8605
8606cat >conftest.$ac_ext <<_ACEOF
8607#line 8607 "configure"
8608#include "confdefs.h"
8609
8610#include <libintl.h>
8611extern int _nl_msg_cat_cntr;
8612
8613int
8614main (void)
8615{
8616
8617	bindtextdomain ("", "");
8618	return (int) gettext ("")
8619
8620#ifndef IGNORE_MSGFMT_HACK
8621			 + _nl_msg_cat_cntr
8622#endif
8623
8624  ;
8625  return 0;
8626}
8627_ACEOF
8628rm -f conftest.$ac_objext conftest$ac_exeext
8629if { (eval echo "$as_me:8629: \"$ac_link\"") >&5
8630  (eval $ac_link) 2>&5
8631  ac_status=$?
8632  echo "$as_me:8632: \$? = $ac_status" >&5
8633  (exit $ac_status); } &&
8634         { ac_try='test -s conftest$ac_exeext'
8635  { (eval echo "$as_me:8635: \"$ac_try\"") >&5
8636  (eval $ac_try) 2>&5
8637  ac_status=$?
8638  echo "$as_me:8638: \$? = $ac_status" >&5
8639  (exit $ac_status); }; }; then
8640
8641	cf_cv_find_linkage_intl=yes
8642	cf_cv_header_path_intl=/usr/include
8643	cf_cv_library_path_intl=/usr/lib
8644
8645else
8646  echo "$as_me: failed program was:" >&5
8647cat conftest.$ac_ext >&5
8648
8649LIBS="-lintl  $cf_save_LIBS"
8650
8651cat >conftest.$ac_ext <<_ACEOF
8652#line 8652 "configure"
8653#include "confdefs.h"
8654
8655#include <libintl.h>
8656extern int _nl_msg_cat_cntr;
8657
8658int
8659main (void)
8660{
8661
8662	bindtextdomain ("", "");
8663	return (int) gettext ("")
8664
8665#ifndef IGNORE_MSGFMT_HACK
8666			 + _nl_msg_cat_cntr
8667#endif
8668
8669  ;
8670  return 0;
8671}
8672_ACEOF
8673rm -f conftest.$ac_objext conftest$ac_exeext
8674if { (eval echo "$as_me:8674: \"$ac_link\"") >&5
8675  (eval $ac_link) 2>&5
8676  ac_status=$?
8677  echo "$as_me:8677: \$? = $ac_status" >&5
8678  (exit $ac_status); } &&
8679         { ac_try='test -s conftest$ac_exeext'
8680  { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681  (eval $ac_try) 2>&5
8682  ac_status=$?
8683  echo "$as_me:8683: \$? = $ac_status" >&5
8684  (exit $ac_status); }; }; then
8685
8686	cf_cv_find_linkage_intl=yes
8687	cf_cv_header_path_intl=/usr/include
8688	cf_cv_library_path_intl=/usr/lib
8689	cf_cv_library_file_intl="-lintl"
8690
8691else
8692  echo "$as_me: failed program was:" >&5
8693cat conftest.$ac_ext >&5
8694
8695	cf_cv_find_linkage_intl=no
8696	LIBS="$cf_save_LIBS"
8697
8698	test -n "$verbose" && echo "	find linkage for intl library" 1>&6
8699
8700echo "${as_me:-configure}:8700: testing find linkage for intl library ..." 1>&5
8701
8702echo "${as_me:-configure}:8702: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
8703
8704	cf_save_CPPFLAGS="$CPPFLAGS"
8705	cf_test_CPPFLAGS="$CPPFLAGS"
8706
8707cf_search=
8708
8709# collect the current set of include-directories from compiler flags
8710cf_header_path_list=""
8711if test -n "${CFLAGS}${CPPFLAGS}" ; then
8712	for cf_header_path in $CPPFLAGS $CFLAGS
8713	do
8714		case $cf_header_path in
8715		(-I*)
8716			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8717
8718test "x$cf_header_path" != "xNONE" && \
8719test -d "$cf_header_path" && \
8720 {
8721	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
8722	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8723	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
8724	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
8725	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
8726	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
8727}
8728
8729			cf_header_path_list="$cf_header_path_list $cf_search"
8730			;;
8731		esac
8732	done
8733fi
8734
8735# add the variations for the package we are looking for
8736
8737cf_search=
8738
8739test "x$prefix" != "xNONE" && \
8740test -d "$prefix" && \
8741 {
8742	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
8743	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8744	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
8745	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
8746	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
8747	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
8748}
8749
8750for cf_subdir_prefix in \
8751	/usr \
8752	/usr/local \
8753	/usr/pkg \
8754	/opt \
8755	/opt/local \
8756	$HOME
8757do
8758
8759test "x$cf_subdir_prefix" != "x$prefix" && \
8760test -d "$cf_subdir_prefix" && \
8761(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8762	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
8763	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
8764	test -d $cf_subdir_prefix/include/intl &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
8765	test -d $cf_subdir_prefix/include/intl/include &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
8766	test -d $cf_subdir_prefix/intl/include &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
8767	test -d $cf_subdir_prefix/intl/include/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
8768}
8769
8770done
8771
8772test "$includedir" != NONE && \
8773test "$includedir" != "/usr/include" && \
8774test -d "$includedir" && {
8775	test -d $includedir &&    cf_search="$cf_search $includedir"
8776	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
8777}
8778
8779test "$oldincludedir" != NONE && \
8780test "$oldincludedir" != "/usr/include" && \
8781test -d "$oldincludedir" && {
8782	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8783	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
8784}
8785
8786cf_search="$cf_search $cf_header_path_list"
8787
8788	for cf_cv_header_path_intl in $cf_search
8789	do
8790		if test -d $cf_cv_header_path_intl ; then
8791			test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
8792
8793echo "${as_me:-configure}:8793: testing ... testing $cf_cv_header_path_intl ..." 1>&5
8794
8795			CPPFLAGS="$cf_save_CPPFLAGS"
8796
8797	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8798	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
8799
8800			cat >conftest.$ac_ext <<_ACEOF
8801#line 8801 "configure"
8802#include "confdefs.h"
8803
8804#include <libintl.h>
8805extern int _nl_msg_cat_cntr;
8806
8807int
8808main (void)
8809{
8810
8811	bindtextdomain ("", "");
8812	return (int) gettext ("")
8813
8814#ifndef IGNORE_MSGFMT_HACK
8815			 + _nl_msg_cat_cntr
8816#endif
8817
8818  ;
8819  return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
8823if { (eval echo "$as_me:8823: \"$ac_compile\"") >&5
8824  (eval $ac_compile) 2>&5
8825  ac_status=$?
8826  echo "$as_me:8826: \$? = $ac_status" >&5
8827  (exit $ac_status); } &&
8828         { ac_try='test -s conftest.$ac_objext'
8829  { (eval echo "$as_me:8829: \"$ac_try\"") >&5
8830  (eval $ac_try) 2>&5
8831  ac_status=$?
8832  echo "$as_me:8832: \$? = $ac_status" >&5
8833  (exit $ac_status); }; }; then
8834
8835				test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
8836
8837echo "${as_me:-configure}:8837: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
8838
8839				cf_cv_find_linkage_intl=maybe
8840				cf_test_CPPFLAGS="$CPPFLAGS"
8841				break
8842else
8843  echo "$as_me: failed program was:" >&5
8844cat conftest.$ac_ext >&5
8845
8846				CPPFLAGS="$cf_save_CPPFLAGS"
8847
8848fi
8849rm -f conftest.$ac_objext conftest.$ac_ext
8850		fi
8851	done
8852
8853	if test "$cf_cv_find_linkage_intl" = maybe ; then
8854
8855echo "${as_me:-configure}:8855: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
8856
8857		cf_save_LIBS="$LIBS"
8858		cf_save_LDFLAGS="$LDFLAGS"
8859
8860		if test "$cf_cv_find_linkage_intl" != yes ; then
8861
8862cf_search=
8863cf_library_path_list=""
8864if test -n "${LDFLAGS}${LIBS}" ; then
8865	for cf_library_path in $LDFLAGS $LIBS
8866	do
8867		case $cf_library_path in
8868		(-L*)
8869			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8870
8871test "x$cf_library_path" != "xNONE" && \
8872test -d "$cf_library_path" && \
8873 {
8874	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
8875	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8876	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
8877	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
8878	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
8879	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
8880}
8881
8882			cf_library_path_list="$cf_library_path_list $cf_search"
8883			;;
8884		esac
8885	done
8886fi
8887
8888cf_search=
8889
8890test "x$prefix" != "xNONE" && \
8891test -d "$prefix" && \
8892 {
8893	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
8894	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8895	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
8896	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
8897	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
8898	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
8899}
8900
8901for cf_subdir_prefix in \
8902	/usr \
8903	/usr/local \
8904	/usr/pkg \
8905	/opt \
8906	/opt/local \
8907	$HOME
8908do
8909
8910test "x$cf_subdir_prefix" != "x$prefix" && \
8911test -d "$cf_subdir_prefix" && \
8912(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8913	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
8914	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
8915	test -d $cf_subdir_prefix/lib/intl &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
8916	test -d $cf_subdir_prefix/lib/intl/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
8917	test -d $cf_subdir_prefix/intl/lib &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
8918	test -d $cf_subdir_prefix/intl/lib/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
8919}
8920
8921done
8922
8923cf_search="$cf_library_path_list $cf_search"
8924
8925			for cf_cv_library_path_intl in $cf_search
8926			do
8927				if test -d $cf_cv_library_path_intl ; then
8928					test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
8929
8930echo "${as_me:-configure}:8930: testing ... testing $cf_cv_library_path_intl ..." 1>&5
8931
8932					CPPFLAGS="$cf_test_CPPFLAGS"
8933					LIBS="-lintl  $cf_save_LIBS"
8934					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
8935					cat >conftest.$ac_ext <<_ACEOF
8936#line 8936 "configure"
8937#include "confdefs.h"
8938
8939#include <libintl.h>
8940extern int _nl_msg_cat_cntr;
8941
8942int
8943main (void)
8944{
8945
8946	bindtextdomain ("", "");
8947	return (int) gettext ("")
8948
8949#ifndef IGNORE_MSGFMT_HACK
8950			 + _nl_msg_cat_cntr
8951#endif
8952
8953  ;
8954  return 0;
8955}
8956_ACEOF
8957rm -f conftest.$ac_objext conftest$ac_exeext
8958if { (eval echo "$as_me:8958: \"$ac_link\"") >&5
8959  (eval $ac_link) 2>&5
8960  ac_status=$?
8961  echo "$as_me:8961: \$? = $ac_status" >&5
8962  (exit $ac_status); } &&
8963         { ac_try='test -s conftest$ac_exeext'
8964  { (eval echo "$as_me:8964: \"$ac_try\"") >&5
8965  (eval $ac_try) 2>&5
8966  ac_status=$?
8967  echo "$as_me:8967: \$? = $ac_status" >&5
8968  (exit $ac_status); }; }; then
8969
8970					test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
8971
8972echo "${as_me:-configure}:8972: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
8973
8974					cf_cv_find_linkage_intl=yes
8975					cf_cv_library_file_intl="-lintl"
8976					break
8977else
8978  echo "$as_me: failed program was:" >&5
8979cat conftest.$ac_ext >&5
8980
8981					CPPFLAGS="$cf_save_CPPFLAGS"
8982					LIBS="$cf_save_LIBS"
8983					LDFLAGS="$cf_save_LDFLAGS"
8984
8985fi
8986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8987				fi
8988			done
8989			CPPFLAGS="$cf_save_CPPFLAGS"
8990			LDFLAGS="$cf_save_LDFLAGS"
8991		fi
8992
8993	else
8994		cf_cv_find_linkage_intl=no
8995	fi
8996
8997fi
8998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8999
9000fi
9001rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9002
9003LIBS="$cf_save_LIBS"
9004
9005if test "$cf_cv_find_linkage_intl" = yes ; then
9006cf_cv_func_gettext=yes
9007else
9008cf_cv_func_gettext=no
9009fi
9010
9011      echo "$as_me:9011: checking for libintl.h and gettext()" >&5
9012echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
9013      echo "$as_me:9013: result: $cf_cv_func_gettext" >&5
9014echo "${ECHO_T}$cf_cv_func_gettext" >&6
9015
9016      LIBS="$cf_save_LIBS_1"
9017      CPPFLAGS="$cf_save_OPTS_1"
9018
9019      if test "$cf_cv_func_gettext" = yes ; then
9020
9021cat >>confdefs.h <<\EOF
9022#define HAVE_LIBINTL_H 1
9023EOF
9024
9025                                        if test "$PACKAGE" != gettext; then
9026
9027cat >>confdefs.h <<\EOF
9028#define HAVE_GETTEXT 1
9029EOF
9030
9031if test -n "$cf_cv_header_path_intl" ; then
9032  for cf_add_incdir in $cf_cv_header_path_intl
9033  do
9034	while test $cf_add_incdir != /usr/include
9035	do
9036	  if test -d $cf_add_incdir
9037	  then
9038		cf_have_incdir=no
9039		if test -n "$CFLAGS$CPPFLAGS" ; then
9040		  # a loop is needed to ensure we can add subdirs of existing dirs
9041		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9042			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9043			  cf_have_incdir=yes; break
9044			fi
9045		  done
9046		fi
9047
9048		if test "$cf_have_incdir" = no ; then
9049		  if test "$cf_add_incdir" = /usr/local/include ; then
9050			if test "$GCC" = yes
9051			then
9052			  cf_save_CPPFLAGS=$CPPFLAGS
9053
9054	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9055	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9056
9057			  cat >conftest.$ac_ext <<_ACEOF
9058#line 9058 "configure"
9059#include "confdefs.h"
9060#include <stdio.h>
9061int
9062main (void)
9063{
9064printf("Hello")
9065  ;
9066  return 0;
9067}
9068_ACEOF
9069rm -f conftest.$ac_objext
9070if { (eval echo "$as_me:9070: \"$ac_compile\"") >&5
9071  (eval $ac_compile) 2>&5
9072  ac_status=$?
9073  echo "$as_me:9073: \$? = $ac_status" >&5
9074  (exit $ac_status); } &&
9075         { ac_try='test -s conftest.$ac_objext'
9076  { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077  (eval $ac_try) 2>&5
9078  ac_status=$?
9079  echo "$as_me:9079: \$? = $ac_status" >&5
9080  (exit $ac_status); }; }; then
9081  :
9082else
9083  echo "$as_me: failed program was:" >&5
9084cat conftest.$ac_ext >&5
9085cf_have_incdir=yes
9086fi
9087rm -f conftest.$ac_objext conftest.$ac_ext
9088			  CPPFLAGS=$cf_save_CPPFLAGS
9089			fi
9090		  fi
9091		fi
9092
9093		if test "$cf_have_incdir" = no ; then
9094		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9095
9096echo "${as_me:-configure}:9096: testing adding $cf_add_incdir to include-path ..." 1>&5
9097
9098		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9099
9100		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9101		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9102		  cf_add_incdir="$cf_top_incdir"
9103		else
9104		  break
9105		fi
9106	  else
9107		break
9108	  fi
9109	done
9110  done
9111fi
9112
9113          if test -n "$cf_cv_library_file_intl" ; then
9114                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
9115
9116if test -n "$cf_cv_library_path_intl" ; then
9117	for cf_add_libdir in $cf_cv_library_path_intl
9118	do
9119		if test $cf_add_libdir = /usr/lib ; then
9120			:
9121		elif test -d $cf_add_libdir
9122		then
9123			cf_have_libdir=no
9124			if test -n "$LDFLAGS$LIBS" ; then
9125				# a loop is needed to ensure we can add subdirs of existing dirs
9126				for cf_test_libdir in $LDFLAGS $LIBS ; do
9127					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9128						cf_have_libdir=yes; break
9129					fi
9130				done
9131			fi
9132			if test "$cf_have_libdir" = no ; then
9133				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9134
9135echo "${as_me:-configure}:9135: testing adding $cf_add_libdir to library-path ..." 1>&5
9136
9137				INTLLIBS="-L$cf_add_libdir $INTLLIBS"
9138			fi
9139		fi
9140	done
9141fi
9142
9143          fi
9144
9145          gt_save_LIBS="$LIBS"
9146          LIBS="$LIBS $INTLLIBS"
9147
9148for ac_func in dcgettext
9149do
9150as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9151echo "$as_me:9151: checking for $ac_func" >&5
9152echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9153if eval "test \"\${$as_ac_var+set}\" = set"; then
9154  echo $ECHO_N "(cached) $ECHO_C" >&6
9155else
9156  cat >conftest.$ac_ext <<_ACEOF
9157#line 9157 "configure"
9158#include "confdefs.h"
9159/* System header to define __stub macros and hopefully few prototypes,
9160    which can conflict with char $ac_func (); below.  */
9161#include <assert.h>
9162/* Override any gcc2 internal prototype to avoid an error.  */
9163#ifdef __cplusplus
9164extern "C"
9165#endif
9166/* We use char because int might match the return type of a gcc2
9167   builtin and then its argument prototype would still apply.  */
9168char $ac_func ();
9169char (*f) ();
9170
9171int
9172main (void)
9173{
9174/* The GNU C library defines this for functions which it implements
9175    to always fail with ENOSYS.  Some functions are actually named
9176    something starting with __ and the normal name is an alias.  */
9177#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9178choke me
9179#else
9180f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9181#endif
9182
9183  ;
9184  return 0;
9185}
9186_ACEOF
9187rm -f conftest.$ac_objext conftest$ac_exeext
9188if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
9189  (eval $ac_link) 2>&5
9190  ac_status=$?
9191  echo "$as_me:9191: \$? = $ac_status" >&5
9192  (exit $ac_status); } &&
9193         { ac_try='test -s conftest$ac_exeext'
9194  { (eval echo "$as_me:9194: \"$ac_try\"") >&5
9195  (eval $ac_try) 2>&5
9196  ac_status=$?
9197  echo "$as_me:9197: \$? = $ac_status" >&5
9198  (exit $ac_status); }; }; then
9199  eval "$as_ac_var=yes"
9200else
9201  echo "$as_me: failed program was:" >&5
9202cat conftest.$ac_ext >&5
9203eval "$as_ac_var=no"
9204fi
9205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9206fi
9207echo "$as_me:9207: result: `eval echo '${'$as_ac_var'}'`" >&5
9208echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9209if test `eval echo '${'$as_ac_var'}'` = yes; then
9210  cat >>confdefs.h <<EOF
9211#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9212EOF
9213
9214fi
9215done
9216
9217          LIBS="$gt_save_LIBS"
9218
9219          CATOBJEXT=.gmo
9220        fi
9221      elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
9222        { echo "$as_me:9222: WARNING: disabling NLS feature" >&5
9223echo "$as_me: WARNING: disabling NLS feature" >&2;}
9224        sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
9225        mv confdefs.tmp confdefs.h
9226        ALL_LINGUAS=
9227        CATOBJEXT=.ignored
9228        MSGFMT=":"
9229        GMSGFMT=":"
9230        XGETTEXT=":"
9231        POSUB=
9232        BUILD_INCLUDED_LIBINTL=no
9233        USE_INCLUDED_LIBINTL=no
9234        USE_NLS=no
9235        nls_cv_use_gnu_gettext=no
9236      fi
9237
9238      if test "$CATOBJEXT" = "NONE"; then
9239                        nls_cv_use_gnu_gettext=maybe
9240      fi
9241    fi
9242
9243    if test "$nls_cv_use_gnu_gettext" != "no"; then
9244      CATOBJEXT=.gmo
9245      if test -f $srcdir/intl/libintl.h ; then
9246                INTLOBJS="\$(GETTOBJS)"
9247        BUILD_INCLUDED_LIBINTL=yes
9248        USE_INCLUDED_LIBINTL=yes
9249        INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
9250        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
9251      elif test "$nls_cv_use_gnu_gettext" = "yes"; then
9252        nls_cv_use_gnu_gettext=no
9253        { echo "$as_me:9253: WARNING: no NLS library is packaged with this application" >&5
9254echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
9255      fi
9256    fi
9257
9258        if test "$GMSGFMT" != ":"; then
9259      if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
9260        : ;
9261      else
9262        { echo "$as_me:9262: WARNING: found msgfmt program is not GNU msgfmt" >&5
9263echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
9264      fi
9265    fi
9266
9267        if test "$XGETTEXT" != ":"; then
9268      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
9269        : ;
9270      else
9271        { echo "$as_me:9271: WARNING: found xgettext program is not GNU xgettext" >&5
9272echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
9273      fi
9274    fi
9275  fi
9276
9277  if test "$XGETTEXT" != ":"; then
9278    ac_config_commands="$ac_config_commands default-1"
9279
9280            if test "$PACKAGE" = gettext; then
9281      BUILD_INCLUDED_LIBINTL=yes
9282    fi
9283
9284                                            if test "$nls_cv_use_gnu_gettext" = "yes"; then
9285      for ac_prog in bison
9286do
9287  # Extract the first word of "$ac_prog", so it can be a program name with args.
9288set dummy $ac_prog; ac_word=$2
9289echo "$as_me:9289: checking for $ac_word" >&5
9290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9291if test "${ac_cv_prog_INTLBISON+set}" = set; then
9292  echo $ECHO_N "(cached) $ECHO_C" >&6
9293else
9294  if test -n "$INTLBISON"; then
9295  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
9296else
9297  ac_save_IFS=$IFS; IFS=$ac_path_separator
9298ac_dummy="$PATH"
9299for ac_dir in $ac_dummy; do
9300  IFS=$ac_save_IFS
9301  test -z "$ac_dir" && ac_dir=.
9302  $as_executable_p "$ac_dir/$ac_word" || continue
9303ac_cv_prog_INTLBISON="$ac_prog"
9304echo "$as_me:9304: found $ac_dir/$ac_word" >&5
9305break
9306done
9307
9308fi
9309fi
9310INTLBISON=$ac_cv_prog_INTLBISON
9311if test -n "$INTLBISON"; then
9312  echo "$as_me:9312: result: $INTLBISON" >&5
9313echo "${ECHO_T}$INTLBISON" >&6
9314else
9315  echo "$as_me:9315: result: no" >&5
9316echo "${ECHO_T}no" >&6
9317fi
9318
9319  test -n "$INTLBISON" && break
9320done
9321
9322      if test -z "$INTLBISON"; then
9323        ac_verc_fail=yes
9324      else
9325                echo "$as_me:9325: checking version of bison" >&5
9326echo $ECHO_N "checking version of bison... $ECHO_C" >&6
9327        ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
9328        case $ac_prog_version in
9329          ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
9330          (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
9331             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
9332          (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
9333        esac
9334      echo "$as_me:9334: result: $ac_prog_version" >&5
9335echo "${ECHO_T}$ac_prog_version" >&6
9336      fi
9337      if test $ac_verc_fail = yes; then
9338        INTLBISON=:
9339      fi
9340    fi
9341
9342                for lang in $ALL_LINGUAS; do
9343      GMOFILES="$GMOFILES $lang.gmo"
9344      POFILES="$POFILES $lang.po"
9345    done
9346  fi
9347
9348    nls_cv_header_intl=
9349  nls_cv_header_libgt=
9350
9351    DATADIRNAME=share
9352
9353    INSTOBJEXT=.mo
9354
9355    GENCAT=gencat
9356
9357   if test "x$CATOBJEXT" != "x"; then
9358     if test "x$ALL_LINGUAS" = "x"; then
9359       LINGUAS=
9360     else
9361       echo "$as_me:9361: checking for catalogs to be installed" >&5
9362echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9363       NEW_LINGUAS=
9364       for presentlang in $ALL_LINGUAS; do
9365         useit=no
9366         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
9367           # Use the presentlang catalog if desiredlang is
9368           #   a. equal to presentlang, or
9369           #   b. a variant of presentlang (because in this case,
9370           #      presentlang can be used as a fallback for messages
9371           #      which are not translated in the desiredlang catalog).
9372           case "$desiredlang" in
9373             ("$presentlang"*) useit=yes;;
9374           esac
9375         done
9376         if test $useit = yes; then
9377           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
9378         fi
9379       done
9380       LINGUAS=$NEW_LINGUAS
9381       echo "$as_me:9381: result: $LINGUAS" >&5
9382echo "${ECHO_T}$LINGUAS" >&6
9383     fi
9384
9385          if test -n "$LINGUAS"; then
9386       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9387     fi
9388   fi
9389
9390      INTL_LIBTOOL_SUFFIX_PREFIX=
9391
9392if test "$USE_NLS" = yes ; then
9393
9394# Check whether --with-textdomain or --without-textdomain was given.
9395if test "${with_textdomain+set}" = set; then
9396  withval="$with_textdomain"
9397  NLS_TEXTDOMAIN=$withval
9398else
9399  NLS_TEXTDOMAIN=$PACKAGE
9400fi;
9401
9402cat >>confdefs.h <<EOF
9403#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
9404EOF
9405
9406fi
9407
9408INTLDIR_MAKE=
9409MSG_DIR_MAKE=
9410SUB_MAKEFILE=
9411
9412cf_makefile=makefile
9413
9414use_our_messages=no
9415if test "$USE_NLS" = yes ; then
9416if test -d $srcdir/po ; then
9417echo "$as_me:9417: checking if we should use included message-library" >&5
9418echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
9419
9420# Check whether --enable-included-msgs or --disable-included-msgs was given.
9421if test "${enable_included_msgs+set}" = set; then
9422  enableval="$enable_included_msgs"
9423  use_our_messages=$enableval
9424else
9425  use_our_messages=yes
9426fi;
9427fi
9428echo "$as_me:9428: result: $use_our_messages" >&5
9429echo "${ECHO_T}$use_our_messages" >&6
9430fi
9431
9432MSG_DIR_MAKE="#"
9433if test "$use_our_messages" = yes
9434then
9435	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
9436	MSG_DIR_MAKE=
9437fi
9438
9439if test "$USE_INCLUDED_LIBINTL" = yes ; then
9440	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
9441		:
9442	elif test "$nls_cv_use_gnu_gettext" = yes ; then
9443		:
9444	else
9445		INTLDIR_MAKE="#"
9446	fi
9447	if test -z "$INTLDIR_MAKE"; then
9448
9449cat >>confdefs.h <<\EOF
9450#define HAVE_LIBGETTEXT_H 1
9451EOF
9452
9453		for cf_makefile in \
9454			$srcdir/intl/Makefile.in \
9455			$srcdir/intl/makefile.in
9456		do
9457			if test -f "$cf_makefile" ; then
9458				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
9459				break
9460			fi
9461		done
9462	fi
9463else
9464	INTLDIR_MAKE="#"
9465	if test "$USE_NLS" = yes ; then
9466
9467for ac_header in libintl.h
9468do
9469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9470echo "$as_me:9470: checking for $ac_header" >&5
9471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9472if eval "test \"\${$as_ac_Header+set}\" = set"; then
9473  echo $ECHO_N "(cached) $ECHO_C" >&6
9474else
9475  cat >conftest.$ac_ext <<_ACEOF
9476#line 9476 "configure"
9477#include "confdefs.h"
9478#include <$ac_header>
9479_ACEOF
9480if { (eval echo "$as_me:9480: \"$ac_cpp conftest.$ac_ext\"") >&5
9481  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9482  ac_status=$?
9483  egrep -v '^ *\+' conftest.er1 >conftest.err
9484  rm -f conftest.er1
9485  cat conftest.err >&5
9486  echo "$as_me:9486: \$? = $ac_status" >&5
9487  (exit $ac_status); } >/dev/null; then
9488  if test -s conftest.err; then
9489    ac_cpp_err=$ac_c_preproc_warn_flag
9490  else
9491    ac_cpp_err=
9492  fi
9493else
9494  ac_cpp_err=yes
9495fi
9496if test -z "$ac_cpp_err"; then
9497  eval "$as_ac_Header=yes"
9498else
9499  echo "$as_me: failed program was:" >&5
9500  cat conftest.$ac_ext >&5
9501  eval "$as_ac_Header=no"
9502fi
9503rm -f conftest.err conftest.$ac_ext
9504fi
9505echo "$as_me:9505: result: `eval echo '${'$as_ac_Header'}'`" >&5
9506echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9507if test `eval echo '${'$as_ac_Header'}'` = yes; then
9508  cat >>confdefs.h <<EOF
9509#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9510EOF
9511
9512fi
9513done
9514
9515	fi
9516fi
9517
9518if test -z "$INTLDIR_MAKE" ; then
9519
9520	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9521	CPPFLAGS="${CPPFLAGS}-I../intl"
9522
9523fi
9524
9525if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
9526	GT_YES="#"
9527	GT_NO=
9528else
9529	GT_YES=
9530	GT_NO="#"
9531fi
9532
9533if test "$USE_INCLUDED_LIBINTL" = yes ; then
9534	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
9535
9536cat >>confdefs.h <<\EOF
9537#define HAVE_GETTEXT 1
9538EOF
9539
9540	elif test "$nls_cv_use_gnu_gettext" = yes ; then
9541
9542cat >>confdefs.h <<\EOF
9543#define HAVE_GETTEXT 1
9544EOF
9545
9546	fi
9547	if test -n "$nls_cv_header_intl" ; then
9548
9549cat >>confdefs.h <<\EOF
9550#define HAVE_LIBINTL_H 1
9551EOF
9552
9553	fi
9554fi
9555
9556echo "$as_me:9556: checking if -lm needed for math functions" >&5
9557echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
9558if test "${cf_cv_need_libm+set}" = set; then
9559  echo $ECHO_N "(cached) $ECHO_C" >&6
9560else
9561
9562	cat >conftest.$ac_ext <<_ACEOF
9563#line 9563 "configure"
9564#include "confdefs.h"
9565
9566	#include <stdio.h>
9567	#include <stdlib.h>
9568	#include <math.h>
9569
9570int
9571main (void)
9572{
9573double x = rand(); printf("result = %g\n", sqrt(x))
9574  ;
9575  return 0;
9576}
9577_ACEOF
9578rm -f conftest.$ac_objext conftest$ac_exeext
9579if { (eval echo "$as_me:9579: \"$ac_link\"") >&5
9580  (eval $ac_link) 2>&5
9581  ac_status=$?
9582  echo "$as_me:9582: \$? = $ac_status" >&5
9583  (exit $ac_status); } &&
9584         { ac_try='test -s conftest$ac_exeext'
9585  { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586  (eval $ac_try) 2>&5
9587  ac_status=$?
9588  echo "$as_me:9588: \$? = $ac_status" >&5
9589  (exit $ac_status); }; }; then
9590  cf_cv_need_libm=no
9591else
9592  echo "$as_me: failed program was:" >&5
9593cat conftest.$ac_ext >&5
9594cf_cv_need_libm=yes
9595fi
9596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9597fi
9598echo "$as_me:9598: result: $cf_cv_need_libm" >&5
9599echo "${ECHO_T}$cf_cv_need_libm" >&6
9600if test "$cf_cv_need_libm" = yes
9601then
9602
9603cf_add_libs="-lm"
9604# Filter out duplicates - this happens with badly-designed ".pc" files...
9605for cf_add_1lib in $LIBS
9606do
9607	for cf_add_2lib in $cf_add_libs
9608	do
9609		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9610		then
9611			cf_add_1lib=
9612			break
9613		fi
9614	done
9615	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9616done
9617LIBS="$cf_add_libs"
9618
9619fi
9620
9621echo "$as_me:9621: checking if you want to use dmalloc for testing" >&5
9622echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9623
9624# Check whether --with-dmalloc or --without-dmalloc was given.
9625if test "${with_dmalloc+set}" = set; then
9626  withval="$with_dmalloc"
9627
9628cat >>confdefs.h <<EOF
9629#define USE_DMALLOC 1
9630EOF
9631
9632	: ${with_cflags:=-g}
9633	: ${with_no_leaks:=yes}
9634	 with_dmalloc=yes
9635else
9636  with_dmalloc=
9637fi;
9638echo "$as_me:9638: result: ${with_dmalloc:-no}" >&5
9639echo "${ECHO_T}${with_dmalloc:-no}" >&6
9640
9641case .$with_cflags in
9642(.*-g*)
9643	case .$CFLAGS in
9644	(.*-g*)
9645		;;
9646	(*)
9647
9648cf_fix_cppflags=no
9649cf_new_cflags=
9650cf_new_cppflags=
9651cf_new_extra_cppflags=
9652
9653for cf_add_cflags in -g
9654do
9655case $cf_fix_cppflags in
9656(no)
9657	case $cf_add_cflags in
9658	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9659		case $cf_add_cflags in
9660		(-D*)
9661			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9662
9663			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9664				&& test -z "${cf_tst_cflags}" \
9665				&& cf_fix_cppflags=yes
9666
9667			if test $cf_fix_cppflags = yes ; then
9668
9669	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9670	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9671
9672				continue
9673			elif test "${cf_tst_cflags}" = "\"'" ; then
9674
9675	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9676	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9677
9678				continue
9679			fi
9680			;;
9681		esac
9682		case "$CPPFLAGS" in
9683		(*$cf_add_cflags)
9684			;;
9685		(*)
9686			case $cf_add_cflags in
9687			(-D*)
9688				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9689
9690CPPFLAGS=`echo "$CPPFLAGS" | \
9691	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9692		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9693
9694				;;
9695			esac
9696
9697	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9698	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9699
9700			;;
9701		esac
9702		;;
9703	(*)
9704
9705	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9706	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9707
9708		;;
9709	esac
9710	;;
9711(yes)
9712
9713	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9714	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9715
9716	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9717
9718	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9719		&& test -z "${cf_tst_cflags}" \
9720		&& cf_fix_cppflags=no
9721	;;
9722esac
9723done
9724
9725if test -n "$cf_new_cflags" ; then
9726
9727	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9728	CFLAGS="${CFLAGS}$cf_new_cflags"
9729
9730fi
9731
9732if test -n "$cf_new_cppflags" ; then
9733
9734	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9735	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9736
9737fi
9738
9739if test -n "$cf_new_extra_cppflags" ; then
9740
9741	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9742	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9743
9744fi
9745
9746		;;
9747	esac
9748	;;
9749esac
9750
9751if test "$with_dmalloc" = yes ; then
9752	echo "$as_me:9752: checking for dmalloc.h" >&5
9753echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9754if test "${ac_cv_header_dmalloc_h+set}" = set; then
9755  echo $ECHO_N "(cached) $ECHO_C" >&6
9756else
9757  cat >conftest.$ac_ext <<_ACEOF
9758#line 9758 "configure"
9759#include "confdefs.h"
9760#include <dmalloc.h>
9761_ACEOF
9762if { (eval echo "$as_me:9762: \"$ac_cpp conftest.$ac_ext\"") >&5
9763  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9764  ac_status=$?
9765  egrep -v '^ *\+' conftest.er1 >conftest.err
9766  rm -f conftest.er1
9767  cat conftest.err >&5
9768  echo "$as_me:9768: \$? = $ac_status" >&5
9769  (exit $ac_status); } >/dev/null; then
9770  if test -s conftest.err; then
9771    ac_cpp_err=$ac_c_preproc_warn_flag
9772  else
9773    ac_cpp_err=
9774  fi
9775else
9776  ac_cpp_err=yes
9777fi
9778if test -z "$ac_cpp_err"; then
9779  ac_cv_header_dmalloc_h=yes
9780else
9781  echo "$as_me: failed program was:" >&5
9782  cat conftest.$ac_ext >&5
9783  ac_cv_header_dmalloc_h=no
9784fi
9785rm -f conftest.err conftest.$ac_ext
9786fi
9787echo "$as_me:9787: result: $ac_cv_header_dmalloc_h" >&5
9788echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9789if test $ac_cv_header_dmalloc_h = yes; then
9790
9791echo "$as_me:9791: checking for dmalloc_debug in -ldmalloc" >&5
9792echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9793if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9794  echo $ECHO_N "(cached) $ECHO_C" >&6
9795else
9796  ac_check_lib_save_LIBS=$LIBS
9797LIBS="-ldmalloc  $LIBS"
9798cat >conftest.$ac_ext <<_ACEOF
9799#line 9799 "configure"
9800#include "confdefs.h"
9801
9802/* Override any gcc2 internal prototype to avoid an error.  */
9803#ifdef __cplusplus
9804extern "C"
9805#endif
9806/* We use char because int might match the return type of a gcc2
9807   builtin and then its argument prototype would still apply.  */
9808char dmalloc_debug ();
9809int
9810main (void)
9811{
9812dmalloc_debug ();
9813  ;
9814  return 0;
9815}
9816_ACEOF
9817rm -f conftest.$ac_objext conftest$ac_exeext
9818if { (eval echo "$as_me:9818: \"$ac_link\"") >&5
9819  (eval $ac_link) 2>&5
9820  ac_status=$?
9821  echo "$as_me:9821: \$? = $ac_status" >&5
9822  (exit $ac_status); } &&
9823         { ac_try='test -s conftest$ac_exeext'
9824  { (eval echo "$as_me:9824: \"$ac_try\"") >&5
9825  (eval $ac_try) 2>&5
9826  ac_status=$?
9827  echo "$as_me:9827: \$? = $ac_status" >&5
9828  (exit $ac_status); }; }; then
9829  ac_cv_lib_dmalloc_dmalloc_debug=yes
9830else
9831  echo "$as_me: failed program was:" >&5
9832cat conftest.$ac_ext >&5
9833ac_cv_lib_dmalloc_dmalloc_debug=no
9834fi
9835rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9836LIBS=$ac_check_lib_save_LIBS
9837fi
9838echo "$as_me:9838: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9839echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9840if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9841  cat >>confdefs.h <<EOF
9842#define HAVE_LIBDMALLOC 1
9843EOF
9844
9845  LIBS="-ldmalloc $LIBS"
9846
9847fi
9848
9849fi
9850
9851fi
9852
9853echo "$as_me:9853: checking if you want to use dbmalloc for testing" >&5
9854echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9855
9856# Check whether --with-dbmalloc or --without-dbmalloc was given.
9857if test "${with_dbmalloc+set}" = set; then
9858  withval="$with_dbmalloc"
9859
9860cat >>confdefs.h <<EOF
9861#define USE_DBMALLOC 1
9862EOF
9863
9864	: ${with_cflags:=-g}
9865	: ${with_no_leaks:=yes}
9866	 with_dbmalloc=yes
9867else
9868  with_dbmalloc=
9869fi;
9870echo "$as_me:9870: result: ${with_dbmalloc:-no}" >&5
9871echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9872
9873case .$with_cflags in
9874(.*-g*)
9875	case .$CFLAGS in
9876	(.*-g*)
9877		;;
9878	(*)
9879
9880cf_fix_cppflags=no
9881cf_new_cflags=
9882cf_new_cppflags=
9883cf_new_extra_cppflags=
9884
9885for cf_add_cflags in -g
9886do
9887case $cf_fix_cppflags in
9888(no)
9889	case $cf_add_cflags in
9890	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9891		case $cf_add_cflags in
9892		(-D*)
9893			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9894
9895			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9896				&& test -z "${cf_tst_cflags}" \
9897				&& cf_fix_cppflags=yes
9898
9899			if test $cf_fix_cppflags = yes ; then
9900
9901	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9902	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9903
9904				continue
9905			elif test "${cf_tst_cflags}" = "\"'" ; then
9906
9907	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9908	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9909
9910				continue
9911			fi
9912			;;
9913		esac
9914		case "$CPPFLAGS" in
9915		(*$cf_add_cflags)
9916			;;
9917		(*)
9918			case $cf_add_cflags in
9919			(-D*)
9920				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9921
9922CPPFLAGS=`echo "$CPPFLAGS" | \
9923	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9924		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9925
9926				;;
9927			esac
9928
9929	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9930	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9931
9932			;;
9933		esac
9934		;;
9935	(*)
9936
9937	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9938	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9939
9940		;;
9941	esac
9942	;;
9943(yes)
9944
9945	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9946	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9947
9948	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9949
9950	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9951		&& test -z "${cf_tst_cflags}" \
9952		&& cf_fix_cppflags=no
9953	;;
9954esac
9955done
9956
9957if test -n "$cf_new_cflags" ; then
9958
9959	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9960	CFLAGS="${CFLAGS}$cf_new_cflags"
9961
9962fi
9963
9964if test -n "$cf_new_cppflags" ; then
9965
9966	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9967	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9968
9969fi
9970
9971if test -n "$cf_new_extra_cppflags" ; then
9972
9973	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9974	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9975
9976fi
9977
9978		;;
9979	esac
9980	;;
9981esac
9982
9983if test "$with_dbmalloc" = yes ; then
9984	echo "$as_me:9984: checking for dbmalloc.h" >&5
9985echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9986if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9987  echo $ECHO_N "(cached) $ECHO_C" >&6
9988else
9989  cat >conftest.$ac_ext <<_ACEOF
9990#line 9990 "configure"
9991#include "confdefs.h"
9992#include <dbmalloc.h>
9993_ACEOF
9994if { (eval echo "$as_me:9994: \"$ac_cpp conftest.$ac_ext\"") >&5
9995  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9996  ac_status=$?
9997  egrep -v '^ *\+' conftest.er1 >conftest.err
9998  rm -f conftest.er1
9999  cat conftest.err >&5
10000  echo "$as_me:10000: \$? = $ac_status" >&5
10001  (exit $ac_status); } >/dev/null; then
10002  if test -s conftest.err; then
10003    ac_cpp_err=$ac_c_preproc_warn_flag
10004  else
10005    ac_cpp_err=
10006  fi
10007else
10008  ac_cpp_err=yes
10009fi
10010if test -z "$ac_cpp_err"; then
10011  ac_cv_header_dbmalloc_h=yes
10012else
10013  echo "$as_me: failed program was:" >&5
10014  cat conftest.$ac_ext >&5
10015  ac_cv_header_dbmalloc_h=no
10016fi
10017rm -f conftest.err conftest.$ac_ext
10018fi
10019echo "$as_me:10019: result: $ac_cv_header_dbmalloc_h" >&5
10020echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10021if test $ac_cv_header_dbmalloc_h = yes; then
10022
10023echo "$as_me:10023: checking for debug_malloc in -ldbmalloc" >&5
10024echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10025if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10026  echo $ECHO_N "(cached) $ECHO_C" >&6
10027else
10028  ac_check_lib_save_LIBS=$LIBS
10029LIBS="-ldbmalloc  $LIBS"
10030cat >conftest.$ac_ext <<_ACEOF
10031#line 10031 "configure"
10032#include "confdefs.h"
10033
10034/* Override any gcc2 internal prototype to avoid an error.  */
10035#ifdef __cplusplus
10036extern "C"
10037#endif
10038/* We use char because int might match the return type of a gcc2
10039   builtin and then its argument prototype would still apply.  */
10040char debug_malloc ();
10041int
10042main (void)
10043{
10044debug_malloc ();
10045  ;
10046  return 0;
10047}
10048_ACEOF
10049rm -f conftest.$ac_objext conftest$ac_exeext
10050if { (eval echo "$as_me:10050: \"$ac_link\"") >&5
10051  (eval $ac_link) 2>&5
10052  ac_status=$?
10053  echo "$as_me:10053: \$? = $ac_status" >&5
10054  (exit $ac_status); } &&
10055         { ac_try='test -s conftest$ac_exeext'
10056  { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057  (eval $ac_try) 2>&5
10058  ac_status=$?
10059  echo "$as_me:10059: \$? = $ac_status" >&5
10060  (exit $ac_status); }; }; then
10061  ac_cv_lib_dbmalloc_debug_malloc=yes
10062else
10063  echo "$as_me: failed program was:" >&5
10064cat conftest.$ac_ext >&5
10065ac_cv_lib_dbmalloc_debug_malloc=no
10066fi
10067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10068LIBS=$ac_check_lib_save_LIBS
10069fi
10070echo "$as_me:10070: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10071echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10072if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10073  cat >>confdefs.h <<EOF
10074#define HAVE_LIBDBMALLOC 1
10075EOF
10076
10077  LIBS="-ldbmalloc $LIBS"
10078
10079fi
10080
10081fi
10082
10083fi
10084
10085echo "$as_me:10085: checking if you want to use purify for testing" >&5
10086echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
10087
10088# Check whether --with-purify or --without-purify was given.
10089if test "${with_purify+set}" = set; then
10090  withval="$with_purify"
10091
10092cat >>confdefs.h <<EOF
10093#define USE_PURIFY 1
10094EOF
10095
10096	: ${with_cflags:=-g}
10097	: ${with_no_leaks:=yes}
10098	 with_purify=yes
10099else
10100  with_purify=
10101fi;
10102echo "$as_me:10102: result: ${with_purify:-no}" >&5
10103echo "${ECHO_T}${with_purify:-no}" >&6
10104
10105case .$with_cflags in
10106(.*-g*)
10107	case .$CFLAGS in
10108	(.*-g*)
10109		;;
10110	(*)
10111
10112cf_fix_cppflags=no
10113cf_new_cflags=
10114cf_new_cppflags=
10115cf_new_extra_cppflags=
10116
10117for cf_add_cflags in -g
10118do
10119case $cf_fix_cppflags in
10120(no)
10121	case $cf_add_cflags in
10122	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10123		case $cf_add_cflags in
10124		(-D*)
10125			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10126
10127			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10128				&& test -z "${cf_tst_cflags}" \
10129				&& cf_fix_cppflags=yes
10130
10131			if test $cf_fix_cppflags = yes ; then
10132
10133	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10134	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10135
10136				continue
10137			elif test "${cf_tst_cflags}" = "\"'" ; then
10138
10139	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10140	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10141
10142				continue
10143			fi
10144			;;
10145		esac
10146		case "$CPPFLAGS" in
10147		(*$cf_add_cflags)
10148			;;
10149		(*)
10150			case $cf_add_cflags in
10151			(-D*)
10152				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10153
10154CPPFLAGS=`echo "$CPPFLAGS" | \
10155	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10156		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10157
10158				;;
10159			esac
10160
10161	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10162	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10163
10164			;;
10165		esac
10166		;;
10167	(*)
10168
10169	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10170	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10171
10172		;;
10173	esac
10174	;;
10175(yes)
10176
10177	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10178	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10179
10180	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10181
10182	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10183		&& test -z "${cf_tst_cflags}" \
10184		&& cf_fix_cppflags=no
10185	;;
10186esac
10187done
10188
10189if test -n "$cf_new_cflags" ; then
10190
10191	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10192	CFLAGS="${CFLAGS}$cf_new_cflags"
10193
10194fi
10195
10196if test -n "$cf_new_cppflags" ; then
10197
10198	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10199	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10200
10201fi
10202
10203if test -n "$cf_new_extra_cppflags" ; then
10204
10205	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10206	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10207
10208fi
10209
10210		;;
10211	esac
10212	;;
10213esac
10214
10215echo "$as_me:10215: checking if you want to use valgrind for testing" >&5
10216echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10217
10218# Check whether --with-valgrind or --without-valgrind was given.
10219if test "${with_valgrind+set}" = set; then
10220  withval="$with_valgrind"
10221
10222cat >>confdefs.h <<EOF
10223#define USE_VALGRIND 1
10224EOF
10225
10226	: ${with_cflags:=-g}
10227	: ${with_no_leaks:=yes}
10228	 with_valgrind=yes
10229else
10230  with_valgrind=
10231fi;
10232echo "$as_me:10232: result: ${with_valgrind:-no}" >&5
10233echo "${ECHO_T}${with_valgrind:-no}" >&6
10234
10235case .$with_cflags in
10236(.*-g*)
10237	case .$CFLAGS in
10238	(.*-g*)
10239		;;
10240	(*)
10241
10242cf_fix_cppflags=no
10243cf_new_cflags=
10244cf_new_cppflags=
10245cf_new_extra_cppflags=
10246
10247for cf_add_cflags in -g
10248do
10249case $cf_fix_cppflags in
10250(no)
10251	case $cf_add_cflags in
10252	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10253		case $cf_add_cflags in
10254		(-D*)
10255			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10256
10257			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10258				&& test -z "${cf_tst_cflags}" \
10259				&& cf_fix_cppflags=yes
10260
10261			if test $cf_fix_cppflags = yes ; then
10262
10263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10265
10266				continue
10267			elif test "${cf_tst_cflags}" = "\"'" ; then
10268
10269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10271
10272				continue
10273			fi
10274			;;
10275		esac
10276		case "$CPPFLAGS" in
10277		(*$cf_add_cflags)
10278			;;
10279		(*)
10280			case $cf_add_cflags in
10281			(-D*)
10282				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10283
10284CPPFLAGS=`echo "$CPPFLAGS" | \
10285	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10286		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10287
10288				;;
10289			esac
10290
10291	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10292	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10293
10294			;;
10295		esac
10296		;;
10297	(*)
10298
10299	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10300	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10301
10302		;;
10303	esac
10304	;;
10305(yes)
10306
10307	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10308	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10309
10310	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10311
10312	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10313		&& test -z "${cf_tst_cflags}" \
10314		&& cf_fix_cppflags=no
10315	;;
10316esac
10317done
10318
10319if test -n "$cf_new_cflags" ; then
10320
10321	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10322	CFLAGS="${CFLAGS}$cf_new_cflags"
10323
10324fi
10325
10326if test -n "$cf_new_cppflags" ; then
10327
10328	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10329	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10330
10331fi
10332
10333if test -n "$cf_new_extra_cppflags" ; then
10334
10335	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10336	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10337
10338fi
10339
10340		;;
10341	esac
10342	;;
10343esac
10344
10345echo "$as_me:10345: checking if you want to perform memory-leak testing" >&5
10346echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10347
10348# Check whether --with-no-leaks or --without-no-leaks was given.
10349if test "${with_no_leaks+set}" = set; then
10350  withval="$with_no_leaks"
10351
10352cat >>confdefs.h <<\EOF
10353#define NO_LEAKS 1
10354EOF
10355
10356	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
10357	 case ${cf_doalloc} in
10358	 (*yes*) ;;
10359	 (*)
10360cat >>confdefs.h <<\EOF
10361#define DOALLOC 10000
10362EOF
10363 ;;
10364	 esac
10365	 with_no_leaks=yes
10366else
10367  with_no_leaks=
10368fi;
10369echo "$as_me:10369: result: $with_no_leaks" >&5
10370echo "${ECHO_T}$with_no_leaks" >&6
10371
10372echo "$as_me:10372: checking if you want --trace option" >&5
10373echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
10374
10375# Check whether --enable-trace or --disable-trace was given.
10376if test "${enable_trace+set}" = set; then
10377  enableval="$enable_trace"
10378
10379else
10380  enableval=yes
10381fi;
10382echo "$as_me:10382: result: $enableval" >&5
10383echo "${ECHO_T}$enableval" >&6
10384if test "$enableval" != no ; then
10385EXTRAOBJS="$EXTRAOBJS trace\$o"
10386
10387cat >>confdefs.h <<\EOF
10388#define HAVE_DLG_TRACE 1
10389EOF
10390
10391else
10392	:
10393fi
10394
10395LD_RPATH_OPT=
10396echo "$as_me:10396: checking for an rpath option" >&5
10397echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10398case $cf_cv_system_name in
10399(irix*)
10400	if test "$GCC" = yes; then
10401		LD_RPATH_OPT="-Wl,-rpath,"
10402	else
10403		LD_RPATH_OPT="-rpath "
10404	fi
10405	;;
10406(linux*|gnu*|k*bsd*-gnu|freebsd*)
10407	LD_RPATH_OPT="-Wl,-rpath,"
10408	;;
10409(openbsd[2-9].*|mirbsd*)
10410	LD_RPATH_OPT="-Wl,-rpath,"
10411	;;
10412(dragonfly*)
10413	LD_RPATH_OPT="-rpath "
10414	;;
10415(netbsd*)
10416	LD_RPATH_OPT="-Wl,-rpath,"
10417	;;
10418(osf*|mls+*)
10419	LD_RPATH_OPT="-rpath "
10420	;;
10421(solaris2*)
10422	LD_RPATH_OPT="-R"
10423	;;
10424(*)
10425	;;
10426esac
10427echo "$as_me:10427: result: $LD_RPATH_OPT" >&5
10428echo "${ECHO_T}$LD_RPATH_OPT" >&6
10429
10430case "x$LD_RPATH_OPT" in
10431(x-R*)
10432	echo "$as_me:10432: checking if we need a space after rpath option" >&5
10433echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10434	cf_save_LIBS="$LIBS"
10435
10436cf_add_libs="${LD_RPATH_OPT}$libdir"
10437# Filter out duplicates - this happens with badly-designed ".pc" files...
10438for cf_add_1lib in $LIBS
10439do
10440	for cf_add_2lib in $cf_add_libs
10441	do
10442		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10443		then
10444			cf_add_1lib=
10445			break
10446		fi
10447	done
10448	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10449done
10450LIBS="$cf_add_libs"
10451
10452	cat >conftest.$ac_ext <<_ACEOF
10453#line 10453 "configure"
10454#include "confdefs.h"
10455
10456int
10457main (void)
10458{
10459
10460  ;
10461  return 0;
10462}
10463_ACEOF
10464rm -f conftest.$ac_objext conftest$ac_exeext
10465if { (eval echo "$as_me:10465: \"$ac_link\"") >&5
10466  (eval $ac_link) 2>&5
10467  ac_status=$?
10468  echo "$as_me:10468: \$? = $ac_status" >&5
10469  (exit $ac_status); } &&
10470         { ac_try='test -s conftest$ac_exeext'
10471  { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472  (eval $ac_try) 2>&5
10473  ac_status=$?
10474  echo "$as_me:10474: \$? = $ac_status" >&5
10475  (exit $ac_status); }; }; then
10476  cf_rpath_space=no
10477else
10478  echo "$as_me: failed program was:" >&5
10479cat conftest.$ac_ext >&5
10480cf_rpath_space=yes
10481fi
10482rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10483	LIBS="$cf_save_LIBS"
10484	echo "$as_me:10484: result: $cf_rpath_space" >&5
10485echo "${ECHO_T}$cf_rpath_space" >&6
10486	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10487	;;
10488esac
10489
10490REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
10491ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
10492cf_cv_rel_version=$REL_VERSION
10493
10494test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
10495
10496# Check whether --with-rel-version or --without-rel-version was given.
10497if test "${with_rel_version+set}" = set; then
10498  withval="$with_rel_version"
10499  { echo "$as_me:10499: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
10500echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
10501 cf_cv_rel_version=$withval
10502fi;
10503
10504 DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
10505 DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
10506
10507if test -n "$DIALOG_MAJOR" ; then
10508  case $DIALOG_MAJOR in
10509  ([0-9]*)
10510 	;;
10511  (*)
10512	{ { echo "$as_me:10512: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
10513echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
10514   { (exit 1); exit 1; }; }
10515 	;;
10516  esac
10517else
10518  { { echo "$as_me:10518: error: Release major-version value is empty" >&5
10519echo "$as_me: error: Release major-version value is empty" >&2;}
10520   { (exit 1); exit 1; }; }
10521fi
10522
10523if test -n "$DIALOG_MINOR" ; then
10524  case $DIALOG_MINOR in
10525  ([0-9]*)
10526 	;;
10527  (*)
10528	{ { echo "$as_me:10528: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
10529echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
10530   { (exit 1); exit 1; }; }
10531 	;;
10532  esac
10533else
10534  { { echo "$as_me:10534: error: Release minor-version value is empty" >&5
10535echo "$as_me: error: Release minor-version value is empty" >&2;}
10536   { (exit 1); exit 1; }; }
10537fi
10538
10539test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
10540
10541# Check whether --with-abi-version or --without-abi-version was given.
10542if test "${with_abi_version+set}" = set; then
10543  withval="$with_abi_version"
10544
10545	if test "x$cf_cv_abi_version" != "x$withval"
10546	then
10547		{ echo "$as_me:10547: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
10548echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
10549		case $cf_cv_rel_version in
10550		(5.*)
10551			cf_cv_rel_version=$withval.0
10552			;;
10553		(6.*)
10554			cf_cv_rel_version=$withval.9	# FIXME: should be 10 as of 6.0 release
10555			;;
10556		esac
10557	fi
10558	cf_cv_abi_version=$withval
10559fi;
10560
10561if test -n "$cf_cv_abi_version" ; then
10562  case $cf_cv_abi_version in
10563  ([0-9]*)
10564 	;;
10565  (*)
10566	{ { echo "$as_me:10566: error: ABI version is not a number: $cf_cv_abi_version" >&5
10567echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
10568   { (exit 1); exit 1; }; }
10569 	;;
10570  esac
10571else
10572  { { echo "$as_me:10572: error: ABI version value is empty" >&5
10573echo "$as_me: error: ABI version value is empty" >&2;}
10574   { (exit 1); exit 1; }; }
10575fi
10576
10577LIB_MODEL=static
10578DFT_LWR_MODEL=$LIB_MODEL
10579LIBTOOL_MAKE="#"
10580
10581# use to comment-out makefile lines
10582MAKE_NORMAL=
10583MAKE_STATIC=
10584MAKE_SHARED="#"
10585MAKE_DLLS="#"
10586
10587shlibdir=$libdir
10588
10589echo "$as_me:10589: checking if libtool -version-number should be used" >&5
10590echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
10591
10592# Check whether --enable-libtool-version or --disable-libtool-version was given.
10593if test "${enable_libtool_version+set}" = set; then
10594  enableval="$enable_libtool_version"
10595  test "$enableval" != no && enableval=yes
10596	if test "$enableval" != "yes" ; then
10597    cf_libtool_version=no
10598	else
10599		cf_libtool_version=yes
10600	fi
10601else
10602  enableval=yes
10603	cf_libtool_version=yes
10604
10605fi;
10606echo "$as_me:10606: result: $cf_libtool_version" >&5
10607echo "${ECHO_T}$cf_libtool_version" >&6
10608
10609if test "$cf_libtool_version" = yes ; then
10610	LIBTOOL_VERSION="-version-number"
10611else
10612	LIBTOOL_VERSION="-version-info"
10613	case "x$VERSION" in
10614	(x)
10615		{ echo "$as_me:10615: WARNING: VERSION was not set" >&5
10616echo "$as_me: WARNING: VERSION was not set" >&2;}
10617		;;
10618	(x*.*.*)
10619		ABI_VERSION="$VERSION"
10620		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
10621
10622echo "${as_me:-configure}:10622: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
10623
10624		;;
10625	(x*:*:*)
10626		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
10627		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
10628
10629echo "${as_me:-configure}:10629: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
10630
10631		;;
10632	(*)
10633		{ echo "$as_me:10633: WARNING: unexpected VERSION value: $VERSION" >&5
10634echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
10635		;;
10636	esac
10637fi
10638
10639LIBTOOL=
10640
10641# common library maintenance symbols that are convenient for libtool scripts:
10642LIB_CREATE='${AR} -cr'
10643LIB_OBJECT='${OBJECTS}'
10644LIB_SUFFIX=.a
10645LIB_PREP="$RANLIB"
10646
10647# symbols used to prop libtool up to enable it to determine what it should be
10648# doing:
10649LIB_CLEAN=
10650LIB_COMPILE=
10651LIB_LINK='${CC}'
10652LIB_INSTALL=
10653LIB_UNINSTALL=
10654
10655echo "$as_me:10655: checking if you want to build libraries with libtool" >&5
10656echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
10657
10658# Check whether --with-libtool or --without-libtool was given.
10659if test "${with_libtool+set}" = set; then
10660  withval="$with_libtool"
10661  with_libtool=$withval
10662else
10663  with_libtool=no
10664fi;
10665echo "$as_me:10665: result: $with_libtool" >&5
10666echo "${ECHO_T}$with_libtool" >&6
10667if test "$with_libtool" != "no"; then
10668
10669	if test "$with_libtool" != "yes" ; then
10670
10671if test "x$prefix" != xNONE; then
10672	cf_path_syntax="$prefix"
10673else
10674	cf_path_syntax="$ac_default_prefix"
10675fi
10676
10677case ".$with_libtool" in
10678(.\$\(*\)*|.\'*\'*)
10679	;;
10680(..|./*|.\\*)
10681	;;
10682(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10683	;;
10684(.\${*prefix}*|.\${*dir}*)
10685	eval with_libtool="$with_libtool"
10686	case ".$with_libtool" in
10687	(.NONE/*)
10688		with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
10689		;;
10690	esac
10691	;;
10692(.no|.NONE/*)
10693	with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
10694	;;
10695(*)
10696	{ { echo "$as_me:10696: error: expected a pathname, not \"$with_libtool\"" >&5
10697echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
10698   { (exit 1); exit 1; }; }
10699	;;
10700esac
10701
10702		LIBTOOL=$with_libtool
10703	else
10704		if test -n "$ac_tool_prefix"; then
10705  for ac_prog in libtool glibtool
10706  do
10707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10709echo "$as_me:10709: checking for $ac_word" >&5
10710echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10711if test "${ac_cv_prog_LIBTOOL+set}" = set; then
10712  echo $ECHO_N "(cached) $ECHO_C" >&6
10713else
10714  if test -n "$LIBTOOL"; then
10715  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
10716else
10717  ac_save_IFS=$IFS; IFS=$ac_path_separator
10718ac_dummy="$PATH"
10719for ac_dir in $ac_dummy; do
10720  IFS=$ac_save_IFS
10721  test -z "$ac_dir" && ac_dir=.
10722  $as_executable_p "$ac_dir/$ac_word" || continue
10723ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
10724echo "$as_me:10724: found $ac_dir/$ac_word" >&5
10725break
10726done
10727
10728fi
10729fi
10730LIBTOOL=$ac_cv_prog_LIBTOOL
10731if test -n "$LIBTOOL"; then
10732  echo "$as_me:10732: result: $LIBTOOL" >&5
10733echo "${ECHO_T}$LIBTOOL" >&6
10734else
10735  echo "$as_me:10735: result: no" >&5
10736echo "${ECHO_T}no" >&6
10737fi
10738
10739    test -n "$LIBTOOL" && break
10740  done
10741fi
10742if test -z "$LIBTOOL"; then
10743  ac_ct_LIBTOOL=$LIBTOOL
10744  for ac_prog in libtool glibtool
10745do
10746  # Extract the first word of "$ac_prog", so it can be a program name with args.
10747set dummy $ac_prog; ac_word=$2
10748echo "$as_me:10748: checking for $ac_word" >&5
10749echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10750if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
10751  echo $ECHO_N "(cached) $ECHO_C" >&6
10752else
10753  if test -n "$ac_ct_LIBTOOL"; then
10754  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
10755else
10756  ac_save_IFS=$IFS; IFS=$ac_path_separator
10757ac_dummy="$PATH"
10758for ac_dir in $ac_dummy; do
10759  IFS=$ac_save_IFS
10760  test -z "$ac_dir" && ac_dir=.
10761  $as_executable_p "$ac_dir/$ac_word" || continue
10762ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
10763echo "$as_me:10763: found $ac_dir/$ac_word" >&5
10764break
10765done
10766
10767fi
10768fi
10769ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
10770if test -n "$ac_ct_LIBTOOL"; then
10771  echo "$as_me:10771: result: $ac_ct_LIBTOOL" >&5
10772echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
10773else
10774  echo "$as_me:10774: result: no" >&5
10775echo "${ECHO_T}no" >&6
10776fi
10777
10778  test -n "$ac_ct_LIBTOOL" && break
10779done
10780test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
10781
10782  LIBTOOL=$ac_ct_LIBTOOL
10783fi
10784
10785if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10786then
10787	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.].*//'`
10788else
10789	cf_cv_libtool_version=
10790fi
10791test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10792
10793		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
10794		then
10795
10796unset ac_cv_prog_ac_ct_LIBTOOL
10797unset ac_ct_LIBTOOL
10798unset LIBTOOL
10799
10800			if test -n "$ac_tool_prefix"; then
10801  for ac_prog in glibtool
10802  do
10803    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10805echo "$as_me:10805: checking for $ac_word" >&5
10806echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10807if test "${ac_cv_prog_LIBTOOL+set}" = set; then
10808  echo $ECHO_N "(cached) $ECHO_C" >&6
10809else
10810  if test -n "$LIBTOOL"; then
10811  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
10812else
10813  ac_save_IFS=$IFS; IFS=$ac_path_separator
10814ac_dummy="$PATH"
10815for ac_dir in $ac_dummy; do
10816  IFS=$ac_save_IFS
10817  test -z "$ac_dir" && ac_dir=.
10818  $as_executable_p "$ac_dir/$ac_word" || continue
10819ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
10820echo "$as_me:10820: found $ac_dir/$ac_word" >&5
10821break
10822done
10823
10824fi
10825fi
10826LIBTOOL=$ac_cv_prog_LIBTOOL
10827if test -n "$LIBTOOL"; then
10828  echo "$as_me:10828: result: $LIBTOOL" >&5
10829echo "${ECHO_T}$LIBTOOL" >&6
10830else
10831  echo "$as_me:10831: result: no" >&5
10832echo "${ECHO_T}no" >&6
10833fi
10834
10835    test -n "$LIBTOOL" && break
10836  done
10837fi
10838if test -z "$LIBTOOL"; then
10839  ac_ct_LIBTOOL=$LIBTOOL
10840  for ac_prog in glibtool
10841do
10842  # Extract the first word of "$ac_prog", so it can be a program name with args.
10843set dummy $ac_prog; ac_word=$2
10844echo "$as_me:10844: checking for $ac_word" >&5
10845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10846if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
10847  echo $ECHO_N "(cached) $ECHO_C" >&6
10848else
10849  if test -n "$ac_ct_LIBTOOL"; then
10850  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
10851else
10852  ac_save_IFS=$IFS; IFS=$ac_path_separator
10853ac_dummy="$PATH"
10854for ac_dir in $ac_dummy; do
10855  IFS=$ac_save_IFS
10856  test -z "$ac_dir" && ac_dir=.
10857  $as_executable_p "$ac_dir/$ac_word" || continue
10858ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
10859echo "$as_me:10859: found $ac_dir/$ac_word" >&5
10860break
10861done
10862
10863fi
10864fi
10865ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
10866if test -n "$ac_ct_LIBTOOL"; then
10867  echo "$as_me:10867: result: $ac_ct_LIBTOOL" >&5
10868echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
10869else
10870  echo "$as_me:10870: result: no" >&5
10871echo "${ECHO_T}no" >&6
10872fi
10873
10874  test -n "$ac_ct_LIBTOOL" && break
10875done
10876test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
10877
10878  LIBTOOL=$ac_ct_LIBTOOL
10879fi
10880
10881if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10882then
10883	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.].*//'`
10884else
10885	cf_cv_libtool_version=
10886fi
10887test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10888
10889		fi
10890	fi
10891	if test -z "$LIBTOOL" ; then
10892		{ { echo "$as_me:10892: error: Cannot find libtool" >&5
10893echo "$as_me: error: Cannot find libtool" >&2;}
10894   { (exit 1); exit 1; }; }
10895	fi
10896	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
10897	LIB_OBJECT='${OBJECTS:.o=.lo}'
10898	LIB_SUFFIX=.la
10899	LIB_CLEAN='${LIBTOOL} --mode=clean'
10900	LIB_COMPILE='${LIBTOOL} --mode=compile'
10901	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
10902	LIB_INSTALL='${LIBTOOL} --mode=install'
10903	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
10904	LIB_PREP=:
10905
10906if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10907then
10908	echo "$as_me:10908: checking version of $LIBTOOL" >&5
10909echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
10910
10911if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10912then
10913	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.].*//'`
10914else
10915	cf_cv_libtool_version=
10916fi
10917test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10918
10919	echo "$as_me:10919: result: $cf_cv_libtool_version" >&5
10920echo "${ECHO_T}$cf_cv_libtool_version" >&6
10921	if test -z "$cf_cv_libtool_version" ; then
10922		{ { echo "$as_me:10922: error: This is not GNU libtool" >&5
10923echo "$as_me: error: This is not GNU libtool" >&2;}
10924   { (exit 1); exit 1; }; }
10925	fi
10926else
10927	{ { echo "$as_me:10927: error: GNU libtool has not been found" >&5
10928echo "$as_me: error: GNU libtool has not been found" >&2;}
10929   { (exit 1); exit 1; }; }
10930fi
10931
10932	# special hack to add -no-undefined (which libtool should do for itself)
10933	LT_UNDEF=
10934	case "$cf_cv_system_name" in
10935	(cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
10936		LT_UNDEF=-no-undefined
10937		;;
10938	esac
10939
10940	# special hack to add --tag option for C++ compiler
10941	case $cf_cv_libtool_version in
10942	(1.[5-9]*|[2-9].[0-9.a-z]*)
10943		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
10944		LIBTOOL="$LIBTOOL --tag=CC"
10945		;;
10946	(*)
10947		LIBTOOL_CXX="$LIBTOOL"
10948		;;
10949	esac
10950else
10951	LIBTOOL=""
10952	LIBTOOL_CXX=""
10953fi
10954
10955test -z "$LIBTOOL" && ECHO_LT=
10956
10957LIB_CREATE="$LIB_CREATE \$@"
10958
10959if test "$with_libtool" = "yes" ; then
10960	OBJEXT="lo"
10961	LIB_MODEL=libtool
10962	DFT_LWR_MODEL=$LIB_MODEL
10963	LIBTOOL_MAKE=
10964
10965echo "$as_me:10965: checking for additional libtool options" >&5
10966echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
10967
10968# Check whether --with-libtool-opts or --without-libtool-opts was given.
10969if test "${with_libtool_opts+set}" = set; then
10970  withval="$with_libtool_opts"
10971  with_libtool_opts=$withval
10972else
10973  with_libtool_opts=no
10974fi;
10975echo "$as_me:10975: result: $with_libtool_opts" >&5
10976echo "${ECHO_T}$with_libtool_opts" >&6
10977
10978case .$with_libtool_opts in
10979(.yes|.no|.)
10980	;;
10981(*)
10982	LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
10983	;;
10984esac
10985
10986echo "$as_me:10986: checking if exported-symbols file should be used" >&5
10987echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
10988
10989# Check whether --with-export-syms or --without-export-syms was given.
10990if test "${with_export_syms+set}" = set; then
10991  withval="$with_export_syms"
10992  with_export_syms=$withval
10993else
10994  with_export_syms=no
10995fi;
10996if test "x$with_export_syms" = xyes
10997then
10998	with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
10999
11000fi
11001echo "$as_me:11001: result: $with_export_syms" >&5
11002echo "${ECHO_T}$with_export_syms" >&6
11003if test "x$with_export_syms" != xno
11004then
11005	EXPORT_SYMS="-export-symbols $with_export_syms"
11006
11007fi
11008
11009	MAKE_NORMAL="#"
11010	MAKE_STATIC="#"
11011	MAKE_SHARED=
11012else
11013	echo "$as_me:11013: checking if you want to build shared libraries" >&5
11014echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
11015
11016# Check whether --with-shared or --without-shared was given.
11017if test "${with_shared+set}" = set; then
11018  withval="$with_shared"
11019  with_shared=$withval
11020else
11021  with_shared=no
11022fi;
11023	echo "$as_me:11023: result: $with_shared" >&5
11024echo "${ECHO_T}$with_shared" >&6
11025	if test "$with_shared" = "yes" ; then
11026		LIB_MODEL=shared
11027		DFT_LWR_MODEL=$LIB_MODEL
11028
11029	RM_SHARED_OPTS=
11030	LOCAL_LDFLAGS=
11031	LOCAL_LDFLAGS2=
11032	LD_SHARED_OPTS=
11033	INSTALL_LIB="-m 644"
11034	: ${rel_builddir:=.}
11035
11036	shlibdir=$libdir
11037
11038	MAKE_DLLS="#"
11039
11040	cf_cv_do_symlinks=no
11041	cf_ld_rpath_opt=
11042	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11043
11044	echo "$as_me:11044: checking if release/abi version should be used for shared libs" >&5
11045echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11046
11047# Check whether --with-shlib-version or --without-shlib-version was given.
11048if test "${with_shlib_version+set}" = set; then
11049  withval="$with_shlib_version"
11050  test -z "$withval" && withval=auto
11051	case $withval in
11052	(yes)
11053		cf_cv_shlib_version=auto
11054		;;
11055	(rel|abi|auto)
11056		cf_cv_shlib_version=$withval
11057		;;
11058	(*)
11059		echo "$as_me:11059: result: $withval" >&5
11060echo "${ECHO_T}$withval" >&6
11061		{ { echo "$as_me:11061: error: option value must be one of: rel, abi, or auto" >&5
11062echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11063   { (exit 1); exit 1; }; }
11064		;;
11065	esac
11066
11067else
11068  cf_cv_shlib_version=auto
11069fi;
11070	echo "$as_me:11070: result: $cf_cv_shlib_version" >&5
11071echo "${ECHO_T}$cf_cv_shlib_version" >&6
11072
11073	cf_cv_rm_so_locs=no
11074	cf_try_cflags=
11075
11076	# Some less-capable ports of gcc support only -fpic
11077	CC_SHARED_OPTS=
11078
11079	cf_try_fPIC=no
11080	if test "$GCC" = yes
11081	then
11082		cf_try_fPIC=yes
11083	else
11084		case $cf_cv_system_name in
11085		(*linux*)	# e.g., PGI compiler
11086			cf_try_fPIC=yes
11087			;;
11088		esac
11089	fi
11090
11091	if test "$cf_try_fPIC" = yes
11092	then
11093		echo "$as_me:11093: checking which $CC option to use" >&5
11094echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11095		cf_save_CFLAGS="$CFLAGS"
11096		for CC_SHARED_OPTS in -fPIC -fpic ''
11097		do
11098			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11099			cat >conftest.$ac_ext <<_ACEOF
11100#line 11100 "configure"
11101#include "confdefs.h"
11102#include <stdio.h>
11103int
11104main (void)
11105{
11106int x = 1
11107  ;
11108  return 0;
11109}
11110_ACEOF
11111rm -f conftest.$ac_objext
11112if { (eval echo "$as_me:11112: \"$ac_compile\"") >&5
11113  (eval $ac_compile) 2>&5
11114  ac_status=$?
11115  echo "$as_me:11115: \$? = $ac_status" >&5
11116  (exit $ac_status); } &&
11117         { ac_try='test -s conftest.$ac_objext'
11118  { (eval echo "$as_me:11118: \"$ac_try\"") >&5
11119  (eval $ac_try) 2>&5
11120  ac_status=$?
11121  echo "$as_me:11121: \$? = $ac_status" >&5
11122  (exit $ac_status); }; }; then
11123  break
11124else
11125  echo "$as_me: failed program was:" >&5
11126cat conftest.$ac_ext >&5
11127fi
11128rm -f conftest.$ac_objext conftest.$ac_ext
11129		done
11130		echo "$as_me:11130: result: $CC_SHARED_OPTS" >&5
11131echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11132		CFLAGS="$cf_save_CFLAGS"
11133	fi
11134
11135	cf_cv_shlib_version_infix=no
11136
11137	case $cf_cv_system_name in
11138	(aix4.3-9*|aix[5-7]*)
11139		if test "$GCC" = yes; then
11140			CC_SHARED_OPTS='-Wl,-brtl'
11141			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11142		else
11143			CC_SHARED_OPTS='-brtl'
11144			# as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11145			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11146		fi
11147		;;
11148	(beos*)
11149		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11150		;;
11151	(cygwin*)
11152		CC_SHARED_OPTS=
11153		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11154		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11155		cf_cv_shlib_version=cygdll
11156		cf_cv_shlib_version_infix=cygdll
11157		shlibdir=$bindir
11158		MAKE_DLLS=
11159		cat >mk_shared_lib.sh <<-CF_EOF
11160		#!$SHELL
11161		SHARED_LIB=\$1
11162		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11163		shift
11164		cat <<-EOF
11165		Linking shared library
11166		** SHARED_LIB \$SHARED_LIB
11167		** IMPORT_LIB \$IMPORT_LIB
11168EOF
11169		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11170CF_EOF
11171		chmod +x mk_shared_lib.sh
11172		;;
11173	(msys*)
11174		CC_SHARED_OPTS=
11175		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11176		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11177		cf_cv_shlib_version=msysdll
11178		cf_cv_shlib_version_infix=msysdll
11179		shlibdir=$bindir
11180		MAKE_DLLS=
11181		cat >mk_shared_lib.sh <<-CF_EOF
11182		#!$SHELL
11183		SHARED_LIB=\$1
11184		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11185		shift
11186		cat <<-EOF
11187		Linking shared library
11188		** SHARED_LIB \$SHARED_LIB
11189		** IMPORT_LIB \$IMPORT_LIB
11190EOF
11191		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11192CF_EOF
11193		chmod +x mk_shared_lib.sh
11194		;;
11195	(darwin*)
11196		cf_try_cflags="no-cpp-precomp"
11197		CC_SHARED_OPTS="-dynamic"
11198		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11199		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11200		cf_cv_shlib_version_infix=yes
11201		echo "$as_me:11201: checking if ld -search_paths_first works" >&5
11202echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11203if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11204  echo $ECHO_N "(cached) $ECHO_C" >&6
11205else
11206
11207			cf_save_LDFLAGS=$LDFLAGS
11208			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11209			cat >conftest.$ac_ext <<_ACEOF
11210#line 11210 "configure"
11211#include "confdefs.h"
11212
11213int
11214main (void)
11215{
11216int i;
11217  ;
11218  return 0;
11219}
11220_ACEOF
11221rm -f conftest.$ac_objext conftest$ac_exeext
11222if { (eval echo "$as_me:11222: \"$ac_link\"") >&5
11223  (eval $ac_link) 2>&5
11224  ac_status=$?
11225  echo "$as_me:11225: \$? = $ac_status" >&5
11226  (exit $ac_status); } &&
11227         { ac_try='test -s conftest$ac_exeext'
11228  { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229  (eval $ac_try) 2>&5
11230  ac_status=$?
11231  echo "$as_me:11231: \$? = $ac_status" >&5
11232  (exit $ac_status); }; }; then
11233  cf_cv_ldflags_search_paths_first=yes
11234else
11235  echo "$as_me: failed program was:" >&5
11236cat conftest.$ac_ext >&5
11237cf_cv_ldflags_search_paths_first=no
11238fi
11239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11240				LDFLAGS=$cf_save_LDFLAGS
11241fi
11242echo "$as_me:11242: result: $cf_cv_ldflags_search_paths_first" >&5
11243echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11244		if test $cf_cv_ldflags_search_paths_first = yes; then
11245			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11246		fi
11247		;;
11248	(hpux[7-8]*)
11249		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11250		if test "$GCC" != yes; then
11251			CC_SHARED_OPTS='+Z'
11252		fi
11253		MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11254		INSTALL_LIB="-m 555"
11255		;;
11256	(hpux*)
11257		# (tested with gcc 2.7.2 -- I don't have c89)
11258		if test "$GCC" = yes; then
11259			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11260		else
11261			CC_SHARED_OPTS='+Z'
11262			LD_SHARED_OPTS='-Wl,+b,${libdir}'
11263		fi
11264		MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11265		# HP-UX shared libraries must be executable, and should be
11266		# readonly to exploit a quirk in the memory manager.
11267		INSTALL_LIB="-m 555"
11268		;;
11269	(interix*)
11270		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11271		if test "$cf_cv_shlib_version" = rel; then
11272			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11273		else
11274			cf_shared_soname='`basename $@`'
11275		fi
11276		CC_SHARED_OPTS=
11277		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11278		;;
11279	(irix*)
11280		if test "$cf_cv_enable_rpath" = yes ; then
11281			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11282		fi
11283		# tested with IRIX 5.2 and 'cc'.
11284		if test "$GCC" != yes; then
11285			CC_SHARED_OPTS='-KPIC'
11286			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11287		else
11288			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11289		fi
11290		cf_cv_rm_so_locs=yes
11291		;;
11292	(linux*|gnu*|k*bsd*-gnu)
11293		if test "$DFT_LWR_MODEL" = "shared" ; then
11294			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11295			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11296		fi
11297		if test "$cf_cv_enable_rpath" = yes ; then
11298			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11299		fi
11300
11301	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11302	if test "$cf_cv_shlib_version" = rel; then
11303		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11304	else
11305		cf_cv_shared_soname='`basename $@`'
11306	fi
11307
11308		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11309		;;
11310	(mingw*)
11311		cf_cv_shlib_version=mingw
11312		cf_cv_shlib_version_infix=mingw
11313		shlibdir=$bindir
11314		MAKE_DLLS=
11315		if test "$DFT_LWR_MODEL" = "shared" ; then
11316			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11317			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11318			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11319		fi
11320		CC_SHARED_OPTS=
11321		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11322		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11323		cat >mk_shared_lib.sh <<-CF_EOF
11324		#!$SHELL
11325		SHARED_LIB=\$1
11326		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11327		shift
11328		cat <<-EOF
11329		Linking shared library
11330		** SHARED_LIB \$SHARED_LIB
11331		** IMPORT_LIB \$IMPORT_LIB
11332EOF
11333		exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11334CF_EOF
11335		chmod +x mk_shared_lib.sh
11336		;;
11337	(openbsd[2-9].*|mirbsd*)
11338		if test "$DFT_LWR_MODEL" = "shared" ; then
11339			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11340			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11341		fi
11342		if test "$cf_cv_enable_rpath" = yes ; then
11343			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11344		fi
11345		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11346
11347	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11348	if test "$cf_cv_shlib_version" = rel; then
11349		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11350	else
11351		cf_cv_shared_soname='`basename $@`'
11352	fi
11353
11354		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11355		;;
11356	(nto-qnx*|openbsd*|freebsd[12].*)
11357		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11358		MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11359		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11360		;;
11361	(dragonfly*|freebsd*)
11362		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11363		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11364			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11365			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11366			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11367		fi
11368
11369	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11370	if test "$cf_cv_shlib_version" = rel; then
11371		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11372	else
11373		cf_cv_shared_soname='`basename $@`'
11374	fi
11375
11376		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11377		;;
11378	(netbsd*)
11379		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11380		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11381			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11382			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11383			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11384			if test "$cf_cv_shlib_version" = auto; then
11385			if test -f /usr/libexec/ld.elf_so; then
11386				cf_cv_shlib_version=abi
11387			else
11388				cf_cv_shlib_version=rel
11389			fi
11390			fi
11391
11392	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11393	if test "$cf_cv_shlib_version" = rel; then
11394		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11395	else
11396		cf_cv_shared_soname='`basename $@`'
11397	fi
11398
11399			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11400		else
11401			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
11402		fi
11403		;;
11404	(osf*|mls+*)
11405		# tested with OSF/1 V3.2 and 'cc'
11406		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11407		# link with shared libs).
11408		MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11409		case $host_os in
11410		(osf4*)
11411			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11412			;;
11413		esac
11414		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11415		if test "$DFT_LWR_MODEL" = "shared" ; then
11416			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11417			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11418		fi
11419		cf_cv_rm_so_locs=yes
11420		;;
11421	(sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
11422		# tested with osr5.0.5
11423		if test "$GCC" != yes; then
11424			CC_SHARED_OPTS='-belf -KPIC'
11425		fi
11426		MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11427		if test "$cf_cv_enable_rpath" = yes ; then
11428			# only way is to set LD_RUN_PATH but no switch for it
11429			RUN_PATH=$libdir
11430		fi
11431		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11432		LINK_PROGS='LD_RUN_PATH=${libdir}'
11433		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11434		;;
11435	(sunos4*)
11436		# tested with SunOS 4.1.1 and gcc 2.7.0
11437		if test "$GCC" != yes; then
11438			CC_SHARED_OPTS='-KPIC'
11439		fi
11440		MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11441		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11442		;;
11443	(solaris2*)
11444		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11445		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11446		if test "$DFT_LWR_MODEL" = "shared" ; then
11447			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11448			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11449		fi
11450		if test "$cf_cv_enable_rpath" = yes ; then
11451			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11452		fi
11453
11454	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11455	if test "$cf_cv_shlib_version" = rel; then
11456		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11457	else
11458		cf_cv_shared_soname='`basename $@`'
11459	fi
11460
11461		if test "$GCC" != yes; then
11462			cf_save_CFLAGS="$CFLAGS"
11463			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11464			do
11465				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11466				cat >conftest.$ac_ext <<_ACEOF
11467#line 11467 "configure"
11468#include "confdefs.h"
11469#include <stdio.h>
11470int
11471main (void)
11472{
11473printf("Hello\n");
11474  ;
11475  return 0;
11476}
11477_ACEOF
11478rm -f conftest.$ac_objext
11479if { (eval echo "$as_me:11479: \"$ac_compile\"") >&5
11480  (eval $ac_compile) 2>&5
11481  ac_status=$?
11482  echo "$as_me:11482: \$? = $ac_status" >&5
11483  (exit $ac_status); } &&
11484         { ac_try='test -s conftest.$ac_objext'
11485  { (eval echo "$as_me:11485: \"$ac_try\"") >&5
11486  (eval $ac_try) 2>&5
11487  ac_status=$?
11488  echo "$as_me:11488: \$? = $ac_status" >&5
11489  (exit $ac_status); }; }; then
11490  break
11491else
11492  echo "$as_me: failed program was:" >&5
11493cat conftest.$ac_ext >&5
11494fi
11495rm -f conftest.$ac_objext conftest.$ac_ext
11496			done
11497			CFLAGS="$cf_save_CFLAGS"
11498			CC_SHARED_OPTS=$cf_shared_opts
11499			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11500		else
11501			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11502		fi
11503		;;
11504	(sysv5uw7*|unix_sv*)
11505		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11506		if test "$GCC" != yes; then
11507			CC_SHARED_OPTS='-KPIC'
11508		fi
11509		MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11510		;;
11511	(*)
11512		CC_SHARED_OPTS='unknown'
11513		MK_SHARED_LIB='echo unknown'
11514		;;
11515	esac
11516
11517	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
11518	case "$cf_cv_shlib_version" in
11519	(rel|abi)
11520		case "$MK_SHARED_LIB" in
11521		(*'-o $@')
11522			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11523			;;
11524		(*)
11525			{ echo "$as_me:11525: WARNING: ignored --with-shlib-version" >&5
11526echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11527			;;
11528		esac
11529		;;
11530	esac
11531
11532	if test -n "$cf_try_cflags"
11533	then
11534cat > conftest.$ac_ext <<EOF
11535#line 11535 "${as_me:-configure}"
11536#include <stdio.h>
11537int main(int argc, char *argv[])
11538{
11539	printf("hello\n");
11540	return (argv[argc-1] == 0) ;
11541}
11542EOF
11543		cf_save_CFLAGS="$CFLAGS"
11544		for cf_opt in $cf_try_cflags
11545		do
11546			CFLAGS="$cf_save_CFLAGS -$cf_opt"
11547			echo "$as_me:11547: checking if CFLAGS option -$cf_opt works" >&5
11548echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11549			if { (eval echo "$as_me:11549: \"$ac_compile\"") >&5
11550  (eval $ac_compile) 2>&5
11551  ac_status=$?
11552  echo "$as_me:11552: \$? = $ac_status" >&5
11553  (exit $ac_status); }; then
11554				echo "$as_me:11554: result: yes" >&5
11555echo "${ECHO_T}yes" >&6
11556				cf_save_CFLAGS="$CFLAGS"
11557			else
11558				echo "$as_me:11558: result: no" >&5
11559echo "${ECHO_T}no" >&6
11560			fi
11561		done
11562		CFLAGS="$cf_save_CFLAGS"
11563	fi
11564
11565	# RPATH_LIST is a colon-separated list of directories
11566	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11567	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11568
11569	test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11570
11571	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11572
11573echo "${as_me:-configure}:11573: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11574
11575	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11576
11577echo "${as_me:-configure}:11577: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11578
11579echo "$as_me:11579: checking if versioned-symbols file should be used" >&5
11580echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
11581
11582# Check whether --with-versioned-syms or --without-versioned-syms was given.
11583if test "${with_versioned_syms+set}" = set; then
11584  withval="$with_versioned_syms"
11585  with_versioned_syms=$withval
11586else
11587  with_versioned_syms=no
11588fi;
11589if test "x$with_versioned_syms" = xyes
11590then
11591	with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
11592
11593fi
11594echo "$as_me:11594: result: $with_versioned_syms" >&5
11595echo "${ECHO_T}$with_versioned_syms" >&6
11596
11597RESULTING_SYMS=
11598VERSIONED_SYMS=
11599WILDCARD_SYMS=
11600
11601if test "x$with_versioned_syms" != xno
11602then
11603	RESULTING_SYMS=$with_versioned_syms
11604	case "x$MK_SHARED_LIB" in
11605	(*-Wl,*)
11606		VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
11607		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
11608		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11609
11610echo "${as_me:-configure}:11610: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11611
11612		;;
11613	(*-dy\ *)
11614		VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
11615		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
11616		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11617
11618echo "${as_me:-configure}:11618: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11619
11620		;;
11621	(*)
11622		{ echo "$as_me:11622: WARNING: this system does not support versioned-symbols" >&5
11623echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
11624		;;
11625	esac
11626
11627	# Linux ld can selectively override scope, e.g., of symbols beginning with
11628	# "_" by first declaring some as global, and then using a wildcard to
11629	# declare the others as local.  Some other loaders cannot do this.  Check
11630	# by constructing a (very) simple shared library and inspecting its
11631	# symbols.
11632	if test "x$VERSIONED_SYMS" != "x"
11633	then
11634		echo "$as_me:11634: checking if wildcards can be used to selectively omit symbols" >&5
11635echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
11636		WILDCARD_SYMS=no
11637
11638		# make sources
11639		rm -f conftest.*
11640
11641		cat >conftest.ver <<EOF
11642module_1.0 {
11643global:
11644	globalf1;
11645local:
11646	localf1;
11647};
11648module_2.0 {
11649global:
11650	globalf2;
11651local:
11652	localf2;
11653	_*;
11654} module_1.0;
11655submodule_1.0 {
11656global:
11657	subglobalf1;
11658	_ismissing;
11659local:
11660	sublocalf1;
11661};
11662submodule_2.0 {
11663global:
11664	subglobalf2;
11665local:
11666	sublocalf2;
11667	_*;
11668} submodule_1.0;
11669EOF
11670		cat >conftest.$ac_ext <<EOF
11671#line 11671 "configure"
11672int	_ismissing(void) { return 1; }
11673int	_localf1(void) { return 1; }
11674int	_localf2(void) { return 2; }
11675int	globalf1(void) { return 1; }
11676int	globalf2(void) { return 2; }
11677int	_sublocalf1(void) { return 1; }
11678int	_sublocalf2(void) { return 2; }
11679int	subglobalf1(void) { return 1; }
11680int	subglobalf2(void) { return 2; }
11681EOF
11682		cat >conftest.mk <<EOF
11683CC=${CC}
11684CFLAGS=${CFLAGS}
11685CPPFLAGS=${CPPFLAGS}
11686LDFLAGS=${LDFLAGS}
11687LIBS=${LIBS}
11688VERSIONED_SYMS=${VERSIONED_SYMS}
11689RESULTING_SYMS=conftest.ver
11690MK_SHARED_LIB=${MK_SHARED_LIB}
11691conftest.so: conftest.$ac_cv_objext
11692		\$(MK_SHARED_LIB) conftest.$ac_cv_objext
11693EOF
11694
11695		# compile source, make library
11696		if make -f conftest.mk 2>&5 >/dev/null
11697		then
11698			# test for missing symbol in either Data or Text section
11699			cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[ 	][DT][ 	]'`
11700			test -n "$cf_missing" && WILDCARD_SYMS=yes
11701		fi
11702		echo "$as_me:11702: result: $WILDCARD_SYMS" >&5
11703echo "${ECHO_T}$WILDCARD_SYMS" >&6
11704		rm -f conftest.*
11705	fi
11706fi
11707
11708		LIB_PREP=:
11709		LIB_CREATE="$MK_SHARED_LIB"
11710		CFLAGS="$CFLAGS $CC_SHARED_OPTS"
11711		MAKE_NORMAL="#"
11712		MAKE_STATIC="#"
11713		MAKE_SHARED=
11714	fi
11715fi
11716
11717LIB_SUFFIX=
11718
11719	case X$LIB_MODEL in
11720	(Xlibtool)
11721		DFT_LIB_SUFFIX='.la'
11722		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11723		;;
11724	(Xdebug)
11725		DFT_LIB_SUFFIX='_g.a'
11726		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11727		;;
11728	(Xprofile)
11729		DFT_LIB_SUFFIX='_p.a'
11730		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11731		;;
11732	(Xshared)
11733		case $cf_cv_system_name in
11734		(aix[5-7]*)
11735			DFT_LIB_SUFFIX='.so'
11736			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11737			;;
11738		(cygwin*|msys*|mingw*)
11739			DFT_LIB_SUFFIX='.dll'
11740			DFT_DEP_SUFFIX='.dll.a'
11741			;;
11742		(darwin*)
11743			DFT_LIB_SUFFIX='.dylib'
11744			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11745			;;
11746		(hpux*)
11747			case $target in
11748			(ia64*)
11749				DFT_LIB_SUFFIX='.so'
11750				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11751				;;
11752			(*)
11753				DFT_LIB_SUFFIX='.sl'
11754				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11755				;;
11756			esac
11757			;;
11758		(*)
11759			DFT_LIB_SUFFIX='.so'
11760			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11761			;;
11762		esac
11763		;;
11764	(*)
11765		DFT_LIB_SUFFIX='.a'
11766		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11767		;;
11768	esac
11769	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
11770	then
11771		DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
11772		DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
11773	fi
11774
11775LIB_SUFFIX=$DFT_LIB_SUFFIX
11776
11777echo "$as_me:11777: checking for specific curses-directory" >&5
11778echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
11779
11780# Check whether --with-curses-dir or --without-curses-dir was given.
11781if test "${with_curses_dir+set}" = set; then
11782  withval="$with_curses_dir"
11783  cf_cv_curses_dir=$withval
11784else
11785  cf_cv_curses_dir=no
11786fi;
11787echo "$as_me:11787: result: $cf_cv_curses_dir" >&5
11788echo "${ECHO_T}$cf_cv_curses_dir" >&6
11789
11790if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11791then
11792
11793if test "x$prefix" != xNONE; then
11794	cf_path_syntax="$prefix"
11795else
11796	cf_path_syntax="$ac_default_prefix"
11797fi
11798
11799case ".$withval" in
11800(.\$\(*\)*|.\'*\'*)
11801	;;
11802(..|./*|.\\*)
11803	;;
11804(.[a-zA-Z]:[\\/]*) # OS/2 EMX
11805	;;
11806(.\${*prefix}*|.\${*dir}*)
11807	eval withval="$withval"
11808	case ".$withval" in
11809	(.NONE/*)
11810		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11811		;;
11812	esac
11813	;;
11814(.no|.NONE/*)
11815	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11816	;;
11817(*)
11818	{ { echo "$as_me:11818: error: expected a pathname, not \"$withval\"" >&5
11819echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11820   { (exit 1); exit 1; }; }
11821	;;
11822esac
11823
11824	if test -d "$cf_cv_curses_dir"
11825	then
11826
11827if test -n "$cf_cv_curses_dir/include" ; then
11828  for cf_add_incdir in $cf_cv_curses_dir/include
11829  do
11830	while test $cf_add_incdir != /usr/include
11831	do
11832	  if test -d $cf_add_incdir
11833	  then
11834		cf_have_incdir=no
11835		if test -n "$CFLAGS$CPPFLAGS" ; then
11836		  # a loop is needed to ensure we can add subdirs of existing dirs
11837		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11838			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11839			  cf_have_incdir=yes; break
11840			fi
11841		  done
11842		fi
11843
11844		if test "$cf_have_incdir" = no ; then
11845		  if test "$cf_add_incdir" = /usr/local/include ; then
11846			if test "$GCC" = yes
11847			then
11848			  cf_save_CPPFLAGS=$CPPFLAGS
11849
11850	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11851	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11852
11853			  cat >conftest.$ac_ext <<_ACEOF
11854#line 11854 "configure"
11855#include "confdefs.h"
11856#include <stdio.h>
11857int
11858main (void)
11859{
11860printf("Hello")
11861  ;
11862  return 0;
11863}
11864_ACEOF
11865rm -f conftest.$ac_objext
11866if { (eval echo "$as_me:11866: \"$ac_compile\"") >&5
11867  (eval $ac_compile) 2>&5
11868  ac_status=$?
11869  echo "$as_me:11869: \$? = $ac_status" >&5
11870  (exit $ac_status); } &&
11871         { ac_try='test -s conftest.$ac_objext'
11872  { (eval echo "$as_me:11872: \"$ac_try\"") >&5
11873  (eval $ac_try) 2>&5
11874  ac_status=$?
11875  echo "$as_me:11875: \$? = $ac_status" >&5
11876  (exit $ac_status); }; }; then
11877  :
11878else
11879  echo "$as_me: failed program was:" >&5
11880cat conftest.$ac_ext >&5
11881cf_have_incdir=yes
11882fi
11883rm -f conftest.$ac_objext conftest.$ac_ext
11884			  CPPFLAGS=$cf_save_CPPFLAGS
11885			fi
11886		  fi
11887		fi
11888
11889		if test "$cf_have_incdir" = no ; then
11890		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11891
11892echo "${as_me:-configure}:11892: testing adding $cf_add_incdir to include-path ..." 1>&5
11893
11894		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11895
11896		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11897		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11898		  cf_add_incdir="$cf_top_incdir"
11899		else
11900		  break
11901		fi
11902	  else
11903		break
11904	  fi
11905	done
11906  done
11907fi
11908
11909if test -n "$cf_cv_curses_dir/lib" ; then
11910	for cf_add_libdir in $cf_cv_curses_dir/lib
11911	do
11912		if test $cf_add_libdir = /usr/lib ; then
11913			:
11914		elif test -d $cf_add_libdir
11915		then
11916			cf_have_libdir=no
11917			if test -n "$LDFLAGS$LIBS" ; then
11918				# a loop is needed to ensure we can add subdirs of existing dirs
11919				for cf_test_libdir in $LDFLAGS $LIBS ; do
11920					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11921						cf_have_libdir=yes; break
11922					fi
11923				done
11924			fi
11925			if test "$cf_have_libdir" = no ; then
11926				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11927
11928echo "${as_me:-configure}:11928: testing adding $cf_add_libdir to library-path ..." 1>&5
11929
11930				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11931			fi
11932		fi
11933	done
11934fi
11935
11936	fi
11937fi
11938
11939echo "$as_me:11939: checking if rpath option should be used" >&5
11940echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
11941
11942# Check whether --enable-rpath or --disable-rpath was given.
11943if test "${enable_rpath+set}" = set; then
11944  enableval="$enable_rpath"
11945  cf_cv_enable_rpath=$enableval
11946else
11947  cf_cv_enable_rpath=no
11948fi;
11949echo "$as_me:11949: result: $cf_cv_enable_rpath" >&5
11950echo "${ECHO_T}$cf_cv_enable_rpath" >&6
11951
11952echo "$as_me:11952: checking for specific curses-directory" >&5
11953echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
11954
11955# Check whether --with-curses-dir or --without-curses-dir was given.
11956if test "${with_curses_dir+set}" = set; then
11957  withval="$with_curses_dir"
11958  cf_cv_curses_dir=$withval
11959else
11960  cf_cv_curses_dir=no
11961fi;
11962echo "$as_me:11962: result: $cf_cv_curses_dir" >&5
11963echo "${ECHO_T}$cf_cv_curses_dir" >&6
11964
11965if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11966then
11967
11968if test "x$prefix" != xNONE; then
11969	cf_path_syntax="$prefix"
11970else
11971	cf_path_syntax="$ac_default_prefix"
11972fi
11973
11974case ".$withval" in
11975(.\$\(*\)*|.\'*\'*)
11976	;;
11977(..|./*|.\\*)
11978	;;
11979(.[a-zA-Z]:[\\/]*) # OS/2 EMX
11980	;;
11981(.\${*prefix}*|.\${*dir}*)
11982	eval withval="$withval"
11983	case ".$withval" in
11984	(.NONE/*)
11985		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11986		;;
11987	esac
11988	;;
11989(.no|.NONE/*)
11990	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11991	;;
11992(*)
11993	{ { echo "$as_me:11993: error: expected a pathname, not \"$withval\"" >&5
11994echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11995   { (exit 1); exit 1; }; }
11996	;;
11997esac
11998
11999	if test -d "$cf_cv_curses_dir"
12000	then
12001
12002if test -n "$cf_cv_curses_dir/include" ; then
12003  for cf_add_incdir in $cf_cv_curses_dir/include
12004  do
12005	while test $cf_add_incdir != /usr/include
12006	do
12007	  if test -d $cf_add_incdir
12008	  then
12009		cf_have_incdir=no
12010		if test -n "$CFLAGS$CPPFLAGS" ; then
12011		  # a loop is needed to ensure we can add subdirs of existing dirs
12012		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12013			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12014			  cf_have_incdir=yes; break
12015			fi
12016		  done
12017		fi
12018
12019		if test "$cf_have_incdir" = no ; then
12020		  if test "$cf_add_incdir" = /usr/local/include ; then
12021			if test "$GCC" = yes
12022			then
12023			  cf_save_CPPFLAGS=$CPPFLAGS
12024
12025	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12026	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12027
12028			  cat >conftest.$ac_ext <<_ACEOF
12029#line 12029 "configure"
12030#include "confdefs.h"
12031#include <stdio.h>
12032int
12033main (void)
12034{
12035printf("Hello")
12036  ;
12037  return 0;
12038}
12039_ACEOF
12040rm -f conftest.$ac_objext
12041if { (eval echo "$as_me:12041: \"$ac_compile\"") >&5
12042  (eval $ac_compile) 2>&5
12043  ac_status=$?
12044  echo "$as_me:12044: \$? = $ac_status" >&5
12045  (exit $ac_status); } &&
12046         { ac_try='test -s conftest.$ac_objext'
12047  { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048  (eval $ac_try) 2>&5
12049  ac_status=$?
12050  echo "$as_me:12050: \$? = $ac_status" >&5
12051  (exit $ac_status); }; }; then
12052  :
12053else
12054  echo "$as_me: failed program was:" >&5
12055cat conftest.$ac_ext >&5
12056cf_have_incdir=yes
12057fi
12058rm -f conftest.$ac_objext conftest.$ac_ext
12059			  CPPFLAGS=$cf_save_CPPFLAGS
12060			fi
12061		  fi
12062		fi
12063
12064		if test "$cf_have_incdir" = no ; then
12065		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
12066
12067echo "${as_me:-configure}:12067: testing adding $cf_add_incdir to include-path ..." 1>&5
12068
12069		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12070
12071		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12072		  test "$cf_top_incdir" = "$cf_add_incdir" && break
12073		  cf_add_incdir="$cf_top_incdir"
12074		else
12075		  break
12076		fi
12077	  else
12078		break
12079	  fi
12080	done
12081  done
12082fi
12083
12084if test -n "$cf_cv_curses_dir/lib" ; then
12085	for cf_add_libdir in $cf_cv_curses_dir/lib
12086	do
12087		if test $cf_add_libdir = /usr/lib ; then
12088			:
12089		elif test -d $cf_add_libdir
12090		then
12091			cf_have_libdir=no
12092			if test -n "$LDFLAGS$LIBS" ; then
12093				# a loop is needed to ensure we can add subdirs of existing dirs
12094				for cf_test_libdir in $LDFLAGS $LIBS ; do
12095					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12096						cf_have_libdir=yes; break
12097					fi
12098				done
12099			fi
12100			if test "$cf_have_libdir" = no ; then
12101				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12102
12103echo "${as_me:-configure}:12103: testing adding $cf_add_libdir to library-path ..." 1>&5
12104
12105				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12106			fi
12107		fi
12108	done
12109fi
12110
12111	fi
12112fi
12113
12114cf_cv_screen=curses
12115
12116echo "$as_me:12116: checking for specified curses library type" >&5
12117echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
12118
12119# Check whether --with-screen or --without-screen was given.
12120if test "${with_screen+set}" = set; then
12121  withval="$with_screen"
12122  cf_cv_screen=$withval
12123else
12124
12125# Check whether --with-ncursesw or --without-ncursesw was given.
12126if test "${with_ncursesw+set}" = set; then
12127  withval="$with_ncursesw"
12128  cf_cv_screen=ncursesw
12129else
12130
12131# Check whether --with-ncurses or --without-ncurses was given.
12132if test "${with_ncurses+set}" = set; then
12133  withval="$with_ncurses"
12134  cf_cv_screen=ncurses
12135else
12136
12137# Check whether --with-pdcurses or --without-pdcurses was given.
12138if test "${with_pdcurses+set}" = set; then
12139  withval="$with_pdcurses"
12140  cf_cv_screen=pdcurses
12141else
12142
12143# Check whether --with-curses-colr or --without-curses-colr was given.
12144if test "${with_curses_colr+set}" = set; then
12145  withval="$with_curses_colr"
12146  cf_cv_screen=curses_colr
12147else
12148
12149# Check whether --with-curses-5lib or --without-curses-5lib was given.
12150if test "${with_curses_5lib+set}" = set; then
12151  withval="$with_curses_5lib"
12152  cf_cv_screen=curses_5lib
12153fi;
12154fi;
12155fi;
12156fi;
12157fi;
12158fi;
12159
12160echo "$as_me:12160: result: $cf_cv_screen" >&5
12161echo "${ECHO_T}$cf_cv_screen" >&6
12162
12163case $cf_cv_screen in
12164(curses|curses_*)
12165
12166echo "$as_me:12166: checking for extra include directories" >&5
12167echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
12168if test "${cf_cv_curses_incdir+set}" = set; then
12169  echo $ECHO_N "(cached) $ECHO_C" >&6
12170else
12171
12172cf_cv_curses_incdir=no
12173case $host_os in
12174(hpux10.*)
12175	if test "x$cf_cv_screen" = "xcurses_colr"
12176	then
12177		test -d /usr/include/curses_colr && \
12178		cf_cv_curses_incdir="-I/usr/include/curses_colr"
12179	fi
12180	;;
12181(sunos3*|sunos4*)
12182	if test "x$cf_cv_screen" = "xcurses_5lib"
12183	then
12184		test -d /usr/5lib && \
12185		test -d /usr/5include && \
12186		cf_cv_curses_incdir="-I/usr/5include"
12187	fi
12188	;;
12189esac
12190
12191fi
12192echo "$as_me:12192: result: $cf_cv_curses_incdir" >&5
12193echo "${ECHO_T}$cf_cv_curses_incdir" >&6
12194if test "$cf_cv_curses_incdir" != no
12195then
12196
12197	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12198	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
12199
12200fi
12201
12202echo "$as_me:12202: checking if we have identified curses headers" >&5
12203echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
12204if test "${cf_cv_ncurses_header+set}" = set; then
12205  echo $ECHO_N "(cached) $ECHO_C" >&6
12206else
12207
12208cf_cv_ncurses_header=none
12209for cf_header in \
12210	ncurses.h  \
12211	curses.h  ncurses/ncurses.h ncurses/curses.h
12212do
12213cat >conftest.$ac_ext <<_ACEOF
12214#line 12214 "configure"
12215#include "confdefs.h"
12216#include <${cf_header}>
12217int
12218main (void)
12219{
12220initscr(); tgoto("?", 0,0)
12221  ;
12222  return 0;
12223}
12224_ACEOF
12225rm -f conftest.$ac_objext
12226if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227  (eval $ac_compile) 2>&5
12228  ac_status=$?
12229  echo "$as_me:12229: \$? = $ac_status" >&5
12230  (exit $ac_status); } &&
12231         { ac_try='test -s conftest.$ac_objext'
12232  { (eval echo "$as_me:12232: \"$ac_try\"") >&5
12233  (eval $ac_try) 2>&5
12234  ac_status=$?
12235  echo "$as_me:12235: \$? = $ac_status" >&5
12236  (exit $ac_status); }; }; then
12237  cf_cv_ncurses_header=$cf_header; break
12238else
12239  echo "$as_me: failed program was:" >&5
12240cat conftest.$ac_ext >&5
12241fi
12242rm -f conftest.$ac_objext conftest.$ac_ext
12243done
12244
12245fi
12246echo "$as_me:12246: result: $cf_cv_ncurses_header" >&5
12247echo "${ECHO_T}$cf_cv_ncurses_header" >&6
12248
12249if test "$cf_cv_ncurses_header" = none ; then
12250	{ { echo "$as_me:12250: error: No curses header-files found" >&5
12251echo "$as_me: error: No curses header-files found" >&2;}
12252   { (exit 1); exit 1; }; }
12253fi
12254
12255# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
12256
12257for ac_header in $cf_cv_ncurses_header
12258do
12259as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12260echo "$as_me:12260: checking for $ac_header" >&5
12261echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12262if eval "test \"\${$as_ac_Header+set}\" = set"; then
12263  echo $ECHO_N "(cached) $ECHO_C" >&6
12264else
12265  cat >conftest.$ac_ext <<_ACEOF
12266#line 12266 "configure"
12267#include "confdefs.h"
12268#include <$ac_header>
12269_ACEOF
12270if { (eval echo "$as_me:12270: \"$ac_cpp conftest.$ac_ext\"") >&5
12271  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12272  ac_status=$?
12273  egrep -v '^ *\+' conftest.er1 >conftest.err
12274  rm -f conftest.er1
12275  cat conftest.err >&5
12276  echo "$as_me:12276: \$? = $ac_status" >&5
12277  (exit $ac_status); } >/dev/null; then
12278  if test -s conftest.err; then
12279    ac_cpp_err=$ac_c_preproc_warn_flag
12280  else
12281    ac_cpp_err=
12282  fi
12283else
12284  ac_cpp_err=yes
12285fi
12286if test -z "$ac_cpp_err"; then
12287  eval "$as_ac_Header=yes"
12288else
12289  echo "$as_me: failed program was:" >&5
12290  cat conftest.$ac_ext >&5
12291  eval "$as_ac_Header=no"
12292fi
12293rm -f conftest.err conftest.$ac_ext
12294fi
12295echo "$as_me:12295: result: `eval echo '${'$as_ac_Header'}'`" >&5
12296echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12297if test `eval echo '${'$as_ac_Header'}'` = yes; then
12298  cat >>confdefs.h <<EOF
12299#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12300EOF
12301
12302fi
12303done
12304
12305echo "$as_me:12305: checking for terminfo header" >&5
12306echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12307if test "${cf_cv_term_header+set}" = set; then
12308  echo $ECHO_N "(cached) $ECHO_C" >&6
12309else
12310
12311case ${cf_cv_ncurses_header} in
12312(*/ncurses.h|*/ncursesw.h)
12313	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12314	;;
12315(*)
12316	cf_term_header=term.h
12317	;;
12318esac
12319
12320for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12321do
12322cat >conftest.$ac_ext <<_ACEOF
12323#line 12323 "configure"
12324#include "confdefs.h"
12325#include <stdio.h>
12326#include <${cf_cv_ncurses_header:-curses.h}>
12327#include <$cf_test>
12328
12329int
12330main (void)
12331{
12332int x = auto_left_margin
12333  ;
12334  return 0;
12335}
12336_ACEOF
12337rm -f conftest.$ac_objext
12338if { (eval echo "$as_me:12338: \"$ac_compile\"") >&5
12339  (eval $ac_compile) 2>&5
12340  ac_status=$?
12341  echo "$as_me:12341: \$? = $ac_status" >&5
12342  (exit $ac_status); } &&
12343         { ac_try='test -s conftest.$ac_objext'
12344  { (eval echo "$as_me:12344: \"$ac_try\"") >&5
12345  (eval $ac_try) 2>&5
12346  ac_status=$?
12347  echo "$as_me:12347: \$? = $ac_status" >&5
12348  (exit $ac_status); }; }; then
12349
12350	cf_cv_term_header="$cf_test"
12351else
12352  echo "$as_me: failed program was:" >&5
12353cat conftest.$ac_ext >&5
12354
12355	cf_cv_term_header=unknown
12356
12357fi
12358rm -f conftest.$ac_objext conftest.$ac_ext
12359	test "$cf_cv_term_header" != unknown && break
12360done
12361
12362fi
12363echo "$as_me:12363: result: $cf_cv_term_header" >&5
12364echo "${ECHO_T}$cf_cv_term_header" >&6
12365
12366# Set definitions to allow ifdef'ing to accommodate subdirectories
12367
12368case $cf_cv_term_header in
12369(*term.h)
12370
12371cat >>confdefs.h <<\EOF
12372#define HAVE_TERM_H 1
12373EOF
12374
12375	;;
12376esac
12377
12378case $cf_cv_term_header in
12379(ncurses/term.h)
12380
12381cat >>confdefs.h <<\EOF
12382#define HAVE_NCURSES_TERM_H 1
12383EOF
12384
12385	;;
12386(ncursesw/term.h)
12387
12388cat >>confdefs.h <<\EOF
12389#define HAVE_NCURSESW_TERM_H 1
12390EOF
12391
12392	;;
12393esac
12394
12395echo "$as_me:12395: checking for ncurses version" >&5
12396echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12397if test "${cf_cv_ncurses_version+set}" = set; then
12398  echo $ECHO_N "(cached) $ECHO_C" >&6
12399else
12400
12401	cf_cv_ncurses_version=no
12402	cf_tempfile=out$$
12403	rm -f $cf_tempfile
12404	if test "$cross_compiling" = yes; then
12405
12406	# This will not work if the preprocessor splits the line after the
12407	# Autoconf token.  The 'unproto' program does that.
12408	cat > conftest.$ac_ext <<EOF
12409#include <${cf_cv_ncurses_header:-curses.h}>
12410#undef Autoconf
12411#ifdef NCURSES_VERSION
12412Autoconf NCURSES_VERSION
12413#else
12414#ifdef __NCURSES_H
12415Autoconf "old"
12416#endif
12417;
12418#endif
12419EOF
12420	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12421	{ (eval echo "$as_me:12421: \"$cf_try\"") >&5
12422  (eval $cf_try) 2>&5
12423  ac_status=$?
12424  echo "$as_me:12424: \$? = $ac_status" >&5
12425  (exit $ac_status); }
12426	if test -f conftest.out ; then
12427		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
12428		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12429		rm -f conftest.out
12430	fi
12431
12432else
12433  cat >conftest.$ac_ext <<_ACEOF
12434#line 12434 "configure"
12435#include "confdefs.h"
12436
12437#include <${cf_cv_ncurses_header:-curses.h}>
12438#include <stdio.h>
12439int main(void)
12440{
12441	FILE *fp = fopen("$cf_tempfile", "w");
12442#ifdef NCURSES_VERSION
12443# ifdef NCURSES_VERSION_PATCH
12444	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12445# else
12446	fprintf(fp, "%s\n", NCURSES_VERSION);
12447# endif
12448#else
12449# ifdef __NCURSES_H
12450	fprintf(fp, "old\n");
12451# else
12452	make an error
12453# endif
12454#endif
12455	${cf_cv_main_return:-return}(0);
12456}
12457_ACEOF
12458rm -f conftest$ac_exeext
12459if { (eval echo "$as_me:12459: \"$ac_link\"") >&5
12460  (eval $ac_link) 2>&5
12461  ac_status=$?
12462  echo "$as_me:12462: \$? = $ac_status" >&5
12463  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12464  { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465  (eval $ac_try) 2>&5
12466  ac_status=$?
12467  echo "$as_me:12467: \$? = $ac_status" >&5
12468  (exit $ac_status); }; }; then
12469
12470	cf_cv_ncurses_version=`cat $cf_tempfile`
12471else
12472  echo "$as_me: program exited with status $ac_status" >&5
12473echo "$as_me: failed program was:" >&5
12474cat conftest.$ac_ext >&5
12475fi
12476rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12477fi
12478	rm -f $cf_tempfile
12479
12480fi
12481echo "$as_me:12481: result: $cf_cv_ncurses_version" >&5
12482echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12483test "$cf_cv_ncurses_version" = no ||
12484cat >>confdefs.h <<\EOF
12485#define NCURSES 1
12486EOF
12487
12488echo "$as_me:12488: checking if we have identified curses libraries" >&5
12489echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
12490cat >conftest.$ac_ext <<_ACEOF
12491#line 12491 "configure"
12492#include "confdefs.h"
12493#include <${cf_cv_ncurses_header:-curses.h}>
12494int
12495main (void)
12496{
12497initscr(); tgoto("?", 0,0)
12498  ;
12499  return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext conftest$ac_exeext
12503if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
12504  (eval $ac_link) 2>&5
12505  ac_status=$?
12506  echo "$as_me:12506: \$? = $ac_status" >&5
12507  (exit $ac_status); } &&
12508         { ac_try='test -s conftest$ac_exeext'
12509  { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510  (eval $ac_try) 2>&5
12511  ac_status=$?
12512  echo "$as_me:12512: \$? = $ac_status" >&5
12513  (exit $ac_status); }; }; then
12514  cf_result=yes
12515else
12516  echo "$as_me: failed program was:" >&5
12517cat conftest.$ac_ext >&5
12518cf_result=no
12519fi
12520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12521echo "$as_me:12521: result: $cf_result" >&5
12522echo "${ECHO_T}$cf_result" >&6
12523
12524if test "$cf_result" = no ; then
12525case $host_os in
12526(freebsd*)
12527	echo "$as_me:12527: checking for tgoto in -lmytinfo" >&5
12528echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12529if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12530  echo $ECHO_N "(cached) $ECHO_C" >&6
12531else
12532  ac_check_lib_save_LIBS=$LIBS
12533LIBS="-lmytinfo  $LIBS"
12534cat >conftest.$ac_ext <<_ACEOF
12535#line 12535 "configure"
12536#include "confdefs.h"
12537
12538/* Override any gcc2 internal prototype to avoid an error.  */
12539#ifdef __cplusplus
12540extern "C"
12541#endif
12542/* We use char because int might match the return type of a gcc2
12543   builtin and then its argument prototype would still apply.  */
12544char tgoto ();
12545int
12546main (void)
12547{
12548tgoto ();
12549  ;
12550  return 0;
12551}
12552_ACEOF
12553rm -f conftest.$ac_objext conftest$ac_exeext
12554if { (eval echo "$as_me:12554: \"$ac_link\"") >&5
12555  (eval $ac_link) 2>&5
12556  ac_status=$?
12557  echo "$as_me:12557: \$? = $ac_status" >&5
12558  (exit $ac_status); } &&
12559         { ac_try='test -s conftest$ac_exeext'
12560  { (eval echo "$as_me:12560: \"$ac_try\"") >&5
12561  (eval $ac_try) 2>&5
12562  ac_status=$?
12563  echo "$as_me:12563: \$? = $ac_status" >&5
12564  (exit $ac_status); }; }; then
12565  ac_cv_lib_mytinfo_tgoto=yes
12566else
12567  echo "$as_me: failed program was:" >&5
12568cat conftest.$ac_ext >&5
12569ac_cv_lib_mytinfo_tgoto=no
12570fi
12571rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12572LIBS=$ac_check_lib_save_LIBS
12573fi
12574echo "$as_me:12574: result: $ac_cv_lib_mytinfo_tgoto" >&5
12575echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12576if test $ac_cv_lib_mytinfo_tgoto = yes; then
12577
12578cf_add_libs="-lmytinfo"
12579# Filter out duplicates - this happens with badly-designed ".pc" files...
12580for cf_add_1lib in $LIBS
12581do
12582	for cf_add_2lib in $cf_add_libs
12583	do
12584		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12585		then
12586			cf_add_1lib=
12587			break
12588		fi
12589	done
12590	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12591done
12592LIBS="$cf_add_libs"
12593
12594fi
12595
12596	;;
12597(hpux10.*)
12598	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
12599	# next (1998), and xcurses "newer" (2000).  There is no header file for
12600	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
12601	# term.h) for cur_colr
12602	if test "x$cf_cv_screen" = "xcurses_colr"
12603	then
12604		echo "$as_me:12604: checking for initscr in -lcur_colr" >&5
12605echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
12606if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
12607  echo $ECHO_N "(cached) $ECHO_C" >&6
12608else
12609  ac_check_lib_save_LIBS=$LIBS
12610LIBS="-lcur_colr  $LIBS"
12611cat >conftest.$ac_ext <<_ACEOF
12612#line 12612 "configure"
12613#include "confdefs.h"
12614
12615/* Override any gcc2 internal prototype to avoid an error.  */
12616#ifdef __cplusplus
12617extern "C"
12618#endif
12619/* We use char because int might match the return type of a gcc2
12620   builtin and then its argument prototype would still apply.  */
12621char initscr ();
12622int
12623main (void)
12624{
12625initscr ();
12626  ;
12627  return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext conftest$ac_exeext
12631if { (eval echo "$as_me:12631: \"$ac_link\"") >&5
12632  (eval $ac_link) 2>&5
12633  ac_status=$?
12634  echo "$as_me:12634: \$? = $ac_status" >&5
12635  (exit $ac_status); } &&
12636         { ac_try='test -s conftest$ac_exeext'
12637  { (eval echo "$as_me:12637: \"$ac_try\"") >&5
12638  (eval $ac_try) 2>&5
12639  ac_status=$?
12640  echo "$as_me:12640: \$? = $ac_status" >&5
12641  (exit $ac_status); }; }; then
12642  ac_cv_lib_cur_colr_initscr=yes
12643else
12644  echo "$as_me: failed program was:" >&5
12645cat conftest.$ac_ext >&5
12646ac_cv_lib_cur_colr_initscr=no
12647fi
12648rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12649LIBS=$ac_check_lib_save_LIBS
12650fi
12651echo "$as_me:12651: result: $ac_cv_lib_cur_colr_initscr" >&5
12652echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
12653if test $ac_cv_lib_cur_colr_initscr = yes; then
12654
12655cf_add_libs="-lcur_colr"
12656# Filter out duplicates - this happens with badly-designed ".pc" files...
12657for cf_add_1lib in $LIBS
12658do
12659	for cf_add_2lib in $cf_add_libs
12660	do
12661		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12662		then
12663			cf_add_1lib=
12664			break
12665		fi
12666	done
12667	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12668done
12669LIBS="$cf_add_libs"
12670
12671			ac_cv_func_initscr=yes
12672
12673else
12674
12675		echo "$as_me:12675: checking for initscr in -lHcurses" >&5
12676echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
12677if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
12678  echo $ECHO_N "(cached) $ECHO_C" >&6
12679else
12680  ac_check_lib_save_LIBS=$LIBS
12681LIBS="-lHcurses  $LIBS"
12682cat >conftest.$ac_ext <<_ACEOF
12683#line 12683 "configure"
12684#include "confdefs.h"
12685
12686/* Override any gcc2 internal prototype to avoid an error.  */
12687#ifdef __cplusplus
12688extern "C"
12689#endif
12690/* We use char because int might match the return type of a gcc2
12691   builtin and then its argument prototype would still apply.  */
12692char initscr ();
12693int
12694main (void)
12695{
12696initscr ();
12697  ;
12698  return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext conftest$ac_exeext
12702if { (eval echo "$as_me:12702: \"$ac_link\"") >&5
12703  (eval $ac_link) 2>&5
12704  ac_status=$?
12705  echo "$as_me:12705: \$? = $ac_status" >&5
12706  (exit $ac_status); } &&
12707         { ac_try='test -s conftest$ac_exeext'
12708  { (eval echo "$as_me:12708: \"$ac_try\"") >&5
12709  (eval $ac_try) 2>&5
12710  ac_status=$?
12711  echo "$as_me:12711: \$? = $ac_status" >&5
12712  (exit $ac_status); }; }; then
12713  ac_cv_lib_Hcurses_initscr=yes
12714else
12715  echo "$as_me: failed program was:" >&5
12716cat conftest.$ac_ext >&5
12717ac_cv_lib_Hcurses_initscr=no
12718fi
12719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12720LIBS=$ac_check_lib_save_LIBS
12721fi
12722echo "$as_me:12722: result: $ac_cv_lib_Hcurses_initscr" >&5
12723echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
12724if test $ac_cv_lib_Hcurses_initscr = yes; then
12725
12726			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
12727
12728cf_add_libs="-lHcurses"
12729# Filter out duplicates - this happens with badly-designed ".pc" files...
12730for cf_add_1lib in $LIBS
12731do
12732	for cf_add_2lib in $cf_add_libs
12733	do
12734		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12735		then
12736			cf_add_1lib=
12737			break
12738		fi
12739	done
12740	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12741done
12742LIBS="$cf_add_libs"
12743
12744	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12745	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
12746
12747			ac_cv_func_initscr=yes
12748
12749fi
12750
12751fi
12752
12753	fi
12754	;;
12755(linux*)
12756	case `arch 2>/dev/null` in
12757	(x86_64)
12758		if test -d /lib64
12759		then
12760
12761if test -n "/lib64" ; then
12762	for cf_add_libdir in /lib64
12763	do
12764		if test $cf_add_libdir = /usr/lib ; then
12765			:
12766		elif test -d $cf_add_libdir
12767		then
12768			cf_have_libdir=no
12769			if test -n "$LDFLAGS$LIBS" ; then
12770				# a loop is needed to ensure we can add subdirs of existing dirs
12771				for cf_test_libdir in $LDFLAGS $LIBS ; do
12772					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12773						cf_have_libdir=yes; break
12774					fi
12775				done
12776			fi
12777			if test "$cf_have_libdir" = no ; then
12778				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12779
12780echo "${as_me:-configure}:12780: testing adding $cf_add_libdir to library-path ..." 1>&5
12781
12782				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12783			fi
12784		fi
12785	done
12786fi
12787
12788		else
12789
12790if test -n "/lib" ; then
12791	for cf_add_libdir in /lib
12792	do
12793		if test $cf_add_libdir = /usr/lib ; then
12794			:
12795		elif test -d $cf_add_libdir
12796		then
12797			cf_have_libdir=no
12798			if test -n "$LDFLAGS$LIBS" ; then
12799				# a loop is needed to ensure we can add subdirs of existing dirs
12800				for cf_test_libdir in $LDFLAGS $LIBS ; do
12801					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12802						cf_have_libdir=yes; break
12803					fi
12804				done
12805			fi
12806			if test "$cf_have_libdir" = no ; then
12807				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12808
12809echo "${as_me:-configure}:12809: testing adding $cf_add_libdir to library-path ..." 1>&5
12810
12811				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12812			fi
12813		fi
12814	done
12815fi
12816
12817		fi
12818		;;
12819	(*)
12820
12821if test -n "/lib" ; then
12822	for cf_add_libdir in /lib
12823	do
12824		if test $cf_add_libdir = /usr/lib ; then
12825			:
12826		elif test -d $cf_add_libdir
12827		then
12828			cf_have_libdir=no
12829			if test -n "$LDFLAGS$LIBS" ; then
12830				# a loop is needed to ensure we can add subdirs of existing dirs
12831				for cf_test_libdir in $LDFLAGS $LIBS ; do
12832					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12833						cf_have_libdir=yes; break
12834					fi
12835				done
12836			fi
12837			if test "$cf_have_libdir" = no ; then
12838				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12839
12840echo "${as_me:-configure}:12840: testing adding $cf_add_libdir to library-path ..." 1>&5
12841
12842				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12843			fi
12844		fi
12845	done
12846fi
12847
12848		;;
12849	esac
12850	;;
12851(sunos3*|sunos4*)
12852	if test "x$cf_cv_screen" = "xcurses_5lib"
12853	then
12854		if test -d /usr/5lib ; then
12855
12856if test -n "/usr/5lib" ; then
12857	for cf_add_libdir in /usr/5lib
12858	do
12859		if test $cf_add_libdir = /usr/lib ; then
12860			:
12861		elif test -d $cf_add_libdir
12862		then
12863			cf_have_libdir=no
12864			if test -n "$LDFLAGS$LIBS" ; then
12865				# a loop is needed to ensure we can add subdirs of existing dirs
12866				for cf_test_libdir in $LDFLAGS $LIBS ; do
12867					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12868						cf_have_libdir=yes; break
12869					fi
12870				done
12871			fi
12872			if test "$cf_have_libdir" = no ; then
12873				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12874
12875echo "${as_me:-configure}:12875: testing adding $cf_add_libdir to library-path ..." 1>&5
12876
12877				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12878			fi
12879		fi
12880	done
12881fi
12882
12883cf_add_libs="-lcurses -ltermcap"
12884# Filter out duplicates - this happens with badly-designed ".pc" files...
12885for cf_add_1lib in $LIBS
12886do
12887	for cf_add_2lib in $cf_add_libs
12888	do
12889		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12890		then
12891			cf_add_1lib=
12892			break
12893		fi
12894	done
12895	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12896done
12897LIBS="$cf_add_libs"
12898
12899		fi
12900	fi
12901	ac_cv_func_initscr=yes
12902	;;
12903esac
12904
12905if test ".$ac_cv_func_initscr" != .yes ; then
12906	cf_save_LIBS="$LIBS"
12907
12908	if test ".${cf_cv_ncurses_version:-no}" != .no
12909	then
12910		cf_check_list="ncurses curses cursesX"
12911	else
12912		cf_check_list="cursesX curses ncurses"
12913	fi
12914
12915	# Check for library containing tgoto.  Do this before curses library
12916	# because it may be needed to link the test-case for initscr.
12917	if test "x$cf_term_lib" = x
12918	then
12919		echo "$as_me:12919: checking for tgoto" >&5
12920echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
12921if test "${ac_cv_func_tgoto+set}" = set; then
12922  echo $ECHO_N "(cached) $ECHO_C" >&6
12923else
12924  cat >conftest.$ac_ext <<_ACEOF
12925#line 12925 "configure"
12926#include "confdefs.h"
12927/* System header to define __stub macros and hopefully few prototypes,
12928    which can conflict with char tgoto (); below.  */
12929#include <assert.h>
12930/* Override any gcc2 internal prototype to avoid an error.  */
12931#ifdef __cplusplus
12932extern "C"
12933#endif
12934/* We use char because int might match the return type of a gcc2
12935   builtin and then its argument prototype would still apply.  */
12936char tgoto ();
12937char (*f) ();
12938
12939int
12940main (void)
12941{
12942/* The GNU C library defines this for functions which it implements
12943    to always fail with ENOSYS.  Some functions are actually named
12944    something starting with __ and the normal name is an alias.  */
12945#if defined (__stub_tgoto) || defined (__stub___tgoto)
12946choke me
12947#else
12948f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12949#endif
12950
12951  ;
12952  return 0;
12953}
12954_ACEOF
12955rm -f conftest.$ac_objext conftest$ac_exeext
12956if { (eval echo "$as_me:12956: \"$ac_link\"") >&5
12957  (eval $ac_link) 2>&5
12958  ac_status=$?
12959  echo "$as_me:12959: \$? = $ac_status" >&5
12960  (exit $ac_status); } &&
12961         { ac_try='test -s conftest$ac_exeext'
12962  { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963  (eval $ac_try) 2>&5
12964  ac_status=$?
12965  echo "$as_me:12965: \$? = $ac_status" >&5
12966  (exit $ac_status); }; }; then
12967  ac_cv_func_tgoto=yes
12968else
12969  echo "$as_me: failed program was:" >&5
12970cat conftest.$ac_ext >&5
12971ac_cv_func_tgoto=no
12972fi
12973rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12974fi
12975echo "$as_me:12975: result: $ac_cv_func_tgoto" >&5
12976echo "${ECHO_T}$ac_cv_func_tgoto" >&6
12977if test $ac_cv_func_tgoto = yes; then
12978  cf_term_lib=predefined
12979else
12980
12981			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
12982			do
12983				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
12984echo "$as_me:12984: checking for tgoto in -l$cf_term_lib" >&5
12985echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
12986if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12987  echo $ECHO_N "(cached) $ECHO_C" >&6
12988else
12989  ac_check_lib_save_LIBS=$LIBS
12990LIBS="-l$cf_term_lib  $LIBS"
12991cat >conftest.$ac_ext <<_ACEOF
12992#line 12992 "configure"
12993#include "confdefs.h"
12994
12995/* Override any gcc2 internal prototype to avoid an error.  */
12996#ifdef __cplusplus
12997extern "C"
12998#endif
12999/* We use char because int might match the return type of a gcc2
13000   builtin and then its argument prototype would still apply.  */
13001char tgoto ();
13002int
13003main (void)
13004{
13005tgoto ();
13006  ;
13007  return 0;
13008}
13009_ACEOF
13010rm -f conftest.$ac_objext conftest$ac_exeext
13011if { (eval echo "$as_me:13011: \"$ac_link\"") >&5
13012  (eval $ac_link) 2>&5
13013  ac_status=$?
13014  echo "$as_me:13014: \$? = $ac_status" >&5
13015  (exit $ac_status); } &&
13016         { ac_try='test -s conftest$ac_exeext'
13017  { (eval echo "$as_me:13017: \"$ac_try\"") >&5
13018  (eval $ac_try) 2>&5
13019  ac_status=$?
13020  echo "$as_me:13020: \$? = $ac_status" >&5
13021  (exit $ac_status); }; }; then
13022  eval "$as_ac_Lib=yes"
13023else
13024  echo "$as_me: failed program was:" >&5
13025cat conftest.$ac_ext >&5
13026eval "$as_ac_Lib=no"
13027fi
13028rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13029LIBS=$ac_check_lib_save_LIBS
13030fi
13031echo "$as_me:13031: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13032echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13033if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13034
13035					: ${cf_nculib_root:=$cf_term_lib}
13036					break
13037
13038fi
13039
13040			done
13041
13042fi
13043
13044	fi
13045
13046	# Check for library containing initscr
13047	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
13048	if test "x$cf_curs_lib" = x
13049	then
13050		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
13051		do
13052			LIBS="-l$cf_curs_lib $cf_save_LIBS"
13053			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
13054				echo "$as_me:13054: checking if we can link with $cf_curs_lib library" >&5
13055echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
13056				cat >conftest.$ac_ext <<_ACEOF
13057#line 13057 "configure"
13058#include "confdefs.h"
13059#include <${cf_cv_ncurses_header:-curses.h}>
13060int
13061main (void)
13062{
13063initscr()
13064  ;
13065  return 0;
13066}
13067_ACEOF
13068rm -f conftest.$ac_objext conftest$ac_exeext
13069if { (eval echo "$as_me:13069: \"$ac_link\"") >&5
13070  (eval $ac_link) 2>&5
13071  ac_status=$?
13072  echo "$as_me:13072: \$? = $ac_status" >&5
13073  (exit $ac_status); } &&
13074         { ac_try='test -s conftest$ac_exeext'
13075  { (eval echo "$as_me:13075: \"$ac_try\"") >&5
13076  (eval $ac_try) 2>&5
13077  ac_status=$?
13078  echo "$as_me:13078: \$? = $ac_status" >&5
13079  (exit $ac_status); }; }; then
13080  cf_result=yes
13081else
13082  echo "$as_me: failed program was:" >&5
13083cat conftest.$ac_ext >&5
13084cf_result=no
13085fi
13086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13087				echo "$as_me:13087: result: $cf_result" >&5
13088echo "${ECHO_T}$cf_result" >&6
13089				test $cf_result = yes && break
13090			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
13091				cf_result=no
13092			elif test "$cf_term_lib" != predefined ; then
13093				echo "$as_me:13093: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
13094echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
13095				cat >conftest.$ac_ext <<_ACEOF
13096#line 13096 "configure"
13097#include "confdefs.h"
13098#include <${cf_cv_ncurses_header:-curses.h}>
13099int
13100main (void)
13101{
13102initscr(); tgoto((char *)0, 0, 0);
13103  ;
13104  return 0;
13105}
13106_ACEOF
13107rm -f conftest.$ac_objext conftest$ac_exeext
13108if { (eval echo "$as_me:13108: \"$ac_link\"") >&5
13109  (eval $ac_link) 2>&5
13110  ac_status=$?
13111  echo "$as_me:13111: \$? = $ac_status" >&5
13112  (exit $ac_status); } &&
13113         { ac_try='test -s conftest$ac_exeext'
13114  { (eval echo "$as_me:13114: \"$ac_try\"") >&5
13115  (eval $ac_try) 2>&5
13116  ac_status=$?
13117  echo "$as_me:13117: \$? = $ac_status" >&5
13118  (exit $ac_status); }; }; then
13119  cf_result=no
13120else
13121  echo "$as_me: failed program was:" >&5
13122cat conftest.$ac_ext >&5
13123
13124					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
13125					cat >conftest.$ac_ext <<_ACEOF
13126#line 13126 "configure"
13127#include "confdefs.h"
13128#include <${cf_cv_ncurses_header:-curses.h}>
13129int
13130main (void)
13131{
13132initscr()
13133  ;
13134  return 0;
13135}
13136_ACEOF
13137rm -f conftest.$ac_objext conftest$ac_exeext
13138if { (eval echo "$as_me:13138: \"$ac_link\"") >&5
13139  (eval $ac_link) 2>&5
13140  ac_status=$?
13141  echo "$as_me:13141: \$? = $ac_status" >&5
13142  (exit $ac_status); } &&
13143         { ac_try='test -s conftest$ac_exeext'
13144  { (eval echo "$as_me:13144: \"$ac_try\"") >&5
13145  (eval $ac_try) 2>&5
13146  ac_status=$?
13147  echo "$as_me:13147: \$? = $ac_status" >&5
13148  (exit $ac_status); }; }; then
13149  cf_result=yes
13150else
13151  echo "$as_me: failed program was:" >&5
13152cat conftest.$ac_ext >&5
13153cf_result=error
13154fi
13155rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13156
13157fi
13158rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13159				echo "$as_me:13159: result: $cf_result" >&5
13160echo "${ECHO_T}$cf_result" >&6
13161				test $cf_result != error && break
13162			fi
13163		done
13164	fi
13165	test $cf_curs_lib = unknown && { { echo "$as_me:13165: error: no curses library found" >&5
13166echo "$as_me: error: no curses library found" >&2;}
13167   { (exit 1); exit 1; }; }
13168fi
13169fi
13170
13171	;;
13172(ncursesw*)
13173
13174echo "$as_me:13174: checking for multibyte character support" >&5
13175echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
13176if test "${cf_cv_utf8_lib+set}" = set; then
13177  echo $ECHO_N "(cached) $ECHO_C" >&6
13178else
13179
13180	cf_save_LIBS="$LIBS"
13181	cat >conftest.$ac_ext <<_ACEOF
13182#line 13182 "configure"
13183#include "confdefs.h"
13184
13185#include <stdlib.h>
13186int
13187main (void)
13188{
13189putwc(0,0);
13190  ;
13191  return 0;
13192}
13193_ACEOF
13194rm -f conftest.$ac_objext conftest$ac_exeext
13195if { (eval echo "$as_me:13195: \"$ac_link\"") >&5
13196  (eval $ac_link) 2>&5
13197  ac_status=$?
13198  echo "$as_me:13198: \$? = $ac_status" >&5
13199  (exit $ac_status); } &&
13200         { ac_try='test -s conftest$ac_exeext'
13201  { (eval echo "$as_me:13201: \"$ac_try\"") >&5
13202  (eval $ac_try) 2>&5
13203  ac_status=$?
13204  echo "$as_me:13204: \$? = $ac_status" >&5
13205  (exit $ac_status); }; }; then
13206  cf_cv_utf8_lib=yes
13207else
13208  echo "$as_me: failed program was:" >&5
13209cat conftest.$ac_ext >&5
13210
13211# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13212# will be set on completion of the AC_TRY_LINK below.
13213cf_cv_header_path_utf8=
13214cf_cv_library_path_utf8=
13215
13216echo "${as_me:-configure}:13216: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13217
13218cf_save_LIBS="$LIBS"
13219
13220cat >conftest.$ac_ext <<_ACEOF
13221#line 13221 "configure"
13222#include "confdefs.h"
13223
13224#include <libutf8.h>
13225int
13226main (void)
13227{
13228putwc(0,0);
13229  ;
13230  return 0;
13231}
13232_ACEOF
13233rm -f conftest.$ac_objext conftest$ac_exeext
13234if { (eval echo "$as_me:13234: \"$ac_link\"") >&5
13235  (eval $ac_link) 2>&5
13236  ac_status=$?
13237  echo "$as_me:13237: \$? = $ac_status" >&5
13238  (exit $ac_status); } &&
13239         { ac_try='test -s conftest$ac_exeext'
13240  { (eval echo "$as_me:13240: \"$ac_try\"") >&5
13241  (eval $ac_try) 2>&5
13242  ac_status=$?
13243  echo "$as_me:13243: \$? = $ac_status" >&5
13244  (exit $ac_status); }; }; then
13245
13246	cf_cv_find_linkage_utf8=yes
13247	cf_cv_header_path_utf8=/usr/include
13248	cf_cv_library_path_utf8=/usr/lib
13249
13250else
13251  echo "$as_me: failed program was:" >&5
13252cat conftest.$ac_ext >&5
13253
13254LIBS="-lutf8  $cf_save_LIBS"
13255
13256cat >conftest.$ac_ext <<_ACEOF
13257#line 13257 "configure"
13258#include "confdefs.h"
13259
13260#include <libutf8.h>
13261int
13262main (void)
13263{
13264putwc(0,0);
13265  ;
13266  return 0;
13267}
13268_ACEOF
13269rm -f conftest.$ac_objext conftest$ac_exeext
13270if { (eval echo "$as_me:13270: \"$ac_link\"") >&5
13271  (eval $ac_link) 2>&5
13272  ac_status=$?
13273  echo "$as_me:13273: \$? = $ac_status" >&5
13274  (exit $ac_status); } &&
13275         { ac_try='test -s conftest$ac_exeext'
13276  { (eval echo "$as_me:13276: \"$ac_try\"") >&5
13277  (eval $ac_try) 2>&5
13278  ac_status=$?
13279  echo "$as_me:13279: \$? = $ac_status" >&5
13280  (exit $ac_status); }; }; then
13281
13282	cf_cv_find_linkage_utf8=yes
13283	cf_cv_header_path_utf8=/usr/include
13284	cf_cv_library_path_utf8=/usr/lib
13285	cf_cv_library_file_utf8="-lutf8"
13286
13287else
13288  echo "$as_me: failed program was:" >&5
13289cat conftest.$ac_ext >&5
13290
13291	cf_cv_find_linkage_utf8=no
13292	LIBS="$cf_save_LIBS"
13293
13294	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
13295
13296echo "${as_me:-configure}:13296: testing find linkage for utf8 library ..." 1>&5
13297
13298echo "${as_me:-configure}:13298: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13299
13300	cf_save_CPPFLAGS="$CPPFLAGS"
13301	cf_test_CPPFLAGS="$CPPFLAGS"
13302
13303cf_search=
13304
13305# collect the current set of include-directories from compiler flags
13306cf_header_path_list=""
13307if test -n "${CFLAGS}${CPPFLAGS}" ; then
13308	for cf_header_path in $CPPFLAGS $CFLAGS
13309	do
13310		case $cf_header_path in
13311		(-I*)
13312			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13313
13314test "x$cf_header_path" != "xNONE" && \
13315test -d "$cf_header_path" && \
13316 {
13317	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
13318	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
13319	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
13320	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13321	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
13322	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13323}
13324
13325			cf_header_path_list="$cf_header_path_list $cf_search"
13326			;;
13327		esac
13328	done
13329fi
13330
13331# add the variations for the package we are looking for
13332
13333cf_search=
13334
13335test "x$prefix" != "xNONE" && \
13336test -d "$prefix" && \
13337 {
13338	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
13339	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
13340	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
13341	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
13342	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
13343	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13344}
13345
13346for cf_subdir_prefix in \
13347	/usr \
13348	/usr/local \
13349	/usr/pkg \
13350	/opt \
13351	/opt/local \
13352	$HOME
13353do
13354
13355test "x$cf_subdir_prefix" != "x$prefix" && \
13356test -d "$cf_subdir_prefix" && \
13357(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13358	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
13359	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
13360	test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13361	test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13362	test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13363	test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13364}
13365
13366done
13367
13368test "$includedir" != NONE && \
13369test "$includedir" != "/usr/include" && \
13370test -d "$includedir" && {
13371	test -d $includedir &&    cf_search="$cf_search $includedir"
13372	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
13373}
13374
13375test "$oldincludedir" != NONE && \
13376test "$oldincludedir" != "/usr/include" && \
13377test -d "$oldincludedir" && {
13378	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
13379	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
13380}
13381
13382cf_search="$cf_search $cf_header_path_list"
13383
13384	for cf_cv_header_path_utf8 in $cf_search
13385	do
13386		if test -d $cf_cv_header_path_utf8 ; then
13387			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
13388
13389echo "${as_me:-configure}:13389: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13390
13391			CPPFLAGS="$cf_save_CPPFLAGS"
13392
13393	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13394	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13395
13396			cat >conftest.$ac_ext <<_ACEOF
13397#line 13397 "configure"
13398#include "confdefs.h"
13399
13400#include <libutf8.h>
13401int
13402main (void)
13403{
13404putwc(0,0);
13405  ;
13406  return 0;
13407}
13408_ACEOF
13409rm -f conftest.$ac_objext
13410if { (eval echo "$as_me:13410: \"$ac_compile\"") >&5
13411  (eval $ac_compile) 2>&5
13412  ac_status=$?
13413  echo "$as_me:13413: \$? = $ac_status" >&5
13414  (exit $ac_status); } &&
13415         { ac_try='test -s conftest.$ac_objext'
13416  { (eval echo "$as_me:13416: \"$ac_try\"") >&5
13417  (eval $ac_try) 2>&5
13418  ac_status=$?
13419  echo "$as_me:13419: \$? = $ac_status" >&5
13420  (exit $ac_status); }; }; then
13421
13422				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13423
13424echo "${as_me:-configure}:13424: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13425
13426				cf_cv_find_linkage_utf8=maybe
13427				cf_test_CPPFLAGS="$CPPFLAGS"
13428				break
13429else
13430  echo "$as_me: failed program was:" >&5
13431cat conftest.$ac_ext >&5
13432
13433				CPPFLAGS="$cf_save_CPPFLAGS"
13434
13435fi
13436rm -f conftest.$ac_objext conftest.$ac_ext
13437		fi
13438	done
13439
13440	if test "$cf_cv_find_linkage_utf8" = maybe ; then
13441
13442echo "${as_me:-configure}:13442: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13443
13444		cf_save_LIBS="$LIBS"
13445		cf_save_LDFLAGS="$LDFLAGS"
13446
13447		if test "$cf_cv_find_linkage_utf8" != yes ; then
13448
13449cf_search=
13450cf_library_path_list=""
13451if test -n "${LDFLAGS}${LIBS}" ; then
13452	for cf_library_path in $LDFLAGS $LIBS
13453	do
13454		case $cf_library_path in
13455		(-L*)
13456			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13457
13458test "x$cf_library_path" != "xNONE" && \
13459test -d "$cf_library_path" && \
13460 {
13461	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
13462	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
13463	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13464	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13465	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13466	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13467}
13468
13469			cf_library_path_list="$cf_library_path_list $cf_search"
13470			;;
13471		esac
13472	done
13473fi
13474
13475cf_search=
13476
13477test "x$prefix" != "xNONE" && \
13478test -d "$prefix" && \
13479 {
13480	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
13481	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
13482	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
13483	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13484	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
13485	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13486}
13487
13488for cf_subdir_prefix in \
13489	/usr \
13490	/usr/local \
13491	/usr/pkg \
13492	/opt \
13493	/opt/local \
13494	$HOME
13495do
13496
13497test "x$cf_subdir_prefix" != "x$prefix" && \
13498test -d "$cf_subdir_prefix" && \
13499(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13500	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
13501	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13502	test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13503	test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13504	test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13505	test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13506}
13507
13508done
13509
13510cf_search="$cf_library_path_list $cf_search"
13511
13512			for cf_cv_library_path_utf8 in $cf_search
13513			do
13514				if test -d $cf_cv_library_path_utf8 ; then
13515					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
13516
13517echo "${as_me:-configure}:13517: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13518
13519					CPPFLAGS="$cf_test_CPPFLAGS"
13520					LIBS="-lutf8  $cf_save_LIBS"
13521					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13522					cat >conftest.$ac_ext <<_ACEOF
13523#line 13523 "configure"
13524#include "confdefs.h"
13525
13526#include <libutf8.h>
13527int
13528main (void)
13529{
13530putwc(0,0);
13531  ;
13532  return 0;
13533}
13534_ACEOF
13535rm -f conftest.$ac_objext conftest$ac_exeext
13536if { (eval echo "$as_me:13536: \"$ac_link\"") >&5
13537  (eval $ac_link) 2>&5
13538  ac_status=$?
13539  echo "$as_me:13539: \$? = $ac_status" >&5
13540  (exit $ac_status); } &&
13541         { ac_try='test -s conftest$ac_exeext'
13542  { (eval echo "$as_me:13542: \"$ac_try\"") >&5
13543  (eval $ac_try) 2>&5
13544  ac_status=$?
13545  echo "$as_me:13545: \$? = $ac_status" >&5
13546  (exit $ac_status); }; }; then
13547
13548					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13549
13550echo "${as_me:-configure}:13550: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13551
13552					cf_cv_find_linkage_utf8=yes
13553					cf_cv_library_file_utf8="-lutf8"
13554					break
13555else
13556  echo "$as_me: failed program was:" >&5
13557cat conftest.$ac_ext >&5
13558
13559					CPPFLAGS="$cf_save_CPPFLAGS"
13560					LIBS="$cf_save_LIBS"
13561					LDFLAGS="$cf_save_LDFLAGS"
13562
13563fi
13564rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13565				fi
13566			done
13567			CPPFLAGS="$cf_save_CPPFLAGS"
13568			LDFLAGS="$cf_save_LDFLAGS"
13569		fi
13570
13571	else
13572		cf_cv_find_linkage_utf8=no
13573	fi
13574
13575fi
13576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13577
13578fi
13579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13580
13581LIBS="$cf_save_LIBS"
13582
13583if test "$cf_cv_find_linkage_utf8" = yes ; then
13584cf_cv_utf8_lib=add-on
13585else
13586cf_cv_utf8_lib=no
13587fi
13588
13589fi
13590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13591fi
13592echo "$as_me:13592: result: $cf_cv_utf8_lib" >&5
13593echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13594
13595# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13596# ncurses/ncursesw:
13597if test "$cf_cv_utf8_lib" = "add-on" ; then
13598
13599cat >>confdefs.h <<\EOF
13600#define HAVE_LIBUTF8_H 1
13601EOF
13602
13603if test -n "$cf_cv_header_path_utf8" ; then
13604  for cf_add_incdir in $cf_cv_header_path_utf8
13605  do
13606	while test $cf_add_incdir != /usr/include
13607	do
13608	  if test -d $cf_add_incdir
13609	  then
13610		cf_have_incdir=no
13611		if test -n "$CFLAGS$CPPFLAGS" ; then
13612		  # a loop is needed to ensure we can add subdirs of existing dirs
13613		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13614			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13615			  cf_have_incdir=yes; break
13616			fi
13617		  done
13618		fi
13619
13620		if test "$cf_have_incdir" = no ; then
13621		  if test "$cf_add_incdir" = /usr/local/include ; then
13622			if test "$GCC" = yes
13623			then
13624			  cf_save_CPPFLAGS=$CPPFLAGS
13625
13626	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13627	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13628
13629			  cat >conftest.$ac_ext <<_ACEOF
13630#line 13630 "configure"
13631#include "confdefs.h"
13632#include <stdio.h>
13633int
13634main (void)
13635{
13636printf("Hello")
13637  ;
13638  return 0;
13639}
13640_ACEOF
13641rm -f conftest.$ac_objext
13642if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643  (eval $ac_compile) 2>&5
13644  ac_status=$?
13645  echo "$as_me:13645: \$? = $ac_status" >&5
13646  (exit $ac_status); } &&
13647         { ac_try='test -s conftest.$ac_objext'
13648  { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649  (eval $ac_try) 2>&5
13650  ac_status=$?
13651  echo "$as_me:13651: \$? = $ac_status" >&5
13652  (exit $ac_status); }; }; then
13653  :
13654else
13655  echo "$as_me: failed program was:" >&5
13656cat conftest.$ac_ext >&5
13657cf_have_incdir=yes
13658fi
13659rm -f conftest.$ac_objext conftest.$ac_ext
13660			  CPPFLAGS=$cf_save_CPPFLAGS
13661			fi
13662		  fi
13663		fi
13664
13665		if test "$cf_have_incdir" = no ; then
13666		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13667
13668echo "${as_me:-configure}:13668: testing adding $cf_add_incdir to include-path ..." 1>&5
13669
13670		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13671
13672		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13673		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13674		  cf_add_incdir="$cf_top_incdir"
13675		else
13676		  break
13677		fi
13678	  else
13679		break
13680	  fi
13681	done
13682  done
13683fi
13684
13685if test -n "$cf_cv_library_path_utf8" ; then
13686	for cf_add_libdir in $cf_cv_library_path_utf8
13687	do
13688		if test $cf_add_libdir = /usr/lib ; then
13689			:
13690		elif test -d $cf_add_libdir
13691		then
13692			cf_have_libdir=no
13693			if test -n "$LDFLAGS$LIBS" ; then
13694				# a loop is needed to ensure we can add subdirs of existing dirs
13695				for cf_test_libdir in $LDFLAGS $LIBS ; do
13696					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13697						cf_have_libdir=yes; break
13698					fi
13699				done
13700			fi
13701			if test "$cf_have_libdir" = no ; then
13702				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13703
13704echo "${as_me:-configure}:13704: testing adding $cf_add_libdir to library-path ..." 1>&5
13705
13706				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13707			fi
13708		fi
13709	done
13710fi
13711
13712cf_add_libs="$cf_cv_library_file_utf8"
13713# Filter out duplicates - this happens with badly-designed ".pc" files...
13714for cf_add_1lib in $LIBS
13715do
13716	for cf_add_2lib in $cf_add_libs
13717	do
13718		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13719		then
13720			cf_add_1lib=
13721			break
13722		fi
13723	done
13724	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13725done
13726LIBS="$cf_add_libs"
13727
13728fi
13729
13730cf_ncuconfig_root=$cf_cv_screen
13731cf_have_ncuconfig=no
13732
13733if test "x${PKG_CONFIG:=none}" != xnone; then
13734	echo "$as_me:13734: checking pkg-config for $cf_ncuconfig_root" >&5
13735echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
13736	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
13737		echo "$as_me:13737: result: yes" >&5
13738echo "${ECHO_T}yes" >&6
13739
13740		echo "$as_me:13740: checking if the $cf_ncuconfig_root package files work" >&5
13741echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
13742		cf_have_ncuconfig=unknown
13743
13744		cf_save_CPPFLAGS="$CPPFLAGS"
13745		cf_save_LIBS="$LIBS"
13746
13747cf_fix_cppflags=no
13748cf_new_cflags=
13749cf_new_cppflags=
13750cf_new_extra_cppflags=
13751
13752for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
13753do
13754case $cf_fix_cppflags in
13755(no)
13756	case $cf_add_cflags in
13757	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13758		case $cf_add_cflags in
13759		(-D*)
13760			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13761
13762			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13763				&& test -z "${cf_tst_cflags}" \
13764				&& cf_fix_cppflags=yes
13765
13766			if test $cf_fix_cppflags = yes ; then
13767
13768	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13769	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13770
13771				continue
13772			elif test "${cf_tst_cflags}" = "\"'" ; then
13773
13774	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13775	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13776
13777				continue
13778			fi
13779			;;
13780		esac
13781		case "$CPPFLAGS" in
13782		(*$cf_add_cflags)
13783			;;
13784		(*)
13785			case $cf_add_cflags in
13786			(-D*)
13787				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13788
13789CPPFLAGS=`echo "$CPPFLAGS" | \
13790	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13791		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13792
13793				;;
13794			esac
13795
13796	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13797	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13798
13799			;;
13800		esac
13801		;;
13802	(*)
13803
13804	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13805	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13806
13807		;;
13808	esac
13809	;;
13810(yes)
13811
13812	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13813	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13814
13815	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13816
13817	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13818		&& test -z "${cf_tst_cflags}" \
13819		&& cf_fix_cppflags=no
13820	;;
13821esac
13822done
13823
13824if test -n "$cf_new_cflags" ; then
13825
13826	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13827	CFLAGS="${CFLAGS}$cf_new_cflags"
13828
13829fi
13830
13831if test -n "$cf_new_cppflags" ; then
13832
13833	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13834	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13835
13836fi
13837
13838if test -n "$cf_new_extra_cppflags" ; then
13839
13840	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13841	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13842
13843fi
13844
13845cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
13846# Filter out duplicates - this happens with badly-designed ".pc" files...
13847for cf_add_1lib in $LIBS
13848do
13849	for cf_add_2lib in $cf_add_libs
13850	do
13851		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13852		then
13853			cf_add_1lib=
13854			break
13855		fi
13856	done
13857	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13858done
13859LIBS="$cf_add_libs"
13860
13861		cat >conftest.$ac_ext <<_ACEOF
13862#line 13862 "configure"
13863#include "confdefs.h"
13864#include <${cf_cv_ncurses_header:-curses.h}>
13865int
13866main (void)
13867{
13868initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
13869  ;
13870  return 0;
13871}
13872_ACEOF
13873rm -f conftest.$ac_objext conftest$ac_exeext
13874if { (eval echo "$as_me:13874: \"$ac_link\"") >&5
13875  (eval $ac_link) 2>&5
13876  ac_status=$?
13877  echo "$as_me:13877: \$? = $ac_status" >&5
13878  (exit $ac_status); } &&
13879         { ac_try='test -s conftest$ac_exeext'
13880  { (eval echo "$as_me:13880: \"$ac_try\"") >&5
13881  (eval $ac_try) 2>&5
13882  ac_status=$?
13883  echo "$as_me:13883: \$? = $ac_status" >&5
13884  (exit $ac_status); }; }; then
13885  if test "$cross_compiling" = yes; then
13886  cf_have_ncuconfig=maybe
13887else
13888  cat >conftest.$ac_ext <<_ACEOF
13889#line 13889 "configure"
13890#include "confdefs.h"
13891#include <${cf_cv_ncurses_header:-curses.h}>
13892				int main(void)
13893				{ char *xx = curses_version(); return (xx == 0); }
13894_ACEOF
13895rm -f conftest$ac_exeext
13896if { (eval echo "$as_me:13896: \"$ac_link\"") >&5
13897  (eval $ac_link) 2>&5
13898  ac_status=$?
13899  echo "$as_me:13899: \$? = $ac_status" >&5
13900  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13901  { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902  (eval $ac_try) 2>&5
13903  ac_status=$?
13904  echo "$as_me:13904: \$? = $ac_status" >&5
13905  (exit $ac_status); }; }; then
13906  cf_have_ncuconfig=yes
13907else
13908  echo "$as_me: program exited with status $ac_status" >&5
13909echo "$as_me: failed program was:" >&5
13910cat conftest.$ac_ext >&5
13911cf_have_ncuconfig=no
13912fi
13913rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13914fi
13915else
13916  echo "$as_me: failed program was:" >&5
13917cat conftest.$ac_ext >&5
13918cf_have_ncuconfig=no
13919fi
13920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13921		echo "$as_me:13921: result: $cf_have_ncuconfig" >&5
13922echo "${ECHO_T}$cf_have_ncuconfig" >&6
13923		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
13924		if test "$cf_have_ncuconfig" != "yes"
13925		then
13926			CPPFLAGS="$cf_save_CPPFLAGS"
13927			LIBS="$cf_save_LIBS"
13928			NCURSES_CONFIG_PKG=none
13929		else
13930
13931cat >>confdefs.h <<\EOF
13932#define NCURSES 1
13933EOF
13934
13935			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
13936
13937echo "$as_me:13937: checking for terminfo header" >&5
13938echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
13939if test "${cf_cv_term_header+set}" = set; then
13940  echo $ECHO_N "(cached) $ECHO_C" >&6
13941else
13942
13943case ${cf_cv_ncurses_header} in
13944(*/ncurses.h|*/ncursesw.h)
13945	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
13946	;;
13947(*)
13948	cf_term_header=term.h
13949	;;
13950esac
13951
13952for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
13953do
13954cat >conftest.$ac_ext <<_ACEOF
13955#line 13955 "configure"
13956#include "confdefs.h"
13957#include <stdio.h>
13958#include <${cf_cv_ncurses_header:-curses.h}>
13959#include <$cf_test>
13960
13961int
13962main (void)
13963{
13964int x = auto_left_margin
13965  ;
13966  return 0;
13967}
13968_ACEOF
13969rm -f conftest.$ac_objext
13970if { (eval echo "$as_me:13970: \"$ac_compile\"") >&5
13971  (eval $ac_compile) 2>&5
13972  ac_status=$?
13973  echo "$as_me:13973: \$? = $ac_status" >&5
13974  (exit $ac_status); } &&
13975         { ac_try='test -s conftest.$ac_objext'
13976  { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977  (eval $ac_try) 2>&5
13978  ac_status=$?
13979  echo "$as_me:13979: \$? = $ac_status" >&5
13980  (exit $ac_status); }; }; then
13981
13982	cf_cv_term_header="$cf_test"
13983else
13984  echo "$as_me: failed program was:" >&5
13985cat conftest.$ac_ext >&5
13986
13987	cf_cv_term_header=unknown
13988
13989fi
13990rm -f conftest.$ac_objext conftest.$ac_ext
13991	test "$cf_cv_term_header" != unknown && break
13992done
13993
13994fi
13995echo "$as_me:13995: result: $cf_cv_term_header" >&5
13996echo "${ECHO_T}$cf_cv_term_header" >&6
13997
13998# Set definitions to allow ifdef'ing to accommodate subdirectories
13999
14000case $cf_cv_term_header in
14001(*term.h)
14002
14003cat >>confdefs.h <<\EOF
14004#define HAVE_TERM_H 1
14005EOF
14006
14007	;;
14008esac
14009
14010case $cf_cv_term_header in
14011(ncurses/term.h)
14012
14013cat >>confdefs.h <<\EOF
14014#define HAVE_NCURSES_TERM_H 1
14015EOF
14016
14017	;;
14018(ncursesw/term.h)
14019
14020cat >>confdefs.h <<\EOF
14021#define HAVE_NCURSESW_TERM_H 1
14022EOF
14023
14024	;;
14025esac
14026
14027		fi
14028
14029	else
14030		echo "$as_me:14030: result: no" >&5
14031echo "${ECHO_T}no" >&6
14032		NCURSES_CONFIG_PKG=none
14033	fi
14034else
14035	NCURSES_CONFIG_PKG=none
14036fi
14037
14038if test "x$cf_have_ncuconfig" = "xno"; then
14039	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
14040
14041if test -n "$ac_tool_prefix"; then
14042  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14043  do
14044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14046echo "$as_me:14046: checking for $ac_word" >&5
14047echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14048if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
14049  echo $ECHO_N "(cached) $ECHO_C" >&6
14050else
14051  if test -n "$NCURSES_CONFIG"; then
14052  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
14053else
14054  ac_save_IFS=$IFS; IFS=$ac_path_separator
14055ac_dummy="$PATH"
14056for ac_dir in $ac_dummy; do
14057  IFS=$ac_save_IFS
14058  test -z "$ac_dir" && ac_dir=.
14059  $as_executable_p "$ac_dir/$ac_word" || continue
14060ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14061echo "$as_me:14061: found $ac_dir/$ac_word" >&5
14062break
14063done
14064
14065fi
14066fi
14067NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
14068if test -n "$NCURSES_CONFIG"; then
14069  echo "$as_me:14069: result: $NCURSES_CONFIG" >&5
14070echo "${ECHO_T}$NCURSES_CONFIG" >&6
14071else
14072  echo "$as_me:14072: result: no" >&5
14073echo "${ECHO_T}no" >&6
14074fi
14075
14076    test -n "$NCURSES_CONFIG" && break
14077  done
14078fi
14079if test -z "$NCURSES_CONFIG"; then
14080  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
14081  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14082do
14083  # Extract the first word of "$ac_prog", so it can be a program name with args.
14084set dummy $ac_prog; ac_word=$2
14085echo "$as_me:14085: checking for $ac_word" >&5
14086echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14087if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
14088  echo $ECHO_N "(cached) $ECHO_C" >&6
14089else
14090  if test -n "$ac_ct_NCURSES_CONFIG"; then
14091  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
14092else
14093  ac_save_IFS=$IFS; IFS=$ac_path_separator
14094ac_dummy="$PATH"
14095for ac_dir in $ac_dummy; do
14096  IFS=$ac_save_IFS
14097  test -z "$ac_dir" && ac_dir=.
14098  $as_executable_p "$ac_dir/$ac_word" || continue
14099ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
14100echo "$as_me:14100: found $ac_dir/$ac_word" >&5
14101break
14102done
14103
14104fi
14105fi
14106ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
14107if test -n "$ac_ct_NCURSES_CONFIG"; then
14108  echo "$as_me:14108: result: $ac_ct_NCURSES_CONFIG" >&5
14109echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
14110else
14111  echo "$as_me:14111: result: no" >&5
14112echo "${ECHO_T}no" >&6
14113fi
14114
14115  test -n "$ac_ct_NCURSES_CONFIG" && break
14116done
14117test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
14118
14119  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
14120fi
14121
14122	if test "$NCURSES_CONFIG" != none ; then
14123
14124cf_fix_cppflags=no
14125cf_new_cflags=
14126cf_new_cppflags=
14127cf_new_extra_cppflags=
14128
14129for cf_add_cflags in `$NCURSES_CONFIG --cflags`
14130do
14131case $cf_fix_cppflags in
14132(no)
14133	case $cf_add_cflags in
14134	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14135		case $cf_add_cflags in
14136		(-D*)
14137			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14138
14139			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14140				&& test -z "${cf_tst_cflags}" \
14141				&& cf_fix_cppflags=yes
14142
14143			if test $cf_fix_cppflags = yes ; then
14144
14145	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14146	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14147
14148				continue
14149			elif test "${cf_tst_cflags}" = "\"'" ; then
14150
14151	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14152	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14153
14154				continue
14155			fi
14156			;;
14157		esac
14158		case "$CPPFLAGS" in
14159		(*$cf_add_cflags)
14160			;;
14161		(*)
14162			case $cf_add_cflags in
14163			(-D*)
14164				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14165
14166CPPFLAGS=`echo "$CPPFLAGS" | \
14167	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14168		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14169
14170				;;
14171			esac
14172
14173	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14174	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14175
14176			;;
14177		esac
14178		;;
14179	(*)
14180
14181	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14182	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14183
14184		;;
14185	esac
14186	;;
14187(yes)
14188
14189	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14190	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14191
14192	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14193
14194	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14195		&& test -z "${cf_tst_cflags}" \
14196		&& cf_fix_cppflags=no
14197	;;
14198esac
14199done
14200
14201if test -n "$cf_new_cflags" ; then
14202
14203	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14204	CFLAGS="${CFLAGS}$cf_new_cflags"
14205
14206fi
14207
14208if test -n "$cf_new_cppflags" ; then
14209
14210	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14211	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14212
14213fi
14214
14215if test -n "$cf_new_extra_cppflags" ; then
14216
14217	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14218	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14219
14220fi
14221
14222cf_add_libs="`$NCURSES_CONFIG --libs`"
14223# Filter out duplicates - this happens with badly-designed ".pc" files...
14224for cf_add_1lib in $LIBS
14225do
14226	for cf_add_2lib in $cf_add_libs
14227	do
14228		if test "x$cf_add_1lib" = "x$cf_add_2lib"
14229		then
14230			cf_add_1lib=
14231			break
14232		fi
14233	done
14234	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14235done
14236LIBS="$cf_add_libs"
14237
14238		# even with config script, some packages use no-override for curses.h
14239
14240echo "$as_me:14240: checking if we have identified curses headers" >&5
14241echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14242if test "${cf_cv_ncurses_header+set}" = set; then
14243  echo $ECHO_N "(cached) $ECHO_C" >&6
14244else
14245
14246cf_cv_ncurses_header=none
14247for cf_header in \
14248	ncurses.h $cf_cv_screen/ncurses.h \
14249	curses.h $cf_cv_screen/curses.h
14250do
14251cat >conftest.$ac_ext <<_ACEOF
14252#line 14252 "configure"
14253#include "confdefs.h"
14254#include <${cf_header}>
14255int
14256main (void)
14257{
14258initscr(); tgoto("?", 0,0)
14259  ;
14260  return 0;
14261}
14262_ACEOF
14263rm -f conftest.$ac_objext
14264if { (eval echo "$as_me:14264: \"$ac_compile\"") >&5
14265  (eval $ac_compile) 2>&5
14266  ac_status=$?
14267  echo "$as_me:14267: \$? = $ac_status" >&5
14268  (exit $ac_status); } &&
14269         { ac_try='test -s conftest.$ac_objext'
14270  { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271  (eval $ac_try) 2>&5
14272  ac_status=$?
14273  echo "$as_me:14273: \$? = $ac_status" >&5
14274  (exit $ac_status); }; }; then
14275  cf_cv_ncurses_header=$cf_header; break
14276else
14277  echo "$as_me: failed program was:" >&5
14278cat conftest.$ac_ext >&5
14279fi
14280rm -f conftest.$ac_objext conftest.$ac_ext
14281done
14282
14283fi
14284echo "$as_me:14284: result: $cf_cv_ncurses_header" >&5
14285echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14286
14287if test "$cf_cv_ncurses_header" = none ; then
14288	{ { echo "$as_me:14288: error: No curses header-files found" >&5
14289echo "$as_me: error: No curses header-files found" >&2;}
14290   { (exit 1); exit 1; }; }
14291fi
14292
14293# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14294
14295for ac_header in $cf_cv_ncurses_header
14296do
14297as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14298echo "$as_me:14298: checking for $ac_header" >&5
14299echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14300if eval "test \"\${$as_ac_Header+set}\" = set"; then
14301  echo $ECHO_N "(cached) $ECHO_C" >&6
14302else
14303  cat >conftest.$ac_ext <<_ACEOF
14304#line 14304 "configure"
14305#include "confdefs.h"
14306#include <$ac_header>
14307_ACEOF
14308if { (eval echo "$as_me:14308: \"$ac_cpp conftest.$ac_ext\"") >&5
14309  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14310  ac_status=$?
14311  egrep -v '^ *\+' conftest.er1 >conftest.err
14312  rm -f conftest.er1
14313  cat conftest.err >&5
14314  echo "$as_me:14314: \$? = $ac_status" >&5
14315  (exit $ac_status); } >/dev/null; then
14316  if test -s conftest.err; then
14317    ac_cpp_err=$ac_c_preproc_warn_flag
14318  else
14319    ac_cpp_err=
14320  fi
14321else
14322  ac_cpp_err=yes
14323fi
14324if test -z "$ac_cpp_err"; then
14325  eval "$as_ac_Header=yes"
14326else
14327  echo "$as_me: failed program was:" >&5
14328  cat conftest.$ac_ext >&5
14329  eval "$as_ac_Header=no"
14330fi
14331rm -f conftest.err conftest.$ac_ext
14332fi
14333echo "$as_me:14333: result: `eval echo '${'$as_ac_Header'}'`" >&5
14334echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14335if test `eval echo '${'$as_ac_Header'}'` = yes; then
14336  cat >>confdefs.h <<EOF
14337#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14338EOF
14339
14340fi
14341done
14342
14343cat >>confdefs.h <<\EOF
14344#define NCURSES 1
14345EOF
14346
14347cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14348
14349		cat >>confdefs.h <<EOF
14350#define $cf_nculib_ROOT 1
14351EOF
14352
14353				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
14354
14355	else
14356
14357cf_ncuhdr_root=$cf_cv_screen
14358
14359test -n "$cf_cv_curses_dir" && \
14360test "$cf_cv_curses_dir" != "no" && { \
14361
14362if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
14363  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
14364  do
14365	while test $cf_add_incdir != /usr/include
14366	do
14367	  if test -d $cf_add_incdir
14368	  then
14369		cf_have_incdir=no
14370		if test -n "$CFLAGS$CPPFLAGS" ; then
14371		  # a loop is needed to ensure we can add subdirs of existing dirs
14372		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14373			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14374			  cf_have_incdir=yes; break
14375			fi
14376		  done
14377		fi
14378
14379		if test "$cf_have_incdir" = no ; then
14380		  if test "$cf_add_incdir" = /usr/local/include ; then
14381			if test "$GCC" = yes
14382			then
14383			  cf_save_CPPFLAGS=$CPPFLAGS
14384
14385	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14386	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14387
14388			  cat >conftest.$ac_ext <<_ACEOF
14389#line 14389 "configure"
14390#include "confdefs.h"
14391#include <stdio.h>
14392int
14393main (void)
14394{
14395printf("Hello")
14396  ;
14397  return 0;
14398}
14399_ACEOF
14400rm -f conftest.$ac_objext
14401if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
14402  (eval $ac_compile) 2>&5
14403  ac_status=$?
14404  echo "$as_me:14404: \$? = $ac_status" >&5
14405  (exit $ac_status); } &&
14406         { ac_try='test -s conftest.$ac_objext'
14407  { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408  (eval $ac_try) 2>&5
14409  ac_status=$?
14410  echo "$as_me:14410: \$? = $ac_status" >&5
14411  (exit $ac_status); }; }; then
14412  :
14413else
14414  echo "$as_me: failed program was:" >&5
14415cat conftest.$ac_ext >&5
14416cf_have_incdir=yes
14417fi
14418rm -f conftest.$ac_objext conftest.$ac_ext
14419			  CPPFLAGS=$cf_save_CPPFLAGS
14420			fi
14421		  fi
14422		fi
14423
14424		if test "$cf_have_incdir" = no ; then
14425		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14426
14427echo "${as_me:-configure}:14427: testing adding $cf_add_incdir to include-path ..." 1>&5
14428
14429		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14430
14431		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14432		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14433		  cf_add_incdir="$cf_top_incdir"
14434		else
14435		  break
14436		fi
14437	  else
14438		break
14439	  fi
14440	done
14441  done
14442fi
14443
14444}
14445
14446echo "$as_me:14446: checking for $cf_ncuhdr_root header in include-path" >&5
14447echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
14448if test "${cf_cv_ncurses_h+set}" = set; then
14449  echo $ECHO_N "(cached) $ECHO_C" >&6
14450else
14451
14452	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
14453	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
14454	for cf_header in $cf_header_list
14455	do
14456
14457	cat >conftest.$ac_ext <<_ACEOF
14458#line 14458 "configure"
14459#include "confdefs.h"
14460
14461#include <$cf_header>
14462int
14463main (void)
14464{
14465
14466#ifdef NCURSES_VERSION
14467
14468printf("%s\n", NCURSES_VERSION);
14469#else
14470#ifdef __NCURSES_H
14471printf("old\n");
14472#else
14473	make an error
14474#endif
14475#endif
14476
14477  ;
14478  return 0;
14479}
14480_ACEOF
14481rm -f conftest.$ac_objext
14482if { (eval echo "$as_me:14482: \"$ac_compile\"") >&5
14483  (eval $ac_compile) 2>&5
14484  ac_status=$?
14485  echo "$as_me:14485: \$? = $ac_status" >&5
14486  (exit $ac_status); } &&
14487         { ac_try='test -s conftest.$ac_objext'
14488  { (eval echo "$as_me:14488: \"$ac_try\"") >&5
14489  (eval $ac_try) 2>&5
14490  ac_status=$?
14491  echo "$as_me:14491: \$? = $ac_status" >&5
14492  (exit $ac_status); }; }; then
14493  cf_cv_ncurses_h=$cf_header
14494
14495else
14496  echo "$as_me: failed program was:" >&5
14497cat conftest.$ac_ext >&5
14498cf_cv_ncurses_h=no
14499fi
14500rm -f conftest.$ac_objext conftest.$ac_ext
14501
14502		test "$cf_cv_ncurses_h" != no && break
14503	done
14504
14505fi
14506echo "$as_me:14506: result: $cf_cv_ncurses_h" >&5
14507echo "${ECHO_T}$cf_cv_ncurses_h" >&6
14508
14509if test "$cf_cv_ncurses_h" != no ; then
14510	cf_cv_ncurses_header=$cf_cv_ncurses_h
14511else
14512
14513echo "$as_me:14513: checking for $cf_ncuhdr_root include-path" >&5
14514echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
14515if test "${cf_cv_ncurses_h2+set}" = set; then
14516  echo $ECHO_N "(cached) $ECHO_C" >&6
14517else
14518
14519	test -n "$verbose" && echo
14520
14521cf_search=
14522
14523# collect the current set of include-directories from compiler flags
14524cf_header_path_list=""
14525if test -n "${CFLAGS}${CPPFLAGS}" ; then
14526	for cf_header_path in $CPPFLAGS $CFLAGS
14527	do
14528		case $cf_header_path in
14529		(-I*)
14530			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
14531
14532test "x$cf_header_path" != "xNONE" && \
14533test -d "$cf_header_path" && \
14534 {
14535	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
14536	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
14537	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
14538	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
14539	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
14540	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"
14541}
14542
14543			cf_header_path_list="$cf_header_path_list $cf_search"
14544			;;
14545		esac
14546	done
14547fi
14548
14549# add the variations for the package we are looking for
14550
14551cf_search=
14552
14553test "x$prefix" != "xNONE" && \
14554test -d "$prefix" && \
14555 {
14556	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
14557	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
14558	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
14559	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
14560	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
14561	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
14562}
14563
14564for cf_subdir_prefix in \
14565	/usr \
14566	/usr/local \
14567	/usr/pkg \
14568	/opt \
14569	/opt/local \
14570	$HOME
14571do
14572
14573test "x$cf_subdir_prefix" != "x$prefix" && \
14574test -d "$cf_subdir_prefix" && \
14575(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
14576	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
14577	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
14578	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
14579	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
14580	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
14581	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"
14582}
14583
14584done
14585
14586test "$includedir" != NONE && \
14587test "$includedir" != "/usr/include" && \
14588test -d "$includedir" && {
14589	test -d $includedir &&    cf_search="$cf_search $includedir"
14590	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
14591}
14592
14593test "$oldincludedir" != NONE && \
14594test "$oldincludedir" != "/usr/include" && \
14595test -d "$oldincludedir" && {
14596	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
14597	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
14598}
14599
14600cf_search="$cf_search $cf_header_path_list"
14601
14602	test -n "$verbose" && echo search path $cf_search
14603	cf_save2_CPPFLAGS="$CPPFLAGS"
14604	for cf_incdir in $cf_search
14605	do
14606
14607if test -n "$cf_incdir" ; then
14608  for cf_add_incdir in $cf_incdir
14609  do
14610	while test $cf_add_incdir != /usr/include
14611	do
14612	  if test -d $cf_add_incdir
14613	  then
14614		cf_have_incdir=no
14615		if test -n "$CFLAGS$CPPFLAGS" ; then
14616		  # a loop is needed to ensure we can add subdirs of existing dirs
14617		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14618			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14619			  cf_have_incdir=yes; break
14620			fi
14621		  done
14622		fi
14623
14624		if test "$cf_have_incdir" = no ; then
14625		  if test "$cf_add_incdir" = /usr/local/include ; then
14626			if test "$GCC" = yes
14627			then
14628			  cf_save_CPPFLAGS=$CPPFLAGS
14629
14630	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14631	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14632
14633			  cat >conftest.$ac_ext <<_ACEOF
14634#line 14634 "configure"
14635#include "confdefs.h"
14636#include <stdio.h>
14637int
14638main (void)
14639{
14640printf("Hello")
14641  ;
14642  return 0;
14643}
14644_ACEOF
14645rm -f conftest.$ac_objext
14646if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
14647  (eval $ac_compile) 2>&5
14648  ac_status=$?
14649  echo "$as_me:14649: \$? = $ac_status" >&5
14650  (exit $ac_status); } &&
14651         { ac_try='test -s conftest.$ac_objext'
14652  { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653  (eval $ac_try) 2>&5
14654  ac_status=$?
14655  echo "$as_me:14655: \$? = $ac_status" >&5
14656  (exit $ac_status); }; }; then
14657  :
14658else
14659  echo "$as_me: failed program was:" >&5
14660cat conftest.$ac_ext >&5
14661cf_have_incdir=yes
14662fi
14663rm -f conftest.$ac_objext conftest.$ac_ext
14664			  CPPFLAGS=$cf_save_CPPFLAGS
14665			fi
14666		  fi
14667		fi
14668
14669		if test "$cf_have_incdir" = no ; then
14670		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14671
14672echo "${as_me:-configure}:14672: testing adding $cf_add_incdir to include-path ..." 1>&5
14673
14674		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14675
14676		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14677		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14678		  cf_add_incdir="$cf_top_incdir"
14679		else
14680		  break
14681		fi
14682	  else
14683		break
14684	  fi
14685	done
14686  done
14687fi
14688
14689		for cf_header in \
14690			ncurses.h \
14691			curses.h
14692		do
14693
14694	cat >conftest.$ac_ext <<_ACEOF
14695#line 14695 "configure"
14696#include "confdefs.h"
14697
14698#include <$cf_header>
14699int
14700main (void)
14701{
14702
14703#ifdef NCURSES_VERSION
14704
14705printf("%s\n", NCURSES_VERSION);
14706#else
14707#ifdef __NCURSES_H
14708printf("old\n");
14709#else
14710	make an error
14711#endif
14712#endif
14713
14714  ;
14715  return 0;
14716}
14717_ACEOF
14718rm -f conftest.$ac_objext
14719if { (eval echo "$as_me:14719: \"$ac_compile\"") >&5
14720  (eval $ac_compile) 2>&5
14721  ac_status=$?
14722  echo "$as_me:14722: \$? = $ac_status" >&5
14723  (exit $ac_status); } &&
14724         { ac_try='test -s conftest.$ac_objext'
14725  { (eval echo "$as_me:14725: \"$ac_try\"") >&5
14726  (eval $ac_try) 2>&5
14727  ac_status=$?
14728  echo "$as_me:14728: \$? = $ac_status" >&5
14729  (exit $ac_status); }; }; then
14730  cf_cv_ncurses_h2=$cf_header
14731
14732else
14733  echo "$as_me: failed program was:" >&5
14734cat conftest.$ac_ext >&5
14735cf_cv_ncurses_h2=no
14736fi
14737rm -f conftest.$ac_objext conftest.$ac_ext
14738
14739			if test "$cf_cv_ncurses_h2" != no ; then
14740				cf_cv_ncurses_h2=$cf_incdir/$cf_header
14741				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
14742				break
14743			fi
14744			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
14745		done
14746		CPPFLAGS="$cf_save2_CPPFLAGS"
14747		test "$cf_cv_ncurses_h2" != no && break
14748	done
14749	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:14749: error: not found" >&5
14750echo "$as_me: error: not found" >&2;}
14751   { (exit 1); exit 1; }; }
14752
14753fi
14754echo "$as_me:14754: result: $cf_cv_ncurses_h2" >&5
14755echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
14756
14757	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
14758	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
14759	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
14760		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
14761	fi
14762
14763if test -n "$cf_1st_incdir" ; then
14764  for cf_add_incdir in $cf_1st_incdir
14765  do
14766	while test $cf_add_incdir != /usr/include
14767	do
14768	  if test -d $cf_add_incdir
14769	  then
14770		cf_have_incdir=no
14771		if test -n "$CFLAGS$CPPFLAGS" ; then
14772		  # a loop is needed to ensure we can add subdirs of existing dirs
14773		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14774			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14775			  cf_have_incdir=yes; break
14776			fi
14777		  done
14778		fi
14779
14780		if test "$cf_have_incdir" = no ; then
14781		  if test "$cf_add_incdir" = /usr/local/include ; then
14782			if test "$GCC" = yes
14783			then
14784			  cf_save_CPPFLAGS=$CPPFLAGS
14785
14786	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14787	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14788
14789			  cat >conftest.$ac_ext <<_ACEOF
14790#line 14790 "configure"
14791#include "confdefs.h"
14792#include <stdio.h>
14793int
14794main (void)
14795{
14796printf("Hello")
14797  ;
14798  return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext
14802if { (eval echo "$as_me:14802: \"$ac_compile\"") >&5
14803  (eval $ac_compile) 2>&5
14804  ac_status=$?
14805  echo "$as_me:14805: \$? = $ac_status" >&5
14806  (exit $ac_status); } &&
14807         { ac_try='test -s conftest.$ac_objext'
14808  { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809  (eval $ac_try) 2>&5
14810  ac_status=$?
14811  echo "$as_me:14811: \$? = $ac_status" >&5
14812  (exit $ac_status); }; }; then
14813  :
14814else
14815  echo "$as_me: failed program was:" >&5
14816cat conftest.$ac_ext >&5
14817cf_have_incdir=yes
14818fi
14819rm -f conftest.$ac_objext conftest.$ac_ext
14820			  CPPFLAGS=$cf_save_CPPFLAGS
14821			fi
14822		  fi
14823		fi
14824
14825		if test "$cf_have_incdir" = no ; then
14826		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14827
14828echo "${as_me:-configure}:14828: testing adding $cf_add_incdir to include-path ..." 1>&5
14829
14830		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14831
14832		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14833		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14834		  cf_add_incdir="$cf_top_incdir"
14835		else
14836		  break
14837		fi
14838	  else
14839		break
14840	  fi
14841	done
14842  done
14843fi
14844
14845fi
14846
14847# Set definitions to allow ifdef'ing for ncurses.h
14848
14849case $cf_cv_ncurses_header in
14850(*ncurses.h)
14851
14852cat >>confdefs.h <<\EOF
14853#define HAVE_NCURSES_H 1
14854EOF
14855
14856	;;
14857esac
14858
14859case $cf_cv_ncurses_header in
14860(ncurses/curses.h|ncurses/ncurses.h)
14861
14862cat >>confdefs.h <<\EOF
14863#define HAVE_NCURSES_NCURSES_H 1
14864EOF
14865
14866	;;
14867(ncursesw/curses.h|ncursesw/ncurses.h)
14868
14869cat >>confdefs.h <<\EOF
14870#define HAVE_NCURSESW_NCURSES_H 1
14871EOF
14872
14873	;;
14874esac
14875
14876echo "$as_me:14876: checking for terminfo header" >&5
14877echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14878if test "${cf_cv_term_header+set}" = set; then
14879  echo $ECHO_N "(cached) $ECHO_C" >&6
14880else
14881
14882case ${cf_cv_ncurses_header} in
14883(*/ncurses.h|*/ncursesw.h)
14884	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14885	;;
14886(*)
14887	cf_term_header=term.h
14888	;;
14889esac
14890
14891for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14892do
14893cat >conftest.$ac_ext <<_ACEOF
14894#line 14894 "configure"
14895#include "confdefs.h"
14896#include <stdio.h>
14897#include <${cf_cv_ncurses_header:-curses.h}>
14898#include <$cf_test>
14899
14900int
14901main (void)
14902{
14903int x = auto_left_margin
14904  ;
14905  return 0;
14906}
14907_ACEOF
14908rm -f conftest.$ac_objext
14909if { (eval echo "$as_me:14909: \"$ac_compile\"") >&5
14910  (eval $ac_compile) 2>&5
14911  ac_status=$?
14912  echo "$as_me:14912: \$? = $ac_status" >&5
14913  (exit $ac_status); } &&
14914         { ac_try='test -s conftest.$ac_objext'
14915  { (eval echo "$as_me:14915: \"$ac_try\"") >&5
14916  (eval $ac_try) 2>&5
14917  ac_status=$?
14918  echo "$as_me:14918: \$? = $ac_status" >&5
14919  (exit $ac_status); }; }; then
14920
14921	cf_cv_term_header="$cf_test"
14922else
14923  echo "$as_me: failed program was:" >&5
14924cat conftest.$ac_ext >&5
14925
14926	cf_cv_term_header=unknown
14927
14928fi
14929rm -f conftest.$ac_objext conftest.$ac_ext
14930	test "$cf_cv_term_header" != unknown && break
14931done
14932
14933fi
14934echo "$as_me:14934: result: $cf_cv_term_header" >&5
14935echo "${ECHO_T}$cf_cv_term_header" >&6
14936
14937# Set definitions to allow ifdef'ing to accommodate subdirectories
14938
14939case $cf_cv_term_header in
14940(*term.h)
14941
14942cat >>confdefs.h <<\EOF
14943#define HAVE_TERM_H 1
14944EOF
14945
14946	;;
14947esac
14948
14949case $cf_cv_term_header in
14950(ncurses/term.h)
14951
14952cat >>confdefs.h <<\EOF
14953#define HAVE_NCURSES_TERM_H 1
14954EOF
14955
14956	;;
14957(ncursesw/term.h)
14958
14959cat >>confdefs.h <<\EOF
14960#define HAVE_NCURSESW_TERM_H 1
14961EOF
14962
14963	;;
14964esac
14965
14966# some applications need this, but should check for NCURSES_VERSION
14967
14968cat >>confdefs.h <<\EOF
14969#define NCURSES 1
14970EOF
14971
14972echo "$as_me:14972: checking for ncurses version" >&5
14973echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
14974if test "${cf_cv_ncurses_version+set}" = set; then
14975  echo $ECHO_N "(cached) $ECHO_C" >&6
14976else
14977
14978	cf_cv_ncurses_version=no
14979	cf_tempfile=out$$
14980	rm -f $cf_tempfile
14981	if test "$cross_compiling" = yes; then
14982
14983	# This will not work if the preprocessor splits the line after the
14984	# Autoconf token.  The 'unproto' program does that.
14985	cat > conftest.$ac_ext <<EOF
14986#include <${cf_cv_ncurses_header:-curses.h}>
14987#undef Autoconf
14988#ifdef NCURSES_VERSION
14989Autoconf NCURSES_VERSION
14990#else
14991#ifdef __NCURSES_H
14992Autoconf "old"
14993#endif
14994;
14995#endif
14996EOF
14997	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
14998	{ (eval echo "$as_me:14998: \"$cf_try\"") >&5
14999  (eval $cf_try) 2>&5
15000  ac_status=$?
15001  echo "$as_me:15001: \$? = $ac_status" >&5
15002  (exit $ac_status); }
15003	if test -f conftest.out ; then
15004		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
15005		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
15006		rm -f conftest.out
15007	fi
15008
15009else
15010  cat >conftest.$ac_ext <<_ACEOF
15011#line 15011 "configure"
15012#include "confdefs.h"
15013
15014#include <${cf_cv_ncurses_header:-curses.h}>
15015#include <stdio.h>
15016int main(void)
15017{
15018	FILE *fp = fopen("$cf_tempfile", "w");
15019#ifdef NCURSES_VERSION
15020# ifdef NCURSES_VERSION_PATCH
15021	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
15022# else
15023	fprintf(fp, "%s\n", NCURSES_VERSION);
15024# endif
15025#else
15026# ifdef __NCURSES_H
15027	fprintf(fp, "old\n");
15028# else
15029	make an error
15030# endif
15031#endif
15032	${cf_cv_main_return:-return}(0);
15033}
15034_ACEOF
15035rm -f conftest$ac_exeext
15036if { (eval echo "$as_me:15036: \"$ac_link\"") >&5
15037  (eval $ac_link) 2>&5
15038  ac_status=$?
15039  echo "$as_me:15039: \$? = $ac_status" >&5
15040  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15041  { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042  (eval $ac_try) 2>&5
15043  ac_status=$?
15044  echo "$as_me:15044: \$? = $ac_status" >&5
15045  (exit $ac_status); }; }; then
15046
15047	cf_cv_ncurses_version=`cat $cf_tempfile`
15048else
15049  echo "$as_me: program exited with status $ac_status" >&5
15050echo "$as_me: failed program was:" >&5
15051cat conftest.$ac_ext >&5
15052fi
15053rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15054fi
15055	rm -f $cf_tempfile
15056
15057fi
15058echo "$as_me:15058: result: $cf_cv_ncurses_version" >&5
15059echo "${ECHO_T}$cf_cv_ncurses_version" >&6
15060test "$cf_cv_ncurses_version" = no ||
15061cat >>confdefs.h <<\EOF
15062#define NCURSES 1
15063EOF
15064
15065cf_nculib_root=$cf_cv_screen
15066	# This works, except for the special case where we find gpm, but
15067	# ncurses is in a nonstandard location via $LIBS, and we really want
15068	# to link gpm.
15069cf_ncurses_LIBS=""
15070cf_ncurses_SAVE="$LIBS"
15071echo "$as_me:15071: checking for Gpm_Open in -lgpm" >&5
15072echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
15073if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
15074  echo $ECHO_N "(cached) $ECHO_C" >&6
15075else
15076  ac_check_lib_save_LIBS=$LIBS
15077LIBS="-lgpm  $LIBS"
15078cat >conftest.$ac_ext <<_ACEOF
15079#line 15079 "configure"
15080#include "confdefs.h"
15081
15082/* Override any gcc2 internal prototype to avoid an error.  */
15083#ifdef __cplusplus
15084extern "C"
15085#endif
15086/* We use char because int might match the return type of a gcc2
15087   builtin and then its argument prototype would still apply.  */
15088char Gpm_Open ();
15089int
15090main (void)
15091{
15092Gpm_Open ();
15093  ;
15094  return 0;
15095}
15096_ACEOF
15097rm -f conftest.$ac_objext conftest$ac_exeext
15098if { (eval echo "$as_me:15098: \"$ac_link\"") >&5
15099  (eval $ac_link) 2>&5
15100  ac_status=$?
15101  echo "$as_me:15101: \$? = $ac_status" >&5
15102  (exit $ac_status); } &&
15103         { ac_try='test -s conftest$ac_exeext'
15104  { (eval echo "$as_me:15104: \"$ac_try\"") >&5
15105  (eval $ac_try) 2>&5
15106  ac_status=$?
15107  echo "$as_me:15107: \$? = $ac_status" >&5
15108  (exit $ac_status); }; }; then
15109  ac_cv_lib_gpm_Gpm_Open=yes
15110else
15111  echo "$as_me: failed program was:" >&5
15112cat conftest.$ac_ext >&5
15113ac_cv_lib_gpm_Gpm_Open=no
15114fi
15115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15116LIBS=$ac_check_lib_save_LIBS
15117fi
15118echo "$as_me:15118: result: $ac_cv_lib_gpm_Gpm_Open" >&5
15119echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
15120if test $ac_cv_lib_gpm_Gpm_Open = yes; then
15121  echo "$as_me:15121: checking for initscr in -lgpm" >&5
15122echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
15123if test "${ac_cv_lib_gpm_initscr+set}" = set; then
15124  echo $ECHO_N "(cached) $ECHO_C" >&6
15125else
15126  ac_check_lib_save_LIBS=$LIBS
15127LIBS="-lgpm  $LIBS"
15128cat >conftest.$ac_ext <<_ACEOF
15129#line 15129 "configure"
15130#include "confdefs.h"
15131
15132/* Override any gcc2 internal prototype to avoid an error.  */
15133#ifdef __cplusplus
15134extern "C"
15135#endif
15136/* We use char because int might match the return type of a gcc2
15137   builtin and then its argument prototype would still apply.  */
15138char initscr ();
15139int
15140main (void)
15141{
15142initscr ();
15143  ;
15144  return 0;
15145}
15146_ACEOF
15147rm -f conftest.$ac_objext conftest$ac_exeext
15148if { (eval echo "$as_me:15148: \"$ac_link\"") >&5
15149  (eval $ac_link) 2>&5
15150  ac_status=$?
15151  echo "$as_me:15151: \$? = $ac_status" >&5
15152  (exit $ac_status); } &&
15153         { ac_try='test -s conftest$ac_exeext'
15154  { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155  (eval $ac_try) 2>&5
15156  ac_status=$?
15157  echo "$as_me:15157: \$? = $ac_status" >&5
15158  (exit $ac_status); }; }; then
15159  ac_cv_lib_gpm_initscr=yes
15160else
15161  echo "$as_me: failed program was:" >&5
15162cat conftest.$ac_ext >&5
15163ac_cv_lib_gpm_initscr=no
15164fi
15165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15166LIBS=$ac_check_lib_save_LIBS
15167fi
15168echo "$as_me:15168: result: $ac_cv_lib_gpm_initscr" >&5
15169echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
15170if test $ac_cv_lib_gpm_initscr = yes; then
15171  LIBS="$cf_ncurses_SAVE"
15172else
15173  cf_ncurses_LIBS="-lgpm"
15174fi
15175
15176fi
15177
15178case $host_os in
15179(freebsd*)
15180	# This is only necessary if you are linking against an obsolete
15181	# version of ncurses (but it should do no harm, since it's static).
15182	if test "$cf_nculib_root" = ncurses ; then
15183		echo "$as_me:15183: checking for tgoto in -lmytinfo" >&5
15184echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
15185if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
15186  echo $ECHO_N "(cached) $ECHO_C" >&6
15187else
15188  ac_check_lib_save_LIBS=$LIBS
15189LIBS="-lmytinfo  $LIBS"
15190cat >conftest.$ac_ext <<_ACEOF
15191#line 15191 "configure"
15192#include "confdefs.h"
15193
15194/* Override any gcc2 internal prototype to avoid an error.  */
15195#ifdef __cplusplus
15196extern "C"
15197#endif
15198/* We use char because int might match the return type of a gcc2
15199   builtin and then its argument prototype would still apply.  */
15200char tgoto ();
15201int
15202main (void)
15203{
15204tgoto ();
15205  ;
15206  return 0;
15207}
15208_ACEOF
15209rm -f conftest.$ac_objext conftest$ac_exeext
15210if { (eval echo "$as_me:15210: \"$ac_link\"") >&5
15211  (eval $ac_link) 2>&5
15212  ac_status=$?
15213  echo "$as_me:15213: \$? = $ac_status" >&5
15214  (exit $ac_status); } &&
15215         { ac_try='test -s conftest$ac_exeext'
15216  { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217  (eval $ac_try) 2>&5
15218  ac_status=$?
15219  echo "$as_me:15219: \$? = $ac_status" >&5
15220  (exit $ac_status); }; }; then
15221  ac_cv_lib_mytinfo_tgoto=yes
15222else
15223  echo "$as_me: failed program was:" >&5
15224cat conftest.$ac_ext >&5
15225ac_cv_lib_mytinfo_tgoto=no
15226fi
15227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15228LIBS=$ac_check_lib_save_LIBS
15229fi
15230echo "$as_me:15230: result: $ac_cv_lib_mytinfo_tgoto" >&5
15231echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
15232if test $ac_cv_lib_mytinfo_tgoto = yes; then
15233  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
15234fi
15235
15236	fi
15237	;;
15238esac
15239
15240cf_add_libs="$cf_ncurses_LIBS"
15241# Filter out duplicates - this happens with badly-designed ".pc" files...
15242for cf_add_1lib in $LIBS
15243do
15244	for cf_add_2lib in $cf_add_libs
15245	do
15246		if test "x$cf_add_1lib" = "x$cf_add_2lib"
15247		then
15248			cf_add_1lib=
15249			break
15250		fi
15251	done
15252	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15253done
15254LIBS="$cf_add_libs"
15255
15256if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
15257then
15258
15259cf_add_libs="-l$cf_nculib_root"
15260# Filter out duplicates - this happens with badly-designed ".pc" files...
15261for cf_add_1lib in $LIBS
15262do
15263	for cf_add_2lib in $cf_add_libs
15264	do
15265		if test "x$cf_add_1lib" = "x$cf_add_2lib"
15266		then
15267			cf_add_1lib=
15268			break
15269		fi
15270	done
15271	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15272done
15273LIBS="$cf_add_libs"
15274
15275else
15276
15277	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
15278	cf_libdir=""
15279	echo "$as_me:15279: checking for initscr" >&5
15280echo $ECHO_N "checking for initscr... $ECHO_C" >&6
15281if test "${ac_cv_func_initscr+set}" = set; then
15282  echo $ECHO_N "(cached) $ECHO_C" >&6
15283else
15284  cat >conftest.$ac_ext <<_ACEOF
15285#line 15285 "configure"
15286#include "confdefs.h"
15287/* System header to define __stub macros and hopefully few prototypes,
15288    which can conflict with char initscr (); below.  */
15289#include <assert.h>
15290/* Override any gcc2 internal prototype to avoid an error.  */
15291#ifdef __cplusplus
15292extern "C"
15293#endif
15294/* We use char because int might match the return type of a gcc2
15295   builtin and then its argument prototype would still apply.  */
15296char initscr ();
15297char (*f) ();
15298
15299int
15300main (void)
15301{
15302/* The GNU C library defines this for functions which it implements
15303    to always fail with ENOSYS.  Some functions are actually named
15304    something starting with __ and the normal name is an alias.  */
15305#if defined (__stub_initscr) || defined (__stub___initscr)
15306choke me
15307#else
15308f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15309#endif
15310
15311  ;
15312  return 0;
15313}
15314_ACEOF
15315rm -f conftest.$ac_objext conftest$ac_exeext
15316if { (eval echo "$as_me:15316: \"$ac_link\"") >&5
15317  (eval $ac_link) 2>&5
15318  ac_status=$?
15319  echo "$as_me:15319: \$? = $ac_status" >&5
15320  (exit $ac_status); } &&
15321         { ac_try='test -s conftest$ac_exeext'
15322  { (eval echo "$as_me:15322: \"$ac_try\"") >&5
15323  (eval $ac_try) 2>&5
15324  ac_status=$?
15325  echo "$as_me:15325: \$? = $ac_status" >&5
15326  (exit $ac_status); }; }; then
15327  ac_cv_func_initscr=yes
15328else
15329  echo "$as_me: failed program was:" >&5
15330cat conftest.$ac_ext >&5
15331ac_cv_func_initscr=no
15332fi
15333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15334fi
15335echo "$as_me:15335: result: $ac_cv_func_initscr" >&5
15336echo "${ECHO_T}$ac_cv_func_initscr" >&6
15337if test $ac_cv_func_initscr = yes; then
15338  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15339else
15340
15341		cf_save_LIBS="$LIBS"
15342		echo "$as_me:15342: checking for initscr in -l$cf_nculib_root" >&5
15343echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
15344		LIBS="-l$cf_nculib_root $LIBS"
15345		cat >conftest.$ac_ext <<_ACEOF
15346#line 15346 "configure"
15347#include "confdefs.h"
15348#include <${cf_cv_ncurses_header:-curses.h}>
15349int
15350main (void)
15351{
15352initscr()
15353  ;
15354  return 0;
15355}
15356_ACEOF
15357rm -f conftest.$ac_objext conftest$ac_exeext
15358if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359  (eval $ac_link) 2>&5
15360  ac_status=$?
15361  echo "$as_me:15361: \$? = $ac_status" >&5
15362  (exit $ac_status); } &&
15363         { ac_try='test -s conftest$ac_exeext'
15364  { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365  (eval $ac_try) 2>&5
15366  ac_status=$?
15367  echo "$as_me:15367: \$? = $ac_status" >&5
15368  (exit $ac_status); }; }; then
15369  echo "$as_me:15369: result: yes" >&5
15370echo "${ECHO_T}yes" >&6
15371			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15372
15373else
15374  echo "$as_me: failed program was:" >&5
15375cat conftest.$ac_ext >&5
15376echo "$as_me:15376: result: no" >&5
15377echo "${ECHO_T}no" >&6
15378
15379cf_search=
15380cf_library_path_list=""
15381if test -n "${LDFLAGS}${LIBS}" ; then
15382	for cf_library_path in $LDFLAGS $LIBS
15383	do
15384		case $cf_library_path in
15385		(-L*)
15386			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15387
15388test "x$cf_library_path" != "xNONE" && \
15389test -d "$cf_library_path" && \
15390 {
15391	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
15392	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
15393	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
15394	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
15395	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
15396	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"
15397}
15398
15399			cf_library_path_list="$cf_library_path_list $cf_search"
15400			;;
15401		esac
15402	done
15403fi
15404
15405cf_search=
15406
15407test "x$prefix" != "xNONE" && \
15408test -d "$prefix" && \
15409 {
15410	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
15411	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
15412	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
15413	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
15414	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
15415	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
15416}
15417
15418for cf_subdir_prefix in \
15419	/usr \
15420	/usr/local \
15421	/usr/pkg \
15422	/opt \
15423	/opt/local \
15424	$HOME
15425do
15426
15427test "x$cf_subdir_prefix" != "x$prefix" && \
15428test -d "$cf_subdir_prefix" && \
15429(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
15430	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
15431	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
15432	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
15433	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
15434	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
15435	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"
15436}
15437
15438done
15439
15440cf_search="$cf_library_path_list $cf_search"
15441
15442			for cf_libdir in $cf_search
15443			do
15444				echo "$as_me:15444: checking for -l$cf_nculib_root in $cf_libdir" >&5
15445echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
15446				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
15447				cat >conftest.$ac_ext <<_ACEOF
15448#line 15448 "configure"
15449#include "confdefs.h"
15450#include <${cf_cv_ncurses_header:-curses.h}>
15451int
15452main (void)
15453{
15454initscr()
15455  ;
15456  return 0;
15457}
15458_ACEOF
15459rm -f conftest.$ac_objext conftest$ac_exeext
15460if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461  (eval $ac_link) 2>&5
15462  ac_status=$?
15463  echo "$as_me:15463: \$? = $ac_status" >&5
15464  (exit $ac_status); } &&
15465         { ac_try='test -s conftest$ac_exeext'
15466  { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467  (eval $ac_try) 2>&5
15468  ac_status=$?
15469  echo "$as_me:15469: \$? = $ac_status" >&5
15470  (exit $ac_status); }; }; then
15471  echo "$as_me:15471: result: yes" >&5
15472echo "${ECHO_T}yes" >&6
15473			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15474					 break
15475else
15476  echo "$as_me: failed program was:" >&5
15477cat conftest.$ac_ext >&5
15478echo "$as_me:15478: result: no" >&5
15479echo "${ECHO_T}no" >&6
15480					 LIBS="$cf_save_LIBS"
15481fi
15482rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15483			done
15484
15485fi
15486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15487
15488fi
15489
15490eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
15491
15492if test $cf_found_library = no ; then
15493	{ { echo "$as_me:15493: error: Cannot link $cf_nculib_root library" >&5
15494echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
15495   { (exit 1); exit 1; }; }
15496fi
15497
15498fi
15499
15500if test -n "$cf_ncurses_LIBS" ; then
15501	echo "$as_me:15501: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
15502echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
15503	cf_ncurses_SAVE="$LIBS"
15504	for p in $cf_ncurses_LIBS ; do
15505		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
15506		if test "$q" != "$LIBS" ; then
15507			LIBS="$q"
15508		fi
15509	done
15510	cat >conftest.$ac_ext <<_ACEOF
15511#line 15511 "configure"
15512#include "confdefs.h"
15513#include <${cf_cv_ncurses_header:-curses.h}>
15514int
15515main (void)
15516{
15517initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
15518  ;
15519  return 0;
15520}
15521_ACEOF
15522rm -f conftest.$ac_objext conftest$ac_exeext
15523if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
15524  (eval $ac_link) 2>&5
15525  ac_status=$?
15526  echo "$as_me:15526: \$? = $ac_status" >&5
15527  (exit $ac_status); } &&
15528         { ac_try='test -s conftest$ac_exeext'
15529  { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530  (eval $ac_try) 2>&5
15531  ac_status=$?
15532  echo "$as_me:15532: \$? = $ac_status" >&5
15533  (exit $ac_status); }; }; then
15534  echo "$as_me:15534: result: yes" >&5
15535echo "${ECHO_T}yes" >&6
15536else
15537  echo "$as_me: failed program was:" >&5
15538cat conftest.$ac_ext >&5
15539echo "$as_me:15539: result: no" >&5
15540echo "${ECHO_T}no" >&6
15541		 LIBS="$cf_ncurses_SAVE"
15542fi
15543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15544fi
15545
15546cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15547
15548cat >>confdefs.h <<EOF
15549#define $cf_nculib_ROOT 1
15550EOF
15551
15552	fi
15553else
15554	NCURSES_CONFIG=none
15555fi
15556
15557	;;
15558(ncurses*)
15559
15560cf_ncuconfig_root=$cf_cv_screen
15561cf_have_ncuconfig=no
15562
15563if test "x${PKG_CONFIG:=none}" != xnone; then
15564	echo "$as_me:15564: checking pkg-config for $cf_ncuconfig_root" >&5
15565echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
15566	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
15567		echo "$as_me:15567: result: yes" >&5
15568echo "${ECHO_T}yes" >&6
15569
15570		echo "$as_me:15570: checking if the $cf_ncuconfig_root package files work" >&5
15571echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
15572		cf_have_ncuconfig=unknown
15573
15574		cf_save_CPPFLAGS="$CPPFLAGS"
15575		cf_save_LIBS="$LIBS"
15576
15577cf_fix_cppflags=no
15578cf_new_cflags=
15579cf_new_cppflags=
15580cf_new_extra_cppflags=
15581
15582for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
15583do
15584case $cf_fix_cppflags in
15585(no)
15586	case $cf_add_cflags in
15587	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15588		case $cf_add_cflags in
15589		(-D*)
15590			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15591
15592			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15593				&& test -z "${cf_tst_cflags}" \
15594				&& cf_fix_cppflags=yes
15595
15596			if test $cf_fix_cppflags = yes ; then
15597
15598	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15599	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15600
15601				continue
15602			elif test "${cf_tst_cflags}" = "\"'" ; then
15603
15604	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15605	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15606
15607				continue
15608			fi
15609			;;
15610		esac
15611		case "$CPPFLAGS" in
15612		(*$cf_add_cflags)
15613			;;
15614		(*)
15615			case $cf_add_cflags in
15616			(-D*)
15617				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15618
15619CPPFLAGS=`echo "$CPPFLAGS" | \
15620	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15621		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15622
15623				;;
15624			esac
15625
15626	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15627	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15628
15629			;;
15630		esac
15631		;;
15632	(*)
15633
15634	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15635	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15636
15637		;;
15638	esac
15639	;;
15640(yes)
15641
15642	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15643	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15644
15645	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15646
15647	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15648		&& test -z "${cf_tst_cflags}" \
15649		&& cf_fix_cppflags=no
15650	;;
15651esac
15652done
15653
15654if test -n "$cf_new_cflags" ; then
15655
15656	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15657	CFLAGS="${CFLAGS}$cf_new_cflags"
15658
15659fi
15660
15661if test -n "$cf_new_cppflags" ; then
15662
15663	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15664	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15665
15666fi
15667
15668if test -n "$cf_new_extra_cppflags" ; then
15669
15670	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15671	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15672
15673fi
15674
15675cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
15676# Filter out duplicates - this happens with badly-designed ".pc" files...
15677for cf_add_1lib in $LIBS
15678do
15679	for cf_add_2lib in $cf_add_libs
15680	do
15681		if test "x$cf_add_1lib" = "x$cf_add_2lib"
15682		then
15683			cf_add_1lib=
15684			break
15685		fi
15686	done
15687	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15688done
15689LIBS="$cf_add_libs"
15690
15691		cat >conftest.$ac_ext <<_ACEOF
15692#line 15692 "configure"
15693#include "confdefs.h"
15694#include <${cf_cv_ncurses_header:-curses.h}>
15695int
15696main (void)
15697{
15698initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
15699  ;
15700  return 0;
15701}
15702_ACEOF
15703rm -f conftest.$ac_objext conftest$ac_exeext
15704if { (eval echo "$as_me:15704: \"$ac_link\"") >&5
15705  (eval $ac_link) 2>&5
15706  ac_status=$?
15707  echo "$as_me:15707: \$? = $ac_status" >&5
15708  (exit $ac_status); } &&
15709         { ac_try='test -s conftest$ac_exeext'
15710  { (eval echo "$as_me:15710: \"$ac_try\"") >&5
15711  (eval $ac_try) 2>&5
15712  ac_status=$?
15713  echo "$as_me:15713: \$? = $ac_status" >&5
15714  (exit $ac_status); }; }; then
15715  if test "$cross_compiling" = yes; then
15716  cf_have_ncuconfig=maybe
15717else
15718  cat >conftest.$ac_ext <<_ACEOF
15719#line 15719 "configure"
15720#include "confdefs.h"
15721#include <${cf_cv_ncurses_header:-curses.h}>
15722				int main(void)
15723				{ char *xx = curses_version(); return (xx == 0); }
15724_ACEOF
15725rm -f conftest$ac_exeext
15726if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
15727  (eval $ac_link) 2>&5
15728  ac_status=$?
15729  echo "$as_me:15729: \$? = $ac_status" >&5
15730  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15731  { (eval echo "$as_me:15731: \"$ac_try\"") >&5
15732  (eval $ac_try) 2>&5
15733  ac_status=$?
15734  echo "$as_me:15734: \$? = $ac_status" >&5
15735  (exit $ac_status); }; }; then
15736  cf_have_ncuconfig=yes
15737else
15738  echo "$as_me: program exited with status $ac_status" >&5
15739echo "$as_me: failed program was:" >&5
15740cat conftest.$ac_ext >&5
15741cf_have_ncuconfig=no
15742fi
15743rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15744fi
15745else
15746  echo "$as_me: failed program was:" >&5
15747cat conftest.$ac_ext >&5
15748cf_have_ncuconfig=no
15749fi
15750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15751		echo "$as_me:15751: result: $cf_have_ncuconfig" >&5
15752echo "${ECHO_T}$cf_have_ncuconfig" >&6
15753		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
15754		if test "$cf_have_ncuconfig" != "yes"
15755		then
15756			CPPFLAGS="$cf_save_CPPFLAGS"
15757			LIBS="$cf_save_LIBS"
15758			NCURSES_CONFIG_PKG=none
15759		else
15760
15761cat >>confdefs.h <<\EOF
15762#define NCURSES 1
15763EOF
15764
15765			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
15766
15767echo "$as_me:15767: checking for terminfo header" >&5
15768echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
15769if test "${cf_cv_term_header+set}" = set; then
15770  echo $ECHO_N "(cached) $ECHO_C" >&6
15771else
15772
15773case ${cf_cv_ncurses_header} in
15774(*/ncurses.h|*/ncursesw.h)
15775	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
15776	;;
15777(*)
15778	cf_term_header=term.h
15779	;;
15780esac
15781
15782for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
15783do
15784cat >conftest.$ac_ext <<_ACEOF
15785#line 15785 "configure"
15786#include "confdefs.h"
15787#include <stdio.h>
15788#include <${cf_cv_ncurses_header:-curses.h}>
15789#include <$cf_test>
15790
15791int
15792main (void)
15793{
15794int x = auto_left_margin
15795  ;
15796  return 0;
15797}
15798_ACEOF
15799rm -f conftest.$ac_objext
15800if { (eval echo "$as_me:15800: \"$ac_compile\"") >&5
15801  (eval $ac_compile) 2>&5
15802  ac_status=$?
15803  echo "$as_me:15803: \$? = $ac_status" >&5
15804  (exit $ac_status); } &&
15805         { ac_try='test -s conftest.$ac_objext'
15806  { (eval echo "$as_me:15806: \"$ac_try\"") >&5
15807  (eval $ac_try) 2>&5
15808  ac_status=$?
15809  echo "$as_me:15809: \$? = $ac_status" >&5
15810  (exit $ac_status); }; }; then
15811
15812	cf_cv_term_header="$cf_test"
15813else
15814  echo "$as_me: failed program was:" >&5
15815cat conftest.$ac_ext >&5
15816
15817	cf_cv_term_header=unknown
15818
15819fi
15820rm -f conftest.$ac_objext conftest.$ac_ext
15821	test "$cf_cv_term_header" != unknown && break
15822done
15823
15824fi
15825echo "$as_me:15825: result: $cf_cv_term_header" >&5
15826echo "${ECHO_T}$cf_cv_term_header" >&6
15827
15828# Set definitions to allow ifdef'ing to accommodate subdirectories
15829
15830case $cf_cv_term_header in
15831(*term.h)
15832
15833cat >>confdefs.h <<\EOF
15834#define HAVE_TERM_H 1
15835EOF
15836
15837	;;
15838esac
15839
15840case $cf_cv_term_header in
15841(ncurses/term.h)
15842
15843cat >>confdefs.h <<\EOF
15844#define HAVE_NCURSES_TERM_H 1
15845EOF
15846
15847	;;
15848(ncursesw/term.h)
15849
15850cat >>confdefs.h <<\EOF
15851#define HAVE_NCURSESW_TERM_H 1
15852EOF
15853
15854	;;
15855esac
15856
15857		fi
15858
15859	else
15860		echo "$as_me:15860: result: no" >&5
15861echo "${ECHO_T}no" >&6
15862		NCURSES_CONFIG_PKG=none
15863	fi
15864else
15865	NCURSES_CONFIG_PKG=none
15866fi
15867
15868if test "x$cf_have_ncuconfig" = "xno"; then
15869	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
15870
15871if test -n "$ac_tool_prefix"; then
15872  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
15873  do
15874    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15876echo "$as_me:15876: checking for $ac_word" >&5
15877echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15878if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
15879  echo $ECHO_N "(cached) $ECHO_C" >&6
15880else
15881  if test -n "$NCURSES_CONFIG"; then
15882  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
15883else
15884  ac_save_IFS=$IFS; IFS=$ac_path_separator
15885ac_dummy="$PATH"
15886for ac_dir in $ac_dummy; do
15887  IFS=$ac_save_IFS
15888  test -z "$ac_dir" && ac_dir=.
15889  $as_executable_p "$ac_dir/$ac_word" || continue
15890ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15891echo "$as_me:15891: found $ac_dir/$ac_word" >&5
15892break
15893done
15894
15895fi
15896fi
15897NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
15898if test -n "$NCURSES_CONFIG"; then
15899  echo "$as_me:15899: result: $NCURSES_CONFIG" >&5
15900echo "${ECHO_T}$NCURSES_CONFIG" >&6
15901else
15902  echo "$as_me:15902: result: no" >&5
15903echo "${ECHO_T}no" >&6
15904fi
15905
15906    test -n "$NCURSES_CONFIG" && break
15907  done
15908fi
15909if test -z "$NCURSES_CONFIG"; then
15910  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
15911  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
15912do
15913  # Extract the first word of "$ac_prog", so it can be a program name with args.
15914set dummy $ac_prog; ac_word=$2
15915echo "$as_me:15915: checking for $ac_word" >&5
15916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15917if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
15918  echo $ECHO_N "(cached) $ECHO_C" >&6
15919else
15920  if test -n "$ac_ct_NCURSES_CONFIG"; then
15921  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
15922else
15923  ac_save_IFS=$IFS; IFS=$ac_path_separator
15924ac_dummy="$PATH"
15925for ac_dir in $ac_dummy; do
15926  IFS=$ac_save_IFS
15927  test -z "$ac_dir" && ac_dir=.
15928  $as_executable_p "$ac_dir/$ac_word" || continue
15929ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
15930echo "$as_me:15930: found $ac_dir/$ac_word" >&5
15931break
15932done
15933
15934fi
15935fi
15936ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
15937if test -n "$ac_ct_NCURSES_CONFIG"; then
15938  echo "$as_me:15938: result: $ac_ct_NCURSES_CONFIG" >&5
15939echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
15940else
15941  echo "$as_me:15941: result: no" >&5
15942echo "${ECHO_T}no" >&6
15943fi
15944
15945  test -n "$ac_ct_NCURSES_CONFIG" && break
15946done
15947test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
15948
15949  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
15950fi
15951
15952	if test "$NCURSES_CONFIG" != none ; then
15953
15954cf_fix_cppflags=no
15955cf_new_cflags=
15956cf_new_cppflags=
15957cf_new_extra_cppflags=
15958
15959for cf_add_cflags in `$NCURSES_CONFIG --cflags`
15960do
15961case $cf_fix_cppflags in
15962(no)
15963	case $cf_add_cflags in
15964	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15965		case $cf_add_cflags in
15966		(-D*)
15967			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15968
15969			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15970				&& test -z "${cf_tst_cflags}" \
15971				&& cf_fix_cppflags=yes
15972
15973			if test $cf_fix_cppflags = yes ; then
15974
15975	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15976	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15977
15978				continue
15979			elif test "${cf_tst_cflags}" = "\"'" ; then
15980
15981	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15982	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15983
15984				continue
15985			fi
15986			;;
15987		esac
15988		case "$CPPFLAGS" in
15989		(*$cf_add_cflags)
15990			;;
15991		(*)
15992			case $cf_add_cflags in
15993			(-D*)
15994				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15995
15996CPPFLAGS=`echo "$CPPFLAGS" | \
15997	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15998		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15999
16000				;;
16001			esac
16002
16003	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16004	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16005
16006			;;
16007		esac
16008		;;
16009	(*)
16010
16011	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16012	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16013
16014		;;
16015	esac
16016	;;
16017(yes)
16018
16019	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16020	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16021
16022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16023
16024	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16025		&& test -z "${cf_tst_cflags}" \
16026		&& cf_fix_cppflags=no
16027	;;
16028esac
16029done
16030
16031if test -n "$cf_new_cflags" ; then
16032
16033	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16034	CFLAGS="${CFLAGS}$cf_new_cflags"
16035
16036fi
16037
16038if test -n "$cf_new_cppflags" ; then
16039
16040	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16041	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16042
16043fi
16044
16045if test -n "$cf_new_extra_cppflags" ; then
16046
16047	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16048	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16049
16050fi
16051
16052cf_add_libs="`$NCURSES_CONFIG --libs`"
16053# Filter out duplicates - this happens with badly-designed ".pc" files...
16054for cf_add_1lib in $LIBS
16055do
16056	for cf_add_2lib in $cf_add_libs
16057	do
16058		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16059		then
16060			cf_add_1lib=
16061			break
16062		fi
16063	done
16064	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16065done
16066LIBS="$cf_add_libs"
16067
16068		# even with config script, some packages use no-override for curses.h
16069
16070echo "$as_me:16070: checking if we have identified curses headers" >&5
16071echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16072if test "${cf_cv_ncurses_header+set}" = set; then
16073  echo $ECHO_N "(cached) $ECHO_C" >&6
16074else
16075
16076cf_cv_ncurses_header=none
16077for cf_header in \
16078	ncurses.h $cf_cv_screen/ncurses.h \
16079	curses.h $cf_cv_screen/curses.h
16080do
16081cat >conftest.$ac_ext <<_ACEOF
16082#line 16082 "configure"
16083#include "confdefs.h"
16084#include <${cf_header}>
16085int
16086main (void)
16087{
16088initscr(); tgoto("?", 0,0)
16089  ;
16090  return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext
16094if { (eval echo "$as_me:16094: \"$ac_compile\"") >&5
16095  (eval $ac_compile) 2>&5
16096  ac_status=$?
16097  echo "$as_me:16097: \$? = $ac_status" >&5
16098  (exit $ac_status); } &&
16099         { ac_try='test -s conftest.$ac_objext'
16100  { (eval echo "$as_me:16100: \"$ac_try\"") >&5
16101  (eval $ac_try) 2>&5
16102  ac_status=$?
16103  echo "$as_me:16103: \$? = $ac_status" >&5
16104  (exit $ac_status); }; }; then
16105  cf_cv_ncurses_header=$cf_header; break
16106else
16107  echo "$as_me: failed program was:" >&5
16108cat conftest.$ac_ext >&5
16109fi
16110rm -f conftest.$ac_objext conftest.$ac_ext
16111done
16112
16113fi
16114echo "$as_me:16114: result: $cf_cv_ncurses_header" >&5
16115echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16116
16117if test "$cf_cv_ncurses_header" = none ; then
16118	{ { echo "$as_me:16118: error: No curses header-files found" >&5
16119echo "$as_me: error: No curses header-files found" >&2;}
16120   { (exit 1); exit 1; }; }
16121fi
16122
16123# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16124
16125for ac_header in $cf_cv_ncurses_header
16126do
16127as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16128echo "$as_me:16128: checking for $ac_header" >&5
16129echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16130if eval "test \"\${$as_ac_Header+set}\" = set"; then
16131  echo $ECHO_N "(cached) $ECHO_C" >&6
16132else
16133  cat >conftest.$ac_ext <<_ACEOF
16134#line 16134 "configure"
16135#include "confdefs.h"
16136#include <$ac_header>
16137_ACEOF
16138if { (eval echo "$as_me:16138: \"$ac_cpp conftest.$ac_ext\"") >&5
16139  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16140  ac_status=$?
16141  egrep -v '^ *\+' conftest.er1 >conftest.err
16142  rm -f conftest.er1
16143  cat conftest.err >&5
16144  echo "$as_me:16144: \$? = $ac_status" >&5
16145  (exit $ac_status); } >/dev/null; then
16146  if test -s conftest.err; then
16147    ac_cpp_err=$ac_c_preproc_warn_flag
16148  else
16149    ac_cpp_err=
16150  fi
16151else
16152  ac_cpp_err=yes
16153fi
16154if test -z "$ac_cpp_err"; then
16155  eval "$as_ac_Header=yes"
16156else
16157  echo "$as_me: failed program was:" >&5
16158  cat conftest.$ac_ext >&5
16159  eval "$as_ac_Header=no"
16160fi
16161rm -f conftest.err conftest.$ac_ext
16162fi
16163echo "$as_me:16163: result: `eval echo '${'$as_ac_Header'}'`" >&5
16164echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16165if test `eval echo '${'$as_ac_Header'}'` = yes; then
16166  cat >>confdefs.h <<EOF
16167#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16168EOF
16169
16170fi
16171done
16172
16173cat >>confdefs.h <<\EOF
16174#define NCURSES 1
16175EOF
16176
16177cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16178
16179		cat >>confdefs.h <<EOF
16180#define $cf_nculib_ROOT 1
16181EOF
16182
16183				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
16184
16185	else
16186
16187cf_ncuhdr_root=$cf_cv_screen
16188
16189test -n "$cf_cv_curses_dir" && \
16190test "$cf_cv_curses_dir" != "no" && { \
16191
16192if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
16193  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
16194  do
16195	while test $cf_add_incdir != /usr/include
16196	do
16197	  if test -d $cf_add_incdir
16198	  then
16199		cf_have_incdir=no
16200		if test -n "$CFLAGS$CPPFLAGS" ; then
16201		  # a loop is needed to ensure we can add subdirs of existing dirs
16202		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16203			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16204			  cf_have_incdir=yes; break
16205			fi
16206		  done
16207		fi
16208
16209		if test "$cf_have_incdir" = no ; then
16210		  if test "$cf_add_incdir" = /usr/local/include ; then
16211			if test "$GCC" = yes
16212			then
16213			  cf_save_CPPFLAGS=$CPPFLAGS
16214
16215	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16216	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16217
16218			  cat >conftest.$ac_ext <<_ACEOF
16219#line 16219 "configure"
16220#include "confdefs.h"
16221#include <stdio.h>
16222int
16223main (void)
16224{
16225printf("Hello")
16226  ;
16227  return 0;
16228}
16229_ACEOF
16230rm -f conftest.$ac_objext
16231if { (eval echo "$as_me:16231: \"$ac_compile\"") >&5
16232  (eval $ac_compile) 2>&5
16233  ac_status=$?
16234  echo "$as_me:16234: \$? = $ac_status" >&5
16235  (exit $ac_status); } &&
16236         { ac_try='test -s conftest.$ac_objext'
16237  { (eval echo "$as_me:16237: \"$ac_try\"") >&5
16238  (eval $ac_try) 2>&5
16239  ac_status=$?
16240  echo "$as_me:16240: \$? = $ac_status" >&5
16241  (exit $ac_status); }; }; then
16242  :
16243else
16244  echo "$as_me: failed program was:" >&5
16245cat conftest.$ac_ext >&5
16246cf_have_incdir=yes
16247fi
16248rm -f conftest.$ac_objext conftest.$ac_ext
16249			  CPPFLAGS=$cf_save_CPPFLAGS
16250			fi
16251		  fi
16252		fi
16253
16254		if test "$cf_have_incdir" = no ; then
16255		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16256
16257echo "${as_me:-configure}:16257: testing adding $cf_add_incdir to include-path ..." 1>&5
16258
16259		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16260
16261		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16262		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16263		  cf_add_incdir="$cf_top_incdir"
16264		else
16265		  break
16266		fi
16267	  else
16268		break
16269	  fi
16270	done
16271  done
16272fi
16273
16274}
16275
16276echo "$as_me:16276: checking for $cf_ncuhdr_root header in include-path" >&5
16277echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
16278if test "${cf_cv_ncurses_h+set}" = set; then
16279  echo $ECHO_N "(cached) $ECHO_C" >&6
16280else
16281
16282	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
16283	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
16284	for cf_header in $cf_header_list
16285	do
16286
16287	cat >conftest.$ac_ext <<_ACEOF
16288#line 16288 "configure"
16289#include "confdefs.h"
16290
16291#include <$cf_header>
16292int
16293main (void)
16294{
16295
16296#ifdef NCURSES_VERSION
16297
16298printf("%s\n", NCURSES_VERSION);
16299#else
16300#ifdef __NCURSES_H
16301printf("old\n");
16302#else
16303	make an error
16304#endif
16305#endif
16306
16307  ;
16308  return 0;
16309}
16310_ACEOF
16311rm -f conftest.$ac_objext
16312if { (eval echo "$as_me:16312: \"$ac_compile\"") >&5
16313  (eval $ac_compile) 2>&5
16314  ac_status=$?
16315  echo "$as_me:16315: \$? = $ac_status" >&5
16316  (exit $ac_status); } &&
16317         { ac_try='test -s conftest.$ac_objext'
16318  { (eval echo "$as_me:16318: \"$ac_try\"") >&5
16319  (eval $ac_try) 2>&5
16320  ac_status=$?
16321  echo "$as_me:16321: \$? = $ac_status" >&5
16322  (exit $ac_status); }; }; then
16323  cf_cv_ncurses_h=$cf_header
16324
16325else
16326  echo "$as_me: failed program was:" >&5
16327cat conftest.$ac_ext >&5
16328cf_cv_ncurses_h=no
16329fi
16330rm -f conftest.$ac_objext conftest.$ac_ext
16331
16332		test "$cf_cv_ncurses_h" != no && break
16333	done
16334
16335fi
16336echo "$as_me:16336: result: $cf_cv_ncurses_h" >&5
16337echo "${ECHO_T}$cf_cv_ncurses_h" >&6
16338
16339if test "$cf_cv_ncurses_h" != no ; then
16340	cf_cv_ncurses_header=$cf_cv_ncurses_h
16341else
16342
16343echo "$as_me:16343: checking for $cf_ncuhdr_root include-path" >&5
16344echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
16345if test "${cf_cv_ncurses_h2+set}" = set; then
16346  echo $ECHO_N "(cached) $ECHO_C" >&6
16347else
16348
16349	test -n "$verbose" && echo
16350
16351cf_search=
16352
16353# collect the current set of include-directories from compiler flags
16354cf_header_path_list=""
16355if test -n "${CFLAGS}${CPPFLAGS}" ; then
16356	for cf_header_path in $CPPFLAGS $CFLAGS
16357	do
16358		case $cf_header_path in
16359		(-I*)
16360			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16361
16362test "x$cf_header_path" != "xNONE" && \
16363test -d "$cf_header_path" && \
16364 {
16365	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
16366	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
16367	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
16368	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
16369	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
16370	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"
16371}
16372
16373			cf_header_path_list="$cf_header_path_list $cf_search"
16374			;;
16375		esac
16376	done
16377fi
16378
16379# add the variations for the package we are looking for
16380
16381cf_search=
16382
16383test "x$prefix" != "xNONE" && \
16384test -d "$prefix" && \
16385 {
16386	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
16387	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
16388	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
16389	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
16390	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
16391	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16392}
16393
16394for cf_subdir_prefix in \
16395	/usr \
16396	/usr/local \
16397	/usr/pkg \
16398	/opt \
16399	/opt/local \
16400	$HOME
16401do
16402
16403test "x$cf_subdir_prefix" != "x$prefix" && \
16404test -d "$cf_subdir_prefix" && \
16405(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
16406	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
16407	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
16408	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
16409	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
16410	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
16411	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"
16412}
16413
16414done
16415
16416test "$includedir" != NONE && \
16417test "$includedir" != "/usr/include" && \
16418test -d "$includedir" && {
16419	test -d $includedir &&    cf_search="$cf_search $includedir"
16420	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
16421}
16422
16423test "$oldincludedir" != NONE && \
16424test "$oldincludedir" != "/usr/include" && \
16425test -d "$oldincludedir" && {
16426	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
16427	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
16428}
16429
16430cf_search="$cf_search $cf_header_path_list"
16431
16432	test -n "$verbose" && echo search path $cf_search
16433	cf_save2_CPPFLAGS="$CPPFLAGS"
16434	for cf_incdir in $cf_search
16435	do
16436
16437if test -n "$cf_incdir" ; then
16438  for cf_add_incdir in $cf_incdir
16439  do
16440	while test $cf_add_incdir != /usr/include
16441	do
16442	  if test -d $cf_add_incdir
16443	  then
16444		cf_have_incdir=no
16445		if test -n "$CFLAGS$CPPFLAGS" ; then
16446		  # a loop is needed to ensure we can add subdirs of existing dirs
16447		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16448			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16449			  cf_have_incdir=yes; break
16450			fi
16451		  done
16452		fi
16453
16454		if test "$cf_have_incdir" = no ; then
16455		  if test "$cf_add_incdir" = /usr/local/include ; then
16456			if test "$GCC" = yes
16457			then
16458			  cf_save_CPPFLAGS=$CPPFLAGS
16459
16460	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16461	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16462
16463			  cat >conftest.$ac_ext <<_ACEOF
16464#line 16464 "configure"
16465#include "confdefs.h"
16466#include <stdio.h>
16467int
16468main (void)
16469{
16470printf("Hello")
16471  ;
16472  return 0;
16473}
16474_ACEOF
16475rm -f conftest.$ac_objext
16476if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
16477  (eval $ac_compile) 2>&5
16478  ac_status=$?
16479  echo "$as_me:16479: \$? = $ac_status" >&5
16480  (exit $ac_status); } &&
16481         { ac_try='test -s conftest.$ac_objext'
16482  { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483  (eval $ac_try) 2>&5
16484  ac_status=$?
16485  echo "$as_me:16485: \$? = $ac_status" >&5
16486  (exit $ac_status); }; }; then
16487  :
16488else
16489  echo "$as_me: failed program was:" >&5
16490cat conftest.$ac_ext >&5
16491cf_have_incdir=yes
16492fi
16493rm -f conftest.$ac_objext conftest.$ac_ext
16494			  CPPFLAGS=$cf_save_CPPFLAGS
16495			fi
16496		  fi
16497		fi
16498
16499		if test "$cf_have_incdir" = no ; then
16500		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16501
16502echo "${as_me:-configure}:16502: testing adding $cf_add_incdir to include-path ..." 1>&5
16503
16504		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16505
16506		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16507		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16508		  cf_add_incdir="$cf_top_incdir"
16509		else
16510		  break
16511		fi
16512	  else
16513		break
16514	  fi
16515	done
16516  done
16517fi
16518
16519		for cf_header in \
16520			ncurses.h \
16521			curses.h
16522		do
16523
16524	cat >conftest.$ac_ext <<_ACEOF
16525#line 16525 "configure"
16526#include "confdefs.h"
16527
16528#include <$cf_header>
16529int
16530main (void)
16531{
16532
16533#ifdef NCURSES_VERSION
16534
16535printf("%s\n", NCURSES_VERSION);
16536#else
16537#ifdef __NCURSES_H
16538printf("old\n");
16539#else
16540	make an error
16541#endif
16542#endif
16543
16544  ;
16545  return 0;
16546}
16547_ACEOF
16548rm -f conftest.$ac_objext
16549if { (eval echo "$as_me:16549: \"$ac_compile\"") >&5
16550  (eval $ac_compile) 2>&5
16551  ac_status=$?
16552  echo "$as_me:16552: \$? = $ac_status" >&5
16553  (exit $ac_status); } &&
16554         { ac_try='test -s conftest.$ac_objext'
16555  { (eval echo "$as_me:16555: \"$ac_try\"") >&5
16556  (eval $ac_try) 2>&5
16557  ac_status=$?
16558  echo "$as_me:16558: \$? = $ac_status" >&5
16559  (exit $ac_status); }; }; then
16560  cf_cv_ncurses_h2=$cf_header
16561
16562else
16563  echo "$as_me: failed program was:" >&5
16564cat conftest.$ac_ext >&5
16565cf_cv_ncurses_h2=no
16566fi
16567rm -f conftest.$ac_objext conftest.$ac_ext
16568
16569			if test "$cf_cv_ncurses_h2" != no ; then
16570				cf_cv_ncurses_h2=$cf_incdir/$cf_header
16571				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
16572				break
16573			fi
16574			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
16575		done
16576		CPPFLAGS="$cf_save2_CPPFLAGS"
16577		test "$cf_cv_ncurses_h2" != no && break
16578	done
16579	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16579: error: not found" >&5
16580echo "$as_me: error: not found" >&2;}
16581   { (exit 1); exit 1; }; }
16582
16583fi
16584echo "$as_me:16584: result: $cf_cv_ncurses_h2" >&5
16585echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
16586
16587	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
16588	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
16589	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
16590		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
16591	fi
16592
16593if test -n "$cf_1st_incdir" ; then
16594  for cf_add_incdir in $cf_1st_incdir
16595  do
16596	while test $cf_add_incdir != /usr/include
16597	do
16598	  if test -d $cf_add_incdir
16599	  then
16600		cf_have_incdir=no
16601		if test -n "$CFLAGS$CPPFLAGS" ; then
16602		  # a loop is needed to ensure we can add subdirs of existing dirs
16603		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16604			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16605			  cf_have_incdir=yes; break
16606			fi
16607		  done
16608		fi
16609
16610		if test "$cf_have_incdir" = no ; then
16611		  if test "$cf_add_incdir" = /usr/local/include ; then
16612			if test "$GCC" = yes
16613			then
16614			  cf_save_CPPFLAGS=$CPPFLAGS
16615
16616	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16617	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16618
16619			  cat >conftest.$ac_ext <<_ACEOF
16620#line 16620 "configure"
16621#include "confdefs.h"
16622#include <stdio.h>
16623int
16624main (void)
16625{
16626printf("Hello")
16627  ;
16628  return 0;
16629}
16630_ACEOF
16631rm -f conftest.$ac_objext
16632if { (eval echo "$as_me:16632: \"$ac_compile\"") >&5
16633  (eval $ac_compile) 2>&5
16634  ac_status=$?
16635  echo "$as_me:16635: \$? = $ac_status" >&5
16636  (exit $ac_status); } &&
16637         { ac_try='test -s conftest.$ac_objext'
16638  { (eval echo "$as_me:16638: \"$ac_try\"") >&5
16639  (eval $ac_try) 2>&5
16640  ac_status=$?
16641  echo "$as_me:16641: \$? = $ac_status" >&5
16642  (exit $ac_status); }; }; then
16643  :
16644else
16645  echo "$as_me: failed program was:" >&5
16646cat conftest.$ac_ext >&5
16647cf_have_incdir=yes
16648fi
16649rm -f conftest.$ac_objext conftest.$ac_ext
16650			  CPPFLAGS=$cf_save_CPPFLAGS
16651			fi
16652		  fi
16653		fi
16654
16655		if test "$cf_have_incdir" = no ; then
16656		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16657
16658echo "${as_me:-configure}:16658: testing adding $cf_add_incdir to include-path ..." 1>&5
16659
16660		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16661
16662		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16663		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16664		  cf_add_incdir="$cf_top_incdir"
16665		else
16666		  break
16667		fi
16668	  else
16669		break
16670	  fi
16671	done
16672  done
16673fi
16674
16675fi
16676
16677# Set definitions to allow ifdef'ing for ncurses.h
16678
16679case $cf_cv_ncurses_header in
16680(*ncurses.h)
16681
16682cat >>confdefs.h <<\EOF
16683#define HAVE_NCURSES_H 1
16684EOF
16685
16686	;;
16687esac
16688
16689case $cf_cv_ncurses_header in
16690(ncurses/curses.h|ncurses/ncurses.h)
16691
16692cat >>confdefs.h <<\EOF
16693#define HAVE_NCURSES_NCURSES_H 1
16694EOF
16695
16696	;;
16697(ncursesw/curses.h|ncursesw/ncurses.h)
16698
16699cat >>confdefs.h <<\EOF
16700#define HAVE_NCURSESW_NCURSES_H 1
16701EOF
16702
16703	;;
16704esac
16705
16706echo "$as_me:16706: checking for terminfo header" >&5
16707echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16708if test "${cf_cv_term_header+set}" = set; then
16709  echo $ECHO_N "(cached) $ECHO_C" >&6
16710else
16711
16712case ${cf_cv_ncurses_header} in
16713(*/ncurses.h|*/ncursesw.h)
16714	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16715	;;
16716(*)
16717	cf_term_header=term.h
16718	;;
16719esac
16720
16721for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16722do
16723cat >conftest.$ac_ext <<_ACEOF
16724#line 16724 "configure"
16725#include "confdefs.h"
16726#include <stdio.h>
16727#include <${cf_cv_ncurses_header:-curses.h}>
16728#include <$cf_test>
16729
16730int
16731main (void)
16732{
16733int x = auto_left_margin
16734  ;
16735  return 0;
16736}
16737_ACEOF
16738rm -f conftest.$ac_objext
16739if { (eval echo "$as_me:16739: \"$ac_compile\"") >&5
16740  (eval $ac_compile) 2>&5
16741  ac_status=$?
16742  echo "$as_me:16742: \$? = $ac_status" >&5
16743  (exit $ac_status); } &&
16744         { ac_try='test -s conftest.$ac_objext'
16745  { (eval echo "$as_me:16745: \"$ac_try\"") >&5
16746  (eval $ac_try) 2>&5
16747  ac_status=$?
16748  echo "$as_me:16748: \$? = $ac_status" >&5
16749  (exit $ac_status); }; }; then
16750
16751	cf_cv_term_header="$cf_test"
16752else
16753  echo "$as_me: failed program was:" >&5
16754cat conftest.$ac_ext >&5
16755
16756	cf_cv_term_header=unknown
16757
16758fi
16759rm -f conftest.$ac_objext conftest.$ac_ext
16760	test "$cf_cv_term_header" != unknown && break
16761done
16762
16763fi
16764echo "$as_me:16764: result: $cf_cv_term_header" >&5
16765echo "${ECHO_T}$cf_cv_term_header" >&6
16766
16767# Set definitions to allow ifdef'ing to accommodate subdirectories
16768
16769case $cf_cv_term_header in
16770(*term.h)
16771
16772cat >>confdefs.h <<\EOF
16773#define HAVE_TERM_H 1
16774EOF
16775
16776	;;
16777esac
16778
16779case $cf_cv_term_header in
16780(ncurses/term.h)
16781
16782cat >>confdefs.h <<\EOF
16783#define HAVE_NCURSES_TERM_H 1
16784EOF
16785
16786	;;
16787(ncursesw/term.h)
16788
16789cat >>confdefs.h <<\EOF
16790#define HAVE_NCURSESW_TERM_H 1
16791EOF
16792
16793	;;
16794esac
16795
16796# some applications need this, but should check for NCURSES_VERSION
16797
16798cat >>confdefs.h <<\EOF
16799#define NCURSES 1
16800EOF
16801
16802echo "$as_me:16802: checking for ncurses version" >&5
16803echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
16804if test "${cf_cv_ncurses_version+set}" = set; then
16805  echo $ECHO_N "(cached) $ECHO_C" >&6
16806else
16807
16808	cf_cv_ncurses_version=no
16809	cf_tempfile=out$$
16810	rm -f $cf_tempfile
16811	if test "$cross_compiling" = yes; then
16812
16813	# This will not work if the preprocessor splits the line after the
16814	# Autoconf token.  The 'unproto' program does that.
16815	cat > conftest.$ac_ext <<EOF
16816#include <${cf_cv_ncurses_header:-curses.h}>
16817#undef Autoconf
16818#ifdef NCURSES_VERSION
16819Autoconf NCURSES_VERSION
16820#else
16821#ifdef __NCURSES_H
16822Autoconf "old"
16823#endif
16824;
16825#endif
16826EOF
16827	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
16828	{ (eval echo "$as_me:16828: \"$cf_try\"") >&5
16829  (eval $cf_try) 2>&5
16830  ac_status=$?
16831  echo "$as_me:16831: \$? = $ac_status" >&5
16832  (exit $ac_status); }
16833	if test -f conftest.out ; then
16834		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
16835		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
16836		rm -f conftest.out
16837	fi
16838
16839else
16840  cat >conftest.$ac_ext <<_ACEOF
16841#line 16841 "configure"
16842#include "confdefs.h"
16843
16844#include <${cf_cv_ncurses_header:-curses.h}>
16845#include <stdio.h>
16846int main(void)
16847{
16848	FILE *fp = fopen("$cf_tempfile", "w");
16849#ifdef NCURSES_VERSION
16850# ifdef NCURSES_VERSION_PATCH
16851	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
16852# else
16853	fprintf(fp, "%s\n", NCURSES_VERSION);
16854# endif
16855#else
16856# ifdef __NCURSES_H
16857	fprintf(fp, "old\n");
16858# else
16859	make an error
16860# endif
16861#endif
16862	${cf_cv_main_return:-return}(0);
16863}
16864_ACEOF
16865rm -f conftest$ac_exeext
16866if { (eval echo "$as_me:16866: \"$ac_link\"") >&5
16867  (eval $ac_link) 2>&5
16868  ac_status=$?
16869  echo "$as_me:16869: \$? = $ac_status" >&5
16870  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16871  { (eval echo "$as_me:16871: \"$ac_try\"") >&5
16872  (eval $ac_try) 2>&5
16873  ac_status=$?
16874  echo "$as_me:16874: \$? = $ac_status" >&5
16875  (exit $ac_status); }; }; then
16876
16877	cf_cv_ncurses_version=`cat $cf_tempfile`
16878else
16879  echo "$as_me: program exited with status $ac_status" >&5
16880echo "$as_me: failed program was:" >&5
16881cat conftest.$ac_ext >&5
16882fi
16883rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16884fi
16885	rm -f $cf_tempfile
16886
16887fi
16888echo "$as_me:16888: result: $cf_cv_ncurses_version" >&5
16889echo "${ECHO_T}$cf_cv_ncurses_version" >&6
16890test "$cf_cv_ncurses_version" = no ||
16891cat >>confdefs.h <<\EOF
16892#define NCURSES 1
16893EOF
16894
16895cf_nculib_root=$cf_cv_screen
16896	# This works, except for the special case where we find gpm, but
16897	# ncurses is in a nonstandard location via $LIBS, and we really want
16898	# to link gpm.
16899cf_ncurses_LIBS=""
16900cf_ncurses_SAVE="$LIBS"
16901echo "$as_me:16901: checking for Gpm_Open in -lgpm" >&5
16902echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
16903if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
16904  echo $ECHO_N "(cached) $ECHO_C" >&6
16905else
16906  ac_check_lib_save_LIBS=$LIBS
16907LIBS="-lgpm  $LIBS"
16908cat >conftest.$ac_ext <<_ACEOF
16909#line 16909 "configure"
16910#include "confdefs.h"
16911
16912/* Override any gcc2 internal prototype to avoid an error.  */
16913#ifdef __cplusplus
16914extern "C"
16915#endif
16916/* We use char because int might match the return type of a gcc2
16917   builtin and then its argument prototype would still apply.  */
16918char Gpm_Open ();
16919int
16920main (void)
16921{
16922Gpm_Open ();
16923  ;
16924  return 0;
16925}
16926_ACEOF
16927rm -f conftest.$ac_objext conftest$ac_exeext
16928if { (eval echo "$as_me:16928: \"$ac_link\"") >&5
16929  (eval $ac_link) 2>&5
16930  ac_status=$?
16931  echo "$as_me:16931: \$? = $ac_status" >&5
16932  (exit $ac_status); } &&
16933         { ac_try='test -s conftest$ac_exeext'
16934  { (eval echo "$as_me:16934: \"$ac_try\"") >&5
16935  (eval $ac_try) 2>&5
16936  ac_status=$?
16937  echo "$as_me:16937: \$? = $ac_status" >&5
16938  (exit $ac_status); }; }; then
16939  ac_cv_lib_gpm_Gpm_Open=yes
16940else
16941  echo "$as_me: failed program was:" >&5
16942cat conftest.$ac_ext >&5
16943ac_cv_lib_gpm_Gpm_Open=no
16944fi
16945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16946LIBS=$ac_check_lib_save_LIBS
16947fi
16948echo "$as_me:16948: result: $ac_cv_lib_gpm_Gpm_Open" >&5
16949echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
16950if test $ac_cv_lib_gpm_Gpm_Open = yes; then
16951  echo "$as_me:16951: checking for initscr in -lgpm" >&5
16952echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
16953if test "${ac_cv_lib_gpm_initscr+set}" = set; then
16954  echo $ECHO_N "(cached) $ECHO_C" >&6
16955else
16956  ac_check_lib_save_LIBS=$LIBS
16957LIBS="-lgpm  $LIBS"
16958cat >conftest.$ac_ext <<_ACEOF
16959#line 16959 "configure"
16960#include "confdefs.h"
16961
16962/* Override any gcc2 internal prototype to avoid an error.  */
16963#ifdef __cplusplus
16964extern "C"
16965#endif
16966/* We use char because int might match the return type of a gcc2
16967   builtin and then its argument prototype would still apply.  */
16968char initscr ();
16969int
16970main (void)
16971{
16972initscr ();
16973  ;
16974  return 0;
16975}
16976_ACEOF
16977rm -f conftest.$ac_objext conftest$ac_exeext
16978if { (eval echo "$as_me:16978: \"$ac_link\"") >&5
16979  (eval $ac_link) 2>&5
16980  ac_status=$?
16981  echo "$as_me:16981: \$? = $ac_status" >&5
16982  (exit $ac_status); } &&
16983         { ac_try='test -s conftest$ac_exeext'
16984  { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985  (eval $ac_try) 2>&5
16986  ac_status=$?
16987  echo "$as_me:16987: \$? = $ac_status" >&5
16988  (exit $ac_status); }; }; then
16989  ac_cv_lib_gpm_initscr=yes
16990else
16991  echo "$as_me: failed program was:" >&5
16992cat conftest.$ac_ext >&5
16993ac_cv_lib_gpm_initscr=no
16994fi
16995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16996LIBS=$ac_check_lib_save_LIBS
16997fi
16998echo "$as_me:16998: result: $ac_cv_lib_gpm_initscr" >&5
16999echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
17000if test $ac_cv_lib_gpm_initscr = yes; then
17001  LIBS="$cf_ncurses_SAVE"
17002else
17003  cf_ncurses_LIBS="-lgpm"
17004fi
17005
17006fi
17007
17008case $host_os in
17009(freebsd*)
17010	# This is only necessary if you are linking against an obsolete
17011	# version of ncurses (but it should do no harm, since it's static).
17012	if test "$cf_nculib_root" = ncurses ; then
17013		echo "$as_me:17013: checking for tgoto in -lmytinfo" >&5
17014echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
17015if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
17016  echo $ECHO_N "(cached) $ECHO_C" >&6
17017else
17018  ac_check_lib_save_LIBS=$LIBS
17019LIBS="-lmytinfo  $LIBS"
17020cat >conftest.$ac_ext <<_ACEOF
17021#line 17021 "configure"
17022#include "confdefs.h"
17023
17024/* Override any gcc2 internal prototype to avoid an error.  */
17025#ifdef __cplusplus
17026extern "C"
17027#endif
17028/* We use char because int might match the return type of a gcc2
17029   builtin and then its argument prototype would still apply.  */
17030char tgoto ();
17031int
17032main (void)
17033{
17034tgoto ();
17035  ;
17036  return 0;
17037}
17038_ACEOF
17039rm -f conftest.$ac_objext conftest$ac_exeext
17040if { (eval echo "$as_me:17040: \"$ac_link\"") >&5
17041  (eval $ac_link) 2>&5
17042  ac_status=$?
17043  echo "$as_me:17043: \$? = $ac_status" >&5
17044  (exit $ac_status); } &&
17045         { ac_try='test -s conftest$ac_exeext'
17046  { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047  (eval $ac_try) 2>&5
17048  ac_status=$?
17049  echo "$as_me:17049: \$? = $ac_status" >&5
17050  (exit $ac_status); }; }; then
17051  ac_cv_lib_mytinfo_tgoto=yes
17052else
17053  echo "$as_me: failed program was:" >&5
17054cat conftest.$ac_ext >&5
17055ac_cv_lib_mytinfo_tgoto=no
17056fi
17057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17058LIBS=$ac_check_lib_save_LIBS
17059fi
17060echo "$as_me:17060: result: $ac_cv_lib_mytinfo_tgoto" >&5
17061echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
17062if test $ac_cv_lib_mytinfo_tgoto = yes; then
17063  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
17064fi
17065
17066	fi
17067	;;
17068esac
17069
17070cf_add_libs="$cf_ncurses_LIBS"
17071# Filter out duplicates - this happens with badly-designed ".pc" files...
17072for cf_add_1lib in $LIBS
17073do
17074	for cf_add_2lib in $cf_add_libs
17075	do
17076		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17077		then
17078			cf_add_1lib=
17079			break
17080		fi
17081	done
17082	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17083done
17084LIBS="$cf_add_libs"
17085
17086if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
17087then
17088
17089cf_add_libs="-l$cf_nculib_root"
17090# Filter out duplicates - this happens with badly-designed ".pc" files...
17091for cf_add_1lib in $LIBS
17092do
17093	for cf_add_2lib in $cf_add_libs
17094	do
17095		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17096		then
17097			cf_add_1lib=
17098			break
17099		fi
17100	done
17101	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17102done
17103LIBS="$cf_add_libs"
17104
17105else
17106
17107	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
17108	cf_libdir=""
17109	echo "$as_me:17109: checking for initscr" >&5
17110echo $ECHO_N "checking for initscr... $ECHO_C" >&6
17111if test "${ac_cv_func_initscr+set}" = set; then
17112  echo $ECHO_N "(cached) $ECHO_C" >&6
17113else
17114  cat >conftest.$ac_ext <<_ACEOF
17115#line 17115 "configure"
17116#include "confdefs.h"
17117/* System header to define __stub macros and hopefully few prototypes,
17118    which can conflict with char initscr (); below.  */
17119#include <assert.h>
17120/* Override any gcc2 internal prototype to avoid an error.  */
17121#ifdef __cplusplus
17122extern "C"
17123#endif
17124/* We use char because int might match the return type of a gcc2
17125   builtin and then its argument prototype would still apply.  */
17126char initscr ();
17127char (*f) ();
17128
17129int
17130main (void)
17131{
17132/* The GNU C library defines this for functions which it implements
17133    to always fail with ENOSYS.  Some functions are actually named
17134    something starting with __ and the normal name is an alias.  */
17135#if defined (__stub_initscr) || defined (__stub___initscr)
17136choke me
17137#else
17138f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17139#endif
17140
17141  ;
17142  return 0;
17143}
17144_ACEOF
17145rm -f conftest.$ac_objext conftest$ac_exeext
17146if { (eval echo "$as_me:17146: \"$ac_link\"") >&5
17147  (eval $ac_link) 2>&5
17148  ac_status=$?
17149  echo "$as_me:17149: \$? = $ac_status" >&5
17150  (exit $ac_status); } &&
17151         { ac_try='test -s conftest$ac_exeext'
17152  { (eval echo "$as_me:17152: \"$ac_try\"") >&5
17153  (eval $ac_try) 2>&5
17154  ac_status=$?
17155  echo "$as_me:17155: \$? = $ac_status" >&5
17156  (exit $ac_status); }; }; then
17157  ac_cv_func_initscr=yes
17158else
17159  echo "$as_me: failed program was:" >&5
17160cat conftest.$ac_ext >&5
17161ac_cv_func_initscr=no
17162fi
17163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17164fi
17165echo "$as_me:17165: result: $ac_cv_func_initscr" >&5
17166echo "${ECHO_T}$ac_cv_func_initscr" >&6
17167if test $ac_cv_func_initscr = yes; then
17168  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17169else
17170
17171		cf_save_LIBS="$LIBS"
17172		echo "$as_me:17172: checking for initscr in -l$cf_nculib_root" >&5
17173echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
17174		LIBS="-l$cf_nculib_root $LIBS"
17175		cat >conftest.$ac_ext <<_ACEOF
17176#line 17176 "configure"
17177#include "confdefs.h"
17178#include <${cf_cv_ncurses_header:-curses.h}>
17179int
17180main (void)
17181{
17182initscr()
17183  ;
17184  return 0;
17185}
17186_ACEOF
17187rm -f conftest.$ac_objext conftest$ac_exeext
17188if { (eval echo "$as_me:17188: \"$ac_link\"") >&5
17189  (eval $ac_link) 2>&5
17190  ac_status=$?
17191  echo "$as_me:17191: \$? = $ac_status" >&5
17192  (exit $ac_status); } &&
17193         { ac_try='test -s conftest$ac_exeext'
17194  { (eval echo "$as_me:17194: \"$ac_try\"") >&5
17195  (eval $ac_try) 2>&5
17196  ac_status=$?
17197  echo "$as_me:17197: \$? = $ac_status" >&5
17198  (exit $ac_status); }; }; then
17199  echo "$as_me:17199: result: yes" >&5
17200echo "${ECHO_T}yes" >&6
17201			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17202
17203else
17204  echo "$as_me: failed program was:" >&5
17205cat conftest.$ac_ext >&5
17206echo "$as_me:17206: result: no" >&5
17207echo "${ECHO_T}no" >&6
17208
17209cf_search=
17210cf_library_path_list=""
17211if test -n "${LDFLAGS}${LIBS}" ; then
17212	for cf_library_path in $LDFLAGS $LIBS
17213	do
17214		case $cf_library_path in
17215		(-L*)
17216			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17217
17218test "x$cf_library_path" != "xNONE" && \
17219test -d "$cf_library_path" && \
17220 {
17221	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
17222	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
17223	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
17224	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
17225	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
17226	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"
17227}
17228
17229			cf_library_path_list="$cf_library_path_list $cf_search"
17230			;;
17231		esac
17232	done
17233fi
17234
17235cf_search=
17236
17237test "x$prefix" != "xNONE" && \
17238test -d "$prefix" && \
17239 {
17240	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
17241	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
17242	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
17243	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
17244	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
17245	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
17246}
17247
17248for cf_subdir_prefix in \
17249	/usr \
17250	/usr/local \
17251	/usr/pkg \
17252	/opt \
17253	/opt/local \
17254	$HOME
17255do
17256
17257test "x$cf_subdir_prefix" != "x$prefix" && \
17258test -d "$cf_subdir_prefix" && \
17259(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
17260	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
17261	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
17262	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
17263	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
17264	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
17265	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"
17266}
17267
17268done
17269
17270cf_search="$cf_library_path_list $cf_search"
17271
17272			for cf_libdir in $cf_search
17273			do
17274				echo "$as_me:17274: checking for -l$cf_nculib_root in $cf_libdir" >&5
17275echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
17276				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
17277				cat >conftest.$ac_ext <<_ACEOF
17278#line 17278 "configure"
17279#include "confdefs.h"
17280#include <${cf_cv_ncurses_header:-curses.h}>
17281int
17282main (void)
17283{
17284initscr()
17285  ;
17286  return 0;
17287}
17288_ACEOF
17289rm -f conftest.$ac_objext conftest$ac_exeext
17290if { (eval echo "$as_me:17290: \"$ac_link\"") >&5
17291  (eval $ac_link) 2>&5
17292  ac_status=$?
17293  echo "$as_me:17293: \$? = $ac_status" >&5
17294  (exit $ac_status); } &&
17295         { ac_try='test -s conftest$ac_exeext'
17296  { (eval echo "$as_me:17296: \"$ac_try\"") >&5
17297  (eval $ac_try) 2>&5
17298  ac_status=$?
17299  echo "$as_me:17299: \$? = $ac_status" >&5
17300  (exit $ac_status); }; }; then
17301  echo "$as_me:17301: result: yes" >&5
17302echo "${ECHO_T}yes" >&6
17303			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17304					 break
17305else
17306  echo "$as_me: failed program was:" >&5
17307cat conftest.$ac_ext >&5
17308echo "$as_me:17308: result: no" >&5
17309echo "${ECHO_T}no" >&6
17310					 LIBS="$cf_save_LIBS"
17311fi
17312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17313			done
17314
17315fi
17316rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17317
17318fi
17319
17320eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
17321
17322if test $cf_found_library = no ; then
17323	{ { echo "$as_me:17323: error: Cannot link $cf_nculib_root library" >&5
17324echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
17325   { (exit 1); exit 1; }; }
17326fi
17327
17328fi
17329
17330if test -n "$cf_ncurses_LIBS" ; then
17331	echo "$as_me:17331: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
17332echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
17333	cf_ncurses_SAVE="$LIBS"
17334	for p in $cf_ncurses_LIBS ; do
17335		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
17336		if test "$q" != "$LIBS" ; then
17337			LIBS="$q"
17338		fi
17339	done
17340	cat >conftest.$ac_ext <<_ACEOF
17341#line 17341 "configure"
17342#include "confdefs.h"
17343#include <${cf_cv_ncurses_header:-curses.h}>
17344int
17345main (void)
17346{
17347initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
17348  ;
17349  return 0;
17350}
17351_ACEOF
17352rm -f conftest.$ac_objext conftest$ac_exeext
17353if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354  (eval $ac_link) 2>&5
17355  ac_status=$?
17356  echo "$as_me:17356: \$? = $ac_status" >&5
17357  (exit $ac_status); } &&
17358         { ac_try='test -s conftest$ac_exeext'
17359  { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360  (eval $ac_try) 2>&5
17361  ac_status=$?
17362  echo "$as_me:17362: \$? = $ac_status" >&5
17363  (exit $ac_status); }; }; then
17364  echo "$as_me:17364: result: yes" >&5
17365echo "${ECHO_T}yes" >&6
17366else
17367  echo "$as_me: failed program was:" >&5
17368cat conftest.$ac_ext >&5
17369echo "$as_me:17369: result: no" >&5
17370echo "${ECHO_T}no" >&6
17371		 LIBS="$cf_ncurses_SAVE"
17372fi
17373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17374fi
17375
17376cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17377
17378cat >>confdefs.h <<EOF
17379#define $cf_nculib_ROOT 1
17380EOF
17381
17382	fi
17383else
17384	NCURSES_CONFIG=none
17385fi
17386
17387	;;
17388(pdcurses)
17389	echo "$as_me:17389: checking for X" >&5
17390echo $ECHO_N "checking for X... $ECHO_C" >&6
17391
17392# Check whether --with-x or --without-x was given.
17393if test "${with_x+set}" = set; then
17394  withval="$with_x"
17395
17396fi;
17397# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17398if test "x$with_x" = xno; then
17399  # The user explicitly disabled X.
17400  have_x=disabled
17401else
17402  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
17403    # Both variables are already set.
17404    have_x=yes
17405  else
17406    if test "${ac_cv_have_x+set}" = set; then
17407  echo $ECHO_N "(cached) $ECHO_C" >&6
17408else
17409  # One or both of the vars are not set, and there is no cached value.
17410ac_x_includes=no ac_x_libraries=no
17411rm -fr conftest.dir
17412if mkdir conftest.dir; then
17413  cd conftest.dir
17414  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
17415  cat >Imakefile <<'EOF'
17416acfindx:
17417	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
17418EOF
17419  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
17420    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
17421    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
17422    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17423    for ac_extension in a so sl dylib dll; do
17424      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
17425         test -f $ac_im_libdir/libX11.$ac_extension; then
17426        ac_im_usrlibdir=$ac_im_libdir; break
17427      fi
17428    done
17429    # Screen out bogus values from the imake configuration.  They are
17430    # bogus both because they are the default anyway, and because
17431    # using them would break gcc on systems where it needs fixed includes.
17432    case $ac_im_incroot in
17433	/usr/include) ;;
17434	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17435    esac
17436    case $ac_im_usrlibdir in
17437	/usr/lib | /lib) ;;
17438	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17439    esac
17440  fi
17441  cd ..
17442  rm -fr conftest.dir
17443fi
17444
17445# Standard set of common directories for X headers.
17446# Check X11 before X11Rn because it is often a symlink to the current release.
17447ac_x_header_dirs='
17448/usr/X11/include
17449/usr/X11R6/include
17450/usr/X11R5/include
17451/usr/X11R4/include
17452
17453/usr/include/X11
17454/usr/include/X11R6
17455/usr/include/X11R5
17456/usr/include/X11R4
17457
17458/usr/local/X11/include
17459/usr/local/X11R6/include
17460/usr/local/X11R5/include
17461/usr/local/X11R4/include
17462
17463/usr/local/include/X11
17464/usr/local/include/X11R6
17465/usr/local/include/X11R5
17466/usr/local/include/X11R4
17467
17468/usr/X386/include
17469/usr/x386/include
17470/usr/XFree86/include/X11
17471
17472/usr/include
17473/usr/local/include
17474/usr/unsupported/include
17475/usr/athena/include
17476/usr/local/x11r5/include
17477/usr/lpp/Xamples/include
17478
17479/usr/openwin/include
17480/usr/openwin/share/include'
17481
17482if test "$ac_x_includes" = no; then
17483  # Guess where to find include files, by looking for Intrinsic.h.
17484  # First, try using that file with no special directory specified.
17485  cat >conftest.$ac_ext <<_ACEOF
17486#line 17486 "configure"
17487#include "confdefs.h"
17488#include <X11/Intrinsic.h>
17489_ACEOF
17490if { (eval echo "$as_me:17490: \"$ac_cpp conftest.$ac_ext\"") >&5
17491  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17492  ac_status=$?
17493  egrep -v '^ *\+' conftest.er1 >conftest.err
17494  rm -f conftest.er1
17495  cat conftest.err >&5
17496  echo "$as_me:17496: \$? = $ac_status" >&5
17497  (exit $ac_status); } >/dev/null; then
17498  if test -s conftest.err; then
17499    ac_cpp_err=$ac_c_preproc_warn_flag
17500  else
17501    ac_cpp_err=
17502  fi
17503else
17504  ac_cpp_err=yes
17505fi
17506if test -z "$ac_cpp_err"; then
17507  # We can compile using X headers with no special include directory.
17508ac_x_includes=
17509else
17510  echo "$as_me: failed program was:" >&5
17511  cat conftest.$ac_ext >&5
17512  for ac_dir in $ac_x_header_dirs; do
17513  if test -r "$ac_dir/X11/Intrinsic.h"; then
17514    ac_x_includes=$ac_dir
17515    break
17516  fi
17517done
17518fi
17519rm -f conftest.err conftest.$ac_ext
17520fi # $ac_x_includes = no
17521
17522if test "$ac_x_libraries" = no; then
17523  # Check for the libraries.
17524  # See if we find them without any special options.
17525  # Don't add to $LIBS permanently.
17526  ac_save_LIBS=$LIBS
17527  LIBS="-lXt $LIBS"
17528  cat >conftest.$ac_ext <<_ACEOF
17529#line 17529 "configure"
17530#include "confdefs.h"
17531#include <X11/Intrinsic.h>
17532int
17533main (void)
17534{
17535XtMalloc (0)
17536  ;
17537  return 0;
17538}
17539_ACEOF
17540rm -f conftest.$ac_objext conftest$ac_exeext
17541if { (eval echo "$as_me:17541: \"$ac_link\"") >&5
17542  (eval $ac_link) 2>&5
17543  ac_status=$?
17544  echo "$as_me:17544: \$? = $ac_status" >&5
17545  (exit $ac_status); } &&
17546         { ac_try='test -s conftest$ac_exeext'
17547  { (eval echo "$as_me:17547: \"$ac_try\"") >&5
17548  (eval $ac_try) 2>&5
17549  ac_status=$?
17550  echo "$as_me:17550: \$? = $ac_status" >&5
17551  (exit $ac_status); }; }; then
17552  LIBS=$ac_save_LIBS
17553# We can link X programs with no special library path.
17554ac_x_libraries=
17555else
17556  echo "$as_me: failed program was:" >&5
17557cat conftest.$ac_ext >&5
17558LIBS=$ac_save_LIBS
17559for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17560do
17561  # Don't even attempt the hair of trying to link an X program!
17562  for ac_extension in a so sl dylib dll; do
17563    if test -r $ac_dir/libXt.$ac_extension; then
17564      ac_x_libraries=$ac_dir
17565      break 2
17566    fi
17567  done
17568done
17569fi
17570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17571fi # $ac_x_libraries = no
17572
17573if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
17574  # Didn't find X anywhere.  Cache the known absence of X.
17575  ac_cv_have_x="have_x=no"
17576else
17577  # Record where we found X for the cache.
17578  ac_cv_have_x="have_x=yes \
17579	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
17580fi
17581fi
17582
17583  fi
17584  eval "$ac_cv_have_x"
17585fi # $with_x != no
17586
17587if test "$have_x" != yes; then
17588  echo "$as_me:17588: result: $have_x" >&5
17589echo "${ECHO_T}$have_x" >&6
17590  no_x=yes
17591else
17592  # If each of the values was on the command line, it overrides each guess.
17593  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17594  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17595  # Update the cache value to reflect the command line values.
17596  ac_cv_have_x="have_x=yes \
17597		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
17598  echo "$as_me:17598: result: libraries $x_libraries, headers $x_includes" >&5
17599echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
17600fi
17601
17602if test "$no_x" = yes; then
17603  # Not all programs may use this symbol, but it does not hurt to define it.
17604
17605cat >>confdefs.h <<\EOF
17606#define X_DISPLAY_MISSING 1
17607EOF
17608
17609  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
17610else
17611  if test -n "$x_includes"; then
17612    X_CFLAGS="$X_CFLAGS -I$x_includes"
17613  fi
17614
17615  # It would also be nice to do this for all -L options, not just this one.
17616  if test -n "$x_libraries"; then
17617    X_LIBS="$X_LIBS -L$x_libraries"
17618    # For Solaris; some versions of Sun CC require a space after -R and
17619    # others require no space.  Words are not sufficient . . . .
17620    case `(uname -sr) 2>/dev/null` in
17621    "SunOS 5"*)
17622      echo "$as_me:17622: checking whether -R must be followed by a space" >&5
17623echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
17624      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
17625      cat >conftest.$ac_ext <<_ACEOF
17626#line 17626 "configure"
17627#include "confdefs.h"
17628
17629int
17630main (void)
17631{
17632
17633  ;
17634  return 0;
17635}
17636_ACEOF
17637rm -f conftest.$ac_objext conftest$ac_exeext
17638if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
17639  (eval $ac_link) 2>&5
17640  ac_status=$?
17641  echo "$as_me:17641: \$? = $ac_status" >&5
17642  (exit $ac_status); } &&
17643         { ac_try='test -s conftest$ac_exeext'
17644  { (eval echo "$as_me:17644: \"$ac_try\"") >&5
17645  (eval $ac_try) 2>&5
17646  ac_status=$?
17647  echo "$as_me:17647: \$? = $ac_status" >&5
17648  (exit $ac_status); }; }; then
17649  ac_R_nospace=yes
17650else
17651  echo "$as_me: failed program was:" >&5
17652cat conftest.$ac_ext >&5
17653ac_R_nospace=no
17654fi
17655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17656      if test $ac_R_nospace = yes; then
17657	echo "$as_me:17657: result: no" >&5
17658echo "${ECHO_T}no" >&6
17659	X_LIBS="$X_LIBS -R$x_libraries"
17660      else
17661	LIBS="$ac_xsave_LIBS -R $x_libraries"
17662	cat >conftest.$ac_ext <<_ACEOF
17663#line 17663 "configure"
17664#include "confdefs.h"
17665
17666int
17667main (void)
17668{
17669
17670  ;
17671  return 0;
17672}
17673_ACEOF
17674rm -f conftest.$ac_objext conftest$ac_exeext
17675if { (eval echo "$as_me:17675: \"$ac_link\"") >&5
17676  (eval $ac_link) 2>&5
17677  ac_status=$?
17678  echo "$as_me:17678: \$? = $ac_status" >&5
17679  (exit $ac_status); } &&
17680         { ac_try='test -s conftest$ac_exeext'
17681  { (eval echo "$as_me:17681: \"$ac_try\"") >&5
17682  (eval $ac_try) 2>&5
17683  ac_status=$?
17684  echo "$as_me:17684: \$? = $ac_status" >&5
17685  (exit $ac_status); }; }; then
17686  ac_R_space=yes
17687else
17688  echo "$as_me: failed program was:" >&5
17689cat conftest.$ac_ext >&5
17690ac_R_space=no
17691fi
17692rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17693	if test $ac_R_space = yes; then
17694	  echo "$as_me:17694: result: yes" >&5
17695echo "${ECHO_T}yes" >&6
17696	  X_LIBS="$X_LIBS -R $x_libraries"
17697	else
17698	  echo "$as_me:17698: result: neither works" >&5
17699echo "${ECHO_T}neither works" >&6
17700	fi
17701      fi
17702      LIBS=$ac_xsave_LIBS
17703    esac
17704  fi
17705
17706  # Check for system-dependent libraries X programs must link with.
17707  # Do this before checking for the system-independent R6 libraries
17708  # (-lICE), since we may need -lsocket or whatever for X linking.
17709
17710  if test "$ISC" = yes; then
17711    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
17712  else
17713    # Martyn Johnson says this is needed for Ultrix, if the X
17714    # libraries were built with DECnet support.  And Karl Berry says
17715    # the Alpha needs dnet_stub (dnet does not exist).
17716    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
17717    cat >conftest.$ac_ext <<_ACEOF
17718#line 17718 "configure"
17719#include "confdefs.h"
17720
17721/* Override any gcc2 internal prototype to avoid an error.  */
17722#ifdef __cplusplus
17723extern "C"
17724#endif
17725/* We use char because int might match the return type of a gcc2
17726   builtin and then its argument prototype would still apply.  */
17727char XOpenDisplay ();
17728int
17729main (void)
17730{
17731XOpenDisplay ();
17732  ;
17733  return 0;
17734}
17735_ACEOF
17736rm -f conftest.$ac_objext conftest$ac_exeext
17737if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738  (eval $ac_link) 2>&5
17739  ac_status=$?
17740  echo "$as_me:17740: \$? = $ac_status" >&5
17741  (exit $ac_status); } &&
17742         { ac_try='test -s conftest$ac_exeext'
17743  { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744  (eval $ac_try) 2>&5
17745  ac_status=$?
17746  echo "$as_me:17746: \$? = $ac_status" >&5
17747  (exit $ac_status); }; }; then
17748  :
17749else
17750  echo "$as_me: failed program was:" >&5
17751cat conftest.$ac_ext >&5
17752echo "$as_me:17752: checking for dnet_ntoa in -ldnet" >&5
17753echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
17754if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
17755  echo $ECHO_N "(cached) $ECHO_C" >&6
17756else
17757  ac_check_lib_save_LIBS=$LIBS
17758LIBS="-ldnet  $LIBS"
17759cat >conftest.$ac_ext <<_ACEOF
17760#line 17760 "configure"
17761#include "confdefs.h"
17762
17763/* Override any gcc2 internal prototype to avoid an error.  */
17764#ifdef __cplusplus
17765extern "C"
17766#endif
17767/* We use char because int might match the return type of a gcc2
17768   builtin and then its argument prototype would still apply.  */
17769char dnet_ntoa ();
17770int
17771main (void)
17772{
17773dnet_ntoa ();
17774  ;
17775  return 0;
17776}
17777_ACEOF
17778rm -f conftest.$ac_objext conftest$ac_exeext
17779if { (eval echo "$as_me:17779: \"$ac_link\"") >&5
17780  (eval $ac_link) 2>&5
17781  ac_status=$?
17782  echo "$as_me:17782: \$? = $ac_status" >&5
17783  (exit $ac_status); } &&
17784         { ac_try='test -s conftest$ac_exeext'
17785  { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786  (eval $ac_try) 2>&5
17787  ac_status=$?
17788  echo "$as_me:17788: \$? = $ac_status" >&5
17789  (exit $ac_status); }; }; then
17790  ac_cv_lib_dnet_dnet_ntoa=yes
17791else
17792  echo "$as_me: failed program was:" >&5
17793cat conftest.$ac_ext >&5
17794ac_cv_lib_dnet_dnet_ntoa=no
17795fi
17796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17797LIBS=$ac_check_lib_save_LIBS
17798fi
17799echo "$as_me:17799: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
17800echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
17801if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
17802  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
17803fi
17804
17805    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
17806      echo "$as_me:17806: checking for dnet_ntoa in -ldnet_stub" >&5
17807echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
17808if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
17809  echo $ECHO_N "(cached) $ECHO_C" >&6
17810else
17811  ac_check_lib_save_LIBS=$LIBS
17812LIBS="-ldnet_stub  $LIBS"
17813cat >conftest.$ac_ext <<_ACEOF
17814#line 17814 "configure"
17815#include "confdefs.h"
17816
17817/* Override any gcc2 internal prototype to avoid an error.  */
17818#ifdef __cplusplus
17819extern "C"
17820#endif
17821/* We use char because int might match the return type of a gcc2
17822   builtin and then its argument prototype would still apply.  */
17823char dnet_ntoa ();
17824int
17825main (void)
17826{
17827dnet_ntoa ();
17828  ;
17829  return 0;
17830}
17831_ACEOF
17832rm -f conftest.$ac_objext conftest$ac_exeext
17833if { (eval echo "$as_me:17833: \"$ac_link\"") >&5
17834  (eval $ac_link) 2>&5
17835  ac_status=$?
17836  echo "$as_me:17836: \$? = $ac_status" >&5
17837  (exit $ac_status); } &&
17838         { ac_try='test -s conftest$ac_exeext'
17839  { (eval echo "$as_me:17839: \"$ac_try\"") >&5
17840  (eval $ac_try) 2>&5
17841  ac_status=$?
17842  echo "$as_me:17842: \$? = $ac_status" >&5
17843  (exit $ac_status); }; }; then
17844  ac_cv_lib_dnet_stub_dnet_ntoa=yes
17845else
17846  echo "$as_me: failed program was:" >&5
17847cat conftest.$ac_ext >&5
17848ac_cv_lib_dnet_stub_dnet_ntoa=no
17849fi
17850rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17851LIBS=$ac_check_lib_save_LIBS
17852fi
17853echo "$as_me:17853: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
17854echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
17855if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
17856  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
17857fi
17858
17859    fi
17860fi
17861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17862    LIBS="$ac_xsave_LIBS"
17863
17864    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
17865    # to get the SysV transport functions.
17866    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
17867    # needs -lnsl.
17868    # The nsl library prevents programs from opening the X display
17869    # on Irix 5.2, according to T.E. Dickey.
17870    # The functions gethostbyname, getservbyname, and inet_addr are
17871    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
17872    echo "$as_me:17872: checking for gethostbyname" >&5
17873echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
17874if test "${ac_cv_func_gethostbyname+set}" = set; then
17875  echo $ECHO_N "(cached) $ECHO_C" >&6
17876else
17877  cat >conftest.$ac_ext <<_ACEOF
17878#line 17878 "configure"
17879#include "confdefs.h"
17880/* System header to define __stub macros and hopefully few prototypes,
17881    which can conflict with char gethostbyname (); below.  */
17882#include <assert.h>
17883/* Override any gcc2 internal prototype to avoid an error.  */
17884#ifdef __cplusplus
17885extern "C"
17886#endif
17887/* We use char because int might match the return type of a gcc2
17888   builtin and then its argument prototype would still apply.  */
17889char gethostbyname ();
17890char (*f) ();
17891
17892int
17893main (void)
17894{
17895/* The GNU C library defines this for functions which it implements
17896    to always fail with ENOSYS.  Some functions are actually named
17897    something starting with __ and the normal name is an alias.  */
17898#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
17899choke me
17900#else
17901f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17902#endif
17903
17904  ;
17905  return 0;
17906}
17907_ACEOF
17908rm -f conftest.$ac_objext conftest$ac_exeext
17909if { (eval echo "$as_me:17909: \"$ac_link\"") >&5
17910  (eval $ac_link) 2>&5
17911  ac_status=$?
17912  echo "$as_me:17912: \$? = $ac_status" >&5
17913  (exit $ac_status); } &&
17914         { ac_try='test -s conftest$ac_exeext'
17915  { (eval echo "$as_me:17915: \"$ac_try\"") >&5
17916  (eval $ac_try) 2>&5
17917  ac_status=$?
17918  echo "$as_me:17918: \$? = $ac_status" >&5
17919  (exit $ac_status); }; }; then
17920  ac_cv_func_gethostbyname=yes
17921else
17922  echo "$as_me: failed program was:" >&5
17923cat conftest.$ac_ext >&5
17924ac_cv_func_gethostbyname=no
17925fi
17926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17927fi
17928echo "$as_me:17928: result: $ac_cv_func_gethostbyname" >&5
17929echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
17930
17931    if test $ac_cv_func_gethostbyname = no; then
17932      echo "$as_me:17932: checking for gethostbyname in -lnsl" >&5
17933echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
17934if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
17935  echo $ECHO_N "(cached) $ECHO_C" >&6
17936else
17937  ac_check_lib_save_LIBS=$LIBS
17938LIBS="-lnsl  $LIBS"
17939cat >conftest.$ac_ext <<_ACEOF
17940#line 17940 "configure"
17941#include "confdefs.h"
17942
17943/* Override any gcc2 internal prototype to avoid an error.  */
17944#ifdef __cplusplus
17945extern "C"
17946#endif
17947/* We use char because int might match the return type of a gcc2
17948   builtin and then its argument prototype would still apply.  */
17949char gethostbyname ();
17950int
17951main (void)
17952{
17953gethostbyname ();
17954  ;
17955  return 0;
17956}
17957_ACEOF
17958rm -f conftest.$ac_objext conftest$ac_exeext
17959if { (eval echo "$as_me:17959: \"$ac_link\"") >&5
17960  (eval $ac_link) 2>&5
17961  ac_status=$?
17962  echo "$as_me:17962: \$? = $ac_status" >&5
17963  (exit $ac_status); } &&
17964         { ac_try='test -s conftest$ac_exeext'
17965  { (eval echo "$as_me:17965: \"$ac_try\"") >&5
17966  (eval $ac_try) 2>&5
17967  ac_status=$?
17968  echo "$as_me:17968: \$? = $ac_status" >&5
17969  (exit $ac_status); }; }; then
17970  ac_cv_lib_nsl_gethostbyname=yes
17971else
17972  echo "$as_me: failed program was:" >&5
17973cat conftest.$ac_ext >&5
17974ac_cv_lib_nsl_gethostbyname=no
17975fi
17976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17977LIBS=$ac_check_lib_save_LIBS
17978fi
17979echo "$as_me:17979: result: $ac_cv_lib_nsl_gethostbyname" >&5
17980echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
17981if test $ac_cv_lib_nsl_gethostbyname = yes; then
17982  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
17983fi
17984
17985      if test $ac_cv_lib_nsl_gethostbyname = no; then
17986        echo "$as_me:17986: checking for gethostbyname in -lbsd" >&5
17987echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
17988if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
17989  echo $ECHO_N "(cached) $ECHO_C" >&6
17990else
17991  ac_check_lib_save_LIBS=$LIBS
17992LIBS="-lbsd  $LIBS"
17993cat >conftest.$ac_ext <<_ACEOF
17994#line 17994 "configure"
17995#include "confdefs.h"
17996
17997/* Override any gcc2 internal prototype to avoid an error.  */
17998#ifdef __cplusplus
17999extern "C"
18000#endif
18001/* We use char because int might match the return type of a gcc2
18002   builtin and then its argument prototype would still apply.  */
18003char gethostbyname ();
18004int
18005main (void)
18006{
18007gethostbyname ();
18008  ;
18009  return 0;
18010}
18011_ACEOF
18012rm -f conftest.$ac_objext conftest$ac_exeext
18013if { (eval echo "$as_me:18013: \"$ac_link\"") >&5
18014  (eval $ac_link) 2>&5
18015  ac_status=$?
18016  echo "$as_me:18016: \$? = $ac_status" >&5
18017  (exit $ac_status); } &&
18018         { ac_try='test -s conftest$ac_exeext'
18019  { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020  (eval $ac_try) 2>&5
18021  ac_status=$?
18022  echo "$as_me:18022: \$? = $ac_status" >&5
18023  (exit $ac_status); }; }; then
18024  ac_cv_lib_bsd_gethostbyname=yes
18025else
18026  echo "$as_me: failed program was:" >&5
18027cat conftest.$ac_ext >&5
18028ac_cv_lib_bsd_gethostbyname=no
18029fi
18030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18031LIBS=$ac_check_lib_save_LIBS
18032fi
18033echo "$as_me:18033: result: $ac_cv_lib_bsd_gethostbyname" >&5
18034echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
18035if test $ac_cv_lib_bsd_gethostbyname = yes; then
18036  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
18037fi
18038
18039      fi
18040    fi
18041
18042    # lieder@skyler.mavd.honeywell.com says without -lsocket,
18043    # socket/setsockopt and other routines are undefined under SCO ODT
18044    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
18045    # on later versions), says Simon Leinen: it contains gethostby*
18046    # variants that don't use the nameserver (or something).  -lsocket
18047    # must be given before -lnsl if both are needed.  We assume that
18048    # if connect needs -lnsl, so does gethostbyname.
18049    echo "$as_me:18049: checking for connect" >&5
18050echo $ECHO_N "checking for connect... $ECHO_C" >&6
18051if test "${ac_cv_func_connect+set}" = set; then
18052  echo $ECHO_N "(cached) $ECHO_C" >&6
18053else
18054  cat >conftest.$ac_ext <<_ACEOF
18055#line 18055 "configure"
18056#include "confdefs.h"
18057/* System header to define __stub macros and hopefully few prototypes,
18058    which can conflict with char connect (); below.  */
18059#include <assert.h>
18060/* Override any gcc2 internal prototype to avoid an error.  */
18061#ifdef __cplusplus
18062extern "C"
18063#endif
18064/* We use char because int might match the return type of a gcc2
18065   builtin and then its argument prototype would still apply.  */
18066char connect ();
18067char (*f) ();
18068
18069int
18070main (void)
18071{
18072/* The GNU C library defines this for functions which it implements
18073    to always fail with ENOSYS.  Some functions are actually named
18074    something starting with __ and the normal name is an alias.  */
18075#if defined (__stub_connect) || defined (__stub___connect)
18076choke me
18077#else
18078f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18079#endif
18080
18081  ;
18082  return 0;
18083}
18084_ACEOF
18085rm -f conftest.$ac_objext conftest$ac_exeext
18086if { (eval echo "$as_me:18086: \"$ac_link\"") >&5
18087  (eval $ac_link) 2>&5
18088  ac_status=$?
18089  echo "$as_me:18089: \$? = $ac_status" >&5
18090  (exit $ac_status); } &&
18091         { ac_try='test -s conftest$ac_exeext'
18092  { (eval echo "$as_me:18092: \"$ac_try\"") >&5
18093  (eval $ac_try) 2>&5
18094  ac_status=$?
18095  echo "$as_me:18095: \$? = $ac_status" >&5
18096  (exit $ac_status); }; }; then
18097  ac_cv_func_connect=yes
18098else
18099  echo "$as_me: failed program was:" >&5
18100cat conftest.$ac_ext >&5
18101ac_cv_func_connect=no
18102fi
18103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18104fi
18105echo "$as_me:18105: result: $ac_cv_func_connect" >&5
18106echo "${ECHO_T}$ac_cv_func_connect" >&6
18107
18108    if test $ac_cv_func_connect = no; then
18109      echo "$as_me:18109: checking for connect in -lsocket" >&5
18110echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
18111if test "${ac_cv_lib_socket_connect+set}" = set; then
18112  echo $ECHO_N "(cached) $ECHO_C" >&6
18113else
18114  ac_check_lib_save_LIBS=$LIBS
18115LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
18116cat >conftest.$ac_ext <<_ACEOF
18117#line 18117 "configure"
18118#include "confdefs.h"
18119
18120/* Override any gcc2 internal prototype to avoid an error.  */
18121#ifdef __cplusplus
18122extern "C"
18123#endif
18124/* We use char because int might match the return type of a gcc2
18125   builtin and then its argument prototype would still apply.  */
18126char connect ();
18127int
18128main (void)
18129{
18130connect ();
18131  ;
18132  return 0;
18133}
18134_ACEOF
18135rm -f conftest.$ac_objext conftest$ac_exeext
18136if { (eval echo "$as_me:18136: \"$ac_link\"") >&5
18137  (eval $ac_link) 2>&5
18138  ac_status=$?
18139  echo "$as_me:18139: \$? = $ac_status" >&5
18140  (exit $ac_status); } &&
18141         { ac_try='test -s conftest$ac_exeext'
18142  { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143  (eval $ac_try) 2>&5
18144  ac_status=$?
18145  echo "$as_me:18145: \$? = $ac_status" >&5
18146  (exit $ac_status); }; }; then
18147  ac_cv_lib_socket_connect=yes
18148else
18149  echo "$as_me: failed program was:" >&5
18150cat conftest.$ac_ext >&5
18151ac_cv_lib_socket_connect=no
18152fi
18153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18154LIBS=$ac_check_lib_save_LIBS
18155fi
18156echo "$as_me:18156: result: $ac_cv_lib_socket_connect" >&5
18157echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
18158if test $ac_cv_lib_socket_connect = yes; then
18159  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
18160fi
18161
18162    fi
18163
18164    # Guillermo Gomez says -lposix is necessary on A/UX.
18165    echo "$as_me:18165: checking for remove" >&5
18166echo $ECHO_N "checking for remove... $ECHO_C" >&6
18167if test "${ac_cv_func_remove+set}" = set; then
18168  echo $ECHO_N "(cached) $ECHO_C" >&6
18169else
18170  cat >conftest.$ac_ext <<_ACEOF
18171#line 18171 "configure"
18172#include "confdefs.h"
18173/* System header to define __stub macros and hopefully few prototypes,
18174    which can conflict with char remove (); below.  */
18175#include <assert.h>
18176/* Override any gcc2 internal prototype to avoid an error.  */
18177#ifdef __cplusplus
18178extern "C"
18179#endif
18180/* We use char because int might match the return type of a gcc2
18181   builtin and then its argument prototype would still apply.  */
18182char remove ();
18183char (*f) ();
18184
18185int
18186main (void)
18187{
18188/* The GNU C library defines this for functions which it implements
18189    to always fail with ENOSYS.  Some functions are actually named
18190    something starting with __ and the normal name is an alias.  */
18191#if defined (__stub_remove) || defined (__stub___remove)
18192choke me
18193#else
18194f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18195#endif
18196
18197  ;
18198  return 0;
18199}
18200_ACEOF
18201rm -f conftest.$ac_objext conftest$ac_exeext
18202if { (eval echo "$as_me:18202: \"$ac_link\"") >&5
18203  (eval $ac_link) 2>&5
18204  ac_status=$?
18205  echo "$as_me:18205: \$? = $ac_status" >&5
18206  (exit $ac_status); } &&
18207         { ac_try='test -s conftest$ac_exeext'
18208  { (eval echo "$as_me:18208: \"$ac_try\"") >&5
18209  (eval $ac_try) 2>&5
18210  ac_status=$?
18211  echo "$as_me:18211: \$? = $ac_status" >&5
18212  (exit $ac_status); }; }; then
18213  ac_cv_func_remove=yes
18214else
18215  echo "$as_me: failed program was:" >&5
18216cat conftest.$ac_ext >&5
18217ac_cv_func_remove=no
18218fi
18219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18220fi
18221echo "$as_me:18221: result: $ac_cv_func_remove" >&5
18222echo "${ECHO_T}$ac_cv_func_remove" >&6
18223
18224    if test $ac_cv_func_remove = no; then
18225      echo "$as_me:18225: checking for remove in -lposix" >&5
18226echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
18227if test "${ac_cv_lib_posix_remove+set}" = set; then
18228  echo $ECHO_N "(cached) $ECHO_C" >&6
18229else
18230  ac_check_lib_save_LIBS=$LIBS
18231LIBS="-lposix  $LIBS"
18232cat >conftest.$ac_ext <<_ACEOF
18233#line 18233 "configure"
18234#include "confdefs.h"
18235
18236/* Override any gcc2 internal prototype to avoid an error.  */
18237#ifdef __cplusplus
18238extern "C"
18239#endif
18240/* We use char because int might match the return type of a gcc2
18241   builtin and then its argument prototype would still apply.  */
18242char remove ();
18243int
18244main (void)
18245{
18246remove ();
18247  ;
18248  return 0;
18249}
18250_ACEOF
18251rm -f conftest.$ac_objext conftest$ac_exeext
18252if { (eval echo "$as_me:18252: \"$ac_link\"") >&5
18253  (eval $ac_link) 2>&5
18254  ac_status=$?
18255  echo "$as_me:18255: \$? = $ac_status" >&5
18256  (exit $ac_status); } &&
18257         { ac_try='test -s conftest$ac_exeext'
18258  { (eval echo "$as_me:18258: \"$ac_try\"") >&5
18259  (eval $ac_try) 2>&5
18260  ac_status=$?
18261  echo "$as_me:18261: \$? = $ac_status" >&5
18262  (exit $ac_status); }; }; then
18263  ac_cv_lib_posix_remove=yes
18264else
18265  echo "$as_me: failed program was:" >&5
18266cat conftest.$ac_ext >&5
18267ac_cv_lib_posix_remove=no
18268fi
18269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18270LIBS=$ac_check_lib_save_LIBS
18271fi
18272echo "$as_me:18272: result: $ac_cv_lib_posix_remove" >&5
18273echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
18274if test $ac_cv_lib_posix_remove = yes; then
18275  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
18276fi
18277
18278    fi
18279
18280    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
18281    echo "$as_me:18281: checking for shmat" >&5
18282echo $ECHO_N "checking for shmat... $ECHO_C" >&6
18283if test "${ac_cv_func_shmat+set}" = set; then
18284  echo $ECHO_N "(cached) $ECHO_C" >&6
18285else
18286  cat >conftest.$ac_ext <<_ACEOF
18287#line 18287 "configure"
18288#include "confdefs.h"
18289/* System header to define __stub macros and hopefully few prototypes,
18290    which can conflict with char shmat (); below.  */
18291#include <assert.h>
18292/* Override any gcc2 internal prototype to avoid an error.  */
18293#ifdef __cplusplus
18294extern "C"
18295#endif
18296/* We use char because int might match the return type of a gcc2
18297   builtin and then its argument prototype would still apply.  */
18298char shmat ();
18299char (*f) ();
18300
18301int
18302main (void)
18303{
18304/* The GNU C library defines this for functions which it implements
18305    to always fail with ENOSYS.  Some functions are actually named
18306    something starting with __ and the normal name is an alias.  */
18307#if defined (__stub_shmat) || defined (__stub___shmat)
18308choke me
18309#else
18310f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18311#endif
18312
18313  ;
18314  return 0;
18315}
18316_ACEOF
18317rm -f conftest.$ac_objext conftest$ac_exeext
18318if { (eval echo "$as_me:18318: \"$ac_link\"") >&5
18319  (eval $ac_link) 2>&5
18320  ac_status=$?
18321  echo "$as_me:18321: \$? = $ac_status" >&5
18322  (exit $ac_status); } &&
18323         { ac_try='test -s conftest$ac_exeext'
18324  { (eval echo "$as_me:18324: \"$ac_try\"") >&5
18325  (eval $ac_try) 2>&5
18326  ac_status=$?
18327  echo "$as_me:18327: \$? = $ac_status" >&5
18328  (exit $ac_status); }; }; then
18329  ac_cv_func_shmat=yes
18330else
18331  echo "$as_me: failed program was:" >&5
18332cat conftest.$ac_ext >&5
18333ac_cv_func_shmat=no
18334fi
18335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18336fi
18337echo "$as_me:18337: result: $ac_cv_func_shmat" >&5
18338echo "${ECHO_T}$ac_cv_func_shmat" >&6
18339
18340    if test $ac_cv_func_shmat = no; then
18341      echo "$as_me:18341: checking for shmat in -lipc" >&5
18342echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
18343if test "${ac_cv_lib_ipc_shmat+set}" = set; then
18344  echo $ECHO_N "(cached) $ECHO_C" >&6
18345else
18346  ac_check_lib_save_LIBS=$LIBS
18347LIBS="-lipc  $LIBS"
18348cat >conftest.$ac_ext <<_ACEOF
18349#line 18349 "configure"
18350#include "confdefs.h"
18351
18352/* Override any gcc2 internal prototype to avoid an error.  */
18353#ifdef __cplusplus
18354extern "C"
18355#endif
18356/* We use char because int might match the return type of a gcc2
18357   builtin and then its argument prototype would still apply.  */
18358char shmat ();
18359int
18360main (void)
18361{
18362shmat ();
18363  ;
18364  return 0;
18365}
18366_ACEOF
18367rm -f conftest.$ac_objext conftest$ac_exeext
18368if { (eval echo "$as_me:18368: \"$ac_link\"") >&5
18369  (eval $ac_link) 2>&5
18370  ac_status=$?
18371  echo "$as_me:18371: \$? = $ac_status" >&5
18372  (exit $ac_status); } &&
18373         { ac_try='test -s conftest$ac_exeext'
18374  { (eval echo "$as_me:18374: \"$ac_try\"") >&5
18375  (eval $ac_try) 2>&5
18376  ac_status=$?
18377  echo "$as_me:18377: \$? = $ac_status" >&5
18378  (exit $ac_status); }; }; then
18379  ac_cv_lib_ipc_shmat=yes
18380else
18381  echo "$as_me: failed program was:" >&5
18382cat conftest.$ac_ext >&5
18383ac_cv_lib_ipc_shmat=no
18384fi
18385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18386LIBS=$ac_check_lib_save_LIBS
18387fi
18388echo "$as_me:18388: result: $ac_cv_lib_ipc_shmat" >&5
18389echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
18390if test $ac_cv_lib_ipc_shmat = yes; then
18391  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
18392fi
18393
18394    fi
18395  fi
18396
18397  # Check for libraries that X11R6 Xt/Xaw programs need.
18398  ac_save_LDFLAGS=$LDFLAGS
18399  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
18400  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
18401  # check for ICE first), but we must link in the order -lSM -lICE or
18402  # we get undefined symbols.  So assume we have SM if we have ICE.
18403  # These have to be linked with before -lX11, unlike the other
18404  # libraries we check for below, so use a different variable.
18405  # John Interrante, Karl Berry
18406  echo "$as_me:18406: checking for IceConnectionNumber in -lICE" >&5
18407echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
18408if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
18409  echo $ECHO_N "(cached) $ECHO_C" >&6
18410else
18411  ac_check_lib_save_LIBS=$LIBS
18412LIBS="-lICE $X_EXTRA_LIBS $LIBS"
18413cat >conftest.$ac_ext <<_ACEOF
18414#line 18414 "configure"
18415#include "confdefs.h"
18416
18417/* Override any gcc2 internal prototype to avoid an error.  */
18418#ifdef __cplusplus
18419extern "C"
18420#endif
18421/* We use char because int might match the return type of a gcc2
18422   builtin and then its argument prototype would still apply.  */
18423char IceConnectionNumber ();
18424int
18425main (void)
18426{
18427IceConnectionNumber ();
18428  ;
18429  return 0;
18430}
18431_ACEOF
18432rm -f conftest.$ac_objext conftest$ac_exeext
18433if { (eval echo "$as_me:18433: \"$ac_link\"") >&5
18434  (eval $ac_link) 2>&5
18435  ac_status=$?
18436  echo "$as_me:18436: \$? = $ac_status" >&5
18437  (exit $ac_status); } &&
18438         { ac_try='test -s conftest$ac_exeext'
18439  { (eval echo "$as_me:18439: \"$ac_try\"") >&5
18440  (eval $ac_try) 2>&5
18441  ac_status=$?
18442  echo "$as_me:18442: \$? = $ac_status" >&5
18443  (exit $ac_status); }; }; then
18444  ac_cv_lib_ICE_IceConnectionNumber=yes
18445else
18446  echo "$as_me: failed program was:" >&5
18447cat conftest.$ac_ext >&5
18448ac_cv_lib_ICE_IceConnectionNumber=no
18449fi
18450rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18451LIBS=$ac_check_lib_save_LIBS
18452fi
18453echo "$as_me:18453: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
18454echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
18455if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
18456  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
18457fi
18458
18459  LDFLAGS=$ac_save_LDFLAGS
18460
18461fi
18462
18463cf_x_athena=${cf_x_athena:-Xaw}
18464
18465echo "$as_me:18465: checking if you want to link with Xaw 3d library" >&5
18466echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
18467withval=
18468
18469# Check whether --with-Xaw3d or --without-Xaw3d was given.
18470if test "${with_Xaw3d+set}" = set; then
18471  withval="$with_Xaw3d"
18472
18473fi;
18474if test "$withval" = yes ; then
18475	cf_x_athena=Xaw3d
18476	echo "$as_me:18476: result: yes" >&5
18477echo "${ECHO_T}yes" >&6
18478else
18479	echo "$as_me:18479: result: no" >&5
18480echo "${ECHO_T}no" >&6
18481fi
18482
18483echo "$as_me:18483: checking if you want to link with Xaw 3d xft library" >&5
18484echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
18485withval=
18486
18487# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
18488if test "${with_Xaw3dxft+set}" = set; then
18489  withval="$with_Xaw3dxft"
18490
18491fi;
18492if test "$withval" = yes ; then
18493	cf_x_athena=Xaw3dxft
18494	echo "$as_me:18494: result: yes" >&5
18495echo "${ECHO_T}yes" >&6
18496else
18497	echo "$as_me:18497: result: no" >&5
18498echo "${ECHO_T}no" >&6
18499fi
18500
18501echo "$as_me:18501: checking if you want to link with neXT Athena library" >&5
18502echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
18503withval=
18504
18505# Check whether --with-neXtaw or --without-neXtaw was given.
18506if test "${with_neXtaw+set}" = set; then
18507  withval="$with_neXtaw"
18508
18509fi;
18510if test "$withval" = yes ; then
18511	cf_x_athena=neXtaw
18512	echo "$as_me:18512: result: yes" >&5
18513echo "${ECHO_T}yes" >&6
18514else
18515	echo "$as_me:18515: result: no" >&5
18516echo "${ECHO_T}no" >&6
18517fi
18518
18519echo "$as_me:18519: checking if you want to link with Athena-Plus library" >&5
18520echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
18521withval=
18522
18523# Check whether --with-XawPlus or --without-XawPlus was given.
18524if test "${with_XawPlus+set}" = set; then
18525  withval="$with_XawPlus"
18526
18527fi;
18528if test "$withval" = yes ; then
18529	cf_x_athena=XawPlus
18530	echo "$as_me:18530: result: yes" >&5
18531echo "${ECHO_T}yes" >&6
18532else
18533	echo "$as_me:18533: result: no" >&5
18534echo "${ECHO_T}no" >&6
18535fi
18536
18537cf_x_athena_lib=""
18538
18539if test "$PKG_CONFIG" != none ; then
18540	cf_athena_list=
18541	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
18542	for cf_athena_pkg in \
18543		$cf_athena_list \
18544		${cf_x_athena} \
18545		${cf_x_athena}-devel \
18546		lib${cf_x_athena} \
18547		lib${cf_x_athena}-devel
18548	do
18549
18550if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
18551	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
18552
18553echo "${as_me:-configure}:18553: testing found package $cf_athena_pkg ..." 1>&5
18554
18555	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
18556	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
18557	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
18558
18559echo "${as_me:-configure}:18559: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18560
18561	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
18562
18563echo "${as_me:-configure}:18563: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
18564
18565cf_fix_cppflags=no
18566cf_new_cflags=
18567cf_new_cppflags=
18568cf_new_extra_cppflags=
18569
18570for cf_add_cflags in $cf_pkgconfig_incs
18571do
18572case $cf_fix_cppflags in
18573(no)
18574	case $cf_add_cflags in
18575	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18576		case $cf_add_cflags in
18577		(-D*)
18578			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18579
18580			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18581				&& test -z "${cf_tst_cflags}" \
18582				&& cf_fix_cppflags=yes
18583
18584			if test $cf_fix_cppflags = yes ; then
18585
18586	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18587	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18588
18589				continue
18590			elif test "${cf_tst_cflags}" = "\"'" ; then
18591
18592	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18593	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18594
18595				continue
18596			fi
18597			;;
18598		esac
18599		case "$CPPFLAGS" in
18600		(*$cf_add_cflags)
18601			;;
18602		(*)
18603			case $cf_add_cflags in
18604			(-D*)
18605				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18606
18607CPPFLAGS=`echo "$CPPFLAGS" | \
18608	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18609		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18610
18611				;;
18612			esac
18613
18614	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18615	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18616
18617			;;
18618		esac
18619		;;
18620	(*)
18621
18622	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18623	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18624
18625		;;
18626	esac
18627	;;
18628(yes)
18629
18630	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18631	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18632
18633	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18634
18635	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18636		&& test -z "${cf_tst_cflags}" \
18637		&& cf_fix_cppflags=no
18638	;;
18639esac
18640done
18641
18642if test -n "$cf_new_cflags" ; then
18643
18644	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18645	CFLAGS="${CFLAGS}$cf_new_cflags"
18646
18647fi
18648
18649if test -n "$cf_new_cppflags" ; then
18650
18651	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18652	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18653
18654fi
18655
18656if test -n "$cf_new_extra_cppflags" ; then
18657
18658	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18659	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18660
18661fi
18662
18663cf_add_libs="$cf_pkgconfig_libs"
18664# Filter out duplicates - this happens with badly-designed ".pc" files...
18665for cf_add_1lib in $LIBS
18666do
18667	for cf_add_2lib in $cf_add_libs
18668	do
18669		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18670		then
18671			cf_add_1lib=
18672			break
18673		fi
18674	done
18675	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18676done
18677LIBS="$cf_add_libs"
18678
18679			cf_x_athena_lib="$cf_pkgconfig_libs"
18680
18681cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18682
18683			cat >>confdefs.h <<EOF
18684#define $cf_x_athena_LIBS 1
18685EOF
18686
18687	for cf_trim_lib in Xmu Xt X11
18688	do
18689		case "$LIBS" in
18690		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
18691			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
18692			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
18693
18694echo "${as_me:-configure}:18694: testing ..trimmed $LIBS ..." 1>&5
18695
18696			;;
18697		esac
18698	done
18699
18700echo "$as_me:18700: checking for usable $cf_x_athena/Xmu package" >&5
18701echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
18702if test "${cf_cv_xaw_compat+set}" = set; then
18703  echo $ECHO_N "(cached) $ECHO_C" >&6
18704else
18705
18706cat >conftest.$ac_ext <<_ACEOF
18707#line 18707 "configure"
18708#include "confdefs.h"
18709
18710#include <X11/Xmu/CharSet.h>
18711
18712int
18713main (void)
18714{
18715
18716int check = XmuCompareISOLatin1("big", "small")
18717
18718  ;
18719  return 0;
18720}
18721_ACEOF
18722rm -f conftest.$ac_objext conftest$ac_exeext
18723if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
18724  (eval $ac_link) 2>&5
18725  ac_status=$?
18726  echo "$as_me:18726: \$? = $ac_status" >&5
18727  (exit $ac_status); } &&
18728         { ac_try='test -s conftest$ac_exeext'
18729  { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730  (eval $ac_try) 2>&5
18731  ac_status=$?
18732  echo "$as_me:18732: \$? = $ac_status" >&5
18733  (exit $ac_status); }; }; then
18734  cf_cv_xaw_compat=yes
18735else
18736  echo "$as_me: failed program was:" >&5
18737cat conftest.$ac_ext >&5
18738cf_cv_xaw_compat=no
18739fi
18740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18741fi
18742echo "$as_me:18742: result: $cf_cv_xaw_compat" >&5
18743echo "${ECHO_T}$cf_cv_xaw_compat" >&6
18744
18745			if test "$cf_cv_xaw_compat" = no
18746			then
18747				# workaround for broken ".pc" files...
18748				case "$cf_x_athena_lib" in
18749				(*-lXmu*)
18750					;;
18751				(*)
18752					test -n "$verbose" && echo "	work around broken package" 1>&6
18753
18754echo "${as_me:-configure}:18754: testing work around broken package ..." 1>&5
18755
18756					cf_save_xmu="$LIBS"
18757					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
18758
18759if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
18760	test -n "$verbose" && echo "	found package xmu" 1>&6
18761
18762echo "${as_me:-configure}:18762: testing found package xmu ..." 1>&5
18763
18764	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
18765	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
18766	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
18767
18768echo "${as_me:-configure}:18768: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18769
18770	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
18771
18772echo "${as_me:-configure}:18772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
18773
18774cf_fix_cppflags=no
18775cf_new_cflags=
18776cf_new_cppflags=
18777cf_new_extra_cppflags=
18778
18779for cf_add_cflags in $cf_pkgconfig_incs
18780do
18781case $cf_fix_cppflags in
18782(no)
18783	case $cf_add_cflags in
18784	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18785		case $cf_add_cflags in
18786		(-D*)
18787			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18788
18789			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18790				&& test -z "${cf_tst_cflags}" \
18791				&& cf_fix_cppflags=yes
18792
18793			if test $cf_fix_cppflags = yes ; then
18794
18795	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18796	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18797
18798				continue
18799			elif test "${cf_tst_cflags}" = "\"'" ; then
18800
18801	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18802	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18803
18804				continue
18805			fi
18806			;;
18807		esac
18808		case "$CPPFLAGS" in
18809		(*$cf_add_cflags)
18810			;;
18811		(*)
18812			case $cf_add_cflags in
18813			(-D*)
18814				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18815
18816CPPFLAGS=`echo "$CPPFLAGS" | \
18817	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18818		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18819
18820				;;
18821			esac
18822
18823	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18824	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18825
18826			;;
18827		esac
18828		;;
18829	(*)
18830
18831	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18832	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18833
18834		;;
18835	esac
18836	;;
18837(yes)
18838
18839	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18840	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18841
18842	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18843
18844	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18845		&& test -z "${cf_tst_cflags}" \
18846		&& cf_fix_cppflags=no
18847	;;
18848esac
18849done
18850
18851if test -n "$cf_new_cflags" ; then
18852
18853	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18854	CFLAGS="${CFLAGS}$cf_new_cflags"
18855
18856fi
18857
18858if test -n "$cf_new_cppflags" ; then
18859
18860	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18861	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18862
18863fi
18864
18865if test -n "$cf_new_extra_cppflags" ; then
18866
18867	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18868	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18869
18870fi
18871
18872cf_add_libs="$cf_pkgconfig_libs"
18873# Filter out duplicates - this happens with badly-designed ".pc" files...
18874for cf_add_1lib in $LIBS
18875do
18876	for cf_add_2lib in $cf_add_libs
18877	do
18878		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18879		then
18880			cf_add_1lib=
18881			break
18882		fi
18883	done
18884	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18885done
18886LIBS="$cf_add_libs"
18887
18888							LIBS="$cf_save_xmu"
18889
18890test -n "$verbose" && echo "	...before $LIBS" 1>&6
18891
18892echo "${as_me:-configure}:18892: testing ...before $LIBS ..." 1>&5
18893
18894LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
18895test -n "$verbose" && echo "	...after  $LIBS" 1>&6
18896
18897echo "${as_me:-configure}:18897: testing ...after  $LIBS ..." 1>&5
18898
18899else
18900	cf_pkgconfig_incs=
18901	cf_pkgconfig_libs=
18902
18903test -n "$verbose" && echo "	...before $LIBS" 1>&6
18904
18905echo "${as_me:-configure}:18905: testing ...before $LIBS ..." 1>&5
18906
18907LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
18908test -n "$verbose" && echo "	...after  $LIBS" 1>&6
18909
18910echo "${as_me:-configure}:18910: testing ...after  $LIBS ..." 1>&5
18911
18912fi
18913
18914	for cf_trim_lib in Xmu Xt X11
18915	do
18916		case "$LIBS" in
18917		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
18918			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
18919			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
18920
18921echo "${as_me:-configure}:18921: testing ..trimmed $LIBS ..." 1>&5
18922
18923			;;
18924		esac
18925	done
18926
18927					;;
18928				esac
18929			fi
18930
18931			break
18932else
18933	cf_pkgconfig_incs=
18934	cf_pkgconfig_libs=
18935	:
18936fi
18937
18938	done
18939fi
18940
18941if test -z "$cf_x_athena_lib" ; then
18942
18943if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
18944	test -n "$verbose" && echo "	found package Xext" 1>&6
18945
18946echo "${as_me:-configure}:18946: testing found package Xext ..." 1>&5
18947
18948	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
18949	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
18950	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18951
18952echo "${as_me:-configure}:18952: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18953
18954	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18955
18956echo "${as_me:-configure}:18956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18957
18958cf_fix_cppflags=no
18959cf_new_cflags=
18960cf_new_cppflags=
18961cf_new_extra_cppflags=
18962
18963for cf_add_cflags in $cf_pkgconfig_incs
18964do
18965case $cf_fix_cppflags in
18966(no)
18967	case $cf_add_cflags in
18968	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18969		case $cf_add_cflags in
18970		(-D*)
18971			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18972
18973			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18974				&& test -z "${cf_tst_cflags}" \
18975				&& cf_fix_cppflags=yes
18976
18977			if test $cf_fix_cppflags = yes ; then
18978
18979	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18980	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18981
18982				continue
18983			elif test "${cf_tst_cflags}" = "\"'" ; then
18984
18985	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18986	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18987
18988				continue
18989			fi
18990			;;
18991		esac
18992		case "$CPPFLAGS" in
18993		(*$cf_add_cflags)
18994			;;
18995		(*)
18996			case $cf_add_cflags in
18997			(-D*)
18998				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18999
19000CPPFLAGS=`echo "$CPPFLAGS" | \
19001	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19002		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19003
19004				;;
19005			esac
19006
19007	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19008	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19009
19010			;;
19011		esac
19012		;;
19013	(*)
19014
19015	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19016	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19017
19018		;;
19019	esac
19020	;;
19021(yes)
19022
19023	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19024	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19025
19026	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19027
19028	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19029		&& test -z "${cf_tst_cflags}" \
19030		&& cf_fix_cppflags=no
19031	;;
19032esac
19033done
19034
19035if test -n "$cf_new_cflags" ; then
19036
19037	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19038	CFLAGS="${CFLAGS}$cf_new_cflags"
19039
19040fi
19041
19042if test -n "$cf_new_cppflags" ; then
19043
19044	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19045	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19046
19047fi
19048
19049if test -n "$cf_new_extra_cppflags" ; then
19050
19051	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19052	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19053
19054fi
19055
19056cf_add_libs="$cf_pkgconfig_libs"
19057# Filter out duplicates - this happens with badly-designed ".pc" files...
19058for cf_add_1lib in $LIBS
19059do
19060	for cf_add_2lib in $cf_add_libs
19061	do
19062		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19063		then
19064			cf_add_1lib=
19065			break
19066		fi
19067	done
19068	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19069done
19070LIBS="$cf_add_libs"
19071
19072	:
19073else
19074	cf_pkgconfig_incs=
19075	cf_pkgconfig_libs=
19076
19077	echo "$as_me:19077: checking for XextCreateExtension in -lXext" >&5
19078echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
19079if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
19080  echo $ECHO_N "(cached) $ECHO_C" >&6
19081else
19082  ac_check_lib_save_LIBS=$LIBS
19083LIBS="-lXext  $LIBS"
19084cat >conftest.$ac_ext <<_ACEOF
19085#line 19085 "configure"
19086#include "confdefs.h"
19087
19088/* Override any gcc2 internal prototype to avoid an error.  */
19089#ifdef __cplusplus
19090extern "C"
19091#endif
19092/* We use char because int might match the return type of a gcc2
19093   builtin and then its argument prototype would still apply.  */
19094char XextCreateExtension ();
19095int
19096main (void)
19097{
19098XextCreateExtension ();
19099  ;
19100  return 0;
19101}
19102_ACEOF
19103rm -f conftest.$ac_objext conftest$ac_exeext
19104if { (eval echo "$as_me:19104: \"$ac_link\"") >&5
19105  (eval $ac_link) 2>&5
19106  ac_status=$?
19107  echo "$as_me:19107: \$? = $ac_status" >&5
19108  (exit $ac_status); } &&
19109         { ac_try='test -s conftest$ac_exeext'
19110  { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111  (eval $ac_try) 2>&5
19112  ac_status=$?
19113  echo "$as_me:19113: \$? = $ac_status" >&5
19114  (exit $ac_status); }; }; then
19115  ac_cv_lib_Xext_XextCreateExtension=yes
19116else
19117  echo "$as_me: failed program was:" >&5
19118cat conftest.$ac_ext >&5
19119ac_cv_lib_Xext_XextCreateExtension=no
19120fi
19121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19122LIBS=$ac_check_lib_save_LIBS
19123fi
19124echo "$as_me:19124: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
19125echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
19126if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
19127
19128cf_add_libs="-lXext"
19129# Filter out duplicates - this happens with badly-designed ".pc" files...
19130for cf_add_1lib in $LIBS
19131do
19132	for cf_add_2lib in $cf_add_libs
19133	do
19134		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19135		then
19136			cf_add_1lib=
19137			break
19138		fi
19139	done
19140	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19141done
19142LIBS="$cf_add_libs"
19143
19144fi
19145
19146fi
19147
19148# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
19149# in some cases has installed dummy files in the former, other cases replaced
19150# it with a link to the new location).  This complicates the configure script.
19151# Check for that pitfall, and recover using pkg-config
19152#
19153# If none of these are set, the configuration is almost certainly broken.
19154if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
19155then
19156
19157if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
19158	test -n "$verbose" && echo "	found package x11" 1>&6
19159
19160echo "${as_me:-configure}:19160: testing found package x11 ..." 1>&5
19161
19162	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
19163	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
19164	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
19165
19166echo "${as_me:-configure}:19166: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19167
19168	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
19169
19170echo "${as_me:-configure}:19170: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
19171
19172cf_fix_cppflags=no
19173cf_new_cflags=
19174cf_new_cppflags=
19175cf_new_extra_cppflags=
19176
19177for cf_add_cflags in $cf_pkgconfig_incs
19178do
19179case $cf_fix_cppflags in
19180(no)
19181	case $cf_add_cflags in
19182	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19183		case $cf_add_cflags in
19184		(-D*)
19185			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19186
19187			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19188				&& test -z "${cf_tst_cflags}" \
19189				&& cf_fix_cppflags=yes
19190
19191			if test $cf_fix_cppflags = yes ; then
19192
19193	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19194	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19195
19196				continue
19197			elif test "${cf_tst_cflags}" = "\"'" ; then
19198
19199	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19200	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19201
19202				continue
19203			fi
19204			;;
19205		esac
19206		case "$CPPFLAGS" in
19207		(*$cf_add_cflags)
19208			;;
19209		(*)
19210			case $cf_add_cflags in
19211			(-D*)
19212				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19213
19214CPPFLAGS=`echo "$CPPFLAGS" | \
19215	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19216		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19217
19218				;;
19219			esac
19220
19221	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19222	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19223
19224			;;
19225		esac
19226		;;
19227	(*)
19228
19229	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19230	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19231
19232		;;
19233	esac
19234	;;
19235(yes)
19236
19237	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19238	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19239
19240	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19241
19242	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19243		&& test -z "${cf_tst_cflags}" \
19244		&& cf_fix_cppflags=no
19245	;;
19246esac
19247done
19248
19249if test -n "$cf_new_cflags" ; then
19250
19251	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19252	CFLAGS="${CFLAGS}$cf_new_cflags"
19253
19254fi
19255
19256if test -n "$cf_new_cppflags" ; then
19257
19258	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19259	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19260
19261fi
19262
19263if test -n "$cf_new_extra_cppflags" ; then
19264
19265	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19266	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19267
19268fi
19269
19270cf_add_libs="$cf_pkgconfig_libs"
19271# Filter out duplicates - this happens with badly-designed ".pc" files...
19272for cf_add_1lib in $LIBS
19273do
19274	for cf_add_2lib in $cf_add_libs
19275	do
19276		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19277		then
19278			cf_add_1lib=
19279			break
19280		fi
19281	done
19282	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19283done
19284LIBS="$cf_add_libs"
19285
19286	:
19287else
19288	cf_pkgconfig_incs=
19289	cf_pkgconfig_libs=
19290	{ echo "$as_me:19290: WARNING: unable to find X11 library" >&5
19291echo "$as_me: WARNING: unable to find X11 library" >&2;}
19292fi
19293
19294if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
19295	test -n "$verbose" && echo "	found package ice" 1>&6
19296
19297echo "${as_me:-configure}:19297: testing found package ice ..." 1>&5
19298
19299	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
19300	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
19301	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
19302
19303echo "${as_me:-configure}:19303: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19304
19305	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
19306
19307echo "${as_me:-configure}:19307: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
19308
19309cf_fix_cppflags=no
19310cf_new_cflags=
19311cf_new_cppflags=
19312cf_new_extra_cppflags=
19313
19314for cf_add_cflags in $cf_pkgconfig_incs
19315do
19316case $cf_fix_cppflags in
19317(no)
19318	case $cf_add_cflags in
19319	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19320		case $cf_add_cflags in
19321		(-D*)
19322			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19323
19324			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19325				&& test -z "${cf_tst_cflags}" \
19326				&& cf_fix_cppflags=yes
19327
19328			if test $cf_fix_cppflags = yes ; then
19329
19330	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19331	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19332
19333				continue
19334			elif test "${cf_tst_cflags}" = "\"'" ; then
19335
19336	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19337	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19338
19339				continue
19340			fi
19341			;;
19342		esac
19343		case "$CPPFLAGS" in
19344		(*$cf_add_cflags)
19345			;;
19346		(*)
19347			case $cf_add_cflags in
19348			(-D*)
19349				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19350
19351CPPFLAGS=`echo "$CPPFLAGS" | \
19352	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19353		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19354
19355				;;
19356			esac
19357
19358	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19359	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19360
19361			;;
19362		esac
19363		;;
19364	(*)
19365
19366	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19367	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19368
19369		;;
19370	esac
19371	;;
19372(yes)
19373
19374	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19375	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19376
19377	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19378
19379	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19380		&& test -z "${cf_tst_cflags}" \
19381		&& cf_fix_cppflags=no
19382	;;
19383esac
19384done
19385
19386if test -n "$cf_new_cflags" ; then
19387
19388	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19389	CFLAGS="${CFLAGS}$cf_new_cflags"
19390
19391fi
19392
19393if test -n "$cf_new_cppflags" ; then
19394
19395	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19396	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19397
19398fi
19399
19400if test -n "$cf_new_extra_cppflags" ; then
19401
19402	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19403	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19404
19405fi
19406
19407cf_add_libs="$cf_pkgconfig_libs"
19408# Filter out duplicates - this happens with badly-designed ".pc" files...
19409for cf_add_1lib in $LIBS
19410do
19411	for cf_add_2lib in $cf_add_libs
19412	do
19413		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19414		then
19415			cf_add_1lib=
19416			break
19417		fi
19418	done
19419	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19420done
19421LIBS="$cf_add_libs"
19422
19423	:
19424else
19425	cf_pkgconfig_incs=
19426	cf_pkgconfig_libs=
19427	{ echo "$as_me:19427: WARNING: unable to find ICE library" >&5
19428echo "$as_me: WARNING: unable to find ICE library" >&2;}
19429fi
19430
19431if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
19432	test -n "$verbose" && echo "	found package sm" 1>&6
19433
19434echo "${as_me:-configure}:19434: testing found package sm ..." 1>&5
19435
19436	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
19437	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
19438	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
19439
19440echo "${as_me:-configure}:19440: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19441
19442	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
19443
19444echo "${as_me:-configure}:19444: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
19445
19446cf_fix_cppflags=no
19447cf_new_cflags=
19448cf_new_cppflags=
19449cf_new_extra_cppflags=
19450
19451for cf_add_cflags in $cf_pkgconfig_incs
19452do
19453case $cf_fix_cppflags in
19454(no)
19455	case $cf_add_cflags in
19456	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19457		case $cf_add_cflags in
19458		(-D*)
19459			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19460
19461			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19462				&& test -z "${cf_tst_cflags}" \
19463				&& cf_fix_cppflags=yes
19464
19465			if test $cf_fix_cppflags = yes ; then
19466
19467	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19468	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19469
19470				continue
19471			elif test "${cf_tst_cflags}" = "\"'" ; then
19472
19473	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19474	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19475
19476				continue
19477			fi
19478			;;
19479		esac
19480		case "$CPPFLAGS" in
19481		(*$cf_add_cflags)
19482			;;
19483		(*)
19484			case $cf_add_cflags in
19485			(-D*)
19486				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19487
19488CPPFLAGS=`echo "$CPPFLAGS" | \
19489	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19490		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19491
19492				;;
19493			esac
19494
19495	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19496	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19497
19498			;;
19499		esac
19500		;;
19501	(*)
19502
19503	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19504	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19505
19506		;;
19507	esac
19508	;;
19509(yes)
19510
19511	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19512	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19513
19514	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19515
19516	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19517		&& test -z "${cf_tst_cflags}" \
19518		&& cf_fix_cppflags=no
19519	;;
19520esac
19521done
19522
19523if test -n "$cf_new_cflags" ; then
19524
19525	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19526	CFLAGS="${CFLAGS}$cf_new_cflags"
19527
19528fi
19529
19530if test -n "$cf_new_cppflags" ; then
19531
19532	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19533	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19534
19535fi
19536
19537if test -n "$cf_new_extra_cppflags" ; then
19538
19539	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19540	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19541
19542fi
19543
19544cf_add_libs="$cf_pkgconfig_libs"
19545# Filter out duplicates - this happens with badly-designed ".pc" files...
19546for cf_add_1lib in $LIBS
19547do
19548	for cf_add_2lib in $cf_add_libs
19549	do
19550		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19551		then
19552			cf_add_1lib=
19553			break
19554		fi
19555	done
19556	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19557done
19558LIBS="$cf_add_libs"
19559
19560	:
19561else
19562	cf_pkgconfig_incs=
19563	cf_pkgconfig_libs=
19564	{ echo "$as_me:19564: WARNING: unable to find SM library" >&5
19565echo "$as_me: WARNING: unable to find SM library" >&2;}
19566fi
19567
19568if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
19569	test -n "$verbose" && echo "	found package xt" 1>&6
19570
19571echo "${as_me:-configure}:19571: testing found package xt ..." 1>&5
19572
19573	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
19574	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
19575	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
19576
19577echo "${as_me:-configure}:19577: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19578
19579	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
19580
19581echo "${as_me:-configure}:19581: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
19582
19583cf_fix_cppflags=no
19584cf_new_cflags=
19585cf_new_cppflags=
19586cf_new_extra_cppflags=
19587
19588for cf_add_cflags in $cf_pkgconfig_incs
19589do
19590case $cf_fix_cppflags in
19591(no)
19592	case $cf_add_cflags in
19593	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19594		case $cf_add_cflags in
19595		(-D*)
19596			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19597
19598			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19599				&& test -z "${cf_tst_cflags}" \
19600				&& cf_fix_cppflags=yes
19601
19602			if test $cf_fix_cppflags = yes ; then
19603
19604	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19605	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19606
19607				continue
19608			elif test "${cf_tst_cflags}" = "\"'" ; then
19609
19610	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19611	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19612
19613				continue
19614			fi
19615			;;
19616		esac
19617		case "$CPPFLAGS" in
19618		(*$cf_add_cflags)
19619			;;
19620		(*)
19621			case $cf_add_cflags in
19622			(-D*)
19623				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19624
19625CPPFLAGS=`echo "$CPPFLAGS" | \
19626	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19627		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19628
19629				;;
19630			esac
19631
19632	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19633	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19634
19635			;;
19636		esac
19637		;;
19638	(*)
19639
19640	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19641	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19642
19643		;;
19644	esac
19645	;;
19646(yes)
19647
19648	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19649	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19650
19651	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19652
19653	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19654		&& test -z "${cf_tst_cflags}" \
19655		&& cf_fix_cppflags=no
19656	;;
19657esac
19658done
19659
19660if test -n "$cf_new_cflags" ; then
19661
19662	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19663	CFLAGS="${CFLAGS}$cf_new_cflags"
19664
19665fi
19666
19667if test -n "$cf_new_cppflags" ; then
19668
19669	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19670	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19671
19672fi
19673
19674if test -n "$cf_new_extra_cppflags" ; then
19675
19676	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19677	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19678
19679fi
19680
19681cf_add_libs="$cf_pkgconfig_libs"
19682# Filter out duplicates - this happens with badly-designed ".pc" files...
19683for cf_add_1lib in $LIBS
19684do
19685	for cf_add_2lib in $cf_add_libs
19686	do
19687		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19688		then
19689			cf_add_1lib=
19690			break
19691		fi
19692	done
19693	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19694done
19695LIBS="$cf_add_libs"
19696
19697	:
19698else
19699	cf_pkgconfig_incs=
19700	cf_pkgconfig_libs=
19701	{ echo "$as_me:19701: WARNING: unable to find Xt library" >&5
19702echo "$as_me: WARNING: unable to find Xt library" >&2;}
19703fi
19704
19705fi
19706
19707cf_have_X_LIBS=no
19708
19709if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
19710	test -n "$verbose" && echo "	found package xt" 1>&6
19711
19712echo "${as_me:-configure}:19712: testing found package xt ..." 1>&5
19713
19714	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
19715	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
19716	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
19717
19718echo "${as_me:-configure}:19718: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19719
19720	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
19721
19722echo "${as_me:-configure}:19722: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
19723
19724cf_fix_cppflags=no
19725cf_new_cflags=
19726cf_new_cppflags=
19727cf_new_extra_cppflags=
19728
19729for cf_add_cflags in $cf_pkgconfig_incs
19730do
19731case $cf_fix_cppflags in
19732(no)
19733	case $cf_add_cflags in
19734	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19735		case $cf_add_cflags in
19736		(-D*)
19737			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19738
19739			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19740				&& test -z "${cf_tst_cflags}" \
19741				&& cf_fix_cppflags=yes
19742
19743			if test $cf_fix_cppflags = yes ; then
19744
19745	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19746	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19747
19748				continue
19749			elif test "${cf_tst_cflags}" = "\"'" ; then
19750
19751	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19752	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19753
19754				continue
19755			fi
19756			;;
19757		esac
19758		case "$CPPFLAGS" in
19759		(*$cf_add_cflags)
19760			;;
19761		(*)
19762			case $cf_add_cflags in
19763			(-D*)
19764				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19765
19766CPPFLAGS=`echo "$CPPFLAGS" | \
19767	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19768		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19769
19770				;;
19771			esac
19772
19773	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19774	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19775
19776			;;
19777		esac
19778		;;
19779	(*)
19780
19781	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19782	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19783
19784		;;
19785	esac
19786	;;
19787(yes)
19788
19789	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19790	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19791
19792	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19793
19794	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19795		&& test -z "${cf_tst_cflags}" \
19796		&& cf_fix_cppflags=no
19797	;;
19798esac
19799done
19800
19801if test -n "$cf_new_cflags" ; then
19802
19803	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19804	CFLAGS="${CFLAGS}$cf_new_cflags"
19805
19806fi
19807
19808if test -n "$cf_new_cppflags" ; then
19809
19810	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19811	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19812
19813fi
19814
19815if test -n "$cf_new_extra_cppflags" ; then
19816
19817	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19818	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19819
19820fi
19821
19822cf_add_libs="$cf_pkgconfig_libs"
19823# Filter out duplicates - this happens with badly-designed ".pc" files...
19824for cf_add_1lib in $LIBS
19825do
19826	for cf_add_2lib in $cf_add_libs
19827	do
19828		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19829		then
19830			cf_add_1lib=
19831			break
19832		fi
19833	done
19834	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19835done
19836LIBS="$cf_add_libs"
19837
19838	case "x$LIBS" in
19839	(*-lX11*)
19840		;;
19841	(*)
19842# we have an "xt" package, but it may omit Xt's dependency on X11
19843echo "$as_me:19843: checking for usable X dependency" >&5
19844echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
19845if test "${cf_cv_xt_x11_compat+set}" = set; then
19846  echo $ECHO_N "(cached) $ECHO_C" >&6
19847else
19848
19849cat >conftest.$ac_ext <<_ACEOF
19850#line 19850 "configure"
19851#include "confdefs.h"
19852
19853#include <X11/Xlib.h>
19854
19855int
19856main (void)
19857{
19858
19859	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
19860	int rc2 = XClearWindow((Display*) 0, (Window) 0);
19861	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
19862	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
19863
19864  ;
19865  return 0;
19866}
19867_ACEOF
19868rm -f conftest.$ac_objext conftest$ac_exeext
19869if { (eval echo "$as_me:19869: \"$ac_link\"") >&5
19870  (eval $ac_link) 2>&5
19871  ac_status=$?
19872  echo "$as_me:19872: \$? = $ac_status" >&5
19873  (exit $ac_status); } &&
19874         { ac_try='test -s conftest$ac_exeext'
19875  { (eval echo "$as_me:19875: \"$ac_try\"") >&5
19876  (eval $ac_try) 2>&5
19877  ac_status=$?
19878  echo "$as_me:19878: \$? = $ac_status" >&5
19879  (exit $ac_status); }; }; then
19880  cf_cv_xt_x11_compat=yes
19881else
19882  echo "$as_me: failed program was:" >&5
19883cat conftest.$ac_ext >&5
19884cf_cv_xt_x11_compat=no
19885fi
19886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19887fi
19888echo "$as_me:19888: result: $cf_cv_xt_x11_compat" >&5
19889echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
19890		if test "$cf_cv_xt_x11_compat" = no
19891		then
19892			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
19893
19894echo "${as_me:-configure}:19894: testing work around broken X11 dependency ..." 1>&5
19895
19896			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
19897
19898if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
19899	test -n "$verbose" && echo "	found package x11" 1>&6
19900
19901echo "${as_me:-configure}:19901: testing found package x11 ..." 1>&5
19902
19903	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
19904	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
19905	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
19906
19907echo "${as_me:-configure}:19907: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19908
19909	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
19910
19911echo "${as_me:-configure}:19911: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
19912
19913cf_fix_cppflags=no
19914cf_new_cflags=
19915cf_new_cppflags=
19916cf_new_extra_cppflags=
19917
19918for cf_add_cflags in $cf_pkgconfig_incs
19919do
19920case $cf_fix_cppflags in
19921(no)
19922	case $cf_add_cflags in
19923	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19924		case $cf_add_cflags in
19925		(-D*)
19926			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19927
19928			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19929				&& test -z "${cf_tst_cflags}" \
19930				&& cf_fix_cppflags=yes
19931
19932			if test $cf_fix_cppflags = yes ; then
19933
19934	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19935	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19936
19937				continue
19938			elif test "${cf_tst_cflags}" = "\"'" ; then
19939
19940	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19941	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19942
19943				continue
19944			fi
19945			;;
19946		esac
19947		case "$CPPFLAGS" in
19948		(*$cf_add_cflags)
19949			;;
19950		(*)
19951			case $cf_add_cflags in
19952			(-D*)
19953				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19954
19955CPPFLAGS=`echo "$CPPFLAGS" | \
19956	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19957		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19958
19959				;;
19960			esac
19961
19962	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19963	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19964
19965			;;
19966		esac
19967		;;
19968	(*)
19969
19970	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19971	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19972
19973		;;
19974	esac
19975	;;
19976(yes)
19977
19978	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19979	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19980
19981	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19982
19983	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19984		&& test -z "${cf_tst_cflags}" \
19985		&& cf_fix_cppflags=no
19986	;;
19987esac
19988done
19989
19990if test -n "$cf_new_cflags" ; then
19991
19992	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19993	CFLAGS="${CFLAGS}$cf_new_cflags"
19994
19995fi
19996
19997if test -n "$cf_new_cppflags" ; then
19998
19999	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20000	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20001
20002fi
20003
20004if test -n "$cf_new_extra_cppflags" ; then
20005
20006	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20007	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20008
20009fi
20010
20011cf_add_libs="$cf_pkgconfig_libs"
20012# Filter out duplicates - this happens with badly-designed ".pc" files...
20013for cf_add_1lib in $LIBS
20014do
20015	for cf_add_2lib in $cf_add_libs
20016	do
20017		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20018		then
20019			cf_add_1lib=
20020			break
20021		fi
20022	done
20023	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20024done
20025LIBS="$cf_add_libs"
20026
20027	:
20028else
20029	cf_pkgconfig_incs=
20030	cf_pkgconfig_libs=
20031
20032test -n "$verbose" && echo "	...before $LIBS" 1>&6
20033
20034echo "${as_me:-configure}:20034: testing ...before $LIBS ..." 1>&5
20035
20036LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
20037test -n "$verbose" && echo "	...after  $LIBS" 1>&6
20038
20039echo "${as_me:-configure}:20039: testing ...after  $LIBS ..." 1>&5
20040
20041fi
20042
20043		fi
20044		;;
20045	esac
20046
20047echo "$as_me:20047: checking for usable X Toolkit package" >&5
20048echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
20049if test "${cf_cv_xt_ice_compat+set}" = set; then
20050  echo $ECHO_N "(cached) $ECHO_C" >&6
20051else
20052
20053cat >conftest.$ac_ext <<_ACEOF
20054#line 20054 "configure"
20055#include "confdefs.h"
20056
20057#include <X11/Shell.h>
20058
20059int
20060main (void)
20061{
20062int num = IceConnectionNumber(0)
20063
20064  ;
20065  return 0;
20066}
20067_ACEOF
20068rm -f conftest.$ac_objext conftest$ac_exeext
20069if { (eval echo "$as_me:20069: \"$ac_link\"") >&5
20070  (eval $ac_link) 2>&5
20071  ac_status=$?
20072  echo "$as_me:20072: \$? = $ac_status" >&5
20073  (exit $ac_status); } &&
20074         { ac_try='test -s conftest$ac_exeext'
20075  { (eval echo "$as_me:20075: \"$ac_try\"") >&5
20076  (eval $ac_try) 2>&5
20077  ac_status=$?
20078  echo "$as_me:20078: \$? = $ac_status" >&5
20079  (exit $ac_status); }; }; then
20080  cf_cv_xt_ice_compat=yes
20081else
20082  echo "$as_me: failed program was:" >&5
20083cat conftest.$ac_ext >&5
20084cf_cv_xt_ice_compat=no
20085fi
20086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20087fi
20088echo "$as_me:20088: result: $cf_cv_xt_ice_compat" >&5
20089echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
20090
20091	if test "$cf_cv_xt_ice_compat" = no
20092	then
20093		# workaround for broken ".pc" files used for X Toolkit.
20094		case "x$X_PRE_LIBS" in
20095		(*-lICE*)
20096			case "x$LIBS" in
20097			(*-lICE*)
20098				;;
20099			(*)
20100				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
20101
20102echo "${as_me:-configure}:20102: testing work around broken ICE dependency ..." 1>&5
20103
20104if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
20105	test -n "$verbose" && echo "	found package ice" 1>&6
20106
20107echo "${as_me:-configure}:20107: testing found package ice ..." 1>&5
20108
20109	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
20110	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
20111	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
20112
20113echo "${as_me:-configure}:20113: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20114
20115	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
20116
20117echo "${as_me:-configure}:20117: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
20118
20119cf_fix_cppflags=no
20120cf_new_cflags=
20121cf_new_cppflags=
20122cf_new_extra_cppflags=
20123
20124for cf_add_cflags in $cf_pkgconfig_incs
20125do
20126case $cf_fix_cppflags in
20127(no)
20128	case $cf_add_cflags in
20129	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20130		case $cf_add_cflags in
20131		(-D*)
20132			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20133
20134			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20135				&& test -z "${cf_tst_cflags}" \
20136				&& cf_fix_cppflags=yes
20137
20138			if test $cf_fix_cppflags = yes ; then
20139
20140	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20141	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20142
20143				continue
20144			elif test "${cf_tst_cflags}" = "\"'" ; then
20145
20146	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20147	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20148
20149				continue
20150			fi
20151			;;
20152		esac
20153		case "$CPPFLAGS" in
20154		(*$cf_add_cflags)
20155			;;
20156		(*)
20157			case $cf_add_cflags in
20158			(-D*)
20159				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20160
20161CPPFLAGS=`echo "$CPPFLAGS" | \
20162	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20163		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20164
20165				;;
20166			esac
20167
20168	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20169	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20170
20171			;;
20172		esac
20173		;;
20174	(*)
20175
20176	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20177	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20178
20179		;;
20180	esac
20181	;;
20182(yes)
20183
20184	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20185	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20186
20187	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20188
20189	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20190		&& test -z "${cf_tst_cflags}" \
20191		&& cf_fix_cppflags=no
20192	;;
20193esac
20194done
20195
20196if test -n "$cf_new_cflags" ; then
20197
20198	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20199	CFLAGS="${CFLAGS}$cf_new_cflags"
20200
20201fi
20202
20203if test -n "$cf_new_cppflags" ; then
20204
20205	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20206	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20207
20208fi
20209
20210if test -n "$cf_new_extra_cppflags" ; then
20211
20212	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20213	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20214
20215fi
20216
20217cf_add_libs="$cf_pkgconfig_libs"
20218# Filter out duplicates - this happens with badly-designed ".pc" files...
20219for cf_add_1lib in $LIBS
20220do
20221	for cf_add_2lib in $cf_add_libs
20222	do
20223		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20224		then
20225			cf_add_1lib=
20226			break
20227		fi
20228	done
20229	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20230done
20231LIBS="$cf_add_libs"
20232
20233if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
20234	test -n "$verbose" && echo "	found package sm" 1>&6
20235
20236echo "${as_me:-configure}:20236: testing found package sm ..." 1>&5
20237
20238	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
20239	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
20240	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
20241
20242echo "${as_me:-configure}:20242: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20243
20244	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
20245
20246echo "${as_me:-configure}:20246: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
20247
20248cf_fix_cppflags=no
20249cf_new_cflags=
20250cf_new_cppflags=
20251cf_new_extra_cppflags=
20252
20253for cf_add_cflags in $cf_pkgconfig_incs
20254do
20255case $cf_fix_cppflags in
20256(no)
20257	case $cf_add_cflags in
20258	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20259		case $cf_add_cflags in
20260		(-D*)
20261			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20262
20263			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20264				&& test -z "${cf_tst_cflags}" \
20265				&& cf_fix_cppflags=yes
20266
20267			if test $cf_fix_cppflags = yes ; then
20268
20269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20271
20272				continue
20273			elif test "${cf_tst_cflags}" = "\"'" ; then
20274
20275	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20276	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20277
20278				continue
20279			fi
20280			;;
20281		esac
20282		case "$CPPFLAGS" in
20283		(*$cf_add_cflags)
20284			;;
20285		(*)
20286			case $cf_add_cflags in
20287			(-D*)
20288				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20289
20290CPPFLAGS=`echo "$CPPFLAGS" | \
20291	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20292		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20293
20294				;;
20295			esac
20296
20297	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20298	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20299
20300			;;
20301		esac
20302		;;
20303	(*)
20304
20305	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20306	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20307
20308		;;
20309	esac
20310	;;
20311(yes)
20312
20313	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20314	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20315
20316	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20317
20318	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20319		&& test -z "${cf_tst_cflags}" \
20320		&& cf_fix_cppflags=no
20321	;;
20322esac
20323done
20324
20325if test -n "$cf_new_cflags" ; then
20326
20327	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20328	CFLAGS="${CFLAGS}$cf_new_cflags"
20329
20330fi
20331
20332if test -n "$cf_new_cppflags" ; then
20333
20334	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20335	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20336
20337fi
20338
20339if test -n "$cf_new_extra_cppflags" ; then
20340
20341	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20342	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20343
20344fi
20345
20346cf_add_libs="$cf_pkgconfig_libs"
20347# Filter out duplicates - this happens with badly-designed ".pc" files...
20348for cf_add_1lib in $LIBS
20349do
20350	for cf_add_2lib in $cf_add_libs
20351	do
20352		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20353		then
20354			cf_add_1lib=
20355			break
20356		fi
20357	done
20358	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20359done
20360LIBS="$cf_add_libs"
20361
20362	:
20363else
20364	cf_pkgconfig_incs=
20365	cf_pkgconfig_libs=
20366	:
20367fi
20368
20369else
20370	cf_pkgconfig_incs=
20371	cf_pkgconfig_libs=
20372
20373test -n "$verbose" && echo "	...before $LIBS" 1>&6
20374
20375echo "${as_me:-configure}:20375: testing ...before $LIBS ..." 1>&5
20376
20377LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
20378test -n "$verbose" && echo "	...after  $LIBS" 1>&6
20379
20380echo "${as_me:-configure}:20380: testing ...after  $LIBS ..." 1>&5
20381
20382fi
20383
20384				;;
20385			esac
20386			;;
20387		esac
20388	fi
20389
20390	cf_have_X_LIBS=yes
20391
20392else
20393	cf_pkgconfig_incs=
20394	cf_pkgconfig_libs=
20395
20396	LDFLAGS="$X_LIBS $LDFLAGS"
20397
20398test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
20399
20400echo "${as_me:-configure}:20400: testing checking additions to CFLAGS ..." 1>&5
20401
20402cf_check_cflags="$CFLAGS"
20403cf_check_cppflags="$CPPFLAGS"
20404
20405cf_fix_cppflags=no
20406cf_new_cflags=
20407cf_new_cppflags=
20408cf_new_extra_cppflags=
20409
20410for cf_add_cflags in $X_CFLAGS
20411do
20412case $cf_fix_cppflags in
20413(no)
20414	case $cf_add_cflags in
20415	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20416		case $cf_add_cflags in
20417		(-D*)
20418			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20419
20420			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20421				&& test -z "${cf_tst_cflags}" \
20422				&& cf_fix_cppflags=yes
20423
20424			if test $cf_fix_cppflags = yes ; then
20425
20426	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20427	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20428
20429				continue
20430			elif test "${cf_tst_cflags}" = "\"'" ; then
20431
20432	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20433	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20434
20435				continue
20436			fi
20437			;;
20438		esac
20439		case "$CPPFLAGS" in
20440		(*$cf_add_cflags)
20441			;;
20442		(*)
20443			case $cf_add_cflags in
20444			(-D*)
20445				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20446
20447CPPFLAGS=`echo "$CPPFLAGS" | \
20448	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20449		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20450
20451				;;
20452			esac
20453
20454	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20455	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20456
20457			;;
20458		esac
20459		;;
20460	(*)
20461
20462	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20463	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20464
20465		;;
20466	esac
20467	;;
20468(yes)
20469
20470	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20471	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20472
20473	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20474
20475	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20476		&& test -z "${cf_tst_cflags}" \
20477		&& cf_fix_cppflags=no
20478	;;
20479esac
20480done
20481
20482if test -n "$cf_new_cflags" ; then
20483	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
20484
20485echo "${as_me:-configure}:20485: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
20486
20487	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20488	CFLAGS="${CFLAGS}$cf_new_cflags"
20489
20490fi
20491
20492if test -n "$cf_new_cppflags" ; then
20493	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
20494
20495echo "${as_me:-configure}:20495: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
20496
20497	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20498	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20499
20500fi
20501
20502if test -n "$cf_new_extra_cppflags" ; then
20503	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
20504
20505echo "${as_me:-configure}:20505: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
20506
20507	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20508	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20509
20510fi
20511
20512if test "x$cf_check_cflags" != "x$CFLAGS" ; then
20513cat >conftest.$ac_ext <<_ACEOF
20514#line 20514 "configure"
20515#include "confdefs.h"
20516#include <stdio.h>
20517int
20518main (void)
20519{
20520printf("Hello world");
20521  ;
20522  return 0;
20523}
20524_ACEOF
20525rm -f conftest.$ac_objext conftest$ac_exeext
20526if { (eval echo "$as_me:20526: \"$ac_link\"") >&5
20527  (eval $ac_link) 2>&5
20528  ac_status=$?
20529  echo "$as_me:20529: \$? = $ac_status" >&5
20530  (exit $ac_status); } &&
20531         { ac_try='test -s conftest$ac_exeext'
20532  { (eval echo "$as_me:20532: \"$ac_try\"") >&5
20533  (eval $ac_try) 2>&5
20534  ac_status=$?
20535  echo "$as_me:20535: \$? = $ac_status" >&5
20536  (exit $ac_status); }; }; then
20537  :
20538else
20539  echo "$as_me: failed program was:" >&5
20540cat conftest.$ac_ext >&5
20541test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
20542
20543echo "${as_me:-configure}:20543: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
20544
20545	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
20546		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
20547
20548echo "${as_me:-configure}:20548: testing but keeping change to \$CPPFLAGS ..." 1>&5
20549
20550	 fi
20551	 CFLAGS="$cf_check_flags"
20552fi
20553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20554fi
20555
20556	echo "$as_me:20556: checking for XOpenDisplay" >&5
20557echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
20558if test "${ac_cv_func_XOpenDisplay+set}" = set; then
20559  echo $ECHO_N "(cached) $ECHO_C" >&6
20560else
20561  cat >conftest.$ac_ext <<_ACEOF
20562#line 20562 "configure"
20563#include "confdefs.h"
20564/* System header to define __stub macros and hopefully few prototypes,
20565    which can conflict with char XOpenDisplay (); below.  */
20566#include <assert.h>
20567/* Override any gcc2 internal prototype to avoid an error.  */
20568#ifdef __cplusplus
20569extern "C"
20570#endif
20571/* We use char because int might match the return type of a gcc2
20572   builtin and then its argument prototype would still apply.  */
20573char XOpenDisplay ();
20574char (*f) ();
20575
20576int
20577main (void)
20578{
20579/* The GNU C library defines this for functions which it implements
20580    to always fail with ENOSYS.  Some functions are actually named
20581    something starting with __ and the normal name is an alias.  */
20582#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
20583choke me
20584#else
20585f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20586#endif
20587
20588  ;
20589  return 0;
20590}
20591_ACEOF
20592rm -f conftest.$ac_objext conftest$ac_exeext
20593if { (eval echo "$as_me:20593: \"$ac_link\"") >&5
20594  (eval $ac_link) 2>&5
20595  ac_status=$?
20596  echo "$as_me:20596: \$? = $ac_status" >&5
20597  (exit $ac_status); } &&
20598         { ac_try='test -s conftest$ac_exeext'
20599  { (eval echo "$as_me:20599: \"$ac_try\"") >&5
20600  (eval $ac_try) 2>&5
20601  ac_status=$?
20602  echo "$as_me:20602: \$? = $ac_status" >&5
20603  (exit $ac_status); }; }; then
20604  ac_cv_func_XOpenDisplay=yes
20605else
20606  echo "$as_me: failed program was:" >&5
20607cat conftest.$ac_ext >&5
20608ac_cv_func_XOpenDisplay=no
20609fi
20610rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20611fi
20612echo "$as_me:20612: result: $ac_cv_func_XOpenDisplay" >&5
20613echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
20614if test $ac_cv_func_XOpenDisplay = yes; then
20615  :
20616else
20617
20618	echo "$as_me:20618: checking for XOpenDisplay in -lX11" >&5
20619echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
20620if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
20621  echo $ECHO_N "(cached) $ECHO_C" >&6
20622else
20623  ac_check_lib_save_LIBS=$LIBS
20624LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
20625cat >conftest.$ac_ext <<_ACEOF
20626#line 20626 "configure"
20627#include "confdefs.h"
20628
20629/* Override any gcc2 internal prototype to avoid an error.  */
20630#ifdef __cplusplus
20631extern "C"
20632#endif
20633/* We use char because int might match the return type of a gcc2
20634   builtin and then its argument prototype would still apply.  */
20635char XOpenDisplay ();
20636int
20637main (void)
20638{
20639XOpenDisplay ();
20640  ;
20641  return 0;
20642}
20643_ACEOF
20644rm -f conftest.$ac_objext conftest$ac_exeext
20645if { (eval echo "$as_me:20645: \"$ac_link\"") >&5
20646  (eval $ac_link) 2>&5
20647  ac_status=$?
20648  echo "$as_me:20648: \$? = $ac_status" >&5
20649  (exit $ac_status); } &&
20650         { ac_try='test -s conftest$ac_exeext'
20651  { (eval echo "$as_me:20651: \"$ac_try\"") >&5
20652  (eval $ac_try) 2>&5
20653  ac_status=$?
20654  echo "$as_me:20654: \$? = $ac_status" >&5
20655  (exit $ac_status); }; }; then
20656  ac_cv_lib_X11_XOpenDisplay=yes
20657else
20658  echo "$as_me: failed program was:" >&5
20659cat conftest.$ac_ext >&5
20660ac_cv_lib_X11_XOpenDisplay=no
20661fi
20662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20663LIBS=$ac_check_lib_save_LIBS
20664fi
20665echo "$as_me:20665: result: $ac_cv_lib_X11_XOpenDisplay" >&5
20666echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
20667if test $ac_cv_lib_X11_XOpenDisplay = yes; then
20668
20669cf_add_libs="-lX11"
20670# Filter out duplicates - this happens with badly-designed ".pc" files...
20671for cf_add_1lib in $LIBS
20672do
20673	for cf_add_2lib in $cf_add_libs
20674	do
20675		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20676		then
20677			cf_add_1lib=
20678			break
20679		fi
20680	done
20681	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20682done
20683LIBS="$cf_add_libs"
20684
20685fi
20686
20687fi
20688
20689	echo "$as_me:20689: checking for XtAppInitialize" >&5
20690echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
20691if test "${ac_cv_func_XtAppInitialize+set}" = set; then
20692  echo $ECHO_N "(cached) $ECHO_C" >&6
20693else
20694  cat >conftest.$ac_ext <<_ACEOF
20695#line 20695 "configure"
20696#include "confdefs.h"
20697/* System header to define __stub macros and hopefully few prototypes,
20698    which can conflict with char XtAppInitialize (); below.  */
20699#include <assert.h>
20700/* Override any gcc2 internal prototype to avoid an error.  */
20701#ifdef __cplusplus
20702extern "C"
20703#endif
20704/* We use char because int might match the return type of a gcc2
20705   builtin and then its argument prototype would still apply.  */
20706char XtAppInitialize ();
20707char (*f) ();
20708
20709int
20710main (void)
20711{
20712/* The GNU C library defines this for functions which it implements
20713    to always fail with ENOSYS.  Some functions are actually named
20714    something starting with __ and the normal name is an alias.  */
20715#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
20716choke me
20717#else
20718f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20719#endif
20720
20721  ;
20722  return 0;
20723}
20724_ACEOF
20725rm -f conftest.$ac_objext conftest$ac_exeext
20726if { (eval echo "$as_me:20726: \"$ac_link\"") >&5
20727  (eval $ac_link) 2>&5
20728  ac_status=$?
20729  echo "$as_me:20729: \$? = $ac_status" >&5
20730  (exit $ac_status); } &&
20731         { ac_try='test -s conftest$ac_exeext'
20732  { (eval echo "$as_me:20732: \"$ac_try\"") >&5
20733  (eval $ac_try) 2>&5
20734  ac_status=$?
20735  echo "$as_me:20735: \$? = $ac_status" >&5
20736  (exit $ac_status); }; }; then
20737  ac_cv_func_XtAppInitialize=yes
20738else
20739  echo "$as_me: failed program was:" >&5
20740cat conftest.$ac_ext >&5
20741ac_cv_func_XtAppInitialize=no
20742fi
20743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20744fi
20745echo "$as_me:20745: result: $ac_cv_func_XtAppInitialize" >&5
20746echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
20747if test $ac_cv_func_XtAppInitialize = yes; then
20748  :
20749else
20750
20751	echo "$as_me:20751: checking for XtAppInitialize in -lXt" >&5
20752echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
20753if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
20754  echo $ECHO_N "(cached) $ECHO_C" >&6
20755else
20756  ac_check_lib_save_LIBS=$LIBS
20757LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
20758cat >conftest.$ac_ext <<_ACEOF
20759#line 20759 "configure"
20760#include "confdefs.h"
20761
20762/* Override any gcc2 internal prototype to avoid an error.  */
20763#ifdef __cplusplus
20764extern "C"
20765#endif
20766/* We use char because int might match the return type of a gcc2
20767   builtin and then its argument prototype would still apply.  */
20768char XtAppInitialize ();
20769int
20770main (void)
20771{
20772XtAppInitialize ();
20773  ;
20774  return 0;
20775}
20776_ACEOF
20777rm -f conftest.$ac_objext conftest$ac_exeext
20778if { (eval echo "$as_me:20778: \"$ac_link\"") >&5
20779  (eval $ac_link) 2>&5
20780  ac_status=$?
20781  echo "$as_me:20781: \$? = $ac_status" >&5
20782  (exit $ac_status); } &&
20783         { ac_try='test -s conftest$ac_exeext'
20784  { (eval echo "$as_me:20784: \"$ac_try\"") >&5
20785  (eval $ac_try) 2>&5
20786  ac_status=$?
20787  echo "$as_me:20787: \$? = $ac_status" >&5
20788  (exit $ac_status); }; }; then
20789  ac_cv_lib_Xt_XtAppInitialize=yes
20790else
20791  echo "$as_me: failed program was:" >&5
20792cat conftest.$ac_ext >&5
20793ac_cv_lib_Xt_XtAppInitialize=no
20794fi
20795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20796LIBS=$ac_check_lib_save_LIBS
20797fi
20798echo "$as_me:20798: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
20799echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
20800if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
20801
20802cat >>confdefs.h <<\EOF
20803#define HAVE_LIBXT 1
20804EOF
20805
20806		 cf_have_X_LIBS=Xt
20807		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
20808fi
20809
20810fi
20811
20812fi
20813
20814if test $cf_have_X_LIBS = no ; then
20815	{ echo "$as_me:20815: WARNING: Unable to successfully link X Toolkit library (-lXt) with
20816test program.  You will have to check and add the proper libraries by hand
20817to makefile." >&5
20818echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
20819test program.  You will have to check and add the proper libraries by hand
20820to makefile." >&2;}
20821fi
20822
20823cf_x_athena_root=$cf_x_athena
20824cf_x_athena_inc=""
20825
20826for cf_path in default \
20827	/usr/contrib/X11R6 \
20828	/usr/contrib/X11R5 \
20829	/usr/lib/X11R5 \
20830	/usr/local
20831do
20832	if test -z "$cf_x_athena_inc" ; then
20833		cf_save="$CPPFLAGS"
20834		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
20835		if test $cf_path != default ; then
20836			CPPFLAGS="$cf_save"
20837
20838	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20839	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
20840
20841			echo "$as_me:20841: checking for $cf_test in $cf_path" >&5
20842echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
20843		else
20844			echo "$as_me:20844: checking for $cf_test" >&5
20845echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
20846		fi
20847		cat >conftest.$ac_ext <<_ACEOF
20848#line 20848 "configure"
20849#include "confdefs.h"
20850
20851#include <X11/Intrinsic.h>
20852#include <$cf_test>
20853int
20854main (void)
20855{
20856
20857  ;
20858  return 0;
20859}
20860_ACEOF
20861rm -f conftest.$ac_objext
20862if { (eval echo "$as_me:20862: \"$ac_compile\"") >&5
20863  (eval $ac_compile) 2>&5
20864  ac_status=$?
20865  echo "$as_me:20865: \$? = $ac_status" >&5
20866  (exit $ac_status); } &&
20867         { ac_try='test -s conftest.$ac_objext'
20868  { (eval echo "$as_me:20868: \"$ac_try\"") >&5
20869  (eval $ac_try) 2>&5
20870  ac_status=$?
20871  echo "$as_me:20871: \$? = $ac_status" >&5
20872  (exit $ac_status); }; }; then
20873  cf_result=yes
20874else
20875  echo "$as_me: failed program was:" >&5
20876cat conftest.$ac_ext >&5
20877cf_result=no
20878fi
20879rm -f conftest.$ac_objext conftest.$ac_ext
20880		echo "$as_me:20880: result: $cf_result" >&5
20881echo "${ECHO_T}$cf_result" >&6
20882		if test "$cf_result" = yes ; then
20883			cf_x_athena_inc=$cf_path
20884			break
20885		else
20886			CPPFLAGS="$cf_save"
20887		fi
20888	fi
20889done
20890
20891if test -z "$cf_x_athena_inc" ; then
20892	{ echo "$as_me:20892: WARNING: Unable to successfully find Athena header files with test program" >&5
20893echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
20894elif test "$cf_x_athena_inc" != default ; then
20895
20896	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20897	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
20898
20899fi
20900
20901cf_x_athena_root=$cf_x_athena
20902cf_x_athena_lib=""
20903
20904for cf_path in default \
20905	/usr/contrib/X11R6 \
20906	/usr/contrib/X11R5 \
20907	/usr/lib/X11R5 \
20908	/usr/local
20909do
20910	for cf_lib in \
20911		${cf_x_athena_root} \
20912		${cf_x_athena_root}7 \
20913		${cf_x_athena_root}6
20914	do
20915	for cf_libs in \
20916		"-l$cf_lib -lXmu" \
20917		"-l$cf_lib -lXpm -lXmu" \
20918		"-l${cf_lib}_s -lXmu_s"
20919	do
20920		if test -z "$cf_x_athena_lib" ; then
20921			cf_save="$LIBS"
20922			cf_test=XawSimpleMenuAddGlobalActions
20923			if test $cf_path != default ; then
20924
20925cf_add_libs="-L$cf_path/lib $cf_libs"
20926# Filter out duplicates - this happens with badly-designed ".pc" files...
20927for cf_add_1lib in $LIBS
20928do
20929	for cf_add_2lib in $cf_add_libs
20930	do
20931		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20932		then
20933			cf_add_1lib=
20934			break
20935		fi
20936	done
20937	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20938done
20939LIBS="$cf_add_libs"
20940
20941				echo "$as_me:20941: checking for $cf_libs in $cf_path" >&5
20942echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
20943			else
20944
20945cf_add_libs="$cf_libs"
20946# Filter out duplicates - this happens with badly-designed ".pc" files...
20947for cf_add_1lib in $LIBS
20948do
20949	for cf_add_2lib in $cf_add_libs
20950	do
20951		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20952		then
20953			cf_add_1lib=
20954			break
20955		fi
20956	done
20957	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20958done
20959LIBS="$cf_add_libs"
20960
20961				echo "$as_me:20961: checking for $cf_test in $cf_libs" >&5
20962echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
20963			fi
20964			cat >conftest.$ac_ext <<_ACEOF
20965#line 20965 "configure"
20966#include "confdefs.h"
20967
20968#include <X11/Intrinsic.h>
20969#include <X11/$cf_x_athena_root/SimpleMenu.h>
20970
20971int
20972main (void)
20973{
20974
20975$cf_test((XtAppContext) 0)
20976  ;
20977  return 0;
20978}
20979_ACEOF
20980rm -f conftest.$ac_objext conftest$ac_exeext
20981if { (eval echo "$as_me:20981: \"$ac_link\"") >&5
20982  (eval $ac_link) 2>&5
20983  ac_status=$?
20984  echo "$as_me:20984: \$? = $ac_status" >&5
20985  (exit $ac_status); } &&
20986         { ac_try='test -s conftest$ac_exeext'
20987  { (eval echo "$as_me:20987: \"$ac_try\"") >&5
20988  (eval $ac_try) 2>&5
20989  ac_status=$?
20990  echo "$as_me:20990: \$? = $ac_status" >&5
20991  (exit $ac_status); }; }; then
20992  cf_result=yes
20993else
20994  echo "$as_me: failed program was:" >&5
20995cat conftest.$ac_ext >&5
20996cf_result=no
20997fi
20998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20999			echo "$as_me:20999: result: $cf_result" >&5
21000echo "${ECHO_T}$cf_result" >&6
21001			if test "$cf_result" = yes ; then
21002				cf_x_athena_lib="$cf_libs"
21003				break
21004			fi
21005			LIBS="$cf_save"
21006		fi
21007	done # cf_libs
21008		test -n "$cf_x_athena_lib" && break
21009	done # cf_lib
21010done
21011
21012if test -z "$cf_x_athena_lib" ; then
21013	{ { echo "$as_me:21013: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
21014echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
21015   { (exit 1); exit 1; }; }
21016fi
21017
21018cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21019
21020cat >>confdefs.h <<EOF
21021#define $cf_x_athena_LIBS 1
21022EOF
21023
21024fi
21025
21026if test -n "$ac_tool_prefix"; then
21027  for ac_prog in xcurses-config
21028  do
21029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21031echo "$as_me:21031: checking for $ac_word" >&5
21032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21033if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
21034  echo $ECHO_N "(cached) $ECHO_C" >&6
21035else
21036  if test -n "$XCURSES_CONFIG"; then
21037  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
21038else
21039  ac_save_IFS=$IFS; IFS=$ac_path_separator
21040ac_dummy="$PATH"
21041for ac_dir in $ac_dummy; do
21042  IFS=$ac_save_IFS
21043  test -z "$ac_dir" && ac_dir=.
21044  $as_executable_p "$ac_dir/$ac_word" || continue
21045ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
21046echo "$as_me:21046: found $ac_dir/$ac_word" >&5
21047break
21048done
21049
21050fi
21051fi
21052XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
21053if test -n "$XCURSES_CONFIG"; then
21054  echo "$as_me:21054: result: $XCURSES_CONFIG" >&5
21055echo "${ECHO_T}$XCURSES_CONFIG" >&6
21056else
21057  echo "$as_me:21057: result: no" >&5
21058echo "${ECHO_T}no" >&6
21059fi
21060
21061    test -n "$XCURSES_CONFIG" && break
21062  done
21063fi
21064if test -z "$XCURSES_CONFIG"; then
21065  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
21066  for ac_prog in xcurses-config
21067do
21068  # Extract the first word of "$ac_prog", so it can be a program name with args.
21069set dummy $ac_prog; ac_word=$2
21070echo "$as_me:21070: checking for $ac_word" >&5
21071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21072if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
21073  echo $ECHO_N "(cached) $ECHO_C" >&6
21074else
21075  if test -n "$ac_ct_XCURSES_CONFIG"; then
21076  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
21077else
21078  ac_save_IFS=$IFS; IFS=$ac_path_separator
21079ac_dummy="$PATH"
21080for ac_dir in $ac_dummy; do
21081  IFS=$ac_save_IFS
21082  test -z "$ac_dir" && ac_dir=.
21083  $as_executable_p "$ac_dir/$ac_word" || continue
21084ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
21085echo "$as_me:21085: found $ac_dir/$ac_word" >&5
21086break
21087done
21088
21089fi
21090fi
21091ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
21092if test -n "$ac_ct_XCURSES_CONFIG"; then
21093  echo "$as_me:21093: result: $ac_ct_XCURSES_CONFIG" >&5
21094echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
21095else
21096  echo "$as_me:21096: result: no" >&5
21097echo "${ECHO_T}no" >&6
21098fi
21099
21100  test -n "$ac_ct_XCURSES_CONFIG" && break
21101done
21102test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
21103
21104  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
21105fi
21106
21107if test "$XCURSES_CONFIG" != none ; then
21108
21109cf_fix_cppflags=no
21110cf_new_cflags=
21111cf_new_cppflags=
21112cf_new_extra_cppflags=
21113
21114for cf_add_cflags in `$XCURSES_CONFIG --cflags`
21115do
21116case $cf_fix_cppflags in
21117(no)
21118	case $cf_add_cflags in
21119	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21120		case $cf_add_cflags in
21121		(-D*)
21122			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21123
21124			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21125				&& test -z "${cf_tst_cflags}" \
21126				&& cf_fix_cppflags=yes
21127
21128			if test $cf_fix_cppflags = yes ; then
21129
21130	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21131	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21132
21133				continue
21134			elif test "${cf_tst_cflags}" = "\"'" ; then
21135
21136	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21137	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21138
21139				continue
21140			fi
21141			;;
21142		esac
21143		case "$CPPFLAGS" in
21144		(*$cf_add_cflags)
21145			;;
21146		(*)
21147			case $cf_add_cflags in
21148			(-D*)
21149				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21150
21151CPPFLAGS=`echo "$CPPFLAGS" | \
21152	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21153		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21154
21155				;;
21156			esac
21157
21158	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21159	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21160
21161			;;
21162		esac
21163		;;
21164	(*)
21165
21166	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21167	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21168
21169		;;
21170	esac
21171	;;
21172(yes)
21173
21174	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21175	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21176
21177	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21178
21179	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21180		&& test -z "${cf_tst_cflags}" \
21181		&& cf_fix_cppflags=no
21182	;;
21183esac
21184done
21185
21186if test -n "$cf_new_cflags" ; then
21187
21188	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21189	CFLAGS="${CFLAGS}$cf_new_cflags"
21190
21191fi
21192
21193if test -n "$cf_new_cppflags" ; then
21194
21195	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21196	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21197
21198fi
21199
21200if test -n "$cf_new_extra_cppflags" ; then
21201
21202	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21203	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21204
21205fi
21206
21207cf_add_libs="`$XCURSES_CONFIG --libs`"
21208# Filter out duplicates - this happens with badly-designed ".pc" files...
21209for cf_add_1lib in $LIBS
21210do
21211	for cf_add_2lib in $cf_add_libs
21212	do
21213		if test "x$cf_add_1lib" = "x$cf_add_2lib"
21214		then
21215			cf_add_1lib=
21216			break
21217		fi
21218	done
21219	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21220done
21221LIBS="$cf_add_libs"
21222
21223cf_cv_lib_XCurses=yes
21224
21225else
21226
21227LDFLAGS="$LDFLAGS $X_LIBS"
21228
21229test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
21230
21231echo "${as_me:-configure}:21231: testing checking additions to CFLAGS ..." 1>&5
21232
21233cf_check_cflags="$CFLAGS"
21234cf_check_cppflags="$CPPFLAGS"
21235
21236cf_fix_cppflags=no
21237cf_new_cflags=
21238cf_new_cppflags=
21239cf_new_extra_cppflags=
21240
21241for cf_add_cflags in $X_CFLAGS
21242do
21243case $cf_fix_cppflags in
21244(no)
21245	case $cf_add_cflags in
21246	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21247		case $cf_add_cflags in
21248		(-D*)
21249			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21250
21251			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21252				&& test -z "${cf_tst_cflags}" \
21253				&& cf_fix_cppflags=yes
21254
21255			if test $cf_fix_cppflags = yes ; then
21256
21257	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21258	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21259
21260				continue
21261			elif test "${cf_tst_cflags}" = "\"'" ; then
21262
21263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21265
21266				continue
21267			fi
21268			;;
21269		esac
21270		case "$CPPFLAGS" in
21271		(*$cf_add_cflags)
21272			;;
21273		(*)
21274			case $cf_add_cflags in
21275			(-D*)
21276				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21277
21278CPPFLAGS=`echo "$CPPFLAGS" | \
21279	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21280		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21281
21282				;;
21283			esac
21284
21285	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21286	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21287
21288			;;
21289		esac
21290		;;
21291	(*)
21292
21293	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21294	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21295
21296		;;
21297	esac
21298	;;
21299(yes)
21300
21301	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21302	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21303
21304	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21305
21306	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21307		&& test -z "${cf_tst_cflags}" \
21308		&& cf_fix_cppflags=no
21309	;;
21310esac
21311done
21312
21313if test -n "$cf_new_cflags" ; then
21314	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
21315
21316echo "${as_me:-configure}:21316: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
21317
21318	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21319	CFLAGS="${CFLAGS}$cf_new_cflags"
21320
21321fi
21322
21323if test -n "$cf_new_cppflags" ; then
21324	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
21325
21326echo "${as_me:-configure}:21326: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
21327
21328	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21329	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21330
21331fi
21332
21333if test -n "$cf_new_extra_cppflags" ; then
21334	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
21335
21336echo "${as_me:-configure}:21336: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
21337
21338	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21339	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21340
21341fi
21342
21343if test "x$cf_check_cflags" != "x$CFLAGS" ; then
21344cat >conftest.$ac_ext <<_ACEOF
21345#line 21345 "configure"
21346#include "confdefs.h"
21347#include <stdio.h>
21348int
21349main (void)
21350{
21351printf("Hello world");
21352  ;
21353  return 0;
21354}
21355_ACEOF
21356rm -f conftest.$ac_objext conftest$ac_exeext
21357if { (eval echo "$as_me:21357: \"$ac_link\"") >&5
21358  (eval $ac_link) 2>&5
21359  ac_status=$?
21360  echo "$as_me:21360: \$? = $ac_status" >&5
21361  (exit $ac_status); } &&
21362         { ac_try='test -s conftest$ac_exeext'
21363  { (eval echo "$as_me:21363: \"$ac_try\"") >&5
21364  (eval $ac_try) 2>&5
21365  ac_status=$?
21366  echo "$as_me:21366: \$? = $ac_status" >&5
21367  (exit $ac_status); }; }; then
21368  :
21369else
21370  echo "$as_me: failed program was:" >&5
21371cat conftest.$ac_ext >&5
21372test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
21373
21374echo "${as_me:-configure}:21374: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
21375
21376	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
21377		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
21378
21379echo "${as_me:-configure}:21379: testing but keeping change to \$CPPFLAGS ..." 1>&5
21380
21381	 fi
21382	 CFLAGS="$cf_check_flags"
21383fi
21384rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21385fi
21386
21387echo "$as_me:21387: checking for XOpenDisplay in -lX11" >&5
21388echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
21389if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
21390  echo $ECHO_N "(cached) $ECHO_C" >&6
21391else
21392  ac_check_lib_save_LIBS=$LIBS
21393LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
21394cat >conftest.$ac_ext <<_ACEOF
21395#line 21395 "configure"
21396#include "confdefs.h"
21397
21398/* Override any gcc2 internal prototype to avoid an error.  */
21399#ifdef __cplusplus
21400extern "C"
21401#endif
21402/* We use char because int might match the return type of a gcc2
21403   builtin and then its argument prototype would still apply.  */
21404char XOpenDisplay ();
21405int
21406main (void)
21407{
21408XOpenDisplay ();
21409  ;
21410  return 0;
21411}
21412_ACEOF
21413rm -f conftest.$ac_objext conftest$ac_exeext
21414if { (eval echo "$as_me:21414: \"$ac_link\"") >&5
21415  (eval $ac_link) 2>&5
21416  ac_status=$?
21417  echo "$as_me:21417: \$? = $ac_status" >&5
21418  (exit $ac_status); } &&
21419         { ac_try='test -s conftest$ac_exeext'
21420  { (eval echo "$as_me:21420: \"$ac_try\"") >&5
21421  (eval $ac_try) 2>&5
21422  ac_status=$?
21423  echo "$as_me:21423: \$? = $ac_status" >&5
21424  (exit $ac_status); }; }; then
21425  ac_cv_lib_X11_XOpenDisplay=yes
21426else
21427  echo "$as_me: failed program was:" >&5
21428cat conftest.$ac_ext >&5
21429ac_cv_lib_X11_XOpenDisplay=no
21430fi
21431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21432LIBS=$ac_check_lib_save_LIBS
21433fi
21434echo "$as_me:21434: result: $ac_cv_lib_X11_XOpenDisplay" >&5
21435echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
21436if test $ac_cv_lib_X11_XOpenDisplay = yes; then
21437
21438cf_add_libs="-lX11"
21439# Filter out duplicates - this happens with badly-designed ".pc" files...
21440for cf_add_1lib in $LIBS
21441do
21442	for cf_add_2lib in $cf_add_libs
21443	do
21444		if test "x$cf_add_1lib" = "x$cf_add_2lib"
21445		then
21446			cf_add_1lib=
21447			break
21448		fi
21449	done
21450	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21451done
21452LIBS="$cf_add_libs"
21453
21454fi
21455
21456echo "$as_me:21456: checking for XCurses library" >&5
21457echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
21458if test "${cf_cv_lib_XCurses+set}" = set; then
21459  echo $ECHO_N "(cached) $ECHO_C" >&6
21460else
21461
21462cf_add_libs="-lXCurses"
21463# Filter out duplicates - this happens with badly-designed ".pc" files...
21464for cf_add_1lib in $LIBS
21465do
21466	for cf_add_2lib in $cf_add_libs
21467	do
21468		if test "x$cf_add_1lib" = "x$cf_add_2lib"
21469		then
21470			cf_add_1lib=
21471			break
21472		fi
21473	done
21474	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21475done
21476LIBS="$cf_add_libs"
21477
21478cat >conftest.$ac_ext <<_ACEOF
21479#line 21479 "configure"
21480#include "confdefs.h"
21481
21482#include <xcurses.h>
21483char *XCursesProgramName = "test";
21484
21485int
21486main (void)
21487{
21488XCursesExit();
21489  ;
21490  return 0;
21491}
21492_ACEOF
21493rm -f conftest.$ac_objext conftest$ac_exeext
21494if { (eval echo "$as_me:21494: \"$ac_link\"") >&5
21495  (eval $ac_link) 2>&5
21496  ac_status=$?
21497  echo "$as_me:21497: \$? = $ac_status" >&5
21498  (exit $ac_status); } &&
21499         { ac_try='test -s conftest$ac_exeext'
21500  { (eval echo "$as_me:21500: \"$ac_try\"") >&5
21501  (eval $ac_try) 2>&5
21502  ac_status=$?
21503  echo "$as_me:21503: \$? = $ac_status" >&5
21504  (exit $ac_status); }; }; then
21505  cf_cv_lib_XCurses=yes
21506else
21507  echo "$as_me: failed program was:" >&5
21508cat conftest.$ac_ext >&5
21509cf_cv_lib_XCurses=no
21510fi
21511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21512
21513fi
21514echo "$as_me:21514: result: $cf_cv_lib_XCurses" >&5
21515echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
21516
21517fi
21518
21519if test $cf_cv_lib_XCurses = yes ; then
21520
21521cat >>confdefs.h <<\EOF
21522#define UNIX 1
21523EOF
21524
21525cat >>confdefs.h <<\EOF
21526#define XCURSES 1
21527EOF
21528
21529	echo "$as_me:21529: checking for xcurses.h" >&5
21530echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
21531if test "${ac_cv_header_xcurses_h+set}" = set; then
21532  echo $ECHO_N "(cached) $ECHO_C" >&6
21533else
21534  cat >conftest.$ac_ext <<_ACEOF
21535#line 21535 "configure"
21536#include "confdefs.h"
21537#include <xcurses.h>
21538_ACEOF
21539if { (eval echo "$as_me:21539: \"$ac_cpp conftest.$ac_ext\"") >&5
21540  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21541  ac_status=$?
21542  egrep -v '^ *\+' conftest.er1 >conftest.err
21543  rm -f conftest.er1
21544  cat conftest.err >&5
21545  echo "$as_me:21545: \$? = $ac_status" >&5
21546  (exit $ac_status); } >/dev/null; then
21547  if test -s conftest.err; then
21548    ac_cpp_err=$ac_c_preproc_warn_flag
21549  else
21550    ac_cpp_err=
21551  fi
21552else
21553  ac_cpp_err=yes
21554fi
21555if test -z "$ac_cpp_err"; then
21556  ac_cv_header_xcurses_h=yes
21557else
21558  echo "$as_me: failed program was:" >&5
21559  cat conftest.$ac_ext >&5
21560  ac_cv_header_xcurses_h=no
21561fi
21562rm -f conftest.err conftest.$ac_ext
21563fi
21564echo "$as_me:21564: result: $ac_cv_header_xcurses_h" >&5
21565echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
21566if test $ac_cv_header_xcurses_h = yes; then
21567
21568cat >>confdefs.h <<\EOF
21569#define HAVE_XCURSES 1
21570EOF
21571
21572fi
21573
21574else
21575	{ { echo "$as_me:21575: error: Cannot link with XCurses" >&5
21576echo "$as_me: error: Cannot link with XCurses" >&2;}
21577   { (exit 1); exit 1; }; }
21578fi
21579
21580	;;
21581(*)
21582	{ { echo "$as_me:21582: error: unexpected screen-value: $cf_cv_screen" >&5
21583echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
21584   { (exit 1); exit 1; }; }
21585	;;
21586esac
21587
21588: ${cf_nculib_root:=$cf_cv_screen}
21589as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
21590echo "$as_me:21590: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
21591echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
21592if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21593  echo $ECHO_N "(cached) $ECHO_C" >&6
21594else
21595  ac_check_lib_save_LIBS=$LIBS
21596LIBS="-l$cf_nculib_root  $LIBS"
21597cat >conftest.$ac_ext <<_ACEOF
21598#line 21598 "configure"
21599#include "confdefs.h"
21600
21601/* Override any gcc2 internal prototype to avoid an error.  */
21602#ifdef __cplusplus
21603extern "C"
21604#endif
21605/* We use char because int might match the return type of a gcc2
21606   builtin and then its argument prototype would still apply.  */
21607char _nc_init_pthreads ();
21608int
21609main (void)
21610{
21611_nc_init_pthreads ();
21612  ;
21613  return 0;
21614}
21615_ACEOF
21616rm -f conftest.$ac_objext conftest$ac_exeext
21617if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618  (eval $ac_link) 2>&5
21619  ac_status=$?
21620  echo "$as_me:21620: \$? = $ac_status" >&5
21621  (exit $ac_status); } &&
21622         { ac_try='test -s conftest$ac_exeext'
21623  { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624  (eval $ac_try) 2>&5
21625  ac_status=$?
21626  echo "$as_me:21626: \$? = $ac_status" >&5
21627  (exit $ac_status); }; }; then
21628  eval "$as_ac_Lib=yes"
21629else
21630  echo "$as_me: failed program was:" >&5
21631cat conftest.$ac_ext >&5
21632eval "$as_ac_Lib=no"
21633fi
21634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21635LIBS=$ac_check_lib_save_LIBS
21636fi
21637echo "$as_me:21637: result: `eval echo '${'$as_ac_Lib'}'`" >&5
21638echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
21639if test `eval echo '${'$as_ac_Lib'}'` = yes; then
21640  cf_cv_ncurses_pthreads=yes
21641else
21642  cf_cv_ncurses_pthreads=no
21643fi
21644
21645if test "$cf_cv_ncurses_pthreads" = yes
21646then
21647
21648cf_add_libs="-lpthread"
21649# Filter out duplicates - this happens with badly-designed ".pc" files...
21650for cf_add_1lib in $LIBS
21651do
21652	for cf_add_2lib in $cf_add_libs
21653	do
21654		if test "x$cf_add_1lib" = "x$cf_add_2lib"
21655		then
21656			cf_add_1lib=
21657			break
21658		fi
21659	done
21660	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21661done
21662LIBS="$cf_add_libs"
21663
21664fi
21665
21666echo "$as_me:21666: checking if curses supports wide characters" >&5
21667echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
21668if test "${cf_cv_widec_curses+set}" = set; then
21669  echo $ECHO_N "(cached) $ECHO_C" >&6
21670else
21671
21672cat >conftest.$ac_ext <<_ACEOF
21673#line 21673 "configure"
21674#include "confdefs.h"
21675
21676#include <stdlib.h>
21677#include <${cf_cv_ncurses_header:-curses.h}>
21678int
21679main (void)
21680{
21681
21682    wchar_t temp[2];
21683    wchar_t wch = 'A';
21684    temp[0] = wch;
21685    waddnwstr(stdscr, temp, 1);
21686
21687  ;
21688  return 0;
21689}
21690_ACEOF
21691rm -f conftest.$ac_objext conftest$ac_exeext
21692if { (eval echo "$as_me:21692: \"$ac_link\"") >&5
21693  (eval $ac_link) 2>&5
21694  ac_status=$?
21695  echo "$as_me:21695: \$? = $ac_status" >&5
21696  (exit $ac_status); } &&
21697         { ac_try='test -s conftest$ac_exeext'
21698  { (eval echo "$as_me:21698: \"$ac_try\"") >&5
21699  (eval $ac_try) 2>&5
21700  ac_status=$?
21701  echo "$as_me:21701: \$? = $ac_status" >&5
21702  (exit $ac_status); }; }; then
21703  cf_cv_widec_curses=yes
21704else
21705  echo "$as_me: failed program was:" >&5
21706cat conftest.$ac_ext >&5
21707cf_cv_widec_curses=no
21708fi
21709rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21710
21711fi
21712echo "$as_me:21712: result: $cf_cv_widec_curses" >&5
21713echo "${ECHO_T}$cf_cv_widec_curses" >&6
21714
21715if test "$cf_cv_widec_curses" = yes ; then
21716
21717cat >>confdefs.h <<\EOF
21718#define WIDEC_CURSES 1
21719EOF
21720
21721	# This is needed on Tru64 5.0 to declare mbstate_t
21722	echo "$as_me:21722: checking if we must include wchar.h to declare mbstate_t" >&5
21723echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
21724if test "${cf_cv_widec_mbstate+set}" = set; then
21725  echo $ECHO_N "(cached) $ECHO_C" >&6
21726else
21727
21728	cat >conftest.$ac_ext <<_ACEOF
21729#line 21729 "configure"
21730#include "confdefs.h"
21731
21732#include <stdlib.h>
21733#include <${cf_cv_ncurses_header:-curses.h}>
21734int
21735main (void)
21736{
21737mbstate_t state
21738  ;
21739  return 0;
21740}
21741_ACEOF
21742rm -f conftest.$ac_objext
21743if { (eval echo "$as_me:21743: \"$ac_compile\"") >&5
21744  (eval $ac_compile) 2>&5
21745  ac_status=$?
21746  echo "$as_me:21746: \$? = $ac_status" >&5
21747  (exit $ac_status); } &&
21748         { ac_try='test -s conftest.$ac_objext'
21749  { (eval echo "$as_me:21749: \"$ac_try\"") >&5
21750  (eval $ac_try) 2>&5
21751  ac_status=$?
21752  echo "$as_me:21752: \$? = $ac_status" >&5
21753  (exit $ac_status); }; }; then
21754  cf_cv_widec_mbstate=no
21755else
21756  echo "$as_me: failed program was:" >&5
21757cat conftest.$ac_ext >&5
21758cat >conftest.$ac_ext <<_ACEOF
21759#line 21759 "configure"
21760#include "confdefs.h"
21761
21762#include <stdlib.h>
21763#include <wchar.h>
21764#include <${cf_cv_ncurses_header:-curses.h}>
21765int
21766main (void)
21767{
21768mbstate_t state
21769  ;
21770  return 0;
21771}
21772_ACEOF
21773rm -f conftest.$ac_objext
21774if { (eval echo "$as_me:21774: \"$ac_compile\"") >&5
21775  (eval $ac_compile) 2>&5
21776  ac_status=$?
21777  echo "$as_me:21777: \$? = $ac_status" >&5
21778  (exit $ac_status); } &&
21779         { ac_try='test -s conftest.$ac_objext'
21780  { (eval echo "$as_me:21780: \"$ac_try\"") >&5
21781  (eval $ac_try) 2>&5
21782  ac_status=$?
21783  echo "$as_me:21783: \$? = $ac_status" >&5
21784  (exit $ac_status); }; }; then
21785  cf_cv_widec_mbstate=yes
21786else
21787  echo "$as_me: failed program was:" >&5
21788cat conftest.$ac_ext >&5
21789cf_cv_widec_mbstate=unknown
21790fi
21791rm -f conftest.$ac_objext conftest.$ac_ext
21792fi
21793rm -f conftest.$ac_objext conftest.$ac_ext
21794fi
21795echo "$as_me:21795: result: $cf_cv_widec_mbstate" >&5
21796echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
21797
21798if test "$cf_cv_widec_mbstate" = yes ; then
21799
21800cat >>confdefs.h <<\EOF
21801#define NEED_WCHAR_H 1
21802EOF
21803
21804fi
21805
21806if test "$cf_cv_widec_mbstate" != unknown ; then
21807
21808cat >>confdefs.h <<\EOF
21809#define HAVE_MBSTATE_T 1
21810EOF
21811
21812fi
21813
21814fi
21815
21816cf_all_widgets=yes
21817
21818echo "$as_me:21818: checking if you want extra dialogs" >&5
21819echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
21820
21821# Check whether --enable-extras or --disable-extras was given.
21822if test "${enable_extras+set}" = set; then
21823  enableval="$enable_extras"
21824
21825else
21826  enableval=yes
21827fi;
21828echo "$as_me:21828: result: $enableval" >&5
21829echo "${ECHO_T}$enableval" >&6
21830if test "$enableval" != no ; then
21831cf_all_widgets=yes
21832else
21833cf_all_widgets=no
21834fi
21835
21836echo "$as_me:21836: checking if you want config-file support" >&5
21837echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
21838
21839# Check whether --enable-rc-file or --disable-rc-file was given.
21840if test "${enable_rc_file+set}" = set; then
21841  enableval="$enable_rc_file"
21842
21843else
21844  enableval=$cf_all_widgets
21845fi;
21846echo "$as_me:21846: result: $enableval" >&5
21847echo "${ECHO_T}$enableval" >&6
21848if test "$enableval" != no ; then
21849EXTRAOBJS="$EXTRAOBJS rc\$o"
21850
21851cat >>confdefs.h <<\EOF
21852#define HAVE_RC_FILE 1
21853EOF
21854
21855else
21856	:
21857fi
21858
21859echo "$as_me:21859: checking if you want Xdialog-style dialogs" >&5
21860echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
21861
21862# Check whether --enable-Xdialog or --disable-Xdialog was given.
21863if test "${enable_Xdialog+set}" = set; then
21864  enableval="$enable_Xdialog"
21865
21866else
21867  enableval=$cf_all_widgets
21868fi;
21869echo "$as_me:21869: result: $enableval" >&5
21870echo "${ECHO_T}$enableval" >&6
21871if test "$enableval" != no ; then
21872EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
21873
21874cat >>confdefs.h <<\EOF
21875#define HAVE_XDIALOG 1
21876EOF
21877
21878else
21879	:
21880fi
21881
21882echo "$as_me:21882: checking if you want extra Xdialog-style dialogs (1.2)" >&5
21883echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
21884
21885# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
21886if test "${enable_Xdialog2+set}" = set; then
21887  enableval="$enable_Xdialog2"
21888
21889else
21890  enableval=$cf_all_widgets
21891fi;
21892echo "$as_me:21892: result: $enableval" >&5
21893echo "${ECHO_T}$enableval" >&6
21894if test "$enableval" != no ; then
21895EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
21896
21897cat >>confdefs.h <<\EOF
21898#define HAVE_XDIALOG2 1
21899EOF
21900
21901else
21902	:
21903fi
21904
21905echo "$as_me:21905: checking if you want compatibility with whiptail options" >&5
21906echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
21907
21908# Check whether --enable-whiptail or --disable-whiptail was given.
21909if test "${enable_whiptail+set}" = set; then
21910  enableval="$enable_whiptail"
21911
21912else
21913  enableval=$cf_all_widgets
21914fi;
21915echo "$as_me:21915: result: $enableval" >&5
21916echo "${ECHO_T}$enableval" >&6
21917if test "$enableval" != no ; then
21918
21919cat >>confdefs.h <<\EOF
21920#define HAVE_WHIPTAIL 1
21921EOF
21922
21923else
21924	:
21925fi
21926
21927echo "$as_me:21927: checking if you want the form dialog" >&5
21928echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
21929
21930# Check whether --enable-form or --disable-form was given.
21931if test "${enable_form+set}" = set; then
21932  enableval="$enable_form"
21933
21934else
21935  enableval=$cf_all_widgets
21936fi;
21937echo "$as_me:21937: result: $enableval" >&5
21938echo "${ECHO_T}$enableval" >&6
21939if test "$enableval" != no ; then
21940EXTRAOBJS="$EXTRAOBJS formbox\$o"
21941
21942cat >>confdefs.h <<\EOF
21943#define HAVE_DLG_FORMBOX 1
21944EOF
21945
21946else
21947	:
21948fi
21949
21950echo "$as_me:21950: checking if you want the gauge dialog" >&5
21951echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
21952
21953# Check whether --enable-gauge or --disable-gauge was given.
21954if test "${enable_gauge+set}" = set; then
21955  enableval="$enable_gauge"
21956
21957else
21958  enableval=$cf_all_widgets
21959fi;
21960echo "$as_me:21960: result: $enableval" >&5
21961echo "${ECHO_T}$enableval" >&6
21962if test "$enableval" != no ; then
21963EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
21964
21965cat >>confdefs.h <<\EOF
21966#define HAVE_DLG_GAUGE 1
21967EOF
21968
21969else
21970	:
21971fi
21972
21973echo "$as_me:21973: checking if you want the tailbox dialog" >&5
21974echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
21975
21976# Check whether --enable-tailbox or --disable-tailbox was given.
21977if test "${enable_tailbox+set}" = set; then
21978  enableval="$enable_tailbox"
21979
21980else
21981  enableval=$cf_all_widgets
21982fi;
21983echo "$as_me:21983: result: $enableval" >&5
21984echo "${ECHO_T}$enableval" >&6
21985if test "$enableval" != no ; then
21986EXTRAOBJS="$EXTRAOBJS tailbox\$o"
21987
21988cat >>confdefs.h <<\EOF
21989#define HAVE_DLG_TAILBOX 1
21990EOF
21991
21992else
21993	:
21994fi
21995
21996echo "$as_me:21996: checking if you want the mixedform dialog" >&5
21997echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
21998
21999# Check whether --enable-mixedform or --disable-mixedform was given.
22000if test "${enable_mixedform+set}" = set; then
22001  enableval="$enable_mixedform"
22002
22003else
22004  enableval=${enable_form:=$cf_all_widgets}
22005fi;
22006echo "$as_me:22006: result: $enableval" >&5
22007echo "${ECHO_T}$enableval" >&6
22008if test "$enableval" != no ; then
22009EXTRAOBJS="$EXTRAOBJS mixedform\$o"
22010
22011cat >>confdefs.h <<\EOF
22012#define HAVE_DLG_MIXEDFORM 1
22013EOF
22014
22015else
22016	:
22017fi
22018
22019echo "$as_me:22019: checking if you want the mixedgauge dialog" >&5
22020echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
22021
22022# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
22023if test "${enable_mixedgauge+set}" = set; then
22024  enableval="$enable_mixedgauge"
22025
22026else
22027  enableval=$cf_all_widgets
22028fi;
22029echo "$as_me:22029: result: $enableval" >&5
22030echo "${ECHO_T}$enableval" >&6
22031if test "$enableval" != no ; then
22032EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
22033
22034cat >>confdefs.h <<\EOF
22035#define HAVE_MIXEDGAUGE 1
22036EOF
22037
22038else
22039	:
22040fi
22041
22042echo "$as_me:22042: checking if you want the wide-curses features" >&5
22043echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
22044
22045# Check whether --enable-widec or --disable-widec was given.
22046if test "${enable_widec+set}" = set; then
22047  enableval="$enable_widec"
22048
22049else
22050  enableval=$cf_cv_widec_curses
22051fi;
22052echo "$as_me:22052: result: $enableval" >&5
22053echo "${ECHO_T}$enableval" >&6
22054if test "$enableval" != no ; then
22055
22056cat >>confdefs.h <<\EOF
22057#define USE_WIDE_CURSES 1
22058EOF
22059
22060else
22061	:
22062fi
22063
22064echo "$as_me:22064: checking for ANSI C header files" >&5
22065echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
22066if test "${ac_cv_header_stdc+set}" = set; then
22067  echo $ECHO_N "(cached) $ECHO_C" >&6
22068else
22069  cat >conftest.$ac_ext <<_ACEOF
22070#line 22070 "configure"
22071#include "confdefs.h"
22072#include <stdlib.h>
22073#include <stdarg.h>
22074#include <string.h>
22075#include <float.h>
22076
22077_ACEOF
22078if { (eval echo "$as_me:22078: \"$ac_cpp conftest.$ac_ext\"") >&5
22079  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22080  ac_status=$?
22081  egrep -v '^ *\+' conftest.er1 >conftest.err
22082  rm -f conftest.er1
22083  cat conftest.err >&5
22084  echo "$as_me:22084: \$? = $ac_status" >&5
22085  (exit $ac_status); } >/dev/null; then
22086  if test -s conftest.err; then
22087    ac_cpp_err=$ac_c_preproc_warn_flag
22088  else
22089    ac_cpp_err=
22090  fi
22091else
22092  ac_cpp_err=yes
22093fi
22094if test -z "$ac_cpp_err"; then
22095  ac_cv_header_stdc=yes
22096else
22097  echo "$as_me: failed program was:" >&5
22098  cat conftest.$ac_ext >&5
22099  ac_cv_header_stdc=no
22100fi
22101rm -f conftest.err conftest.$ac_ext
22102
22103if test $ac_cv_header_stdc = yes; then
22104  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22105  cat >conftest.$ac_ext <<_ACEOF
22106#line 22106 "configure"
22107#include "confdefs.h"
22108#include <string.h>
22109
22110_ACEOF
22111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22112  egrep "memchr" >/dev/null 2>&1; then
22113  :
22114else
22115  ac_cv_header_stdc=no
22116fi
22117rm -rf conftest*
22118
22119fi
22120
22121if test $ac_cv_header_stdc = yes; then
22122  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22123  cat >conftest.$ac_ext <<_ACEOF
22124#line 22124 "configure"
22125#include "confdefs.h"
22126#include <stdlib.h>
22127
22128_ACEOF
22129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22130  egrep "free" >/dev/null 2>&1; then
22131  :
22132else
22133  ac_cv_header_stdc=no
22134fi
22135rm -rf conftest*
22136
22137fi
22138
22139if test $ac_cv_header_stdc = yes; then
22140  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22141  if test "$cross_compiling" = yes; then
22142  :
22143else
22144  cat >conftest.$ac_ext <<_ACEOF
22145#line 22145 "configure"
22146#include "confdefs.h"
22147#include <ctype.h>
22148#if ((' ' & 0x0FF) == 0x020)
22149# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22150# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22151#else
22152# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22153                     || ('j' <= (c) && (c) <= 'r') \
22154                     || ('s' <= (c) && (c) <= 'z'))
22155# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22156#endif
22157
22158#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22159int
22160main (void)
22161{
22162  int i;
22163  for (i = 0; i < 256; i++)
22164    if (XOR (islower (i), ISLOWER (i))
22165        || toupper (i) != TOUPPER (i))
22166      $ac_main_return(2);
22167  $ac_main_return (0);
22168}
22169_ACEOF
22170rm -f conftest$ac_exeext
22171if { (eval echo "$as_me:22171: \"$ac_link\"") >&5
22172  (eval $ac_link) 2>&5
22173  ac_status=$?
22174  echo "$as_me:22174: \$? = $ac_status" >&5
22175  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22176  { (eval echo "$as_me:22176: \"$ac_try\"") >&5
22177  (eval $ac_try) 2>&5
22178  ac_status=$?
22179  echo "$as_me:22179: \$? = $ac_status" >&5
22180  (exit $ac_status); }; }; then
22181  :
22182else
22183  echo "$as_me: program exited with status $ac_status" >&5
22184echo "$as_me: failed program was:" >&5
22185cat conftest.$ac_ext >&5
22186ac_cv_header_stdc=no
22187fi
22188rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22189fi
22190fi
22191fi
22192echo "$as_me:22192: result: $ac_cv_header_stdc" >&5
22193echo "${ECHO_T}$ac_cv_header_stdc" >&6
22194if test $ac_cv_header_stdc = yes; then
22195
22196cat >>confdefs.h <<\EOF
22197#define STDC_HEADERS 1
22198EOF
22199
22200fi
22201
22202echo "$as_me:22202: checking whether time.h and sys/time.h may both be included" >&5
22203echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
22204if test "${ac_cv_header_time+set}" = set; then
22205  echo $ECHO_N "(cached) $ECHO_C" >&6
22206else
22207  cat >conftest.$ac_ext <<_ACEOF
22208#line 22208 "configure"
22209#include "confdefs.h"
22210#include <sys/types.h>
22211#include <sys/time.h>
22212#include <time.h>
22213
22214int
22215main (void)
22216{
22217if ((struct tm *) 0)
22218return 0;
22219  ;
22220  return 0;
22221}
22222_ACEOF
22223rm -f conftest.$ac_objext
22224if { (eval echo "$as_me:22224: \"$ac_compile\"") >&5
22225  (eval $ac_compile) 2>&5
22226  ac_status=$?
22227  echo "$as_me:22227: \$? = $ac_status" >&5
22228  (exit $ac_status); } &&
22229         { ac_try='test -s conftest.$ac_objext'
22230  { (eval echo "$as_me:22230: \"$ac_try\"") >&5
22231  (eval $ac_try) 2>&5
22232  ac_status=$?
22233  echo "$as_me:22233: \$? = $ac_status" >&5
22234  (exit $ac_status); }; }; then
22235  ac_cv_header_time=yes
22236else
22237  echo "$as_me: failed program was:" >&5
22238cat conftest.$ac_ext >&5
22239ac_cv_header_time=no
22240fi
22241rm -f conftest.$ac_objext conftest.$ac_ext
22242fi
22243echo "$as_me:22243: result: $ac_cv_header_time" >&5
22244echo "${ECHO_T}$ac_cv_header_time" >&6
22245if test $ac_cv_header_time = yes; then
22246
22247cat >>confdefs.h <<\EOF
22248#define TIME_WITH_SYS_TIME 1
22249EOF
22250
22251fi
22252
22253ac_header_dirent=no
22254for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22255  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22256echo "$as_me:22256: checking for $ac_hdr that defines DIR" >&5
22257echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
22258if eval "test \"\${$as_ac_Header+set}\" = set"; then
22259  echo $ECHO_N "(cached) $ECHO_C" >&6
22260else
22261  cat >conftest.$ac_ext <<_ACEOF
22262#line 22262 "configure"
22263#include "confdefs.h"
22264#include <sys/types.h>
22265#include <$ac_hdr>
22266
22267int
22268main (void)
22269{
22270if ((DIR *) 0)
22271return 0;
22272  ;
22273  return 0;
22274}
22275_ACEOF
22276rm -f conftest.$ac_objext
22277if { (eval echo "$as_me:22277: \"$ac_compile\"") >&5
22278  (eval $ac_compile) 2>&5
22279  ac_status=$?
22280  echo "$as_me:22280: \$? = $ac_status" >&5
22281  (exit $ac_status); } &&
22282         { ac_try='test -s conftest.$ac_objext'
22283  { (eval echo "$as_me:22283: \"$ac_try\"") >&5
22284  (eval $ac_try) 2>&5
22285  ac_status=$?
22286  echo "$as_me:22286: \$? = $ac_status" >&5
22287  (exit $ac_status); }; }; then
22288  eval "$as_ac_Header=yes"
22289else
22290  echo "$as_me: failed program was:" >&5
22291cat conftest.$ac_ext >&5
22292eval "$as_ac_Header=no"
22293fi
22294rm -f conftest.$ac_objext conftest.$ac_ext
22295fi
22296echo "$as_me:22296: result: `eval echo '${'$as_ac_Header'}'`" >&5
22297echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22298if test `eval echo '${'$as_ac_Header'}'` = yes; then
22299  cat >>confdefs.h <<EOF
22300#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22301EOF
22302
22303ac_header_dirent=$ac_hdr; break
22304fi
22305
22306done
22307# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22308if test $ac_header_dirent = dirent.h; then
22309  echo "$as_me:22309: checking for opendir in -ldir" >&5
22310echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
22311if test "${ac_cv_lib_dir_opendir+set}" = set; then
22312  echo $ECHO_N "(cached) $ECHO_C" >&6
22313else
22314  ac_check_lib_save_LIBS=$LIBS
22315LIBS="-ldir  $LIBS"
22316cat >conftest.$ac_ext <<_ACEOF
22317#line 22317 "configure"
22318#include "confdefs.h"
22319
22320/* Override any gcc2 internal prototype to avoid an error.  */
22321#ifdef __cplusplus
22322extern "C"
22323#endif
22324/* We use char because int might match the return type of a gcc2
22325   builtin and then its argument prototype would still apply.  */
22326char opendir ();
22327int
22328main (void)
22329{
22330opendir ();
22331  ;
22332  return 0;
22333}
22334_ACEOF
22335rm -f conftest.$ac_objext conftest$ac_exeext
22336if { (eval echo "$as_me:22336: \"$ac_link\"") >&5
22337  (eval $ac_link) 2>&5
22338  ac_status=$?
22339  echo "$as_me:22339: \$? = $ac_status" >&5
22340  (exit $ac_status); } &&
22341         { ac_try='test -s conftest$ac_exeext'
22342  { (eval echo "$as_me:22342: \"$ac_try\"") >&5
22343  (eval $ac_try) 2>&5
22344  ac_status=$?
22345  echo "$as_me:22345: \$? = $ac_status" >&5
22346  (exit $ac_status); }; }; then
22347  ac_cv_lib_dir_opendir=yes
22348else
22349  echo "$as_me: failed program was:" >&5
22350cat conftest.$ac_ext >&5
22351ac_cv_lib_dir_opendir=no
22352fi
22353rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22354LIBS=$ac_check_lib_save_LIBS
22355fi
22356echo "$as_me:22356: result: $ac_cv_lib_dir_opendir" >&5
22357echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
22358if test $ac_cv_lib_dir_opendir = yes; then
22359  LIBS="$LIBS -ldir"
22360fi
22361
22362else
22363  echo "$as_me:22363: checking for opendir in -lx" >&5
22364echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
22365if test "${ac_cv_lib_x_opendir+set}" = set; then
22366  echo $ECHO_N "(cached) $ECHO_C" >&6
22367else
22368  ac_check_lib_save_LIBS=$LIBS
22369LIBS="-lx  $LIBS"
22370cat >conftest.$ac_ext <<_ACEOF
22371#line 22371 "configure"
22372#include "confdefs.h"
22373
22374/* Override any gcc2 internal prototype to avoid an error.  */
22375#ifdef __cplusplus
22376extern "C"
22377#endif
22378/* We use char because int might match the return type of a gcc2
22379   builtin and then its argument prototype would still apply.  */
22380char opendir ();
22381int
22382main (void)
22383{
22384opendir ();
22385  ;
22386  return 0;
22387}
22388_ACEOF
22389rm -f conftest.$ac_objext conftest$ac_exeext
22390if { (eval echo "$as_me:22390: \"$ac_link\"") >&5
22391  (eval $ac_link) 2>&5
22392  ac_status=$?
22393  echo "$as_me:22393: \$? = $ac_status" >&5
22394  (exit $ac_status); } &&
22395         { ac_try='test -s conftest$ac_exeext'
22396  { (eval echo "$as_me:22396: \"$ac_try\"") >&5
22397  (eval $ac_try) 2>&5
22398  ac_status=$?
22399  echo "$as_me:22399: \$? = $ac_status" >&5
22400  (exit $ac_status); }; }; then
22401  ac_cv_lib_x_opendir=yes
22402else
22403  echo "$as_me: failed program was:" >&5
22404cat conftest.$ac_ext >&5
22405ac_cv_lib_x_opendir=no
22406fi
22407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22408LIBS=$ac_check_lib_save_LIBS
22409fi
22410echo "$as_me:22410: result: $ac_cv_lib_x_opendir" >&5
22411echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
22412if test $ac_cv_lib_x_opendir = yes; then
22413  LIBS="$LIBS -lx"
22414fi
22415
22416fi
22417
22418for ac_header in search.h stdint.h unistd.h
22419do
22420as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22421echo "$as_me:22421: checking for $ac_header" >&5
22422echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22423if eval "test \"\${$as_ac_Header+set}\" = set"; then
22424  echo $ECHO_N "(cached) $ECHO_C" >&6
22425else
22426  cat >conftest.$ac_ext <<_ACEOF
22427#line 22427 "configure"
22428#include "confdefs.h"
22429#include <$ac_header>
22430_ACEOF
22431if { (eval echo "$as_me:22431: \"$ac_cpp conftest.$ac_ext\"") >&5
22432  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22433  ac_status=$?
22434  egrep -v '^ *\+' conftest.er1 >conftest.err
22435  rm -f conftest.er1
22436  cat conftest.err >&5
22437  echo "$as_me:22437: \$? = $ac_status" >&5
22438  (exit $ac_status); } >/dev/null; then
22439  if test -s conftest.err; then
22440    ac_cpp_err=$ac_c_preproc_warn_flag
22441  else
22442    ac_cpp_err=
22443  fi
22444else
22445  ac_cpp_err=yes
22446fi
22447if test -z "$ac_cpp_err"; then
22448  eval "$as_ac_Header=yes"
22449else
22450  echo "$as_me: failed program was:" >&5
22451  cat conftest.$ac_ext >&5
22452  eval "$as_ac_Header=no"
22453fi
22454rm -f conftest.err conftest.$ac_ext
22455fi
22456echo "$as_me:22456: result: `eval echo '${'$as_ac_Header'}'`" >&5
22457echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22458if test `eval echo '${'$as_ac_Header'}'` = yes; then
22459  cat >>confdefs.h <<EOF
22460#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22461EOF
22462
22463fi
22464done
22465
22466echo "$as_me:22466: checking for term.h" >&5
22467echo $ECHO_N "checking for term.h... $ECHO_C" >&6
22468if test "${cf_cv_term_header+set}" = set; then
22469  echo $ECHO_N "(cached) $ECHO_C" >&6
22470else
22471
22472# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
22473# for <term.h> if we do not find the variant.
22474
22475cf_header_list="term.h ncurses/term.h ncursesw/term.h"
22476
22477case ${cf_cv_ncurses_header:-curses.h} in
22478(*/*)
22479	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
22480	cf_header_list="$cf_header_item $cf_header_list"
22481	;;
22482esac
22483
22484for cf_header in $cf_header_list
22485do
22486	cat >conftest.$ac_ext <<_ACEOF
22487#line 22487 "configure"
22488#include "confdefs.h"
22489
22490#include <${cf_cv_ncurses_header:-curses.h}>
22491#include <${cf_header}>
22492int
22493main (void)
22494{
22495WINDOW *x
22496  ;
22497  return 0;
22498}
22499_ACEOF
22500rm -f conftest.$ac_objext
22501if { (eval echo "$as_me:22501: \"$ac_compile\"") >&5
22502  (eval $ac_compile) 2>&5
22503  ac_status=$?
22504  echo "$as_me:22504: \$? = $ac_status" >&5
22505  (exit $ac_status); } &&
22506         { ac_try='test -s conftest.$ac_objext'
22507  { (eval echo "$as_me:22507: \"$ac_try\"") >&5
22508  (eval $ac_try) 2>&5
22509  ac_status=$?
22510  echo "$as_me:22510: \$? = $ac_status" >&5
22511  (exit $ac_status); }; }; then
22512  cf_cv_term_header=$cf_header
22513	 break
22514else
22515  echo "$as_me: failed program was:" >&5
22516cat conftest.$ac_ext >&5
22517cf_cv_term_header=no
22518fi
22519rm -f conftest.$ac_objext conftest.$ac_ext
22520done
22521
22522case $cf_cv_term_header in
22523(no)
22524	# If curses is ncurses, some packagers still mess it up by trying to make
22525	# us use GNU termcap.  This handles the most common case.
22526	for cf_header in ncurses/term.h ncursesw/term.h
22527	do
22528		cat >conftest.$ac_ext <<_ACEOF
22529#line 22529 "configure"
22530#include "confdefs.h"
22531
22532#include <${cf_cv_ncurses_header:-curses.h}>
22533#ifdef NCURSES_VERSION
22534#include <${cf_header}>
22535#else
22536make an error
22537#endif
22538int
22539main (void)
22540{
22541WINDOW *x
22542  ;
22543  return 0;
22544}
22545_ACEOF
22546rm -f conftest.$ac_objext
22547if { (eval echo "$as_me:22547: \"$ac_compile\"") >&5
22548  (eval $ac_compile) 2>&5
22549  ac_status=$?
22550  echo "$as_me:22550: \$? = $ac_status" >&5
22551  (exit $ac_status); } &&
22552         { ac_try='test -s conftest.$ac_objext'
22553  { (eval echo "$as_me:22553: \"$ac_try\"") >&5
22554  (eval $ac_try) 2>&5
22555  ac_status=$?
22556  echo "$as_me:22556: \$? = $ac_status" >&5
22557  (exit $ac_status); }; }; then
22558  cf_cv_term_header=$cf_header
22559			 break
22560else
22561  echo "$as_me: failed program was:" >&5
22562cat conftest.$ac_ext >&5
22563cf_cv_term_header=no
22564fi
22565rm -f conftest.$ac_objext conftest.$ac_ext
22566	done
22567	;;
22568esac
22569
22570fi
22571echo "$as_me:22571: result: $cf_cv_term_header" >&5
22572echo "${ECHO_T}$cf_cv_term_header" >&6
22573
22574case $cf_cv_term_header in
22575(term.h)
22576
22577cat >>confdefs.h <<\EOF
22578#define HAVE_TERM_H 1
22579EOF
22580
22581	;;
22582(ncurses/term.h)
22583
22584cat >>confdefs.h <<\EOF
22585#define HAVE_NCURSES_TERM_H 1
22586EOF
22587
22588	;;
22589(ncursesw/term.h)
22590
22591cat >>confdefs.h <<\EOF
22592#define HAVE_NCURSESW_TERM_H 1
22593EOF
22594
22595	;;
22596esac
22597
22598echo "$as_me:22598: checking return type of signal handlers" >&5
22599echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
22600if test "${ac_cv_type_signal+set}" = set; then
22601  echo $ECHO_N "(cached) $ECHO_C" >&6
22602else
22603  cat >conftest.$ac_ext <<_ACEOF
22604#line 22604 "configure"
22605#include "confdefs.h"
22606#include <sys/types.h>
22607#include <signal.h>
22608#ifdef signal
22609# undef signal
22610#endif
22611#ifdef __cplusplus
22612extern "C" void (*signal (int, void (*)(int)))(int);
22613#else
22614void (*signal ()) ();
22615#endif
22616
22617int
22618main (void)
22619{
22620int i;
22621  ;
22622  return 0;
22623}
22624_ACEOF
22625rm -f conftest.$ac_objext
22626if { (eval echo "$as_me:22626: \"$ac_compile\"") >&5
22627  (eval $ac_compile) 2>&5
22628  ac_status=$?
22629  echo "$as_me:22629: \$? = $ac_status" >&5
22630  (exit $ac_status); } &&
22631         { ac_try='test -s conftest.$ac_objext'
22632  { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633  (eval $ac_try) 2>&5
22634  ac_status=$?
22635  echo "$as_me:22635: \$? = $ac_status" >&5
22636  (exit $ac_status); }; }; then
22637  ac_cv_type_signal=void
22638else
22639  echo "$as_me: failed program was:" >&5
22640cat conftest.$ac_ext >&5
22641ac_cv_type_signal=int
22642fi
22643rm -f conftest.$ac_objext conftest.$ac_ext
22644fi
22645echo "$as_me:22645: result: $ac_cv_type_signal" >&5
22646echo "${ECHO_T}$ac_cv_type_signal" >&6
22647
22648cat >>confdefs.h <<EOF
22649#define RETSIGTYPE $ac_cv_type_signal
22650EOF
22651
22652for ac_func in \
22653_nc_free_and_exit \
22654btowc \
22655mblen \
22656mbrlen \
22657mbrtowc \
22658mbtowc \
22659strcasecmp \
22660strftime \
22661tsearch \
22662waitpid \
22663wcsrtombs \
22664wcstombs \
22665wctob \
22666wctomb \
22667mktime \
22668
22669do
22670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22671echo "$as_me:22671: checking for $ac_func" >&5
22672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22673if eval "test \"\${$as_ac_var+set}\" = set"; then
22674  echo $ECHO_N "(cached) $ECHO_C" >&6
22675else
22676  cat >conftest.$ac_ext <<_ACEOF
22677#line 22677 "configure"
22678#include "confdefs.h"
22679/* System header to define __stub macros and hopefully few prototypes,
22680    which can conflict with char $ac_func (); below.  */
22681#include <assert.h>
22682/* Override any gcc2 internal prototype to avoid an error.  */
22683#ifdef __cplusplus
22684extern "C"
22685#endif
22686/* We use char because int might match the return type of a gcc2
22687   builtin and then its argument prototype would still apply.  */
22688char $ac_func ();
22689char (*f) ();
22690
22691int
22692main (void)
22693{
22694/* The GNU C library defines this for functions which it implements
22695    to always fail with ENOSYS.  Some functions are actually named
22696    something starting with __ and the normal name is an alias.  */
22697#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22698choke me
22699#else
22700f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
22701#endif
22702
22703  ;
22704  return 0;
22705}
22706_ACEOF
22707rm -f conftest.$ac_objext conftest$ac_exeext
22708if { (eval echo "$as_me:22708: \"$ac_link\"") >&5
22709  (eval $ac_link) 2>&5
22710  ac_status=$?
22711  echo "$as_me:22711: \$? = $ac_status" >&5
22712  (exit $ac_status); } &&
22713         { ac_try='test -s conftest$ac_exeext'
22714  { (eval echo "$as_me:22714: \"$ac_try\"") >&5
22715  (eval $ac_try) 2>&5
22716  ac_status=$?
22717  echo "$as_me:22717: \$? = $ac_status" >&5
22718  (exit $ac_status); }; }; then
22719  eval "$as_ac_var=yes"
22720else
22721  echo "$as_me: failed program was:" >&5
22722cat conftest.$ac_ext >&5
22723eval "$as_ac_var=no"
22724fi
22725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22726fi
22727echo "$as_me:22727: result: `eval echo '${'$as_ac_var'}'`" >&5
22728echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22729if test `eval echo '${'$as_ac_var'}'` = yes; then
22730  cat >>confdefs.h <<EOF
22731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22732EOF
22733
22734fi
22735done
22736
22737echo "$as_me:22737: checking definition to turn on extended curses functions" >&5
22738echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
22739if test "${cf_cv_need_xopen_extension+set}" = set; then
22740  echo $ECHO_N "(cached) $ECHO_C" >&6
22741else
22742
22743cf_cv_need_xopen_extension=unknown
22744cat >conftest.$ac_ext <<_ACEOF
22745#line 22745 "configure"
22746#include "confdefs.h"
22747
22748#include <stdlib.h>
22749#include <${cf_cv_ncurses_header:-curses.h}>
22750int
22751main (void)
22752{
22753
22754#if defined(NCURSES_VERSION_PATCH)
22755#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
22756	make an error
22757#endif
22758#endif
22759#ifdef NCURSES_VERSION
22760	cchar_t check;
22761	int check2 = curs_set((int)sizeof(check));
22762#endif
22763	long x = winnstr(stdscr, "", 0);
22764	int x1, y1;
22765	getbegyx(stdscr, y1, x1)
22766  ;
22767  return 0;
22768}
22769_ACEOF
22770rm -f conftest.$ac_objext conftest$ac_exeext
22771if { (eval echo "$as_me:22771: \"$ac_link\"") >&5
22772  (eval $ac_link) 2>&5
22773  ac_status=$?
22774  echo "$as_me:22774: \$? = $ac_status" >&5
22775  (exit $ac_status); } &&
22776         { ac_try='test -s conftest$ac_exeext'
22777  { (eval echo "$as_me:22777: \"$ac_try\"") >&5
22778  (eval $ac_try) 2>&5
22779  ac_status=$?
22780  echo "$as_me:22780: \$? = $ac_status" >&5
22781  (exit $ac_status); }; }; then
22782  cf_cv_need_xopen_extension=none
22783else
22784  echo "$as_me: failed program was:" >&5
22785cat conftest.$ac_ext >&5
22786
22787	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
22788	do
22789		cat >conftest.$ac_ext <<_ACEOF
22790#line 22790 "configure"
22791#include "confdefs.h"
22792
22793#define $cf_try_xopen_extension 1
22794#include <stdlib.h>
22795#include <${cf_cv_ncurses_header:-curses.h}>
22796int
22797main (void)
22798{
22799
22800#ifdef NCURSES_VERSION
22801		cchar_t check;
22802		int check2 = curs_set((int)sizeof(check));
22803#endif
22804		long x = winnstr(stdscr, "", 0);
22805		int x1, y1;
22806		getbegyx(stdscr, y1, x1)
22807  ;
22808  return 0;
22809}
22810_ACEOF
22811rm -f conftest.$ac_objext conftest$ac_exeext
22812if { (eval echo "$as_me:22812: \"$ac_link\"") >&5
22813  (eval $ac_link) 2>&5
22814  ac_status=$?
22815  echo "$as_me:22815: \$? = $ac_status" >&5
22816  (exit $ac_status); } &&
22817         { ac_try='test -s conftest$ac_exeext'
22818  { (eval echo "$as_me:22818: \"$ac_try\"") >&5
22819  (eval $ac_try) 2>&5
22820  ac_status=$?
22821  echo "$as_me:22821: \$? = $ac_status" >&5
22822  (exit $ac_status); }; }; then
22823  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
22824else
22825  echo "$as_me: failed program was:" >&5
22826cat conftest.$ac_ext >&5
22827fi
22828rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22829	done
22830
22831fi
22832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22833
22834fi
22835echo "$as_me:22835: result: $cf_cv_need_xopen_extension" >&5
22836echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
22837
22838case $cf_cv_need_xopen_extension in
22839(*_*)
22840
22841	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22842	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
22843
22844	;;
22845esac
22846
22847echo "$as_me:22847: checking for unctrl.h" >&5
22848echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
22849if test "${cf_cv_unctrl_header+set}" = set; then
22850  echo $ECHO_N "(cached) $ECHO_C" >&6
22851else
22852
22853# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
22854# for <unctrl.h> if we do not find the variant.
22855
22856cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
22857
22858case ${cf_cv_ncurses_header:-curses.h} in
22859(*/*)
22860	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
22861	cf_header_list="$cf_header_item $cf_header_list"
22862	;;
22863esac
22864
22865for cf_header in $cf_header_list
22866do
22867	cat >conftest.$ac_ext <<_ACEOF
22868#line 22868 "configure"
22869#include "confdefs.h"
22870
22871#include <${cf_cv_ncurses_header:-curses.h}>
22872#include <${cf_header}>
22873int
22874main (void)
22875{
22876WINDOW *x
22877  ;
22878  return 0;
22879}
22880_ACEOF
22881rm -f conftest.$ac_objext
22882if { (eval echo "$as_me:22882: \"$ac_compile\"") >&5
22883  (eval $ac_compile) 2>&5
22884  ac_status=$?
22885  echo "$as_me:22885: \$? = $ac_status" >&5
22886  (exit $ac_status); } &&
22887         { ac_try='test -s conftest.$ac_objext'
22888  { (eval echo "$as_me:22888: \"$ac_try\"") >&5
22889  (eval $ac_try) 2>&5
22890  ac_status=$?
22891  echo "$as_me:22891: \$? = $ac_status" >&5
22892  (exit $ac_status); }; }; then
22893  cf_cv_unctrl_header=$cf_header
22894	 break
22895else
22896  echo "$as_me: failed program was:" >&5
22897cat conftest.$ac_ext >&5
22898cf_cv_unctrl_header=no
22899fi
22900rm -f conftest.$ac_objext conftest.$ac_ext
22901done
22902
22903fi
22904echo "$as_me:22904: result: $cf_cv_unctrl_header" >&5
22905echo "${ECHO_T}$cf_cv_unctrl_header" >&6
22906
22907case $cf_cv_unctrl_header in
22908(no)
22909	{ echo "$as_me:22909: WARNING: unctrl.h header not found" >&5
22910echo "$as_me: WARNING: unctrl.h header not found" >&2;}
22911	;;
22912esac
22913
22914case $cf_cv_unctrl_header in
22915(unctrl.h)
22916
22917cat >>confdefs.h <<\EOF
22918#define HAVE_UNCTRL_H 1
22919EOF
22920
22921	;;
22922(ncurses/unctrl.h)
22923
22924cat >>confdefs.h <<\EOF
22925#define HAVE_NCURSES_UNCTRL_H 1
22926EOF
22927
22928	;;
22929(ncursesw/unctrl.h)
22930
22931cat >>confdefs.h <<\EOF
22932#define HAVE_NCURSESW_UNCTRL_H 1
22933EOF
22934
22935	;;
22936esac
22937
22938for cf_func in \
22939flushinp \
22940getattrs \
22941getbegx \
22942getbegy \
22943getbegyx \
22944getcurx \
22945getcury \
22946getmaxx \
22947getmaxy \
22948getmaxyx \
22949getparx \
22950getpary \
22951getparyx \
22952use_default_colors \
22953wchgat \
22954wcursyncup \
22955wget_wch \
22956wsyncup \
22957
22958do
22959
22960cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22961
22962	echo "$as_me:22962: checking for ${cf_func}" >&5
22963echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
22964
22965echo "${as_me:-configure}:22965: testing ${cf_func} ..." 1>&5
22966
22967	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
22968  echo $ECHO_N "(cached) $ECHO_C" >&6
22969else
22970
22971		eval cf_result='$ac_cv_func_'$cf_func
22972		if test ".$cf_result" != ".no"; then
22973			cat >conftest.$ac_ext <<_ACEOF
22974#line 22974 "configure"
22975#include "confdefs.h"
22976
22977#ifdef HAVE_XCURSES
22978#include <xcurses.h>
22979char * XCursesProgramName = "test";
22980#else
22981#include <${cf_cv_ncurses_header:-curses.h}>
22982#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
22983#include <ncursesw/term.h>
22984#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
22985#include <ncurses/term.h>
22986#elif defined(HAVE_TERM_H)
22987#include <term.h>
22988#endif
22989#endif
22990
22991int
22992main (void)
22993{
22994
22995#ifndef ${cf_func}
22996long foo = (long)(&${cf_func});
22997fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
22998if (foo + 1234L > 5678L)
22999	${cf_cv_main_return:-return}(foo != 0);
23000#endif
23001
23002  ;
23003  return 0;
23004}
23005_ACEOF
23006rm -f conftest.$ac_objext conftest$ac_exeext
23007if { (eval echo "$as_me:23007: \"$ac_link\"") >&5
23008  (eval $ac_link) 2>&5
23009  ac_status=$?
23010  echo "$as_me:23010: \$? = $ac_status" >&5
23011  (exit $ac_status); } &&
23012         { ac_try='test -s conftest$ac_exeext'
23013  { (eval echo "$as_me:23013: \"$ac_try\"") >&5
23014  (eval $ac_try) 2>&5
23015  ac_status=$?
23016  echo "$as_me:23016: \$? = $ac_status" >&5
23017  (exit $ac_status); }; }; then
23018  cf_result=yes
23019else
23020  echo "$as_me: failed program was:" >&5
23021cat conftest.$ac_ext >&5
23022cf_result=no
23023fi
23024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23025		fi
23026		eval 'cf_cv_func_'$cf_func'=$cf_result'
23027
23028fi
23029
23030	# use the computed/retrieved cache-value:
23031	eval 'cf_result=$cf_cv_func_'$cf_func
23032	echo "$as_me:23032: result: $cf_result" >&5
23033echo "${ECHO_T}$cf_result" >&6
23034	if test $cf_result != no; then
23035		cat >>confdefs.h <<EOF
23036#define HAVE_${cf_tr_func} 1
23037EOF
23038
23039	fi
23040done
23041
23042echo "$as_me:23042: checking for start_color" >&5
23043echo $ECHO_N "checking for start_color... $ECHO_C" >&6
23044if test "${ac_cv_func_start_color+set}" = set; then
23045  echo $ECHO_N "(cached) $ECHO_C" >&6
23046else
23047  cat >conftest.$ac_ext <<_ACEOF
23048#line 23048 "configure"
23049#include "confdefs.h"
23050/* System header to define __stub macros and hopefully few prototypes,
23051    which can conflict with char start_color (); below.  */
23052#include <assert.h>
23053/* Override any gcc2 internal prototype to avoid an error.  */
23054#ifdef __cplusplus
23055extern "C"
23056#endif
23057/* We use char because int might match the return type of a gcc2
23058   builtin and then its argument prototype would still apply.  */
23059char start_color ();
23060char (*f) ();
23061
23062int
23063main (void)
23064{
23065/* The GNU C library defines this for functions which it implements
23066    to always fail with ENOSYS.  Some functions are actually named
23067    something starting with __ and the normal name is an alias.  */
23068#if defined (__stub_start_color) || defined (__stub___start_color)
23069choke me
23070#else
23071f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
23072#endif
23073
23074  ;
23075  return 0;
23076}
23077_ACEOF
23078rm -f conftest.$ac_objext conftest$ac_exeext
23079if { (eval echo "$as_me:23079: \"$ac_link\"") >&5
23080  (eval $ac_link) 2>&5
23081  ac_status=$?
23082  echo "$as_me:23082: \$? = $ac_status" >&5
23083  (exit $ac_status); } &&
23084         { ac_try='test -s conftest$ac_exeext'
23085  { (eval echo "$as_me:23085: \"$ac_try\"") >&5
23086  (eval $ac_try) 2>&5
23087  ac_status=$?
23088  echo "$as_me:23088: \$? = $ac_status" >&5
23089  (exit $ac_status); }; }; then
23090  ac_cv_func_start_color=yes
23091else
23092  echo "$as_me: failed program was:" >&5
23093cat conftest.$ac_ext >&5
23094ac_cv_func_start_color=no
23095fi
23096rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23097fi
23098echo "$as_me:23098: result: $ac_cv_func_start_color" >&5
23099echo "${ECHO_T}$ac_cv_func_start_color" >&6
23100if test $ac_cv_func_start_color = yes; then
23101
23102cat >>confdefs.h <<\EOF
23103#define HAVE_COLOR 1
23104EOF
23105
23106fi
23107
23108echo "$as_me:23108: checking for chtype typedef" >&5
23109echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
23110if test "${cf_cv_chtype_decl+set}" = set; then
23111  echo $ECHO_N "(cached) $ECHO_C" >&6
23112else
23113
23114	cat >conftest.$ac_ext <<_ACEOF
23115#line 23115 "configure"
23116#include "confdefs.h"
23117#include <${cf_cv_ncurses_header:-curses.h}>
23118int
23119main (void)
23120{
23121chtype foo
23122  ;
23123  return 0;
23124}
23125_ACEOF
23126rm -f conftest.$ac_objext
23127if { (eval echo "$as_me:23127: \"$ac_compile\"") >&5
23128  (eval $ac_compile) 2>&5
23129  ac_status=$?
23130  echo "$as_me:23130: \$? = $ac_status" >&5
23131  (exit $ac_status); } &&
23132         { ac_try='test -s conftest.$ac_objext'
23133  { (eval echo "$as_me:23133: \"$ac_try\"") >&5
23134  (eval $ac_try) 2>&5
23135  ac_status=$?
23136  echo "$as_me:23136: \$? = $ac_status" >&5
23137  (exit $ac_status); }; }; then
23138  cf_cv_chtype_decl=yes
23139else
23140  echo "$as_me: failed program was:" >&5
23141cat conftest.$ac_ext >&5
23142cf_cv_chtype_decl=no
23143fi
23144rm -f conftest.$ac_objext conftest.$ac_ext
23145fi
23146echo "$as_me:23146: result: $cf_cv_chtype_decl" >&5
23147echo "${ECHO_T}$cf_cv_chtype_decl" >&6
23148if test $cf_cv_chtype_decl = yes ; then
23149
23150cat >>confdefs.h <<\EOF
23151#define HAVE_TYPE_CHTYPE 1
23152EOF
23153
23154	echo "$as_me:23154: checking if chtype is scalar or struct" >&5
23155echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
23156if test "${cf_cv_chtype_type+set}" = set; then
23157  echo $ECHO_N "(cached) $ECHO_C" >&6
23158else
23159
23160		cat >conftest.$ac_ext <<_ACEOF
23161#line 23161 "configure"
23162#include "confdefs.h"
23163#include <${cf_cv_ncurses_header:-curses.h}>
23164int
23165main (void)
23166{
23167chtype foo; long x = foo
23168  ;
23169  return 0;
23170}
23171_ACEOF
23172rm -f conftest.$ac_objext
23173if { (eval echo "$as_me:23173: \"$ac_compile\"") >&5
23174  (eval $ac_compile) 2>&5
23175  ac_status=$?
23176  echo "$as_me:23176: \$? = $ac_status" >&5
23177  (exit $ac_status); } &&
23178         { ac_try='test -s conftest.$ac_objext'
23179  { (eval echo "$as_me:23179: \"$ac_try\"") >&5
23180  (eval $ac_try) 2>&5
23181  ac_status=$?
23182  echo "$as_me:23182: \$? = $ac_status" >&5
23183  (exit $ac_status); }; }; then
23184  cf_cv_chtype_type=scalar
23185else
23186  echo "$as_me: failed program was:" >&5
23187cat conftest.$ac_ext >&5
23188cf_cv_chtype_type=struct
23189fi
23190rm -f conftest.$ac_objext conftest.$ac_ext
23191fi
23192echo "$as_me:23192: result: $cf_cv_chtype_type" >&5
23193echo "${ECHO_T}$cf_cv_chtype_type" >&6
23194	if test $cf_cv_chtype_type = scalar ; then
23195
23196cat >>confdefs.h <<\EOF
23197#define TYPE_CHTYPE_IS_SCALAR 1
23198EOF
23199
23200	fi
23201fi
23202
23203echo "$as_me:23203: checking for wide alternate character set array" >&5
23204echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
23205if test "${cf_cv_curses_wacs_map+set}" = set; then
23206  echo $ECHO_N "(cached) $ECHO_C" >&6
23207else
23208
23209	cf_cv_curses_wacs_map=unknown
23210	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
23211	do
23212	cat >conftest.$ac_ext <<_ACEOF
23213#line 23213 "configure"
23214#include "confdefs.h"
23215
23216#ifndef _XOPEN_SOURCE_EXTENDED
23217#define _XOPEN_SOURCE_EXTENDED
23218#endif
23219#include <${cf_cv_ncurses_header:-curses.h}>
23220int
23221main (void)
23222{
23223void *foo = &($name['k'])
23224  ;
23225  return 0;
23226}
23227_ACEOF
23228rm -f conftest.$ac_objext conftest$ac_exeext
23229if { (eval echo "$as_me:23229: \"$ac_link\"") >&5
23230  (eval $ac_link) 2>&5
23231  ac_status=$?
23232  echo "$as_me:23232: \$? = $ac_status" >&5
23233  (exit $ac_status); } &&
23234         { ac_try='test -s conftest$ac_exeext'
23235  { (eval echo "$as_me:23235: \"$ac_try\"") >&5
23236  (eval $ac_try) 2>&5
23237  ac_status=$?
23238  echo "$as_me:23238: \$? = $ac_status" >&5
23239  (exit $ac_status); }; }; then
23240  cf_cv_curses_wacs_map=$name
23241	 break
23242else
23243  echo "$as_me: failed program was:" >&5
23244cat conftest.$ac_ext >&5
23245fi
23246rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23247	done
23248fi
23249echo "$as_me:23249: result: $cf_cv_curses_wacs_map" >&5
23250echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
23251
23252test "$cf_cv_curses_wacs_map" != unknown &&
23253cat >>confdefs.h <<EOF
23254#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
23255EOF
23256
23257echo "$as_me:23257: checking for wide alternate character constants" >&5
23258echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
23259if test "${cf_cv_curses_wacs_symbols+set}" = set; then
23260  echo $ECHO_N "(cached) $ECHO_C" >&6
23261else
23262
23263cf_cv_curses_wacs_symbols=no
23264if test "$cf_cv_curses_wacs_map" != unknown
23265then
23266	cat >conftest.$ac_ext <<_ACEOF
23267#line 23267 "configure"
23268#include "confdefs.h"
23269
23270#ifndef _XOPEN_SOURCE_EXTENDED
23271#define _XOPEN_SOURCE_EXTENDED
23272#endif
23273#include <${cf_cv_ncurses_header:-curses.h}>
23274int
23275main (void)
23276{
23277cchar_t *foo = WACS_PLUS;
23278	 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
23279  ;
23280  return 0;
23281}
23282_ACEOF
23283rm -f conftest.$ac_objext conftest$ac_exeext
23284if { (eval echo "$as_me:23284: \"$ac_link\"") >&5
23285  (eval $ac_link) 2>&5
23286  ac_status=$?
23287  echo "$as_me:23287: \$? = $ac_status" >&5
23288  (exit $ac_status); } &&
23289         { ac_try='test -s conftest$ac_exeext'
23290  { (eval echo "$as_me:23290: \"$ac_try\"") >&5
23291  (eval $ac_try) 2>&5
23292  ac_status=$?
23293  echo "$as_me:23293: \$? = $ac_status" >&5
23294  (exit $ac_status); }; }; then
23295  cf_cv_curses_wacs_symbols=yes
23296else
23297  echo "$as_me: failed program was:" >&5
23298cat conftest.$ac_ext >&5
23299fi
23300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23301else
23302	cat >conftest.$ac_ext <<_ACEOF
23303#line 23303 "configure"
23304#include "confdefs.h"
23305
23306#ifndef _XOPEN_SOURCE_EXTENDED
23307#define _XOPEN_SOURCE_EXTENDED
23308#endif
23309#include <${cf_cv_ncurses_header:-curses.h}>
23310int
23311main (void)
23312{
23313cchar_t *foo = WACS_PLUS
23314  ;
23315  return 0;
23316}
23317_ACEOF
23318rm -f conftest.$ac_objext conftest$ac_exeext
23319if { (eval echo "$as_me:23319: \"$ac_link\"") >&5
23320  (eval $ac_link) 2>&5
23321  ac_status=$?
23322  echo "$as_me:23322: \$? = $ac_status" >&5
23323  (exit $ac_status); } &&
23324         { ac_try='test -s conftest$ac_exeext'
23325  { (eval echo "$as_me:23325: \"$ac_try\"") >&5
23326  (eval $ac_try) 2>&5
23327  ac_status=$?
23328  echo "$as_me:23328: \$? = $ac_status" >&5
23329  (exit $ac_status); }; }; then
23330  cf_cv_curses_wacs_symbols=yes
23331else
23332  echo "$as_me: failed program was:" >&5
23333cat conftest.$ac_ext >&5
23334fi
23335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23336fi
23337
23338fi
23339echo "$as_me:23339: result: $cf_cv_curses_wacs_symbols" >&5
23340echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
23341
23342test "$cf_cv_curses_wacs_symbols" != no &&
23343cat >>confdefs.h <<\EOF
23344#define CURSES_WACS_SYMBOLS 1
23345EOF
23346
23347for cf_func in wgetparent
23348do
23349
23350cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23351
23352	echo "$as_me:23352: checking for ${cf_func}" >&5
23353echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
23354
23355echo "${as_me:-configure}:23355: testing ${cf_func} ..." 1>&5
23356
23357	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
23358  echo $ECHO_N "(cached) $ECHO_C" >&6
23359else
23360
23361		eval cf_result='$ac_cv_func_'$cf_func
23362		if test ".$cf_result" != ".no"; then
23363			cat >conftest.$ac_ext <<_ACEOF
23364#line 23364 "configure"
23365#include "confdefs.h"
23366
23367#ifdef HAVE_XCURSES
23368#include <xcurses.h>
23369char * XCursesProgramName = "test";
23370#else
23371#include <${cf_cv_ncurses_header:-curses.h}>
23372#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
23373#include <ncursesw/term.h>
23374#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
23375#include <ncurses/term.h>
23376#elif defined(HAVE_TERM_H)
23377#include <term.h>
23378#endif
23379#endif
23380
23381int
23382main (void)
23383{
23384
23385#ifndef ${cf_func}
23386long foo = (long)(&${cf_func});
23387fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
23388if (foo + 1234L > 5678L)
23389	${cf_cv_main_return:-return}(foo != 0);
23390#endif
23391
23392  ;
23393  return 0;
23394}
23395_ACEOF
23396rm -f conftest.$ac_objext conftest$ac_exeext
23397if { (eval echo "$as_me:23397: \"$ac_link\"") >&5
23398  (eval $ac_link) 2>&5
23399  ac_status=$?
23400  echo "$as_me:23400: \$? = $ac_status" >&5
23401  (exit $ac_status); } &&
23402         { ac_try='test -s conftest$ac_exeext'
23403  { (eval echo "$as_me:23403: \"$ac_try\"") >&5
23404  (eval $ac_try) 2>&5
23405  ac_status=$?
23406  echo "$as_me:23406: \$? = $ac_status" >&5
23407  (exit $ac_status); }; }; then
23408  cf_result=yes
23409else
23410  echo "$as_me: failed program was:" >&5
23411cat conftest.$ac_ext >&5
23412cf_result=no
23413fi
23414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23415		fi
23416		eval 'cf_cv_func_'$cf_func'=$cf_result'
23417
23418fi
23419
23420	# use the computed/retrieved cache-value:
23421	eval 'cf_result=$cf_cv_func_'$cf_func
23422	echo "$as_me:23422: result: $cf_result" >&5
23423echo "${ECHO_T}$cf_result" >&6
23424	if test $cf_result != no; then
23425		cat >>confdefs.h <<EOF
23426#define HAVE_${cf_tr_func} 1
23427EOF
23428
23429	fi
23430done
23431
23432if test "x$cf_cv_func_wgetparent" != xyes
23433then
23434	echo "$as_me:23434: checking if WINDOW has _parent member" >&5
23435echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
23436	cat >conftest.$ac_ext <<_ACEOF
23437#line 23437 "configure"
23438#include "confdefs.h"
23439#include <${cf_cv_ncurses_header:-curses.h}>
23440int
23441main (void)
23442{
23443WINDOW *p = stdscr->_parent
23444  ;
23445  return 0;
23446}
23447_ACEOF
23448rm -f conftest.$ac_objext
23449if { (eval echo "$as_me:23449: \"$ac_compile\"") >&5
23450  (eval $ac_compile) 2>&5
23451  ac_status=$?
23452  echo "$as_me:23452: \$? = $ac_status" >&5
23453  (exit $ac_status); } &&
23454         { ac_try='test -s conftest.$ac_objext'
23455  { (eval echo "$as_me:23455: \"$ac_try\"") >&5
23456  (eval $ac_try) 2>&5
23457  ac_status=$?
23458  echo "$as_me:23458: \$? = $ac_status" >&5
23459  (exit $ac_status); }; }; then
23460  cf_window__parent=yes
23461else
23462  echo "$as_me: failed program was:" >&5
23463cat conftest.$ac_ext >&5
23464cf_window__parent=no
23465fi
23466rm -f conftest.$ac_objext conftest.$ac_ext
23467	echo "$as_me:23467: result: $cf_window__parent" >&5
23468echo "${ECHO_T}$cf_window__parent" >&6
23469	if test "$cf_window__parent" = yes
23470	then
23471
23472cat >>confdefs.h <<\EOF
23473#define HAVE_WINDOW__PARENT 1
23474EOF
23475
23476	fi
23477fi
23478
23479for ac_header in sys/wait.h
23480do
23481as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23482echo "$as_me:23482: checking for $ac_header" >&5
23483echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23484if eval "test \"\${$as_ac_Header+set}\" = set"; then
23485  echo $ECHO_N "(cached) $ECHO_C" >&6
23486else
23487  cat >conftest.$ac_ext <<_ACEOF
23488#line 23488 "configure"
23489#include "confdefs.h"
23490#include <$ac_header>
23491_ACEOF
23492if { (eval echo "$as_me:23492: \"$ac_cpp conftest.$ac_ext\"") >&5
23493  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23494  ac_status=$?
23495  egrep -v '^ *\+' conftest.er1 >conftest.err
23496  rm -f conftest.er1
23497  cat conftest.err >&5
23498  echo "$as_me:23498: \$? = $ac_status" >&5
23499  (exit $ac_status); } >/dev/null; then
23500  if test -s conftest.err; then
23501    ac_cpp_err=$ac_c_preproc_warn_flag
23502  else
23503    ac_cpp_err=
23504  fi
23505else
23506  ac_cpp_err=yes
23507fi
23508if test -z "$ac_cpp_err"; then
23509  eval "$as_ac_Header=yes"
23510else
23511  echo "$as_me: failed program was:" >&5
23512  cat conftest.$ac_ext >&5
23513  eval "$as_ac_Header=no"
23514fi
23515rm -f conftest.err conftest.$ac_ext
23516fi
23517echo "$as_me:23517: result: `eval echo '${'$as_ac_Header'}'`" >&5
23518echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23519if test `eval echo '${'$as_ac_Header'}'` = yes; then
23520  cat >>confdefs.h <<EOF
23521#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23522EOF
23523
23524fi
23525done
23526
23527cf_wait_headers="#include <sys/types.h>
23528"
23529if test $ac_cv_header_sys_wait_h = yes; then
23530cf_wait_headers="$cf_wait_headers
23531#include <sys/wait.h>
23532"
23533else
23534
23535for ac_header in wait.h
23536do
23537as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23538echo "$as_me:23538: checking for $ac_header" >&5
23539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23540if eval "test \"\${$as_ac_Header+set}\" = set"; then
23541  echo $ECHO_N "(cached) $ECHO_C" >&6
23542else
23543  cat >conftest.$ac_ext <<_ACEOF
23544#line 23544 "configure"
23545#include "confdefs.h"
23546#include <$ac_header>
23547_ACEOF
23548if { (eval echo "$as_me:23548: \"$ac_cpp conftest.$ac_ext\"") >&5
23549  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23550  ac_status=$?
23551  egrep -v '^ *\+' conftest.er1 >conftest.err
23552  rm -f conftest.er1
23553  cat conftest.err >&5
23554  echo "$as_me:23554: \$? = $ac_status" >&5
23555  (exit $ac_status); } >/dev/null; then
23556  if test -s conftest.err; then
23557    ac_cpp_err=$ac_c_preproc_warn_flag
23558  else
23559    ac_cpp_err=
23560  fi
23561else
23562  ac_cpp_err=yes
23563fi
23564if test -z "$ac_cpp_err"; then
23565  eval "$as_ac_Header=yes"
23566else
23567  echo "$as_me: failed program was:" >&5
23568  cat conftest.$ac_ext >&5
23569  eval "$as_ac_Header=no"
23570fi
23571rm -f conftest.err conftest.$ac_ext
23572fi
23573echo "$as_me:23573: result: `eval echo '${'$as_ac_Header'}'`" >&5
23574echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23575if test `eval echo '${'$as_ac_Header'}'` = yes; then
23576  cat >>confdefs.h <<EOF
23577#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23578EOF
23579
23580fi
23581done
23582
23583for ac_header in waitstatus.h
23584do
23585as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23586echo "$as_me:23586: checking for $ac_header" >&5
23587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23588if eval "test \"\${$as_ac_Header+set}\" = set"; then
23589  echo $ECHO_N "(cached) $ECHO_C" >&6
23590else
23591  cat >conftest.$ac_ext <<_ACEOF
23592#line 23592 "configure"
23593#include "confdefs.h"
23594#include <$ac_header>
23595_ACEOF
23596if { (eval echo "$as_me:23596: \"$ac_cpp conftest.$ac_ext\"") >&5
23597  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23598  ac_status=$?
23599  egrep -v '^ *\+' conftest.er1 >conftest.err
23600  rm -f conftest.er1
23601  cat conftest.err >&5
23602  echo "$as_me:23602: \$? = $ac_status" >&5
23603  (exit $ac_status); } >/dev/null; then
23604  if test -s conftest.err; then
23605    ac_cpp_err=$ac_c_preproc_warn_flag
23606  else
23607    ac_cpp_err=
23608  fi
23609else
23610  ac_cpp_err=yes
23611fi
23612if test -z "$ac_cpp_err"; then
23613  eval "$as_ac_Header=yes"
23614else
23615  echo "$as_me: failed program was:" >&5
23616  cat conftest.$ac_ext >&5
23617  eval "$as_ac_Header=no"
23618fi
23619rm -f conftest.err conftest.$ac_ext
23620fi
23621echo "$as_me:23621: result: `eval echo '${'$as_ac_Header'}'`" >&5
23622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23623if test `eval echo '${'$as_ac_Header'}'` = yes; then
23624  cat >>confdefs.h <<EOF
23625#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23626EOF
23627
23628fi
23629done
23630
23631if test $ac_cv_header_wait_h = yes; then
23632cf_wait_headers="$cf_wait_headers
23633#include <wait.h>
23634"
23635fi
23636if test $ac_cv_header_waitstatus_h = yes; then
23637cf_wait_headers="$cf_wait_headers
23638#include <waitstatus.h>
23639"
23640fi
23641fi
23642
23643echo "$as_me:23643: checking for union wait" >&5
23644echo $ECHO_N "checking for union wait... $ECHO_C" >&6
23645if test "${cf_cv_type_unionwait+set}" = set; then
23646  echo $ECHO_N "(cached) $ECHO_C" >&6
23647else
23648
23649	cat >conftest.$ac_ext <<_ACEOF
23650#line 23650 "configure"
23651#include "confdefs.h"
23652$cf_wait_headers
23653int
23654main (void)
23655{
23656int x;
23657	 int y = WEXITSTATUS(x);
23658	 int z = WTERMSIG(x);
23659	 wait(&x);
23660
23661  ;
23662  return 0;
23663}
23664_ACEOF
23665rm -f conftest.$ac_objext conftest$ac_exeext
23666if { (eval echo "$as_me:23666: \"$ac_link\"") >&5
23667  (eval $ac_link) 2>&5
23668  ac_status=$?
23669  echo "$as_me:23669: \$? = $ac_status" >&5
23670  (exit $ac_status); } &&
23671         { ac_try='test -s conftest$ac_exeext'
23672  { (eval echo "$as_me:23672: \"$ac_try\"") >&5
23673  (eval $ac_try) 2>&5
23674  ac_status=$?
23675  echo "$as_me:23675: \$? = $ac_status" >&5
23676  (exit $ac_status); }; }; then
23677  cf_cv_type_unionwait=no
23678	 echo compiles ok w/o union wait 1>&5
23679
23680else
23681  echo "$as_me: failed program was:" >&5
23682cat conftest.$ac_ext >&5
23683
23684	cat >conftest.$ac_ext <<_ACEOF
23685#line 23685 "configure"
23686#include "confdefs.h"
23687$cf_wait_headers
23688int
23689main (void)
23690{
23691union wait x;
23692#ifdef WEXITSTATUS
23693	 int y = WEXITSTATUS(x);
23694#endif
23695#ifdef WTERMSIG
23696	 int z = WTERMSIG(x);
23697#endif
23698	 wait(&x);
23699
23700  ;
23701  return 0;
23702}
23703_ACEOF
23704rm -f conftest.$ac_objext conftest$ac_exeext
23705if { (eval echo "$as_me:23705: \"$ac_link\"") >&5
23706  (eval $ac_link) 2>&5
23707  ac_status=$?
23708  echo "$as_me:23708: \$? = $ac_status" >&5
23709  (exit $ac_status); } &&
23710         { ac_try='test -s conftest$ac_exeext'
23711  { (eval echo "$as_me:23711: \"$ac_try\"") >&5
23712  (eval $ac_try) 2>&5
23713  ac_status=$?
23714  echo "$as_me:23714: \$? = $ac_status" >&5
23715  (exit $ac_status); }; }; then
23716  cf_cv_type_unionwait=yes
23717	 echo compiles ok with union wait and possibly macros too 1>&5
23718
23719else
23720  echo "$as_me: failed program was:" >&5
23721cat conftest.$ac_ext >&5
23722cf_cv_type_unionwait=no
23723fi
23724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23725fi
23726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23727fi
23728
23729echo "$as_me:23729: result: $cf_cv_type_unionwait" >&5
23730echo "${ECHO_T}$cf_cv_type_unionwait" >&6
23731test $cf_cv_type_unionwait = yes &&
23732cat >>confdefs.h <<\EOF
23733#define HAVE_TYPE_UNIONWAIT 1
23734EOF
23735
23736if test $cf_cv_type_unionwait = yes; then
23737
23738	echo "$as_me:23738: checking if union wait can be used as wait-arg" >&5
23739echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
23740	if test "${cf_cv_arg_union_wait+set}" = set; then
23741  echo $ECHO_N "(cached) $ECHO_C" >&6
23742else
23743
23744		cat >conftest.$ac_ext <<_ACEOF
23745#line 23745 "configure"
23746#include "confdefs.h"
23747$cf_wait_headers
23748int
23749main (void)
23750{
23751union wait x; wait(&x)
23752  ;
23753  return 0;
23754}
23755_ACEOF
23756rm -f conftest.$ac_objext
23757if { (eval echo "$as_me:23757: \"$ac_compile\"") >&5
23758  (eval $ac_compile) 2>&5
23759  ac_status=$?
23760  echo "$as_me:23760: \$? = $ac_status" >&5
23761  (exit $ac_status); } &&
23762         { ac_try='test -s conftest.$ac_objext'
23763  { (eval echo "$as_me:23763: \"$ac_try\"") >&5
23764  (eval $ac_try) 2>&5
23765  ac_status=$?
23766  echo "$as_me:23766: \$? = $ac_status" >&5
23767  (exit $ac_status); }; }; then
23768  cf_cv_arg_union_wait=yes
23769else
23770  echo "$as_me: failed program was:" >&5
23771cat conftest.$ac_ext >&5
23772cf_cv_arg_union_wait=no
23773fi
23774rm -f conftest.$ac_objext conftest.$ac_ext
23775
23776fi
23777
23778	echo "$as_me:23778: result: $cf_cv_arg_union_wait" >&5
23779echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
23780	test $cf_cv_arg_union_wait = yes &&
23781cat >>confdefs.h <<\EOF
23782#define WAIT_USES_UNION 1
23783EOF
23784
23785	echo "$as_me:23785: checking if union wait can be used as waitpid-arg" >&5
23786echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
23787	if test "${cf_cv_arg_union_waitpid+set}" = set; then
23788  echo $ECHO_N "(cached) $ECHO_C" >&6
23789else
23790
23791		cat >conftest.$ac_ext <<_ACEOF
23792#line 23792 "configure"
23793#include "confdefs.h"
23794$cf_wait_headers
23795int
23796main (void)
23797{
23798union wait x; waitpid(0, &x, 0)
23799  ;
23800  return 0;
23801}
23802_ACEOF
23803rm -f conftest.$ac_objext
23804if { (eval echo "$as_me:23804: \"$ac_compile\"") >&5
23805  (eval $ac_compile) 2>&5
23806  ac_status=$?
23807  echo "$as_me:23807: \$? = $ac_status" >&5
23808  (exit $ac_status); } &&
23809         { ac_try='test -s conftest.$ac_objext'
23810  { (eval echo "$as_me:23810: \"$ac_try\"") >&5
23811  (eval $ac_try) 2>&5
23812  ac_status=$?
23813  echo "$as_me:23813: \$? = $ac_status" >&5
23814  (exit $ac_status); }; }; then
23815  cf_cv_arg_union_waitpid=yes
23816else
23817  echo "$as_me: failed program was:" >&5
23818cat conftest.$ac_ext >&5
23819cf_cv_arg_union_waitpid=no
23820fi
23821rm -f conftest.$ac_objext conftest.$ac_ext
23822
23823fi
23824
23825	echo "$as_me:23825: result: $cf_cv_arg_union_waitpid" >&5
23826echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
23827	test $cf_cv_arg_union_waitpid = yes &&
23828cat >>confdefs.h <<\EOF
23829#define WAITPID_USES_UNION 1
23830EOF
23831
23832fi
23833
23834echo "$as_me:23834: checking if we must include wchar.h to declare mbstate_t" >&5
23835echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
23836if test "${cf_cv_mbstate_t+set}" = set; then
23837  echo $ECHO_N "(cached) $ECHO_C" >&6
23838else
23839
23840cat >conftest.$ac_ext <<_ACEOF
23841#line 23841 "configure"
23842#include "confdefs.h"
23843
23844#include <stdlib.h>
23845#include <stdio.h>
23846#ifdef HAVE_LIBUTF8_H
23847#include <libutf8.h>
23848#endif
23849int
23850main (void)
23851{
23852mbstate_t state
23853  ;
23854  return 0;
23855}
23856_ACEOF
23857rm -f conftest.$ac_objext
23858if { (eval echo "$as_me:23858: \"$ac_compile\"") >&5
23859  (eval $ac_compile) 2>&5
23860  ac_status=$?
23861  echo "$as_me:23861: \$? = $ac_status" >&5
23862  (exit $ac_status); } &&
23863         { ac_try='test -s conftest.$ac_objext'
23864  { (eval echo "$as_me:23864: \"$ac_try\"") >&5
23865  (eval $ac_try) 2>&5
23866  ac_status=$?
23867  echo "$as_me:23867: \$? = $ac_status" >&5
23868  (exit $ac_status); }; }; then
23869  cf_cv_mbstate_t=no
23870else
23871  echo "$as_me: failed program was:" >&5
23872cat conftest.$ac_ext >&5
23873cat >conftest.$ac_ext <<_ACEOF
23874#line 23874 "configure"
23875#include "confdefs.h"
23876
23877#include <stdlib.h>
23878#include <stdio.h>
23879#include <wchar.h>
23880#ifdef HAVE_LIBUTF8_H
23881#include <libutf8.h>
23882#endif
23883int
23884main (void)
23885{
23886mbstate_t value
23887  ;
23888  return 0;
23889}
23890_ACEOF
23891rm -f conftest.$ac_objext
23892if { (eval echo "$as_me:23892: \"$ac_compile\"") >&5
23893  (eval $ac_compile) 2>&5
23894  ac_status=$?
23895  echo "$as_me:23895: \$? = $ac_status" >&5
23896  (exit $ac_status); } &&
23897         { ac_try='test -s conftest.$ac_objext'
23898  { (eval echo "$as_me:23898: \"$ac_try\"") >&5
23899  (eval $ac_try) 2>&5
23900  ac_status=$?
23901  echo "$as_me:23901: \$? = $ac_status" >&5
23902  (exit $ac_status); }; }; then
23903  cf_cv_mbstate_t=yes
23904else
23905  echo "$as_me: failed program was:" >&5
23906cat conftest.$ac_ext >&5
23907cf_cv_mbstate_t=unknown
23908fi
23909rm -f conftest.$ac_objext conftest.$ac_ext
23910fi
23911rm -f conftest.$ac_objext conftest.$ac_ext
23912fi
23913echo "$as_me:23913: result: $cf_cv_mbstate_t" >&5
23914echo "${ECHO_T}$cf_cv_mbstate_t" >&6
23915
23916if test "$cf_cv_mbstate_t" = yes ; then
23917
23918cat >>confdefs.h <<\EOF
23919#define NEED_WCHAR_H 1
23920EOF
23921
23922fi
23923
23924if test "$cf_cv_mbstate_t" != unknown ; then
23925
23926cat >>confdefs.h <<\EOF
23927#define HAVE_MBSTATE_T 1
23928EOF
23929
23930fi
23931
23932for ac_header in \
23933termio.h \
23934termios.h \
23935unistd.h \
23936sys/ioctl.h \
23937sys/termio.h \
23938
23939do
23940as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23941echo "$as_me:23941: checking for $ac_header" >&5
23942echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23943if eval "test \"\${$as_ac_Header+set}\" = set"; then
23944  echo $ECHO_N "(cached) $ECHO_C" >&6
23945else
23946  cat >conftest.$ac_ext <<_ACEOF
23947#line 23947 "configure"
23948#include "confdefs.h"
23949#include <$ac_header>
23950_ACEOF
23951if { (eval echo "$as_me:23951: \"$ac_cpp conftest.$ac_ext\"") >&5
23952  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23953  ac_status=$?
23954  egrep -v '^ *\+' conftest.er1 >conftest.err
23955  rm -f conftest.er1
23956  cat conftest.err >&5
23957  echo "$as_me:23957: \$? = $ac_status" >&5
23958  (exit $ac_status); } >/dev/null; then
23959  if test -s conftest.err; then
23960    ac_cpp_err=$ac_c_preproc_warn_flag
23961  else
23962    ac_cpp_err=
23963  fi
23964else
23965  ac_cpp_err=yes
23966fi
23967if test -z "$ac_cpp_err"; then
23968  eval "$as_ac_Header=yes"
23969else
23970  echo "$as_me: failed program was:" >&5
23971  cat conftest.$ac_ext >&5
23972  eval "$as_ac_Header=no"
23973fi
23974rm -f conftest.err conftest.$ac_ext
23975fi
23976echo "$as_me:23976: result: `eval echo '${'$as_ac_Header'}'`" >&5
23977echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23978if test `eval echo '${'$as_ac_Header'}'` = yes; then
23979  cat >>confdefs.h <<EOF
23980#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23981EOF
23982
23983fi
23984done
23985
23986if test "$ac_cv_header_termios_h" = yes ; then
23987	case "$CFLAGS $CPPFLAGS" in
23988	(*-D_POSIX_SOURCE*)
23989		termios_bad=dunno ;;
23990	(*)	termios_bad=maybe ;;
23991	esac
23992	if test "$termios_bad" = maybe ; then
23993	echo "$as_me:23993: checking whether termios.h needs _POSIX_SOURCE" >&5
23994echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
23995	cat >conftest.$ac_ext <<_ACEOF
23996#line 23996 "configure"
23997#include "confdefs.h"
23998#include <termios.h>
23999int
24000main (void)
24001{
24002struct termios foo; int x = foo.c_iflag
24003  ;
24004  return 0;
24005}
24006_ACEOF
24007rm -f conftest.$ac_objext
24008if { (eval echo "$as_me:24008: \"$ac_compile\"") >&5
24009  (eval $ac_compile) 2>&5
24010  ac_status=$?
24011  echo "$as_me:24011: \$? = $ac_status" >&5
24012  (exit $ac_status); } &&
24013         { ac_try='test -s conftest.$ac_objext'
24014  { (eval echo "$as_me:24014: \"$ac_try\"") >&5
24015  (eval $ac_try) 2>&5
24016  ac_status=$?
24017  echo "$as_me:24017: \$? = $ac_status" >&5
24018  (exit $ac_status); }; }; then
24019  termios_bad=no
24020else
24021  echo "$as_me: failed program was:" >&5
24022cat conftest.$ac_ext >&5
24023
24024		cat >conftest.$ac_ext <<_ACEOF
24025#line 24025 "configure"
24026#include "confdefs.h"
24027
24028#define _POSIX_SOURCE
24029#include <termios.h>
24030int
24031main (void)
24032{
24033struct termios foo; int x = foo.c_iflag
24034  ;
24035  return 0;
24036}
24037_ACEOF
24038rm -f conftest.$ac_objext
24039if { (eval echo "$as_me:24039: \"$ac_compile\"") >&5
24040  (eval $ac_compile) 2>&5
24041  ac_status=$?
24042  echo "$as_me:24042: \$? = $ac_status" >&5
24043  (exit $ac_status); } &&
24044         { ac_try='test -s conftest.$ac_objext'
24045  { (eval echo "$as_me:24045: \"$ac_try\"") >&5
24046  (eval $ac_try) 2>&5
24047  ac_status=$?
24048  echo "$as_me:24048: \$? = $ac_status" >&5
24049  (exit $ac_status); }; }; then
24050  termios_bad=unknown
24051else
24052  echo "$as_me: failed program was:" >&5
24053cat conftest.$ac_ext >&5
24054termios_bad=yes
24055cat >>confdefs.h <<\EOF
24056#define _POSIX_SOURCE 1
24057EOF
24058
24059fi
24060rm -f conftest.$ac_objext conftest.$ac_ext
24061
24062fi
24063rm -f conftest.$ac_objext conftest.$ac_ext
24064	echo "$as_me:24064: result: $termios_bad" >&5
24065echo "${ECHO_T}$termios_bad" >&6
24066	fi
24067fi
24068
24069echo "$as_me:24069: checking declaration of size-change" >&5
24070echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
24071if test "${cf_cv_sizechange+set}" = set; then
24072  echo $ECHO_N "(cached) $ECHO_C" >&6
24073else
24074
24075	cf_cv_sizechange=unknown
24076	cf_save_CPPFLAGS="$CPPFLAGS"
24077
24078for cf_opts in "" "NEED_PTEM_H"
24079do
24080
24081	CPPFLAGS="$cf_save_CPPFLAGS"
24082	if test -n "$cf_opts"
24083	then
24084
24085	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24086	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
24087
24088	fi
24089	cat >conftest.$ac_ext <<_ACEOF
24090#line 24090 "configure"
24091#include "confdefs.h"
24092#include <sys/types.h>
24093#ifdef HAVE_TERMIOS_H
24094#include <termios.h>
24095#else
24096#ifdef HAVE_TERMIO_H
24097#include <termio.h>
24098#endif
24099#endif
24100
24101#ifdef NEED_PTEM_H
24102/* This is a workaround for SCO:  they neglected to define struct winsize in
24103 * termios.h -- it's only in termio.h and ptem.h
24104 */
24105#include <sys/stream.h>
24106#include <sys/ptem.h>
24107#endif
24108
24109#ifdef HAVE_SYS_IOCTL_H
24110#include <sys/ioctl.h>
24111#endif
24112
24113int
24114main (void)
24115{
24116
24117#ifdef TIOCGSIZE
24118	struct ttysize win;	/* SunOS 3.0... */
24119	int y = win.ts_lines;
24120	int x = win.ts_cols;
24121#else
24122#ifdef TIOCGWINSZ
24123	struct winsize win;	/* everything else */
24124	int y = win.ws_row;
24125	int x = win.ws_col;
24126#else
24127	no TIOCGSIZE or TIOCGWINSZ
24128#endif /* TIOCGWINSZ */
24129#endif /* TIOCGSIZE */
24130
24131  ;
24132  return 0;
24133}
24134_ACEOF
24135rm -f conftest.$ac_objext
24136if { (eval echo "$as_me:24136: \"$ac_compile\"") >&5
24137  (eval $ac_compile) 2>&5
24138  ac_status=$?
24139  echo "$as_me:24139: \$? = $ac_status" >&5
24140  (exit $ac_status); } &&
24141         { ac_try='test -s conftest.$ac_objext'
24142  { (eval echo "$as_me:24142: \"$ac_try\"") >&5
24143  (eval $ac_try) 2>&5
24144  ac_status=$?
24145  echo "$as_me:24145: \$? = $ac_status" >&5
24146  (exit $ac_status); }; }; then
24147  cf_cv_sizechange=yes
24148else
24149  echo "$as_me: failed program was:" >&5
24150cat conftest.$ac_ext >&5
24151cf_cv_sizechange=no
24152fi
24153rm -f conftest.$ac_objext conftest.$ac_ext
24154
24155	CPPFLAGS="$cf_save_CPPFLAGS"
24156	if test "$cf_cv_sizechange" = yes ; then
24157		echo "size-change succeeded ($cf_opts)" >&5
24158		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
24159		break
24160	fi
24161done
24162
24163fi
24164echo "$as_me:24164: result: $cf_cv_sizechange" >&5
24165echo "${ECHO_T}$cf_cv_sizechange" >&6
24166if test "$cf_cv_sizechange" != no ; then
24167
24168cat >>confdefs.h <<\EOF
24169#define HAVE_SIZECHANGE 1
24170EOF
24171
24172	case $cf_cv_sizechange in
24173	(NEED*)
24174		cat >>confdefs.h <<EOF
24175#define $cf_cv_sizechange  1
24176EOF
24177
24178		;;
24179	esac
24180fi
24181
24182PACKAGE_PREFIX=DLG
24183PACKAGE_CONFIG=dlg_config.h
24184
24185EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
24186
24187cat >conftest.$ac_ext <<_ACEOF
24188#line 24188 "configure"
24189#include "confdefs.h"
24190#include <locale.h>
24191int
24192main (void)
24193{
24194setlocale(LC_ALL, "")
24195  ;
24196  return 0;
24197}
24198_ACEOF
24199rm -f conftest.$ac_objext conftest$ac_exeext
24200if { (eval echo "$as_me:24200: \"$ac_link\"") >&5
24201  (eval $ac_link) 2>&5
24202  ac_status=$?
24203  echo "$as_me:24203: \$? = $ac_status" >&5
24204  (exit $ac_status); } &&
24205         { ac_try='test -s conftest$ac_exeext'
24206  { (eval echo "$as_me:24206: \"$ac_try\"") >&5
24207  (eval $ac_try) 2>&5
24208  ac_status=$?
24209  echo "$as_me:24209: \$? = $ac_status" >&5
24210  (exit $ac_status); }; }; then
24211
24212cat >>confdefs.h <<\EOF
24213#define HAVE_SETLOCALE 1
24214EOF
24215
24216else
24217  echo "$as_me: failed program was:" >&5
24218cat conftest.$ac_ext >&5
24219fi
24220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24221
24222echo "$as_me:24222: checking if runtime has nl_langinfo support for first weekday" >&5
24223echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
24224if test "${cf_nl_langinfo_1stday+set}" = set; then
24225  echo $ECHO_N "(cached) $ECHO_C" >&6
24226else
24227
24228	cat >conftest.$ac_ext <<_ACEOF
24229#line 24229 "configure"
24230#include "confdefs.h"
24231
24232#include <langinfo.h>
24233#include <locale.h>
24234
24235int
24236main (void)
24237{
24238
24239	int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
24240	long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
24241
24242  ;
24243  return 0;
24244}
24245_ACEOF
24246rm -f conftest.$ac_objext
24247if { (eval echo "$as_me:24247: \"$ac_compile\"") >&5
24248  (eval $ac_compile) 2>&5
24249  ac_status=$?
24250  echo "$as_me:24250: \$? = $ac_status" >&5
24251  (exit $ac_status); } &&
24252         { ac_try='test -s conftest.$ac_objext'
24253  { (eval echo "$as_me:24253: \"$ac_try\"") >&5
24254  (eval $ac_try) 2>&5
24255  ac_status=$?
24256  echo "$as_me:24256: \$? = $ac_status" >&5
24257  (exit $ac_status); }; }; then
24258  cf_nl_langinfo_1stday=yes
24259
24260else
24261  echo "$as_me: failed program was:" >&5
24262cat conftest.$ac_ext >&5
24263cf_nl_langinfo_1stday=no
24264
24265fi
24266rm -f conftest.$ac_objext conftest.$ac_ext
24267
24268fi
24269echo "$as_me:24269: result: $cf_nl_langinfo_1stday" >&5
24270echo "${ECHO_T}$cf_nl_langinfo_1stday" >&6
24271test "x$cf_nl_langinfo_1stday" = xyes && cat >>confdefs.h <<\EOF
24272#define HAVE_NL_LANGINFO_1STDAY 1
24273EOF
24274
24275echo "$as_me:24275: checking if rpath-hack should be disabled" >&5
24276echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24277
24278# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24279if test "${enable_rpath_hack+set}" = set; then
24280  enableval="$enable_rpath_hack"
24281  test "$enableval" != no && enableval=yes
24282	if test "$enableval" != "yes" ; then
24283    cf_disable_rpath_hack=yes
24284	else
24285		cf_disable_rpath_hack=no
24286	fi
24287else
24288  enableval=yes
24289	cf_disable_rpath_hack=no
24290
24291fi;
24292echo "$as_me:24292: result: $cf_disable_rpath_hack" >&5
24293echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24294if test "$cf_disable_rpath_hack" = no ; then
24295
24296echo "$as_me:24296: checking for updated LDFLAGS" >&5
24297echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24298if test -n "$LD_RPATH_OPT" ; then
24299	echo "$as_me:24299: result: maybe" >&5
24300echo "${ECHO_T}maybe" >&6
24301
24302	for ac_prog in ldd
24303do
24304  # Extract the first word of "$ac_prog", so it can be a program name with args.
24305set dummy $ac_prog; ac_word=$2
24306echo "$as_me:24306: checking for $ac_word" >&5
24307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24308if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24309  echo $ECHO_N "(cached) $ECHO_C" >&6
24310else
24311  if test -n "$cf_ldd_prog"; then
24312  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24313else
24314  ac_save_IFS=$IFS; IFS=$ac_path_separator
24315ac_dummy="$PATH"
24316for ac_dir in $ac_dummy; do
24317  IFS=$ac_save_IFS
24318  test -z "$ac_dir" && ac_dir=.
24319  $as_executable_p "$ac_dir/$ac_word" || continue
24320ac_cv_prog_cf_ldd_prog="$ac_prog"
24321echo "$as_me:24321: found $ac_dir/$ac_word" >&5
24322break
24323done
24324
24325fi
24326fi
24327cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24328if test -n "$cf_ldd_prog"; then
24329  echo "$as_me:24329: result: $cf_ldd_prog" >&5
24330echo "${ECHO_T}$cf_ldd_prog" >&6
24331else
24332  echo "$as_me:24332: result: no" >&5
24333echo "${ECHO_T}no" >&6
24334fi
24335
24336  test -n "$cf_ldd_prog" && break
24337done
24338test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24339
24340	cf_rpath_list="/usr/lib /lib"
24341	if test "$cf_ldd_prog" != no
24342	then
24343		cf_rpath_oops=
24344
24345cat >conftest.$ac_ext <<_ACEOF
24346#line 24346 "configure"
24347#include "confdefs.h"
24348#include <stdio.h>
24349int
24350main (void)
24351{
24352printf("Hello");
24353  ;
24354  return 0;
24355}
24356_ACEOF
24357rm -f conftest.$ac_objext conftest$ac_exeext
24358if { (eval echo "$as_me:24358: \"$ac_link\"") >&5
24359  (eval $ac_link) 2>&5
24360  ac_status=$?
24361  echo "$as_me:24361: \$? = $ac_status" >&5
24362  (exit $ac_status); } &&
24363         { ac_try='test -s conftest$ac_exeext'
24364  { (eval echo "$as_me:24364: \"$ac_try\"") >&5
24365  (eval $ac_try) 2>&5
24366  ac_status=$?
24367  echo "$as_me:24367: \$? = $ac_status" >&5
24368  (exit $ac_status); }; }; then
24369  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24370		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24371else
24372  echo "$as_me: failed program was:" >&5
24373cat conftest.$ac_ext >&5
24374fi
24375rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24376
24377		# If we passed the link-test, but get a "not found" on a given library,
24378		# this could be due to inept reconfiguration of gcc to make it only
24379		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24380		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
24381		# /usr/local libraries.
24382		if test -n "$cf_rpath_oops"
24383		then
24384			for cf_rpath_src in $cf_rpath_oops
24385			do
24386				for cf_rpath_dir in \
24387					/usr/local \
24388					/usr/pkg \
24389					/opt/sfw
24390				do
24391					if test -f $cf_rpath_dir/lib/$cf_rpath_src
24392					then
24393						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24394
24395echo "${as_me:-configure}:24395: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24396
24397						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24398						break
24399					fi
24400				done
24401			done
24402		fi
24403	fi
24404
24405	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24406
24407echo "${as_me:-configure}:24407: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24408
24409test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
24410
24411echo "${as_me:-configure}:24411: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24412
24413cf_rpath_dst=
24414for cf_rpath_src in $LDFLAGS
24415do
24416	case $cf_rpath_src in
24417	(-L*)
24418
24419		# check if this refers to a directory which we will ignore
24420		cf_rpath_skip=no
24421		if test -n "$cf_rpath_list"
24422		then
24423			for cf_rpath_item in $cf_rpath_list
24424			do
24425				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24426				then
24427					cf_rpath_skip=yes
24428					break
24429				fi
24430			done
24431		fi
24432
24433		if test "$cf_rpath_skip" = no
24434		then
24435			# transform the option
24436			if test "$LD_RPATH_OPT" = "-R " ; then
24437				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24438			else
24439				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24440			fi
24441
24442			# if we have not already added this, add it now
24443			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24444			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24445			then
24446				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24447
24448echo "${as_me:-configure}:24448: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24449
24450				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24451			fi
24452		fi
24453		;;
24454	esac
24455	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24456done
24457LDFLAGS=$cf_rpath_dst
24458
24459test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
24460
24461echo "${as_me:-configure}:24461: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24462
24463test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
24464
24465echo "${as_me:-configure}:24465: testing ...checking LIBS $LIBS ..." 1>&5
24466
24467cf_rpath_dst=
24468for cf_rpath_src in $LIBS
24469do
24470	case $cf_rpath_src in
24471	(-L*)
24472
24473		# check if this refers to a directory which we will ignore
24474		cf_rpath_skip=no
24475		if test -n "$cf_rpath_list"
24476		then
24477			for cf_rpath_item in $cf_rpath_list
24478			do
24479				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24480				then
24481					cf_rpath_skip=yes
24482					break
24483				fi
24484			done
24485		fi
24486
24487		if test "$cf_rpath_skip" = no
24488		then
24489			# transform the option
24490			if test "$LD_RPATH_OPT" = "-R " ; then
24491				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24492			else
24493				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24494			fi
24495
24496			# if we have not already added this, add it now
24497			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24498			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24499			then
24500				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24501
24502echo "${as_me:-configure}:24502: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24503
24504				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24505			fi
24506		fi
24507		;;
24508	esac
24509	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24510done
24511LIBS=$cf_rpath_dst
24512
24513test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
24514
24515echo "${as_me:-configure}:24515: testing ...checked LIBS $LIBS ..." 1>&5
24516
24517	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24518
24519echo "${as_me:-configure}:24519: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24520
24521else
24522	echo "$as_me:24522: result: no" >&5
24523echo "${ECHO_T}no" >&6
24524fi
24525
24526fi
24527
24528cf_libname=\${LIB_BASENAME}
24529cf_liblink=$cf_libname
24530cf_libroot=$cf_libname
24531
24532if test "x$cf_cv_do_symlinks" = xyes
24533then
24534	case "x$cf_cv_shlib_version" in
24535	(xrel)
24536		cf_liblink="\${LIB_ABI_NAME}"
24537		cf_libname="\${LIB_REL_NAME}"
24538		;;
24539	(xabi)
24540		cf_liblink="\${LIB_REL_NAME}"
24541		cf_libname="\${LIB_ABI_NAME}"
24542		;;
24543	esac
24544fi
24545LIB_TARGET=$cf_libname
24546
24547SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
24548LIB_BASENAME	= \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
24549LIB_REL_NAME	= \${LIB_BASENAME}.\${REL_VERSION}\\
24550LIB_ABI_NAME	= \${LIB_BASENAME}.\${ABI_VERSION}\\
24551LIB_TARGET	= $LIB_TARGET\\
24552RM_SHARED_OPTS	= $RM_SHARED_OPTS\\
24553# end CF__DEFINE_SHLIB_VARS"
24554
24555ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
24556ac_config_commands="$ac_config_commands default"
24557cat >confcache <<\_ACEOF
24558# This file is a shell script that caches the results of configure
24559# tests run on this system so they can be shared between configure
24560# scripts and configure runs, see configure's option --config-cache.
24561# It is not useful on other systems.  If it contains results you don't
24562# want to keep, you may remove or edit it.
24563#
24564# config.status only pays attention to the cache file if you give it
24565# the --recheck option to rerun configure.
24566#
24567# `ac_cv_env_foo' variables (set or unset) will be overriden when
24568# loading this file, other *unset* `ac_cv_foo' will be assigned the
24569# following values.
24570
24571_ACEOF
24572
24573# The following way of writing the cache mishandles newlines in values,
24574# but we know of no workaround that is simple, portable, and efficient.
24575# So, don't put newlines in cache variables' values.
24576# Ultrix sh set writes to stderr and can't be redirected directly,
24577# and sets the high bit in the cache file unless we assign to the vars.
24578{
24579  (set) 2>&1 |
24580    case `(ac_space=' '; set | grep ac_space) 2>&1` in
24581    *ac_space=\ *)
24582      # `set' does not quote correctly, so add quotes (double-quote
24583      # substitution turns \\\\ into \\, and sed turns \\ into \).
24584      sed -n \
24585        "s/'/'\\\\''/g;
24586    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24587      ;;
24588    *)
24589      # `set' quotes correctly as required by POSIX, so do not add quotes.
24590      sed -n \
24591        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24592      ;;
24593    esac;
24594} |
24595  sed '
24596     t clear
24597     : clear
24598     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24599     t end
24600     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24601     : end' >>confcache
24602if cmp -s $cache_file confcache; then :; else
24603  if test -w $cache_file; then
24604    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24605    cat confcache >$cache_file
24606  else
24607    echo "not updating unwritable cache $cache_file"
24608  fi
24609fi
24610rm -f confcache
24611
24612test "x$prefix" = xNONE && prefix=$ac_default_prefix
24613# Let make expand exec_prefix.
24614test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24615
24616# VPATH may cause trouble with some makes, so we remove $(srcdir),
24617# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24618# trailing colons and then remove the whole line if VPATH becomes empty
24619# (actually we leave an empty line to preserve line numbers).
24620if test "x$srcdir" = x.; then
24621  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
24622s/:*\$(srcdir):*/:/;
24623s/:*\${srcdir}:*/:/;
24624s/:*@srcdir@:*/:/;
24625s/^\([^=]*=[ 	]*\):*/\1/;
24626s/:*$//;
24627s/^[^=]*=[ 	]*$//;
24628}'
24629fi
24630
24631DEFS=-DHAVE_CONFIG_H
24632
24633: ${CONFIG_STATUS=./config.status}
24634ac_clean_files_save=$ac_clean_files
24635ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24636{ echo "$as_me:24636: creating $CONFIG_STATUS" >&5
24637echo "$as_me: creating $CONFIG_STATUS" >&6;}
24638cat >$CONFIG_STATUS <<_ACEOF
24639#! $SHELL
24640# Generated automatically by configure.
24641# Run this file to recreate the current configuration.
24642# Compiler output produced by configure, useful for debugging
24643# configure, is in config.log if it exists.
24644
24645debug=false
24646SHELL=\${CONFIG_SHELL-$SHELL}
24647ac_cs_invocation="\$0 \$@"
24648
24649_ACEOF
24650
24651cat >>$CONFIG_STATUS <<\_ACEOF
24652# Be Bourne compatible
24653if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24654  emulate sh
24655  NULLCMD=:
24656elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24657  set -o posix
24658fi
24659
24660# Name of the executable.
24661as_me=`echo "$0" |sed 's,.*[\\/],,'`
24662
24663if expr a : '\(a\)' >/dev/null 2>&1; then
24664  as_expr=expr
24665else
24666  as_expr=false
24667fi
24668
24669rm -f conf$$ conf$$.exe conf$$.file
24670echo >conf$$.file
24671if ln -s conf$$.file conf$$ 2>/dev/null; then
24672  # We could just check for DJGPP; but this test a) works b) is more generic
24673  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24674  if test -f conf$$.exe; then
24675    # Don't use ln at all; we don't have any links
24676    as_ln_s='cp -p'
24677  else
24678    as_ln_s='ln -s'
24679  fi
24680elif ln conf$$.file conf$$ 2>/dev/null; then
24681  as_ln_s=ln
24682else
24683  as_ln_s='cp -p'
24684fi
24685rm -f conf$$ conf$$.exe conf$$.file
24686
24687as_executable_p="test -f"
24688
24689# Support unset when possible.
24690if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24691  as_unset=unset
24692else
24693  as_unset=false
24694fi
24695
24696# NLS nuisances.
24697$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24698$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24699$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24700$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24701$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24702$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24703$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24704$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24705
24706# IFS
24707# We need space, tab and new line, in precisely that order.
24708as_nl='
24709'
24710IFS=" 	$as_nl"
24711
24712# CDPATH.
24713$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24714
24715exec 6>&1
24716
24717_ACEOF
24718
24719# Files that config.status was made for.
24720if test -n "$ac_config_files"; then
24721  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24722fi
24723
24724if test -n "$ac_config_headers"; then
24725  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24726fi
24727
24728if test -n "$ac_config_links"; then
24729  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24730fi
24731
24732if test -n "$ac_config_commands"; then
24733  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24734fi
24735
24736cat >>$CONFIG_STATUS <<\EOF
24737
24738ac_cs_usage="\
24739\`$as_me' instantiates files from templates according to the
24740current configuration.
24741
24742Usage: $0 [OPTIONS] [FILE]...
24743
24744  -h, --help       print this help, then exit
24745  -V, --version    print version number, then exit
24746  -d, --debug      don't remove temporary files
24747      --recheck    update $as_me by reconfiguring in the same conditions
24748  --file=FILE[:TEMPLATE]
24749                   instantiate the configuration file FILE
24750  --header=FILE[:TEMPLATE]
24751                   instantiate the configuration header FILE
24752
24753Configuration files:
24754$config_files
24755
24756Configuration headers:
24757$config_headers
24758
24759Configuration commands:
24760$config_commands
24761
24762Report bugs to <dickey@invisible-island.net>."
24763EOF
24764
24765cat >>$CONFIG_STATUS <<EOF
24766ac_cs_version="\\
24767config.status
24768configured by $0, generated by GNU Autoconf 2.52.20170501,
24769  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24770
24771Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24772Free Software Foundation, Inc.
24773This config.status script is free software; the Free Software Foundation
24774gives unlimited permission to copy, distribute and modify it."
24775srcdir=$srcdir
24776INSTALL="$INSTALL"
24777EOF
24778
24779cat >>$CONFIG_STATUS <<\EOF
24780# If no file are specified by the user, then we need to provide default
24781# value.  By we need to know if files were specified by the user.
24782ac_need_defaults=:
24783while test $# != 0
24784do
24785  case $1 in
24786  --*=*)
24787    ac_option=`expr "x$1" : 'x\([^=]*\)='`
24788    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24789    shift
24790    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24791    shift
24792    ;;
24793  -*);;
24794  *) # This is not an option, so the user has probably given explicit
24795     # arguments.
24796     ac_need_defaults=false;;
24797  esac
24798
24799  case $1 in
24800  # Handling of the options.
24801EOF
24802cat >>$CONFIG_STATUS <<EOF
24803  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24804    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24805    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24806EOF
24807cat >>$CONFIG_STATUS <<\EOF
24808  --version | --vers* | -V )
24809    echo "$ac_cs_version"; exit 0 ;;
24810  --he | --h)
24811    # Conflict between --help and --header
24812    { { echo "$as_me:24812: error: ambiguous option: $1
24813Try \`$0 --help' for more information." >&5
24814echo "$as_me: error: ambiguous option: $1
24815Try \`$0 --help' for more information." >&2;}
24816   { (exit 1); exit 1; }; };;
24817  --help | --hel | -h )
24818    echo "$ac_cs_usage"; exit 0 ;;
24819  --debug | --d* | -d )
24820    debug=: ;;
24821  --file | --fil | --fi | --f )
24822    shift
24823    CONFIG_FILES="$CONFIG_FILES $1"
24824    ac_need_defaults=false;;
24825  --header | --heade | --head | --hea )
24826    shift
24827    CONFIG_HEADERS="$CONFIG_HEADERS $1"
24828    ac_need_defaults=false;;
24829
24830  # This is an error.
24831  -*) { { echo "$as_me:24831: error: unrecognized option: $1
24832Try \`$0 --help' for more information." >&5
24833echo "$as_me: error: unrecognized option: $1
24834Try \`$0 --help' for more information." >&2;}
24835   { (exit 1); exit 1; }; } ;;
24836
24837  *) ac_config_targets="$ac_config_targets $1" ;;
24838
24839  esac
24840  shift
24841done
24842
24843exec 5>>config.log
24844cat >&5 << _ACEOF
24845
24846## ----------------------- ##
24847## Running config.status.  ##
24848## ----------------------- ##
24849
24850This file was extended by $as_me 2.52.20170501, executed with
24851  CONFIG_FILES    = $CONFIG_FILES
24852  CONFIG_HEADERS  = $CONFIG_HEADERS
24853  CONFIG_LINKS    = $CONFIG_LINKS
24854  CONFIG_COMMANDS = $CONFIG_COMMANDS
24855  > $ac_cs_invocation
24856on `(hostname || uname -n) 2>/dev/null | sed 1q`
24857
24858_ACEOF
24859EOF
24860
24861cat >>$CONFIG_STATUS <<EOF
24862#
24863# INIT-COMMANDS section.
24864#
24865
24866ABI_VERSION="$ABI_VERSION"
24867REL_VERSION="$REL_VERSION"
24868LIB_MODEL="$LIB_MODEL"
24869LIB_PREFIX="$LIB_PREFIX"
24870LIB_ROOTNAME="$LIB_ROOTNAME"
24871DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
24872RM_SHARED_OPTS="$RM_SHARED_OPTS"
24873cf_cv_do_symlinks="$cf_cv_do_symlinks"
24874cf_cv_shlib_version="$cf_cv_shlib_version"
24875
24876EOF
24877
24878cat >>$CONFIG_STATUS <<\EOF
24879for ac_config_target in $ac_config_targets
24880do
24881  case "$ac_config_target" in
24882  # Handling of arguments.
24883  "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
24884  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
24885  "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
24886  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
24887  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
24888  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24889  "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
24890  *) { { echo "$as_me:24890: error: invalid argument: $ac_config_target" >&5
24891echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24892   { (exit 1); exit 1; }; };;
24893  esac
24894done
24895
24896# If the user did not use the arguments to specify the items to instantiate,
24897# then the envvar interface is used.  Set only those that are not.
24898# We use the long form for the default assignment because of an extremely
24899# bizarre bug on SunOS 4.1.3.
24900if $ac_need_defaults; then
24901  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24902  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24903  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24904fi
24905
24906# Create a temporary directory, and hook for its removal unless debugging.
24907$debug ||
24908{
24909  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24910  trap '{ (exit 1); exit 1; }' 1 2 13 15
24911}
24912
24913# Create a (secure) tmp directory for tmp files.
24914: ${TMPDIR=/tmp}
24915{
24916  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24917  test -n "$tmp" && test -d "$tmp"
24918}  ||
24919{
24920  tmp=$TMPDIR/cs$$-$RANDOM
24921  (umask 077 && mkdir $tmp)
24922} ||
24923{
24924   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24925   { (exit 1); exit 1; }
24926}
24927
24928EOF
24929
24930cat >>$CONFIG_STATUS <<EOF
24931
24932#
24933# CONFIG_FILES section.
24934#
24935
24936# No need to generate the scripts if there are no CONFIG_FILES.
24937# This happens for instance when ./config.status config.h
24938if test -n "\$CONFIG_FILES"; then
24939  # Protect against being on the right side of a sed subst in config.status.
24940  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24941   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24942s,@SHELL@,$SHELL,;t t
24943s,@exec_prefix@,$exec_prefix,;t t
24944s,@prefix@,$prefix,;t t
24945s,@program_transform_name@,$program_transform_name,;t t
24946s,@bindir@,$bindir,;t t
24947s,@sbindir@,$sbindir,;t t
24948s,@libexecdir@,$libexecdir,;t t
24949s,@datarootdir@,$datarootdir,;t t
24950s,@datadir@,$datadir,;t t
24951s,@sysconfdir@,$sysconfdir,;t t
24952s,@sharedstatedir@,$sharedstatedir,;t t
24953s,@localstatedir@,$localstatedir,;t t
24954s,@libdir@,$libdir,;t t
24955s,@includedir@,$includedir,;t t
24956s,@oldincludedir@,$oldincludedir,;t t
24957s,@infodir@,$infodir,;t t
24958s,@mandir@,$mandir,;t t
24959s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24960s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24961s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24962s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24963s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24964s,@build_alias@,$build_alias,;t t
24965s,@host_alias@,$host_alias,;t t
24966s,@target_alias@,$target_alias,;t t
24967s,@ECHO_C@,$ECHO_C,;t t
24968s,@ECHO_N@,$ECHO_N,;t t
24969s,@ECHO_T@,$ECHO_T,;t t
24970s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24971s,@DEFS@,$DEFS,;t t
24972s,@LIBS@,$LIBS,;t t
24973s,@DESTDIR@,$DESTDIR,;t t
24974s,@CC@,$CC,;t t
24975s,@CFLAGS@,$CFLAGS,;t t
24976s,@LDFLAGS@,$LDFLAGS,;t t
24977s,@CPPFLAGS@,$CPPFLAGS,;t t
24978s,@ac_ct_CC@,$ac_ct_CC,;t t
24979s,@EXEEXT@,$EXEEXT,;t t
24980s,@OBJEXT@,$OBJEXT,;t t
24981s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24982s,@CPP@,$CPP,;t t
24983s,@SET_MAKE@,$SET_MAKE,;t t
24984s,@RANLIB@,$RANLIB,;t t
24985s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24986s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24987s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24988s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24989s,@LN_S@,$LN_S,;t t
24990s,@LINT@,$LINT,;t t
24991s,@LINT_OPTS@,$LINT_OPTS,;t t
24992s,@GROFF_PATH@,$GROFF_PATH,;t t
24993s,@NROFF_PATH@,$NROFF_PATH,;t t
24994s,@TBL_PATH@,$TBL_PATH,;t t
24995s,@GROFF_NOTE@,$GROFF_NOTE,;t t
24996s,@NROFF_NOTE@,$NROFF_NOTE,;t t
24997s,@AR@,$AR,;t t
24998s,@ac_ct_AR@,$ac_ct_AR,;t t
24999s,@ARFLAGS@,$ARFLAGS,;t t
25000s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25001s,@CTAGS@,$CTAGS,;t t
25002s,@ETAGS@,$ETAGS,;t t
25003s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25004s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25005s,@ECHO_LT@,$ECHO_LT,;t t
25006s,@ECHO_LD@,$ECHO_LD,;t t
25007s,@RULE_CC@,$RULE_CC,;t t
25008s,@SHOW_CC@,$SHOW_CC,;t t
25009s,@ECHO_CC@,$ECHO_CC,;t t
25010s,@build@,$build,;t t
25011s,@build_cpu@,$build_cpu,;t t
25012s,@build_vendor@,$build_vendor,;t t
25013s,@build_os@,$build_os,;t t
25014s,@host@,$host,;t t
25015s,@host_cpu@,$host_cpu,;t t
25016s,@host_vendor@,$host_vendor,;t t
25017s,@host_os@,$host_os,;t t
25018s,@PROG_EXT@,$PROG_EXT,;t t
25019s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25020s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25021s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25022s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25023s,@VERSION@,$VERSION,;t t
25024s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25025s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25026s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25027s,@PACKAGE@,$PACKAGE,;t t
25028s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
25029s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
25030s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
25031s,@SUB_INC@,$SUB_INC,;t t
25032s,@cf_man2html@,$cf_man2html,;t t
25033s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25034s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25035s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25036s,@CONFIG_H@,$CONFIG_H,;t t
25037s,@ALLOCA@,$ALLOCA,;t t
25038s,@GLIBC21@,$GLIBC21,;t t
25039s,@LIBICONV@,$LIBICONV,;t t
25040s,@USE_NLS@,$USE_NLS,;t t
25041s,@MSGFMT@,$MSGFMT,;t t
25042s,@GMSGFMT@,$GMSGFMT,;t t
25043s,@XGETTEXT@,$XGETTEXT,;t t
25044s,@INTLBISON@,$INTLBISON,;t t
25045s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
25046s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
25047s,@CATALOGS@,$CATALOGS,;t t
25048s,@CATOBJEXT@,$CATOBJEXT,;t t
25049s,@GMOFILES@,$GMOFILES,;t t
25050s,@INTLLIBS@,$INTLLIBS,;t t
25051s,@INTLOBJS@,$INTLOBJS,;t t
25052s,@POFILES@,$POFILES,;t t
25053s,@POSUB@,$POSUB,;t t
25054s,@DATADIRNAME@,$DATADIRNAME,;t t
25055s,@INSTOBJEXT@,$INSTOBJEXT,;t t
25056s,@GENCAT@,$GENCAT,;t t
25057s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
25058s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
25059s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
25060s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
25061s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
25062s,@GT_YES@,$GT_YES,;t t
25063s,@GT_NO@,$GT_NO,;t t
25064s,@LINK_PREFIX@,$LINK_PREFIX,;t t
25065s,@ABI_VERSION@,$ABI_VERSION,;t t
25066s,@REL_VERSION@,$REL_VERSION,;t t
25067s,@shlibdir@,$shlibdir,;t t
25068s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25069s,@LIBTOOL@,$LIBTOOL,;t t
25070s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25071s,@LT_UNDEF@,$LT_UNDEF,;t t
25072s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25073s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25074s,@LIB_CREATE@,$LIB_CREATE,;t t
25075s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25076s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25077s,@LIB_PREP@,$LIB_PREP,;t t
25078s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25079s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25080s,@LIB_LINK@,$LIB_LINK,;t t
25081s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25082s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25083s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25084s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25085s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25086s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25087s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25088s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25089s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25090s,@LINK_PROGS@,$LINK_PROGS,;t t
25091s,@LINK_TESTS@,$LINK_TESTS,;t t
25092s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25093s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25094s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25095s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25096s,@RPATH_LIST@,$RPATH_LIST,;t t
25097s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25098s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25099s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25100s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25101s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
25102s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25103s,@LIB_MODEL@,$LIB_MODEL,;t t
25104s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
25105s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
25106s,@MAKE_SHARED@,$MAKE_SHARED,;t t
25107s,@MAKE_STATIC@,$MAKE_STATIC,;t t
25108s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
25109s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
25110s,@X_CFLAGS@,$X_CFLAGS,;t t
25111s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25112s,@X_LIBS@,$X_LIBS,;t t
25113s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25114s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
25115s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
25116s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25117s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
25118s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
25119s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25120s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
25121s,@LIB_TARGET@,$LIB_TARGET,;t t
25122CEOF
25123
25124EOF
25125
25126  cat >>$CONFIG_STATUS <<\EOF
25127  # Split the substitutions into bite-sized pieces for seds with
25128  # small command number limits, like on Digital OSF/1 and HP-UX.
25129  ac_max_sed_lines=48
25130  ac_sed_frag=1 # Number of current file.
25131  ac_beg=1 # First line for current file.
25132  ac_end=$ac_max_sed_lines # Line after last line for current file.
25133  ac_more_lines=:
25134  ac_sed_cmds=
25135  while $ac_more_lines; do
25136    if test $ac_beg -gt 1; then
25137      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25138    else
25139      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25140    fi
25141    if test ! -s $tmp/subs.frag; then
25142      ac_more_lines=false
25143    else
25144      # The purpose of the label and of the branching condition is to
25145      # speed up the sed processing (if there are no `@' at all, there
25146      # is no need to browse any of the substitutions).
25147      # These are the two extra sed commands mentioned above.
25148      (echo ':t
25149  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25150      # It is possible to make a multiline substitution using escaped newlines.
25151      # Ensure that we do not split the substitution between script fragments.
25152      ac_BEG=$ac_end
25153      ac_END=`expr $ac_end + $ac_max_sed_lines`
25154      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25155      if test -s $tmp/subs.next; then
25156        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25157        if test ! -s $tmp/subs.edit; then
25158          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25159          if test ! -s $tmp/subs.edit; then
25160            if test $ac_beg -gt 1; then
25161              ac_end=`expr $ac_end - 1`
25162              continue
25163            fi
25164          fi
25165        fi
25166      fi
25167
25168      if test -z "$ac_sed_cmds"; then
25169        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25170      else
25171        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25172      fi
25173      ac_sed_frag=`expr $ac_sed_frag + 1`
25174      ac_beg=$ac_end
25175      ac_end=`expr $ac_end + $ac_max_sed_lines`
25176    fi
25177  done
25178  if test -z "$ac_sed_cmds"; then
25179    ac_sed_cmds=cat
25180  fi
25181fi # test -n "$CONFIG_FILES"
25182
25183EOF
25184cat >>$CONFIG_STATUS <<\EOF
25185for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25186  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25187  case $ac_file in
25188  - | *:- | *:-:* ) # input from stdin
25189        cat >$tmp/stdin
25190        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25191        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25192  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25193        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25194  * )   ac_file_in=$ac_file.in ;;
25195  esac
25196
25197  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25198  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25199         X"$ac_file" : 'X\(//\)[^/]' \| \
25200         X"$ac_file" : 'X\(//\)$' \| \
25201         X"$ac_file" : 'X\(/\)' \| \
25202         .     : '\(.\)' 2>/dev/null ||
25203echo X"$ac_file" |
25204    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25205  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25206  	  /^X\(\/\/\)$/{ s//\1/; q; }
25207  	  /^X\(\/\).*/{ s//\1/; q; }
25208  	  s/.*/./; q'`
25209  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25210    { case "$ac_dir" in
25211  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25212  *)                      as_incr_dir=.;;
25213esac
25214as_dummy="$ac_dir"
25215for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25216  case $as_mkdir_dir in
25217    # Skip DOS drivespec
25218    ?:) as_incr_dir=$as_mkdir_dir ;;
25219    *)
25220      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25221      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25222    ;;
25223  esac
25224done; }
25225
25226    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25227    # A "../" for each directory in $ac_dir_suffix.
25228    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25229  else
25230    ac_dir_suffix= ac_dots=
25231  fi
25232
25233  case $srcdir in
25234  .)  ac_srcdir=.
25235      if test -z "$ac_dots"; then
25236         ac_top_srcdir=.
25237      else
25238         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25239      fi ;;
25240  [\\/]* | ?:[\\/]* )
25241      ac_srcdir=$srcdir$ac_dir_suffix;
25242      ac_top_srcdir=$srcdir ;;
25243  *) # Relative path.
25244    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25245    ac_top_srcdir=$ac_dots$srcdir ;;
25246  esac
25247
25248  case $INSTALL in
25249  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25250  *) ac_INSTALL=$ac_dots$INSTALL ;;
25251  esac
25252
25253  if test x"$ac_file" != x-; then
25254    { echo "$as_me:25254: creating $ac_file" >&5
25255echo "$as_me: creating $ac_file" >&6;}
25256    rm -f "$ac_file"
25257  fi
25258  # Let's still pretend it is `configure' which instantiates (i.e., don't
25259  # use $as_me), people would be surprised to read:
25260  #    /* config.h.  Generated automatically by config.status.  */
25261  configure_input="Generated automatically from `echo $ac_file_in |
25262                                                 sed 's,.*/,,'` by configure."
25263
25264  # First look for the input files in the build tree, otherwise in the
25265  # src tree.
25266  ac_file_inputs=`IFS=:
25267    for f in $ac_file_in; do
25268      case $f in
25269      -) echo $tmp/stdin ;;
25270      [\\/$]*)
25271         # Absolute (can't be DOS-style, as IFS=:)
25272         test -f "$f" || { { echo "$as_me:25272: error: cannot find input file: $f" >&5
25273echo "$as_me: error: cannot find input file: $f" >&2;}
25274   { (exit 1); exit 1; }; }
25275         echo $f;;
25276      *) # Relative
25277         if test -f "$f"; then
25278           # Build tree
25279           echo $f
25280         elif test -f "$srcdir/$f"; then
25281           # Source tree
25282           echo $srcdir/$f
25283         else
25284           # /dev/null tree
25285           { { echo "$as_me:25285: error: cannot find input file: $f" >&5
25286echo "$as_me: error: cannot find input file: $f" >&2;}
25287   { (exit 1); exit 1; }; }
25288         fi;;
25289      esac
25290    done` || { (exit 1); exit 1; }
25291EOF
25292cat >>$CONFIG_STATUS <<\EOF
25293  ac_warn_datarootdir=no
25294  if test x"$ac_file" != x-; then
25295    for ac_item in $ac_file_inputs
25296    do
25297      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25298      if test -n "$ac_seen"; then
25299        ac_used=`grep '@datarootdir@' $ac_item`
25300        if test -z "$ac_used"; then
25301          { echo "$as_me:25301: WARNING: datarootdir was used implicitly but not set:
25302$ac_seen" >&5
25303echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25304$ac_seen" >&2;}
25305          ac_warn_datarootdir=yes
25306        fi
25307      fi
25308      ac_seen=`grep '${datarootdir}' $ac_item`
25309      if test -n "$ac_seen"; then
25310        { echo "$as_me:25310: WARNING: datarootdir was used explicitly but not set:
25311$ac_seen" >&5
25312echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25313$ac_seen" >&2;}
25314        ac_warn_datarootdir=yes
25315      fi
25316    done
25317  fi
25318
25319if test "x$ac_warn_datarootdir" = xyes; then
25320  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25321fi
25322
25323EOF
25324cat >>$CONFIG_STATUS <<EOF
25325  sed "$ac_vpsub
25326$extrasub
25327EOF
25328cat >>$CONFIG_STATUS <<\EOF
25329:t
25330/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25331s,@configure_input@,$configure_input,;t t
25332s,@srcdir@,$ac_srcdir,;t t
25333s,@top_srcdir@,$ac_top_srcdir,;t t
25334s,@INSTALL@,$ac_INSTALL,;t t
25335" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25336  rm -f $tmp/stdin
25337  if test x"$ac_file" != x-; then
25338    cp $tmp/out $ac_file
25339
25340    for ac_name in prefix exec_prefix datarootdir
25341    do
25342        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25343        if test -n "$ac_seen"; then
25344            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
25345            if test -z "$ac_init"; then
25346              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25347              { echo "$as_me:25347: WARNING: Variable $ac_name is used but was not set:
25348$ac_seen" >&5
25349echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25350$ac_seen" >&2;}
25351            fi
25352        fi
25353    done
25354    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25355    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25356    if test -s $tmp/out; then
25357      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25358      { echo "$as_me:25358: WARNING: Some variables may not be substituted:
25359$ac_seen" >&5
25360echo "$as_me: WARNING: Some variables may not be substituted:
25361$ac_seen" >&2;}
25362    fi
25363  else
25364    cat $tmp/out
25365  fi
25366  rm -f $tmp/out
25367
25368done
25369EOF
25370cat >>$CONFIG_STATUS <<\EOF
25371
25372#
25373# CONFIG_HEADER section.
25374#
25375
25376# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25377# NAME is the cpp macro being defined and VALUE is the value it is being given.
25378#
25379# ac_d sets the value in "#define NAME VALUE" lines.
25380ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
25381ac_dB='[ 	].*$,\1#\2'
25382ac_dC=' '
25383ac_dD=',;t'
25384# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25385ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25386ac_iB='\([ 	]\),\1#\2define\3'
25387ac_iC=' '
25388ac_iD='\4,;t'
25389# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25390ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25391ac_uB='$,\1#\2define\3'
25392ac_uC=' '
25393ac_uD=',;t'
25394
25395for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25396  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25397  case $ac_file in
25398  - | *:- | *:-:* ) # input from stdin
25399        cat >$tmp/stdin
25400        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25401        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25402  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25403        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25404  * )   ac_file_in=$ac_file.in ;;
25405  esac
25406
25407  test x"$ac_file" != x- && { echo "$as_me:25407: creating $ac_file" >&5
25408echo "$as_me: creating $ac_file" >&6;}
25409
25410  # First look for the input files in the build tree, otherwise in the
25411  # src tree.
25412  ac_file_inputs=`IFS=:
25413    for f in $ac_file_in; do
25414      case $f in
25415      -) echo $tmp/stdin ;;
25416      [\\/$]*)
25417         # Absolute (can't be DOS-style, as IFS=:)
25418         test -f "$f" || { { echo "$as_me:25418: error: cannot find input file: $f" >&5
25419echo "$as_me: error: cannot find input file: $f" >&2;}
25420   { (exit 1); exit 1; }; }
25421         echo $f;;
25422      *) # Relative
25423         if test -f "$f"; then
25424           # Build tree
25425           echo $f
25426         elif test -f "$srcdir/$f"; then
25427           # Source tree
25428           echo $srcdir/$f
25429         else
25430           # /dev/null tree
25431           { { echo "$as_me:25431: error: cannot find input file: $f" >&5
25432echo "$as_me: error: cannot find input file: $f" >&2;}
25433   { (exit 1); exit 1; }; }
25434         fi;;
25435      esac
25436    done` || { (exit 1); exit 1; }
25437  # Remove the trailing spaces.
25438  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
25439
25440EOF
25441
25442# Transform confdefs.h into a list of #define's.  We won't use it as a sed
25443# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25444# be either 'cat' or 'sort'.
25445sort -u confdefs.h | uniq >conftest.vals
25446
25447# Break up conftest.vals because some shells have a limit on
25448# the size of here documents, and old seds have small limits too.
25449
25450rm -f conftest.tail
25451echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25452while grep . conftest.vals >/dev/null
25453do
25454  # Write chunks of a limited-size here document to conftest.frag.
25455  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25456  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25457  echo 'CEOF' >> $CONFIG_STATUS
25458  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25459  rm -f conftest.vals
25460  mv conftest.tail conftest.vals
25461done
25462rm -f conftest.vals
25463
25464# Run sed to substitute the contents of conftest.frag into $tmp/in at the
25465# marker @DEFS@.
25466echo '  cat >> conftest.edit <<CEOF
25467/@DEFS@/r conftest.frag
25468/@DEFS@/d
25469CEOF
25470sed -f conftest.edit $tmp/in > $tmp/out
25471rm -f $tmp/in
25472mv $tmp/out $tmp/in
25473rm -f conftest.edit conftest.frag
25474' >> $CONFIG_STATUS
25475
25476cat >>$CONFIG_STATUS <<\EOF
25477  # Let's still pretend it is `configure' which instantiates (i.e., don't
25478  # use $as_me), people would be surprised to read:
25479  #    /* config.h.  Generated automatically by config.status.  */
25480  if test x"$ac_file" = x-; then
25481    echo "/* Generated automatically by configure.  */" >$tmp/config.h
25482  else
25483    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25484  fi
25485  cat $tmp/in >>$tmp/config.h
25486  rm -f $tmp/in
25487  if test x"$ac_file" != x-; then
25488    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25489      { echo "$as_me:25489: $ac_file is unchanged" >&5
25490echo "$as_me: $ac_file is unchanged" >&6;}
25491    else
25492      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25493         X"$ac_file" : 'X\(//\)[^/]' \| \
25494         X"$ac_file" : 'X\(//\)$' \| \
25495         X"$ac_file" : 'X\(/\)' \| \
25496         .     : '\(.\)' 2>/dev/null ||
25497echo X"$ac_file" |
25498    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25499  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25500  	  /^X\(\/\/\)$/{ s//\1/; q; }
25501  	  /^X\(\/\).*/{ s//\1/; q; }
25502  	  s/.*/./; q'`
25503      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25504        { case "$ac_dir" in
25505  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25506  *)                      as_incr_dir=.;;
25507esac
25508as_dummy="$ac_dir"
25509for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25510  case $as_mkdir_dir in
25511    # Skip DOS drivespec
25512    ?:) as_incr_dir=$as_mkdir_dir ;;
25513    *)
25514      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25515      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25516    ;;
25517  esac
25518done; }
25519
25520      fi
25521      rm -f $ac_file
25522      mv $tmp/config.h $ac_file
25523    fi
25524  else
25525    cat $tmp/config.h
25526    rm -f $tmp/config.h
25527  fi
25528done
25529EOF
25530cat >>$CONFIG_STATUS <<\EOF
25531#
25532# CONFIG_COMMANDS section.
25533#
25534for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25535  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25536  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25537
25538  case $ac_dest in
25539    default-1 ) for ac_file in $CONFIG_FILES; do
25540
25541        # Support "outfile[:infile[:infile...]]"
25542        case "$ac_file" in
25543          (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25544        esac
25545
25546        # PO directories have a Makefile.in generated from Makefile.inn.
25547        case "$ac_file" in
25548        (*/[Mm]akefile.in)
25549          # Adjust a relative srcdir.
25550          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
25551          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
25552          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
25553          ac_base=`basename $ac_file .in`
25554          # In autoconf-2.13 it is called $ac_given_srcdir.
25555          # In autoconf-2.50 it is called $srcdir.
25556          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
25557
25558          case "$ac_given_srcdir" in
25559            (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
25560            (/*) top_srcdir="$ac_given_srcdir" ;;
25561            (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
25562          esac
25563
25564          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
25565            rm -f "$ac_dir/POTFILES"
25566            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
25567            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
25568            test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
25569            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
25570          fi
25571          ;;
25572        esac
25573      done ;;
25574    default )
25575
25576cf_libname=\${LIB_BASENAME}
25577cf_liblink=$cf_libname
25578cf_libroot=$cf_libname
25579
25580if test "x$cf_cv_do_symlinks" = xyes
25581then
25582	case "x$cf_cv_shlib_version" in
25583	(xrel)
25584		cf_liblink="\${LIB_ABI_NAME}"
25585		cf_libname="\${LIB_REL_NAME}"
25586		;;
25587	(xabi)
25588		cf_liblink="\${LIB_REL_NAME}"
25589		cf_libname="\${LIB_ABI_NAME}"
25590		;;
25591	esac
25592fi
25593LIB_TARGET=$cf_libname
25594
25595case x$LIB_MODEL in
25596(xlibtool|xshared)
25597	cf_libdeps="\${LIBS} \${LDFLAGS}"
25598	;;
25599(x*)
25600	cf_libdeps=
25601	;;
25602esac
25603
25604cat >>makefile <<CF_EOF
25605
25606# generated by CF__ADD_SHLIB_RULES
25607# libmodel: $LIB_MODEL
25608# symlinks: $cf_cv_do_symlinks
25609# shlibver: $cf_cv_shlib_version
25610
25611CF_EOF
25612
25613cat >>makefile <<CF_EOF
25614$cf_libname :: \\
25615CF_EOF
25616
25617cat >>makefile <<CF_EOF
25618		\${LIB_OBJECT}
25619	@echo linking \$@
25620	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
25621CF_EOF
25622
25623if test "x$cf_cv_do_symlinks" = xyes
25624then
25625cat >>makefile <<CF_EOF
25626	\$(LN_S) $cf_libname $cf_liblink
25627	\$(LN_S) $cf_liblink $cf_libroot
25628CF_EOF
25629fi
25630
25631cat >>makefile <<CF_EOF
25632
25633install \\
25634install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
25635
25636\$(DESTDIR)\$(libdir)/$cf_libname :: \\
25637		\$(DESTDIR)\$(libdir) \\
25638		\${LIB_OBJECT}
25639	@echo linking \$@
25640	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
25641CF_EOF
25642
25643if test "x$cf_cv_do_symlinks" = xyes
25644then
25645cat >>makefile <<CF_EOF
25646	cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
25647CF_EOF
25648fi
25649
25650if test x$LIB_MODEL = xshared
25651then
25652cat >>makefile <<CF_EOF
25653	- \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
25654CF_EOF
25655fi
25656
25657cat >>makefile <<CF_EOF
25658
25659uninstall \\
25660uninstall.libs ::
25661	@echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
25662CF_EOF
25663
25664if test "x$cf_cv_do_symlinks" = xyes
25665then
25666cat >>makefile <<CF_EOF
25667	-rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
25668	-rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
25669CF_EOF
25670fi
25671
25672cat >>makefile <<CF_EOF
25673	-rm -f \$(DESTDIR)\$(libdir)/$cf_libname
25674
25675clean \\
25676clean.libs ::
25677CF_EOF
25678
25679if test "x$cf_cv_do_symlinks" = xyes
25680then
25681cat >>makefile <<CF_EOF
25682	-rm -f $cf_libroot
25683	-rm -f $cf_liblink
25684CF_EOF
25685fi
25686
25687cat >>makefile <<CF_EOF
25688	-rm -f $cf_libname
25689
25690mostlyclean::
25691	-rm -f \${LIB_OBJECT}
25692# end generated by CF__ADD_SHLIB_RULES
25693CF_EOF
25694
25695 ;;
25696  esac
25697done
25698EOF
25699
25700cat >>$CONFIG_STATUS <<\EOF
25701
25702{ (exit 0); exit 0; }
25703EOF
25704chmod +x $CONFIG_STATUS
25705ac_clean_files=$ac_clean_files_save
25706
25707# configure is writing to config.log, and then calls config.status.
25708# config.status does its own redirection, appending to config.log.
25709# Unfortunately, on DOS this fails, as config.log is still kept open
25710# by configure, so config.status won't be able to write to it; its
25711# output is simply discarded.  So we exec the FD to /dev/null,
25712# effectively closing config.log, so it can be properly (re)opened and
25713# appended to by config.status.  When coming back to configure, we
25714# need to make the FD available again.
25715if test "$no_create" != yes; then
25716  ac_cs_success=:
25717  exec 5>/dev/null
25718  $SHELL $CONFIG_STATUS || ac_cs_success=false
25719  exec 5>>config.log
25720  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25721  # would make configure fail if this is the last instruction.
25722  $ac_cs_success || { (exit 1); exit 1; }
25723fi
25724
25725