2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20221202.
5 # Copyright 2003-2021,2022 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.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if 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
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
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; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
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}"
109 ac_unique_file="ncurses.c"
111 # Initialize some variables set by options.
113 ac_init_version=false
114 # The variables have the same names as the options, with
115 # dashes changed to underlines.
123 program_transform_name=s,x,x,
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.
136 bindir='${exec_prefix}/bin'
137 sbindir='${exec_prefix}/sbin'
138 libexecdir='${exec_prefix}/libexec'
139 datarootdir='${prefix}/share'
140 datadir='${datarootdir}'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 runstatedir='${localstatedir}/run'
145 libdir='${exec_prefix}/lib'
146 includedir='${prefix}/include'
147 oldincludedir='/usr/include'
148 infodir='${datarootdir}/info'
149 mandir='${datarootdir}/man'
151 # Identity of this package.
161 # If the previous option needs an argument, assign it.
162 if test -n "$ac_prev"; then
163 eval "$ac_prev=\$ac_option"
168 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
170 # Accept the important Cygnus configure options, so we can diagnose typos.
174 -bindir | --bindir | --bindi | --bind | --bin | --bi)
176 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
179 -build | --build | --buil | --bui | --bu)
180 ac_prev=build_alias ;;
181 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182 build_alias=$ac_optarg ;;
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 ;;
192 cache_file=config.cache ;;
194 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
196 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
198 datadir=$ac_optarg ;;
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 ;;
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" ;;
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'`
224 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
227 eval "enable_$ac_feature='$ac_optarg'" ;;
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 ;;
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
242 -help | --help | --hel | --he | -h)
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 ;;
249 -host | --host | --hos | --ho)
250 ac_prev=host_alias ;;
251 -host=* | --host=* | --hos=* | --ho=*)
252 host_alias=$ac_optarg ;;
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 ;;
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264 infodir=$ac_optarg ;;
266 -libdir | --libdir | --libdi | --libd)
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
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 ;;
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 ;;
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 ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 # Obsolete; use --without-fp.
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
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 ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
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 ;;
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 ;;
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 ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 sbindir=$ac_optarg ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 sharedstatedir=$ac_optarg ;;
379 -site | --site | --sit)
381 -site=* | --site=* | --sit=*)
384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
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 ;;
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 ;;
401 -v | -verbose | --verbose | --verbos | --verbo | --verb)
404 -version | --version | --versio | --versi | --vers | -V)
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'`
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418 eval "with_$ac_package='$ac_optarg'" ;;
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" ;;
430 # Obsolete; use --with-x.
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 ;;
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 ;;
447 -*) { echo "$as_me: error: unrecognized option: $ac_option
448 Try \`$0 --help' for more information." >&2
449 { (exit 1); exit 1; }; }
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" ;;
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}"
473 if 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; }; }
479 # Be sure to have absolute paths.
480 for ac_var in exec_prefix prefix
482 eval ac_val=$`echo "$ac_var"`
484 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # Be sure to have absolute paths.
491 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492 localstatedir libdir includedir oldincludedir infodir mandir
494 eval ac_val=$`echo "$ac_var"`
496 [\\/$]* | ?:[\\/]* ) ;;
497 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498 { (exit 1); exit 1; }; };;
502 # There might be people who depend on the old broken behavior: `$host'
503 # used to hold the argument of --host etc.
508 # FIXME: should be removed in autoconf 3.0.
509 if 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
520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
522 test "$silent" = yes && exec 6>/dev/null
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526 ac_srcdir_defaulted=yes
527 # Try the directory containing this script, then its parent.
529 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
532 if test ! -r "$srcdir/$ac_unique_file"; then
536 ac_srcdir_defaulted=no
538 if 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; }; }
543 { echo "$as_me: error: cannot find sources in $srcdir" >&2
544 { (exit 1); exit 1; }; }
547 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548 ac_env_build_alias_set=${build_alias+set}
549 ac_env_build_alias_value=$build_alias
550 ac_cv_env_build_alias_set=${build_alias+set}
551 ac_cv_env_build_alias_value=$build_alias
552 ac_env_host_alias_set=${host_alias+set}
553 ac_env_host_alias_value=$host_alias
554 ac_cv_env_host_alias_set=${host_alias+set}
555 ac_cv_env_host_alias_value=$host_alias
556 ac_env_target_alias_set=${target_alias+set}
557 ac_env_target_alias_value=$target_alias
558 ac_cv_env_target_alias_set=${target_alias+set}
559 ac_cv_env_target_alias_value=$target_alias
560 ac_env_CC_set=${CC+set}
562 ac_cv_env_CC_set=${CC+set}
563 ac_cv_env_CC_value=$CC
564 ac_env_CFLAGS_set=${CFLAGS+set}
565 ac_env_CFLAGS_value=$CFLAGS
566 ac_cv_env_CFLAGS_set=${CFLAGS+set}
567 ac_cv_env_CFLAGS_value=$CFLAGS
568 ac_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_env_LDFLAGS_value=$LDFLAGS
570 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571 ac_cv_env_LDFLAGS_value=$LDFLAGS
572 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_env_CPPFLAGS_value=$CPPFLAGS
574 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576 ac_env_CPP_set=${CPP+set}
577 ac_env_CPP_value=$CPP
578 ac_cv_env_CPP_set=${CPP+set}
579 ac_cv_env_CPP_value=$CPP
582 # Report the --help message.
584 if 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.
588 \`configure' configures this package to adapt to many kinds of systems.
590 Usage: $0 [OPTION]... [VAR=VALUE]...
592 To assign environment variables (e.g., CC, CFLAGS...), specify them as
593 VAR=VALUE. See below for descriptions of some of the useful variables.
595 Defaults for the options are specified in brackets.
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 \`..']
611 Installation directories:
612 --prefix=PREFIX install architecture-independent files in PREFIX
614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
617 By default, \`make install' will install all the files in
618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620 for instance \`--prefix=\$HOME'.
622 For better control, use the options below.
624 Fine 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]
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
649 --x-includes=DIR X include files are in DIR
650 --x-libraries=DIR X library files are in DIR
653 --build=BUILD configure for building on BUILD [guessed]
654 --host=HOST build programs to run on HOST [BUILD]
658 if test -n "$ac_init_help"; then
663 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
664 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
667 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
668 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
671 --disable-stripping do not strip (debug info) installed executables
672 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
673 --enable-string-hacks work around bogus compiler/loader warnings
674 --with-pkg-config{=path} enable/disable use of pkg-config
675 --disable-echo do not display "compiling" commands
676 Curses Version-dependent Options:
677 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
678 --disable-widec disable checks for wide-character functions
679 --with-curses-dir=DIR directory in which (n)curses is installed
680 --with-screen=XXX use specified curses-libraries
681 --with-ncursesw use wide ncurses-libraries
682 --with-ncurses use ncurses-libraries
683 --with-pdcurses compile/link with pdcurses X11 library
684 --with-curses-colr compile/link with HPUX 10.x color-curses
685 --with-curses-5lib compile/link with SunOS 5lib curses
686 --with-Xaw3d link with Xaw 3d library
687 --with-Xaw3dxft link with Xaw 3d xft library
688 --with-neXtaw link with neXT Athena library
689 --with-XawPlus link with Athena-Plus library
690 --with-x use the X Window System
691 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
692 --with-form-libname=XXX override form basename of library
693 --with-menu-libname=XXX override menu basename of library
694 --with-panel-libname=XXX override panel basename of library
695 --disable-panel disable checks for panel functions
696 --disable-menu disable checks for menu functions
697 --disable-form disable checks for form functions
698 Testing/development Options:
699 --enable-warnings test: turn on gcc compiler warnings
700 --with-dmalloc test: use Gray Watson's dmalloc library
701 --with-dbmalloc test: use Conor Cahill's dbmalloc library
702 --with-valgrind test: use valgrind
703 --disable-leaks test: free permanent memory, analyze leaks
704 --disable-rpath-hack don't add rpath options for additional libraries
706 Some influential environment variables:
707 CC C compiler command
708 CFLAGS C compiler flags
709 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
710 nonstandard directory <lib dir>
711 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
712 headers in a nonstandard directory <include dir>
715 Use these variables to override the choices made by `configure' or to help
716 it to find libraries and programs with nonstandard names/locations.
721 if test "$ac_init_help" = "recursive"; then
722 # If there are subdirs, report their specific --help.
724 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
726 # A "../" for each directory in /$ac_subdir.
727 ac_dots=`echo "$ac_subdir" |
728 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
731 .) # No --srcdir option. We are building in place.
732 ac_sub_srcdir="$srcdir" ;;
733 [\\/]* | ?:[\\/]* ) # Absolute path.
734 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
736 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
739 # Check for guested configure; otherwise get Cygnus style configure.
740 if test -f "$ac_sub_srcdir/configure.gnu"; then
742 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
743 elif test -f "$ac_sub_srcdir/configure"; then
745 $SHELL "$ac_sub_srcdir/configure" --help=recursive
746 elif test -f "$ac_sub_srcdir/configure.ac" ||
747 test -f "$ac_sub_srcdir/configure.in"; then
749 "$ac_configure" --help
751 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
757 test -n "$ac_init_help" && exit 0
758 if "$ac_init_version"; then
761 Copyright 2003-2021,2022 Thomas E. Dickey
762 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
763 Free Software Foundation, Inc.
764 This configure script is free software; the Free Software Foundation
765 gives unlimited permission to copy, distribute and modify it.
771 This file contains any messages produced by compilers while
772 running configure, to aid debugging if configure makes a mistake.
774 It was created by $as_me, which was
775 generated by GNU Autoconf 2.52.20221202. Invocation command line was
786 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
787 uname -m = `(uname -m) 2>/dev/null || echo unknown`
788 uname -r = `(uname -r) 2>/dev/null || echo unknown`
789 uname -s = `(uname -s) 2>/dev/null || echo unknown`
790 uname -v = `(uname -v) 2>/dev/null || echo unknown`
792 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
793 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
795 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
796 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
797 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
798 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
799 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
800 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
801 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
815 # Keep a trace of the command line.
816 # Strip out --no-create and --no-recursion so they do not pile up.
817 # Also quote any args containing shell meta-characters.
823 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
824 | --no-cr | --no-c) ;;
825 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
826 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
827 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
828 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
829 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
831 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
834 # Get rid of the leading space.
837 # When interrupted or exit'd, cleanup temporary files, and complete
838 # config.log. We remove comments because anyway the quotes in there
839 # would cause problems or look ugly.
841 # Save into config.log some information that might help in debugging.
843 echo "## ----------------- ##" >&5
844 echo "## Cache variables. ##" >&5
845 echo "## ----------------- ##" >&5
847 # The following way of writing the cache mishandles newlines in values,
850 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
853 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
854 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
858 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
862 sed "/^$/d" confdefs.h >conftest.log
863 if test -s conftest.log; then
865 echo "## ------------ ##" >&5
866 echo "## confdefs.h. ##" >&5
867 echo "## ------------ ##" >&5
872 test "$ac_signal" != 0 &&
873 echo "$as_me: caught signal $ac_signal" >&5
874 echo "$as_me: exit $exit_status" >&5
875 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
878 for ac_signal in 1 2 13 15; do
879 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
883 # confdefs.h avoids OS command line length limits that DEFS can exceed.
884 rm -rf conftest* confdefs.h
885 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
888 # Let the site file select an alternate cache file if it wants to.
889 # Prefer explicitly selected file to automatically selected ones.
890 if test -z "$CONFIG_SITE"; then
891 if test "x$prefix" != xNONE; then
892 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
894 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
897 for ac_site_file in $CONFIG_SITE; do
898 if test -r "$ac_site_file"; then
899 { echo "$as_me:899: loading site script $ac_site_file" >&5
900 echo "$as_me: loading site script $ac_site_file" >&6;}
901 cat "$ac_site_file" >&5
906 if test -r "$cache_file"; then
907 # Some versions of bash will fail to source /dev/null (special
908 # files actually), so we avoid doing that.
909 if test -f "$cache_file"; then
910 { echo "$as_me:910: loading cache $cache_file" >&5
911 echo "$as_me: loading cache $cache_file" >&6;}
913 [\\/]* | ?:[\\/]* ) . $cache_file;;
918 { echo "$as_me:918: creating cache $cache_file" >&5
919 echo "$as_me: creating cache $cache_file" >&6;}
923 # Check that the precious variables saved in the cache have kept the same
925 ac_cache_corrupted=false
926 for ac_var in `(set) 2>&1 |
927 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
928 eval ac_old_set=\$ac_cv_env_${ac_var}_set
929 eval ac_new_set=\$ac_env_${ac_var}_set
930 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
931 eval ac_new_val="\$ac_env_${ac_var}_value"
932 case "$ac_old_set,$ac_new_set" in
934 { echo "$as_me:934: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
938 { echo "$as_me:938: error: \`$ac_var' was not set in the previous run" >&5
939 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
940 ac_cache_corrupted=: ;;
943 if test "x$ac_old_val" != "x$ac_new_val"; then
944 { echo "$as_me:944: error: \`$ac_var' has changed since the previous run:" >&5
945 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
946 { echo "$as_me:946: former value: $ac_old_val" >&5
947 echo "$as_me: former value: $ac_old_val" >&2;}
948 { echo "$as_me:948: current value: $ac_new_val" >&5
949 echo "$as_me: current value: $ac_new_val" >&2;}
953 # Pass precious variables to config.status. It doesn't matter if
954 # we pass some twice (in addition to the command line arguments).
955 if test "$ac_new_set" = set; then
956 case "$ac_new_val" in
957 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
958 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
959 ac_configure_args="$ac_configure_args '$ac_arg'"
961 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
966 if "$ac_cache_corrupted"; then
967 { echo "$as_me:967: error: changes in the environment can compromise the build" >&5
968 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
969 { { echo "$as_me:969: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
970 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
971 { (exit 1); exit 1; }; }
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
977 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
979 ac_main_return="return"
981 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
983 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
995 echo "#! $SHELL" >conftest.sh
996 echo "exit 0" >>conftest.sh
998 if { (echo "$as_me:998: PATH=\".;.\"; conftest.sh") >&5
999 (PATH=".;."; conftest.sh) 2>&5
1001 echo "$as_me:1001: \$? = $ac_status" >&5
1002 (exit "$ac_status"); }; then
1003 ac_path_separator=';'
1007 PATH_SEPARATOR="$ac_path_separator"
1010 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1012 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1014 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1017 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1018 if test -f "$ac_dir/install-sh"; then
1020 ac_install_sh="$ac_aux_dir/install-sh -c"
1022 elif test -f "$ac_dir/install.sh"; then
1024 ac_install_sh="$ac_aux_dir/install.sh -c"
1026 elif test -f "$ac_dir/shtool"; then
1028 ac_install_sh="$ac_aux_dir/shtool install -c"
1032 if test -z "$ac_aux_dir"; then
1033 { { echo "$as_me:1033: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1034 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1035 { (exit 1); exit 1; }; }
1037 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1038 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1039 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1041 # Make sure we can run config.sub.
1042 $ac_config_sub sun4 >/dev/null 2>&1 ||
1043 { { echo "$as_me:1043: error: cannot run $ac_config_sub" >&5
1044 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1045 { (exit 1); exit 1; }; }
1047 echo "$as_me:1047: checking build system type" >&5
1048 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1049 if test "${ac_cv_build+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_build_alias=$build_alias
1053 test -z "$ac_cv_build_alias" &&
1054 ac_cv_build_alias=`$ac_config_guess`
1055 test -z "$ac_cv_build_alias" &&
1056 { { echo "$as_me:1056: error: cannot guess build type; you must specify one" >&5
1057 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1058 { (exit 1); exit 1; }; }
1059 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1060 { { echo "$as_me:1060: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1061 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1062 { (exit 1); exit 1; }; }
1065 echo "$as_me:1065: result: $ac_cv_build" >&5
1066 echo "${ECHO_T}$ac_cv_build" >&6
1068 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1072 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1073 echo "$as_me:1073: checking host system type" >&5
1074 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1075 if test "${ac_cv_host+set}" = set; then
1076 echo $ECHO_N "(cached) $ECHO_C" >&6
1078 ac_cv_host_alias=$host_alias
1079 test -z "$ac_cv_host_alias" &&
1080 ac_cv_host_alias=$ac_cv_build_alias
1081 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1082 { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1083 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1084 { (exit 1); exit 1; }; }
1087 echo "$as_me:1087: result: $ac_cv_host" >&5
1088 echo "${ECHO_T}$ac_cv_host" >&6
1090 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1094 system_name="$host_os"
1096 system_name="`(uname -s -r) 2>/dev/null`"
1097 if test -z "$system_name" ; then
1098 system_name="`(hostname) 2>/dev/null`"
1101 test -n "$system_name" &&
1102 cat >>confdefs.h <<EOF
1103 #define SYSTEM_NAME "$system_name"
1106 if test "${cf_cv_system_name+set}" = set; then
1107 echo $ECHO_N "(cached) $ECHO_C" >&6
1109 cf_cv_system_name="$system_name"
1112 test -z "$system_name" && system_name="$cf_cv_system_name"
1113 test -n "$cf_cv_system_name" && echo "$as_me:1113: result: Configuring for $cf_cv_system_name" >&5
1114 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116 if test ".$system_name" != ".$cf_cv_system_name" ; then
1117 echo "$as_me:1117: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1118 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1119 { { echo "$as_me:1119: error: \"Please remove config.cache and try again.\"" >&5
1120 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1121 { (exit 1); exit 1; }; }
1124 test "$program_prefix" != NONE &&
1125 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1126 # Use a double $ so make ignores it.
1127 test "$program_suffix" != NONE &&
1128 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1129 # Double any \ or $. echo might interpret backslashes.
1130 # By default was `s,x,x', remove it if useless.
1131 cat <<\_ACEOF >conftest.sed
1132 s/[\\$]/&&/g;s/;s,x,x,$//
1134 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1137 echo "$as_me:1137: checking whether ${MAKE-make} sets \${MAKE}" >&5
1138 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1139 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1140 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1141 echo $ECHO_N "(cached) $ECHO_C" >&6
1143 cat >conftest.make <<\EOF
1145 @echo 'ac_maketemp="${MAKE}"'
1147 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1148 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1149 if test -n "$ac_maketemp"; then
1150 eval ac_cv_prog_make_${ac_make}_set=yes
1152 eval ac_cv_prog_make_${ac_make}_set=no
1156 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1157 echo "$as_me:1157: result: yes" >&5
1158 echo "${ECHO_T}yes" >&6
1161 echo "$as_me:1161: result: no" >&5
1162 echo "${ECHO_T}no" >&6
1163 SET_MAKE="MAKE=${MAKE-make}"
1167 ac_cpp='$CPP $CPPFLAGS'
1168 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1169 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1171 ac_main_return="return"
1172 if test -n "$ac_tool_prefix"; then
1173 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1174 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1175 echo "$as_me:1175: checking for $ac_word" >&5
1176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1177 if test "${ac_cv_prog_CC+set}" = set; then
1178 echo $ECHO_N "(cached) $ECHO_C" >&6
1180 if test -n "$CC"; then
1181 ac_cv_prog_CC="$CC" # Let the user override the test.
1183 ac_save_IFS=$IFS; IFS=$ac_path_separator
1185 for ac_dir in $ac_dummy; do
1187 test -z "$ac_dir" && ac_dir=.
1188 $as_executable_p "$ac_dir/$ac_word" || continue
1189 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1190 echo "$as_me:1190: found $ac_dir/$ac_word" >&5
1197 if test -n "$CC"; then
1198 echo "$as_me:1198: result: $CC" >&5
1199 echo "${ECHO_T}$CC" >&6
1201 echo "$as_me:1201: result: no" >&5
1202 echo "${ECHO_T}no" >&6
1206 if test -z "$ac_cv_prog_CC"; then
1208 # Extract the first word of "gcc", so it can be a program name with args.
1209 set dummy gcc; ac_word=$2
1210 echo "$as_me:1210: checking for $ac_word" >&5
1211 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1212 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1213 echo $ECHO_N "(cached) $ECHO_C" >&6
1215 if test -n "$ac_ct_CC"; then
1216 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1218 ac_save_IFS=$IFS; IFS=$ac_path_separator
1220 for ac_dir in $ac_dummy; do
1222 test -z "$ac_dir" && ac_dir=.
1223 $as_executable_p "$ac_dir/$ac_word" || continue
1224 ac_cv_prog_ac_ct_CC="gcc"
1225 echo "$as_me:1225: found $ac_dir/$ac_word" >&5
1231 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1232 if test -n "$ac_ct_CC"; then
1233 echo "$as_me:1233: result: $ac_ct_CC" >&5
1234 echo "${ECHO_T}$ac_ct_CC" >&6
1236 echo "$as_me:1236: result: no" >&5
1237 echo "${ECHO_T}no" >&6
1245 if test -z "$CC"; then
1246 if test -n "$ac_tool_prefix"; then
1247 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1248 set dummy ${ac_tool_prefix}cc; ac_word=$2
1249 echo "$as_me:1249: checking for $ac_word" >&5
1250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1251 if test "${ac_cv_prog_CC+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1254 if test -n "$CC"; then
1255 ac_cv_prog_CC="$CC" # Let the user override the test.
1257 ac_save_IFS=$IFS; IFS=$ac_path_separator
1259 for ac_dir in $ac_dummy; do
1261 test -z "$ac_dir" && ac_dir=.
1262 $as_executable_p "$ac_dir/$ac_word" || continue
1263 ac_cv_prog_CC="${ac_tool_prefix}cc"
1264 echo "$as_me:1264: found $ac_dir/$ac_word" >&5
1271 if test -n "$CC"; then
1272 echo "$as_me:1272: result: $CC" >&5
1273 echo "${ECHO_T}$CC" >&6
1275 echo "$as_me:1275: result: no" >&5
1276 echo "${ECHO_T}no" >&6
1280 if test -z "$ac_cv_prog_CC"; then
1282 # Extract the first word of "cc", so it can be a program name with args.
1283 set dummy cc; ac_word=$2
1284 echo "$as_me:1284: checking for $ac_word" >&5
1285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1286 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1287 echo $ECHO_N "(cached) $ECHO_C" >&6
1289 if test -n "$ac_ct_CC"; then
1290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1292 ac_save_IFS=$IFS; IFS=$ac_path_separator
1294 for ac_dir in $ac_dummy; do
1296 test -z "$ac_dir" && ac_dir=.
1297 $as_executable_p "$ac_dir/$ac_word" || continue
1298 ac_cv_prog_ac_ct_CC="cc"
1299 echo "$as_me:1299: found $ac_dir/$ac_word" >&5
1305 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1306 if test -n "$ac_ct_CC"; then
1307 echo "$as_me:1307: result: $ac_ct_CC" >&5
1308 echo "${ECHO_T}$ac_ct_CC" >&6
1310 echo "$as_me:1310: result: no" >&5
1311 echo "${ECHO_T}no" >&6
1320 if test -z "$CC"; then
1321 # Extract the first word of "cc", so it can be a program name with args.
1322 set dummy cc; ac_word=$2
1323 echo "$as_me:1323: checking for $ac_word" >&5
1324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1325 if test "${ac_cv_prog_CC+set}" = set; then
1326 echo $ECHO_N "(cached) $ECHO_C" >&6
1328 if test -n "$CC"; then
1329 ac_cv_prog_CC="$CC" # Let the user override the test.
1332 ac_save_IFS=$IFS; IFS=$ac_path_separator
1334 for ac_dir in $ac_dummy; do
1336 test -z "$ac_dir" && ac_dir=.
1337 $as_executable_p "$ac_dir/$ac_word" || continue
1338 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1339 ac_prog_rejected=yes
1343 echo "$as_me:1343: found $ac_dir/$ac_word" >&5
1347 if test "$ac_prog_rejected" = yes; then
1348 # We found a bogon in the path, so make sure we never use it.
1349 set dummy $ac_cv_prog_CC
1351 if test $# != 0; then
1352 # We chose a different compiler from the bogus one.
1353 # However, it has the same basename, so the bogon will be chosen
1354 # first if we set CC to just the basename; use the full file name.
1356 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1364 if test -n "$CC"; then
1365 echo "$as_me:1365: result: $CC" >&5
1366 echo "${ECHO_T}$CC" >&6
1368 echo "$as_me:1368: result: no" >&5
1369 echo "${ECHO_T}no" >&6
1373 if test -z "$CC"; then
1374 if test -n "$ac_tool_prefix"; then
1377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1378 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1379 echo "$as_me:1379: checking for $ac_word" >&5
1380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1381 if test "${ac_cv_prog_CC+set}" = set; then
1382 echo $ECHO_N "(cached) $ECHO_C" >&6
1384 if test -n "$CC"; then
1385 ac_cv_prog_CC="$CC" # Let the user override the test.
1387 ac_save_IFS=$IFS; IFS=$ac_path_separator
1389 for ac_dir in $ac_dummy; do
1391 test -z "$ac_dir" && ac_dir=.
1392 $as_executable_p "$ac_dir/$ac_word" || continue
1393 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1394 echo "$as_me:1394: found $ac_dir/$ac_word" >&5
1401 if test -n "$CC"; then
1402 echo "$as_me:1402: result: $CC" >&5
1403 echo "${ECHO_T}$CC" >&6
1405 echo "$as_me:1405: result: no" >&5
1406 echo "${ECHO_T}no" >&6
1409 test -n "$CC" && break
1412 if test -z "$CC"; then
1416 # Extract the first word of "$ac_prog", so it can be a program name with args.
1417 set dummy $ac_prog; ac_word=$2
1418 echo "$as_me:1418: checking for $ac_word" >&5
1419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
1423 if test -n "$ac_ct_CC"; then
1424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1426 ac_save_IFS=$IFS; IFS=$ac_path_separator
1428 for ac_dir in $ac_dummy; do
1430 test -z "$ac_dir" && ac_dir=.
1431 $as_executable_p "$ac_dir/$ac_word" || continue
1432 ac_cv_prog_ac_ct_CC="$ac_prog"
1433 echo "$as_me:1433: found $ac_dir/$ac_word" >&5
1439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1440 if test -n "$ac_ct_CC"; then
1441 echo "$as_me:1441: result: $ac_ct_CC" >&5
1442 echo "${ECHO_T}$ac_ct_CC" >&6
1444 echo "$as_me:1444: result: no" >&5
1445 echo "${ECHO_T}no" >&6
1448 test -n "$ac_ct_CC" && break
1456 test -z "$CC" && { { echo "$as_me:1456: error: no acceptable cc found in \$PATH" >&5
1457 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1458 { (exit 1); exit 1; }; }
1460 # Provide some information about the compiler.
1461 echo "$as_me:1461:" \
1462 "checking for C compiler version" >&5
1463 ac_compiler=`set X $ac_compile; echo "$2"`
1464 { (eval echo "$as_me:1464: \"$ac_compiler --version </dev/null >&5\"") >&5
1465 (eval $ac_compiler --version </dev/null >&5) 2>&5
1467 echo "$as_me:1467: \$? = $ac_status" >&5
1468 (exit "$ac_status"); }
1469 { (eval echo "$as_me:1469: \"$ac_compiler -v </dev/null >&5\"") >&5
1470 (eval $ac_compiler -v </dev/null >&5) 2>&5
1472 echo "$as_me:1472: \$? = $ac_status" >&5
1473 (exit "$ac_status"); }
1474 { (eval echo "$as_me:1474: \"$ac_compiler -V </dev/null >&5\"") >&5
1475 (eval $ac_compiler -V </dev/null >&5) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit "$ac_status"); }
1480 cat >"conftest.$ac_ext" <<_ACEOF
1481 #line 1481 "configure"
1482 #include "confdefs.h"
1492 ac_clean_files_save=$ac_clean_files
1493 ac_clean_files="$ac_clean_files a.out a.exe"
1494 # Try to create an executable without -o first, disregard a.out.
1495 # It will help us diagnose broken compilers, and finding out an intuition
1497 echo "$as_me:1497: checking for C compiler default output" >&5
1498 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1499 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1500 if { (eval echo "$as_me:1500: \"$ac_link_default\"") >&5
1501 (eval $ac_link_default) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit "$ac_status"); }; then
1505 # Find the output, starting from the most likely. This scheme is
1506 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1508 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1509 ls a.out conftest 2>/dev/null;
1510 ls a.* conftest.* 2>/dev/null`; do
1512 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1513 a.out ) # We found the default executable, but exeext='' is most
1516 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1517 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1524 echo "$as_me: failed program was:" >&5
1525 cat "conftest.$ac_ext" >&5
1526 { { echo "$as_me:1526: error: C compiler cannot create executables" >&5
1527 echo "$as_me: error: C compiler cannot create executables" >&2;}
1528 { (exit 77); exit 77; }; }
1531 ac_exeext=$ac_cv_exeext
1532 echo "$as_me:1532: result: $ac_file" >&5
1533 echo "${ECHO_T}$ac_file" >&6
1535 # Check the compiler produces executables we can run. If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether the C compiler works" >&5
1538 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1539 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1540 # If not cross compiling, check that we can run a simple program.
1541 if test "$cross_compiling" != yes; then
1542 if { ac_try='./$ac_file'
1543 { (eval echo "$as_me:1543: \"$ac_try\"") >&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit "$ac_status"); }; }; then
1550 if test "$cross_compiling" = maybe; then
1553 { { echo "$as_me:1553: error: cannot run C compiled programs.
1554 If you meant to cross compile, use \`--host'." >&5
1555 echo "$as_me: error: cannot run C compiled programs.
1556 If you meant to cross compile, use \`--host'." >&2;}
1557 { (exit 1); exit 1; }; }
1561 echo "$as_me:1561: result: yes" >&5
1562 echo "${ECHO_T}yes" >&6
1564 rm -f a.out a.exe "conftest$ac_cv_exeext"
1565 ac_clean_files=$ac_clean_files_save
1566 # Check the compiler produces executables we can run. If not, either
1567 # the compiler is broken, or we cross compile.
1568 echo "$as_me:1568: checking whether we are cross compiling" >&5
1569 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1570 echo "$as_me:1570: result: $cross_compiling" >&5
1571 echo "${ECHO_T}$cross_compiling" >&6
1573 echo "$as_me:1573: checking for executable suffix" >&5
1574 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1575 if { (eval echo "$as_me:1575: \"$ac_link\"") >&5
1576 (eval $ac_link) 2>&5
1578 echo "$as_me:1578: \$? = $ac_status" >&5
1579 (exit "$ac_status"); }; then
1580 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1581 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1582 # work properly (i.e., refer to `conftest.exe'), while it won't with
1584 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1586 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1587 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1594 { { echo "$as_me:1594: error: cannot compute EXEEXT: cannot compile and link" >&5
1595 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1596 { (exit 1); exit 1; }; }
1599 rm -f "conftest$ac_cv_exeext"
1600 echo "$as_me:1600: result: $ac_cv_exeext" >&5
1601 echo "${ECHO_T}$ac_cv_exeext" >&6
1603 rm -f "conftest.$ac_ext"
1604 EXEEXT=$ac_cv_exeext
1606 echo "$as_me:1606: checking for object suffix" >&5
1607 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1608 if test "${ac_cv_objext+set}" = set; then
1609 echo $ECHO_N "(cached) $ECHO_C" >&6
1611 cat >"conftest.$ac_ext" <<_ACEOF
1612 #line 1612 "configure"
1613 #include "confdefs.h"
1623 rm -f conftest.o conftest.obj
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit "$ac_status"); }; then
1629 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1631 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1632 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1637 echo "$as_me: failed program was:" >&5
1638 cat "conftest.$ac_ext" >&5
1639 { { echo "$as_me:1639: error: cannot compute OBJEXT: cannot compile" >&5
1640 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1641 { (exit 1); exit 1; }; }
1644 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1646 echo "$as_me:1646: result: $ac_cv_objext" >&5
1647 echo "${ECHO_T}$ac_cv_objext" >&6
1648 OBJEXT=$ac_cv_objext
1650 echo "$as_me:1650: checking whether we are using the GNU C compiler" >&5
1651 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1652 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1653 echo $ECHO_N "(cached) $ECHO_C" >&6
1655 cat >"conftest.$ac_ext" <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1670 rm -f "conftest.$ac_objext"
1671 if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5
1672 (eval $ac_compile) 2>&5
1674 echo "$as_me:1674: \$? = $ac_status" >&5
1675 (exit "$ac_status"); } &&
1676 { ac_try='test -s "conftest.$ac_objext"'
1677 { (eval echo "$as_me:1677: \"$ac_try\"") >&5
1680 echo "$as_me:1680: \$? = $ac_status" >&5
1681 (exit "$ac_status"); }; }; then
1684 echo "$as_me: failed program was:" >&5
1685 cat "conftest.$ac_ext" >&5
1688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1689 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1692 echo "$as_me:1692: result: $ac_cv_c_compiler_gnu" >&5
1693 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1694 GCC=`test $ac_compiler_gnu = yes && echo yes`
1695 ac_test_CFLAGS=${CFLAGS+set}
1696 ac_save_CFLAGS=$CFLAGS
1698 echo "$as_me:1698: checking whether $CC accepts -g" >&5
1699 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1700 if test "${ac_cv_prog_cc_g+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
1703 cat >"conftest.$ac_ext" <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1715 rm -f "conftest.$ac_objext"
1716 if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5
1717 (eval $ac_compile) 2>&5
1719 echo "$as_me:1719: \$? = $ac_status" >&5
1720 (exit "$ac_status"); } &&
1721 { ac_try='test -s "conftest.$ac_objext"'
1722 { (eval echo "$as_me:1722: \"$ac_try\"") >&5
1725 echo "$as_me:1725: \$? = $ac_status" >&5
1726 (exit "$ac_status"); }; }; then
1729 echo "$as_me: failed program was:" >&5
1730 cat "conftest.$ac_ext" >&5
1733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1735 echo "$as_me:1735: result: $ac_cv_prog_cc_g" >&5
1736 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1737 if test "$ac_test_CFLAGS" = set; then
1738 CFLAGS=$ac_save_CFLAGS
1739 elif test $ac_cv_prog_cc_g = yes; then
1740 if test "$GCC" = yes; then
1746 if test "$GCC" = yes; then
1752 # Some people use a C++ compiler to compile C. Since we use `exit',
1753 # in C++ we need to declare it. In case someone uses the same compiler
1754 # for both compiling C and C++ we need to have the C++ compiler decide
1755 # the declaration of exit, since it's the most demanding environment.
1756 cat >"conftest.$ac_ext" <<_ACEOF
1761 rm -f "conftest.$ac_objext"
1762 if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
1763 (eval $ac_compile) 2>&5
1765 echo "$as_me:1765: \$? = $ac_status" >&5
1766 (exit "$ac_status"); } &&
1767 { ac_try='test -s "conftest.$ac_objext"'
1768 { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1771 echo "$as_me:1771: \$? = $ac_status" >&5
1772 (exit "$ac_status"); }; }; then
1773 for ac_declaration in \
1775 '#include <stdlib.h>' \
1776 'extern "C" void std::exit (int) throw (); using std::exit;' \
1777 'extern "C" void std::exit (int); using std::exit;' \
1778 'extern "C" void exit (int) throw ();' \
1779 'extern "C" void exit (int);' \
1782 cat >"conftest.$ac_ext" <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1795 rm -f "conftest.$ac_objext"
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit "$ac_status"); } &&
1801 { ac_try='test -s "conftest.$ac_objext"'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit "$ac_status"); }; }; then
1809 echo "$as_me: failed program was:" >&5
1810 cat "conftest.$ac_ext" >&5
1813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1814 cat >"conftest.$ac_ext" <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1826 rm -f "conftest.$ac_objext"
1827 if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5
1828 (eval $ac_compile) 2>&5
1830 echo "$as_me:1830: \$? = $ac_status" >&5
1831 (exit "$ac_status"); } &&
1832 { ac_try='test -s "conftest.$ac_objext"'
1833 { (eval echo "$as_me:1833: \"$ac_try\"") >&5
1836 echo "$as_me:1836: \$? = $ac_status" >&5
1837 (exit "$ac_status"); }; }; then
1840 echo "$as_me: failed program was:" >&5
1841 cat "conftest.$ac_ext" >&5
1843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 if test -n "$ac_declaration"; then
1847 echo '#ifdef __cplusplus' >>confdefs.h
1848 echo "$ac_declaration" >>confdefs.h
1849 echo '#endif' >>confdefs.h
1853 echo "$as_me: failed program was:" >&5
1854 cat "conftest.$ac_ext" >&5
1856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1858 ac_cpp='$CPP $CPPFLAGS'
1859 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1860 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862 ac_main_return="return"
1865 if test "$GCC" = yes ; then
1866 echo "$as_me:1866: checking version of $CC" >&5
1867 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1868 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.].*//'`"
1869 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1870 echo "$as_me:1870: result: $GCC_VERSION" >&5
1871 echo "${ECHO_T}$GCC_VERSION" >&6
1876 if test "$GCC" = yes ; then
1879 echo "$as_me:1879: checking if this is really Intel C compiler" >&5
1880 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1881 cf_save_CFLAGS="$CFLAGS"
1882 CFLAGS="$CFLAGS -no-gcc"
1883 cat >"conftest.$ac_ext" <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1891 #ifdef __INTEL_COMPILER
1900 rm -f "conftest.$ac_objext"
1901 if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
1902 (eval $ac_compile) 2>&5
1904 echo "$as_me:1904: \$? = $ac_status" >&5
1905 (exit "$ac_status"); } &&
1906 { ac_try='test -s "conftest.$ac_objext"'
1907 { (eval echo "$as_me:1907: \"$ac_try\"") >&5
1910 echo "$as_me:1910: \$? = $ac_status" >&5
1911 (exit "$ac_status"); }; }; then
1913 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1916 echo "$as_me: failed program was:" >&5
1917 cat "conftest.$ac_ext" >&5
1919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1920 CFLAGS="$cf_save_CFLAGS"
1921 echo "$as_me:1921: result: $INTEL_COMPILER" >&5
1922 echo "${ECHO_T}$INTEL_COMPILER" >&6
1929 if test "$GCC" = yes ; then
1930 echo "$as_me:1930: checking if this is really Clang C compiler" >&5
1931 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1932 cf_save_CFLAGS="$CFLAGS"
1933 cat >"conftest.$ac_ext" <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1950 rm -f "conftest.$ac_objext"
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952 (eval $ac_compile) 2>&5
1954 echo "$as_me:1954: \$? = $ac_status" >&5
1955 (exit "$ac_status"); } &&
1956 { ac_try='test -s "conftest.$ac_objext"'
1957 { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1960 echo "$as_me:1960: \$? = $ac_status" >&5
1961 (exit "$ac_status"); }; }; then
1965 echo "$as_me: failed program was:" >&5
1966 cat "conftest.$ac_ext" >&5
1968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1969 CFLAGS="$cf_save_CFLAGS"
1970 echo "$as_me:1970: result: $CLANG_COMPILER" >&5
1971 echo "${ECHO_T}$CLANG_COMPILER" >&6
1976 if test "x$CLANG_COMPILER" = "xyes" ; then
1978 (c[1-9][0-9]|*/c[1-9][0-9])
1979 { echo "$as_me:1979: WARNING: replacing broken compiler alias $CC" >&5
1980 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1981 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1986 echo "$as_me:1986: checking version of $CC" >&5
1987 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1988 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.].*//'`"
1989 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1990 echo "$as_me:1990: result: $CLANG_VERSION" >&5
1991 echo "${ECHO_T}$CLANG_VERSION" >&6
1993 for cf_clang_opt in \
1994 -Qunused-arguments \
1995 -Wno-error=implicit-function-declaration
1997 echo "$as_me:1997: checking if option $cf_clang_opt works" >&5
1998 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1999 cf_save_CFLAGS="$CFLAGS"
2000 CFLAGS="$CFLAGS $cf_clang_opt"
2001 cat >"conftest.$ac_ext" <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2010 printf("hello!\\n");
2015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2016 if { (eval echo "$as_me:2016: \"$ac_link\"") >&5
2017 (eval $ac_link) 2>&5
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit "$ac_status"); } &&
2021 { ac_try='test -s "conftest$ac_exeext"'
2022 { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2025 echo "$as_me:2025: \$? = $ac_status" >&5
2026 (exit "$ac_status"); }; }; then
2030 echo "$as_me: failed program was:" >&5
2031 cat "conftest.$ac_ext" >&5
2035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2036 echo "$as_me:2036: result: $cf_clang_optok" >&5
2037 echo "${ECHO_T}$cf_clang_optok" >&6
2038 CFLAGS="$cf_save_CFLAGS"
2039 if test "$cf_clang_optok" = yes; then
2040 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2042 echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5
2044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2045 CFLAGS="${CFLAGS}$cf_clang_opt"
2051 echo "$as_me:2051: checking for $CC option to accept ANSI C" >&5
2052 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2053 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2054 echo $ECHO_N "(cached) $ECHO_C" >&6
2056 ac_cv_prog_cc_stdc=no
2058 cat >"conftest.$ac_ext" <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2063 #include <sys/types.h>
2064 #include <sys/stat.h>
2065 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2066 struct buf { int x; };
2067 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2068 static char *e (p, i)
2074 static char *f (char * (*g) (char **, int), char **p, ...)
2079 s = g (p, va_arg (v,int));
2083 int test (int i, double x);
2084 struct s1 {int (*f) (int a);};
2085 struct s2 {int (*f) (double a);};
2086 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2092 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2097 # Don't try gcc -ansi; that turns off useful extensions and
2098 # breaks some systems' header files.
2099 # AIX -qlanglvl=ansi
2100 # Ultrix and OSF/1 -std1
2101 # HP-UX 10.20 and later -Ae
2102 # HP-UX older versions -Aa -D_HPUX_SOURCE
2103 # SVR4 -Xc -D__EXTENSIONS__
2104 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2106 CC="$ac_save_CC $ac_arg"
2107 rm -f "conftest.$ac_objext"
2108 if { (eval echo "$as_me:2108: \"$ac_compile\"") >&5
2109 (eval $ac_compile) 2>&5
2111 echo "$as_me:2111: \$? = $ac_status" >&5
2112 (exit "$ac_status"); } &&
2113 { ac_try='test -s "conftest.$ac_objext"'
2114 { (eval echo "$as_me:2114: \"$ac_try\"") >&5
2117 echo "$as_me:2117: \$? = $ac_status" >&5
2118 (exit "$ac_status"); }; }; then
2119 ac_cv_prog_cc_stdc=$ac_arg
2122 echo "$as_me: failed program was:" >&5
2123 cat "conftest.$ac_ext" >&5
2125 rm -f "conftest.$ac_objext"
2127 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2132 case "x$ac_cv_prog_cc_stdc" in
2134 echo "$as_me:2134: result: none needed" >&5
2135 echo "${ECHO_T}none needed" >&6 ;;
2137 echo "$as_me:2137: result: $ac_cv_prog_cc_stdc" >&5
2138 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2139 CC="$CC $ac_cv_prog_cc_stdc" ;;
2142 # This should have been defined by AC_PROG_CC
2145 echo "$as_me:2145: checking \$CFLAGS variable" >&5
2146 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2149 echo "$as_me:2149: result: broken" >&5
2150 echo "${ECHO_T}broken" >&6
2151 { echo "$as_me:2151: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2152 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2155 for cf_arg in $cf_flags
2161 cf_new_extra_cppflags=
2163 for cf_add_cflags in $cf_arg
2165 case "$cf_fix_cppflags" in
2167 case "$cf_add_cflags" in
2168 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2169 case "$cf_add_cflags" in
2171 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2174 && test -z "${cf_tst_cflags}" \
2175 && cf_fix_cppflags=yes
2177 if test "$cf_fix_cppflags" = yes ; then
2179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2183 elif test "${cf_tst_cflags}" = "\"'" ; then
2185 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2186 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2196 case "$cf_add_cflags" in
2198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2200 CPPFLAGS=`echo "$CPPFLAGS" | \
2201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2207 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2208 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2215 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2216 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2226 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2229 && test -z "${cf_tst_cflags}" \
2230 && cf_fix_cppflags=no
2235 if test -n "$cf_new_cflags" ; then
2237 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2238 CFLAGS="${CFLAGS}$cf_new_cflags"
2242 if test -n "$cf_new_cppflags" ; then
2244 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2245 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2249 if test -n "$cf_new_extra_cppflags" ; then
2251 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2252 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2259 echo "$as_me:2259: result: ok" >&5
2260 echo "${ECHO_T}ok" >&6
2264 echo "$as_me:2264: checking \$CC variable" >&5
2265 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2268 echo "$as_me:2268: result: broken" >&5
2269 echo "${ECHO_T}broken" >&6
2270 { echo "$as_me:2270: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2271 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2273 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2274 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2276 for cf_arg in $cf_flags
2284 cf_new_extra_cppflags=
2286 for cf_add_cflags in $cf_arg
2288 case "$cf_fix_cppflags" in
2290 case "$cf_add_cflags" in
2291 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2292 case "$cf_add_cflags" in
2294 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2296 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2297 && test -z "${cf_tst_cflags}" \
2298 && cf_fix_cppflags=yes
2300 if test "$cf_fix_cppflags" = yes ; then
2302 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2303 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2306 elif test "${cf_tst_cflags}" = "\"'" ; then
2308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2319 case "$cf_add_cflags" in
2321 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2323 CPPFLAGS=`echo "$CPPFLAGS" | \
2324 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2325 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2330 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2331 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2338 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2339 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2349 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2351 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2352 && test -z "${cf_tst_cflags}" \
2353 && cf_fix_cppflags=no
2358 if test -n "$cf_new_cflags" ; then
2360 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2361 CFLAGS="${CFLAGS}$cf_new_cflags"
2365 if test -n "$cf_new_cppflags" ; then
2367 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2368 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2372 if test -n "$cf_new_extra_cppflags" ; then
2374 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2375 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2385 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2387 echo "${as_me:-configure}:2387: testing resulting CC: '$CC' ..." 1>&5
2389 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2391 echo "${as_me:-configure}:2391: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2393 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2395 echo "${as_me:-configure}:2395: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2399 echo "$as_me:2399: result: ok" >&5
2400 echo "${ECHO_T}ok" >&6
2404 echo "$as_me:2404: checking for inline" >&5
2405 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2406 if test "${ac_cv_c_inline+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2410 for ac_kw in inline __inline__ __inline; do
2411 cat >"conftest.$ac_ext" <<_ACEOF
2412 #line 2412 "configure"
2413 #include "confdefs.h"
2415 static $ac_kw int static_foo () {return 0; }
2416 $ac_kw int foo () {return 0; }
2420 rm -f "conftest.$ac_objext"
2421 if { (eval echo "$as_me:2421: \"$ac_compile\"") >&5
2422 (eval $ac_compile) 2>&5
2424 echo "$as_me:2424: \$? = $ac_status" >&5
2425 (exit "$ac_status"); } &&
2426 { ac_try='test -s "conftest.$ac_objext"'
2427 { (eval echo "$as_me:2427: \"$ac_try\"") >&5
2430 echo "$as_me:2430: \$? = $ac_status" >&5
2431 (exit "$ac_status"); }; }; then
2432 ac_cv_c_inline=$ac_kw; break
2434 echo "$as_me: failed program was:" >&5
2435 cat "conftest.$ac_ext" >&5
2437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2441 echo "$as_me:2441: result: $ac_cv_c_inline" >&5
2442 echo "${ECHO_T}$ac_cv_c_inline" >&6
2443 case $ac_cv_c_inline in
2446 cat >>confdefs.h <<\EOF
2450 *) cat >>confdefs.h <<EOF
2451 #define inline $ac_cv_c_inline
2456 for ac_prog in ggrep grep
2458 # Extract the first word of "$ac_prog", so it can be a program name with args.
2459 set dummy $ac_prog; ac_word=$2
2460 echo "$as_me:2460: checking for $ac_word" >&5
2461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2462 if test "${ac_cv_prog_GREP+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2465 if test -n "$GREP"; then
2466 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2468 ac_save_IFS=$IFS; IFS=$ac_path_separator
2470 for ac_dir in $ac_dummy; do
2472 test -z "$ac_dir" && ac_dir=.
2473 $as_executable_p "$ac_dir/$ac_word" || continue
2474 ac_cv_prog_GREP="$ac_prog"
2475 echo "$as_me:2475: found $ac_dir/$ac_word" >&5
2481 GREP=$ac_cv_prog_GREP
2482 if test -n "$GREP"; then
2483 echo "$as_me:2483: result: $GREP" >&5
2484 echo "${ECHO_T}$GREP" >&6
2486 echo "$as_me:2486: result: no" >&5
2487 echo "${ECHO_T}no" >&6
2490 test -n "$GREP" && break
2492 test -n "$GREP" || GREP=": "
2494 echo "$as_me:2494: checking for egrep" >&5
2495 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2496 if test "${ac_cv_path_EGREP+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2499 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2500 then ac_cv_path_EGREP="$GREP -E"
2502 for ac_prog in gegrep egrep
2504 # Extract the first word of "$ac_prog", so it can be a program name with args.
2505 set dummy $ac_prog; ac_word=$2
2506 echo "$as_me:2506: checking for $ac_word" >&5
2507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2508 if test "${ac_cv_path_EGREP+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2513 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2516 ac_save_IFS=$IFS; IFS=$ac_path_separator
2518 for ac_dir in $ac_dummy; do
2520 test -z "$ac_dir" && ac_dir=.
2521 if $as_executable_p "$ac_dir/$ac_word"; then
2522 ac_cv_path_EGREP="$ac_dir/$ac_word"
2523 echo "$as_me:2523: found $ac_dir/$ac_word" >&5
2531 EGREP=$ac_cv_path_EGREP
2533 if test -n "$EGREP"; then
2534 echo "$as_me:2534: result: $EGREP" >&5
2535 echo "${ECHO_T}$EGREP" >&6
2537 echo "$as_me:2537: result: no" >&5
2538 echo "${ECHO_T}no" >&6
2541 test -n "$EGREP" && break
2543 test -n "$EGREP" || EGREP=": "
2545 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2545: error: cannot find workable egrep" >&5
2546 echo "$as_me: error: cannot find workable egrep" >&2;}
2547 { (exit 1); exit 1; }; }
2550 echo "$as_me:2550: result: $ac_cv_path_EGREP" >&5
2551 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2552 EGREP="$ac_cv_path_EGREP"
2555 ac_cpp='$CPP $CPPFLAGS'
2556 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2557 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2558 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2559 ac_main_return="return"
2560 echo "$as_me:2560: checking how to run the C preprocessor" >&5
2561 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2562 # On Suns, sometimes $CPP names a directory.
2563 if test -n "$CPP" && test -d "$CPP"; then
2566 if test -z "$CPP"; then
2567 if test "${ac_cv_prog_CPP+set}" = set; then
2568 echo $ECHO_N "(cached) $ECHO_C" >&6
2570 # Double quotes because CPP needs to be expanded
2571 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2574 for ac_c_preproc_warn_flag in '' yes
2576 # Use a header file that comes with gcc, so configuring glibc
2577 # with a fresh cross-compiler works.
2578 # On the NeXT, cc -E runs the code through the compiler's parser,
2579 # not just through cpp. "Syntax error" is here to catch this case.
2580 cat >"conftest.$ac_ext" <<_ACEOF
2581 #line 2581 "configure"
2582 #include "confdefs.h"
2586 if { (eval echo "$as_me:2586: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2587 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2589 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2591 cat conftest.err >&5
2592 echo "$as_me:2592: \$? = $ac_status" >&5
2593 (exit "$ac_status"); } >/dev/null; then
2594 if test -s conftest.err; then
2595 ac_cpp_err=$ac_c_preproc_warn_flag
2602 if test -z "$ac_cpp_err"; then
2605 echo "$as_me: failed program was:" >&5
2606 cat "conftest.$ac_ext" >&5
2607 # Broken: fails on valid input.
2610 rm -f conftest.err "conftest.$ac_ext"
2612 # OK, works on sane cases. Now check whether non-existent headers
2613 # can be detected and how.
2614 cat >"conftest.$ac_ext" <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2619 if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2622 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2624 cat conftest.err >&5
2625 echo "$as_me:2625: \$? = $ac_status" >&5
2626 (exit "$ac_status"); } >/dev/null; then
2627 if test -s conftest.err; then
2628 ac_cpp_err=$ac_c_preproc_warn_flag
2635 if test -z "$ac_cpp_err"; then
2636 # Broken: success on invalid input.
2639 echo "$as_me: failed program was:" >&5
2640 cat "conftest.$ac_ext" >&5
2641 # Passes both tests.
2645 rm -f conftest.err "conftest.$ac_ext"
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err "conftest.$ac_ext"
2650 if $ac_preproc_ok; then
2662 echo "$as_me:2662: result: $CPP" >&5
2663 echo "${ECHO_T}$CPP" >&6
2665 for ac_c_preproc_warn_flag in '' yes
2667 # Use a header file that comes with gcc, so configuring glibc
2668 # with a fresh cross-compiler works.
2669 # On the NeXT, cc -E runs the code through the compiler's parser,
2670 # not just through cpp. "Syntax error" is here to catch this case.
2671 cat >"conftest.$ac_ext" <<_ACEOF
2672 #line 2672 "configure"
2673 #include "confdefs.h"
2677 if { (eval echo "$as_me:2677: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2678 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2680 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2682 cat conftest.err >&5
2683 echo "$as_me:2683: \$? = $ac_status" >&5
2684 (exit "$ac_status"); } >/dev/null; then
2685 if test -s conftest.err; then
2686 ac_cpp_err=$ac_c_preproc_warn_flag
2693 if test -z "$ac_cpp_err"; then
2696 echo "$as_me: failed program was:" >&5
2697 cat "conftest.$ac_ext" >&5
2698 # Broken: fails on valid input.
2701 rm -f conftest.err "conftest.$ac_ext"
2703 # OK, works on sane cases. Now check whether non-existent headers
2704 # can be detected and how.
2705 cat >"conftest.$ac_ext" <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <ac_nonexistent.h>
2710 if { (eval echo "$as_me:2710: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2711 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2713 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2715 cat conftest.err >&5
2716 echo "$as_me:2716: \$? = $ac_status" >&5
2717 (exit "$ac_status"); } >/dev/null; then
2718 if test -s conftest.err; then
2719 ac_cpp_err=$ac_c_preproc_warn_flag
2726 if test -z "$ac_cpp_err"; then
2727 # Broken: success on invalid input.
2730 echo "$as_me: failed program was:" >&5
2731 cat "conftest.$ac_ext" >&5
2732 # Passes both tests.
2736 rm -f conftest.err "conftest.$ac_ext"
2739 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2740 rm -f conftest.err "conftest.$ac_ext"
2741 if $ac_preproc_ok; then
2744 { { echo "$as_me:2744: error: C preprocessor \"$CPP\" fails sanity check" >&5
2745 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2746 { (exit 1); exit 1; }; }
2750 ac_cpp='$CPP $CPPFLAGS'
2751 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2752 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2753 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2754 ac_main_return="return"
2756 for ac_prog in mawk gawk nawk awk
2758 # Extract the first word of "$ac_prog", so it can be a program name with args.
2759 set dummy $ac_prog; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_prog_AWK+set}" = set; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2765 if test -n "$AWK"; then
2766 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2768 ac_save_IFS=$IFS; IFS=$ac_path_separator
2770 for ac_dir in $ac_dummy; do
2772 test -z "$ac_dir" && ac_dir=.
2773 $as_executable_p "$ac_dir/$ac_word" || continue
2774 ac_cv_prog_AWK="$ac_prog"
2775 echo "$as_me:2775: found $ac_dir/$ac_word" >&5
2782 if test -n "$AWK"; then
2783 echo "$as_me:2783: result: $AWK" >&5
2784 echo "${ECHO_T}$AWK" >&6
2786 echo "$as_me:2786: result: no" >&5
2787 echo "${ECHO_T}no" >&6
2790 test -n "$AWK" && break
2793 # Find a good install program. We prefer a C program (faster),
2794 # so one script is as good as another. But avoid the broken or
2795 # incompatible versions:
2796 # SysV /etc/install, /usr/sbin/install
2797 # SunOS /usr/etc/install
2798 # IRIX /sbin/install
2800 # AmigaOS /C/install, which installs bootblocks on floppy discs
2801 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2802 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2803 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2804 # ./install, which can be erroneously created by make from ./install.sh.
2805 echo "$as_me:2805: checking for a BSD compatible install" >&5
2806 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2807 if test -z "$INSTALL"; then
2808 if test "${ac_cv_path_install+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2811 ac_save_IFS=$IFS; IFS=$ac_path_separator
2812 for ac_dir in $PATH; do
2814 # Account for people who put trailing slashes in PATH elements.
2816 / | ./ | .// | /cC/* \
2817 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2820 # OSF1 and SCO ODT 3.0 have their own names for install.
2821 # Don't use installbsd from OSF since it installs stuff as root
2823 for ac_prog in ginstall scoinst install; do
2824 if $as_executable_p "$ac_dir/$ac_prog"; then
2825 if test $ac_prog = install &&
2826 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2827 # AIX install. It has an incompatible calling convention.
2829 elif test $ac_prog = install &&
2830 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2831 # program-specific install script used by HP pwplus--don't use.
2834 ac_cv_path_install="$ac_dir/$ac_prog -c"
2844 if test "${ac_cv_path_install+set}" = set; then
2845 INSTALL=$ac_cv_path_install
2847 # As a last resort, use the slow shell script. We don't cache a
2848 # path for INSTALL within a source directory, because that will
2849 # break other packages using the cache if that directory is
2850 # removed, or if the path is relative.
2851 INSTALL=$ac_install_sh
2854 echo "$as_me:2854: result: $INSTALL" >&5
2855 echo "${ECHO_T}$INSTALL" >&6
2857 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2858 # It thinks the first close brace ends the variable substitution.
2859 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2861 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2863 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2869 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2870 test -z "$cf_dir" && cf_dir=.
2871 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2875 echo "$as_me:2875: checking if you want to install stripped executables" >&5
2876 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2878 # Check whether --enable-stripping or --disable-stripping was given.
2879 if test "${enable_stripping+set}" = set; then
2880 enableval="$enable_stripping"
2881 test "$enableval" != no && enableval=yes
2882 if test "$enableval" != "yes" ; then
2885 enable_stripping=yes
2889 enable_stripping=yes
2892 echo "$as_me:2892: result: $enable_stripping" >&5
2893 echo "${ECHO_T}$enable_stripping" >&6
2895 if test "$enable_stripping" = yes
2902 : "${INSTALL:=install}"
2903 echo "$as_me:2903: checking if install accepts -p option" >&5
2904 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2905 if test "${cf_cv_install_p+set}" = set; then
2906 echo $ECHO_N "(cached) $ECHO_C" >&6
2913 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2915 if test -f conftest.out/conftest.in
2917 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2918 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2919 if test -s conftest.err
2934 echo "$as_me:2934: result: $cf_cv_install_p" >&5
2935 echo "${ECHO_T}$cf_cv_install_p" >&6
2937 echo "$as_me:2937: checking if install needs to be told about ownership" >&5
2938 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2939 case `$ac_config_guess` in
2948 echo "$as_me:2948: result: $with_install_o" >&5
2949 echo "${ECHO_T}$with_install_o" >&6
2950 if test "x$with_install_o" = xyes
2952 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
2957 for ac_prog in lint cppcheck splint
2959 # Extract the first word of "$ac_prog", so it can be a program name with args.
2960 set dummy $ac_prog; ac_word=$2
2961 echo "$as_me:2961: checking for $ac_word" >&5
2962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2963 if test "${ac_cv_prog_LINT+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2966 if test -n "$LINT"; then
2967 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2969 ac_save_IFS=$IFS; IFS=$ac_path_separator
2971 for ac_dir in $ac_dummy; do
2973 test -z "$ac_dir" && ac_dir=.
2974 $as_executable_p "$ac_dir/$ac_word" || continue
2975 ac_cv_prog_LINT="$ac_prog"
2976 echo "$as_me:2976: found $ac_dir/$ac_word" >&5
2982 LINT=$ac_cv_prog_LINT
2983 if test -n "$LINT"; then
2984 echo "$as_me:2984: result: $LINT" >&5
2985 echo "${ECHO_T}$LINT" >&6
2987 echo "$as_me:2987: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2991 test -n "$LINT" && break
2995 (xcppcheck|x*/cppcheck)
2996 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3000 echo "$as_me:3000: checking for \".PHONY\" make-support" >&5
3001 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3002 if test "${cf_cv_make_PHONY+set}" = set; then
3003 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 mkdir conftest || exit 1
3010 cat >makefile <<'CF_EOF'
3014 @echo "** making $@ $(DATA)"
3016 @echo "** making $@ $(DATA)"
3018 @echo "** making $@ $(DATA)"
3021 @echo "** making $@ $(DATA)"
3024 for cf_data in 1 2 3
3026 ${MAKE:-make} always DATA=$cf_data
3027 ${MAKE:-make} once DATA=$cf_data
3028 ${MAKE:-make} -t always once
3029 if test -f always ; then
3030 echo "no (case 1)" > ../conftest.tmp
3031 elif test ! -f always.out ; then
3032 echo "no (case 2)" > ../conftest.tmp
3033 elif test ! -f once.out ; then
3034 echo "no (case 3)" > ../conftest.tmp
3035 elif ! cmp -s always.out once.out ; then
3036 echo "no (case 4)" > ../conftest.tmp
3037 diff always.out once.out
3039 cf_check="`cat always.out`"
3040 if test "x$cf_check" != "x$cf_data" ; then
3041 echo "no (case 5)" > ../conftest.tmp
3043 echo yes > ../conftest.tmp
3051 cf_cv_make_PHONY="`cat conftest.tmp`"
3055 echo "$as_me:3055: result: $cf_cv_make_PHONY" >&5
3056 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3059 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3060 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3062 echo "$as_me:3062: checking if filesystem supports mixed-case filenames" >&5
3063 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3064 if test "${cf_cv_mixedcase+set}" = set; then
3065 echo $ECHO_N "(cached) $ECHO_C" >&6
3068 if test "$cross_compiling" = yes ; then
3069 case "$target_alias" in
3070 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3078 rm -f conftest CONFTEST
3080 if test -f CONFTEST ; then
3085 rm -f conftest CONFTEST
3089 echo "$as_me:3089: result: $cf_cv_mixedcase" >&5
3090 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3091 test "$cf_cv_mixedcase" = yes &&
3092 cat >>confdefs.h <<\EOF
3093 #define MIXEDCASE_FILENAMES 1
3096 for ac_prog in exctags ctags
3098 # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_CTAGS+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3105 if test -n "$CTAGS"; then
3106 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3108 ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 for ac_dir in $ac_dummy; do
3112 test -z "$ac_dir" && ac_dir=.
3113 $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_CTAGS="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3121 CTAGS=$ac_cv_prog_CTAGS
3122 if test -n "$CTAGS"; then
3123 echo "$as_me:3123: result: $CTAGS" >&5
3124 echo "${ECHO_T}$CTAGS" >&6
3126 echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3130 test -n "$CTAGS" && break
3133 for ac_prog in exetags etags
3135 # Extract the first word of "$ac_prog", so it can be a program name with args.
3136 set dummy $ac_prog; ac_word=$2
3137 echo "$as_me:3137: checking for $ac_word" >&5
3138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3139 if test "${ac_cv_prog_ETAGS+set}" = set; then
3140 echo $ECHO_N "(cached) $ECHO_C" >&6
3142 if test -n "$ETAGS"; then
3143 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3145 ac_save_IFS=$IFS; IFS=$ac_path_separator
3147 for ac_dir in $ac_dummy; do
3149 test -z "$ac_dir" && ac_dir=.
3150 $as_executable_p "$ac_dir/$ac_word" || continue
3151 ac_cv_prog_ETAGS="$ac_prog"
3152 echo "$as_me:3152: found $ac_dir/$ac_word" >&5
3158 ETAGS=$ac_cv_prog_ETAGS
3159 if test -n "$ETAGS"; then
3160 echo "$as_me:3160: result: $ETAGS" >&5
3161 echo "${ECHO_T}$ETAGS" >&6
3163 echo "$as_me:3163: result: no" >&5
3164 echo "${ECHO_T}no" >&6
3167 test -n "$ETAGS" && break
3170 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3171 set dummy ${CTAGS:-ctags}; ac_word=$2
3172 echo "$as_me:3172: checking for $ac_word" >&5
3173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3174 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3175 echo $ECHO_N "(cached) $ECHO_C" >&6
3177 if test -n "$MAKE_LOWER_TAGS"; then
3178 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3180 ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 for ac_dir in $ac_dummy; do
3184 test -z "$ac_dir" && ac_dir=.
3185 $as_executable_p "$ac_dir/$ac_word" || continue
3186 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3187 echo "$as_me:3187: found $ac_dir/$ac_word" >&5
3191 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3194 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3195 if test -n "$MAKE_LOWER_TAGS"; then
3196 echo "$as_me:3196: result: $MAKE_LOWER_TAGS" >&5
3197 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3199 echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3203 if test "$cf_cv_mixedcase" = yes ; then
3204 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3205 set dummy ${ETAGS:-etags}; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
3211 if test -n "$MAKE_UPPER_TAGS"; then
3212 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3214 ac_save_IFS=$IFS; IFS=$ac_path_separator
3216 for ac_dir in $ac_dummy; do
3218 test -z "$ac_dir" && ac_dir=.
3219 $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3225 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3228 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3229 if test -n "$MAKE_UPPER_TAGS"; then
3230 echo "$as_me:3230: result: $MAKE_UPPER_TAGS" >&5
3231 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3233 echo "$as_me:3233: result: no" >&5
3234 echo "${ECHO_T}no" >&6
3241 if test "$MAKE_UPPER_TAGS" = yes ; then
3247 if test "$MAKE_LOWER_TAGS" = yes ; then
3253 echo "$as_me:3253: checking if -lm needed for math functions" >&5
3254 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3255 if test "${cf_cv_need_libm+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
3259 cat >"conftest.$ac_ext" <<_ACEOF
3260 #line 3260 "configure"
3261 #include "confdefs.h"
3270 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3276 if { (eval echo "$as_me:3276: \"$ac_link\"") >&5
3277 (eval $ac_link) 2>&5
3279 echo "$as_me:3279: \$? = $ac_status" >&5
3280 (exit "$ac_status"); } &&
3281 { ac_try='test -s "conftest$ac_exeext"'
3282 { (eval echo "$as_me:3282: \"$ac_try\"") >&5
3285 echo "$as_me:3285: \$? = $ac_status" >&5
3286 (exit "$ac_status"); }; }; then
3289 echo "$as_me: failed program was:" >&5
3290 cat "conftest.$ac_ext" >&5
3293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3295 echo "$as_me:3295: result: $cf_cv_need_libm" >&5
3296 echo "${ECHO_T}$cf_cv_need_libm" >&6
3298 if test "$cf_cv_need_libm" = yes
3301 cf_save_LIBS="$LIBS"
3303 echo "$as_me:3303: checking if -lm is available for math functions" >&5
3304 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
3305 if test "${cf_cv_have_libm+set}" = set; then
3306 echo $ECHO_N "(cached) $ECHO_C" >&6
3309 cat >"conftest.$ac_ext" <<_ACEOF
3310 #line 3310 "configure"
3311 #include "confdefs.h"
3320 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3326 if { (eval echo "$as_me:3326: \"$ac_link\"") >&5
3327 (eval $ac_link) 2>&5
3329 echo "$as_me:3329: \$? = $ac_status" >&5
3330 (exit "$ac_status"); } &&
3331 { ac_try='test -s "conftest$ac_exeext"'
3332 { (eval echo "$as_me:3332: \"$ac_try\"") >&5
3335 echo "$as_me:3335: \$? = $ac_status" >&5
3336 (exit "$ac_status"); }; }; then
3339 echo "$as_me: failed program was:" >&5
3340 cat "conftest.$ac_ext" >&5
3343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3345 echo "$as_me:3345: result: $cf_cv_have_libm" >&5
3346 echo "${ECHO_T}$cf_cv_have_libm" >&6
3347 LIBS="$cf_save_LIBS"
3349 if test "$cf_cv_have_libm" = yes
3357 if test "$cf_cv_have_libm" = yes
3360 cat >>confdefs.h <<\EOF
3361 #define HAVE_MATH_FUNCS 1
3369 CC_SHARED_OPTS=unknown
3370 CPPFLAGS="$CPPFLAGS"
3372 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3373 DFT_UPR_MODEL="NORMAL"
3386 PACKAGE="ncurses-examples"
3392 TINFO_LIBS='$(LIBS_CURSES)'
3393 cf_cv_abi_version=""
3394 cf_cv_rel_version=""
3400 echo "$as_me:3400: checking for fgrep" >&5
3401 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3402 if test "${ac_cv_path_FGREP+set}" = set; then
3403 echo $ECHO_N "(cached) $ECHO_C" >&6
3405 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3406 then ac_cv_path_FGREP="$GREP -F"
3408 for ac_prog in gfgrep fgrep
3410 # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 echo "$as_me:3412: checking for $ac_word" >&5
3413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3414 if test "${ac_cv_path_FGREP+set}" = set; then
3415 echo $ECHO_N "(cached) $ECHO_C" >&6
3419 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3422 ac_save_IFS=$IFS; IFS=$ac_path_separator
3424 for ac_dir in $ac_dummy; do
3426 test -z "$ac_dir" && ac_dir=.
3427 if $as_executable_p "$ac_dir/$ac_word"; then
3428 ac_cv_path_FGREP="$ac_dir/$ac_word"
3429 echo "$as_me:3429: found $ac_dir/$ac_word" >&5
3437 FGREP=$ac_cv_path_FGREP
3439 if test -n "$FGREP"; then
3440 echo "$as_me:3440: result: $FGREP" >&5
3441 echo "${ECHO_T}$FGREP" >&6
3443 echo "$as_me:3443: result: no" >&5
3444 echo "${ECHO_T}no" >&6
3447 test -n "$FGREP" && break
3449 test -n "$FGREP" || FGREP=": "
3451 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3451: error: cannot find workable fgrep" >&5
3452 echo "$as_me: error: cannot find workable fgrep" >&2;}
3453 { (exit 1); exit 1; }; }
3456 echo "$as_me:3456: result: $ac_cv_path_FGREP" >&5
3457 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3458 FGREP="$ac_cv_path_FGREP"
3460 echo "$as_me:3460: checking if you want to use C11 _Noreturn feature" >&5
3461 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3463 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3464 if test "${enable_stdnoreturn+set}" = set; then
3465 enableval="$enable_stdnoreturn"
3466 test "$enableval" != yes && enableval=no
3467 if test "$enableval" != "no" ; then
3468 enable_stdnoreturn=yes
3470 enable_stdnoreturn=no
3474 enable_stdnoreturn=no
3477 echo "$as_me:3477: result: $enable_stdnoreturn" >&5
3478 echo "${ECHO_T}$enable_stdnoreturn" >&6
3480 if test $enable_stdnoreturn = yes; then
3481 echo "$as_me:3481: checking for C11 _Noreturn feature" >&5
3482 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3483 if test "${cf_cv_c11_noreturn+set}" = set; then
3484 echo $ECHO_N "(cached) $ECHO_C" >&6
3486 cat >"conftest.$ac_ext" <<_ACEOF
3487 #line 3487 "configure"
3488 #include "confdefs.h"
3492 #include <stdnoreturn.h>
3493 static _Noreturn void giveup(void) { exit(0); }
3498 if (feof(stdin)) giveup()
3503 rm -f "conftest.$ac_objext"
3504 if { (eval echo "$as_me:3504: \"$ac_compile\"") >&5
3505 (eval $ac_compile) 2>&5
3507 echo "$as_me:3507: \$? = $ac_status" >&5
3508 (exit "$ac_status"); } &&
3509 { ac_try='test -s "conftest.$ac_objext"'
3510 { (eval echo "$as_me:3510: \"$ac_try\"") >&5
3513 echo "$as_me:3513: \$? = $ac_status" >&5
3514 (exit "$ac_status"); }; }; then
3515 cf_cv_c11_noreturn=yes
3517 echo "$as_me: failed program was:" >&5
3518 cat "conftest.$ac_ext" >&5
3519 cf_cv_c11_noreturn=no
3521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3524 echo "$as_me:3524: result: $cf_cv_c11_noreturn" >&5
3525 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3527 cf_cv_c11_noreturn=no,
3530 if test "$cf_cv_c11_noreturn" = yes; then
3532 cat >>confdefs.h <<\EOF
3533 #define HAVE_STDNORETURN_H 1
3536 cat >>confdefs.h <<EOF
3537 #define STDC_NORETURN _Noreturn
3540 HAVE_STDNORETURN_H=1
3542 HAVE_STDNORETURN_H=0
3545 if test "$GCC" = yes || test "$GXX" = yes
3547 cat > conftest.i <<EOF
3549 #define GCC_PRINTF 0
3554 #ifndef GCC_NORETURN
3555 #define GCC_NORETURN /* nothing */
3558 #define GCC_UNUSED /* nothing */
3561 if test "$GCC" = yes
3563 { echo "$as_me:3563: checking for $CC __attribute__ directives..." >&5
3564 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3565 cat > "conftest.$ac_ext" <<EOF
3566 #line 3566 "${as_me:-configure}"
3568 #include "confdefs.h"
3569 #include "conftest.h"
3570 #include "conftest.i"
3572 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3574 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3577 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3579 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3581 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3582 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3583 extern GCC_NORETURN void foo(void);
3584 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3586 cf_printf_attribute=no
3587 cf_scanf_attribute=no
3588 for cf_attribute in scanf printf unused noreturn
3591 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3593 cf_directive="__attribute__(($cf_attribute))"
3594 echo "checking for $CC $cf_directive" 1>&5
3596 case "$cf_attribute" in
3598 cf_printf_attribute=yes
3599 cat >conftest.h <<EOF
3600 #define GCC_$cf_ATTRIBUTE 1
3604 cf_scanf_attribute=yes
3605 cat >conftest.h <<EOF
3606 #define GCC_$cf_ATTRIBUTE 1
3610 cat >conftest.h <<EOF
3611 #define GCC_$cf_ATTRIBUTE $cf_directive
3616 if { (eval echo "$as_me:3616: \"$ac_compile\"") >&5
3617 (eval $ac_compile) 2>&5
3619 echo "$as_me:3619: \$? = $ac_status" >&5
3620 (exit "$ac_status"); }; then
3621 test -n "$verbose" && echo "$as_me:3621: result: ... $cf_attribute" >&5
3622 echo "${ECHO_T}... $cf_attribute" >&6
3623 cat conftest.h >>confdefs.h
3624 case "$cf_attribute" in
3627 cat >>confdefs.h <<EOF
3628 #define GCC_NORETURN $cf_directive
3633 cf_value='/* nothing */'
3634 if test "$cf_printf_attribute" != no ; then
3635 cf_value='__attribute__((format(printf,fmt,var)))'
3637 cat >>confdefs.h <<\EOF
3638 #define GCC_PRINTF 1
3643 cat >>confdefs.h <<EOF
3644 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3649 cf_value='/* nothing */'
3650 if test "$cf_scanf_attribute" != no ; then
3651 cf_value='__attribute__((format(scanf,fmt,var)))'
3653 cat >>confdefs.h <<\EOF
3659 cat >>confdefs.h <<EOF
3660 #define GCC_SCANFLIKE(fmt,var) $cf_value
3666 cat >>confdefs.h <<EOF
3667 #define GCC_UNUSED $cf_directive
3675 ${FGREP-fgrep} define conftest.i >>confdefs.h
3680 echo "$as_me:3680: checking if you want to work around bogus compiler/loader warnings" >&5
3681 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3683 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3684 if test "${enable_string_hacks+set}" = set; then
3685 enableval="$enable_string_hacks"
3686 enable_string_hacks=$enableval
3688 enable_string_hacks=no
3690 echo "$as_me:3690: result: $enable_string_hacks" >&5
3691 echo "${ECHO_T}$enable_string_hacks" >&6
3693 if test "x$enable_string_hacks" = "xyes"; then
3695 cat >>confdefs.h <<\EOF
3696 #define USE_STRING_HACKS 1
3699 { echo "$as_me:3699: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3700 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3701 echo "$as_me:3701: checking for strlcat" >&5
3702 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3703 if test "${ac_cv_func_strlcat+set}" = set; then
3704 echo $ECHO_N "(cached) $ECHO_C" >&6
3706 cat >"conftest.$ac_ext" <<_ACEOF
3707 #line 3707 "configure"
3708 #include "confdefs.h"
3709 #define strlcat autoconf_temporary
3710 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3717 /* We use char because int might match the return type of a gcc2
3718 builtin and then its argument prototype would still apply. */
3719 char strlcat (void);
3725 /* The GNU C library defines stubs for functions which it implements
3726 to always fail with ENOSYS. Some functions are actually named
3727 something starting with __ and the normal name is an alias. */
3728 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3729 #error found stub for strlcat
3737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3738 if { (eval echo "$as_me:3738: \"$ac_link\"") >&5
3739 (eval $ac_link) 2>&5
3741 echo "$as_me:3741: \$? = $ac_status" >&5
3742 (exit "$ac_status"); } &&
3743 { ac_try='test -s "conftest$ac_exeext"'
3744 { (eval echo "$as_me:3744: \"$ac_try\"") >&5
3747 echo "$as_me:3747: \$? = $ac_status" >&5
3748 (exit "$ac_status"); }; }; then
3749 ac_cv_func_strlcat=yes
3751 echo "$as_me: failed program was:" >&5
3752 cat "conftest.$ac_ext" >&5
3753 ac_cv_func_strlcat=no
3755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3757 echo "$as_me:3757: result: $ac_cv_func_strlcat" >&5
3758 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3759 if test "$ac_cv_func_strlcat" = yes; then
3761 cat >>confdefs.h <<\EOF
3762 #define HAVE_STRLCAT 1
3767 echo "$as_me:3767: checking for strlcat in -lbsd" >&5
3768 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3769 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3770 echo $ECHO_N "(cached) $ECHO_C" >&6
3772 ac_check_lib_save_LIBS=$LIBS
3774 cat >"conftest.$ac_ext" <<_ACEOF
3775 #line 3775 "configure"
3776 #include "confdefs.h"
3778 /* Override any gcc2 internal prototype to avoid an error. */
3782 /* We use char because int might match the return type of a gcc2
3783 builtin and then its argument prototype would still apply. */
3793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3794 if { (eval echo "$as_me:3794: \"$ac_link\"") >&5
3795 (eval $ac_link) 2>&5
3797 echo "$as_me:3797: \$? = $ac_status" >&5
3798 (exit "$ac_status"); } &&
3799 { ac_try='test -s "conftest$ac_exeext"'
3800 { (eval echo "$as_me:3800: \"$ac_try\"") >&5
3803 echo "$as_me:3803: \$? = $ac_status" >&5
3804 (exit "$ac_status"); }; }; then
3805 ac_cv_lib_bsd_strlcat=yes
3807 echo "$as_me: failed program was:" >&5
3808 cat "conftest.$ac_ext" >&5
3809 ac_cv_lib_bsd_strlcat=no
3811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3812 LIBS=$ac_check_lib_save_LIBS
3814 echo "$as_me:3814: result: $ac_cv_lib_bsd_strlcat" >&5
3815 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3816 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3821 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3823 for cf_add_1lib in $cf_add_0lib; do
3824 for cf_add_2lib in $cf_add_libs; do
3825 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3830 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3834 for ac_header in bsd/string.h
3836 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3837 echo "$as_me:3837: checking for $ac_header" >&5
3838 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3840 echo $ECHO_N "(cached) $ECHO_C" >&6
3842 cat >"conftest.$ac_ext" <<_ACEOF
3843 #line 3843 "configure"
3844 #include "confdefs.h"
3845 #include <$ac_header>
3847 if { (eval echo "$as_me:3847: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3848 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3850 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3852 cat conftest.err >&5
3853 echo "$as_me:3853: \$? = $ac_status" >&5
3854 (exit "$ac_status"); } >/dev/null; then
3855 if test -s conftest.err; then
3856 ac_cpp_err=$ac_c_preproc_warn_flag
3863 if test -z "$ac_cpp_err"; then
3864 eval "$as_ac_Header=yes"
3866 echo "$as_me: failed program was:" >&5
3867 cat "conftest.$ac_ext" >&5
3868 eval "$as_ac_Header=no"
3870 rm -f conftest.err "conftest.$ac_ext"
3872 echo "$as_me:3872: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3873 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3874 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3875 cat >>confdefs.h <<EOF
3876 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3882 cat >>confdefs.h <<\EOF
3883 #define HAVE_STRLCAT 1
3890 for ac_func in strlcpy snprintf
3892 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3893 echo "$as_me:3893: checking for $ac_func" >&5
3894 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3895 if eval "test \"\${$as_ac_var+set}\" = set"; then
3896 echo $ECHO_N "(cached) $ECHO_C" >&6
3898 cat >"conftest.$ac_ext" <<_ACEOF
3899 #line 3899 "configure"
3900 #include "confdefs.h"
3901 #define $ac_func autoconf_temporary
3902 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3909 /* We use char because int might match the return type of a gcc2
3910 builtin and then its argument prototype would still apply. */
3911 char $ac_func (void);
3917 /* The GNU C library defines stubs for functions which it implements
3918 to always fail with ENOSYS. Some functions are actually named
3919 something starting with __ and the normal name is an alias. */
3920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3921 #error found stub for $ac_func
3929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3930 if { (eval echo "$as_me:3930: \"$ac_link\"") >&5
3931 (eval $ac_link) 2>&5
3933 echo "$as_me:3933: \$? = $ac_status" >&5
3934 (exit "$ac_status"); } &&
3935 { ac_try='test -s "conftest$ac_exeext"'
3936 { (eval echo "$as_me:3936: \"$ac_try\"") >&5
3939 echo "$as_me:3939: \$? = $ac_status" >&5
3940 (exit "$ac_status"); }; }; then
3941 eval "$as_ac_var=yes"
3943 echo "$as_me: failed program was:" >&5
3944 cat "conftest.$ac_ext" >&5
3945 eval "$as_ac_var=no"
3947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3949 echo "$as_me:3949: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3950 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3951 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3952 cat >>confdefs.h <<EOF
3953 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3961 echo "$as_me:3961: checking if the POSIX test-macros are already defined" >&5
3962 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3963 if test "${cf_cv_posix_visible+set}" = set; then
3964 echo $ECHO_N "(cached) $ECHO_C" >&6
3967 cat >"conftest.$ac_ext" <<_ACEOF
3968 #line 3968 "configure"
3969 #include "confdefs.h"
3975 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3976 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3977 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3978 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3979 #error conflicting symbols found
3986 rm -f "conftest.$ac_objext"
3987 if { (eval echo "$as_me:3987: \"$ac_compile\"") >&5
3988 (eval $ac_compile) 2>&5
3990 echo "$as_me:3990: \$? = $ac_status" >&5
3991 (exit "$ac_status"); } &&
3992 { ac_try='test -s "conftest.$ac_objext"'
3993 { (eval echo "$as_me:3993: \"$ac_try\"") >&5
3996 echo "$as_me:3996: \$? = $ac_status" >&5
3997 (exit "$ac_status"); }; }; then
3998 cf_cv_posix_visible=no
4000 echo "$as_me: failed program was:" >&5
4001 cat "conftest.$ac_ext" >&5
4002 cf_cv_posix_visible=yes
4004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4007 echo "$as_me:4007: result: $cf_cv_posix_visible" >&5
4008 echo "${ECHO_T}$cf_cv_posix_visible" >&6
4010 if test "$cf_cv_posix_visible" = no; then
4013 cf_POSIX_C_SOURCE=199506L
4018 cf_xopen_source="-D_ALL_SOURCE"
4024 cf_xopen_source="-D_APPLE_C_SOURCE"
4027 cf_xopen_source="-D_DARWIN_C_SOURCE"
4030 (freebsd*|dragonfly*|midnightbsd*)
4031 # 5.x headers associate
4032 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4033 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4034 cf_POSIX_C_SOURCE=200112L
4036 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4039 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
4042 cf_xopen_source="-D_HPUX_SOURCE"
4045 cf_xopen_source="-D_SGI_SOURCE"
4048 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
4050 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
4052 echo "$as_me:4052: checking if this is the GNU C library" >&5
4053 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
4054 if test "${cf_cv_gnu_library+set}" = set; then
4055 echo $ECHO_N "(cached) $ECHO_C" >&6
4058 cat >"conftest.$ac_ext" <<_ACEOF
4059 #line 4059 "configure"
4060 #include "confdefs.h"
4061 #include <sys/types.h>
4066 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4068 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4071 # error not GNU C library
4077 rm -f "conftest.$ac_objext"
4078 if { (eval echo "$as_me:4078: \"$ac_compile\"") >&5
4079 (eval $ac_compile) 2>&5
4081 echo "$as_me:4081: \$? = $ac_status" >&5
4082 (exit "$ac_status"); } &&
4083 { ac_try='test -s "conftest.$ac_objext"'
4084 { (eval echo "$as_me:4084: \"$ac_try\"") >&5
4087 echo "$as_me:4087: \$? = $ac_status" >&5
4088 (exit "$ac_status"); }; }; then
4089 cf_cv_gnu_library=yes
4091 echo "$as_me: failed program was:" >&5
4092 cat "conftest.$ac_ext" >&5
4093 cf_cv_gnu_library=no
4095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4098 echo "$as_me:4098: result: $cf_cv_gnu_library" >&5
4099 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4101 if test x$cf_cv_gnu_library = xyes; then
4103 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4104 # was changed to help a little. newlib incorporated the change about 4
4106 echo "$as_me:4106: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4107 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4108 if test "${cf_cv_gnu_library_219+set}" = set; then
4109 echo $ECHO_N "(cached) $ECHO_C" >&6
4114 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4115 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4117 cat >"conftest.$ac_ext" <<_ACEOF
4118 #line 4118 "configure"
4119 #include "confdefs.h"
4120 #include <sys/types.h>
4125 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4127 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4130 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4136 rm -f "conftest.$ac_objext"
4137 if { (eval echo "$as_me:4137: \"$ac_compile\"") >&5
4138 (eval $ac_compile) 2>&5
4140 echo "$as_me:4140: \$? = $ac_status" >&5
4141 (exit "$ac_status"); } &&
4142 { ac_try='test -s "conftest.$ac_objext"'
4143 { (eval echo "$as_me:4143: \"$ac_try\"") >&5
4146 echo "$as_me:4146: \$? = $ac_status" >&5
4147 (exit "$ac_status"); }; }; then
4148 cf_cv_gnu_library_219=yes
4150 echo "$as_me: failed program was:" >&5
4151 cat "conftest.$ac_ext" >&5
4152 cf_cv_gnu_library_219=no
4154 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4158 echo "$as_me:4158: result: $cf_cv_gnu_library_219" >&5
4159 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4161 if test "x$cf_cv_gnu_library_219" = xyes; then
4163 echo "$as_me:4163: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4164 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4165 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4166 echo $ECHO_N "(cached) $ECHO_C" >&6
4172 cf_new_extra_cppflags=
4174 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4176 case "$cf_fix_cppflags" in
4178 case "$cf_add_cflags" in
4179 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4180 case "$cf_add_cflags" in
4182 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4184 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4185 && test -z "${cf_tst_cflags}" \
4186 && cf_fix_cppflags=yes
4188 if test "$cf_fix_cppflags" = yes ; then
4190 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4191 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4194 elif test "${cf_tst_cflags}" = "\"'" ; then
4196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4207 case "$cf_add_cflags" in
4209 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4211 CPPFLAGS=`echo "$CPPFLAGS" | \
4212 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4213 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4218 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4219 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4226 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4227 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4234 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4235 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4237 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4239 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4240 && test -z "${cf_tst_cflags}" \
4241 && cf_fix_cppflags=no
4246 if test -n "$cf_new_cflags" ; then
4248 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4249 CFLAGS="${CFLAGS}$cf_new_cflags"
4253 if test -n "$cf_new_cppflags" ; then
4255 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4256 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4260 if test -n "$cf_new_extra_cppflags" ; then
4262 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4263 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4267 cat >"conftest.$ac_ext" <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4272 #include <sys/types.h>
4278 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4281 # error GNU C library is too old
4287 rm -f "conftest.$ac_objext"
4288 if { (eval echo "$as_me:4288: \"$ac_compile\"") >&5
4289 (eval $ac_compile) 2>&5
4291 echo "$as_me:4291: \$? = $ac_status" >&5
4292 (exit "$ac_status"); } &&
4293 { ac_try='test -s "conftest.$ac_objext"'
4294 { (eval echo "$as_me:4294: \"$ac_try\"") >&5
4297 echo "$as_me:4297: \$? = $ac_status" >&5
4298 (exit "$ac_status"); }; }; then
4299 cf_cv_gnu_dftsrc_219=yes
4301 echo "$as_me: failed program was:" >&5
4302 cat "conftest.$ac_ext" >&5
4303 cf_cv_gnu_dftsrc_219=no
4305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4308 echo "$as_me:4308: result: $cf_cv_gnu_dftsrc_219" >&5
4309 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4310 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4312 cf_cv_gnu_dftsrc_219=maybe
4315 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4317 echo "$as_me:4317: checking if we must define _GNU_SOURCE" >&5
4318 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4319 if test "${cf_cv_gnu_source+set}" = set; then
4320 echo $ECHO_N "(cached) $ECHO_C" >&6
4323 cat >"conftest.$ac_ext" <<_ACEOF
4324 #line 4324 "configure"
4325 #include "confdefs.h"
4326 #include <sys/types.h>
4331 #ifndef _XOPEN_SOURCE
4332 #error expected _XOPEN_SOURCE to be defined
4338 rm -f "conftest.$ac_objext"
4339 if { (eval echo "$as_me:4339: \"$ac_compile\"") >&5
4340 (eval $ac_compile) 2>&5
4342 echo "$as_me:4342: \$? = $ac_status" >&5
4343 (exit "$ac_status"); } &&
4344 { ac_try='test -s "conftest.$ac_objext"'
4345 { (eval echo "$as_me:4345: \"$ac_try\"") >&5
4348 echo "$as_me:4348: \$? = $ac_status" >&5
4349 (exit "$ac_status"); }; }; then
4352 echo "$as_me: failed program was:" >&5
4353 cat "conftest.$ac_ext" >&5
4359 cf_new_extra_cppflags=
4361 for cf_add_cflags in -D_GNU_SOURCE
4363 case "$cf_fix_cppflags" in
4365 case "$cf_add_cflags" in
4366 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4367 case "$cf_add_cflags" in
4369 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4372 && test -z "${cf_tst_cflags}" \
4373 && cf_fix_cppflags=yes
4375 if test "$cf_fix_cppflags" = yes ; then
4377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4381 elif test "${cf_tst_cflags}" = "\"'" ; then
4383 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4384 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4394 case "$cf_add_cflags" in
4396 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4398 CPPFLAGS=`echo "$CPPFLAGS" | \
4399 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4400 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4405 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4406 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4413 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4414 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4424 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4426 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4427 && test -z "${cf_tst_cflags}" \
4428 && cf_fix_cppflags=no
4433 if test -n "$cf_new_cflags" ; then
4435 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4436 CFLAGS="${CFLAGS}$cf_new_cflags"
4440 if test -n "$cf_new_cppflags" ; then
4442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4443 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4447 if test -n "$cf_new_extra_cppflags" ; then
4449 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4450 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4454 cat >"conftest.$ac_ext" <<_ACEOF
4455 #line 4455 "configure"
4456 #include "confdefs.h"
4457 #include <sys/types.h>
4462 #ifdef _XOPEN_SOURCE
4463 #error expected _XOPEN_SOURCE to be undefined
4469 rm -f "conftest.$ac_objext"
4470 if { (eval echo "$as_me:4470: \"$ac_compile\"") >&5
4471 (eval $ac_compile) 2>&5
4473 echo "$as_me:4473: \$? = $ac_status" >&5
4474 (exit "$ac_status"); } &&
4475 { ac_try='test -s "conftest.$ac_objext"'
4476 { (eval echo "$as_me:4476: \"$ac_try\"") >&5
4479 echo "$as_me:4479: \$? = $ac_status" >&5
4480 (exit "$ac_status"); }; }; then
4483 echo "$as_me: failed program was:" >&5
4484 cat "conftest.$ac_ext" >&5
4485 cf_cv_gnu_source=yes
4487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4494 echo "$as_me:4494: result: $cf_cv_gnu_source" >&5
4495 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4497 if test "$cf_cv_gnu_source" = yes
4499 echo "$as_me:4499: checking if we should also define _DEFAULT_SOURCE" >&5
4500 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4501 if test "${cf_cv_default_source+set}" = set; then
4502 echo $ECHO_N "(cached) $ECHO_C" >&6
4505 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4506 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4508 cat >"conftest.$ac_ext" <<_ACEOF
4509 #line 4509 "configure"
4510 #include "confdefs.h"
4511 #include <sys/types.h>
4516 #ifdef _DEFAULT_SOURCE
4517 #error expected _DEFAULT_SOURCE to be undefined
4523 rm -f "conftest.$ac_objext"
4524 if { (eval echo "$as_me:4524: \"$ac_compile\"") >&5
4525 (eval $ac_compile) 2>&5
4527 echo "$as_me:4527: \$? = $ac_status" >&5
4528 (exit "$ac_status"); } &&
4529 { ac_try='test -s "conftest.$ac_objext"'
4530 { (eval echo "$as_me:4530: \"$ac_try\"") >&5
4533 echo "$as_me:4533: \$? = $ac_status" >&5
4534 (exit "$ac_status"); }; }; then
4535 cf_cv_default_source=no
4537 echo "$as_me: failed program was:" >&5
4538 cat "conftest.$ac_ext" >&5
4539 cf_cv_default_source=yes
4541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4544 echo "$as_me:4544: result: $cf_cv_default_source" >&5
4545 echo "${ECHO_T}$cf_cv_default_source" >&6
4546 if test "$cf_cv_default_source" = yes
4549 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4550 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4560 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4563 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4566 if test "$cf_cv_posix_visible" = no; then
4568 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4570 cf_save_CFLAGS="$CFLAGS"
4571 cf_save_CPPFLAGS="$CPPFLAGS"
4573 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4574 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4575 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4577 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4578 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4579 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4581 echo "$as_me:4581: checking if we should define _POSIX_C_SOURCE" >&5
4582 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4583 if test "${cf_cv_posix_c_source+set}" = set; then
4584 echo $ECHO_N "(cached) $ECHO_C" >&6
4587 echo "${as_me:-configure}:4587: testing if the symbol is already defined go no further ..." 1>&5
4589 cat >"conftest.$ac_ext" <<_ACEOF
4590 #line 4590 "configure"
4591 #include "confdefs.h"
4592 #include <sys/types.h>
4597 #ifndef _POSIX_C_SOURCE
4604 rm -f "conftest.$ac_objext"
4605 if { (eval echo "$as_me:4605: \"$ac_compile\"") >&5
4606 (eval $ac_compile) 2>&5
4608 echo "$as_me:4608: \$? = $ac_status" >&5
4609 (exit "$ac_status"); } &&
4610 { ac_try='test -s "conftest.$ac_objext"'
4611 { (eval echo "$as_me:4611: \"$ac_try\"") >&5
4614 echo "$as_me:4614: \$? = $ac_status" >&5
4615 (exit "$ac_status"); }; }; then
4616 cf_cv_posix_c_source=no
4618 echo "$as_me: failed program was:" >&5
4619 cat "conftest.$ac_ext" >&5
4620 cf_want_posix_source=no
4621 case .$cf_POSIX_C_SOURCE in
4623 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4626 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4627 cf_want_posix_source=yes
4630 cf_want_posix_source=yes
4633 if test "$cf_want_posix_source" = yes ; then
4634 cat >"conftest.$ac_ext" <<_ACEOF
4635 #line 4635 "configure"
4636 #include "confdefs.h"
4637 #include <sys/types.h>
4642 #ifdef _POSIX_SOURCE
4649 rm -f "conftest.$ac_objext"
4650 if { (eval echo "$as_me:4650: \"$ac_compile\"") >&5
4651 (eval $ac_compile) 2>&5
4653 echo "$as_me:4653: \$? = $ac_status" >&5
4654 (exit "$ac_status"); } &&
4655 { ac_try='test -s "conftest.$ac_objext"'
4656 { (eval echo "$as_me:4656: \"$ac_try\"") >&5
4659 echo "$as_me:4659: \$? = $ac_status" >&5
4660 (exit "$ac_status"); }; }; then
4663 echo "$as_me: failed program was:" >&5
4664 cat "conftest.$ac_ext" >&5
4665 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4667 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4670 echo "${as_me:-configure}:4670: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4672 CFLAGS="$cf_trim_CFLAGS"
4673 CPPFLAGS="$cf_trim_CPPFLAGS"
4675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4676 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4678 echo "${as_me:-configure}:4678: testing if the second compile does not leave our definition intact error ..." 1>&5
4680 cat >"conftest.$ac_ext" <<_ACEOF
4681 #line 4681 "configure"
4682 #include "confdefs.h"
4683 #include <sys/types.h>
4688 #ifndef _POSIX_C_SOURCE
4695 rm -f "conftest.$ac_objext"
4696 if { (eval echo "$as_me:4696: \"$ac_compile\"") >&5
4697 (eval $ac_compile) 2>&5
4699 echo "$as_me:4699: \$? = $ac_status" >&5
4700 (exit "$ac_status"); } &&
4701 { ac_try='test -s "conftest.$ac_objext"'
4702 { (eval echo "$as_me:4702: \"$ac_try\"") >&5
4705 echo "$as_me:4705: \$? = $ac_status" >&5
4706 (exit "$ac_status"); }; }; then
4709 echo "$as_me: failed program was:" >&5
4710 cat "conftest.$ac_ext" >&5
4711 cf_cv_posix_c_source=no
4713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4714 CFLAGS="$cf_save_CFLAGS"
4715 CPPFLAGS="$cf_save_CPPFLAGS"
4718 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4721 echo "$as_me:4721: result: $cf_cv_posix_c_source" >&5
4722 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4724 if test "$cf_cv_posix_c_source" != no ; then
4725 CFLAGS="$cf_trim_CFLAGS"
4726 CPPFLAGS="$cf_trim_CPPFLAGS"
4731 cf_new_extra_cppflags=
4733 for cf_add_cflags in $cf_cv_posix_c_source
4735 case "$cf_fix_cppflags" in
4737 case "$cf_add_cflags" in
4738 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4739 case "$cf_add_cflags" in
4741 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4743 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4744 && test -z "${cf_tst_cflags}" \
4745 && cf_fix_cppflags=yes
4747 if test "$cf_fix_cppflags" = yes ; then
4749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4753 elif test "${cf_tst_cflags}" = "\"'" ; then
4755 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4756 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4766 case "$cf_add_cflags" in
4768 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4770 CPPFLAGS=`echo "$CPPFLAGS" | \
4771 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4772 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4777 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4778 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4785 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4786 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4796 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4799 && test -z "${cf_tst_cflags}" \
4800 && cf_fix_cppflags=no
4805 if test -n "$cf_new_cflags" ; then
4807 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4808 CFLAGS="${CFLAGS}$cf_new_cflags"
4812 if test -n "$cf_new_cppflags" ; then
4814 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4815 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4819 if test -n "$cf_new_extra_cppflags" ; then
4821 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4822 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4828 fi # cf_cv_posix_visible
4832 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4835 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4836 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4837 # Abusing the conformance level is a workaround.
4838 { echo "$as_me:4838: WARNING: this system does not provide usable locale support" >&5
4839 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4840 cf_xopen_source="-D_BSD_SOURCE"
4844 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4845 cf_xopen_source="-D_BSD_SOURCE"
4849 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4852 cf_xopen_source="-D_OSF_SOURCE"
4855 cf_xopen_source="-D_QNX_SOURCE"
4858 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4861 cf_xopen_source="-D__EXTENSIONS__"
4862 cf_cv_xopen_source=broken
4864 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4870 echo "$as_me:4870: checking if we should define _XOPEN_SOURCE" >&5
4871 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4872 if test "${cf_cv_xopen_source+set}" = set; then
4873 echo $ECHO_N "(cached) $ECHO_C" >&6
4876 cat >"conftest.$ac_ext" <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4882 #include <sys/types.h>
4888 #ifndef _XOPEN_SOURCE
4896 rm -f "conftest.$ac_objext"
4897 if { (eval echo "$as_me:4897: \"$ac_compile\"") >&5
4898 (eval $ac_compile) 2>&5
4900 echo "$as_me:4900: \$? = $ac_status" >&5
4901 (exit "$ac_status"); } &&
4902 { ac_try='test -s "conftest.$ac_objext"'
4903 { (eval echo "$as_me:4903: \"$ac_try\"") >&5
4906 echo "$as_me:4906: \$? = $ac_status" >&5
4907 (exit "$ac_status"); }; }; then
4908 cf_cv_xopen_source=no
4910 echo "$as_me: failed program was:" >&5
4911 cat "conftest.$ac_ext" >&5
4914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4915 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4917 cat >"conftest.$ac_ext" <<_ACEOF
4918 #line 4918 "configure"
4919 #include "confdefs.h"
4923 #include <sys/types.h>
4929 #ifndef _XOPEN_SOURCE
4937 rm -f "conftest.$ac_objext"
4938 if { (eval echo "$as_me:4938: \"$ac_compile\"") >&5
4939 (eval $ac_compile) 2>&5
4941 echo "$as_me:4941: \$? = $ac_status" >&5
4942 (exit "$ac_status"); } &&
4943 { ac_try='test -s "conftest.$ac_objext"'
4944 { (eval echo "$as_me:4944: \"$ac_try\"") >&5
4947 echo "$as_me:4947: \$? = $ac_status" >&5
4948 (exit "$ac_status"); }; }; then
4949 cf_cv_xopen_source=no
4951 echo "$as_me: failed program was:" >&5
4952 cat "conftest.$ac_ext" >&5
4953 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4962 echo "$as_me:4962: result: $cf_cv_xopen_source" >&5
4963 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4965 if test "$cf_cv_xopen_source" != no ; then
4967 CFLAGS=`echo "$CFLAGS" | \
4968 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4969 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4971 CPPFLAGS=`echo "$CPPFLAGS" | \
4972 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4973 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4975 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4977 for cf_add_cflags in $cf_temp_xopen_source
4979 case "x$cf_add_cflags" in
4982 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4985 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4986 test "$CFLAGS" != "$cf_old_cflag" || break
4988 CFLAGS="$cf_old_cflag"
4991 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4994 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4995 test "$CPPFLAGS" != "$cf_old_cflag" || break
4997 CPPFLAGS="$cf_old_cflag"
5006 cf_new_extra_cppflags=
5008 for cf_add_cflags in $cf_add_cflags
5010 case "$cf_fix_cppflags" in
5012 case "$cf_add_cflags" in
5013 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5014 case "$cf_add_cflags" in
5016 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5019 && test -z "${cf_tst_cflags}" \
5020 && cf_fix_cppflags=yes
5022 if test "$cf_fix_cppflags" = yes ; then
5024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5028 elif test "${cf_tst_cflags}" = "\"'" ; then
5030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5041 case "$cf_add_cflags" in
5043 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5045 CPPFLAGS=`echo "$CPPFLAGS" | \
5046 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5047 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5052 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5053 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5060 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5061 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5071 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5073 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5074 && test -z "${cf_tst_cflags}" \
5075 && cf_fix_cppflags=no
5080 if test -n "$cf_new_cflags" ; then
5082 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5083 CFLAGS="${CFLAGS}$cf_new_cflags"
5087 if test -n "$cf_new_cppflags" ; then
5089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5090 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5094 if test -n "$cf_new_extra_cppflags" ; then
5096 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5097 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5105 cf_save_xopen_cppflags="$CPPFLAGS"
5107 if test "$cf_cv_posix_visible" = no; then
5109 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5111 cf_save_CFLAGS="$CFLAGS"
5112 cf_save_CPPFLAGS="$CPPFLAGS"
5114 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5115 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5116 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5118 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5119 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5120 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5122 echo "$as_me:5122: checking if we should define _POSIX_C_SOURCE" >&5
5123 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5124 if test "${cf_cv_posix_c_source+set}" = set; then
5125 echo $ECHO_N "(cached) $ECHO_C" >&6
5128 echo "${as_me:-configure}:5128: testing if the symbol is already defined go no further ..." 1>&5
5130 cat >"conftest.$ac_ext" <<_ACEOF
5131 #line 5131 "configure"
5132 #include "confdefs.h"
5133 #include <sys/types.h>
5138 #ifndef _POSIX_C_SOURCE
5145 rm -f "conftest.$ac_objext"
5146 if { (eval echo "$as_me:5146: \"$ac_compile\"") >&5
5147 (eval $ac_compile) 2>&5
5149 echo "$as_me:5149: \$? = $ac_status" >&5
5150 (exit "$ac_status"); } &&
5151 { ac_try='test -s "conftest.$ac_objext"'
5152 { (eval echo "$as_me:5152: \"$ac_try\"") >&5
5155 echo "$as_me:5155: \$? = $ac_status" >&5
5156 (exit "$ac_status"); }; }; then
5157 cf_cv_posix_c_source=no
5159 echo "$as_me: failed program was:" >&5
5160 cat "conftest.$ac_ext" >&5
5161 cf_want_posix_source=no
5162 case .$cf_POSIX_C_SOURCE in
5164 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5167 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5168 cf_want_posix_source=yes
5171 cf_want_posix_source=yes
5174 if test "$cf_want_posix_source" = yes ; then
5175 cat >"conftest.$ac_ext" <<_ACEOF
5176 #line 5176 "configure"
5177 #include "confdefs.h"
5178 #include <sys/types.h>
5183 #ifdef _POSIX_SOURCE
5190 rm -f "conftest.$ac_objext"
5191 if { (eval echo "$as_me:5191: \"$ac_compile\"") >&5
5192 (eval $ac_compile) 2>&5
5194 echo "$as_me:5194: \$? = $ac_status" >&5
5195 (exit "$ac_status"); } &&
5196 { ac_try='test -s "conftest.$ac_objext"'
5197 { (eval echo "$as_me:5197: \"$ac_try\"") >&5
5200 echo "$as_me:5200: \$? = $ac_status" >&5
5201 (exit "$ac_status"); }; }; then
5204 echo "$as_me: failed program was:" >&5
5205 cat "conftest.$ac_ext" >&5
5206 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5211 echo "${as_me:-configure}:5211: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5213 CFLAGS="$cf_trim_CFLAGS"
5214 CPPFLAGS="$cf_trim_CPPFLAGS"
5216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5217 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5219 echo "${as_me:-configure}:5219: testing if the second compile does not leave our definition intact error ..." 1>&5
5221 cat >"conftest.$ac_ext" <<_ACEOF
5222 #line 5222 "configure"
5223 #include "confdefs.h"
5224 #include <sys/types.h>
5229 #ifndef _POSIX_C_SOURCE
5236 rm -f "conftest.$ac_objext"
5237 if { (eval echo "$as_me:5237: \"$ac_compile\"") >&5
5238 (eval $ac_compile) 2>&5
5240 echo "$as_me:5240: \$? = $ac_status" >&5
5241 (exit "$ac_status"); } &&
5242 { ac_try='test -s "conftest.$ac_objext"'
5243 { (eval echo "$as_me:5243: \"$ac_try\"") >&5
5246 echo "$as_me:5246: \$? = $ac_status" >&5
5247 (exit "$ac_status"); }; }; then
5250 echo "$as_me: failed program was:" >&5
5251 cat "conftest.$ac_ext" >&5
5252 cf_cv_posix_c_source=no
5254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5255 CFLAGS="$cf_save_CFLAGS"
5256 CPPFLAGS="$cf_save_CPPFLAGS"
5259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5262 echo "$as_me:5262: result: $cf_cv_posix_c_source" >&5
5263 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5265 if test "$cf_cv_posix_c_source" != no ; then
5266 CFLAGS="$cf_trim_CFLAGS"
5267 CPPFLAGS="$cf_trim_CPPFLAGS"
5272 cf_new_extra_cppflags=
5274 for cf_add_cflags in $cf_cv_posix_c_source
5276 case "$cf_fix_cppflags" in
5278 case "$cf_add_cflags" in
5279 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5280 case "$cf_add_cflags" in
5282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5285 && test -z "${cf_tst_cflags}" \
5286 && cf_fix_cppflags=yes
5288 if test "$cf_fix_cppflags" = yes ; then
5290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5294 elif test "${cf_tst_cflags}" = "\"'" ; then
5296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5307 case "$cf_add_cflags" in
5309 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5311 CPPFLAGS=`echo "$CPPFLAGS" | \
5312 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5313 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5318 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5319 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5326 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5327 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5340 && test -z "${cf_tst_cflags}" \
5341 && cf_fix_cppflags=no
5346 if test -n "$cf_new_cflags" ; then
5348 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5349 CFLAGS="${CFLAGS}$cf_new_cflags"
5353 if test -n "$cf_new_cppflags" ; then
5355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5356 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5360 if test -n "$cf_new_extra_cppflags" ; then
5362 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5363 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5369 fi # cf_cv_posix_visible
5371 # Some of these niche implementations use copy/paste, double-check...
5372 if test "$cf_cv_xopen_source" != no ; then
5373 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
5375 echo "${as_me:-configure}:5375: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
5377 cat >"conftest.$ac_ext" <<_ACEOF
5378 #line 5378 "configure"
5379 #include "confdefs.h"
5383 #include <sys/types.h>
5389 #ifndef _XOPEN_SOURCE
5397 rm -f "conftest.$ac_objext"
5398 if { (eval echo "$as_me:5398: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>&5
5401 echo "$as_me:5401: \$? = $ac_status" >&5
5402 (exit "$ac_status"); } &&
5403 { ac_try='test -s "conftest.$ac_objext"'
5404 { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5407 echo "$as_me:5407: \$? = $ac_status" >&5
5408 (exit "$ac_status"); }; }; then
5411 echo "$as_me: failed program was:" >&5
5412 cat "conftest.$ac_ext" >&5
5414 { echo "$as_me:5414: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5415 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5416 CPPFLAGS="$cf_save_xopen_cppflags"
5418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5423 if test -n "$cf_xopen_source" ; then
5425 for cf_add_cflags in $cf_xopen_source
5427 case "x$cf_add_cflags" in
5430 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5433 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5434 test "$CFLAGS" != "$cf_old_cflag" || break
5435 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5437 echo "${as_me:-configure}:5437: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5439 CFLAGS="$cf_old_cflag"
5442 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5445 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5446 test "$CPPFLAGS" != "$cf_old_cflag" || break
5447 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5449 echo "${as_me:-configure}:5449: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5451 CPPFLAGS="$cf_old_cflag"
5460 cf_new_extra_cppflags=
5462 for cf_add_cflags in $cf_add_cflags
5464 case "$cf_fix_cppflags" in
5466 case "$cf_add_cflags" in
5467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5468 case "$cf_add_cflags" in
5470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5473 && test -z "${cf_tst_cflags}" \
5474 && cf_fix_cppflags=yes
5476 if test "$cf_fix_cppflags" = yes ; then
5478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5482 elif test "${cf_tst_cflags}" = "\"'" ; then
5484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5495 case "$cf_add_cflags" in
5497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5499 CPPFLAGS=`echo "$CPPFLAGS" | \
5500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5528 && test -z "${cf_tst_cflags}" \
5529 && cf_fix_cppflags=no
5534 if test -n "$cf_new_cflags" ; then
5535 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5537 echo "${as_me:-configure}:5537: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5539 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5540 CFLAGS="${CFLAGS}$cf_new_cflags"
5544 if test -n "$cf_new_cppflags" ; then
5545 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5547 echo "${as_me:-configure}:5547: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5549 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5550 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5554 if test -n "$cf_new_extra_cppflags" ; then
5555 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5557 echo "${as_me:-configure}:5557: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5559 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5560 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5568 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5569 echo "$as_me:5569: checking if _XOPEN_SOURCE really is set" >&5
5570 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5571 cat >"conftest.$ac_ext" <<_ACEOF
5572 #line 5572 "configure"
5573 #include "confdefs.h"
5579 #ifndef _XOPEN_SOURCE
5586 rm -f "conftest.$ac_objext"
5587 if { (eval echo "$as_me:5587: \"$ac_compile\"") >&5
5588 (eval $ac_compile) 2>&5
5590 echo "$as_me:5590: \$? = $ac_status" >&5
5591 (exit "$ac_status"); } &&
5592 { ac_try='test -s "conftest.$ac_objext"'
5593 { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5596 echo "$as_me:5596: \$? = $ac_status" >&5
5597 (exit "$ac_status"); }; }; then
5598 cf_XOPEN_SOURCE_set=yes
5600 echo "$as_me: failed program was:" >&5
5601 cat "conftest.$ac_ext" >&5
5602 cf_XOPEN_SOURCE_set=no
5604 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5605 echo "$as_me:5605: result: $cf_XOPEN_SOURCE_set" >&5
5606 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5607 if test "$cf_XOPEN_SOURCE_set" = yes
5609 cat >"conftest.$ac_ext" <<_ACEOF
5610 #line 5610 "configure"
5611 #include "confdefs.h"
5617 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5624 rm -f "conftest.$ac_objext"
5625 if { (eval echo "$as_me:5625: \"$ac_compile\"") >&5
5626 (eval $ac_compile) 2>&5
5628 echo "$as_me:5628: \$? = $ac_status" >&5
5629 (exit "$ac_status"); } &&
5630 { ac_try='test -s "conftest.$ac_objext"'
5631 { (eval echo "$as_me:5631: \"$ac_try\"") >&5
5634 echo "$as_me:5634: \$? = $ac_status" >&5
5635 (exit "$ac_status"); }; }; then
5636 cf_XOPEN_SOURCE_set_ok=yes
5638 echo "$as_me: failed program was:" >&5
5639 cat "conftest.$ac_ext" >&5
5640 cf_XOPEN_SOURCE_set_ok=no
5642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5643 if test "$cf_XOPEN_SOURCE_set_ok" = no
5645 { echo "$as_me:5645: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5646 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5650 echo "$as_me:5650: checking if we should define _XOPEN_SOURCE" >&5
5651 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5652 if test "${cf_cv_xopen_source+set}" = set; then
5653 echo $ECHO_N "(cached) $ECHO_C" >&6
5656 cat >"conftest.$ac_ext" <<_ACEOF
5657 #line 5657 "configure"
5658 #include "confdefs.h"
5662 #include <sys/types.h>
5668 #ifndef _XOPEN_SOURCE
5676 rm -f "conftest.$ac_objext"
5677 if { (eval echo "$as_me:5677: \"$ac_compile\"") >&5
5678 (eval $ac_compile) 2>&5
5680 echo "$as_me:5680: \$? = $ac_status" >&5
5681 (exit "$ac_status"); } &&
5682 { ac_try='test -s "conftest.$ac_objext"'
5683 { (eval echo "$as_me:5683: \"$ac_try\"") >&5
5686 echo "$as_me:5686: \$? = $ac_status" >&5
5687 (exit "$ac_status"); }; }; then
5688 cf_cv_xopen_source=no
5690 echo "$as_me: failed program was:" >&5
5691 cat "conftest.$ac_ext" >&5
5694 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5695 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5697 cat >"conftest.$ac_ext" <<_ACEOF
5698 #line 5698 "configure"
5699 #include "confdefs.h"
5703 #include <sys/types.h>
5709 #ifndef _XOPEN_SOURCE
5717 rm -f "conftest.$ac_objext"
5718 if { (eval echo "$as_me:5718: \"$ac_compile\"") >&5
5719 (eval $ac_compile) 2>&5
5721 echo "$as_me:5721: \$? = $ac_status" >&5
5722 (exit "$ac_status"); } &&
5723 { ac_try='test -s "conftest.$ac_objext"'
5724 { (eval echo "$as_me:5724: \"$ac_try\"") >&5
5727 echo "$as_me:5727: \$? = $ac_status" >&5
5728 (exit "$ac_status"); }; }; then
5729 cf_cv_xopen_source=no
5731 echo "$as_me: failed program was:" >&5
5732 cat "conftest.$ac_ext" >&5
5733 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5742 echo "$as_me:5742: result: $cf_cv_xopen_source" >&5
5743 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5745 if test "$cf_cv_xopen_source" != no ; then
5747 CFLAGS=`echo "$CFLAGS" | \
5748 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5749 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5751 CPPFLAGS=`echo "$CPPFLAGS" | \
5752 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5753 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5755 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5757 for cf_add_cflags in $cf_temp_xopen_source
5759 case "x$cf_add_cflags" in
5762 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5765 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5766 test "$CFLAGS" != "$cf_old_cflag" || break
5768 CFLAGS="$cf_old_cflag"
5771 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5774 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5775 test "$CPPFLAGS" != "$cf_old_cflag" || break
5777 CPPFLAGS="$cf_old_cflag"
5786 cf_new_extra_cppflags=
5788 for cf_add_cflags in $cf_add_cflags
5790 case "$cf_fix_cppflags" in
5792 case "$cf_add_cflags" in
5793 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5794 case "$cf_add_cflags" in
5796 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5799 && test -z "${cf_tst_cflags}" \
5800 && cf_fix_cppflags=yes
5802 if test "$cf_fix_cppflags" = yes ; then
5804 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5805 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5808 elif test "${cf_tst_cflags}" = "\"'" ; then
5810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5821 case "$cf_add_cflags" in
5823 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5825 CPPFLAGS=`echo "$CPPFLAGS" | \
5826 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5827 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5832 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5833 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5840 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5841 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5854 && test -z "${cf_tst_cflags}" \
5855 && cf_fix_cppflags=no
5860 if test -n "$cf_new_cflags" ; then
5862 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5863 CFLAGS="${CFLAGS}$cf_new_cflags"
5867 if test -n "$cf_new_cppflags" ; then
5869 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5870 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5874 if test -n "$cf_new_extra_cppflags" ; then
5876 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5877 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5887 fi # cf_cv_posix_visible
5889 echo "$as_me:5889: checking for signal global datatype" >&5
5890 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5891 if test "${cf_cv_sig_atomic_t+set}" = set; then
5892 echo $ECHO_N "(cached) $ECHO_C" >&6
5896 "volatile sig_atomic_t" \
5900 cat >"conftest.$ac_ext" <<_ACEOF
5901 #line 5901 "configure"
5902 #include "confdefs.h"
5904 #include <sys/types.h>
5910 static void handler(int sig)
5918 signal(SIGINT, handler);
5924 rm -f "conftest.$ac_objext"
5925 if { (eval echo "$as_me:5925: \"$ac_compile\"") >&5
5926 (eval $ac_compile) 2>&5
5928 echo "$as_me:5928: \$? = $ac_status" >&5
5929 (exit "$ac_status"); } &&
5930 { ac_try='test -s "conftest.$ac_objext"'
5931 { (eval echo "$as_me:5931: \"$ac_try\"") >&5
5934 echo "$as_me:5934: \$? = $ac_status" >&5
5935 (exit "$ac_status"); }; }; then
5936 cf_cv_sig_atomic_t=$cf_type
5938 echo "$as_me: failed program was:" >&5
5939 cat "conftest.$ac_ext" >&5
5940 cf_cv_sig_atomic_t=no
5942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5943 test "$cf_cv_sig_atomic_t" != no && break
5948 echo "$as_me:5948: result: $cf_cv_sig_atomic_t" >&5
5949 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5950 test "$cf_cv_sig_atomic_t" != no &&
5951 cat >>confdefs.h <<EOF
5952 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5955 # Work around breakage on OS X
5957 echo "$as_me:5957: checking if SIGWINCH is defined" >&5
5958 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5959 if test "${cf_cv_define_sigwinch+set}" = set; then
5960 echo $ECHO_N "(cached) $ECHO_C" >&6
5963 cat >"conftest.$ac_ext" <<_ACEOF
5964 #line 5964 "configure"
5965 #include "confdefs.h"
5967 #include <sys/types.h>
5968 #include <sys/signal.h>
5973 int x = SIGWINCH; (void)x
5978 rm -f "conftest.$ac_objext"
5979 if { (eval echo "$as_me:5979: \"$ac_compile\"") >&5
5980 (eval $ac_compile) 2>&5
5982 echo "$as_me:5982: \$? = $ac_status" >&5
5983 (exit "$ac_status"); } &&
5984 { ac_try='test -s "conftest.$ac_objext"'
5985 { (eval echo "$as_me:5985: \"$ac_try\"") >&5
5988 echo "$as_me:5988: \$? = $ac_status" >&5
5989 (exit "$ac_status"); }; }; then
5990 cf_cv_define_sigwinch=yes
5992 echo "$as_me: failed program was:" >&5
5993 cat "conftest.$ac_ext" >&5
5994 cat >"conftest.$ac_ext" <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5998 #undef _XOPEN_SOURCE
5999 #undef _POSIX_SOURCE
6000 #undef _POSIX_C_SOURCE
6001 #include <sys/types.h>
6002 #include <sys/signal.h>
6007 int x = SIGWINCH; (void)x
6012 rm -f "conftest.$ac_objext"
6013 if { (eval echo "$as_me:6013: \"$ac_compile\"") >&5
6014 (eval $ac_compile) 2>&5
6016 echo "$as_me:6016: \$? = $ac_status" >&5
6017 (exit "$ac_status"); } &&
6018 { ac_try='test -s "conftest.$ac_objext"'
6019 { (eval echo "$as_me:6019: \"$ac_try\"") >&5
6022 echo "$as_me:6022: \$? = $ac_status" >&5
6023 (exit "$ac_status"); }; }; then
6024 cf_cv_define_sigwinch=maybe
6026 echo "$as_me: failed program was:" >&5
6027 cat "conftest.$ac_ext" >&5
6028 cf_cv_define_sigwinch=no
6030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6036 echo "$as_me:6036: result: $cf_cv_define_sigwinch" >&5
6037 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6039 if test "$cf_cv_define_sigwinch" = maybe ; then
6040 echo "$as_me:6040: checking for actual SIGWINCH definition" >&5
6041 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6042 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6043 echo $ECHO_N "(cached) $ECHO_C" >&6
6046 cf_cv_fixup_sigwinch=unknown
6048 while test "$cf_sigwinch" != 1
6050 cat >"conftest.$ac_ext" <<_ACEOF
6051 #line 6051 "configure"
6052 #include "confdefs.h"
6054 #undef _XOPEN_SOURCE
6055 #undef _POSIX_SOURCE
6056 #undef _POSIX_C_SOURCE
6057 #include <sys/types.h>
6058 #include <sys/signal.h>
6064 #if SIGWINCH != $cf_sigwinch
6067 int x = SIGWINCH; (void)x
6072 rm -f "conftest.$ac_objext"
6073 if { (eval echo "$as_me:6073: \"$ac_compile\"") >&5
6074 (eval $ac_compile) 2>&5
6076 echo "$as_me:6076: \$? = $ac_status" >&5
6077 (exit "$ac_status"); } &&
6078 { ac_try='test -s "conftest.$ac_objext"'
6079 { (eval echo "$as_me:6079: \"$ac_try\"") >&5
6082 echo "$as_me:6082: \$? = $ac_status" >&5
6083 (exit "$ac_status"); }; }; then
6084 cf_cv_fixup_sigwinch=$cf_sigwinch
6087 echo "$as_me: failed program was:" >&5
6088 cat "conftest.$ac_ext" >&5
6090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6092 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6096 echo "$as_me:6096: result: $cf_cv_fixup_sigwinch" >&5
6097 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6099 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6100 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6104 # Checks for CODESET support.
6106 echo "$as_me:6106: checking for nl_langinfo and CODESET" >&5
6107 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6108 if test "${am_cv_langinfo_codeset+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6111 cat >"conftest.$ac_ext" <<_ACEOF
6112 #line 6112 "configure"
6113 #include "confdefs.h"
6114 #include <langinfo.h>
6118 char* cs = nl_langinfo(CODESET); (void)cs
6123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6124 if { (eval echo "$as_me:6124: \"$ac_link\"") >&5
6125 (eval $ac_link) 2>&5
6127 echo "$as_me:6127: \$? = $ac_status" >&5
6128 (exit "$ac_status"); } &&
6129 { ac_try='test -s "conftest$ac_exeext"'
6130 { (eval echo "$as_me:6130: \"$ac_try\"") >&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit "$ac_status"); }; }; then
6135 am_cv_langinfo_codeset=yes
6137 echo "$as_me: failed program was:" >&5
6138 cat "conftest.$ac_ext" >&5
6139 am_cv_langinfo_codeset=no
6141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6144 echo "$as_me:6144: result: $am_cv_langinfo_codeset" >&5
6145 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6146 if test "$am_cv_langinfo_codeset" = yes; then
6148 cat >>confdefs.h <<\EOF
6149 #define HAVE_LANGINFO_CODESET 1
6154 echo "$as_me:6154: checking if you want to use pkg-config" >&5
6155 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6157 # Check whether --with-pkg-config or --without-pkg-config was given.
6158 if test "${with_pkg_config+set}" = set; then
6159 withval="$with_pkg_config"
6160 cf_pkg_config=$withval
6164 echo "$as_me:6164: result: $cf_pkg_config" >&5
6165 echo "${ECHO_T}$cf_pkg_config" >&6
6167 case "$cf_pkg_config" in
6173 if test -n "$ac_tool_prefix"; then
6174 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6175 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6176 echo "$as_me:6176: checking for $ac_word" >&5
6177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6178 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6179 echo $ECHO_N "(cached) $ECHO_C" >&6
6183 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6186 ac_save_IFS=$IFS; IFS=$ac_path_separator
6188 for ac_dir in $ac_dummy; do
6190 test -z "$ac_dir" && ac_dir=.
6191 if $as_executable_p "$ac_dir/$ac_word"; then
6192 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6193 echo "$as_me:6193: found $ac_dir/$ac_word" >&5
6201 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6203 if test -n "$PKG_CONFIG"; then
6204 echo "$as_me:6204: result: $PKG_CONFIG" >&5
6205 echo "${ECHO_T}$PKG_CONFIG" >&6
6207 echo "$as_me:6207: result: no" >&5
6208 echo "${ECHO_T}no" >&6
6212 if test -z "$ac_cv_path_PKG_CONFIG"; then
6213 ac_pt_PKG_CONFIG=$PKG_CONFIG
6214 # Extract the first word of "pkg-config", so it can be a program name with args.
6215 set dummy pkg-config; ac_word=$2
6216 echo "$as_me:6216: checking for $ac_word" >&5
6217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6218 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6219 echo $ECHO_N "(cached) $ECHO_C" >&6
6221 case $ac_pt_PKG_CONFIG in
6223 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6226 ac_save_IFS=$IFS; IFS=$ac_path_separator
6228 for ac_dir in $ac_dummy; do
6230 test -z "$ac_dir" && ac_dir=.
6231 if $as_executable_p "$ac_dir/$ac_word"; then
6232 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6233 echo "$as_me:6233: found $ac_dir/$ac_word" >&5
6238 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6242 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6244 if test -n "$ac_pt_PKG_CONFIG"; then
6245 echo "$as_me:6245: result: $ac_pt_PKG_CONFIG" >&5
6246 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6248 echo "$as_me:6248: result: no" >&5
6249 echo "${ECHO_T}no" >&6
6252 PKG_CONFIG=$ac_pt_PKG_CONFIG
6254 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6263 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6264 if test "$PKG_CONFIG" != none ; then
6266 if test "x$prefix" != xNONE; then
6267 cf_path_syntax="$prefix"
6269 cf_path_syntax="$ac_default_prefix"
6272 case ".$PKG_CONFIG" in
6277 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6279 (.\$\{*prefix\}*|.\$\{*dir\}*)
6280 eval PKG_CONFIG="$PKG_CONFIG"
6281 case ".$PKG_CONFIG" in
6283 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6288 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6291 { { echo "$as_me:6291: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6292 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6293 { (exit 1); exit 1; }; }
6297 elif test "x$cf_pkg_config" != xno ; then
6298 { echo "$as_me:6298: WARNING: pkg-config is not installed" >&5
6299 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6302 echo "$as_me:6302: checking if you want to see long compiling messages" >&5
6303 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6305 # Check whether --enable-echo or --disable-echo was given.
6306 if test "${enable_echo+set}" = set; then
6307 enableval="$enable_echo"
6308 test "$enableval" != no && enableval=yes
6309 if test "$enableval" != "yes" ; then
6312 ECHO_LD='@echo linking $@;'
6313 RULE_CC='@echo compiling $<'
6314 SHOW_CC='@echo compiling $@'
6336 echo "$as_me:6336: result: $enableval" >&5
6337 echo "${ECHO_T}$enableval" >&6
6339 echo "$as_me:6339: checking for ncurses wrap-prefix" >&5
6340 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6342 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6343 if test "${with_ncurses_wrap_prefix+set}" = set; then
6344 withval="$with_ncurses_wrap_prefix"
6345 NCURSES_WRAP_PREFIX=$withval
6347 NCURSES_WRAP_PREFIX=_nc_
6349 echo "$as_me:6349: result: $NCURSES_WRAP_PREFIX" >&5
6350 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6352 echo "$as_me:6352: checking if you want to check for wide-character functions" >&5
6353 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6355 # Check whether --enable-widec or --disable-widec was given.
6356 if test "${enable_widec+set}" = set; then
6357 enableval="$enable_widec"
6358 test "$enableval" != no && enableval=yes
6359 if test "$enableval" != "yes" ; then
6369 echo "$as_me:6369: result: $cf_enable_widec" >&5
6370 echo "${ECHO_T}$cf_enable_widec" >&6
6372 echo "$as_me:6372: checking for specific curses-directory" >&5
6373 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6375 # Check whether --with-curses-dir or --without-curses-dir was given.
6376 if test "${with_curses_dir+set}" = set; then
6377 withval="$with_curses_dir"
6378 cf_cv_curses_dir=$withval
6382 echo "$as_me:6382: result: $cf_cv_curses_dir" >&5
6383 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6385 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6388 if test "x$prefix" != xNONE; then
6389 cf_path_syntax="$prefix"
6391 cf_path_syntax="$ac_default_prefix"
6399 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6401 (.\$\{*prefix\}*|.\$\{*dir\}*)
6402 eval withval="$withval"
6405 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6410 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6413 { { echo "$as_me:6413: error: expected a pathname, not \"$withval\"" >&5
6414 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6415 { (exit 1); exit 1; }; }
6419 if test -d "$cf_cv_curses_dir"
6422 if test -n "$cf_cv_curses_dir/include" ; then
6423 for cf_add_incdir in $cf_cv_curses_dir/include
6425 while test "$cf_add_incdir" != /usr/include
6427 if test -d "$cf_add_incdir"
6430 if test -n "$CFLAGS$CPPFLAGS" ; then
6431 # a loop is needed to ensure we can add subdirs of existing dirs
6432 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6433 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6434 cf_have_incdir=yes; break
6439 if test "$cf_have_incdir" = no ; then
6440 if test "$cf_add_incdir" = /usr/local/include ; then
6441 if test "$GCC" = yes
6443 cf_save_CPPFLAGS=$CPPFLAGS
6445 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6446 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6448 cat >"conftest.$ac_ext" <<_ACEOF
6449 #line 6449 "configure"
6450 #include "confdefs.h"
6460 rm -f "conftest.$ac_objext"
6461 if { (eval echo "$as_me:6461: \"$ac_compile\"") >&5
6462 (eval $ac_compile) 2>&5
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit "$ac_status"); } &&
6466 { ac_try='test -s "conftest.$ac_objext"'
6467 { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6470 echo "$as_me:6470: \$? = $ac_status" >&5
6471 (exit "$ac_status"); }; }; then
6474 echo "$as_me: failed program was:" >&5
6475 cat "conftest.$ac_ext" >&5
6478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6479 CPPFLAGS=$cf_save_CPPFLAGS
6484 if test "$cf_have_incdir" = no ; then
6485 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6487 echo "${as_me:-configure}:6487: testing adding $cf_add_incdir to include-path ..." 1>&5
6489 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6491 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6492 test "$cf_top_incdir" = "$cf_add_incdir" && break
6493 cf_add_incdir="$cf_top_incdir"
6504 if test -n "$cf_cv_curses_dir/lib" ; then
6505 for cf_add_libdir in $cf_cv_curses_dir/lib
6507 if test "$cf_add_libdir" = /usr/lib ; then
6509 elif test -d "$cf_add_libdir"
6512 if test -n "$LDFLAGS$LIBS" ; then
6513 # a loop is needed to ensure we can add subdirs of existing dirs
6514 for cf_test_libdir in $LDFLAGS $LIBS ; do
6515 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6516 cf_have_libdir=yes; break
6520 if test "$cf_have_libdir" = no ; then
6521 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6523 echo "${as_me:-configure}:6523: testing adding $cf_add_libdir to library-path ..." 1>&5
6525 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6536 echo "$as_me:6536: checking for specified curses library type" >&5
6537 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6539 # Check whether --with-screen or --without-screen was given.
6540 if test "${with_screen+set}" = set; then
6541 withval="$with_screen"
6542 cf_cv_screen=$withval
6545 # Check whether --with-ncursesw or --without-ncursesw was given.
6546 if test "${with_ncursesw+set}" = set; then
6547 withval="$with_ncursesw"
6548 cf_cv_screen=ncursesw
6551 # Check whether --with-ncurses or --without-ncurses was given.
6552 if test "${with_ncurses+set}" = set; then
6553 withval="$with_ncurses"
6554 cf_cv_screen=ncurses
6557 # Check whether --with-pdcurses or --without-pdcurses was given.
6558 if test "${with_pdcurses+set}" = set; then
6559 withval="$with_pdcurses"
6560 cf_cv_screen=pdcurses
6563 # Check whether --with-curses-colr or --without-curses-colr was given.
6564 if test "${with_curses_colr+set}" = set; then
6565 withval="$with_curses_colr"
6566 cf_cv_screen=curses_colr
6569 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6570 if test "${with_curses_5lib+set}" = set; then
6571 withval="$with_curses_5lib"
6572 cf_cv_screen=curses_5lib
6580 echo "$as_me:6580: result: $cf_cv_screen" >&5
6581 echo "${ECHO_T}$cf_cv_screen" >&6
6583 case $cf_cv_screen in
6586 echo "$as_me:6586: checking for extra include directories" >&5
6587 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6588 if test "${cf_cv_curses_incdir+set}" = set; then
6589 echo $ECHO_N "(cached) $ECHO_C" >&6
6592 cf_cv_curses_incdir=no
6595 if test "x$cf_cv_screen" = "xcurses_colr"
6597 test -d /usr/include/curses_colr && \
6598 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6602 if test "x$cf_cv_screen" = "xcurses_5lib"
6604 test -d /usr/5lib && \
6605 test -d /usr/5include && \
6606 cf_cv_curses_incdir="-I/usr/5include"
6612 echo "$as_me:6612: result: $cf_cv_curses_incdir" >&5
6613 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6614 if test "$cf_cv_curses_incdir" != no
6617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6618 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6622 echo "$as_me:6622: checking if we have identified curses headers" >&5
6623 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6624 if test "${cf_cv_ncurses_header+set}" = set; then
6625 echo $ECHO_N "(cached) $ECHO_C" >&6
6628 cf_cv_ncurses_header=none
6631 curses.h ncurses/ncurses.h ncurses/curses.h
6633 cat >"conftest.$ac_ext" <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636 #include <${cf_header}>
6645 rm -f "conftest.$ac_objext"
6646 if { (eval echo "$as_me:6646: \"$ac_compile\"") >&5
6647 (eval $ac_compile) 2>&5
6649 echo "$as_me:6649: \$? = $ac_status" >&5
6650 (exit "$ac_status"); } &&
6651 { ac_try='test -s "conftest.$ac_objext"'
6652 { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6655 echo "$as_me:6655: \$? = $ac_status" >&5
6656 (exit "$ac_status"); }; }; then
6657 cf_cv_ncurses_header=$cf_header; break
6659 echo "$as_me: failed program was:" >&5
6660 cat "conftest.$ac_ext" >&5
6662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6666 echo "$as_me:6666: result: $cf_cv_ncurses_header" >&5
6667 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6669 if test "$cf_cv_ncurses_header" = none ; then
6670 { { echo "$as_me:6670: error: No curses header-files found" >&5
6671 echo "$as_me: error: No curses header-files found" >&2;}
6672 { (exit 1); exit 1; }; }
6675 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6677 for ac_header in $cf_cv_ncurses_header
6679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6680 echo "$as_me:6680: checking for $ac_header" >&5
6681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6683 echo $ECHO_N "(cached) $ECHO_C" >&6
6685 cat >"conftest.$ac_ext" <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688 #include <$ac_header>
6690 if { (eval echo "$as_me:6690: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6691 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6693 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6695 cat conftest.err >&5
6696 echo "$as_me:6696: \$? = $ac_status" >&5
6697 (exit "$ac_status"); } >/dev/null; then
6698 if test -s conftest.err; then
6699 ac_cpp_err=$ac_c_preproc_warn_flag
6706 if test -z "$ac_cpp_err"; then
6707 eval "$as_ac_Header=yes"
6709 echo "$as_me: failed program was:" >&5
6710 cat "conftest.$ac_ext" >&5
6711 eval "$as_ac_Header=no"
6713 rm -f conftest.err "conftest.$ac_ext"
6715 echo "$as_me:6715: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6716 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6717 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6718 cat >>confdefs.h <<EOF
6719 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6725 echo "$as_me:6725: checking for terminfo header" >&5
6726 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6727 if test "${cf_cv_term_header+set}" = set; then
6728 echo $ECHO_N "(cached) $ECHO_C" >&6
6731 case "${cf_cv_ncurses_header}" in
6732 (*/ncurses.h|*/ncursesw.h)
6733 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6736 cf_term_header=term.h
6740 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6742 cat >"conftest.$ac_ext" <<_ACEOF
6743 #line 6743 "configure"
6744 #include "confdefs.h"
6746 #include <${cf_cv_ncurses_header:-curses.h}>
6752 int x = auto_left_margin; (void)x
6757 rm -f "conftest.$ac_objext"
6758 if { (eval echo "$as_me:6758: \"$ac_compile\"") >&5
6759 (eval $ac_compile) 2>&5
6761 echo "$as_me:6761: \$? = $ac_status" >&5
6762 (exit "$ac_status"); } &&
6763 { ac_try='test -s "conftest.$ac_objext"'
6764 { (eval echo "$as_me:6764: \"$ac_try\"") >&5
6767 echo "$as_me:6767: \$? = $ac_status" >&5
6768 (exit "$ac_status"); }; }; then
6770 cf_cv_term_header="$cf_test"
6772 echo "$as_me: failed program was:" >&5
6773 cat "conftest.$ac_ext" >&5
6775 cf_cv_term_header=unknown
6778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6779 test "$cf_cv_term_header" != unknown && break
6783 echo "$as_me:6783: result: $cf_cv_term_header" >&5
6784 echo "${ECHO_T}$cf_cv_term_header" >&6
6786 # Set definitions to allow ifdef'ing to accommodate subdirectories
6788 case "$cf_cv_term_header" in
6791 cat >>confdefs.h <<\EOF
6792 #define HAVE_TERM_H 1
6798 case "$cf_cv_term_header" in
6801 cat >>confdefs.h <<\EOF
6802 #define HAVE_NCURSES_TERM_H 1
6808 cat >>confdefs.h <<\EOF
6809 #define HAVE_NCURSESW_TERM_H 1
6815 echo "$as_me:6815: checking for ncurses version" >&5
6816 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6817 if test "${cf_cv_ncurses_version+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6821 cf_cv_ncurses_version=no
6823 rm -f "$cf_tempfile"
6824 if test "$cross_compiling" = yes; then
6826 # This will not work if the preprocessor splits the line after the
6827 # Autoconf token. The 'unproto' program does that.
6828 cat > "conftest.$ac_ext" <<EOF
6829 #include <${cf_cv_ncurses_header:-curses.h}>
6831 #ifdef NCURSES_VERSION
6832 Autoconf NCURSES_VERSION
6840 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6841 { (eval echo "$as_me:6841: \"$cf_try\"") >&5
6844 echo "$as_me:6844: \$? = $ac_status" >&5
6845 (exit "$ac_status"); }
6846 if test -f conftest.out ; then
6847 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6848 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6853 cat >"conftest.$ac_ext" <<_ACEOF
6854 #line 6854 "configure"
6855 #include "confdefs.h"
6857 $ac_includes_default
6859 #include <${cf_cv_ncurses_header:-curses.h}>
6863 FILE *fp = fopen("$cf_tempfile", "w");
6864 #ifdef NCURSES_VERSION
6865 # ifdef NCURSES_VERSION_PATCH
6866 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6868 fprintf(fp, "%s\\n", NCURSES_VERSION);
6872 fprintf(fp, "old\\n");
6877 ${cf_cv_main_return:-return}(0);
6880 rm -f "conftest$ac_exeext"
6881 if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882 (eval $ac_link) 2>&5
6884 echo "$as_me:6884: \$? = $ac_status" >&5
6885 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6886 { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6889 echo "$as_me:6889: \$? = $ac_status" >&5
6890 (exit "$ac_status"); }; }; then
6892 cf_cv_ncurses_version=`cat $cf_tempfile`
6894 echo "$as_me: program exited with status $ac_status" >&5
6895 echo "$as_me: failed program was:" >&5
6896 cat "conftest.$ac_ext" >&5
6898 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6900 rm -f "$cf_tempfile"
6903 echo "$as_me:6903: result: $cf_cv_ncurses_version" >&5
6904 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6905 test "$cf_cv_ncurses_version" = no ||
6906 cat >>confdefs.h <<\EOF
6910 echo "$as_me:6910: checking if we have identified curses libraries" >&5
6911 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6912 cat >"conftest.$ac_ext" <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 #include <${cf_cv_ncurses_header:-curses.h}>
6924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6925 if { (eval echo "$as_me:6925: \"$ac_link\"") >&5
6926 (eval $ac_link) 2>&5
6928 echo "$as_me:6928: \$? = $ac_status" >&5
6929 (exit "$ac_status"); } &&
6930 { ac_try='test -s "conftest$ac_exeext"'
6931 { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6934 echo "$as_me:6934: \$? = $ac_status" >&5
6935 (exit "$ac_status"); }; }; then
6938 echo "$as_me: failed program was:" >&5
6939 cat "conftest.$ac_ext" >&5
6942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6943 echo "$as_me:6943: result: $cf_result" >&5
6944 echo "${ECHO_T}$cf_result" >&6
6946 if test "$cf_result" = no ; then
6949 echo "$as_me:6949: checking for tgoto in -lmytinfo" >&5
6950 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6951 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
6954 ac_check_lib_save_LIBS=$LIBS
6955 LIBS="-lmytinfo $LIBS"
6956 cat >"conftest.$ac_ext" <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6960 /* Override any gcc2 internal prototype to avoid an error. */
6964 /* We use char because int might match the return type of a gcc2
6965 builtin and then its argument prototype would still apply. */
6975 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6976 if { (eval echo "$as_me:6976: \"$ac_link\"") >&5
6977 (eval $ac_link) 2>&5
6979 echo "$as_me:6979: \$? = $ac_status" >&5
6980 (exit "$ac_status"); } &&
6981 { ac_try='test -s "conftest$ac_exeext"'
6982 { (eval echo "$as_me:6982: \"$ac_try\"") >&5
6985 echo "$as_me:6985: \$? = $ac_status" >&5
6986 (exit "$ac_status"); }; }; then
6987 ac_cv_lib_mytinfo_tgoto=yes
6989 echo "$as_me: failed program was:" >&5
6990 cat "conftest.$ac_ext" >&5
6991 ac_cv_lib_mytinfo_tgoto=no
6993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6994 LIBS=$ac_check_lib_save_LIBS
6996 echo "$as_me:6996: result: $ac_cv_lib_mytinfo_tgoto" >&5
6997 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6998 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
7003 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7005 for cf_add_1lib in $cf_add_0lib; do
7006 for cf_add_2lib in $cf_add_libs; do
7007 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7012 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7020 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7021 # next (1998), and xcurses "newer" (2000). There is no header file for
7022 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7023 # term.h) for cur_colr
7024 if test "x$cf_cv_screen" = "xcurses_colr"
7026 echo "$as_me:7026: checking for initscr in -lcur_colr" >&5
7027 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7028 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7029 echo $ECHO_N "(cached) $ECHO_C" >&6
7031 ac_check_lib_save_LIBS=$LIBS
7032 LIBS="-lcur_colr $LIBS"
7033 cat >"conftest.$ac_ext" <<_ACEOF
7034 #line 7034 "configure"
7035 #include "confdefs.h"
7037 /* Override any gcc2 internal prototype to avoid an error. */
7041 /* We use char because int might match the return type of a gcc2
7042 builtin and then its argument prototype would still apply. */
7052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7053 if { (eval echo "$as_me:7053: \"$ac_link\"") >&5
7054 (eval $ac_link) 2>&5
7056 echo "$as_me:7056: \$? = $ac_status" >&5
7057 (exit "$ac_status"); } &&
7058 { ac_try='test -s "conftest$ac_exeext"'
7059 { (eval echo "$as_me:7059: \"$ac_try\"") >&5
7062 echo "$as_me:7062: \$? = $ac_status" >&5
7063 (exit "$ac_status"); }; }; then
7064 ac_cv_lib_cur_colr_initscr=yes
7066 echo "$as_me: failed program was:" >&5
7067 cat "conftest.$ac_ext" >&5
7068 ac_cv_lib_cur_colr_initscr=no
7070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7071 LIBS=$ac_check_lib_save_LIBS
7073 echo "$as_me:7073: result: $ac_cv_lib_cur_colr_initscr" >&5
7074 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7075 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7080 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7082 for cf_add_1lib in $cf_add_0lib; do
7083 for cf_add_2lib in $cf_add_libs; do
7084 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7093 ac_cv_func_initscr=yes
7097 echo "$as_me:7097: checking for initscr in -lHcurses" >&5
7098 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7099 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7100 echo $ECHO_N "(cached) $ECHO_C" >&6
7102 ac_check_lib_save_LIBS=$LIBS
7103 LIBS="-lHcurses $LIBS"
7104 cat >"conftest.$ac_ext" <<_ACEOF
7105 #line 7105 "configure"
7106 #include "confdefs.h"
7108 /* Override any gcc2 internal prototype to avoid an error. */
7112 /* We use char because int might match the return type of a gcc2
7113 builtin and then its argument prototype would still apply. */
7123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7124 if { (eval echo "$as_me:7124: \"$ac_link\"") >&5
7125 (eval $ac_link) 2>&5
7127 echo "$as_me:7127: \$? = $ac_status" >&5
7128 (exit "$ac_status"); } &&
7129 { ac_try='test -s "conftest$ac_exeext"'
7130 { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7133 echo "$as_me:7133: \$? = $ac_status" >&5
7134 (exit "$ac_status"); }; }; then
7135 ac_cv_lib_Hcurses_initscr=yes
7137 echo "$as_me: failed program was:" >&5
7138 cat "conftest.$ac_ext" >&5
7139 ac_cv_lib_Hcurses_initscr=no
7141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7142 LIBS=$ac_check_lib_save_LIBS
7144 echo "$as_me:7144: result: $ac_cv_lib_Hcurses_initscr" >&5
7145 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7146 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7148 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7153 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7155 for cf_add_1lib in $cf_add_0lib; do
7156 for cf_add_2lib in $cf_add_libs; do
7157 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7162 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7167 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7169 ac_cv_func_initscr=yes
7178 case `arch 2>/dev/null` in
7183 if test -n "/lib64" ; then
7184 for cf_add_libdir in /lib64
7186 if test "$cf_add_libdir" = /usr/lib ; then
7188 elif test -d "$cf_add_libdir"
7191 if test -n "$LDFLAGS$LIBS" ; then
7192 # a loop is needed to ensure we can add subdirs of existing dirs
7193 for cf_test_libdir in $LDFLAGS $LIBS ; do
7194 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7195 cf_have_libdir=yes; break
7199 if test "$cf_have_libdir" = no ; then
7200 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7202 echo "${as_me:-configure}:7202: testing adding $cf_add_libdir to library-path ..." 1>&5
7204 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7212 if test -n "/lib" ; then
7213 for cf_add_libdir in /lib
7215 if test "$cf_add_libdir" = /usr/lib ; then
7217 elif test -d "$cf_add_libdir"
7220 if test -n "$LDFLAGS$LIBS" ; then
7221 # a loop is needed to ensure we can add subdirs of existing dirs
7222 for cf_test_libdir in $LDFLAGS $LIBS ; do
7223 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7224 cf_have_libdir=yes; break
7228 if test "$cf_have_libdir" = no ; then
7229 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7231 echo "${as_me:-configure}:7231: testing adding $cf_add_libdir to library-path ..." 1>&5
7233 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7243 if test -n "/lib" ; then
7244 for cf_add_libdir in /lib
7246 if test "$cf_add_libdir" = /usr/lib ; then
7248 elif test -d "$cf_add_libdir"
7251 if test -n "$LDFLAGS$LIBS" ; then
7252 # a loop is needed to ensure we can add subdirs of existing dirs
7253 for cf_test_libdir in $LDFLAGS $LIBS ; do
7254 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7255 cf_have_libdir=yes; break
7259 if test "$cf_have_libdir" = no ; then
7260 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7262 echo "${as_me:-configure}:7262: testing adding $cf_add_libdir to library-path ..." 1>&5
7264 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7274 if test "x$cf_cv_screen" = "xcurses_5lib"
7276 if test -d /usr/5lib ; then
7278 if test -n "/usr/5lib" ; then
7279 for cf_add_libdir in /usr/5lib
7281 if test "$cf_add_libdir" = /usr/lib ; then
7283 elif test -d "$cf_add_libdir"
7286 if test -n "$LDFLAGS$LIBS" ; then
7287 # a loop is needed to ensure we can add subdirs of existing dirs
7288 for cf_test_libdir in $LDFLAGS $LIBS ; do
7289 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7290 cf_have_libdir=yes; break
7294 if test "$cf_have_libdir" = no ; then
7295 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7297 echo "${as_me:-configure}:7297: testing adding $cf_add_libdir to library-path ..." 1>&5
7299 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7308 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7310 for cf_add_1lib in $cf_add_0lib; do
7311 for cf_add_2lib in $cf_add_libs; do
7312 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7317 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7323 ac_cv_func_initscr=yes
7327 if test ".$ac_cv_func_initscr" != .yes ; then
7328 cf_save_LIBS="$LIBS"
7330 if test ".${cf_cv_ncurses_version:-no}" != .no
7332 cf_check_list="ncurses curses cursesX"
7334 cf_check_list="cursesX curses ncurses"
7337 # Check for library containing tgoto. Do this before curses library
7338 # because it may be needed to link the test-case for initscr.
7339 if test "x$cf_term_lib" = x
7341 echo "$as_me:7341: checking for tgoto" >&5
7342 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7343 if test "${ac_cv_func_tgoto+set}" = set; then
7344 echo $ECHO_N "(cached) $ECHO_C" >&6
7346 cat >"conftest.$ac_ext" <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7349 #define tgoto autoconf_temporary
7350 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7357 /* We use char because int might match the return type of a gcc2
7358 builtin and then its argument prototype would still apply. */
7365 /* The GNU C library defines stubs for functions which it implements
7366 to always fail with ENOSYS. Some functions are actually named
7367 something starting with __ and the normal name is an alias. */
7368 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7369 #error found stub for tgoto
7377 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7378 if { (eval echo "$as_me:7378: \"$ac_link\"") >&5
7379 (eval $ac_link) 2>&5
7381 echo "$as_me:7381: \$? = $ac_status" >&5
7382 (exit "$ac_status"); } &&
7383 { ac_try='test -s "conftest$ac_exeext"'
7384 { (eval echo "$as_me:7384: \"$ac_try\"") >&5
7387 echo "$as_me:7387: \$? = $ac_status" >&5
7388 (exit "$ac_status"); }; }; then
7389 ac_cv_func_tgoto=yes
7391 echo "$as_me: failed program was:" >&5
7392 cat "conftest.$ac_ext" >&5
7395 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7397 echo "$as_me:7397: result: $ac_cv_func_tgoto" >&5
7398 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7399 if test "$ac_cv_func_tgoto" = yes; then
7400 cf_term_lib=predefined
7403 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7405 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7406 echo "$as_me:7406: checking for tgoto in -l$cf_term_lib" >&5
7407 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7408 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7409 echo $ECHO_N "(cached) $ECHO_C" >&6
7411 ac_check_lib_save_LIBS=$LIBS
7412 LIBS="-l$cf_term_lib $LIBS"
7413 cat >"conftest.$ac_ext" <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7417 /* Override any gcc2 internal prototype to avoid an error. */
7421 /* We use char because int might match the return type of a gcc2
7422 builtin and then its argument prototype would still apply. */
7432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7433 if { (eval echo "$as_me:7433: \"$ac_link\"") >&5
7434 (eval $ac_link) 2>&5
7436 echo "$as_me:7436: \$? = $ac_status" >&5
7437 (exit "$ac_status"); } &&
7438 { ac_try='test -s "conftest$ac_exeext"'
7439 { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7442 echo "$as_me:7442: \$? = $ac_status" >&5
7443 (exit "$ac_status"); }; }; then
7444 eval "$as_ac_Lib=yes"
7446 echo "$as_me: failed program was:" >&5
7447 cat "conftest.$ac_ext" >&5
7448 eval "$as_ac_Lib=no"
7450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7451 LIBS=$ac_check_lib_save_LIBS
7453 echo "$as_me:7453: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7454 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7455 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7457 : "${cf_nculib_root:=$cf_term_lib}"
7468 # Check for library containing initscr
7469 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7470 if test "x$cf_curs_lib" = x
7472 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7474 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7475 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7476 echo "$as_me:7476: checking if we can link with $cf_curs_lib library" >&5
7477 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7478 cat >"conftest.$ac_ext" <<_ACEOF
7479 #line 7479 "configure"
7480 #include "confdefs.h"
7481 #include <${cf_cv_ncurses_header:-curses.h}>
7490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7491 if { (eval echo "$as_me:7491: \"$ac_link\"") >&5
7492 (eval $ac_link) 2>&5
7494 echo "$as_me:7494: \$? = $ac_status" >&5
7495 (exit "$ac_status"); } &&
7496 { ac_try='test -s "conftest$ac_exeext"'
7497 { (eval echo "$as_me:7497: \"$ac_try\"") >&5
7500 echo "$as_me:7500: \$? = $ac_status" >&5
7501 (exit "$ac_status"); }; }; then
7504 echo "$as_me: failed program was:" >&5
7505 cat "conftest.$ac_ext" >&5
7508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7509 echo "$as_me:7509: result: $cf_result" >&5
7510 echo "${ECHO_T}$cf_result" >&6
7511 test "$cf_result" = yes && break
7512 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7514 elif test "$cf_term_lib" != predefined ; then
7515 echo "$as_me:7515: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7516 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7517 cat >"conftest.$ac_ext" <<_ACEOF
7518 #line 7518 "configure"
7519 #include "confdefs.h"
7520 #include <${cf_cv_ncurses_header:-curses.h}>
7524 initscr(); endwin();
7529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7530 if { (eval echo "$as_me:7530: \"$ac_link\"") >&5
7531 (eval $ac_link) 2>&5
7533 echo "$as_me:7533: \$? = $ac_status" >&5
7534 (exit "$ac_status"); } &&
7535 { ac_try='test -s "conftest$ac_exeext"'
7536 { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7539 echo "$as_me:7539: \$? = $ac_status" >&5
7540 (exit "$ac_status"); }; }; then
7543 echo "$as_me: failed program was:" >&5
7544 cat "conftest.$ac_ext" >&5
7546 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7547 cat >"conftest.$ac_ext" <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 #include <${cf_cv_ncurses_header:-curses.h}>
7559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7560 if { (eval echo "$as_me:7560: \"$ac_link\"") >&5
7561 (eval $ac_link) 2>&5
7563 echo "$as_me:7563: \$? = $ac_status" >&5
7564 (exit "$ac_status"); } &&
7565 { ac_try='test -s "conftest$ac_exeext"'
7566 { (eval echo "$as_me:7566: \"$ac_try\"") >&5
7569 echo "$as_me:7569: \$? = $ac_status" >&5
7570 (exit "$ac_status"); }; }; then
7573 echo "$as_me: failed program was:" >&5
7574 cat "conftest.$ac_ext" >&5
7577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7581 echo "$as_me:7581: result: $cf_result" >&5
7582 echo "${ECHO_T}$cf_result" >&6
7583 test "$cf_result" != error && break
7587 test "$cf_curs_lib" = unknown && { { echo "$as_me:7587: error: no curses library found" >&5
7588 echo "$as_me: error: no curses library found" >&2;}
7589 { (exit 1); exit 1; }; }
7596 for ac_header in wchar.h
7598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7599 echo "$as_me:7599: checking for $ac_header" >&5
7600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7602 echo $ECHO_N "(cached) $ECHO_C" >&6
7604 cat >"conftest.$ac_ext" <<_ACEOF
7605 #line 7605 "configure"
7606 #include "confdefs.h"
7607 #include <$ac_header>
7609 if { (eval echo "$as_me:7609: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7610 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7612 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7614 cat conftest.err >&5
7615 echo "$as_me:7615: \$? = $ac_status" >&5
7616 (exit "$ac_status"); } >/dev/null; then
7617 if test -s conftest.err; then
7618 ac_cpp_err=$ac_c_preproc_warn_flag
7625 if test -z "$ac_cpp_err"; then
7626 eval "$as_ac_Header=yes"
7628 echo "$as_me: failed program was:" >&5
7629 cat "conftest.$ac_ext" >&5
7630 eval "$as_ac_Header=no"
7632 rm -f conftest.err "conftest.$ac_ext"
7634 echo "$as_me:7634: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7635 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7636 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7637 cat >>confdefs.h <<EOF
7638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7644 echo "$as_me:7644: checking for multibyte character support" >&5
7645 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7646 if test "${cf_cv_utf8_lib+set}" = set; then
7647 echo $ECHO_N "(cached) $ECHO_C" >&6
7650 cf_save_LIBS="$LIBS"
7651 cat >"conftest.$ac_ext" <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7670 if { (eval echo "$as_me:7670: \"$ac_link\"") >&5
7671 (eval $ac_link) 2>&5
7673 echo "$as_me:7673: \$? = $ac_status" >&5
7674 (exit "$ac_status"); } &&
7675 { ac_try='test -s "conftest$ac_exeext"'
7676 { (eval echo "$as_me:7676: \"$ac_try\"") >&5
7679 echo "$as_me:7679: \$? = $ac_status" >&5
7680 (exit "$ac_status"); }; }; then
7683 echo "$as_me: failed program was:" >&5
7684 cat "conftest.$ac_ext" >&5
7686 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7687 # will be set on completion of the AC_TRY_LINK below.
7688 cf_cv_header_path_utf8=
7689 cf_cv_library_path_utf8=
7691 echo "${as_me:-configure}:7691: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7693 cf_save_LIBS="$LIBS"
7695 cat >"conftest.$ac_ext" <<_ACEOF
7696 #line 7696 "configure"
7697 #include "confdefs.h"
7699 #include <libutf8.h>
7708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7709 if { (eval echo "$as_me:7709: \"$ac_link\"") >&5
7710 (eval $ac_link) 2>&5
7712 echo "$as_me:7712: \$? = $ac_status" >&5
7713 (exit "$ac_status"); } &&
7714 { ac_try='test -s "conftest$ac_exeext"'
7715 { (eval echo "$as_me:7715: \"$ac_try\"") >&5
7718 echo "$as_me:7718: \$? = $ac_status" >&5
7719 (exit "$ac_status"); }; }; then
7721 cf_cv_find_linkage_utf8=yes
7722 cf_cv_header_path_utf8=/usr/include
7723 cf_cv_library_path_utf8=/usr/lib
7726 echo "$as_me: failed program was:" >&5
7727 cat "conftest.$ac_ext" >&5
7729 LIBS="-lutf8 $cf_save_LIBS"
7731 cat >"conftest.$ac_ext" <<_ACEOF
7732 #line 7732 "configure"
7733 #include "confdefs.h"
7735 #include <libutf8.h>
7744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7745 if { (eval echo "$as_me:7745: \"$ac_link\"") >&5
7746 (eval $ac_link) 2>&5
7748 echo "$as_me:7748: \$? = $ac_status" >&5
7749 (exit "$ac_status"); } &&
7750 { ac_try='test -s "conftest$ac_exeext"'
7751 { (eval echo "$as_me:7751: \"$ac_try\"") >&5
7754 echo "$as_me:7754: \$? = $ac_status" >&5
7755 (exit "$ac_status"); }; }; then
7757 cf_cv_find_linkage_utf8=yes
7758 cf_cv_header_path_utf8=/usr/include
7759 cf_cv_library_path_utf8=/usr/lib
7760 cf_cv_library_file_utf8="-lutf8"
7763 echo "$as_me: failed program was:" >&5
7764 cat "conftest.$ac_ext" >&5
7766 cf_cv_find_linkage_utf8=no
7767 LIBS="$cf_save_LIBS"
7769 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7771 echo "${as_me:-configure}:7771: testing find linkage for utf8 library ..." 1>&5
7773 echo "${as_me:-configure}:7773: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7775 cf_save_CPPFLAGS="$CPPFLAGS"
7776 cf_test_CPPFLAGS="$CPPFLAGS"
7780 # collect the current set of include-directories from compiler flags
7781 cf_header_path_list=""
7782 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7783 for cf_header_path in $CPPFLAGS $CFLAGS
7785 case "$cf_header_path" in
7787 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7789 test "x$cf_header_path" != "xNONE" && \
7790 test -d "$cf_header_path" && \
7792 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7793 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7794 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7795 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7796 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7797 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7800 cf_header_path_list="$cf_header_path_list $cf_search"
7806 # add the variations for the package we are looking for
7810 test "x$prefix" != "xNONE" && \
7811 test -d "$prefix" && \
7813 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7814 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7815 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7816 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7817 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7818 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7821 for cf_subdir_prefix in \
7830 test "x$cf_subdir_prefix" != "x$prefix" && \
7831 test -d "$cf_subdir_prefix" && \
7832 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7833 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7834 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7835 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7836 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7837 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7838 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7843 test "$includedir" != NONE && \
7844 test "$includedir" != "/usr/include" && \
7845 test -d "$includedir" && {
7846 test -d "$includedir" && cf_search="$cf_search $includedir"
7847 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7850 test "$oldincludedir" != NONE && \
7851 test "$oldincludedir" != "/usr/include" && \
7852 test -d "$oldincludedir" && {
7853 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7854 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7857 cf_search="$cf_search $cf_header_path_list"
7859 for cf_cv_header_path_utf8 in $cf_search
7861 if test -d "$cf_cv_header_path_utf8" ; then
7862 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7864 echo "${as_me:-configure}:7864: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7866 CPPFLAGS="$cf_save_CPPFLAGS"
7868 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7869 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7871 cat >"conftest.$ac_ext" <<_ACEOF
7872 #line 7872 "configure"
7873 #include "confdefs.h"
7875 #include <libutf8.h>
7884 rm -f "conftest.$ac_objext"
7885 if { (eval echo "$as_me:7885: \"$ac_compile\"") >&5
7886 (eval $ac_compile) 2>&5
7888 echo "$as_me:7888: \$? = $ac_status" >&5
7889 (exit "$ac_status"); } &&
7890 { ac_try='test -s "conftest.$ac_objext"'
7891 { (eval echo "$as_me:7891: \"$ac_try\"") >&5
7894 echo "$as_me:7894: \$? = $ac_status" >&5
7895 (exit "$ac_status"); }; }; then
7897 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7899 echo "${as_me:-configure}:7899: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7901 cf_cv_find_linkage_utf8=maybe
7902 cf_test_CPPFLAGS="$CPPFLAGS"
7905 echo "$as_me: failed program was:" >&5
7906 cat "conftest.$ac_ext" >&5
7908 CPPFLAGS="$cf_save_CPPFLAGS"
7911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7915 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7917 echo "${as_me:-configure}:7917: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7919 cf_save_LIBS="$LIBS"
7920 cf_save_LDFLAGS="$LDFLAGS"
7922 if test "$cf_cv_find_linkage_utf8" != yes ; then
7925 cf_library_path_list=""
7926 if test -n "${LDFLAGS}${LIBS}" ; then
7927 for cf_library_path in $LDFLAGS $LIBS
7929 case "$cf_library_path" in
7931 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7933 test "x$cf_library_path" != "xNONE" && \
7934 test -d "$cf_library_path" && \
7936 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7937 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7938 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7939 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7940 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7941 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7944 cf_library_path_list="$cf_library_path_list $cf_search"
7952 test "x$prefix" != "xNONE" && \
7953 test -d "$prefix" && \
7955 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7956 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7957 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7958 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7959 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7960 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7963 for cf_subdir_prefix in \
7972 test "x$cf_subdir_prefix" != "x$prefix" && \
7973 test -d "$cf_subdir_prefix" && \
7974 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7975 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7976 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7977 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7978 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7979 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7980 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7985 cf_search="$cf_library_path_list $cf_search"
7987 for cf_cv_library_path_utf8 in $cf_search
7989 if test -d "$cf_cv_library_path_utf8" ; then
7990 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7992 echo "${as_me:-configure}:7992: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7994 CPPFLAGS="$cf_test_CPPFLAGS"
7995 LIBS="-lutf8 $cf_save_LIBS"
7996 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7997 cat >"conftest.$ac_ext" <<_ACEOF
7998 #line 7998 "configure"
7999 #include "confdefs.h"
8001 #include <libutf8.h>
8010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8011 if { (eval echo "$as_me:8011: \"$ac_link\"") >&5
8012 (eval $ac_link) 2>&5
8014 echo "$as_me:8014: \$? = $ac_status" >&5
8015 (exit "$ac_status"); } &&
8016 { ac_try='test -s "conftest$ac_exeext"'
8017 { (eval echo "$as_me:8017: \"$ac_try\"") >&5
8020 echo "$as_me:8020: \$? = $ac_status" >&5
8021 (exit "$ac_status"); }; }; then
8023 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8025 echo "${as_me:-configure}:8025: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8027 cf_cv_find_linkage_utf8=yes
8028 cf_cv_library_file_utf8="-lutf8"
8031 echo "$as_me: failed program was:" >&5
8032 cat "conftest.$ac_ext" >&5
8034 CPPFLAGS="$cf_save_CPPFLAGS"
8035 LIBS="$cf_save_LIBS"
8036 LDFLAGS="$cf_save_LDFLAGS"
8039 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8042 CPPFLAGS="$cf_save_CPPFLAGS"
8043 LDFLAGS="$cf_save_LDFLAGS"
8047 cf_cv_find_linkage_utf8=no
8051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8056 LIBS="$cf_save_LIBS"
8058 if test "$cf_cv_find_linkage_utf8" = yes ; then
8059 cf_cv_utf8_lib=add-on
8065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8067 echo "$as_me:8067: result: $cf_cv_utf8_lib" >&5
8068 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8070 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8072 if test "$cf_cv_utf8_lib" = "add-on" ; then
8074 cat >>confdefs.h <<\EOF
8075 #define HAVE_LIBUTF8_H 1
8078 if test -n "$cf_cv_header_path_utf8" ; then
8079 for cf_add_incdir in $cf_cv_header_path_utf8
8081 while test "$cf_add_incdir" != /usr/include
8083 if test -d "$cf_add_incdir"
8086 if test -n "$CFLAGS$CPPFLAGS" ; then
8087 # a loop is needed to ensure we can add subdirs of existing dirs
8088 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8089 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8090 cf_have_incdir=yes; break
8095 if test "$cf_have_incdir" = no ; then
8096 if test "$cf_add_incdir" = /usr/local/include ; then
8097 if test "$GCC" = yes
8099 cf_save_CPPFLAGS=$CPPFLAGS
8101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8102 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8104 cat >"conftest.$ac_ext" <<_ACEOF
8105 #line 8105 "configure"
8106 #include "confdefs.h"
8116 rm -f "conftest.$ac_objext"
8117 if { (eval echo "$as_me:8117: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8120 echo "$as_me:8120: \$? = $ac_status" >&5
8121 (exit "$ac_status"); } &&
8122 { ac_try='test -s "conftest.$ac_objext"'
8123 { (eval echo "$as_me:8123: \"$ac_try\"") >&5
8126 echo "$as_me:8126: \$? = $ac_status" >&5
8127 (exit "$ac_status"); }; }; then
8130 echo "$as_me: failed program was:" >&5
8131 cat "conftest.$ac_ext" >&5
8134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8135 CPPFLAGS=$cf_save_CPPFLAGS
8140 if test "$cf_have_incdir" = no ; then
8141 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8143 echo "${as_me:-configure}:8143: testing adding $cf_add_incdir to include-path ..." 1>&5
8145 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8147 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8148 test "$cf_top_incdir" = "$cf_add_incdir" && break
8149 cf_add_incdir="$cf_top_incdir"
8160 if test -n "$cf_cv_library_path_utf8" ; then
8161 for cf_add_libdir in $cf_cv_library_path_utf8
8163 if test "$cf_add_libdir" = /usr/lib ; then
8165 elif test -d "$cf_add_libdir"
8168 if test -n "$LDFLAGS$LIBS" ; then
8169 # a loop is needed to ensure we can add subdirs of existing dirs
8170 for cf_test_libdir in $LDFLAGS $LIBS ; do
8171 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8172 cf_have_libdir=yes; break
8176 if test "$cf_have_libdir" = no ; then
8177 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8179 echo "${as_me:-configure}:8179: testing adding $cf_add_libdir to library-path ..." 1>&5
8181 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8190 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8192 for cf_add_1lib in $cf_add_0lib; do
8193 for cf_add_2lib in $cf_add_libs; do
8194 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8199 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8205 cf_ncuconfig_root=$cf_cv_screen
8206 cf_have_ncuconfig=no
8208 if test "x${PKG_CONFIG:=none}" != xnone; then
8209 echo "$as_me:8209: checking pkg-config for $cf_ncuconfig_root" >&5
8210 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8211 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8212 echo "$as_me:8212: result: yes" >&5
8213 echo "${ECHO_T}yes" >&6
8215 echo "$as_me:8215: checking if the $cf_ncuconfig_root package files work" >&5
8216 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8217 cf_have_ncuconfig=unknown
8219 cf_save_CFLAGS="$CFLAGS"
8220 cf_save_CPPFLAGS="$CPPFLAGS"
8221 cf_save_LIBS="$LIBS"
8223 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8224 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8226 # while -W for passing linker flags is prevalent, it is not "standard".
8227 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8228 # incompatible _and_ non-standard -W option which gives an error. Work
8229 # around that pitfall.
8230 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8236 cf_new_extra_cppflags=
8238 for cf_add_cflags in $cf_pkg_cflags
8240 case "$cf_fix_cppflags" in
8242 case "$cf_add_cflags" in
8243 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8244 case "$cf_add_cflags" in
8246 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8248 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8249 && test -z "${cf_tst_cflags}" \
8250 && cf_fix_cppflags=yes
8252 if test "$cf_fix_cppflags" = yes ; then
8254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8258 elif test "${cf_tst_cflags}" = "\"'" ; then
8260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8271 case "$cf_add_cflags" in
8273 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8275 CPPFLAGS=`echo "$CPPFLAGS" | \
8276 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8277 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8282 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8283 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8290 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8291 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8298 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8299 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8301 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8303 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8304 && test -z "${cf_tst_cflags}" \
8305 && cf_fix_cppflags=no
8310 if test -n "$cf_new_cflags" ; then
8312 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8313 CFLAGS="${CFLAGS}$cf_new_cflags"
8317 if test -n "$cf_new_cppflags" ; then
8319 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8320 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8324 if test -n "$cf_new_extra_cppflags" ; then
8326 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8327 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8334 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8336 for cf_add_1lib in $cf_add_0lib; do
8337 for cf_add_2lib in $cf_add_libs; do
8338 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8343 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8347 cat >"conftest.$ac_ext" <<_ACEOF
8348 #line 8348 "configure"
8349 #include "confdefs.h"
8350 #include <${cf_cv_ncurses_header:-curses.h}>
8354 initscr(); mousemask(0,0); tigetstr((char *)0);
8359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8360 if { (eval echo "$as_me:8360: \"$ac_link\"") >&5
8361 (eval $ac_link) 2>&5
8363 echo "$as_me:8363: \$? = $ac_status" >&5
8364 (exit "$ac_status"); } &&
8365 { ac_try='test -s "conftest$ac_exeext"'
8366 { (eval echo "$as_me:8366: \"$ac_try\"") >&5
8369 echo "$as_me:8369: \$? = $ac_status" >&5
8370 (exit "$ac_status"); }; }; then
8371 if test "$cross_compiling" = yes; then
8372 cf_test_ncuconfig=maybe
8374 cat >"conftest.$ac_ext" <<_ACEOF
8375 #line 8375 "configure"
8376 #include "confdefs.h"
8377 #include <${cf_cv_ncurses_header:-curses.h}>
8379 { const char *xx = curses_version(); return (xx == 0); }
8381 rm -f "conftest$ac_exeext"
8382 if { (eval echo "$as_me:8382: \"$ac_link\"") >&5
8383 (eval $ac_link) 2>&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8387 { (eval echo "$as_me:8387: \"$ac_try\"") >&5
8390 echo "$as_me:8390: \$? = $ac_status" >&5
8391 (exit "$ac_status"); }; }; then
8392 cf_test_ncuconfig=yes
8394 echo "$as_me: program exited with status $ac_status" >&5
8395 echo "$as_me: failed program was:" >&5
8396 cat "conftest.$ac_ext" >&5
8397 cf_test_ncuconfig=no
8399 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8402 echo "$as_me: failed program was:" >&5
8403 cat "conftest.$ac_ext" >&5
8404 cf_test_ncuconfig=no
8406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8408 CFLAGS="$cf_save_CFLAGS"
8409 CPPFLAGS="$cf_save_CPPFLAGS"
8410 LIBS="$cf_save_LIBS"
8412 if test "x$cf_test_ncuconfig" != xyes; then
8413 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8414 cf_pkg_cflags="$cf_temp"
8415 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8416 cf_pkg_libs="$cf_temp"
8421 for cf_add_cflags in $cf_pkg_cflags
8423 case "x$cf_add_cflags" in
8426 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8429 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8430 test "$CFLAGS" != "$cf_old_cflag" || break
8432 CFLAGS="$cf_old_cflag"
8435 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8438 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8439 test "$CPPFLAGS" != "$cf_old_cflag" || break
8441 CPPFLAGS="$cf_old_cflag"
8450 cf_new_extra_cppflags=
8452 for cf_add_cflags in $cf_add_cflags
8454 case "$cf_fix_cppflags" in
8456 case "$cf_add_cflags" in
8457 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8458 case "$cf_add_cflags" in
8460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8463 && test -z "${cf_tst_cflags}" \
8464 && cf_fix_cppflags=yes
8466 if test "$cf_fix_cppflags" = yes ; then
8468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8472 elif test "${cf_tst_cflags}" = "\"'" ; then
8474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8485 case "$cf_add_cflags" in
8487 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8489 CPPFLAGS=`echo "$CPPFLAGS" | \
8490 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8491 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8496 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8497 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8504 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8505 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8512 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8513 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8515 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8517 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8518 && test -z "${cf_tst_cflags}" \
8519 && cf_fix_cppflags=no
8524 if test -n "$cf_new_cflags" ; then
8526 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8527 CFLAGS="${CFLAGS}$cf_new_cflags"
8531 if test -n "$cf_new_cppflags" ; then
8533 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8534 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8538 if test -n "$cf_new_extra_cppflags" ; then
8540 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8541 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8550 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8552 for cf_add_1lib in $cf_add_0lib; do
8553 for cf_add_2lib in $cf_add_libs; do
8554 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8563 cat >"conftest.$ac_ext" <<_ACEOF
8564 #line 8564 "configure"
8565 #include "confdefs.h"
8566 #include <${cf_cv_ncurses_header:-curses.h}>
8570 initscr(); mousemask(0,0); tigetstr((char *)0);
8575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8576 if { (eval echo "$as_me:8576: \"$ac_link\"") >&5
8577 (eval $ac_link) 2>&5
8579 echo "$as_me:8579: \$? = $ac_status" >&5
8580 (exit "$ac_status"); } &&
8581 { ac_try='test -s "conftest$ac_exeext"'
8582 { (eval echo "$as_me:8582: \"$ac_try\"") >&5
8585 echo "$as_me:8585: \$? = $ac_status" >&5
8586 (exit "$ac_status"); }; }; then
8587 if test "$cross_compiling" = yes; then
8588 cf_have_ncuconfig=maybe
8590 cat >"conftest.$ac_ext" <<_ACEOF
8591 #line 8591 "configure"
8592 #include "confdefs.h"
8593 #include <${cf_cv_ncurses_header:-curses.h}>
8595 { const char *xx = curses_version(); return (xx == 0); }
8597 rm -f "conftest$ac_exeext"
8598 if { (eval echo "$as_me:8598: \"$ac_link\"") >&5
8599 (eval $ac_link) 2>&5
8601 echo "$as_me:8601: \$? = $ac_status" >&5
8602 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8603 { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8606 echo "$as_me:8606: \$? = $ac_status" >&5
8607 (exit "$ac_status"); }; }; then
8608 cf_have_ncuconfig=yes
8610 echo "$as_me: program exited with status $ac_status" >&5
8611 echo "$as_me: failed program was:" >&5
8612 cat "conftest.$ac_ext" >&5
8613 cf_have_ncuconfig=no
8615 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8618 echo "$as_me: failed program was:" >&5
8619 cat "conftest.$ac_ext" >&5
8620 cf_have_ncuconfig=no
8622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8623 echo "$as_me:8623: result: $cf_have_ncuconfig" >&5
8624 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8625 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8626 if test "$cf_have_ncuconfig" != "yes"
8628 CPPFLAGS="$cf_save_CPPFLAGS"
8629 LIBS="$cf_save_LIBS"
8630 NCURSES_CONFIG_PKG=none
8633 cat >>confdefs.h <<\EOF
8637 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8639 echo "$as_me:8639: checking for terminfo header" >&5
8640 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8641 if test "${cf_cv_term_header+set}" = set; then
8642 echo $ECHO_N "(cached) $ECHO_C" >&6
8645 case "${cf_cv_ncurses_header}" in
8646 (*/ncurses.h|*/ncursesw.h)
8647 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8650 cf_term_header=term.h
8654 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8656 cat >"conftest.$ac_ext" <<_ACEOF
8657 #line 8657 "configure"
8658 #include "confdefs.h"
8660 #include <${cf_cv_ncurses_header:-curses.h}>
8666 int x = auto_left_margin; (void)x
8671 rm -f "conftest.$ac_objext"
8672 if { (eval echo "$as_me:8672: \"$ac_compile\"") >&5
8673 (eval $ac_compile) 2>&5
8675 echo "$as_me:8675: \$? = $ac_status" >&5
8676 (exit "$ac_status"); } &&
8677 { ac_try='test -s "conftest.$ac_objext"'
8678 { (eval echo "$as_me:8678: \"$ac_try\"") >&5
8681 echo "$as_me:8681: \$? = $ac_status" >&5
8682 (exit "$ac_status"); }; }; then
8684 cf_cv_term_header="$cf_test"
8686 echo "$as_me: failed program was:" >&5
8687 cat "conftest.$ac_ext" >&5
8689 cf_cv_term_header=unknown
8692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8693 test "$cf_cv_term_header" != unknown && break
8697 echo "$as_me:8697: result: $cf_cv_term_header" >&5
8698 echo "${ECHO_T}$cf_cv_term_header" >&6
8700 # Set definitions to allow ifdef'ing to accommodate subdirectories
8702 case "$cf_cv_term_header" in
8705 cat >>confdefs.h <<\EOF
8706 #define HAVE_TERM_H 1
8712 case "$cf_cv_term_header" in
8715 cat >>confdefs.h <<\EOF
8716 #define HAVE_NCURSES_TERM_H 1
8722 cat >>confdefs.h <<\EOF
8723 #define HAVE_NCURSESW_TERM_H 1
8732 echo "$as_me:8732: result: no" >&5
8733 echo "${ECHO_T}no" >&6
8734 NCURSES_CONFIG_PKG=none
8737 NCURSES_CONFIG_PKG=none
8740 if test "x$cf_have_ncuconfig" = "xno"; then
8741 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8743 if test -n "$ac_tool_prefix"; then
8744 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8746 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8747 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8748 echo "$as_me:8748: checking for $ac_word" >&5
8749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8750 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8753 if test -n "$NCURSES_CONFIG"; then
8754 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8756 ac_save_IFS=$IFS; IFS=$ac_path_separator
8758 for ac_dir in $ac_dummy; do
8760 test -z "$ac_dir" && ac_dir=.
8761 $as_executable_p "$ac_dir/$ac_word" || continue
8762 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8763 echo "$as_me:8763: found $ac_dir/$ac_word" >&5
8769 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8770 if test -n "$NCURSES_CONFIG"; then
8771 echo "$as_me:8771: result: $NCURSES_CONFIG" >&5
8772 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8774 echo "$as_me:8774: result: no" >&5
8775 echo "${ECHO_T}no" >&6
8778 test -n "$NCURSES_CONFIG" && break
8781 if test -z "$NCURSES_CONFIG"; then
8782 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8783 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8785 # Extract the first word of "$ac_prog", so it can be a program name with args.
8786 set dummy $ac_prog; ac_word=$2
8787 echo "$as_me:8787: checking for $ac_word" >&5
8788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8789 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8790 echo $ECHO_N "(cached) $ECHO_C" >&6
8792 if test -n "$ac_ct_NCURSES_CONFIG"; then
8793 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8795 ac_save_IFS=$IFS; IFS=$ac_path_separator
8797 for ac_dir in $ac_dummy; do
8799 test -z "$ac_dir" && ac_dir=.
8800 $as_executable_p "$ac_dir/$ac_word" || continue
8801 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8802 echo "$as_me:8802: found $ac_dir/$ac_word" >&5
8808 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8809 if test -n "$ac_ct_NCURSES_CONFIG"; then
8810 echo "$as_me:8810: result: $ac_ct_NCURSES_CONFIG" >&5
8811 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8813 echo "$as_me:8813: result: no" >&5
8814 echo "${ECHO_T}no" >&6
8817 test -n "$ac_ct_NCURSES_CONFIG" && break
8819 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8821 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8824 if test "$NCURSES_CONFIG" != none ; then
8826 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8828 case "x$cf_add_cflags" in
8831 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8834 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8835 test "$CFLAGS" != "$cf_old_cflag" || break
8837 CFLAGS="$cf_old_cflag"
8840 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8843 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8844 test "$CPPFLAGS" != "$cf_old_cflag" || break
8846 CPPFLAGS="$cf_old_cflag"
8855 cf_new_extra_cppflags=
8857 for cf_add_cflags in $cf_add_cflags
8859 case "$cf_fix_cppflags" in
8861 case "$cf_add_cflags" in
8862 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8863 case "$cf_add_cflags" in
8865 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8868 && test -z "${cf_tst_cflags}" \
8869 && cf_fix_cppflags=yes
8871 if test "$cf_fix_cppflags" = yes ; then
8873 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8874 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8877 elif test "${cf_tst_cflags}" = "\"'" ; then
8879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8890 case "$cf_add_cflags" in
8892 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8894 CPPFLAGS=`echo "$CPPFLAGS" | \
8895 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8896 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8901 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8902 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8909 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8910 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8920 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8922 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8923 && test -z "${cf_tst_cflags}" \
8924 && cf_fix_cppflags=no
8929 if test -n "$cf_new_cflags" ; then
8931 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8932 CFLAGS="${CFLAGS}$cf_new_cflags"
8936 if test -n "$cf_new_cppflags" ; then
8938 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8939 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8943 if test -n "$cf_new_extra_cppflags" ; then
8945 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8946 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8955 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8957 for cf_add_1lib in $cf_add_0lib; do
8958 for cf_add_2lib in $cf_add_libs; do
8959 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8964 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8968 # even with config script, some packages use no-override for curses.h
8970 echo "$as_me:8970: checking if we have identified curses headers" >&5
8971 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8972 if test "${cf_cv_ncurses_header+set}" = set; then
8973 echo $ECHO_N "(cached) $ECHO_C" >&6
8976 cf_cv_ncurses_header=none
8978 ncurses.h $cf_cv_screen/ncurses.h \
8979 curses.h $cf_cv_screen/curses.h
8981 cat >"conftest.$ac_ext" <<_ACEOF
8982 #line 8982 "configure"
8983 #include "confdefs.h"
8984 #include <${cf_header}>
8993 rm -f "conftest.$ac_objext"
8994 if { (eval echo "$as_me:8994: \"$ac_compile\"") >&5
8995 (eval $ac_compile) 2>&5
8997 echo "$as_me:8997: \$? = $ac_status" >&5
8998 (exit "$ac_status"); } &&
8999 { ac_try='test -s "conftest.$ac_objext"'
9000 { (eval echo "$as_me:9000: \"$ac_try\"") >&5
9003 echo "$as_me:9003: \$? = $ac_status" >&5
9004 (exit "$ac_status"); }; }; then
9005 cf_cv_ncurses_header=$cf_header; break
9007 echo "$as_me: failed program was:" >&5
9008 cat "conftest.$ac_ext" >&5
9010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9014 echo "$as_me:9014: result: $cf_cv_ncurses_header" >&5
9015 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9017 if test "$cf_cv_ncurses_header" = none ; then
9018 { { echo "$as_me:9018: error: No curses header-files found" >&5
9019 echo "$as_me: error: No curses header-files found" >&2;}
9020 { (exit 1); exit 1; }; }
9023 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9025 for ac_header in $cf_cv_ncurses_header
9027 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9028 echo "$as_me:9028: checking for $ac_header" >&5
9029 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9031 echo $ECHO_N "(cached) $ECHO_C" >&6
9033 cat >"conftest.$ac_ext" <<_ACEOF
9034 #line 9034 "configure"
9035 #include "confdefs.h"
9036 #include <$ac_header>
9038 if { (eval echo "$as_me:9038: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9039 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9041 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9043 cat conftest.err >&5
9044 echo "$as_me:9044: \$? = $ac_status" >&5
9045 (exit "$ac_status"); } >/dev/null; then
9046 if test -s conftest.err; then
9047 ac_cpp_err=$ac_c_preproc_warn_flag
9054 if test -z "$ac_cpp_err"; then
9055 eval "$as_ac_Header=yes"
9057 echo "$as_me: failed program was:" >&5
9058 cat "conftest.$ac_ext" >&5
9059 eval "$as_ac_Header=no"
9061 rm -f conftest.err "conftest.$ac_ext"
9063 echo "$as_me:9063: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9064 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9065 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9066 cat >>confdefs.h <<EOF
9067 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9073 cat >>confdefs.h <<\EOF
9077 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9079 cat >>confdefs.h <<EOF
9080 #define $cf_nculib_ROOT 1
9083 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9087 cf_ncuhdr_root=$cf_cv_screen
9089 test -n "$cf_cv_curses_dir" && \
9090 test "$cf_cv_curses_dir" != "no" && { \
9092 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9093 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9095 while test "$cf_add_incdir" != /usr/include
9097 if test -d "$cf_add_incdir"
9100 if test -n "$CFLAGS$CPPFLAGS" ; then
9101 # a loop is needed to ensure we can add subdirs of existing dirs
9102 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9103 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9104 cf_have_incdir=yes; break
9109 if test "$cf_have_incdir" = no ; then
9110 if test "$cf_add_incdir" = /usr/local/include ; then
9111 if test "$GCC" = yes
9113 cf_save_CPPFLAGS=$CPPFLAGS
9115 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9116 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9118 cat >"conftest.$ac_ext" <<_ACEOF
9119 #line 9119 "configure"
9120 #include "confdefs.h"
9130 rm -f "conftest.$ac_objext"
9131 if { (eval echo "$as_me:9131: \"$ac_compile\"") >&5
9132 (eval $ac_compile) 2>&5
9134 echo "$as_me:9134: \$? = $ac_status" >&5
9135 (exit "$ac_status"); } &&
9136 { ac_try='test -s "conftest.$ac_objext"'
9137 { (eval echo "$as_me:9137: \"$ac_try\"") >&5
9140 echo "$as_me:9140: \$? = $ac_status" >&5
9141 (exit "$ac_status"); }; }; then
9144 echo "$as_me: failed program was:" >&5
9145 cat "conftest.$ac_ext" >&5
9148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9149 CPPFLAGS=$cf_save_CPPFLAGS
9154 if test "$cf_have_incdir" = no ; then
9155 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9157 echo "${as_me:-configure}:9157: testing adding $cf_add_incdir to include-path ..." 1>&5
9159 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9161 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9162 test "$cf_top_incdir" = "$cf_add_incdir" && break
9163 cf_add_incdir="$cf_top_incdir"
9176 echo "$as_me:9176: checking for $cf_ncuhdr_root header in include-path" >&5
9177 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9178 if test "${cf_cv_ncurses_h+set}" = set; then
9179 echo $ECHO_N "(cached) $ECHO_C" >&6
9182 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9183 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9184 for cf_header in $cf_header_list
9187 cat >"conftest.$ac_ext" <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9191 #include <$cf_header>
9196 #ifdef NCURSES_VERSION
9198 printf("%s\\n", NCURSES_VERSION);
9211 rm -f "conftest.$ac_objext"
9212 if { (eval echo "$as_me:9212: \"$ac_compile\"") >&5
9213 (eval $ac_compile) 2>&5
9215 echo "$as_me:9215: \$? = $ac_status" >&5
9216 (exit "$ac_status"); } &&
9217 { ac_try='test -s "conftest.$ac_objext"'
9218 { (eval echo "$as_me:9218: \"$ac_try\"") >&5
9221 echo "$as_me:9221: \$? = $ac_status" >&5
9222 (exit "$ac_status"); }; }; then
9223 cf_cv_ncurses_h=$cf_header
9226 echo "$as_me: failed program was:" >&5
9227 cat "conftest.$ac_ext" >&5
9230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9232 test "$cf_cv_ncurses_h" != no && break
9236 echo "$as_me:9236: result: $cf_cv_ncurses_h" >&5
9237 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9239 if test "$cf_cv_ncurses_h" != no ; then
9240 cf_cv_ncurses_header=$cf_cv_ncurses_h
9243 echo "$as_me:9243: checking for $cf_ncuhdr_root include-path" >&5
9244 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9245 if test "${cf_cv_ncurses_h2+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
9249 test -n "$verbose" && echo
9253 # collect the current set of include-directories from compiler flags
9254 cf_header_path_list=""
9255 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9256 for cf_header_path in $CPPFLAGS $CFLAGS
9258 case "$cf_header_path" in
9260 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9262 test "x$cf_header_path" != "xNONE" && \
9263 test -d "$cf_header_path" && \
9265 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9266 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9267 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9268 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9269 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9270 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9273 cf_header_path_list="$cf_header_path_list $cf_search"
9279 # add the variations for the package we are looking for
9283 test "x$prefix" != "xNONE" && \
9284 test -d "$prefix" && \
9286 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9287 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9288 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9289 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9290 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9291 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9294 for cf_subdir_prefix in \
9303 test "x$cf_subdir_prefix" != "x$prefix" && \
9304 test -d "$cf_subdir_prefix" && \
9305 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9306 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9307 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9308 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9309 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9310 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9311 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9316 test "$includedir" != NONE && \
9317 test "$includedir" != "/usr/include" && \
9318 test -d "$includedir" && {
9319 test -d "$includedir" && cf_search="$cf_search $includedir"
9320 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9323 test "$oldincludedir" != NONE && \
9324 test "$oldincludedir" != "/usr/include" && \
9325 test -d "$oldincludedir" && {
9326 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9327 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9330 cf_search="$cf_search $cf_header_path_list"
9332 test -n "$verbose" && echo "search path $cf_search"
9333 cf_save2_CPPFLAGS="$CPPFLAGS"
9334 for cf_incdir in $cf_search
9337 if test -n "$cf_incdir" ; then
9338 for cf_add_incdir in $cf_incdir
9340 while test "$cf_add_incdir" != /usr/include
9342 if test -d "$cf_add_incdir"
9345 if test -n "$CFLAGS$CPPFLAGS" ; then
9346 # a loop is needed to ensure we can add subdirs of existing dirs
9347 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9348 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9349 cf_have_incdir=yes; break
9354 if test "$cf_have_incdir" = no ; then
9355 if test "$cf_add_incdir" = /usr/local/include ; then
9356 if test "$GCC" = yes
9358 cf_save_CPPFLAGS=$CPPFLAGS
9360 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9361 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9363 cat >"conftest.$ac_ext" <<_ACEOF
9364 #line 9364 "configure"
9365 #include "confdefs.h"
9375 rm -f "conftest.$ac_objext"
9376 if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
9377 (eval $ac_compile) 2>&5
9379 echo "$as_me:9379: \$? = $ac_status" >&5
9380 (exit "$ac_status"); } &&
9381 { ac_try='test -s "conftest.$ac_objext"'
9382 { (eval echo "$as_me:9382: \"$ac_try\"") >&5
9385 echo "$as_me:9385: \$? = $ac_status" >&5
9386 (exit "$ac_status"); }; }; then
9389 echo "$as_me: failed program was:" >&5
9390 cat "conftest.$ac_ext" >&5
9393 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9394 CPPFLAGS=$cf_save_CPPFLAGS
9399 if test "$cf_have_incdir" = no ; then
9400 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9402 echo "${as_me:-configure}:9402: testing adding $cf_add_incdir to include-path ..." 1>&5
9404 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9406 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9407 test "$cf_top_incdir" = "$cf_add_incdir" && break
9408 cf_add_incdir="$cf_top_incdir"
9424 cat >"conftest.$ac_ext" <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9428 #include <$cf_header>
9433 #ifdef NCURSES_VERSION
9435 printf("%s\\n", NCURSES_VERSION);
9448 rm -f "conftest.$ac_objext"
9449 if { (eval echo "$as_me:9449: \"$ac_compile\"") >&5
9450 (eval $ac_compile) 2>&5
9452 echo "$as_me:9452: \$? = $ac_status" >&5
9453 (exit "$ac_status"); } &&
9454 { ac_try='test -s "conftest.$ac_objext"'
9455 { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9458 echo "$as_me:9458: \$? = $ac_status" >&5
9459 (exit "$ac_status"); }; }; then
9460 cf_cv_ncurses_h2=$cf_header
9463 echo "$as_me: failed program was:" >&5
9464 cat "conftest.$ac_ext" >&5
9467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9469 if test "$cf_cv_ncurses_h2" != no ; then
9470 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9471 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9474 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9476 CPPFLAGS="$cf_save2_CPPFLAGS"
9477 test "$cf_cv_ncurses_h2" != no && break
9479 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9479: error: not found" >&5
9480 echo "$as_me: error: not found" >&2;}
9481 { (exit 1); exit 1; }; }
9484 echo "$as_me:9484: result: $cf_cv_ncurses_h2" >&5
9485 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9487 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9488 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9489 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9490 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9493 if test -n "$cf_1st_incdir" ; then
9494 for cf_add_incdir in $cf_1st_incdir
9496 while test "$cf_add_incdir" != /usr/include
9498 if test -d "$cf_add_incdir"
9501 if test -n "$CFLAGS$CPPFLAGS" ; then
9502 # a loop is needed to ensure we can add subdirs of existing dirs
9503 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9504 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9505 cf_have_incdir=yes; break
9510 if test "$cf_have_incdir" = no ; then
9511 if test "$cf_add_incdir" = /usr/local/include ; then
9512 if test "$GCC" = yes
9514 cf_save_CPPFLAGS=$CPPFLAGS
9516 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9517 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9519 cat >"conftest.$ac_ext" <<_ACEOF
9520 #line 9520 "configure"
9521 #include "confdefs.h"
9531 rm -f "conftest.$ac_objext"
9532 if { (eval echo "$as_me:9532: \"$ac_compile\"") >&5
9533 (eval $ac_compile) 2>&5
9535 echo "$as_me:9535: \$? = $ac_status" >&5
9536 (exit "$ac_status"); } &&
9537 { ac_try='test -s "conftest.$ac_objext"'
9538 { (eval echo "$as_me:9538: \"$ac_try\"") >&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit "$ac_status"); }; }; then
9545 echo "$as_me: failed program was:" >&5
9546 cat "conftest.$ac_ext" >&5
9549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9550 CPPFLAGS=$cf_save_CPPFLAGS
9555 if test "$cf_have_incdir" = no ; then
9556 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9558 echo "${as_me:-configure}:9558: testing adding $cf_add_incdir to include-path ..." 1>&5
9560 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9562 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9563 test "$cf_top_incdir" = "$cf_add_incdir" && break
9564 cf_add_incdir="$cf_top_incdir"
9577 # Set definitions to allow ifdef'ing for ncurses.h
9579 case "$cf_cv_ncurses_header" in
9582 cat >>confdefs.h <<\EOF
9583 #define HAVE_NCURSES_H 1
9589 case "$cf_cv_ncurses_header" in
9590 (ncurses/curses.h|ncurses/ncurses.h)
9592 cat >>confdefs.h <<\EOF
9593 #define HAVE_NCURSES_NCURSES_H 1
9597 (ncursesw/curses.h|ncursesw/ncurses.h)
9599 cat >>confdefs.h <<\EOF
9600 #define HAVE_NCURSESW_NCURSES_H 1
9606 echo "$as_me:9606: checking for terminfo header" >&5
9607 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9608 if test "${cf_cv_term_header+set}" = set; then
9609 echo $ECHO_N "(cached) $ECHO_C" >&6
9612 case "${cf_cv_ncurses_header}" in
9613 (*/ncurses.h|*/ncursesw.h)
9614 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9617 cf_term_header=term.h
9621 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9623 cat >"conftest.$ac_ext" <<_ACEOF
9624 #line 9624 "configure"
9625 #include "confdefs.h"
9627 #include <${cf_cv_ncurses_header:-curses.h}>
9633 int x = auto_left_margin; (void)x
9638 rm -f "conftest.$ac_objext"
9639 if { (eval echo "$as_me:9639: \"$ac_compile\"") >&5
9640 (eval $ac_compile) 2>&5
9642 echo "$as_me:9642: \$? = $ac_status" >&5
9643 (exit "$ac_status"); } &&
9644 { ac_try='test -s "conftest.$ac_objext"'
9645 { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9648 echo "$as_me:9648: \$? = $ac_status" >&5
9649 (exit "$ac_status"); }; }; then
9651 cf_cv_term_header="$cf_test"
9653 echo "$as_me: failed program was:" >&5
9654 cat "conftest.$ac_ext" >&5
9656 cf_cv_term_header=unknown
9659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9660 test "$cf_cv_term_header" != unknown && break
9664 echo "$as_me:9664: result: $cf_cv_term_header" >&5
9665 echo "${ECHO_T}$cf_cv_term_header" >&6
9667 # Set definitions to allow ifdef'ing to accommodate subdirectories
9669 case "$cf_cv_term_header" in
9672 cat >>confdefs.h <<\EOF
9673 #define HAVE_TERM_H 1
9679 case "$cf_cv_term_header" in
9682 cat >>confdefs.h <<\EOF
9683 #define HAVE_NCURSES_TERM_H 1
9689 cat >>confdefs.h <<\EOF
9690 #define HAVE_NCURSESW_TERM_H 1
9696 # some applications need this, but should check for NCURSES_VERSION
9698 cat >>confdefs.h <<\EOF
9702 echo "$as_me:9702: checking for ncurses version" >&5
9703 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9704 if test "${cf_cv_ncurses_version+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9708 cf_cv_ncurses_version=no
9710 rm -f "$cf_tempfile"
9711 if test "$cross_compiling" = yes; then
9713 # This will not work if the preprocessor splits the line after the
9714 # Autoconf token. The 'unproto' program does that.
9715 cat > "conftest.$ac_ext" <<EOF
9716 #include <${cf_cv_ncurses_header:-curses.h}>
9718 #ifdef NCURSES_VERSION
9719 Autoconf NCURSES_VERSION
9727 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9728 { (eval echo "$as_me:9728: \"$cf_try\"") >&5
9731 echo "$as_me:9731: \$? = $ac_status" >&5
9732 (exit "$ac_status"); }
9733 if test -f conftest.out ; then
9734 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9735 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9740 cat >"conftest.$ac_ext" <<_ACEOF
9741 #line 9741 "configure"
9742 #include "confdefs.h"
9744 $ac_includes_default
9746 #include <${cf_cv_ncurses_header:-curses.h}>
9750 FILE *fp = fopen("$cf_tempfile", "w");
9751 #ifdef NCURSES_VERSION
9752 # ifdef NCURSES_VERSION_PATCH
9753 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9755 fprintf(fp, "%s\\n", NCURSES_VERSION);
9759 fprintf(fp, "old\\n");
9764 ${cf_cv_main_return:-return}(0);
9767 rm -f "conftest$ac_exeext"
9768 if { (eval echo "$as_me:9768: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9771 echo "$as_me:9771: \$? = $ac_status" >&5
9772 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9773 { (eval echo "$as_me:9773: \"$ac_try\"") >&5
9776 echo "$as_me:9776: \$? = $ac_status" >&5
9777 (exit "$ac_status"); }; }; then
9779 cf_cv_ncurses_version=`cat $cf_tempfile`
9781 echo "$as_me: program exited with status $ac_status" >&5
9782 echo "$as_me: failed program was:" >&5
9783 cat "conftest.$ac_ext" >&5
9785 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9787 rm -f "$cf_tempfile"
9790 echo "$as_me:9790: result: $cf_cv_ncurses_version" >&5
9791 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9792 test "$cf_cv_ncurses_version" = no ||
9793 cat >>confdefs.h <<\EOF
9797 cf_nculib_root=$cf_cv_screen
9798 # This works, except for the special case where we find gpm, but
9799 # ncurses is in a nonstandard location via $LIBS, and we really want
9802 cf_ncurses_SAVE="$LIBS"
9803 echo "$as_me:9803: checking for Gpm_Open in -lgpm" >&5
9804 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9805 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9806 echo $ECHO_N "(cached) $ECHO_C" >&6
9808 ac_check_lib_save_LIBS=$LIBS
9810 cat >"conftest.$ac_ext" <<_ACEOF
9811 #line 9811 "configure"
9812 #include "confdefs.h"
9814 /* Override any gcc2 internal prototype to avoid an error. */
9818 /* We use char because int might match the return type of a gcc2
9819 builtin and then its argument prototype would still apply. */
9829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9830 if { (eval echo "$as_me:9830: \"$ac_link\"") >&5
9831 (eval $ac_link) 2>&5
9833 echo "$as_me:9833: \$? = $ac_status" >&5
9834 (exit "$ac_status"); } &&
9835 { ac_try='test -s "conftest$ac_exeext"'
9836 { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9839 echo "$as_me:9839: \$? = $ac_status" >&5
9840 (exit "$ac_status"); }; }; then
9841 ac_cv_lib_gpm_Gpm_Open=yes
9843 echo "$as_me: failed program was:" >&5
9844 cat "conftest.$ac_ext" >&5
9845 ac_cv_lib_gpm_Gpm_Open=no
9847 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9848 LIBS=$ac_check_lib_save_LIBS
9850 echo "$as_me:9850: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9851 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9852 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9853 echo "$as_me:9853: checking for initscr in -lgpm" >&5
9854 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9855 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9856 echo $ECHO_N "(cached) $ECHO_C" >&6
9858 ac_check_lib_save_LIBS=$LIBS
9860 cat >"conftest.$ac_ext" <<_ACEOF
9861 #line 9861 "configure"
9862 #include "confdefs.h"
9864 /* Override any gcc2 internal prototype to avoid an error. */
9868 /* We use char because int might match the return type of a gcc2
9869 builtin and then its argument prototype would still apply. */
9879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9880 if { (eval echo "$as_me:9880: \"$ac_link\"") >&5
9881 (eval $ac_link) 2>&5
9883 echo "$as_me:9883: \$? = $ac_status" >&5
9884 (exit "$ac_status"); } &&
9885 { ac_try='test -s "conftest$ac_exeext"'
9886 { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit "$ac_status"); }; }; then
9891 ac_cv_lib_gpm_initscr=yes
9893 echo "$as_me: failed program was:" >&5
9894 cat "conftest.$ac_ext" >&5
9895 ac_cv_lib_gpm_initscr=no
9897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9898 LIBS=$ac_check_lib_save_LIBS
9900 echo "$as_me:9900: result: $ac_cv_lib_gpm_initscr" >&5
9901 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9902 if test "$ac_cv_lib_gpm_initscr" = yes; then
9903 LIBS="$cf_ncurses_SAVE"
9905 cf_ncurses_LIBS="-lgpm"
9912 # This is only necessary if you are linking against an obsolete
9913 # version of ncurses (but it should do no harm, since it is static).
9914 if test "$cf_nculib_root" = ncurses ; then
9915 echo "$as_me:9915: checking for tgoto in -lmytinfo" >&5
9916 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9917 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9918 echo $ECHO_N "(cached) $ECHO_C" >&6
9920 ac_check_lib_save_LIBS=$LIBS
9921 LIBS="-lmytinfo $LIBS"
9922 cat >"conftest.$ac_ext" <<_ACEOF
9923 #line 9923 "configure"
9924 #include "confdefs.h"
9926 /* Override any gcc2 internal prototype to avoid an error. */
9930 /* We use char because int might match the return type of a gcc2
9931 builtin and then its argument prototype would still apply. */
9941 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9942 if { (eval echo "$as_me:9942: \"$ac_link\"") >&5
9943 (eval $ac_link) 2>&5
9945 echo "$as_me:9945: \$? = $ac_status" >&5
9946 (exit "$ac_status"); } &&
9947 { ac_try='test -s "conftest$ac_exeext"'
9948 { (eval echo "$as_me:9948: \"$ac_try\"") >&5
9951 echo "$as_me:9951: \$? = $ac_status" >&5
9952 (exit "$ac_status"); }; }; then
9953 ac_cv_lib_mytinfo_tgoto=yes
9955 echo "$as_me: failed program was:" >&5
9956 cat "conftest.$ac_ext" >&5
9957 ac_cv_lib_mytinfo_tgoto=no
9959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9960 LIBS=$ac_check_lib_save_LIBS
9962 echo "$as_me:9962: result: $ac_cv_lib_mytinfo_tgoto" >&5
9963 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9964 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9965 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9975 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9977 for cf_add_1lib in $cf_add_0lib; do
9978 for cf_add_2lib in $cf_add_libs; do
9979 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9984 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9988 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9994 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9996 for cf_add_1lib in $cf_add_0lib; do
9997 for cf_add_2lib in $cf_add_libs; do
9998 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10003 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10005 LIBS="$cf_add_libs"
10009 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10011 echo "$as_me:10011: checking for initscr" >&5
10012 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10013 if test "${ac_cv_func_initscr+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10016 cat >"conftest.$ac_ext" <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #define initscr autoconf_temporary
10020 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10027 /* We use char because int might match the return type of a gcc2
10028 builtin and then its argument prototype would still apply. */
10029 char initscr (void);
10035 /* The GNU C library defines stubs for functions which it implements
10036 to always fail with ENOSYS. Some functions are actually named
10037 something starting with __ and the normal name is an alias. */
10038 #if defined (__stub_initscr) || defined (__stub___initscr)
10039 #error found stub for initscr
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049 (eval $ac_link) 2>&5
10051 echo "$as_me:10051: \$? = $ac_status" >&5
10052 (exit "$ac_status"); } &&
10053 { ac_try='test -s "conftest$ac_exeext"'
10054 { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055 (eval $ac_try) 2>&5
10057 echo "$as_me:10057: \$? = $ac_status" >&5
10058 (exit "$ac_status"); }; }; then
10059 ac_cv_func_initscr=yes
10061 echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 ac_cv_func_initscr=no
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10067 echo "$as_me:10067: result: $ac_cv_func_initscr" >&5
10068 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10069 if test "$ac_cv_func_initscr" = yes; then
10070 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10073 cf_save_LIBS="$LIBS"
10074 echo "$as_me:10074: checking for initscr in -l$cf_nculib_root" >&5
10075 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10076 LIBS="-l$cf_nculib_root $LIBS"
10077 cat >"conftest.$ac_ext" <<_ACEOF
10078 #line 10078 "configure"
10079 #include "confdefs.h"
10080 #include <${cf_cv_ncurses_header:-curses.h}>
10089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10090 if { (eval echo "$as_me:10090: \"$ac_link\"") >&5
10091 (eval $ac_link) 2>&5
10093 echo "$as_me:10093: \$? = $ac_status" >&5
10094 (exit "$ac_status"); } &&
10095 { ac_try='test -s "conftest$ac_exeext"'
10096 { (eval echo "$as_me:10096: \"$ac_try\"") >&5
10097 (eval $ac_try) 2>&5
10099 echo "$as_me:10099: \$? = $ac_status" >&5
10100 (exit "$ac_status"); }; }; then
10101 echo "$as_me:10101: result: yes" >&5
10102 echo "${ECHO_T}yes" >&6
10103 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10106 echo "$as_me: failed program was:" >&5
10107 cat "conftest.$ac_ext" >&5
10108 echo "$as_me:10108: result: no" >&5
10109 echo "${ECHO_T}no" >&6
10112 cf_library_path_list=""
10113 if test -n "${LDFLAGS}${LIBS}" ; then
10114 for cf_library_path in $LDFLAGS $LIBS
10116 case "$cf_library_path" in
10118 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10120 test "x$cf_library_path" != "xNONE" && \
10121 test -d "$cf_library_path" && \
10123 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10124 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10125 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10126 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10127 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10128 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
10131 cf_library_path_list="$cf_library_path_list $cf_search"
10139 test "x$prefix" != "xNONE" && \
10140 test -d "$prefix" && \
10142 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10143 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10144 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10145 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10146 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10147 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10150 for cf_subdir_prefix in \
10159 test "x$cf_subdir_prefix" != "x$prefix" && \
10160 test -d "$cf_subdir_prefix" && \
10161 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10162 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10163 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10164 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10165 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10166 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10167 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
10172 cf_search="$cf_library_path_list $cf_search"
10174 for cf_libdir in $cf_search
10176 echo "$as_me:10176: checking for -l$cf_nculib_root in $cf_libdir" >&5
10177 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10178 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10179 cat >"conftest.$ac_ext" <<_ACEOF
10180 #line 10180 "configure"
10181 #include "confdefs.h"
10182 #include <${cf_cv_ncurses_header:-curses.h}>
10191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10192 if { (eval echo "$as_me:10192: \"$ac_link\"") >&5
10193 (eval $ac_link) 2>&5
10195 echo "$as_me:10195: \$? = $ac_status" >&5
10196 (exit "$ac_status"); } &&
10197 { ac_try='test -s "conftest$ac_exeext"'
10198 { (eval echo "$as_me:10198: \"$ac_try\"") >&5
10199 (eval $ac_try) 2>&5
10201 echo "$as_me:10201: \$? = $ac_status" >&5
10202 (exit "$ac_status"); }; }; then
10203 echo "$as_me:10203: result: yes" >&5
10204 echo "${ECHO_T}yes" >&6
10205 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10208 echo "$as_me: failed program was:" >&5
10209 cat "conftest.$ac_ext" >&5
10210 echo "$as_me:10210: result: no" >&5
10211 echo "${ECHO_T}no" >&6
10212 LIBS="$cf_save_LIBS"
10214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10222 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10224 if test "$cf_found_library" = no ; then
10225 { { echo "$as_me:10225: error: Cannot link $cf_nculib_root library" >&5
10226 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10227 { (exit 1); exit 1; }; }
10232 if test -n "$cf_ncurses_LIBS" ; then
10233 echo "$as_me:10233: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10234 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10235 cf_ncurses_SAVE="$LIBS"
10236 for p in $cf_ncurses_LIBS ; do
10237 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10238 if test "$q" != "$LIBS" ; then
10242 cat >"conftest.$ac_ext" <<_ACEOF
10243 #line 10243 "configure"
10244 #include "confdefs.h"
10245 #include <${cf_cv_ncurses_header:-curses.h}>
10249 initscr(); mousemask(0,0); tigetstr((char *)0);
10254 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10255 if { (eval echo "$as_me:10255: \"$ac_link\"") >&5
10256 (eval $ac_link) 2>&5
10258 echo "$as_me:10258: \$? = $ac_status" >&5
10259 (exit "$ac_status"); } &&
10260 { ac_try='test -s "conftest$ac_exeext"'
10261 { (eval echo "$as_me:10261: \"$ac_try\"") >&5
10262 (eval $ac_try) 2>&5
10264 echo "$as_me:10264: \$? = $ac_status" >&5
10265 (exit "$ac_status"); }; }; then
10266 echo "$as_me:10266: result: yes" >&5
10267 echo "${ECHO_T}yes" >&6
10269 echo "$as_me: failed program was:" >&5
10270 cat "conftest.$ac_ext" >&5
10271 echo "$as_me:10271: result: no" >&5
10272 echo "${ECHO_T}no" >&6
10273 LIBS="$cf_ncurses_SAVE"
10275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10278 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10280 cat >>confdefs.h <<EOF
10281 #define $cf_nculib_ROOT 1
10286 NCURSES_CONFIG=none
10292 cf_ncuconfig_root=$cf_cv_screen
10293 cf_have_ncuconfig=no
10295 if test "x${PKG_CONFIG:=none}" != xnone; then
10296 echo "$as_me:10296: checking pkg-config for $cf_ncuconfig_root" >&5
10297 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10298 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10299 echo "$as_me:10299: result: yes" >&5
10300 echo "${ECHO_T}yes" >&6
10302 echo "$as_me:10302: checking if the $cf_ncuconfig_root package files work" >&5
10303 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10304 cf_have_ncuconfig=unknown
10306 cf_save_CFLAGS="$CFLAGS"
10307 cf_save_CPPFLAGS="$CPPFLAGS"
10308 cf_save_LIBS="$LIBS"
10310 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10311 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10313 # while -W for passing linker flags is prevalent, it is not "standard".
10314 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10315 # incompatible _and_ non-standard -W option which gives an error. Work
10316 # around that pitfall.
10317 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10323 cf_new_extra_cppflags=
10325 for cf_add_cflags in $cf_pkg_cflags
10327 case "$cf_fix_cppflags" in
10329 case "$cf_add_cflags" in
10330 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10331 case "$cf_add_cflags" in
10333 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10335 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10336 && test -z "${cf_tst_cflags}" \
10337 && cf_fix_cppflags=yes
10339 if test "$cf_fix_cppflags" = yes ; then
10341 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10342 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10345 elif test "${cf_tst_cflags}" = "\"'" ; then
10347 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10348 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10354 case "$CPPFLAGS" in
10358 case "$cf_add_cflags" in
10360 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10362 CPPFLAGS=`echo "$CPPFLAGS" | \
10363 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10364 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10369 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10370 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10377 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10378 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10388 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10390 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10391 && test -z "${cf_tst_cflags}" \
10392 && cf_fix_cppflags=no
10397 if test -n "$cf_new_cflags" ; then
10399 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10400 CFLAGS="${CFLAGS}$cf_new_cflags"
10404 if test -n "$cf_new_cppflags" ; then
10406 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10407 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10411 if test -n "$cf_new_extra_cppflags" ; then
10413 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10414 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10418 cf_add_libs="$LIBS"
10421 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10422 # filter duplicates
10423 for cf_add_1lib in $cf_add_0lib; do
10424 for cf_add_2lib in $cf_add_libs; do
10425 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10430 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10432 LIBS="$cf_add_libs"
10434 cat >"conftest.$ac_ext" <<_ACEOF
10435 #line 10435 "configure"
10436 #include "confdefs.h"
10437 #include <${cf_cv_ncurses_header:-curses.h}>
10441 initscr(); mousemask(0,0); tigetstr((char *)0);
10446 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10447 if { (eval echo "$as_me:10447: \"$ac_link\"") >&5
10448 (eval $ac_link) 2>&5
10450 echo "$as_me:10450: \$? = $ac_status" >&5
10451 (exit "$ac_status"); } &&
10452 { ac_try='test -s "conftest$ac_exeext"'
10453 { (eval echo "$as_me:10453: \"$ac_try\"") >&5
10454 (eval $ac_try) 2>&5
10456 echo "$as_me:10456: \$? = $ac_status" >&5
10457 (exit "$ac_status"); }; }; then
10458 if test "$cross_compiling" = yes; then
10459 cf_test_ncuconfig=maybe
10461 cat >"conftest.$ac_ext" <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 #include <${cf_cv_ncurses_header:-curses.h}>
10466 { const char *xx = curses_version(); return (xx == 0); }
10468 rm -f "conftest$ac_exeext"
10469 if { (eval echo "$as_me:10469: \"$ac_link\"") >&5
10470 (eval $ac_link) 2>&5
10472 echo "$as_me:10472: \$? = $ac_status" >&5
10473 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10474 { (eval echo "$as_me:10474: \"$ac_try\"") >&5
10475 (eval $ac_try) 2>&5
10477 echo "$as_me:10477: \$? = $ac_status" >&5
10478 (exit "$ac_status"); }; }; then
10479 cf_test_ncuconfig=yes
10481 echo "$as_me: program exited with status $ac_status" >&5
10482 echo "$as_me: failed program was:" >&5
10483 cat "conftest.$ac_ext" >&5
10484 cf_test_ncuconfig=no
10486 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10489 echo "$as_me: failed program was:" >&5
10490 cat "conftest.$ac_ext" >&5
10491 cf_test_ncuconfig=no
10493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10495 CFLAGS="$cf_save_CFLAGS"
10496 CPPFLAGS="$cf_save_CPPFLAGS"
10497 LIBS="$cf_save_LIBS"
10499 if test "x$cf_test_ncuconfig" != xyes; then
10500 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10501 cf_pkg_cflags="$cf_temp"
10502 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10503 cf_pkg_libs="$cf_temp"
10508 for cf_add_cflags in $cf_pkg_cflags
10510 case "x$cf_add_cflags" in
10513 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10516 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10517 test "$CFLAGS" != "$cf_old_cflag" || break
10519 CFLAGS="$cf_old_cflag"
10522 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10525 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10526 test "$CPPFLAGS" != "$cf_old_cflag" || break
10528 CPPFLAGS="$cf_old_cflag"
10537 cf_new_extra_cppflags=
10539 for cf_add_cflags in $cf_add_cflags
10541 case "$cf_fix_cppflags" in
10543 case "$cf_add_cflags" in
10544 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10545 case "$cf_add_cflags" in
10547 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10550 && test -z "${cf_tst_cflags}" \
10551 && cf_fix_cppflags=yes
10553 if test "$cf_fix_cppflags" = yes ; then
10555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10559 elif test "${cf_tst_cflags}" = "\"'" ; then
10561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10568 case "$CPPFLAGS" in
10572 case "$cf_add_cflags" in
10574 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10576 CPPFLAGS=`echo "$CPPFLAGS" | \
10577 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10578 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10583 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10584 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10591 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10592 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10599 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10600 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10605 && test -z "${cf_tst_cflags}" \
10606 && cf_fix_cppflags=no
10611 if test -n "$cf_new_cflags" ; then
10613 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10614 CFLAGS="${CFLAGS}$cf_new_cflags"
10618 if test -n "$cf_new_cppflags" ; then
10620 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10621 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10625 if test -n "$cf_new_extra_cppflags" ; then
10627 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10628 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10634 cf_add_libs="$LIBS"
10637 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10638 # filter duplicates
10639 for cf_add_1lib in $cf_add_0lib; do
10640 for cf_add_2lib in $cf_add_libs; do
10641 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10646 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10648 LIBS="$cf_add_libs"
10650 cat >"conftest.$ac_ext" <<_ACEOF
10651 #line 10651 "configure"
10652 #include "confdefs.h"
10653 #include <${cf_cv_ncurses_header:-curses.h}>
10657 initscr(); mousemask(0,0); tigetstr((char *)0);
10662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10663 if { (eval echo "$as_me:10663: \"$ac_link\"") >&5
10664 (eval $ac_link) 2>&5
10666 echo "$as_me:10666: \$? = $ac_status" >&5
10667 (exit "$ac_status"); } &&
10668 { ac_try='test -s "conftest$ac_exeext"'
10669 { (eval echo "$as_me:10669: \"$ac_try\"") >&5
10670 (eval $ac_try) 2>&5
10672 echo "$as_me:10672: \$? = $ac_status" >&5
10673 (exit "$ac_status"); }; }; then
10674 if test "$cross_compiling" = yes; then
10675 cf_have_ncuconfig=maybe
10677 cat >"conftest.$ac_ext" <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10680 #include <${cf_cv_ncurses_header:-curses.h}>
10682 { const char *xx = curses_version(); return (xx == 0); }
10684 rm -f "conftest$ac_exeext"
10685 if { (eval echo "$as_me:10685: \"$ac_link\"") >&5
10686 (eval $ac_link) 2>&5
10688 echo "$as_me:10688: \$? = $ac_status" >&5
10689 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10690 { (eval echo "$as_me:10690: \"$ac_try\"") >&5
10691 (eval $ac_try) 2>&5
10693 echo "$as_me:10693: \$? = $ac_status" >&5
10694 (exit "$ac_status"); }; }; then
10695 cf_have_ncuconfig=yes
10697 echo "$as_me: program exited with status $ac_status" >&5
10698 echo "$as_me: failed program was:" >&5
10699 cat "conftest.$ac_ext" >&5
10700 cf_have_ncuconfig=no
10702 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10705 echo "$as_me: failed program was:" >&5
10706 cat "conftest.$ac_ext" >&5
10707 cf_have_ncuconfig=no
10709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10710 echo "$as_me:10710: result: $cf_have_ncuconfig" >&5
10711 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10712 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10713 if test "$cf_have_ncuconfig" != "yes"
10715 CPPFLAGS="$cf_save_CPPFLAGS"
10716 LIBS="$cf_save_LIBS"
10717 NCURSES_CONFIG_PKG=none
10720 cat >>confdefs.h <<\EOF
10724 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10726 echo "$as_me:10726: checking for terminfo header" >&5
10727 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10728 if test "${cf_cv_term_header+set}" = set; then
10729 echo $ECHO_N "(cached) $ECHO_C" >&6
10732 case "${cf_cv_ncurses_header}" in
10733 (*/ncurses.h|*/ncursesw.h)
10734 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10737 cf_term_header=term.h
10741 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10743 cat >"conftest.$ac_ext" <<_ACEOF
10744 #line 10744 "configure"
10745 #include "confdefs.h"
10747 #include <${cf_cv_ncurses_header:-curses.h}>
10748 #include <$cf_test>
10753 int x = auto_left_margin; (void)x
10758 rm -f "conftest.$ac_objext"
10759 if { (eval echo "$as_me:10759: \"$ac_compile\"") >&5
10760 (eval $ac_compile) 2>&5
10762 echo "$as_me:10762: \$? = $ac_status" >&5
10763 (exit "$ac_status"); } &&
10764 { ac_try='test -s "conftest.$ac_objext"'
10765 { (eval echo "$as_me:10765: \"$ac_try\"") >&5
10766 (eval $ac_try) 2>&5
10768 echo "$as_me:10768: \$? = $ac_status" >&5
10769 (exit "$ac_status"); }; }; then
10771 cf_cv_term_header="$cf_test"
10773 echo "$as_me: failed program was:" >&5
10774 cat "conftest.$ac_ext" >&5
10776 cf_cv_term_header=unknown
10779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10780 test "$cf_cv_term_header" != unknown && break
10784 echo "$as_me:10784: result: $cf_cv_term_header" >&5
10785 echo "${ECHO_T}$cf_cv_term_header" >&6
10787 # Set definitions to allow ifdef'ing to accommodate subdirectories
10789 case "$cf_cv_term_header" in
10792 cat >>confdefs.h <<\EOF
10793 #define HAVE_TERM_H 1
10799 case "$cf_cv_term_header" in
10802 cat >>confdefs.h <<\EOF
10803 #define HAVE_NCURSES_TERM_H 1
10809 cat >>confdefs.h <<\EOF
10810 #define HAVE_NCURSESW_TERM_H 1
10819 echo "$as_me:10819: result: no" >&5
10820 echo "${ECHO_T}no" >&6
10821 NCURSES_CONFIG_PKG=none
10824 NCURSES_CONFIG_PKG=none
10827 if test "x$cf_have_ncuconfig" = "xno"; then
10828 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10830 if test -n "$ac_tool_prefix"; then
10831 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10833 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10834 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10835 echo "$as_me:10835: checking for $ac_word" >&5
10836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10837 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10838 echo $ECHO_N "(cached) $ECHO_C" >&6
10840 if test -n "$NCURSES_CONFIG"; then
10841 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10843 ac_save_IFS=$IFS; IFS=$ac_path_separator
10845 for ac_dir in $ac_dummy; do
10847 test -z "$ac_dir" && ac_dir=.
10848 $as_executable_p "$ac_dir/$ac_word" || continue
10849 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10850 echo "$as_me:10850: found $ac_dir/$ac_word" >&5
10856 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10857 if test -n "$NCURSES_CONFIG"; then
10858 echo "$as_me:10858: result: $NCURSES_CONFIG" >&5
10859 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10861 echo "$as_me:10861: result: no" >&5
10862 echo "${ECHO_T}no" >&6
10865 test -n "$NCURSES_CONFIG" && break
10868 if test -z "$NCURSES_CONFIG"; then
10869 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10870 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10872 # Extract the first word of "$ac_prog", so it can be a program name with args.
10873 set dummy $ac_prog; ac_word=$2
10874 echo "$as_me:10874: checking for $ac_word" >&5
10875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10876 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10877 echo $ECHO_N "(cached) $ECHO_C" >&6
10879 if test -n "$ac_ct_NCURSES_CONFIG"; then
10880 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10882 ac_save_IFS=$IFS; IFS=$ac_path_separator
10884 for ac_dir in $ac_dummy; do
10886 test -z "$ac_dir" && ac_dir=.
10887 $as_executable_p "$ac_dir/$ac_word" || continue
10888 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10889 echo "$as_me:10889: found $ac_dir/$ac_word" >&5
10895 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10896 if test -n "$ac_ct_NCURSES_CONFIG"; then
10897 echo "$as_me:10897: result: $ac_ct_NCURSES_CONFIG" >&5
10898 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10900 echo "$as_me:10900: result: no" >&5
10901 echo "${ECHO_T}no" >&6
10904 test -n "$ac_ct_NCURSES_CONFIG" && break
10906 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10908 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10911 if test "$NCURSES_CONFIG" != none ; then
10913 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10915 case "x$cf_add_cflags" in
10918 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10921 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10922 test "$CFLAGS" != "$cf_old_cflag" || break
10924 CFLAGS="$cf_old_cflag"
10927 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10930 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10931 test "$CPPFLAGS" != "$cf_old_cflag" || break
10933 CPPFLAGS="$cf_old_cflag"
10942 cf_new_extra_cppflags=
10944 for cf_add_cflags in $cf_add_cflags
10946 case "$cf_fix_cppflags" in
10948 case "$cf_add_cflags" in
10949 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10950 case "$cf_add_cflags" in
10952 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10954 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10955 && test -z "${cf_tst_cflags}" \
10956 && cf_fix_cppflags=yes
10958 if test "$cf_fix_cppflags" = yes ; then
10960 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10961 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10964 elif test "${cf_tst_cflags}" = "\"'" ; then
10966 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10967 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10973 case "$CPPFLAGS" in
10977 case "$cf_add_cflags" in
10979 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10981 CPPFLAGS=`echo "$CPPFLAGS" | \
10982 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10983 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10988 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10989 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10996 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10997 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11004 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11005 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11007 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11009 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11010 && test -z "${cf_tst_cflags}" \
11011 && cf_fix_cppflags=no
11016 if test -n "$cf_new_cflags" ; then
11018 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11019 CFLAGS="${CFLAGS}$cf_new_cflags"
11023 if test -n "$cf_new_cppflags" ; then
11025 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11026 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11030 if test -n "$cf_new_extra_cppflags" ; then
11032 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11033 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11039 cf_add_libs="$LIBS"
11042 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11043 # filter duplicates
11044 for cf_add_1lib in $cf_add_0lib; do
11045 for cf_add_2lib in $cf_add_libs; do
11046 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11053 LIBS="$cf_add_libs"
11055 # even with config script, some packages use no-override for curses.h
11057 echo "$as_me:11057: checking if we have identified curses headers" >&5
11058 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11059 if test "${cf_cv_ncurses_header+set}" = set; then
11060 echo $ECHO_N "(cached) $ECHO_C" >&6
11063 cf_cv_ncurses_header=none
11065 ncurses.h $cf_cv_screen/ncurses.h \
11066 curses.h $cf_cv_screen/curses.h
11068 cat >"conftest.$ac_ext" <<_ACEOF
11069 #line 11069 "configure"
11070 #include "confdefs.h"
11071 #include <${cf_header}>
11075 initscr(); endwin()
11080 rm -f "conftest.$ac_objext"
11081 if { (eval echo "$as_me:11081: \"$ac_compile\"") >&5
11082 (eval $ac_compile) 2>&5
11084 echo "$as_me:11084: \$? = $ac_status" >&5
11085 (exit "$ac_status"); } &&
11086 { ac_try='test -s "conftest.$ac_objext"'
11087 { (eval echo "$as_me:11087: \"$ac_try\"") >&5
11088 (eval $ac_try) 2>&5
11090 echo "$as_me:11090: \$? = $ac_status" >&5
11091 (exit "$ac_status"); }; }; then
11092 cf_cv_ncurses_header=$cf_header; break
11094 echo "$as_me: failed program was:" >&5
11095 cat "conftest.$ac_ext" >&5
11097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11101 echo "$as_me:11101: result: $cf_cv_ncurses_header" >&5
11102 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11104 if test "$cf_cv_ncurses_header" = none ; then
11105 { { echo "$as_me:11105: error: No curses header-files found" >&5
11106 echo "$as_me: error: No curses header-files found" >&2;}
11107 { (exit 1); exit 1; }; }
11110 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11112 for ac_header in $cf_cv_ncurses_header
11114 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11115 echo "$as_me:11115: checking for $ac_header" >&5
11116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11118 echo $ECHO_N "(cached) $ECHO_C" >&6
11120 cat >"conftest.$ac_ext" <<_ACEOF
11121 #line 11121 "configure"
11122 #include "confdefs.h"
11123 #include <$ac_header>
11125 if { (eval echo "$as_me:11125: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11126 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11128 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11130 cat conftest.err >&5
11131 echo "$as_me:11131: \$? = $ac_status" >&5
11132 (exit "$ac_status"); } >/dev/null; then
11133 if test -s conftest.err; then
11134 ac_cpp_err=$ac_c_preproc_warn_flag
11141 if test -z "$ac_cpp_err"; then
11142 eval "$as_ac_Header=yes"
11144 echo "$as_me: failed program was:" >&5
11145 cat "conftest.$ac_ext" >&5
11146 eval "$as_ac_Header=no"
11148 rm -f conftest.err "conftest.$ac_ext"
11150 echo "$as_me:11150: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11151 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11152 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11153 cat >>confdefs.h <<EOF
11154 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11160 cat >>confdefs.h <<\EOF
11164 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11166 cat >>confdefs.h <<EOF
11167 #define $cf_nculib_ROOT 1
11170 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11174 cf_ncuhdr_root=$cf_cv_screen
11176 test -n "$cf_cv_curses_dir" && \
11177 test "$cf_cv_curses_dir" != "no" && { \
11179 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11180 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11182 while test "$cf_add_incdir" != /usr/include
11184 if test -d "$cf_add_incdir"
11187 if test -n "$CFLAGS$CPPFLAGS" ; then
11188 # a loop is needed to ensure we can add subdirs of existing dirs
11189 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11190 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11191 cf_have_incdir=yes; break
11196 if test "$cf_have_incdir" = no ; then
11197 if test "$cf_add_incdir" = /usr/local/include ; then
11198 if test "$GCC" = yes
11200 cf_save_CPPFLAGS=$CPPFLAGS
11202 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11203 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11205 cat >"conftest.$ac_ext" <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11217 rm -f "conftest.$ac_objext"
11218 if { (eval echo "$as_me:11218: \"$ac_compile\"") >&5
11219 (eval $ac_compile) 2>&5
11221 echo "$as_me:11221: \$? = $ac_status" >&5
11222 (exit "$ac_status"); } &&
11223 { ac_try='test -s "conftest.$ac_objext"'
11224 { (eval echo "$as_me:11224: \"$ac_try\"") >&5
11225 (eval $ac_try) 2>&5
11227 echo "$as_me:11227: \$? = $ac_status" >&5
11228 (exit "$ac_status"); }; }; then
11231 echo "$as_me: failed program was:" >&5
11232 cat "conftest.$ac_ext" >&5
11235 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11236 CPPFLAGS=$cf_save_CPPFLAGS
11241 if test "$cf_have_incdir" = no ; then
11242 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11244 echo "${as_me:-configure}:11244: testing adding $cf_add_incdir to include-path ..." 1>&5
11246 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11248 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11249 test "$cf_top_incdir" = "$cf_add_incdir" && break
11250 cf_add_incdir="$cf_top_incdir"
11263 echo "$as_me:11263: checking for $cf_ncuhdr_root header in include-path" >&5
11264 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11265 if test "${cf_cv_ncurses_h+set}" = set; then
11266 echo $ECHO_N "(cached) $ECHO_C" >&6
11269 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11270 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11271 for cf_header in $cf_header_list
11274 cat >"conftest.$ac_ext" <<_ACEOF
11275 #line 11275 "configure"
11276 #include "confdefs.h"
11278 #include <$cf_header>
11283 #ifdef NCURSES_VERSION
11285 printf("%s\\n", NCURSES_VERSION);
11298 rm -f "conftest.$ac_objext"
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300 (eval $ac_compile) 2>&5
11302 echo "$as_me:11302: \$? = $ac_status" >&5
11303 (exit "$ac_status"); } &&
11304 { ac_try='test -s "conftest.$ac_objext"'
11305 { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306 (eval $ac_try) 2>&5
11308 echo "$as_me:11308: \$? = $ac_status" >&5
11309 (exit "$ac_status"); }; }; then
11310 cf_cv_ncurses_h=$cf_header
11313 echo "$as_me: failed program was:" >&5
11314 cat "conftest.$ac_ext" >&5
11317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11319 test "$cf_cv_ncurses_h" != no && break
11323 echo "$as_me:11323: result: $cf_cv_ncurses_h" >&5
11324 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11326 if test "$cf_cv_ncurses_h" != no ; then
11327 cf_cv_ncurses_header=$cf_cv_ncurses_h
11330 echo "$as_me:11330: checking for $cf_ncuhdr_root include-path" >&5
11331 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11332 if test "${cf_cv_ncurses_h2+set}" = set; then
11333 echo $ECHO_N "(cached) $ECHO_C" >&6
11336 test -n "$verbose" && echo
11340 # collect the current set of include-directories from compiler flags
11341 cf_header_path_list=""
11342 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11343 for cf_header_path in $CPPFLAGS $CFLAGS
11345 case "$cf_header_path" in
11347 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11349 test "x$cf_header_path" != "xNONE" && \
11350 test -d "$cf_header_path" && \
11352 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11353 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11354 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11355 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11356 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11357 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11360 cf_header_path_list="$cf_header_path_list $cf_search"
11366 # add the variations for the package we are looking for
11370 test "x$prefix" != "xNONE" && \
11371 test -d "$prefix" && \
11373 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11374 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11375 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11376 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11377 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11378 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11381 for cf_subdir_prefix in \
11390 test "x$cf_subdir_prefix" != "x$prefix" && \
11391 test -d "$cf_subdir_prefix" && \
11392 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11393 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11394 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11395 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11396 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11397 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11398 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11403 test "$includedir" != NONE && \
11404 test "$includedir" != "/usr/include" && \
11405 test -d "$includedir" && {
11406 test -d "$includedir" && cf_search="$cf_search $includedir"
11407 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11410 test "$oldincludedir" != NONE && \
11411 test "$oldincludedir" != "/usr/include" && \
11412 test -d "$oldincludedir" && {
11413 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11414 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11417 cf_search="$cf_search $cf_header_path_list"
11419 test -n "$verbose" && echo "search path $cf_search"
11420 cf_save2_CPPFLAGS="$CPPFLAGS"
11421 for cf_incdir in $cf_search
11424 if test -n "$cf_incdir" ; then
11425 for cf_add_incdir in $cf_incdir
11427 while test "$cf_add_incdir" != /usr/include
11429 if test -d "$cf_add_incdir"
11432 if test -n "$CFLAGS$CPPFLAGS" ; then
11433 # a loop is needed to ensure we can add subdirs of existing dirs
11434 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11435 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11436 cf_have_incdir=yes; break
11441 if test "$cf_have_incdir" = no ; then
11442 if test "$cf_add_incdir" = /usr/local/include ; then
11443 if test "$GCC" = yes
11445 cf_save_CPPFLAGS=$CPPFLAGS
11447 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11448 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11450 cat >"conftest.$ac_ext" <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11462 rm -f "conftest.$ac_objext"
11463 if { (eval echo "$as_me:11463: \"$ac_compile\"") >&5
11464 (eval $ac_compile) 2>&5
11466 echo "$as_me:11466: \$? = $ac_status" >&5
11467 (exit "$ac_status"); } &&
11468 { ac_try='test -s "conftest.$ac_objext"'
11469 { (eval echo "$as_me:11469: \"$ac_try\"") >&5
11470 (eval $ac_try) 2>&5
11472 echo "$as_me:11472: \$? = $ac_status" >&5
11473 (exit "$ac_status"); }; }; then
11476 echo "$as_me: failed program was:" >&5
11477 cat "conftest.$ac_ext" >&5
11480 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11481 CPPFLAGS=$cf_save_CPPFLAGS
11486 if test "$cf_have_incdir" = no ; then
11487 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11489 echo "${as_me:-configure}:11489: testing adding $cf_add_incdir to include-path ..." 1>&5
11491 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11493 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11494 test "$cf_top_incdir" = "$cf_add_incdir" && break
11495 cf_add_incdir="$cf_top_incdir"
11511 cat >"conftest.$ac_ext" <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11515 #include <$cf_header>
11520 #ifdef NCURSES_VERSION
11522 printf("%s\\n", NCURSES_VERSION);
11535 rm -f "conftest.$ac_objext"
11536 if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
11537 (eval $ac_compile) 2>&5
11539 echo "$as_me:11539: \$? = $ac_status" >&5
11540 (exit "$ac_status"); } &&
11541 { ac_try='test -s "conftest.$ac_objext"'
11542 { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543 (eval $ac_try) 2>&5
11545 echo "$as_me:11545: \$? = $ac_status" >&5
11546 (exit "$ac_status"); }; }; then
11547 cf_cv_ncurses_h2=$cf_header
11550 echo "$as_me: failed program was:" >&5
11551 cat "conftest.$ac_ext" >&5
11552 cf_cv_ncurses_h2=no
11554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11556 if test "$cf_cv_ncurses_h2" != no ; then
11557 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11558 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11561 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11563 CPPFLAGS="$cf_save2_CPPFLAGS"
11564 test "$cf_cv_ncurses_h2" != no && break
11566 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11566: error: not found" >&5
11567 echo "$as_me: error: not found" >&2;}
11568 { (exit 1); exit 1; }; }
11571 echo "$as_me:11571: result: $cf_cv_ncurses_h2" >&5
11572 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11574 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11575 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11576 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11577 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11580 if test -n "$cf_1st_incdir" ; then
11581 for cf_add_incdir in $cf_1st_incdir
11583 while test "$cf_add_incdir" != /usr/include
11585 if test -d "$cf_add_incdir"
11588 if test -n "$CFLAGS$CPPFLAGS" ; then
11589 # a loop is needed to ensure we can add subdirs of existing dirs
11590 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11591 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11592 cf_have_incdir=yes; break
11597 if test "$cf_have_incdir" = no ; then
11598 if test "$cf_add_incdir" = /usr/local/include ; then
11599 if test "$GCC" = yes
11601 cf_save_CPPFLAGS=$CPPFLAGS
11603 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11604 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11606 cat >"conftest.$ac_ext" <<_ACEOF
11607 #line 11607 "configure"
11608 #include "confdefs.h"
11618 rm -f "conftest.$ac_objext"
11619 if { (eval echo "$as_me:11619: \"$ac_compile\"") >&5
11620 (eval $ac_compile) 2>&5
11622 echo "$as_me:11622: \$? = $ac_status" >&5
11623 (exit "$ac_status"); } &&
11624 { ac_try='test -s "conftest.$ac_objext"'
11625 { (eval echo "$as_me:11625: \"$ac_try\"") >&5
11626 (eval $ac_try) 2>&5
11628 echo "$as_me:11628: \$? = $ac_status" >&5
11629 (exit "$ac_status"); }; }; then
11632 echo "$as_me: failed program was:" >&5
11633 cat "conftest.$ac_ext" >&5
11636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11637 CPPFLAGS=$cf_save_CPPFLAGS
11642 if test "$cf_have_incdir" = no ; then
11643 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11645 echo "${as_me:-configure}:11645: testing adding $cf_add_incdir to include-path ..." 1>&5
11647 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11649 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11650 test "$cf_top_incdir" = "$cf_add_incdir" && break
11651 cf_add_incdir="$cf_top_incdir"
11664 # Set definitions to allow ifdef'ing for ncurses.h
11666 case "$cf_cv_ncurses_header" in
11669 cat >>confdefs.h <<\EOF
11670 #define HAVE_NCURSES_H 1
11676 case "$cf_cv_ncurses_header" in
11677 (ncurses/curses.h|ncurses/ncurses.h)
11679 cat >>confdefs.h <<\EOF
11680 #define HAVE_NCURSES_NCURSES_H 1
11684 (ncursesw/curses.h|ncursesw/ncurses.h)
11686 cat >>confdefs.h <<\EOF
11687 #define HAVE_NCURSESW_NCURSES_H 1
11693 echo "$as_me:11693: checking for terminfo header" >&5
11694 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11695 if test "${cf_cv_term_header+set}" = set; then
11696 echo $ECHO_N "(cached) $ECHO_C" >&6
11699 case "${cf_cv_ncurses_header}" in
11700 (*/ncurses.h|*/ncursesw.h)
11701 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11704 cf_term_header=term.h
11708 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11710 cat >"conftest.$ac_ext" <<_ACEOF
11711 #line 11711 "configure"
11712 #include "confdefs.h"
11714 #include <${cf_cv_ncurses_header:-curses.h}>
11715 #include <$cf_test>
11720 int x = auto_left_margin; (void)x
11725 rm -f "conftest.$ac_objext"
11726 if { (eval echo "$as_me:11726: \"$ac_compile\"") >&5
11727 (eval $ac_compile) 2>&5
11729 echo "$as_me:11729: \$? = $ac_status" >&5
11730 (exit "$ac_status"); } &&
11731 { ac_try='test -s "conftest.$ac_objext"'
11732 { (eval echo "$as_me:11732: \"$ac_try\"") >&5
11733 (eval $ac_try) 2>&5
11735 echo "$as_me:11735: \$? = $ac_status" >&5
11736 (exit "$ac_status"); }; }; then
11738 cf_cv_term_header="$cf_test"
11740 echo "$as_me: failed program was:" >&5
11741 cat "conftest.$ac_ext" >&5
11743 cf_cv_term_header=unknown
11746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11747 test "$cf_cv_term_header" != unknown && break
11751 echo "$as_me:11751: result: $cf_cv_term_header" >&5
11752 echo "${ECHO_T}$cf_cv_term_header" >&6
11754 # Set definitions to allow ifdef'ing to accommodate subdirectories
11756 case "$cf_cv_term_header" in
11759 cat >>confdefs.h <<\EOF
11760 #define HAVE_TERM_H 1
11766 case "$cf_cv_term_header" in
11769 cat >>confdefs.h <<\EOF
11770 #define HAVE_NCURSES_TERM_H 1
11776 cat >>confdefs.h <<\EOF
11777 #define HAVE_NCURSESW_TERM_H 1
11783 # some applications need this, but should check for NCURSES_VERSION
11785 cat >>confdefs.h <<\EOF
11789 echo "$as_me:11789: checking for ncurses version" >&5
11790 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11791 if test "${cf_cv_ncurses_version+set}" = set; then
11792 echo $ECHO_N "(cached) $ECHO_C" >&6
11795 cf_cv_ncurses_version=no
11797 rm -f "$cf_tempfile"
11798 if test "$cross_compiling" = yes; then
11800 # This will not work if the preprocessor splits the line after the
11801 # Autoconf token. The 'unproto' program does that.
11802 cat > "conftest.$ac_ext" <<EOF
11803 #include <${cf_cv_ncurses_header:-curses.h}>
11805 #ifdef NCURSES_VERSION
11806 Autoconf NCURSES_VERSION
11814 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11815 { (eval echo "$as_me:11815: \"$cf_try\"") >&5
11816 (eval $cf_try) 2>&5
11818 echo "$as_me:11818: \$? = $ac_status" >&5
11819 (exit "$ac_status"); }
11820 if test -f conftest.out ; then
11821 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11822 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11827 cat >"conftest.$ac_ext" <<_ACEOF
11828 #line 11828 "configure"
11829 #include "confdefs.h"
11831 $ac_includes_default
11833 #include <${cf_cv_ncurses_header:-curses.h}>
11837 FILE *fp = fopen("$cf_tempfile", "w");
11838 #ifdef NCURSES_VERSION
11839 # ifdef NCURSES_VERSION_PATCH
11840 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11842 fprintf(fp, "%s\\n", NCURSES_VERSION);
11845 # ifdef __NCURSES_H
11846 fprintf(fp, "old\\n");
11851 ${cf_cv_main_return:-return}(0);
11854 rm -f "conftest$ac_exeext"
11855 if { (eval echo "$as_me:11855: \"$ac_link\"") >&5
11856 (eval $ac_link) 2>&5
11858 echo "$as_me:11858: \$? = $ac_status" >&5
11859 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11860 { (eval echo "$as_me:11860: \"$ac_try\"") >&5
11861 (eval $ac_try) 2>&5
11863 echo "$as_me:11863: \$? = $ac_status" >&5
11864 (exit "$ac_status"); }; }; then
11866 cf_cv_ncurses_version=`cat $cf_tempfile`
11868 echo "$as_me: program exited with status $ac_status" >&5
11869 echo "$as_me: failed program was:" >&5
11870 cat "conftest.$ac_ext" >&5
11872 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11874 rm -f "$cf_tempfile"
11877 echo "$as_me:11877: result: $cf_cv_ncurses_version" >&5
11878 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11879 test "$cf_cv_ncurses_version" = no ||
11880 cat >>confdefs.h <<\EOF
11884 cf_nculib_root=$cf_cv_screen
11885 # This works, except for the special case where we find gpm, but
11886 # ncurses is in a nonstandard location via $LIBS, and we really want
11889 cf_ncurses_SAVE="$LIBS"
11890 echo "$as_me:11890: checking for Gpm_Open in -lgpm" >&5
11891 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11892 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11893 echo $ECHO_N "(cached) $ECHO_C" >&6
11895 ac_check_lib_save_LIBS=$LIBS
11897 cat >"conftest.$ac_ext" <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11901 /* Override any gcc2 internal prototype to avoid an error. */
11905 /* We use char because int might match the return type of a gcc2
11906 builtin and then its argument prototype would still apply. */
11916 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11917 if { (eval echo "$as_me:11917: \"$ac_link\"") >&5
11918 (eval $ac_link) 2>&5
11920 echo "$as_me:11920: \$? = $ac_status" >&5
11921 (exit "$ac_status"); } &&
11922 { ac_try='test -s "conftest$ac_exeext"'
11923 { (eval echo "$as_me:11923: \"$ac_try\"") >&5
11924 (eval $ac_try) 2>&5
11926 echo "$as_me:11926: \$? = $ac_status" >&5
11927 (exit "$ac_status"); }; }; then
11928 ac_cv_lib_gpm_Gpm_Open=yes
11930 echo "$as_me: failed program was:" >&5
11931 cat "conftest.$ac_ext" >&5
11932 ac_cv_lib_gpm_Gpm_Open=no
11934 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11935 LIBS=$ac_check_lib_save_LIBS
11937 echo "$as_me:11937: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11938 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11939 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11940 echo "$as_me:11940: checking for initscr in -lgpm" >&5
11941 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11942 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11943 echo $ECHO_N "(cached) $ECHO_C" >&6
11945 ac_check_lib_save_LIBS=$LIBS
11947 cat >"conftest.$ac_ext" <<_ACEOF
11948 #line 11948 "configure"
11949 #include "confdefs.h"
11951 /* Override any gcc2 internal prototype to avoid an error. */
11955 /* We use char because int might match the return type of a gcc2
11956 builtin and then its argument prototype would still apply. */
11966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11967 if { (eval echo "$as_me:11967: \"$ac_link\"") >&5
11968 (eval $ac_link) 2>&5
11970 echo "$as_me:11970: \$? = $ac_status" >&5
11971 (exit "$ac_status"); } &&
11972 { ac_try='test -s "conftest$ac_exeext"'
11973 { (eval echo "$as_me:11973: \"$ac_try\"") >&5
11974 (eval $ac_try) 2>&5
11976 echo "$as_me:11976: \$? = $ac_status" >&5
11977 (exit "$ac_status"); }; }; then
11978 ac_cv_lib_gpm_initscr=yes
11980 echo "$as_me: failed program was:" >&5
11981 cat "conftest.$ac_ext" >&5
11982 ac_cv_lib_gpm_initscr=no
11984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11985 LIBS=$ac_check_lib_save_LIBS
11987 echo "$as_me:11987: result: $ac_cv_lib_gpm_initscr" >&5
11988 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11989 if test "$ac_cv_lib_gpm_initscr" = yes; then
11990 LIBS="$cf_ncurses_SAVE"
11992 cf_ncurses_LIBS="-lgpm"
11999 # This is only necessary if you are linking against an obsolete
12000 # version of ncurses (but it should do no harm, since it is static).
12001 if test "$cf_nculib_root" = ncurses ; then
12002 echo "$as_me:12002: checking for tgoto in -lmytinfo" >&5
12003 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12004 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12005 echo $ECHO_N "(cached) $ECHO_C" >&6
12007 ac_check_lib_save_LIBS=$LIBS
12008 LIBS="-lmytinfo $LIBS"
12009 cat >"conftest.$ac_ext" <<_ACEOF
12010 #line 12010 "configure"
12011 #include "confdefs.h"
12013 /* Override any gcc2 internal prototype to avoid an error. */
12017 /* We use char because int might match the return type of a gcc2
12018 builtin and then its argument prototype would still apply. */
12028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12029 if { (eval echo "$as_me:12029: \"$ac_link\"") >&5
12030 (eval $ac_link) 2>&5
12032 echo "$as_me:12032: \$? = $ac_status" >&5
12033 (exit "$ac_status"); } &&
12034 { ac_try='test -s "conftest$ac_exeext"'
12035 { (eval echo "$as_me:12035: \"$ac_try\"") >&5
12036 (eval $ac_try) 2>&5
12038 echo "$as_me:12038: \$? = $ac_status" >&5
12039 (exit "$ac_status"); }; }; then
12040 ac_cv_lib_mytinfo_tgoto=yes
12042 echo "$as_me: failed program was:" >&5
12043 cat "conftest.$ac_ext" >&5
12044 ac_cv_lib_mytinfo_tgoto=no
12046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12047 LIBS=$ac_check_lib_save_LIBS
12049 echo "$as_me:12049: result: $ac_cv_lib_mytinfo_tgoto" >&5
12050 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12051 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12052 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12059 cf_add_libs="$LIBS"
12062 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12063 # filter duplicates
12064 for cf_add_1lib in $cf_add_0lib; do
12065 for cf_add_2lib in $cf_add_libs; do
12066 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12071 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12073 LIBS="$cf_add_libs"
12075 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12078 cf_add_libs="$LIBS"
12081 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12082 # filter duplicates
12083 for cf_add_1lib in $cf_add_0lib; do
12084 for cf_add_2lib in $cf_add_libs; do
12085 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12090 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12092 LIBS="$cf_add_libs"
12096 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12098 echo "$as_me:12098: checking for initscr" >&5
12099 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12100 if test "${ac_cv_func_initscr+set}" = set; then
12101 echo $ECHO_N "(cached) $ECHO_C" >&6
12103 cat >"conftest.$ac_ext" <<_ACEOF
12104 #line 12104 "configure"
12105 #include "confdefs.h"
12106 #define initscr autoconf_temporary
12107 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12114 /* We use char because int might match the return type of a gcc2
12115 builtin and then its argument prototype would still apply. */
12116 char initscr (void);
12122 /* The GNU C library defines stubs for functions which it implements
12123 to always fail with ENOSYS. Some functions are actually named
12124 something starting with __ and the normal name is an alias. */
12125 #if defined (__stub_initscr) || defined (__stub___initscr)
12126 #error found stub for initscr
12134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12135 if { (eval echo "$as_me:12135: \"$ac_link\"") >&5
12136 (eval $ac_link) 2>&5
12138 echo "$as_me:12138: \$? = $ac_status" >&5
12139 (exit "$ac_status"); } &&
12140 { ac_try='test -s "conftest$ac_exeext"'
12141 { (eval echo "$as_me:12141: \"$ac_try\"") >&5
12142 (eval $ac_try) 2>&5
12144 echo "$as_me:12144: \$? = $ac_status" >&5
12145 (exit "$ac_status"); }; }; then
12146 ac_cv_func_initscr=yes
12148 echo "$as_me: failed program was:" >&5
12149 cat "conftest.$ac_ext" >&5
12150 ac_cv_func_initscr=no
12152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12154 echo "$as_me:12154: result: $ac_cv_func_initscr" >&5
12155 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12156 if test "$ac_cv_func_initscr" = yes; then
12157 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12160 cf_save_LIBS="$LIBS"
12161 echo "$as_me:12161: checking for initscr in -l$cf_nculib_root" >&5
12162 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12163 LIBS="-l$cf_nculib_root $LIBS"
12164 cat >"conftest.$ac_ext" <<_ACEOF
12165 #line 12165 "configure"
12166 #include "confdefs.h"
12167 #include <${cf_cv_ncurses_header:-curses.h}>
12176 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12177 if { (eval echo "$as_me:12177: \"$ac_link\"") >&5
12178 (eval $ac_link) 2>&5
12180 echo "$as_me:12180: \$? = $ac_status" >&5
12181 (exit "$ac_status"); } &&
12182 { ac_try='test -s "conftest$ac_exeext"'
12183 { (eval echo "$as_me:12183: \"$ac_try\"") >&5
12184 (eval $ac_try) 2>&5
12186 echo "$as_me:12186: \$? = $ac_status" >&5
12187 (exit "$ac_status"); }; }; then
12188 echo "$as_me:12188: result: yes" >&5
12189 echo "${ECHO_T}yes" >&6
12190 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12193 echo "$as_me: failed program was:" >&5
12194 cat "conftest.$ac_ext" >&5
12195 echo "$as_me:12195: result: no" >&5
12196 echo "${ECHO_T}no" >&6
12199 cf_library_path_list=""
12200 if test -n "${LDFLAGS}${LIBS}" ; then
12201 for cf_library_path in $LDFLAGS $LIBS
12203 case "$cf_library_path" in
12205 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12207 test "x$cf_library_path" != "xNONE" && \
12208 test -d "$cf_library_path" && \
12210 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12211 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12212 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12213 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12214 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12215 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
12218 cf_library_path_list="$cf_library_path_list $cf_search"
12226 test "x$prefix" != "xNONE" && \
12227 test -d "$prefix" && \
12229 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12230 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12231 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12232 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12233 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12234 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12237 for cf_subdir_prefix in \
12246 test "x$cf_subdir_prefix" != "x$prefix" && \
12247 test -d "$cf_subdir_prefix" && \
12248 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12249 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12250 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12251 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12252 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12253 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12254 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
12259 cf_search="$cf_library_path_list $cf_search"
12261 for cf_libdir in $cf_search
12263 echo "$as_me:12263: checking for -l$cf_nculib_root in $cf_libdir" >&5
12264 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12265 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12266 cat >"conftest.$ac_ext" <<_ACEOF
12267 #line 12267 "configure"
12268 #include "confdefs.h"
12269 #include <${cf_cv_ncurses_header:-curses.h}>
12278 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12279 if { (eval echo "$as_me:12279: \"$ac_link\"") >&5
12280 (eval $ac_link) 2>&5
12282 echo "$as_me:12282: \$? = $ac_status" >&5
12283 (exit "$ac_status"); } &&
12284 { ac_try='test -s "conftest$ac_exeext"'
12285 { (eval echo "$as_me:12285: \"$ac_try\"") >&5
12286 (eval $ac_try) 2>&5
12288 echo "$as_me:12288: \$? = $ac_status" >&5
12289 (exit "$ac_status"); }; }; then
12290 echo "$as_me:12290: result: yes" >&5
12291 echo "${ECHO_T}yes" >&6
12292 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12295 echo "$as_me: failed program was:" >&5
12296 cat "conftest.$ac_ext" >&5
12297 echo "$as_me:12297: result: no" >&5
12298 echo "${ECHO_T}no" >&6
12299 LIBS="$cf_save_LIBS"
12301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12305 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12309 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12311 if test "$cf_found_library" = no ; then
12312 { { echo "$as_me:12312: error: Cannot link $cf_nculib_root library" >&5
12313 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12314 { (exit 1); exit 1; }; }
12319 if test -n "$cf_ncurses_LIBS" ; then
12320 echo "$as_me:12320: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12321 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12322 cf_ncurses_SAVE="$LIBS"
12323 for p in $cf_ncurses_LIBS ; do
12324 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12325 if test "$q" != "$LIBS" ; then
12329 cat >"conftest.$ac_ext" <<_ACEOF
12330 #line 12330 "configure"
12331 #include "confdefs.h"
12332 #include <${cf_cv_ncurses_header:-curses.h}>
12336 initscr(); mousemask(0,0); tigetstr((char *)0);
12341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12342 if { (eval echo "$as_me:12342: \"$ac_link\"") >&5
12343 (eval $ac_link) 2>&5
12345 echo "$as_me:12345: \$? = $ac_status" >&5
12346 (exit "$ac_status"); } &&
12347 { ac_try='test -s "conftest$ac_exeext"'
12348 { (eval echo "$as_me:12348: \"$ac_try\"") >&5
12349 (eval $ac_try) 2>&5
12351 echo "$as_me:12351: \$? = $ac_status" >&5
12352 (exit "$ac_status"); }; }; then
12353 echo "$as_me:12353: result: yes" >&5
12354 echo "${ECHO_T}yes" >&6
12356 echo "$as_me: failed program was:" >&5
12357 cat "conftest.$ac_ext" >&5
12358 echo "$as_me:12358: result: no" >&5
12359 echo "${ECHO_T}no" >&6
12360 LIBS="$cf_ncurses_SAVE"
12362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12365 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12367 cat >>confdefs.h <<EOF
12368 #define $cf_nculib_ROOT 1
12373 NCURSES_CONFIG=none
12378 echo "$as_me:12378: checking for X" >&5
12379 echo $ECHO_N "checking for X... $ECHO_C" >&6
12381 # Check whether --with-x or --without-x was given.
12382 if test "${with_x+set}" = set; then
12386 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12387 if test "x$with_x" = xno; then
12388 # The user explicitly disabled X.
12391 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12392 # Both variables are already set.
12395 if test "${ac_cv_have_x+set}" = set; then
12396 echo $ECHO_N "(cached) $ECHO_C" >&6
12398 # One or both of the vars are not set, and there is no cached value.
12399 ac_x_includes=no ac_x_libraries=no
12400 rm -fr conftest.dir
12401 if mkdir conftest.dir; then
12403 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12404 cat >Imakefile <<'EOF'
12406 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12408 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12409 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12410 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12411 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12412 for ac_extension in a so sl dylib dll; do
12413 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12414 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12415 ac_im_usrlibdir=$ac_im_libdir; break
12418 # Screen out bogus values from the imake configuration. They are
12419 # bogus both because they are the default anyway, and because
12420 # using them would break gcc on systems where it needs fixed includes.
12421 case $ac_im_incroot in
12423 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12425 case $ac_im_usrlibdir in
12426 /usr/lib | /lib) ;;
12427 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12431 rm -fr conftest.dir
12434 # Standard set of common directories for X headers.
12435 # Check X11 before X11Rn because it is often a symlink to the current release.
12452 /usr/local/X11/include
12453 /usr/local/X11R7/include
12454 /usr/local/X11R6/include
12455 /usr/local/X11R5/include
12456 /usr/local/X11R4/include
12458 /usr/local/include/X11
12459 /usr/local/include/X11R7
12460 /usr/local/include/X11R6
12461 /usr/local/include/X11R5
12462 /usr/local/include/X11R4
12466 /usr/XFree86/include/X11
12470 /usr/unsupported/include
12471 /usr/athena/include
12472 /usr/local/x11r5/include
12473 /usr/lpp/Xamples/include
12475 /usr/openwin/include
12476 /usr/openwin/share/include'
12478 if test "$ac_x_includes" = no; then
12479 # Guess where to find include files, by looking for Intrinsic.h.
12480 # First, try using that file with no special directory specified.
12481 cat >"conftest.$ac_ext" <<_ACEOF
12482 #line 12482 "configure"
12483 #include "confdefs.h"
12484 #include <X11/Intrinsic.h>
12486 if { (eval echo "$as_me:12486: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12487 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12489 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12491 cat conftest.err >&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit "$ac_status"); } >/dev/null; then
12494 if test -s conftest.err; then
12495 ac_cpp_err=$ac_c_preproc_warn_flag
12502 if test -z "$ac_cpp_err"; then
12503 # We can compile using X headers with no special include directory.
12506 echo "$as_me: failed program was:" >&5
12507 cat "conftest.$ac_ext" >&5
12508 for ac_dir in $ac_x_header_dirs; do
12509 if test -r "$ac_dir/X11/Intrinsic.h"; then
12510 ac_x_includes=$ac_dir
12515 rm -f conftest.err "conftest.$ac_ext"
12516 fi # $ac_x_includes = no
12518 if test "$ac_x_libraries" = no; then
12519 # Check for the libraries.
12520 # See if we find them without any special options.
12521 # Don't add to $LIBS permanently.
12524 cat >"conftest.$ac_ext" <<_ACEOF
12525 #line 12525 "configure"
12526 #include "confdefs.h"
12527 #include <X11/Intrinsic.h>
12536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12537 if { (eval echo "$as_me:12537: \"$ac_link\"") >&5
12538 (eval $ac_link) 2>&5
12540 echo "$as_me:12540: \$? = $ac_status" >&5
12541 (exit "$ac_status"); } &&
12542 { ac_try='test -s "conftest$ac_exeext"'
12543 { (eval echo "$as_me:12543: \"$ac_try\"") >&5
12544 (eval $ac_try) 2>&5
12546 echo "$as_me:12546: \$? = $ac_status" >&5
12547 (exit "$ac_status"); }; }; then
12549 # We can link X programs with no special library path.
12552 echo "$as_me: failed program was:" >&5
12553 cat "conftest.$ac_ext" >&5
12555 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12557 # Don't even attempt the hair of trying to link an X program!
12558 for ac_extension in a so sl dylib dll; do
12559 if test -r "$ac_dir/libXt.$ac_extension"; then
12560 ac_x_libraries=$ac_dir
12566 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12567 fi # $ac_x_libraries = no
12569 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12570 # Didn't find X anywhere. Cache the known absence of X.
12571 ac_cv_have_x="have_x=no"
12573 # Record where we found X for the cache.
12574 ac_cv_have_x="have_x=yes \
12575 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12580 eval "$ac_cv_have_x"
12583 if test "$have_x" != yes; then
12584 echo "$as_me:12584: result: $have_x" >&5
12585 echo "${ECHO_T}$have_x" >&6
12588 # If each of the values was on the command line, it overrides each guess.
12589 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12590 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12591 # Update the cache value to reflect the command line values.
12592 ac_cv_have_x="have_x=yes \
12593 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12594 echo "$as_me:12594: result: libraries $x_libraries, headers $x_includes" >&5
12595 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12598 if test "$no_x" = yes; then
12599 # Not all programs may use this symbol, but it does not hurt to define it.
12601 cat >>confdefs.h <<\EOF
12602 #define X_DISPLAY_MISSING 1
12610 if test -n "$x_includes"; then
12611 X_CFLAGS="$X_CFLAGS -I$x_includes"
12614 # It would also be nice to do this for all -L options, not just this one.
12615 if test -n "$x_libraries"; then
12616 X_LIBS="$X_LIBS -L$x_libraries"
12617 # For Solaris; some versions of Sun CC require a space after -R and
12618 # others require no space. Words are not sufficient . . . .
12619 case `(uname -sr) 2>/dev/null` in
12621 echo "$as_me:12621: checking whether -R must be followed by a space" >&5
12622 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12623 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12624 cat >"conftest.$ac_ext" <<_ACEOF
12625 #line 12625 "configure"
12626 #include "confdefs.h"
12636 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12637 if { (eval echo "$as_me:12637: \"$ac_link\"") >&5
12638 (eval $ac_link) 2>&5
12640 echo "$as_me:12640: \$? = $ac_status" >&5
12641 (exit "$ac_status"); } &&
12642 { ac_try='test -s "conftest$ac_exeext"'
12643 { (eval echo "$as_me:12643: \"$ac_try\"") >&5
12644 (eval $ac_try) 2>&5
12646 echo "$as_me:12646: \$? = $ac_status" >&5
12647 (exit "$ac_status"); }; }; then
12650 echo "$as_me: failed program was:" >&5
12651 cat "conftest.$ac_ext" >&5
12654 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12655 if test $ac_R_nospace = yes; then
12656 echo "$as_me:12656: result: no" >&5
12657 echo "${ECHO_T}no" >&6
12658 X_LIBS="$X_LIBS -R$x_libraries"
12660 LIBS="$ac_xsave_LIBS -R $x_libraries"
12661 cat >"conftest.$ac_ext" <<_ACEOF
12662 #line 12662 "configure"
12663 #include "confdefs.h"
12673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12674 if { (eval echo "$as_me:12674: \"$ac_link\"") >&5
12675 (eval $ac_link) 2>&5
12677 echo "$as_me:12677: \$? = $ac_status" >&5
12678 (exit "$ac_status"); } &&
12679 { ac_try='test -s "conftest$ac_exeext"'
12680 { (eval echo "$as_me:12680: \"$ac_try\"") >&5
12681 (eval $ac_try) 2>&5
12683 echo "$as_me:12683: \$? = $ac_status" >&5
12684 (exit "$ac_status"); }; }; then
12687 echo "$as_me: failed program was:" >&5
12688 cat "conftest.$ac_ext" >&5
12691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12692 if test $ac_R_space = yes; then
12693 echo "$as_me:12693: result: yes" >&5
12694 echo "${ECHO_T}yes" >&6
12695 X_LIBS="$X_LIBS -R $x_libraries"
12697 echo "$as_me:12697: result: neither works" >&5
12698 echo "${ECHO_T}neither works" >&6
12701 LIBS=$ac_xsave_LIBS
12705 # Check for system-dependent libraries X programs must link with.
12706 # Do this before checking for the system-independent R6 libraries
12707 # (-lICE), since we may need -lsocket or whatever for X linking.
12709 if test "$ISC" = yes; then
12710 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12712 # Martyn Johnson says this is needed for Ultrix, if the X
12713 # libraries were built with DECnet support. And Karl Berry says
12714 # the Alpha needs dnet_stub (dnet does not exist).
12715 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12716 cat >"conftest.$ac_ext" <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12720 /* Override any gcc2 internal prototype to avoid an error. */
12724 /* We use char because int might match the return type of a gcc2
12725 builtin and then its argument prototype would still apply. */
12726 char XOpenDisplay ();
12735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12736 if { (eval echo "$as_me:12736: \"$ac_link\"") >&5
12737 (eval $ac_link) 2>&5
12739 echo "$as_me:12739: \$? = $ac_status" >&5
12740 (exit "$ac_status"); } &&
12741 { ac_try='test -s "conftest$ac_exeext"'
12742 { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12745 echo "$as_me:12745: \$? = $ac_status" >&5
12746 (exit "$ac_status"); }; }; then
12749 echo "$as_me: failed program was:" >&5
12750 cat "conftest.$ac_ext" >&5
12751 echo "$as_me:12751: checking for dnet_ntoa in -ldnet" >&5
12752 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12753 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12754 echo $ECHO_N "(cached) $ECHO_C" >&6
12756 ac_check_lib_save_LIBS=$LIBS
12757 LIBS="-ldnet $LIBS"
12758 cat >"conftest.$ac_ext" <<_ACEOF
12759 #line 12759 "configure"
12760 #include "confdefs.h"
12762 /* Override any gcc2 internal prototype to avoid an error. */
12766 /* We use char because int might match the return type of a gcc2
12767 builtin and then its argument prototype would still apply. */
12777 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12778 if { (eval echo "$as_me:12778: \"$ac_link\"") >&5
12779 (eval $ac_link) 2>&5
12781 echo "$as_me:12781: \$? = $ac_status" >&5
12782 (exit "$ac_status"); } &&
12783 { ac_try='test -s "conftest$ac_exeext"'
12784 { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785 (eval $ac_try) 2>&5
12787 echo "$as_me:12787: \$? = $ac_status" >&5
12788 (exit "$ac_status"); }; }; then
12789 ac_cv_lib_dnet_dnet_ntoa=yes
12791 echo "$as_me: failed program was:" >&5
12792 cat "conftest.$ac_ext" >&5
12793 ac_cv_lib_dnet_dnet_ntoa=no
12795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12796 LIBS=$ac_check_lib_save_LIBS
12798 echo "$as_me:12798: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12799 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12800 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12801 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12804 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12805 echo "$as_me:12805: checking for dnet_ntoa in -ldnet_stub" >&5
12806 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12807 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12808 echo $ECHO_N "(cached) $ECHO_C" >&6
12810 ac_check_lib_save_LIBS=$LIBS
12811 LIBS="-ldnet_stub $LIBS"
12812 cat >"conftest.$ac_ext" <<_ACEOF
12813 #line 12813 "configure"
12814 #include "confdefs.h"
12816 /* Override any gcc2 internal prototype to avoid an error. */
12820 /* We use char because int might match the return type of a gcc2
12821 builtin and then its argument prototype would still apply. */
12831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12832 if { (eval echo "$as_me:12832: \"$ac_link\"") >&5
12833 (eval $ac_link) 2>&5
12835 echo "$as_me:12835: \$? = $ac_status" >&5
12836 (exit "$ac_status"); } &&
12837 { ac_try='test -s "conftest$ac_exeext"'
12838 { (eval echo "$as_me:12838: \"$ac_try\"") >&5
12839 (eval $ac_try) 2>&5
12841 echo "$as_me:12841: \$? = $ac_status" >&5
12842 (exit "$ac_status"); }; }; then
12843 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12845 echo "$as_me: failed program was:" >&5
12846 cat "conftest.$ac_ext" >&5
12847 ac_cv_lib_dnet_stub_dnet_ntoa=no
12849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12850 LIBS=$ac_check_lib_save_LIBS
12852 echo "$as_me:12852: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12853 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12854 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12855 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12861 LIBS="$ac_xsave_LIBS"
12863 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12864 # to get the SysV transport functions.
12865 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12867 # The nsl library prevents programs from opening the X display
12868 # on Irix 5.2, according to T.E. Dickey.
12869 # The functions gethostbyname, getservbyname, and inet_addr are
12870 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12871 echo "$as_me:12871: checking for gethostbyname" >&5
12872 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12873 if test "${ac_cv_func_gethostbyname+set}" = set; then
12874 echo $ECHO_N "(cached) $ECHO_C" >&6
12876 cat >"conftest.$ac_ext" <<_ACEOF
12877 #line 12877 "configure"
12878 #include "confdefs.h"
12879 #define gethostbyname autoconf_temporary
12880 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12881 #undef gethostbyname
12887 /* We use char because int might match the return type of a gcc2
12888 builtin and then its argument prototype would still apply. */
12889 char gethostbyname (void);
12895 /* The GNU C library defines stubs for functions which it implements
12896 to always fail with ENOSYS. Some functions are actually named
12897 something starting with __ and the normal name is an alias. */
12898 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12899 #error found stub for gethostbyname
12902 return gethostbyname ();
12907 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12908 if { (eval echo "$as_me:12908: \"$ac_link\"") >&5
12909 (eval $ac_link) 2>&5
12911 echo "$as_me:12911: \$? = $ac_status" >&5
12912 (exit "$ac_status"); } &&
12913 { ac_try='test -s "conftest$ac_exeext"'
12914 { (eval echo "$as_me:12914: \"$ac_try\"") >&5
12915 (eval $ac_try) 2>&5
12917 echo "$as_me:12917: \$? = $ac_status" >&5
12918 (exit "$ac_status"); }; }; then
12919 ac_cv_func_gethostbyname=yes
12921 echo "$as_me: failed program was:" >&5
12922 cat "conftest.$ac_ext" >&5
12923 ac_cv_func_gethostbyname=no
12925 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12927 echo "$as_me:12927: result: $ac_cv_func_gethostbyname" >&5
12928 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12930 if test $ac_cv_func_gethostbyname = no; then
12931 echo "$as_me:12931: checking for gethostbyname in -lnsl" >&5
12932 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12933 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12934 echo $ECHO_N "(cached) $ECHO_C" >&6
12936 ac_check_lib_save_LIBS=$LIBS
12938 cat >"conftest.$ac_ext" <<_ACEOF
12939 #line 12939 "configure"
12940 #include "confdefs.h"
12942 /* Override any gcc2 internal prototype to avoid an error. */
12946 /* We use char because int might match the return type of a gcc2
12947 builtin and then its argument prototype would still apply. */
12948 char gethostbyname ();
12957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12958 if { (eval echo "$as_me:12958: \"$ac_link\"") >&5
12959 (eval $ac_link) 2>&5
12961 echo "$as_me:12961: \$? = $ac_status" >&5
12962 (exit "$ac_status"); } &&
12963 { ac_try='test -s "conftest$ac_exeext"'
12964 { (eval echo "$as_me:12964: \"$ac_try\"") >&5
12965 (eval $ac_try) 2>&5
12967 echo "$as_me:12967: \$? = $ac_status" >&5
12968 (exit "$ac_status"); }; }; then
12969 ac_cv_lib_nsl_gethostbyname=yes
12971 echo "$as_me: failed program was:" >&5
12972 cat "conftest.$ac_ext" >&5
12973 ac_cv_lib_nsl_gethostbyname=no
12975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12976 LIBS=$ac_check_lib_save_LIBS
12978 echo "$as_me:12978: result: $ac_cv_lib_nsl_gethostbyname" >&5
12979 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12980 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12981 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12984 if test $ac_cv_lib_nsl_gethostbyname = no; then
12985 echo "$as_me:12985: checking for gethostbyname in -lbsd" >&5
12986 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12987 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12988 echo $ECHO_N "(cached) $ECHO_C" >&6
12990 ac_check_lib_save_LIBS=$LIBS
12992 cat >"conftest.$ac_ext" <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12996 /* Override any gcc2 internal prototype to avoid an error. */
13000 /* We use char because int might match the return type of a gcc2
13001 builtin and then its argument prototype would still apply. */
13002 char gethostbyname ();
13011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13012 if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
13013 (eval $ac_link) 2>&5
13015 echo "$as_me:13015: \$? = $ac_status" >&5
13016 (exit "$ac_status"); } &&
13017 { ac_try='test -s "conftest$ac_exeext"'
13018 { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019 (eval $ac_try) 2>&5
13021 echo "$as_me:13021: \$? = $ac_status" >&5
13022 (exit "$ac_status"); }; }; then
13023 ac_cv_lib_bsd_gethostbyname=yes
13025 echo "$as_me: failed program was:" >&5
13026 cat "conftest.$ac_ext" >&5
13027 ac_cv_lib_bsd_gethostbyname=no
13029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13030 LIBS=$ac_check_lib_save_LIBS
13032 echo "$as_me:13032: result: $ac_cv_lib_bsd_gethostbyname" >&5
13033 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13034 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13035 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13041 # lieder@skyler.mavd.honeywell.com says without -lsocket,
13042 # socket/setsockopt and other routines are undefined under SCO ODT
13043 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13044 # on later versions), says Simon Leinen: it contains gethostby*
13045 # variants that don't use the nameserver (or something). -lsocket
13046 # must be given before -lnsl if both are needed. We assume that
13047 # if connect needs -lnsl, so does gethostbyname.
13048 echo "$as_me:13048: checking for connect" >&5
13049 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13050 if test "${ac_cv_func_connect+set}" = set; then
13051 echo $ECHO_N "(cached) $ECHO_C" >&6
13053 cat >"conftest.$ac_ext" <<_ACEOF
13054 #line 13054 "configure"
13055 #include "confdefs.h"
13056 #define connect autoconf_temporary
13057 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13064 /* We use char because int might match the return type of a gcc2
13065 builtin and then its argument prototype would still apply. */
13066 char connect (void);
13072 /* The GNU C library defines stubs for functions which it implements
13073 to always fail with ENOSYS. Some functions are actually named
13074 something starting with __ and the normal name is an alias. */
13075 #if defined (__stub_connect) || defined (__stub___connect)
13076 #error found stub for connect
13084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13085 if { (eval echo "$as_me:13085: \"$ac_link\"") >&5
13086 (eval $ac_link) 2>&5
13088 echo "$as_me:13088: \$? = $ac_status" >&5
13089 (exit "$ac_status"); } &&
13090 { ac_try='test -s "conftest$ac_exeext"'
13091 { (eval echo "$as_me:13091: \"$ac_try\"") >&5
13092 (eval $ac_try) 2>&5
13094 echo "$as_me:13094: \$? = $ac_status" >&5
13095 (exit "$ac_status"); }; }; then
13096 ac_cv_func_connect=yes
13098 echo "$as_me: failed program was:" >&5
13099 cat "conftest.$ac_ext" >&5
13100 ac_cv_func_connect=no
13102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13104 echo "$as_me:13104: result: $ac_cv_func_connect" >&5
13105 echo "${ECHO_T}$ac_cv_func_connect" >&6
13107 if test $ac_cv_func_connect = no; then
13108 echo "$as_me:13108: checking for connect in -lsocket" >&5
13109 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13110 if test "${ac_cv_lib_socket_connect+set}" = set; then
13111 echo $ECHO_N "(cached) $ECHO_C" >&6
13113 ac_check_lib_save_LIBS=$LIBS
13114 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13115 cat >"conftest.$ac_ext" <<_ACEOF
13116 #line 13116 "configure"
13117 #include "confdefs.h"
13119 /* Override any gcc2 internal prototype to avoid an error. */
13123 /* We use char because int might match the return type of a gcc2
13124 builtin and then its argument prototype would still apply. */
13134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13135 if { (eval echo "$as_me:13135: \"$ac_link\"") >&5
13136 (eval $ac_link) 2>&5
13138 echo "$as_me:13138: \$? = $ac_status" >&5
13139 (exit "$ac_status"); } &&
13140 { ac_try='test -s "conftest$ac_exeext"'
13141 { (eval echo "$as_me:13141: \"$ac_try\"") >&5
13142 (eval $ac_try) 2>&5
13144 echo "$as_me:13144: \$? = $ac_status" >&5
13145 (exit "$ac_status"); }; }; then
13146 ac_cv_lib_socket_connect=yes
13148 echo "$as_me: failed program was:" >&5
13149 cat "conftest.$ac_ext" >&5
13150 ac_cv_lib_socket_connect=no
13152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13153 LIBS=$ac_check_lib_save_LIBS
13155 echo "$as_me:13155: result: $ac_cv_lib_socket_connect" >&5
13156 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13157 if test "$ac_cv_lib_socket_connect" = yes; then
13158 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13163 # Guillermo Gomez says -lposix is necessary on A/UX.
13164 echo "$as_me:13164: checking for remove" >&5
13165 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13166 if test "${ac_cv_func_remove+set}" = set; then
13167 echo $ECHO_N "(cached) $ECHO_C" >&6
13169 cat >"conftest.$ac_ext" <<_ACEOF
13170 #line 13170 "configure"
13171 #include "confdefs.h"
13172 #define remove autoconf_temporary
13173 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13180 /* We use char because int might match the return type of a gcc2
13181 builtin and then its argument prototype would still apply. */
13182 char remove (void);
13188 /* The GNU C library defines stubs for functions which it implements
13189 to always fail with ENOSYS. Some functions are actually named
13190 something starting with __ and the normal name is an alias. */
13191 #if defined (__stub_remove) || defined (__stub___remove)
13192 #error found stub for remove
13200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13201 if { (eval echo "$as_me:13201: \"$ac_link\"") >&5
13202 (eval $ac_link) 2>&5
13204 echo "$as_me:13204: \$? = $ac_status" >&5
13205 (exit "$ac_status"); } &&
13206 { ac_try='test -s "conftest$ac_exeext"'
13207 { (eval echo "$as_me:13207: \"$ac_try\"") >&5
13208 (eval $ac_try) 2>&5
13210 echo "$as_me:13210: \$? = $ac_status" >&5
13211 (exit "$ac_status"); }; }; then
13212 ac_cv_func_remove=yes
13214 echo "$as_me: failed program was:" >&5
13215 cat "conftest.$ac_ext" >&5
13216 ac_cv_func_remove=no
13218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13220 echo "$as_me:13220: result: $ac_cv_func_remove" >&5
13221 echo "${ECHO_T}$ac_cv_func_remove" >&6
13223 if test $ac_cv_func_remove = no; then
13224 echo "$as_me:13224: checking for remove in -lposix" >&5
13225 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13226 if test "${ac_cv_lib_posix_remove+set}" = set; then
13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13229 ac_check_lib_save_LIBS=$LIBS
13230 LIBS="-lposix $LIBS"
13231 cat >"conftest.$ac_ext" <<_ACEOF
13232 #line 13232 "configure"
13233 #include "confdefs.h"
13235 /* Override any gcc2 internal prototype to avoid an error. */
13239 /* We use char because int might match the return type of a gcc2
13240 builtin and then its argument prototype would still apply. */
13250 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13251 if { (eval echo "$as_me:13251: \"$ac_link\"") >&5
13252 (eval $ac_link) 2>&5
13254 echo "$as_me:13254: \$? = $ac_status" >&5
13255 (exit "$ac_status"); } &&
13256 { ac_try='test -s "conftest$ac_exeext"'
13257 { (eval echo "$as_me:13257: \"$ac_try\"") >&5
13258 (eval $ac_try) 2>&5
13260 echo "$as_me:13260: \$? = $ac_status" >&5
13261 (exit "$ac_status"); }; }; then
13262 ac_cv_lib_posix_remove=yes
13264 echo "$as_me: failed program was:" >&5
13265 cat "conftest.$ac_ext" >&5
13266 ac_cv_lib_posix_remove=no
13268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13269 LIBS=$ac_check_lib_save_LIBS
13271 echo "$as_me:13271: result: $ac_cv_lib_posix_remove" >&5
13272 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13273 if test "$ac_cv_lib_posix_remove" = yes; then
13274 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13279 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13280 echo "$as_me:13280: checking for shmat" >&5
13281 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13282 if test "${ac_cv_func_shmat+set}" = set; then
13283 echo $ECHO_N "(cached) $ECHO_C" >&6
13285 cat >"conftest.$ac_ext" <<_ACEOF
13286 #line 13286 "configure"
13287 #include "confdefs.h"
13288 #define shmat autoconf_temporary
13289 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13296 /* We use char because int might match the return type of a gcc2
13297 builtin and then its argument prototype would still apply. */
13304 /* The GNU C library defines stubs for functions which it implements
13305 to always fail with ENOSYS. Some functions are actually named
13306 something starting with __ and the normal name is an alias. */
13307 #if defined (__stub_shmat) || defined (__stub___shmat)
13308 #error found stub for shmat
13316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13317 if { (eval echo "$as_me:13317: \"$ac_link\"") >&5
13318 (eval $ac_link) 2>&5
13320 echo "$as_me:13320: \$? = $ac_status" >&5
13321 (exit "$ac_status"); } &&
13322 { ac_try='test -s "conftest$ac_exeext"'
13323 { (eval echo "$as_me:13323: \"$ac_try\"") >&5
13324 (eval $ac_try) 2>&5
13326 echo "$as_me:13326: \$? = $ac_status" >&5
13327 (exit "$ac_status"); }; }; then
13328 ac_cv_func_shmat=yes
13330 echo "$as_me: failed program was:" >&5
13331 cat "conftest.$ac_ext" >&5
13332 ac_cv_func_shmat=no
13334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13336 echo "$as_me:13336: result: $ac_cv_func_shmat" >&5
13337 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13339 if test $ac_cv_func_shmat = no; then
13340 echo "$as_me:13340: checking for shmat in -lipc" >&5
13341 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13342 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13343 echo $ECHO_N "(cached) $ECHO_C" >&6
13345 ac_check_lib_save_LIBS=$LIBS
13347 cat >"conftest.$ac_ext" <<_ACEOF
13348 #line 13348 "configure"
13349 #include "confdefs.h"
13351 /* Override any gcc2 internal prototype to avoid an error. */
13355 /* We use char because int might match the return type of a gcc2
13356 builtin and then its argument prototype would still apply. */
13366 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13367 if { (eval echo "$as_me:13367: \"$ac_link\"") >&5
13368 (eval $ac_link) 2>&5
13370 echo "$as_me:13370: \$? = $ac_status" >&5
13371 (exit "$ac_status"); } &&
13372 { ac_try='test -s "conftest$ac_exeext"'
13373 { (eval echo "$as_me:13373: \"$ac_try\"") >&5
13374 (eval $ac_try) 2>&5
13376 echo "$as_me:13376: \$? = $ac_status" >&5
13377 (exit "$ac_status"); }; }; then
13378 ac_cv_lib_ipc_shmat=yes
13380 echo "$as_me: failed program was:" >&5
13381 cat "conftest.$ac_ext" >&5
13382 ac_cv_lib_ipc_shmat=no
13384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13385 LIBS=$ac_check_lib_save_LIBS
13387 echo "$as_me:13387: result: $ac_cv_lib_ipc_shmat" >&5
13388 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13389 if test "$ac_cv_lib_ipc_shmat" = yes; then
13390 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13396 # Check for libraries that X11R6 Xt/Xaw programs need.
13397 ac_save_LDFLAGS=$LDFLAGS
13398 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13399 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13400 # check for ICE first), but we must link in the order -lSM -lICE or
13401 # we get undefined symbols. So assume we have SM if we have ICE.
13402 # These have to be linked with before -lX11, unlike the other
13403 # libraries we check for below, so use a different variable.
13404 # John Interrante, Karl Berry
13405 echo "$as_me:13405: checking for IceConnectionNumber in -lICE" >&5
13406 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13407 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13408 echo $ECHO_N "(cached) $ECHO_C" >&6
13410 ac_check_lib_save_LIBS=$LIBS
13411 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13412 cat >"conftest.$ac_ext" <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13416 /* Override any gcc2 internal prototype to avoid an error. */
13420 /* We use char because int might match the return type of a gcc2
13421 builtin and then its argument prototype would still apply. */
13422 char IceConnectionNumber ();
13426 IceConnectionNumber ();
13431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13432 if { (eval echo "$as_me:13432: \"$ac_link\"") >&5
13433 (eval $ac_link) 2>&5
13435 echo "$as_me:13435: \$? = $ac_status" >&5
13436 (exit "$ac_status"); } &&
13437 { ac_try='test -s "conftest$ac_exeext"'
13438 { (eval echo "$as_me:13438: \"$ac_try\"") >&5
13439 (eval $ac_try) 2>&5
13441 echo "$as_me:13441: \$? = $ac_status" >&5
13442 (exit "$ac_status"); }; }; then
13443 ac_cv_lib_ICE_IceConnectionNumber=yes
13445 echo "$as_me: failed program was:" >&5
13446 cat "conftest.$ac_ext" >&5
13447 ac_cv_lib_ICE_IceConnectionNumber=no
13449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13450 LIBS=$ac_check_lib_save_LIBS
13452 echo "$as_me:13452: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13453 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13454 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13455 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13458 LDFLAGS=$ac_save_LDFLAGS
13462 cf_x_athena=${cf_x_athena:-Xaw}
13464 echo "$as_me:13464: checking if you want to link with Xaw 3d library" >&5
13465 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13468 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13469 if test "${with_Xaw3d+set}" = set; then
13470 withval="$with_Xaw3d"
13473 if test "$withval" = yes ; then
13475 echo "$as_me:13475: result: yes" >&5
13476 echo "${ECHO_T}yes" >&6
13478 echo "$as_me:13478: result: no" >&5
13479 echo "${ECHO_T}no" >&6
13482 echo "$as_me:13482: checking if you want to link with Xaw 3d xft library" >&5
13483 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13486 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13487 if test "${with_Xaw3dxft+set}" = set; then
13488 withval="$with_Xaw3dxft"
13491 if test "$withval" = yes ; then
13492 cf_x_athena=Xaw3dxft
13493 echo "$as_me:13493: result: yes" >&5
13494 echo "${ECHO_T}yes" >&6
13496 echo "$as_me:13496: result: no" >&5
13497 echo "${ECHO_T}no" >&6
13500 echo "$as_me:13500: checking if you want to link with neXT Athena library" >&5
13501 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13504 # Check whether --with-neXtaw or --without-neXtaw was given.
13505 if test "${with_neXtaw+set}" = set; then
13506 withval="$with_neXtaw"
13509 if test "$withval" = yes ; then
13511 echo "$as_me:13511: result: yes" >&5
13512 echo "${ECHO_T}yes" >&6
13514 echo "$as_me:13514: result: no" >&5
13515 echo "${ECHO_T}no" >&6
13518 echo "$as_me:13518: checking if you want to link with Athena-Plus library" >&5
13519 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13522 # Check whether --with-XawPlus or --without-XawPlus was given.
13523 if test "${with_XawPlus+set}" = set; then
13524 withval="$with_XawPlus"
13527 if test "$withval" = yes ; then
13528 cf_x_athena=XawPlus
13529 echo "$as_me:13529: result: yes" >&5
13530 echo "${ECHO_T}yes" >&6
13532 echo "$as_me:13532: result: no" >&5
13533 echo "${ECHO_T}no" >&6
13538 if test "$PKG_CONFIG" != none ; then
13540 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13541 for cf_athena_pkg in \
13544 ${cf_x_athena}-devel \
13545 lib${cf_x_athena} \
13546 lib${cf_x_athena}-devel
13549 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13550 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13552 echo "${as_me:-configure}:13552: testing found package $cf_athena_pkg ..." 1>&5
13554 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13555 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13556 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13558 echo "${as_me:-configure}:13558: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13560 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13562 echo "${as_me:-configure}:13562: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13567 cf_new_extra_cppflags=
13569 for cf_add_cflags in $cf_pkgconfig_incs
13571 case "$cf_fix_cppflags" in
13573 case "$cf_add_cflags" in
13574 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13575 case "$cf_add_cflags" in
13577 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13579 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13580 && test -z "${cf_tst_cflags}" \
13581 && cf_fix_cppflags=yes
13583 if test "$cf_fix_cppflags" = yes ; then
13585 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13586 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13589 elif test "${cf_tst_cflags}" = "\"'" ; then
13591 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13592 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13598 case "$CPPFLAGS" in
13602 case "$cf_add_cflags" in
13604 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13606 CPPFLAGS=`echo "$CPPFLAGS" | \
13607 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13608 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13613 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13614 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13621 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13622 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13629 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13630 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13632 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13634 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13635 && test -z "${cf_tst_cflags}" \
13636 && cf_fix_cppflags=no
13641 if test -n "$cf_new_cflags" ; then
13643 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13644 CFLAGS="${CFLAGS}$cf_new_cflags"
13648 if test -n "$cf_new_cppflags" ; then
13650 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13651 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13655 if test -n "$cf_new_extra_cppflags" ; then
13657 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13658 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13662 cf_add_libs="$LIBS"
13665 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13666 # filter duplicates
13667 for cf_add_1lib in $cf_add_0lib; do
13668 for cf_add_2lib in $cf_add_libs; do
13669 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13674 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13676 LIBS="$cf_add_libs"
13678 cf_x_athena_lib="$cf_pkgconfig_libs"
13680 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13682 cat >>confdefs.h <<EOF
13683 #define $cf_x_athena_LIBS 1
13686 for cf_trim_lib in Xmu Xt X11
13689 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13690 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13691 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13693 echo "${as_me:-configure}:13693: testing ..trimmed $LIBS ..." 1>&5
13699 echo "$as_me:13699: checking for usable $cf_x_athena/Xmu package" >&5
13700 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13701 if test "${cf_cv_xaw_compat+set}" = set; then
13702 echo $ECHO_N "(cached) $ECHO_C" >&6
13705 cat >"conftest.$ac_ext" <<_ACEOF
13706 #line 13706 "configure"
13707 #include "confdefs.h"
13709 #include <X11/Xmu/CharSet.h>
13715 int check = XmuCompareISOLatin1("big", "small");
13722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13723 if { (eval echo "$as_me:13723: \"$ac_link\"") >&5
13724 (eval $ac_link) 2>&5
13726 echo "$as_me:13726: \$? = $ac_status" >&5
13727 (exit "$ac_status"); } &&
13728 { ac_try='test -s "conftest$ac_exeext"'
13729 { (eval echo "$as_me:13729: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13732 echo "$as_me:13732: \$? = $ac_status" >&5
13733 (exit "$ac_status"); }; }; then
13734 cf_cv_xaw_compat=yes
13736 echo "$as_me: failed program was:" >&5
13737 cat "conftest.$ac_ext" >&5
13738 cf_cv_xaw_compat=no
13740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13742 echo "$as_me:13742: result: $cf_cv_xaw_compat" >&5
13743 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13745 if test "$cf_cv_xaw_compat" = no
13747 # workaround for broken ".pc" files...
13748 case "$cf_x_athena_lib" in
13752 test -n "$verbose" && echo " work around broken package" 1>&6
13754 echo "${as_me:-configure}:13754: testing work around broken package ..." 1>&5
13756 cf_save_xmu="$LIBS"
13757 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13759 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13760 test -n "$verbose" && echo " found package xmu" 1>&6
13762 echo "${as_me:-configure}:13762: testing found package xmu ..." 1>&5
13764 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13765 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13766 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13768 echo "${as_me:-configure}:13768: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13770 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13772 echo "${as_me:-configure}:13772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13777 cf_new_extra_cppflags=
13779 for cf_add_cflags in $cf_pkgconfig_incs
13781 case "$cf_fix_cppflags" in
13783 case "$cf_add_cflags" in
13784 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13785 case "$cf_add_cflags" in
13787 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13790 && test -z "${cf_tst_cflags}" \
13791 && cf_fix_cppflags=yes
13793 if test "$cf_fix_cppflags" = yes ; then
13795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13799 elif test "${cf_tst_cflags}" = "\"'" ; then
13801 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13802 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13808 case "$CPPFLAGS" in
13812 case "$cf_add_cflags" in
13814 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13816 CPPFLAGS=`echo "$CPPFLAGS" | \
13817 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13818 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13823 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13824 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13831 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13832 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13839 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13840 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13842 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13844 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13845 && test -z "${cf_tst_cflags}" \
13846 && cf_fix_cppflags=no
13851 if test -n "$cf_new_cflags" ; then
13853 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13854 CFLAGS="${CFLAGS}$cf_new_cflags"
13858 if test -n "$cf_new_cppflags" ; then
13860 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13861 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13865 if test -n "$cf_new_extra_cppflags" ; then
13867 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13868 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13872 cf_add_libs="$LIBS"
13875 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13876 # filter duplicates
13877 for cf_add_1lib in $cf_add_0lib; do
13878 for cf_add_2lib in $cf_add_libs; do
13879 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13884 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13886 LIBS="$cf_add_libs"
13888 LIBS="$cf_save_xmu"
13890 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13892 echo "${as_me:-configure}:13892: testing ...before $LIBS ..." 1>&5
13894 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13895 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13897 echo "${as_me:-configure}:13897: testing ...after $LIBS ..." 1>&5
13903 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13905 echo "${as_me:-configure}:13905: testing ...before $LIBS ..." 1>&5
13907 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13908 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13910 echo "${as_me:-configure}:13910: testing ...after $LIBS ..." 1>&5
13914 for cf_trim_lib in Xmu Xt X11
13917 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13918 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13919 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13921 echo "${as_me:-configure}:13921: testing ..trimmed $LIBS ..." 1>&5
13941 if test -z "$cf_x_athena_lib" ; then
13943 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13944 test -n "$verbose" && echo " found package Xext" 1>&6
13946 echo "${as_me:-configure}:13946: testing found package Xext ..." 1>&5
13948 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13949 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13950 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13952 echo "${as_me:-configure}:13952: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13954 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13956 echo "${as_me:-configure}:13956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13961 cf_new_extra_cppflags=
13963 for cf_add_cflags in $cf_pkgconfig_incs
13965 case "$cf_fix_cppflags" in
13967 case "$cf_add_cflags" in
13968 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13969 case "$cf_add_cflags" in
13971 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13973 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13974 && test -z "${cf_tst_cflags}" \
13975 && cf_fix_cppflags=yes
13977 if test "$cf_fix_cppflags" = yes ; then
13979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13983 elif test "${cf_tst_cflags}" = "\"'" ; then
13985 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13986 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13992 case "$CPPFLAGS" in
13996 case "$cf_add_cflags" in
13998 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14000 CPPFLAGS=`echo "$CPPFLAGS" | \
14001 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14002 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14007 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14008 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14015 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14016 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14026 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14028 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14029 && test -z "${cf_tst_cflags}" \
14030 && cf_fix_cppflags=no
14035 if test -n "$cf_new_cflags" ; then
14037 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14038 CFLAGS="${CFLAGS}$cf_new_cflags"
14042 if test -n "$cf_new_cppflags" ; then
14044 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14045 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14049 if test -n "$cf_new_extra_cppflags" ; then
14051 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14052 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14056 cf_add_libs="$LIBS"
14059 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14060 # filter duplicates
14061 for cf_add_1lib in $cf_add_0lib; do
14062 for cf_add_2lib in $cf_add_libs; do
14063 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14068 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14070 LIBS="$cf_add_libs"
14077 echo "$as_me:14077: checking for XextCreateExtension in -lXext" >&5
14078 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14079 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
14082 ac_check_lib_save_LIBS=$LIBS
14083 LIBS="-lXext $LIBS"
14084 cat >"conftest.$ac_ext" <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14088 /* Override any gcc2 internal prototype to avoid an error. */
14092 /* We use char because int might match the return type of a gcc2
14093 builtin and then its argument prototype would still apply. */
14094 char XextCreateExtension ();
14098 XextCreateExtension ();
14103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105 (eval $ac_link) 2>&5
14107 echo "$as_me:14107: \$? = $ac_status" >&5
14108 (exit "$ac_status"); } &&
14109 { ac_try='test -s "conftest$ac_exeext"'
14110 { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111 (eval $ac_try) 2>&5
14113 echo "$as_me:14113: \$? = $ac_status" >&5
14114 (exit "$ac_status"); }; }; then
14115 ac_cv_lib_Xext_XextCreateExtension=yes
14117 echo "$as_me: failed program was:" >&5
14118 cat "conftest.$ac_ext" >&5
14119 ac_cv_lib_Xext_XextCreateExtension=no
14121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14122 LIBS=$ac_check_lib_save_LIBS
14124 echo "$as_me:14124: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14125 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14126 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14128 cf_add_libs="$LIBS"
14131 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14132 # filter duplicates
14133 for cf_add_1lib in $cf_add_0lib; do
14134 for cf_add_2lib in $cf_add_libs; do
14135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14142 LIBS="$cf_add_libs"
14148 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14149 # in some cases has installed dummy files in the former, other cases replaced
14150 # it with a link to the new location). This complicates the configure script.
14151 # Check for that pitfall, and recover using pkg-config
14153 # If none of these are set, the configuration is almost certainly broken.
14154 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14157 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14158 test -n "$verbose" && echo " found package x11" 1>&6
14160 echo "${as_me:-configure}:14160: testing found package x11 ..." 1>&5
14162 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14163 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14164 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14166 echo "${as_me:-configure}:14166: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14168 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14170 echo "${as_me:-configure}:14170: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14175 cf_new_extra_cppflags=
14177 for cf_add_cflags in $cf_pkgconfig_incs
14179 case "$cf_fix_cppflags" in
14181 case "$cf_add_cflags" in
14182 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14183 case "$cf_add_cflags" in
14185 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14187 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14188 && test -z "${cf_tst_cflags}" \
14189 && cf_fix_cppflags=yes
14191 if test "$cf_fix_cppflags" = yes ; then
14193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14197 elif test "${cf_tst_cflags}" = "\"'" ; then
14199 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14200 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14206 case "$CPPFLAGS" in
14210 case "$cf_add_cflags" in
14212 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14214 CPPFLAGS=`echo "$CPPFLAGS" | \
14215 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14216 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14221 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14222 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14229 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14230 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14243 && test -z "${cf_tst_cflags}" \
14244 && cf_fix_cppflags=no
14249 if test -n "$cf_new_cflags" ; then
14251 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14252 CFLAGS="${CFLAGS}$cf_new_cflags"
14256 if test -n "$cf_new_cppflags" ; then
14258 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14259 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14263 if test -n "$cf_new_extra_cppflags" ; then
14265 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14266 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14270 cf_add_libs="$LIBS"
14273 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14274 # filter duplicates
14275 for cf_add_1lib in $cf_add_0lib; do
14276 for cf_add_2lib in $cf_add_libs; do
14277 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14282 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14284 LIBS="$cf_add_libs"
14290 { echo "$as_me:14290: WARNING: unable to find X11 library" >&5
14291 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14294 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14295 test -n "$verbose" && echo " found package ice" 1>&6
14297 echo "${as_me:-configure}:14297: testing found package ice ..." 1>&5
14299 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14300 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14301 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14303 echo "${as_me:-configure}:14303: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14305 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14307 echo "${as_me:-configure}:14307: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14312 cf_new_extra_cppflags=
14314 for cf_add_cflags in $cf_pkgconfig_incs
14316 case "$cf_fix_cppflags" in
14318 case "$cf_add_cflags" in
14319 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14320 case "$cf_add_cflags" in
14322 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14324 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14325 && test -z "${cf_tst_cflags}" \
14326 && cf_fix_cppflags=yes
14328 if test "$cf_fix_cppflags" = yes ; then
14330 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14331 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14334 elif test "${cf_tst_cflags}" = "\"'" ; then
14336 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14337 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14343 case "$CPPFLAGS" in
14347 case "$cf_add_cflags" in
14349 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14351 CPPFLAGS=`echo "$CPPFLAGS" | \
14352 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14353 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14358 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14359 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14366 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14367 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14374 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14375 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14377 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14379 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14380 && test -z "${cf_tst_cflags}" \
14381 && cf_fix_cppflags=no
14386 if test -n "$cf_new_cflags" ; then
14388 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14389 CFLAGS="${CFLAGS}$cf_new_cflags"
14393 if test -n "$cf_new_cppflags" ; then
14395 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14396 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14400 if test -n "$cf_new_extra_cppflags" ; then
14402 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14403 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14407 cf_add_libs="$LIBS"
14410 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14411 # filter duplicates
14412 for cf_add_1lib in $cf_add_0lib; do
14413 for cf_add_2lib in $cf_add_libs; do
14414 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14419 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14421 LIBS="$cf_add_libs"
14427 { echo "$as_me:14427: WARNING: unable to find ICE library" >&5
14428 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14431 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14432 test -n "$verbose" && echo " found package sm" 1>&6
14434 echo "${as_me:-configure}:14434: testing found package sm ..." 1>&5
14436 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14437 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14438 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14440 echo "${as_me:-configure}:14440: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14442 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14444 echo "${as_me:-configure}:14444: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14449 cf_new_extra_cppflags=
14451 for cf_add_cflags in $cf_pkgconfig_incs
14453 case "$cf_fix_cppflags" in
14455 case "$cf_add_cflags" in
14456 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14457 case "$cf_add_cflags" in
14459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14462 && test -z "${cf_tst_cflags}" \
14463 && cf_fix_cppflags=yes
14465 if test "$cf_fix_cppflags" = yes ; then
14467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14471 elif test "${cf_tst_cflags}" = "\"'" ; then
14473 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14474 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14480 case "$CPPFLAGS" in
14484 case "$cf_add_cflags" in
14486 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14488 CPPFLAGS=`echo "$CPPFLAGS" | \
14489 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14490 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14495 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14496 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14503 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14504 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14517 && test -z "${cf_tst_cflags}" \
14518 && cf_fix_cppflags=no
14523 if test -n "$cf_new_cflags" ; then
14525 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14526 CFLAGS="${CFLAGS}$cf_new_cflags"
14530 if test -n "$cf_new_cppflags" ; then
14532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14533 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14537 if test -n "$cf_new_extra_cppflags" ; then
14539 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14540 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14544 cf_add_libs="$LIBS"
14547 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14548 # filter duplicates
14549 for cf_add_1lib in $cf_add_0lib; do
14550 for cf_add_2lib in $cf_add_libs; do
14551 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14556 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14558 LIBS="$cf_add_libs"
14564 { echo "$as_me:14564: WARNING: unable to find SM library" >&5
14565 echo "$as_me: WARNING: unable to find SM library" >&2;}
14568 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14569 test -n "$verbose" && echo " found package xt" 1>&6
14571 echo "${as_me:-configure}:14571: testing found package xt ..." 1>&5
14573 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14574 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14575 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14577 echo "${as_me:-configure}:14577: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14579 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14581 echo "${as_me:-configure}:14581: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14586 cf_new_extra_cppflags=
14588 for cf_add_cflags in $cf_pkgconfig_incs
14590 case "$cf_fix_cppflags" in
14592 case "$cf_add_cflags" in
14593 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14594 case "$cf_add_cflags" in
14596 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14598 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14599 && test -z "${cf_tst_cflags}" \
14600 && cf_fix_cppflags=yes
14602 if test "$cf_fix_cppflags" = yes ; then
14604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14608 elif test "${cf_tst_cflags}" = "\"'" ; then
14610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14617 case "$CPPFLAGS" in
14621 case "$cf_add_cflags" in
14623 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14625 CPPFLAGS=`echo "$CPPFLAGS" | \
14626 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14627 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14632 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14633 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14640 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14641 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14648 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14649 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14651 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14653 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14654 && test -z "${cf_tst_cflags}" \
14655 && cf_fix_cppflags=no
14660 if test -n "$cf_new_cflags" ; then
14662 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14663 CFLAGS="${CFLAGS}$cf_new_cflags"
14667 if test -n "$cf_new_cppflags" ; then
14669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14670 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14674 if test -n "$cf_new_extra_cppflags" ; then
14676 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14677 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14681 cf_add_libs="$LIBS"
14684 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14685 # filter duplicates
14686 for cf_add_1lib in $cf_add_0lib; do
14687 for cf_add_2lib in $cf_add_libs; do
14688 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14693 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14695 LIBS="$cf_add_libs"
14701 { echo "$as_me:14701: WARNING: unable to find Xt library" >&5
14702 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14706 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14711 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14712 test -n "$verbose" && echo " found package xt" 1>&6
14714 echo "${as_me:-configure}:14714: testing found package xt ..." 1>&5
14716 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14717 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14718 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14720 echo "${as_me:-configure}:14720: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14722 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14724 echo "${as_me:-configure}:14724: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14729 cf_new_extra_cppflags=
14731 for cf_add_cflags in $cf_pkgconfig_incs
14733 case "$cf_fix_cppflags" in
14735 case "$cf_add_cflags" in
14736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14737 case "$cf_add_cflags" in
14739 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14742 && test -z "${cf_tst_cflags}" \
14743 && cf_fix_cppflags=yes
14745 if test "$cf_fix_cppflags" = yes ; then
14747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14751 elif test "${cf_tst_cflags}" = "\"'" ; then
14753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14760 case "$CPPFLAGS" in
14764 case "$cf_add_cflags" in
14766 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14768 CPPFLAGS=`echo "$CPPFLAGS" | \
14769 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14770 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14775 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14776 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14783 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14784 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14797 && test -z "${cf_tst_cflags}" \
14798 && cf_fix_cppflags=no
14803 if test -n "$cf_new_cflags" ; then
14805 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14806 CFLAGS="${CFLAGS}$cf_new_cflags"
14810 if test -n "$cf_new_cppflags" ; then
14812 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14813 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14817 if test -n "$cf_new_extra_cppflags" ; then
14819 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14820 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14824 cf_add_libs="$LIBS"
14827 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14828 # filter duplicates
14829 for cf_add_1lib in $cf_add_0lib; do
14830 for cf_add_2lib in $cf_add_libs; do
14831 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14836 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14838 LIBS="$cf_add_libs"
14844 # we have an "xt" package, but it may omit Xt's dependency on X11
14845 echo "$as_me:14845: checking for usable X dependency" >&5
14846 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14847 if test "${cf_cv_xt_x11_compat+set}" = set; then
14848 echo $ECHO_N "(cached) $ECHO_C" >&6
14851 cat >"conftest.$ac_ext" <<_ACEOF
14852 #line 14852 "configure"
14853 #include "confdefs.h"
14855 #include <X11/Xlib.h>
14861 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14862 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14863 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14864 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14871 if { (eval echo "$as_me:14871: \"$ac_link\"") >&5
14872 (eval $ac_link) 2>&5
14874 echo "$as_me:14874: \$? = $ac_status" >&5
14875 (exit "$ac_status"); } &&
14876 { ac_try='test -s "conftest$ac_exeext"'
14877 { (eval echo "$as_me:14877: \"$ac_try\"") >&5
14878 (eval $ac_try) 2>&5
14880 echo "$as_me:14880: \$? = $ac_status" >&5
14881 (exit "$ac_status"); }; }; then
14882 cf_cv_xt_x11_compat=yes
14884 echo "$as_me: failed program was:" >&5
14885 cat "conftest.$ac_ext" >&5
14886 cf_cv_xt_x11_compat=no
14888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14890 echo "$as_me:14890: result: $cf_cv_xt_x11_compat" >&5
14891 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14892 if test "$cf_cv_xt_x11_compat" = no
14894 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14896 echo "${as_me:-configure}:14896: testing work around broken X11 dependency ..." 1>&5
14898 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14900 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14901 test -n "$verbose" && echo " found package x11" 1>&6
14903 echo "${as_me:-configure}:14903: testing found package x11 ..." 1>&5
14905 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14906 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14907 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14909 echo "${as_me:-configure}:14909: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14911 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14913 echo "${as_me:-configure}:14913: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14918 cf_new_extra_cppflags=
14920 for cf_add_cflags in $cf_pkgconfig_incs
14922 case "$cf_fix_cppflags" in
14924 case "$cf_add_cflags" in
14925 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14926 case "$cf_add_cflags" in
14928 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14930 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14931 && test -z "${cf_tst_cflags}" \
14932 && cf_fix_cppflags=yes
14934 if test "$cf_fix_cppflags" = yes ; then
14936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14940 elif test "${cf_tst_cflags}" = "\"'" ; then
14942 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14943 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14949 case "$CPPFLAGS" in
14953 case "$cf_add_cflags" in
14955 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14957 CPPFLAGS=`echo "$CPPFLAGS" | \
14958 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14959 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14964 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14965 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14972 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14973 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14983 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14985 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14986 && test -z "${cf_tst_cflags}" \
14987 && cf_fix_cppflags=no
14992 if test -n "$cf_new_cflags" ; then
14994 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14995 CFLAGS="${CFLAGS}$cf_new_cflags"
14999 if test -n "$cf_new_cppflags" ; then
15001 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15002 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15006 if test -n "$cf_new_extra_cppflags" ; then
15008 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15009 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15013 cf_add_libs="$LIBS"
15016 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15017 # filter duplicates
15018 for cf_add_1lib in $cf_add_0lib; do
15019 for cf_add_2lib in $cf_add_libs; do
15020 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15025 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15027 LIBS="$cf_add_libs"
15034 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15036 echo "${as_me:-configure}:15036: testing ...before $LIBS ..." 1>&5
15038 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
15039 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15041 echo "${as_me:-configure}:15041: testing ...after $LIBS ..." 1>&5
15049 echo "$as_me:15049: checking for usable X Toolkit package" >&5
15050 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15051 if test "${cf_cv_xt_ice_compat+set}" = set; then
15052 echo $ECHO_N "(cached) $ECHO_C" >&6
15055 cat >"conftest.$ac_ext" <<_ACEOF
15056 #line 15056 "configure"
15057 #include "confdefs.h"
15059 #include <X11/Shell.h>
15064 int num = IceConnectionNumber(0); (void) num
15070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15071 if { (eval echo "$as_me:15071: \"$ac_link\"") >&5
15072 (eval $ac_link) 2>&5
15074 echo "$as_me:15074: \$? = $ac_status" >&5
15075 (exit "$ac_status"); } &&
15076 { ac_try='test -s "conftest$ac_exeext"'
15077 { (eval echo "$as_me:15077: \"$ac_try\"") >&5
15078 (eval $ac_try) 2>&5
15080 echo "$as_me:15080: \$? = $ac_status" >&5
15081 (exit "$ac_status"); }; }; then
15082 cf_cv_xt_ice_compat=yes
15084 echo "$as_me: failed program was:" >&5
15085 cat "conftest.$ac_ext" >&5
15086 cf_cv_xt_ice_compat=no
15088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15090 echo "$as_me:15090: result: $cf_cv_xt_ice_compat" >&5
15091 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15093 if test "$cf_cv_xt_ice_compat" = no
15095 # workaround for broken ".pc" files used for X Toolkit.
15096 case "x$X_PRE_LIBS" in
15102 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15104 echo "${as_me:-configure}:15104: testing work around broken ICE dependency ..." 1>&5
15106 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15107 test -n "$verbose" && echo " found package ice" 1>&6
15109 echo "${as_me:-configure}:15109: testing found package ice ..." 1>&5
15111 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15112 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15113 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15115 echo "${as_me:-configure}:15115: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15117 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15119 echo "${as_me:-configure}:15119: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15124 cf_new_extra_cppflags=
15126 for cf_add_cflags in $cf_pkgconfig_incs
15128 case "$cf_fix_cppflags" in
15130 case "$cf_add_cflags" in
15131 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15132 case "$cf_add_cflags" in
15134 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15136 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15137 && test -z "${cf_tst_cflags}" \
15138 && cf_fix_cppflags=yes
15140 if test "$cf_fix_cppflags" = yes ; then
15142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15146 elif test "${cf_tst_cflags}" = "\"'" ; then
15148 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15149 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15155 case "$CPPFLAGS" in
15159 case "$cf_add_cflags" in
15161 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15163 CPPFLAGS=`echo "$CPPFLAGS" | \
15164 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15165 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15170 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15171 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15178 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15179 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15189 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15191 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15192 && test -z "${cf_tst_cflags}" \
15193 && cf_fix_cppflags=no
15198 if test -n "$cf_new_cflags" ; then
15200 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15201 CFLAGS="${CFLAGS}$cf_new_cflags"
15205 if test -n "$cf_new_cppflags" ; then
15207 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15208 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15212 if test -n "$cf_new_extra_cppflags" ; then
15214 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15215 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15219 cf_add_libs="$LIBS"
15222 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15223 # filter duplicates
15224 for cf_add_1lib in $cf_add_0lib; do
15225 for cf_add_2lib in $cf_add_libs; do
15226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15233 LIBS="$cf_add_libs"
15235 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15236 test -n "$verbose" && echo " found package sm" 1>&6
15238 echo "${as_me:-configure}:15238: testing found package sm ..." 1>&5
15240 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15241 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15242 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15244 echo "${as_me:-configure}:15244: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15246 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15248 echo "${as_me:-configure}:15248: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15253 cf_new_extra_cppflags=
15255 for cf_add_cflags in $cf_pkgconfig_incs
15257 case "$cf_fix_cppflags" in
15259 case "$cf_add_cflags" in
15260 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15261 case "$cf_add_cflags" in
15263 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15265 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15266 && test -z "${cf_tst_cflags}" \
15267 && cf_fix_cppflags=yes
15269 if test "$cf_fix_cppflags" = yes ; then
15271 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15272 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15275 elif test "${cf_tst_cflags}" = "\"'" ; then
15277 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15278 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15284 case "$CPPFLAGS" in
15288 case "$cf_add_cflags" in
15290 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15292 CPPFLAGS=`echo "$CPPFLAGS" | \
15293 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15294 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15299 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15300 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15307 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15308 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15315 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15316 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15318 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15320 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15321 && test -z "${cf_tst_cflags}" \
15322 && cf_fix_cppflags=no
15327 if test -n "$cf_new_cflags" ; then
15329 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15330 CFLAGS="${CFLAGS}$cf_new_cflags"
15334 if test -n "$cf_new_cppflags" ; then
15336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15337 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15341 if test -n "$cf_new_extra_cppflags" ; then
15343 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15344 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15348 cf_add_libs="$LIBS"
15351 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15352 # filter duplicates
15353 for cf_add_1lib in $cf_add_0lib; do
15354 for cf_add_2lib in $cf_add_libs; do
15355 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15360 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15362 LIBS="$cf_add_libs"
15375 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15377 echo "${as_me:-configure}:15377: testing ...before $LIBS ..." 1>&5
15379 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15380 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15382 echo "${as_me:-configure}:15382: testing ...after $LIBS ..." 1>&5
15398 LDFLAGS="$X_LIBS $LDFLAGS"
15400 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15402 echo "${as_me:-configure}:15402: testing checking additions to CFLAGS ..." 1>&5
15404 cf_check_cflags="$CFLAGS"
15405 cf_check_cppflags="$CPPFLAGS"
15410 cf_new_extra_cppflags=
15412 for cf_add_cflags in $X_CFLAGS
15414 case "$cf_fix_cppflags" in
15416 case "$cf_add_cflags" in
15417 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15418 case "$cf_add_cflags" in
15420 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15422 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15423 && test -z "${cf_tst_cflags}" \
15424 && cf_fix_cppflags=yes
15426 if test "$cf_fix_cppflags" = yes ; then
15428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15432 elif test "${cf_tst_cflags}" = "\"'" ; then
15434 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15435 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15441 case "$CPPFLAGS" in
15445 case "$cf_add_cflags" in
15447 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15449 CPPFLAGS=`echo "$CPPFLAGS" | \
15450 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15451 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15456 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15457 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15464 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15465 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15472 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15473 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15475 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15477 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15478 && test -z "${cf_tst_cflags}" \
15479 && cf_fix_cppflags=no
15484 if test -n "$cf_new_cflags" ; then
15485 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15487 echo "${as_me:-configure}:15487: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15489 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15490 CFLAGS="${CFLAGS}$cf_new_cflags"
15494 if test -n "$cf_new_cppflags" ; then
15495 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15497 echo "${as_me:-configure}:15497: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15499 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15500 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15504 if test -n "$cf_new_extra_cppflags" ; then
15505 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15507 echo "${as_me:-configure}:15507: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15509 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15510 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15514 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15515 cat >"conftest.$ac_ext" <<_ACEOF
15516 #line 15516 "configure"
15517 #include "confdefs.h"
15522 printf("Hello world");
15527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15528 if { (eval echo "$as_me:15528: \"$ac_link\"") >&5
15529 (eval $ac_link) 2>&5
15531 echo "$as_me:15531: \$? = $ac_status" >&5
15532 (exit "$ac_status"); } &&
15533 { ac_try='test -s "conftest$ac_exeext"'
15534 { (eval echo "$as_me:15534: \"$ac_try\"") >&5
15535 (eval $ac_try) 2>&5
15537 echo "$as_me:15537: \$? = $ac_status" >&5
15538 (exit "$ac_status"); }; }; then
15541 echo "$as_me: failed program was:" >&5
15542 cat "conftest.$ac_ext" >&5
15543 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15545 echo "${as_me:-configure}:15545: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15547 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15548 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15550 echo "${as_me:-configure}:15550: testing but keeping change to \$CPPFLAGS ..." 1>&5
15553 CFLAGS="$cf_check_cflags"
15555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15558 echo "$as_me:15558: checking for XOpenDisplay" >&5
15559 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15560 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15561 echo $ECHO_N "(cached) $ECHO_C" >&6
15563 cat >"conftest.$ac_ext" <<_ACEOF
15564 #line 15564 "configure"
15565 #include "confdefs.h"
15566 #define XOpenDisplay autoconf_temporary
15567 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15568 #undef XOpenDisplay
15574 /* We use char because int might match the return type of a gcc2
15575 builtin and then its argument prototype would still apply. */
15576 char XOpenDisplay (void);
15582 /* The GNU C library defines stubs for functions which it implements
15583 to always fail with ENOSYS. Some functions are actually named
15584 something starting with __ and the normal name is an alias. */
15585 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15586 #error found stub for XOpenDisplay
15589 return XOpenDisplay ();
15594 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15595 if { (eval echo "$as_me:15595: \"$ac_link\"") >&5
15596 (eval $ac_link) 2>&5
15598 echo "$as_me:15598: \$? = $ac_status" >&5
15599 (exit "$ac_status"); } &&
15600 { ac_try='test -s "conftest$ac_exeext"'
15601 { (eval echo "$as_me:15601: \"$ac_try\"") >&5
15602 (eval $ac_try) 2>&5
15604 echo "$as_me:15604: \$? = $ac_status" >&5
15605 (exit "$ac_status"); }; }; then
15606 ac_cv_func_XOpenDisplay=yes
15608 echo "$as_me: failed program was:" >&5
15609 cat "conftest.$ac_ext" >&5
15610 ac_cv_func_XOpenDisplay=no
15612 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15614 echo "$as_me:15614: result: $ac_cv_func_XOpenDisplay" >&5
15615 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15616 if test "$ac_cv_func_XOpenDisplay" = yes; then
15620 echo "$as_me:15620: checking for XOpenDisplay in -lX11" >&5
15621 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15622 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15623 echo $ECHO_N "(cached) $ECHO_C" >&6
15625 ac_check_lib_save_LIBS=$LIBS
15627 cat >"conftest.$ac_ext" <<_ACEOF
15628 #line 15628 "configure"
15629 #include "confdefs.h"
15631 /* Override any gcc2 internal prototype to avoid an error. */
15635 /* We use char because int might match the return type of a gcc2
15636 builtin and then its argument prototype would still apply. */
15637 char XOpenDisplay ();
15646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15647 if { (eval echo "$as_me:15647: \"$ac_link\"") >&5
15648 (eval $ac_link) 2>&5
15650 echo "$as_me:15650: \$? = $ac_status" >&5
15651 (exit "$ac_status"); } &&
15652 { ac_try='test -s "conftest$ac_exeext"'
15653 { (eval echo "$as_me:15653: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15656 echo "$as_me:15656: \$? = $ac_status" >&5
15657 (exit "$ac_status"); }; }; then
15658 ac_cv_lib_X11_XOpenDisplay=yes
15660 echo "$as_me: failed program was:" >&5
15661 cat "conftest.$ac_ext" >&5
15662 ac_cv_lib_X11_XOpenDisplay=no
15664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15665 LIBS=$ac_check_lib_save_LIBS
15667 echo "$as_me:15667: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15668 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15669 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15671 cf_add_libs="$LIBS"
15674 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15675 # filter duplicates
15676 for cf_add_1lib in $cf_add_0lib; do
15677 for cf_add_2lib in $cf_add_libs; do
15678 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15683 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15685 LIBS="$cf_add_libs"
15691 echo "$as_me:15691: checking for XtAppInitialize" >&5
15692 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15693 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15694 echo $ECHO_N "(cached) $ECHO_C" >&6
15696 cat >"conftest.$ac_ext" <<_ACEOF
15697 #line 15697 "configure"
15698 #include "confdefs.h"
15699 #define XtAppInitialize autoconf_temporary
15700 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15701 #undef XtAppInitialize
15707 /* We use char because int might match the return type of a gcc2
15708 builtin and then its argument prototype would still apply. */
15709 char XtAppInitialize (void);
15715 /* The GNU C library defines stubs for functions which it implements
15716 to always fail with ENOSYS. Some functions are actually named
15717 something starting with __ and the normal name is an alias. */
15718 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15719 #error found stub for XtAppInitialize
15722 return XtAppInitialize ();
15727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15728 if { (eval echo "$as_me:15728: \"$ac_link\"") >&5
15729 (eval $ac_link) 2>&5
15731 echo "$as_me:15731: \$? = $ac_status" >&5
15732 (exit "$ac_status"); } &&
15733 { ac_try='test -s "conftest$ac_exeext"'
15734 { (eval echo "$as_me:15734: \"$ac_try\"") >&5
15735 (eval $ac_try) 2>&5
15737 echo "$as_me:15737: \$? = $ac_status" >&5
15738 (exit "$ac_status"); }; }; then
15739 ac_cv_func_XtAppInitialize=yes
15741 echo "$as_me: failed program was:" >&5
15742 cat "conftest.$ac_ext" >&5
15743 ac_cv_func_XtAppInitialize=no
15745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15747 echo "$as_me:15747: result: $ac_cv_func_XtAppInitialize" >&5
15748 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15749 if test "$ac_cv_func_XtAppInitialize" = yes; then
15753 echo "$as_me:15753: checking for XtAppInitialize in -lXt" >&5
15754 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15755 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15756 echo $ECHO_N "(cached) $ECHO_C" >&6
15758 ac_check_lib_save_LIBS=$LIBS
15760 cat >"conftest.$ac_ext" <<_ACEOF
15761 #line 15761 "configure"
15762 #include "confdefs.h"
15764 /* Override any gcc2 internal prototype to avoid an error. */
15768 /* We use char because int might match the return type of a gcc2
15769 builtin and then its argument prototype would still apply. */
15770 char XtAppInitialize ();
15774 XtAppInitialize ();
15779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15780 if { (eval echo "$as_me:15780: \"$ac_link\"") >&5
15781 (eval $ac_link) 2>&5
15783 echo "$as_me:15783: \$? = $ac_status" >&5
15784 (exit "$ac_status"); } &&
15785 { ac_try='test -s "conftest$ac_exeext"'
15786 { (eval echo "$as_me:15786: \"$ac_try\"") >&5
15787 (eval $ac_try) 2>&5
15789 echo "$as_me:15789: \$? = $ac_status" >&5
15790 (exit "$ac_status"); }; }; then
15791 ac_cv_lib_Xt_XtAppInitialize=yes
15793 echo "$as_me: failed program was:" >&5
15794 cat "conftest.$ac_ext" >&5
15795 ac_cv_lib_Xt_XtAppInitialize=no
15797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15798 LIBS=$ac_check_lib_save_LIBS
15800 echo "$as_me:15800: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15801 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15802 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15804 cat >>confdefs.h <<\EOF
15805 #define HAVE_LIBXT 1
15816 if test "$cf_have_X_LIBS" = no ; then
15817 { echo "$as_me:15817: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15818 test program. You will have to check and add the proper libraries by hand
15820 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15821 test program. You will have to check and add the proper libraries by hand
15822 to makefile." >&2;}
15825 cf_x_athena_root=$cf_x_athena
15828 for cf_path in default \
15829 /usr/contrib/X11R6 \
15830 /usr/contrib/X11R5 \
15834 if test -z "$cf_x_athena_inc" ; then
15836 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15837 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15838 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15839 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15840 for cf_X_CFLAGS in $X_CFLAGS
15842 case "x$cf_X_CFLAGS" in
15844 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15847 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15852 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15853 if test "$cf_path" != default ; then
15855 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15856 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15858 echo "$as_me:15858: checking for $cf_test in $cf_path" >&5
15859 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15861 echo "$as_me:15861: checking for $cf_test" >&5
15862 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15864 cat >"conftest.$ac_ext" <<_ACEOF
15865 #line 15865 "configure"
15866 #include "confdefs.h"
15868 #include <X11/Intrinsic.h>
15869 #include <$cf_test>
15878 rm -f "conftest.$ac_objext"
15879 if { (eval echo "$as_me:15879: \"$ac_compile\"") >&5
15880 (eval $ac_compile) 2>&5
15882 echo "$as_me:15882: \$? = $ac_status" >&5
15883 (exit "$ac_status"); } &&
15884 { ac_try='test -s "conftest.$ac_objext"'
15885 { (eval echo "$as_me:15885: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15888 echo "$as_me:15888: \$? = $ac_status" >&5
15889 (exit "$ac_status"); }; }; then
15892 echo "$as_me: failed program was:" >&5
15893 cat "conftest.$ac_ext" >&5
15896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15897 echo "$as_me:15897: result: $cf_result" >&5
15898 echo "${ECHO_T}$cf_result" >&6
15900 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15901 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15902 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15904 if test "$cf_result" = yes ; then
15905 test "$cf_path" = default && cf_x_athena_inc=default
15906 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15912 if test -z "$cf_x_athena_inc" ; then
15913 { echo "$as_me:15913: WARNING: Unable to find Athena header files" >&5
15914 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15915 elif test "$cf_x_athena_inc" != default ; then
15917 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15918 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15922 cf_x_athena_root=$cf_x_athena
15925 for cf_path in default \
15926 /usr/contrib/X11R6 \
15927 /usr/contrib/X11R5 \
15932 ${cf_x_athena_root} \
15933 ${cf_x_athena_root}7 \
15934 ${cf_x_athena_root}6
15937 "-l$cf_lib -lXmu" \
15938 "-l$cf_lib -lXpm -lXmu" \
15939 "-l${cf_lib}_s -lXmu_s"
15941 test -n "$cf_x_athena_lib" && break
15943 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15944 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15945 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15946 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15947 for cf_X_CFLAGS in $X_CFLAGS
15949 case "x$cf_X_CFLAGS" in
15951 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15954 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15959 cf_test=XawSimpleMenuAddGlobalActions
15960 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15962 cf_add_libs="$LIBS"
15965 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15966 # filter duplicates
15967 for cf_add_1lib in $cf_add_0lib; do
15968 for cf_add_2lib in $cf_add_libs; do
15969 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15976 LIBS="$cf_add_libs"
15978 echo "$as_me:15978: checking for $cf_test in $cf_libs" >&5
15979 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15980 cat >"conftest.$ac_ext" <<_ACEOF
15981 #line 15981 "configure"
15982 #include "confdefs.h"
15984 #include <X11/Intrinsic.h>
15985 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15991 $cf_test((XtAppContext) 0)
15996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15997 if { (eval echo "$as_me:15997: \"$ac_link\"") >&5
15998 (eval $ac_link) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit "$ac_status"); } &&
16002 { ac_try='test -s "conftest$ac_exeext"'
16003 { (eval echo "$as_me:16003: \"$ac_try\"") >&5
16004 (eval $ac_try) 2>&5
16006 echo "$as_me:16006: \$? = $ac_status" >&5
16007 (exit "$ac_status"); }; }; then
16010 echo "$as_me: failed program was:" >&5
16011 cat "conftest.$ac_ext" >&5
16014 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16015 echo "$as_me:16015: result: $cf_result" >&5
16016 echo "${ECHO_T}$cf_result" >&6
16018 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16019 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16020 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16022 if test "$cf_result" = yes ; then
16023 cf_x_athena_lib="$cf_libs"
16027 test -n "$cf_x_athena_lib" && break
16031 if test -z "$cf_x_athena_lib" ; then
16032 { { echo "$as_me:16032: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16033 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16034 { (exit 1); exit 1; }; }
16037 cf_add_libs="$LIBS"
16040 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16041 # filter duplicates
16042 for cf_add_1lib in $cf_add_0lib; do
16043 for cf_add_2lib in $cf_add_libs; do
16044 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16049 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16051 LIBS="$cf_add_libs"
16053 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16055 cat >>confdefs.h <<EOF
16056 #define $cf_x_athena_LIBS 1
16061 if test -n "$ac_tool_prefix"; then
16062 for ac_prog in xcurses-config
16064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16065 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16066 echo "$as_me:16066: checking for $ac_word" >&5
16067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16068 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16069 echo $ECHO_N "(cached) $ECHO_C" >&6
16071 if test -n "$XCURSES_CONFIG"; then
16072 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16074 ac_save_IFS=$IFS; IFS=$ac_path_separator
16076 for ac_dir in $ac_dummy; do
16078 test -z "$ac_dir" && ac_dir=.
16079 $as_executable_p "$ac_dir/$ac_word" || continue
16080 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16081 echo "$as_me:16081: found $ac_dir/$ac_word" >&5
16087 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16088 if test -n "$XCURSES_CONFIG"; then
16089 echo "$as_me:16089: result: $XCURSES_CONFIG" >&5
16090 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16092 echo "$as_me:16092: result: no" >&5
16093 echo "${ECHO_T}no" >&6
16096 test -n "$XCURSES_CONFIG" && break
16099 if test -z "$XCURSES_CONFIG"; then
16100 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16101 for ac_prog in xcurses-config
16103 # Extract the first word of "$ac_prog", so it can be a program name with args.
16104 set dummy $ac_prog; ac_word=$2
16105 echo "$as_me:16105: checking for $ac_word" >&5
16106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16107 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16108 echo $ECHO_N "(cached) $ECHO_C" >&6
16110 if test -n "$ac_ct_XCURSES_CONFIG"; then
16111 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16113 ac_save_IFS=$IFS; IFS=$ac_path_separator
16115 for ac_dir in $ac_dummy; do
16117 test -z "$ac_dir" && ac_dir=.
16118 $as_executable_p "$ac_dir/$ac_word" || continue
16119 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16120 echo "$as_me:16120: found $ac_dir/$ac_word" >&5
16126 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16127 if test -n "$ac_ct_XCURSES_CONFIG"; then
16128 echo "$as_me:16128: result: $ac_ct_XCURSES_CONFIG" >&5
16129 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16131 echo "$as_me:16131: result: no" >&5
16132 echo "${ECHO_T}no" >&6
16135 test -n "$ac_ct_XCURSES_CONFIG" && break
16137 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16139 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16142 if test "$XCURSES_CONFIG" != none ; then
16147 cf_new_extra_cppflags=
16149 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16151 case "$cf_fix_cppflags" in
16153 case "$cf_add_cflags" in
16154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16155 case "$cf_add_cflags" in
16157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16160 && test -z "${cf_tst_cflags}" \
16161 && cf_fix_cppflags=yes
16163 if test "$cf_fix_cppflags" = yes ; then
16165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16169 elif test "${cf_tst_cflags}" = "\"'" ; then
16171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16178 case "$CPPFLAGS" in
16182 case "$cf_add_cflags" in
16184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16186 CPPFLAGS=`echo "$CPPFLAGS" | \
16187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16215 && test -z "${cf_tst_cflags}" \
16216 && cf_fix_cppflags=no
16221 if test -n "$cf_new_cflags" ; then
16223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16224 CFLAGS="${CFLAGS}$cf_new_cflags"
16228 if test -n "$cf_new_cppflags" ; then
16230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16235 if test -n "$cf_new_extra_cppflags" ; then
16237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16242 cf_add_libs="$LIBS"
16245 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16246 # filter duplicates
16247 for cf_add_1lib in $cf_add_0lib; do
16248 for cf_add_2lib in $cf_add_libs; do
16249 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16254 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16256 LIBS="$cf_add_libs"
16258 cf_cv_lib_XCurses=yes
16262 LDFLAGS="$LDFLAGS $X_LIBS"
16264 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16266 echo "${as_me:-configure}:16266: testing checking additions to CFLAGS ..." 1>&5
16268 cf_check_cflags="$CFLAGS"
16269 cf_check_cppflags="$CPPFLAGS"
16274 cf_new_extra_cppflags=
16276 for cf_add_cflags in $X_CFLAGS
16278 case "$cf_fix_cppflags" in
16280 case "$cf_add_cflags" in
16281 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16282 case "$cf_add_cflags" in
16284 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16286 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16287 && test -z "${cf_tst_cflags}" \
16288 && cf_fix_cppflags=yes
16290 if test "$cf_fix_cppflags" = yes ; then
16292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16296 elif test "${cf_tst_cflags}" = "\"'" ; then
16298 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16299 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16305 case "$CPPFLAGS" in
16309 case "$cf_add_cflags" in
16311 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16313 CPPFLAGS=`echo "$CPPFLAGS" | \
16314 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16315 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16320 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16321 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16328 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16329 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16336 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16337 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16339 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16341 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16342 && test -z "${cf_tst_cflags}" \
16343 && cf_fix_cppflags=no
16348 if test -n "$cf_new_cflags" ; then
16349 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16351 echo "${as_me:-configure}:16351: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16353 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16354 CFLAGS="${CFLAGS}$cf_new_cflags"
16358 if test -n "$cf_new_cppflags" ; then
16359 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16361 echo "${as_me:-configure}:16361: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16363 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16364 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16368 if test -n "$cf_new_extra_cppflags" ; then
16369 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16371 echo "${as_me:-configure}:16371: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16373 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16374 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16378 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16379 cat >"conftest.$ac_ext" <<_ACEOF
16380 #line 16380 "configure"
16381 #include "confdefs.h"
16386 printf("Hello world");
16391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16392 if { (eval echo "$as_me:16392: \"$ac_link\"") >&5
16393 (eval $ac_link) 2>&5
16395 echo "$as_me:16395: \$? = $ac_status" >&5
16396 (exit "$ac_status"); } &&
16397 { ac_try='test -s "conftest$ac_exeext"'
16398 { (eval echo "$as_me:16398: \"$ac_try\"") >&5
16399 (eval $ac_try) 2>&5
16401 echo "$as_me:16401: \$? = $ac_status" >&5
16402 (exit "$ac_status"); }; }; then
16405 echo "$as_me: failed program was:" >&5
16406 cat "conftest.$ac_ext" >&5
16407 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16409 echo "${as_me:-configure}:16409: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16411 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16412 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16414 echo "${as_me:-configure}:16414: testing but keeping change to \$CPPFLAGS ..." 1>&5
16417 CFLAGS="$cf_check_cflags"
16419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16422 echo "$as_me:16422: checking for XOpenDisplay in -lX11" >&5
16423 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16424 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16425 echo $ECHO_N "(cached) $ECHO_C" >&6
16427 ac_check_lib_save_LIBS=$LIBS
16428 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16429 cat >"conftest.$ac_ext" <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16433 /* Override any gcc2 internal prototype to avoid an error. */
16437 /* We use char because int might match the return type of a gcc2
16438 builtin and then its argument prototype would still apply. */
16439 char XOpenDisplay ();
16448 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16449 if { (eval echo "$as_me:16449: \"$ac_link\"") >&5
16450 (eval $ac_link) 2>&5
16452 echo "$as_me:16452: \$? = $ac_status" >&5
16453 (exit "$ac_status"); } &&
16454 { ac_try='test -s "conftest$ac_exeext"'
16455 { (eval echo "$as_me:16455: \"$ac_try\"") >&5
16456 (eval $ac_try) 2>&5
16458 echo "$as_me:16458: \$? = $ac_status" >&5
16459 (exit "$ac_status"); }; }; then
16460 ac_cv_lib_X11_XOpenDisplay=yes
16462 echo "$as_me: failed program was:" >&5
16463 cat "conftest.$ac_ext" >&5
16464 ac_cv_lib_X11_XOpenDisplay=no
16466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16467 LIBS=$ac_check_lib_save_LIBS
16469 echo "$as_me:16469: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16470 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16471 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16473 cf_add_libs="$LIBS"
16476 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16477 # filter duplicates
16478 for cf_add_1lib in $cf_add_0lib; do
16479 for cf_add_2lib in $cf_add_libs; do
16480 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16485 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16487 LIBS="$cf_add_libs"
16491 echo "$as_me:16491: checking for XCurses library" >&5
16492 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16493 if test "${cf_cv_lib_XCurses+set}" = set; then
16494 echo $ECHO_N "(cached) $ECHO_C" >&6
16497 cf_add_libs="$LIBS"
16500 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16501 # filter duplicates
16502 for cf_add_1lib in $cf_add_0lib; do
16503 for cf_add_2lib in $cf_add_libs; do
16504 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16509 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16511 LIBS="$cf_add_libs"
16513 cat >"conftest.$ac_ext" <<_ACEOF
16514 #line 16514 "configure"
16515 #include "confdefs.h"
16517 #include <xcurses.h>
16518 char *XCursesProgramName = "test";
16528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16529 if { (eval echo "$as_me:16529: \"$ac_link\"") >&5
16530 (eval $ac_link) 2>&5
16532 echo "$as_me:16532: \$? = $ac_status" >&5
16533 (exit "$ac_status"); } &&
16534 { ac_try='test -s "conftest$ac_exeext"'
16535 { (eval echo "$as_me:16535: \"$ac_try\"") >&5
16536 (eval $ac_try) 2>&5
16538 echo "$as_me:16538: \$? = $ac_status" >&5
16539 (exit "$ac_status"); }; }; then
16540 cf_cv_lib_XCurses=yes
16542 echo "$as_me: failed program was:" >&5
16543 cat "conftest.$ac_ext" >&5
16544 cf_cv_lib_XCurses=no
16546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16549 echo "$as_me:16549: result: $cf_cv_lib_XCurses" >&5
16550 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16554 if test "$cf_cv_lib_XCurses" = yes ; then
16556 cat >>confdefs.h <<\EOF
16560 cat >>confdefs.h <<\EOF
16564 echo "$as_me:16564: checking for xcurses.h" >&5
16565 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16566 if test "${ac_cv_header_xcurses_h+set}" = set; then
16567 echo $ECHO_N "(cached) $ECHO_C" >&6
16569 cat >"conftest.$ac_ext" <<_ACEOF
16570 #line 16570 "configure"
16571 #include "confdefs.h"
16572 #include <xcurses.h>
16574 if { (eval echo "$as_me:16574: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16575 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16577 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16579 cat conftest.err >&5
16580 echo "$as_me:16580: \$? = $ac_status" >&5
16581 (exit "$ac_status"); } >/dev/null; then
16582 if test -s conftest.err; then
16583 ac_cpp_err=$ac_c_preproc_warn_flag
16590 if test -z "$ac_cpp_err"; then
16591 ac_cv_header_xcurses_h=yes
16593 echo "$as_me: failed program was:" >&5
16594 cat "conftest.$ac_ext" >&5
16595 ac_cv_header_xcurses_h=no
16597 rm -f conftest.err "conftest.$ac_ext"
16599 echo "$as_me:16599: result: $ac_cv_header_xcurses_h" >&5
16600 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16601 if test "$ac_cv_header_xcurses_h" = yes; then
16603 cat >>confdefs.h <<\EOF
16604 #define HAVE_XCURSES 1
16610 { { echo "$as_me:16610: error: Cannot link with XCurses" >&5
16611 echo "$as_me: error: Cannot link with XCurses" >&2;}
16612 { (exit 1); exit 1; }; }
16617 { { echo "$as_me:16617: error: unexpected screen-value: $cf_cv_screen" >&5
16618 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16619 { (exit 1); exit 1; }; }
16623 : ${cf_nculib_root:=$cf_cv_screen}
16624 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16625 echo "$as_me:16625: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16626 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16627 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16628 echo $ECHO_N "(cached) $ECHO_C" >&6
16630 ac_check_lib_save_LIBS=$LIBS
16631 LIBS="-l$cf_nculib_root $LIBS"
16632 cat >"conftest.$ac_ext" <<_ACEOF
16633 #line 16633 "configure"
16634 #include "confdefs.h"
16636 /* Override any gcc2 internal prototype to avoid an error. */
16640 /* We use char because int might match the return type of a gcc2
16641 builtin and then its argument prototype would still apply. */
16642 char _nc_init_pthreads ();
16646 _nc_init_pthreads ();
16651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16652 if { (eval echo "$as_me:16652: \"$ac_link\"") >&5
16653 (eval $ac_link) 2>&5
16655 echo "$as_me:16655: \$? = $ac_status" >&5
16656 (exit "$ac_status"); } &&
16657 { ac_try='test -s "conftest$ac_exeext"'
16658 { (eval echo "$as_me:16658: \"$ac_try\"") >&5
16659 (eval $ac_try) 2>&5
16661 echo "$as_me:16661: \$? = $ac_status" >&5
16662 (exit "$ac_status"); }; }; then
16663 eval "$as_ac_Lib=yes"
16665 echo "$as_me: failed program was:" >&5
16666 cat "conftest.$ac_ext" >&5
16667 eval "$as_ac_Lib=no"
16669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16670 LIBS=$ac_check_lib_save_LIBS
16672 echo "$as_me:16672: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16673 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16674 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16675 cf_cv_ncurses_pthreads=yes
16677 cf_cv_ncurses_pthreads=no
16680 if test "$cf_cv_ncurses_pthreads" = yes
16683 cf_add_libs="$LIBS"
16686 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16687 # filter duplicates
16688 for cf_add_1lib in $cf_add_0lib; do
16689 for cf_add_2lib in $cf_add_libs; do
16690 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16695 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16697 LIBS="$cf_add_libs"
16701 case $cf_cv_screen in
16703 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16707 echo "$as_me:16707: checking for X11 rgb file" >&5
16708 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16710 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16711 if test "${with_x11_rgb+set}" = set; then
16712 withval="$with_x11_rgb"
16718 if test "x$RGB_PATH" = xauto
16720 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16722 /opt/local/share/X11/rgb.txt \
16723 /opt/X11/share/X11/rgb.txt \
16724 /usr/share/X11/rgb.txt \
16725 /usr/X11/share/X11/rgb.txt \
16726 /usr/X11/lib/X11/rgb.txt \
16727 /usr/lib/X11/rgb.txt \
16729 /usr/pkg/lib/X11/rgb.txt \
16730 /usr/X11R7/lib/X11/rgb.txt \
16731 /usr/X11R6/lib/X11/rgb.txt \
16732 /usr/X11R5/lib/X11/rgb.txt \
16733 /usr/X11R4/lib/X11/rgb.txt \
16734 /usr/local/lib/X11/rgb.txt \
16735 /usr/local/share/X11/rgb.txt \
16736 /usr/lib64/X11/rgb.txt
16738 if test -f "$cf_path" ; then
16739 RGB_PATH="$cf_path"
16746 if test "x$prefix" != xNONE; then
16747 cf_path_syntax="$prefix"
16749 cf_path_syntax="$ac_default_prefix"
16752 case ".$cf_path" in
16753 (.\$\(*\)*|.\'*\'*)
16757 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16759 (.\$\{*prefix\}*|.\$\{*dir\}*)
16760 eval cf_path="$cf_path"
16761 case ".$cf_path" in
16763 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16768 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16771 { { echo "$as_me:16771: error: expected a pathname, not \"$cf_path\"" >&5
16772 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16773 { (exit 1); exit 1; }; }
16779 echo "$as_me:16779: result: $RGB_PATH" >&5
16780 echo "${ECHO_T}$RGB_PATH" >&6
16782 cat >>confdefs.h <<EOF
16783 #define RGB_PATH "$cf_path"
16787 if test "$RGB_PATH" = no
16794 case $cf_cv_screen in
16796 cf_default_panel=no
16799 cf_default_tinfo=no
16801 (xcurses|bsdcurses)
16802 cf_default_panel=no
16805 cf_default_tinfo=yes
16808 cf_default_panel=yes
16809 cf_default_form=yes
16810 cf_default_menu=yes
16811 cf_default_tinfo=yes
16812 case $cf_cv_screen in
16814 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16820 echo "$as_me:16820: checking for desired basename for form library" >&5
16821 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16823 # Check whether --with-form-libname or --without-form-libname was given.
16824 if test "${with_form_libname+set}" = set; then
16825 withval="$with_form_libname"
16826 with_lib_basename=$withval
16828 with_lib_basename=form
16830 FORM_NAME="$with_lib_basename"
16832 case "x$FORM_NAME" in
16840 echo "$as_me:16840: result: $FORM_NAME" >&5
16841 echo "${ECHO_T}$FORM_NAME" >&6
16843 echo "$as_me:16843: checking for desired basename for menu library" >&5
16844 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16846 # Check whether --with-menu-libname or --without-menu-libname was given.
16847 if test "${with_menu_libname+set}" = set; then
16848 withval="$with_menu_libname"
16849 with_lib_basename=$withval
16851 with_lib_basename=menu
16853 MENU_NAME="$with_lib_basename"
16855 case "x$MENU_NAME" in
16863 echo "$as_me:16863: result: $MENU_NAME" >&5
16864 echo "${ECHO_T}$MENU_NAME" >&6
16866 echo "$as_me:16866: checking for desired basename for panel library" >&5
16867 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16869 # Check whether --with-panel-libname or --without-panel-libname was given.
16870 if test "${with_panel_libname+set}" = set; then
16871 withval="$with_panel_libname"
16872 with_lib_basename=$withval
16874 with_lib_basename=panel
16876 PANEL_NAME="$with_lib_basename"
16878 case "x$PANEL_NAME" in
16886 echo "$as_me:16886: result: $PANEL_NAME" >&5
16887 echo "${ECHO_T}$PANEL_NAME" >&6
16889 echo "$as_me:16889: checking if you want to check for panel functions" >&5
16890 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16892 # Check whether --enable-panel or --disable-panel was given.
16893 if test "${enable_panel+set}" = set; then
16894 enableval="$enable_panel"
16895 test "$enableval" != no && enableval=yes
16896 if test "$enableval" != "yes" ; then
16899 cf_enable_panel=$cf_default_panel
16903 cf_enable_panel=$cf_default_panel
16906 echo "$as_me:16906: result: $cf_enable_panel" >&5
16907 echo "${ECHO_T}$cf_enable_panel" >&6
16908 if test $cf_enable_panel = yes
16911 cf_have_curses_lib=no
16913 : ${NCURSES_CONFIG_PKG:=none}
16914 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16916 elif test "x${PKG_CONFIG:=none}" != xnone; then
16917 echo "$as_me:16917: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16918 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16919 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16920 echo "$as_me:16920: result: yes" >&5
16921 echo "${ECHO_T}yes" >&6
16923 echo "$as_me:16923: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16924 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16926 cf_save_CFLAGS="$CFLAGS"
16927 cf_save_CPPFLAGS="$CPPFLAGS"
16928 cf_save_LIBS="$LIBS"
16930 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16932 case "x$cf_add_cflags" in
16935 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16938 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
16939 test "$CFLAGS" != "$cf_old_cflag" || break
16941 CFLAGS="$cf_old_cflag"
16944 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16947 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
16948 test "$CPPFLAGS" != "$cf_old_cflag" || break
16950 CPPFLAGS="$cf_old_cflag"
16959 cf_new_extra_cppflags=
16961 for cf_add_cflags in $cf_add_cflags
16963 case "$cf_fix_cppflags" in
16965 case "$cf_add_cflags" in
16966 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16967 case "$cf_add_cflags" in
16969 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16971 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16972 && test -z "${cf_tst_cflags}" \
16973 && cf_fix_cppflags=yes
16975 if test "$cf_fix_cppflags" = yes ; then
16977 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16978 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16981 elif test "${cf_tst_cflags}" = "\"'" ; then
16983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16990 case "$CPPFLAGS" in
16994 case "$cf_add_cflags" in
16996 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16998 CPPFLAGS=`echo "$CPPFLAGS" | \
16999 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17000 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17005 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17006 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17013 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17014 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17021 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17022 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17024 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17026 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17027 && test -z "${cf_tst_cflags}" \
17028 && cf_fix_cppflags=no
17033 if test -n "$cf_new_cflags" ; then
17035 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17036 CFLAGS="${CFLAGS}$cf_new_cflags"
17040 if test -n "$cf_new_cppflags" ; then
17042 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17043 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17047 if test -n "$cf_new_extra_cppflags" ; then
17049 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17050 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17056 cf_add_libs="$LIBS"
17059 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17060 # filter duplicates
17061 for cf_add_1lib in $cf_add_0lib; do
17062 for cf_add_2lib in $cf_add_libs; do
17063 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17068 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17070 LIBS="$cf_add_libs"
17072 cat >"conftest.$ac_ext" <<_ACEOF
17073 #line 17073 "configure"
17074 #include "confdefs.h"
17075 #include <$PANEL_NAME.h>
17079 (void) new_panel ( 0 );
17084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17085 if { (eval echo "$as_me:17085: \"$ac_link\"") >&5
17086 (eval $ac_link) 2>&5
17088 echo "$as_me:17088: \$? = $ac_status" >&5
17089 (exit "$ac_status"); } &&
17090 { ac_try='test -s "conftest$ac_exeext"'
17091 { (eval echo "$as_me:17091: \"$ac_try\"") >&5
17092 (eval $ac_try) 2>&5
17094 echo "$as_me:17094: \$? = $ac_status" >&5
17095 (exit "$ac_status"); }; }; then
17096 if test "$cross_compiling" = yes; then
17097 cf_have_curses_lib=maybe
17099 cat >"conftest.$ac_ext" <<_ACEOF
17100 #line 17100 "configure"
17101 #include "confdefs.h"
17102 #include <$PANEL_NAME.h>
17104 { (void) new_panel ( 0 ); return 0; }
17106 rm -f "conftest$ac_exeext"
17107 if { (eval echo "$as_me:17107: \"$ac_link\"") >&5
17108 (eval $ac_link) 2>&5
17110 echo "$as_me:17110: \$? = $ac_status" >&5
17111 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17112 { (eval echo "$as_me:17112: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17115 echo "$as_me:17115: \$? = $ac_status" >&5
17116 (exit "$ac_status"); }; }; then
17117 cf_have_curses_lib=yes
17119 echo "$as_me: program exited with status $ac_status" >&5
17120 echo "$as_me: failed program was:" >&5
17121 cat "conftest.$ac_ext" >&5
17122 cf_have_curses_lib=no
17124 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17127 echo "$as_me: failed program was:" >&5
17128 cat "conftest.$ac_ext" >&5
17129 cf_have_curses_lib=no
17131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17132 echo "$as_me:17132: result: $cf_have_curses_lib" >&5
17133 echo "${ECHO_T}$cf_have_curses_lib" >&6
17134 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17135 if test "$cf_have_curses_lib" = "yes"
17138 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17140 cat >>confdefs.h <<EOF
17141 #define $cf_upper 1
17145 CFLAGS="$cf_save_CFLAGS"
17146 CPPFLAGS="$cf_save_CPPFLAGS"
17147 LIBS="$cf_save_LIBS"
17151 if test "$cf_have_curses_lib" = no; then
17152 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17153 echo "$as_me:17153: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17154 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17155 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17156 echo $ECHO_N "(cached) $ECHO_C" >&6
17158 ac_check_lib_save_LIBS=$LIBS
17159 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17160 cat >"conftest.$ac_ext" <<_ACEOF
17161 #line 17161 "configure"
17162 #include "confdefs.h"
17164 /* Override any gcc2 internal prototype to avoid an error. */
17168 /* We use char because int might match the return type of a gcc2
17169 builtin and then its argument prototype would still apply. */
17179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17180 if { (eval echo "$as_me:17180: \"$ac_link\"") >&5
17181 (eval $ac_link) 2>&5
17183 echo "$as_me:17183: \$? = $ac_status" >&5
17184 (exit "$ac_status"); } &&
17185 { ac_try='test -s "conftest$ac_exeext"'
17186 { (eval echo "$as_me:17186: \"$ac_try\"") >&5
17187 (eval $ac_try) 2>&5
17189 echo "$as_me:17189: \$? = $ac_status" >&5
17190 (exit "$ac_status"); }; }; then
17191 eval "$as_ac_Lib=yes"
17193 echo "$as_me: failed program was:" >&5
17194 cat "conftest.$ac_ext" >&5
17195 eval "$as_ac_Lib=no"
17197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17198 LIBS=$ac_check_lib_save_LIBS
17200 echo "$as_me:17200: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17201 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17202 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17204 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17206 cf_add_libs="$LIBS"
17209 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17210 # filter duplicates
17211 for cf_add_1lib in $cf_add_0lib; do
17212 for cf_add_2lib in $cf_add_libs; do
17213 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17218 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17220 LIBS="$cf_add_libs"
17222 cat >>confdefs.h <<EOF
17223 #define $cf_upper 1
17230 cf_curses_headers="$cf_curses_headers panel.h"
17233 echo "$as_me:17233: checking if you want to check for menu functions" >&5
17234 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17236 # Check whether --enable-menu or --disable-menu was given.
17237 if test "${enable_menu+set}" = set; then
17238 enableval="$enable_menu"
17239 test "$enableval" != no && enableval=yes
17240 if test "$enableval" != "yes" ; then
17243 cf_enable_menu=$cf_default_menu
17247 cf_enable_menu=$cf_default_menu
17250 echo "$as_me:17250: result: $cf_enable_menu" >&5
17251 echo "${ECHO_T}$cf_enable_menu" >&6
17252 if test $cf_enable_menu = yes
17254 case $cf_cv_screen in
17259 echo "$as_me:17259: checking for NetBSD menu.h" >&5
17260 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17261 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17262 echo $ECHO_N "(cached) $ECHO_C" >&6
17265 cat >"conftest.$ac_ext" <<_ACEOF
17266 #line 17266 "configure"
17267 #include "confdefs.h"
17269 #include <${cf_cv_ncurses_header:-curses.h}>
17277 int y = menu->max_item_width;
17283 rm -f "conftest.$ac_objext"
17284 if { (eval echo "$as_me:17284: \"$ac_compile\"") >&5
17285 (eval $ac_compile) 2>&5
17287 echo "$as_me:17287: \$? = $ac_status" >&5
17288 (exit "$ac_status"); } &&
17289 { ac_try='test -s "conftest.$ac_objext"'
17290 { (eval echo "$as_me:17290: \"$ac_try\"") >&5
17291 (eval $ac_try) 2>&5
17293 echo "$as_me:17293: \$? = $ac_status" >&5
17294 (exit "$ac_status"); }; }; then
17295 cf_cv_netbsd_menu_h=yes
17298 echo "$as_me: failed program was:" >&5
17299 cat "conftest.$ac_ext" >&5
17300 cf_cv_netbsd_menu_h=no
17302 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17305 echo "$as_me:17305: result: $cf_cv_netbsd_menu_h" >&5
17306 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
17308 test "$cf_cv_netbsd_menu_h" = yes &&
17309 cat >>confdefs.h <<\EOF
17310 #define HAVE_NETBSD_MENU_H 1
17316 cf_have_curses_lib=no
17318 : ${NCURSES_CONFIG_PKG:=none}
17319 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17321 elif test "x${PKG_CONFIG:=none}" != xnone; then
17322 echo "$as_me:17322: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
17323 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17324 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
17325 echo "$as_me:17325: result: yes" >&5
17326 echo "${ECHO_T}yes" >&6
17328 echo "$as_me:17328: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
17329 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17331 cf_save_CFLAGS="$CFLAGS"
17332 cf_save_CPPFLAGS="$CPPFLAGS"
17333 cf_save_LIBS="$LIBS"
17335 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
17337 case "x$cf_add_cflags" in
17340 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17343 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17344 test "$CFLAGS" != "$cf_old_cflag" || break
17346 CFLAGS="$cf_old_cflag"
17349 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17352 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17353 test "$CPPFLAGS" != "$cf_old_cflag" || break
17355 CPPFLAGS="$cf_old_cflag"
17364 cf_new_extra_cppflags=
17366 for cf_add_cflags in $cf_add_cflags
17368 case "$cf_fix_cppflags" in
17370 case "$cf_add_cflags" in
17371 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17372 case "$cf_add_cflags" in
17374 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17376 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17377 && test -z "${cf_tst_cflags}" \
17378 && cf_fix_cppflags=yes
17380 if test "$cf_fix_cppflags" = yes ; then
17382 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17383 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17386 elif test "${cf_tst_cflags}" = "\"'" ; then
17388 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17389 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17395 case "$CPPFLAGS" in
17399 case "$cf_add_cflags" in
17401 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17403 CPPFLAGS=`echo "$CPPFLAGS" | \
17404 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17405 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17410 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17411 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17418 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17419 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17426 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17427 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17429 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17431 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17432 && test -z "${cf_tst_cflags}" \
17433 && cf_fix_cppflags=no
17438 if test -n "$cf_new_cflags" ; then
17440 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17441 CFLAGS="${CFLAGS}$cf_new_cflags"
17445 if test -n "$cf_new_cppflags" ; then
17447 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17448 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17452 if test -n "$cf_new_extra_cppflags" ; then
17454 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17455 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17461 cf_add_libs="$LIBS"
17464 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17465 # filter duplicates
17466 for cf_add_1lib in $cf_add_0lib; do
17467 for cf_add_2lib in $cf_add_libs; do
17468 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17473 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17475 LIBS="$cf_add_libs"
17477 cat >"conftest.$ac_ext" <<_ACEOF
17478 #line 17478 "configure"
17479 #include "confdefs.h"
17480 #include <$MENU_NAME.h>
17484 (void) menu_driver ( 0,0 );
17489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17490 if { (eval echo "$as_me:17490: \"$ac_link\"") >&5
17491 (eval $ac_link) 2>&5
17493 echo "$as_me:17493: \$? = $ac_status" >&5
17494 (exit "$ac_status"); } &&
17495 { ac_try='test -s "conftest$ac_exeext"'
17496 { (eval echo "$as_me:17496: \"$ac_try\"") >&5
17497 (eval $ac_try) 2>&5
17499 echo "$as_me:17499: \$? = $ac_status" >&5
17500 (exit "$ac_status"); }; }; then
17501 if test "$cross_compiling" = yes; then
17502 cf_have_curses_lib=maybe
17504 cat >"conftest.$ac_ext" <<_ACEOF
17505 #line 17505 "configure"
17506 #include "confdefs.h"
17507 #include <$MENU_NAME.h>
17509 { (void) menu_driver ( 0,0 ); return 0; }
17511 rm -f "conftest$ac_exeext"
17512 if { (eval echo "$as_me:17512: \"$ac_link\"") >&5
17513 (eval $ac_link) 2>&5
17515 echo "$as_me:17515: \$? = $ac_status" >&5
17516 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17517 { (eval echo "$as_me:17517: \"$ac_try\"") >&5
17518 (eval $ac_try) 2>&5
17520 echo "$as_me:17520: \$? = $ac_status" >&5
17521 (exit "$ac_status"); }; }; then
17522 cf_have_curses_lib=yes
17524 echo "$as_me: program exited with status $ac_status" >&5
17525 echo "$as_me: failed program was:" >&5
17526 cat "conftest.$ac_ext" >&5
17527 cf_have_curses_lib=no
17529 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17532 echo "$as_me: failed program was:" >&5
17533 cat "conftest.$ac_ext" >&5
17534 cf_have_curses_lib=no
17536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17537 echo "$as_me:17537: result: $cf_have_curses_lib" >&5
17538 echo "${ECHO_T}$cf_have_curses_lib" >&6
17539 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17540 if test "$cf_have_curses_lib" = "yes"
17543 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17545 cat >>confdefs.h <<EOF
17546 #define $cf_upper 1
17550 CFLAGS="$cf_save_CFLAGS"
17551 CPPFLAGS="$cf_save_CPPFLAGS"
17552 LIBS="$cf_save_LIBS"
17556 if test "$cf_have_curses_lib" = no; then
17557 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17558 echo "$as_me:17558: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17559 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17560 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17561 echo $ECHO_N "(cached) $ECHO_C" >&6
17563 ac_check_lib_save_LIBS=$LIBS
17564 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17565 cat >"conftest.$ac_ext" <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17569 /* Override any gcc2 internal prototype to avoid an error. */
17573 /* We use char because int might match the return type of a gcc2
17574 builtin and then its argument prototype would still apply. */
17575 char menu_driver ();
17584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17585 if { (eval echo "$as_me:17585: \"$ac_link\"") >&5
17586 (eval $ac_link) 2>&5
17588 echo "$as_me:17588: \$? = $ac_status" >&5
17589 (exit "$ac_status"); } &&
17590 { ac_try='test -s "conftest$ac_exeext"'
17591 { (eval echo "$as_me:17591: \"$ac_try\"") >&5
17592 (eval $ac_try) 2>&5
17594 echo "$as_me:17594: \$? = $ac_status" >&5
17595 (exit "$ac_status"); }; }; then
17596 eval "$as_ac_Lib=yes"
17598 echo "$as_me: failed program was:" >&5
17599 cat "conftest.$ac_ext" >&5
17600 eval "$as_ac_Lib=no"
17602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17603 LIBS=$ac_check_lib_save_LIBS
17605 echo "$as_me:17605: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17606 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17607 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17609 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17611 cf_add_libs="$LIBS"
17614 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17615 # filter duplicates
17616 for cf_add_1lib in $cf_add_0lib; do
17617 for cf_add_2lib in $cf_add_libs; do
17618 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17623 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17625 LIBS="$cf_add_libs"
17627 cat >>confdefs.h <<EOF
17628 #define $cf_upper 1
17635 cf_curses_headers="$cf_curses_headers menu.h"
17638 echo "$as_me:17638: checking if you want to check for form functions" >&5
17639 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17641 # Check whether --enable-form or --disable-form was given.
17642 if test "${enable_form+set}" = set; then
17643 enableval="$enable_form"
17644 test "$enableval" != no && enableval=yes
17645 if test "$enableval" != "yes" ; then
17648 cf_enable_form=$cf_default_form
17652 cf_enable_form=$cf_default_form
17655 echo "$as_me:17655: result: $cf_enable_form" >&5
17656 echo "${ECHO_T}$cf_enable_form" >&6
17657 if test $cf_enable_form = yes
17659 case $cf_cv_screen in
17664 echo "$as_me:17664: checking for NetBSD form.h" >&5
17665 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17666 if test "${cf_cv_netbsd_form_h+set}" = set; then
17667 echo $ECHO_N "(cached) $ECHO_C" >&6
17670 cat >"conftest.$ac_ext" <<_ACEOF
17671 #line 17671 "configure"
17672 #include "confdefs.h"
17674 #include <${cf_cv_ncurses_header:-curses.h}>
17682 int y = current_field(form)->cursor_ypos;
17683 int x = current_field(form)->cursor_xpos;
17689 rm -f "conftest.$ac_objext"
17690 if { (eval echo "$as_me:17690: \"$ac_compile\"") >&5
17691 (eval $ac_compile) 2>&5
17693 echo "$as_me:17693: \$? = $ac_status" >&5
17694 (exit "$ac_status"); } &&
17695 { ac_try='test -s "conftest.$ac_objext"'
17696 { (eval echo "$as_me:17696: \"$ac_try\"") >&5
17697 (eval $ac_try) 2>&5
17699 echo "$as_me:17699: \$? = $ac_status" >&5
17700 (exit "$ac_status"); }; }; then
17701 cf_cv_netbsd_form_h=yes
17704 echo "$as_me: failed program was:" >&5
17705 cat "conftest.$ac_ext" >&5
17706 cf_cv_netbsd_form_h=no
17708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17711 echo "$as_me:17711: result: $cf_cv_netbsd_form_h" >&5
17712 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17714 test "$cf_cv_netbsd_form_h" = yes &&
17715 cat >>confdefs.h <<\EOF
17716 #define HAVE_NETBSD_FORM_H 1
17722 cf_have_curses_lib=no
17724 : ${NCURSES_CONFIG_PKG:=none}
17725 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17727 elif test "x${PKG_CONFIG:=none}" != xnone; then
17728 echo "$as_me:17728: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17729 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17730 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17731 echo "$as_me:17731: result: yes" >&5
17732 echo "${ECHO_T}yes" >&6
17734 echo "$as_me:17734: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17735 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17737 cf_save_CFLAGS="$CFLAGS"
17738 cf_save_CPPFLAGS="$CPPFLAGS"
17739 cf_save_LIBS="$LIBS"
17741 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17743 case "x$cf_add_cflags" in
17746 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17749 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17750 test "$CFLAGS" != "$cf_old_cflag" || break
17752 CFLAGS="$cf_old_cflag"
17755 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17758 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17759 test "$CPPFLAGS" != "$cf_old_cflag" || break
17761 CPPFLAGS="$cf_old_cflag"
17770 cf_new_extra_cppflags=
17772 for cf_add_cflags in $cf_add_cflags
17774 case "$cf_fix_cppflags" in
17776 case "$cf_add_cflags" in
17777 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17778 case "$cf_add_cflags" in
17780 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17782 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17783 && test -z "${cf_tst_cflags}" \
17784 && cf_fix_cppflags=yes
17786 if test "$cf_fix_cppflags" = yes ; then
17788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17792 elif test "${cf_tst_cflags}" = "\"'" ; then
17794 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17795 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17801 case "$CPPFLAGS" in
17805 case "$cf_add_cflags" in
17807 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17809 CPPFLAGS=`echo "$CPPFLAGS" | \
17810 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17811 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17816 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17817 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17824 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17825 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17832 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17833 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17835 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17837 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17838 && test -z "${cf_tst_cflags}" \
17839 && cf_fix_cppflags=no
17844 if test -n "$cf_new_cflags" ; then
17846 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17847 CFLAGS="${CFLAGS}$cf_new_cflags"
17851 if test -n "$cf_new_cppflags" ; then
17853 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17854 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17858 if test -n "$cf_new_extra_cppflags" ; then
17860 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17861 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17867 cf_add_libs="$LIBS"
17870 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17871 # filter duplicates
17872 for cf_add_1lib in $cf_add_0lib; do
17873 for cf_add_2lib in $cf_add_libs; do
17874 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17881 LIBS="$cf_add_libs"
17883 cat >"conftest.$ac_ext" <<_ACEOF
17884 #line 17884 "configure"
17885 #include "confdefs.h"
17886 #include <$FORM_NAME.h>
17890 (void) form_driver ( 0,0 );
17895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17896 if { (eval echo "$as_me:17896: \"$ac_link\"") >&5
17897 (eval $ac_link) 2>&5
17899 echo "$as_me:17899: \$? = $ac_status" >&5
17900 (exit "$ac_status"); } &&
17901 { ac_try='test -s "conftest$ac_exeext"'
17902 { (eval echo "$as_me:17902: \"$ac_try\"") >&5
17903 (eval $ac_try) 2>&5
17905 echo "$as_me:17905: \$? = $ac_status" >&5
17906 (exit "$ac_status"); }; }; then
17907 if test "$cross_compiling" = yes; then
17908 cf_have_curses_lib=maybe
17910 cat >"conftest.$ac_ext" <<_ACEOF
17911 #line 17911 "configure"
17912 #include "confdefs.h"
17913 #include <$FORM_NAME.h>
17915 { (void) form_driver ( 0,0 ); return 0; }
17917 rm -f "conftest$ac_exeext"
17918 if { (eval echo "$as_me:17918: \"$ac_link\"") >&5
17919 (eval $ac_link) 2>&5
17921 echo "$as_me:17921: \$? = $ac_status" >&5
17922 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17923 { (eval echo "$as_me:17923: \"$ac_try\"") >&5
17924 (eval $ac_try) 2>&5
17926 echo "$as_me:17926: \$? = $ac_status" >&5
17927 (exit "$ac_status"); }; }; then
17928 cf_have_curses_lib=yes
17930 echo "$as_me: program exited with status $ac_status" >&5
17931 echo "$as_me: failed program was:" >&5
17932 cat "conftest.$ac_ext" >&5
17933 cf_have_curses_lib=no
17935 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17938 echo "$as_me: failed program was:" >&5
17939 cat "conftest.$ac_ext" >&5
17940 cf_have_curses_lib=no
17942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17943 echo "$as_me:17943: result: $cf_have_curses_lib" >&5
17944 echo "${ECHO_T}$cf_have_curses_lib" >&6
17945 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17946 if test "$cf_have_curses_lib" = "yes"
17949 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17951 cat >>confdefs.h <<EOF
17952 #define $cf_upper 1
17956 CFLAGS="$cf_save_CFLAGS"
17957 CPPFLAGS="$cf_save_CPPFLAGS"
17958 LIBS="$cf_save_LIBS"
17962 if test "$cf_have_curses_lib" = no; then
17963 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17964 echo "$as_me:17964: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17965 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17966 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17967 echo $ECHO_N "(cached) $ECHO_C" >&6
17969 ac_check_lib_save_LIBS=$LIBS
17970 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17971 cat >"conftest.$ac_ext" <<_ACEOF
17972 #line 17972 "configure"
17973 #include "confdefs.h"
17975 /* Override any gcc2 internal prototype to avoid an error. */
17979 /* We use char because int might match the return type of a gcc2
17980 builtin and then its argument prototype would still apply. */
17981 char form_driver ();
17990 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17991 if { (eval echo "$as_me:17991: \"$ac_link\"") >&5
17992 (eval $ac_link) 2>&5
17994 echo "$as_me:17994: \$? = $ac_status" >&5
17995 (exit "$ac_status"); } &&
17996 { ac_try='test -s "conftest$ac_exeext"'
17997 { (eval echo "$as_me:17997: \"$ac_try\"") >&5
17998 (eval $ac_try) 2>&5
18000 echo "$as_me:18000: \$? = $ac_status" >&5
18001 (exit "$ac_status"); }; }; then
18002 eval "$as_ac_Lib=yes"
18004 echo "$as_me: failed program was:" >&5
18005 cat "conftest.$ac_ext" >&5
18006 eval "$as_ac_Lib=no"
18008 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18009 LIBS=$ac_check_lib_save_LIBS
18011 echo "$as_me:18011: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18012 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18013 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18015 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18017 cf_add_libs="$LIBS"
18020 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18021 # filter duplicates
18022 for cf_add_1lib in $cf_add_0lib; do
18023 for cf_add_2lib in $cf_add_libs; do
18024 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18031 LIBS="$cf_add_libs"
18033 cat >>confdefs.h <<EOF
18034 #define $cf_upper 1
18041 cf_curses_headers="$cf_curses_headers form.h"
18044 # look for curses-related headers
18046 for ac_header in $cf_curses_headers
18048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18049 echo "$as_me:18049: checking for $ac_header" >&5
18050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18051 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18052 echo $ECHO_N "(cached) $ECHO_C" >&6
18054 cat >"conftest.$ac_ext" <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18057 #include <$ac_header>
18059 if { (eval echo "$as_me:18059: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18060 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18062 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18064 cat conftest.err >&5
18065 echo "$as_me:18065: \$? = $ac_status" >&5
18066 (exit "$ac_status"); } >/dev/null; then
18067 if test -s conftest.err; then
18068 ac_cpp_err=$ac_c_preproc_warn_flag
18075 if test -z "$ac_cpp_err"; then
18076 eval "$as_ac_Header=yes"
18078 echo "$as_me: failed program was:" >&5
18079 cat "conftest.$ac_ext" >&5
18080 eval "$as_ac_Header=no"
18082 rm -f conftest.err "conftest.$ac_ext"
18084 echo "$as_me:18084: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18085 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18086 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18087 cat >>confdefs.h <<EOF
18088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18094 echo "$as_me:18094: checking for ANSI C header files" >&5
18095 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18096 if test "${ac_cv_header_stdc+set}" = set; then
18097 echo $ECHO_N "(cached) $ECHO_C" >&6
18099 cat >"conftest.$ac_ext" <<_ACEOF
18100 #line 18100 "configure"
18101 #include "confdefs.h"
18102 #include <stdlib.h>
18103 #include <stdarg.h>
18104 #include <string.h>
18108 if { (eval echo "$as_me:18108: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18109 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18111 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18113 cat conftest.err >&5
18114 echo "$as_me:18114: \$? = $ac_status" >&5
18115 (exit "$ac_status"); } >/dev/null; then
18116 if test -s conftest.err; then
18117 ac_cpp_err=$ac_c_preproc_warn_flag
18124 if test -z "$ac_cpp_err"; then
18125 ac_cv_header_stdc=yes
18127 echo "$as_me: failed program was:" >&5
18128 cat "conftest.$ac_ext" >&5
18129 ac_cv_header_stdc=no
18131 rm -f conftest.err "conftest.$ac_ext"
18133 if test $ac_cv_header_stdc = yes; then
18134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18135 cat >"conftest.$ac_ext" <<_ACEOF
18136 #line 18136 "configure"
18137 #include "confdefs.h"
18138 #include <string.h>
18141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18142 $EGREP "memchr" >/dev/null 2>&1; then
18145 ac_cv_header_stdc=no
18151 if test $ac_cv_header_stdc = yes; then
18152 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18153 cat >"conftest.$ac_ext" <<_ACEOF
18154 #line 18154 "configure"
18155 #include "confdefs.h"
18156 #include <stdlib.h>
18159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18160 $EGREP "free" >/dev/null 2>&1; then
18163 ac_cv_header_stdc=no
18169 if test $ac_cv_header_stdc = yes; then
18170 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18171 if test "$cross_compiling" = yes; then
18174 cat >"conftest.$ac_ext" <<_ACEOF
18175 #line 18175 "configure"
18176 #include "confdefs.h"
18178 #if ((' ' & 0x0FF) == 0x020)
18179 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18180 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18182 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18183 || ('j' <= (c) && (c) <= 'r') \
18184 || ('s' <= (c) && (c) <= 'z'))
18185 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18188 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18193 for (i = 0; i < 256; i++)
18194 if (XOR (islower (i), ISLOWER (i))
18195 || toupper (i) != TOUPPER (i))
18196 $ac_main_return(2);
18197 $ac_main_return (0);
18200 rm -f "conftest$ac_exeext"
18201 if { (eval echo "$as_me:18201: \"$ac_link\"") >&5
18202 (eval $ac_link) 2>&5
18204 echo "$as_me:18204: \$? = $ac_status" >&5
18205 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18206 { (eval echo "$as_me:18206: \"$ac_try\"") >&5
18207 (eval $ac_try) 2>&5
18209 echo "$as_me:18209: \$? = $ac_status" >&5
18210 (exit "$ac_status"); }; }; then
18213 echo "$as_me: program exited with status $ac_status" >&5
18214 echo "$as_me: failed program was:" >&5
18215 cat "conftest.$ac_ext" >&5
18216 ac_cv_header_stdc=no
18218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18222 echo "$as_me:18222: result: $ac_cv_header_stdc" >&5
18223 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18224 if test $ac_cv_header_stdc = yes; then
18226 cat >>confdefs.h <<\EOF
18227 #define STDC_HEADERS 1
18232 echo "$as_me:18232: checking whether time.h and sys/time.h may both be included" >&5
18233 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18234 if test "${ac_cv_header_time+set}" = set; then
18235 echo $ECHO_N "(cached) $ECHO_C" >&6
18237 cat >"conftest.$ac_ext" <<_ACEOF
18238 #line 18238 "configure"
18239 #include "confdefs.h"
18240 #include <sys/types.h>
18241 #include <sys/time.h>
18247 if ((struct tm *) 0)
18253 rm -f "conftest.$ac_objext"
18254 if { (eval echo "$as_me:18254: \"$ac_compile\"") >&5
18255 (eval $ac_compile) 2>&5
18257 echo "$as_me:18257: \$? = $ac_status" >&5
18258 (exit "$ac_status"); } &&
18259 { ac_try='test -s "conftest.$ac_objext"'
18260 { (eval echo "$as_me:18260: \"$ac_try\"") >&5
18261 (eval $ac_try) 2>&5
18263 echo "$as_me:18263: \$? = $ac_status" >&5
18264 (exit "$ac_status"); }; }; then
18265 ac_cv_header_time=yes
18267 echo "$as_me: failed program was:" >&5
18268 cat "conftest.$ac_ext" >&5
18269 ac_cv_header_time=no
18271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18273 echo "$as_me:18273: result: $ac_cv_header_time" >&5
18274 echo "${ECHO_T}$ac_cv_header_time" >&6
18275 if test $ac_cv_header_time = yes; then
18277 cat >>confdefs.h <<\EOF
18278 #define TIME_WITH_SYS_TIME 1
18296 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18297 echo "$as_me:18297: checking for $ac_header" >&5
18298 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18300 echo $ECHO_N "(cached) $ECHO_C" >&6
18302 cat >"conftest.$ac_ext" <<_ACEOF
18303 #line 18303 "configure"
18304 #include "confdefs.h"
18305 #include <$ac_header>
18307 if { (eval echo "$as_me:18307: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18308 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18310 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18312 cat conftest.err >&5
18313 echo "$as_me:18313: \$? = $ac_status" >&5
18314 (exit "$ac_status"); } >/dev/null; then
18315 if test -s conftest.err; then
18316 ac_cpp_err=$ac_c_preproc_warn_flag
18323 if test -z "$ac_cpp_err"; then
18324 eval "$as_ac_Header=yes"
18326 echo "$as_me: failed program was:" >&5
18327 cat "conftest.$ac_ext" >&5
18328 eval "$as_ac_Header=no"
18330 rm -f conftest.err "conftest.$ac_ext"
18332 echo "$as_me:18332: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18333 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18334 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18335 cat >>confdefs.h <<EOF
18336 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18342 for ac_header in unistd.h getopt.h
18344 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18345 echo "$as_me:18345: checking for $ac_header" >&5
18346 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18347 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18348 echo $ECHO_N "(cached) $ECHO_C" >&6
18350 cat >"conftest.$ac_ext" <<_ACEOF
18351 #line 18351 "configure"
18352 #include "confdefs.h"
18353 #include <$ac_header>
18355 if { (eval echo "$as_me:18355: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18356 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18358 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18360 cat conftest.err >&5
18361 echo "$as_me:18361: \$? = $ac_status" >&5
18362 (exit "$ac_status"); } >/dev/null; then
18363 if test -s conftest.err; then
18364 ac_cpp_err=$ac_c_preproc_warn_flag
18371 if test -z "$ac_cpp_err"; then
18372 eval "$as_ac_Header=yes"
18374 echo "$as_me: failed program was:" >&5
18375 cat "conftest.$ac_ext" >&5
18376 eval "$as_ac_Header=no"
18378 rm -f conftest.err "conftest.$ac_ext"
18380 echo "$as_me:18380: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18381 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18382 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18383 cat >>confdefs.h <<EOF
18384 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18390 echo "$as_me:18390: checking for header declaring getopt variables" >&5
18391 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18392 if test "${cf_cv_getopt_header+set}" = set; then
18393 echo $ECHO_N "(cached) $ECHO_C" >&6
18396 cf_cv_getopt_header=none
18397 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18399 cat >"conftest.$ac_ext" <<_ACEOF
18400 #line 18400 "configure"
18401 #include "confdefs.h"
18403 #include <$cf_header>
18407 int x = optind; char *y = optarg; (void)x; (void)y
18412 rm -f "conftest.$ac_objext"
18413 if { (eval echo "$as_me:18413: \"$ac_compile\"") >&5
18414 (eval $ac_compile) 2>&5
18416 echo "$as_me:18416: \$? = $ac_status" >&5
18417 (exit "$ac_status"); } &&
18418 { ac_try='test -s "conftest.$ac_objext"'
18419 { (eval echo "$as_me:18419: \"$ac_try\"") >&5
18420 (eval $ac_try) 2>&5
18422 echo "$as_me:18422: \$? = $ac_status" >&5
18423 (exit "$ac_status"); }; }; then
18424 cf_cv_getopt_header=$cf_header
18427 echo "$as_me: failed program was:" >&5
18428 cat "conftest.$ac_ext" >&5
18430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18434 echo "$as_me:18434: result: $cf_cv_getopt_header" >&5
18435 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18436 if test "$cf_cv_getopt_header" != none ; then
18438 cat >>confdefs.h <<\EOF
18439 #define HAVE_GETOPT_HEADER 1
18443 if test "$cf_cv_getopt_header" = getopt.h ; then
18445 cat >>confdefs.h <<\EOF
18446 #define NEED_GETOPT_H 1
18461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18462 echo "$as_me:18462: checking for $ac_func" >&5
18463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18464 if eval "test \"\${$as_ac_var+set}\" = set"; then
18465 echo $ECHO_N "(cached) $ECHO_C" >&6
18467 cat >"conftest.$ac_ext" <<_ACEOF
18468 #line 18468 "configure"
18469 #include "confdefs.h"
18470 #define $ac_func autoconf_temporary
18471 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18478 /* We use char because int might match the return type of a gcc2
18479 builtin and then its argument prototype would still apply. */
18480 char $ac_func (void);
18486 /* The GNU C library defines stubs for functions which it implements
18487 to always fail with ENOSYS. Some functions are actually named
18488 something starting with __ and the normal name is an alias. */
18489 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18490 #error found stub for $ac_func
18493 return $ac_func ();
18498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18499 if { (eval echo "$as_me:18499: \"$ac_link\"") >&5
18500 (eval $ac_link) 2>&5
18502 echo "$as_me:18502: \$? = $ac_status" >&5
18503 (exit "$ac_status"); } &&
18504 { ac_try='test -s "conftest$ac_exeext"'
18505 { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506 (eval $ac_try) 2>&5
18508 echo "$as_me:18508: \$? = $ac_status" >&5
18509 (exit "$ac_status"); }; }; then
18510 eval "$as_ac_var=yes"
18512 echo "$as_me: failed program was:" >&5
18513 cat "conftest.$ac_ext" >&5
18514 eval "$as_ac_var=no"
18516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18518 echo "$as_me:18518: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18519 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18520 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18521 cat >>confdefs.h <<EOF
18522 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18528 # use a compile-check to work with ncurses*-config and subdirectory includes
18529 echo "$as_me:18529: checking if we can use termcap.h" >&5
18530 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18531 if test "${cf_cv_have_termcap_h+set}" = set; then
18532 echo $ECHO_N "(cached) $ECHO_C" >&6
18535 cat >"conftest.$ac_ext" <<_ACEOF
18536 #line 18536 "configure"
18537 #include "confdefs.h"
18539 #include <curses.h>
18540 #ifdef NCURSES_VERSION
18541 #undef NCURSES_VERSION
18543 #include <termcap.h>
18544 #ifndef NCURSES_VERSION
18545 #error wrong header
18556 rm -f "conftest.$ac_objext"
18557 if { (eval echo "$as_me:18557: \"$ac_compile\"") >&5
18558 (eval $ac_compile) 2>&5
18560 echo "$as_me:18560: \$? = $ac_status" >&5
18561 (exit "$ac_status"); } &&
18562 { ac_try='test -s "conftest.$ac_objext"'
18563 { (eval echo "$as_me:18563: \"$ac_try\"") >&5
18564 (eval $ac_try) 2>&5
18566 echo "$as_me:18566: \$? = $ac_status" >&5
18567 (exit "$ac_status"); }; }; then
18568 cf_cv_have_termcap_h=yes
18570 echo "$as_me: failed program was:" >&5
18571 cat "conftest.$ac_ext" >&5
18572 cf_cv_have_termcap_h=no
18574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18576 echo "$as_me:18576: result: $cf_cv_have_termcap_h" >&5
18577 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18578 if test "x$cf_cv_have_termcap_h" = xyes
18581 cat >>confdefs.h <<\EOF
18582 #define HAVE_TERMCAP_H 1
18586 echo "$as_me:18586: checking if we can use ncurses/termcap.h" >&5
18587 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18588 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18589 echo $ECHO_N "(cached) $ECHO_C" >&6
18592 cat >"conftest.$ac_ext" <<_ACEOF
18593 #line 18593 "configure"
18594 #include "confdefs.h"
18596 #include <ncurses/curses.h>
18597 #ifdef NCURSES_VERSION
18598 #undef NCURSES_VERSION
18600 #include <ncurses/termcap.h>
18601 #ifndef NCURSES_VERSION
18602 #error wrong header
18613 rm -f "conftest.$ac_objext"
18614 if { (eval echo "$as_me:18614: \"$ac_compile\"") >&5
18615 (eval $ac_compile) 2>&5
18617 echo "$as_me:18617: \$? = $ac_status" >&5
18618 (exit "$ac_status"); } &&
18619 { ac_try='test -s "conftest.$ac_objext"'
18620 { (eval echo "$as_me:18620: \"$ac_try\"") >&5
18621 (eval $ac_try) 2>&5
18623 echo "$as_me:18623: \$? = $ac_status" >&5
18624 (exit "$ac_status"); }; }; then
18625 cf_cv_have_ncurses_termcap_h=yes
18627 echo "$as_me: failed program was:" >&5
18628 cat "conftest.$ac_ext" >&5
18629 cf_cv_have_ncurses_termcap_h=no
18631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18633 echo "$as_me:18633: result: $cf_cv_have_ncurses_termcap_h" >&5
18634 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18635 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18636 cat >>confdefs.h <<\EOF
18637 #define HAVE_NCURSES_TERMCAP_H 1
18642 if test "x$ac_cv_func_getopt" = xno; then
18643 { { echo "$as_me:18643: error: getopt is required for building programs" >&5
18644 echo "$as_me: error: getopt is required for building programs" >&2;}
18645 { (exit 1); exit 1; }; }
18648 if test "$cf_enable_widec" = yes; then
18661 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18662 echo "$as_me:18662: checking for $ac_func" >&5
18663 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18664 if eval "test \"\${$as_ac_var+set}\" = set"; then
18665 echo $ECHO_N "(cached) $ECHO_C" >&6
18667 cat >"conftest.$ac_ext" <<_ACEOF
18668 #line 18668 "configure"
18669 #include "confdefs.h"
18670 #define $ac_func autoconf_temporary
18671 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18678 /* We use char because int might match the return type of a gcc2
18679 builtin and then its argument prototype would still apply. */
18680 char $ac_func (void);
18686 /* The GNU C library defines stubs for functions which it implements
18687 to always fail with ENOSYS. Some functions are actually named
18688 something starting with __ and the normal name is an alias. */
18689 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18690 #error found stub for $ac_func
18693 return $ac_func ();
18698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18699 if { (eval echo "$as_me:18699: \"$ac_link\"") >&5
18700 (eval $ac_link) 2>&5
18702 echo "$as_me:18702: \$? = $ac_status" >&5
18703 (exit "$ac_status"); } &&
18704 { ac_try='test -s "conftest$ac_exeext"'
18705 { (eval echo "$as_me:18705: \"$ac_try\"") >&5
18706 (eval $ac_try) 2>&5
18708 echo "$as_me:18708: \$? = $ac_status" >&5
18709 (exit "$ac_status"); }; }; then
18710 eval "$as_ac_var=yes"
18712 echo "$as_me: failed program was:" >&5
18713 cat "conftest.$ac_ext" >&5
18714 eval "$as_ac_var=no"
18716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18718 echo "$as_me:18718: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18719 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18720 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18721 cat >>confdefs.h <<EOF
18722 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18730 echo "$as_me:18730: checking definition to turn on extended curses functions" >&5
18731 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18732 if test "${cf_cv_need_xopen_extension+set}" = set; then
18733 echo $ECHO_N "(cached) $ECHO_C" >&6
18736 cf_cv_need_xopen_extension=unknown
18737 cat >"conftest.$ac_ext" <<_ACEOF
18738 #line 18738 "configure"
18739 #include "confdefs.h"
18741 #include <stdlib.h>
18742 #include <${cf_cv_ncurses_header:-curses.h}>
18747 #if defined(NCURSES_VERSION_PATCH)
18748 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18752 #ifdef NCURSES_WIDECHAR
18753 make an error /* prefer to fall-through on the second checks */
18756 int check2 = curs_set((int)sizeof(check));
18757 long x = winnstr(stdscr, "", 0);
18760 getbegyx(stdscr, y1, x1);
18769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18770 if { (eval echo "$as_me:18770: \"$ac_link\"") >&5
18771 (eval $ac_link) 2>&5
18773 echo "$as_me:18773: \$? = $ac_status" >&5
18774 (exit "$ac_status"); } &&
18775 { ac_try='test -s "conftest$ac_exeext"'
18776 { (eval echo "$as_me:18776: \"$ac_try\"") >&5
18777 (eval $ac_try) 2>&5
18779 echo "$as_me:18779: \$? = $ac_status" >&5
18780 (exit "$ac_status"); }; }; then
18781 cf_cv_need_xopen_extension=none
18783 echo "$as_me: failed program was:" >&5
18784 cat "conftest.$ac_ext" >&5
18786 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18788 cat >"conftest.$ac_ext" <<_ACEOF
18789 #line 18789 "configure"
18790 #include "confdefs.h"
18792 #define $cf_try_xopen_extension 1
18793 #include <stdlib.h>
18794 #include <${cf_cv_ncurses_header:-curses.h}>
18800 int check2 = curs_set((int)sizeof(check));
18801 long x = winnstr(stdscr, "", 0);
18803 getbegyx(stdscr, y1, x1);
18813 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18814 if { (eval echo "$as_me:18814: \"$ac_link\"") >&5
18815 (eval $ac_link) 2>&5
18817 echo "$as_me:18817: \$? = $ac_status" >&5
18818 (exit "$ac_status"); } &&
18819 { ac_try='test -s "conftest$ac_exeext"'
18820 { (eval echo "$as_me:18820: \"$ac_try\"") >&5
18821 (eval $ac_try) 2>&5
18823 echo "$as_me:18823: \$? = $ac_status" >&5
18824 (exit "$ac_status"); }; }; then
18825 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18827 echo "$as_me: failed program was:" >&5
18828 cat "conftest.$ac_ext" >&5
18830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18837 echo "$as_me:18837: result: $cf_cv_need_xopen_extension" >&5
18838 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18840 case "$cf_cv_need_xopen_extension" in
18843 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18844 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18849 echo "$as_me:18849: checking for term.h" >&5
18850 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18851 if test "${cf_cv_term_header+set}" = set; then
18852 echo $ECHO_N "(cached) $ECHO_C" >&6
18855 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18856 # for <term.h> if we do not find the variant.
18858 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18860 case "${cf_cv_ncurses_header:-curses.h}" in
18862 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18863 cf_header_list="$cf_header_item $cf_header_list"
18867 for cf_header in $cf_header_list
18869 cat >"conftest.$ac_ext" <<_ACEOF
18870 #line 18870 "configure"
18871 #include "confdefs.h"
18873 #include <${cf_cv_ncurses_header:-curses.h}>
18874 #include <${cf_header}>
18883 rm -f "conftest.$ac_objext"
18884 if { (eval echo "$as_me:18884: \"$ac_compile\"") >&5
18885 (eval $ac_compile) 2>&5
18887 echo "$as_me:18887: \$? = $ac_status" >&5
18888 (exit "$ac_status"); } &&
18889 { ac_try='test -s "conftest.$ac_objext"'
18890 { (eval echo "$as_me:18890: \"$ac_try\"") >&5
18891 (eval $ac_try) 2>&5
18893 echo "$as_me:18893: \$? = $ac_status" >&5
18894 (exit "$ac_status"); }; }; then
18895 cf_cv_term_header=$cf_header
18898 echo "$as_me: failed program was:" >&5
18899 cat "conftest.$ac_ext" >&5
18900 cf_cv_term_header=no
18902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18905 case "$cf_cv_term_header" in
18907 # If curses is ncurses, some packagers still mess it up by trying to make
18908 # us use GNU termcap. This handles the most common case.
18909 for cf_header in ncurses/term.h ncursesw/term.h
18911 cat >"conftest.$ac_ext" <<_ACEOF
18912 #line 18912 "configure"
18913 #include "confdefs.h"
18915 #include <${cf_cv_ncurses_header:-curses.h}>
18916 #ifdef NCURSES_VERSION
18917 #include <${cf_header}>
18929 rm -f "conftest.$ac_objext"
18930 if { (eval echo "$as_me:18930: \"$ac_compile\"") >&5
18931 (eval $ac_compile) 2>&5
18933 echo "$as_me:18933: \$? = $ac_status" >&5
18934 (exit "$ac_status"); } &&
18935 { ac_try='test -s "conftest.$ac_objext"'
18936 { (eval echo "$as_me:18936: \"$ac_try\"") >&5
18937 (eval $ac_try) 2>&5
18939 echo "$as_me:18939: \$? = $ac_status" >&5
18940 (exit "$ac_status"); }; }; then
18941 cf_cv_term_header=$cf_header
18944 echo "$as_me: failed program was:" >&5
18945 cat "conftest.$ac_ext" >&5
18946 cf_cv_term_header=no
18948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18954 echo "$as_me:18954: result: $cf_cv_term_header" >&5
18955 echo "${ECHO_T}$cf_cv_term_header" >&6
18957 case "$cf_cv_term_header" in
18960 cat >>confdefs.h <<\EOF
18961 #define HAVE_TERM_H 1
18967 cat >>confdefs.h <<\EOF
18968 #define HAVE_NCURSES_TERM_H 1
18974 cat >>confdefs.h <<\EOF
18975 #define HAVE_NCURSESW_TERM_H 1
18981 echo "$as_me:18981: checking for unctrl.h" >&5
18982 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18983 if test "${cf_cv_unctrl_header+set}" = set; then
18984 echo $ECHO_N "(cached) $ECHO_C" >&6
18987 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18988 # for <unctrl.h> if we do not find the variant.
18990 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18992 case "${cf_cv_ncurses_header:-curses.h}" in
18994 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18995 cf_header_list="$cf_header_item $cf_header_list"
18999 for cf_header in $cf_header_list
19001 cat >"conftest.$ac_ext" <<_ACEOF
19002 #line 19002 "configure"
19003 #include "confdefs.h"
19005 #include <${cf_cv_ncurses_header:-curses.h}>
19006 #include <${cf_header}>
19015 rm -f "conftest.$ac_objext"
19016 if { (eval echo "$as_me:19016: \"$ac_compile\"") >&5
19017 (eval $ac_compile) 2>&5
19019 echo "$as_me:19019: \$? = $ac_status" >&5
19020 (exit "$ac_status"); } &&
19021 { ac_try='test -s "conftest.$ac_objext"'
19022 { (eval echo "$as_me:19022: \"$ac_try\"") >&5
19023 (eval $ac_try) 2>&5
19025 echo "$as_me:19025: \$? = $ac_status" >&5
19026 (exit "$ac_status"); }; }; then
19027 cf_cv_unctrl_header=$cf_header
19030 echo "$as_me: failed program was:" >&5
19031 cat "conftest.$ac_ext" >&5
19032 cf_cv_unctrl_header=no
19034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19038 echo "$as_me:19038: result: $cf_cv_unctrl_header" >&5
19039 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19041 case "$cf_cv_unctrl_header" in
19043 { echo "$as_me:19043: WARNING: unctrl.h header not found" >&5
19044 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19048 case "$cf_cv_unctrl_header" in
19051 cat >>confdefs.h <<\EOF
19052 #define HAVE_UNCTRL_H 1
19058 cat >>confdefs.h <<\EOF
19059 #define HAVE_NCURSES_UNCTRL_H 1
19063 (ncursesw/unctrl.h)
19065 cat >>confdefs.h <<\EOF
19066 #define HAVE_NCURSESW_UNCTRL_H 1
19074 assume_default_colors \
19092 init_extended_color \
19100 reset_color_pairs \
19117 use_default_colors \
19119 use_extended_names \
19135 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19137 echo "$as_me:19137: checking for ${cf_func}" >&5
19138 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19140 echo "${as_me:-configure}:19140: testing ${cf_func} ..." 1>&5
19142 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19143 echo $ECHO_N "(cached) $ECHO_C" >&6
19146 eval cf_result='$ac_cv_func_'$cf_func
19147 if test ".$cf_result" != ".no"; then
19148 cat >"conftest.$ac_ext" <<_ACEOF
19149 #line 19149 "configure"
19150 #include "confdefs.h"
19152 #ifdef HAVE_XCURSES
19153 #include <xcurses.h>
19154 char * XCursesProgramName = "test";
19156 #include <${cf_cv_ncurses_header:-curses.h}>
19157 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19158 #include <ncursesw/term.h>
19159 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19160 #include <ncurses/term.h>
19161 #elif defined(HAVE_TERM_H)
19171 long foo = (long)(&${cf_func});
19172 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19173 if (foo + 1234L > 5678L)
19174 ${cf_cv_main_return:-return}(foo != 0);
19181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19182 if { (eval echo "$as_me:19182: \"$ac_link\"") >&5
19183 (eval $ac_link) 2>&5
19185 echo "$as_me:19185: \$? = $ac_status" >&5
19186 (exit "$ac_status"); } &&
19187 { ac_try='test -s "conftest$ac_exeext"'
19188 { (eval echo "$as_me:19188: \"$ac_try\"") >&5
19189 (eval $ac_try) 2>&5
19191 echo "$as_me:19191: \$? = $ac_status" >&5
19192 (exit "$ac_status"); }; }; then
19195 echo "$as_me: failed program was:" >&5
19196 cat "conftest.$ac_ext" >&5
19199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19201 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19205 # use the computed/retrieved cache-value:
19206 eval 'cf_result=$cf_cv_func_'$cf_func
19207 echo "$as_me:19207: result: $cf_result" >&5
19208 echo "${ECHO_T}$cf_result" >&6
19209 if test "$cf_result" != no; then
19210 cat >>confdefs.h <<EOF
19211 #define HAVE_${cf_tr_func} 1
19217 for cf_func in tputs
19220 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19222 echo "$as_me:19222: checking for ${cf_func}" >&5
19223 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19225 echo "${as_me:-configure}:19225: testing ${cf_func} ..." 1>&5
19227 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19228 echo $ECHO_N "(cached) $ECHO_C" >&6
19231 eval cf_result='$ac_cv_func_'$cf_func
19232 if test ".$cf_result" != ".no"; then
19233 cat >"conftest.$ac_ext" <<_ACEOF
19234 #line 19234 "configure"
19235 #include "confdefs.h"
19237 #ifdef HAVE_XCURSES
19238 #include <xcurses.h>
19239 char * XCursesProgramName = "test";
19241 #include <${cf_cv_ncurses_header:-curses.h}>
19242 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19243 #include <ncursesw/term.h>
19244 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19245 #include <ncurses/term.h>
19246 #elif defined(HAVE_TERM_H)
19256 long foo = (long)(&${cf_func});
19257 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19258 if (foo + 1234L > 5678L)
19259 ${cf_cv_main_return:-return}(foo != 0);
19266 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19267 if { (eval echo "$as_me:19267: \"$ac_link\"") >&5
19268 (eval $ac_link) 2>&5
19270 echo "$as_me:19270: \$? = $ac_status" >&5
19271 (exit "$ac_status"); } &&
19272 { ac_try='test -s "conftest$ac_exeext"'
19273 { (eval echo "$as_me:19273: \"$ac_try\"") >&5
19274 (eval $ac_try) 2>&5
19276 echo "$as_me:19276: \$? = $ac_status" >&5
19277 (exit "$ac_status"); }; }; then
19280 echo "$as_me: failed program was:" >&5
19281 cat "conftest.$ac_ext" >&5
19284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19286 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19290 # use the computed/retrieved cache-value:
19291 eval 'cf_result=$cf_cv_func_'$cf_func
19292 echo "$as_me:19292: result: $cf_result" >&5
19293 echo "${ECHO_T}$cf_result" >&6
19294 if test "$cf_result" != no; then
19295 cat >>confdefs.h <<EOF
19296 #define HAVE_${cf_tr_func} 1
19302 if test "x$cf_cv_func_tputs" = xyes
19305 for cf_arg in int char
19307 for cf_ret in int void
19309 if test "$cf_ret" = void
19311 cf_return="/* nothing */"
19313 cf_return="return value"
19315 cat >"conftest.$ac_ext" <<_ACEOF
19316 #line 19316 "configure"
19317 #include "confdefs.h"
19319 #include <${cf_cv_ncurses_header:-curses.h}>
19320 #include <$cf_cv_term_header>
19322 static $cf_ret outc($cf_arg value) { $cf_return; }
19328 tputs("hello", 0, outc);
19329 ${cf_cv_main_return:-return}(0);
19335 rm -f "conftest.$ac_objext"
19336 if { (eval echo "$as_me:19336: \"$ac_compile\"") >&5
19337 (eval $ac_compile) 2>&5
19339 echo "$as_me:19339: \$? = $ac_status" >&5
19340 (exit "$ac_status"); } &&
19341 { ac_try='test -s "conftest.$ac_objext"'
19342 { (eval echo "$as_me:19342: \"$ac_try\"") >&5
19343 (eval $ac_try) 2>&5
19345 echo "$as_me:19345: \$? = $ac_status" >&5
19346 (exit "$ac_status"); }; }; then
19348 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19350 echo "${as_me:-configure}:19350: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19352 cat >>confdefs.h <<EOF
19353 #define TPUTS_ARG $cf_arg
19354 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19355 #define TPUTS_RETURN(value) $cf_return
19361 echo "$as_me: failed program was:" >&5
19362 cat "conftest.$ac_ext" >&5
19364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19366 test "$cf_done" = yes && break
19370 echo "$as_me:19370: checking for ncurses extended functions" >&5
19371 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19372 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19373 echo $ECHO_N "(cached) $ECHO_C" >&6
19376 cat >"conftest.$ac_ext" <<_ACEOF
19377 #line 19377 "configure"
19378 #include "confdefs.h"
19380 #include <${cf_cv_ncurses_header:-curses.h}>
19385 int x = NCURSES_EXT_FUNCS
19391 rm -f "conftest.$ac_objext"
19392 if { (eval echo "$as_me:19392: \"$ac_compile\"") >&5
19393 (eval $ac_compile) 2>&5
19395 echo "$as_me:19395: \$? = $ac_status" >&5
19396 (exit "$ac_status"); } &&
19397 { ac_try='test -s "conftest.$ac_objext"'
19398 { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399 (eval $ac_try) 2>&5
19401 echo "$as_me:19401: \$? = $ac_status" >&5
19402 (exit "$ac_status"); }; }; then
19403 cf_cv_ncurses_ext_funcs=defined
19405 echo "$as_me: failed program was:" >&5
19406 cat "conftest.$ac_ext" >&5
19408 cat >"conftest.$ac_ext" <<_ACEOF
19409 #line 19409 "configure"
19410 #include "confdefs.h"
19412 #include <${cf_cv_ncurses_header:-curses.h}>
19417 (void) assume_default_colors (0, 0);
19418 (void) curses_version ();
19419 (void) define_key (0, 0);
19420 (void) is_term_resized (0, 0);
19421 (void) key_defined (0);
19422 (void) keybound (0, 0);
19423 (void) keyok (0, 0);
19424 (void) resize_term (0, 0);
19425 (void) resizeterm (0, 0);
19426 (void) use_default_colors ();
19427 (void) use_extended_names (0);
19428 (void) wresize (0, 0, 0);
19433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19434 if { (eval echo "$as_me:19434: \"$ac_link\"") >&5
19435 (eval $ac_link) 2>&5
19437 echo "$as_me:19437: \$? = $ac_status" >&5
19438 (exit "$ac_status"); } &&
19439 { ac_try='test -s "conftest$ac_exeext"'
19440 { (eval echo "$as_me:19440: \"$ac_try\"") >&5
19441 (eval $ac_try) 2>&5
19443 echo "$as_me:19443: \$? = $ac_status" >&5
19444 (exit "$ac_status"); }; }; then
19445 cf_cv_ncurses_ext_funcs=yes
19447 echo "$as_me: failed program was:" >&5
19448 cat "conftest.$ac_ext" >&5
19449 cf_cv_ncurses_ext_funcs=no
19451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19457 echo "$as_me:19457: result: $cf_cv_ncurses_ext_funcs" >&5
19458 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19459 test "$cf_cv_ncurses_ext_funcs" = yes &&
19460 cat >>confdefs.h <<\EOF
19461 #define NCURSES_EXT_FUNCS 1
19464 if test "$cf_enable_widec" = yes
19466 # workaround for systems with ncurses before 20111029, due to change of
19467 # feature test macro from _XPG5 to _XOPEN_SOURCE
19468 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19471 echo "$as_me:19471: checking if _XPG5 should be defined to enable wide-characters" >&5
19472 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19474 cat >"conftest.$ac_ext" <<_ACEOF
19475 #line 19475 "configure"
19476 #include "confdefs.h"
19478 #include <${cf_cv_ncurses_header:-curses.h}>
19487 rm -f "conftest.$ac_objext"
19488 if { (eval echo "$as_me:19488: \"$ac_compile\"") >&5
19489 (eval $ac_compile) 2>&5
19491 echo "$as_me:19491: \$? = $ac_status" >&5
19492 (exit "$ac_status"); } &&
19493 { ac_try='test -s "conftest.$ac_objext"'
19494 { (eval echo "$as_me:19494: \"$ac_try\"") >&5
19495 (eval $ac_try) 2>&5
19497 echo "$as_me:19497: \$? = $ac_status" >&5
19498 (exit "$ac_status"); }; }; then
19501 echo "$as_me: failed program was:" >&5
19502 cat "conftest.$ac_ext" >&5
19503 cf_save_cppflags="$CPPFLAGS"
19504 CPPFLAGS="$CPPFLAGS -D_XPG5"
19505 cat >"conftest.$ac_ext" <<_ACEOF
19506 #line 19506 "configure"
19507 #include "confdefs.h"
19509 #include <${cf_cv_ncurses_header:-curses.h}>
19518 rm -f "conftest.$ac_objext"
19519 if { (eval echo "$as_me:19519: \"$ac_compile\"") >&5
19520 (eval $ac_compile) 2>&5
19522 echo "$as_me:19522: \$? = $ac_status" >&5
19523 (exit "$ac_status"); } &&
19524 { ac_try='test -s "conftest.$ac_objext"'
19525 { (eval echo "$as_me:19525: \"$ac_try\"") >&5
19526 (eval $ac_try) 2>&5
19528 echo "$as_me:19528: \$? = $ac_status" >&5
19529 (exit "$ac_status"); }; }; then
19532 echo "$as_me: failed program was:" >&5
19533 cat "conftest.$ac_ext" >&5
19535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19536 CPPFLAGS="$cf_save_cppflags"
19538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19539 echo "$as_me:19539: result: $cf_define_xpg5" >&5
19540 echo "${ECHO_T}$cf_define_xpg5" >&6
19542 if test "$cf_define_xpg5" = yes
19544 CPPFLAGS="$CPPFLAGS -D_XPG5"
19548 echo "$as_me:19548: checking for wide-character functions" >&5
19549 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19550 if test "${cf_cv_widechar_funcs+set}" = set; then
19551 echo $ECHO_N "(cached) $ECHO_C" >&6
19554 cat >"conftest.$ac_ext" <<_ACEOF
19555 #line 19555 "configure"
19556 #include "confdefs.h"
19558 #include <${cf_cv_ncurses_header:-curses.h}>
19563 static wchar_t src_wchar[2];
19564 static cchar_t dst_cchar;
19565 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19572 if { (eval echo "$as_me:19572: \"$ac_link\"") >&5
19573 (eval $ac_link) 2>&5
19575 echo "$as_me:19575: \$? = $ac_status" >&5
19576 (exit "$ac_status"); } &&
19577 { ac_try='test -s "conftest$ac_exeext"'
19578 { (eval echo "$as_me:19578: \"$ac_try\"") >&5
19579 (eval $ac_try) 2>&5
19581 echo "$as_me:19581: \$? = $ac_status" >&5
19582 (exit "$ac_status"); }; }; then
19583 cf_cv_widechar_funcs=yes
19585 echo "$as_me: failed program was:" >&5
19586 cat "conftest.$ac_ext" >&5
19587 cf_cv_widechar_funcs=no
19589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19592 echo "$as_me:19592: result: $cf_cv_widechar_funcs" >&5
19593 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19594 if test "$cf_cv_widechar_funcs" != no ; then
19596 cat >>confdefs.h <<\EOF
19597 #define USE_WIDEC_SUPPORT 1
19601 cat >>confdefs.h <<\EOF
19602 #define USE_WIDEC_SUPPORT 0
19607 cat >>confdefs.h <<\EOF
19608 #define USE_WIDEC_SUPPORT 0
19613 echo "$as_me:19613: checking if $cf_cv_screen library uses pthreads" >&5
19614 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19615 if test "${cf_cv_use_pthreads+set}" = set; then
19616 echo $ECHO_N "(cached) $ECHO_C" >&6
19619 cat >"conftest.$ac_ext" <<_ACEOF
19620 #line 19620 "configure"
19621 #include "confdefs.h"
19623 #include <${cf_cv_ncurses_header:-curses.h}>
19624 extern void _nc_init_pthreads(void);
19631 _nc_init_pthreads();
19637 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19638 if { (eval echo "$as_me:19638: \"$ac_link\"") >&5
19639 (eval $ac_link) 2>&5
19641 echo "$as_me:19641: \$? = $ac_status" >&5
19642 (exit "$ac_status"); } &&
19643 { ac_try='test -s "conftest$ac_exeext"'
19644 { (eval echo "$as_me:19644: \"$ac_try\"") >&5
19645 (eval $ac_try) 2>&5
19647 echo "$as_me:19647: \$? = $ac_status" >&5
19648 (exit "$ac_status"); }; }; then
19649 cf_cv_use_pthreads=yes
19651 echo "$as_me: failed program was:" >&5
19652 cat "conftest.$ac_ext" >&5
19653 cf_cv_use_pthreads=no
19655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19658 echo "$as_me:19658: result: $cf_cv_use_pthreads" >&5
19659 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19660 test $cf_cv_use_pthreads = yes &&
19661 cat >>confdefs.h <<\EOF
19662 #define USE_PTHREADS 1
19665 echo "$as_me:19665: checking if sys/time.h works with sys/select.h" >&5
19666 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19667 if test "${cf_cv_sys_time_select+set}" = set; then
19668 echo $ECHO_N "(cached) $ECHO_C" >&6
19671 cat >"conftest.$ac_ext" <<_ACEOF
19672 #line 19672 "configure"
19673 #include "confdefs.h"
19675 #include <sys/types.h>
19676 #ifdef HAVE_SYS_TIME_H
19677 #include <sys/time.h>
19679 #ifdef HAVE_SYS_SELECT_H
19680 #include <sys/select.h>
19691 rm -f "conftest.$ac_objext"
19692 if { (eval echo "$as_me:19692: \"$ac_compile\"") >&5
19693 (eval $ac_compile) 2>&5
19695 echo "$as_me:19695: \$? = $ac_status" >&5
19696 (exit "$ac_status"); } &&
19697 { ac_try='test -s "conftest.$ac_objext"'
19698 { (eval echo "$as_me:19698: \"$ac_try\"") >&5
19699 (eval $ac_try) 2>&5
19701 echo "$as_me:19701: \$? = $ac_status" >&5
19702 (exit "$ac_status"); }; }; then
19703 cf_cv_sys_time_select=yes
19705 echo "$as_me: failed program was:" >&5
19706 cat "conftest.$ac_ext" >&5
19707 cf_cv_sys_time_select=no
19709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19713 echo "$as_me:19713: result: $cf_cv_sys_time_select" >&5
19714 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19715 test "$cf_cv_sys_time_select" = yes &&
19716 cat >>confdefs.h <<\EOF
19717 #define HAVE_SYS_TIME_SELECT 1
19720 # special check for test/ditto.c
19722 echo "$as_me:19722: checking for openpty in -lutil" >&5
19723 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19724 if test "${ac_cv_lib_util_openpty+set}" = set; then
19725 echo $ECHO_N "(cached) $ECHO_C" >&6
19727 ac_check_lib_save_LIBS=$LIBS
19728 LIBS="-lutil $LIBS"
19729 cat >"conftest.$ac_ext" <<_ACEOF
19730 #line 19730 "configure"
19731 #include "confdefs.h"
19733 /* Override any gcc2 internal prototype to avoid an error. */
19737 /* We use char because int might match the return type of a gcc2
19738 builtin and then its argument prototype would still apply. */
19748 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19749 if { (eval echo "$as_me:19749: \"$ac_link\"") >&5
19750 (eval $ac_link) 2>&5
19752 echo "$as_me:19752: \$? = $ac_status" >&5
19753 (exit "$ac_status"); } &&
19754 { ac_try='test -s "conftest$ac_exeext"'
19755 { (eval echo "$as_me:19755: \"$ac_try\"") >&5
19756 (eval $ac_try) 2>&5
19758 echo "$as_me:19758: \$? = $ac_status" >&5
19759 (exit "$ac_status"); }; }; then
19760 ac_cv_lib_util_openpty=yes
19762 echo "$as_me: failed program was:" >&5
19763 cat "conftest.$ac_ext" >&5
19764 ac_cv_lib_util_openpty=no
19766 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19767 LIBS=$ac_check_lib_save_LIBS
19769 echo "$as_me:19769: result: $ac_cv_lib_util_openpty" >&5
19770 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19771 if test "$ac_cv_lib_util_openpty" = yes; then
19777 echo "$as_me:19777: checking for openpty header" >&5
19778 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19779 if test "${cf_cv_func_openpty+set}" = set; then
19780 echo $ECHO_N "(cached) $ECHO_C" >&6
19783 cf_save_LIBS="$LIBS"
19784 test "$cf_cv_lib_util" = yes && {
19785 cf_add_libs="$LIBS"
19788 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19789 # filter duplicates
19790 for cf_add_1lib in $cf_add_0lib; do
19791 for cf_add_2lib in $cf_add_libs; do
19792 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19797 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19799 LIBS="$cf_add_libs"
19801 for cf_header in pty.h libutil.h util.h
19803 cat >"conftest.$ac_ext" <<_ACEOF
19804 #line 19804 "configure"
19805 #include "confdefs.h"
19807 #include <$cf_header>
19813 int x = openpty((int *)0, (int *)0, (char *)0,
19814 (struct termios *)0, (struct winsize *)0);
19820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19821 if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822 (eval $ac_link) 2>&5
19824 echo "$as_me:19824: \$? = $ac_status" >&5
19825 (exit "$ac_status"); } &&
19826 { ac_try='test -s "conftest$ac_exeext"'
19827 { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828 (eval $ac_try) 2>&5
19830 echo "$as_me:19830: \$? = $ac_status" >&5
19831 (exit "$ac_status"); }; }; then
19833 cf_cv_func_openpty=$cf_header
19837 echo "$as_me: failed program was:" >&5
19838 cat "conftest.$ac_ext" >&5
19840 cf_cv_func_openpty=no
19843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19845 LIBS="$cf_save_LIBS"
19848 echo "$as_me:19848: result: $cf_cv_func_openpty" >&5
19849 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19851 if test "$cf_cv_func_openpty" != no ; then
19853 cat >>confdefs.h <<EOF
19854 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19857 cat >>confdefs.h <<\EOF
19858 #define USE_XTERM_PTY 1
19861 if test "x$cf_cv_lib_util" = xyes ; then
19863 cf_add_libs="$TEST_LIBS"
19866 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19867 # filter duplicates
19868 for cf_add_1lib in $cf_add_0lib; do
19869 for cf_add_2lib in $cf_add_libs; do
19870 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19875 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19877 TEST_LIBS="$cf_add_libs"
19882 echo "$as_me:19882: checking for function curses_version" >&5
19883 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19884 if test "${cf_cv_func_curses_version+set}" = set; then
19885 echo $ECHO_N "(cached) $ECHO_C" >&6
19888 if test "$cross_compiling" = yes; then
19889 cf_cv_func_curses_version=unknown
19891 cat >"conftest.$ac_ext" <<_ACEOF
19892 #line 19892 "configure"
19893 #include "confdefs.h"
19895 $ac_includes_default
19897 #include <${cf_cv_ncurses_header:-curses.h}>
19902 sprintf(temp, "%.999s\\n", curses_version());
19903 ${cf_cv_main_return:-return}(0);
19907 rm -f "conftest$ac_exeext"
19908 if { (eval echo "$as_me:19908: \"$ac_link\"") >&5
19909 (eval $ac_link) 2>&5
19911 echo "$as_me:19911: \$? = $ac_status" >&5
19912 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19913 { (eval echo "$as_me:19913: \"$ac_try\"") >&5
19914 (eval $ac_try) 2>&5
19916 echo "$as_me:19916: \$? = $ac_status" >&5
19917 (exit "$ac_status"); }; }; then
19918 cf_cv_func_curses_version=yes
19921 echo "$as_me: program exited with status $ac_status" >&5
19922 echo "$as_me: failed program was:" >&5
19923 cat "conftest.$ac_ext" >&5
19924 cf_cv_func_curses_version=no
19927 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19931 echo "$as_me:19931: result: $cf_cv_func_curses_version" >&5
19932 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19933 test "$cf_cv_func_curses_version" = yes &&
19934 cat >>confdefs.h <<\EOF
19935 #define HAVE_CURSES_VERSION 1
19938 echo "$as_me:19938: checking for alternate character set array" >&5
19939 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19940 if test "${cf_cv_curses_acs_map+set}" = set; then
19941 echo $ECHO_N "(cached) $ECHO_C" >&6
19944 cf_cv_curses_acs_map=unknown
19945 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19947 cat >"conftest.$ac_ext" <<_ACEOF
19948 #line 19948 "configure"
19949 #include "confdefs.h"
19951 #include <${cf_cv_ncurses_header:-curses.h}>
19957 ${name}['k'] = ACS_PLUS
19963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19964 if { (eval echo "$as_me:19964: \"$ac_link\"") >&5
19965 (eval $ac_link) 2>&5
19967 echo "$as_me:19967: \$? = $ac_status" >&5
19968 (exit "$ac_status"); } &&
19969 { ac_try='test -s "conftest$ac_exeext"'
19970 { (eval echo "$as_me:19970: \"$ac_try\"") >&5
19971 (eval $ac_try) 2>&5
19973 echo "$as_me:19973: \$? = $ac_status" >&5
19974 (exit "$ac_status"); }; }; then
19975 cf_cv_curses_acs_map=$name; break
19977 echo "$as_me: failed program was:" >&5
19978 cat "conftest.$ac_ext" >&5
19980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19984 echo "$as_me:19984: result: $cf_cv_curses_acs_map" >&5
19985 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19987 test "$cf_cv_curses_acs_map" != unknown &&
19988 cat >>confdefs.h <<EOF
19989 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19992 if test "$cf_enable_widec" = yes; then
19994 echo "$as_me:19994: checking for wide alternate character set array" >&5
19995 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19996 if test "${cf_cv_curses_wacs_map+set}" = set; then
19997 echo $ECHO_N "(cached) $ECHO_C" >&6
20000 cf_cv_curses_wacs_map=unknown
20001 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
20003 cat >"conftest.$ac_ext" <<_ACEOF
20004 #line 20004 "configure"
20005 #include "confdefs.h"
20007 #ifndef _XOPEN_SOURCE_EXTENDED
20008 #define _XOPEN_SOURCE_EXTENDED
20010 #include <${cf_cv_ncurses_header:-curses.h}>
20014 void *foo = &(${name}['k']); (void)foo
20019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20020 if { (eval echo "$as_me:20020: \"$ac_link\"") >&5
20021 (eval $ac_link) 2>&5
20023 echo "$as_me:20023: \$? = $ac_status" >&5
20024 (exit "$ac_status"); } &&
20025 { ac_try='test -s "conftest$ac_exeext"'
20026 { (eval echo "$as_me:20026: \"$ac_try\"") >&5
20027 (eval $ac_try) 2>&5
20029 echo "$as_me:20029: \$? = $ac_status" >&5
20030 (exit "$ac_status"); }; }; then
20031 cf_cv_curses_wacs_map=$name
20034 echo "$as_me: failed program was:" >&5
20035 cat "conftest.$ac_ext" >&5
20037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20040 echo "$as_me:20040: result: $cf_cv_curses_wacs_map" >&5
20041 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20043 test "$cf_cv_curses_wacs_map" != unknown &&
20044 cat >>confdefs.h <<EOF
20045 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20048 echo "$as_me:20048: checking for wide alternate character constants" >&5
20049 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20050 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20051 echo $ECHO_N "(cached) $ECHO_C" >&6
20054 cf_cv_curses_wacs_symbols=no
20055 if test "$cf_cv_curses_wacs_map" != unknown
20057 cat >"conftest.$ac_ext" <<_ACEOF
20058 #line 20058 "configure"
20059 #include "confdefs.h"
20061 #ifndef _XOPEN_SOURCE_EXTENDED
20062 #define _XOPEN_SOURCE_EXTENDED
20064 #include <${cf_cv_ncurses_header:-curses.h}>
20068 cchar_t *foo = WACS_PLUS;
20069 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076 (eval $ac_link) 2>&5
20078 echo "$as_me:20078: \$? = $ac_status" >&5
20079 (exit "$ac_status"); } &&
20080 { ac_try='test -s "conftest$ac_exeext"'
20081 { (eval echo "$as_me:20081: \"$ac_try\"") >&5
20082 (eval $ac_try) 2>&5
20084 echo "$as_me:20084: \$? = $ac_status" >&5
20085 (exit "$ac_status"); }; }; then
20086 cf_cv_curses_wacs_symbols=yes
20088 echo "$as_me: failed program was:" >&5
20089 cat "conftest.$ac_ext" >&5
20091 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20093 cat >"conftest.$ac_ext" <<_ACEOF
20094 #line 20094 "configure"
20095 #include "confdefs.h"
20097 #ifndef _XOPEN_SOURCE_EXTENDED
20098 #define _XOPEN_SOURCE_EXTENDED
20100 #include <${cf_cv_ncurses_header:-curses.h}>
20104 cchar_t *foo = WACS_PLUS; (void)foo
20109 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20110 if { (eval echo "$as_me:20110: \"$ac_link\"") >&5
20111 (eval $ac_link) 2>&5
20113 echo "$as_me:20113: \$? = $ac_status" >&5
20114 (exit "$ac_status"); } &&
20115 { ac_try='test -s "conftest$ac_exeext"'
20116 { (eval echo "$as_me:20116: \"$ac_try\"") >&5
20117 (eval $ac_try) 2>&5
20119 echo "$as_me:20119: \$? = $ac_status" >&5
20120 (exit "$ac_status"); }; }; then
20121 cf_cv_curses_wacs_symbols=yes
20123 echo "$as_me: failed program was:" >&5
20124 cat "conftest.$ac_ext" >&5
20126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20130 echo "$as_me:20130: result: $cf_cv_curses_wacs_symbols" >&5
20131 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20133 test "$cf_cv_curses_wacs_symbols" != no &&
20134 cat >>confdefs.h <<\EOF
20135 #define CURSES_WACS_SYMBOLS 1
20140 echo "$as_me:20140: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20141 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20142 cat >"conftest.$ac_ext" <<_ACEOF
20143 #line 20143 "configure"
20144 #include "confdefs.h"
20146 #ifndef _XOPEN_SOURCE_EXTENDED
20147 #define _XOPEN_SOURCE_EXTENDED
20149 #include <${cf_cv_ncurses_header:-curses.h}>
20160 rm -f "conftest.$ac_objext"
20161 if { (eval echo "$as_me:20161: \"$ac_compile\"") >&5
20162 (eval $ac_compile) 2>&5
20164 echo "$as_me:20164: \$? = $ac_status" >&5
20165 (exit "$ac_status"); } &&
20166 { ac_try='test -s "conftest.$ac_objext"'
20167 { (eval echo "$as_me:20167: \"$ac_try\"") >&5
20168 (eval $ac_try) 2>&5
20170 echo "$as_me:20170: \$? = $ac_status" >&5
20171 (exit "$ac_status"); }; }; then
20174 echo "$as_me: failed program was:" >&5
20175 cat "conftest.$ac_ext" >&5
20178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20179 echo "$as_me:20179: result: $cf_result" >&5
20180 echo "${ECHO_T}$cf_result" >&6
20181 if test "$cf_result" = yes ; then
20183 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20185 cat >>confdefs.h <<EOF
20186 #define $cf_result 1
20191 cat >>confdefs.h <<EOF
20192 #define attr_t long
20197 if test "$cf_enable_widec" = yes; then
20199 # This is needed on Tru64 5.0 to declare mbstate_t
20200 echo "$as_me:20200: checking if we must include wchar.h to declare mbstate_t" >&5
20201 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20202 if test "${cf_cv_mbstate_t+set}" = set; then
20203 echo $ECHO_N "(cached) $ECHO_C" >&6
20206 cat >"conftest.$ac_ext" <<_ACEOF
20207 #line 20207 "configure"
20208 #include "confdefs.h"
20210 #include <stdlib.h>
20211 #include <stdarg.h>
20213 #ifdef HAVE_LIBUTF8_H
20214 #include <libutf8.h>
20224 rm -f "conftest.$ac_objext"
20225 if { (eval echo "$as_me:20225: \"$ac_compile\"") >&5
20226 (eval $ac_compile) 2>&5
20228 echo "$as_me:20228: \$? = $ac_status" >&5
20229 (exit "$ac_status"); } &&
20230 { ac_try='test -s "conftest.$ac_objext"'
20231 { (eval echo "$as_me:20231: \"$ac_try\"") >&5
20232 (eval $ac_try) 2>&5
20234 echo "$as_me:20234: \$? = $ac_status" >&5
20235 (exit "$ac_status"); }; }; then
20238 echo "$as_me: failed program was:" >&5
20239 cat "conftest.$ac_ext" >&5
20240 cat >"conftest.$ac_ext" <<_ACEOF
20241 #line 20241 "configure"
20242 #include "confdefs.h"
20244 #include <stdlib.h>
20245 #include <stdarg.h>
20248 #ifdef HAVE_LIBUTF8_H
20249 #include <libutf8.h>
20259 rm -f "conftest.$ac_objext"
20260 if { (eval echo "$as_me:20260: \"$ac_compile\"") >&5
20261 (eval $ac_compile) 2>&5
20263 echo "$as_me:20263: \$? = $ac_status" >&5
20264 (exit "$ac_status"); } &&
20265 { ac_try='test -s "conftest.$ac_objext"'
20266 { (eval echo "$as_me:20266: \"$ac_try\"") >&5
20267 (eval $ac_try) 2>&5
20269 echo "$as_me:20269: \$? = $ac_status" >&5
20270 (exit "$ac_status"); }; }; then
20271 cf_cv_mbstate_t=yes
20273 echo "$as_me: failed program was:" >&5
20274 cat "conftest.$ac_ext" >&5
20275 cf_cv_mbstate_t=unknown
20277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20281 echo "$as_me:20281: result: $cf_cv_mbstate_t" >&5
20282 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20284 if test "$cf_cv_mbstate_t" = yes ; then
20286 cat >>confdefs.h <<\EOF
20287 #define NEED_WCHAR_H 1
20293 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20294 if test "$cf_cv_mbstate_t" = unknown ; then
20295 NCURSES_MBSTATE_T=1
20298 # if we find mbstate_t in either place, use substitution to provide a fallback.
20299 if test "$cf_cv_mbstate_t" != unknown ; then
20300 NCURSES_OK_MBSTATE_T=1
20303 # This is needed on Tru64 5.0 to declare wchar_t
20304 echo "$as_me:20304: checking if we must include wchar.h to declare wchar_t" >&5
20305 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20306 if test "${cf_cv_wchar_t+set}" = set; then
20307 echo $ECHO_N "(cached) $ECHO_C" >&6
20310 cat >"conftest.$ac_ext" <<_ACEOF
20311 #line 20311 "configure"
20312 #include "confdefs.h"
20314 #include <stdlib.h>
20315 #include <stdarg.h>
20317 #ifdef HAVE_LIBUTF8_H
20318 #include <libutf8.h>
20328 rm -f "conftest.$ac_objext"
20329 if { (eval echo "$as_me:20329: \"$ac_compile\"") >&5
20330 (eval $ac_compile) 2>&5
20332 echo "$as_me:20332: \$? = $ac_status" >&5
20333 (exit "$ac_status"); } &&
20334 { ac_try='test -s "conftest.$ac_objext"'
20335 { (eval echo "$as_me:20335: \"$ac_try\"") >&5
20336 (eval $ac_try) 2>&5
20338 echo "$as_me:20338: \$? = $ac_status" >&5
20339 (exit "$ac_status"); }; }; then
20342 echo "$as_me: failed program was:" >&5
20343 cat "conftest.$ac_ext" >&5
20344 cat >"conftest.$ac_ext" <<_ACEOF
20345 #line 20345 "configure"
20346 #include "confdefs.h"
20348 #include <stdlib.h>
20349 #include <stdarg.h>
20352 #ifdef HAVE_LIBUTF8_H
20353 #include <libutf8.h>
20363 rm -f "conftest.$ac_objext"
20364 if { (eval echo "$as_me:20364: \"$ac_compile\"") >&5
20365 (eval $ac_compile) 2>&5
20367 echo "$as_me:20367: \$? = $ac_status" >&5
20368 (exit "$ac_status"); } &&
20369 { ac_try='test -s "conftest.$ac_objext"'
20370 { (eval echo "$as_me:20370: \"$ac_try\"") >&5
20371 (eval $ac_try) 2>&5
20373 echo "$as_me:20373: \$? = $ac_status" >&5
20374 (exit "$ac_status"); }; }; then
20377 echo "$as_me: failed program was:" >&5
20378 cat "conftest.$ac_ext" >&5
20379 cf_cv_wchar_t=unknown
20381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20385 echo "$as_me:20385: result: $cf_cv_wchar_t" >&5
20386 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20388 if test "$cf_cv_wchar_t" = yes ; then
20390 cat >>confdefs.h <<\EOF
20391 #define NEED_WCHAR_H 1
20397 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20398 if test "$cf_cv_wchar_t" = unknown ; then
20402 # if we find wchar_t in either place, use substitution to provide a fallback.
20403 if test "$cf_cv_wchar_t" != unknown ; then
20404 NCURSES_OK_WCHAR_T=1
20407 # This is needed on Tru64 5.0 to declare wint_t
20408 echo "$as_me:20408: checking if we must include wchar.h to declare wint_t" >&5
20409 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20410 if test "${cf_cv_wint_t+set}" = set; then
20411 echo $ECHO_N "(cached) $ECHO_C" >&6
20414 cat >"conftest.$ac_ext" <<_ACEOF
20415 #line 20415 "configure"
20416 #include "confdefs.h"
20418 #include <stdlib.h>
20419 #include <stdarg.h>
20421 #ifdef HAVE_LIBUTF8_H
20422 #include <libutf8.h>
20432 rm -f "conftest.$ac_objext"
20433 if { (eval echo "$as_me:20433: \"$ac_compile\"") >&5
20434 (eval $ac_compile) 2>&5
20436 echo "$as_me:20436: \$? = $ac_status" >&5
20437 (exit "$ac_status"); } &&
20438 { ac_try='test -s "conftest.$ac_objext"'
20439 { (eval echo "$as_me:20439: \"$ac_try\"") >&5
20440 (eval $ac_try) 2>&5
20442 echo "$as_me:20442: \$? = $ac_status" >&5
20443 (exit "$ac_status"); }; }; then
20446 echo "$as_me: failed program was:" >&5
20447 cat "conftest.$ac_ext" >&5
20448 cat >"conftest.$ac_ext" <<_ACEOF
20449 #line 20449 "configure"
20450 #include "confdefs.h"
20452 #include <stdlib.h>
20453 #include <stdarg.h>
20456 #ifdef HAVE_LIBUTF8_H
20457 #include <libutf8.h>
20467 rm -f "conftest.$ac_objext"
20468 if { (eval echo "$as_me:20468: \"$ac_compile\"") >&5
20469 (eval $ac_compile) 2>&5
20471 echo "$as_me:20471: \$? = $ac_status" >&5
20472 (exit "$ac_status"); } &&
20473 { ac_try='test -s "conftest.$ac_objext"'
20474 { (eval echo "$as_me:20474: \"$ac_try\"") >&5
20475 (eval $ac_try) 2>&5
20477 echo "$as_me:20477: \$? = $ac_status" >&5
20478 (exit "$ac_status"); }; }; then
20481 echo "$as_me: failed program was:" >&5
20482 cat "conftest.$ac_ext" >&5
20483 cf_cv_wint_t=unknown
20485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20489 echo "$as_me:20489: result: $cf_cv_wint_t" >&5
20490 echo "${ECHO_T}$cf_cv_wint_t" >&6
20492 if test "$cf_cv_wint_t" = yes ; then
20494 cat >>confdefs.h <<\EOF
20495 #define NEED_WCHAR_H 1
20501 # if we do not find wint_t in either place, use substitution to provide a fallback.
20502 if test "$cf_cv_wint_t" = unknown ; then
20506 # if we find wint_t in either place, use substitution to provide a fallback.
20507 if test "$cf_cv_wint_t" != unknown ; then
20508 NCURSES_OK_WINT_T=1
20511 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20513 echo "$as_me:20513: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20514 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20515 cat >"conftest.$ac_ext" <<_ACEOF
20516 #line 20516 "configure"
20517 #include "confdefs.h"
20519 #ifndef _XOPEN_SOURCE_EXTENDED
20520 #define _XOPEN_SOURCE_EXTENDED
20522 #include <${cf_cv_ncurses_header:-curses.h}>
20533 rm -f "conftest.$ac_objext"
20534 if { (eval echo "$as_me:20534: \"$ac_compile\"") >&5
20535 (eval $ac_compile) 2>&5
20537 echo "$as_me:20537: \$? = $ac_status" >&5
20538 (exit "$ac_status"); } &&
20539 { ac_try='test -s "conftest.$ac_objext"'
20540 { (eval echo "$as_me:20540: \"$ac_try\"") >&5
20541 (eval $ac_try) 2>&5
20543 echo "$as_me:20543: \$? = $ac_status" >&5
20544 (exit "$ac_status"); }; }; then
20547 echo "$as_me: failed program was:" >&5
20548 cat "conftest.$ac_ext" >&5
20551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20552 echo "$as_me:20552: result: $cf_result" >&5
20553 echo "${ECHO_T}$cf_result" >&6
20554 if test "$cf_result" = yes ; then
20556 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20558 cat >>confdefs.h <<EOF
20559 #define $cf_result 1
20564 cat >>confdefs.h <<EOF
20565 #define mbstate_t long
20572 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20574 echo "$as_me:20574: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20575 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20576 cat >"conftest.$ac_ext" <<_ACEOF
20577 #line 20577 "configure"
20578 #include "confdefs.h"
20580 #ifndef _XOPEN_SOURCE_EXTENDED
20581 #define _XOPEN_SOURCE_EXTENDED
20583 #include <${cf_cv_ncurses_header:-curses.h}>
20594 rm -f "conftest.$ac_objext"
20595 if { (eval echo "$as_me:20595: \"$ac_compile\"") >&5
20596 (eval $ac_compile) 2>&5
20598 echo "$as_me:20598: \$? = $ac_status" >&5
20599 (exit "$ac_status"); } &&
20600 { ac_try='test -s "conftest.$ac_objext"'
20601 { (eval echo "$as_me:20601: \"$ac_try\"") >&5
20602 (eval $ac_try) 2>&5
20604 echo "$as_me:20604: \$? = $ac_status" >&5
20605 (exit "$ac_status"); }; }; then
20608 echo "$as_me: failed program was:" >&5
20609 cat "conftest.$ac_ext" >&5
20612 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20613 echo "$as_me:20613: result: $cf_result" >&5
20614 echo "${ECHO_T}$cf_result" >&6
20615 if test "$cf_result" = yes ; then
20617 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20619 cat >>confdefs.h <<EOF
20620 #define $cf_result 1
20625 cat >>confdefs.h <<EOF
20626 #define wchar_t long
20633 if test "$NCURSES_OK_WINT_T" = 0 ; then
20635 echo "$as_me:20635: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20636 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20637 cat >"conftest.$ac_ext" <<_ACEOF
20638 #line 20638 "configure"
20639 #include "confdefs.h"
20641 #ifndef _XOPEN_SOURCE_EXTENDED
20642 #define _XOPEN_SOURCE_EXTENDED
20644 #include <${cf_cv_ncurses_header:-curses.h}>
20655 rm -f "conftest.$ac_objext"
20656 if { (eval echo "$as_me:20656: \"$ac_compile\"") >&5
20657 (eval $ac_compile) 2>&5
20659 echo "$as_me:20659: \$? = $ac_status" >&5
20660 (exit "$ac_status"); } &&
20661 { ac_try='test -s "conftest.$ac_objext"'
20662 { (eval echo "$as_me:20662: \"$ac_try\"") >&5
20663 (eval $ac_try) 2>&5
20665 echo "$as_me:20665: \$? = $ac_status" >&5
20666 (exit "$ac_status"); }; }; then
20669 echo "$as_me: failed program was:" >&5
20670 cat "conftest.$ac_ext" >&5
20673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20674 echo "$as_me:20674: result: $cf_result" >&5
20675 echo "${ECHO_T}$cf_result" >&6
20676 if test "$cf_result" = yes ; then
20678 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20680 cat >>confdefs.h <<EOF
20681 #define $cf_result 1
20686 cat >>confdefs.h <<EOF
20687 #define wint_t long
20703 echo "$as_me:20703: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20704 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20706 cat >"conftest.$ac_ext" <<_ACEOF
20707 #line 20707 "configure"
20708 #include "confdefs.h"
20710 #ifdef HAVE_XCURSES
20711 #include <xcurses.h>
20712 char * XCursesProgramName = "test";
20714 #include <${cf_cv_ncurses_header:-curses.h}>
20715 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20716 #include <ncursesw/term.h>
20717 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20718 #include <ncurses/term.h>
20719 #elif defined(HAVE_TERM_H)
20728 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20729 const void *foo = (const void *)($cf_data);
20731 const void *foo = &($cf_data);
20733 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20739 rm -f "conftest.$ac_objext"
20740 if { (eval echo "$as_me:20740: \"$ac_compile\"") >&5
20741 (eval $ac_compile) 2>&5
20743 echo "$as_me:20743: \$? = $ac_status" >&5
20744 (exit "$ac_status"); } &&
20745 { ac_try='test -s "conftest.$ac_objext"'
20746 { (eval echo "$as_me:20746: \"$ac_try\"") >&5
20747 (eval $ac_try) 2>&5
20749 echo "$as_me:20749: \$? = $ac_status" >&5
20750 (exit "$ac_status"); }; }; then
20754 echo "$as_me: failed program was:" >&5
20755 cat "conftest.$ac_ext" >&5
20758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20759 echo "$as_me:20759: result: $cf_result" >&5
20760 echo "${ECHO_T}$cf_result" >&6
20762 if test "$cf_result" = yes ; then
20764 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20766 cat >>confdefs.h <<EOF
20767 #define $cf_result 1
20771 echo "$as_me:20771: checking for data $cf_data in library" >&5
20772 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20773 # BSD linkers insist on making weak linkage, but resolve at runtime.
20774 if test "$cross_compiling" = yes; then
20777 cat >"conftest.$ac_ext" <<_ACEOF
20778 #line 20778 "configure"
20779 #include "confdefs.h"
20781 #ifdef HAVE_XCURSES
20782 #include <xcurses.h>
20783 char * XCursesProgramName = "test";
20785 #include <${cf_cv_ncurses_header:-curses.h}>
20786 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20787 #include <ncursesw/term.h>
20788 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20789 #include <ncurses/term.h>
20790 #elif defined(HAVE_TERM_H)
20795 extern char $cf_data;
20802 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20803 const void *foo = (const void *)($cf_data);
20805 const void *foo = &($cf_data);
20807 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20809 ${cf_cv_main_return:-return}(foo == 0);
20816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20817 if { (eval echo "$as_me:20817: \"$ac_link\"") >&5
20818 (eval $ac_link) 2>&5
20820 echo "$as_me:20820: \$? = $ac_status" >&5
20821 (exit "$ac_status"); } &&
20822 { ac_try='test -s "conftest$ac_exeext"'
20823 { (eval echo "$as_me:20823: \"$ac_try\"") >&5
20824 (eval $ac_try) 2>&5
20826 echo "$as_me:20826: \$? = $ac_status" >&5
20827 (exit "$ac_status"); }; }; then
20830 echo "$as_me: failed program was:" >&5
20831 cat "conftest.$ac_ext" >&5
20834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20837 cat >"conftest.$ac_ext" <<_ACEOF
20838 #line 20838 "configure"
20839 #include "confdefs.h"
20841 #ifdef HAVE_XCURSES
20842 #include <xcurses.h>
20843 char * XCursesProgramName = "test";
20845 #include <${cf_cv_ncurses_header:-curses.h}>
20846 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20847 #include <ncursesw/term.h>
20848 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20849 #include <ncurses/term.h>
20850 #elif defined(HAVE_TERM_H)
20855 extern char $cf_data;
20859 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20860 const void *foo = (const void *)($cf_data);
20862 const void *foo = &($cf_data);
20864 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20866 ${cf_cv_main_return:-return}(foo == 0);
20869 rm -f "conftest$ac_exeext"
20870 if { (eval echo "$as_me:20870: \"$ac_link\"") >&5
20871 (eval $ac_link) 2>&5
20873 echo "$as_me:20873: \$? = $ac_status" >&5
20874 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20875 { (eval echo "$as_me:20875: \"$ac_try\"") >&5
20876 (eval $ac_try) 2>&5
20878 echo "$as_me:20878: \$? = $ac_status" >&5
20879 (exit "$ac_status"); }; }; then
20883 echo "$as_me: program exited with status $ac_status" >&5
20884 echo "$as_me: failed program was:" >&5
20885 cat "conftest.$ac_ext" >&5
20888 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20890 echo "$as_me:20890: result: $cf_result" >&5
20891 echo "${ECHO_T}$cf_result" >&6
20892 if test "$cf_result" = yes ; then
20894 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20896 cat >>confdefs.h <<EOF
20897 #define $cf_result 1
20900 # do not exit loop here, since we prefer system's declarations
20905 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20907 echo "$as_me:20907: checking for X" >&5
20908 echo $ECHO_N "checking for X... $ECHO_C" >&6
20910 # Check whether --with-x or --without-x was given.
20911 if test "${with_x+set}" = set; then
20915 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20916 if test "x$with_x" = xno; then
20917 # The user explicitly disabled X.
20920 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20921 # Both variables are already set.
20924 if test "${ac_cv_have_x+set}" = set; then
20925 echo $ECHO_N "(cached) $ECHO_C" >&6
20927 # One or both of the vars are not set, and there is no cached value.
20928 ac_x_includes=no ac_x_libraries=no
20929 rm -fr conftest.dir
20930 if mkdir conftest.dir; then
20932 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20933 cat >Imakefile <<'EOF'
20935 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20937 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20938 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20939 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20940 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20941 for ac_extension in a so sl dylib dll; do
20942 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20943 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20944 ac_im_usrlibdir=$ac_im_libdir; break
20947 # Screen out bogus values from the imake configuration. They are
20948 # bogus both because they are the default anyway, and because
20949 # using them would break gcc on systems where it needs fixed includes.
20950 case $ac_im_incroot in
20952 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20954 case $ac_im_usrlibdir in
20955 /usr/lib | /lib) ;;
20956 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20960 rm -fr conftest.dir
20963 # Standard set of common directories for X headers.
20964 # Check X11 before X11Rn because it is often a symlink to the current release.
20981 /usr/local/X11/include
20982 /usr/local/X11R7/include
20983 /usr/local/X11R6/include
20984 /usr/local/X11R5/include
20985 /usr/local/X11R4/include
20987 /usr/local/include/X11
20988 /usr/local/include/X11R7
20989 /usr/local/include/X11R6
20990 /usr/local/include/X11R5
20991 /usr/local/include/X11R4
20995 /usr/XFree86/include/X11
20999 /usr/unsupported/include
21000 /usr/athena/include
21001 /usr/local/x11r5/include
21002 /usr/lpp/Xamples/include
21004 /usr/openwin/include
21005 /usr/openwin/share/include'
21007 if test "$ac_x_includes" = no; then
21008 # Guess where to find include files, by looking for Intrinsic.h.
21009 # First, try using that file with no special directory specified.
21010 cat >"conftest.$ac_ext" <<_ACEOF
21011 #line 21011 "configure"
21012 #include "confdefs.h"
21013 #include <X11/Intrinsic.h>
21015 if { (eval echo "$as_me:21015: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21016 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21018 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21020 cat conftest.err >&5
21021 echo "$as_me:21021: \$? = $ac_status" >&5
21022 (exit "$ac_status"); } >/dev/null; then
21023 if test -s conftest.err; then
21024 ac_cpp_err=$ac_c_preproc_warn_flag
21031 if test -z "$ac_cpp_err"; then
21032 # We can compile using X headers with no special include directory.
21035 echo "$as_me: failed program was:" >&5
21036 cat "conftest.$ac_ext" >&5
21037 for ac_dir in $ac_x_header_dirs; do
21038 if test -r "$ac_dir/X11/Intrinsic.h"; then
21039 ac_x_includes=$ac_dir
21044 rm -f conftest.err "conftest.$ac_ext"
21045 fi # $ac_x_includes = no
21047 if test "$ac_x_libraries" = no; then
21048 # Check for the libraries.
21049 # See if we find them without any special options.
21050 # Don't add to $LIBS permanently.
21053 cat >"conftest.$ac_ext" <<_ACEOF
21054 #line 21054 "configure"
21055 #include "confdefs.h"
21056 #include <X11/Intrinsic.h>
21065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21066 if { (eval echo "$as_me:21066: \"$ac_link\"") >&5
21067 (eval $ac_link) 2>&5
21069 echo "$as_me:21069: \$? = $ac_status" >&5
21070 (exit "$ac_status"); } &&
21071 { ac_try='test -s "conftest$ac_exeext"'
21072 { (eval echo "$as_me:21072: \"$ac_try\"") >&5
21073 (eval $ac_try) 2>&5
21075 echo "$as_me:21075: \$? = $ac_status" >&5
21076 (exit "$ac_status"); }; }; then
21078 # We can link X programs with no special library path.
21081 echo "$as_me: failed program was:" >&5
21082 cat "conftest.$ac_ext" >&5
21084 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
21086 # Don't even attempt the hair of trying to link an X program!
21087 for ac_extension in a so sl dylib dll; do
21088 if test -r "$ac_dir/libXt.$ac_extension"; then
21089 ac_x_libraries=$ac_dir
21095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21096 fi # $ac_x_libraries = no
21098 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21099 # Didn't find X anywhere. Cache the known absence of X.
21100 ac_cv_have_x="have_x=no"
21102 # Record where we found X for the cache.
21103 ac_cv_have_x="have_x=yes \
21104 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21109 eval "$ac_cv_have_x"
21112 if test "$have_x" != yes; then
21113 echo "$as_me:21113: result: $have_x" >&5
21114 echo "${ECHO_T}$have_x" >&6
21117 # If each of the values was on the command line, it overrides each guess.
21118 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21119 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21120 # Update the cache value to reflect the command line values.
21121 ac_cv_have_x="have_x=yes \
21122 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21123 echo "$as_me:21123: result: libraries $x_libraries, headers $x_includes" >&5
21124 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21127 if test "$no_x" = yes; then
21128 # Not all programs may use this symbol, but it does not hurt to define it.
21130 cat >>confdefs.h <<\EOF
21131 #define X_DISPLAY_MISSING 1
21139 if test -n "$x_includes"; then
21140 X_CFLAGS="$X_CFLAGS -I$x_includes"
21143 # It would also be nice to do this for all -L options, not just this one.
21144 if test -n "$x_libraries"; then
21145 X_LIBS="$X_LIBS -L$x_libraries"
21146 # For Solaris; some versions of Sun CC require a space after -R and
21147 # others require no space. Words are not sufficient . . . .
21148 case `(uname -sr) 2>/dev/null` in
21150 echo "$as_me:21150: checking whether -R must be followed by a space" >&5
21151 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21152 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21153 cat >"conftest.$ac_ext" <<_ACEOF
21154 #line 21154 "configure"
21155 #include "confdefs.h"
21165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21166 if { (eval echo "$as_me:21166: \"$ac_link\"") >&5
21167 (eval $ac_link) 2>&5
21169 echo "$as_me:21169: \$? = $ac_status" >&5
21170 (exit "$ac_status"); } &&
21171 { ac_try='test -s "conftest$ac_exeext"'
21172 { (eval echo "$as_me:21172: \"$ac_try\"") >&5
21173 (eval $ac_try) 2>&5
21175 echo "$as_me:21175: \$? = $ac_status" >&5
21176 (exit "$ac_status"); }; }; then
21179 echo "$as_me: failed program was:" >&5
21180 cat "conftest.$ac_ext" >&5
21183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21184 if test $ac_R_nospace = yes; then
21185 echo "$as_me:21185: result: no" >&5
21186 echo "${ECHO_T}no" >&6
21187 X_LIBS="$X_LIBS -R$x_libraries"
21189 LIBS="$ac_xsave_LIBS -R $x_libraries"
21190 cat >"conftest.$ac_ext" <<_ACEOF
21191 #line 21191 "configure"
21192 #include "confdefs.h"
21202 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21203 if { (eval echo "$as_me:21203: \"$ac_link\"") >&5
21204 (eval $ac_link) 2>&5
21206 echo "$as_me:21206: \$? = $ac_status" >&5
21207 (exit "$ac_status"); } &&
21208 { ac_try='test -s "conftest$ac_exeext"'
21209 { (eval echo "$as_me:21209: \"$ac_try\"") >&5
21210 (eval $ac_try) 2>&5
21212 echo "$as_me:21212: \$? = $ac_status" >&5
21213 (exit "$ac_status"); }; }; then
21216 echo "$as_me: failed program was:" >&5
21217 cat "conftest.$ac_ext" >&5
21220 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21221 if test $ac_R_space = yes; then
21222 echo "$as_me:21222: result: yes" >&5
21223 echo "${ECHO_T}yes" >&6
21224 X_LIBS="$X_LIBS -R $x_libraries"
21226 echo "$as_me:21226: result: neither works" >&5
21227 echo "${ECHO_T}neither works" >&6
21230 LIBS=$ac_xsave_LIBS
21234 # Check for system-dependent libraries X programs must link with.
21235 # Do this before checking for the system-independent R6 libraries
21236 # (-lICE), since we may need -lsocket or whatever for X linking.
21238 if test "$ISC" = yes; then
21239 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21241 # Martyn Johnson says this is needed for Ultrix, if the X
21242 # libraries were built with DECnet support. And Karl Berry says
21243 # the Alpha needs dnet_stub (dnet does not exist).
21244 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21245 cat >"conftest.$ac_ext" <<_ACEOF
21246 #line 21246 "configure"
21247 #include "confdefs.h"
21249 /* Override any gcc2 internal prototype to avoid an error. */
21253 /* We use char because int might match the return type of a gcc2
21254 builtin and then its argument prototype would still apply. */
21255 char XOpenDisplay ();
21264 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21265 if { (eval echo "$as_me:21265: \"$ac_link\"") >&5
21266 (eval $ac_link) 2>&5
21268 echo "$as_me:21268: \$? = $ac_status" >&5
21269 (exit "$ac_status"); } &&
21270 { ac_try='test -s "conftest$ac_exeext"'
21271 { (eval echo "$as_me:21271: \"$ac_try\"") >&5
21272 (eval $ac_try) 2>&5
21274 echo "$as_me:21274: \$? = $ac_status" >&5
21275 (exit "$ac_status"); }; }; then
21278 echo "$as_me: failed program was:" >&5
21279 cat "conftest.$ac_ext" >&5
21280 echo "$as_me:21280: checking for dnet_ntoa in -ldnet" >&5
21281 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21282 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21283 echo $ECHO_N "(cached) $ECHO_C" >&6
21285 ac_check_lib_save_LIBS=$LIBS
21286 LIBS="-ldnet $LIBS"
21287 cat >"conftest.$ac_ext" <<_ACEOF
21288 #line 21288 "configure"
21289 #include "confdefs.h"
21291 /* Override any gcc2 internal prototype to avoid an error. */
21295 /* We use char because int might match the return type of a gcc2
21296 builtin and then its argument prototype would still apply. */
21306 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21307 if { (eval echo "$as_me:21307: \"$ac_link\"") >&5
21308 (eval $ac_link) 2>&5
21310 echo "$as_me:21310: \$? = $ac_status" >&5
21311 (exit "$ac_status"); } &&
21312 { ac_try='test -s "conftest$ac_exeext"'
21313 { (eval echo "$as_me:21313: \"$ac_try\"") >&5
21314 (eval $ac_try) 2>&5
21316 echo "$as_me:21316: \$? = $ac_status" >&5
21317 (exit "$ac_status"); }; }; then
21318 ac_cv_lib_dnet_dnet_ntoa=yes
21320 echo "$as_me: failed program was:" >&5
21321 cat "conftest.$ac_ext" >&5
21322 ac_cv_lib_dnet_dnet_ntoa=no
21324 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21325 LIBS=$ac_check_lib_save_LIBS
21327 echo "$as_me:21327: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21328 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21329 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21330 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21333 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21334 echo "$as_me:21334: checking for dnet_ntoa in -ldnet_stub" >&5
21335 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21336 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21337 echo $ECHO_N "(cached) $ECHO_C" >&6
21339 ac_check_lib_save_LIBS=$LIBS
21340 LIBS="-ldnet_stub $LIBS"
21341 cat >"conftest.$ac_ext" <<_ACEOF
21342 #line 21342 "configure"
21343 #include "confdefs.h"
21345 /* Override any gcc2 internal prototype to avoid an error. */
21349 /* We use char because int might match the return type of a gcc2
21350 builtin and then its argument prototype would still apply. */
21360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21361 if { (eval echo "$as_me:21361: \"$ac_link\"") >&5
21362 (eval $ac_link) 2>&5
21364 echo "$as_me:21364: \$? = $ac_status" >&5
21365 (exit "$ac_status"); } &&
21366 { ac_try='test -s "conftest$ac_exeext"'
21367 { (eval echo "$as_me:21367: \"$ac_try\"") >&5
21368 (eval $ac_try) 2>&5
21370 echo "$as_me:21370: \$? = $ac_status" >&5
21371 (exit "$ac_status"); }; }; then
21372 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21374 echo "$as_me: failed program was:" >&5
21375 cat "conftest.$ac_ext" >&5
21376 ac_cv_lib_dnet_stub_dnet_ntoa=no
21378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21379 LIBS=$ac_check_lib_save_LIBS
21381 echo "$as_me:21381: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21382 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21383 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21384 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21389 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21390 LIBS="$ac_xsave_LIBS"
21392 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21393 # to get the SysV transport functions.
21394 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21396 # The nsl library prevents programs from opening the X display
21397 # on Irix 5.2, according to T.E. Dickey.
21398 # The functions gethostbyname, getservbyname, and inet_addr are
21399 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21400 echo "$as_me:21400: checking for gethostbyname" >&5
21401 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21402 if test "${ac_cv_func_gethostbyname+set}" = set; then
21403 echo $ECHO_N "(cached) $ECHO_C" >&6
21405 cat >"conftest.$ac_ext" <<_ACEOF
21406 #line 21406 "configure"
21407 #include "confdefs.h"
21408 #define gethostbyname autoconf_temporary
21409 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21410 #undef gethostbyname
21416 /* We use char because int might match the return type of a gcc2
21417 builtin and then its argument prototype would still apply. */
21418 char gethostbyname (void);
21424 /* The GNU C library defines stubs for functions which it implements
21425 to always fail with ENOSYS. Some functions are actually named
21426 something starting with __ and the normal name is an alias. */
21427 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21428 #error found stub for gethostbyname
21431 return gethostbyname ();
21436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21437 if { (eval echo "$as_me:21437: \"$ac_link\"") >&5
21438 (eval $ac_link) 2>&5
21440 echo "$as_me:21440: \$? = $ac_status" >&5
21441 (exit "$ac_status"); } &&
21442 { ac_try='test -s "conftest$ac_exeext"'
21443 { (eval echo "$as_me:21443: \"$ac_try\"") >&5
21444 (eval $ac_try) 2>&5
21446 echo "$as_me:21446: \$? = $ac_status" >&5
21447 (exit "$ac_status"); }; }; then
21448 ac_cv_func_gethostbyname=yes
21450 echo "$as_me: failed program was:" >&5
21451 cat "conftest.$ac_ext" >&5
21452 ac_cv_func_gethostbyname=no
21454 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21456 echo "$as_me:21456: result: $ac_cv_func_gethostbyname" >&5
21457 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21459 if test $ac_cv_func_gethostbyname = no; then
21460 echo "$as_me:21460: checking for gethostbyname in -lnsl" >&5
21461 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21462 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21463 echo $ECHO_N "(cached) $ECHO_C" >&6
21465 ac_check_lib_save_LIBS=$LIBS
21467 cat >"conftest.$ac_ext" <<_ACEOF
21468 #line 21468 "configure"
21469 #include "confdefs.h"
21471 /* Override any gcc2 internal prototype to avoid an error. */
21475 /* We use char because int might match the return type of a gcc2
21476 builtin and then its argument prototype would still apply. */
21477 char gethostbyname ();
21486 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21487 if { (eval echo "$as_me:21487: \"$ac_link\"") >&5
21488 (eval $ac_link) 2>&5
21490 echo "$as_me:21490: \$? = $ac_status" >&5
21491 (exit "$ac_status"); } &&
21492 { ac_try='test -s "conftest$ac_exeext"'
21493 { (eval echo "$as_me:21493: \"$ac_try\"") >&5
21494 (eval $ac_try) 2>&5
21496 echo "$as_me:21496: \$? = $ac_status" >&5
21497 (exit "$ac_status"); }; }; then
21498 ac_cv_lib_nsl_gethostbyname=yes
21500 echo "$as_me: failed program was:" >&5
21501 cat "conftest.$ac_ext" >&5
21502 ac_cv_lib_nsl_gethostbyname=no
21504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21505 LIBS=$ac_check_lib_save_LIBS
21507 echo "$as_me:21507: result: $ac_cv_lib_nsl_gethostbyname" >&5
21508 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21509 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21510 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21513 if test $ac_cv_lib_nsl_gethostbyname = no; then
21514 echo "$as_me:21514: checking for gethostbyname in -lbsd" >&5
21515 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21516 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21517 echo $ECHO_N "(cached) $ECHO_C" >&6
21519 ac_check_lib_save_LIBS=$LIBS
21521 cat >"conftest.$ac_ext" <<_ACEOF
21522 #line 21522 "configure"
21523 #include "confdefs.h"
21525 /* Override any gcc2 internal prototype to avoid an error. */
21529 /* We use char because int might match the return type of a gcc2
21530 builtin and then its argument prototype would still apply. */
21531 char gethostbyname ();
21540 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21541 if { (eval echo "$as_me:21541: \"$ac_link\"") >&5
21542 (eval $ac_link) 2>&5
21544 echo "$as_me:21544: \$? = $ac_status" >&5
21545 (exit "$ac_status"); } &&
21546 { ac_try='test -s "conftest$ac_exeext"'
21547 { (eval echo "$as_me:21547: \"$ac_try\"") >&5
21548 (eval $ac_try) 2>&5
21550 echo "$as_me:21550: \$? = $ac_status" >&5
21551 (exit "$ac_status"); }; }; then
21552 ac_cv_lib_bsd_gethostbyname=yes
21554 echo "$as_me: failed program was:" >&5
21555 cat "conftest.$ac_ext" >&5
21556 ac_cv_lib_bsd_gethostbyname=no
21558 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21559 LIBS=$ac_check_lib_save_LIBS
21561 echo "$as_me:21561: result: $ac_cv_lib_bsd_gethostbyname" >&5
21562 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21563 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21564 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21570 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21571 # socket/setsockopt and other routines are undefined under SCO ODT
21572 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21573 # on later versions), says Simon Leinen: it contains gethostby*
21574 # variants that don't use the nameserver (or something). -lsocket
21575 # must be given before -lnsl if both are needed. We assume that
21576 # if connect needs -lnsl, so does gethostbyname.
21577 echo "$as_me:21577: checking for connect" >&5
21578 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21579 if test "${ac_cv_func_connect+set}" = set; then
21580 echo $ECHO_N "(cached) $ECHO_C" >&6
21582 cat >"conftest.$ac_ext" <<_ACEOF
21583 #line 21583 "configure"
21584 #include "confdefs.h"
21585 #define connect autoconf_temporary
21586 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21593 /* We use char because int might match the return type of a gcc2
21594 builtin and then its argument prototype would still apply. */
21595 char connect (void);
21601 /* The GNU C library defines stubs for functions which it implements
21602 to always fail with ENOSYS. Some functions are actually named
21603 something starting with __ and the normal name is an alias. */
21604 #if defined (__stub_connect) || defined (__stub___connect)
21605 #error found stub for connect
21613 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21614 if { (eval echo "$as_me:21614: \"$ac_link\"") >&5
21615 (eval $ac_link) 2>&5
21617 echo "$as_me:21617: \$? = $ac_status" >&5
21618 (exit "$ac_status"); } &&
21619 { ac_try='test -s "conftest$ac_exeext"'
21620 { (eval echo "$as_me:21620: \"$ac_try\"") >&5
21621 (eval $ac_try) 2>&5
21623 echo "$as_me:21623: \$? = $ac_status" >&5
21624 (exit "$ac_status"); }; }; then
21625 ac_cv_func_connect=yes
21627 echo "$as_me: failed program was:" >&5
21628 cat "conftest.$ac_ext" >&5
21629 ac_cv_func_connect=no
21631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21633 echo "$as_me:21633: result: $ac_cv_func_connect" >&5
21634 echo "${ECHO_T}$ac_cv_func_connect" >&6
21636 if test $ac_cv_func_connect = no; then
21637 echo "$as_me:21637: checking for connect in -lsocket" >&5
21638 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21639 if test "${ac_cv_lib_socket_connect+set}" = set; then
21640 echo $ECHO_N "(cached) $ECHO_C" >&6
21642 ac_check_lib_save_LIBS=$LIBS
21643 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21644 cat >"conftest.$ac_ext" <<_ACEOF
21645 #line 21645 "configure"
21646 #include "confdefs.h"
21648 /* Override any gcc2 internal prototype to avoid an error. */
21652 /* We use char because int might match the return type of a gcc2
21653 builtin and then its argument prototype would still apply. */
21663 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21664 if { (eval echo "$as_me:21664: \"$ac_link\"") >&5
21665 (eval $ac_link) 2>&5
21667 echo "$as_me:21667: \$? = $ac_status" >&5
21668 (exit "$ac_status"); } &&
21669 { ac_try='test -s "conftest$ac_exeext"'
21670 { (eval echo "$as_me:21670: \"$ac_try\"") >&5
21671 (eval $ac_try) 2>&5
21673 echo "$as_me:21673: \$? = $ac_status" >&5
21674 (exit "$ac_status"); }; }; then
21675 ac_cv_lib_socket_connect=yes
21677 echo "$as_me: failed program was:" >&5
21678 cat "conftest.$ac_ext" >&5
21679 ac_cv_lib_socket_connect=no
21681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21682 LIBS=$ac_check_lib_save_LIBS
21684 echo "$as_me:21684: result: $ac_cv_lib_socket_connect" >&5
21685 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21686 if test "$ac_cv_lib_socket_connect" = yes; then
21687 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21692 # Guillermo Gomez says -lposix is necessary on A/UX.
21693 echo "$as_me:21693: checking for remove" >&5
21694 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21695 if test "${ac_cv_func_remove+set}" = set; then
21696 echo $ECHO_N "(cached) $ECHO_C" >&6
21698 cat >"conftest.$ac_ext" <<_ACEOF
21699 #line 21699 "configure"
21700 #include "confdefs.h"
21701 #define remove autoconf_temporary
21702 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21709 /* We use char because int might match the return type of a gcc2
21710 builtin and then its argument prototype would still apply. */
21711 char remove (void);
21717 /* The GNU C library defines stubs for functions which it implements
21718 to always fail with ENOSYS. Some functions are actually named
21719 something starting with __ and the normal name is an alias. */
21720 #if defined (__stub_remove) || defined (__stub___remove)
21721 #error found stub for remove
21729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21730 if { (eval echo "$as_me:21730: \"$ac_link\"") >&5
21731 (eval $ac_link) 2>&5
21733 echo "$as_me:21733: \$? = $ac_status" >&5
21734 (exit "$ac_status"); } &&
21735 { ac_try='test -s "conftest$ac_exeext"'
21736 { (eval echo "$as_me:21736: \"$ac_try\"") >&5
21737 (eval $ac_try) 2>&5
21739 echo "$as_me:21739: \$? = $ac_status" >&5
21740 (exit "$ac_status"); }; }; then
21741 ac_cv_func_remove=yes
21743 echo "$as_me: failed program was:" >&5
21744 cat "conftest.$ac_ext" >&5
21745 ac_cv_func_remove=no
21747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21749 echo "$as_me:21749: result: $ac_cv_func_remove" >&5
21750 echo "${ECHO_T}$ac_cv_func_remove" >&6
21752 if test $ac_cv_func_remove = no; then
21753 echo "$as_me:21753: checking for remove in -lposix" >&5
21754 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21755 if test "${ac_cv_lib_posix_remove+set}" = set; then
21756 echo $ECHO_N "(cached) $ECHO_C" >&6
21758 ac_check_lib_save_LIBS=$LIBS
21759 LIBS="-lposix $LIBS"
21760 cat >"conftest.$ac_ext" <<_ACEOF
21761 #line 21761 "configure"
21762 #include "confdefs.h"
21764 /* Override any gcc2 internal prototype to avoid an error. */
21768 /* We use char because int might match the return type of a gcc2
21769 builtin and then its argument prototype would still apply. */
21779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21780 if { (eval echo "$as_me:21780: \"$ac_link\"") >&5
21781 (eval $ac_link) 2>&5
21783 echo "$as_me:21783: \$? = $ac_status" >&5
21784 (exit "$ac_status"); } &&
21785 { ac_try='test -s "conftest$ac_exeext"'
21786 { (eval echo "$as_me:21786: \"$ac_try\"") >&5
21787 (eval $ac_try) 2>&5
21789 echo "$as_me:21789: \$? = $ac_status" >&5
21790 (exit "$ac_status"); }; }; then
21791 ac_cv_lib_posix_remove=yes
21793 echo "$as_me: failed program was:" >&5
21794 cat "conftest.$ac_ext" >&5
21795 ac_cv_lib_posix_remove=no
21797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21798 LIBS=$ac_check_lib_save_LIBS
21800 echo "$as_me:21800: result: $ac_cv_lib_posix_remove" >&5
21801 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21802 if test "$ac_cv_lib_posix_remove" = yes; then
21803 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21808 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21809 echo "$as_me:21809: checking for shmat" >&5
21810 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21811 if test "${ac_cv_func_shmat+set}" = set; then
21812 echo $ECHO_N "(cached) $ECHO_C" >&6
21814 cat >"conftest.$ac_ext" <<_ACEOF
21815 #line 21815 "configure"
21816 #include "confdefs.h"
21817 #define shmat autoconf_temporary
21818 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21825 /* We use char because int might match the return type of a gcc2
21826 builtin and then its argument prototype would still apply. */
21833 /* The GNU C library defines stubs for functions which it implements
21834 to always fail with ENOSYS. Some functions are actually named
21835 something starting with __ and the normal name is an alias. */
21836 #if defined (__stub_shmat) || defined (__stub___shmat)
21837 #error found stub for shmat
21845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21846 if { (eval echo "$as_me:21846: \"$ac_link\"") >&5
21847 (eval $ac_link) 2>&5
21849 echo "$as_me:21849: \$? = $ac_status" >&5
21850 (exit "$ac_status"); } &&
21851 { ac_try='test -s "conftest$ac_exeext"'
21852 { (eval echo "$as_me:21852: \"$ac_try\"") >&5
21853 (eval $ac_try) 2>&5
21855 echo "$as_me:21855: \$? = $ac_status" >&5
21856 (exit "$ac_status"); }; }; then
21857 ac_cv_func_shmat=yes
21859 echo "$as_me: failed program was:" >&5
21860 cat "conftest.$ac_ext" >&5
21861 ac_cv_func_shmat=no
21863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21865 echo "$as_me:21865: result: $ac_cv_func_shmat" >&5
21866 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21868 if test $ac_cv_func_shmat = no; then
21869 echo "$as_me:21869: checking for shmat in -lipc" >&5
21870 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21871 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21872 echo $ECHO_N "(cached) $ECHO_C" >&6
21874 ac_check_lib_save_LIBS=$LIBS
21876 cat >"conftest.$ac_ext" <<_ACEOF
21877 #line 21877 "configure"
21878 #include "confdefs.h"
21880 /* Override any gcc2 internal prototype to avoid an error. */
21884 /* We use char because int might match the return type of a gcc2
21885 builtin and then its argument prototype would still apply. */
21895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21896 if { (eval echo "$as_me:21896: \"$ac_link\"") >&5
21897 (eval $ac_link) 2>&5
21899 echo "$as_me:21899: \$? = $ac_status" >&5
21900 (exit "$ac_status"); } &&
21901 { ac_try='test -s "conftest$ac_exeext"'
21902 { (eval echo "$as_me:21902: \"$ac_try\"") >&5
21903 (eval $ac_try) 2>&5
21905 echo "$as_me:21905: \$? = $ac_status" >&5
21906 (exit "$ac_status"); }; }; then
21907 ac_cv_lib_ipc_shmat=yes
21909 echo "$as_me: failed program was:" >&5
21910 cat "conftest.$ac_ext" >&5
21911 ac_cv_lib_ipc_shmat=no
21913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21914 LIBS=$ac_check_lib_save_LIBS
21916 echo "$as_me:21916: result: $ac_cv_lib_ipc_shmat" >&5
21917 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21918 if test "$ac_cv_lib_ipc_shmat" = yes; then
21919 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21925 # Check for libraries that X11R6 Xt/Xaw programs need.
21926 ac_save_LDFLAGS=$LDFLAGS
21927 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21928 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21929 # check for ICE first), but we must link in the order -lSM -lICE or
21930 # we get undefined symbols. So assume we have SM if we have ICE.
21931 # These have to be linked with before -lX11, unlike the other
21932 # libraries we check for below, so use a different variable.
21933 # John Interrante, Karl Berry
21934 echo "$as_me:21934: checking for IceConnectionNumber in -lICE" >&5
21935 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21936 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21937 echo $ECHO_N "(cached) $ECHO_C" >&6
21939 ac_check_lib_save_LIBS=$LIBS
21940 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21941 cat >"conftest.$ac_ext" <<_ACEOF
21942 #line 21942 "configure"
21943 #include "confdefs.h"
21945 /* Override any gcc2 internal prototype to avoid an error. */
21949 /* We use char because int might match the return type of a gcc2
21950 builtin and then its argument prototype would still apply. */
21951 char IceConnectionNumber ();
21955 IceConnectionNumber ();
21960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21961 if { (eval echo "$as_me:21961: \"$ac_link\"") >&5
21962 (eval $ac_link) 2>&5
21964 echo "$as_me:21964: \$? = $ac_status" >&5
21965 (exit "$ac_status"); } &&
21966 { ac_try='test -s "conftest$ac_exeext"'
21967 { (eval echo "$as_me:21967: \"$ac_try\"") >&5
21968 (eval $ac_try) 2>&5
21970 echo "$as_me:21970: \$? = $ac_status" >&5
21971 (exit "$ac_status"); }; }; then
21972 ac_cv_lib_ICE_IceConnectionNumber=yes
21974 echo "$as_me: failed program was:" >&5
21975 cat "conftest.$ac_ext" >&5
21976 ac_cv_lib_ICE_IceConnectionNumber=no
21978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21979 LIBS=$ac_check_lib_save_LIBS
21981 echo "$as_me:21981: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21982 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21983 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21984 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21987 LDFLAGS=$ac_save_LDFLAGS
21993 if test "$GCC" = yes || test "$GXX" = yes
21996 if test "$GCC" = yes || test "$GXX" = yes
22001 for cf_temp_scan in $CFLAGS
22003 case "x$cf_temp_scan" in
22006 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22007 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22012 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22013 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22018 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22019 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22024 if test "x$CFLAGS" != "x$cf_temp_flags"
22026 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22028 echo "${as_me:-configure}:22028: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22030 CFLAGS="$cf_temp_flags"
22031 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22033 echo "${as_me:-configure}:22033: testing ... fixed $CFLAGS ..." 1>&5
22035 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22037 echo "${as_me:-configure}:22037: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22044 if test "$GCC" = yes || test "$GXX" = yes
22049 for cf_temp_scan in $CPPFLAGS
22051 case "x$cf_temp_scan" in
22054 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22055 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22060 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22061 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22066 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22067 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22072 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22074 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22076 echo "${as_me:-configure}:22076: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22078 CPPFLAGS="$cf_temp_flags"
22079 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
22081 echo "${as_me:-configure}:22081: testing ... fixed $CPPFLAGS ..." 1>&5
22083 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22085 echo "${as_me:-configure}:22085: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22092 if test "$GCC" = yes || test "$GXX" = yes
22097 for cf_temp_scan in $LDFLAGS
22099 case "x$cf_temp_scan" in
22102 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22103 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22108 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22109 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22114 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22115 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22120 if test "x$LDFLAGS" != "x$cf_temp_flags"
22122 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
22124 echo "${as_me:-configure}:22124: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
22126 LDFLAGS="$cf_temp_flags"
22127 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22129 echo "${as_me:-configure}:22129: testing ... fixed $LDFLAGS ..." 1>&5
22131 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22133 echo "${as_me:-configure}:22133: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22140 echo "$as_me:22140: checking if you want to turn on gcc warnings" >&5
22141 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22143 # Check whether --enable-warnings or --disable-warnings was given.
22144 if test "${enable_warnings+set}" = set; then
22145 enableval="$enable_warnings"
22146 test "$enableval" != yes && enableval=no
22147 if test "$enableval" != "no" ; then
22148 enable_warnings=yes
22157 echo "$as_me:22157: result: $enable_warnings" >&5
22158 echo "${ECHO_T}$enable_warnings" >&6
22159 if test "$enable_warnings" = "yes"
22162 if test "$GCC" = yes || test "$GXX" = yes
22164 cat > conftest.i <<EOF
22166 #define GCC_PRINTF 0
22169 #define GCC_SCANF 0
22171 #ifndef GCC_NORETURN
22172 #define GCC_NORETURN /* nothing */
22175 #define GCC_UNUSED /* nothing */
22178 if test "$GCC" = yes
22180 { echo "$as_me:22180: checking for $CC __attribute__ directives..." >&5
22181 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22182 cat > "conftest.$ac_ext" <<EOF
22183 #line 22183 "${as_me:-configure}"
22185 #include "confdefs.h"
22186 #include "conftest.h"
22187 #include "conftest.i"
22189 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22191 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22194 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22196 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22198 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22199 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22200 extern GCC_NORETURN void foo(void);
22201 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22203 cf_printf_attribute=no
22204 cf_scanf_attribute=no
22205 for cf_attribute in scanf printf unused noreturn
22208 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22210 cf_directive="__attribute__(($cf_attribute))"
22211 echo "checking for $CC $cf_directive" 1>&5
22213 case "$cf_attribute" in
22215 cf_printf_attribute=yes
22216 cat >conftest.h <<EOF
22217 #define GCC_$cf_ATTRIBUTE 1
22221 cf_scanf_attribute=yes
22222 cat >conftest.h <<EOF
22223 #define GCC_$cf_ATTRIBUTE 1
22227 cat >conftest.h <<EOF
22228 #define GCC_$cf_ATTRIBUTE $cf_directive
22233 if { (eval echo "$as_me:22233: \"$ac_compile\"") >&5
22234 (eval $ac_compile) 2>&5
22236 echo "$as_me:22236: \$? = $ac_status" >&5
22237 (exit "$ac_status"); }; then
22238 test -n "$verbose" && echo "$as_me:22238: result: ... $cf_attribute" >&5
22239 echo "${ECHO_T}... $cf_attribute" >&6
22240 cat conftest.h >>confdefs.h
22241 case "$cf_attribute" in
22244 cat >>confdefs.h <<EOF
22245 #define GCC_NORETURN $cf_directive
22250 cf_value='/* nothing */'
22251 if test "$cf_printf_attribute" != no ; then
22252 cf_value='__attribute__((format(printf,fmt,var)))'
22254 cat >>confdefs.h <<\EOF
22255 #define GCC_PRINTF 1
22260 cat >>confdefs.h <<EOF
22261 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22266 cf_value='/* nothing */'
22267 if test "$cf_scanf_attribute" != no ; then
22268 cf_value='__attribute__((format(scanf,fmt,var)))'
22270 cat >>confdefs.h <<\EOF
22271 #define GCC_SCANF 1
22276 cat >>confdefs.h <<EOF
22277 #define GCC_SCANFLIKE(fmt,var) $cf_value
22283 cat >>confdefs.h <<EOF
22284 #define GCC_UNUSED $cf_directive
22292 ${FGREP-fgrep} define conftest.i >>confdefs.h
22297 if test "x$have_x" = xyes; then
22299 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22300 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22301 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22302 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22303 for cf_X_CFLAGS in $X_CFLAGS
22305 case "x$cf_X_CFLAGS" in
22307 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22310 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22315 cat >"conftest.$ac_ext" <<_ACEOF
22316 #line 22316 "configure"
22317 #include "confdefs.h"
22319 #include <stdlib.h>
22320 #include <X11/Intrinsic.h>
22325 String foo = malloc(1); free((void*)foo)
22330 rm -f "conftest.$ac_objext"
22331 if { (eval echo "$as_me:22331: \"$ac_compile\"") >&5
22332 (eval $ac_compile) 2>&5
22334 echo "$as_me:22334: \$? = $ac_status" >&5
22335 (exit "$ac_status"); } &&
22336 { ac_try='test -s "conftest.$ac_objext"'
22337 { (eval echo "$as_me:22337: \"$ac_try\"") >&5
22338 (eval $ac_try) 2>&5
22340 echo "$as_me:22340: \$? = $ac_status" >&5
22341 (exit "$ac_status"); }; }; then
22343 echo "$as_me:22343: checking for X11/Xt const-feature" >&5
22344 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22345 if test "${cf_cv_const_x_string+set}" = set; then
22346 echo $ECHO_N "(cached) $ECHO_C" >&6
22349 cat >"conftest.$ac_ext" <<_ACEOF
22350 #line 22350 "configure"
22351 #include "confdefs.h"
22353 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22354 #undef XTSTRINGDEFINES /* X11R5 and later */
22355 #include <stdlib.h>
22356 #include <X11/Intrinsic.h>
22361 String foo = malloc(1); *foo = 0
22366 rm -f "conftest.$ac_objext"
22367 if { (eval echo "$as_me:22367: \"$ac_compile\"") >&5
22368 (eval $ac_compile) 2>&5
22370 echo "$as_me:22370: \$? = $ac_status" >&5
22371 (exit "$ac_status"); } &&
22372 { ac_try='test -s "conftest.$ac_objext"'
22373 { (eval echo "$as_me:22373: \"$ac_try\"") >&5
22374 (eval $ac_try) 2>&5
22376 echo "$as_me:22376: \$? = $ac_status" >&5
22377 (exit "$ac_status"); }; }; then
22379 cf_cv_const_x_string=no
22382 echo "$as_me: failed program was:" >&5
22383 cat "conftest.$ac_ext" >&5
22385 cf_cv_const_x_string=yes
22388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22391 echo "$as_me:22391: result: $cf_cv_const_x_string" >&5
22392 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22394 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22395 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22396 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22398 case "$cf_cv_const_x_string" in
22401 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22402 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22407 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22408 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22414 echo "$as_me: failed program was:" >&5
22415 cat "conftest.$ac_ext" >&5
22417 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22419 cat > "conftest.$ac_ext" <<EOF
22420 #line 22420 "${as_me:-configure}"
22421 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22423 if test "$INTEL_COMPILER" = yes
22425 # The "-wdXXX" options suppress warnings:
22426 # remark #1419: external declaration in primary source file
22427 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22428 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22429 # remark #193: zero used for undefined preprocessing identifier
22430 # remark #593: variable "curs_sb_left_arrow" was set but never used
22431 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22432 # remark #869: parameter "tw" was never referenced
22433 # remark #981: operands are evaluated in unspecified order
22434 # warning #279: controlling expression is constant
22436 { echo "$as_me:22436: checking for $CC warning options..." >&5
22437 echo "$as_me: checking for $CC warning options..." >&6;}
22438 cf_save_CFLAGS="$CFLAGS"
22439 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22451 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22452 if { (eval echo "$as_me:22452: \"$ac_compile\"") >&5
22453 (eval $ac_compile) 2>&5
22455 echo "$as_me:22455: \$? = $ac_status" >&5
22456 (exit "$ac_status"); }; then
22457 test -n "$verbose" && echo "$as_me:22457: result: ... -$cf_opt" >&5
22458 echo "${ECHO_T}... -$cf_opt" >&6
22459 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22462 CFLAGS="$cf_save_CFLAGS"
22463 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22465 { echo "$as_me:22465: checking for $CC warning options..." >&5
22466 echo "$as_me: checking for $CC warning options..." >&6;}
22467 cf_save_CFLAGS="$CFLAGS"
22469 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22470 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22471 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22472 for cf_opt in W Wall \
22473 Wbad-function-cast \
22476 Wdeclaration-after-statement \
22479 Wmissing-declarations \
22480 Wmissing-prototypes \
22484 Wstrict-prototypes \
22485 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22487 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22488 if { (eval echo "$as_me:22488: \"$ac_compile\"") >&5
22489 (eval $ac_compile) 2>&5
22491 echo "$as_me:22491: \$? = $ac_status" >&5
22492 (exit "$ac_status"); }; then
22493 test -n "$verbose" && echo "$as_me:22493: result: ... -$cf_opt" >&5
22494 echo "${ECHO_T}... -$cf_opt" >&6
22497 case "$GCC_VERSION" in
22499 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22501 echo "${as_me:-configure}:22501: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22507 case "$GCC_VERSION" in
22509 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22511 echo "${as_me:-configure}:22511: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22517 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22520 CFLAGS="$cf_save_CFLAGS"
22528 echo "$as_me:22528: checking if you want to use dmalloc for testing" >&5
22529 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22531 # Check whether --with-dmalloc or --without-dmalloc was given.
22532 if test "${with_dmalloc+set}" = set; then
22533 withval="$with_dmalloc"
22534 case "x$withval" in
22537 : "${with_cflags:=-g}"
22538 : "${enable_leaks:=no}"
22541 cat >>confdefs.h <<EOF
22542 #define USE_DMALLOC 1
22550 echo "$as_me:22550: result: ${with_dmalloc:-no}" >&5
22551 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22553 case ".$with_cflags" in
22563 cf_new_extra_cppflags=
22565 for cf_add_cflags in -g
22567 case "$cf_fix_cppflags" in
22569 case "$cf_add_cflags" in
22570 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22571 case "$cf_add_cflags" in
22573 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22575 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22576 && test -z "${cf_tst_cflags}" \
22577 && cf_fix_cppflags=yes
22579 if test "$cf_fix_cppflags" = yes ; then
22581 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22582 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22585 elif test "${cf_tst_cflags}" = "\"'" ; then
22587 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22588 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22594 case "$CPPFLAGS" in
22598 case "$cf_add_cflags" in
22600 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22602 CPPFLAGS=`echo "$CPPFLAGS" | \
22603 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22604 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22609 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22610 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22617 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22618 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22625 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22626 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22628 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22630 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22631 && test -z "${cf_tst_cflags}" \
22632 && cf_fix_cppflags=no
22637 if test -n "$cf_new_cflags" ; then
22639 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22640 CFLAGS="${CFLAGS}$cf_new_cflags"
22644 if test -n "$cf_new_cppflags" ; then
22646 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22647 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22651 if test -n "$cf_new_extra_cppflags" ; then
22653 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22654 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22663 if test "$with_dmalloc" = yes ; then
22664 echo "$as_me:22664: checking for dmalloc.h" >&5
22665 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22666 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22667 echo $ECHO_N "(cached) $ECHO_C" >&6
22669 cat >"conftest.$ac_ext" <<_ACEOF
22670 #line 22670 "configure"
22671 #include "confdefs.h"
22672 #include <dmalloc.h>
22674 if { (eval echo "$as_me:22674: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22675 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22677 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22679 cat conftest.err >&5
22680 echo "$as_me:22680: \$? = $ac_status" >&5
22681 (exit "$ac_status"); } >/dev/null; then
22682 if test -s conftest.err; then
22683 ac_cpp_err=$ac_c_preproc_warn_flag
22690 if test -z "$ac_cpp_err"; then
22691 ac_cv_header_dmalloc_h=yes
22693 echo "$as_me: failed program was:" >&5
22694 cat "conftest.$ac_ext" >&5
22695 ac_cv_header_dmalloc_h=no
22697 rm -f conftest.err "conftest.$ac_ext"
22699 echo "$as_me:22699: result: $ac_cv_header_dmalloc_h" >&5
22700 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22701 if test "$ac_cv_header_dmalloc_h" = yes; then
22703 echo "$as_me:22703: checking for dmalloc_debug in -ldmalloc" >&5
22704 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22705 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22706 echo $ECHO_N "(cached) $ECHO_C" >&6
22708 ac_check_lib_save_LIBS=$LIBS
22709 LIBS="-ldmalloc $LIBS"
22710 cat >"conftest.$ac_ext" <<_ACEOF
22711 #line 22711 "configure"
22712 #include "confdefs.h"
22714 /* Override any gcc2 internal prototype to avoid an error. */
22718 /* We use char because int might match the return type of a gcc2
22719 builtin and then its argument prototype would still apply. */
22720 char dmalloc_debug ();
22729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22730 if { (eval echo "$as_me:22730: \"$ac_link\"") >&5
22731 (eval $ac_link) 2>&5
22733 echo "$as_me:22733: \$? = $ac_status" >&5
22734 (exit "$ac_status"); } &&
22735 { ac_try='test -s "conftest$ac_exeext"'
22736 { (eval echo "$as_me:22736: \"$ac_try\"") >&5
22737 (eval $ac_try) 2>&5
22739 echo "$as_me:22739: \$? = $ac_status" >&5
22740 (exit "$ac_status"); }; }; then
22741 ac_cv_lib_dmalloc_dmalloc_debug=yes
22743 echo "$as_me: failed program was:" >&5
22744 cat "conftest.$ac_ext" >&5
22745 ac_cv_lib_dmalloc_dmalloc_debug=no
22747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22748 LIBS=$ac_check_lib_save_LIBS
22750 echo "$as_me:22750: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22751 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22752 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22753 cat >>confdefs.h <<EOF
22754 #define HAVE_LIBDMALLOC 1
22757 LIBS="-ldmalloc $LIBS"
22765 echo "$as_me:22765: checking if you want to use dbmalloc for testing" >&5
22766 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22768 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22769 if test "${with_dbmalloc+set}" = set; then
22770 withval="$with_dbmalloc"
22771 case "x$withval" in
22774 : "${with_cflags:=-g}"
22775 : "${enable_leaks:=no}"
22778 cat >>confdefs.h <<EOF
22779 #define USE_DBMALLOC 1
22787 echo "$as_me:22787: result: ${with_dbmalloc:-no}" >&5
22788 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22790 case ".$with_cflags" in
22800 cf_new_extra_cppflags=
22802 for cf_add_cflags in -g
22804 case "$cf_fix_cppflags" in
22806 case "$cf_add_cflags" in
22807 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22808 case "$cf_add_cflags" in
22810 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22813 && test -z "${cf_tst_cflags}" \
22814 && cf_fix_cppflags=yes
22816 if test "$cf_fix_cppflags" = yes ; then
22818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22822 elif test "${cf_tst_cflags}" = "\"'" ; then
22824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22831 case "$CPPFLAGS" in
22835 case "$cf_add_cflags" in
22837 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22839 CPPFLAGS=`echo "$CPPFLAGS" | \
22840 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22841 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22846 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22847 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22854 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22855 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22865 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22867 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22868 && test -z "${cf_tst_cflags}" \
22869 && cf_fix_cppflags=no
22874 if test -n "$cf_new_cflags" ; then
22876 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22877 CFLAGS="${CFLAGS}$cf_new_cflags"
22881 if test -n "$cf_new_cppflags" ; then
22883 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22884 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22888 if test -n "$cf_new_extra_cppflags" ; then
22890 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22891 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22900 if test "$with_dbmalloc" = yes ; then
22901 echo "$as_me:22901: checking for dbmalloc.h" >&5
22902 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22903 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22904 echo $ECHO_N "(cached) $ECHO_C" >&6
22906 cat >"conftest.$ac_ext" <<_ACEOF
22907 #line 22907 "configure"
22908 #include "confdefs.h"
22909 #include <dbmalloc.h>
22911 if { (eval echo "$as_me:22911: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22912 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22914 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22916 cat conftest.err >&5
22917 echo "$as_me:22917: \$? = $ac_status" >&5
22918 (exit "$ac_status"); } >/dev/null; then
22919 if test -s conftest.err; then
22920 ac_cpp_err=$ac_c_preproc_warn_flag
22927 if test -z "$ac_cpp_err"; then
22928 ac_cv_header_dbmalloc_h=yes
22930 echo "$as_me: failed program was:" >&5
22931 cat "conftest.$ac_ext" >&5
22932 ac_cv_header_dbmalloc_h=no
22934 rm -f conftest.err "conftest.$ac_ext"
22936 echo "$as_me:22936: result: $ac_cv_header_dbmalloc_h" >&5
22937 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22938 if test "$ac_cv_header_dbmalloc_h" = yes; then
22940 echo "$as_me:22940: checking for debug_malloc in -ldbmalloc" >&5
22941 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22942 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22943 echo $ECHO_N "(cached) $ECHO_C" >&6
22945 ac_check_lib_save_LIBS=$LIBS
22946 LIBS="-ldbmalloc $LIBS"
22947 cat >"conftest.$ac_ext" <<_ACEOF
22948 #line 22948 "configure"
22949 #include "confdefs.h"
22951 /* Override any gcc2 internal prototype to avoid an error. */
22955 /* We use char because int might match the return type of a gcc2
22956 builtin and then its argument prototype would still apply. */
22957 char debug_malloc ();
22966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22967 if { (eval echo "$as_me:22967: \"$ac_link\"") >&5
22968 (eval $ac_link) 2>&5
22970 echo "$as_me:22970: \$? = $ac_status" >&5
22971 (exit "$ac_status"); } &&
22972 { ac_try='test -s "conftest$ac_exeext"'
22973 { (eval echo "$as_me:22973: \"$ac_try\"") >&5
22974 (eval $ac_try) 2>&5
22976 echo "$as_me:22976: \$? = $ac_status" >&5
22977 (exit "$ac_status"); }; }; then
22978 ac_cv_lib_dbmalloc_debug_malloc=yes
22980 echo "$as_me: failed program was:" >&5
22981 cat "conftest.$ac_ext" >&5
22982 ac_cv_lib_dbmalloc_debug_malloc=no
22984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22985 LIBS=$ac_check_lib_save_LIBS
22987 echo "$as_me:22987: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22988 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22989 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22990 cat >>confdefs.h <<EOF
22991 #define HAVE_LIBDBMALLOC 1
22994 LIBS="-ldbmalloc $LIBS"
23002 echo "$as_me:23002: checking if you want to use valgrind for testing" >&5
23003 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23005 # Check whether --with-valgrind or --without-valgrind was given.
23006 if test "${with_valgrind+set}" = set; then
23007 withval="$with_valgrind"
23008 case "x$withval" in
23011 : "${with_cflags:=-g}"
23012 : "${enable_leaks:=no}"
23015 cat >>confdefs.h <<EOF
23016 #define USE_VALGRIND 1
23024 echo "$as_me:23024: result: ${with_valgrind:-no}" >&5
23025 echo "${ECHO_T}${with_valgrind:-no}" >&6
23027 case ".$with_cflags" in
23037 cf_new_extra_cppflags=
23039 for cf_add_cflags in -g
23041 case "$cf_fix_cppflags" in
23043 case "$cf_add_cflags" in
23044 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23045 case "$cf_add_cflags" in
23047 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23049 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23050 && test -z "${cf_tst_cflags}" \
23051 && cf_fix_cppflags=yes
23053 if test "$cf_fix_cppflags" = yes ; then
23055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23059 elif test "${cf_tst_cflags}" = "\"'" ; then
23061 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23062 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23068 case "$CPPFLAGS" in
23072 case "$cf_add_cflags" in
23074 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23076 CPPFLAGS=`echo "$CPPFLAGS" | \
23077 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23078 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23083 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23084 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23091 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23092 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23102 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23105 && test -z "${cf_tst_cflags}" \
23106 && cf_fix_cppflags=no
23111 if test -n "$cf_new_cflags" ; then
23113 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23114 CFLAGS="${CFLAGS}$cf_new_cflags"
23118 if test -n "$cf_new_cppflags" ; then
23120 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23121 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23125 if test -n "$cf_new_extra_cppflags" ; then
23127 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23128 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23137 echo "$as_me:23137: checking if you want to perform memory-leak testing" >&5
23138 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23140 # Check whether --enable-leaks or --disable-leaks was given.
23141 if test "${enable_leaks+set}" = set; then
23142 enableval="$enable_leaks"
23143 enable_leaks=$enableval
23147 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23148 echo "$as_me:23148: result: $with_no_leaks" >&5
23149 echo "${ECHO_T}$with_no_leaks" >&6
23151 if test "$enable_leaks" = no ; then
23153 cat >>confdefs.h <<\EOF
23157 cat >>confdefs.h <<\EOF
23158 #define YY_NO_LEAKS 1
23164 if test "x$cf_cv_enable_rpath" != xno
23166 echo "$as_me:23166: checking for an rpath option" >&5
23167 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23168 case "$cf_cv_system_name" in
23170 if test "$GCC" = yes; then
23171 LD_RPATH_OPT="-Wl,-rpath,"
23173 LD_RPATH_OPT="-rpath "
23176 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23177 LD_RPATH_OPT="-Wl,-rpath,"
23179 (openbsd[2-9].*|mirbsd*)
23180 LD_RPATH_OPT="-Wl,-rpath,"
23183 LD_RPATH_OPT="-rpath "
23186 LD_RPATH_OPT="-Wl,-rpath,"
23189 LD_RPATH_OPT="-rpath "
23197 echo "$as_me:23197: result: $LD_RPATH_OPT" >&5
23198 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23200 case "x$LD_RPATH_OPT" in
23202 echo "$as_me:23202: checking if we need a space after rpath option" >&5
23203 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23204 cf_save_LIBS="$LIBS"
23206 cf_add_libs="$LIBS"
23209 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23210 # filter duplicates
23211 for cf_add_1lib in $cf_add_0lib; do
23212 for cf_add_2lib in $cf_add_libs; do
23213 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23218 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23220 LIBS="$cf_add_libs"
23222 cat >"conftest.$ac_ext" <<_ACEOF
23223 #line 23223 "configure"
23224 #include "confdefs.h"
23234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23235 if { (eval echo "$as_me:23235: \"$ac_link\"") >&5
23236 (eval $ac_link) 2>&5
23238 echo "$as_me:23238: \$? = $ac_status" >&5
23239 (exit "$ac_status"); } &&
23240 { ac_try='test -s "conftest$ac_exeext"'
23241 { (eval echo "$as_me:23241: \"$ac_try\"") >&5
23242 (eval $ac_try) 2>&5
23244 echo "$as_me:23244: \$? = $ac_status" >&5
23245 (exit "$ac_status"); }; }; then
23248 echo "$as_me: failed program was:" >&5
23249 cat "conftest.$ac_ext" >&5
23252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23253 LIBS="$cf_save_LIBS"
23254 echo "$as_me:23254: result: $cf_rpath_space" >&5
23255 echo "${ECHO_T}$cf_rpath_space" >&6
23256 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23261 echo "$as_me:23261: checking if rpath-hack should be disabled" >&5
23262 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23264 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23265 if test "${enable_rpath_hack+set}" = set; then
23266 enableval="$enable_rpath_hack"
23267 test "$enableval" != no && enableval=yes
23268 if test "$enableval" != "yes" ; then
23269 enable_rpath_hack=no
23271 enable_rpath_hack=yes
23275 enable_rpath_hack=yes
23278 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23279 echo "$as_me:23279: result: $cf_disable_rpath_hack" >&5
23280 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23282 if test "$enable_rpath_hack" = yes ; then
23284 echo "$as_me:23284: checking for updated LDFLAGS" >&5
23285 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23286 if test -n "$LD_RPATH_OPT" ; then
23287 echo "$as_me:23287: result: maybe" >&5
23288 echo "${ECHO_T}maybe" >&6
23292 # Extract the first word of "$ac_prog", so it can be a program name with args.
23293 set dummy $ac_prog; ac_word=$2
23294 echo "$as_me:23294: checking for $ac_word" >&5
23295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23296 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23297 echo $ECHO_N "(cached) $ECHO_C" >&6
23299 if test -n "$cf_ldd_prog"; then
23300 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23302 ac_save_IFS=$IFS; IFS=$ac_path_separator
23304 for ac_dir in $ac_dummy; do
23306 test -z "$ac_dir" && ac_dir=.
23307 $as_executable_p "$ac_dir/$ac_word" || continue
23308 ac_cv_prog_cf_ldd_prog="$ac_prog"
23309 echo "$as_me:23309: found $ac_dir/$ac_word" >&5
23315 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23316 if test -n "$cf_ldd_prog"; then
23317 echo "$as_me:23317: result: $cf_ldd_prog" >&5
23318 echo "${ECHO_T}$cf_ldd_prog" >&6
23320 echo "$as_me:23320: result: no" >&5
23321 echo "${ECHO_T}no" >&6
23324 test -n "$cf_ldd_prog" && break
23326 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23328 cf_rpath_list="/usr/lib /lib"
23329 if test "$cf_ldd_prog" != no
23333 cat >"conftest.$ac_ext" <<_ACEOF
23334 #line 23334 "configure"
23335 #include "confdefs.h"
23345 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23346 if { (eval echo "$as_me:23346: \"$ac_link\"") >&5
23347 (eval $ac_link) 2>&5
23349 echo "$as_me:23349: \$? = $ac_status" >&5
23350 (exit "$ac_status"); } &&
23351 { ac_try='test -s "conftest$ac_exeext"'
23352 { (eval echo "$as_me:23352: \"$ac_try\"") >&5
23353 (eval $ac_try) 2>&5
23355 echo "$as_me:23355: \$? = $ac_status" >&5
23356 (exit "$ac_status"); }; }; then
23357 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23358 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23360 echo "$as_me: failed program was:" >&5
23361 cat "conftest.$ac_ext" >&5
23363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23365 # If we passed the link-test, but get a "not found" on a given library,
23366 # this could be due to inept reconfiguration of gcc to make it only
23367 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23368 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23369 # /usr/local libraries.
23370 if test -n "$cf_rpath_oops"
23372 for cf_rpath_src in $cf_rpath_oops
23374 for cf_rpath_dir in \
23379 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23381 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23383 echo "${as_me:-configure}:23383: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23385 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23393 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23395 echo "${as_me:-configure}:23395: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23397 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23399 echo "${as_me:-configure}:23399: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23402 for cf_rpath_src in $LDFLAGS
23404 case "$cf_rpath_src" in
23407 # check if this refers to a directory which we will ignore
23409 if test -n "$cf_rpath_list"
23411 for cf_rpath_item in $cf_rpath_list
23413 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23421 if test "$cf_rpath_skip" = no
23423 # transform the option
23424 if test "$LD_RPATH_OPT" = "-R " ; then
23425 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23427 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23430 # if we have not already added this, add it now
23431 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23432 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23434 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23436 echo "${as_me:-configure}:23436: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23438 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23443 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23445 LDFLAGS=$cf_rpath_dst
23447 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23449 echo "${as_me:-configure}:23449: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23451 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23453 echo "${as_me:-configure}:23453: testing ...checking LIBS $LIBS ..." 1>&5
23456 for cf_rpath_src in $LIBS
23458 case "$cf_rpath_src" in
23461 # check if this refers to a directory which we will ignore
23463 if test -n "$cf_rpath_list"
23465 for cf_rpath_item in $cf_rpath_list
23467 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23475 if test "$cf_rpath_skip" = no
23477 # transform the option
23478 if test "$LD_RPATH_OPT" = "-R " ; then
23479 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23481 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23484 # if we have not already added this, add it now
23485 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23486 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23488 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23490 echo "${as_me:-configure}:23490: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23492 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23497 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23501 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23503 echo "${as_me:-configure}:23503: testing ...checked LIBS $LIBS ..." 1>&5
23505 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23507 echo "${as_me:-configure}:23507: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23510 echo "$as_me:23510: result: no" >&5
23511 echo "${ECHO_T}no" >&6
23519 ac_config_files="$ac_config_files Makefile"
23520 ac_config_commands="$ac_config_commands default"
23521 cat >confcache <<\_ACEOF
23522 # This file is a shell script that caches the results of configure
23523 # tests run on this system so they can be shared between configure
23524 # scripts and configure runs, see configure's option --config-cache.
23525 # It is not useful on other systems. If it contains results you don't
23526 # want to keep, you may remove or edit it.
23528 # config.status only pays attention to the cache file if you give it
23529 # the --recheck option to rerun configure.
23531 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23532 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23533 # following values.
23537 # The following way of writing the cache mishandles newlines in values,
23538 # but we know of no workaround that is simple, portable, and efficient.
23539 # So, don't put newlines in cache variables' values.
23540 # Ultrix sh set writes to stderr and can't be redirected directly,
23541 # and sets the high bit in the cache file unless we assign to the vars.
23544 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23546 # `set' does not quote correctly, so add quotes (double-quote
23547 # substitution turns \\\\ into \\, and sed turns \\ into \).
23550 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23553 # `set' quotes correctly as required by POSIX, so do not add quotes.
23555 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23564 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23566 if cmp -s $cache_file confcache; then :; else
23567 if test -w $cache_file; then
23568 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23569 cat confcache >$cache_file
23571 echo "not updating unwritable cache $cache_file"
23576 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23577 # Let make expand exec_prefix.
23578 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23580 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23581 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23582 # trailing colons and then remove the whole line if VPATH becomes empty
23583 # (actually we leave an empty line to preserve line numbers).
23584 if test "x$srcdir" = x.; then
23585 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23586 s/:*\$(srcdir):*/:/;
23587 s/:*\${srcdir}:*/:/;
23589 s/^\([^=]*=[ ]*\):*/\1/;
23595 DEFS=-DHAVE_CONFIG_H
23597 : "${CONFIG_STATUS=./config.status}"
23598 ac_clean_files_save=$ac_clean_files
23599 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23600 { echo "$as_me:23600: creating $CONFIG_STATUS" >&5
23601 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23602 cat >"$CONFIG_STATUS" <<_ACEOF
23604 # Generated automatically by configure.
23605 # Run this file to recreate the current configuration.
23606 # Compiler output produced by configure, useful for debugging
23607 # configure, is in config.log if it exists.
23609 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
23612 SHELL=\${CONFIG_SHELL-$SHELL}
23613 ac_cs_invocation="\$0 \$@"
23615 CLICOLOR_FORCE= GREP_OPTIONS=
23616 unset CLICOLOR_FORCE GREP_OPTIONS
23619 cat >>"$CONFIG_STATUS" <<\_ACEOF
23620 # Be Bourne compatible
23621 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23624 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23628 # Name of the executable.
23629 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23631 if expr a : '\(a\)' >/dev/null 2>&1; then
23637 rm -f conf$$ conf$$.exe conf$$.file
23639 if ln -s conf$$.file conf$$ 2>/dev/null; then
23640 # We could just check for DJGPP; but this test a) works b) is more generic
23641 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23642 if test -f conf$$.exe; then
23643 # Don't use ln at all; we don't have any links
23648 elif ln conf$$.file conf$$ 2>/dev/null; then
23653 rm -f conf$$ conf$$.exe conf$$.file
23655 as_executable_p="test -f"
23657 # Support unset when possible.
23658 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23665 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23666 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23667 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23668 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23669 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23670 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23671 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23672 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23675 # We need space, tab and new line, in precisely that order.
23681 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23687 # Files that config.status was made for.
23688 if test -n "$ac_config_files"; then
23689 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23692 if test -n "$ac_config_headers"; then
23693 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23696 if test -n "$ac_config_links"; then
23697 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23700 if test -n "$ac_config_commands"; then
23701 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23704 cat >>"$CONFIG_STATUS" <<\EOF
23707 \`$as_me' instantiates files from templates according to the
23708 current configuration.
23710 Usage: $0 [OPTIONS] [FILE]...
23712 -h, --help print this help, then exit
23713 -V, --version print version number, then exit
23714 -d, --debug don't remove temporary files
23715 --recheck update $as_me by reconfiguring in the same conditions
23716 --file=FILE[:TEMPLATE]
23717 instantiate the configuration file FILE
23718 --header=FILE[:TEMPLATE]
23719 instantiate the configuration header FILE
23721 Configuration files:
23724 Configuration headers:
23727 Configuration commands:
23730 Report bugs to <dickey@invisible-island.net>."
23733 cat >>"$CONFIG_STATUS" <<EOF
23736 configured by $0, generated by GNU Autoconf 2.52.20221202,
23737 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23739 Copyright 2003-2021,2022 Thomas E. Dickey
23740 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23741 Free Software Foundation, Inc.
23742 This config.status script is free software; the Free Software Foundation
23743 gives unlimited permission to copy, distribute and modify it."
23748 cat >>"$CONFIG_STATUS" <<\EOF
23749 # If no file are specified by the user, then we need to provide default
23750 # value. By we need to know if files were specified by the user.
23756 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23757 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23759 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23763 *) # This is not an option, so the user has probably given explicit
23765 ac_need_defaults=false;;
23769 # Handling of the options.
23771 cat >>"$CONFIG_STATUS" <<EOF
23772 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23773 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23774 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23776 cat >>"$CONFIG_STATUS" <<\EOF
23777 --version | --vers* | -V )
23778 echo "$ac_cs_version"; exit 0 ;;
23780 # Conflict between --help and --header
23781 { { echo "$as_me:23781: error: ambiguous option: $1
23782 Try \`$0 --help' for more information." >&5
23783 echo "$as_me: error: ambiguous option: $1
23784 Try \`$0 --help' for more information." >&2;}
23785 { (exit 1); exit 1; }; };;
23786 --help | --hel | -h )
23787 echo "$ac_cs_usage"; exit 0 ;;
23788 --debug | --d* | -d )
23790 --file | --fil | --fi | --f )
23792 CONFIG_FILES="$CONFIG_FILES $1"
23793 ac_need_defaults=false;;
23794 --header | --heade | --head | --hea )
23796 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23797 ac_need_defaults=false;;
23799 # This is an error.
23800 -*) { { echo "$as_me:23800: error: unrecognized option: $1
23801 Try \`$0 --help' for more information." >&5
23802 echo "$as_me: error: unrecognized option: $1
23803 Try \`$0 --help' for more information." >&2;}
23804 { (exit 1); exit 1; }; } ;;
23806 *) ac_config_targets="$ac_config_targets $1" ;;
23815 ## ----------------------- ##
23816 ## Running config.status. ##
23817 ## ----------------------- ##
23819 This file was extended by $as_me 2.52.20221202, executed with
23820 CONFIG_FILES = $CONFIG_FILES
23821 CONFIG_HEADERS = $CONFIG_HEADERS
23822 CONFIG_LINKS = $CONFIG_LINKS
23823 CONFIG_COMMANDS = $CONFIG_COMMANDS
23824 > "$ac_cs_invocation"
23825 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23830 cat >>"$CONFIG_STATUS" <<EOF
23832 # INIT-COMMANDS section.
23842 cat >>"$CONFIG_STATUS" <<\EOF
23843 for ac_config_target in $ac_config_targets
23845 case "$ac_config_target" in
23846 # Handling of arguments.
23847 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23848 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23849 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23850 *) { { echo "$as_me:23850: error: invalid argument: $ac_config_target" >&5
23851 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23852 { (exit 1); exit 1; }; };;
23856 # If the user did not use the arguments to specify the items to instantiate,
23857 # then the envvar interface is used. Set only those that are not.
23858 # We use the long form for the default assignment because of an extremely
23859 # bizarre bug on SunOS 4.1.3.
23860 if "$ac_need_defaults"; then
23861 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23862 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23863 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23866 # Create a temporary directory, and hook for its removal unless debugging.
23869 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23870 trap '{ (exit 1); exit 1; }' 1 2 13 15
23873 # Create a (secure) tmp directory for tmp files.
23876 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23877 test -n "$tmp" && test -d "$tmp"
23880 tmp=$TMPDIR/cs$$-$RANDOM
23881 (umask 077 && mkdir "$tmp")
23884 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23885 { (exit 1); exit 1; }
23890 cat >>"$CONFIG_STATUS" <<EOF
23893 # CONFIG_FILES section.
23896 # No need to generate the scripts if there are no CONFIG_FILES.
23897 # This happens for instance when ./config.status config.h
23898 if test -n "\$CONFIG_FILES"; then
23899 # Protect against being on the right side of a sed subst in config.status.
23900 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23901 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
23902 s,@SHELL@,$SHELL,;t t
23903 s,@exec_prefix@,$exec_prefix,;t t
23904 s,@prefix@,$prefix,;t t
23905 s,@program_transform_name@,$program_transform_name,;t t
23906 s,@bindir@,$bindir,;t t
23907 s,@sbindir@,$sbindir,;t t
23908 s,@libexecdir@,$libexecdir,;t t
23909 s,@datarootdir@,$datarootdir,;t t
23910 s,@datadir@,$datadir,;t t
23911 s,@sysconfdir@,$sysconfdir,;t t
23912 s,@sharedstatedir@,$sharedstatedir,;t t
23913 s,@localstatedir@,$localstatedir,;t t
23914 s,@runstatedir@,$runstatedir,;t t
23915 s,@libdir@,$libdir,;t t
23916 s,@includedir@,$includedir,;t t
23917 s,@oldincludedir@,$oldincludedir,;t t
23918 s,@infodir@,$infodir,;t t
23919 s,@mandir@,$mandir,;t t
23920 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23921 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23922 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23923 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23924 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23925 s,@build_alias@,$build_alias,;t t
23926 s,@host_alias@,$host_alias,;t t
23927 s,@target_alias@,$target_alias,;t t
23928 s,@ECHO_C@,$ECHO_C,;t t
23929 s,@ECHO_N@,$ECHO_N,;t t
23930 s,@ECHO_T@,$ECHO_T,;t t
23931 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23932 s,@DEFS@,$DEFS,;t t
23933 s,@LIBS@,$LIBS,;t t
23934 s,@build@,$build,;t t
23935 s,@build_cpu@,$build_cpu,;t t
23936 s,@build_vendor@,$build_vendor,;t t
23937 s,@build_os@,$build_os,;t t
23938 s,@host@,$host,;t t
23939 s,@host_cpu@,$host_cpu,;t t
23940 s,@host_vendor@,$host_vendor,;t t
23941 s,@host_os@,$host_os,;t t
23942 s,@SET_MAKE@,$SET_MAKE,;t t
23944 s,@CFLAGS@,$CFLAGS,;t t
23945 s,@LDFLAGS@,$LDFLAGS,;t t
23946 s,@CPPFLAGS@,$CPPFLAGS,;t t
23947 s,@ac_ct_CC@,$ac_ct_CC,;t t
23948 s,@EXEEXT@,$EXEEXT,;t t
23949 s,@OBJEXT@,$OBJEXT,;t t
23950 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23952 s,@GREP@,$GREP,;t t
23953 s,@EGREP@,$EGREP,;t t
23955 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23956 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23957 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23958 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23959 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23960 s,@LINT@,$LINT,;t t
23961 s,@LINT_OPTS@,$LINT_OPTS,;t t
23962 s,@LINT_LIBS@,$LINT_LIBS,;t t
23963 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
23964 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
23965 s,@CTAGS@,$CTAGS,;t t
23966 s,@ETAGS@,$ETAGS,;t t
23967 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23968 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23969 s,@MATH_LIB@,$MATH_LIB,;t t
23970 s,@top_builddir@,$top_builddir,;t t
23971 s,@CC_G_OPT@,$CC_G_OPT,;t t
23972 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23973 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23974 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23975 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23977 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23978 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23979 s,@LD_MODEL@,$LD_MODEL,;t t
23980 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23981 s,@LIBTOOL@,$LIBTOOL,;t t
23982 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23983 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23984 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23985 s,@LIB_LINK@,$LIB_LINK,;t t
23986 s,@LINK_TESTS@,$LINK_TESTS,;t t
23987 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23988 s,@PACKAGE@,$PACKAGE,;t t
23989 s,@PTHREAD@,$PTHREAD,;t t
23990 s,@TEST_ARGS@,$TEST_ARGS,;t t
23991 s,@TEST_DEPS@,$TEST_DEPS,;t t
23992 s,@TEST_LIBS@,$TEST_LIBS,;t t
23993 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23994 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23995 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23996 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23997 s,@includesubdir@,$includesubdir,;t t
23998 s,@FGREP@,$FGREP,;t t
23999 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
24000 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
24001 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24002 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24003 s,@ECHO_LT@,$ECHO_LT,;t t
24004 s,@ECHO_LD@,$ECHO_LD,;t t
24005 s,@RULE_CC@,$RULE_CC,;t t
24006 s,@SHOW_CC@,$SHOW_CC,;t t
24007 s,@ECHO_CC@,$ECHO_CC,;t t
24008 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24009 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
24010 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
24011 s,@X_CFLAGS@,$X_CFLAGS,;t t
24012 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24013 s,@X_LIBS@,$X_LIBS,;t t
24014 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24015 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24016 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24017 s,@RGB_PATH@,$RGB_PATH,;t t
24018 s,@no_x11_rgb@,$no_x11_rgb,;t t
24019 s,@FORM_NAME@,$FORM_NAME,;t t
24020 s,@MENU_NAME@,$MENU_NAME,;t t
24021 s,@PANEL_NAME@,$PANEL_NAME,;t t
24022 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24023 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24024 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24029 cat >>"$CONFIG_STATUS" <<\EOF
24030 # Split the substitutions into bite-sized pieces for seds with
24031 # small command number limits, like on Digital OSF/1 and HP-UX.
24032 ac_max_sed_lines=48
24033 ac_sed_frag=1 # Number of current file.
24034 ac_beg=1 # First line for current file.
24035 ac_end=$ac_max_sed_lines # Line after last line for current file.
24038 while "$ac_more_lines"; do
24039 if test "$ac_beg" -gt 1; then
24040 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24042 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24044 if test ! -s "$tmp"/subs.frag; then
24045 ac_more_lines=false
24047 # The purpose of the label and of the branching condition is to
24048 # speed up the sed processing (if there are no `@' at all, there
24049 # is no need to browse any of the substitutions).
24050 # These are the two extra sed commands mentioned above.
24052 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24053 # It is possible to make a multiline substitution using escaped newlines.
24054 # Ensure that we do not split the substitution between script fragments.
24056 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
24057 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
24058 if test -s "$tmp"/subs.next; then
24059 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
24060 if test ! -s "$tmp"/subs.edit; then
24061 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
24062 if test ! -s "$tmp"/subs.edit; then
24063 if test "$ac_beg" -gt 1; then
24064 ac_end=`expr "$ac_end" - 1`
24071 if test -z "$ac_sed_cmds"; then
24072 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24074 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24076 ac_sed_frag=`expr "$ac_sed_frag" + 1`
24078 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
24081 if test -z "$ac_sed_cmds"; then
24084 fi # test -n "$CONFIG_FILES"
24087 cat >>"$CONFIG_STATUS" <<\EOF
24088 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24089 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24091 - | *:- | *:-:* ) # input from stdin
24093 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24094 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24095 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24096 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24097 * ) ac_file_in=$ac_file.in ;;
24100 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24101 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24102 X"$ac_file" : 'X\(//\)[^/]' \| \
24103 X"$ac_file" : 'X\(//\)$' \| \
24104 X"$ac_file" : 'X\(/\)' \| \
24105 . : '\(.\)' 2>/dev/null ||
24107 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24108 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24109 /^X\(\/\/\)$/{ s//\1/; q; }
24110 /^X\(\/\).*/{ s//\1/; q; }
24112 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24113 { case "$ac_dir" in
24114 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24118 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24119 case $as_mkdir_dir in
24120 # Skip DOS drivespec
24121 ?:) as_incr_dir=$as_mkdir_dir ;;
24123 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24124 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24129 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
24130 # A "../" for each directory in $ac_dir_suffix.
24131 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24133 ac_dir_suffix= ac_dots=
24138 if test -z "$ac_dots"; then
24141 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24143 [\\/]* | ?:[\\/]* )
24144 ac_srcdir="$srcdir$ac_dir_suffix";
24145 ac_top_srcdir="$srcdir" ;;
24146 *) # Relative path.
24147 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24148 ac_top_srcdir="$ac_dots$srcdir" ;;
24152 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24153 *) ac_INSTALL=$ac_dots$INSTALL ;;
24156 if test x"$ac_file" != x-; then
24157 { echo "$as_me:24157: creating $ac_file" >&5
24158 echo "$as_me: creating $ac_file" >&6;}
24161 # Let's still pretend it is `configure' which instantiates (i.e., don't
24162 # use $as_me), people would be surprised to read:
24163 # /* config.h. Generated automatically by config.status. */
24164 configure_input="Generated automatically from `echo $ac_file_in |
24165 sed 's,.*/,,'` by configure."
24167 # First look for the input files in the build tree, otherwise in the
24169 ac_file_inputs=`IFS=:
24170 for f in $ac_file_in; do
24172 -) echo "$tmp"/stdin ;;
24174 # Absolute (can't be DOS-style, as IFS=:)
24175 test -f "$f" || { { echo "$as_me:24175: error: cannot find input file: $f" >&5
24176 echo "$as_me: error: cannot find input file: $f" >&2;}
24177 { (exit 1); exit 1; }; }
24180 if test -f "$f"; then
24183 elif test -f "$srcdir/$f"; then
24188 { { echo "$as_me:24188: error: cannot find input file: $f" >&5
24189 echo "$as_me: error: cannot find input file: $f" >&2;}
24190 { (exit 1); exit 1; }; }
24193 done` || { (exit 1); exit 1; }
24195 cat >>"$CONFIG_STATUS" <<\EOF
24196 ac_warn_datarootdir=no
24197 if test x"$ac_file" != x-; then
24198 for ac_item in $ac_file_inputs
24200 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24201 if test -n "$ac_seen"; then
24202 ac_used=`grep '@datarootdir@' "$ac_item"`
24203 if test -z "$ac_used"; then
24204 { echo "$as_me:24204: WARNING: datarootdir was used implicitly but not set:
24206 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24208 ac_warn_datarootdir=yes
24211 ac_seen=`grep '${datarootdir}' "$ac_item"`
24212 if test -n "$ac_seen"; then
24213 { echo "$as_me:24213: WARNING: datarootdir was used explicitly but not set:
24215 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24217 ac_warn_datarootdir=yes
24222 if test "x$ac_warn_datarootdir" = xyes; then
24223 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24227 cat >>"$CONFIG_STATUS" <<EOF
24231 cat >>"$CONFIG_STATUS" <<\EOF
24233 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24234 s,@configure_input@,$configure_input,;t t
24235 s,@srcdir@,$ac_srcdir,;t t
24236 s,@top_srcdir@,$ac_top_srcdir,;t t
24237 s,@INSTALL@,$ac_INSTALL,;t t
24238 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
24241 : "${FGREP:=grep -F}"
24242 : "${EGREP:=grep -E}"
24243 cat >>"$CONFIG_STATUS" <<EOF
24244 : "\${FGREP:=$FGREP}"
24245 : "\${EGREP:=$EGREP}"
24247 cat >>"$CONFIG_STATUS" <<\EOF
24248 if test x"$ac_file" != x-; then
24249 cp "$tmp/out" "$ac_file"
24251 for ac_name in prefix exec_prefix datarootdir
24253 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
24254 if test -n "$ac_seen"; then
24255 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24256 if test -z "$ac_init"; then
24257 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
24258 { echo "$as_me:24258: WARNING: Variable $ac_name is used but was not set:
24260 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24265 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
24266 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
24267 if test -s "$tmp"/out; then
24268 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
24269 { echo "$as_me:24269: WARNING: Some variables may not be substituted:
24271 echo "$as_me: WARNING: Some variables may not be substituted:
24281 cat >>"$CONFIG_STATUS" <<\EOF
24284 # CONFIG_HEADER section.
24287 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24288 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24290 # ac_d sets the value in "#define NAME VALUE" lines.
24291 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24292 ac_dB='[ ].*$,\1#\2'
24295 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24296 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24297 ac_iB='\([ ]\),\1#\2define\3'
24300 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24301 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24302 ac_uB='$,\1#\2define\3'
24306 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24307 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24309 - | *:- | *:-:* ) # input from stdin
24311 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24312 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24313 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24314 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24315 * ) ac_file_in=$ac_file.in ;;
24318 test x"$ac_file" != x- && { echo "$as_me:24318: creating $ac_file" >&5
24319 echo "$as_me: creating $ac_file" >&6;}
24321 # First look for the input files in the build tree, otherwise in the
24323 ac_file_inputs=`IFS=:
24324 for f in $ac_file_in; do
24326 -) echo "$tmp"/stdin ;;
24328 # Absolute (can't be DOS-style, as IFS=:)
24329 test -f "$f" || { { echo "$as_me:24329: error: cannot find input file: $f" >&5
24330 echo "$as_me: error: cannot find input file: $f" >&2;}
24331 { (exit 1); exit 1; }; }
24334 if test -f "$f"; then
24337 elif test -f "$srcdir/$f"; then
24342 { { echo "$as_me:24342: error: cannot find input file: $f" >&5
24343 echo "$as_me: error: cannot find input file: $f" >&2;}
24344 { (exit 1); exit 1; }; }
24347 done` || { (exit 1); exit 1; }
24348 # Remove the trailing spaces.
24349 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
24353 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24354 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24355 # be either 'cat' or 'sort'.
24356 cat confdefs.h | uniq >conftest.vals
24358 # Break up conftest.vals because some shells have a limit on
24359 # the size of here documents, and old seds have small limits too.
24361 rm -f conftest.tail
24362 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24363 while grep . conftest.vals >/dev/null
24365 # Write chunks of a limited-size here document to conftest.frag.
24366 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24367 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24368 echo 'CEOF' >> "$CONFIG_STATUS"
24369 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24370 rm -f conftest.vals
24371 mv conftest.tail conftest.vals
24373 rm -f conftest.vals
24375 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24377 echo ' cat >> conftest.edit <<CEOF
24378 /@DEFS@/r conftest.frag
24381 sed -f conftest.edit "$tmp"/in > "$tmp"/out
24383 mv "$tmp"/out "$tmp"/in
24384 rm -f conftest.edit conftest.frag
24385 ' >> "$CONFIG_STATUS"
24387 cat >>"$CONFIG_STATUS" <<\EOF
24388 # Let's still pretend it is `configure' which instantiates (i.e., don't
24389 # use $as_me), people would be surprised to read:
24390 # /* config.h. Generated automatically by config.status. */
24391 if test x"$ac_file" = x-; then
24392 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
24394 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
24396 cat "$tmp"/in >>"$tmp"/config.h
24398 if test x"$ac_file" != x-; then
24399 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24400 { echo "$as_me:24400: $ac_file is unchanged" >&5
24401 echo "$as_me: $ac_file is unchanged" >&6;}
24403 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24404 X"$ac_file" : 'X\(//\)[^/]' \| \
24405 X"$ac_file" : 'X\(//\)$' \| \
24406 X"$ac_file" : 'X\(/\)' \| \
24407 . : '\(.\)' 2>/dev/null ||
24409 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24410 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24411 /^X\(\/\/\)$/{ s//\1/; q; }
24412 /^X\(\/\).*/{ s//\1/; q; }
24414 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24415 { case "$ac_dir" in
24416 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24420 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24421 case $as_mkdir_dir in
24422 # Skip DOS drivespec
24423 ?:) as_incr_dir=$as_mkdir_dir ;;
24425 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24426 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24433 mv "$tmp/config.h" "$ac_file"
24436 cat "$tmp"/config.h
24437 rm -f "$tmp"/config.h
24441 cat >>"$CONFIG_STATUS" <<\EOF
24443 # CONFIG_COMMANDS section.
24445 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24446 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24447 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24454 if test ! -d "$srcdir/$cf_dir" ; then
24456 elif test -f "$srcdir/$cf_dir/programs" ; then
24457 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24461 cat >>Makefile <<TEST_EOF
24463 # These rules are generated so we do not rely on suffix rules, which do not
24464 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24465 # some, and the '\$x' confuses others).
24468 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24471 cat >>Makefile <<TEST_EOF
24473 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24474 \$(srcdir)/test.priv.h \\
24477 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24481 if test -f ../config.guess && test -f ../config.sub
24483 cat >>Makefile <<TEST_EOF
24485 # if we used CF_INHERIT for getting these files, we can remove them
24487 rm -f config.guess config.sub
24495 cat >>"$CONFIG_STATUS" <<\EOF
24497 { (exit 0); exit 0; }
24499 chmod +x "$CONFIG_STATUS"
24500 ac_clean_files=$ac_clean_files_save
24502 # configure is writing to config.log, and then calls config.status.
24503 # config.status does its own redirection, appending to config.log.
24504 # Unfortunately, on DOS this fails, as config.log is still kept open
24505 # by configure, so config.status won't be able to write to it; its
24506 # output is simply discarded. So we exec the FD to /dev/null,
24507 # effectively closing config.log, so it can be properly (re)opened and
24508 # appended to by config.status. When coming back to configure, we
24509 # need to make the FD available again.
24510 if test "$no_create" != yes; then
24513 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24515 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24516 # would make configure fail if this is the last instruction.
24517 "$ac_cs_success" || { (exit 1); exit 1; }