1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20210105.
4#
5# Copyright 2003-2020,2021	Thomas E. Dickey
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if ln -s conf$$.file conf$$ 2>/dev/null; then
44  # We could just check for DJGPP; but this test a) works b) is more generic
45  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46  if test -f conf$$.exe; then
47    # Don't use ln at all; we don't have any links
48    as_ln_s='cp -p'
49  else
50    as_ln_s='ln -s'
51  fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset="unset"
64else
65  as_unset="false"
66fi
67
68# NLS nuisances.
69$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" 	$as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS=
101MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103
104# Maximum number of lines to put in a shell here document.
105# This variable seems obsolete.  It should probably be removed, and
106# only ac_max_sed_lines should be used.
107: "${ac_max_here_lines=38}"
108
109ac_unique_file="luit.c"
110
111# Initialize some variables set by options.
112ac_init_help=
113ac_init_version=false
114# The variables have the same names as the options, with
115# dashes changed to underlines.
116cache_file=/dev/null
117exec_prefix=NONE
118no_create=
119no_recursion=
120prefix=NONE
121program_prefix=NONE
122program_suffix=NONE
123program_transform_name=s,x,x,
124silent=
125site=
126srcdir=
127verbose=
128x_includes=NONE
129x_libraries=NONE
130
131# Installation directory options.
132# These are left unexpanded so users can "make install exec_prefix=/foo"
133# and all the variables that are supposed to be based on exec_prefix
134# by default will actually change.
135# Use braces instead of parens because sh, perl, etc. also accept them.
136bindir='${exec_prefix}/bin'
137sbindir='${exec_prefix}/sbin'
138libexecdir='${exec_prefix}/libexec'
139datarootdir='${prefix}/share'
140datadir='${datarootdir}'
141sysconfdir='${prefix}/etc'
142sharedstatedir='${prefix}/com'
143localstatedir='${prefix}/var'
144runstatedir='${localstatedir}/run'
145libdir='${exec_prefix}/lib'
146includedir='${prefix}/include'
147oldincludedir='/usr/include'
148infodir='${datarootdir}/info'
149mandir='${datarootdir}/man'
150
151# Identity of this package.
152PACKAGE_NAME=
153PACKAGE_TARNAME=
154PACKAGE_VERSION=
155PACKAGE_STRING=
156PACKAGE_BUGREPORT=
157
158ac_prev=
159for ac_option
160do
161  # If the previous option needs an argument, assign it.
162  if test -n "$ac_prev"; then
163    eval "$ac_prev=\$ac_option"
164    ac_prev=
165    continue
166  fi
167
168  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
169
170  # Accept the important Cygnus configure options, so we can diagnose typos.
171
172  case "$ac_option" in
173
174  -bindir | --bindir | --bindi | --bind | --bin | --bi)
175    ac_prev=bindir ;;
176  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177    bindir=$ac_optarg ;;
178
179  -build | --build | --buil | --bui | --bu)
180    ac_prev=build_alias ;;
181  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182    build_alias=$ac_optarg ;;
183
184  -cache-file | --cache-file | --cache-fil | --cache-fi \
185  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
186    ac_prev=cache_file ;;
187  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
188  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
189    cache_file=$ac_optarg ;;
190
191  --config-cache | -C)
192    cache_file=config.cache ;;
193
194  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
195    ac_prev=datadir ;;
196  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
197  | --da=*)
198    datadir=$ac_optarg ;;
199
200  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
201  | --dataroo | --dataro | --datar)
202    ac_prev=datarootdir ;;
203  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
204  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
205    datarootdir=$ac_optarg ;;
206
207  -disable-* | --disable-*)
208    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
209    # Reject names that are not valid shell variable names.
210    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
211      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
212   { (exit 1); exit 1; }; }
213    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
214    eval "enable_$ac_feature=no" ;;
215
216  -enable-* | --enable-*)
217    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
218    # Reject names that are not valid shell variable names.
219    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
220      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
221   { (exit 1); exit 1; }; }
222    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
223    case "$ac_option" in
224      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225      *) ac_optarg=yes ;;
226    esac
227    eval "enable_$ac_feature='$ac_optarg'" ;;
228
229  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231  | --exec | --exe | --ex)
232    ac_prev=exec_prefix ;;
233  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235  | --exec=* | --exe=* | --ex=*)
236    exec_prefix=$ac_optarg ;;
237
238  -gas | --gas | --ga | --g)
239    # Obsolete; use --with-gas.
240    with_gas=yes ;;
241
242  -help | --help | --hel | --he | -h)
243    ac_init_help=long ;;
244  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
245    ac_init_help=recursive ;;
246  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
247    ac_init_help=short ;;
248
249  -host | --host | --hos | --ho)
250    ac_prev=host_alias ;;
251  -host=* | --host=* | --hos=* | --ho=*)
252    host_alias=$ac_optarg ;;
253
254  -includedir | --includedir | --includedi | --included | --include \
255  | --includ | --inclu | --incl | --inc)
256    ac_prev=includedir ;;
257  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258  | --includ=* | --inclu=* | --incl=* | --inc=*)
259    includedir=$ac_optarg ;;
260
261  -infodir | --infodir | --infodi | --infod | --info | --inf)
262    ac_prev=infodir ;;
263  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264    infodir=$ac_optarg ;;
265
266  -libdir | --libdir | --libdi | --libd)
267    ac_prev=libdir ;;
268  -libdir=* | --libdir=* | --libdi=* | --libd=*)
269    libdir=$ac_optarg ;;
270
271  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272  | --libexe | --libex | --libe)
273    ac_prev=libexecdir ;;
274  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275  | --libexe=* | --libex=* | --libe=*)
276    libexecdir=$ac_optarg ;;
277
278  -localstatedir | --localstatedir | --localstatedi | --localstated \
279  | --localstate | --localstat | --localsta | --localst \
280  | --locals | --local | --loca | --loc | --lo)
281    ac_prev=localstatedir ;;
282  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285    localstatedir=$ac_optarg ;;
286
287  -runstatedir | --runstatedir | --runstatedi | --runstated \
288  | --runstate | --runstat | --runsta | --runst \
289  | --runs | --run | --ru)
290    ac_prev=runstatedir ;;
291  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
292  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
293  | --runs=* | --run=* | --ru=*)
294    runstatedir=$ac_optarg ;;
295
296  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
297    ac_prev=mandir ;;
298  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
299    mandir=$ac_optarg ;;
300
301  -nfp | --nfp | --nf)
302    # Obsolete; use --without-fp.
303    with_fp=no ;;
304
305  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
306  | --no-cr | --no-c)
307    no_create=yes ;;
308
309  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
311    no_recursion=yes ;;
312
313  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315  | --oldin | --oldi | --old | --ol | --o)
316    ac_prev=oldincludedir ;;
317  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320    oldincludedir=$ac_optarg ;;
321
322  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
323    ac_prev=prefix ;;
324  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
325    prefix=$ac_optarg ;;
326
327  -program-prefix | --program-prefix | --program-prefi | --program-pref \
328  | --program-pre | --program-pr | --program-p)
329    ac_prev=program_prefix ;;
330  -program-prefix=* | --program-prefix=* | --program-prefi=* \
331  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332    program_prefix=$ac_optarg ;;
333
334  -program-suffix | --program-suffix | --program-suffi | --program-suff \
335  | --program-suf | --program-su | --program-s)
336    ac_prev=program_suffix ;;
337  -program-suffix=* | --program-suffix=* | --program-suffi=* \
338  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339    program_suffix=$ac_optarg ;;
340
341  -program-transform-name | --program-transform-name \
342  | --program-transform-nam | --program-transform-na \
343  | --program-transform-n | --program-transform- \
344  | --program-transform | --program-transfor \
345  | --program-transfo | --program-transf \
346  | --program-trans | --program-tran \
347  | --progr-tra | --program-tr | --program-t)
348    ac_prev=program_transform_name ;;
349  -program-transform-name=* | --program-transform-name=* \
350  | --program-transform-nam=* | --program-transform-na=* \
351  | --program-transform-n=* | --program-transform-=* \
352  | --program-transform=* | --program-transfor=* \
353  | --program-transfo=* | --program-transf=* \
354  | --program-trans=* | --program-tran=* \
355  | --progr-tra=* | --program-tr=* | --program-t=*)
356    program_transform_name=$ac_optarg ;;
357
358  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359  | -silent | --silent | --silen | --sile | --sil)
360    silent=yes ;;
361
362  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
363    ac_prev=sbindir ;;
364  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
365  | --sbi=* | --sb=*)
366    sbindir=$ac_optarg ;;
367
368  -sharedstatedir | --sharedstatedir | --sharedstatedi \
369  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370  | --sharedst | --shareds | --shared | --share | --shar \
371  | --sha | --sh)
372    ac_prev=sharedstatedir ;;
373  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
376  | --sha=* | --sh=*)
377    sharedstatedir=$ac_optarg ;;
378
379  -site | --site | --sit)
380    ac_prev=site ;;
381  -site=* | --site=* | --sit=*)
382    site=$ac_optarg ;;
383
384  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
385    ac_prev=srcdir ;;
386  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
387    srcdir=$ac_optarg ;;
388
389  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
390  | --syscon | --sysco | --sysc | --sys | --sy)
391    ac_prev=sysconfdir ;;
392  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
393  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
394    sysconfdir=$ac_optarg ;;
395
396  -target | --target | --targe | --targ | --tar | --ta | --t)
397    ac_prev=target_alias ;;
398  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
399    target_alias=$ac_optarg ;;
400
401  -v | -verbose | --verbose | --verbos | --verbo | --verb)
402    verbose=yes ;;
403
404  -version | --version | --versio | --versi | --vers | -V)
405    ac_init_version=: ;;
406
407  -with-* | --with-*)
408    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
409    # Reject names that are not valid shell variable names.
410    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411      { echo "$as_me: error: invalid package name: $ac_package" >&2
412   { (exit 1); exit 1; }; }
413    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
414    case "$ac_option" in
415      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416      *) ac_optarg=yes ;;
417    esac
418    eval "with_$ac_package='$ac_optarg'" ;;
419
420  -without-* | --without-*)
421    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
422    # Reject names that are not valid shell variable names.
423    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
424      { echo "$as_me: error: invalid package name: $ac_package" >&2
425   { (exit 1); exit 1; }; }
426    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
427    eval "with_$ac_package=no" ;;
428
429  --x)
430    # Obsolete; use --with-x.
431    with_x=yes ;;
432
433  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434  | --x-incl | --x-inc | --x-in | --x-i)
435    ac_prev=x_includes ;;
436  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438    x_includes=$ac_optarg ;;
439
440  -x-libraries | --x-libraries | --x-librarie | --x-librari \
441  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442    ac_prev=x_libraries ;;
443  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445    x_libraries=$ac_optarg ;;
446
447  -*) { echo "$as_me: error: unrecognized option: $ac_option
448Try \`$0 --help' for more information." >&2
449   { (exit 1); exit 1; }; }
450    ;;
451
452  *=*)
453    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
454    # Reject names that are not valid shell variable names.
455    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
456      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
457   { (exit 1); exit 1; }; }
458    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
459    eval "$ac_envvar='$ac_optarg'"
460    export "$ac_envvar" ;;
461
462  *)
463    # FIXME: should be removed in autoconf 3.0.
464    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
465    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
466      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
467    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
468    ;;
469
470  esac
471done
472
473if test -n "$ac_prev"; then
474  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
475  { echo "$as_me: error: missing argument to $ac_option" >&2
476   { (exit 1); exit 1; }; }
477fi
478
479# Be sure to have absolute paths.
480for ac_var in exec_prefix prefix
481do
482  eval ac_val=$`echo "$ac_var"`
483  case "$ac_val" in
484    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486   { (exit 1); exit 1; }; };;
487  esac
488done
489
490# Be sure to have absolute paths.
491for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492              localstatedir libdir includedir oldincludedir infodir mandir
493do
494  eval ac_val=$`echo "$ac_var"`
495  case "$ac_val" in
496    [\\/$]* | ?:[\\/]* ) ;;
497    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498   { (exit 1); exit 1; }; };;
499  esac
500done
501
502# There might be people who depend on the old broken behavior: `$host'
503# used to hold the argument of --host etc.
504build=$build_alias
505host=$host_alias
506target=$target_alias
507
508# FIXME: should be removed in autoconf 3.0.
509if test "x$host_alias" != x; then
510  if test "x$build_alias" = x; then
511    cross_compiling=maybe
512    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
513    If a cross compiler is detected then cross compile mode will be used." >&2
514  elif test "x$build_alias" != "x$host_alias"; then
515    cross_compiling=yes
516  fi
517fi
518
519ac_tool_prefix=
520test -n "$host_alias" && ac_tool_prefix=$host_alias-
521
522test "$silent" = yes && exec 6>/dev/null
523
524# Find the source files, if location was not specified.
525if test -z "$srcdir"; then
526  ac_srcdir_defaulted=yes
527  # Try the directory containing this script, then its parent.
528  ac_prog=$0
529  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
531  srcdir=$ac_confdir
532  if test ! -r "$srcdir/$ac_unique_file"; then
533    srcdir=..
534  fi
535else
536  ac_srcdir_defaulted=no
537fi
538if test ! -r "$srcdir/$ac_unique_file"; then
539  if test "$ac_srcdir_defaulted" = yes; then
540    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
541   { (exit 1); exit 1; }; }
542  else
543    { echo "$as_me: error: cannot find sources in $srcdir" >&2
544   { (exit 1); exit 1; }; }
545  fi
546fi
547srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548ac_env_build_alias_set=${build_alias+set}
549ac_env_build_alias_value=$build_alias
550ac_cv_env_build_alias_set=${build_alias+set}
551ac_cv_env_build_alias_value=$build_alias
552ac_env_host_alias_set=${host_alias+set}
553ac_env_host_alias_value=$host_alias
554ac_cv_env_host_alias_set=${host_alias+set}
555ac_cv_env_host_alias_value=$host_alias
556ac_env_target_alias_set=${target_alias+set}
557ac_env_target_alias_value=$target_alias
558ac_cv_env_target_alias_set=${target_alias+set}
559ac_cv_env_target_alias_value=$target_alias
560ac_env_CC_set=${CC+set}
561ac_env_CC_value=$CC
562ac_cv_env_CC_set=${CC+set}
563ac_cv_env_CC_value=$CC
564ac_env_CFLAGS_set=${CFLAGS+set}
565ac_env_CFLAGS_value=$CFLAGS
566ac_cv_env_CFLAGS_set=${CFLAGS+set}
567ac_cv_env_CFLAGS_value=$CFLAGS
568ac_env_LDFLAGS_set=${LDFLAGS+set}
569ac_env_LDFLAGS_value=$LDFLAGS
570ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571ac_cv_env_LDFLAGS_value=$LDFLAGS
572ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573ac_env_CPPFLAGS_value=$CPPFLAGS
574ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576ac_env_CPP_set=${CPP+set}
577ac_env_CPP_value=$CPP
578ac_cv_env_CPP_set=${CPP+set}
579ac_cv_env_CPP_value=$CPP
580
581#
582# Report the --help message.
583#
584if test "$ac_init_help" = "long"; then
585  # Omit some internal or obsolete options to make the list less imposing.
586  # This message is too long to be a string in the A/UX 3.1 sh.
587  cat <<EOF
588\`configure' configures this package to adapt to many kinds of systems.
589
590Usage: $0 [OPTION]... [VAR=VALUE]...
591
592To assign environment variables (e.g., CC, CFLAGS...), specify them as
593VAR=VALUE.  See below for descriptions of some of the useful variables.
594
595Defaults for the options are specified in brackets.
596
597Configuration:
598  -h, --help              display this help and exit
599      --help=short        display options specific to this package
600      --help=recursive    display the short help of all the included packages
601  -V, --version           display version information and exit
602  -q, --quiet, --silent   do not print \`checking...' messages
603      --cache-file=FILE   cache test results in FILE [disabled]
604  -C, --config-cache      alias for \`--cache-file=config.cache'
605  -n, --no-create         do not create output files
606      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
607
608EOF
609
610  cat <<EOF
611Installation directories:
612  --prefix=PREFIX         install architecture-independent files in PREFIX
613                          [$ac_default_prefix]
614  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
615                          [PREFIX]
616
617By default, \`make install' will install all the files in
618\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
619an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620for instance \`--prefix=\$HOME'.
621
622For better control, use the options below.
623
624Fine tuning of the installation directories:
625  --bindir=DIR            user executables [EPREFIX/bin]
626  --sbindir=DIR           system admin executables [EPREFIX/sbin]
627  --libexecdir=DIR        program executables [EPREFIX/libexec]
628  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
629  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
630  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
631  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
632  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
633  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
634  --libdir=DIR            object code libraries [EPREFIX/lib]
635  --includedir=DIR        C header files [PREFIX/include]
636  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
637  --infodir=DIR           info documentation [DATAROOTDIR/info]
638  --mandir=DIR            man documentation [DATAROOTDIR/man]
639EOF
640
641  cat <<\EOF
642
643Program names:
644  --program-prefix=PREFIX            prepend PREFIX to installed program names
645  --program-suffix=SUFFIX            append SUFFIX to installed program names
646  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
647
648System types:
649  --build=BUILD           configure for building on BUILD [guessed]
650  --host=HOST       build programs to run on HOST [BUILD]
651EOF
652fi
653
654if test -n "$ac_init_help"; then
655
656  cat <<\EOF
657
658Optional Features:
659  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
660  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
661
662Optional Packages:
663  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
664  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
665
666  --disable-echo          do not display "compiling" commands
667  --enable-warnings       test: turn on gcc compiler warnings
668  --enable-fontenc        enable/disable use of fontenc
669  --disable-iconv         enable/disable use of iconv
670  --with-pkg-config{=path} enable/disable use of pkg-config
671  --with-fontenc-cflags   -D/-I options for compiling with font encoding library
672  --with-fontenc-libs     -L/-l options to link font encoding library
673  --with-libiconv-prefix=DIR
674                          search for libiconv in DIR/include and DIR/lib
675  --with-encodings-dir=XXX file used for encodings directory (default: auto)
676  --with-locale-alias=XXX file used for locale aliases (default: auto)
677  --with-man2html=XXX     use XXX rather than groff
678  --with-dmalloc          test: use Gray Watson's dmalloc library
679  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
680  --with-valgrind         test: use valgrind
681  --disable-leaks         test: free permanent memory, analyze leaks
682  --enable-trace          test: turn on debug-tracing
683  --disable-rpath-hack    don't add rpath options for additional libraries
684
685Some influential environment variables:
686  CC          C compiler command
687  CFLAGS      C compiler flags
688  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
689              nonstandard directory <lib dir>
690  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
691              headers in a nonstandard directory <include dir>
692  CPP         C preprocessor
693
694Use these variables to override the choices made by `configure' or to help
695it to find libraries and programs with nonstandard names/locations.
696
697EOF
698fi
699
700if test "$ac_init_help" = "recursive"; then
701  # If there are subdirs, report their specific --help.
702  ac_popdir=`pwd`
703  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
704    cd "$ac_subdir"
705    # A "../" for each directory in /$ac_subdir.
706    ac_dots=`echo "$ac_subdir" |
707             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
708
709    case "$srcdir" in
710    .) # No --srcdir option.  We are building in place.
711      ac_sub_srcdir="$srcdir" ;;
712    [\\/]* | ?:[\\/]* ) # Absolute path.
713      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
714    *) # Relative path.
715      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
716    esac
717
718    # Check for guested configure; otherwise get Cygnus style configure.
719    if test -f "$ac_sub_srcdir/configure.gnu"; then
720      echo
721      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
722    elif test -f "$ac_sub_srcdir/configure"; then
723      echo
724      $SHELL "$ac_sub_srcdir/configure" --help=recursive
725    elif test -f "$ac_sub_srcdir/configure.ac" ||
726           test -f "$ac_sub_srcdir/configure.in"; then
727      echo
728      "$ac_configure" --help
729    else
730      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
731    fi
732    cd "$ac_popdir"
733  done
734fi
735
736test -n "$ac_init_help" && exit 0
737if "$ac_init_version"; then
738  cat <<\EOF
739
740Copyright 2003-2020,2021	Thomas E. Dickey
741Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
742Free Software Foundation, Inc.
743This configure script is free software; the Free Software Foundation
744gives unlimited permission to copy, distribute and modify it.
745EOF
746  exit 0
747fi
748exec 5>config.log
749cat >&5 <<EOF
750This file contains any messages produced by compilers while
751running configure, to aid debugging if configure makes a mistake.
752
753It was created by $as_me, which was
754generated by GNU Autoconf 2.52.20210105.  Invocation command line was
755
756  $ $0 $@
757
758EOF
759{
760cat <<_ASUNAME
761## ---------- ##
762## Platform.  ##
763## ---------- ##
764
765hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
766uname -m = `(uname -m) 2>/dev/null || echo unknown`
767uname -r = `(uname -r) 2>/dev/null || echo unknown`
768uname -s = `(uname -s) 2>/dev/null || echo unknown`
769uname -v = `(uname -v) 2>/dev/null || echo unknown`
770
771/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
772/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
773
774/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
775/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
776/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
777hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
778/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
779/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
780/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
781
782PATH = $PATH
783
784_ASUNAME
785} >&5
786
787cat >&5 <<EOF
788## ------------ ##
789## Core tests.  ##
790## ------------ ##
791
792EOF
793
794# Keep a trace of the command line.
795# Strip out --no-create and --no-recursion so they do not pile up.
796# Also quote any args containing shell meta-characters.
797ac_configure_args=
798ac_sep=
799for ac_arg
800do
801  case "$ac_arg" in
802  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
803  | --no-cr | --no-c) ;;
804  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
805  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
806  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
807    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
808    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
809    ac_sep=" " ;;
810  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
811     ac_sep=" " ;;
812  esac
813  # Get rid of the leading space.
814done
815
816# When interrupted or exit'd, cleanup temporary files, and complete
817# config.log.  We remove comments because anyway the quotes in there
818# would cause problems or look ugly.
819trap 'exit_status=$?
820  # Save into config.log some information that might help in debugging.
821  echo >&5
822  echo "## ----------------- ##" >&5
823  echo "## Cache variables.  ##" >&5
824  echo "## ----------------- ##" >&5
825  echo >&5
826  # The following way of writing the cache mishandles newlines in values,
827{
828  (set) 2>&1 |
829    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
830    *ac_space=\ *)
831      sed -n \
832        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
833    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
834      ;;
835    *)
836      sed -n \
837        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
838      ;;
839    esac;
840} >&5
841  sed "/^$/d" confdefs.h >conftest.log
842  if test -s conftest.log; then
843    echo >&5
844    echo "## ------------ ##" >&5
845    echo "## confdefs.h.  ##" >&5
846    echo "## ------------ ##" >&5
847    echo >&5
848    cat conftest.log >&5
849  fi
850  (echo; echo) >&5
851  test "$ac_signal" != 0 &&
852    echo "$as_me: caught signal $ac_signal" >&5
853  echo "$as_me: exit $exit_status" >&5
854  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
855    exit $exit_status
856     ' 0
857for ac_signal in 1 2 13 15; do
858  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
859done
860ac_signal=0
861
862# confdefs.h avoids OS command line length limits that DEFS can exceed.
863rm -rf conftest* confdefs.h
864# AIX cpp loses on an empty file, so make sure it contains at least a newline.
865echo >confdefs.h
866
867# Let the site file select an alternate cache file if it wants to.
868# Prefer explicitly selected file to automatically selected ones.
869if test -z "$CONFIG_SITE"; then
870  if test "x$prefix" != xNONE; then
871    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
872  else
873    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
874  fi
875fi
876for ac_site_file in $CONFIG_SITE; do
877  if test -r "$ac_site_file"; then
878    { echo "$as_me:878: loading site script $ac_site_file" >&5
879echo "$as_me: loading site script $ac_site_file" >&6;}
880    cat "$ac_site_file" >&5
881    . "$ac_site_file"
882  fi
883done
884
885if test -r "$cache_file"; then
886  # Some versions of bash will fail to source /dev/null (special
887  # files actually), so we avoid doing that.
888  if test -f "$cache_file"; then
889    { echo "$as_me:889: loading cache $cache_file" >&5
890echo "$as_me: loading cache $cache_file" >&6;}
891    case $cache_file in
892      [\\/]* | ?:[\\/]* ) . $cache_file;;
893      *)                      . ./$cache_file;;
894    esac
895  fi
896else
897  { echo "$as_me:897: creating cache $cache_file" >&5
898echo "$as_me: creating cache $cache_file" >&6;}
899  >$cache_file
900fi
901
902# Check that the precious variables saved in the cache have kept the same
903# value.
904ac_cache_corrupted=false
905for ac_var in `(set) 2>&1 |
906               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
907  eval ac_old_set=\$ac_cv_env_${ac_var}_set
908  eval ac_new_set=\$ac_env_${ac_var}_set
909  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
910  eval ac_new_val="\$ac_env_${ac_var}_value"
911  case "$ac_old_set,$ac_new_set" in
912    set,)
913      { echo "$as_me:913: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
914echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
915      ac_cache_corrupted=: ;;
916    ,set)
917      { echo "$as_me:917: error: \`$ac_var' was not set in the previous run" >&5
918echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
919      ac_cache_corrupted=: ;;
920    ,);;
921    *)
922      if test "x$ac_old_val" != "x$ac_new_val"; then
923        { echo "$as_me:923: error: \`$ac_var' has changed since the previous run:" >&5
924echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
925        { echo "$as_me:925:   former value:  $ac_old_val" >&5
926echo "$as_me:   former value:  $ac_old_val" >&2;}
927        { echo "$as_me:927:   current value: $ac_new_val" >&5
928echo "$as_me:   current value: $ac_new_val" >&2;}
929        ac_cache_corrupted=:
930      fi;;
931  esac
932  # Pass precious variables to config.status.  It doesn't matter if
933  # we pass some twice (in addition to the command line arguments).
934  if test "$ac_new_set" = set; then
935    case "$ac_new_val" in
936    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
937      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
938      ac_configure_args="$ac_configure_args '$ac_arg'"
939      ;;
940    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
941       ;;
942    esac
943  fi
944done
945if "$ac_cache_corrupted"; then
946  { echo "$as_me:946: error: changes in the environment can compromise the build" >&5
947echo "$as_me: error: changes in the environment can compromise the build" >&2;}
948  { { echo "$as_me:948: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
949echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
950   { (exit 1); exit 1; }; }
951fi
952
953ac_ext=c
954ac_cpp='$CPP $CPPFLAGS'
955ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
956ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
957ac_compiler_gnu=$ac_cv_c_compiler_gnu
958ac_main_return="return"
959
960case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
961  *c*,-n*) ECHO_N=
962           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
963           ECHO_T='	'
964           ;;
965  *c*,*  ) ECHO_N=-n
966           ECHO_C=
967           ECHO_T=
968           ;;
969  *)       ECHO_N=
970           ECHO_C='\c'
971           ECHO_T=
972           ;;
973esac
974echo "#! $SHELL" >conftest.sh
975echo  "exit 0"   >>conftest.sh
976chmod +x conftest.sh
977if { (echo "$as_me:977: PATH=\".;.\"; conftest.sh") >&5
978  (PATH=".;."; conftest.sh) 2>&5
979  ac_status=$?
980  echo "$as_me:980: \$? = $ac_status" >&5
981  (exit "$ac_status"); }; then
982  ac_path_separator=';'
983else
984  ac_path_separator=:
985fi
986PATH_SEPARATOR="$ac_path_separator"
987rm -f conftest.sh
988
989ac_config_headers="$ac_config_headers config.h:config_h.in"
990
991ac_aux_dir=
992for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
993  if test -f "$ac_dir/install-sh"; then
994    ac_aux_dir=$ac_dir
995    ac_install_sh="$ac_aux_dir/install-sh -c"
996    break
997  elif test -f "$ac_dir/install.sh"; then
998    ac_aux_dir=$ac_dir
999    ac_install_sh="$ac_aux_dir/install.sh -c"
1000    break
1001  elif test -f "$ac_dir/shtool"; then
1002    ac_aux_dir=$ac_dir
1003    ac_install_sh="$ac_aux_dir/shtool install -c"
1004    break
1005  fi
1006done
1007if test -z "$ac_aux_dir"; then
1008  { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1009echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1010   { (exit 1); exit 1; }; }
1011fi
1012ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1013ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1014ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015
1016# Make sure we can run config.sub.
1017$ac_config_sub sun4 >/dev/null 2>&1 ||
1018  { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5
1019echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1020   { (exit 1); exit 1; }; }
1021
1022echo "$as_me:1022: checking build system type" >&5
1023echo $ECHO_N "checking build system type... $ECHO_C" >&6
1024if test "${ac_cv_build+set}" = set; then
1025  echo $ECHO_N "(cached) $ECHO_C" >&6
1026else
1027  ac_cv_build_alias=$build_alias
1028test -z "$ac_cv_build_alias" &&
1029  ac_cv_build_alias=`$ac_config_guess`
1030test -z "$ac_cv_build_alias" &&
1031  { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
1032echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1033   { (exit 1); exit 1; }; }
1034ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1035  { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1036echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1037   { (exit 1); exit 1; }; }
1038
1039fi
1040echo "$as_me:1040: result: $ac_cv_build" >&5
1041echo "${ECHO_T}$ac_cv_build" >&6
1042build=$ac_cv_build
1043build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1048	echo "$as_me:1048: checking host system type" >&5
1049echo $ECHO_N "checking host system type... $ECHO_C" >&6
1050if test "${ac_cv_host+set}" = set; then
1051  echo $ECHO_N "(cached) $ECHO_C" >&6
1052else
1053  ac_cv_host_alias=$host_alias
1054test -z "$ac_cv_host_alias" &&
1055  ac_cv_host_alias=$ac_cv_build_alias
1056ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1057  { { echo "$as_me:1057: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1058echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1059   { (exit 1); exit 1; }; }
1060
1061fi
1062echo "$as_me:1062: result: $ac_cv_host" >&5
1063echo "${ECHO_T}$ac_cv_host" >&6
1064host=$ac_cv_host
1065host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1066host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1067host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1068
1069	system_name="$host_os"
1070else
1071	system_name="`(uname -s -r) 2>/dev/null`"
1072	if test -z "$system_name" ; then
1073		system_name="`(hostname) 2>/dev/null`"
1074	fi
1075fi
1076test -n "$system_name" &&
1077cat >>confdefs.h <<EOF
1078#define SYSTEM_NAME "$system_name"
1079EOF
1080
1081if test "${cf_cv_system_name+set}" = set; then
1082  echo $ECHO_N "(cached) $ECHO_C" >&6
1083else
1084  cf_cv_system_name="$system_name"
1085fi
1086
1087test -z "$system_name" && system_name="$cf_cv_system_name"
1088test -n "$cf_cv_system_name" && echo "$as_me:1088: result: Configuring for $cf_cv_system_name" >&5
1089echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1090
1091if test ".$system_name" != ".$cf_cv_system_name" ; then
1092	echo "$as_me:1092: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1093echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1094	{ { echo "$as_me:1094: error: \"Please remove config.cache and try again.\"" >&5
1095echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1096   { (exit 1); exit 1; }; }
1097fi
1098
1099test "$program_prefix" != NONE &&
1100  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1101# Use a double $ so make ignores it.
1102test "$program_suffix" != NONE &&
1103  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1104# Double any \ or $.  echo might interpret backslashes.
1105# By default was `s,x,x', remove it if useless.
1106cat <<\_ACEOF >conftest.sed
1107s/[\\$]/&&/g;s/;s,x,x,$//
1108_ACEOF
1109program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1110rm conftest.sed
1111
1112ac_ext=c
1113ac_cpp='$CPP $CPPFLAGS'
1114ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1115ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1116ac_compiler_gnu=$ac_cv_c_compiler_gnu
1117ac_main_return="return"
1118if test -n "$ac_tool_prefix"; then
1119  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1120set dummy ${ac_tool_prefix}gcc; ac_word=$2
1121echo "$as_me:1121: checking for $ac_word" >&5
1122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1123if test "${ac_cv_prog_CC+set}" = set; then
1124  echo $ECHO_N "(cached) $ECHO_C" >&6
1125else
1126  if test -n "$CC"; then
1127  ac_cv_prog_CC="$CC" # Let the user override the test.
1128else
1129  ac_save_IFS=$IFS; IFS=$ac_path_separator
1130ac_dummy="$PATH"
1131for ac_dir in $ac_dummy; do
1132  IFS=$ac_save_IFS
1133  test -z "$ac_dir" && ac_dir=.
1134  $as_executable_p "$ac_dir/$ac_word" || continue
1135ac_cv_prog_CC="${ac_tool_prefix}gcc"
1136echo "$as_me:1136: found $ac_dir/$ac_word" >&5
1137break
1138done
1139
1140fi
1141fi
1142CC=$ac_cv_prog_CC
1143if test -n "$CC"; then
1144  echo "$as_me:1144: result: $CC" >&5
1145echo "${ECHO_T}$CC" >&6
1146else
1147  echo "$as_me:1147: result: no" >&5
1148echo "${ECHO_T}no" >&6
1149fi
1150
1151fi
1152if test -z "$ac_cv_prog_CC"; then
1153  ac_ct_CC=$CC
1154  # Extract the first word of "gcc", so it can be a program name with args.
1155set dummy gcc; ac_word=$2
1156echo "$as_me:1156: checking for $ac_word" >&5
1157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1158if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1159  echo $ECHO_N "(cached) $ECHO_C" >&6
1160else
1161  if test -n "$ac_ct_CC"; then
1162  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1163else
1164  ac_save_IFS=$IFS; IFS=$ac_path_separator
1165ac_dummy="$PATH"
1166for ac_dir in $ac_dummy; do
1167  IFS=$ac_save_IFS
1168  test -z "$ac_dir" && ac_dir=.
1169  $as_executable_p "$ac_dir/$ac_word" || continue
1170ac_cv_prog_ac_ct_CC="gcc"
1171echo "$as_me:1171: found $ac_dir/$ac_word" >&5
1172break
1173done
1174
1175fi
1176fi
1177ac_ct_CC=$ac_cv_prog_ac_ct_CC
1178if test -n "$ac_ct_CC"; then
1179  echo "$as_me:1179: result: $ac_ct_CC" >&5
1180echo "${ECHO_T}$ac_ct_CC" >&6
1181else
1182  echo "$as_me:1182: result: no" >&5
1183echo "${ECHO_T}no" >&6
1184fi
1185
1186  CC=$ac_ct_CC
1187else
1188  CC="$ac_cv_prog_CC"
1189fi
1190
1191if test -z "$CC"; then
1192  if test -n "$ac_tool_prefix"; then
1193  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1194set dummy ${ac_tool_prefix}cc; ac_word=$2
1195echo "$as_me:1195: checking for $ac_word" >&5
1196echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197if test "${ac_cv_prog_CC+set}" = set; then
1198  echo $ECHO_N "(cached) $ECHO_C" >&6
1199else
1200  if test -n "$CC"; then
1201  ac_cv_prog_CC="$CC" # Let the user override the test.
1202else
1203  ac_save_IFS=$IFS; IFS=$ac_path_separator
1204ac_dummy="$PATH"
1205for ac_dir in $ac_dummy; do
1206  IFS=$ac_save_IFS
1207  test -z "$ac_dir" && ac_dir=.
1208  $as_executable_p "$ac_dir/$ac_word" || continue
1209ac_cv_prog_CC="${ac_tool_prefix}cc"
1210echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211break
1212done
1213
1214fi
1215fi
1216CC=$ac_cv_prog_CC
1217if test -n "$CC"; then
1218  echo "$as_me:1218: result: $CC" >&5
1219echo "${ECHO_T}$CC" >&6
1220else
1221  echo "$as_me:1221: result: no" >&5
1222echo "${ECHO_T}no" >&6
1223fi
1224
1225fi
1226if test -z "$ac_cv_prog_CC"; then
1227  ac_ct_CC=$CC
1228  # Extract the first word of "cc", so it can be a program name with args.
1229set dummy cc; ac_word=$2
1230echo "$as_me:1230: checking for $ac_word" >&5
1231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1233  echo $ECHO_N "(cached) $ECHO_C" >&6
1234else
1235  if test -n "$ac_ct_CC"; then
1236  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1237else
1238  ac_save_IFS=$IFS; IFS=$ac_path_separator
1239ac_dummy="$PATH"
1240for ac_dir in $ac_dummy; do
1241  IFS=$ac_save_IFS
1242  test -z "$ac_dir" && ac_dir=.
1243  $as_executable_p "$ac_dir/$ac_word" || continue
1244ac_cv_prog_ac_ct_CC="cc"
1245echo "$as_me:1245: found $ac_dir/$ac_word" >&5
1246break
1247done
1248
1249fi
1250fi
1251ac_ct_CC=$ac_cv_prog_ac_ct_CC
1252if test -n "$ac_ct_CC"; then
1253  echo "$as_me:1253: result: $ac_ct_CC" >&5
1254echo "${ECHO_T}$ac_ct_CC" >&6
1255else
1256  echo "$as_me:1256: result: no" >&5
1257echo "${ECHO_T}no" >&6
1258fi
1259
1260  CC=$ac_ct_CC
1261else
1262  CC="$ac_cv_prog_CC"
1263fi
1264
1265fi
1266if test -z "$CC"; then
1267  # Extract the first word of "cc", so it can be a program name with args.
1268set dummy cc; ac_word=$2
1269echo "$as_me:1269: checking for $ac_word" >&5
1270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271if test "${ac_cv_prog_CC+set}" = set; then
1272  echo $ECHO_N "(cached) $ECHO_C" >&6
1273else
1274  if test -n "$CC"; then
1275  ac_cv_prog_CC="$CC" # Let the user override the test.
1276else
1277  ac_prog_rejected=no
1278  ac_save_IFS=$IFS; IFS=$ac_path_separator
1279ac_dummy="$PATH"
1280for ac_dir in $ac_dummy; do
1281  IFS=$ac_save_IFS
1282  test -z "$ac_dir" && ac_dir=.
1283  $as_executable_p "$ac_dir/$ac_word" || continue
1284if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1285  ac_prog_rejected=yes
1286  continue
1287fi
1288ac_cv_prog_CC="cc"
1289echo "$as_me:1289: found $ac_dir/$ac_word" >&5
1290break
1291done
1292
1293if test "$ac_prog_rejected" = yes; then
1294  # We found a bogon in the path, so make sure we never use it.
1295  set dummy $ac_cv_prog_CC
1296  shift
1297  if test $# != 0; then
1298    # We chose a different compiler from the bogus one.
1299    # However, it has the same basename, so the bogon will be chosen
1300    # first if we set CC to just the basename; use the full file name.
1301    shift
1302    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1303    shift
1304    ac_cv_prog_CC="$@"
1305  fi
1306fi
1307fi
1308fi
1309CC=$ac_cv_prog_CC
1310if test -n "$CC"; then
1311  echo "$as_me:1311: result: $CC" >&5
1312echo "${ECHO_T}$CC" >&6
1313else
1314  echo "$as_me:1314: result: no" >&5
1315echo "${ECHO_T}no" >&6
1316fi
1317
1318fi
1319if test -z "$CC"; then
1320  if test -n "$ac_tool_prefix"; then
1321  for ac_prog in cl
1322  do
1323    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1324set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1325echo "$as_me:1325: checking for $ac_word" >&5
1326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1327if test "${ac_cv_prog_CC+set}" = set; then
1328  echo $ECHO_N "(cached) $ECHO_C" >&6
1329else
1330  if test -n "$CC"; then
1331  ac_cv_prog_CC="$CC" # Let the user override the test.
1332else
1333  ac_save_IFS=$IFS; IFS=$ac_path_separator
1334ac_dummy="$PATH"
1335for ac_dir in $ac_dummy; do
1336  IFS=$ac_save_IFS
1337  test -z "$ac_dir" && ac_dir=.
1338  $as_executable_p "$ac_dir/$ac_word" || continue
1339ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1340echo "$as_me:1340: found $ac_dir/$ac_word" >&5
1341break
1342done
1343
1344fi
1345fi
1346CC=$ac_cv_prog_CC
1347if test -n "$CC"; then
1348  echo "$as_me:1348: result: $CC" >&5
1349echo "${ECHO_T}$CC" >&6
1350else
1351  echo "$as_me:1351: result: no" >&5
1352echo "${ECHO_T}no" >&6
1353fi
1354
1355    test -n "$CC" && break
1356  done
1357fi
1358if test -z "$CC"; then
1359  ac_ct_CC=$CC
1360  for ac_prog in cl
1361do
1362  # Extract the first word of "$ac_prog", so it can be a program name with args.
1363set dummy $ac_prog; ac_word=$2
1364echo "$as_me:1364: checking for $ac_word" >&5
1365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1366if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1367  echo $ECHO_N "(cached) $ECHO_C" >&6
1368else
1369  if test -n "$ac_ct_CC"; then
1370  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1371else
1372  ac_save_IFS=$IFS; IFS=$ac_path_separator
1373ac_dummy="$PATH"
1374for ac_dir in $ac_dummy; do
1375  IFS=$ac_save_IFS
1376  test -z "$ac_dir" && ac_dir=.
1377  $as_executable_p "$ac_dir/$ac_word" || continue
1378ac_cv_prog_ac_ct_CC="$ac_prog"
1379echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1380break
1381done
1382
1383fi
1384fi
1385ac_ct_CC=$ac_cv_prog_ac_ct_CC
1386if test -n "$ac_ct_CC"; then
1387  echo "$as_me:1387: result: $ac_ct_CC" >&5
1388echo "${ECHO_T}$ac_ct_CC" >&6
1389else
1390  echo "$as_me:1390: result: no" >&5
1391echo "${ECHO_T}no" >&6
1392fi
1393
1394  test -n "$ac_ct_CC" && break
1395done
1396
1397  CC=$ac_ct_CC
1398fi
1399
1400fi
1401
1402test -z "$CC" && { { echo "$as_me:1402: error: no acceptable cc found in \$PATH" >&5
1403echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1404   { (exit 1); exit 1; }; }
1405
1406# Provide some information about the compiler.
1407echo "$as_me:1407:" \
1408     "checking for C compiler version" >&5
1409ac_compiler=`set X $ac_compile; echo "$2"`
1410{ (eval echo "$as_me:1410: \"$ac_compiler --version </dev/null >&5\"") >&5
1411  (eval $ac_compiler --version </dev/null >&5) 2>&5
1412  ac_status=$?
1413  echo "$as_me:1413: \$? = $ac_status" >&5
1414  (exit "$ac_status"); }
1415{ (eval echo "$as_me:1415: \"$ac_compiler -v </dev/null >&5\"") >&5
1416  (eval $ac_compiler -v </dev/null >&5) 2>&5
1417  ac_status=$?
1418  echo "$as_me:1418: \$? = $ac_status" >&5
1419  (exit "$ac_status"); }
1420{ (eval echo "$as_me:1420: \"$ac_compiler -V </dev/null >&5\"") >&5
1421  (eval $ac_compiler -V </dev/null >&5) 2>&5
1422  ac_status=$?
1423  echo "$as_me:1423: \$? = $ac_status" >&5
1424  (exit "$ac_status"); }
1425
1426cat >"conftest.$ac_ext" <<_ACEOF
1427#line 1427 "configure"
1428#include "confdefs.h"
1429
1430int
1431main (void)
1432{
1433
1434  ;
1435  return 0;
1436}
1437_ACEOF
1438ac_clean_files_save=$ac_clean_files
1439ac_clean_files="$ac_clean_files a.out a.exe"
1440# Try to create an executable without -o first, disregard a.out.
1441# It will help us diagnose broken compilers, and finding out an intuition
1442# of exeext.
1443echo "$as_me:1443: checking for C compiler default output" >&5
1444echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1445ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1446if { (eval echo "$as_me:1446: \"$ac_link_default\"") >&5
1447  (eval $ac_link_default) 2>&5
1448  ac_status=$?
1449  echo "$as_me:1449: \$? = $ac_status" >&5
1450  (exit "$ac_status"); }; then
1451  # Find the output, starting from the most likely.  This scheme is
1452# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1453# resort.
1454for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1455                ls a.out conftest 2>/dev/null;
1456                ls a.* conftest.* 2>/dev/null`; do
1457  case $ac_file in
1458    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1459    a.out ) # We found the default executable, but exeext='' is most
1460            # certainly right.
1461            break;;
1462    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1463          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1464          export ac_cv_exeext
1465          break;;
1466    * ) break;;
1467  esac
1468done
1469else
1470  echo "$as_me: failed program was:" >&5
1471cat "conftest.$ac_ext" >&5
1472{ { echo "$as_me:1472: error: C compiler cannot create executables" >&5
1473echo "$as_me: error: C compiler cannot create executables" >&2;}
1474   { (exit 77); exit 77; }; }
1475fi
1476
1477ac_exeext=$ac_cv_exeext
1478echo "$as_me:1478: result: $ac_file" >&5
1479echo "${ECHO_T}$ac_file" >&6
1480
1481# Check the compiler produces executables we can run.  If not, either
1482# the compiler is broken, or we cross compile.
1483echo "$as_me:1483: checking whether the C compiler works" >&5
1484echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1485# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1486# If not cross compiling, check that we can run a simple program.
1487if test "$cross_compiling" != yes; then
1488  if { ac_try='./$ac_file'
1489  { (eval echo "$as_me:1489: \"$ac_try\"") >&5
1490  (eval $ac_try) 2>&5
1491  ac_status=$?
1492  echo "$as_me:1492: \$? = $ac_status" >&5
1493  (exit "$ac_status"); }; }; then
1494    cross_compiling=no
1495  else
1496    if test "$cross_compiling" = maybe; then
1497	cross_compiling=yes
1498    else
1499	{ { echo "$as_me:1499: error: cannot run C compiled programs.
1500If you meant to cross compile, use \`--host'." >&5
1501echo "$as_me: error: cannot run C compiled programs.
1502If you meant to cross compile, use \`--host'." >&2;}
1503   { (exit 1); exit 1; }; }
1504    fi
1505  fi
1506fi
1507echo "$as_me:1507: result: yes" >&5
1508echo "${ECHO_T}yes" >&6
1509
1510rm -f a.out a.exe "conftest$ac_cv_exeext"
1511ac_clean_files=$ac_clean_files_save
1512# Check the compiler produces executables we can run.  If not, either
1513# the compiler is broken, or we cross compile.
1514echo "$as_me:1514: checking whether we are cross compiling" >&5
1515echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1516echo "$as_me:1516: result: $cross_compiling" >&5
1517echo "${ECHO_T}$cross_compiling" >&6
1518
1519echo "$as_me:1519: checking for executable suffix" >&5
1520echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1521if { (eval echo "$as_me:1521: \"$ac_link\"") >&5
1522  (eval $ac_link) 2>&5
1523  ac_status=$?
1524  echo "$as_me:1524: \$? = $ac_status" >&5
1525  (exit "$ac_status"); }; then
1526  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1527# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1528# work properly (i.e., refer to `conftest.exe'), while it won't with
1529# `rm'.
1530for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1531  case $ac_file in
1532    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1533    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1534          export ac_cv_exeext
1535          break;;
1536    * ) break;;
1537  esac
1538done
1539else
1540  { { echo "$as_me:1540: error: cannot compute EXEEXT: cannot compile and link" >&5
1541echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1542   { (exit 1); exit 1; }; }
1543fi
1544
1545rm -f "conftest$ac_cv_exeext"
1546echo "$as_me:1546: result: $ac_cv_exeext" >&5
1547echo "${ECHO_T}$ac_cv_exeext" >&6
1548
1549rm -f "conftest.$ac_ext"
1550EXEEXT=$ac_cv_exeext
1551ac_exeext=$EXEEXT
1552echo "$as_me:1552: checking for object suffix" >&5
1553echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1554if test "${ac_cv_objext+set}" = set; then
1555  echo $ECHO_N "(cached) $ECHO_C" >&6
1556else
1557  cat >"conftest.$ac_ext" <<_ACEOF
1558#line 1558 "configure"
1559#include "confdefs.h"
1560
1561int
1562main (void)
1563{
1564
1565  ;
1566  return 0;
1567}
1568_ACEOF
1569rm -f conftest.o conftest.obj
1570if { (eval echo "$as_me:1570: \"$ac_compile\"") >&5
1571  (eval $ac_compile) 2>&5
1572  ac_status=$?
1573  echo "$as_me:1573: \$? = $ac_status" >&5
1574  (exit "$ac_status"); }; then
1575  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1576  case $ac_file in
1577    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1578    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1579       break;;
1580  esac
1581done
1582else
1583  echo "$as_me: failed program was:" >&5
1584cat "conftest.$ac_ext" >&5
1585{ { echo "$as_me:1585: error: cannot compute OBJEXT: cannot compile" >&5
1586echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1587   { (exit 1); exit 1; }; }
1588fi
1589
1590rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1591fi
1592echo "$as_me:1592: result: $ac_cv_objext" >&5
1593echo "${ECHO_T}$ac_cv_objext" >&6
1594OBJEXT=$ac_cv_objext
1595ac_objext=$OBJEXT
1596echo "$as_me:1596: checking whether we are using the GNU C compiler" >&5
1597echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1598if test "${ac_cv_c_compiler_gnu+set}" = set; then
1599  echo $ECHO_N "(cached) $ECHO_C" >&6
1600else
1601  cat >"conftest.$ac_ext" <<_ACEOF
1602#line 1602 "configure"
1603#include "confdefs.h"
1604
1605int
1606main (void)
1607{
1608#ifndef __GNUC__
1609       choke me
1610#endif
1611
1612  ;
1613  return 0;
1614}
1615_ACEOF
1616rm -f "conftest.$ac_objext"
1617if { (eval echo "$as_me:1617: \"$ac_compile\"") >&5
1618  (eval $ac_compile) 2>&5
1619  ac_status=$?
1620  echo "$as_me:1620: \$? = $ac_status" >&5
1621  (exit "$ac_status"); } &&
1622         { ac_try='test -s "conftest.$ac_objext"'
1623  { (eval echo "$as_me:1623: \"$ac_try\"") >&5
1624  (eval $ac_try) 2>&5
1625  ac_status=$?
1626  echo "$as_me:1626: \$? = $ac_status" >&5
1627  (exit "$ac_status"); }; }; then
1628  ac_compiler_gnu=yes
1629else
1630  echo "$as_me: failed program was:" >&5
1631cat "conftest.$ac_ext" >&5
1632ac_compiler_gnu=no
1633fi
1634rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1635ac_cv_c_compiler_gnu=$ac_compiler_gnu
1636
1637fi
1638echo "$as_me:1638: result: $ac_cv_c_compiler_gnu" >&5
1639echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1640GCC=`test $ac_compiler_gnu = yes && echo yes`
1641ac_test_CFLAGS=${CFLAGS+set}
1642ac_save_CFLAGS=$CFLAGS
1643CFLAGS="-g"
1644echo "$as_me:1644: checking whether $CC accepts -g" >&5
1645echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1646if test "${ac_cv_prog_cc_g+set}" = set; then
1647  echo $ECHO_N "(cached) $ECHO_C" >&6
1648else
1649  cat >"conftest.$ac_ext" <<_ACEOF
1650#line 1650 "configure"
1651#include "confdefs.h"
1652
1653int
1654main (void)
1655{
1656
1657  ;
1658  return 0;
1659}
1660_ACEOF
1661rm -f "conftest.$ac_objext"
1662if { (eval echo "$as_me:1662: \"$ac_compile\"") >&5
1663  (eval $ac_compile) 2>&5
1664  ac_status=$?
1665  echo "$as_me:1665: \$? = $ac_status" >&5
1666  (exit "$ac_status"); } &&
1667         { ac_try='test -s "conftest.$ac_objext"'
1668  { (eval echo "$as_me:1668: \"$ac_try\"") >&5
1669  (eval $ac_try) 2>&5
1670  ac_status=$?
1671  echo "$as_me:1671: \$? = $ac_status" >&5
1672  (exit "$ac_status"); }; }; then
1673  ac_cv_prog_cc_g=yes
1674else
1675  echo "$as_me: failed program was:" >&5
1676cat "conftest.$ac_ext" >&5
1677ac_cv_prog_cc_g=no
1678fi
1679rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1680fi
1681echo "$as_me:1681: result: $ac_cv_prog_cc_g" >&5
1682echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1683if test "$ac_test_CFLAGS" = set; then
1684  CFLAGS=$ac_save_CFLAGS
1685elif test $ac_cv_prog_cc_g = yes; then
1686  if test "$GCC" = yes; then
1687    CFLAGS="-g -O2"
1688  else
1689    CFLAGS="-g"
1690  fi
1691else
1692  if test "$GCC" = yes; then
1693    CFLAGS="-O2"
1694  else
1695    CFLAGS=
1696  fi
1697fi
1698# Some people use a C++ compiler to compile C.  Since we use `exit',
1699# in C++ we need to declare it.  In case someone uses the same compiler
1700# for both compiling C and C++ we need to have the C++ compiler decide
1701# the declaration of exit, since it's the most demanding environment.
1702cat >"conftest.$ac_ext" <<_ACEOF
1703#ifndef __cplusplus
1704  choke me
1705#endif
1706_ACEOF
1707rm -f "conftest.$ac_objext"
1708if { (eval echo "$as_me:1708: \"$ac_compile\"") >&5
1709  (eval $ac_compile) 2>&5
1710  ac_status=$?
1711  echo "$as_me:1711: \$? = $ac_status" >&5
1712  (exit "$ac_status"); } &&
1713         { ac_try='test -s "conftest.$ac_objext"'
1714  { (eval echo "$as_me:1714: \"$ac_try\"") >&5
1715  (eval $ac_try) 2>&5
1716  ac_status=$?
1717  echo "$as_me:1717: \$? = $ac_status" >&5
1718  (exit "$ac_status"); }; }; then
1719  for ac_declaration in \
1720   ''\
1721   '#include <stdlib.h>' \
1722   'extern "C" void std::exit (int) throw (); using std::exit;' \
1723   'extern "C" void std::exit (int); using std::exit;' \
1724   'extern "C" void exit (int) throw ();' \
1725   'extern "C" void exit (int);' \
1726   'void exit (int);'
1727do
1728  cat >"conftest.$ac_ext" <<_ACEOF
1729#line 1729 "configure"
1730#include "confdefs.h"
1731#include <stdlib.h>
1732$ac_declaration
1733int
1734main (void)
1735{
1736exit (42);
1737  ;
1738  return 0;
1739}
1740_ACEOF
1741rm -f "conftest.$ac_objext"
1742if { (eval echo "$as_me:1742: \"$ac_compile\"") >&5
1743  (eval $ac_compile) 2>&5
1744  ac_status=$?
1745  echo "$as_me:1745: \$? = $ac_status" >&5
1746  (exit "$ac_status"); } &&
1747         { ac_try='test -s "conftest.$ac_objext"'
1748  { (eval echo "$as_me:1748: \"$ac_try\"") >&5
1749  (eval $ac_try) 2>&5
1750  ac_status=$?
1751  echo "$as_me:1751: \$? = $ac_status" >&5
1752  (exit "$ac_status"); }; }; then
1753  :
1754else
1755  echo "$as_me: failed program was:" >&5
1756cat "conftest.$ac_ext" >&5
1757continue
1758fi
1759rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1760  cat >"conftest.$ac_ext" <<_ACEOF
1761#line 1761 "configure"
1762#include "confdefs.h"
1763$ac_declaration
1764int
1765main (void)
1766{
1767exit (42);
1768  ;
1769  return 0;
1770}
1771_ACEOF
1772rm -f "conftest.$ac_objext"
1773if { (eval echo "$as_me:1773: \"$ac_compile\"") >&5
1774  (eval $ac_compile) 2>&5
1775  ac_status=$?
1776  echo "$as_me:1776: \$? = $ac_status" >&5
1777  (exit "$ac_status"); } &&
1778         { ac_try='test -s "conftest.$ac_objext"'
1779  { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780  (eval $ac_try) 2>&5
1781  ac_status=$?
1782  echo "$as_me:1782: \$? = $ac_status" >&5
1783  (exit "$ac_status"); }; }; then
1784  break
1785else
1786  echo "$as_me: failed program was:" >&5
1787cat "conftest.$ac_ext" >&5
1788fi
1789rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1790done
1791rm -rf conftest*
1792if test -n "$ac_declaration"; then
1793  echo '#ifdef __cplusplus' >>confdefs.h
1794  echo "$ac_declaration"    >>confdefs.h
1795  echo '#endif'             >>confdefs.h
1796fi
1797
1798else
1799  echo "$as_me: failed program was:" >&5
1800cat "conftest.$ac_ext" >&5
1801fi
1802rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1803ac_ext=c
1804ac_cpp='$CPP $CPPFLAGS'
1805ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1806ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1807ac_compiler_gnu=$ac_cv_c_compiler_gnu
1808ac_main_return="return"
1809
1810GCC_VERSION=none
1811if test "$GCC" = yes ; then
1812	echo "$as_me:1812: checking version of $CC" >&5
1813echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1814	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.].*//'`"
1815	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1816	echo "$as_me:1816: result: $GCC_VERSION" >&5
1817echo "${ECHO_T}$GCC_VERSION" >&6
1818fi
1819
1820INTEL_COMPILER=no
1821
1822if test "$GCC" = yes ; then
1823	case "$host_os" in
1824	(linux*|gnu*)
1825		echo "$as_me:1825: checking if this is really Intel C compiler" >&5
1826echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1827		cf_save_CFLAGS="$CFLAGS"
1828		CFLAGS="$CFLAGS -no-gcc"
1829		cat >"conftest.$ac_ext" <<_ACEOF
1830#line 1830 "configure"
1831#include "confdefs.h"
1832
1833int
1834main (void)
1835{
1836
1837#ifdef __INTEL_COMPILER
1838#else
1839make an error
1840#endif
1841
1842  ;
1843  return 0;
1844}
1845_ACEOF
1846rm -f "conftest.$ac_objext"
1847if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848  (eval $ac_compile) 2>&5
1849  ac_status=$?
1850  echo "$as_me:1850: \$? = $ac_status" >&5
1851  (exit "$ac_status"); } &&
1852         { ac_try='test -s "conftest.$ac_objext"'
1853  { (eval echo "$as_me:1853: \"$ac_try\"") >&5
1854  (eval $ac_try) 2>&5
1855  ac_status=$?
1856  echo "$as_me:1856: \$? = $ac_status" >&5
1857  (exit "$ac_status"); }; }; then
1858  INTEL_COMPILER=yes
1859cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1860
1861else
1862  echo "$as_me: failed program was:" >&5
1863cat "conftest.$ac_ext" >&5
1864fi
1865rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1866		CFLAGS="$cf_save_CFLAGS"
1867		echo "$as_me:1867: result: $INTEL_COMPILER" >&5
1868echo "${ECHO_T}$INTEL_COMPILER" >&6
1869		;;
1870	esac
1871fi
1872
1873CLANG_COMPILER=no
1874
1875if test "$GCC" = yes ; then
1876	echo "$as_me:1876: checking if this is really Clang C compiler" >&5
1877echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1878	cf_save_CFLAGS="$CFLAGS"
1879	cat >"conftest.$ac_ext" <<_ACEOF
1880#line 1880 "configure"
1881#include "confdefs.h"
1882
1883int
1884main (void)
1885{
1886
1887#ifdef __clang__
1888#else
1889make an error
1890#endif
1891
1892  ;
1893  return 0;
1894}
1895_ACEOF
1896rm -f "conftest.$ac_objext"
1897if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898  (eval $ac_compile) 2>&5
1899  ac_status=$?
1900  echo "$as_me:1900: \$? = $ac_status" >&5
1901  (exit "$ac_status"); } &&
1902         { ac_try='test -s "conftest.$ac_objext"'
1903  { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904  (eval $ac_try) 2>&5
1905  ac_status=$?
1906  echo "$as_me:1906: \$? = $ac_status" >&5
1907  (exit "$ac_status"); }; }; then
1908  CLANG_COMPILER=yes
1909
1910else
1911  echo "$as_me: failed program was:" >&5
1912cat "conftest.$ac_ext" >&5
1913fi
1914rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1915	CFLAGS="$cf_save_CFLAGS"
1916	echo "$as_me:1916: result: $CLANG_COMPILER" >&5
1917echo "${ECHO_T}$CLANG_COMPILER" >&6
1918fi
1919
1920CLANG_VERSION=none
1921
1922if test "x$CLANG_COMPILER" = "xyes" ; then
1923	case "$CC" in
1924	(c[1-9][0-9]|*/c[1-9][0-9])
1925		{ echo "$as_me:1925: WARNING: replacing broken compiler alias $CC" >&5
1926echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1927		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1928		CC=clang
1929		;;
1930	esac
1931
1932	echo "$as_me:1932: checking version of $CC" >&5
1933echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1934	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1935	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1936	echo "$as_me:1936: result: $CLANG_VERSION" >&5
1937echo "${ECHO_T}$CLANG_VERSION" >&6
1938
1939	for cf_clang_opt in \
1940		-Qunused-arguments \
1941		-Wno-error=implicit-function-declaration
1942	do
1943		echo "$as_me:1943: checking if option $cf_clang_opt works" >&5
1944echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1945		cf_save_CFLAGS="$CFLAGS"
1946		CFLAGS="$CFLAGS $cf_clang_opt"
1947		cat >"conftest.$ac_ext" <<_ACEOF
1948#line 1948 "configure"
1949#include "confdefs.h"
1950
1951			#include <stdio.h>
1952int
1953main (void)
1954{
1955
1956			printf("hello!\\n");
1957  ;
1958  return 0;
1959}
1960_ACEOF
1961rm -f "conftest.$ac_objext" "conftest$ac_exeext"
1962if { (eval echo "$as_me:1962: \"$ac_link\"") >&5
1963  (eval $ac_link) 2>&5
1964  ac_status=$?
1965  echo "$as_me:1965: \$? = $ac_status" >&5
1966  (exit "$ac_status"); } &&
1967         { ac_try='test -s "conftest$ac_exeext"'
1968  { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969  (eval $ac_try) 2>&5
1970  ac_status=$?
1971  echo "$as_me:1971: \$? = $ac_status" >&5
1972  (exit "$ac_status"); }; }; then
1973
1974			cf_clang_optok=yes
1975else
1976  echo "$as_me: failed program was:" >&5
1977cat "conftest.$ac_ext" >&5
1978
1979			cf_clang_optok=no
1980fi
1981rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
1982		echo "$as_me:1982: result: $cf_clang_optok" >&5
1983echo "${ECHO_T}$cf_clang_optok" >&6
1984		CFLAGS="$cf_save_CFLAGS"
1985		if test "$cf_clang_optok" = yes; then
1986			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
1987
1988echo "${as_me:-configure}:1988: testing adding option $cf_clang_opt ..." 1>&5
1989
1990	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1991	CFLAGS="${CFLAGS}$cf_clang_opt"
1992
1993		fi
1994	done
1995fi
1996
1997echo "$as_me:1997: checking for $CC option to accept ANSI C" >&5
1998echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1999if test "${ac_cv_prog_cc_stdc+set}" = set; then
2000  echo $ECHO_N "(cached) $ECHO_C" >&6
2001else
2002  ac_cv_prog_cc_stdc=no
2003ac_save_CC=$CC
2004cat >"conftest.$ac_ext" <<_ACEOF
2005#line 2005 "configure"
2006#include "confdefs.h"
2007#include <stdarg.h>
2008#include <stdio.h>
2009#include <sys/types.h>
2010#include <sys/stat.h>
2011/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2012struct buf { int x; };
2013FILE * (*rcsopen) (struct buf *, struct stat *, int);
2014static char *e (p, i)
2015     char **p;
2016     int i;
2017{
2018  return p[i];
2019}
2020static char *f (char * (*g) (char **, int), char **p, ...)
2021{
2022  char *s;
2023  va_list v;
2024  va_start (v,p);
2025  s = g (p, va_arg (v,int));
2026  va_end (v);
2027  return s;
2028}
2029int test (int i, double x);
2030struct s1 {int (*f) (int a);};
2031struct s2 {int (*f) (double a);};
2032int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2033int argc;
2034char **argv;
2035int
2036main (void)
2037{
2038return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2039  ;
2040  return 0;
2041}
2042_ACEOF
2043# Don't try gcc -ansi; that turns off useful extensions and
2044# breaks some systems' header files.
2045# AIX			-qlanglvl=ansi
2046# Ultrix and OSF/1	-std1
2047# HP-UX 10.20 and later	-Ae
2048# HP-UX older versions	-Aa -D_HPUX_SOURCE
2049# SVR4			-Xc -D__EXTENSIONS__
2050for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2051do
2052  CC="$ac_save_CC $ac_arg"
2053  rm -f "conftest.$ac_objext"
2054if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
2055  (eval $ac_compile) 2>&5
2056  ac_status=$?
2057  echo "$as_me:2057: \$? = $ac_status" >&5
2058  (exit "$ac_status"); } &&
2059         { ac_try='test -s "conftest.$ac_objext"'
2060  { (eval echo "$as_me:2060: \"$ac_try\"") >&5
2061  (eval $ac_try) 2>&5
2062  ac_status=$?
2063  echo "$as_me:2063: \$? = $ac_status" >&5
2064  (exit "$ac_status"); }; }; then
2065  ac_cv_prog_cc_stdc=$ac_arg
2066break
2067else
2068  echo "$as_me: failed program was:" >&5
2069cat "conftest.$ac_ext" >&5
2070fi
2071rm -f "conftest.$ac_objext"
2072done
2073rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2074CC=$ac_save_CC
2075
2076fi
2077
2078case "x$ac_cv_prog_cc_stdc" in
2079  x|xno)
2080    echo "$as_me:2080: result: none needed" >&5
2081echo "${ECHO_T}none needed" >&6 ;;
2082  *)
2083    echo "$as_me:2083: result: $ac_cv_prog_cc_stdc" >&5
2084echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2085    CC="$CC $ac_cv_prog_cc_stdc" ;;
2086esac
2087
2088# This should have been defined by AC_PROG_CC
2089: "${CC:=cc}"
2090
2091echo "$as_me:2091: checking \$CFLAGS variable" >&5
2092echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2093case "x$CFLAGS" in
2094(*-[IUD]*)
2095	echo "$as_me:2095: result: broken" >&5
2096echo "${ECHO_T}broken" >&6
2097	{ echo "$as_me:2097: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2098echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2099	cf_flags="$CFLAGS"
2100	CFLAGS=
2101	for cf_arg in $cf_flags
2102	do
2103
2104cf_fix_cppflags=no
2105cf_new_cflags=
2106cf_new_cppflags=
2107cf_new_extra_cppflags=
2108
2109for cf_add_cflags in $cf_arg
2110do
2111case "$cf_fix_cppflags" in
2112(no)
2113	case "$cf_add_cflags" in
2114	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2115		case "$cf_add_cflags" in
2116		(-D*)
2117			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2118
2119			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2120				&& test -z "${cf_tst_cflags}" \
2121				&& cf_fix_cppflags=yes
2122
2123			if test "$cf_fix_cppflags" = yes ; then
2124
2125	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2126	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2127
2128				continue
2129			elif test "${cf_tst_cflags}" = "\"'" ; then
2130
2131	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2132	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2133
2134				continue
2135			fi
2136			;;
2137		esac
2138		case "$CPPFLAGS" in
2139		(*$cf_add_cflags)
2140			;;
2141		(*)
2142			case "$cf_add_cflags" in
2143			(-D*)
2144				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2145
2146CPPFLAGS=`echo "$CPPFLAGS" | \
2147	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2148		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2149
2150				;;
2151			esac
2152
2153	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2154	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2155
2156			;;
2157		esac
2158		;;
2159	(*)
2160
2161	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2162	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2163
2164		;;
2165	esac
2166	;;
2167(yes)
2168
2169	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2170	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2171
2172	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2173
2174	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2175		&& test -z "${cf_tst_cflags}" \
2176		&& cf_fix_cppflags=no
2177	;;
2178esac
2179done
2180
2181if test -n "$cf_new_cflags" ; then
2182
2183	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2184	CFLAGS="${CFLAGS}$cf_new_cflags"
2185
2186fi
2187
2188if test -n "$cf_new_cppflags" ; then
2189
2190	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2191	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2192
2193fi
2194
2195if test -n "$cf_new_extra_cppflags" ; then
2196
2197	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2198	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2199
2200fi
2201
2202	done
2203	;;
2204(*)
2205	echo "$as_me:2205: result: ok" >&5
2206echo "${ECHO_T}ok" >&6
2207	;;
2208esac
2209
2210echo "$as_me:2210: checking \$CC variable" >&5
2211echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2212case "$CC" in
2213(*[\ \	]-*)
2214	echo "$as_me:2214: result: broken" >&5
2215echo "${ECHO_T}broken" >&6
2216	{ echo "$as_me:2216: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2217echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2218	# humor him...
2219	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2220	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2221	CC="$cf_prog"
2222	for cf_arg in $cf_flags
2223	do
2224		case "x$cf_arg" in
2225		(x-[IUDfgOW]*)
2226
2227cf_fix_cppflags=no
2228cf_new_cflags=
2229cf_new_cppflags=
2230cf_new_extra_cppflags=
2231
2232for cf_add_cflags in $cf_arg
2233do
2234case "$cf_fix_cppflags" in
2235(no)
2236	case "$cf_add_cflags" in
2237	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2238		case "$cf_add_cflags" in
2239		(-D*)
2240			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2241
2242			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2243				&& test -z "${cf_tst_cflags}" \
2244				&& cf_fix_cppflags=yes
2245
2246			if test "$cf_fix_cppflags" = yes ; then
2247
2248	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2249	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2250
2251				continue
2252			elif test "${cf_tst_cflags}" = "\"'" ; then
2253
2254	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2255	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2256
2257				continue
2258			fi
2259			;;
2260		esac
2261		case "$CPPFLAGS" in
2262		(*$cf_add_cflags)
2263			;;
2264		(*)
2265			case "$cf_add_cflags" in
2266			(-D*)
2267				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2268
2269CPPFLAGS=`echo "$CPPFLAGS" | \
2270	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2271		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2272
2273				;;
2274			esac
2275
2276	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2277	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2278
2279			;;
2280		esac
2281		;;
2282	(*)
2283
2284	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2285	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2286
2287		;;
2288	esac
2289	;;
2290(yes)
2291
2292	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2293	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2294
2295	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2296
2297	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2298		&& test -z "${cf_tst_cflags}" \
2299		&& cf_fix_cppflags=no
2300	;;
2301esac
2302done
2303
2304if test -n "$cf_new_cflags" ; then
2305
2306	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2307	CFLAGS="${CFLAGS}$cf_new_cflags"
2308
2309fi
2310
2311if test -n "$cf_new_cppflags" ; then
2312
2313	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2314	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2315
2316fi
2317
2318if test -n "$cf_new_extra_cppflags" ; then
2319
2320	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2321	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2322
2323fi
2324
2325			;;
2326		(*)
2327			CC="$CC $cf_arg"
2328			;;
2329		esac
2330	done
2331	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2332
2333echo "${as_me:-configure}:2333: testing resulting CC: '$CC' ..." 1>&5
2334
2335	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2336
2337echo "${as_me:-configure}:2337: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2338
2339	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2340
2341echo "${as_me:-configure}:2341: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2342
2343	;;
2344(*)
2345	echo "$as_me:2345: result: ok" >&5
2346echo "${ECHO_T}ok" >&6
2347	;;
2348esac
2349
2350for ac_prog in ggrep grep
2351do
2352  # Extract the first word of "$ac_prog", so it can be a program name with args.
2353set dummy $ac_prog; ac_word=$2
2354echo "$as_me:2354: checking for $ac_word" >&5
2355echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2356if test "${ac_cv_prog_GREP+set}" = set; then
2357  echo $ECHO_N "(cached) $ECHO_C" >&6
2358else
2359  if test -n "$GREP"; then
2360  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2361else
2362  ac_save_IFS=$IFS; IFS=$ac_path_separator
2363ac_dummy="$PATH"
2364for ac_dir in $ac_dummy; do
2365  IFS=$ac_save_IFS
2366  test -z "$ac_dir" && ac_dir=.
2367  $as_executable_p "$ac_dir/$ac_word" || continue
2368ac_cv_prog_GREP="$ac_prog"
2369echo "$as_me:2369: found $ac_dir/$ac_word" >&5
2370break
2371done
2372
2373fi
2374fi
2375GREP=$ac_cv_prog_GREP
2376if test -n "$GREP"; then
2377  echo "$as_me:2377: result: $GREP" >&5
2378echo "${ECHO_T}$GREP" >&6
2379else
2380  echo "$as_me:2380: result: no" >&5
2381echo "${ECHO_T}no" >&6
2382fi
2383
2384  test -n "$GREP" && break
2385done
2386test -n "$GREP" || GREP=": "
2387
2388echo "$as_me:2388: checking for egrep" >&5
2389echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2390if test "${ac_cv_path_EGREP+set}" = set; then
2391  echo $ECHO_N "(cached) $ECHO_C" >&6
2392else
2393  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2394   then ac_cv_path_EGREP="$GREP -E"
2395   else
2396     for ac_prog in gegrep egrep
2397do
2398  # Extract the first word of "$ac_prog", so it can be a program name with args.
2399set dummy $ac_prog; ac_word=$2
2400echo "$as_me:2400: checking for $ac_word" >&5
2401echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2402if test "${ac_cv_path_EGREP+set}" = set; then
2403  echo $ECHO_N "(cached) $ECHO_C" >&6
2404else
2405  case $EGREP in
2406  [\\/]* | ?:[\\/]*)
2407  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2408  ;;
2409  *)
2410  ac_save_IFS=$IFS; IFS=$ac_path_separator
2411ac_dummy="$PATH"
2412for ac_dir in $ac_dummy; do
2413  IFS=$ac_save_IFS
2414  test -z "$ac_dir" && ac_dir=.
2415  if $as_executable_p "$ac_dir/$ac_word"; then
2416   ac_cv_path_EGREP="$ac_dir/$ac_word"
2417   echo "$as_me:2417: found $ac_dir/$ac_word" >&5
2418   break
2419fi
2420done
2421
2422  ;;
2423esac
2424fi
2425EGREP=$ac_cv_path_EGREP
2426
2427if test -n "$EGREP"; then
2428  echo "$as_me:2428: result: $EGREP" >&5
2429echo "${ECHO_T}$EGREP" >&6
2430else
2431  echo "$as_me:2431: result: no" >&5
2432echo "${ECHO_T}no" >&6
2433fi
2434
2435  test -n "$EGREP" && break
2436done
2437test -n "$EGREP" || EGREP=": "
2438
2439     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2439: error: cannot find workable egrep" >&5
2440echo "$as_me: error: cannot find workable egrep" >&2;}
2441   { (exit 1); exit 1; }; }
2442   fi
2443fi
2444echo "$as_me:2444: result: $ac_cv_path_EGREP" >&5
2445echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2446 EGREP="$ac_cv_path_EGREP"
2447
2448ac_ext=c
2449ac_cpp='$CPP $CPPFLAGS'
2450ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2451ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2452ac_compiler_gnu=$ac_cv_c_compiler_gnu
2453ac_main_return="return"
2454echo "$as_me:2454: checking how to run the C preprocessor" >&5
2455echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2456# On Suns, sometimes $CPP names a directory.
2457if test -n "$CPP" && test -d "$CPP"; then
2458  CPP=
2459fi
2460if test -z "$CPP"; then
2461  if test "${ac_cv_prog_CPP+set}" = set; then
2462  echo $ECHO_N "(cached) $ECHO_C" >&6
2463else
2464      # Double quotes because CPP needs to be expanded
2465    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2466    do
2467      ac_preproc_ok=false
2468for ac_c_preproc_warn_flag in '' yes
2469do
2470  # Use a header file that comes with gcc, so configuring glibc
2471  # with a fresh cross-compiler works.
2472  # On the NeXT, cc -E runs the code through the compiler's parser,
2473  # not just through cpp. "Syntax error" is here to catch this case.
2474  cat >"conftest.$ac_ext" <<_ACEOF
2475#line 2475 "configure"
2476#include "confdefs.h"
2477#include <assert.h>
2478                     Syntax error
2479_ACEOF
2480if { (eval echo "$as_me:2480: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2481  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2482  ac_status=$?
2483  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2484  rm -f conftest.er1
2485  cat conftest.err >&5
2486  echo "$as_me:2486: \$? = $ac_status" >&5
2487  (exit "$ac_status"); } >/dev/null; then
2488  if test -s conftest.err; then
2489    ac_cpp_err=$ac_c_preproc_warn_flag
2490  else
2491    ac_cpp_err=
2492  fi
2493else
2494  ac_cpp_err=yes
2495fi
2496if test -z "$ac_cpp_err"; then
2497  :
2498else
2499  echo "$as_me: failed program was:" >&5
2500  cat "conftest.$ac_ext" >&5
2501  # Broken: fails on valid input.
2502continue
2503fi
2504rm -f conftest.err "conftest.$ac_ext"
2505
2506  # OK, works on sane cases.  Now check whether non-existent headers
2507  # can be detected and how.
2508  cat >"conftest.$ac_ext" <<_ACEOF
2509#line 2509 "configure"
2510#include "confdefs.h"
2511#include <ac_nonexistent.h>
2512_ACEOF
2513if { (eval echo "$as_me:2513: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2514  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2515  ac_status=$?
2516  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2517  rm -f conftest.er1
2518  cat conftest.err >&5
2519  echo "$as_me:2519: \$? = $ac_status" >&5
2520  (exit "$ac_status"); } >/dev/null; then
2521  if test -s conftest.err; then
2522    ac_cpp_err=$ac_c_preproc_warn_flag
2523  else
2524    ac_cpp_err=
2525  fi
2526else
2527  ac_cpp_err=yes
2528fi
2529if test -z "$ac_cpp_err"; then
2530  # Broken: success on invalid input.
2531continue
2532else
2533  echo "$as_me: failed program was:" >&5
2534  cat "conftest.$ac_ext" >&5
2535  # Passes both tests.
2536ac_preproc_ok=:
2537break
2538fi
2539rm -f conftest.err "conftest.$ac_ext"
2540
2541done
2542# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2543rm -f conftest.err "conftest.$ac_ext"
2544if $ac_preproc_ok; then
2545  break
2546fi
2547
2548    done
2549    ac_cv_prog_CPP=$CPP
2550
2551fi
2552  CPP=$ac_cv_prog_CPP
2553else
2554  ac_cv_prog_CPP=$CPP
2555fi
2556echo "$as_me:2556: result: $CPP" >&5
2557echo "${ECHO_T}$CPP" >&6
2558ac_preproc_ok=false
2559for ac_c_preproc_warn_flag in '' yes
2560do
2561  # Use a header file that comes with gcc, so configuring glibc
2562  # with a fresh cross-compiler works.
2563  # On the NeXT, cc -E runs the code through the compiler's parser,
2564  # not just through cpp. "Syntax error" is here to catch this case.
2565  cat >"conftest.$ac_ext" <<_ACEOF
2566#line 2566 "configure"
2567#include "confdefs.h"
2568#include <assert.h>
2569                     Syntax error
2570_ACEOF
2571if { (eval echo "$as_me:2571: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2572  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2573  ac_status=$?
2574  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2575  rm -f conftest.er1
2576  cat conftest.err >&5
2577  echo "$as_me:2577: \$? = $ac_status" >&5
2578  (exit "$ac_status"); } >/dev/null; then
2579  if test -s conftest.err; then
2580    ac_cpp_err=$ac_c_preproc_warn_flag
2581  else
2582    ac_cpp_err=
2583  fi
2584else
2585  ac_cpp_err=yes
2586fi
2587if test -z "$ac_cpp_err"; then
2588  :
2589else
2590  echo "$as_me: failed program was:" >&5
2591  cat "conftest.$ac_ext" >&5
2592  # Broken: fails on valid input.
2593continue
2594fi
2595rm -f conftest.err "conftest.$ac_ext"
2596
2597  # OK, works on sane cases.  Now check whether non-existent headers
2598  # can be detected and how.
2599  cat >"conftest.$ac_ext" <<_ACEOF
2600#line 2600 "configure"
2601#include "confdefs.h"
2602#include <ac_nonexistent.h>
2603_ACEOF
2604if { (eval echo "$as_me:2604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2605  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2606  ac_status=$?
2607  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2608  rm -f conftest.er1
2609  cat conftest.err >&5
2610  echo "$as_me:2610: \$? = $ac_status" >&5
2611  (exit "$ac_status"); } >/dev/null; then
2612  if test -s conftest.err; then
2613    ac_cpp_err=$ac_c_preproc_warn_flag
2614  else
2615    ac_cpp_err=
2616  fi
2617else
2618  ac_cpp_err=yes
2619fi
2620if test -z "$ac_cpp_err"; then
2621  # Broken: success on invalid input.
2622continue
2623else
2624  echo "$as_me: failed program was:" >&5
2625  cat "conftest.$ac_ext" >&5
2626  # Passes both tests.
2627ac_preproc_ok=:
2628break
2629fi
2630rm -f conftest.err "conftest.$ac_ext"
2631
2632done
2633# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2634rm -f conftest.err "conftest.$ac_ext"
2635if $ac_preproc_ok; then
2636  :
2637else
2638  { { echo "$as_me:2638: error: C preprocessor \"$CPP\" fails sanity check" >&5
2639echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2640   { (exit 1); exit 1; }; }
2641fi
2642
2643ac_ext=c
2644ac_cpp='$CPP $CPPFLAGS'
2645ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2646ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2647ac_compiler_gnu=$ac_cv_c_compiler_gnu
2648ac_main_return="return"
2649
2650# Find a good install program.  We prefer a C program (faster),
2651# so one script is as good as another.  But avoid the broken or
2652# incompatible versions:
2653# SysV /etc/install, /usr/sbin/install
2654# SunOS /usr/etc/install
2655# IRIX /sbin/install
2656# AIX /bin/install
2657# AmigaOS /C/install, which installs bootblocks on floppy discs
2658# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2659# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2660# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2661# ./install, which can be erroneously created by make from ./install.sh.
2662echo "$as_me:2662: checking for a BSD compatible install" >&5
2663echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2664if test -z "$INSTALL"; then
2665if test "${ac_cv_path_install+set}" = set; then
2666  echo $ECHO_N "(cached) $ECHO_C" >&6
2667else
2668    ac_save_IFS=$IFS; IFS=$ac_path_separator
2669  for ac_dir in $PATH; do
2670    IFS=$ac_save_IFS
2671    # Account for people who put trailing slashes in PATH elements.
2672    case $ac_dir/ in
2673    / | ./ | .// | /cC/* \
2674    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2675    | /usr/ucb/* ) ;;
2676    *)
2677      # OSF1 and SCO ODT 3.0 have their own names for install.
2678      # Don't use installbsd from OSF since it installs stuff as root
2679      # by default.
2680      for ac_prog in ginstall scoinst install; do
2681        if $as_executable_p "$ac_dir/$ac_prog"; then
2682	  if test $ac_prog = install &&
2683            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2684	    # AIX install.  It has an incompatible calling convention.
2685	    :
2686	  elif test $ac_prog = install &&
2687	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2688	    # program-specific install script used by HP pwplus--don't use.
2689	    :
2690	  else
2691	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2692	    break 2
2693	  fi
2694	fi
2695      done
2696      ;;
2697    esac
2698  done
2699
2700fi
2701  if test "${ac_cv_path_install+set}" = set; then
2702    INSTALL=$ac_cv_path_install
2703  else
2704    # As a last resort, use the slow shell script.  We don't cache a
2705    # path for INSTALL within a source directory, because that will
2706    # break other packages using the cache if that directory is
2707    # removed, or if the path is relative.
2708    INSTALL=$ac_install_sh
2709  fi
2710fi
2711echo "$as_me:2711: result: $INSTALL" >&5
2712echo "${ECHO_T}$INSTALL" >&6
2713
2714# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2715# It thinks the first close brace ends the variable substitution.
2716test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2717
2718test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2719
2720test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2721
2722for ac_prog in lint cppcheck splint
2723do
2724  # Extract the first word of "$ac_prog", so it can be a program name with args.
2725set dummy $ac_prog; ac_word=$2
2726echo "$as_me:2726: checking for $ac_word" >&5
2727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2728if test "${ac_cv_prog_LINT+set}" = set; then
2729  echo $ECHO_N "(cached) $ECHO_C" >&6
2730else
2731  if test -n "$LINT"; then
2732  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2733else
2734  ac_save_IFS=$IFS; IFS=$ac_path_separator
2735ac_dummy="$PATH"
2736for ac_dir in $ac_dummy; do
2737  IFS=$ac_save_IFS
2738  test -z "$ac_dir" && ac_dir=.
2739  $as_executable_p "$ac_dir/$ac_word" || continue
2740ac_cv_prog_LINT="$ac_prog"
2741echo "$as_me:2741: found $ac_dir/$ac_word" >&5
2742break
2743done
2744
2745fi
2746fi
2747LINT=$ac_cv_prog_LINT
2748if test -n "$LINT"; then
2749  echo "$as_me:2749: result: $LINT" >&5
2750echo "${ECHO_T}$LINT" >&6
2751else
2752  echo "$as_me:2752: result: no" >&5
2753echo "${ECHO_T}no" >&6
2754fi
2755
2756  test -n "$LINT" && break
2757done
2758
2759case "x$LINT" in
2760(xcppcheck|x*/cppcheck)
2761	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2762	;;
2763esac
2764
2765echo "$as_me:2765: checking if filesystem supports mixed-case filenames" >&5
2766echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2767if test "${cf_cv_mixedcase+set}" = set; then
2768  echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770
2771if test "$cross_compiling" = yes ; then
2772	case "$target_alias" in
2773	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
2774		cf_cv_mixedcase=no
2775		;;
2776	(*)
2777		cf_cv_mixedcase=yes
2778		;;
2779	esac
2780else
2781	rm -f conftest CONFTEST
2782	echo test >conftest
2783	if test -f CONFTEST ; then
2784		cf_cv_mixedcase=no
2785	else
2786		cf_cv_mixedcase=yes
2787	fi
2788	rm -f conftest CONFTEST
2789fi
2790
2791fi
2792echo "$as_me:2792: result: $cf_cv_mixedcase" >&5
2793echo "${ECHO_T}$cf_cv_mixedcase" >&6
2794test "$cf_cv_mixedcase" = yes &&
2795cat >>confdefs.h <<\EOF
2796#define MIXEDCASE_FILENAMES 1
2797EOF
2798
2799for ac_prog in exctags ctags
2800do
2801  # Extract the first word of "$ac_prog", so it can be a program name with args.
2802set dummy $ac_prog; ac_word=$2
2803echo "$as_me:2803: checking for $ac_word" >&5
2804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2805if test "${ac_cv_prog_CTAGS+set}" = set; then
2806  echo $ECHO_N "(cached) $ECHO_C" >&6
2807else
2808  if test -n "$CTAGS"; then
2809  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2810else
2811  ac_save_IFS=$IFS; IFS=$ac_path_separator
2812ac_dummy="$PATH"
2813for ac_dir in $ac_dummy; do
2814  IFS=$ac_save_IFS
2815  test -z "$ac_dir" && ac_dir=.
2816  $as_executable_p "$ac_dir/$ac_word" || continue
2817ac_cv_prog_CTAGS="$ac_prog"
2818echo "$as_me:2818: found $ac_dir/$ac_word" >&5
2819break
2820done
2821
2822fi
2823fi
2824CTAGS=$ac_cv_prog_CTAGS
2825if test -n "$CTAGS"; then
2826  echo "$as_me:2826: result: $CTAGS" >&5
2827echo "${ECHO_T}$CTAGS" >&6
2828else
2829  echo "$as_me:2829: result: no" >&5
2830echo "${ECHO_T}no" >&6
2831fi
2832
2833  test -n "$CTAGS" && break
2834done
2835
2836for ac_prog in exetags etags
2837do
2838  # Extract the first word of "$ac_prog", so it can be a program name with args.
2839set dummy $ac_prog; ac_word=$2
2840echo "$as_me:2840: checking for $ac_word" >&5
2841echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2842if test "${ac_cv_prog_ETAGS+set}" = set; then
2843  echo $ECHO_N "(cached) $ECHO_C" >&6
2844else
2845  if test -n "$ETAGS"; then
2846  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2847else
2848  ac_save_IFS=$IFS; IFS=$ac_path_separator
2849ac_dummy="$PATH"
2850for ac_dir in $ac_dummy; do
2851  IFS=$ac_save_IFS
2852  test -z "$ac_dir" && ac_dir=.
2853  $as_executable_p "$ac_dir/$ac_word" || continue
2854ac_cv_prog_ETAGS="$ac_prog"
2855echo "$as_me:2855: found $ac_dir/$ac_word" >&5
2856break
2857done
2858
2859fi
2860fi
2861ETAGS=$ac_cv_prog_ETAGS
2862if test -n "$ETAGS"; then
2863  echo "$as_me:2863: result: $ETAGS" >&5
2864echo "${ECHO_T}$ETAGS" >&6
2865else
2866  echo "$as_me:2866: result: no" >&5
2867echo "${ECHO_T}no" >&6
2868fi
2869
2870  test -n "$ETAGS" && break
2871done
2872
2873# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2874set dummy ${CTAGS:-ctags}; ac_word=$2
2875echo "$as_me:2875: checking for $ac_word" >&5
2876echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2877if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2878  echo $ECHO_N "(cached) $ECHO_C" >&6
2879else
2880  if test -n "$MAKE_LOWER_TAGS"; then
2881  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2882else
2883  ac_save_IFS=$IFS; IFS=$ac_path_separator
2884ac_dummy="$PATH"
2885for ac_dir in $ac_dummy; do
2886  IFS=$ac_save_IFS
2887  test -z "$ac_dir" && ac_dir=.
2888  $as_executable_p "$ac_dir/$ac_word" || continue
2889ac_cv_prog_MAKE_LOWER_TAGS="yes"
2890echo "$as_me:2890: found $ac_dir/$ac_word" >&5
2891break
2892done
2893
2894  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2895fi
2896fi
2897MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2898if test -n "$MAKE_LOWER_TAGS"; then
2899  echo "$as_me:2899: result: $MAKE_LOWER_TAGS" >&5
2900echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2901else
2902  echo "$as_me:2902: result: no" >&5
2903echo "${ECHO_T}no" >&6
2904fi
2905
2906if test "$cf_cv_mixedcase" = yes ; then
2907	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2908set dummy ${ETAGS:-etags}; ac_word=$2
2909echo "$as_me:2909: checking for $ac_word" >&5
2910echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2911if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2912  echo $ECHO_N "(cached) $ECHO_C" >&6
2913else
2914  if test -n "$MAKE_UPPER_TAGS"; then
2915  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2916else
2917  ac_save_IFS=$IFS; IFS=$ac_path_separator
2918ac_dummy="$PATH"
2919for ac_dir in $ac_dummy; do
2920  IFS=$ac_save_IFS
2921  test -z "$ac_dir" && ac_dir=.
2922  $as_executable_p "$ac_dir/$ac_word" || continue
2923ac_cv_prog_MAKE_UPPER_TAGS="yes"
2924echo "$as_me:2924: found $ac_dir/$ac_word" >&5
2925break
2926done
2927
2928  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2929fi
2930fi
2931MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2932if test -n "$MAKE_UPPER_TAGS"; then
2933  echo "$as_me:2933: result: $MAKE_UPPER_TAGS" >&5
2934echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2935else
2936  echo "$as_me:2936: result: no" >&5
2937echo "${ECHO_T}no" >&6
2938fi
2939
2940else
2941	MAKE_UPPER_TAGS=no
2942fi
2943
2944if test "$MAKE_UPPER_TAGS" = yes ; then
2945	MAKE_UPPER_TAGS=
2946else
2947	MAKE_UPPER_TAGS="#"
2948fi
2949
2950if test "$MAKE_LOWER_TAGS" = yes ; then
2951	MAKE_LOWER_TAGS=
2952else
2953	MAKE_LOWER_TAGS="#"
2954fi
2955
2956echo "$as_me:2956: checking for an ANSI C-conforming const" >&5
2957echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2958if test "${ac_cv_c_const+set}" = set; then
2959  echo $ECHO_N "(cached) $ECHO_C" >&6
2960else
2961  cat >"conftest.$ac_ext" <<_ACEOF
2962#line 2962 "configure"
2963#include "confdefs.h"
2964
2965int
2966main (void)
2967{
2968/* FIXME: Include the comments suggested by Paul. */
2969#ifndef __cplusplus
2970  /* Ultrix mips cc rejects this.  */
2971  typedef int charset[2];
2972  const charset x;
2973  /* SunOS 4.1.1 cc rejects this.  */
2974  char const *const *ccp;
2975  char **p;
2976  /* NEC SVR4.0.2 mips cc rejects this.  */
2977  struct point {int x, y;};
2978  static struct point const zero = {0,0};
2979  /* AIX XL C 1.02.0.0 rejects this.
2980     It does not let you subtract one const X* pointer from another in
2981     an arm of an if-expression whose if-part is not a constant
2982     expression */
2983  const char *g = "string";
2984  ccp = &g + (g ? g-g : 0);
2985  /* HPUX 7.0 cc rejects these. */
2986  ++ccp;
2987  p = (char**) ccp;
2988  ccp = (char const *const *) p;
2989  { /* SCO 3.2v4 cc rejects this.  */
2990    char *t;
2991    char const *s = 0 ? (char *) 0 : (char const *) 0;
2992
2993    *t++ = 0;
2994  }
2995  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2996    int x[] = {25, 17};
2997    const int *foo = &x[0];
2998    ++foo;
2999  }
3000  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3001    typedef const int *iptr;
3002    iptr p = 0;
3003    ++p;
3004  }
3005  { /* AIX XL C 1.02.0.0 rejects this saying
3006       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3007    struct s { int j; const int *ap[3]; };
3008    struct s *b; b->j = 5;
3009  }
3010  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3011    const int foo = 10;
3012  }
3013#endif
3014
3015  ;
3016  return 0;
3017}
3018_ACEOF
3019rm -f "conftest.$ac_objext"
3020if { (eval echo "$as_me:3020: \"$ac_compile\"") >&5
3021  (eval $ac_compile) 2>&5
3022  ac_status=$?
3023  echo "$as_me:3023: \$? = $ac_status" >&5
3024  (exit "$ac_status"); } &&
3025         { ac_try='test -s "conftest.$ac_objext"'
3026  { (eval echo "$as_me:3026: \"$ac_try\"") >&5
3027  (eval $ac_try) 2>&5
3028  ac_status=$?
3029  echo "$as_me:3029: \$? = $ac_status" >&5
3030  (exit "$ac_status"); }; }; then
3031  ac_cv_c_const=yes
3032else
3033  echo "$as_me: failed program was:" >&5
3034cat "conftest.$ac_ext" >&5
3035ac_cv_c_const=no
3036fi
3037rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3038fi
3039echo "$as_me:3039: result: $ac_cv_c_const" >&5
3040echo "${ECHO_T}$ac_cv_c_const" >&6
3041if test $ac_cv_c_const = no; then
3042
3043cat >>confdefs.h <<\EOF
3044#define const
3045EOF
3046
3047fi
3048
3049echo "$as_me:3049: checking if the POSIX test-macros are already defined" >&5
3050echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3051if test "${cf_cv_posix_visible+set}" = set; then
3052  echo $ECHO_N "(cached) $ECHO_C" >&6
3053else
3054
3055cat >"conftest.$ac_ext" <<_ACEOF
3056#line 3056 "configure"
3057#include "confdefs.h"
3058#include <stdio.h>
3059int
3060main (void)
3061{
3062
3063#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3064	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3065	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3066	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3067#error conflicting symbols found
3068#endif
3069
3070  ;
3071  return 0;
3072}
3073_ACEOF
3074rm -f "conftest.$ac_objext"
3075if { (eval echo "$as_me:3075: \"$ac_compile\"") >&5
3076  (eval $ac_compile) 2>&5
3077  ac_status=$?
3078  echo "$as_me:3078: \$? = $ac_status" >&5
3079  (exit "$ac_status"); } &&
3080         { ac_try='test -s "conftest.$ac_objext"'
3081  { (eval echo "$as_me:3081: \"$ac_try\"") >&5
3082  (eval $ac_try) 2>&5
3083  ac_status=$?
3084  echo "$as_me:3084: \$? = $ac_status" >&5
3085  (exit "$ac_status"); }; }; then
3086  cf_cv_posix_visible=no
3087else
3088  echo "$as_me: failed program was:" >&5
3089cat "conftest.$ac_ext" >&5
3090cf_cv_posix_visible=yes
3091fi
3092rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3093
3094fi
3095echo "$as_me:3095: result: $cf_cv_posix_visible" >&5
3096echo "${ECHO_T}$cf_cv_posix_visible" >&6
3097
3098if test "$cf_cv_posix_visible" = no; then
3099
3100cf_XOPEN_SOURCE=600
3101cf_POSIX_C_SOURCE=199506L
3102cf_xopen_source=
3103
3104case "$host_os" in
3105(aix[4-7]*)
3106	cf_xopen_source="-D_ALL_SOURCE"
3107	;;
3108(msys)
3109	cf_XOPEN_SOURCE=600
3110	;;
3111(darwin[0-8].*)
3112	cf_xopen_source="-D_APPLE_C_SOURCE"
3113	;;
3114(darwin*)
3115	cf_xopen_source="-D_DARWIN_C_SOURCE"
3116	cf_XOPEN_SOURCE=
3117	;;
3118(freebsd*|dragonfly*|midnightbsd*)
3119	# 5.x headers associate
3120	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3121	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3122	cf_POSIX_C_SOURCE=200112L
3123	cf_XOPEN_SOURCE=600
3124	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3125	;;
3126(hpux11*)
3127	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3128	;;
3129(hpux*)
3130	cf_xopen_source="-D_HPUX_SOURCE"
3131	;;
3132(irix[56].*)
3133	cf_xopen_source="-D_SGI_SOURCE"
3134	cf_XOPEN_SOURCE=
3135	;;
3136(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3137
3138cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3139
3140echo "$as_me:3140: checking if this is the GNU C library" >&5
3141echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3142if test "${cf_cv_gnu_library+set}" = set; then
3143  echo $ECHO_N "(cached) $ECHO_C" >&6
3144else
3145
3146cat >"conftest.$ac_ext" <<_ACEOF
3147#line 3147 "configure"
3148#include "confdefs.h"
3149#include <sys/types.h>
3150int
3151main (void)
3152{
3153
3154	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3155		return 0;
3156	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3157		return 0;
3158	#else
3159	#	error not GNU C library
3160	#endif
3161  ;
3162  return 0;
3163}
3164_ACEOF
3165rm -f "conftest.$ac_objext"
3166if { (eval echo "$as_me:3166: \"$ac_compile\"") >&5
3167  (eval $ac_compile) 2>&5
3168  ac_status=$?
3169  echo "$as_me:3169: \$? = $ac_status" >&5
3170  (exit "$ac_status"); } &&
3171         { ac_try='test -s "conftest.$ac_objext"'
3172  { (eval echo "$as_me:3172: \"$ac_try\"") >&5
3173  (eval $ac_try) 2>&5
3174  ac_status=$?
3175  echo "$as_me:3175: \$? = $ac_status" >&5
3176  (exit "$ac_status"); }; }; then
3177  cf_cv_gnu_library=yes
3178else
3179  echo "$as_me: failed program was:" >&5
3180cat "conftest.$ac_ext" >&5
3181cf_cv_gnu_library=no
3182fi
3183rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3184
3185fi
3186echo "$as_me:3186: result: $cf_cv_gnu_library" >&5
3187echo "${ECHO_T}$cf_cv_gnu_library" >&6
3188
3189if test x$cf_cv_gnu_library = xyes; then
3190
3191	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3192	# was changed to help a little.  newlib incorporated the change about 4
3193	# years later.
3194	echo "$as_me:3194: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3195echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3196if test "${cf_cv_gnu_library_219+set}" = set; then
3197  echo $ECHO_N "(cached) $ECHO_C" >&6
3198else
3199
3200		cf_save="$CPPFLAGS"
3201
3202	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3203	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3204
3205		cat >"conftest.$ac_ext" <<_ACEOF
3206#line 3206 "configure"
3207#include "confdefs.h"
3208#include <sys/types.h>
3209int
3210main (void)
3211{
3212
3213			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3214				return 0;
3215			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3216				return 0;
3217			#else
3218			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3219			#endif
3220  ;
3221  return 0;
3222}
3223_ACEOF
3224rm -f "conftest.$ac_objext"
3225if { (eval echo "$as_me:3225: \"$ac_compile\"") >&5
3226  (eval $ac_compile) 2>&5
3227  ac_status=$?
3228  echo "$as_me:3228: \$? = $ac_status" >&5
3229  (exit "$ac_status"); } &&
3230         { ac_try='test -s "conftest.$ac_objext"'
3231  { (eval echo "$as_me:3231: \"$ac_try\"") >&5
3232  (eval $ac_try) 2>&5
3233  ac_status=$?
3234  echo "$as_me:3234: \$? = $ac_status" >&5
3235  (exit "$ac_status"); }; }; then
3236  cf_cv_gnu_library_219=yes
3237else
3238  echo "$as_me: failed program was:" >&5
3239cat "conftest.$ac_ext" >&5
3240cf_cv_gnu_library_219=no
3241fi
3242rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3243		CPPFLAGS="$cf_save"
3244
3245fi
3246echo "$as_me:3246: result: $cf_cv_gnu_library_219" >&5
3247echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3248
3249	if test "x$cf_cv_gnu_library_219" = xyes; then
3250		cf_save="$CPPFLAGS"
3251		echo "$as_me:3251: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3252echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3253if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3254  echo $ECHO_N "(cached) $ECHO_C" >&6
3255else
3256
3257cf_fix_cppflags=no
3258cf_new_cflags=
3259cf_new_cppflags=
3260cf_new_extra_cppflags=
3261
3262for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3263do
3264case "$cf_fix_cppflags" in
3265(no)
3266	case "$cf_add_cflags" in
3267	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3268		case "$cf_add_cflags" in
3269		(-D*)
3270			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3271
3272			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3273				&& test -z "${cf_tst_cflags}" \
3274				&& cf_fix_cppflags=yes
3275
3276			if test "$cf_fix_cppflags" = yes ; then
3277
3278	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3279	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3280
3281				continue
3282			elif test "${cf_tst_cflags}" = "\"'" ; then
3283
3284	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3285	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3286
3287				continue
3288			fi
3289			;;
3290		esac
3291		case "$CPPFLAGS" in
3292		(*$cf_add_cflags)
3293			;;
3294		(*)
3295			case "$cf_add_cflags" in
3296			(-D*)
3297				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3298
3299CPPFLAGS=`echo "$CPPFLAGS" | \
3300	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3301		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3302
3303				;;
3304			esac
3305
3306	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3307	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3308
3309			;;
3310		esac
3311		;;
3312	(*)
3313
3314	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3315	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3316
3317		;;
3318	esac
3319	;;
3320(yes)
3321
3322	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3323	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3324
3325	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3326
3327	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3328		&& test -z "${cf_tst_cflags}" \
3329		&& cf_fix_cppflags=no
3330	;;
3331esac
3332done
3333
3334if test -n "$cf_new_cflags" ; then
3335
3336	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3337	CFLAGS="${CFLAGS}$cf_new_cflags"
3338
3339fi
3340
3341if test -n "$cf_new_cppflags" ; then
3342
3343	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3344	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3345
3346fi
3347
3348if test -n "$cf_new_extra_cppflags" ; then
3349
3350	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3351	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3352
3353fi
3354
3355			cat >"conftest.$ac_ext" <<_ACEOF
3356#line 3356 "configure"
3357#include "confdefs.h"
3358
3359				#include <limits.h>
3360				#include <sys/types.h>
3361
3362int
3363main (void)
3364{
3365
3366				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3367					return 0;
3368				#else
3369				#	error GNU C library is too old
3370				#endif
3371  ;
3372  return 0;
3373}
3374_ACEOF
3375rm -f "conftest.$ac_objext"
3376if { (eval echo "$as_me:3376: \"$ac_compile\"") >&5
3377  (eval $ac_compile) 2>&5
3378  ac_status=$?
3379  echo "$as_me:3379: \$? = $ac_status" >&5
3380  (exit "$ac_status"); } &&
3381         { ac_try='test -s "conftest.$ac_objext"'
3382  { (eval echo "$as_me:3382: \"$ac_try\"") >&5
3383  (eval $ac_try) 2>&5
3384  ac_status=$?
3385  echo "$as_me:3385: \$? = $ac_status" >&5
3386  (exit "$ac_status"); }; }; then
3387  cf_cv_gnu_dftsrc_219=yes
3388else
3389  echo "$as_me: failed program was:" >&5
3390cat "conftest.$ac_ext" >&5
3391cf_cv_gnu_dftsrc_219=no
3392fi
3393rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3394
3395fi
3396echo "$as_me:3396: result: $cf_cv_gnu_dftsrc_219" >&5
3397echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3398		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3399	else
3400		cf_cv_gnu_dftsrc_219=maybe
3401	fi
3402
3403	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3404
3405		echo "$as_me:3405: checking if we must define _GNU_SOURCE" >&5
3406echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3407if test "${cf_cv_gnu_source+set}" = set; then
3408  echo $ECHO_N "(cached) $ECHO_C" >&6
3409else
3410
3411		cat >"conftest.$ac_ext" <<_ACEOF
3412#line 3412 "configure"
3413#include "confdefs.h"
3414#include <sys/types.h>
3415int
3416main (void)
3417{
3418
3419			#ifndef _XOPEN_SOURCE
3420			#error	expected _XOPEN_SOURCE to be defined
3421			#endif
3422  ;
3423  return 0;
3424}
3425_ACEOF
3426rm -f "conftest.$ac_objext"
3427if { (eval echo "$as_me:3427: \"$ac_compile\"") >&5
3428  (eval $ac_compile) 2>&5
3429  ac_status=$?
3430  echo "$as_me:3430: \$? = $ac_status" >&5
3431  (exit "$ac_status"); } &&
3432         { ac_try='test -s "conftest.$ac_objext"'
3433  { (eval echo "$as_me:3433: \"$ac_try\"") >&5
3434  (eval $ac_try) 2>&5
3435  ac_status=$?
3436  echo "$as_me:3436: \$? = $ac_status" >&5
3437  (exit "$ac_status"); }; }; then
3438  cf_cv_gnu_source=no
3439else
3440  echo "$as_me: failed program was:" >&5
3441cat "conftest.$ac_ext" >&5
3442cf_save="$CPPFLAGS"
3443
3444cf_fix_cppflags=no
3445cf_new_cflags=
3446cf_new_cppflags=
3447cf_new_extra_cppflags=
3448
3449for cf_add_cflags in -D_GNU_SOURCE
3450do
3451case "$cf_fix_cppflags" in
3452(no)
3453	case "$cf_add_cflags" in
3454	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3455		case "$cf_add_cflags" in
3456		(-D*)
3457			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3458
3459			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3460				&& test -z "${cf_tst_cflags}" \
3461				&& cf_fix_cppflags=yes
3462
3463			if test "$cf_fix_cppflags" = yes ; then
3464
3465	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3466	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3467
3468				continue
3469			elif test "${cf_tst_cflags}" = "\"'" ; then
3470
3471	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3472	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3473
3474				continue
3475			fi
3476			;;
3477		esac
3478		case "$CPPFLAGS" in
3479		(*$cf_add_cflags)
3480			;;
3481		(*)
3482			case "$cf_add_cflags" in
3483			(-D*)
3484				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3485
3486CPPFLAGS=`echo "$CPPFLAGS" | \
3487	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3488		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3489
3490				;;
3491			esac
3492
3493	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3494	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3495
3496			;;
3497		esac
3498		;;
3499	(*)
3500
3501	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3502	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3503
3504		;;
3505	esac
3506	;;
3507(yes)
3508
3509	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3510	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3511
3512	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3513
3514	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3515		&& test -z "${cf_tst_cflags}" \
3516		&& cf_fix_cppflags=no
3517	;;
3518esac
3519done
3520
3521if test -n "$cf_new_cflags" ; then
3522
3523	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3524	CFLAGS="${CFLAGS}$cf_new_cflags"
3525
3526fi
3527
3528if test -n "$cf_new_cppflags" ; then
3529
3530	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3531	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3532
3533fi
3534
3535if test -n "$cf_new_extra_cppflags" ; then
3536
3537	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3538	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3539
3540fi
3541
3542			 cat >"conftest.$ac_ext" <<_ACEOF
3543#line 3543 "configure"
3544#include "confdefs.h"
3545#include <sys/types.h>
3546int
3547main (void)
3548{
3549
3550				#ifdef _XOPEN_SOURCE
3551				#error	expected _XOPEN_SOURCE to be undefined
3552				#endif
3553  ;
3554  return 0;
3555}
3556_ACEOF
3557rm -f "conftest.$ac_objext"
3558if { (eval echo "$as_me:3558: \"$ac_compile\"") >&5
3559  (eval $ac_compile) 2>&5
3560  ac_status=$?
3561  echo "$as_me:3561: \$? = $ac_status" >&5
3562  (exit "$ac_status"); } &&
3563         { ac_try='test -s "conftest.$ac_objext"'
3564  { (eval echo "$as_me:3564: \"$ac_try\"") >&5
3565  (eval $ac_try) 2>&5
3566  ac_status=$?
3567  echo "$as_me:3567: \$? = $ac_status" >&5
3568  (exit "$ac_status"); }; }; then
3569  cf_cv_gnu_source=no
3570else
3571  echo "$as_me: failed program was:" >&5
3572cat "conftest.$ac_ext" >&5
3573cf_cv_gnu_source=yes
3574fi
3575rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3576			CPPFLAGS="$cf_save"
3577
3578fi
3579rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3580
3581fi
3582echo "$as_me:3582: result: $cf_cv_gnu_source" >&5
3583echo "${ECHO_T}$cf_cv_gnu_source" >&6
3584
3585		if test "$cf_cv_gnu_source" = yes
3586		then
3587		echo "$as_me:3587: checking if we should also define _DEFAULT_SOURCE" >&5
3588echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3589if test "${cf_cv_default_source+set}" = set; then
3590  echo $ECHO_N "(cached) $ECHO_C" >&6
3591else
3592
3593	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3594	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3595
3596			cat >"conftest.$ac_ext" <<_ACEOF
3597#line 3597 "configure"
3598#include "confdefs.h"
3599#include <sys/types.h>
3600int
3601main (void)
3602{
3603
3604				#ifdef _DEFAULT_SOURCE
3605				#error	expected _DEFAULT_SOURCE to be undefined
3606				#endif
3607  ;
3608  return 0;
3609}
3610_ACEOF
3611rm -f "conftest.$ac_objext"
3612if { (eval echo "$as_me:3612: \"$ac_compile\"") >&5
3613  (eval $ac_compile) 2>&5
3614  ac_status=$?
3615  echo "$as_me:3615: \$? = $ac_status" >&5
3616  (exit "$ac_status"); } &&
3617         { ac_try='test -s "conftest.$ac_objext"'
3618  { (eval echo "$as_me:3618: \"$ac_try\"") >&5
3619  (eval $ac_try) 2>&5
3620  ac_status=$?
3621  echo "$as_me:3621: \$? = $ac_status" >&5
3622  (exit "$ac_status"); }; }; then
3623  cf_cv_default_source=no
3624else
3625  echo "$as_me: failed program was:" >&5
3626cat "conftest.$ac_ext" >&5
3627cf_cv_default_source=yes
3628fi
3629rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3630
3631fi
3632echo "$as_me:3632: result: $cf_cv_default_source" >&5
3633echo "${ECHO_T}$cf_cv_default_source" >&6
3634			if test "$cf_cv_default_source" = yes
3635			then
3636
3637	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3638	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3639
3640			fi
3641		fi
3642	fi
3643
3644fi
3645
3646	;;
3647(minix*)
3648	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3649	;;
3650(mirbsd*)
3651	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3652	cf_XOPEN_SOURCE=
3653
3654if test "$cf_cv_posix_visible" = no; then
3655
3656cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3657
3658cf_save_CFLAGS="$CFLAGS"
3659cf_save_CPPFLAGS="$CPPFLAGS"
3660
3661cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3662	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3663		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3664
3665cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3666	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3667		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3668
3669echo "$as_me:3669: checking if we should define _POSIX_C_SOURCE" >&5
3670echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3671if test "${cf_cv_posix_c_source+set}" = set; then
3672  echo $ECHO_N "(cached) $ECHO_C" >&6
3673else
3674
3675echo "${as_me:-configure}:3675: testing if the symbol is already defined go no further ..." 1>&5
3676
3677	cat >"conftest.$ac_ext" <<_ACEOF
3678#line 3678 "configure"
3679#include "confdefs.h"
3680#include <sys/types.h>
3681int
3682main (void)
3683{
3684
3685#ifndef _POSIX_C_SOURCE
3686make an error
3687#endif
3688  ;
3689  return 0;
3690}
3691_ACEOF
3692rm -f "conftest.$ac_objext"
3693if { (eval echo "$as_me:3693: \"$ac_compile\"") >&5
3694  (eval $ac_compile) 2>&5
3695  ac_status=$?
3696  echo "$as_me:3696: \$? = $ac_status" >&5
3697  (exit "$ac_status"); } &&
3698         { ac_try='test -s "conftest.$ac_objext"'
3699  { (eval echo "$as_me:3699: \"$ac_try\"") >&5
3700  (eval $ac_try) 2>&5
3701  ac_status=$?
3702  echo "$as_me:3702: \$? = $ac_status" >&5
3703  (exit "$ac_status"); }; }; then
3704  cf_cv_posix_c_source=no
3705else
3706  echo "$as_me: failed program was:" >&5
3707cat "conftest.$ac_ext" >&5
3708cf_want_posix_source=no
3709	 case .$cf_POSIX_C_SOURCE in
3710	 (.[12]??*)
3711		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3712		;;
3713	 (.2)
3714		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3715		cf_want_posix_source=yes
3716		;;
3717	 (.*)
3718		cf_want_posix_source=yes
3719		;;
3720	 esac
3721	 if test "$cf_want_posix_source" = yes ; then
3722		cat >"conftest.$ac_ext" <<_ACEOF
3723#line 3723 "configure"
3724#include "confdefs.h"
3725#include <sys/types.h>
3726int
3727main (void)
3728{
3729
3730#ifdef _POSIX_SOURCE
3731make an error
3732#endif
3733  ;
3734  return 0;
3735}
3736_ACEOF
3737rm -f "conftest.$ac_objext"
3738if { (eval echo "$as_me:3738: \"$ac_compile\"") >&5
3739  (eval $ac_compile) 2>&5
3740  ac_status=$?
3741  echo "$as_me:3741: \$? = $ac_status" >&5
3742  (exit "$ac_status"); } &&
3743         { ac_try='test -s "conftest.$ac_objext"'
3744  { (eval echo "$as_me:3744: \"$ac_try\"") >&5
3745  (eval $ac_try) 2>&5
3746  ac_status=$?
3747  echo "$as_me:3747: \$? = $ac_status" >&5
3748  (exit "$ac_status"); }; }; then
3749  :
3750else
3751  echo "$as_me: failed program was:" >&5
3752cat "conftest.$ac_ext" >&5
3753cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3754fi
3755rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3756	 fi
3757
3758echo "${as_me:-configure}:3758: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3759
3760	 CFLAGS="$cf_trim_CFLAGS"
3761	 CPPFLAGS="$cf_trim_CPPFLAGS"
3762
3763	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3764	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3765
3766echo "${as_me:-configure}:3766: testing if the second compile does not leave our definition intact error ..." 1>&5
3767
3768	 cat >"conftest.$ac_ext" <<_ACEOF
3769#line 3769 "configure"
3770#include "confdefs.h"
3771#include <sys/types.h>
3772int
3773main (void)
3774{
3775
3776#ifndef _POSIX_C_SOURCE
3777make an error
3778#endif
3779  ;
3780  return 0;
3781}
3782_ACEOF
3783rm -f "conftest.$ac_objext"
3784if { (eval echo "$as_me:3784: \"$ac_compile\"") >&5
3785  (eval $ac_compile) 2>&5
3786  ac_status=$?
3787  echo "$as_me:3787: \$? = $ac_status" >&5
3788  (exit "$ac_status"); } &&
3789         { ac_try='test -s "conftest.$ac_objext"'
3790  { (eval echo "$as_me:3790: \"$ac_try\"") >&5
3791  (eval $ac_try) 2>&5
3792  ac_status=$?
3793  echo "$as_me:3793: \$? = $ac_status" >&5
3794  (exit "$ac_status"); }; }; then
3795  :
3796else
3797  echo "$as_me: failed program was:" >&5
3798cat "conftest.$ac_ext" >&5
3799cf_cv_posix_c_source=no
3800fi
3801rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3802	 CFLAGS="$cf_save_CFLAGS"
3803	 CPPFLAGS="$cf_save_CPPFLAGS"
3804
3805fi
3806rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3807
3808fi
3809echo "$as_me:3809: result: $cf_cv_posix_c_source" >&5
3810echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3811
3812if test "$cf_cv_posix_c_source" != no ; then
3813	CFLAGS="$cf_trim_CFLAGS"
3814	CPPFLAGS="$cf_trim_CPPFLAGS"
3815
3816cf_fix_cppflags=no
3817cf_new_cflags=
3818cf_new_cppflags=
3819cf_new_extra_cppflags=
3820
3821for cf_add_cflags in $cf_cv_posix_c_source
3822do
3823case "$cf_fix_cppflags" in
3824(no)
3825	case "$cf_add_cflags" in
3826	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3827		case "$cf_add_cflags" in
3828		(-D*)
3829			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3830
3831			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3832				&& test -z "${cf_tst_cflags}" \
3833				&& cf_fix_cppflags=yes
3834
3835			if test "$cf_fix_cppflags" = yes ; then
3836
3837	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3838	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3839
3840				continue
3841			elif test "${cf_tst_cflags}" = "\"'" ; then
3842
3843	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3844	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3845
3846				continue
3847			fi
3848			;;
3849		esac
3850		case "$CPPFLAGS" in
3851		(*$cf_add_cflags)
3852			;;
3853		(*)
3854			case "$cf_add_cflags" in
3855			(-D*)
3856				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3857
3858CPPFLAGS=`echo "$CPPFLAGS" | \
3859	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3860		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3861
3862				;;
3863			esac
3864
3865	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3866	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3867
3868			;;
3869		esac
3870		;;
3871	(*)
3872
3873	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3874	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3875
3876		;;
3877	esac
3878	;;
3879(yes)
3880
3881	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3882	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3883
3884	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3885
3886	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3887		&& test -z "${cf_tst_cflags}" \
3888		&& cf_fix_cppflags=no
3889	;;
3890esac
3891done
3892
3893if test -n "$cf_new_cflags" ; then
3894
3895	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3896	CFLAGS="${CFLAGS}$cf_new_cflags"
3897
3898fi
3899
3900if test -n "$cf_new_cppflags" ; then
3901
3902	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3903	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3904
3905fi
3906
3907if test -n "$cf_new_extra_cppflags" ; then
3908
3909	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3910	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3911
3912fi
3913
3914fi
3915
3916fi # cf_cv_posix_visible
3917
3918	;;
3919(netbsd*)
3920	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3921	;;
3922(openbsd[4-9]*)
3923	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3924	cf_xopen_source="-D_BSD_SOURCE"
3925	cf_XOPEN_SOURCE=600
3926	;;
3927(openbsd*)
3928	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3929	;;
3930(osf[45]*)
3931	cf_xopen_source="-D_OSF_SOURCE"
3932	;;
3933(nto-qnx*)
3934	cf_xopen_source="-D_QNX_SOURCE"
3935	;;
3936(sco*)
3937	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3938	;;
3939(solaris2.*)
3940	cf_xopen_source="-D__EXTENSIONS__"
3941	cf_cv_xopen_source=broken
3942	;;
3943(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3944	cf_XOPEN_SOURCE=
3945	cf_POSIX_C_SOURCE=
3946	;;
3947(*)
3948
3949echo "$as_me:3949: checking if we should define _XOPEN_SOURCE" >&5
3950echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3951if test "${cf_cv_xopen_source+set}" = set; then
3952  echo $ECHO_N "(cached) $ECHO_C" >&6
3953else
3954
3955	cat >"conftest.$ac_ext" <<_ACEOF
3956#line 3956 "configure"
3957#include "confdefs.h"
3958
3959#include <stdlib.h>
3960#include <string.h>
3961#include <sys/types.h>
3962
3963int
3964main (void)
3965{
3966
3967#ifndef _XOPEN_SOURCE
3968make an error
3969#endif
3970  ;
3971  return 0;
3972}
3973_ACEOF
3974rm -f "conftest.$ac_objext"
3975if { (eval echo "$as_me:3975: \"$ac_compile\"") >&5
3976  (eval $ac_compile) 2>&5
3977  ac_status=$?
3978  echo "$as_me:3978: \$? = $ac_status" >&5
3979  (exit "$ac_status"); } &&
3980         { ac_try='test -s "conftest.$ac_objext"'
3981  { (eval echo "$as_me:3981: \"$ac_try\"") >&5
3982  (eval $ac_try) 2>&5
3983  ac_status=$?
3984  echo "$as_me:3984: \$? = $ac_status" >&5
3985  (exit "$ac_status"); }; }; then
3986  cf_cv_xopen_source=no
3987else
3988  echo "$as_me: failed program was:" >&5
3989cat "conftest.$ac_ext" >&5
3990cf_save="$CPPFLAGS"
3991
3992	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3993	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3994
3995	 cat >"conftest.$ac_ext" <<_ACEOF
3996#line 3996 "configure"
3997#include "confdefs.h"
3998
3999#include <stdlib.h>
4000#include <string.h>
4001#include <sys/types.h>
4002
4003int
4004main (void)
4005{
4006
4007#ifdef _XOPEN_SOURCE
4008make an error
4009#endif
4010  ;
4011  return 0;
4012}
4013_ACEOF
4014rm -f "conftest.$ac_objext"
4015if { (eval echo "$as_me:4015: \"$ac_compile\"") >&5
4016  (eval $ac_compile) 2>&5
4017  ac_status=$?
4018  echo "$as_me:4018: \$? = $ac_status" >&5
4019  (exit "$ac_status"); } &&
4020         { ac_try='test -s "conftest.$ac_objext"'
4021  { (eval echo "$as_me:4021: \"$ac_try\"") >&5
4022  (eval $ac_try) 2>&5
4023  ac_status=$?
4024  echo "$as_me:4024: \$? = $ac_status" >&5
4025  (exit "$ac_status"); }; }; then
4026  cf_cv_xopen_source=no
4027else
4028  echo "$as_me: failed program was:" >&5
4029cat "conftest.$ac_ext" >&5
4030cf_cv_xopen_source=$cf_XOPEN_SOURCE
4031fi
4032rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4033	CPPFLAGS="$cf_save"
4034
4035fi
4036rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4037
4038fi
4039echo "$as_me:4039: result: $cf_cv_xopen_source" >&5
4040echo "${ECHO_T}$cf_cv_xopen_source" >&6
4041
4042if test "$cf_cv_xopen_source" != no ; then
4043
4044CFLAGS=`echo "$CFLAGS" | \
4045	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4046		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4047
4048CPPFLAGS=`echo "$CPPFLAGS" | \
4049	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4050		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4051
4052	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4053
4054cf_fix_cppflags=no
4055cf_new_cflags=
4056cf_new_cppflags=
4057cf_new_extra_cppflags=
4058
4059for cf_add_cflags in $cf_temp_xopen_source
4060do
4061case "$cf_fix_cppflags" in
4062(no)
4063	case "$cf_add_cflags" in
4064	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4065		case "$cf_add_cflags" in
4066		(-D*)
4067			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4068
4069			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4070				&& test -z "${cf_tst_cflags}" \
4071				&& cf_fix_cppflags=yes
4072
4073			if test "$cf_fix_cppflags" = yes ; then
4074
4075	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4076	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4077
4078				continue
4079			elif test "${cf_tst_cflags}" = "\"'" ; then
4080
4081	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4082	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4083
4084				continue
4085			fi
4086			;;
4087		esac
4088		case "$CPPFLAGS" in
4089		(*$cf_add_cflags)
4090			;;
4091		(*)
4092			case "$cf_add_cflags" in
4093			(-D*)
4094				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4095
4096CPPFLAGS=`echo "$CPPFLAGS" | \
4097	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4098		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4099
4100				;;
4101			esac
4102
4103	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4104	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4105
4106			;;
4107		esac
4108		;;
4109	(*)
4110
4111	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4112	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4113
4114		;;
4115	esac
4116	;;
4117(yes)
4118
4119	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4120	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4121
4122	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4123
4124	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4125		&& test -z "${cf_tst_cflags}" \
4126		&& cf_fix_cppflags=no
4127	;;
4128esac
4129done
4130
4131if test -n "$cf_new_cflags" ; then
4132
4133	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4134	CFLAGS="${CFLAGS}$cf_new_cflags"
4135
4136fi
4137
4138if test -n "$cf_new_cppflags" ; then
4139
4140	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4141	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4142
4143fi
4144
4145if test -n "$cf_new_extra_cppflags" ; then
4146
4147	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4148	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4149
4150fi
4151
4152fi
4153
4154if test "$cf_cv_posix_visible" = no; then
4155
4156cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4157
4158cf_save_CFLAGS="$CFLAGS"
4159cf_save_CPPFLAGS="$CPPFLAGS"
4160
4161cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4162	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4163		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4164
4165cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4166	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4167		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4168
4169echo "$as_me:4169: checking if we should define _POSIX_C_SOURCE" >&5
4170echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4171if test "${cf_cv_posix_c_source+set}" = set; then
4172  echo $ECHO_N "(cached) $ECHO_C" >&6
4173else
4174
4175echo "${as_me:-configure}:4175: testing if the symbol is already defined go no further ..." 1>&5
4176
4177	cat >"conftest.$ac_ext" <<_ACEOF
4178#line 4178 "configure"
4179#include "confdefs.h"
4180#include <sys/types.h>
4181int
4182main (void)
4183{
4184
4185#ifndef _POSIX_C_SOURCE
4186make an error
4187#endif
4188  ;
4189  return 0;
4190}
4191_ACEOF
4192rm -f "conftest.$ac_objext"
4193if { (eval echo "$as_me:4193: \"$ac_compile\"") >&5
4194  (eval $ac_compile) 2>&5
4195  ac_status=$?
4196  echo "$as_me:4196: \$? = $ac_status" >&5
4197  (exit "$ac_status"); } &&
4198         { ac_try='test -s "conftest.$ac_objext"'
4199  { (eval echo "$as_me:4199: \"$ac_try\"") >&5
4200  (eval $ac_try) 2>&5
4201  ac_status=$?
4202  echo "$as_me:4202: \$? = $ac_status" >&5
4203  (exit "$ac_status"); }; }; then
4204  cf_cv_posix_c_source=no
4205else
4206  echo "$as_me: failed program was:" >&5
4207cat "conftest.$ac_ext" >&5
4208cf_want_posix_source=no
4209	 case .$cf_POSIX_C_SOURCE in
4210	 (.[12]??*)
4211		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4212		;;
4213	 (.2)
4214		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4215		cf_want_posix_source=yes
4216		;;
4217	 (.*)
4218		cf_want_posix_source=yes
4219		;;
4220	 esac
4221	 if test "$cf_want_posix_source" = yes ; then
4222		cat >"conftest.$ac_ext" <<_ACEOF
4223#line 4223 "configure"
4224#include "confdefs.h"
4225#include <sys/types.h>
4226int
4227main (void)
4228{
4229
4230#ifdef _POSIX_SOURCE
4231make an error
4232#endif
4233  ;
4234  return 0;
4235}
4236_ACEOF
4237rm -f "conftest.$ac_objext"
4238if { (eval echo "$as_me:4238: \"$ac_compile\"") >&5
4239  (eval $ac_compile) 2>&5
4240  ac_status=$?
4241  echo "$as_me:4241: \$? = $ac_status" >&5
4242  (exit "$ac_status"); } &&
4243         { ac_try='test -s "conftest.$ac_objext"'
4244  { (eval echo "$as_me:4244: \"$ac_try\"") >&5
4245  (eval $ac_try) 2>&5
4246  ac_status=$?
4247  echo "$as_me:4247: \$? = $ac_status" >&5
4248  (exit "$ac_status"); }; }; then
4249  :
4250else
4251  echo "$as_me: failed program was:" >&5
4252cat "conftest.$ac_ext" >&5
4253cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4254fi
4255rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4256	 fi
4257
4258echo "${as_me:-configure}:4258: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4259
4260	 CFLAGS="$cf_trim_CFLAGS"
4261	 CPPFLAGS="$cf_trim_CPPFLAGS"
4262
4263	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4264	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4265
4266echo "${as_me:-configure}:4266: testing if the second compile does not leave our definition intact error ..." 1>&5
4267
4268	 cat >"conftest.$ac_ext" <<_ACEOF
4269#line 4269 "configure"
4270#include "confdefs.h"
4271#include <sys/types.h>
4272int
4273main (void)
4274{
4275
4276#ifndef _POSIX_C_SOURCE
4277make an error
4278#endif
4279  ;
4280  return 0;
4281}
4282_ACEOF
4283rm -f "conftest.$ac_objext"
4284if { (eval echo "$as_me:4284: \"$ac_compile\"") >&5
4285  (eval $ac_compile) 2>&5
4286  ac_status=$?
4287  echo "$as_me:4287: \$? = $ac_status" >&5
4288  (exit "$ac_status"); } &&
4289         { ac_try='test -s "conftest.$ac_objext"'
4290  { (eval echo "$as_me:4290: \"$ac_try\"") >&5
4291  (eval $ac_try) 2>&5
4292  ac_status=$?
4293  echo "$as_me:4293: \$? = $ac_status" >&5
4294  (exit "$ac_status"); }; }; then
4295  :
4296else
4297  echo "$as_me: failed program was:" >&5
4298cat "conftest.$ac_ext" >&5
4299cf_cv_posix_c_source=no
4300fi
4301rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4302	 CFLAGS="$cf_save_CFLAGS"
4303	 CPPFLAGS="$cf_save_CPPFLAGS"
4304
4305fi
4306rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4307
4308fi
4309echo "$as_me:4309: result: $cf_cv_posix_c_source" >&5
4310echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4311
4312if test "$cf_cv_posix_c_source" != no ; then
4313	CFLAGS="$cf_trim_CFLAGS"
4314	CPPFLAGS="$cf_trim_CPPFLAGS"
4315
4316cf_fix_cppflags=no
4317cf_new_cflags=
4318cf_new_cppflags=
4319cf_new_extra_cppflags=
4320
4321for cf_add_cflags in $cf_cv_posix_c_source
4322do
4323case "$cf_fix_cppflags" in
4324(no)
4325	case "$cf_add_cflags" in
4326	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4327		case "$cf_add_cflags" in
4328		(-D*)
4329			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4330
4331			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4332				&& test -z "${cf_tst_cflags}" \
4333				&& cf_fix_cppflags=yes
4334
4335			if test "$cf_fix_cppflags" = yes ; then
4336
4337	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4338	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4339
4340				continue
4341			elif test "${cf_tst_cflags}" = "\"'" ; then
4342
4343	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4344	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4345
4346				continue
4347			fi
4348			;;
4349		esac
4350		case "$CPPFLAGS" in
4351		(*$cf_add_cflags)
4352			;;
4353		(*)
4354			case "$cf_add_cflags" in
4355			(-D*)
4356				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4357
4358CPPFLAGS=`echo "$CPPFLAGS" | \
4359	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4360		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4361
4362				;;
4363			esac
4364
4365	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4366	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4367
4368			;;
4369		esac
4370		;;
4371	(*)
4372
4373	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4374	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4375
4376		;;
4377	esac
4378	;;
4379(yes)
4380
4381	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4382	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4383
4384	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4385
4386	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4387		&& test -z "${cf_tst_cflags}" \
4388		&& cf_fix_cppflags=no
4389	;;
4390esac
4391done
4392
4393if test -n "$cf_new_cflags" ; then
4394
4395	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4396	CFLAGS="${CFLAGS}$cf_new_cflags"
4397
4398fi
4399
4400if test -n "$cf_new_cppflags" ; then
4401
4402	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4403	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4404
4405fi
4406
4407if test -n "$cf_new_extra_cppflags" ; then
4408
4409	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4410	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4411
4412fi
4413
4414fi
4415
4416fi # cf_cv_posix_visible
4417
4418	;;
4419esac
4420
4421if test -n "$cf_xopen_source" ; then
4422
4423cf_fix_cppflags=no
4424cf_new_cflags=
4425cf_new_cppflags=
4426cf_new_extra_cppflags=
4427
4428for cf_add_cflags in $cf_xopen_source
4429do
4430case "$cf_fix_cppflags" in
4431(no)
4432	case "$cf_add_cflags" in
4433	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4434		case "$cf_add_cflags" in
4435		(-D*)
4436			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4437
4438			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4439				&& test -z "${cf_tst_cflags}" \
4440				&& cf_fix_cppflags=yes
4441
4442			if test "$cf_fix_cppflags" = yes ; then
4443
4444	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4445	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4446
4447				continue
4448			elif test "${cf_tst_cflags}" = "\"'" ; then
4449
4450	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4451	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4452
4453				continue
4454			fi
4455			;;
4456		esac
4457		case "$CPPFLAGS" in
4458		(*$cf_add_cflags)
4459			;;
4460		(*)
4461			case "$cf_add_cflags" in
4462			(-D*)
4463				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4464
4465CPPFLAGS=`echo "$CPPFLAGS" | \
4466	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4467		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4468
4469				;;
4470			esac
4471
4472	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4473	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4474
4475			;;
4476		esac
4477		;;
4478	(*)
4479
4480	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4481	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4482
4483		;;
4484	esac
4485	;;
4486(yes)
4487
4488	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4489	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4490
4491	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4492
4493	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4494		&& test -z "${cf_tst_cflags}" \
4495		&& cf_fix_cppflags=no
4496	;;
4497esac
4498done
4499
4500if test -n "$cf_new_cflags" ; then
4501	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4502
4503echo "${as_me:-configure}:4503: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4504
4505	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4506	CFLAGS="${CFLAGS}$cf_new_cflags"
4507
4508fi
4509
4510if test -n "$cf_new_cppflags" ; then
4511	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4512
4513echo "${as_me:-configure}:4513: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4514
4515	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4516	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4517
4518fi
4519
4520if test -n "$cf_new_extra_cppflags" ; then
4521	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4522
4523echo "${as_me:-configure}:4523: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4524
4525	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4526	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4527
4528fi
4529
4530fi
4531
4532if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4533	echo "$as_me:4533: checking if _XOPEN_SOURCE really is set" >&5
4534echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4535	cat >"conftest.$ac_ext" <<_ACEOF
4536#line 4536 "configure"
4537#include "confdefs.h"
4538#include <stdlib.h>
4539int
4540main (void)
4541{
4542
4543#ifndef _XOPEN_SOURCE
4544make an error
4545#endif
4546  ;
4547  return 0;
4548}
4549_ACEOF
4550rm -f "conftest.$ac_objext"
4551if { (eval echo "$as_me:4551: \"$ac_compile\"") >&5
4552  (eval $ac_compile) 2>&5
4553  ac_status=$?
4554  echo "$as_me:4554: \$? = $ac_status" >&5
4555  (exit "$ac_status"); } &&
4556         { ac_try='test -s "conftest.$ac_objext"'
4557  { (eval echo "$as_me:4557: \"$ac_try\"") >&5
4558  (eval $ac_try) 2>&5
4559  ac_status=$?
4560  echo "$as_me:4560: \$? = $ac_status" >&5
4561  (exit "$ac_status"); }; }; then
4562  cf_XOPEN_SOURCE_set=yes
4563else
4564  echo "$as_me: failed program was:" >&5
4565cat "conftest.$ac_ext" >&5
4566cf_XOPEN_SOURCE_set=no
4567fi
4568rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4569	echo "$as_me:4569: result: $cf_XOPEN_SOURCE_set" >&5
4570echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4571	if test "$cf_XOPEN_SOURCE_set" = yes
4572	then
4573		cat >"conftest.$ac_ext" <<_ACEOF
4574#line 4574 "configure"
4575#include "confdefs.h"
4576#include <stdlib.h>
4577int
4578main (void)
4579{
4580
4581#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4582make an error
4583#endif
4584  ;
4585  return 0;
4586}
4587_ACEOF
4588rm -f "conftest.$ac_objext"
4589if { (eval echo "$as_me:4589: \"$ac_compile\"") >&5
4590  (eval $ac_compile) 2>&5
4591  ac_status=$?
4592  echo "$as_me:4592: \$? = $ac_status" >&5
4593  (exit "$ac_status"); } &&
4594         { ac_try='test -s "conftest.$ac_objext"'
4595  { (eval echo "$as_me:4595: \"$ac_try\"") >&5
4596  (eval $ac_try) 2>&5
4597  ac_status=$?
4598  echo "$as_me:4598: \$? = $ac_status" >&5
4599  (exit "$ac_status"); }; }; then
4600  cf_XOPEN_SOURCE_set_ok=yes
4601else
4602  echo "$as_me: failed program was:" >&5
4603cat "conftest.$ac_ext" >&5
4604cf_XOPEN_SOURCE_set_ok=no
4605fi
4606rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4607		if test "$cf_XOPEN_SOURCE_set_ok" = no
4608		then
4609			{ echo "$as_me:4609: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4610echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4611		fi
4612	else
4613
4614echo "$as_me:4614: checking if we should define _XOPEN_SOURCE" >&5
4615echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4616if test "${cf_cv_xopen_source+set}" = set; then
4617  echo $ECHO_N "(cached) $ECHO_C" >&6
4618else
4619
4620	cat >"conftest.$ac_ext" <<_ACEOF
4621#line 4621 "configure"
4622#include "confdefs.h"
4623
4624#include <stdlib.h>
4625#include <string.h>
4626#include <sys/types.h>
4627
4628int
4629main (void)
4630{
4631
4632#ifndef _XOPEN_SOURCE
4633make an error
4634#endif
4635  ;
4636  return 0;
4637}
4638_ACEOF
4639rm -f "conftest.$ac_objext"
4640if { (eval echo "$as_me:4640: \"$ac_compile\"") >&5
4641  (eval $ac_compile) 2>&5
4642  ac_status=$?
4643  echo "$as_me:4643: \$? = $ac_status" >&5
4644  (exit "$ac_status"); } &&
4645         { ac_try='test -s "conftest.$ac_objext"'
4646  { (eval echo "$as_me:4646: \"$ac_try\"") >&5
4647  (eval $ac_try) 2>&5
4648  ac_status=$?
4649  echo "$as_me:4649: \$? = $ac_status" >&5
4650  (exit "$ac_status"); }; }; then
4651  cf_cv_xopen_source=no
4652else
4653  echo "$as_me: failed program was:" >&5
4654cat "conftest.$ac_ext" >&5
4655cf_save="$CPPFLAGS"
4656
4657	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4658	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4659
4660	 cat >"conftest.$ac_ext" <<_ACEOF
4661#line 4661 "configure"
4662#include "confdefs.h"
4663
4664#include <stdlib.h>
4665#include <string.h>
4666#include <sys/types.h>
4667
4668int
4669main (void)
4670{
4671
4672#ifdef _XOPEN_SOURCE
4673make an error
4674#endif
4675  ;
4676  return 0;
4677}
4678_ACEOF
4679rm -f "conftest.$ac_objext"
4680if { (eval echo "$as_me:4680: \"$ac_compile\"") >&5
4681  (eval $ac_compile) 2>&5
4682  ac_status=$?
4683  echo "$as_me:4683: \$? = $ac_status" >&5
4684  (exit "$ac_status"); } &&
4685         { ac_try='test -s "conftest.$ac_objext"'
4686  { (eval echo "$as_me:4686: \"$ac_try\"") >&5
4687  (eval $ac_try) 2>&5
4688  ac_status=$?
4689  echo "$as_me:4689: \$? = $ac_status" >&5
4690  (exit "$ac_status"); }; }; then
4691  cf_cv_xopen_source=no
4692else
4693  echo "$as_me: failed program was:" >&5
4694cat "conftest.$ac_ext" >&5
4695cf_cv_xopen_source=$cf_XOPEN_SOURCE
4696fi
4697rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4698	CPPFLAGS="$cf_save"
4699
4700fi
4701rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4702
4703fi
4704echo "$as_me:4704: result: $cf_cv_xopen_source" >&5
4705echo "${ECHO_T}$cf_cv_xopen_source" >&6
4706
4707if test "$cf_cv_xopen_source" != no ; then
4708
4709CFLAGS=`echo "$CFLAGS" | \
4710	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4711		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4712
4713CPPFLAGS=`echo "$CPPFLAGS" | \
4714	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4715		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4716
4717	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4718
4719cf_fix_cppflags=no
4720cf_new_cflags=
4721cf_new_cppflags=
4722cf_new_extra_cppflags=
4723
4724for cf_add_cflags in $cf_temp_xopen_source
4725do
4726case "$cf_fix_cppflags" in
4727(no)
4728	case "$cf_add_cflags" in
4729	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4730		case "$cf_add_cflags" in
4731		(-D*)
4732			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4733
4734			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4735				&& test -z "${cf_tst_cflags}" \
4736				&& cf_fix_cppflags=yes
4737
4738			if test "$cf_fix_cppflags" = yes ; then
4739
4740	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4741	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4742
4743				continue
4744			elif test "${cf_tst_cflags}" = "\"'" ; then
4745
4746	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4747	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4748
4749				continue
4750			fi
4751			;;
4752		esac
4753		case "$CPPFLAGS" in
4754		(*$cf_add_cflags)
4755			;;
4756		(*)
4757			case "$cf_add_cflags" in
4758			(-D*)
4759				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4760
4761CPPFLAGS=`echo "$CPPFLAGS" | \
4762	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4763		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4764
4765				;;
4766			esac
4767
4768	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4769	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4770
4771			;;
4772		esac
4773		;;
4774	(*)
4775
4776	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4777	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4778
4779		;;
4780	esac
4781	;;
4782(yes)
4783
4784	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4785	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4786
4787	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4788
4789	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4790		&& test -z "${cf_tst_cflags}" \
4791		&& cf_fix_cppflags=no
4792	;;
4793esac
4794done
4795
4796if test -n "$cf_new_cflags" ; then
4797
4798	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4799	CFLAGS="${CFLAGS}$cf_new_cflags"
4800
4801fi
4802
4803if test -n "$cf_new_cppflags" ; then
4804
4805	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4806	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4807
4808fi
4809
4810if test -n "$cf_new_extra_cppflags" ; then
4811
4812	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4813	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4814
4815fi
4816
4817fi
4818
4819	fi
4820fi
4821fi # cf_cv_posix_visible
4822
4823echo "$as_me:4823: checking if SIGWINCH is defined" >&5
4824echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4825if test "${cf_cv_define_sigwinch+set}" = set; then
4826  echo $ECHO_N "(cached) $ECHO_C" >&6
4827else
4828
4829	cat >"conftest.$ac_ext" <<_ACEOF
4830#line 4830 "configure"
4831#include "confdefs.h"
4832
4833#include <sys/types.h>
4834#include <sys/signal.h>
4835
4836int
4837main (void)
4838{
4839int x = SIGWINCH; (void)x
4840  ;
4841  return 0;
4842}
4843_ACEOF
4844rm -f "conftest.$ac_objext"
4845if { (eval echo "$as_me:4845: \"$ac_compile\"") >&5
4846  (eval $ac_compile) 2>&5
4847  ac_status=$?
4848  echo "$as_me:4848: \$? = $ac_status" >&5
4849  (exit "$ac_status"); } &&
4850         { ac_try='test -s "conftest.$ac_objext"'
4851  { (eval echo "$as_me:4851: \"$ac_try\"") >&5
4852  (eval $ac_try) 2>&5
4853  ac_status=$?
4854  echo "$as_me:4854: \$? = $ac_status" >&5
4855  (exit "$ac_status"); }; }; then
4856  cf_cv_define_sigwinch=yes
4857else
4858  echo "$as_me: failed program was:" >&5
4859cat "conftest.$ac_ext" >&5
4860cat >"conftest.$ac_ext" <<_ACEOF
4861#line 4861 "configure"
4862#include "confdefs.h"
4863
4864#undef _XOPEN_SOURCE
4865#undef _POSIX_SOURCE
4866#undef _POSIX_C_SOURCE
4867#include <sys/types.h>
4868#include <sys/signal.h>
4869
4870int
4871main (void)
4872{
4873int x = SIGWINCH; (void)x
4874  ;
4875  return 0;
4876}
4877_ACEOF
4878rm -f "conftest.$ac_objext"
4879if { (eval echo "$as_me:4879: \"$ac_compile\"") >&5
4880  (eval $ac_compile) 2>&5
4881  ac_status=$?
4882  echo "$as_me:4882: \$? = $ac_status" >&5
4883  (exit "$ac_status"); } &&
4884         { ac_try='test -s "conftest.$ac_objext"'
4885  { (eval echo "$as_me:4885: \"$ac_try\"") >&5
4886  (eval $ac_try) 2>&5
4887  ac_status=$?
4888  echo "$as_me:4888: \$? = $ac_status" >&5
4889  (exit "$ac_status"); }; }; then
4890  cf_cv_define_sigwinch=maybe
4891else
4892  echo "$as_me: failed program was:" >&5
4893cat "conftest.$ac_ext" >&5
4894cf_cv_define_sigwinch=no
4895fi
4896rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4897
4898fi
4899rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4900
4901fi
4902echo "$as_me:4902: result: $cf_cv_define_sigwinch" >&5
4903echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4904
4905if test "$cf_cv_define_sigwinch" = maybe ; then
4906echo "$as_me:4906: checking for actual SIGWINCH definition" >&5
4907echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4908if test "${cf_cv_fixup_sigwinch+set}" = set; then
4909  echo $ECHO_N "(cached) $ECHO_C" >&6
4910else
4911
4912cf_cv_fixup_sigwinch=unknown
4913cf_sigwinch=32
4914while test "$cf_sigwinch" != 1
4915do
4916	cat >"conftest.$ac_ext" <<_ACEOF
4917#line 4917 "configure"
4918#include "confdefs.h"
4919
4920#undef _XOPEN_SOURCE
4921#undef _POSIX_SOURCE
4922#undef _POSIX_C_SOURCE
4923#include <sys/types.h>
4924#include <sys/signal.h>
4925
4926int
4927main (void)
4928{
4929
4930#if SIGWINCH != $cf_sigwinch
4931make an error
4932#endif
4933int x = SIGWINCH; (void)x
4934  ;
4935  return 0;
4936}
4937_ACEOF
4938rm -f "conftest.$ac_objext"
4939if { (eval echo "$as_me:4939: \"$ac_compile\"") >&5
4940  (eval $ac_compile) 2>&5
4941  ac_status=$?
4942  echo "$as_me:4942: \$? = $ac_status" >&5
4943  (exit "$ac_status"); } &&
4944         { ac_try='test -s "conftest.$ac_objext"'
4945  { (eval echo "$as_me:4945: \"$ac_try\"") >&5
4946  (eval $ac_try) 2>&5
4947  ac_status=$?
4948  echo "$as_me:4948: \$? = $ac_status" >&5
4949  (exit "$ac_status"); }; }; then
4950  cf_cv_fixup_sigwinch=$cf_sigwinch
4951	 break
4952else
4953  echo "$as_me: failed program was:" >&5
4954cat "conftest.$ac_ext" >&5
4955fi
4956rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4957
4958cf_sigwinch="`expr "$cf_sigwinch" - 1`"
4959done
4960
4961fi
4962echo "$as_me:4962: result: $cf_cv_fixup_sigwinch" >&5
4963echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4964
4965	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4966		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4967	fi
4968fi
4969
4970echo "$as_me:4970: checking for elf_begin in -lelf" >&5
4971echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
4972if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
4973  echo $ECHO_N "(cached) $ECHO_C" >&6
4974else
4975  ac_check_lib_save_LIBS=$LIBS
4976LIBS="-lelf  $LIBS"
4977cat >"conftest.$ac_ext" <<_ACEOF
4978#line 4978 "configure"
4979#include "confdefs.h"
4980
4981/* Override any gcc2 internal prototype to avoid an error.  */
4982#ifdef __cplusplus
4983extern "C"
4984#endif
4985/* We use char because int might match the return type of a gcc2
4986   builtin and then its argument prototype would still apply.  */
4987char elf_begin ();
4988int
4989main (void)
4990{
4991elf_begin ();
4992  ;
4993  return 0;
4994}
4995_ACEOF
4996rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4997if { (eval echo "$as_me:4997: \"$ac_link\"") >&5
4998  (eval $ac_link) 2>&5
4999  ac_status=$?
5000  echo "$as_me:5000: \$? = $ac_status" >&5
5001  (exit "$ac_status"); } &&
5002         { ac_try='test -s "conftest$ac_exeext"'
5003  { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5004  (eval $ac_try) 2>&5
5005  ac_status=$?
5006  echo "$as_me:5006: \$? = $ac_status" >&5
5007  (exit "$ac_status"); }; }; then
5008  ac_cv_lib_elf_elf_begin=yes
5009else
5010  echo "$as_me: failed program was:" >&5
5011cat "conftest.$ac_ext" >&5
5012ac_cv_lib_elf_elf_begin=no
5013fi
5014rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5015LIBS=$ac_check_lib_save_LIBS
5016fi
5017echo "$as_me:5017: result: $ac_cv_lib_elf_elf_begin" >&5
5018echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
5019if test "$ac_cv_lib_elf_elf_begin" = yes; then
5020
5021echo "$as_me:5021: checking if this is an SVR4 system" >&5
5022echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
5023if test "${cf_cv_svr4+set}" = set; then
5024  echo $ECHO_N "(cached) $ECHO_C" >&6
5025else
5026
5027cat >"conftest.$ac_ext" <<_ACEOF
5028#line 5028 "configure"
5029#include "confdefs.h"
5030
5031#if defined(__CYGWIN__)
5032make an error
5033#endif
5034#include <elf.h>
5035#include <sys/termio.h>
5036
5037int
5038main (void)
5039{
5040
5041static struct termio d_tio;
5042	d_tio.c_cc[VINTR] = 0;
5043	d_tio.c_cc[VQUIT] = 0;
5044	d_tio.c_cc[VERASE] = 0;
5045	d_tio.c_cc[VKILL] = 0;
5046	d_tio.c_cc[VEOF] = 0;
5047	d_tio.c_cc[VEOL] = 0;
5048	d_tio.c_cc[VMIN] = 0;
5049	d_tio.c_cc[VTIME] = 0;
5050	d_tio.c_cc[VLNEXT] = 0;
5051
5052  ;
5053  return 0;
5054}
5055_ACEOF
5056rm -f "conftest.$ac_objext"
5057if { (eval echo "$as_me:5057: \"$ac_compile\"") >&5
5058  (eval $ac_compile) 2>&5
5059  ac_status=$?
5060  echo "$as_me:5060: \$? = $ac_status" >&5
5061  (exit "$ac_status"); } &&
5062         { ac_try='test -s "conftest.$ac_objext"'
5063  { (eval echo "$as_me:5063: \"$ac_try\"") >&5
5064  (eval $ac_try) 2>&5
5065  ac_status=$?
5066  echo "$as_me:5066: \$? = $ac_status" >&5
5067  (exit "$ac_status"); }; }; then
5068  cf_cv_svr4=yes
5069else
5070  echo "$as_me: failed program was:" >&5
5071cat "conftest.$ac_ext" >&5
5072cf_cv_svr4=no
5073fi
5074rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5075
5076fi
5077echo "$as_me:5077: result: $cf_cv_svr4" >&5
5078echo "${ECHO_T}$cf_cv_svr4" >&6
5079
5080fi
5081
5082test "$cf_cv_svr4" = yes &&
5083cat >>confdefs.h <<\EOF
5084#define SVR4 1
5085EOF
5086
5087echo "$as_me:5087: checking if external sys_nerr is declared" >&5
5088echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
5089if test "${cf_cv_dcl_sys_nerr+set}" = set; then
5090  echo $ECHO_N "(cached) $ECHO_C" >&6
5091else
5092
5093	cat >"conftest.$ac_ext" <<_ACEOF
5094#line 5094 "configure"
5095#include "confdefs.h"
5096
5097#ifdef HAVE_STDLIB_H
5098#include <stdlib.h>
5099#endif
5100#include <stdio.h>
5101#include <sys/types.h>
5102#include <errno.h>
5103int
5104main (void)
5105{
5106int x = (int) sys_nerr; (void)x
5107  ;
5108  return 0;
5109}
5110_ACEOF
5111rm -f "conftest.$ac_objext"
5112if { (eval echo "$as_me:5112: \"$ac_compile\"") >&5
5113  (eval $ac_compile) 2>&5
5114  ac_status=$?
5115  echo "$as_me:5115: \$? = $ac_status" >&5
5116  (exit "$ac_status"); } &&
5117         { ac_try='test -s "conftest.$ac_objext"'
5118  { (eval echo "$as_me:5118: \"$ac_try\"") >&5
5119  (eval $ac_try) 2>&5
5120  ac_status=$?
5121  echo "$as_me:5121: \$? = $ac_status" >&5
5122  (exit "$ac_status"); }; }; then
5123  cf_cv_dcl_sys_nerr=yes
5124else
5125  echo "$as_me: failed program was:" >&5
5126cat "conftest.$ac_ext" >&5
5127cf_cv_dcl_sys_nerr=no
5128fi
5129rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5130
5131fi
5132echo "$as_me:5132: result: $cf_cv_dcl_sys_nerr" >&5
5133echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
5134
5135if test "$cf_cv_dcl_sys_nerr" = no ; then
5136
5137cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5138
5139	cat >>confdefs.h <<EOF
5140#define $cf_result 1
5141EOF
5142
5143fi
5144
5145# It's possible (for near-UNIX clones) that the data doesn't exist
5146
5147echo "$as_me:5147: checking if external sys_nerr exists" >&5
5148echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
5149if test "${cf_cv_have_sys_nerr+set}" = set; then
5150  echo $ECHO_N "(cached) $ECHO_C" >&6
5151else
5152
5153	cat >"conftest.$ac_ext" <<_ACEOF
5154#line 5154 "configure"
5155#include "confdefs.h"
5156
5157#undef sys_nerr
5158extern int sys_nerr;
5159
5160int
5161main (void)
5162{
5163sys_nerr = 2
5164  ;
5165  return 0;
5166}
5167_ACEOF
5168rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5169if { (eval echo "$as_me:5169: \"$ac_link\"") >&5
5170  (eval $ac_link) 2>&5
5171  ac_status=$?
5172  echo "$as_me:5172: \$? = $ac_status" >&5
5173  (exit "$ac_status"); } &&
5174         { ac_try='test -s "conftest$ac_exeext"'
5175  { (eval echo "$as_me:5175: \"$ac_try\"") >&5
5176  (eval $ac_try) 2>&5
5177  ac_status=$?
5178  echo "$as_me:5178: \$? = $ac_status" >&5
5179  (exit "$ac_status"); }; }; then
5180  cf_cv_have_sys_nerr=yes
5181else
5182  echo "$as_me: failed program was:" >&5
5183cat "conftest.$ac_ext" >&5
5184cf_cv_have_sys_nerr=no
5185fi
5186rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5187
5188fi
5189echo "$as_me:5189: result: $cf_cv_have_sys_nerr" >&5
5190echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
5191
5192if test "$cf_cv_have_sys_nerr" = yes ; then
5193
5194cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5195
5196	cat >>confdefs.h <<EOF
5197#define $cf_result 1
5198EOF
5199
5200fi
5201
5202echo "$as_me:5202: checking if external sys_errlist is declared" >&5
5203echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
5204if test "${cf_cv_dcl_sys_errlist+set}" = set; then
5205  echo $ECHO_N "(cached) $ECHO_C" >&6
5206else
5207
5208	cat >"conftest.$ac_ext" <<_ACEOF
5209#line 5209 "configure"
5210#include "confdefs.h"
5211
5212#ifdef HAVE_STDLIB_H
5213#include <stdlib.h>
5214#endif
5215#include <stdio.h>
5216#include <sys/types.h>
5217#include <errno.h>
5218int
5219main (void)
5220{
5221int x = (int) sys_errlist; (void)x
5222  ;
5223  return 0;
5224}
5225_ACEOF
5226rm -f "conftest.$ac_objext"
5227if { (eval echo "$as_me:5227: \"$ac_compile\"") >&5
5228  (eval $ac_compile) 2>&5
5229  ac_status=$?
5230  echo "$as_me:5230: \$? = $ac_status" >&5
5231  (exit "$ac_status"); } &&
5232         { ac_try='test -s "conftest.$ac_objext"'
5233  { (eval echo "$as_me:5233: \"$ac_try\"") >&5
5234  (eval $ac_try) 2>&5
5235  ac_status=$?
5236  echo "$as_me:5236: \$? = $ac_status" >&5
5237  (exit "$ac_status"); }; }; then
5238  cf_cv_dcl_sys_errlist=yes
5239else
5240  echo "$as_me: failed program was:" >&5
5241cat "conftest.$ac_ext" >&5
5242cf_cv_dcl_sys_errlist=no
5243fi
5244rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5245
5246fi
5247echo "$as_me:5247: result: $cf_cv_dcl_sys_errlist" >&5
5248echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
5249
5250if test "$cf_cv_dcl_sys_errlist" = no ; then
5251
5252cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5253
5254	cat >>confdefs.h <<EOF
5255#define $cf_result 1
5256EOF
5257
5258fi
5259
5260# It's possible (for near-UNIX clones) that the data doesn't exist
5261
5262echo "$as_me:5262: checking if external sys_errlist exists" >&5
5263echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
5264if test "${cf_cv_have_sys_errlist+set}" = set; then
5265  echo $ECHO_N "(cached) $ECHO_C" >&6
5266else
5267
5268	cat >"conftest.$ac_ext" <<_ACEOF
5269#line 5269 "configure"
5270#include "confdefs.h"
5271
5272#undef sys_errlist
5273extern int sys_errlist;
5274
5275int
5276main (void)
5277{
5278sys_errlist = 2
5279  ;
5280  return 0;
5281}
5282_ACEOF
5283rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5284if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
5285  (eval $ac_link) 2>&5
5286  ac_status=$?
5287  echo "$as_me:5287: \$? = $ac_status" >&5
5288  (exit "$ac_status"); } &&
5289         { ac_try='test -s "conftest$ac_exeext"'
5290  { (eval echo "$as_me:5290: \"$ac_try\"") >&5
5291  (eval $ac_try) 2>&5
5292  ac_status=$?
5293  echo "$as_me:5293: \$? = $ac_status" >&5
5294  (exit "$ac_status"); }; }; then
5295  cf_cv_have_sys_errlist=yes
5296else
5297  echo "$as_me: failed program was:" >&5
5298cat "conftest.$ac_ext" >&5
5299cf_cv_have_sys_errlist=no
5300fi
5301rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5302
5303fi
5304echo "$as_me:5304: result: $cf_cv_have_sys_errlist" >&5
5305echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
5306
5307if test "$cf_cv_have_sys_errlist" = yes ; then
5308
5309cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5310
5311	cat >>confdefs.h <<EOF
5312#define $cf_result 1
5313EOF
5314
5315fi
5316
5317for ac_header in \
5318termios.h \
5319stdlib.h \
5320X11/Intrinsic.h \
5321
5322do
5323as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5324echo "$as_me:5324: checking for $ac_header" >&5
5325echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5326if eval "test \"\${$as_ac_Header+set}\" = set"; then
5327  echo $ECHO_N "(cached) $ECHO_C" >&6
5328else
5329  cat >"conftest.$ac_ext" <<_ACEOF
5330#line 5330 "configure"
5331#include "confdefs.h"
5332#include <$ac_header>
5333_ACEOF
5334if { (eval echo "$as_me:5334: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5335  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5336  ac_status=$?
5337  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5338  rm -f conftest.er1
5339  cat conftest.err >&5
5340  echo "$as_me:5340: \$? = $ac_status" >&5
5341  (exit "$ac_status"); } >/dev/null; then
5342  if test -s conftest.err; then
5343    ac_cpp_err=$ac_c_preproc_warn_flag
5344  else
5345    ac_cpp_err=
5346  fi
5347else
5348  ac_cpp_err=yes
5349fi
5350if test -z "$ac_cpp_err"; then
5351  eval "$as_ac_Header=yes"
5352else
5353  echo "$as_me: failed program was:" >&5
5354  cat "conftest.$ac_ext" >&5
5355  eval "$as_ac_Header=no"
5356fi
5357rm -f conftest.err "conftest.$ac_ext"
5358fi
5359echo "$as_me:5359: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5360echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5361if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5362  cat >>confdefs.h <<EOF
5363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5364EOF
5365
5366fi
5367done
5368
5369echo "$as_me:5369: checking if we should define SYSV" >&5
5370echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
5371if test "${cf_cv_sysv+set}" = set; then
5372  echo $ECHO_N "(cached) $ECHO_C" >&6
5373else
5374
5375cat >"conftest.$ac_ext" <<_ACEOF
5376#line 5376 "configure"
5377#include "confdefs.h"
5378
5379#undef  SYSV
5380#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
5381#ifdef HAVE_STDLIB_H
5382#include <stdlib.h>		/* look for wchar_t */
5383#endif
5384#ifdef HAVE_X11_INTRINSIC_H
5385#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
5386#endif
5387#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
5388#include <termios.h>
5389#define STRUCT_TERMIOS struct termios
5390#else
5391#define STRUCT_TERMIOS struct termio
5392#endif
5393#include <curses.h>
5394#include <term.h>		/* eliminate most BSD hacks */
5395#include <errno.h>		/* declare sys_errlist on older systems */
5396#include <sys/termio.h>		/* eliminate most of the remaining ones */
5397
5398int
5399main (void)
5400{
5401
5402static STRUCT_TERMIOS d_tio;
5403	d_tio.c_cc[VINTR] = 0;
5404	d_tio.c_cc[VQUIT] = 0;
5405	d_tio.c_cc[VERASE] = 0;
5406	d_tio.c_cc[VKILL] = 0;
5407	d_tio.c_cc[VEOF] = 0;
5408	d_tio.c_cc[VEOL] = 0;
5409	d_tio.c_cc[VMIN] = 0;
5410	d_tio.c_cc[VTIME] = 0;
5411#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
5412sys_errlist[0] = "";		/* Cygwin mis-declares this */
5413#endif
5414
5415  ;
5416  return 0;
5417}
5418_ACEOF
5419rm -f "conftest.$ac_objext"
5420if { (eval echo "$as_me:5420: \"$ac_compile\"") >&5
5421  (eval $ac_compile) 2>&5
5422  ac_status=$?
5423  echo "$as_me:5423: \$? = $ac_status" >&5
5424  (exit "$ac_status"); } &&
5425         { ac_try='test -s "conftest.$ac_objext"'
5426  { (eval echo "$as_me:5426: \"$ac_try\"") >&5
5427  (eval $ac_try) 2>&5
5428  ac_status=$?
5429  echo "$as_me:5429: \$? = $ac_status" >&5
5430  (exit "$ac_status"); }; }; then
5431  cf_cv_sysv=yes
5432else
5433  echo "$as_me: failed program was:" >&5
5434cat "conftest.$ac_ext" >&5
5435cf_cv_sysv=no
5436fi
5437rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5438
5439fi
5440echo "$as_me:5440: result: $cf_cv_sysv" >&5
5441echo "${ECHO_T}$cf_cv_sysv" >&6
5442test "$cf_cv_sysv" = yes &&
5443cat >>confdefs.h <<\EOF
5444#define SYSV 1
5445EOF
5446
5447echo "$as_me:5447: checking for uid_t in sys/types.h" >&5
5448echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5449if test "${ac_cv_type_uid_t+set}" = set; then
5450  echo $ECHO_N "(cached) $ECHO_C" >&6
5451else
5452  cat >"conftest.$ac_ext" <<_ACEOF
5453#line 5453 "configure"
5454#include "confdefs.h"
5455#include <sys/types.h>
5456
5457_ACEOF
5458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5459  $EGREP "uid_t" >/dev/null 2>&1; then
5460  ac_cv_type_uid_t=yes
5461else
5462  ac_cv_type_uid_t=no
5463fi
5464rm -rf conftest*
5465
5466fi
5467echo "$as_me:5467: result: $ac_cv_type_uid_t" >&5
5468echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5469if test $ac_cv_type_uid_t = no; then
5470
5471cat >>confdefs.h <<\EOF
5472#define uid_t int
5473EOF
5474
5475cat >>confdefs.h <<\EOF
5476#define gid_t int
5477EOF
5478
5479fi
5480
5481echo "$as_me:5481: checking if you want to see long compiling messages" >&5
5482echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5483
5484# Check whether --enable-echo or --disable-echo was given.
5485if test "${enable_echo+set}" = set; then
5486  enableval="$enable_echo"
5487  test "$enableval" != no && enableval=yes
5488	if test "$enableval" != "yes" ; then
5489
5490	ECHO_LT='--silent'
5491	ECHO_LD='@echo linking $@;'
5492	RULE_CC='@echo compiling $<'
5493	SHOW_CC='@echo compiling $@'
5494	ECHO_CC='@'
5495
5496	else
5497
5498	ECHO_LT=''
5499	ECHO_LD=''
5500	RULE_CC=''
5501	SHOW_CC=''
5502	ECHO_CC=''
5503
5504	fi
5505else
5506  enableval=yes
5507
5508	ECHO_LT=''
5509	ECHO_LD=''
5510	RULE_CC=''
5511	SHOW_CC=''
5512	ECHO_CC=''
5513
5514fi;
5515echo "$as_me:5515: result: $enableval" >&5
5516echo "${ECHO_T}$enableval" >&6
5517
5518echo "$as_me:5518: checking for fgrep" >&5
5519echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
5520if test "${ac_cv_path_FGREP+set}" = set; then
5521  echo $ECHO_N "(cached) $ECHO_C" >&6
5522else
5523  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5524   then ac_cv_path_FGREP="$GREP -F"
5525   else
5526     for ac_prog in gfgrep fgrep
5527do
5528  # Extract the first word of "$ac_prog", so it can be a program name with args.
5529set dummy $ac_prog; ac_word=$2
5530echo "$as_me:5530: checking for $ac_word" >&5
5531echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5532if test "${ac_cv_path_FGREP+set}" = set; then
5533  echo $ECHO_N "(cached) $ECHO_C" >&6
5534else
5535  case $FGREP in
5536  [\\/]* | ?:[\\/]*)
5537  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
5538  ;;
5539  *)
5540  ac_save_IFS=$IFS; IFS=$ac_path_separator
5541ac_dummy="$PATH"
5542for ac_dir in $ac_dummy; do
5543  IFS=$ac_save_IFS
5544  test -z "$ac_dir" && ac_dir=.
5545  if $as_executable_p "$ac_dir/$ac_word"; then
5546   ac_cv_path_FGREP="$ac_dir/$ac_word"
5547   echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548   break
5549fi
5550done
5551
5552  ;;
5553esac
5554fi
5555FGREP=$ac_cv_path_FGREP
5556
5557if test -n "$FGREP"; then
5558  echo "$as_me:5558: result: $FGREP" >&5
5559echo "${ECHO_T}$FGREP" >&6
5560else
5561  echo "$as_me:5561: result: no" >&5
5562echo "${ECHO_T}no" >&6
5563fi
5564
5565  test -n "$FGREP" && break
5566done
5567test -n "$FGREP" || FGREP=": "
5568
5569     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:5569: error: cannot find workable fgrep" >&5
5570echo "$as_me: error: cannot find workable fgrep" >&2;}
5571   { (exit 1); exit 1; }; }
5572   fi
5573fi
5574echo "$as_me:5574: result: $ac_cv_path_FGREP" >&5
5575echo "${ECHO_T}$ac_cv_path_FGREP" >&6
5576 FGREP="$ac_cv_path_FGREP"
5577
5578if test "$GCC" = yes || test "$GXX" = yes
5579then
5580
5581if test "$GCC" = yes || test "$GXX" = yes
5582then
5583	case $CFLAGS in
5584	(*-Werror=*)
5585		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
5586
5587echo "${as_me:-configure}:5587: testing repairing CFLAGS: $CFLAGS ..." 1>&5
5588
5589		cf_temp_flags=
5590		for cf_temp_scan in $CFLAGS
5591		do
5592			case "x$cf_temp_scan" in
5593			(x-Werror=*)
5594
5595	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5596	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5597
5598				;;
5599			(*)
5600
5601	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5602	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5603
5604				;;
5605			esac
5606		done
5607		CFLAGS="$cf_temp_flags"
5608		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
5609
5610echo "${as_me:-configure}:5610: testing ... fixed $CFLAGS ..." 1>&5
5611
5612		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5613
5614echo "${as_me:-configure}:5614: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5615
5616		;;
5617	esac
5618fi
5619
5620if test "$GCC" = yes || test "$GXX" = yes
5621then
5622	case $CPPFLAGS in
5623	(*-Werror=*)
5624		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
5625
5626echo "${as_me:-configure}:5626: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
5627
5628		cf_temp_flags=
5629		for cf_temp_scan in $CPPFLAGS
5630		do
5631			case "x$cf_temp_scan" in
5632			(x-Werror=*)
5633
5634	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5635	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5636
5637				;;
5638			(*)
5639
5640	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5641	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5642
5643				;;
5644			esac
5645		done
5646		CPPFLAGS="$cf_temp_flags"
5647		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
5648
5649echo "${as_me:-configure}:5649: testing ... fixed $CPPFLAGS ..." 1>&5
5650
5651		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5652
5653echo "${as_me:-configure}:5653: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5654
5655		;;
5656	esac
5657fi
5658
5659if test "$GCC" = yes || test "$GXX" = yes
5660then
5661	case $LDFLAGS in
5662	(*-Werror=*)
5663		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
5664
5665echo "${as_me:-configure}:5665: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
5666
5667		cf_temp_flags=
5668		for cf_temp_scan in $LDFLAGS
5669		do
5670			case "x$cf_temp_scan" in
5671			(x-Werror=*)
5672
5673	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5674	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5675
5676				;;
5677			(*)
5678
5679	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5680	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5681
5682				;;
5683			esac
5684		done
5685		LDFLAGS="$cf_temp_flags"
5686		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
5687
5688echo "${as_me:-configure}:5688: testing ... fixed $LDFLAGS ..." 1>&5
5689
5690		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5691
5692echo "${as_me:-configure}:5692: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5693
5694		;;
5695	esac
5696fi
5697
5698echo "$as_me:5698: checking if you want to turn on gcc warnings" >&5
5699echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
5700
5701# Check whether --enable-warnings or --disable-warnings was given.
5702if test "${enable_warnings+set}" = set; then
5703  enableval="$enable_warnings"
5704  test "$enableval" != yes && enableval=no
5705	if test "$enableval" != "no" ; then
5706    enable_warnings=yes
5707	else
5708		enable_warnings=no
5709	fi
5710else
5711  enableval=no
5712	enable_warnings=no
5713
5714fi;
5715echo "$as_me:5715: result: $enable_warnings" >&5
5716echo "${ECHO_T}$enable_warnings" >&6
5717if test "$enable_warnings" = "yes"
5718then
5719
5720if test "$GCC" = yes || test "$GXX" = yes
5721then
5722cat > conftest.i <<EOF
5723#ifndef GCC_PRINTF
5724#define GCC_PRINTF 0
5725#endif
5726#ifndef GCC_SCANF
5727#define GCC_SCANF 0
5728#endif
5729#ifndef GCC_NORETURN
5730#define GCC_NORETURN /* nothing */
5731#endif
5732#ifndef GCC_UNUSED
5733#define GCC_UNUSED /* nothing */
5734#endif
5735EOF
5736if test "$GCC" = yes
5737then
5738	{ echo "$as_me:5738: checking for $CC __attribute__ directives..." >&5
5739echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
5740cat > "conftest.$ac_ext" <<EOF
5741#line 5741 "${as_me:-configure}"
5742#include "confdefs.h"
5743#include "conftest.h"
5744#include "conftest.i"
5745#if	GCC_PRINTF
5746#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5747#else
5748#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5749#endif
5750#if	GCC_SCANF
5751#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
5752#else
5753#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
5754#endif
5755extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5756extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
5757extern void foo(void) GCC_NORETURN;
5758int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
5759EOF
5760	cf_printf_attribute=no
5761	cf_scanf_attribute=no
5762	for cf_attribute in scanf printf unused noreturn
5763	do
5764
5765cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5766
5767		cf_directive="__attribute__(($cf_attribute))"
5768		echo "checking for $CC $cf_directive" 1>&5
5769
5770		case "$cf_attribute" in
5771		(printf)
5772			cf_printf_attribute=yes
5773			cat >conftest.h <<EOF
5774#define GCC_$cf_ATTRIBUTE 1
5775EOF
5776			;;
5777		(scanf)
5778			cf_scanf_attribute=yes
5779			cat >conftest.h <<EOF
5780#define GCC_$cf_ATTRIBUTE 1
5781EOF
5782			;;
5783		(*)
5784			cat >conftest.h <<EOF
5785#define GCC_$cf_ATTRIBUTE $cf_directive
5786EOF
5787			;;
5788		esac
5789
5790		if { (eval echo "$as_me:5790: \"$ac_compile\"") >&5
5791  (eval $ac_compile) 2>&5
5792  ac_status=$?
5793  echo "$as_me:5793: \$? = $ac_status" >&5
5794  (exit "$ac_status"); }; then
5795			test -n "$verbose" && echo "$as_me:5795: result: ... $cf_attribute" >&5
5796echo "${ECHO_T}... $cf_attribute" >&6
5797			cat conftest.h >>confdefs.h
5798			case "$cf_attribute" in
5799			(noreturn)
5800
5801cat >>confdefs.h <<EOF
5802#define GCC_NORETURN $cf_directive
5803EOF
5804
5805				;;
5806			(printf)
5807				cf_value='/* nothing */'
5808				if test "$cf_printf_attribute" != no ; then
5809					cf_value='__attribute__((format(printf,fmt,var)))'
5810
5811cat >>confdefs.h <<\EOF
5812#define GCC_PRINTF 1
5813EOF
5814
5815				fi
5816
5817cat >>confdefs.h <<EOF
5818#define GCC_PRINTFLIKE(fmt,var) $cf_value
5819EOF
5820
5821				;;
5822			(scanf)
5823				cf_value='/* nothing */'
5824				if test "$cf_scanf_attribute" != no ; then
5825					cf_value='__attribute__((format(scanf,fmt,var)))'
5826
5827cat >>confdefs.h <<\EOF
5828#define GCC_SCANF 1
5829EOF
5830
5831				fi
5832
5833cat >>confdefs.h <<EOF
5834#define GCC_SCANFLIKE(fmt,var) $cf_value
5835EOF
5836
5837				;;
5838			(unused)
5839
5840cat >>confdefs.h <<EOF
5841#define GCC_UNUSED $cf_directive
5842EOF
5843
5844				;;
5845			esac
5846		fi
5847	done
5848else
5849	${FGREP-fgrep} define conftest.i >>confdefs.h
5850fi
5851rm -rf ./conftest*
5852fi
5853
5854if test "x$have_x" = xyes; then echo "skipping X-const check"; fi
5855cat > "conftest.$ac_ext" <<EOF
5856#line 5856 "${as_me:-configure}"
5857int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
5858EOF
5859if test "$INTEL_COMPILER" = yes
5860then
5861# The "-wdXXX" options suppress warnings:
5862# remark #1419: external declaration in primary source file
5863# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
5864# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
5865# remark #193: zero used for undefined preprocessing identifier
5866# remark #593: variable "curs_sb_left_arrow" was set but never used
5867# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
5868# remark #869: parameter "tw" was never referenced
5869# remark #981: operands are evaluated in unspecified order
5870# warning #279: controlling expression is constant
5871
5872	{ echo "$as_me:5872: checking for $CC warning options..." >&5
5873echo "$as_me: checking for $CC warning options..." >&6;}
5874	cf_save_CFLAGS="$CFLAGS"
5875	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
5876	for cf_opt in \
5877		wd1419 \
5878		wd1683 \
5879		wd1684 \
5880		wd193 \
5881		wd593 \
5882		wd279 \
5883		wd810 \
5884		wd869 \
5885		wd981
5886	do
5887		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5888		if { (eval echo "$as_me:5888: \"$ac_compile\"") >&5
5889  (eval $ac_compile) 2>&5
5890  ac_status=$?
5891  echo "$as_me:5891: \$? = $ac_status" >&5
5892  (exit "$ac_status"); }; then
5893			test -n "$verbose" && echo "$as_me:5893: result: ... -$cf_opt" >&5
5894echo "${ECHO_T}... -$cf_opt" >&6
5895			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5896		fi
5897	done
5898	CFLAGS="$cf_save_CFLAGS"
5899elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
5900then
5901	{ echo "$as_me:5901: checking for $CC warning options..." >&5
5902echo "$as_me: checking for $CC warning options..." >&6;}
5903	cf_save_CFLAGS="$CFLAGS"
5904	cf_warn_CONST=""
5905	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5906	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
5907	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
5908	for cf_opt in W Wall \
5909		Wbad-function-cast \
5910		Wcast-align \
5911		Wcast-qual \
5912		Wdeclaration-after-statement \
5913		Wextra \
5914		Winline \
5915		Wmissing-declarations \
5916		Wmissing-prototypes \
5917		Wnested-externs \
5918		Wpointer-arith \
5919		Wshadow \
5920		Wstrict-prototypes \
5921		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wwrite-strings Wconversion
5922	do
5923		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5924		if { (eval echo "$as_me:5924: \"$ac_compile\"") >&5
5925  (eval $ac_compile) 2>&5
5926  ac_status=$?
5927  echo "$as_me:5927: \$? = $ac_status" >&5
5928  (exit "$ac_status"); }; then
5929			test -n "$verbose" && echo "$as_me:5929: result: ... -$cf_opt" >&5
5930echo "${ECHO_T}... -$cf_opt" >&6
5931			case "$cf_opt" in
5932			(Winline)
5933				case "$GCC_VERSION" in
5934				([34].*)
5935					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5936
5937echo "${as_me:-configure}:5937: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5938
5939					continue;;
5940				esac
5941				;;
5942			(Wpointer-arith)
5943				case "$GCC_VERSION" in
5944				([12].*)
5945					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5946
5947echo "${as_me:-configure}:5947: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5948
5949					continue;;
5950				esac
5951				;;
5952			esac
5953			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5954		fi
5955	done
5956	CFLAGS="$cf_save_CFLAGS"
5957fi
5958rm -rf ./conftest*
5959
5960fi
5961
5962fi
5963
5964for ac_header in \
5965poll.h \
5966pty.h \
5967stropts.h \
5968sys/ioctl.h \
5969sys/param.h \
5970sys/poll.h \
5971sys/select.h \
5972sys/time.h \
5973termios.h \
5974
5975do
5976as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5977echo "$as_me:5977: checking for $ac_header" >&5
5978echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5979if eval "test \"\${$as_ac_Header+set}\" = set"; then
5980  echo $ECHO_N "(cached) $ECHO_C" >&6
5981else
5982  cat >"conftest.$ac_ext" <<_ACEOF
5983#line 5983 "configure"
5984#include "confdefs.h"
5985#include <$ac_header>
5986_ACEOF
5987if { (eval echo "$as_me:5987: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5988  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5989  ac_status=$?
5990  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5991  rm -f conftest.er1
5992  cat conftest.err >&5
5993  echo "$as_me:5993: \$? = $ac_status" >&5
5994  (exit "$ac_status"); } >/dev/null; then
5995  if test -s conftest.err; then
5996    ac_cpp_err=$ac_c_preproc_warn_flag
5997  else
5998    ac_cpp_err=
5999  fi
6000else
6001  ac_cpp_err=yes
6002fi
6003if test -z "$ac_cpp_err"; then
6004  eval "$as_ac_Header=yes"
6005else
6006  echo "$as_me: failed program was:" >&5
6007  cat "conftest.$ac_ext" >&5
6008  eval "$as_ac_Header=no"
6009fi
6010rm -f conftest.err "conftest.$ac_ext"
6011fi
6012echo "$as_me:6012: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6013echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6014if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6015  cat >>confdefs.h <<EOF
6016#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6017EOF
6018
6019fi
6020done
6021
6022for ac_func in \
6023poll \
6024putenv \
6025select \
6026strdup \
6027strcasecmp \
6028
6029do
6030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6031echo "$as_me:6031: checking for $ac_func" >&5
6032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6033if eval "test \"\${$as_ac_var+set}\" = set"; then
6034  echo $ECHO_N "(cached) $ECHO_C" >&6
6035else
6036  cat >"conftest.$ac_ext" <<_ACEOF
6037#line 6037 "configure"
6038#include "confdefs.h"
6039#define $ac_func autoconf_temporary
6040#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6041#undef $ac_func
6042
6043#ifdef __cplusplus
6044extern "C"
6045#endif
6046
6047/* We use char because int might match the return type of a gcc2
6048   builtin and then its argument prototype would still apply.  */
6049char $ac_func (void);
6050
6051int
6052main (void)
6053{
6054
6055/* The GNU C library defines stubs for functions which it implements
6056    to always fail with ENOSYS.  Some functions are actually named
6057    something starting with __ and the normal name is an alias.  */
6058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6059#error found stub for $ac_func
6060#endif
6061
6062	return $ac_func ();
6063  ;
6064  return 0;
6065}
6066_ACEOF
6067rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6068if { (eval echo "$as_me:6068: \"$ac_link\"") >&5
6069  (eval $ac_link) 2>&5
6070  ac_status=$?
6071  echo "$as_me:6071: \$? = $ac_status" >&5
6072  (exit "$ac_status"); } &&
6073         { ac_try='test -s "conftest$ac_exeext"'
6074  { (eval echo "$as_me:6074: \"$ac_try\"") >&5
6075  (eval $ac_try) 2>&5
6076  ac_status=$?
6077  echo "$as_me:6077: \$? = $ac_status" >&5
6078  (exit "$ac_status"); }; }; then
6079  eval "$as_ac_var=yes"
6080else
6081  echo "$as_me: failed program was:" >&5
6082cat "conftest.$ac_ext" >&5
6083eval "$as_ac_var=no"
6084fi
6085rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6086fi
6087echo "$as_me:6087: result: `eval echo '${'"$as_ac_var"'}'`" >&5
6088echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
6089if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
6090  cat >>confdefs.h <<EOF
6091#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6092EOF
6093
6094fi
6095done
6096
6097	echo "$as_me:6097: checking for nfds_t" >&5
6098echo $ECHO_N "checking for nfds_t... $ECHO_C" >&6
6099if test "${ac_cv_type_nfds_t+set}" = set; then
6100  echo $ECHO_N "(cached) $ECHO_C" >&6
6101else
6102  cat >"conftest.$ac_ext" <<_ACEOF
6103#line 6103 "configure"
6104#include "confdefs.h"
6105
6106#include <sys/types.h>
6107#ifdef HAVE_SYS_POLL_H
6108#include <sys/poll.h>
6109#endif
6110
6111int
6112main (void)
6113{
6114if ((nfds_t *) 0)
6115  return 0;
6116if (sizeof (nfds_t))
6117  return 0;
6118  ;
6119  return 0;
6120}
6121_ACEOF
6122rm -f "conftest.$ac_objext"
6123if { (eval echo "$as_me:6123: \"$ac_compile\"") >&5
6124  (eval $ac_compile) 2>&5
6125  ac_status=$?
6126  echo "$as_me:6126: \$? = $ac_status" >&5
6127  (exit "$ac_status"); } &&
6128         { ac_try='test -s "conftest.$ac_objext"'
6129  { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6130  (eval $ac_try) 2>&5
6131  ac_status=$?
6132  echo "$as_me:6132: \$? = $ac_status" >&5
6133  (exit "$ac_status"); }; }; then
6134  ac_cv_type_nfds_t=yes
6135else
6136  echo "$as_me: failed program was:" >&5
6137cat "conftest.$ac_ext" >&5
6138ac_cv_type_nfds_t=no
6139fi
6140rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6141fi
6142echo "$as_me:6142: result: $ac_cv_type_nfds_t" >&5
6143echo "${ECHO_T}$ac_cv_type_nfds_t" >&6
6144if test "$ac_cv_type_nfds_t" = yes; then
6145  ac_cv_type_nfds_t=yes
6146else
6147  ac_cv_type_nfds_t=no
6148fi
6149
6150	if test "$ac_cv_type_nfds_t" = no; then
6151
6152cat >>confdefs.h <<\EOF
6153#define nfds_t unsigned long
6154EOF
6155
6156fi
6157
6158echo "$as_me:6158: checking if sys/time.h works with sys/select.h" >&5
6159echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
6160if test "${cf_cv_sys_time_select+set}" = set; then
6161  echo $ECHO_N "(cached) $ECHO_C" >&6
6162else
6163
6164cat >"conftest.$ac_ext" <<_ACEOF
6165#line 6165 "configure"
6166#include "confdefs.h"
6167
6168#include <sys/types.h>
6169#ifdef HAVE_SYS_TIME_H
6170#include <sys/time.h>
6171#endif
6172#ifdef HAVE_SYS_SELECT_H
6173#include <sys/select.h>
6174#endif
6175
6176int
6177main (void)
6178{
6179
6180  ;
6181  return 0;
6182}
6183_ACEOF
6184rm -f "conftest.$ac_objext"
6185if { (eval echo "$as_me:6185: \"$ac_compile\"") >&5
6186  (eval $ac_compile) 2>&5
6187  ac_status=$?
6188  echo "$as_me:6188: \$? = $ac_status" >&5
6189  (exit "$ac_status"); } &&
6190         { ac_try='test -s "conftest.$ac_objext"'
6191  { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6192  (eval $ac_try) 2>&5
6193  ac_status=$?
6194  echo "$as_me:6194: \$? = $ac_status" >&5
6195  (exit "$ac_status"); }; }; then
6196  cf_cv_sys_time_select=yes
6197else
6198  echo "$as_me: failed program was:" >&5
6199cat "conftest.$ac_ext" >&5
6200cf_cv_sys_time_select=no
6201fi
6202rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6203
6204fi
6205
6206echo "$as_me:6206: result: $cf_cv_sys_time_select" >&5
6207echo "${ECHO_T}$cf_cv_sys_time_select" >&6
6208test "$cf_cv_sys_time_select" = yes &&
6209cat >>confdefs.h <<\EOF
6210#define HAVE_SYS_TIME_SELECT 1
6211EOF
6212
6213# workaround for divergence of xterm/luit in the [CF_FUNC_GRANTPT] macro...
6214
6215for ac_func in grantpt
6216do
6217as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6218echo "$as_me:6218: checking for $ac_func" >&5
6219echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6220if eval "test \"\${$as_ac_var+set}\" = set"; then
6221  echo $ECHO_N "(cached) $ECHO_C" >&6
6222else
6223  cat >"conftest.$ac_ext" <<_ACEOF
6224#line 6224 "configure"
6225#include "confdefs.h"
6226#define $ac_func autoconf_temporary
6227#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6228#undef $ac_func
6229
6230#ifdef __cplusplus
6231extern "C"
6232#endif
6233
6234/* We use char because int might match the return type of a gcc2
6235   builtin and then its argument prototype would still apply.  */
6236char $ac_func (void);
6237
6238int
6239main (void)
6240{
6241
6242/* The GNU C library defines stubs for functions which it implements
6243    to always fail with ENOSYS.  Some functions are actually named
6244    something starting with __ and the normal name is an alias.  */
6245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6246#error found stub for $ac_func
6247#endif
6248
6249	return $ac_func ();
6250  ;
6251  return 0;
6252}
6253_ACEOF
6254rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6255if { (eval echo "$as_me:6255: \"$ac_link\"") >&5
6256  (eval $ac_link) 2>&5
6257  ac_status=$?
6258  echo "$as_me:6258: \$? = $ac_status" >&5
6259  (exit "$ac_status"); } &&
6260         { ac_try='test -s "conftest$ac_exeext"'
6261  { (eval echo "$as_me:6261: \"$ac_try\"") >&5
6262  (eval $ac_try) 2>&5
6263  ac_status=$?
6264  echo "$as_me:6264: \$? = $ac_status" >&5
6265  (exit "$ac_status"); }; }; then
6266  eval "$as_ac_var=yes"
6267else
6268  echo "$as_me: failed program was:" >&5
6269cat "conftest.$ac_ext" >&5
6270eval "$as_ac_var=no"
6271fi
6272rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6273fi
6274echo "$as_me:6274: result: `eval echo '${'"$as_ac_var"'}'`" >&5
6275echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
6276if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
6277  cat >>confdefs.h <<EOF
6278#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6279EOF
6280
6281fi
6282done
6283
6284disable_openpty=$ac_cv_func_grantpt
6285
6286for ac_header in \
6287stropts.h \
6288
6289do
6290as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6291echo "$as_me:6291: checking for $ac_header" >&5
6292echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6293if eval "test \"\${$as_ac_Header+set}\" = set"; then
6294  echo $ECHO_N "(cached) $ECHO_C" >&6
6295else
6296  cat >"conftest.$ac_ext" <<_ACEOF
6297#line 6297 "configure"
6298#include "confdefs.h"
6299#include <$ac_header>
6300_ACEOF
6301if { (eval echo "$as_me:6301: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6302  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6303  ac_status=$?
6304  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6305  rm -f conftest.er1
6306  cat conftest.err >&5
6307  echo "$as_me:6307: \$? = $ac_status" >&5
6308  (exit "$ac_status"); } >/dev/null; then
6309  if test -s conftest.err; then
6310    ac_cpp_err=$ac_c_preproc_warn_flag
6311  else
6312    ac_cpp_err=
6313  fi
6314else
6315  ac_cpp_err=yes
6316fi
6317if test -z "$ac_cpp_err"; then
6318  eval "$as_ac_Header=yes"
6319else
6320  echo "$as_me: failed program was:" >&5
6321  cat "conftest.$ac_ext" >&5
6322  eval "$as_ac_Header=no"
6323fi
6324rm -f conftest.err "conftest.$ac_ext"
6325fi
6326echo "$as_me:6326: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6327echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6328if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6329  cat >>confdefs.h <<EOF
6330#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6331EOF
6332
6333fi
6334done
6335
6336cf_func_grantpt="grantpt ptsname"
6337cf_prefer_openpt=no
6338case $host_os in
6339(darwin[0-9].*)
6340	;;
6341(openbsd[0-9].*)
6342	# The POSIX entrypoints exist, but have never worked.
6343	;;
6344(linux*)
6345	cf_func_grantpt="$cf_func_grantpt posix_openpt"
6346	cf_prefer_openpt=yes
6347	;;
6348(*)
6349	cf_func_grantpt="$cf_func_grantpt posix_openpt"
6350	;;
6351esac
6352
6353for ac_func in $cf_func_grantpt
6354do
6355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6356echo "$as_me:6356: checking for $ac_func" >&5
6357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6358if eval "test \"\${$as_ac_var+set}\" = set"; then
6359  echo $ECHO_N "(cached) $ECHO_C" >&6
6360else
6361  cat >"conftest.$ac_ext" <<_ACEOF
6362#line 6362 "configure"
6363#include "confdefs.h"
6364#define $ac_func autoconf_temporary
6365#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6366#undef $ac_func
6367
6368#ifdef __cplusplus
6369extern "C"
6370#endif
6371
6372/* We use char because int might match the return type of a gcc2
6373   builtin and then its argument prototype would still apply.  */
6374char $ac_func (void);
6375
6376int
6377main (void)
6378{
6379
6380/* The GNU C library defines stubs for functions which it implements
6381    to always fail with ENOSYS.  Some functions are actually named
6382    something starting with __ and the normal name is an alias.  */
6383#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6384#error found stub for $ac_func
6385#endif
6386
6387	return $ac_func ();
6388  ;
6389  return 0;
6390}
6391_ACEOF
6392rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6393if { (eval echo "$as_me:6393: \"$ac_link\"") >&5
6394  (eval $ac_link) 2>&5
6395  ac_status=$?
6396  echo "$as_me:6396: \$? = $ac_status" >&5
6397  (exit "$ac_status"); } &&
6398         { ac_try='test -s "conftest$ac_exeext"'
6399  { (eval echo "$as_me:6399: \"$ac_try\"") >&5
6400  (eval $ac_try) 2>&5
6401  ac_status=$?
6402  echo "$as_me:6402: \$? = $ac_status" >&5
6403  (exit "$ac_status"); }; }; then
6404  eval "$as_ac_var=yes"
6405else
6406  echo "$as_me: failed program was:" >&5
6407cat "conftest.$ac_ext" >&5
6408eval "$as_ac_var=no"
6409fi
6410rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6411fi
6412echo "$as_me:6412: result: `eval echo '${'"$as_ac_var"'}'`" >&5
6413echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
6414if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
6415  cat >>confdefs.h <<EOF
6416#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6417EOF
6418
6419fi
6420done
6421
6422cf_grantpt_opts=
6423if test "x$ac_cv_func_grantpt" = "xyes" ; then
6424	echo "$as_me:6424: checking if grantpt really works" >&5
6425echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
6426	cat >"conftest.$ac_ext" <<_ACEOF
6427#line 6427 "configure"
6428#include "confdefs.h"
6429
6430#include <stdlib.h>
6431#include <stdio.h>
6432#include <termios.h>
6433#include <unistd.h>
6434#include <signal.h>
6435#include <fcntl.h>
6436#include <errno.h>
6437
6438#ifndef HAVE_POSIX_OPENPT
6439#undef posix_openpt
6440#define posix_openpt(mode) open("/dev/ptmx", mode)
6441#endif
6442
6443#ifdef HAVE_STROPTS_H
6444#include <stropts.h>
6445#endif
6446
6447static void failed(int code)
6448{
6449	perror("conftest");
6450	exit(code);
6451}
6452
6453static void my_timeout(int sig)
6454{
6455	(void)sig;
6456	exit(99);
6457}
6458
6459int
6460main (void)
6461{
6462
6463	int code = 0;
6464	int rc;
6465	int pty;
6466	int tty;
6467	char *slave;
6468	struct termios tio;
6469
6470	(void)tio;
6471	signal(SIGALRM, my_timeout);
6472
6473	if (alarm(2) == 9)
6474		failed(9);
6475	else if ((pty = posix_openpt(O_RDWR)) < 0)
6476		failed(1);
6477	else if ((rc = grantpt(pty)) < 0)
6478		failed(2);
6479	else if ((rc = unlockpt(pty)) < 0)
6480		failed(3);
6481	else if ((slave = ptsname(pty)) == 0)
6482		failed(4);
6483#if (CONFTEST == 3) || defined(CONFTEST_isatty)
6484	else if (!isatty(pty))
6485		failed(4);
6486#endif
6487#if CONFTEST >= 4
6488    else if ((rc = tcgetattr(pty, &tio)) < 0)
6489		failed(20);
6490    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
6491		failed(21);
6492#endif
6493	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
6494	 * Linux does treat it that way.
6495	 */
6496	else if ((tty = open(slave, O_RDWR)) < 0)
6497		failed(5);
6498#ifdef CONFTEST
6499#ifdef I_PUSH
6500#if (CONFTEST == 0) || defined(CONFTEST_ptem)
6501    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
6502		failed(10);
6503#endif
6504#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
6505    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
6506		failed(11);
6507#endif
6508#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
6509    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
6510		failed(12);
6511#endif
6512#endif /* I_PUSH */
6513#if CONFTEST >= 5
6514    else if ((rc = tcgetattr(tty, &tio)) < 0)
6515		failed(30);
6516    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
6517		failed(31);
6518#endif
6519#endif /* CONFTEST */
6520
6521	${cf_cv_main_return:-return}(code);
6522
6523  ;
6524  return 0;
6525}
6526_ACEOF
6527rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6528if { (eval echo "$as_me:6528: \"$ac_link\"") >&5
6529  (eval $ac_link) 2>&5
6530  ac_status=$?
6531  echo "$as_me:6531: \$? = $ac_status" >&5
6532  (exit "$ac_status"); } &&
6533         { ac_try='test -s "conftest$ac_exeext"'
6534  { (eval echo "$as_me:6534: \"$ac_try\"") >&5
6535  (eval $ac_try) 2>&5
6536  ac_status=$?
6537  echo "$as_me:6537: \$? = $ac_status" >&5
6538  (exit "$ac_status"); }; }; then
6539
6540	if test "$cross_compiling" = yes; then
6541  ac_cv_func_grantpt=maybe
6542else
6543  cat >"conftest.$ac_ext" <<_ACEOF
6544#line 6544 "configure"
6545#include "confdefs.h"
6546
6547#include <stdlib.h>
6548#include <stdio.h>
6549#include <termios.h>
6550#include <unistd.h>
6551#include <signal.h>
6552#include <fcntl.h>
6553#include <errno.h>
6554
6555#ifndef HAVE_POSIX_OPENPT
6556#undef posix_openpt
6557#define posix_openpt(mode) open("/dev/ptmx", mode)
6558#endif
6559
6560#ifdef HAVE_STROPTS_H
6561#include <stropts.h>
6562#endif
6563
6564static void failed(int code)
6565{
6566	perror("conftest");
6567	exit(code);
6568}
6569
6570static void my_timeout(int sig)
6571{
6572	(void)sig;
6573	exit(99);
6574}
6575
6576int main(void)
6577{
6578
6579	int code = 0;
6580	int rc;
6581	int pty;
6582	int tty;
6583	char *slave;
6584	struct termios tio;
6585
6586	(void)tio;
6587	signal(SIGALRM, my_timeout);
6588
6589	if (alarm(2) == 9)
6590		failed(9);
6591	else if ((pty = posix_openpt(O_RDWR)) < 0)
6592		failed(1);
6593	else if ((rc = grantpt(pty)) < 0)
6594		failed(2);
6595	else if ((rc = unlockpt(pty)) < 0)
6596		failed(3);
6597	else if ((slave = ptsname(pty)) == 0)
6598		failed(4);
6599#if (CONFTEST == 3) || defined(CONFTEST_isatty)
6600	else if (!isatty(pty))
6601		failed(4);
6602#endif
6603#if CONFTEST >= 4
6604    else if ((rc = tcgetattr(pty, &tio)) < 0)
6605		failed(20);
6606    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
6607		failed(21);
6608#endif
6609	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
6610	 * Linux does treat it that way.
6611	 */
6612	else if ((tty = open(slave, O_RDWR)) < 0)
6613		failed(5);
6614#ifdef CONFTEST
6615#ifdef I_PUSH
6616#if (CONFTEST == 0) || defined(CONFTEST_ptem)
6617    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
6618		failed(10);
6619#endif
6620#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
6621    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
6622		failed(11);
6623#endif
6624#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
6625    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
6626		failed(12);
6627#endif
6628#endif /* I_PUSH */
6629#if CONFTEST >= 5
6630    else if ((rc = tcgetattr(tty, &tio)) < 0)
6631		failed(30);
6632    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
6633		failed(31);
6634#endif
6635#endif /* CONFTEST */
6636
6637	${cf_cv_main_return:-return}(code);
6638
6639}
6640
6641_ACEOF
6642rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
6648  { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6649  (eval $ac_try) 2>&5
6650  ac_status=$?
6651  echo "$as_me:6651: \$? = $ac_status" >&5
6652  (exit "$ac_status"); }; }; then
6653  :
6654else
6655  echo "$as_me: program exited with status $ac_status" >&5
6656echo "$as_me: failed program was:" >&5
6657cat "conftest.$ac_ext" >&5
6658ac_cv_func_grantpt=no
6659
6660fi
6661rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6662fi
6663
6664else
6665  echo "$as_me: failed program was:" >&5
6666cat "conftest.$ac_ext" >&5
6667ac_cv_func_grantpt=no
6668fi
6669rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6670	echo "$as_me:6670: result: $ac_cv_func_grantpt" >&5
6671echo "${ECHO_T}$ac_cv_func_grantpt" >&6
6672
6673	if test "x$ac_cv_func_grantpt" != "xno" ; then
6674
6675		if test "x$ac_cv_func_grantpt" = "xyes" ; then
6676			echo "$as_me:6676: checking for pty features" >&5
6677echo $ECHO_N "checking for pty features... $ECHO_C" >&6
6678			if test "x$ac_cv_header_stropts_h" = xyes
6679			then
6680				cf_pty_this=0
6681			else
6682				cf_pty_this=3
6683			fi
6684
6685			cf_pty_defines=
6686			while test $cf_pty_this != 6
6687			do
6688
6689				cf_pty_feature=
6690				cf_pty_next="`expr $cf_pty_this + 1`"
6691
6692echo "${as_me:-configure}:6692: testing pty feature test $cf_pty_next:5 ..." 1>&5
6693
6694				if test "$cross_compiling" = yes; then
6695  { { echo "$as_me:6695: error: cannot run test program while cross compiling" >&5
6696echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6697   { (exit 1); exit 1; }; }
6698else
6699  cat >"conftest.$ac_ext" <<_ACEOF
6700#line 6700 "configure"
6701#include "confdefs.h"
6702#define CONFTEST $cf_pty_this
6703$cf_pty_defines
6704
6705#include <stdlib.h>
6706#include <stdio.h>
6707#include <termios.h>
6708#include <unistd.h>
6709#include <signal.h>
6710#include <fcntl.h>
6711#include <errno.h>
6712
6713#ifndef HAVE_POSIX_OPENPT
6714#undef posix_openpt
6715#define posix_openpt(mode) open("/dev/ptmx", mode)
6716#endif
6717
6718#ifdef HAVE_STROPTS_H
6719#include <stropts.h>
6720#endif
6721
6722static void failed(int code)
6723{
6724	perror("conftest");
6725	exit(code);
6726}
6727
6728static void my_timeout(int sig)
6729{
6730	(void)sig;
6731	exit(99);
6732}
6733
6734int main(void)
6735{
6736
6737	int code = 0;
6738	int rc;
6739	int pty;
6740	int tty;
6741	char *slave;
6742	struct termios tio;
6743
6744	(void)tio;
6745	signal(SIGALRM, my_timeout);
6746
6747	if (alarm(2) == 9)
6748		failed(9);
6749	else if ((pty = posix_openpt(O_RDWR)) < 0)
6750		failed(1);
6751	else if ((rc = grantpt(pty)) < 0)
6752		failed(2);
6753	else if ((rc = unlockpt(pty)) < 0)
6754		failed(3);
6755	else if ((slave = ptsname(pty)) == 0)
6756		failed(4);
6757#if (CONFTEST == 3) || defined(CONFTEST_isatty)
6758	else if (!isatty(pty))
6759		failed(4);
6760#endif
6761#if CONFTEST >= 4
6762    else if ((rc = tcgetattr(pty, &tio)) < 0)
6763		failed(20);
6764    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
6765		failed(21);
6766#endif
6767	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
6768	 * Linux does treat it that way.
6769	 */
6770	else if ((tty = open(slave, O_RDWR)) < 0)
6771		failed(5);
6772#ifdef CONFTEST
6773#ifdef I_PUSH
6774#if (CONFTEST == 0) || defined(CONFTEST_ptem)
6775    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
6776		failed(10);
6777#endif
6778#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
6779    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
6780		failed(11);
6781#endif
6782#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
6783    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
6784		failed(12);
6785#endif
6786#endif /* I_PUSH */
6787#if CONFTEST >= 5
6788    else if ((rc = tcgetattr(tty, &tio)) < 0)
6789		failed(30);
6790    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
6791		failed(31);
6792#endif
6793#endif /* CONFTEST */
6794
6795	${cf_cv_main_return:-return}(code);
6796
6797}
6798
6799_ACEOF
6800rm -f "conftest$ac_exeext"
6801if { (eval echo "$as_me:6801: \"$ac_link\"") >&5
6802  (eval $ac_link) 2>&5
6803  ac_status=$?
6804  echo "$as_me:6804: \$? = $ac_status" >&5
6805  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6806  { (eval echo "$as_me:6806: \"$ac_try\"") >&5
6807  (eval $ac_try) 2>&5
6808  ac_status=$?
6809  echo "$as_me:6809: \$? = $ac_status" >&5
6810  (exit "$ac_status"); }; }; then
6811
6812				case $cf_pty_next in
6813				(1) # - streams
6814					cf_pty_feature=ptem
6815					;;
6816				(2) # - streams
6817					cf_pty_feature=ldterm
6818					;;
6819				(3) # - streams
6820					cf_pty_feature=ttcompat
6821					;;
6822				(4)
6823					cf_pty_feature=pty_isatty
6824					;;
6825				(5)
6826					cf_pty_feature=pty_tcsetattr
6827					;;
6828				(6)
6829					cf_pty_feature=tty_tcsetattr
6830					;;
6831				esac
6832
6833else
6834  echo "$as_me: program exited with status $ac_status" >&5
6835echo "$as_me: failed program was:" >&5
6836cat "conftest.$ac_ext" >&5
6837
6838				case $cf_pty_next in
6839				(1|2|3)
6840
6841echo "${as_me:-configure}:6841: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
6842
6843					cf_pty_next=3
6844					;;
6845				esac
6846
6847fi
6848rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6849fi
6850				if test -n "$cf_pty_feature"
6851				then
6852					cf_pty_defines="$cf_pty_defines
6853#define CONFTEST_$cf_pty_feature 1
6854"
6855					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
6856				fi
6857
6858				cf_pty_this=$cf_pty_next
6859			done
6860			echo "$as_me:6860: result: $cf_grantpt_opts" >&5
6861echo "${ECHO_T}$cf_grantpt_opts" >&6
6862			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
6863		fi
6864	fi
6865fi
6866
6867if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
6868	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6
6869
6870echo "${as_me:-configure}:6870: testing prefer posix_openpt over openpty ..." 1>&5
6871
6872elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
6873	echo "$as_me:6873: checking for openpty in -lutil" >&5
6874echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
6875if test "${ac_cv_lib_util_openpty+set}" = set; then
6876  echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878  ac_check_lib_save_LIBS=$LIBS
6879LIBS="-lutil  $LIBS"
6880cat >"conftest.$ac_ext" <<_ACEOF
6881#line 6881 "configure"
6882#include "confdefs.h"
6883
6884/* Override any gcc2 internal prototype to avoid an error.  */
6885#ifdef __cplusplus
6886extern "C"
6887#endif
6888/* We use char because int might match the return type of a gcc2
6889   builtin and then its argument prototype would still apply.  */
6890char openpty ();
6891int
6892main (void)
6893{
6894openpty ();
6895  ;
6896  return 0;
6897}
6898_ACEOF
6899rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6900if { (eval echo "$as_me:6900: \"$ac_link\"") >&5
6901  (eval $ac_link) 2>&5
6902  ac_status=$?
6903  echo "$as_me:6903: \$? = $ac_status" >&5
6904  (exit "$ac_status"); } &&
6905         { ac_try='test -s "conftest$ac_exeext"'
6906  { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6907  (eval $ac_try) 2>&5
6908  ac_status=$?
6909  echo "$as_me:6909: \$? = $ac_status" >&5
6910  (exit "$ac_status"); }; }; then
6911  ac_cv_lib_util_openpty=yes
6912else
6913  echo "$as_me: failed program was:" >&5
6914cat "conftest.$ac_ext" >&5
6915ac_cv_lib_util_openpty=no
6916fi
6917rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6918LIBS=$ac_check_lib_save_LIBS
6919fi
6920echo "$as_me:6920: result: $ac_cv_lib_util_openpty" >&5
6921echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
6922if test "$ac_cv_lib_util_openpty" = yes; then
6923  cf_have_openpty=yes
6924else
6925  cf_have_openpty=no
6926fi
6927
6928	if test "$cf_have_openpty" = yes ; then
6929		ac_cv_func_grantpt=no
6930		LIBS="-lutil $LIBS"
6931
6932cat >>confdefs.h <<\EOF
6933#define HAVE_OPENPTY 1
6934EOF
6935
6936for ac_header in \
6937			util.h \
6938			libutil.h \
6939			pty.h \
6940
6941do
6942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6943echo "$as_me:6943: checking for $ac_header" >&5
6944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6945if eval "test \"\${$as_ac_Header+set}\" = set"; then
6946  echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948  cat >"conftest.$ac_ext" <<_ACEOF
6949#line 6949 "configure"
6950#include "confdefs.h"
6951#include <$ac_header>
6952_ACEOF
6953if { (eval echo "$as_me:6953: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6954  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6955  ac_status=$?
6956  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6957  rm -f conftest.er1
6958  cat conftest.err >&5
6959  echo "$as_me:6959: \$? = $ac_status" >&5
6960  (exit "$ac_status"); } >/dev/null; then
6961  if test -s conftest.err; then
6962    ac_cpp_err=$ac_c_preproc_warn_flag
6963  else
6964    ac_cpp_err=
6965  fi
6966else
6967  ac_cpp_err=yes
6968fi
6969if test -z "$ac_cpp_err"; then
6970  eval "$as_ac_Header=yes"
6971else
6972  echo "$as_me: failed program was:" >&5
6973  cat "conftest.$ac_ext" >&5
6974  eval "$as_ac_Header=no"
6975fi
6976rm -f conftest.err "conftest.$ac_ext"
6977fi
6978echo "$as_me:6978: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6979echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6980if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6981  cat >>confdefs.h <<EOF
6982#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6983EOF
6984
6985fi
6986done
6987
6988	fi
6989fi
6990
6991if test "x$ac_cv_func_grantpt" != xno
6992then
6993	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
6994
6995echo "${as_me:-configure}:6995: testing will rely upon grantpt ..." 1>&5
6996
6997cat >>confdefs.h <<\EOF
6998#define HAVE_WORKING_GRANTPT 1
6999EOF
7000
7001	for cf_feature in $cf_grantpt_opts
7002	do
7003		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
7004
7005cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7006
7007		cat >>confdefs.h <<EOF
7008#define HAVE_GRANTPT_$cf_FEATURE 1
7009EOF
7010
7011	done
7012elif test "x$cf_have_openpty" = xno
7013then
7014	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
7015
7016echo "${as_me:-configure}:7016: testing will rely upon BSD-pseudoterminals ..." 1>&5
7017
7018else
7019	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
7020
7021echo "${as_me:-configure}:7021: testing will rely upon openpty ..." 1>&5
7022
7023fi
7024
7025tty >/dev/null 2>&1 || {
7026for ac_func in posix_openpt
7027do
7028as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7029echo "$as_me:7029: checking for $ac_func" >&5
7030echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7031if eval "test \"\${$as_ac_var+set}\" = set"; then
7032  echo $ECHO_N "(cached) $ECHO_C" >&6
7033else
7034  cat >"conftest.$ac_ext" <<_ACEOF
7035#line 7035 "configure"
7036#include "confdefs.h"
7037#define $ac_func autoconf_temporary
7038#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7039#undef $ac_func
7040
7041#ifdef __cplusplus
7042extern "C"
7043#endif
7044
7045/* We use char because int might match the return type of a gcc2
7046   builtin and then its argument prototype would still apply.  */
7047char $ac_func (void);
7048
7049int
7050main (void)
7051{
7052
7053/* The GNU C library defines stubs for functions which it implements
7054    to always fail with ENOSYS.  Some functions are actually named
7055    something starting with __ and the normal name is an alias.  */
7056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7057#error found stub for $ac_func
7058#endif
7059
7060	return $ac_func ();
7061  ;
7062  return 0;
7063}
7064_ACEOF
7065rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7066if { (eval echo "$as_me:7066: \"$ac_link\"") >&5
7067  (eval $ac_link) 2>&5
7068  ac_status=$?
7069  echo "$as_me:7069: \$? = $ac_status" >&5
7070  (exit "$ac_status"); } &&
7071         { ac_try='test -s "conftest$ac_exeext"'
7072  { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073  (eval $ac_try) 2>&5
7074  ac_status=$?
7075  echo "$as_me:7075: \$? = $ac_status" >&5
7076  (exit "$ac_status"); }; }; then
7077  eval "$as_ac_var=yes"
7078else
7079  echo "$as_me: failed program was:" >&5
7080cat "conftest.$ac_ext" >&5
7081eval "$as_ac_var=no"
7082fi
7083rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7084fi
7085echo "$as_me:7085: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7086echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7087if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7088  cat >>confdefs.h <<EOF
7089#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7090EOF
7091
7092fi
7093done
7094 }
7095echo "$as_me:7095: checking if poll really works" >&5
7096echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
7097if test "${cf_cv_working_poll+set}" = set; then
7098  echo $ECHO_N "(cached) $ECHO_C" >&6
7099else
7100
7101if test "$cross_compiling" = yes; then
7102  cf_cv_working_poll=unknown
7103else
7104  cat >"conftest.$ac_ext" <<_ACEOF
7105#line 7105 "configure"
7106#include "confdefs.h"
7107
7108#include <stdlib.h>
7109#include <stdio.h>
7110#include <unistd.h>
7111#include <fcntl.h>
7112#ifdef HAVE_POLL_H
7113#include <poll.h>
7114#else
7115#include <sys/poll.h>
7116#endif
7117int main(void) {
7118	struct pollfd myfds;
7119	int ret;
7120
7121	/* check for Darwin bug with respect to "devices" */
7122	myfds.fd = open("/dev/null", 1);	/* O_WRONLY */
7123	if (myfds.fd < 0)
7124		myfds.fd = 0;
7125	myfds.events = POLLIN;
7126	myfds.revents = 0;
7127
7128	ret = poll(&myfds, 1, 100);
7129
7130	if (ret < 0 || (myfds.revents & POLLNVAL)) {
7131		ret = -1;
7132	} else {
7133		int fd = 0;
7134		if (!isatty(fd)) {
7135			fd = open("/dev/tty", 2);	/* O_RDWR */
7136		}
7137#ifdef HAVE_POSIX_OPENPT
7138		if (fd < 0) {
7139			fd = posix_openpt(O_RDWR);
7140		}
7141#endif
7142
7143		if (fd >= 0) {
7144			/* also check with standard input */
7145			myfds.fd = fd;
7146			myfds.events = POLLIN;
7147			myfds.revents = 0;
7148			ret = poll(&myfds, 1, 100);
7149		} else {
7150			ret = -1;
7151		}
7152	}
7153	${cf_cv_main_return:-return}(ret < 0);
7154}
7155_ACEOF
7156rm -f "conftest$ac_exeext"
7157if { (eval echo "$as_me:7157: \"$ac_link\"") >&5
7158  (eval $ac_link) 2>&5
7159  ac_status=$?
7160  echo "$as_me:7160: \$? = $ac_status" >&5
7161  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7162  { (eval echo "$as_me:7162: \"$ac_try\"") >&5
7163  (eval $ac_try) 2>&5
7164  ac_status=$?
7165  echo "$as_me:7165: \$? = $ac_status" >&5
7166  (exit "$ac_status"); }; }; then
7167  cf_cv_working_poll=yes
7168else
7169  echo "$as_me: program exited with status $ac_status" >&5
7170echo "$as_me: failed program was:" >&5
7171cat "conftest.$ac_ext" >&5
7172cf_cv_working_poll=no
7173fi
7174rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7175fi
7176fi
7177echo "$as_me:7177: result: $cf_cv_working_poll" >&5
7178echo "${ECHO_T}$cf_cv_working_poll" >&6
7179test "$cf_cv_working_poll" = "yes" &&
7180cat >>confdefs.h <<\EOF
7181#define HAVE_WORKING_POLL 1
7182EOF
7183
7184echo "$as_me:7184: checking if you want to use fontenc" >&5
7185echo $ECHO_N "checking if you want to use fontenc... $ECHO_C" >&6
7186
7187# Check whether --enable-fontenc or --disable-fontenc was given.
7188if test "${enable_fontenc+set}" = set; then
7189  enableval="$enable_fontenc"
7190  test "$enableval" != yes && enableval=no
7191	if test "$enableval" != "no" ; then
7192    with_fontenc=yes
7193	else
7194		with_fontenc=maybe
7195	fi
7196else
7197  enableval=no
7198	with_fontenc=maybe
7199
7200fi;
7201echo "$as_me:7201: result: $with_fontenc" >&5
7202echo "${ECHO_T}$with_fontenc" >&6
7203
7204echo "$as_me:7204: checking if you want to use iconv" >&5
7205echo $ECHO_N "checking if you want to use iconv... $ECHO_C" >&6
7206
7207# Check whether --enable-iconv or --disable-iconv was given.
7208if test "${enable_iconv+set}" = set; then
7209  enableval="$enable_iconv"
7210  test "$enableval" != no && enableval=yes
7211	if test "$enableval" != "yes" ; then
7212    with_iconv=no
7213	else
7214		with_iconv=maybe
7215	fi
7216else
7217  enableval=yes
7218	with_iconv=maybe
7219
7220fi;
7221echo "$as_me:7221: result: $with_iconv" >&5
7222echo "${ECHO_T}$with_iconv" >&6
7223
7224case $with_iconv in
7225yes)
7226	case $with_fontenc in
7227	yes)
7228		with_fontenc=no
7229		{ echo "$as_me:7229: WARNING: overriding deprecated fontenc" >&5
7230echo "$as_me: WARNING: overriding deprecated fontenc" >&2;}
7231		;;
7232	maybe|no)
7233		with_fontenc=no
7234		{ echo "$as_me:7234: using iconv" >&5
7235echo "$as_me: using iconv" >&6;}
7236		;;
7237	esac
7238	;;
7239no)
7240	case $with_fontenc in
7241	yes)
7242		;;
7243	no)
7244		{ { echo "$as_me:7244: error: you must choose between iconv and fontenc" >&5
7245echo "$as_me: error: you must choose between iconv and fontenc" >&2;}
7246   { (exit 1); exit 1; }; }
7247		;;
7248	maybe)
7249		with_fontenc=yes
7250		{ echo "$as_me:7250: using fontenc" >&5
7251echo "$as_me: using fontenc" >&6;}
7252		;;
7253	esac
7254	;;
7255maybe)
7256	case $with_fontenc in
7257	yes)
7258		with_iconv=no
7259		{ echo "$as_me:7259: using fontenc" >&5
7260echo "$as_me: using fontenc" >&6;}
7261		;;
7262	no|maybe)
7263		with_iconv=yes
7264		with_fontenc=no
7265		{ echo "$as_me:7265: using iconv" >&5
7266echo "$as_me: using iconv" >&6;}
7267		;;
7268	esac
7269	;;
7270esac
7271
7272	echo "$as_me:7272: checking for PATH separator" >&5
7273echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7274	case "$cf_cv_system_name" in
7275	(os2*)	PATH_SEPARATOR=';'  ;;
7276	(*)	${PATH_SEPARATOR:=':'}  ;;
7277	esac
7278
7279	echo "$as_me:7279: result: $PATH_SEPARATOR" >&5
7280echo "${ECHO_T}$PATH_SEPARATOR" >&6
7281
7282case "" in
7283(no)
7284	;;
7285(yes)
7286	;;
7287(*)
7288
7289for cf_searchpath in `echo "" | tr $PATH_SEPARATOR ' '`; do
7290	if test -d "$cf_searchpath/include" ; then
7291
7292if test -n "$cf_searchpath/include" ; then
7293  for cf_add_incdir in $cf_searchpath/include
7294  do
7295	while test "$cf_add_incdir" != /usr/include
7296	do
7297	  if test -d "$cf_add_incdir"
7298	  then
7299		cf_have_incdir=no
7300		if test -n "$CFLAGS$CPPFLAGS" ; then
7301		  # a loop is needed to ensure we can add subdirs of existing dirs
7302		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7303			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7304			  cf_have_incdir=yes; break
7305			fi
7306		  done
7307		fi
7308
7309		if test "$cf_have_incdir" = no ; then
7310		  if test "$cf_add_incdir" = /usr/local/include ; then
7311			if test "$GCC" = yes
7312			then
7313			  cf_save_CPPFLAGS=$CPPFLAGS
7314
7315	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7316	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7317
7318			  cat >"conftest.$ac_ext" <<_ACEOF
7319#line 7319 "configure"
7320#include "confdefs.h"
7321#include <stdio.h>
7322int
7323main (void)
7324{
7325printf("Hello")
7326  ;
7327  return 0;
7328}
7329_ACEOF
7330rm -f "conftest.$ac_objext"
7331if { (eval echo "$as_me:7331: \"$ac_compile\"") >&5
7332  (eval $ac_compile) 2>&5
7333  ac_status=$?
7334  echo "$as_me:7334: \$? = $ac_status" >&5
7335  (exit "$ac_status"); } &&
7336         { ac_try='test -s "conftest.$ac_objext"'
7337  { (eval echo "$as_me:7337: \"$ac_try\"") >&5
7338  (eval $ac_try) 2>&5
7339  ac_status=$?
7340  echo "$as_me:7340: \$? = $ac_status" >&5
7341  (exit "$ac_status"); }; }; then
7342  :
7343else
7344  echo "$as_me: failed program was:" >&5
7345cat "conftest.$ac_ext" >&5
7346cf_have_incdir=yes
7347fi
7348rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7349			  CPPFLAGS=$cf_save_CPPFLAGS
7350			fi
7351		  fi
7352		fi
7353
7354		if test "$cf_have_incdir" = no ; then
7355		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7356
7357echo "${as_me:-configure}:7357: testing adding $cf_add_incdir to include-path ..." 1>&5
7358
7359		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7360
7361		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7362		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7363		  cf_add_incdir="$cf_top_incdir"
7364		else
7365		  break
7366		fi
7367	  else
7368		break
7369	  fi
7370	done
7371  done
7372fi
7373
7374	elif test -d "$cf_searchpath/../include" ; then
7375
7376if test -n "$cf_searchpath/../include" ; then
7377  for cf_add_incdir in $cf_searchpath/../include
7378  do
7379	while test "$cf_add_incdir" != /usr/include
7380	do
7381	  if test -d "$cf_add_incdir"
7382	  then
7383		cf_have_incdir=no
7384		if test -n "$CFLAGS$CPPFLAGS" ; then
7385		  # a loop is needed to ensure we can add subdirs of existing dirs
7386		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7387			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7388			  cf_have_incdir=yes; break
7389			fi
7390		  done
7391		fi
7392
7393		if test "$cf_have_incdir" = no ; then
7394		  if test "$cf_add_incdir" = /usr/local/include ; then
7395			if test "$GCC" = yes
7396			then
7397			  cf_save_CPPFLAGS=$CPPFLAGS
7398
7399	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7400	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7401
7402			  cat >"conftest.$ac_ext" <<_ACEOF
7403#line 7403 "configure"
7404#include "confdefs.h"
7405#include <stdio.h>
7406int
7407main (void)
7408{
7409printf("Hello")
7410  ;
7411  return 0;
7412}
7413_ACEOF
7414rm -f "conftest.$ac_objext"
7415if { (eval echo "$as_me:7415: \"$ac_compile\"") >&5
7416  (eval $ac_compile) 2>&5
7417  ac_status=$?
7418  echo "$as_me:7418: \$? = $ac_status" >&5
7419  (exit "$ac_status"); } &&
7420         { ac_try='test -s "conftest.$ac_objext"'
7421  { (eval echo "$as_me:7421: \"$ac_try\"") >&5
7422  (eval $ac_try) 2>&5
7423  ac_status=$?
7424  echo "$as_me:7424: \$? = $ac_status" >&5
7425  (exit "$ac_status"); }; }; then
7426  :
7427else
7428  echo "$as_me: failed program was:" >&5
7429cat "conftest.$ac_ext" >&5
7430cf_have_incdir=yes
7431fi
7432rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7433			  CPPFLAGS=$cf_save_CPPFLAGS
7434			fi
7435		  fi
7436		fi
7437
7438		if test "$cf_have_incdir" = no ; then
7439		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7440
7441echo "${as_me:-configure}:7441: testing adding $cf_add_incdir to include-path ..." 1>&5
7442
7443		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7444
7445		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7446		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7447		  cf_add_incdir="$cf_top_incdir"
7448		else
7449		  break
7450		fi
7451	  else
7452		break
7453	  fi
7454	done
7455  done
7456fi
7457
7458	else
7459{ { echo "$as_me:7459: error: cannot find  under " >&5
7460echo "$as_me: error: cannot find  under " >&2;}
7461   { (exit 1); exit 1; }; }
7462	fi
7463	if test -d "$cf_searchpath/lib" ; then
7464
7465if test -n "$cf_searchpath/lib" ; then
7466	for cf_add_libdir in $cf_searchpath/lib
7467	do
7468		if test "$cf_add_libdir" = /usr/lib ; then
7469			:
7470		elif test -d "$cf_add_libdir"
7471		then
7472			cf_have_libdir=no
7473			if test -n "$LDFLAGS$LIBS" ; then
7474				# a loop is needed to ensure we can add subdirs of existing dirs
7475				for cf_test_libdir in $LDFLAGS $LIBS ; do
7476					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7477						cf_have_libdir=yes; break
7478					fi
7479				done
7480			fi
7481			if test "$cf_have_libdir" = no ; then
7482				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7483
7484echo "${as_me:-configure}:7484: testing adding $cf_add_libdir to library-path ..." 1>&5
7485
7486				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7487			fi
7488		fi
7489	done
7490fi
7491
7492	elif test -d "$cf_searchpath" ; then
7493
7494if test -n "$cf_searchpath" ; then
7495	for cf_add_libdir in $cf_searchpath
7496	do
7497		if test "$cf_add_libdir" = /usr/lib ; then
7498			:
7499		elif test -d "$cf_add_libdir"
7500		then
7501			cf_have_libdir=no
7502			if test -n "$LDFLAGS$LIBS" ; then
7503				# a loop is needed to ensure we can add subdirs of existing dirs
7504				for cf_test_libdir in $LDFLAGS $LIBS ; do
7505					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7506						cf_have_libdir=yes; break
7507					fi
7508				done
7509			fi
7510			if test "$cf_have_libdir" = no ; then
7511				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7512
7513echo "${as_me:-configure}:7513: testing adding $cf_add_libdir to library-path ..." 1>&5
7514
7515				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7516			fi
7517		fi
7518	done
7519fi
7520
7521	else
7522{ { echo "$as_me:7522: error: cannot find  under " >&5
7523echo "$as_me: error: cannot find  under " >&2;}
7524   { (exit 1); exit 1; }; }
7525	fi
7526done
7527
7528	;;
7529esac
7530
7531# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7532# will be set on completion of the AC_TRY_LINK below.
7533cf_cv_header_path_z=
7534cf_cv_library_path_z=
7535
7536echo "${as_me:-configure}:7536: testing Starting FIND_LINKAGE(z,zlib) ..." 1>&5
7537
7538cf_save_LIBS="$LIBS"
7539
7540cat >"conftest.$ac_ext" <<_ACEOF
7541#line 7541 "configure"
7542#include "confdefs.h"
7543
7544#include <zlib.h>
7545
7546int
7547main (void)
7548{
7549
7550	gzopen("name","mode")
7551
7552  ;
7553  return 0;
7554}
7555_ACEOF
7556rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7557if { (eval echo "$as_me:7557: \"$ac_link\"") >&5
7558  (eval $ac_link) 2>&5
7559  ac_status=$?
7560  echo "$as_me:7560: \$? = $ac_status" >&5
7561  (exit "$ac_status"); } &&
7562         { ac_try='test -s "conftest$ac_exeext"'
7563  { (eval echo "$as_me:7563: \"$ac_try\"") >&5
7564  (eval $ac_try) 2>&5
7565  ac_status=$?
7566  echo "$as_me:7566: \$? = $ac_status" >&5
7567  (exit "$ac_status"); }; }; then
7568
7569	cf_cv_find_linkage_z=yes
7570	cf_cv_header_path_z=/usr/include
7571	cf_cv_library_path_z=/usr/lib
7572
7573else
7574  echo "$as_me: failed program was:" >&5
7575cat "conftest.$ac_ext" >&5
7576
7577LIBS="-lz  $cf_save_LIBS"
7578
7579cat >"conftest.$ac_ext" <<_ACEOF
7580#line 7580 "configure"
7581#include "confdefs.h"
7582
7583#include <zlib.h>
7584
7585int
7586main (void)
7587{
7588
7589	gzopen("name","mode")
7590
7591  ;
7592  return 0;
7593}
7594_ACEOF
7595rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7596if { (eval echo "$as_me:7596: \"$ac_link\"") >&5
7597  (eval $ac_link) 2>&5
7598  ac_status=$?
7599  echo "$as_me:7599: \$? = $ac_status" >&5
7600  (exit "$ac_status"); } &&
7601         { ac_try='test -s "conftest$ac_exeext"'
7602  { (eval echo "$as_me:7602: \"$ac_try\"") >&5
7603  (eval $ac_try) 2>&5
7604  ac_status=$?
7605  echo "$as_me:7605: \$? = $ac_status" >&5
7606  (exit "$ac_status"); }; }; then
7607
7608	cf_cv_find_linkage_z=yes
7609	cf_cv_header_path_z=/usr/include
7610	cf_cv_library_path_z=/usr/lib
7611	cf_cv_library_file_z="-lz"
7612
7613else
7614  echo "$as_me: failed program was:" >&5
7615cat "conftest.$ac_ext" >&5
7616
7617	cf_cv_find_linkage_z=no
7618	LIBS="$cf_save_LIBS"
7619
7620	test -n "$verbose" && echo "	find linkage for z library" 1>&6
7621
7622echo "${as_me:-configure}:7622: testing find linkage for z library ..." 1>&5
7623
7624echo "${as_me:-configure}:7624: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 1>&5
7625
7626	cf_save_CPPFLAGS="$CPPFLAGS"
7627	cf_test_CPPFLAGS="$CPPFLAGS"
7628
7629cf_search=
7630
7631# collect the current set of include-directories from compiler flags
7632cf_header_path_list=""
7633if test -n "${CFLAGS}${CPPFLAGS}" ; then
7634	for cf_header_path in $CPPFLAGS $CFLAGS
7635	do
7636		case "$cf_header_path" in
7637		(-I*)
7638			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7639
7640test "x$cf_header_path" != "xNONE" && \
7641test -d "$cf_header_path" && \
7642 {
7643	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
7644	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
7645	test -d "$cf_header_path/include/zlib" &&       cf_search="$cf_search $cf_header_path/include/zlib"
7646	test -d "$cf_header_path/include/zlib/include" &&    cf_search="$cf_search $cf_header_path/include/zlib/include"
7647	test -d "$cf_header_path/zlib/include" &&       cf_search="$cf_search $cf_header_path/zlib/include"
7648	test -d "$cf_header_path/zlib/include/zlib" &&    cf_search="$cf_search $cf_header_path/zlib/include/zlib"
7649}
7650
7651			cf_header_path_list="$cf_header_path_list $cf_search"
7652			;;
7653		esac
7654	done
7655fi
7656
7657# add the variations for the package we are looking for
7658
7659cf_search=
7660
7661test "x$prefix" != "xNONE" && \
7662test -d "$prefix" && \
7663 {
7664	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
7665	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
7666	test -d "$prefix/include/zlib" &&       cf_search="$cf_search $prefix/include/zlib"
7667	test -d "$prefix/include/zlib/include" &&    cf_search="$cf_search $prefix/include/zlib/include"
7668	test -d "$prefix/zlib/include" &&       cf_search="$cf_search $prefix/zlib/include"
7669	test -d "$prefix/zlib/include/zlib" &&    cf_search="$cf_search $prefix/zlib/include/zlib"
7670}
7671
7672for cf_subdir_prefix in \
7673	/usr \
7674	/usr/local \
7675	/usr/pkg \
7676	/opt \
7677	/opt/local \
7678	$HOME
7679do
7680
7681test "x$cf_subdir_prefix" != "x$prefix" && \
7682test -d "$cf_subdir_prefix" && \
7683{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7684	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
7685	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
7686	test -d "$cf_subdir_prefix/include/zlib" &&       cf_search="$cf_search $cf_subdir_prefix/include/zlib"
7687	test -d "$cf_subdir_prefix/include/zlib/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/zlib/include"
7688	test -d "$cf_subdir_prefix/zlib/include" &&       cf_search="$cf_search $cf_subdir_prefix/zlib/include"
7689	test -d "$cf_subdir_prefix/zlib/include/zlib" &&    cf_search="$cf_search $cf_subdir_prefix/zlib/include/zlib"
7690}
7691
7692done
7693
7694test "$includedir" != NONE && \
7695test "$includedir" != "/usr/include" && \
7696test -d "$includedir" && {
7697	test -d "$includedir" &&    cf_search="$cf_search $includedir"
7698	test -d "$includedir/zlib" && cf_search="$cf_search $includedir/zlib"
7699}
7700
7701test "$oldincludedir" != NONE && \
7702test "$oldincludedir" != "/usr/include" && \
7703test -d "$oldincludedir" && {
7704	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
7705	test -d "$oldincludedir/zlib" && cf_search="$cf_search $oldincludedir/zlib"
7706}
7707
7708cf_search="$cf_search $cf_header_path_list"
7709
7710	for cf_cv_header_path_z in $cf_search
7711	do
7712		if test -d "$cf_cv_header_path_z" ; then
7713			test -n "$verbose" && echo "	... testing $cf_cv_header_path_z" 1>&6
7714
7715echo "${as_me:-configure}:7715: testing ... testing $cf_cv_header_path_z ..." 1>&5
7716
7717			CPPFLAGS="$cf_save_CPPFLAGS"
7718
7719	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7720	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_z"
7721
7722			cat >"conftest.$ac_ext" <<_ACEOF
7723#line 7723 "configure"
7724#include "confdefs.h"
7725
7726#include <zlib.h>
7727
7728int
7729main (void)
7730{
7731
7732	gzopen("name","mode")
7733
7734  ;
7735  return 0;
7736}
7737_ACEOF
7738rm -f "conftest.$ac_objext"
7739if { (eval echo "$as_me:7739: \"$ac_compile\"") >&5
7740  (eval $ac_compile) 2>&5
7741  ac_status=$?
7742  echo "$as_me:7742: \$? = $ac_status" >&5
7743  (exit "$ac_status"); } &&
7744         { ac_try='test -s "conftest.$ac_objext"'
7745  { (eval echo "$as_me:7745: \"$ac_try\"") >&5
7746  (eval $ac_try) 2>&5
7747  ac_status=$?
7748  echo "$as_me:7748: \$? = $ac_status" >&5
7749  (exit "$ac_status"); }; }; then
7750
7751				test -n "$verbose" && echo "	... found z headers in $cf_cv_header_path_z" 1>&6
7752
7753echo "${as_me:-configure}:7753: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5
7754
7755				cf_cv_find_linkage_z=maybe
7756				cf_test_CPPFLAGS="$CPPFLAGS"
7757				break
7758else
7759  echo "$as_me: failed program was:" >&5
7760cat "conftest.$ac_ext" >&5
7761
7762				CPPFLAGS="$cf_save_CPPFLAGS"
7763
7764fi
7765rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7766		fi
7767	done
7768
7769	if test "$cf_cv_find_linkage_z" = maybe ; then
7770
7771echo "${as_me:-configure}:7771: testing Searching for z library in FIND_LINKAGE(z,zlib) ..." 1>&5
7772
7773		cf_save_LIBS="$LIBS"
7774		cf_save_LDFLAGS="$LDFLAGS"
7775
7776		CPPFLAGS="$cf_test_CPPFLAGS"
7777		LIBS="-lz  $cf_save_LIBS"
7778		cat >"conftest.$ac_ext" <<_ACEOF
7779#line 7779 "configure"
7780#include "confdefs.h"
7781
7782#include <zlib.h>
7783
7784int
7785main (void)
7786{
7787
7788	gzopen("name","mode")
7789
7790  ;
7791  return 0;
7792}
7793_ACEOF
7794rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7795if { (eval echo "$as_me:7795: \"$ac_link\"") >&5
7796  (eval $ac_link) 2>&5
7797  ac_status=$?
7798  echo "$as_me:7798: \$? = $ac_status" >&5
7799  (exit "$ac_status"); } &&
7800         { ac_try='test -s "conftest$ac_exeext"'
7801  { (eval echo "$as_me:7801: \"$ac_try\"") >&5
7802  (eval $ac_try) 2>&5
7803  ac_status=$?
7804  echo "$as_me:7804: \$? = $ac_status" >&5
7805  (exit "$ac_status"); }; }; then
7806
7807			test -n "$verbose" && echo "	... found z library in system" 1>&6
7808
7809echo "${as_me:-configure}:7809: testing ... found z library in system ..." 1>&5
7810
7811			cf_cv_find_linkage_z=yes
7812else
7813  echo "$as_me: failed program was:" >&5
7814cat "conftest.$ac_ext" >&5
7815fi
7816rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7817			CPPFLAGS="$cf_save_CPPFLAGS"
7818			LIBS="$cf_save_LIBS"
7819
7820		if test "$cf_cv_find_linkage_z" != yes ; then
7821
7822cf_search=
7823cf_library_path_list=""
7824if test -n "${LDFLAGS}${LIBS}" ; then
7825	for cf_library_path in $LDFLAGS $LIBS
7826	do
7827		case "$cf_library_path" in
7828		(-L*)
7829			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7830
7831test "x$cf_library_path" != "xNONE" && \
7832test -d "$cf_library_path" && \
7833 {
7834	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
7835	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
7836	test -d "$cf_library_path/lib/z" &&       cf_search="$cf_search $cf_library_path/lib/z"
7837	test -d "$cf_library_path/lib/z/lib" &&    cf_search="$cf_search $cf_library_path/lib/z/lib"
7838	test -d "$cf_library_path/z/lib" &&       cf_search="$cf_search $cf_library_path/z/lib"
7839	test -d "$cf_library_path/z/lib/z" &&    cf_search="$cf_search $cf_library_path/z/lib/z"
7840}
7841
7842			cf_library_path_list="$cf_library_path_list $cf_search"
7843			;;
7844		esac
7845	done
7846fi
7847
7848cf_search=
7849
7850test "x$prefix" != "xNONE" && \
7851test -d "$prefix" && \
7852 {
7853	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
7854	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
7855	test -d "$prefix/lib/z" &&       cf_search="$cf_search $prefix/lib/z"
7856	test -d "$prefix/lib/z/lib" &&    cf_search="$cf_search $prefix/lib/z/lib"
7857	test -d "$prefix/z/lib" &&       cf_search="$cf_search $prefix/z/lib"
7858	test -d "$prefix/z/lib/z" &&    cf_search="$cf_search $prefix/z/lib/z"
7859}
7860
7861for cf_subdir_prefix in \
7862	/usr \
7863	/usr/local \
7864	/usr/pkg \
7865	/opt \
7866	/opt/local \
7867	$HOME
7868do
7869
7870test "x$cf_subdir_prefix" != "x$prefix" && \
7871test -d "$cf_subdir_prefix" && \
7872{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7873	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
7874	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
7875	test -d "$cf_subdir_prefix/lib/z" &&       cf_search="$cf_search $cf_subdir_prefix/lib/z"
7876	test -d "$cf_subdir_prefix/lib/z/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/z/lib"
7877	test -d "$cf_subdir_prefix/z/lib" &&       cf_search="$cf_search $cf_subdir_prefix/z/lib"
7878	test -d "$cf_subdir_prefix/z/lib/z" &&    cf_search="$cf_search $cf_subdir_prefix/z/lib/z"
7879}
7880
7881done
7882
7883cf_search="$cf_library_path_list $cf_search"
7884
7885			for cf_cv_library_path_z in $cf_search
7886			do
7887				if test -d "$cf_cv_library_path_z" ; then
7888					test -n "$verbose" && echo "	... testing $cf_cv_library_path_z" 1>&6
7889
7890echo "${as_me:-configure}:7890: testing ... testing $cf_cv_library_path_z ..." 1>&5
7891
7892					CPPFLAGS="$cf_test_CPPFLAGS"
7893					LIBS="-lz  $cf_save_LIBS"
7894					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_z"
7895					cat >"conftest.$ac_ext" <<_ACEOF
7896#line 7896 "configure"
7897#include "confdefs.h"
7898
7899#include <zlib.h>
7900
7901int
7902main (void)
7903{
7904
7905	gzopen("name","mode")
7906
7907  ;
7908  return 0;
7909}
7910_ACEOF
7911rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7912if { (eval echo "$as_me:7912: \"$ac_link\"") >&5
7913  (eval $ac_link) 2>&5
7914  ac_status=$?
7915  echo "$as_me:7915: \$? = $ac_status" >&5
7916  (exit "$ac_status"); } &&
7917         { ac_try='test -s "conftest$ac_exeext"'
7918  { (eval echo "$as_me:7918: \"$ac_try\"") >&5
7919  (eval $ac_try) 2>&5
7920  ac_status=$?
7921  echo "$as_me:7921: \$? = $ac_status" >&5
7922  (exit "$ac_status"); }; }; then
7923
7924					test -n "$verbose" && echo "	... found z library in $cf_cv_library_path_z" 1>&6
7925
7926echo "${as_me:-configure}:7926: testing ... found z library in $cf_cv_library_path_z ..." 1>&5
7927
7928					cf_cv_find_linkage_z=yes
7929					cf_cv_library_file_z="-lz"
7930					break
7931else
7932  echo "$as_me: failed program was:" >&5
7933cat "conftest.$ac_ext" >&5
7934
7935					CPPFLAGS="$cf_save_CPPFLAGS"
7936					LIBS="$cf_save_LIBS"
7937					LDFLAGS="$cf_save_LDFLAGS"
7938
7939fi
7940rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7941				fi
7942			done
7943			CPPFLAGS="$cf_save_CPPFLAGS"
7944			LDFLAGS="$cf_save_LDFLAGS"
7945		fi
7946
7947	else
7948		cf_cv_find_linkage_z=no
7949	fi
7950
7951fi
7952rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7953
7954fi
7955rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7956
7957LIBS="$cf_save_LIBS"
7958
7959if test "$cf_cv_find_linkage_z" = yes ; then
7960
7961if test -n "$cf_cv_header_path_z" ; then
7962  for cf_add_incdir in $cf_cv_header_path_z
7963  do
7964	while test "$cf_add_incdir" != /usr/include
7965	do
7966	  if test -d "$cf_add_incdir"
7967	  then
7968		cf_have_incdir=no
7969		if test -n "$CFLAGS$CPPFLAGS" ; then
7970		  # a loop is needed to ensure we can add subdirs of existing dirs
7971		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7972			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7973			  cf_have_incdir=yes; break
7974			fi
7975		  done
7976		fi
7977
7978		if test "$cf_have_incdir" = no ; then
7979		  if test "$cf_add_incdir" = /usr/local/include ; then
7980			if test "$GCC" = yes
7981			then
7982			  cf_save_CPPFLAGS=$CPPFLAGS
7983
7984	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7985	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7986
7987			  cat >"conftest.$ac_ext" <<_ACEOF
7988#line 7988 "configure"
7989#include "confdefs.h"
7990#include <stdio.h>
7991int
7992main (void)
7993{
7994printf("Hello")
7995  ;
7996  return 0;
7997}
7998_ACEOF
7999rm -f "conftest.$ac_objext"
8000if { (eval echo "$as_me:8000: \"$ac_compile\"") >&5
8001  (eval $ac_compile) 2>&5
8002  ac_status=$?
8003  echo "$as_me:8003: \$? = $ac_status" >&5
8004  (exit "$ac_status"); } &&
8005         { ac_try='test -s "conftest.$ac_objext"'
8006  { (eval echo "$as_me:8006: \"$ac_try\"") >&5
8007  (eval $ac_try) 2>&5
8008  ac_status=$?
8009  echo "$as_me:8009: \$? = $ac_status" >&5
8010  (exit "$ac_status"); }; }; then
8011  :
8012else
8013  echo "$as_me: failed program was:" >&5
8014cat "conftest.$ac_ext" >&5
8015cf_have_incdir=yes
8016fi
8017rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8018			  CPPFLAGS=$cf_save_CPPFLAGS
8019			fi
8020		  fi
8021		fi
8022
8023		if test "$cf_have_incdir" = no ; then
8024		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8025
8026echo "${as_me:-configure}:8026: testing adding $cf_add_incdir to include-path ..." 1>&5
8027
8028		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8029
8030		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8031		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8032		  cf_add_incdir="$cf_top_incdir"
8033		else
8034		  break
8035		fi
8036	  else
8037		break
8038	  fi
8039	done
8040  done
8041fi
8042
8043if test -n "$cf_cv_library_path_z" ; then
8044	for cf_add_libdir in $cf_cv_library_path_z
8045	do
8046		if test "$cf_add_libdir" = /usr/lib ; then
8047			:
8048		elif test -d "$cf_add_libdir"
8049		then
8050			cf_have_libdir=no
8051			if test -n "$LDFLAGS$LIBS" ; then
8052				# a loop is needed to ensure we can add subdirs of existing dirs
8053				for cf_test_libdir in $LDFLAGS $LIBS ; do
8054					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8055						cf_have_libdir=yes; break
8056					fi
8057				done
8058			fi
8059			if test "$cf_have_libdir" = no ; then
8060				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8061
8062echo "${as_me:-configure}:8062: testing adding $cf_add_libdir to library-path ..." 1>&5
8063
8064				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8065			fi
8066		fi
8067	done
8068fi
8069
8070cf_add_libs="$LIBS"
8071# reverse order
8072cf_add_0lib=
8073for cf_add_1lib in -lz; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8074# filter duplicates
8075for cf_add_1lib in $cf_add_0lib; do
8076	for cf_add_2lib in $cf_add_libs; do
8077		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8078			cf_add_1lib=
8079			break
8080		fi
8081	done
8082	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8083done
8084LIBS="$cf_add_libs"
8085
8086else
8087{ echo "$as_me:8087: WARNING: Cannot find z library" >&5
8088echo "$as_me: WARNING: Cannot find z library" >&2;}
8089fi
8090
8091for ac_func in \
8092	zError \
8093
8094do
8095as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8096echo "$as_me:8096: checking for $ac_func" >&5
8097echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8098if eval "test \"\${$as_ac_var+set}\" = set"; then
8099  echo $ECHO_N "(cached) $ECHO_C" >&6
8100else
8101  cat >"conftest.$ac_ext" <<_ACEOF
8102#line 8102 "configure"
8103#include "confdefs.h"
8104#define $ac_func autoconf_temporary
8105#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8106#undef $ac_func
8107
8108#ifdef __cplusplus
8109extern "C"
8110#endif
8111
8112/* We use char because int might match the return type of a gcc2
8113   builtin and then its argument prototype would still apply.  */
8114char $ac_func (void);
8115
8116int
8117main (void)
8118{
8119
8120/* The GNU C library defines stubs for functions which it implements
8121    to always fail with ENOSYS.  Some functions are actually named
8122    something starting with __ and the normal name is an alias.  */
8123#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8124#error found stub for $ac_func
8125#endif
8126
8127	return $ac_func ();
8128  ;
8129  return 0;
8130}
8131_ACEOF
8132rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8133if { (eval echo "$as_me:8133: \"$ac_link\"") >&5
8134  (eval $ac_link) 2>&5
8135  ac_status=$?
8136  echo "$as_me:8136: \$? = $ac_status" >&5
8137  (exit "$ac_status"); } &&
8138         { ac_try='test -s "conftest$ac_exeext"'
8139  { (eval echo "$as_me:8139: \"$ac_try\"") >&5
8140  (eval $ac_try) 2>&5
8141  ac_status=$?
8142  echo "$as_me:8142: \$? = $ac_status" >&5
8143  (exit "$ac_status"); }; }; then
8144  eval "$as_ac_var=yes"
8145else
8146  echo "$as_me: failed program was:" >&5
8147cat "conftest.$ac_ext" >&5
8148eval "$as_ac_var=no"
8149fi
8150rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8151fi
8152echo "$as_me:8152: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8153echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8154if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8155  cat >>confdefs.h <<EOF
8156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8157EOF
8158
8159fi
8160done
8161
8162if test "x$ac_cv_func_zError" = xyes
8163then
8164
8165cat >>confdefs.h <<\EOF
8166#define USE_ZLIB 1
8167EOF
8168
8169fi
8170
8171if test "$with_fontenc" = yes
8172then
8173
8174echo "$as_me:8174: checking if you want to use pkg-config" >&5
8175echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8176
8177# Check whether --with-pkg-config or --without-pkg-config was given.
8178if test "${with_pkg_config+set}" = set; then
8179  withval="$with_pkg_config"
8180  cf_pkg_config=$withval
8181else
8182  cf_pkg_config=yes
8183fi;
8184echo "$as_me:8184: result: $cf_pkg_config" >&5
8185echo "${ECHO_T}$cf_pkg_config" >&6
8186
8187case "$cf_pkg_config" in
8188(no)
8189	PKG_CONFIG=none
8190	;;
8191(yes)
8192
8193if test -n "$ac_tool_prefix"; then
8194  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8195set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8196echo "$as_me:8196: checking for $ac_word" >&5
8197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8198if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8199  echo $ECHO_N "(cached) $ECHO_C" >&6
8200else
8201  case $PKG_CONFIG in
8202  [\\/]* | ?:[\\/]*)
8203  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8204  ;;
8205  *)
8206  ac_save_IFS=$IFS; IFS=$ac_path_separator
8207ac_dummy="$PATH"
8208for ac_dir in $ac_dummy; do
8209  IFS=$ac_save_IFS
8210  test -z "$ac_dir" && ac_dir=.
8211  if $as_executable_p "$ac_dir/$ac_word"; then
8212   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8213   echo "$as_me:8213: found $ac_dir/$ac_word" >&5
8214   break
8215fi
8216done
8217
8218  ;;
8219esac
8220fi
8221PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8222
8223if test -n "$PKG_CONFIG"; then
8224  echo "$as_me:8224: result: $PKG_CONFIG" >&5
8225echo "${ECHO_T}$PKG_CONFIG" >&6
8226else
8227  echo "$as_me:8227: result: no" >&5
8228echo "${ECHO_T}no" >&6
8229fi
8230
8231fi
8232if test -z "$ac_cv_path_PKG_CONFIG"; then
8233  ac_pt_PKG_CONFIG=$PKG_CONFIG
8234  # Extract the first word of "pkg-config", so it can be a program name with args.
8235set dummy pkg-config; ac_word=$2
8236echo "$as_me:8236: checking for $ac_word" >&5
8237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8238if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
8239  echo $ECHO_N "(cached) $ECHO_C" >&6
8240else
8241  case $ac_pt_PKG_CONFIG in
8242  [\\/]* | ?:[\\/]*)
8243  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8244  ;;
8245  *)
8246  ac_save_IFS=$IFS; IFS=$ac_path_separator
8247ac_dummy="$PATH"
8248for ac_dir in $ac_dummy; do
8249  IFS=$ac_save_IFS
8250  test -z "$ac_dir" && ac_dir=.
8251  if $as_executable_p "$ac_dir/$ac_word"; then
8252   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
8253   echo "$as_me:8253: found $ac_dir/$ac_word" >&5
8254   break
8255fi
8256done
8257
8258  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
8259  ;;
8260esac
8261fi
8262ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8263
8264if test -n "$ac_pt_PKG_CONFIG"; then
8265  echo "$as_me:8265: result: $ac_pt_PKG_CONFIG" >&5
8266echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
8267else
8268  echo "$as_me:8268: result: no" >&5
8269echo "${ECHO_T}no" >&6
8270fi
8271
8272  PKG_CONFIG=$ac_pt_PKG_CONFIG
8273else
8274  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8275fi
8276
8277	;;
8278(*)
8279	PKG_CONFIG=$withval
8280	;;
8281esac
8282
8283test -z "$PKG_CONFIG" && PKG_CONFIG=none
8284if test "$PKG_CONFIG" != none ; then
8285
8286if test "x$prefix" != xNONE; then
8287	cf_path_syntax="$prefix"
8288else
8289	cf_path_syntax="$ac_default_prefix"
8290fi
8291
8292case ".$PKG_CONFIG" in
8293(.\$\(*\)*|.\'*\'*)
8294	;;
8295(..|./*|.\\*)
8296	;;
8297(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8298	;;
8299(.\$\{*prefix\}*|.\$\{*dir\}*)
8300	eval PKG_CONFIG="$PKG_CONFIG"
8301	case ".$PKG_CONFIG" in
8302	(.NONE/*)
8303		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8304		;;
8305	esac
8306	;;
8307(.no|.NONE/*)
8308	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8309	;;
8310(*)
8311	{ { echo "$as_me:8311: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8312echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8313   { (exit 1); exit 1; }; }
8314	;;
8315esac
8316
8317elif test "x$cf_pkg_config" != xno ; then
8318	{ echo "$as_me:8318: WARNING: pkg-config is not installed" >&5
8319echo "$as_me: WARNING: pkg-config is not installed" >&2;}
8320fi
8321
8322cf_extra_fontenc_incs=
8323cf_extra_fontenc_libs="-lfontenc -lX11"
8324FONTENC_CONFIG=
8325FONTENC_PARAMS=
8326
8327if test "$PKG_CONFIG" != none;  then
8328    if "$PKG_CONFIG" --exists fontenc; then
8329        FONTENC_CONFIG=$PKG_CONFIG
8330        FONTENC_PARAMS="fontenc x11"
8331        cf_extra_fontenc_libs=
8332    fi
8333fi
8334
8335echo "$as_me:8335: checking for optional font-encoding cflags" >&5
8336echo $ECHO_N "checking for optional font-encoding cflags... $ECHO_C" >&6
8337
8338# Check whether --with-fontenc-cflags or --without-fontenc-cflags was given.
8339if test "${with_fontenc_cflags+set}" = set; then
8340  withval="$with_fontenc_cflags"
8341  cf_x_fontenc_incs="$withval"
8342else
8343  cf_x_fontenc_incs=auto
8344fi;
8345test "$cf_x_fontenc_incs" = yes && cf_x_fontenc_incs=auto
8346echo "$as_me:8346: result: $cf_x_fontenc_incs" >&5
8347echo "${ECHO_T}$cf_x_fontenc_incs" >&6
8348
8349echo "$as_me:8349: checking for optional font-encoding libraries" >&5
8350echo $ECHO_N "checking for optional font-encoding libraries... $ECHO_C" >&6
8351
8352# Check whether --with-fontenc-libs or --without-fontenc-libs was given.
8353if test "${with_fontenc_libs+set}" = set; then
8354  withval="$with_fontenc_libs"
8355  cf_x_fontenc_libs="$withval"
8356else
8357  cf_x_fontenc_libs=auto
8358fi;
8359test "$cf_x_fontenc_libs" = yes && cf_x_fontenc_libs=auto
8360echo "$as_me:8360: result: $cf_x_fontenc_libs" >&5
8361echo "${ECHO_T}$cf_x_fontenc_libs" >&6
8362
8363if test "$cf_x_fontenc_incs" = auto ; then
8364echo "$as_me:8364: checking for X font-encoding headers" >&5
8365echo $ECHO_N "checking for X font-encoding headers... $ECHO_C" >&6
8366if test "${cf_cv_x_fontenc_incs+set}" = set; then
8367  echo $ECHO_N "(cached) $ECHO_C" >&6
8368else
8369
8370    if test -n "$FONTENC_CONFIG" ; then
8371        cf_cv_x_fontenc_incs="`$FONTENC_CONFIG $FONTENC_PARAMS --cflags 2>/dev/null`"
8372    else
8373        cf_cv_x_fontenc_incs=$cf_extra_fontenc_incs
8374    fi
8375
8376fi
8377echo "$as_me:8377: result: $cf_cv_x_fontenc_incs" >&5
8378echo "${ECHO_T}$cf_cv_x_fontenc_incs" >&6
8379else
8380	cf_cv_x_fontenc_incs=$cf_x_fontenc_incs
8381fi
8382
8383if test "$cf_x_fontenc_libs" = auto ; then
8384echo "$as_me:8384: checking for X font-encoding libraries" >&5
8385echo $ECHO_N "checking for X font-encoding libraries... $ECHO_C" >&6
8386if test "${cf_cv_x_fontenc_libs+set}" = set; then
8387  echo $ECHO_N "(cached) $ECHO_C" >&6
8388else
8389
8390    if test -n "$FONTENC_CONFIG" ; then
8391        cf_cv_x_fontenc_libs="`$FONTENC_CONFIG $FONTENC_PARAMS --libs 2>/dev/null`"
8392    else
8393        cf_cv_x_fontenc_libs=$cf_extra_fontenc_libs
8394    fi
8395
8396fi
8397echo "$as_me:8397: result: $cf_cv_x_fontenc_libs" >&5
8398echo "${ECHO_T}$cf_cv_x_fontenc_libs" >&6
8399else
8400	cf_cv_x_fontenc_libs=$cf_x_fontenc_libs
8401fi
8402
8403cf_save_LIBS="$LIBS"
8404cf_save_INCS="$CPPFLAGS"
8405
8406LIBS="$cf_cv_x_fontenc_libs $LIBS $X_LIBS"
8407CPPFLAGS="$CPPFLAGS $X_CFLAGS $cf_cv_x_fontenc_incs"
8408
8409echo "$as_me:8409: checking if we can link with font encoding library" >&5
8410echo $ECHO_N "checking if we can link with font encoding library... $ECHO_C" >&6
8411cat >"conftest.$ac_ext" <<_ACEOF
8412#line 8412 "configure"
8413#include "confdefs.h"
8414
8415$ac_includes_default
8416#include <X11/Xlib.h>
8417#include <X11/fonts/fontenc.h>
8418int
8419main (void)
8420{
8421
8422	FontMapPtr mapping = FontEncMapFind(0, FONT_ENCODING_UNICODE, -1, -1, NULL);
8423
8424  ;
8425  return 0;
8426}
8427_ACEOF
8428rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8429if { (eval echo "$as_me:8429: \"$ac_link\"") >&5
8430  (eval $ac_link) 2>&5
8431  ac_status=$?
8432  echo "$as_me:8432: \$? = $ac_status" >&5
8433  (exit "$ac_status"); } &&
8434         { ac_try='test -s "conftest$ac_exeext"'
8435  { (eval echo "$as_me:8435: \"$ac_try\"") >&5
8436  (eval $ac_try) 2>&5
8437  ac_status=$?
8438  echo "$as_me:8438: \$? = $ac_status" >&5
8439  (exit "$ac_status"); }; }; then
8440  cf_have_fontenc_libs=yes
8441else
8442  echo "$as_me: failed program was:" >&5
8443cat "conftest.$ac_ext" >&5
8444cf_have_fontenc_libs=no
8445fi
8446rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8447echo "$as_me:8447: result: $cf_have_fontenc_libs" >&5
8448echo "${ECHO_T}$cf_have_fontenc_libs" >&6
8449
8450LIBS="$cf_save_LIBS"
8451CPPFLAGS="$cf_save_INCS"
8452
8453if test $cf_have_fontenc_libs = yes ; then
8454	LIBS="$cf_cv_x_fontenc_libs $LIBS $X_LIBS"
8455
8456cf_fix_cppflags=no
8457cf_new_cflags=
8458cf_new_cppflags=
8459cf_new_extra_cppflags=
8460
8461for cf_add_cflags in $cf_cv_x_fontenc_incs
8462do
8463case "$cf_fix_cppflags" in
8464(no)
8465	case "$cf_add_cflags" in
8466	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8467		case "$cf_add_cflags" in
8468		(-D*)
8469			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8470
8471			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8472				&& test -z "${cf_tst_cflags}" \
8473				&& cf_fix_cppflags=yes
8474
8475			if test "$cf_fix_cppflags" = yes ; then
8476
8477	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8478	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8479
8480				continue
8481			elif test "${cf_tst_cflags}" = "\"'" ; then
8482
8483	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8484	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8485
8486				continue
8487			fi
8488			;;
8489		esac
8490		case "$CPPFLAGS" in
8491		(*$cf_add_cflags)
8492			;;
8493		(*)
8494			case "$cf_add_cflags" in
8495			(-D*)
8496				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8497
8498CPPFLAGS=`echo "$CPPFLAGS" | \
8499	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8500		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8501
8502				;;
8503			esac
8504
8505	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8506	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8507
8508			;;
8509		esac
8510		;;
8511	(*)
8512
8513	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8514	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8515
8516		;;
8517	esac
8518	;;
8519(yes)
8520
8521	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8522	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8523
8524	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8525
8526	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8527		&& test -z "${cf_tst_cflags}" \
8528		&& cf_fix_cppflags=no
8529	;;
8530esac
8531done
8532
8533if test -n "$cf_new_cflags" ; then
8534
8535	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8536	CFLAGS="${CFLAGS}$cf_new_cflags"
8537
8538fi
8539
8540if test -n "$cf_new_cppflags" ; then
8541
8542	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8543	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8544
8545fi
8546
8547if test -n "$cf_new_extra_cppflags" ; then
8548
8549	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8550	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8551
8552fi
8553
8554else
8555	{ echo "$as_me:8555: WARNING: No libraries found for font-encoding" >&5
8556echo "$as_me: WARNING: No libraries found for font-encoding" >&2;}
8557fi
8558
8559	if test $cf_have_fontenc_libs = yes ; then
8560
8561cat >>confdefs.h <<\EOF
8562#define USE_FONTENC 1
8563EOF
8564
8565	else
8566		{ { echo "$as_me:8566: error: cannot link with fontenc" >&5
8567echo "$as_me: error: cannot link with fontenc" >&2;}
8568   { (exit 1); exit 1; }; }
8569	fi
8570fi
8571
8572echo "$as_me:8572: checking for nl_langinfo and CODESET" >&5
8573echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8574if test "${am_cv_langinfo_codeset+set}" = set; then
8575  echo $ECHO_N "(cached) $ECHO_C" >&6
8576else
8577  cat >"conftest.$ac_ext" <<_ACEOF
8578#line 8578 "configure"
8579#include "confdefs.h"
8580#include <langinfo.h>
8581int
8582main (void)
8583{
8584char* cs = nl_langinfo(CODESET); (void)cs
8585  ;
8586  return 0;
8587}
8588_ACEOF
8589rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8590if { (eval echo "$as_me:8590: \"$ac_link\"") >&5
8591  (eval $ac_link) 2>&5
8592  ac_status=$?
8593  echo "$as_me:8593: \$? = $ac_status" >&5
8594  (exit "$ac_status"); } &&
8595         { ac_try='test -s "conftest$ac_exeext"'
8596  { (eval echo "$as_me:8596: \"$ac_try\"") >&5
8597  (eval $ac_try) 2>&5
8598  ac_status=$?
8599  echo "$as_me:8599: \$? = $ac_status" >&5
8600  (exit "$ac_status"); }; }; then
8601  am_cv_langinfo_codeset=yes
8602else
8603  echo "$as_me: failed program was:" >&5
8604cat "conftest.$ac_ext" >&5
8605am_cv_langinfo_codeset=no
8606fi
8607rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8608
8609fi
8610echo "$as_me:8610: result: $am_cv_langinfo_codeset" >&5
8611echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8612	if test "$am_cv_langinfo_codeset" = yes; then
8613
8614cat >>confdefs.h <<\EOF
8615#define HAVE_LANGINFO_CODESET 1
8616EOF
8617
8618	fi
8619
8620# Since iconv is widely available, fallback to using it if fontenc is neither
8621# requested nor available.
8622if test "$with_iconv" = yes
8623then
8624
8625# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8626if test "${with_libiconv_prefix+set}" = set; then
8627  withval="$with_libiconv_prefix"
8628
8629case "$withval" in
8630(no)
8631	;;
8632(yes)
8633	;;
8634(*)
8635
8636for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
8637	if test -d "$cf_searchpath/include" ; then
8638
8639if test -n "$cf_searchpath/include" ; then
8640  for cf_add_incdir in $cf_searchpath/include
8641  do
8642	while test "$cf_add_incdir" != /usr/include
8643	do
8644	  if test -d "$cf_add_incdir"
8645	  then
8646		cf_have_incdir=no
8647		if test -n "$CFLAGS$CPPFLAGS" ; then
8648		  # a loop is needed to ensure we can add subdirs of existing dirs
8649		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8650			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8651			  cf_have_incdir=yes; break
8652			fi
8653		  done
8654		fi
8655
8656		if test "$cf_have_incdir" = no ; then
8657		  if test "$cf_add_incdir" = /usr/local/include ; then
8658			if test "$GCC" = yes
8659			then
8660			  cf_save_CPPFLAGS=$CPPFLAGS
8661
8662	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8663	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8664
8665			  cat >"conftest.$ac_ext" <<_ACEOF
8666#line 8666 "configure"
8667#include "confdefs.h"
8668#include <stdio.h>
8669int
8670main (void)
8671{
8672printf("Hello")
8673  ;
8674  return 0;
8675}
8676_ACEOF
8677rm -f "conftest.$ac_objext"
8678if { (eval echo "$as_me:8678: \"$ac_compile\"") >&5
8679  (eval $ac_compile) 2>&5
8680  ac_status=$?
8681  echo "$as_me:8681: \$? = $ac_status" >&5
8682  (exit "$ac_status"); } &&
8683         { ac_try='test -s "conftest.$ac_objext"'
8684  { (eval echo "$as_me:8684: \"$ac_try\"") >&5
8685  (eval $ac_try) 2>&5
8686  ac_status=$?
8687  echo "$as_me:8687: \$? = $ac_status" >&5
8688  (exit "$ac_status"); }; }; then
8689  :
8690else
8691  echo "$as_me: failed program was:" >&5
8692cat "conftest.$ac_ext" >&5
8693cf_have_incdir=yes
8694fi
8695rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8696			  CPPFLAGS=$cf_save_CPPFLAGS
8697			fi
8698		  fi
8699		fi
8700
8701		if test "$cf_have_incdir" = no ; then
8702		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8703
8704echo "${as_me:-configure}:8704: testing adding $cf_add_incdir to include-path ..." 1>&5
8705
8706		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8707
8708		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8709		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8710		  cf_add_incdir="$cf_top_incdir"
8711		else
8712		  break
8713		fi
8714	  else
8715		break
8716	  fi
8717	done
8718  done
8719fi
8720
8721	elif test -d "$cf_searchpath/../include" ; then
8722
8723if test -n "$cf_searchpath/../include" ; then
8724  for cf_add_incdir in $cf_searchpath/../include
8725  do
8726	while test "$cf_add_incdir" != /usr/include
8727	do
8728	  if test -d "$cf_add_incdir"
8729	  then
8730		cf_have_incdir=no
8731		if test -n "$CFLAGS$CPPFLAGS" ; then
8732		  # a loop is needed to ensure we can add subdirs of existing dirs
8733		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8734			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8735			  cf_have_incdir=yes; break
8736			fi
8737		  done
8738		fi
8739
8740		if test "$cf_have_incdir" = no ; then
8741		  if test "$cf_add_incdir" = /usr/local/include ; then
8742			if test "$GCC" = yes
8743			then
8744			  cf_save_CPPFLAGS=$CPPFLAGS
8745
8746	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8747	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8748
8749			  cat >"conftest.$ac_ext" <<_ACEOF
8750#line 8750 "configure"
8751#include "confdefs.h"
8752#include <stdio.h>
8753int
8754main (void)
8755{
8756printf("Hello")
8757  ;
8758  return 0;
8759}
8760_ACEOF
8761rm -f "conftest.$ac_objext"
8762if { (eval echo "$as_me:8762: \"$ac_compile\"") >&5
8763  (eval $ac_compile) 2>&5
8764  ac_status=$?
8765  echo "$as_me:8765: \$? = $ac_status" >&5
8766  (exit "$ac_status"); } &&
8767         { ac_try='test -s "conftest.$ac_objext"'
8768  { (eval echo "$as_me:8768: \"$ac_try\"") >&5
8769  (eval $ac_try) 2>&5
8770  ac_status=$?
8771  echo "$as_me:8771: \$? = $ac_status" >&5
8772  (exit "$ac_status"); }; }; then
8773  :
8774else
8775  echo "$as_me: failed program was:" >&5
8776cat "conftest.$ac_ext" >&5
8777cf_have_incdir=yes
8778fi
8779rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8780			  CPPFLAGS=$cf_save_CPPFLAGS
8781			fi
8782		  fi
8783		fi
8784
8785		if test "$cf_have_incdir" = no ; then
8786		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8787
8788echo "${as_me:-configure}:8788: testing adding $cf_add_incdir to include-path ..." 1>&5
8789
8790		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8791
8792		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8793		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8794		  cf_add_incdir="$cf_top_incdir"
8795		else
8796		  break
8797		fi
8798	  else
8799		break
8800	  fi
8801	done
8802  done
8803fi
8804
8805	else
8806{ { echo "$as_me:8806: error: cannot find libiconv under $withval" >&5
8807echo "$as_me: error: cannot find libiconv under $withval" >&2;}
8808   { (exit 1); exit 1; }; }
8809	fi
8810	if test -d "$cf_searchpath/lib" ; then
8811
8812if test -n "$cf_searchpath/lib" ; then
8813	for cf_add_libdir in $cf_searchpath/lib
8814	do
8815		if test "$cf_add_libdir" = /usr/lib ; then
8816			:
8817		elif test -d "$cf_add_libdir"
8818		then
8819			cf_have_libdir=no
8820			if test -n "$LDFLAGS$LIBS" ; then
8821				# a loop is needed to ensure we can add subdirs of existing dirs
8822				for cf_test_libdir in $LDFLAGS $LIBS ; do
8823					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8824						cf_have_libdir=yes; break
8825					fi
8826				done
8827			fi
8828			if test "$cf_have_libdir" = no ; then
8829				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8830
8831echo "${as_me:-configure}:8831: testing adding $cf_add_libdir to library-path ..." 1>&5
8832
8833				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8834			fi
8835		fi
8836	done
8837fi
8838
8839	elif test -d "$cf_searchpath" ; then
8840
8841if test -n "$cf_searchpath" ; then
8842	for cf_add_libdir in $cf_searchpath
8843	do
8844		if test "$cf_add_libdir" = /usr/lib ; then
8845			:
8846		elif test -d "$cf_add_libdir"
8847		then
8848			cf_have_libdir=no
8849			if test -n "$LDFLAGS$LIBS" ; then
8850				# a loop is needed to ensure we can add subdirs of existing dirs
8851				for cf_test_libdir in $LDFLAGS $LIBS ; do
8852					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8853						cf_have_libdir=yes; break
8854					fi
8855				done
8856			fi
8857			if test "$cf_have_libdir" = no ; then
8858				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8859
8860echo "${as_me:-configure}:8860: testing adding $cf_add_libdir to library-path ..." 1>&5
8861
8862				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8863			fi
8864		fi
8865	done
8866fi
8867
8868	else
8869{ { echo "$as_me:8869: error: cannot find libiconv under $withval" >&5
8870echo "$as_me: error: cannot find libiconv under $withval" >&2;}
8871   { (exit 1); exit 1; }; }
8872	fi
8873done
8874
8875	;;
8876esac
8877
8878fi;
8879
8880  echo "$as_me:8880: checking for iconv" >&5
8881echo $ECHO_N "checking for iconv... $ECHO_C" >&6
8882if test "${am_cv_func_iconv+set}" = set; then
8883  echo $ECHO_N "(cached) $ECHO_C" >&6
8884else
8885
8886# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8887# will be set on completion of the AC_TRY_LINK below.
8888cf_cv_header_path_iconv=
8889cf_cv_library_path_iconv=
8890
8891echo "${as_me:-configure}:8891: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
8892
8893cf_save_LIBS="$LIBS"
8894
8895cat >"conftest.$ac_ext" <<_ACEOF
8896#line 8896 "configure"
8897#include "confdefs.h"
8898
8899#include <stdlib.h>
8900#include <iconv.h>
8901
8902int
8903main (void)
8904{
8905
8906	iconv_t cd = iconv_open("","");
8907	iconv(cd,NULL,NULL,NULL,NULL);
8908	iconv_close(cd);
8909
8910  ;
8911  return 0;
8912}
8913_ACEOF
8914rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8915if { (eval echo "$as_me:8915: \"$ac_link\"") >&5
8916  (eval $ac_link) 2>&5
8917  ac_status=$?
8918  echo "$as_me:8918: \$? = $ac_status" >&5
8919  (exit "$ac_status"); } &&
8920         { ac_try='test -s "conftest$ac_exeext"'
8921  { (eval echo "$as_me:8921: \"$ac_try\"") >&5
8922  (eval $ac_try) 2>&5
8923  ac_status=$?
8924  echo "$as_me:8924: \$? = $ac_status" >&5
8925  (exit "$ac_status"); }; }; then
8926
8927	cf_cv_find_linkage_iconv=yes
8928	cf_cv_header_path_iconv=/usr/include
8929	cf_cv_library_path_iconv=/usr/lib
8930
8931else
8932  echo "$as_me: failed program was:" >&5
8933cat "conftest.$ac_ext" >&5
8934
8935LIBS="-liconv  $cf_save_LIBS"
8936
8937cat >"conftest.$ac_ext" <<_ACEOF
8938#line 8938 "configure"
8939#include "confdefs.h"
8940
8941#include <stdlib.h>
8942#include <iconv.h>
8943
8944int
8945main (void)
8946{
8947
8948	iconv_t cd = iconv_open("","");
8949	iconv(cd,NULL,NULL,NULL,NULL);
8950	iconv_close(cd);
8951
8952  ;
8953  return 0;
8954}
8955_ACEOF
8956rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8957if { (eval echo "$as_me:8957: \"$ac_link\"") >&5
8958  (eval $ac_link) 2>&5
8959  ac_status=$?
8960  echo "$as_me:8960: \$? = $ac_status" >&5
8961  (exit "$ac_status"); } &&
8962         { ac_try='test -s "conftest$ac_exeext"'
8963  { (eval echo "$as_me:8963: \"$ac_try\"") >&5
8964  (eval $ac_try) 2>&5
8965  ac_status=$?
8966  echo "$as_me:8966: \$? = $ac_status" >&5
8967  (exit "$ac_status"); }; }; then
8968
8969	cf_cv_find_linkage_iconv=yes
8970	cf_cv_header_path_iconv=/usr/include
8971	cf_cv_library_path_iconv=/usr/lib
8972	cf_cv_library_file_iconv="-liconv"
8973
8974else
8975  echo "$as_me: failed program was:" >&5
8976cat "conftest.$ac_ext" >&5
8977
8978	cf_cv_find_linkage_iconv=no
8979	LIBS="$cf_save_LIBS"
8980
8981	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
8982
8983echo "${as_me:-configure}:8983: testing find linkage for iconv library ..." 1>&5
8984
8985echo "${as_me:-configure}:8985: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
8986
8987	cf_save_CPPFLAGS="$CPPFLAGS"
8988	cf_test_CPPFLAGS="$CPPFLAGS"
8989
8990cf_search=
8991
8992# collect the current set of include-directories from compiler flags
8993cf_header_path_list=""
8994if test -n "${CFLAGS}${CPPFLAGS}" ; then
8995	for cf_header_path in $CPPFLAGS $CFLAGS
8996	do
8997		case "$cf_header_path" in
8998		(-I*)
8999			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9000
9001test "x$cf_header_path" != "xNONE" && \
9002test -d "$cf_header_path" && \
9003 {
9004	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
9005	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
9006	test -d "$cf_header_path/include/iconv" &&       cf_search="$cf_search $cf_header_path/include/iconv"
9007	test -d "$cf_header_path/include/iconv/include" &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
9008	test -d "$cf_header_path/iconv/include" &&       cf_search="$cf_search $cf_header_path/iconv/include"
9009	test -d "$cf_header_path/iconv/include/iconv" &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9010}
9011
9012			cf_header_path_list="$cf_header_path_list $cf_search"
9013			;;
9014		esac
9015	done
9016fi
9017
9018# add the variations for the package we are looking for
9019
9020cf_search=
9021
9022test "x$prefix" != "xNONE" && \
9023test -d "$prefix" && \
9024 {
9025	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9026	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
9027	test -d "$prefix/include/iconv" &&       cf_search="$cf_search $prefix/include/iconv"
9028	test -d "$prefix/include/iconv/include" &&    cf_search="$cf_search $prefix/include/iconv/include"
9029	test -d "$prefix/iconv/include" &&       cf_search="$cf_search $prefix/iconv/include"
9030	test -d "$prefix/iconv/include/iconv" &&    cf_search="$cf_search $prefix/iconv/include/iconv"
9031}
9032
9033for cf_subdir_prefix in \
9034	/usr \
9035	/usr/local \
9036	/usr/pkg \
9037	/opt \
9038	/opt/local \
9039	$HOME
9040do
9041
9042test "x$cf_subdir_prefix" != "x$prefix" && \
9043test -d "$cf_subdir_prefix" && \
9044{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9045	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
9046	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
9047	test -d "$cf_subdir_prefix/include/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9048	test -d "$cf_subdir_prefix/include/iconv/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9049	test -d "$cf_subdir_prefix/iconv/include" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9050	test -d "$cf_subdir_prefix/iconv/include/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9051}
9052
9053done
9054
9055test "$includedir" != NONE && \
9056test "$includedir" != "/usr/include" && \
9057test -d "$includedir" && {
9058	test -d "$includedir" &&    cf_search="$cf_search $includedir"
9059	test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9060}
9061
9062test "$oldincludedir" != NONE && \
9063test "$oldincludedir" != "/usr/include" && \
9064test -d "$oldincludedir" && {
9065	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
9066	test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9067}
9068
9069cf_search="$cf_search $cf_header_path_list"
9070
9071	for cf_cv_header_path_iconv in $cf_search
9072	do
9073		if test -d "$cf_cv_header_path_iconv" ; then
9074			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
9075
9076echo "${as_me:-configure}:9076: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9077
9078			CPPFLAGS="$cf_save_CPPFLAGS"
9079
9080	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9081	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9082
9083			cat >"conftest.$ac_ext" <<_ACEOF
9084#line 9084 "configure"
9085#include "confdefs.h"
9086
9087#include <stdlib.h>
9088#include <iconv.h>
9089
9090int
9091main (void)
9092{
9093
9094	iconv_t cd = iconv_open("","");
9095	iconv(cd,NULL,NULL,NULL,NULL);
9096	iconv_close(cd);
9097
9098  ;
9099  return 0;
9100}
9101_ACEOF
9102rm -f "conftest.$ac_objext"
9103if { (eval echo "$as_me:9103: \"$ac_compile\"") >&5
9104  (eval $ac_compile) 2>&5
9105  ac_status=$?
9106  echo "$as_me:9106: \$? = $ac_status" >&5
9107  (exit "$ac_status"); } &&
9108         { ac_try='test -s "conftest.$ac_objext"'
9109  { (eval echo "$as_me:9109: \"$ac_try\"") >&5
9110  (eval $ac_try) 2>&5
9111  ac_status=$?
9112  echo "$as_me:9112: \$? = $ac_status" >&5
9113  (exit "$ac_status"); }; }; then
9114
9115				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9116
9117echo "${as_me:-configure}:9117: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9118
9119				cf_cv_find_linkage_iconv=maybe
9120				cf_test_CPPFLAGS="$CPPFLAGS"
9121				break
9122else
9123  echo "$as_me: failed program was:" >&5
9124cat "conftest.$ac_ext" >&5
9125
9126				CPPFLAGS="$cf_save_CPPFLAGS"
9127
9128fi
9129rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9130		fi
9131	done
9132
9133	if test "$cf_cv_find_linkage_iconv" = maybe ; then
9134
9135echo "${as_me:-configure}:9135: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9136
9137		cf_save_LIBS="$LIBS"
9138		cf_save_LDFLAGS="$LDFLAGS"
9139
9140		if test "$cf_cv_find_linkage_iconv" != yes ; then
9141
9142cf_search=
9143cf_library_path_list=""
9144if test -n "${LDFLAGS}${LIBS}" ; then
9145	for cf_library_path in $LDFLAGS $LIBS
9146	do
9147		case "$cf_library_path" in
9148		(-L*)
9149			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9150
9151test "x$cf_library_path" != "xNONE" && \
9152test -d "$cf_library_path" && \
9153 {
9154	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9155	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
9156	test -d "$cf_library_path/lib/iconv" &&       cf_search="$cf_search $cf_library_path/lib/iconv"
9157	test -d "$cf_library_path/lib/iconv/lib" &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9158	test -d "$cf_library_path/iconv/lib" &&       cf_search="$cf_search $cf_library_path/iconv/lib"
9159	test -d "$cf_library_path/iconv/lib/iconv" &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9160}
9161
9162			cf_library_path_list="$cf_library_path_list $cf_search"
9163			;;
9164		esac
9165	done
9166fi
9167
9168cf_search=
9169
9170test "x$prefix" != "xNONE" && \
9171test -d "$prefix" && \
9172 {
9173	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9174	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
9175	test -d "$prefix/lib/iconv" &&       cf_search="$cf_search $prefix/lib/iconv"
9176	test -d "$prefix/lib/iconv/lib" &&    cf_search="$cf_search $prefix/lib/iconv/lib"
9177	test -d "$prefix/iconv/lib" &&       cf_search="$cf_search $prefix/iconv/lib"
9178	test -d "$prefix/iconv/lib/iconv" &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
9179}
9180
9181for cf_subdir_prefix in \
9182	/usr \
9183	/usr/local \
9184	/usr/pkg \
9185	/opt \
9186	/opt/local \
9187	$HOME
9188do
9189
9190test "x$cf_subdir_prefix" != "x$prefix" && \
9191test -d "$cf_subdir_prefix" && \
9192{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9193	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
9194	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9195	test -d "$cf_subdir_prefix/lib/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9196	test -d "$cf_subdir_prefix/lib/iconv/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9197	test -d "$cf_subdir_prefix/iconv/lib" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9198	test -d "$cf_subdir_prefix/iconv/lib/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9199}
9200
9201done
9202
9203cf_search="$cf_library_path_list $cf_search"
9204
9205			for cf_cv_library_path_iconv in $cf_search
9206			do
9207				if test -d "$cf_cv_library_path_iconv" ; then
9208					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
9209
9210echo "${as_me:-configure}:9210: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9211
9212					CPPFLAGS="$cf_test_CPPFLAGS"
9213					LIBS="-liconv  $cf_save_LIBS"
9214					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9215					cat >"conftest.$ac_ext" <<_ACEOF
9216#line 9216 "configure"
9217#include "confdefs.h"
9218
9219#include <stdlib.h>
9220#include <iconv.h>
9221
9222int
9223main (void)
9224{
9225
9226	iconv_t cd = iconv_open("","");
9227	iconv(cd,NULL,NULL,NULL,NULL);
9228	iconv_close(cd);
9229
9230  ;
9231  return 0;
9232}
9233_ACEOF
9234rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9235if { (eval echo "$as_me:9235: \"$ac_link\"") >&5
9236  (eval $ac_link) 2>&5
9237  ac_status=$?
9238  echo "$as_me:9238: \$? = $ac_status" >&5
9239  (exit "$ac_status"); } &&
9240         { ac_try='test -s "conftest$ac_exeext"'
9241  { (eval echo "$as_me:9241: \"$ac_try\"") >&5
9242  (eval $ac_try) 2>&5
9243  ac_status=$?
9244  echo "$as_me:9244: \$? = $ac_status" >&5
9245  (exit "$ac_status"); }; }; then
9246
9247					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
9248
9249echo "${as_me:-configure}:9249: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9250
9251					cf_cv_find_linkage_iconv=yes
9252					cf_cv_library_file_iconv="-liconv"
9253					break
9254else
9255  echo "$as_me: failed program was:" >&5
9256cat "conftest.$ac_ext" >&5
9257
9258					CPPFLAGS="$cf_save_CPPFLAGS"
9259					LIBS="$cf_save_LIBS"
9260					LDFLAGS="$cf_save_LDFLAGS"
9261
9262fi
9263rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9264				fi
9265			done
9266			CPPFLAGS="$cf_save_CPPFLAGS"
9267			LDFLAGS="$cf_save_LDFLAGS"
9268		fi
9269
9270	else
9271		cf_cv_find_linkage_iconv=no
9272	fi
9273
9274fi
9275rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9276
9277fi
9278rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9279
9280LIBS="$cf_save_LIBS"
9281
9282if test "$cf_cv_find_linkage_iconv" = yes ; then
9283am_cv_func_iconv=yes
9284else
9285am_cv_func_iconv="no, consider installing GNU libiconv"
9286fi
9287
9288fi
9289echo "$as_me:9289: result: $am_cv_func_iconv" >&5
9290echo "${ECHO_T}$am_cv_func_iconv" >&6
9291
9292  if test "$am_cv_func_iconv" = yes; then
9293
9294cat >>confdefs.h <<\EOF
9295#define HAVE_ICONV 1
9296EOF
9297
9298    echo "$as_me:9298: checking if the declaration of iconv() needs const." >&5
9299echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9300if test "${am_cv_proto_iconv_const+set}" = set; then
9301  echo $ECHO_N "(cached) $ECHO_C" >&6
9302else
9303
9304      cat >"conftest.$ac_ext" <<_ACEOF
9305#line 9305 "configure"
9306#include "confdefs.h"
9307
9308#include <stdlib.h>
9309#include <iconv.h>
9310
9311extern
9312#ifdef __cplusplus
9313"C"
9314#endif
9315#if defined(__STDC__) || defined(__cplusplus)
9316size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9317#else
9318size_t iconv();
9319#endif
9320
9321int
9322main (void)
9323{
9324
9325  ;
9326  return 0;
9327}
9328_ACEOF
9329rm -f "conftest.$ac_objext"
9330if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
9331  (eval $ac_compile) 2>&5
9332  ac_status=$?
9333  echo "$as_me:9333: \$? = $ac_status" >&5
9334  (exit "$ac_status"); } &&
9335         { ac_try='test -s "conftest.$ac_objext"'
9336  { (eval echo "$as_me:9336: \"$ac_try\"") >&5
9337  (eval $ac_try) 2>&5
9338  ac_status=$?
9339  echo "$as_me:9339: \$? = $ac_status" >&5
9340  (exit "$ac_status"); }; }; then
9341  am_cv_proto_iconv_const=no
9342else
9343  echo "$as_me: failed program was:" >&5
9344cat "conftest.$ac_ext" >&5
9345am_cv_proto_iconv_const=yes
9346fi
9347rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9348fi
9349echo "$as_me:9349: result: $am_cv_proto_iconv_const" >&5
9350echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9351
9352    if test "$am_cv_proto_iconv_const" = yes ; then
9353      am_cv_proto_iconv_arg1="const"
9354    else
9355      am_cv_proto_iconv_arg1=""
9356    fi
9357
9358cat >>confdefs.h <<EOF
9359#define ICONV_CONST $am_cv_proto_iconv_arg1
9360EOF
9361
9362  fi
9363
9364  LIBICONV=
9365  if test "$cf_cv_find_linkage_iconv" = yes; then
9366
9367if test -n "$cf_cv_header_path_iconv" ; then
9368  for cf_add_incdir in $cf_cv_header_path_iconv
9369  do
9370	while test "$cf_add_incdir" != /usr/include
9371	do
9372	  if test -d "$cf_add_incdir"
9373	  then
9374		cf_have_incdir=no
9375		if test -n "$CFLAGS$CPPFLAGS" ; then
9376		  # a loop is needed to ensure we can add subdirs of existing dirs
9377		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9378			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9379			  cf_have_incdir=yes; break
9380			fi
9381		  done
9382		fi
9383
9384		if test "$cf_have_incdir" = no ; then
9385		  if test "$cf_add_incdir" = /usr/local/include ; then
9386			if test "$GCC" = yes
9387			then
9388			  cf_save_CPPFLAGS=$CPPFLAGS
9389
9390	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9391	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9392
9393			  cat >"conftest.$ac_ext" <<_ACEOF
9394#line 9394 "configure"
9395#include "confdefs.h"
9396#include <stdio.h>
9397int
9398main (void)
9399{
9400printf("Hello")
9401  ;
9402  return 0;
9403}
9404_ACEOF
9405rm -f "conftest.$ac_objext"
9406if { (eval echo "$as_me:9406: \"$ac_compile\"") >&5
9407  (eval $ac_compile) 2>&5
9408  ac_status=$?
9409  echo "$as_me:9409: \$? = $ac_status" >&5
9410  (exit "$ac_status"); } &&
9411         { ac_try='test -s "conftest.$ac_objext"'
9412  { (eval echo "$as_me:9412: \"$ac_try\"") >&5
9413  (eval $ac_try) 2>&5
9414  ac_status=$?
9415  echo "$as_me:9415: \$? = $ac_status" >&5
9416  (exit "$ac_status"); }; }; then
9417  :
9418else
9419  echo "$as_me: failed program was:" >&5
9420cat "conftest.$ac_ext" >&5
9421cf_have_incdir=yes
9422fi
9423rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9424			  CPPFLAGS=$cf_save_CPPFLAGS
9425			fi
9426		  fi
9427		fi
9428
9429		if test "$cf_have_incdir" = no ; then
9430		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9431
9432echo "${as_me:-configure}:9432: testing adding $cf_add_incdir to include-path ..." 1>&5
9433
9434		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9435
9436		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9437		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9438		  cf_add_incdir="$cf_top_incdir"
9439		else
9440		  break
9441		fi
9442	  else
9443		break
9444	  fi
9445	done
9446  done
9447fi
9448
9449    if test -n "$cf_cv_library_file_iconv" ; then
9450      LIBICONV="-liconv"
9451
9452if test -n "$cf_cv_library_path_iconv" ; then
9453	for cf_add_libdir in $cf_cv_library_path_iconv
9454	do
9455		if test "$cf_add_libdir" = /usr/lib ; then
9456			:
9457		elif test -d "$cf_add_libdir"
9458		then
9459			cf_have_libdir=no
9460			if test -n "$LDFLAGS$LIBS" ; then
9461				# a loop is needed to ensure we can add subdirs of existing dirs
9462				for cf_test_libdir in $LDFLAGS $LIBS ; do
9463					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9464						cf_have_libdir=yes; break
9465					fi
9466				done
9467			fi
9468			if test "$cf_have_libdir" = no ; then
9469				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9470
9471echo "${as_me:-configure}:9471: testing adding $cf_add_libdir to library-path ..." 1>&5
9472
9473				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9474			fi
9475		fi
9476	done
9477fi
9478
9479    fi
9480  fi
9481
9482cat >>confdefs.h <<\EOF
9483#define USE_ICONV 1
9484EOF
9485
9486cf_add_libs="$LIBS"
9487# reverse order
9488cf_add_0lib=
9489for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9490# filter duplicates
9491for cf_add_1lib in $cf_add_0lib; do
9492	for cf_add_2lib in $cf_add_libs; do
9493		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9494			cf_add_1lib=
9495			break
9496		fi
9497	done
9498	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9499done
9500LIBS="$cf_add_libs"
9501
9502	EXTRASRCS="$EXTRASRCS luitconv.c  builtin.c"
9503	EXTRAOBJS="$EXTRAOBJS luitconv\$o builtin\$o"
9504fi
9505
9506echo "$as_me:9506: checking for location of encodings.dir file" >&5
9507echo $ECHO_N "checking for location of encodings.dir file... $ECHO_C" >&6
9508
9509# Check whether --with-encodings-dir or --without-encodings-dir was given.
9510if test "${with_encodings_dir+set}" = set; then
9511  withval="$with_encodings_dir"
9512  ENCODINGS_DIR_FILE=$withval
9513else
9514  ENCODINGS_DIR_FILE=auto
9515fi;
9516
9517test -n "$verbose" && echo "	" 1>&6
9518
9519echo "${as_me:-configure}:9519: testing  ..." 1>&5
9520
9521case "x$ENCODINGS_DIR_FILE" in
9522(xauto|xyes|xno)
9523	ENCODINGS_DIR_FILE=unknown
9524	for cf_leaf in lib share
9525	do
9526		for cf_path in \
9527			/usr/X11R7/$cf_leaf/X11/fonts \
9528			/usr/X11R6/$cf_leaf/X11/fonts \
9529			/usr/local/$cf_leaf/X11/fonts \
9530			/opt/local/$cf_leaf/fonts/X11 \
9531			/opt/X11/$cf_leaf/X11/fonts \
9532			/usr/$cf_leaf/fonts/X11 \
9533			/usr/$cf_leaf/X11/fonts
9534		do
9535			test -d "$cf_path" || continue
9536			cf_encodings_dir=$cf_path/encodings/encodings.dir
9537			test -n "$verbose" && echo "	...testing $cf_encodings_dir" 1>&6
9538
9539echo "${as_me:-configure}:9539: testing ...testing $cf_encodings_dir ..." 1>&5
9540
9541			if test -f $cf_encodings_dir ; then
9542				ENCODINGS_DIR_FILE=$cf_encodings_dir
9543				break
9544			fi
9545		done
9546	done
9547	;;
9548(*)
9549	if test ! -f "$ENCODINGS_DIR_FILE" ; then
9550		{ echo "$as_me:9550: WARNING: Encodings file not found: $ENCODINGS_DIR_FILE" >&5
9551echo "$as_me: WARNING: Encodings file not found: $ENCODINGS_DIR_FILE" >&2;}
9552		ENCODINGS_DIR_FILE=/usr/share/fonts/X11
9553	fi
9554	;;
9555esac
9556echo "$as_me:9556: result: $ENCODINGS_DIR_FILE" >&5
9557echo "${ECHO_T}$ENCODINGS_DIR_FILE" >&6
9558test $ENCODINGS_DIR_FILE = unknown && ENCODINGS_DIR_FILE=
9559
9560cat >>confdefs.h <<EOF
9561#define ENCODINGS_DIR_FILE "$ENCODINGS_DIR_FILE"
9562EOF
9563
9564echo "$as_me:9564: checking for location of locale alias file" >&5
9565echo $ECHO_N "checking for location of locale alias file... $ECHO_C" >&6
9566
9567# Check whether --with-locale-alias or --without-locale-alias was given.
9568if test "${with_locale_alias+set}" = set; then
9569  withval="$with_locale_alias"
9570  LOCALE_ALIAS_FILE=$withval
9571else
9572  LOCALE_ALIAS_FILE=auto
9573fi;
9574
9575test -n "$verbose" && echo "	" 1>&6
9576
9577echo "${as_me:-configure}:9577: testing  ..." 1>&5
9578
9579case "x$LOCALE_ALIAS_FILE" in
9580(xauto|xyes|xno)
9581	LOCALE_ALIAS_FILE=unknown
9582	for cf_leaf in lib share
9583	do
9584		for cf_path in \
9585			/usr/openwin/$cf_leaf/locale \
9586			/usr/$cf_leaf/X11/locale \
9587			/usr/X11R7/$cf_leaf/X11/locale \
9588			/usr/X11R6/$cf_leaf/X11/locale \
9589			/opt/local/$cf_leaf/X11/locale \
9590			/opt/X11/$cf_leaf/X11/locale \
9591			/usr/X11/$cf_leaf/X11/locale
9592		do
9593			test -d $cf_path || continue
9594			cf_alias_file=$cf_path/locale.alias
9595			test -n "$verbose" && echo "	testing $cf_alias_file" 1>&6
9596
9597echo "${as_me:-configure}:9597: testing testing $cf_alias_file ..." 1>&5
9598
9599			if test -f $cf_alias_file ; then
9600				LOCALE_ALIAS_FILE=$cf_alias_file
9601				break
9602			fi
9603		done
9604		test "$LOCALE_ALIAS_FILE" = unknown || break
9605	done
9606	;;
9607(*)
9608	if test ! -f "$LOCALE_ALIAS_FILE" ; then
9609		{ echo "$as_me:9609: WARNING: Alias file not found: $LOCALE_ALIAS_FILE" >&5
9610echo "$as_me: WARNING: Alias file not found: $LOCALE_ALIAS_FILE" >&2;}
9611	fi
9612	;;
9613esac
9614echo "$as_me:9614: result: $LOCALE_ALIAS_FILE" >&5
9615echo "${ECHO_T}$LOCALE_ALIAS_FILE" >&6
9616
9617# Extract the first word of "groff", so it can be a program name with args.
9618set dummy groff; ac_word=$2
9619echo "$as_me:9619: checking for $ac_word" >&5
9620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9621if test "${ac_cv_path_GROFF_PATH+set}" = set; then
9622  echo $ECHO_N "(cached) $ECHO_C" >&6
9623else
9624  case $GROFF_PATH in
9625  [\\/]* | ?:[\\/]*)
9626  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
9627  ;;
9628  *)
9629  ac_save_IFS=$IFS; IFS=$ac_path_separator
9630ac_dummy="$PATH"
9631for ac_dir in $ac_dummy; do
9632  IFS=$ac_save_IFS
9633  test -z "$ac_dir" && ac_dir=.
9634  if $as_executable_p "$ac_dir/$ac_word"; then
9635   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
9636   echo "$as_me:9636: found $ac_dir/$ac_word" >&5
9637   break
9638fi
9639done
9640
9641  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
9642  ;;
9643esac
9644fi
9645GROFF_PATH=$ac_cv_path_GROFF_PATH
9646
9647if test -n "$GROFF_PATH"; then
9648  echo "$as_me:9648: result: $GROFF_PATH" >&5
9649echo "${ECHO_T}$GROFF_PATH" >&6
9650else
9651  echo "$as_me:9651: result: no" >&5
9652echo "${ECHO_T}no" >&6
9653fi
9654
9655for ac_prog in nroff mandoc
9656do
9657  # Extract the first word of "$ac_prog", so it can be a program name with args.
9658set dummy $ac_prog; ac_word=$2
9659echo "$as_me:9659: checking for $ac_word" >&5
9660echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9661if test "${ac_cv_path_NROFF_PATH+set}" = set; then
9662  echo $ECHO_N "(cached) $ECHO_C" >&6
9663else
9664  case $NROFF_PATH in
9665  [\\/]* | ?:[\\/]*)
9666  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
9667  ;;
9668  *)
9669  ac_save_IFS=$IFS; IFS=$ac_path_separator
9670ac_dummy="$PATH"
9671for ac_dir in $ac_dummy; do
9672  IFS=$ac_save_IFS
9673  test -z "$ac_dir" && ac_dir=.
9674  if $as_executable_p "$ac_dir/$ac_word"; then
9675   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
9676   echo "$as_me:9676: found $ac_dir/$ac_word" >&5
9677   break
9678fi
9679done
9680
9681  ;;
9682esac
9683fi
9684NROFF_PATH=$ac_cv_path_NROFF_PATH
9685
9686if test -n "$NROFF_PATH"; then
9687  echo "$as_me:9687: result: $NROFF_PATH" >&5
9688echo "${ECHO_T}$NROFF_PATH" >&6
9689else
9690  echo "$as_me:9690: result: no" >&5
9691echo "${ECHO_T}no" >&6
9692fi
9693
9694  test -n "$NROFF_PATH" && break
9695done
9696test -n "$NROFF_PATH" || NROFF_PATH="no"
9697
9698# Extract the first word of "tbl", so it can be a program name with args.
9699set dummy tbl; ac_word=$2
9700echo "$as_me:9700: checking for $ac_word" >&5
9701echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9702if test "${ac_cv_path_TBL_PATH+set}" = set; then
9703  echo $ECHO_N "(cached) $ECHO_C" >&6
9704else
9705  case $TBL_PATH in
9706  [\\/]* | ?:[\\/]*)
9707  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
9708  ;;
9709  *)
9710  ac_save_IFS=$IFS; IFS=$ac_path_separator
9711ac_dummy="$PATH"
9712for ac_dir in $ac_dummy; do
9713  IFS=$ac_save_IFS
9714  test -z "$ac_dir" && ac_dir=.
9715  if $as_executable_p "$ac_dir/$ac_word"; then
9716   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
9717   echo "$as_me:9717: found $ac_dir/$ac_word" >&5
9718   break
9719fi
9720done
9721
9722  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
9723  ;;
9724esac
9725fi
9726TBL_PATH=$ac_cv_path_TBL_PATH
9727
9728if test -n "$TBL_PATH"; then
9729  echo "$as_me:9729: result: $TBL_PATH" >&5
9730echo "${ECHO_T}$TBL_PATH" >&6
9731else
9732  echo "$as_me:9732: result: no" >&5
9733echo "${ECHO_T}no" >&6
9734fi
9735
9736if test "x$GROFF_PATH" = xno
9737then
9738	NROFF_NOTE=
9739	GROFF_NOTE="#"
9740else
9741	NROFF_NOTE="#"
9742	GROFF_NOTE=
9743fi
9744
9745case "x${with_man2html}" in
9746(xno)
9747	cf_man2html=no
9748	;;
9749(x|xyes)
9750	# Extract the first word of "man2html", so it can be a program name with args.
9751set dummy man2html; ac_word=$2
9752echo "$as_me:9752: checking for $ac_word" >&5
9753echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9754if test "${ac_cv_path_cf_man2html+set}" = set; then
9755  echo $ECHO_N "(cached) $ECHO_C" >&6
9756else
9757  case $cf_man2html in
9758  [\\/]* | ?:[\\/]*)
9759  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
9760  ;;
9761  *)
9762  ac_save_IFS=$IFS; IFS=$ac_path_separator
9763ac_dummy="$PATH"
9764for ac_dir in $ac_dummy; do
9765  IFS=$ac_save_IFS
9766  test -z "$ac_dir" && ac_dir=.
9767  if $as_executable_p "$ac_dir/$ac_word"; then
9768   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
9769   echo "$as_me:9769: found $ac_dir/$ac_word" >&5
9770   break
9771fi
9772done
9773
9774  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
9775  ;;
9776esac
9777fi
9778cf_man2html=$ac_cv_path_cf_man2html
9779
9780if test -n "$cf_man2html"; then
9781  echo "$as_me:9781: result: $cf_man2html" >&5
9782echo "${ECHO_T}$cf_man2html" >&6
9783else
9784  echo "$as_me:9784: result: no" >&5
9785echo "${ECHO_T}no" >&6
9786fi
9787
9788	case "x$cf_man2html" in
9789	(x/*)
9790		echo "$as_me:9790: checking for the modified Earl Hood script" >&5
9791echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
9792		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
9793		then
9794			cf_man2html_ok=yes
9795		else
9796			cf_man2html=no
9797			cf_man2html_ok=no
9798		fi
9799		echo "$as_me:9799: result: $cf_man2html_ok" >&5
9800echo "${ECHO_T}$cf_man2html_ok" >&6
9801		;;
9802	(*)
9803		cf_man2html=no
9804		;;
9805	esac
9806esac
9807
9808echo "$as_me:9808: checking for program to convert manpage to html" >&5
9809echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
9810
9811# Check whether --with-man2html or --without-man2html was given.
9812if test "${with_man2html+set}" = set; then
9813  withval="$with_man2html"
9814  cf_man2html=$withval
9815else
9816  cf_man2html=$cf_man2html
9817fi;
9818
9819cf_with_groff=no
9820
9821case $cf_man2html in
9822(yes)
9823	echo "$as_me:9823: result: man2html" >&5
9824echo "${ECHO_T}man2html" >&6
9825	# Extract the first word of "man2html", so it can be a program name with args.
9826set dummy man2html; ac_word=$2
9827echo "$as_me:9827: checking for $ac_word" >&5
9828echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9829if test "${ac_cv_path_cf_man2html+set}" = set; then
9830  echo $ECHO_N "(cached) $ECHO_C" >&6
9831else
9832  case $cf_man2html in
9833  [\\/]* | ?:[\\/]*)
9834  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
9835  ;;
9836  *)
9837  ac_save_IFS=$IFS; IFS=$ac_path_separator
9838ac_dummy="$PATH"
9839for ac_dir in $ac_dummy; do
9840  IFS=$ac_save_IFS
9841  test -z "$ac_dir" && ac_dir=.
9842  if $as_executable_p "$ac_dir/$ac_word"; then
9843   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
9844   echo "$as_me:9844: found $ac_dir/$ac_word" >&5
9845   break
9846fi
9847done
9848
9849  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
9850  ;;
9851esac
9852fi
9853cf_man2html=$ac_cv_path_cf_man2html
9854
9855if test -n "$cf_man2html"; then
9856  echo "$as_me:9856: result: $cf_man2html" >&5
9857echo "${ECHO_T}$cf_man2html" >&6
9858else
9859  echo "$as_me:9859: result: no" >&5
9860echo "${ECHO_T}no" >&6
9861fi
9862
9863	;;
9864(no|groff|*/groff*)
9865	cf_with_groff=yes
9866	cf_man2html=$GROFF_PATH
9867	echo "$as_me:9867: result: $cf_man2html" >&5
9868echo "${ECHO_T}$cf_man2html" >&6
9869	;;
9870(*)
9871	echo "$as_me:9871: result: $cf_man2html" >&5
9872echo "${ECHO_T}$cf_man2html" >&6
9873	;;
9874esac
9875
9876MAN2HTML_TEMP="man2html.tmp"
9877	cat >$MAN2HTML_TEMP <<CF_EOF
9878#!$SHELL
9879# Temporary script generated by CF_WITH_MAN2HTML
9880# Convert inputs to html, sending result to standard output.
9881#
9882# Parameters:
9883# \${1} = rootname of file to convert
9884# \${2} = suffix of file to convert, e.g., "1"
9885# \${3} = macros to use, e.g., "man"
9886#
9887ROOT=\$1
9888TYPE=\$2
9889MACS=\$3
9890
9891unset LANG
9892unset LC_ALL
9893unset LC_CTYPE
9894unset LANGUAGE
9895GROFF_NO_SGR=stupid
9896export GROFF_NO_SGR
9897
9898CF_EOF
9899
9900NROFF_OPTS=
9901if test "x$cf_with_groff" = xyes
9902then
9903	MAN2HTML_NOTE="$GROFF_NOTE"
9904	MAN2HTML_PATH="$GROFF_PATH"
9905	cat >>$MAN2HTML_TEMP <<CF_EOF
9906$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
9907CF_EOF
9908else
9909	# disable hyphenation if this is groff
9910	if test "x$GROFF_PATH" != xno
9911	then
9912		echo "$as_me:9912: checking if nroff is really groff" >&5
9913echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
9914		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
9915		test -n "$cf_check_groff" && cf_check_groff=yes
9916		test -n "$cf_check_groff" || cf_check_groff=no
9917		echo "$as_me:9917: result: $cf_check_groff" >&5
9918echo "${ECHO_T}$cf_check_groff" >&6
9919		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
9920	fi
9921	MAN2HTML_NOTE=""
9922
9923if test "x$prefix" != xNONE; then
9924	cf_path_syntax="$prefix"
9925else
9926	cf_path_syntax="$ac_default_prefix"
9927fi
9928
9929case ".$cf_man2html" in
9930(.\$\(*\)*|.\'*\'*)
9931	;;
9932(..|./*|.\\*)
9933	;;
9934(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9935	;;
9936(.\$\{*prefix\}*|.\$\{*dir\}*)
9937	eval cf_man2html="$cf_man2html"
9938	case ".$cf_man2html" in
9939	(.NONE/*)
9940		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
9941		;;
9942	esac
9943	;;
9944(.no|.NONE/*)
9945	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
9946	;;
9947(*)
9948	{ { echo "$as_me:9948: error: expected a pathname, not \"$cf_man2html\"" >&5
9949echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
9950   { (exit 1); exit 1; }; }
9951	;;
9952esac
9953
9954	MAN2HTML_PATH="$cf_man2html"
9955	echo "$as_me:9955: checking for $cf_man2html top/bottom margins" >&5
9956echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
9957
9958	# for this example, expect 3 lines of content, the remainder is head/foot
9959	cat >conftest.in <<CF_EOF
9960.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
9961.SH SECTION
9962MARKER
9963CF_EOF
9964
9965	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
9966
9967	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
9968	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
9969	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
9970	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
9971	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
9972
9973	echo "$as_me:9973: result: $cf_man2html_top_bot" >&5
9974echo "${ECHO_T}$cf_man2html_top_bot" >&6
9975
9976	echo "$as_me:9976: checking for pagesize to use" >&5
9977echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
9978	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
9979	do
9980	cat >>conftest.in <<CF_EOF
9981.nf
99820
99831
99842
99853
99864
99875
99886
99897
99908
99919
9992CF_EOF
9993	done
9994
9995	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
9996	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
9997	test -z "$cf_man2html_page" && cf_man2html_page=99999
9998	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
9999
10000	rm -rf conftest*
10001	echo "$as_me:10001: result: $cf_man2html_page" >&5
10002echo "${ECHO_T}$cf_man2html_page" >&6
10003
10004	cat >>$MAN2HTML_TEMP <<CF_EOF
10005: \${MAN2HTML_PATH=$MAN2HTML_PATH}
10006MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
10007case \${TYPE} in
10008(ms)
10009	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
10010	;;
10011(*)
10012	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
10013	;;
10014esac
10015CF_EOF
10016fi
10017
10018chmod 700 $MAN2HTML_TEMP
10019
10020echo "$as_me:10020: checking if you want to use dmalloc for testing" >&5
10021echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10022
10023# Check whether --with-dmalloc or --without-dmalloc was given.
10024if test "${with_dmalloc+set}" = set; then
10025  withval="$with_dmalloc"
10026
10027cat >>confdefs.h <<EOF
10028#define USE_DMALLOC 1
10029EOF
10030
10031	: "${with_cflags:=-g}"
10032	: "${enable_leaks:=no}"
10033	 with_dmalloc=yes
10034else
10035  with_dmalloc=
10036fi;
10037echo "$as_me:10037: result: ${with_dmalloc:-no}" >&5
10038echo "${ECHO_T}${with_dmalloc:-no}" >&6
10039
10040case ".$with_cflags" in
10041(.*-g*)
10042	case .$CFLAGS in
10043	(.*-g*)
10044		;;
10045	(*)
10046
10047cf_fix_cppflags=no
10048cf_new_cflags=
10049cf_new_cppflags=
10050cf_new_extra_cppflags=
10051
10052for cf_add_cflags in -g
10053do
10054case "$cf_fix_cppflags" in
10055(no)
10056	case "$cf_add_cflags" in
10057	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10058		case "$cf_add_cflags" in
10059		(-D*)
10060			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10061
10062			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10063				&& test -z "${cf_tst_cflags}" \
10064				&& cf_fix_cppflags=yes
10065
10066			if test "$cf_fix_cppflags" = yes ; then
10067
10068	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10069	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10070
10071				continue
10072			elif test "${cf_tst_cflags}" = "\"'" ; then
10073
10074	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10075	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10076
10077				continue
10078			fi
10079			;;
10080		esac
10081		case "$CPPFLAGS" in
10082		(*$cf_add_cflags)
10083			;;
10084		(*)
10085			case "$cf_add_cflags" in
10086			(-D*)
10087				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10088
10089CPPFLAGS=`echo "$CPPFLAGS" | \
10090	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10091		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10092
10093				;;
10094			esac
10095
10096	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10097	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10098
10099			;;
10100		esac
10101		;;
10102	(*)
10103
10104	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10105	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10106
10107		;;
10108	esac
10109	;;
10110(yes)
10111
10112	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10113	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10114
10115	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10116
10117	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10118		&& test -z "${cf_tst_cflags}" \
10119		&& cf_fix_cppflags=no
10120	;;
10121esac
10122done
10123
10124if test -n "$cf_new_cflags" ; then
10125
10126	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10127	CFLAGS="${CFLAGS}$cf_new_cflags"
10128
10129fi
10130
10131if test -n "$cf_new_cppflags" ; then
10132
10133	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10134	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10135
10136fi
10137
10138if test -n "$cf_new_extra_cppflags" ; then
10139
10140	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10141	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10142
10143fi
10144
10145		;;
10146	esac
10147	;;
10148esac
10149
10150if test "$with_dmalloc" = yes ; then
10151	echo "$as_me:10151: checking for dmalloc.h" >&5
10152echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10153if test "${ac_cv_header_dmalloc_h+set}" = set; then
10154  echo $ECHO_N "(cached) $ECHO_C" >&6
10155else
10156  cat >"conftest.$ac_ext" <<_ACEOF
10157#line 10157 "configure"
10158#include "confdefs.h"
10159#include <dmalloc.h>
10160_ACEOF
10161if { (eval echo "$as_me:10161: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10162  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10163  ac_status=$?
10164  $EGREP -v '^ *\+' conftest.er1 >conftest.err
10165  rm -f conftest.er1
10166  cat conftest.err >&5
10167  echo "$as_me:10167: \$? = $ac_status" >&5
10168  (exit "$ac_status"); } >/dev/null; then
10169  if test -s conftest.err; then
10170    ac_cpp_err=$ac_c_preproc_warn_flag
10171  else
10172    ac_cpp_err=
10173  fi
10174else
10175  ac_cpp_err=yes
10176fi
10177if test -z "$ac_cpp_err"; then
10178  ac_cv_header_dmalloc_h=yes
10179else
10180  echo "$as_me: failed program was:" >&5
10181  cat "conftest.$ac_ext" >&5
10182  ac_cv_header_dmalloc_h=no
10183fi
10184rm -f conftest.err "conftest.$ac_ext"
10185fi
10186echo "$as_me:10186: result: $ac_cv_header_dmalloc_h" >&5
10187echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10188if test "$ac_cv_header_dmalloc_h" = yes; then
10189
10190echo "$as_me:10190: checking for dmalloc_debug in -ldmalloc" >&5
10191echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10192if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10193  echo $ECHO_N "(cached) $ECHO_C" >&6
10194else
10195  ac_check_lib_save_LIBS=$LIBS
10196LIBS="-ldmalloc  $LIBS"
10197cat >"conftest.$ac_ext" <<_ACEOF
10198#line 10198 "configure"
10199#include "confdefs.h"
10200
10201/* Override any gcc2 internal prototype to avoid an error.  */
10202#ifdef __cplusplus
10203extern "C"
10204#endif
10205/* We use char because int might match the return type of a gcc2
10206   builtin and then its argument prototype would still apply.  */
10207char dmalloc_debug ();
10208int
10209main (void)
10210{
10211dmalloc_debug ();
10212  ;
10213  return 0;
10214}
10215_ACEOF
10216rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10217if { (eval echo "$as_me:10217: \"$ac_link\"") >&5
10218  (eval $ac_link) 2>&5
10219  ac_status=$?
10220  echo "$as_me:10220: \$? = $ac_status" >&5
10221  (exit "$ac_status"); } &&
10222         { ac_try='test -s "conftest$ac_exeext"'
10223  { (eval echo "$as_me:10223: \"$ac_try\"") >&5
10224  (eval $ac_try) 2>&5
10225  ac_status=$?
10226  echo "$as_me:10226: \$? = $ac_status" >&5
10227  (exit "$ac_status"); }; }; then
10228  ac_cv_lib_dmalloc_dmalloc_debug=yes
10229else
10230  echo "$as_me: failed program was:" >&5
10231cat "conftest.$ac_ext" >&5
10232ac_cv_lib_dmalloc_dmalloc_debug=no
10233fi
10234rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10235LIBS=$ac_check_lib_save_LIBS
10236fi
10237echo "$as_me:10237: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10238echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10239if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
10240  cat >>confdefs.h <<EOF
10241#define HAVE_LIBDMALLOC 1
10242EOF
10243
10244  LIBS="-ldmalloc $LIBS"
10245
10246fi
10247
10248fi
10249
10250fi
10251
10252echo "$as_me:10252: checking if you want to use dbmalloc for testing" >&5
10253echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10254
10255# Check whether --with-dbmalloc or --without-dbmalloc was given.
10256if test "${with_dbmalloc+set}" = set; then
10257  withval="$with_dbmalloc"
10258
10259cat >>confdefs.h <<EOF
10260#define USE_DBMALLOC 1
10261EOF
10262
10263	: "${with_cflags:=-g}"
10264	: "${enable_leaks:=no}"
10265	 with_dbmalloc=yes
10266else
10267  with_dbmalloc=
10268fi;
10269echo "$as_me:10269: result: ${with_dbmalloc:-no}" >&5
10270echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10271
10272case ".$with_cflags" in
10273(.*-g*)
10274	case .$CFLAGS in
10275	(.*-g*)
10276		;;
10277	(*)
10278
10279cf_fix_cppflags=no
10280cf_new_cflags=
10281cf_new_cppflags=
10282cf_new_extra_cppflags=
10283
10284for cf_add_cflags in -g
10285do
10286case "$cf_fix_cppflags" in
10287(no)
10288	case "$cf_add_cflags" in
10289	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10290		case "$cf_add_cflags" in
10291		(-D*)
10292			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10293
10294			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10295				&& test -z "${cf_tst_cflags}" \
10296				&& cf_fix_cppflags=yes
10297
10298			if test "$cf_fix_cppflags" = yes ; then
10299
10300	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10301	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10302
10303				continue
10304			elif test "${cf_tst_cflags}" = "\"'" ; then
10305
10306	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10307	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10308
10309				continue
10310			fi
10311			;;
10312		esac
10313		case "$CPPFLAGS" in
10314		(*$cf_add_cflags)
10315			;;
10316		(*)
10317			case "$cf_add_cflags" in
10318			(-D*)
10319				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10320
10321CPPFLAGS=`echo "$CPPFLAGS" | \
10322	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10323		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10324
10325				;;
10326			esac
10327
10328	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10329	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10330
10331			;;
10332		esac
10333		;;
10334	(*)
10335
10336	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10337	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10338
10339		;;
10340	esac
10341	;;
10342(yes)
10343
10344	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10345	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10346
10347	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10348
10349	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10350		&& test -z "${cf_tst_cflags}" \
10351		&& cf_fix_cppflags=no
10352	;;
10353esac
10354done
10355
10356if test -n "$cf_new_cflags" ; then
10357
10358	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10359	CFLAGS="${CFLAGS}$cf_new_cflags"
10360
10361fi
10362
10363if test -n "$cf_new_cppflags" ; then
10364
10365	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10366	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10367
10368fi
10369
10370if test -n "$cf_new_extra_cppflags" ; then
10371
10372	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10373	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10374
10375fi
10376
10377		;;
10378	esac
10379	;;
10380esac
10381
10382if test "$with_dbmalloc" = yes ; then
10383	echo "$as_me:10383: checking for dbmalloc.h" >&5
10384echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10385if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10386  echo $ECHO_N "(cached) $ECHO_C" >&6
10387else
10388  cat >"conftest.$ac_ext" <<_ACEOF
10389#line 10389 "configure"
10390#include "confdefs.h"
10391#include <dbmalloc.h>
10392_ACEOF
10393if { (eval echo "$as_me:10393: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10394  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10395  ac_status=$?
10396  $EGREP -v '^ *\+' conftest.er1 >conftest.err
10397  rm -f conftest.er1
10398  cat conftest.err >&5
10399  echo "$as_me:10399: \$? = $ac_status" >&5
10400  (exit "$ac_status"); } >/dev/null; then
10401  if test -s conftest.err; then
10402    ac_cpp_err=$ac_c_preproc_warn_flag
10403  else
10404    ac_cpp_err=
10405  fi
10406else
10407  ac_cpp_err=yes
10408fi
10409if test -z "$ac_cpp_err"; then
10410  ac_cv_header_dbmalloc_h=yes
10411else
10412  echo "$as_me: failed program was:" >&5
10413  cat "conftest.$ac_ext" >&5
10414  ac_cv_header_dbmalloc_h=no
10415fi
10416rm -f conftest.err "conftest.$ac_ext"
10417fi
10418echo "$as_me:10418: result: $ac_cv_header_dbmalloc_h" >&5
10419echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10420if test "$ac_cv_header_dbmalloc_h" = yes; then
10421
10422echo "$as_me:10422: checking for debug_malloc in -ldbmalloc" >&5
10423echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10424if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10425  echo $ECHO_N "(cached) $ECHO_C" >&6
10426else
10427  ac_check_lib_save_LIBS=$LIBS
10428LIBS="-ldbmalloc  $LIBS"
10429cat >"conftest.$ac_ext" <<_ACEOF
10430#line 10430 "configure"
10431#include "confdefs.h"
10432
10433/* Override any gcc2 internal prototype to avoid an error.  */
10434#ifdef __cplusplus
10435extern "C"
10436#endif
10437/* We use char because int might match the return type of a gcc2
10438   builtin and then its argument prototype would still apply.  */
10439char debug_malloc ();
10440int
10441main (void)
10442{
10443debug_malloc ();
10444  ;
10445  return 0;
10446}
10447_ACEOF
10448rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10449if { (eval echo "$as_me:10449: \"$ac_link\"") >&5
10450  (eval $ac_link) 2>&5
10451  ac_status=$?
10452  echo "$as_me:10452: \$? = $ac_status" >&5
10453  (exit "$ac_status"); } &&
10454         { ac_try='test -s "conftest$ac_exeext"'
10455  { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456  (eval $ac_try) 2>&5
10457  ac_status=$?
10458  echo "$as_me:10458: \$? = $ac_status" >&5
10459  (exit "$ac_status"); }; }; then
10460  ac_cv_lib_dbmalloc_debug_malloc=yes
10461else
10462  echo "$as_me: failed program was:" >&5
10463cat "conftest.$ac_ext" >&5
10464ac_cv_lib_dbmalloc_debug_malloc=no
10465fi
10466rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10467LIBS=$ac_check_lib_save_LIBS
10468fi
10469echo "$as_me:10469: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10470echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10471if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
10472  cat >>confdefs.h <<EOF
10473#define HAVE_LIBDBMALLOC 1
10474EOF
10475
10476  LIBS="-ldbmalloc $LIBS"
10477
10478fi
10479
10480fi
10481
10482fi
10483
10484echo "$as_me:10484: checking if you want to use valgrind for testing" >&5
10485echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10486
10487# Check whether --with-valgrind or --without-valgrind was given.
10488if test "${with_valgrind+set}" = set; then
10489  withval="$with_valgrind"
10490
10491cat >>confdefs.h <<EOF
10492#define USE_VALGRIND 1
10493EOF
10494
10495	: "${with_cflags:=-g}"
10496	: "${enable_leaks:=no}"
10497	 with_valgrind=yes
10498else
10499  with_valgrind=
10500fi;
10501echo "$as_me:10501: result: ${with_valgrind:-no}" >&5
10502echo "${ECHO_T}${with_valgrind:-no}" >&6
10503
10504case ".$with_cflags" in
10505(.*-g*)
10506	case .$CFLAGS in
10507	(.*-g*)
10508		;;
10509	(*)
10510
10511cf_fix_cppflags=no
10512cf_new_cflags=
10513cf_new_cppflags=
10514cf_new_extra_cppflags=
10515
10516for cf_add_cflags in -g
10517do
10518case "$cf_fix_cppflags" in
10519(no)
10520	case "$cf_add_cflags" in
10521	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10522		case "$cf_add_cflags" in
10523		(-D*)
10524			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10525
10526			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10527				&& test -z "${cf_tst_cflags}" \
10528				&& cf_fix_cppflags=yes
10529
10530			if test "$cf_fix_cppflags" = yes ; then
10531
10532	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10533	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10534
10535				continue
10536			elif test "${cf_tst_cflags}" = "\"'" ; then
10537
10538	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10539	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10540
10541				continue
10542			fi
10543			;;
10544		esac
10545		case "$CPPFLAGS" in
10546		(*$cf_add_cflags)
10547			;;
10548		(*)
10549			case "$cf_add_cflags" in
10550			(-D*)
10551				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10552
10553CPPFLAGS=`echo "$CPPFLAGS" | \
10554	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10555		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10556
10557				;;
10558			esac
10559
10560	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10561	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10562
10563			;;
10564		esac
10565		;;
10566	(*)
10567
10568	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10569	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10570
10571		;;
10572	esac
10573	;;
10574(yes)
10575
10576	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10577	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10578
10579	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10580
10581	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10582		&& test -z "${cf_tst_cflags}" \
10583		&& cf_fix_cppflags=no
10584	;;
10585esac
10586done
10587
10588if test -n "$cf_new_cflags" ; then
10589
10590	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10591	CFLAGS="${CFLAGS}$cf_new_cflags"
10592
10593fi
10594
10595if test -n "$cf_new_cppflags" ; then
10596
10597	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10598	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10599
10600fi
10601
10602if test -n "$cf_new_extra_cppflags" ; then
10603
10604	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10605	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10606
10607fi
10608
10609		;;
10610	esac
10611	;;
10612esac
10613
10614echo "$as_me:10614: checking if you want to perform memory-leak testing" >&5
10615echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10616
10617# Check whether --enable-leaks or --disable-leaks was given.
10618if test "${enable_leaks+set}" = set; then
10619  enableval="$enable_leaks"
10620  enable_leaks=no
10621else
10622  enable_leaks=yes
10623fi;
10624if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
10625echo "$as_me:10625: result: $with_no_leaks" >&5
10626echo "${ECHO_T}$with_no_leaks" >&6
10627
10628if test "$enable_leaks" = no ; then
10629
10630cat >>confdefs.h <<\EOF
10631#define NO_LEAKS 1
10632EOF
10633
10634cat >>confdefs.h <<\EOF
10635#define YY_NO_LEAKS 1
10636EOF
10637
10638fi
10639
10640echo "$as_me:10640: checking if you want to enable debugging trace" >&5
10641echo $ECHO_N "checking if you want to enable debugging trace... $ECHO_C" >&6
10642
10643# Check whether --enable-trace or --disable-trace was given.
10644if test "${enable_trace+set}" = set; then
10645  enableval="$enable_trace"
10646  test "$enableval" != yes && enableval=no
10647	if test "$enableval" != "no" ; then
10648    with_trace=yes
10649	else
10650		with_trace=no
10651	fi
10652else
10653  enableval=no
10654	with_trace=no
10655
10656fi;
10657echo "$as_me:10657: result: $with_trace" >&5
10658echo "${ECHO_T}$with_trace" >&6
10659if test "$with_trace" = "yes"
10660then
10661
10662cat >>confdefs.h <<\EOF
10663#define OPT_TRACE 1
10664EOF
10665
10666fi
10667
10668if test "$with_trace" != no
10669then
10670	EXTRASRCS="$EXTRASRCS trace.c"
10671	EXTRAOBJS="$EXTRAOBJS trace\$o"
10672fi
10673
10674LD_RPATH_OPT=
10675if test "x$cf_cv_enable_rpath" != xno
10676then
10677	echo "$as_me:10677: checking for an rpath option" >&5
10678echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10679	case "$cf_cv_system_name" in
10680	(irix*)
10681		if test "$GCC" = yes; then
10682			LD_RPATH_OPT="-Wl,-rpath,"
10683		else
10684			LD_RPATH_OPT="-rpath "
10685		fi
10686		;;
10687	(linux*|gnu*|k*bsd*-gnu|freebsd*)
10688		LD_RPATH_OPT="-Wl,-rpath,"
10689		;;
10690	(openbsd[2-9].*|mirbsd*)
10691		LD_RPATH_OPT="-Wl,-rpath,"
10692		;;
10693	(dragonfly*)
10694		LD_RPATH_OPT="-rpath "
10695		;;
10696	(netbsd*)
10697		LD_RPATH_OPT="-Wl,-rpath,"
10698		;;
10699	(osf*|mls+*)
10700		LD_RPATH_OPT="-rpath "
10701		;;
10702	(solaris2*)
10703		LD_RPATH_OPT="-R"
10704		;;
10705	(*)
10706		;;
10707	esac
10708	echo "$as_me:10708: result: $LD_RPATH_OPT" >&5
10709echo "${ECHO_T}$LD_RPATH_OPT" >&6
10710
10711	case "x$LD_RPATH_OPT" in
10712	(x-R*)
10713		echo "$as_me:10713: checking if we need a space after rpath option" >&5
10714echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10715		cf_save_LIBS="$LIBS"
10716
10717cf_add_libs="$LIBS"
10718# reverse order
10719cf_add_0lib=
10720for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10721# filter duplicates
10722for cf_add_1lib in $cf_add_0lib; do
10723	for cf_add_2lib in $cf_add_libs; do
10724		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10725			cf_add_1lib=
10726			break
10727		fi
10728	done
10729	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10730done
10731LIBS="$cf_add_libs"
10732
10733		cat >"conftest.$ac_ext" <<_ACEOF
10734#line 10734 "configure"
10735#include "confdefs.h"
10736
10737int
10738main (void)
10739{
10740
10741  ;
10742  return 0;
10743}
10744_ACEOF
10745rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10746if { (eval echo "$as_me:10746: \"$ac_link\"") >&5
10747  (eval $ac_link) 2>&5
10748  ac_status=$?
10749  echo "$as_me:10749: \$? = $ac_status" >&5
10750  (exit "$ac_status"); } &&
10751         { ac_try='test -s "conftest$ac_exeext"'
10752  { (eval echo "$as_me:10752: \"$ac_try\"") >&5
10753  (eval $ac_try) 2>&5
10754  ac_status=$?
10755  echo "$as_me:10755: \$? = $ac_status" >&5
10756  (exit "$ac_status"); }; }; then
10757  cf_rpath_space=no
10758else
10759  echo "$as_me: failed program was:" >&5
10760cat "conftest.$ac_ext" >&5
10761cf_rpath_space=yes
10762fi
10763rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10764		LIBS="$cf_save_LIBS"
10765		echo "$as_me:10765: result: $cf_rpath_space" >&5
10766echo "${ECHO_T}$cf_rpath_space" >&6
10767		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10768		;;
10769	esac
10770fi
10771
10772echo "$as_me:10772: checking if rpath-hack should be disabled" >&5
10773echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
10774
10775# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
10776if test "${enable_rpath_hack+set}" = set; then
10777  enableval="$enable_rpath_hack"
10778  test "$enableval" != no && enableval=yes
10779	if test "$enableval" != "yes" ; then
10780    enable_rpath_hack=no
10781	else
10782		enable_rpath_hack=yes
10783	fi
10784else
10785  enableval=yes
10786	enable_rpath_hack=yes
10787
10788fi;
10789if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
10790echo "$as_me:10790: result: $cf_disable_rpath_hack" >&5
10791echo "${ECHO_T}$cf_disable_rpath_hack" >&6
10792
10793if test "$enable_rpath_hack" = yes ; then
10794
10795echo "$as_me:10795: checking for updated LDFLAGS" >&5
10796echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
10797if test -n "$LD_RPATH_OPT" ; then
10798	echo "$as_me:10798: result: maybe" >&5
10799echo "${ECHO_T}maybe" >&6
10800
10801	for ac_prog in ldd
10802do
10803  # Extract the first word of "$ac_prog", so it can be a program name with args.
10804set dummy $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_cf_ldd_prog+set}" = set; then
10808  echo $ECHO_N "(cached) $ECHO_C" >&6
10809else
10810  if test -n "$cf_ldd_prog"; then
10811  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # 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_cf_ldd_prog="$ac_prog"
10820echo "$as_me:10820: found $ac_dir/$ac_word" >&5
10821break
10822done
10823
10824fi
10825fi
10826cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
10827if test -n "$cf_ldd_prog"; then
10828  echo "$as_me:10828: result: $cf_ldd_prog" >&5
10829echo "${ECHO_T}$cf_ldd_prog" >&6
10830else
10831  echo "$as_me:10831: result: no" >&5
10832echo "${ECHO_T}no" >&6
10833fi
10834
10835  test -n "$cf_ldd_prog" && break
10836done
10837test -n "$cf_ldd_prog" || cf_ldd_prog="no"
10838
10839	cf_rpath_list="/usr/lib /lib"
10840	if test "$cf_ldd_prog" != no
10841	then
10842		cf_rpath_oops=
10843
10844cat >"conftest.$ac_ext" <<_ACEOF
10845#line 10845 "configure"
10846#include "confdefs.h"
10847#include <stdio.h>
10848int
10849main (void)
10850{
10851printf("Hello");
10852  ;
10853  return 0;
10854}
10855_ACEOF
10856rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10857if { (eval echo "$as_me:10857: \"$ac_link\"") >&5
10858  (eval $ac_link) 2>&5
10859  ac_status=$?
10860  echo "$as_me:10860: \$? = $ac_status" >&5
10861  (exit "$ac_status"); } &&
10862         { ac_try='test -s "conftest$ac_exeext"'
10863  { (eval echo "$as_me:10863: \"$ac_try\"") >&5
10864  (eval $ac_try) 2>&5
10865  ac_status=$?
10866  echo "$as_me:10866: \$? = $ac_status" >&5
10867  (exit "$ac_status"); }; }; then
10868  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
10869		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
10870else
10871  echo "$as_me: failed program was:" >&5
10872cat "conftest.$ac_ext" >&5
10873fi
10874rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10875
10876		# If we passed the link-test, but get a "not found" on a given library,
10877		# this could be due to inept reconfiguration of gcc to make it only
10878		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
10879		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
10880		# /usr/local libraries.
10881		if test -n "$cf_rpath_oops"
10882		then
10883			for cf_rpath_src in $cf_rpath_oops
10884			do
10885				for cf_rpath_dir in \
10886					/usr/local \
10887					/usr/pkg \
10888					/opt/sfw
10889				do
10890					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
10891					then
10892						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
10893
10894echo "${as_me:-configure}:10894: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
10895
10896						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
10897						break
10898					fi
10899				done
10900			done
10901		fi
10902	fi
10903
10904	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
10905
10906echo "${as_me:-configure}:10906: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
10907
10908test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
10909
10910echo "${as_me:-configure}:10910: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
10911
10912cf_rpath_dst=
10913for cf_rpath_src in $LDFLAGS
10914do
10915	case "$cf_rpath_src" in
10916	(-L*)
10917
10918		# check if this refers to a directory which we will ignore
10919		cf_rpath_skip=no
10920		if test -n "$cf_rpath_list"
10921		then
10922			for cf_rpath_item in $cf_rpath_list
10923			do
10924				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
10925				then
10926					cf_rpath_skip=yes
10927					break
10928				fi
10929			done
10930		fi
10931
10932		if test "$cf_rpath_skip" = no
10933		then
10934			# transform the option
10935			if test "$LD_RPATH_OPT" = "-R " ; then
10936				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
10937			else
10938				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
10939			fi
10940
10941			# if we have not already added this, add it now
10942			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
10943			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
10944			then
10945				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
10946
10947echo "${as_me:-configure}:10947: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
10948
10949				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
10950			fi
10951		fi
10952		;;
10953	esac
10954	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
10955done
10956LDFLAGS=$cf_rpath_dst
10957
10958test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
10959
10960echo "${as_me:-configure}:10960: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
10961
10962test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
10963
10964echo "${as_me:-configure}:10964: testing ...checking LIBS $LIBS ..." 1>&5
10965
10966cf_rpath_dst=
10967for cf_rpath_src in $LIBS
10968do
10969	case "$cf_rpath_src" in
10970	(-L*)
10971
10972		# check if this refers to a directory which we will ignore
10973		cf_rpath_skip=no
10974		if test -n "$cf_rpath_list"
10975		then
10976			for cf_rpath_item in $cf_rpath_list
10977			do
10978				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
10979				then
10980					cf_rpath_skip=yes
10981					break
10982				fi
10983			done
10984		fi
10985
10986		if test "$cf_rpath_skip" = no
10987		then
10988			# transform the option
10989			if test "$LD_RPATH_OPT" = "-R " ; then
10990				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
10991			else
10992				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
10993			fi
10994
10995			# if we have not already added this, add it now
10996			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
10997			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
10998			then
10999				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
11000
11001echo "${as_me:-configure}:11001: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
11002
11003				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
11004			fi
11005		fi
11006		;;
11007	esac
11008	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
11009done
11010LIBS=$cf_rpath_dst
11011
11012test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
11013
11014echo "${as_me:-configure}:11014: testing ...checked LIBS $LIBS ..." 1>&5
11015
11016	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
11017
11018echo "${as_me:-configure}:11018: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
11019
11020else
11021	echo "$as_me:11021: result: no" >&5
11022echo "${ECHO_T}no" >&6
11023fi
11024
11025fi
11026
11027ac_config_files="$ac_config_files Makefile"
11028ac_config_commands="$ac_config_commands default"
11029cat >confcache <<\_ACEOF
11030# This file is a shell script that caches the results of configure
11031# tests run on this system so they can be shared between configure
11032# scripts and configure runs, see configure's option --config-cache.
11033# It is not useful on other systems.  If it contains results you don't
11034# want to keep, you may remove or edit it.
11035#
11036# config.status only pays attention to the cache file if you give it
11037# the --recheck option to rerun configure.
11038#
11039# `ac_cv_env_foo' variables (set or unset) will be overriden when
11040# loading this file, other *unset* `ac_cv_foo' will be assigned the
11041# following values.
11042
11043_ACEOF
11044
11045# The following way of writing the cache mishandles newlines in values,
11046# but we know of no workaround that is simple, portable, and efficient.
11047# So, don't put newlines in cache variables' values.
11048# Ultrix sh set writes to stderr and can't be redirected directly,
11049# and sets the high bit in the cache file unless we assign to the vars.
11050{
11051  (set) 2>&1 |
11052    case `(ac_space=' '; set | grep ac_space) 2>&1` in
11053    *ac_space=\ *)
11054      # `set' does not quote correctly, so add quotes (double-quote
11055      # substitution turns \\\\ into \\, and sed turns \\ into \).
11056      sed -n \
11057        "s/'/'\\\\''/g;
11058    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11059      ;;
11060    *)
11061      # `set' quotes correctly as required by POSIX, so do not add quotes.
11062      sed -n \
11063        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11064      ;;
11065    esac;
11066} |
11067  sed '
11068     t clear
11069     : clear
11070     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11071     t end
11072     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11073     : end' >>confcache
11074if cmp -s $cache_file confcache; then :; else
11075  if test -w $cache_file; then
11076    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11077    cat confcache >$cache_file
11078  else
11079    echo "not updating unwritable cache $cache_file"
11080  fi
11081fi
11082rm -f confcache
11083
11084test "x$prefix" = xNONE && prefix=$ac_default_prefix
11085# Let make expand exec_prefix.
11086test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11087
11088# VPATH may cause trouble with some makes, so we remove $(srcdir),
11089# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11090# trailing colons and then remove the whole line if VPATH becomes empty
11091# (actually we leave an empty line to preserve line numbers).
11092if test "x$srcdir" = x.; then
11093  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
11094s/:*\$(srcdir):*/:/;
11095s/:*\${srcdir}:*/:/;
11096s/:*@srcdir@:*/:/;
11097s/^\([^=]*=[ 	]*\):*/\1/;
11098s/:*$//;
11099s/^[^=]*=[ 	]*$//;
11100}'
11101fi
11102
11103DEFS=-DHAVE_CONFIG_H
11104
11105: "${CONFIG_STATUS=./config.status}"
11106ac_clean_files_save=$ac_clean_files
11107ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11108{ echo "$as_me:11108: creating $CONFIG_STATUS" >&5
11109echo "$as_me: creating $CONFIG_STATUS" >&6;}
11110cat >"$CONFIG_STATUS" <<_ACEOF
11111#! $SHELL
11112# Generated automatically by configure.
11113# Run this file to recreate the current configuration.
11114# Compiler output produced by configure, useful for debugging
11115# configure, is in config.log if it exists.
11116
11117debug=false
11118SHELL=\${CONFIG_SHELL-$SHELL}
11119ac_cs_invocation="\$0 \$@"
11120
11121CLICOLOR_FORCE= GREP_OPTIONS=
11122unset CLICOLOR_FORCE GREP_OPTIONS
11123_ACEOF
11124
11125cat >>"$CONFIG_STATUS" <<\_ACEOF
11126# Be Bourne compatible
11127if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11128  emulate sh
11129  NULLCMD=:
11130elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11131  set -o posix
11132fi
11133
11134# Name of the executable.
11135as_me=`echo "$0" |sed 's,.*[\\/],,'`
11136
11137if expr a : '\(a\)' >/dev/null 2>&1; then
11138  as_expr=expr
11139else
11140  as_expr=false
11141fi
11142
11143rm -f conf$$ conf$$.exe conf$$.file
11144echo >conf$$.file
11145if ln -s conf$$.file conf$$ 2>/dev/null; then
11146  # We could just check for DJGPP; but this test a) works b) is more generic
11147  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11148  if test -f conf$$.exe; then
11149    # Don't use ln at all; we don't have any links
11150    as_ln_s='cp -p'
11151  else
11152    as_ln_s='ln -s'
11153  fi
11154elif ln conf$$.file conf$$ 2>/dev/null; then
11155  as_ln_s=ln
11156else
11157  as_ln_s='cp -p'
11158fi
11159rm -f conf$$ conf$$.exe conf$$.file
11160
11161as_executable_p="test -f"
11162
11163# Support unset when possible.
11164if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11165  as_unset="unset"
11166else
11167  as_unset="false"
11168fi
11169
11170# NLS nuisances.
11171$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11172$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11173$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11174$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11175$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11176$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11177$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11178$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11179
11180# IFS
11181# We need space, tab and new line, in precisely that order.
11182as_nl='
11183'
11184IFS=" 	$as_nl"
11185
11186# CDPATH.
11187$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11188
11189exec 6>&1
11190
11191_ACEOF
11192
11193# Files that config.status was made for.
11194if test -n "$ac_config_files"; then
11195  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
11196fi
11197
11198if test -n "$ac_config_headers"; then
11199  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
11200fi
11201
11202if test -n "$ac_config_links"; then
11203  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
11204fi
11205
11206if test -n "$ac_config_commands"; then
11207  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
11208fi
11209
11210cat >>"$CONFIG_STATUS" <<\EOF
11211
11212ac_cs_usage="\
11213\`$as_me' instantiates files from templates according to the
11214current configuration.
11215
11216Usage: $0 [OPTIONS] [FILE]...
11217
11218  -h, --help       print this help, then exit
11219  -V, --version    print version number, then exit
11220  -d, --debug      don't remove temporary files
11221      --recheck    update $as_me by reconfiguring in the same conditions
11222  --file=FILE[:TEMPLATE]
11223                   instantiate the configuration file FILE
11224  --header=FILE[:TEMPLATE]
11225                   instantiate the configuration header FILE
11226
11227Configuration files:
11228$config_files
11229
11230Configuration headers:
11231$config_headers
11232
11233Configuration commands:
11234$config_commands
11235
11236Report bugs to <dickey@invisible-island.net>."
11237EOF
11238
11239cat >>"$CONFIG_STATUS" <<EOF
11240ac_cs_version="\\
11241config.status
11242configured by $0, generated by GNU Autoconf 2.52.20210105,
11243  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11244
11245Copyright 2003-2020,2021	Thomas E. Dickey
11246Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11247Free Software Foundation, Inc.
11248This config.status script is free software; the Free Software Foundation
11249gives unlimited permission to copy, distribute and modify it."
11250srcdir="$srcdir"
11251INSTALL="$INSTALL"
11252EOF
11253
11254cat >>"$CONFIG_STATUS" <<\EOF
11255# If no file are specified by the user, then we need to provide default
11256# value.  By we need to know if files were specified by the user.
11257ac_need_defaults=:
11258while test $# != 0
11259do
11260  case $1 in
11261  --*=*)
11262    ac_option=`expr "x$1" : 'x\([^=]*\)='`
11263    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11264    shift
11265    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11266    shift
11267    ;;
11268  -*);;
11269  *) # This is not an option, so the user has probably given explicit
11270     # arguments.
11271     ac_need_defaults=false;;
11272  esac
11273
11274  case $1 in
11275  # Handling of the options.
11276EOF
11277cat >>"$CONFIG_STATUS" <<EOF
11278  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11279    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11280    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11281EOF
11282cat >>"$CONFIG_STATUS" <<\EOF
11283  --version | --vers* | -V )
11284    echo "$ac_cs_version"; exit 0 ;;
11285  --he | --h)
11286    # Conflict between --help and --header
11287    { { echo "$as_me:11287: error: ambiguous option: $1
11288Try \`$0 --help' for more information." >&5
11289echo "$as_me: error: ambiguous option: $1
11290Try \`$0 --help' for more information." >&2;}
11291   { (exit 1); exit 1; }; };;
11292  --help | --hel | -h )
11293    echo "$ac_cs_usage"; exit 0 ;;
11294  --debug | --d* | -d )
11295    debug=: ;;
11296  --file | --fil | --fi | --f )
11297    shift
11298    CONFIG_FILES="$CONFIG_FILES $1"
11299    ac_need_defaults=false;;
11300  --header | --heade | --head | --hea )
11301    shift
11302    CONFIG_HEADERS="$CONFIG_HEADERS $1"
11303    ac_need_defaults=false;;
11304
11305  # This is an error.
11306  -*) { { echo "$as_me:11306: error: unrecognized option: $1
11307Try \`$0 --help' for more information." >&5
11308echo "$as_me: error: unrecognized option: $1
11309Try \`$0 --help' for more information." >&2;}
11310   { (exit 1); exit 1; }; } ;;
11311
11312  *) ac_config_targets="$ac_config_targets $1" ;;
11313
11314  esac
11315  shift
11316done
11317
11318exec 5>>config.log
11319cat >&5 << _ACEOF
11320
11321## ----------------------- ##
11322## Running config.status.  ##
11323## ----------------------- ##
11324
11325This file was extended by $as_me 2.52.20210105, executed with
11326  CONFIG_FILES    = $CONFIG_FILES
11327  CONFIG_HEADERS  = $CONFIG_HEADERS
11328  CONFIG_LINKS    = $CONFIG_LINKS
11329  CONFIG_COMMANDS = $CONFIG_COMMANDS
11330  > "$ac_cs_invocation"
11331on `(hostname || uname -n) 2>/dev/null | sed 1q`
11332
11333_ACEOF
11334EOF
11335
11336cat >>"$CONFIG_STATUS" <<\EOF
11337for ac_config_target in $ac_config_targets
11338do
11339  case "$ac_config_target" in
11340  # Handling of arguments.
11341  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11342  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11343  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
11344  *) { { echo "$as_me:11344: error: invalid argument: $ac_config_target" >&5
11345echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11346   { (exit 1); exit 1; }; };;
11347  esac
11348done
11349
11350# If the user did not use the arguments to specify the items to instantiate,
11351# then the envvar interface is used.  Set only those that are not.
11352# We use the long form for the default assignment because of an extremely
11353# bizarre bug on SunOS 4.1.3.
11354if "$ac_need_defaults"; then
11355  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11356  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11357  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11358fi
11359
11360# Create a temporary directory, and hook for its removal unless debugging.
11361$debug ||
11362{
11363  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11364  trap '{ (exit 1); exit 1; }' 1 2 13 15
11365}
11366
11367# Create a (secure) tmp directory for tmp files.
11368: ${TMPDIR=/tmp}
11369{
11370  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11371  test -n "$tmp" && test -d "$tmp"
11372}  ||
11373{
11374  tmp=$TMPDIR/cs$$-$RANDOM
11375  (umask 077 && mkdir $tmp)
11376} ||
11377{
11378   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11379   { (exit 1); exit 1; }
11380}
11381
11382EOF
11383
11384cat >>"$CONFIG_STATUS" <<EOF
11385
11386#
11387# CONFIG_FILES section.
11388#
11389
11390# No need to generate the scripts if there are no CONFIG_FILES.
11391# This happens for instance when ./config.status config.h
11392if test -n "\$CONFIG_FILES"; then
11393  # Protect against being on the right side of a sed subst in config.status.
11394  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11395   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11396s,@X_CFLAGS@,$X_CFLAGS,;t t
11397s,@X_LIBS@,$X_LIBS,;t t
11398s,@SHELL@,$SHELL,;t t
11399s,@exec_prefix@,$exec_prefix,;t t
11400s,@prefix@,$prefix,;t t
11401s,@program_transform_name@,$program_transform_name,;t t
11402s,@bindir@,$bindir,;t t
11403s,@sbindir@,$sbindir,;t t
11404s,@libexecdir@,$libexecdir,;t t
11405s,@datarootdir@,$datarootdir,;t t
11406s,@datadir@,$datadir,;t t
11407s,@sysconfdir@,$sysconfdir,;t t
11408s,@sharedstatedir@,$sharedstatedir,;t t
11409s,@localstatedir@,$localstatedir,;t t
11410s,@runstatedir@,$runstatedir,;t t
11411s,@libdir@,$libdir,;t t
11412s,@includedir@,$includedir,;t t
11413s,@oldincludedir@,$oldincludedir,;t t
11414s,@infodir@,$infodir,;t t
11415s,@mandir@,$mandir,;t t
11416s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11417s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11418s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11419s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11420s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11421s,@build_alias@,$build_alias,;t t
11422s,@host_alias@,$host_alias,;t t
11423s,@target_alias@,$target_alias,;t t
11424s,@ECHO_C@,$ECHO_C,;t t
11425s,@ECHO_N@,$ECHO_N,;t t
11426s,@ECHO_T@,$ECHO_T,;t t
11427s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11428s,@DEFS@,$DEFS,;t t
11429s,@LIBS@,$LIBS,;t t
11430s,@build@,$build,;t t
11431s,@build_cpu@,$build_cpu,;t t
11432s,@build_vendor@,$build_vendor,;t t
11433s,@build_os@,$build_os,;t t
11434s,@host@,$host,;t t
11435s,@host_cpu@,$host_cpu,;t t
11436s,@host_vendor@,$host_vendor,;t t
11437s,@host_os@,$host_os,;t t
11438s,@CC@,$CC,;t t
11439s,@CFLAGS@,$CFLAGS,;t t
11440s,@LDFLAGS@,$LDFLAGS,;t t
11441s,@CPPFLAGS@,$CPPFLAGS,;t t
11442s,@ac_ct_CC@,$ac_ct_CC,;t t
11443s,@EXEEXT@,$EXEEXT,;t t
11444s,@OBJEXT@,$OBJEXT,;t t
11445s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11446s,@CPP@,$CPP,;t t
11447s,@GREP@,$GREP,;t t
11448s,@EGREP@,$EGREP,;t t
11449s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11450s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11451s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11452s,@LINT@,$LINT,;t t
11453s,@LINT_OPTS@,$LINT_OPTS,;t t
11454s,@CTAGS@,$CTAGS,;t t
11455s,@ETAGS@,$ETAGS,;t t
11456s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11457s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11458s,@ECHO_LT@,$ECHO_LT,;t t
11459s,@ECHO_LD@,$ECHO_LD,;t t
11460s,@RULE_CC@,$RULE_CC,;t t
11461s,@SHOW_CC@,$SHOW_CC,;t t
11462s,@ECHO_CC@,$ECHO_CC,;t t
11463s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11464s,@FGREP@,$FGREP,;t t
11465s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11466s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
11467s,@LIBICONV@,$LIBICONV,;t t
11468s,@ENCODINGS_DIR_FILE@,$ENCODINGS_DIR_FILE,;t t
11469s,@LOCALE_ALIAS_FILE@,$LOCALE_ALIAS_FILE,;t t
11470s,@GROFF_PATH@,$GROFF_PATH,;t t
11471s,@NROFF_PATH@,$NROFF_PATH,;t t
11472s,@TBL_PATH@,$TBL_PATH,;t t
11473s,@GROFF_NOTE@,$GROFF_NOTE,;t t
11474s,@NROFF_NOTE@,$NROFF_NOTE,;t t
11475s,@cf_man2html@,$cf_man2html,;t t
11476s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
11477s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
11478s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
11479s,@cf_ldd_prog@,$cf_ldd_prog,;t t
11480s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11481s,@EXTRASRCS@,$EXTRASRCS,;t t
11482s,@EXTRAOBJS@,$EXTRAOBJS,;t t
11483CEOF
11484
11485EOF
11486
11487  cat >>"$CONFIG_STATUS" <<\EOF
11488  # Split the substitutions into bite-sized pieces for seds with
11489  # small command number limits, like on Digital OSF/1 and HP-UX.
11490  ac_max_sed_lines=48
11491  ac_sed_frag=1 # Number of current file.
11492  ac_beg=1 # First line for current file.
11493  ac_end=$ac_max_sed_lines # Line after last line for current file.
11494  ac_more_lines=:
11495  ac_sed_cmds=
11496  while "$ac_more_lines"; do
11497    if test "$ac_beg" -gt 1; then
11498      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11499    else
11500      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11501    fi
11502    if test ! -s $tmp/subs.frag; then
11503      ac_more_lines=false
11504    else
11505      # The purpose of the label and of the branching condition is to
11506      # speed up the sed processing (if there are no `@' at all, there
11507      # is no need to browse any of the substitutions).
11508      # These are the two extra sed commands mentioned above.
11509      (echo ':t
11510  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11511      # It is possible to make a multiline substitution using escaped newlines.
11512      # Ensure that we do not split the substitution between script fragments.
11513      ac_BEG=$ac_end
11514      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
11515      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
11516      if test -s $tmp/subs.next; then
11517        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
11518        if test ! -s $tmp/subs.edit; then
11519          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
11520          if test ! -s $tmp/subs.edit; then
11521            if test "$ac_beg" -gt 1; then
11522              ac_end=`expr "$ac_end" - 1`
11523              continue
11524            fi
11525          fi
11526        fi
11527      fi
11528
11529      if test -z "$ac_sed_cmds"; then
11530        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11531      else
11532        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11533      fi
11534      ac_sed_frag=`expr "$ac_sed_frag" + 1`
11535      ac_beg=$ac_end
11536      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
11537    fi
11538  done
11539  if test -z "$ac_sed_cmds"; then
11540    ac_sed_cmds=cat
11541  fi
11542fi # test -n "$CONFIG_FILES"
11543
11544EOF
11545cat >>"$CONFIG_STATUS" <<\EOF
11546for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11547  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11548  case "$ac_file" in
11549  - | *:- | *:-:* ) # input from stdin
11550        cat >$tmp/stdin
11551        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11552        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11553  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11554        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11555  * )   ac_file_in=$ac_file.in ;;
11556  esac
11557
11558  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11559  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11560         X"$ac_file" : 'X\(//\)[^/]' \| \
11561         X"$ac_file" : 'X\(//\)$' \| \
11562         X"$ac_file" : 'X\(/\)' \| \
11563         .     : '\(.\)' 2>/dev/null ||
11564echo X"$ac_file" |
11565    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11566  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11567  	  /^X\(\/\/\)$/{ s//\1/; q; }
11568  	  /^X\(\/\).*/{ s//\1/; q; }
11569  	  s/.*/./; q'`
11570  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11571    { case "$ac_dir" in
11572  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11573  *)                      as_incr_dir=.;;
11574esac
11575as_dummy="$ac_dir"
11576for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11577  case $as_mkdir_dir in
11578    # Skip DOS drivespec
11579    ?:) as_incr_dir=$as_mkdir_dir ;;
11580    *)
11581      as_incr_dir=$as_incr_dir/$as_mkdir_dir
11582      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11583    ;;
11584  esac
11585done; }
11586
11587    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11588    # A "../" for each directory in $ac_dir_suffix.
11589    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11590  else
11591    ac_dir_suffix= ac_dots=
11592  fi
11593
11594  case "$srcdir" in
11595  .)  ac_srcdir=.
11596      if test -z "$ac_dots"; then
11597         ac_top_srcdir=.
11598      else
11599         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
11600      fi ;;
11601  [\\/]* | ?:[\\/]* )
11602      ac_srcdir="$srcdir$ac_dir_suffix";
11603      ac_top_srcdir="$srcdir" ;;
11604  *) # Relative path.
11605    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
11606    ac_top_srcdir="$ac_dots$srcdir" ;;
11607  esac
11608
11609  case $INSTALL in
11610  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11611  *) ac_INSTALL=$ac_dots$INSTALL ;;
11612  esac
11613
11614  if test x"$ac_file" != x-; then
11615    { echo "$as_me:11615: creating $ac_file" >&5
11616echo "$as_me: creating $ac_file" >&6;}
11617    rm -f "$ac_file"
11618  fi
11619  # Let's still pretend it is `configure' which instantiates (i.e., don't
11620  # use $as_me), people would be surprised to read:
11621  #    /* config.h.  Generated automatically by config.status.  */
11622  configure_input="Generated automatically from `echo $ac_file_in |
11623                                                 sed 's,.*/,,'` by configure."
11624
11625  # First look for the input files in the build tree, otherwise in the
11626  # src tree.
11627  ac_file_inputs=`IFS=:
11628    for f in $ac_file_in; do
11629      case $f in
11630      -) echo $tmp/stdin ;;
11631      [\\/$]*)
11632         # Absolute (can't be DOS-style, as IFS=:)
11633         test -f "$f" || { { echo "$as_me:11633: error: cannot find input file: $f" >&5
11634echo "$as_me: error: cannot find input file: $f" >&2;}
11635   { (exit 1); exit 1; }; }
11636         echo $f;;
11637      *) # Relative
11638         if test -f "$f"; then
11639           # Build tree
11640           echo $f
11641         elif test -f "$srcdir/$f"; then
11642           # Source tree
11643           echo "$srcdir/$f"
11644         else
11645           # /dev/null tree
11646           { { echo "$as_me:11646: error: cannot find input file: $f" >&5
11647echo "$as_me: error: cannot find input file: $f" >&2;}
11648   { (exit 1); exit 1; }; }
11649         fi;;
11650      esac
11651    done` || { (exit 1); exit 1; }
11652EOF
11653cat >>"$CONFIG_STATUS" <<\EOF
11654  ac_warn_datarootdir=no
11655  if test x"$ac_file" != x-; then
11656    for ac_item in $ac_file_inputs
11657    do
11658      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
11659      if test -n "$ac_seen"; then
11660        ac_used=`grep '@datarootdir@' "$ac_item"`
11661        if test -z "$ac_used"; then
11662          { echo "$as_me:11662: WARNING: datarootdir was used implicitly but not set:
11663$ac_seen" >&5
11664echo "$as_me: WARNING: datarootdir was used implicitly but not set:
11665$ac_seen" >&2;}
11666          ac_warn_datarootdir=yes
11667        fi
11668      fi
11669      ac_seen=`grep '${datarootdir}' "$ac_item"`
11670      if test -n "$ac_seen"; then
11671        { echo "$as_me:11671: WARNING: datarootdir was used explicitly but not set:
11672$ac_seen" >&5
11673echo "$as_me: WARNING: datarootdir was used explicitly but not set:
11674$ac_seen" >&2;}
11675        ac_warn_datarootdir=yes
11676      fi
11677    done
11678  fi
11679
11680if test "x$ac_warn_datarootdir" = xyes; then
11681  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
11682fi
11683
11684EOF
11685cat >>"$CONFIG_STATUS" <<EOF
11686  sed "$ac_vpsub
11687$extrasub
11688EOF
11689cat >>"$CONFIG_STATUS" <<\EOF
11690:t
11691/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11692s,@configure_input@,$configure_input,;t t
11693s,@srcdir@,$ac_srcdir,;t t
11694s,@top_srcdir@,$ac_top_srcdir,;t t
11695s,@INSTALL@,$ac_INSTALL,;t t
11696" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11697  rm -f $tmp/stdin
11698  if test x"$ac_file" != x-; then
11699    cp "$tmp/out" "$ac_file"
11700
11701    for ac_name in prefix exec_prefix datarootdir
11702    do
11703        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
11704        if test -n "$ac_seen"; then
11705            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
11706            if test -z "$ac_init"; then
11707              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
11708              { echo "$as_me:11708: WARNING: Variable $ac_name is used but was not set:
11709$ac_seen" >&5
11710echo "$as_me: WARNING: Variable $ac_name is used but was not set:
11711$ac_seen" >&2;}
11712            fi
11713        fi
11714    done
11715    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
11716    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
11717    if test -s $tmp/out; then
11718      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
11719      { echo "$as_me:11719: WARNING: Some variables may not be substituted:
11720$ac_seen" >&5
11721echo "$as_me: WARNING: Some variables may not be substituted:
11722$ac_seen" >&2;}
11723    fi
11724  else
11725    cat $tmp/out
11726  fi
11727  rm -f $tmp/out
11728
11729done
11730EOF
11731cat >>"$CONFIG_STATUS" <<\EOF
11732
11733#
11734# CONFIG_HEADER section.
11735#
11736
11737# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11738# NAME is the cpp macro being defined and VALUE is the value it is being given.
11739#
11740# ac_d sets the value in "#define NAME VALUE" lines.
11741ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
11742ac_dB='[ 	].*$,\1#\2'
11743ac_dC=' '
11744ac_dD=',;t'
11745# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11746ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
11747ac_iB='\([ 	]\),\1#\2define\3'
11748ac_iC=' '
11749ac_iD='\4,;t'
11750# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11751ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
11752ac_uB='$,\1#\2define\3'
11753ac_uC=' '
11754ac_uD=',;t'
11755
11756for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
11757  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11758  case "$ac_file" in
11759  - | *:- | *:-:* ) # input from stdin
11760        cat >$tmp/stdin
11761        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11762        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11763  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11764        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11765  * )   ac_file_in=$ac_file.in ;;
11766  esac
11767
11768  test x"$ac_file" != x- && { echo "$as_me:11768: creating $ac_file" >&5
11769echo "$as_me: creating $ac_file" >&6;}
11770
11771  # First look for the input files in the build tree, otherwise in the
11772  # src tree.
11773  ac_file_inputs=`IFS=:
11774    for f in $ac_file_in; do
11775      case $f in
11776      -) echo $tmp/stdin ;;
11777      [\\/$]*)
11778         # Absolute (can't be DOS-style, as IFS=:)
11779         test -f "$f" || { { echo "$as_me:11779: error: cannot find input file: $f" >&5
11780echo "$as_me: error: cannot find input file: $f" >&2;}
11781   { (exit 1); exit 1; }; }
11782         echo $f;;
11783      *) # Relative
11784         if test -f "$f"; then
11785           # Build tree
11786           echo $f
11787         elif test -f "$srcdir/$f"; then
11788           # Source tree
11789           echo "$srcdir/$f"
11790         else
11791           # /dev/null tree
11792           { { echo "$as_me:11792: error: cannot find input file: $f" >&5
11793echo "$as_me: error: cannot find input file: $f" >&2;}
11794   { (exit 1); exit 1; }; }
11795         fi;;
11796      esac
11797    done` || { (exit 1); exit 1; }
11798  # Remove the trailing spaces.
11799  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
11800
11801EOF
11802
11803# Transform confdefs.h into a list of #define's.  We won't use it as a sed
11804# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
11805# be either 'cat' or 'sort'.
11806cat confdefs.h | uniq >conftest.vals
11807
11808# Break up conftest.vals because some shells have a limit on
11809# the size of here documents, and old seds have small limits too.
11810
11811rm -f conftest.tail
11812echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
11813while grep . conftest.vals >/dev/null
11814do
11815  # Write chunks of a limited-size here document to conftest.frag.
11816  echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
11817  sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
11818  echo 'CEOF' >> "$CONFIG_STATUS"
11819  sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
11820  rm -f conftest.vals
11821  mv conftest.tail conftest.vals
11822done
11823rm -f conftest.vals
11824
11825# Run sed to substitute the contents of conftest.frag into $tmp/in at the
11826# marker @DEFS@.
11827echo '  cat >> conftest.edit <<CEOF
11828/@DEFS@/r conftest.frag
11829/@DEFS@/d
11830CEOF
11831sed -f conftest.edit $tmp/in > $tmp/out
11832rm -f $tmp/in
11833mv $tmp/out $tmp/in
11834rm -f conftest.edit conftest.frag
11835' >> "$CONFIG_STATUS"
11836
11837cat >>"$CONFIG_STATUS" <<\EOF
11838  # Let's still pretend it is `configure' which instantiates (i.e., don't
11839  # use $as_me), people would be surprised to read:
11840  #    /* config.h.  Generated automatically by config.status.  */
11841  if test x"$ac_file" = x-; then
11842    echo "/* Generated automatically by configure.  */" >$tmp/config.h
11843  else
11844    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
11845  fi
11846  cat $tmp/in >>$tmp/config.h
11847  rm -f $tmp/in
11848  if test x"$ac_file" != x-; then
11849    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
11850      { echo "$as_me:11850: $ac_file is unchanged" >&5
11851echo "$as_me: $ac_file is unchanged" >&6;}
11852    else
11853      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11854         X"$ac_file" : 'X\(//\)[^/]' \| \
11855         X"$ac_file" : 'X\(//\)$' \| \
11856         X"$ac_file" : 'X\(/\)' \| \
11857         .     : '\(.\)' 2>/dev/null ||
11858echo X"$ac_file" |
11859    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11860  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11861  	  /^X\(\/\/\)$/{ s//\1/; q; }
11862  	  /^X\(\/\).*/{ s//\1/; q; }
11863  	  s/.*/./; q'`
11864      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11865        { case "$ac_dir" in
11866  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11867  *)                      as_incr_dir=.;;
11868esac
11869as_dummy="$ac_dir"
11870for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11871  case $as_mkdir_dir in
11872    # Skip DOS drivespec
11873    ?:) as_incr_dir=$as_mkdir_dir ;;
11874    *)
11875      as_incr_dir=$as_incr_dir/$as_mkdir_dir
11876      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11877    ;;
11878  esac
11879done; }
11880
11881      fi
11882      rm -f "$ac_file"
11883      mv "$tmp/config.h" "$ac_file"
11884    fi
11885  else
11886    cat $tmp/config.h
11887    rm -f $tmp/config.h
11888  fi
11889done
11890EOF
11891
11892cat >>"$CONFIG_STATUS" <<\EOF
11893
11894{ (exit 0); exit 0; }
11895EOF
11896chmod +x "$CONFIG_STATUS"
11897ac_clean_files=$ac_clean_files_save
11898
11899# configure is writing to config.log, and then calls config.status.
11900# config.status does its own redirection, appending to config.log.
11901# Unfortunately, on DOS this fails, as config.log is still kept open
11902# by configure, so config.status won't be able to write to it; its
11903# output is simply discarded.  So we exec the FD to /dev/null,
11904# effectively closing config.log, so it can be properly (re)opened and
11905# appended to by config.status.  When coming back to configure, we
11906# need to make the FD available again.
11907if test "$no_create" != yes; then
11908  ac_cs_success=:
11909  exec 5>/dev/null
11910  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
11911  exec 5>>config.log
11912  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11913  # would make configure fail if this is the last instruction.
11914  "$ac_cs_success" || { (exit 1); exit 1; }
11915fi
11916
11917test -z "$cf_make_docs" && cf_make_docs=0
11918
11919cf_output=makefile
11920test -f "$cf_output" || cf_output=Makefile
11921
11922if test "$cf_make_docs" = 0
11923then
11924cat >>$cf_output <<CF_EOF
11925################################################################################
11926## generated by CF_MAKE_DOCS
11927.SUFFIXES : .html .\$(manext) .man .ps .pdf .txt
11928
11929${NROFF_NOTE}.\$(manext).txt :
11930${NROFF_NOTE}	\$(SHELL) -c "tbl \$*.\$(manext) | nroff -man | col -bx" >\$@
11931
11932${GROFF_NOTE}.ps.pdf :
11933${GROFF_NOTE}	ps2pdf \$*.ps
11934${GROFF_NOTE}
11935${GROFF_NOTE}.\$(manext).ps :
11936${GROFF_NOTE}	\$(SHELL) -c "tbl \$*.\$(manext) | groff -man" >\$@
11937${GROFF_NOTE}
11938${GROFF_NOTE}.\$(manext).txt :
11939${GROFF_NOTE}	GROFF_NO_SGR=stupid \$(SHELL) -c "tbl \$*.\$(manext) | nroff -rHY=0 -Tascii -man | col -bx" >\$@
11940
11941${MAN2HTML_NOTE}.\$(manext).html :
11942${MAN2HTML_NOTE}	./${MAN2HTML_TEMP} \$* \$(manext) man >\$@
11943
11944CF_EOF
11945	cf_make_docs=1
11946fi
11947
11948for cf_name in luit
11949do
11950cat >>$cf_output <<CF_EOF
11951################################################################################
11952${NROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
11953${MAN2HTML_NOTE}docs docs-$cf_name :: $cf_name.html
11954${GROFF_NOTE}docs docs-$cf_name :: $cf_name.pdf
11955${GROFF_NOTE}docs docs-$cf_name :: $cf_name.ps
11956${GROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
11957
11958clean \\
11959docs-clean ::
11960${NROFF_NOTE}	rm -f $cf_name.txt
11961${MAN2HTML_NOTE}	rm -f $cf_name.html
11962${GROFF_NOTE}	rm -f $cf_name.pdf
11963${GROFF_NOTE}	rm -f $cf_name.ps
11964${GROFF_NOTE}	rm -f $cf_name.txt
11965
11966${NROFF_NOTE}$cf_name.txt  : $cf_name.\$(manext)
11967${MAN2HTML_NOTE}$cf_name.html : $cf_name.\$(manext)
11968${GROFF_NOTE}$cf_name.pdf  : $cf_name.ps
11969${GROFF_NOTE}$cf_name.ps   : $cf_name.\$(manext)
11970${GROFF_NOTE}$cf_name.txt  : $cf_name.\$(manext)
11971CF_EOF
11972done
11973
11974