2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20221009.
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.20221009. 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}"
3567 #include "confdefs.h"
3568 #include "conftest.h"
3569 #include "conftest.i"
3571 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3573 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3576 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3578 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3580 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3581 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3582 extern GCC_NORETURN void foo(void);
3583 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3585 cf_printf_attribute=no
3586 cf_scanf_attribute=no
3587 for cf_attribute in scanf printf unused noreturn
3590 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3592 cf_directive="__attribute__(($cf_attribute))"
3593 echo "checking for $CC $cf_directive" 1>&5
3595 case "$cf_attribute" in
3597 cf_printf_attribute=yes
3598 cat >conftest.h <<EOF
3599 #define GCC_$cf_ATTRIBUTE 1
3603 cf_scanf_attribute=yes
3604 cat >conftest.h <<EOF
3605 #define GCC_$cf_ATTRIBUTE 1
3609 cat >conftest.h <<EOF
3610 #define GCC_$cf_ATTRIBUTE $cf_directive
3615 if { (eval echo "$as_me:3615: \"$ac_compile\"") >&5
3616 (eval $ac_compile) 2>&5
3618 echo "$as_me:3618: \$? = $ac_status" >&5
3619 (exit "$ac_status"); }; then
3620 test -n "$verbose" && echo "$as_me:3620: result: ... $cf_attribute" >&5
3621 echo "${ECHO_T}... $cf_attribute" >&6
3622 cat conftest.h >>confdefs.h
3623 case "$cf_attribute" in
3626 cat >>confdefs.h <<EOF
3627 #define GCC_NORETURN $cf_directive
3632 cf_value='/* nothing */'
3633 if test "$cf_printf_attribute" != no ; then
3634 cf_value='__attribute__((format(printf,fmt,var)))'
3636 cat >>confdefs.h <<\EOF
3637 #define GCC_PRINTF 1
3642 cat >>confdefs.h <<EOF
3643 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3648 cf_value='/* nothing */'
3649 if test "$cf_scanf_attribute" != no ; then
3650 cf_value='__attribute__((format(scanf,fmt,var)))'
3652 cat >>confdefs.h <<\EOF
3658 cat >>confdefs.h <<EOF
3659 #define GCC_SCANFLIKE(fmt,var) $cf_value
3665 cat >>confdefs.h <<EOF
3666 #define GCC_UNUSED $cf_directive
3674 ${FGREP-fgrep} define conftest.i >>confdefs.h
3679 echo "$as_me:3679: checking if you want to work around bogus compiler/loader warnings" >&5
3680 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3682 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3683 if test "${enable_string_hacks+set}" = set; then
3684 enableval="$enable_string_hacks"
3685 enable_string_hacks=$enableval
3687 enable_string_hacks=no
3689 echo "$as_me:3689: result: $enable_string_hacks" >&5
3690 echo "${ECHO_T}$enable_string_hacks" >&6
3692 if test "x$enable_string_hacks" = "xyes"; then
3694 cat >>confdefs.h <<\EOF
3695 #define USE_STRING_HACKS 1
3698 { echo "$as_me:3698: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3699 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3700 echo "$as_me:3700: checking for strlcat" >&5
3701 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3702 if test "${ac_cv_func_strlcat+set}" = set; then
3703 echo $ECHO_N "(cached) $ECHO_C" >&6
3705 cat >"conftest.$ac_ext" <<_ACEOF
3706 #line 3706 "configure"
3707 #include "confdefs.h"
3708 #define strlcat autoconf_temporary
3709 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3716 /* We use char because int might match the return type of a gcc2
3717 builtin and then its argument prototype would still apply. */
3718 char strlcat (void);
3724 /* The GNU C library defines stubs for functions which it implements
3725 to always fail with ENOSYS. Some functions are actually named
3726 something starting with __ and the normal name is an alias. */
3727 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3728 #error found stub for strlcat
3736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3737 if { (eval echo "$as_me:3737: \"$ac_link\"") >&5
3738 (eval $ac_link) 2>&5
3740 echo "$as_me:3740: \$? = $ac_status" >&5
3741 (exit "$ac_status"); } &&
3742 { ac_try='test -s "conftest$ac_exeext"'
3743 { (eval echo "$as_me:3743: \"$ac_try\"") >&5
3746 echo "$as_me:3746: \$? = $ac_status" >&5
3747 (exit "$ac_status"); }; }; then
3748 ac_cv_func_strlcat=yes
3750 echo "$as_me: failed program was:" >&5
3751 cat "conftest.$ac_ext" >&5
3752 ac_cv_func_strlcat=no
3754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3756 echo "$as_me:3756: result: $ac_cv_func_strlcat" >&5
3757 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3758 if test "$ac_cv_func_strlcat" = yes; then
3760 cat >>confdefs.h <<\EOF
3761 #define HAVE_STRLCAT 1
3766 echo "$as_me:3766: checking for strlcat in -lbsd" >&5
3767 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3768 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3769 echo $ECHO_N "(cached) $ECHO_C" >&6
3771 ac_check_lib_save_LIBS=$LIBS
3773 cat >"conftest.$ac_ext" <<_ACEOF
3774 #line 3774 "configure"
3775 #include "confdefs.h"
3777 /* Override any gcc2 internal prototype to avoid an error. */
3781 /* We use char because int might match the return type of a gcc2
3782 builtin and then its argument prototype would still apply. */
3792 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3793 if { (eval echo "$as_me:3793: \"$ac_link\"") >&5
3794 (eval $ac_link) 2>&5
3796 echo "$as_me:3796: \$? = $ac_status" >&5
3797 (exit "$ac_status"); } &&
3798 { ac_try='test -s "conftest$ac_exeext"'
3799 { (eval echo "$as_me:3799: \"$ac_try\"") >&5
3802 echo "$as_me:3802: \$? = $ac_status" >&5
3803 (exit "$ac_status"); }; }; then
3804 ac_cv_lib_bsd_strlcat=yes
3806 echo "$as_me: failed program was:" >&5
3807 cat "conftest.$ac_ext" >&5
3808 ac_cv_lib_bsd_strlcat=no
3810 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3811 LIBS=$ac_check_lib_save_LIBS
3813 echo "$as_me:3813: result: $ac_cv_lib_bsd_strlcat" >&5
3814 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3815 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3820 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3822 for cf_add_1lib in $cf_add_0lib; do
3823 for cf_add_2lib in $cf_add_libs; do
3824 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3829 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3833 for ac_header in bsd/string.h
3835 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3836 echo "$as_me:3836: checking for $ac_header" >&5
3837 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3838 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3839 echo $ECHO_N "(cached) $ECHO_C" >&6
3841 cat >"conftest.$ac_ext" <<_ACEOF
3842 #line 3842 "configure"
3843 #include "confdefs.h"
3844 #include <$ac_header>
3846 if { (eval echo "$as_me:3846: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3847 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3849 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3851 cat conftest.err >&5
3852 echo "$as_me:3852: \$? = $ac_status" >&5
3853 (exit "$ac_status"); } >/dev/null; then
3854 if test -s conftest.err; then
3855 ac_cpp_err=$ac_c_preproc_warn_flag
3862 if test -z "$ac_cpp_err"; then
3863 eval "$as_ac_Header=yes"
3865 echo "$as_me: failed program was:" >&5
3866 cat "conftest.$ac_ext" >&5
3867 eval "$as_ac_Header=no"
3869 rm -f conftest.err "conftest.$ac_ext"
3871 echo "$as_me:3871: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3872 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3873 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3874 cat >>confdefs.h <<EOF
3875 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3881 cat >>confdefs.h <<\EOF
3882 #define HAVE_STRLCAT 1
3889 for ac_func in strlcpy snprintf
3891 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3892 echo "$as_me:3892: checking for $ac_func" >&5
3893 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3894 if eval "test \"\${$as_ac_var+set}\" = set"; then
3895 echo $ECHO_N "(cached) $ECHO_C" >&6
3897 cat >"conftest.$ac_ext" <<_ACEOF
3898 #line 3898 "configure"
3899 #include "confdefs.h"
3900 #define $ac_func autoconf_temporary
3901 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3908 /* We use char because int might match the return type of a gcc2
3909 builtin and then its argument prototype would still apply. */
3910 char $ac_func (void);
3916 /* The GNU C library defines stubs for functions which it implements
3917 to always fail with ENOSYS. Some functions are actually named
3918 something starting with __ and the normal name is an alias. */
3919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3920 #error found stub for $ac_func
3928 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3929 if { (eval echo "$as_me:3929: \"$ac_link\"") >&5
3930 (eval $ac_link) 2>&5
3932 echo "$as_me:3932: \$? = $ac_status" >&5
3933 (exit "$ac_status"); } &&
3934 { ac_try='test -s "conftest$ac_exeext"'
3935 { (eval echo "$as_me:3935: \"$ac_try\"") >&5
3938 echo "$as_me:3938: \$? = $ac_status" >&5
3939 (exit "$ac_status"); }; }; then
3940 eval "$as_ac_var=yes"
3942 echo "$as_me: failed program was:" >&5
3943 cat "conftest.$ac_ext" >&5
3944 eval "$as_ac_var=no"
3946 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3948 echo "$as_me:3948: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3949 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3950 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3951 cat >>confdefs.h <<EOF
3952 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3960 echo "$as_me:3960: checking if the POSIX test-macros are already defined" >&5
3961 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3962 if test "${cf_cv_posix_visible+set}" = set; then
3963 echo $ECHO_N "(cached) $ECHO_C" >&6
3966 cat >"conftest.$ac_ext" <<_ACEOF
3967 #line 3967 "configure"
3968 #include "confdefs.h"
3974 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3975 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3976 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3977 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3978 #error conflicting symbols found
3985 rm -f "conftest.$ac_objext"
3986 if { (eval echo "$as_me:3986: \"$ac_compile\"") >&5
3987 (eval $ac_compile) 2>&5
3989 echo "$as_me:3989: \$? = $ac_status" >&5
3990 (exit "$ac_status"); } &&
3991 { ac_try='test -s "conftest.$ac_objext"'
3992 { (eval echo "$as_me:3992: \"$ac_try\"") >&5
3995 echo "$as_me:3995: \$? = $ac_status" >&5
3996 (exit "$ac_status"); }; }; then
3997 cf_cv_posix_visible=no
3999 echo "$as_me: failed program was:" >&5
4000 cat "conftest.$ac_ext" >&5
4001 cf_cv_posix_visible=yes
4003 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4006 echo "$as_me:4006: result: $cf_cv_posix_visible" >&5
4007 echo "${ECHO_T}$cf_cv_posix_visible" >&6
4009 if test "$cf_cv_posix_visible" = no; then
4012 cf_POSIX_C_SOURCE=199506L
4017 cf_xopen_source="-D_ALL_SOURCE"
4023 cf_xopen_source="-D_APPLE_C_SOURCE"
4026 cf_xopen_source="-D_DARWIN_C_SOURCE"
4029 (freebsd*|dragonfly*|midnightbsd*)
4030 # 5.x headers associate
4031 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4032 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4033 cf_POSIX_C_SOURCE=200112L
4035 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4038 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
4041 cf_xopen_source="-D_HPUX_SOURCE"
4044 cf_xopen_source="-D_SGI_SOURCE"
4047 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
4049 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
4051 echo "$as_me:4051: checking if this is the GNU C library" >&5
4052 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
4053 if test "${cf_cv_gnu_library+set}" = set; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
4057 cat >"conftest.$ac_ext" <<_ACEOF
4058 #line 4058 "configure"
4059 #include "confdefs.h"
4060 #include <sys/types.h>
4065 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4067 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4070 # error not GNU C library
4076 rm -f "conftest.$ac_objext"
4077 if { (eval echo "$as_me:4077: \"$ac_compile\"") >&5
4078 (eval $ac_compile) 2>&5
4080 echo "$as_me:4080: \$? = $ac_status" >&5
4081 (exit "$ac_status"); } &&
4082 { ac_try='test -s "conftest.$ac_objext"'
4083 { (eval echo "$as_me:4083: \"$ac_try\"") >&5
4086 echo "$as_me:4086: \$? = $ac_status" >&5
4087 (exit "$ac_status"); }; }; then
4088 cf_cv_gnu_library=yes
4090 echo "$as_me: failed program was:" >&5
4091 cat "conftest.$ac_ext" >&5
4092 cf_cv_gnu_library=no
4094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4097 echo "$as_me:4097: result: $cf_cv_gnu_library" >&5
4098 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4100 if test x$cf_cv_gnu_library = xyes; then
4102 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4103 # was changed to help a little. newlib incorporated the change about 4
4105 echo "$as_me:4105: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4106 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4107 if test "${cf_cv_gnu_library_219+set}" = set; then
4108 echo $ECHO_N "(cached) $ECHO_C" >&6
4113 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4114 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4116 cat >"conftest.$ac_ext" <<_ACEOF
4117 #line 4117 "configure"
4118 #include "confdefs.h"
4119 #include <sys/types.h>
4124 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4126 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4129 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4135 rm -f "conftest.$ac_objext"
4136 if { (eval echo "$as_me:4136: \"$ac_compile\"") >&5
4137 (eval $ac_compile) 2>&5
4139 echo "$as_me:4139: \$? = $ac_status" >&5
4140 (exit "$ac_status"); } &&
4141 { ac_try='test -s "conftest.$ac_objext"'
4142 { (eval echo "$as_me:4142: \"$ac_try\"") >&5
4145 echo "$as_me:4145: \$? = $ac_status" >&5
4146 (exit "$ac_status"); }; }; then
4147 cf_cv_gnu_library_219=yes
4149 echo "$as_me: failed program was:" >&5
4150 cat "conftest.$ac_ext" >&5
4151 cf_cv_gnu_library_219=no
4153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4157 echo "$as_me:4157: result: $cf_cv_gnu_library_219" >&5
4158 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4160 if test "x$cf_cv_gnu_library_219" = xyes; then
4162 echo "$as_me:4162: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4163 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4164 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4165 echo $ECHO_N "(cached) $ECHO_C" >&6
4171 cf_new_extra_cppflags=
4173 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4175 case "$cf_fix_cppflags" in
4177 case "$cf_add_cflags" in
4178 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4179 case "$cf_add_cflags" in
4181 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4184 && test -z "${cf_tst_cflags}" \
4185 && cf_fix_cppflags=yes
4187 if test "$cf_fix_cppflags" = yes ; then
4189 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4190 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4193 elif test "${cf_tst_cflags}" = "\"'" ; then
4195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4206 case "$cf_add_cflags" in
4208 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4210 CPPFLAGS=`echo "$CPPFLAGS" | \
4211 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4212 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4217 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4218 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4225 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4226 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4236 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4238 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4239 && test -z "${cf_tst_cflags}" \
4240 && cf_fix_cppflags=no
4245 if test -n "$cf_new_cflags" ; then
4247 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4248 CFLAGS="${CFLAGS}$cf_new_cflags"
4252 if test -n "$cf_new_cppflags" ; then
4254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4255 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4259 if test -n "$cf_new_extra_cppflags" ; then
4261 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4262 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4266 cat >"conftest.$ac_ext" <<_ACEOF
4267 #line 4267 "configure"
4268 #include "confdefs.h"
4271 #include <sys/types.h>
4277 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4280 # error GNU C library is too old
4286 rm -f "conftest.$ac_objext"
4287 if { (eval echo "$as_me:4287: \"$ac_compile\"") >&5
4288 (eval $ac_compile) 2>&5
4290 echo "$as_me:4290: \$? = $ac_status" >&5
4291 (exit "$ac_status"); } &&
4292 { ac_try='test -s "conftest.$ac_objext"'
4293 { (eval echo "$as_me:4293: \"$ac_try\"") >&5
4296 echo "$as_me:4296: \$? = $ac_status" >&5
4297 (exit "$ac_status"); }; }; then
4298 cf_cv_gnu_dftsrc_219=yes
4300 echo "$as_me: failed program was:" >&5
4301 cat "conftest.$ac_ext" >&5
4302 cf_cv_gnu_dftsrc_219=no
4304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4307 echo "$as_me:4307: result: $cf_cv_gnu_dftsrc_219" >&5
4308 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4309 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4311 cf_cv_gnu_dftsrc_219=maybe
4314 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4316 echo "$as_me:4316: checking if we must define _GNU_SOURCE" >&5
4317 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4318 if test "${cf_cv_gnu_source+set}" = set; then
4319 echo $ECHO_N "(cached) $ECHO_C" >&6
4322 cat >"conftest.$ac_ext" <<_ACEOF
4323 #line 4323 "configure"
4324 #include "confdefs.h"
4325 #include <sys/types.h>
4330 #ifndef _XOPEN_SOURCE
4331 #error expected _XOPEN_SOURCE to be defined
4337 rm -f "conftest.$ac_objext"
4338 if { (eval echo "$as_me:4338: \"$ac_compile\"") >&5
4339 (eval $ac_compile) 2>&5
4341 echo "$as_me:4341: \$? = $ac_status" >&5
4342 (exit "$ac_status"); } &&
4343 { ac_try='test -s "conftest.$ac_objext"'
4344 { (eval echo "$as_me:4344: \"$ac_try\"") >&5
4347 echo "$as_me:4347: \$? = $ac_status" >&5
4348 (exit "$ac_status"); }; }; then
4351 echo "$as_me: failed program was:" >&5
4352 cat "conftest.$ac_ext" >&5
4358 cf_new_extra_cppflags=
4360 for cf_add_cflags in -D_GNU_SOURCE
4362 case "$cf_fix_cppflags" in
4364 case "$cf_add_cflags" in
4365 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4366 case "$cf_add_cflags" in
4368 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4370 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4371 && test -z "${cf_tst_cflags}" \
4372 && cf_fix_cppflags=yes
4374 if test "$cf_fix_cppflags" = yes ; then
4376 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4377 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4380 elif test "${cf_tst_cflags}" = "\"'" ; then
4382 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4383 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4393 case "$cf_add_cflags" in
4395 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4397 CPPFLAGS=`echo "$CPPFLAGS" | \
4398 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4399 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4404 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4405 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4412 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4413 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4420 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4421 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4423 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4425 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4426 && test -z "${cf_tst_cflags}" \
4427 && cf_fix_cppflags=no
4432 if test -n "$cf_new_cflags" ; then
4434 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4435 CFLAGS="${CFLAGS}$cf_new_cflags"
4439 if test -n "$cf_new_cppflags" ; then
4441 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4442 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4446 if test -n "$cf_new_extra_cppflags" ; then
4448 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4449 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4453 cat >"conftest.$ac_ext" <<_ACEOF
4454 #line 4454 "configure"
4455 #include "confdefs.h"
4456 #include <sys/types.h>
4461 #ifdef _XOPEN_SOURCE
4462 #error expected _XOPEN_SOURCE to be undefined
4468 rm -f "conftest.$ac_objext"
4469 if { (eval echo "$as_me:4469: \"$ac_compile\"") >&5
4470 (eval $ac_compile) 2>&5
4472 echo "$as_me:4472: \$? = $ac_status" >&5
4473 (exit "$ac_status"); } &&
4474 { ac_try='test -s "conftest.$ac_objext"'
4475 { (eval echo "$as_me:4475: \"$ac_try\"") >&5
4478 echo "$as_me:4478: \$? = $ac_status" >&5
4479 (exit "$ac_status"); }; }; then
4482 echo "$as_me: failed program was:" >&5
4483 cat "conftest.$ac_ext" >&5
4484 cf_cv_gnu_source=yes
4486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4493 echo "$as_me:4493: result: $cf_cv_gnu_source" >&5
4494 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4496 if test "$cf_cv_gnu_source" = yes
4498 echo "$as_me:4498: checking if we should also define _DEFAULT_SOURCE" >&5
4499 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4500 if test "${cf_cv_default_source+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4504 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4505 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4507 cat >"conftest.$ac_ext" <<_ACEOF
4508 #line 4508 "configure"
4509 #include "confdefs.h"
4510 #include <sys/types.h>
4515 #ifdef _DEFAULT_SOURCE
4516 #error expected _DEFAULT_SOURCE to be undefined
4522 rm -f "conftest.$ac_objext"
4523 if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524 (eval $ac_compile) 2>&5
4526 echo "$as_me:4526: \$? = $ac_status" >&5
4527 (exit "$ac_status"); } &&
4528 { ac_try='test -s "conftest.$ac_objext"'
4529 { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit "$ac_status"); }; }; then
4534 cf_cv_default_source=no
4536 echo "$as_me: failed program was:" >&5
4537 cat "conftest.$ac_ext" >&5
4538 cf_cv_default_source=yes
4540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4543 echo "$as_me:4543: result: $cf_cv_default_source" >&5
4544 echo "${ECHO_T}$cf_cv_default_source" >&6
4545 if test "$cf_cv_default_source" = yes
4548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4549 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4559 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4562 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4565 if test "$cf_cv_posix_visible" = no; then
4567 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4569 cf_save_CFLAGS="$CFLAGS"
4570 cf_save_CPPFLAGS="$CPPFLAGS"
4572 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4573 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4574 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4576 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4577 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4578 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4580 echo "$as_me:4580: checking if we should define _POSIX_C_SOURCE" >&5
4581 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4582 if test "${cf_cv_posix_c_source+set}" = set; then
4583 echo $ECHO_N "(cached) $ECHO_C" >&6
4586 echo "${as_me:-configure}:4586: testing if the symbol is already defined go no further ..." 1>&5
4588 cat >"conftest.$ac_ext" <<_ACEOF
4589 #line 4589 "configure"
4590 #include "confdefs.h"
4591 #include <sys/types.h>
4596 #ifndef _POSIX_C_SOURCE
4603 rm -f "conftest.$ac_objext"
4604 if { (eval echo "$as_me:4604: \"$ac_compile\"") >&5
4605 (eval $ac_compile) 2>&5
4607 echo "$as_me:4607: \$? = $ac_status" >&5
4608 (exit "$ac_status"); } &&
4609 { ac_try='test -s "conftest.$ac_objext"'
4610 { (eval echo "$as_me:4610: \"$ac_try\"") >&5
4613 echo "$as_me:4613: \$? = $ac_status" >&5
4614 (exit "$ac_status"); }; }; then
4615 cf_cv_posix_c_source=no
4617 echo "$as_me: failed program was:" >&5
4618 cat "conftest.$ac_ext" >&5
4619 cf_want_posix_source=no
4620 case .$cf_POSIX_C_SOURCE in
4622 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4625 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4626 cf_want_posix_source=yes
4629 cf_want_posix_source=yes
4632 if test "$cf_want_posix_source" = yes ; then
4633 cat >"conftest.$ac_ext" <<_ACEOF
4634 #line 4634 "configure"
4635 #include "confdefs.h"
4636 #include <sys/types.h>
4641 #ifdef _POSIX_SOURCE
4648 rm -f "conftest.$ac_objext"
4649 if { (eval echo "$as_me:4649: \"$ac_compile\"") >&5
4650 (eval $ac_compile) 2>&5
4652 echo "$as_me:4652: \$? = $ac_status" >&5
4653 (exit "$ac_status"); } &&
4654 { ac_try='test -s "conftest.$ac_objext"'
4655 { (eval echo "$as_me:4655: \"$ac_try\"") >&5
4658 echo "$as_me:4658: \$? = $ac_status" >&5
4659 (exit "$ac_status"); }; }; then
4662 echo "$as_me: failed program was:" >&5
4663 cat "conftest.$ac_ext" >&5
4664 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4666 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4669 echo "${as_me:-configure}:4669: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4671 CFLAGS="$cf_trim_CFLAGS"
4672 CPPFLAGS="$cf_trim_CPPFLAGS"
4674 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4675 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4677 echo "${as_me:-configure}:4677: testing if the second compile does not leave our definition intact error ..." 1>&5
4679 cat >"conftest.$ac_ext" <<_ACEOF
4680 #line 4680 "configure"
4681 #include "confdefs.h"
4682 #include <sys/types.h>
4687 #ifndef _POSIX_C_SOURCE
4694 rm -f "conftest.$ac_objext"
4695 if { (eval echo "$as_me:4695: \"$ac_compile\"") >&5
4696 (eval $ac_compile) 2>&5
4698 echo "$as_me:4698: \$? = $ac_status" >&5
4699 (exit "$ac_status"); } &&
4700 { ac_try='test -s "conftest.$ac_objext"'
4701 { (eval echo "$as_me:4701: \"$ac_try\"") >&5
4704 echo "$as_me:4704: \$? = $ac_status" >&5
4705 (exit "$ac_status"); }; }; then
4708 echo "$as_me: failed program was:" >&5
4709 cat "conftest.$ac_ext" >&5
4710 cf_cv_posix_c_source=no
4712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4713 CFLAGS="$cf_save_CFLAGS"
4714 CPPFLAGS="$cf_save_CPPFLAGS"
4717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4720 echo "$as_me:4720: result: $cf_cv_posix_c_source" >&5
4721 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4723 if test "$cf_cv_posix_c_source" != no ; then
4724 CFLAGS="$cf_trim_CFLAGS"
4725 CPPFLAGS="$cf_trim_CPPFLAGS"
4730 cf_new_extra_cppflags=
4732 for cf_add_cflags in $cf_cv_posix_c_source
4734 case "$cf_fix_cppflags" in
4736 case "$cf_add_cflags" in
4737 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4738 case "$cf_add_cflags" in
4740 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4742 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4743 && test -z "${cf_tst_cflags}" \
4744 && cf_fix_cppflags=yes
4746 if test "$cf_fix_cppflags" = yes ; then
4748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4752 elif test "${cf_tst_cflags}" = "\"'" ; then
4754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4765 case "$cf_add_cflags" in
4767 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4769 CPPFLAGS=`echo "$CPPFLAGS" | \
4770 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4771 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4776 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4777 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4784 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4785 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4792 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4793 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4795 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4798 && test -z "${cf_tst_cflags}" \
4799 && cf_fix_cppflags=no
4804 if test -n "$cf_new_cflags" ; then
4806 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4807 CFLAGS="${CFLAGS}$cf_new_cflags"
4811 if test -n "$cf_new_cppflags" ; then
4813 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4814 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4818 if test -n "$cf_new_extra_cppflags" ; then
4820 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4821 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4827 fi # cf_cv_posix_visible
4831 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4834 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4835 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4836 # Abusing the conformance level is a workaround.
4837 { echo "$as_me:4837: WARNING: this system does not provide usable locale support" >&5
4838 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4839 cf_xopen_source="-D_BSD_SOURCE"
4843 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4844 cf_xopen_source="-D_BSD_SOURCE"
4848 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4851 cf_xopen_source="-D_OSF_SOURCE"
4854 cf_xopen_source="-D_QNX_SOURCE"
4857 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4860 cf_xopen_source="-D__EXTENSIONS__"
4861 cf_cv_xopen_source=broken
4863 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4869 echo "$as_me:4869: checking if we should define _XOPEN_SOURCE" >&5
4870 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4871 if test "${cf_cv_xopen_source+set}" = set; then
4872 echo $ECHO_N "(cached) $ECHO_C" >&6
4875 cat >"conftest.$ac_ext" <<_ACEOF
4876 #line 4876 "configure"
4877 #include "confdefs.h"
4881 #include <sys/types.h>
4887 #ifndef _XOPEN_SOURCE
4895 rm -f "conftest.$ac_objext"
4896 if { (eval echo "$as_me:4896: \"$ac_compile\"") >&5
4897 (eval $ac_compile) 2>&5
4899 echo "$as_me:4899: \$? = $ac_status" >&5
4900 (exit "$ac_status"); } &&
4901 { ac_try='test -s "conftest.$ac_objext"'
4902 { (eval echo "$as_me:4902: \"$ac_try\"") >&5
4905 echo "$as_me:4905: \$? = $ac_status" >&5
4906 (exit "$ac_status"); }; }; then
4907 cf_cv_xopen_source=no
4909 echo "$as_me: failed program was:" >&5
4910 cat "conftest.$ac_ext" >&5
4913 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4914 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4916 cat >"conftest.$ac_ext" <<_ACEOF
4917 #line 4917 "configure"
4918 #include "confdefs.h"
4922 #include <sys/types.h>
4928 #ifndef _XOPEN_SOURCE
4936 rm -f "conftest.$ac_objext"
4937 if { (eval echo "$as_me:4937: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4940 echo "$as_me:4940: \$? = $ac_status" >&5
4941 (exit "$ac_status"); } &&
4942 { ac_try='test -s "conftest.$ac_objext"'
4943 { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit "$ac_status"); }; }; then
4948 cf_cv_xopen_source=no
4950 echo "$as_me: failed program was:" >&5
4951 cat "conftest.$ac_ext" >&5
4952 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4961 echo "$as_me:4961: result: $cf_cv_xopen_source" >&5
4962 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4964 if test "$cf_cv_xopen_source" != no ; then
4966 CFLAGS=`echo "$CFLAGS" | \
4967 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4968 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4970 CPPFLAGS=`echo "$CPPFLAGS" | \
4971 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4972 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4974 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4976 for cf_add_cflags in $cf_temp_xopen_source
4978 case "x$cf_add_cflags" in
4981 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4984 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'`
4985 test "$CFLAGS" != "$cf_old_cflag" || break
4987 CFLAGS="$cf_old_cflag"
4990 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4993 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'`
4994 test "$CPPFLAGS" != "$cf_old_cflag" || break
4996 CPPFLAGS="$cf_old_cflag"
5005 cf_new_extra_cppflags=
5007 for cf_add_cflags in $cf_add_cflags
5009 case "$cf_fix_cppflags" in
5011 case "$cf_add_cflags" in
5012 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5013 case "$cf_add_cflags" in
5015 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5017 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5018 && test -z "${cf_tst_cflags}" \
5019 && cf_fix_cppflags=yes
5021 if test "$cf_fix_cppflags" = yes ; then
5023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5027 elif test "${cf_tst_cflags}" = "\"'" ; then
5029 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5030 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5040 case "$cf_add_cflags" in
5042 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5044 CPPFLAGS=`echo "$CPPFLAGS" | \
5045 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5046 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5051 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5052 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5059 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5060 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5067 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5068 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5070 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5072 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5073 && test -z "${cf_tst_cflags}" \
5074 && cf_fix_cppflags=no
5079 if test -n "$cf_new_cflags" ; then
5081 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5082 CFLAGS="${CFLAGS}$cf_new_cflags"
5086 if test -n "$cf_new_cppflags" ; then
5088 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5089 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5093 if test -n "$cf_new_extra_cppflags" ; then
5095 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5096 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5104 cf_save_xopen_cppflags="$CPPFLAGS"
5106 if test "$cf_cv_posix_visible" = no; then
5108 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5110 cf_save_CFLAGS="$CFLAGS"
5111 cf_save_CPPFLAGS="$CPPFLAGS"
5113 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5114 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5115 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5117 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5118 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5119 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5121 echo "$as_me:5121: checking if we should define _POSIX_C_SOURCE" >&5
5122 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5123 if test "${cf_cv_posix_c_source+set}" = set; then
5124 echo $ECHO_N "(cached) $ECHO_C" >&6
5127 echo "${as_me:-configure}:5127: testing if the symbol is already defined go no further ..." 1>&5
5129 cat >"conftest.$ac_ext" <<_ACEOF
5130 #line 5130 "configure"
5131 #include "confdefs.h"
5132 #include <sys/types.h>
5137 #ifndef _POSIX_C_SOURCE
5144 rm -f "conftest.$ac_objext"
5145 if { (eval echo "$as_me:5145: \"$ac_compile\"") >&5
5146 (eval $ac_compile) 2>&5
5148 echo "$as_me:5148: \$? = $ac_status" >&5
5149 (exit "$ac_status"); } &&
5150 { ac_try='test -s "conftest.$ac_objext"'
5151 { (eval echo "$as_me:5151: \"$ac_try\"") >&5
5154 echo "$as_me:5154: \$? = $ac_status" >&5
5155 (exit "$ac_status"); }; }; then
5156 cf_cv_posix_c_source=no
5158 echo "$as_me: failed program was:" >&5
5159 cat "conftest.$ac_ext" >&5
5160 cf_want_posix_source=no
5161 case .$cf_POSIX_C_SOURCE in
5163 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5166 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5167 cf_want_posix_source=yes
5170 cf_want_posix_source=yes
5173 if test "$cf_want_posix_source" = yes ; then
5174 cat >"conftest.$ac_ext" <<_ACEOF
5175 #line 5175 "configure"
5176 #include "confdefs.h"
5177 #include <sys/types.h>
5182 #ifdef _POSIX_SOURCE
5189 rm -f "conftest.$ac_objext"
5190 if { (eval echo "$as_me:5190: \"$ac_compile\"") >&5
5191 (eval $ac_compile) 2>&5
5193 echo "$as_me:5193: \$? = $ac_status" >&5
5194 (exit "$ac_status"); } &&
5195 { ac_try='test -s "conftest.$ac_objext"'
5196 { (eval echo "$as_me:5196: \"$ac_try\"") >&5
5199 echo "$as_me:5199: \$? = $ac_status" >&5
5200 (exit "$ac_status"); }; }; then
5203 echo "$as_me: failed program was:" >&5
5204 cat "conftest.$ac_ext" >&5
5205 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5210 echo "${as_me:-configure}:5210: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5212 CFLAGS="$cf_trim_CFLAGS"
5213 CPPFLAGS="$cf_trim_CPPFLAGS"
5215 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5216 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5218 echo "${as_me:-configure}:5218: testing if the second compile does not leave our definition intact error ..." 1>&5
5220 cat >"conftest.$ac_ext" <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5223 #include <sys/types.h>
5228 #ifndef _POSIX_C_SOURCE
5235 rm -f "conftest.$ac_objext"
5236 if { (eval echo "$as_me:5236: \"$ac_compile\"") >&5
5237 (eval $ac_compile) 2>&5
5239 echo "$as_me:5239: \$? = $ac_status" >&5
5240 (exit "$ac_status"); } &&
5241 { ac_try='test -s "conftest.$ac_objext"'
5242 { (eval echo "$as_me:5242: \"$ac_try\"") >&5
5245 echo "$as_me:5245: \$? = $ac_status" >&5
5246 (exit "$ac_status"); }; }; then
5249 echo "$as_me: failed program was:" >&5
5250 cat "conftest.$ac_ext" >&5
5251 cf_cv_posix_c_source=no
5253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5254 CFLAGS="$cf_save_CFLAGS"
5255 CPPFLAGS="$cf_save_CPPFLAGS"
5258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5261 echo "$as_me:5261: result: $cf_cv_posix_c_source" >&5
5262 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5264 if test "$cf_cv_posix_c_source" != no ; then
5265 CFLAGS="$cf_trim_CFLAGS"
5266 CPPFLAGS="$cf_trim_CPPFLAGS"
5271 cf_new_extra_cppflags=
5273 for cf_add_cflags in $cf_cv_posix_c_source
5275 case "$cf_fix_cppflags" in
5277 case "$cf_add_cflags" in
5278 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5279 case "$cf_add_cflags" in
5281 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5283 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5284 && test -z "${cf_tst_cflags}" \
5285 && cf_fix_cppflags=yes
5287 if test "$cf_fix_cppflags" = yes ; then
5289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5293 elif test "${cf_tst_cflags}" = "\"'" ; then
5295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5306 case "$cf_add_cflags" in
5308 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5310 CPPFLAGS=`echo "$CPPFLAGS" | \
5311 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5312 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5317 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5318 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5325 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5326 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5333 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5334 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5336 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5339 && test -z "${cf_tst_cflags}" \
5340 && cf_fix_cppflags=no
5345 if test -n "$cf_new_cflags" ; then
5347 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5348 CFLAGS="${CFLAGS}$cf_new_cflags"
5352 if test -n "$cf_new_cppflags" ; then
5354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5359 if test -n "$cf_new_extra_cppflags" ; then
5361 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5362 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5368 fi # cf_cv_posix_visible
5370 # Some of these niche implementations use copy/paste, double-check...
5371 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
5373 echo "${as_me:-configure}:5373: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
5375 cat >"conftest.$ac_ext" <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5381 #include <sys/types.h>
5387 #ifndef _XOPEN_SOURCE
5395 rm -f "conftest.$ac_objext"
5396 if { (eval echo "$as_me:5396: \"$ac_compile\"") >&5
5397 (eval $ac_compile) 2>&5
5399 echo "$as_me:5399: \$? = $ac_status" >&5
5400 (exit "$ac_status"); } &&
5401 { ac_try='test -s "conftest.$ac_objext"'
5402 { (eval echo "$as_me:5402: \"$ac_try\"") >&5
5405 echo "$as_me:5405: \$? = $ac_status" >&5
5406 (exit "$ac_status"); }; }; then
5409 echo "$as_me: failed program was:" >&5
5410 cat "conftest.$ac_ext" >&5
5412 { echo "$as_me:5412: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5413 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5414 CPPFLAGS="$cf_save_xopen_cppflags"
5416 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5420 if test -n "$cf_xopen_source" ; then
5422 for cf_add_cflags in $cf_xopen_source
5424 case "x$cf_add_cflags" in
5427 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5430 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'`
5431 test "$CFLAGS" != "$cf_old_cflag" || break
5432 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5434 echo "${as_me:-configure}:5434: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5436 CFLAGS="$cf_old_cflag"
5439 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5442 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'`
5443 test "$CPPFLAGS" != "$cf_old_cflag" || break
5444 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5446 echo "${as_me:-configure}:5446: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5448 CPPFLAGS="$cf_old_cflag"
5457 cf_new_extra_cppflags=
5459 for cf_add_cflags in $cf_add_cflags
5461 case "$cf_fix_cppflags" in
5463 case "$cf_add_cflags" in
5464 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5465 case "$cf_add_cflags" in
5467 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5469 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5470 && test -z "${cf_tst_cflags}" \
5471 && cf_fix_cppflags=yes
5473 if test "$cf_fix_cppflags" = yes ; then
5475 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5476 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5479 elif test "${cf_tst_cflags}" = "\"'" ; then
5481 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5482 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5492 case "$cf_add_cflags" in
5494 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5496 CPPFLAGS=`echo "$CPPFLAGS" | \
5497 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5498 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5503 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5504 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5511 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5512 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5519 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5520 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5522 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5524 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5525 && test -z "${cf_tst_cflags}" \
5526 && cf_fix_cppflags=no
5531 if test -n "$cf_new_cflags" ; then
5532 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5534 echo "${as_me:-configure}:5534: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5537 CFLAGS="${CFLAGS}$cf_new_cflags"
5541 if test -n "$cf_new_cppflags" ; then
5542 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5544 echo "${as_me:-configure}:5544: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5546 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5547 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5551 if test -n "$cf_new_extra_cppflags" ; then
5552 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5554 echo "${as_me:-configure}:5554: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5556 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5557 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5565 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5566 echo "$as_me:5566: checking if _XOPEN_SOURCE really is set" >&5
5567 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5568 cat >"conftest.$ac_ext" <<_ACEOF
5569 #line 5569 "configure"
5570 #include "confdefs.h"
5576 #ifndef _XOPEN_SOURCE
5583 rm -f "conftest.$ac_objext"
5584 if { (eval echo "$as_me:5584: \"$ac_compile\"") >&5
5585 (eval $ac_compile) 2>&5
5587 echo "$as_me:5587: \$? = $ac_status" >&5
5588 (exit "$ac_status"); } &&
5589 { ac_try='test -s "conftest.$ac_objext"'
5590 { (eval echo "$as_me:5590: \"$ac_try\"") >&5
5593 echo "$as_me:5593: \$? = $ac_status" >&5
5594 (exit "$ac_status"); }; }; then
5595 cf_XOPEN_SOURCE_set=yes
5597 echo "$as_me: failed program was:" >&5
5598 cat "conftest.$ac_ext" >&5
5599 cf_XOPEN_SOURCE_set=no
5601 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5602 echo "$as_me:5602: result: $cf_XOPEN_SOURCE_set" >&5
5603 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5604 if test "$cf_XOPEN_SOURCE_set" = yes
5606 cat >"conftest.$ac_ext" <<_ACEOF
5607 #line 5607 "configure"
5608 #include "confdefs.h"
5614 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5621 rm -f "conftest.$ac_objext"
5622 if { (eval echo "$as_me:5622: \"$ac_compile\"") >&5
5623 (eval $ac_compile) 2>&5
5625 echo "$as_me:5625: \$? = $ac_status" >&5
5626 (exit "$ac_status"); } &&
5627 { ac_try='test -s "conftest.$ac_objext"'
5628 { (eval echo "$as_me:5628: \"$ac_try\"") >&5
5631 echo "$as_me:5631: \$? = $ac_status" >&5
5632 (exit "$ac_status"); }; }; then
5633 cf_XOPEN_SOURCE_set_ok=yes
5635 echo "$as_me: failed program was:" >&5
5636 cat "conftest.$ac_ext" >&5
5637 cf_XOPEN_SOURCE_set_ok=no
5639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5640 if test "$cf_XOPEN_SOURCE_set_ok" = no
5642 { echo "$as_me:5642: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5643 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5647 echo "$as_me:5647: checking if we should define _XOPEN_SOURCE" >&5
5648 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5649 if test "${cf_cv_xopen_source+set}" = set; then
5650 echo $ECHO_N "(cached) $ECHO_C" >&6
5653 cat >"conftest.$ac_ext" <<_ACEOF
5654 #line 5654 "configure"
5655 #include "confdefs.h"
5659 #include <sys/types.h>
5665 #ifndef _XOPEN_SOURCE
5673 rm -f "conftest.$ac_objext"
5674 if { (eval echo "$as_me:5674: \"$ac_compile\"") >&5
5675 (eval $ac_compile) 2>&5
5677 echo "$as_me:5677: \$? = $ac_status" >&5
5678 (exit "$ac_status"); } &&
5679 { ac_try='test -s "conftest.$ac_objext"'
5680 { (eval echo "$as_me:5680: \"$ac_try\"") >&5
5683 echo "$as_me:5683: \$? = $ac_status" >&5
5684 (exit "$ac_status"); }; }; then
5685 cf_cv_xopen_source=no
5687 echo "$as_me: failed program was:" >&5
5688 cat "conftest.$ac_ext" >&5
5691 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5692 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5694 cat >"conftest.$ac_ext" <<_ACEOF
5695 #line 5695 "configure"
5696 #include "confdefs.h"
5700 #include <sys/types.h>
5706 #ifndef _XOPEN_SOURCE
5714 rm -f "conftest.$ac_objext"
5715 if { (eval echo "$as_me:5715: \"$ac_compile\"") >&5
5716 (eval $ac_compile) 2>&5
5718 echo "$as_me:5718: \$? = $ac_status" >&5
5719 (exit "$ac_status"); } &&
5720 { ac_try='test -s "conftest.$ac_objext"'
5721 { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5724 echo "$as_me:5724: \$? = $ac_status" >&5
5725 (exit "$ac_status"); }; }; then
5726 cf_cv_xopen_source=no
5728 echo "$as_me: failed program was:" >&5
5729 cat "conftest.$ac_ext" >&5
5730 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5739 echo "$as_me:5739: result: $cf_cv_xopen_source" >&5
5740 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5742 if test "$cf_cv_xopen_source" != no ; then
5744 CFLAGS=`echo "$CFLAGS" | \
5745 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5746 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5748 CPPFLAGS=`echo "$CPPFLAGS" | \
5749 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5750 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5752 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5754 for cf_add_cflags in $cf_temp_xopen_source
5756 case "x$cf_add_cflags" in
5759 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5762 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'`
5763 test "$CFLAGS" != "$cf_old_cflag" || break
5765 CFLAGS="$cf_old_cflag"
5768 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5771 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'`
5772 test "$CPPFLAGS" != "$cf_old_cflag" || break
5774 CPPFLAGS="$cf_old_cflag"
5783 cf_new_extra_cppflags=
5785 for cf_add_cflags in $cf_add_cflags
5787 case "$cf_fix_cppflags" in
5789 case "$cf_add_cflags" in
5790 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5791 case "$cf_add_cflags" in
5793 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5795 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5796 && test -z "${cf_tst_cflags}" \
5797 && cf_fix_cppflags=yes
5799 if test "$cf_fix_cppflags" = yes ; then
5801 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5802 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5805 elif test "${cf_tst_cflags}" = "\"'" ; then
5807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5818 case "$cf_add_cflags" in
5820 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5822 CPPFLAGS=`echo "$CPPFLAGS" | \
5823 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5824 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5829 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5830 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5837 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5838 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5848 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5850 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5851 && test -z "${cf_tst_cflags}" \
5852 && cf_fix_cppflags=no
5857 if test -n "$cf_new_cflags" ; then
5859 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5860 CFLAGS="${CFLAGS}$cf_new_cflags"
5864 if test -n "$cf_new_cppflags" ; then
5866 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5867 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5871 if test -n "$cf_new_extra_cppflags" ; then
5873 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5874 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5884 fi # cf_cv_posix_visible
5886 echo "$as_me:5886: checking for signal global datatype" >&5
5887 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5888 if test "${cf_cv_sig_atomic_t+set}" = set; then
5889 echo $ECHO_N "(cached) $ECHO_C" >&6
5893 "volatile sig_atomic_t" \
5897 cat >"conftest.$ac_ext" <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5901 #include <sys/types.h>
5907 static void handler(int sig)
5915 signal(SIGINT, handler);
5921 rm -f "conftest.$ac_objext"
5922 if { (eval echo "$as_me:5922: \"$ac_compile\"") >&5
5923 (eval $ac_compile) 2>&5
5925 echo "$as_me:5925: \$? = $ac_status" >&5
5926 (exit "$ac_status"); } &&
5927 { ac_try='test -s "conftest.$ac_objext"'
5928 { (eval echo "$as_me:5928: \"$ac_try\"") >&5
5931 echo "$as_me:5931: \$? = $ac_status" >&5
5932 (exit "$ac_status"); }; }; then
5933 cf_cv_sig_atomic_t=$cf_type
5935 echo "$as_me: failed program was:" >&5
5936 cat "conftest.$ac_ext" >&5
5937 cf_cv_sig_atomic_t=no
5939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5940 test "$cf_cv_sig_atomic_t" != no && break
5945 echo "$as_me:5945: result: $cf_cv_sig_atomic_t" >&5
5946 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5947 test "$cf_cv_sig_atomic_t" != no &&
5948 cat >>confdefs.h <<EOF
5949 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5952 # Work around breakage on OS X
5954 echo "$as_me:5954: checking if SIGWINCH is defined" >&5
5955 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5956 if test "${cf_cv_define_sigwinch+set}" = set; then
5957 echo $ECHO_N "(cached) $ECHO_C" >&6
5960 cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5964 #include <sys/types.h>
5965 #include <sys/signal.h>
5970 int x = SIGWINCH; (void)x
5975 rm -f "conftest.$ac_objext"
5976 if { (eval echo "$as_me:5976: \"$ac_compile\"") >&5
5977 (eval $ac_compile) 2>&5
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit "$ac_status"); } &&
5981 { ac_try='test -s "conftest.$ac_objext"'
5982 { (eval echo "$as_me:5982: \"$ac_try\"") >&5
5985 echo "$as_me:5985: \$? = $ac_status" >&5
5986 (exit "$ac_status"); }; }; then
5987 cf_cv_define_sigwinch=yes
5989 echo "$as_me: failed program was:" >&5
5990 cat "conftest.$ac_ext" >&5
5991 cat >"conftest.$ac_ext" <<_ACEOF
5992 #line 5992 "configure"
5993 #include "confdefs.h"
5995 #undef _XOPEN_SOURCE
5996 #undef _POSIX_SOURCE
5997 #undef _POSIX_C_SOURCE
5998 #include <sys/types.h>
5999 #include <sys/signal.h>
6004 int x = SIGWINCH; (void)x
6009 rm -f "conftest.$ac_objext"
6010 if { (eval echo "$as_me:6010: \"$ac_compile\"") >&5
6011 (eval $ac_compile) 2>&5
6013 echo "$as_me:6013: \$? = $ac_status" >&5
6014 (exit "$ac_status"); } &&
6015 { ac_try='test -s "conftest.$ac_objext"'
6016 { (eval echo "$as_me:6016: \"$ac_try\"") >&5
6019 echo "$as_me:6019: \$? = $ac_status" >&5
6020 (exit "$ac_status"); }; }; then
6021 cf_cv_define_sigwinch=maybe
6023 echo "$as_me: failed program was:" >&5
6024 cat "conftest.$ac_ext" >&5
6025 cf_cv_define_sigwinch=no
6027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6033 echo "$as_me:6033: result: $cf_cv_define_sigwinch" >&5
6034 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6036 if test "$cf_cv_define_sigwinch" = maybe ; then
6037 echo "$as_me:6037: checking for actual SIGWINCH definition" >&5
6038 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6039 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6040 echo $ECHO_N "(cached) $ECHO_C" >&6
6043 cf_cv_fixup_sigwinch=unknown
6045 while test "$cf_sigwinch" != 1
6047 cat >"conftest.$ac_ext" <<_ACEOF
6048 #line 6048 "configure"
6049 #include "confdefs.h"
6051 #undef _XOPEN_SOURCE
6052 #undef _POSIX_SOURCE
6053 #undef _POSIX_C_SOURCE
6054 #include <sys/types.h>
6055 #include <sys/signal.h>
6061 #if SIGWINCH != $cf_sigwinch
6064 int x = SIGWINCH; (void)x
6069 rm -f "conftest.$ac_objext"
6070 if { (eval echo "$as_me:6070: \"$ac_compile\"") >&5
6071 (eval $ac_compile) 2>&5
6073 echo "$as_me:6073: \$? = $ac_status" >&5
6074 (exit "$ac_status"); } &&
6075 { ac_try='test -s "conftest.$ac_objext"'
6076 { (eval echo "$as_me:6076: \"$ac_try\"") >&5
6079 echo "$as_me:6079: \$? = $ac_status" >&5
6080 (exit "$ac_status"); }; }; then
6081 cf_cv_fixup_sigwinch=$cf_sigwinch
6084 echo "$as_me: failed program was:" >&5
6085 cat "conftest.$ac_ext" >&5
6087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6089 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6093 echo "$as_me:6093: result: $cf_cv_fixup_sigwinch" >&5
6094 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6096 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6097 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6101 # Checks for CODESET support.
6103 echo "$as_me:6103: checking for nl_langinfo and CODESET" >&5
6104 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6105 if test "${am_cv_langinfo_codeset+set}" = set; then
6106 echo $ECHO_N "(cached) $ECHO_C" >&6
6108 cat >"conftest.$ac_ext" <<_ACEOF
6109 #line 6109 "configure"
6110 #include "confdefs.h"
6111 #include <langinfo.h>
6115 char* cs = nl_langinfo(CODESET); (void)cs
6120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6121 if { (eval echo "$as_me:6121: \"$ac_link\"") >&5
6122 (eval $ac_link) 2>&5
6124 echo "$as_me:6124: \$? = $ac_status" >&5
6125 (exit "$ac_status"); } &&
6126 { ac_try='test -s "conftest$ac_exeext"'
6127 { (eval echo "$as_me:6127: \"$ac_try\"") >&5
6130 echo "$as_me:6130: \$? = $ac_status" >&5
6131 (exit "$ac_status"); }; }; then
6132 am_cv_langinfo_codeset=yes
6134 echo "$as_me: failed program was:" >&5
6135 cat "conftest.$ac_ext" >&5
6136 am_cv_langinfo_codeset=no
6138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6141 echo "$as_me:6141: result: $am_cv_langinfo_codeset" >&5
6142 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6143 if test "$am_cv_langinfo_codeset" = yes; then
6145 cat >>confdefs.h <<\EOF
6146 #define HAVE_LANGINFO_CODESET 1
6151 echo "$as_me:6151: checking if you want to use pkg-config" >&5
6152 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6154 # Check whether --with-pkg-config or --without-pkg-config was given.
6155 if test "${with_pkg_config+set}" = set; then
6156 withval="$with_pkg_config"
6157 cf_pkg_config=$withval
6161 echo "$as_me:6161: result: $cf_pkg_config" >&5
6162 echo "${ECHO_T}$cf_pkg_config" >&6
6164 case "$cf_pkg_config" in
6170 if test -n "$ac_tool_prefix"; then
6171 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6172 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6173 echo "$as_me:6173: checking for $ac_word" >&5
6174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6175 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6176 echo $ECHO_N "(cached) $ECHO_C" >&6
6180 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6183 ac_save_IFS=$IFS; IFS=$ac_path_separator
6185 for ac_dir in $ac_dummy; do
6187 test -z "$ac_dir" && ac_dir=.
6188 if $as_executable_p "$ac_dir/$ac_word"; then
6189 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6190 echo "$as_me:6190: found $ac_dir/$ac_word" >&5
6198 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6200 if test -n "$PKG_CONFIG"; then
6201 echo "$as_me:6201: result: $PKG_CONFIG" >&5
6202 echo "${ECHO_T}$PKG_CONFIG" >&6
6204 echo "$as_me:6204: result: no" >&5
6205 echo "${ECHO_T}no" >&6
6209 if test -z "$ac_cv_path_PKG_CONFIG"; then
6210 ac_pt_PKG_CONFIG=$PKG_CONFIG
6211 # Extract the first word of "pkg-config", so it can be a program name with args.
6212 set dummy pkg-config; ac_word=$2
6213 echo "$as_me:6213: checking for $ac_word" >&5
6214 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6215 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6216 echo $ECHO_N "(cached) $ECHO_C" >&6
6218 case $ac_pt_PKG_CONFIG in
6220 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6223 ac_save_IFS=$IFS; IFS=$ac_path_separator
6225 for ac_dir in $ac_dummy; do
6227 test -z "$ac_dir" && ac_dir=.
6228 if $as_executable_p "$ac_dir/$ac_word"; then
6229 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6230 echo "$as_me:6230: found $ac_dir/$ac_word" >&5
6235 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6239 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6241 if test -n "$ac_pt_PKG_CONFIG"; then
6242 echo "$as_me:6242: result: $ac_pt_PKG_CONFIG" >&5
6243 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6245 echo "$as_me:6245: result: no" >&5
6246 echo "${ECHO_T}no" >&6
6249 PKG_CONFIG=$ac_pt_PKG_CONFIG
6251 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6260 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6261 if test "$PKG_CONFIG" != none ; then
6263 if test "x$prefix" != xNONE; then
6264 cf_path_syntax="$prefix"
6266 cf_path_syntax="$ac_default_prefix"
6269 case ".$PKG_CONFIG" in
6274 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6276 (.\$\{*prefix\}*|.\$\{*dir\}*)
6277 eval PKG_CONFIG="$PKG_CONFIG"
6278 case ".$PKG_CONFIG" in
6280 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6285 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6288 { { echo "$as_me:6288: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6289 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6290 { (exit 1); exit 1; }; }
6294 elif test "x$cf_pkg_config" != xno ; then
6295 { echo "$as_me:6295: WARNING: pkg-config is not installed" >&5
6296 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6299 echo "$as_me:6299: checking if you want to see long compiling messages" >&5
6300 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6302 # Check whether --enable-echo or --disable-echo was given.
6303 if test "${enable_echo+set}" = set; then
6304 enableval="$enable_echo"
6305 test "$enableval" != no && enableval=yes
6306 if test "$enableval" != "yes" ; then
6309 ECHO_LD='@echo linking $@;'
6310 RULE_CC='@echo compiling $<'
6311 SHOW_CC='@echo compiling $@'
6333 echo "$as_me:6333: result: $enableval" >&5
6334 echo "${ECHO_T}$enableval" >&6
6336 echo "$as_me:6336: checking for ncurses wrap-prefix" >&5
6337 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6339 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6340 if test "${with_ncurses_wrap_prefix+set}" = set; then
6341 withval="$with_ncurses_wrap_prefix"
6342 NCURSES_WRAP_PREFIX=$withval
6344 NCURSES_WRAP_PREFIX=_nc_
6346 echo "$as_me:6346: result: $NCURSES_WRAP_PREFIX" >&5
6347 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6349 echo "$as_me:6349: checking if you want to check for wide-character functions" >&5
6350 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6352 # Check whether --enable-widec or --disable-widec was given.
6353 if test "${enable_widec+set}" = set; then
6354 enableval="$enable_widec"
6355 test "$enableval" != no && enableval=yes
6356 if test "$enableval" != "yes" ; then
6366 echo "$as_me:6366: result: $cf_enable_widec" >&5
6367 echo "${ECHO_T}$cf_enable_widec" >&6
6369 echo "$as_me:6369: checking for specific curses-directory" >&5
6370 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6372 # Check whether --with-curses-dir or --without-curses-dir was given.
6373 if test "${with_curses_dir+set}" = set; then
6374 withval="$with_curses_dir"
6375 cf_cv_curses_dir=$withval
6379 echo "$as_me:6379: result: $cf_cv_curses_dir" >&5
6380 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6382 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6385 if test "x$prefix" != xNONE; then
6386 cf_path_syntax="$prefix"
6388 cf_path_syntax="$ac_default_prefix"
6396 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6398 (.\$\{*prefix\}*|.\$\{*dir\}*)
6399 eval withval="$withval"
6402 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6407 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6410 { { echo "$as_me:6410: error: expected a pathname, not \"$withval\"" >&5
6411 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6412 { (exit 1); exit 1; }; }
6416 if test -d "$cf_cv_curses_dir"
6419 if test -n "$cf_cv_curses_dir/include" ; then
6420 for cf_add_incdir in $cf_cv_curses_dir/include
6422 while test "$cf_add_incdir" != /usr/include
6424 if test -d "$cf_add_incdir"
6427 if test -n "$CFLAGS$CPPFLAGS" ; then
6428 # a loop is needed to ensure we can add subdirs of existing dirs
6429 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6430 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6431 cf_have_incdir=yes; break
6436 if test "$cf_have_incdir" = no ; then
6437 if test "$cf_add_incdir" = /usr/local/include ; then
6438 if test "$GCC" = yes
6440 cf_save_CPPFLAGS=$CPPFLAGS
6442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6443 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6445 cat >"conftest.$ac_ext" <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6457 rm -f "conftest.$ac_objext"
6458 if { (eval echo "$as_me:6458: \"$ac_compile\"") >&5
6459 (eval $ac_compile) 2>&5
6461 echo "$as_me:6461: \$? = $ac_status" >&5
6462 (exit "$ac_status"); } &&
6463 { ac_try='test -s "conftest.$ac_objext"'
6464 { (eval echo "$as_me:6464: \"$ac_try\"") >&5
6467 echo "$as_me:6467: \$? = $ac_status" >&5
6468 (exit "$ac_status"); }; }; then
6471 echo "$as_me: failed program was:" >&5
6472 cat "conftest.$ac_ext" >&5
6475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6476 CPPFLAGS=$cf_save_CPPFLAGS
6481 if test "$cf_have_incdir" = no ; then
6482 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6484 echo "${as_me:-configure}:6484: testing adding $cf_add_incdir to include-path ..." 1>&5
6486 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6488 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6489 test "$cf_top_incdir" = "$cf_add_incdir" && break
6490 cf_add_incdir="$cf_top_incdir"
6501 if test -n "$cf_cv_curses_dir/lib" ; then
6502 for cf_add_libdir in $cf_cv_curses_dir/lib
6504 if test "$cf_add_libdir" = /usr/lib ; then
6506 elif test -d "$cf_add_libdir"
6509 if test -n "$LDFLAGS$LIBS" ; then
6510 # a loop is needed to ensure we can add subdirs of existing dirs
6511 for cf_test_libdir in $LDFLAGS $LIBS ; do
6512 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6513 cf_have_libdir=yes; break
6517 if test "$cf_have_libdir" = no ; then
6518 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6520 echo "${as_me:-configure}:6520: testing adding $cf_add_libdir to library-path ..." 1>&5
6522 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6533 echo "$as_me:6533: checking for specified curses library type" >&5
6534 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6536 # Check whether --with-screen or --without-screen was given.
6537 if test "${with_screen+set}" = set; then
6538 withval="$with_screen"
6539 cf_cv_screen=$withval
6542 # Check whether --with-ncursesw or --without-ncursesw was given.
6543 if test "${with_ncursesw+set}" = set; then
6544 withval="$with_ncursesw"
6545 cf_cv_screen=ncursesw
6548 # Check whether --with-ncurses or --without-ncurses was given.
6549 if test "${with_ncurses+set}" = set; then
6550 withval="$with_ncurses"
6551 cf_cv_screen=ncurses
6554 # Check whether --with-pdcurses or --without-pdcurses was given.
6555 if test "${with_pdcurses+set}" = set; then
6556 withval="$with_pdcurses"
6557 cf_cv_screen=pdcurses
6560 # Check whether --with-curses-colr or --without-curses-colr was given.
6561 if test "${with_curses_colr+set}" = set; then
6562 withval="$with_curses_colr"
6563 cf_cv_screen=curses_colr
6566 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6567 if test "${with_curses_5lib+set}" = set; then
6568 withval="$with_curses_5lib"
6569 cf_cv_screen=curses_5lib
6577 echo "$as_me:6577: result: $cf_cv_screen" >&5
6578 echo "${ECHO_T}$cf_cv_screen" >&6
6580 case $cf_cv_screen in
6583 echo "$as_me:6583: checking for extra include directories" >&5
6584 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6585 if test "${cf_cv_curses_incdir+set}" = set; then
6586 echo $ECHO_N "(cached) $ECHO_C" >&6
6589 cf_cv_curses_incdir=no
6592 if test "x$cf_cv_screen" = "xcurses_colr"
6594 test -d /usr/include/curses_colr && \
6595 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6599 if test "x$cf_cv_screen" = "xcurses_5lib"
6601 test -d /usr/5lib && \
6602 test -d /usr/5include && \
6603 cf_cv_curses_incdir="-I/usr/5include"
6609 echo "$as_me:6609: result: $cf_cv_curses_incdir" >&5
6610 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6611 if test "$cf_cv_curses_incdir" != no
6614 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6615 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6619 echo "$as_me:6619: checking if we have identified curses headers" >&5
6620 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6621 if test "${cf_cv_ncurses_header+set}" = set; then
6622 echo $ECHO_N "(cached) $ECHO_C" >&6
6625 cf_cv_ncurses_header=none
6628 curses.h ncurses/ncurses.h ncurses/curses.h
6630 cat >"conftest.$ac_ext" <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6633 #include <${cf_header}>
6637 initscr(); tgoto("?", 0,0)
6642 rm -f "conftest.$ac_objext"
6643 if { (eval echo "$as_me:6643: \"$ac_compile\"") >&5
6644 (eval $ac_compile) 2>&5
6646 echo "$as_me:6646: \$? = $ac_status" >&5
6647 (exit "$ac_status"); } &&
6648 { ac_try='test -s "conftest.$ac_objext"'
6649 { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6652 echo "$as_me:6652: \$? = $ac_status" >&5
6653 (exit "$ac_status"); }; }; then
6654 cf_cv_ncurses_header=$cf_header; break
6656 echo "$as_me: failed program was:" >&5
6657 cat "conftest.$ac_ext" >&5
6659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6663 echo "$as_me:6663: result: $cf_cv_ncurses_header" >&5
6664 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6666 if test "$cf_cv_ncurses_header" = none ; then
6667 { { echo "$as_me:6667: error: No curses header-files found" >&5
6668 echo "$as_me: error: No curses header-files found" >&2;}
6669 { (exit 1); exit 1; }; }
6672 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6674 for ac_header in $cf_cv_ncurses_header
6676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6677 echo "$as_me:6677: checking for $ac_header" >&5
6678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6680 echo $ECHO_N "(cached) $ECHO_C" >&6
6682 cat >"conftest.$ac_ext" <<_ACEOF
6683 #line 6683 "configure"
6684 #include "confdefs.h"
6685 #include <$ac_header>
6687 if { (eval echo "$as_me:6687: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6688 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6690 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6692 cat conftest.err >&5
6693 echo "$as_me:6693: \$? = $ac_status" >&5
6694 (exit "$ac_status"); } >/dev/null; then
6695 if test -s conftest.err; then
6696 ac_cpp_err=$ac_c_preproc_warn_flag
6703 if test -z "$ac_cpp_err"; then
6704 eval "$as_ac_Header=yes"
6706 echo "$as_me: failed program was:" >&5
6707 cat "conftest.$ac_ext" >&5
6708 eval "$as_ac_Header=no"
6710 rm -f conftest.err "conftest.$ac_ext"
6712 echo "$as_me:6712: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6713 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6714 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6715 cat >>confdefs.h <<EOF
6716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6722 echo "$as_me:6722: checking for terminfo header" >&5
6723 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6724 if test "${cf_cv_term_header+set}" = set; then
6725 echo $ECHO_N "(cached) $ECHO_C" >&6
6728 case "${cf_cv_ncurses_header}" in
6729 (*/ncurses.h|*/ncursesw.h)
6730 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6733 cf_term_header=term.h
6737 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6739 cat >"conftest.$ac_ext" <<_ACEOF
6740 #line 6740 "configure"
6741 #include "confdefs.h"
6743 #include <${cf_cv_ncurses_header:-curses.h}>
6749 int x = auto_left_margin; (void)x
6754 rm -f "conftest.$ac_objext"
6755 if { (eval echo "$as_me:6755: \"$ac_compile\"") >&5
6756 (eval $ac_compile) 2>&5
6758 echo "$as_me:6758: \$? = $ac_status" >&5
6759 (exit "$ac_status"); } &&
6760 { ac_try='test -s "conftest.$ac_objext"'
6761 { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit "$ac_status"); }; }; then
6767 cf_cv_term_header="$cf_test"
6769 echo "$as_me: failed program was:" >&5
6770 cat "conftest.$ac_ext" >&5
6772 cf_cv_term_header=unknown
6775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6776 test "$cf_cv_term_header" != unknown && break
6780 echo "$as_me:6780: result: $cf_cv_term_header" >&5
6781 echo "${ECHO_T}$cf_cv_term_header" >&6
6783 # Set definitions to allow ifdef'ing to accommodate subdirectories
6785 case "$cf_cv_term_header" in
6788 cat >>confdefs.h <<\EOF
6789 #define HAVE_TERM_H 1
6795 case "$cf_cv_term_header" in
6798 cat >>confdefs.h <<\EOF
6799 #define HAVE_NCURSES_TERM_H 1
6805 cat >>confdefs.h <<\EOF
6806 #define HAVE_NCURSESW_TERM_H 1
6812 echo "$as_me:6812: checking for ncurses version" >&5
6813 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6814 if test "${cf_cv_ncurses_version+set}" = set; then
6815 echo $ECHO_N "(cached) $ECHO_C" >&6
6818 cf_cv_ncurses_version=no
6820 rm -f "$cf_tempfile"
6821 if test "$cross_compiling" = yes; then
6823 # This will not work if the preprocessor splits the line after the
6824 # Autoconf token. The 'unproto' program does that.
6825 cat > "conftest.$ac_ext" <<EOF
6826 #include <${cf_cv_ncurses_header:-curses.h}>
6828 #ifdef NCURSES_VERSION
6829 Autoconf NCURSES_VERSION
6837 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6838 { (eval echo "$as_me:6838: \"$cf_try\"") >&5
6841 echo "$as_me:6841: \$? = $ac_status" >&5
6842 (exit "$ac_status"); }
6843 if test -f conftest.out ; then
6844 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6845 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6850 cat >"conftest.$ac_ext" <<_ACEOF
6851 #line 6851 "configure"
6852 #include "confdefs.h"
6854 #include <${cf_cv_ncurses_header:-curses.h}>
6858 FILE *fp = fopen("$cf_tempfile", "w");
6859 #ifdef NCURSES_VERSION
6860 # ifdef NCURSES_VERSION_PATCH
6861 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6863 fprintf(fp, "%s\\n", NCURSES_VERSION);
6867 fprintf(fp, "old\\n");
6872 ${cf_cv_main_return:-return}(0);
6875 rm -f "conftest$ac_exeext"
6876 if { (eval echo "$as_me:6876: \"$ac_link\"") >&5
6877 (eval $ac_link) 2>&5
6879 echo "$as_me:6879: \$? = $ac_status" >&5
6880 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6881 { (eval echo "$as_me:6881: \"$ac_try\"") >&5
6884 echo "$as_me:6884: \$? = $ac_status" >&5
6885 (exit "$ac_status"); }; }; then
6887 cf_cv_ncurses_version=`cat $cf_tempfile`
6889 echo "$as_me: program exited with status $ac_status" >&5
6890 echo "$as_me: failed program was:" >&5
6891 cat "conftest.$ac_ext" >&5
6893 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6895 rm -f "$cf_tempfile"
6898 echo "$as_me:6898: result: $cf_cv_ncurses_version" >&5
6899 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6900 test "$cf_cv_ncurses_version" = no ||
6901 cat >>confdefs.h <<\EOF
6905 echo "$as_me:6905: checking if we have identified curses libraries" >&5
6906 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6907 cat >"conftest.$ac_ext" <<_ACEOF
6908 #line 6908 "configure"
6909 #include "confdefs.h"
6910 #include <${cf_cv_ncurses_header:-curses.h}>
6914 initscr(); tgoto("?", 0,0)
6919 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6920 if { (eval echo "$as_me:6920: \"$ac_link\"") >&5
6921 (eval $ac_link) 2>&5
6923 echo "$as_me:6923: \$? = $ac_status" >&5
6924 (exit "$ac_status"); } &&
6925 { ac_try='test -s "conftest$ac_exeext"'
6926 { (eval echo "$as_me:6926: \"$ac_try\"") >&5
6929 echo "$as_me:6929: \$? = $ac_status" >&5
6930 (exit "$ac_status"); }; }; then
6933 echo "$as_me: failed program was:" >&5
6934 cat "conftest.$ac_ext" >&5
6937 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6938 echo "$as_me:6938: result: $cf_result" >&5
6939 echo "${ECHO_T}$cf_result" >&6
6941 if test "$cf_result" = no ; then
6944 echo "$as_me:6944: checking for tgoto in -lmytinfo" >&5
6945 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6946 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6949 ac_check_lib_save_LIBS=$LIBS
6950 LIBS="-lmytinfo $LIBS"
6951 cat >"conftest.$ac_ext" <<_ACEOF
6952 #line 6952 "configure"
6953 #include "confdefs.h"
6955 /* Override any gcc2 internal prototype to avoid an error. */
6959 /* We use char because int might match the return type of a gcc2
6960 builtin and then its argument prototype would still apply. */
6970 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6971 if { (eval echo "$as_me:6971: \"$ac_link\"") >&5
6972 (eval $ac_link) 2>&5
6974 echo "$as_me:6974: \$? = $ac_status" >&5
6975 (exit "$ac_status"); } &&
6976 { ac_try='test -s "conftest$ac_exeext"'
6977 { (eval echo "$as_me:6977: \"$ac_try\"") >&5
6980 echo "$as_me:6980: \$? = $ac_status" >&5
6981 (exit "$ac_status"); }; }; then
6982 ac_cv_lib_mytinfo_tgoto=yes
6984 echo "$as_me: failed program was:" >&5
6985 cat "conftest.$ac_ext" >&5
6986 ac_cv_lib_mytinfo_tgoto=no
6988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6989 LIBS=$ac_check_lib_save_LIBS
6991 echo "$as_me:6991: result: $ac_cv_lib_mytinfo_tgoto" >&5
6992 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6993 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6998 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7000 for cf_add_1lib in $cf_add_0lib; do
7001 for cf_add_2lib in $cf_add_libs; do
7002 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7007 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7015 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7016 # next (1998), and xcurses "newer" (2000). There is no header file for
7017 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7018 # term.h) for cur_colr
7019 if test "x$cf_cv_screen" = "xcurses_colr"
7021 echo "$as_me:7021: checking for initscr in -lcur_colr" >&5
7022 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7023 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7024 echo $ECHO_N "(cached) $ECHO_C" >&6
7026 ac_check_lib_save_LIBS=$LIBS
7027 LIBS="-lcur_colr $LIBS"
7028 cat >"conftest.$ac_ext" <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7032 /* Override any gcc2 internal prototype to avoid an error. */
7036 /* We use char because int might match the return type of a gcc2
7037 builtin and then its argument prototype would still apply. */
7047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049 (eval $ac_link) 2>&5
7051 echo "$as_me:7051: \$? = $ac_status" >&5
7052 (exit "$ac_status"); } &&
7053 { ac_try='test -s "conftest$ac_exeext"'
7054 { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7057 echo "$as_me:7057: \$? = $ac_status" >&5
7058 (exit "$ac_status"); }; }; then
7059 ac_cv_lib_cur_colr_initscr=yes
7061 echo "$as_me: failed program was:" >&5
7062 cat "conftest.$ac_ext" >&5
7063 ac_cv_lib_cur_colr_initscr=no
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 LIBS=$ac_check_lib_save_LIBS
7068 echo "$as_me:7068: result: $ac_cv_lib_cur_colr_initscr" >&5
7069 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7070 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7075 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7077 for cf_add_1lib in $cf_add_0lib; do
7078 for cf_add_2lib in $cf_add_libs; do
7079 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7084 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7088 ac_cv_func_initscr=yes
7092 echo "$as_me:7092: checking for initscr in -lHcurses" >&5
7093 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7094 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7095 echo $ECHO_N "(cached) $ECHO_C" >&6
7097 ac_check_lib_save_LIBS=$LIBS
7098 LIBS="-lHcurses $LIBS"
7099 cat >"conftest.$ac_ext" <<_ACEOF
7100 #line 7100 "configure"
7101 #include "confdefs.h"
7103 /* Override any gcc2 internal prototype to avoid an error. */
7107 /* We use char because int might match the return type of a gcc2
7108 builtin and then its argument prototype would still apply. */
7118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7119 if { (eval echo "$as_me:7119: \"$ac_link\"") >&5
7120 (eval $ac_link) 2>&5
7122 echo "$as_me:7122: \$? = $ac_status" >&5
7123 (exit "$ac_status"); } &&
7124 { ac_try='test -s "conftest$ac_exeext"'
7125 { (eval echo "$as_me:7125: \"$ac_try\"") >&5
7128 echo "$as_me:7128: \$? = $ac_status" >&5
7129 (exit "$ac_status"); }; }; then
7130 ac_cv_lib_Hcurses_initscr=yes
7132 echo "$as_me: failed program was:" >&5
7133 cat "conftest.$ac_ext" >&5
7134 ac_cv_lib_Hcurses_initscr=no
7136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7137 LIBS=$ac_check_lib_save_LIBS
7139 echo "$as_me:7139: result: $ac_cv_lib_Hcurses_initscr" >&5
7140 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7141 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7143 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7148 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7150 for cf_add_1lib in $cf_add_0lib; do
7151 for cf_add_2lib in $cf_add_libs; do
7152 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7157 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7161 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7162 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7164 ac_cv_func_initscr=yes
7173 case `arch 2>/dev/null` in
7178 if test -n "/lib64" ; then
7179 for cf_add_libdir in /lib64
7181 if test "$cf_add_libdir" = /usr/lib ; then
7183 elif test -d "$cf_add_libdir"
7186 if test -n "$LDFLAGS$LIBS" ; then
7187 # a loop is needed to ensure we can add subdirs of existing dirs
7188 for cf_test_libdir in $LDFLAGS $LIBS ; do
7189 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7190 cf_have_libdir=yes; break
7194 if test "$cf_have_libdir" = no ; then
7195 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7197 echo "${as_me:-configure}:7197: testing adding $cf_add_libdir to library-path ..." 1>&5
7199 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7207 if test -n "/lib" ; then
7208 for cf_add_libdir in /lib
7210 if test "$cf_add_libdir" = /usr/lib ; then
7212 elif test -d "$cf_add_libdir"
7215 if test -n "$LDFLAGS$LIBS" ; then
7216 # a loop is needed to ensure we can add subdirs of existing dirs
7217 for cf_test_libdir in $LDFLAGS $LIBS ; do
7218 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7219 cf_have_libdir=yes; break
7223 if test "$cf_have_libdir" = no ; then
7224 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7226 echo "${as_me:-configure}:7226: testing adding $cf_add_libdir to library-path ..." 1>&5
7228 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7238 if test -n "/lib" ; then
7239 for cf_add_libdir in /lib
7241 if test "$cf_add_libdir" = /usr/lib ; then
7243 elif test -d "$cf_add_libdir"
7246 if test -n "$LDFLAGS$LIBS" ; then
7247 # a loop is needed to ensure we can add subdirs of existing dirs
7248 for cf_test_libdir in $LDFLAGS $LIBS ; do
7249 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7250 cf_have_libdir=yes; break
7254 if test "$cf_have_libdir" = no ; then
7255 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7257 echo "${as_me:-configure}:7257: testing adding $cf_add_libdir to library-path ..." 1>&5
7259 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7269 if test "x$cf_cv_screen" = "xcurses_5lib"
7271 if test -d /usr/5lib ; then
7273 if test -n "/usr/5lib" ; then
7274 for cf_add_libdir in /usr/5lib
7276 if test "$cf_add_libdir" = /usr/lib ; then
7278 elif test -d "$cf_add_libdir"
7281 if test -n "$LDFLAGS$LIBS" ; then
7282 # a loop is needed to ensure we can add subdirs of existing dirs
7283 for cf_test_libdir in $LDFLAGS $LIBS ; do
7284 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7285 cf_have_libdir=yes; break
7289 if test "$cf_have_libdir" = no ; then
7290 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7292 echo "${as_me:-configure}:7292: testing adding $cf_add_libdir to library-path ..." 1>&5
7294 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7303 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7305 for cf_add_1lib in $cf_add_0lib; do
7306 for cf_add_2lib in $cf_add_libs; do
7307 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7312 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7318 ac_cv_func_initscr=yes
7322 if test ".$ac_cv_func_initscr" != .yes ; then
7323 cf_save_LIBS="$LIBS"
7325 if test ".${cf_cv_ncurses_version:-no}" != .no
7327 cf_check_list="ncurses curses cursesX"
7329 cf_check_list="cursesX curses ncurses"
7332 # Check for library containing tgoto. Do this before curses library
7333 # because it may be needed to link the test-case for initscr.
7334 if test "x$cf_term_lib" = x
7336 echo "$as_me:7336: checking for tgoto" >&5
7337 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7338 if test "${ac_cv_func_tgoto+set}" = set; then
7339 echo $ECHO_N "(cached) $ECHO_C" >&6
7341 cat >"conftest.$ac_ext" <<_ACEOF
7342 #line 7342 "configure"
7343 #include "confdefs.h"
7344 #define tgoto autoconf_temporary
7345 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7352 /* We use char because int might match the return type of a gcc2
7353 builtin and then its argument prototype would still apply. */
7360 /* The GNU C library defines stubs for functions which it implements
7361 to always fail with ENOSYS. Some functions are actually named
7362 something starting with __ and the normal name is an alias. */
7363 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7364 #error found stub for tgoto
7372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7373 if { (eval echo "$as_me:7373: \"$ac_link\"") >&5
7374 (eval $ac_link) 2>&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit "$ac_status"); } &&
7378 { ac_try='test -s "conftest$ac_exeext"'
7379 { (eval echo "$as_me:7379: \"$ac_try\"") >&5
7382 echo "$as_me:7382: \$? = $ac_status" >&5
7383 (exit "$ac_status"); }; }; then
7384 ac_cv_func_tgoto=yes
7386 echo "$as_me: failed program was:" >&5
7387 cat "conftest.$ac_ext" >&5
7390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7392 echo "$as_me:7392: result: $ac_cv_func_tgoto" >&5
7393 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7394 if test "$ac_cv_func_tgoto" = yes; then
7395 cf_term_lib=predefined
7398 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7400 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7401 echo "$as_me:7401: checking for tgoto in -l$cf_term_lib" >&5
7402 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7403 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7404 echo $ECHO_N "(cached) $ECHO_C" >&6
7406 ac_check_lib_save_LIBS=$LIBS
7407 LIBS="-l$cf_term_lib $LIBS"
7408 cat >"conftest.$ac_ext" <<_ACEOF
7409 #line 7409 "configure"
7410 #include "confdefs.h"
7412 /* Override any gcc2 internal prototype to avoid an error. */
7416 /* We use char because int might match the return type of a gcc2
7417 builtin and then its argument prototype would still apply. */
7427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7428 if { (eval echo "$as_me:7428: \"$ac_link\"") >&5
7429 (eval $ac_link) 2>&5
7431 echo "$as_me:7431: \$? = $ac_status" >&5
7432 (exit "$ac_status"); } &&
7433 { ac_try='test -s "conftest$ac_exeext"'
7434 { (eval echo "$as_me:7434: \"$ac_try\"") >&5
7437 echo "$as_me:7437: \$? = $ac_status" >&5
7438 (exit "$ac_status"); }; }; then
7439 eval "$as_ac_Lib=yes"
7441 echo "$as_me: failed program was:" >&5
7442 cat "conftest.$ac_ext" >&5
7443 eval "$as_ac_Lib=no"
7445 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7446 LIBS=$ac_check_lib_save_LIBS
7448 echo "$as_me:7448: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7449 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7450 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7452 : "${cf_nculib_root:=$cf_term_lib}"
7463 # Check for library containing initscr
7464 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7465 if test "x$cf_curs_lib" = x
7467 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7469 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7470 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7471 echo "$as_me:7471: checking if we can link with $cf_curs_lib library" >&5
7472 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7473 cat >"conftest.$ac_ext" <<_ACEOF
7474 #line 7474 "configure"
7475 #include "confdefs.h"
7476 #include <${cf_cv_ncurses_header:-curses.h}>
7485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7486 if { (eval echo "$as_me:7486: \"$ac_link\"") >&5
7487 (eval $ac_link) 2>&5
7489 echo "$as_me:7489: \$? = $ac_status" >&5
7490 (exit "$ac_status"); } &&
7491 { ac_try='test -s "conftest$ac_exeext"'
7492 { (eval echo "$as_me:7492: \"$ac_try\"") >&5
7495 echo "$as_me:7495: \$? = $ac_status" >&5
7496 (exit "$ac_status"); }; }; then
7499 echo "$as_me: failed program was:" >&5
7500 cat "conftest.$ac_ext" >&5
7503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7504 echo "$as_me:7504: result: $cf_result" >&5
7505 echo "${ECHO_T}$cf_result" >&6
7506 test "$cf_result" = yes && break
7507 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7509 elif test "$cf_term_lib" != predefined ; then
7510 echo "$as_me:7510: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7511 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7512 cat >"conftest.$ac_ext" <<_ACEOF
7513 #line 7513 "configure"
7514 #include "confdefs.h"
7515 #include <${cf_cv_ncurses_header:-curses.h}>
7519 initscr(); tgoto((char *)0, 0, 0);
7524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7525 if { (eval echo "$as_me:7525: \"$ac_link\"") >&5
7526 (eval $ac_link) 2>&5
7528 echo "$as_me:7528: \$? = $ac_status" >&5
7529 (exit "$ac_status"); } &&
7530 { ac_try='test -s "conftest$ac_exeext"'
7531 { (eval echo "$as_me:7531: \"$ac_try\"") >&5
7534 echo "$as_me:7534: \$? = $ac_status" >&5
7535 (exit "$ac_status"); }; }; then
7538 echo "$as_me: failed program was:" >&5
7539 cat "conftest.$ac_ext" >&5
7541 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7542 cat >"conftest.$ac_ext" <<_ACEOF
7543 #line 7543 "configure"
7544 #include "confdefs.h"
7545 #include <${cf_cv_ncurses_header:-curses.h}>
7554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7555 if { (eval echo "$as_me:7555: \"$ac_link\"") >&5
7556 (eval $ac_link) 2>&5
7558 echo "$as_me:7558: \$? = $ac_status" >&5
7559 (exit "$ac_status"); } &&
7560 { ac_try='test -s "conftest$ac_exeext"'
7561 { (eval echo "$as_me:7561: \"$ac_try\"") >&5
7564 echo "$as_me:7564: \$? = $ac_status" >&5
7565 (exit "$ac_status"); }; }; then
7568 echo "$as_me: failed program was:" >&5
7569 cat "conftest.$ac_ext" >&5
7572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7576 echo "$as_me:7576: result: $cf_result" >&5
7577 echo "${ECHO_T}$cf_result" >&6
7578 test "$cf_result" != error && break
7582 test "$cf_curs_lib" = unknown && { { echo "$as_me:7582: error: no curses library found" >&5
7583 echo "$as_me: error: no curses library found" >&2;}
7584 { (exit 1); exit 1; }; }
7591 for ac_header in wchar.h
7593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7594 echo "$as_me:7594: checking for $ac_header" >&5
7595 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7596 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7597 echo $ECHO_N "(cached) $ECHO_C" >&6
7599 cat >"conftest.$ac_ext" <<_ACEOF
7600 #line 7600 "configure"
7601 #include "confdefs.h"
7602 #include <$ac_header>
7604 if { (eval echo "$as_me:7604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7605 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7607 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7609 cat conftest.err >&5
7610 echo "$as_me:7610: \$? = $ac_status" >&5
7611 (exit "$ac_status"); } >/dev/null; then
7612 if test -s conftest.err; then
7613 ac_cpp_err=$ac_c_preproc_warn_flag
7620 if test -z "$ac_cpp_err"; then
7621 eval "$as_ac_Header=yes"
7623 echo "$as_me: failed program was:" >&5
7624 cat "conftest.$ac_ext" >&5
7625 eval "$as_ac_Header=no"
7627 rm -f conftest.err "conftest.$ac_ext"
7629 echo "$as_me:7629: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7630 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7631 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7632 cat >>confdefs.h <<EOF
7633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7639 echo "$as_me:7639: checking for multibyte character support" >&5
7640 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7641 if test "${cf_cv_utf8_lib+set}" = set; then
7642 echo $ECHO_N "(cached) $ECHO_C" >&6
7645 cf_save_LIBS="$LIBS"
7646 cat >"conftest.$ac_ext" <<_ACEOF
7647 #line 7647 "configure"
7648 #include "confdefs.h"
7664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7665 if { (eval echo "$as_me:7665: \"$ac_link\"") >&5
7666 (eval $ac_link) 2>&5
7668 echo "$as_me:7668: \$? = $ac_status" >&5
7669 (exit "$ac_status"); } &&
7670 { ac_try='test -s "conftest$ac_exeext"'
7671 { (eval echo "$as_me:7671: \"$ac_try\"") >&5
7674 echo "$as_me:7674: \$? = $ac_status" >&5
7675 (exit "$ac_status"); }; }; then
7678 echo "$as_me: failed program was:" >&5
7679 cat "conftest.$ac_ext" >&5
7681 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7682 # will be set on completion of the AC_TRY_LINK below.
7683 cf_cv_header_path_utf8=
7684 cf_cv_library_path_utf8=
7686 echo "${as_me:-configure}:7686: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7688 cf_save_LIBS="$LIBS"
7690 cat >"conftest.$ac_ext" <<_ACEOF
7691 #line 7691 "configure"
7692 #include "confdefs.h"
7694 #include <libutf8.h>
7703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7704 if { (eval echo "$as_me:7704: \"$ac_link\"") >&5
7705 (eval $ac_link) 2>&5
7707 echo "$as_me:7707: \$? = $ac_status" >&5
7708 (exit "$ac_status"); } &&
7709 { ac_try='test -s "conftest$ac_exeext"'
7710 { (eval echo "$as_me:7710: \"$ac_try\"") >&5
7713 echo "$as_me:7713: \$? = $ac_status" >&5
7714 (exit "$ac_status"); }; }; then
7716 cf_cv_find_linkage_utf8=yes
7717 cf_cv_header_path_utf8=/usr/include
7718 cf_cv_library_path_utf8=/usr/lib
7721 echo "$as_me: failed program was:" >&5
7722 cat "conftest.$ac_ext" >&5
7724 LIBS="-lutf8 $cf_save_LIBS"
7726 cat >"conftest.$ac_ext" <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7730 #include <libutf8.h>
7739 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7740 if { (eval echo "$as_me:7740: \"$ac_link\"") >&5
7741 (eval $ac_link) 2>&5
7743 echo "$as_me:7743: \$? = $ac_status" >&5
7744 (exit "$ac_status"); } &&
7745 { ac_try='test -s "conftest$ac_exeext"'
7746 { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7749 echo "$as_me:7749: \$? = $ac_status" >&5
7750 (exit "$ac_status"); }; }; then
7752 cf_cv_find_linkage_utf8=yes
7753 cf_cv_header_path_utf8=/usr/include
7754 cf_cv_library_path_utf8=/usr/lib
7755 cf_cv_library_file_utf8="-lutf8"
7758 echo "$as_me: failed program was:" >&5
7759 cat "conftest.$ac_ext" >&5
7761 cf_cv_find_linkage_utf8=no
7762 LIBS="$cf_save_LIBS"
7764 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7766 echo "${as_me:-configure}:7766: testing find linkage for utf8 library ..." 1>&5
7768 echo "${as_me:-configure}:7768: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7770 cf_save_CPPFLAGS="$CPPFLAGS"
7771 cf_test_CPPFLAGS="$CPPFLAGS"
7775 # collect the current set of include-directories from compiler flags
7776 cf_header_path_list=""
7777 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7778 for cf_header_path in $CPPFLAGS $CFLAGS
7780 case "$cf_header_path" in
7782 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7784 test "x$cf_header_path" != "xNONE" && \
7785 test -d "$cf_header_path" && \
7787 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7788 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7789 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7790 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7791 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7792 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7795 cf_header_path_list="$cf_header_path_list $cf_search"
7801 # add the variations for the package we are looking for
7805 test "x$prefix" != "xNONE" && \
7806 test -d "$prefix" && \
7808 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7809 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7810 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7811 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7812 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7813 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7816 for cf_subdir_prefix in \
7825 test "x$cf_subdir_prefix" != "x$prefix" && \
7826 test -d "$cf_subdir_prefix" && \
7827 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7828 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7829 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7830 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7831 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7832 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7833 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7838 test "$includedir" != NONE && \
7839 test "$includedir" != "/usr/include" && \
7840 test -d "$includedir" && {
7841 test -d "$includedir" && cf_search="$cf_search $includedir"
7842 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7845 test "$oldincludedir" != NONE && \
7846 test "$oldincludedir" != "/usr/include" && \
7847 test -d "$oldincludedir" && {
7848 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7849 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7852 cf_search="$cf_search $cf_header_path_list"
7854 for cf_cv_header_path_utf8 in $cf_search
7856 if test -d "$cf_cv_header_path_utf8" ; then
7857 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7859 echo "${as_me:-configure}:7859: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7861 CPPFLAGS="$cf_save_CPPFLAGS"
7863 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7864 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7866 cat >"conftest.$ac_ext" <<_ACEOF
7867 #line 7867 "configure"
7868 #include "confdefs.h"
7870 #include <libutf8.h>
7879 rm -f "conftest.$ac_objext"
7880 if { (eval echo "$as_me:7880: \"$ac_compile\"") >&5
7881 (eval $ac_compile) 2>&5
7883 echo "$as_me:7883: \$? = $ac_status" >&5
7884 (exit "$ac_status"); } &&
7885 { ac_try='test -s "conftest.$ac_objext"'
7886 { (eval echo "$as_me:7886: \"$ac_try\"") >&5
7889 echo "$as_me:7889: \$? = $ac_status" >&5
7890 (exit "$ac_status"); }; }; then
7892 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7894 echo "${as_me:-configure}:7894: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7896 cf_cv_find_linkage_utf8=maybe
7897 cf_test_CPPFLAGS="$CPPFLAGS"
7900 echo "$as_me: failed program was:" >&5
7901 cat "conftest.$ac_ext" >&5
7903 CPPFLAGS="$cf_save_CPPFLAGS"
7906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7910 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7912 echo "${as_me:-configure}:7912: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7914 cf_save_LIBS="$LIBS"
7915 cf_save_LDFLAGS="$LDFLAGS"
7917 if test "$cf_cv_find_linkage_utf8" != yes ; then
7920 cf_library_path_list=""
7921 if test -n "${LDFLAGS}${LIBS}" ; then
7922 for cf_library_path in $LDFLAGS $LIBS
7924 case "$cf_library_path" in
7926 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7928 test "x$cf_library_path" != "xNONE" && \
7929 test -d "$cf_library_path" && \
7931 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7932 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7933 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7934 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7935 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7936 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7939 cf_library_path_list="$cf_library_path_list $cf_search"
7947 test "x$prefix" != "xNONE" && \
7948 test -d "$prefix" && \
7950 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7951 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7952 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7953 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7954 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7955 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7958 for cf_subdir_prefix in \
7967 test "x$cf_subdir_prefix" != "x$prefix" && \
7968 test -d "$cf_subdir_prefix" && \
7969 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7970 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7971 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7972 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7973 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7974 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7975 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7980 cf_search="$cf_library_path_list $cf_search"
7982 for cf_cv_library_path_utf8 in $cf_search
7984 if test -d "$cf_cv_library_path_utf8" ; then
7985 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7987 echo "${as_me:-configure}:7987: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7989 CPPFLAGS="$cf_test_CPPFLAGS"
7990 LIBS="-lutf8 $cf_save_LIBS"
7991 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7992 cat >"conftest.$ac_ext" <<_ACEOF
7993 #line 7993 "configure"
7994 #include "confdefs.h"
7996 #include <libutf8.h>
8005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8006 if { (eval echo "$as_me:8006: \"$ac_link\"") >&5
8007 (eval $ac_link) 2>&5
8009 echo "$as_me:8009: \$? = $ac_status" >&5
8010 (exit "$ac_status"); } &&
8011 { ac_try='test -s "conftest$ac_exeext"'
8012 { (eval echo "$as_me:8012: \"$ac_try\"") >&5
8015 echo "$as_me:8015: \$? = $ac_status" >&5
8016 (exit "$ac_status"); }; }; then
8018 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8020 echo "${as_me:-configure}:8020: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8022 cf_cv_find_linkage_utf8=yes
8023 cf_cv_library_file_utf8="-lutf8"
8026 echo "$as_me: failed program was:" >&5
8027 cat "conftest.$ac_ext" >&5
8029 CPPFLAGS="$cf_save_CPPFLAGS"
8030 LIBS="$cf_save_LIBS"
8031 LDFLAGS="$cf_save_LDFLAGS"
8034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8037 CPPFLAGS="$cf_save_CPPFLAGS"
8038 LDFLAGS="$cf_save_LDFLAGS"
8042 cf_cv_find_linkage_utf8=no
8046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8051 LIBS="$cf_save_LIBS"
8053 if test "$cf_cv_find_linkage_utf8" = yes ; then
8054 cf_cv_utf8_lib=add-on
8060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8062 echo "$as_me:8062: result: $cf_cv_utf8_lib" >&5
8063 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8065 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8067 if test "$cf_cv_utf8_lib" = "add-on" ; then
8069 cat >>confdefs.h <<\EOF
8070 #define HAVE_LIBUTF8_H 1
8073 if test -n "$cf_cv_header_path_utf8" ; then
8074 for cf_add_incdir in $cf_cv_header_path_utf8
8076 while test "$cf_add_incdir" != /usr/include
8078 if test -d "$cf_add_incdir"
8081 if test -n "$CFLAGS$CPPFLAGS" ; then
8082 # a loop is needed to ensure we can add subdirs of existing dirs
8083 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8084 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8085 cf_have_incdir=yes; break
8090 if test "$cf_have_incdir" = no ; then
8091 if test "$cf_add_incdir" = /usr/local/include ; then
8092 if test "$GCC" = yes
8094 cf_save_CPPFLAGS=$CPPFLAGS
8096 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8097 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8099 cat >"conftest.$ac_ext" <<_ACEOF
8100 #line 8100 "configure"
8101 #include "confdefs.h"
8111 rm -f "conftest.$ac_objext"
8112 if { (eval echo "$as_me:8112: \"$ac_compile\"") >&5
8113 (eval $ac_compile) 2>&5
8115 echo "$as_me:8115: \$? = $ac_status" >&5
8116 (exit "$ac_status"); } &&
8117 { ac_try='test -s "conftest.$ac_objext"'
8118 { (eval echo "$as_me:8118: \"$ac_try\"") >&5
8121 echo "$as_me:8121: \$? = $ac_status" >&5
8122 (exit "$ac_status"); }; }; then
8125 echo "$as_me: failed program was:" >&5
8126 cat "conftest.$ac_ext" >&5
8129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8130 CPPFLAGS=$cf_save_CPPFLAGS
8135 if test "$cf_have_incdir" = no ; then
8136 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8138 echo "${as_me:-configure}:8138: testing adding $cf_add_incdir to include-path ..." 1>&5
8140 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8142 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8143 test "$cf_top_incdir" = "$cf_add_incdir" && break
8144 cf_add_incdir="$cf_top_incdir"
8155 if test -n "$cf_cv_library_path_utf8" ; then
8156 for cf_add_libdir in $cf_cv_library_path_utf8
8158 if test "$cf_add_libdir" = /usr/lib ; then
8160 elif test -d "$cf_add_libdir"
8163 if test -n "$LDFLAGS$LIBS" ; then
8164 # a loop is needed to ensure we can add subdirs of existing dirs
8165 for cf_test_libdir in $LDFLAGS $LIBS ; do
8166 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8167 cf_have_libdir=yes; break
8171 if test "$cf_have_libdir" = no ; then
8172 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8174 echo "${as_me:-configure}:8174: testing adding $cf_add_libdir to library-path ..." 1>&5
8176 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8185 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8187 for cf_add_1lib in $cf_add_0lib; do
8188 for cf_add_2lib in $cf_add_libs; do
8189 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8194 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8200 cf_ncuconfig_root=$cf_cv_screen
8201 cf_have_ncuconfig=no
8203 if test "x${PKG_CONFIG:=none}" != xnone; then
8204 echo "$as_me:8204: checking pkg-config for $cf_ncuconfig_root" >&5
8205 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8206 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8207 echo "$as_me:8207: result: yes" >&5
8208 echo "${ECHO_T}yes" >&6
8210 echo "$as_me:8210: checking if the $cf_ncuconfig_root package files work" >&5
8211 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8212 cf_have_ncuconfig=unknown
8214 cf_save_CFLAGS="$CFLAGS"
8215 cf_save_CPPFLAGS="$CPPFLAGS"
8216 cf_save_LIBS="$LIBS"
8218 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8219 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8221 # while -W for passing linker flags is prevalent, it is not "standard".
8222 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8223 # incompatible _and_ non-standard -W option which gives an error. Work
8224 # around that pitfall.
8225 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8231 cf_new_extra_cppflags=
8233 for cf_add_cflags in $cf_pkg_cflags
8235 case "$cf_fix_cppflags" in
8237 case "$cf_add_cflags" in
8238 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8239 case "$cf_add_cflags" in
8241 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8244 && test -z "${cf_tst_cflags}" \
8245 && cf_fix_cppflags=yes
8247 if test "$cf_fix_cppflags" = yes ; then
8249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8253 elif test "${cf_tst_cflags}" = "\"'" ; then
8255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8266 case "$cf_add_cflags" in
8268 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8270 CPPFLAGS=`echo "$CPPFLAGS" | \
8271 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8272 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8277 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8278 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8285 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8286 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8299 && test -z "${cf_tst_cflags}" \
8300 && cf_fix_cppflags=no
8305 if test -n "$cf_new_cflags" ; then
8307 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8308 CFLAGS="${CFLAGS}$cf_new_cflags"
8312 if test -n "$cf_new_cppflags" ; then
8314 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8315 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8319 if test -n "$cf_new_extra_cppflags" ; then
8321 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8322 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8329 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8331 for cf_add_1lib in $cf_add_0lib; do
8332 for cf_add_2lib in $cf_add_libs; do
8333 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8338 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8342 cat >"conftest.$ac_ext" <<_ACEOF
8343 #line 8343 "configure"
8344 #include "confdefs.h"
8345 #include <${cf_cv_ncurses_header:-curses.h}>
8349 initscr(); mousemask(0,0); tigetstr((char *)0);
8354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8355 if { (eval echo "$as_me:8355: \"$ac_link\"") >&5
8356 (eval $ac_link) 2>&5
8358 echo "$as_me:8358: \$? = $ac_status" >&5
8359 (exit "$ac_status"); } &&
8360 { ac_try='test -s "conftest$ac_exeext"'
8361 { (eval echo "$as_me:8361: \"$ac_try\"") >&5
8364 echo "$as_me:8364: \$? = $ac_status" >&5
8365 (exit "$ac_status"); }; }; then
8366 if test "$cross_compiling" = yes; then
8367 cf_test_ncuconfig=maybe
8369 cat >"conftest.$ac_ext" <<_ACEOF
8370 #line 8370 "configure"
8371 #include "confdefs.h"
8372 #include <${cf_cv_ncurses_header:-curses.h}>
8374 { const char *xx = curses_version(); return (xx == 0); }
8376 rm -f "conftest$ac_exeext"
8377 if { (eval echo "$as_me:8377: \"$ac_link\"") >&5
8378 (eval $ac_link) 2>&5
8380 echo "$as_me:8380: \$? = $ac_status" >&5
8381 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8382 { (eval echo "$as_me:8382: \"$ac_try\"") >&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit "$ac_status"); }; }; then
8387 cf_test_ncuconfig=yes
8389 echo "$as_me: program exited with status $ac_status" >&5
8390 echo "$as_me: failed program was:" >&5
8391 cat "conftest.$ac_ext" >&5
8392 cf_test_ncuconfig=no
8394 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8397 echo "$as_me: failed program was:" >&5
8398 cat "conftest.$ac_ext" >&5
8399 cf_test_ncuconfig=no
8401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8403 CFLAGS="$cf_save_CFLAGS"
8404 CPPFLAGS="$cf_save_CPPFLAGS"
8405 LIBS="$cf_save_LIBS"
8407 if test "x$cf_test_ncuconfig" != xyes; then
8408 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8409 cf_pkg_cflags="$cf_temp"
8410 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8411 cf_pkg_libs="$cf_temp"
8416 for cf_add_cflags in $cf_pkg_cflags
8418 case "x$cf_add_cflags" in
8421 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8424 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'`
8425 test "$CFLAGS" != "$cf_old_cflag" || break
8427 CFLAGS="$cf_old_cflag"
8430 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8433 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'`
8434 test "$CPPFLAGS" != "$cf_old_cflag" || break
8436 CPPFLAGS="$cf_old_cflag"
8445 cf_new_extra_cppflags=
8447 for cf_add_cflags in $cf_add_cflags
8449 case "$cf_fix_cppflags" in
8451 case "$cf_add_cflags" in
8452 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8453 case "$cf_add_cflags" in
8455 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8457 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8458 && test -z "${cf_tst_cflags}" \
8459 && cf_fix_cppflags=yes
8461 if test "$cf_fix_cppflags" = yes ; then
8463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8467 elif test "${cf_tst_cflags}" = "\"'" ; then
8469 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8470 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8480 case "$cf_add_cflags" in
8482 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8484 CPPFLAGS=`echo "$CPPFLAGS" | \
8485 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8486 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8491 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8492 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8499 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8500 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8507 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8508 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8510 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8512 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8513 && test -z "${cf_tst_cflags}" \
8514 && cf_fix_cppflags=no
8519 if test -n "$cf_new_cflags" ; then
8521 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8522 CFLAGS="${CFLAGS}$cf_new_cflags"
8526 if test -n "$cf_new_cppflags" ; then
8528 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8529 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8533 if test -n "$cf_new_extra_cppflags" ; then
8535 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8536 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8545 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8547 for cf_add_1lib in $cf_add_0lib; do
8548 for cf_add_2lib in $cf_add_libs; do
8549 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8554 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8558 cat >"conftest.$ac_ext" <<_ACEOF
8559 #line 8559 "configure"
8560 #include "confdefs.h"
8561 #include <${cf_cv_ncurses_header:-curses.h}>
8565 initscr(); mousemask(0,0); tigetstr((char *)0);
8570 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8571 if { (eval echo "$as_me:8571: \"$ac_link\"") >&5
8572 (eval $ac_link) 2>&5
8574 echo "$as_me:8574: \$? = $ac_status" >&5
8575 (exit "$ac_status"); } &&
8576 { ac_try='test -s "conftest$ac_exeext"'
8577 { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8580 echo "$as_me:8580: \$? = $ac_status" >&5
8581 (exit "$ac_status"); }; }; then
8582 if test "$cross_compiling" = yes; then
8583 cf_have_ncuconfig=maybe
8585 cat >"conftest.$ac_ext" <<_ACEOF
8586 #line 8586 "configure"
8587 #include "confdefs.h"
8588 #include <${cf_cv_ncurses_header:-curses.h}>
8590 { const char *xx = curses_version(); return (xx == 0); }
8592 rm -f "conftest$ac_exeext"
8593 if { (eval echo "$as_me:8593: \"$ac_link\"") >&5
8594 (eval $ac_link) 2>&5
8596 echo "$as_me:8596: \$? = $ac_status" >&5
8597 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8598 { (eval echo "$as_me:8598: \"$ac_try\"") >&5
8601 echo "$as_me:8601: \$? = $ac_status" >&5
8602 (exit "$ac_status"); }; }; then
8603 cf_have_ncuconfig=yes
8605 echo "$as_me: program exited with status $ac_status" >&5
8606 echo "$as_me: failed program was:" >&5
8607 cat "conftest.$ac_ext" >&5
8608 cf_have_ncuconfig=no
8610 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8613 echo "$as_me: failed program was:" >&5
8614 cat "conftest.$ac_ext" >&5
8615 cf_have_ncuconfig=no
8617 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8618 echo "$as_me:8618: result: $cf_have_ncuconfig" >&5
8619 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8620 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8621 if test "$cf_have_ncuconfig" != "yes"
8623 CPPFLAGS="$cf_save_CPPFLAGS"
8624 LIBS="$cf_save_LIBS"
8625 NCURSES_CONFIG_PKG=none
8628 cat >>confdefs.h <<\EOF
8632 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8634 echo "$as_me:8634: checking for terminfo header" >&5
8635 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8636 if test "${cf_cv_term_header+set}" = set; then
8637 echo $ECHO_N "(cached) $ECHO_C" >&6
8640 case "${cf_cv_ncurses_header}" in
8641 (*/ncurses.h|*/ncursesw.h)
8642 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8645 cf_term_header=term.h
8649 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8651 cat >"conftest.$ac_ext" <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8655 #include <${cf_cv_ncurses_header:-curses.h}>
8661 int x = auto_left_margin; (void)x
8666 rm -f "conftest.$ac_objext"
8667 if { (eval echo "$as_me:8667: \"$ac_compile\"") >&5
8668 (eval $ac_compile) 2>&5
8670 echo "$as_me:8670: \$? = $ac_status" >&5
8671 (exit "$ac_status"); } &&
8672 { ac_try='test -s "conftest.$ac_objext"'
8673 { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8676 echo "$as_me:8676: \$? = $ac_status" >&5
8677 (exit "$ac_status"); }; }; then
8679 cf_cv_term_header="$cf_test"
8681 echo "$as_me: failed program was:" >&5
8682 cat "conftest.$ac_ext" >&5
8684 cf_cv_term_header=unknown
8687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8688 test "$cf_cv_term_header" != unknown && break
8692 echo "$as_me:8692: result: $cf_cv_term_header" >&5
8693 echo "${ECHO_T}$cf_cv_term_header" >&6
8695 # Set definitions to allow ifdef'ing to accommodate subdirectories
8697 case "$cf_cv_term_header" in
8700 cat >>confdefs.h <<\EOF
8701 #define HAVE_TERM_H 1
8707 case "$cf_cv_term_header" in
8710 cat >>confdefs.h <<\EOF
8711 #define HAVE_NCURSES_TERM_H 1
8717 cat >>confdefs.h <<\EOF
8718 #define HAVE_NCURSESW_TERM_H 1
8727 echo "$as_me:8727: result: no" >&5
8728 echo "${ECHO_T}no" >&6
8729 NCURSES_CONFIG_PKG=none
8732 NCURSES_CONFIG_PKG=none
8735 if test "x$cf_have_ncuconfig" = "xno"; then
8736 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8738 if test -n "$ac_tool_prefix"; then
8739 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8741 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8742 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8743 echo "$as_me:8743: checking for $ac_word" >&5
8744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8745 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8746 echo $ECHO_N "(cached) $ECHO_C" >&6
8748 if test -n "$NCURSES_CONFIG"; then
8749 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8751 ac_save_IFS=$IFS; IFS=$ac_path_separator
8753 for ac_dir in $ac_dummy; do
8755 test -z "$ac_dir" && ac_dir=.
8756 $as_executable_p "$ac_dir/$ac_word" || continue
8757 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8758 echo "$as_me:8758: found $ac_dir/$ac_word" >&5
8764 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8765 if test -n "$NCURSES_CONFIG"; then
8766 echo "$as_me:8766: result: $NCURSES_CONFIG" >&5
8767 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8769 echo "$as_me:8769: result: no" >&5
8770 echo "${ECHO_T}no" >&6
8773 test -n "$NCURSES_CONFIG" && break
8776 if test -z "$NCURSES_CONFIG"; then
8777 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8778 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8780 # Extract the first word of "$ac_prog", so it can be a program name with args.
8781 set dummy $ac_prog; ac_word=$2
8782 echo "$as_me:8782: checking for $ac_word" >&5
8783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8784 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8785 echo $ECHO_N "(cached) $ECHO_C" >&6
8787 if test -n "$ac_ct_NCURSES_CONFIG"; then
8788 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8790 ac_save_IFS=$IFS; IFS=$ac_path_separator
8792 for ac_dir in $ac_dummy; do
8794 test -z "$ac_dir" && ac_dir=.
8795 $as_executable_p "$ac_dir/$ac_word" || continue
8796 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8797 echo "$as_me:8797: found $ac_dir/$ac_word" >&5
8803 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8804 if test -n "$ac_ct_NCURSES_CONFIG"; then
8805 echo "$as_me:8805: result: $ac_ct_NCURSES_CONFIG" >&5
8806 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8808 echo "$as_me:8808: result: no" >&5
8809 echo "${ECHO_T}no" >&6
8812 test -n "$ac_ct_NCURSES_CONFIG" && break
8814 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8816 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8819 if test "$NCURSES_CONFIG" != none ; then
8821 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8823 case "x$cf_add_cflags" in
8826 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8829 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'`
8830 test "$CFLAGS" != "$cf_old_cflag" || break
8832 CFLAGS="$cf_old_cflag"
8835 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8838 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'`
8839 test "$CPPFLAGS" != "$cf_old_cflag" || break
8841 CPPFLAGS="$cf_old_cflag"
8850 cf_new_extra_cppflags=
8852 for cf_add_cflags in $cf_add_cflags
8854 case "$cf_fix_cppflags" in
8856 case "$cf_add_cflags" in
8857 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8858 case "$cf_add_cflags" in
8860 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8862 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8863 && test -z "${cf_tst_cflags}" \
8864 && cf_fix_cppflags=yes
8866 if test "$cf_fix_cppflags" = yes ; then
8868 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8869 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8872 elif test "${cf_tst_cflags}" = "\"'" ; then
8874 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8875 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8885 case "$cf_add_cflags" in
8887 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8889 CPPFLAGS=`echo "$CPPFLAGS" | \
8890 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8891 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8896 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8897 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8904 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8905 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8912 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8913 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8915 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8917 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8918 && test -z "${cf_tst_cflags}" \
8919 && cf_fix_cppflags=no
8924 if test -n "$cf_new_cflags" ; then
8926 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8927 CFLAGS="${CFLAGS}$cf_new_cflags"
8931 if test -n "$cf_new_cppflags" ; then
8933 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8934 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8938 if test -n "$cf_new_extra_cppflags" ; then
8940 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8941 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8950 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8952 for cf_add_1lib in $cf_add_0lib; do
8953 for cf_add_2lib in $cf_add_libs; do
8954 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8959 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8963 # even with config script, some packages use no-override for curses.h
8965 echo "$as_me:8965: checking if we have identified curses headers" >&5
8966 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8967 if test "${cf_cv_ncurses_header+set}" = set; then
8968 echo $ECHO_N "(cached) $ECHO_C" >&6
8971 cf_cv_ncurses_header=none
8973 ncurses.h $cf_cv_screen/ncurses.h \
8974 curses.h $cf_cv_screen/curses.h
8976 cat >"conftest.$ac_ext" <<_ACEOF
8977 #line 8977 "configure"
8978 #include "confdefs.h"
8979 #include <${cf_header}>
8983 initscr(); tgoto("?", 0,0)
8988 rm -f "conftest.$ac_objext"
8989 if { (eval echo "$as_me:8989: \"$ac_compile\"") >&5
8990 (eval $ac_compile) 2>&5
8992 echo "$as_me:8992: \$? = $ac_status" >&5
8993 (exit "$ac_status"); } &&
8994 { ac_try='test -s "conftest.$ac_objext"'
8995 { (eval echo "$as_me:8995: \"$ac_try\"") >&5
8998 echo "$as_me:8998: \$? = $ac_status" >&5
8999 (exit "$ac_status"); }; }; then
9000 cf_cv_ncurses_header=$cf_header; break
9002 echo "$as_me: failed program was:" >&5
9003 cat "conftest.$ac_ext" >&5
9005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9009 echo "$as_me:9009: result: $cf_cv_ncurses_header" >&5
9010 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9012 if test "$cf_cv_ncurses_header" = none ; then
9013 { { echo "$as_me:9013: error: No curses header-files found" >&5
9014 echo "$as_me: error: No curses header-files found" >&2;}
9015 { (exit 1); exit 1; }; }
9018 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9020 for ac_header in $cf_cv_ncurses_header
9022 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9023 echo "$as_me:9023: checking for $ac_header" >&5
9024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9026 echo $ECHO_N "(cached) $ECHO_C" >&6
9028 cat >"conftest.$ac_ext" <<_ACEOF
9029 #line 9029 "configure"
9030 #include "confdefs.h"
9031 #include <$ac_header>
9033 if { (eval echo "$as_me:9033: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9034 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9036 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9038 cat conftest.err >&5
9039 echo "$as_me:9039: \$? = $ac_status" >&5
9040 (exit "$ac_status"); } >/dev/null; then
9041 if test -s conftest.err; then
9042 ac_cpp_err=$ac_c_preproc_warn_flag
9049 if test -z "$ac_cpp_err"; then
9050 eval "$as_ac_Header=yes"
9052 echo "$as_me: failed program was:" >&5
9053 cat "conftest.$ac_ext" >&5
9054 eval "$as_ac_Header=no"
9056 rm -f conftest.err "conftest.$ac_ext"
9058 echo "$as_me:9058: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9059 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9060 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9061 cat >>confdefs.h <<EOF
9062 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9068 cat >>confdefs.h <<\EOF
9072 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9074 cat >>confdefs.h <<EOF
9075 #define $cf_nculib_ROOT 1
9078 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9082 cf_ncuhdr_root=$cf_cv_screen
9084 test -n "$cf_cv_curses_dir" && \
9085 test "$cf_cv_curses_dir" != "no" && { \
9087 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9088 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9090 while test "$cf_add_incdir" != /usr/include
9092 if test -d "$cf_add_incdir"
9095 if test -n "$CFLAGS$CPPFLAGS" ; then
9096 # a loop is needed to ensure we can add subdirs of existing dirs
9097 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9098 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9099 cf_have_incdir=yes; break
9104 if test "$cf_have_incdir" = no ; then
9105 if test "$cf_add_incdir" = /usr/local/include ; then
9106 if test "$GCC" = yes
9108 cf_save_CPPFLAGS=$CPPFLAGS
9110 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9111 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9113 cat >"conftest.$ac_ext" <<_ACEOF
9114 #line 9114 "configure"
9115 #include "confdefs.h"
9125 rm -f "conftest.$ac_objext"
9126 if { (eval echo "$as_me:9126: \"$ac_compile\"") >&5
9127 (eval $ac_compile) 2>&5
9129 echo "$as_me:9129: \$? = $ac_status" >&5
9130 (exit "$ac_status"); } &&
9131 { ac_try='test -s "conftest.$ac_objext"'
9132 { (eval echo "$as_me:9132: \"$ac_try\"") >&5
9135 echo "$as_me:9135: \$? = $ac_status" >&5
9136 (exit "$ac_status"); }; }; then
9139 echo "$as_me: failed program was:" >&5
9140 cat "conftest.$ac_ext" >&5
9143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9144 CPPFLAGS=$cf_save_CPPFLAGS
9149 if test "$cf_have_incdir" = no ; then
9150 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9152 echo "${as_me:-configure}:9152: testing adding $cf_add_incdir to include-path ..." 1>&5
9154 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9156 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9157 test "$cf_top_incdir" = "$cf_add_incdir" && break
9158 cf_add_incdir="$cf_top_incdir"
9171 echo "$as_me:9171: checking for $cf_ncuhdr_root header in include-path" >&5
9172 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9173 if test "${cf_cv_ncurses_h+set}" = set; then
9174 echo $ECHO_N "(cached) $ECHO_C" >&6
9177 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9178 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9179 for cf_header in $cf_header_list
9182 cat >"conftest.$ac_ext" <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9186 #include <$cf_header>
9191 #ifdef NCURSES_VERSION
9193 printf("%s\\n", NCURSES_VERSION);
9206 rm -f "conftest.$ac_objext"
9207 if { (eval echo "$as_me:9207: \"$ac_compile\"") >&5
9208 (eval $ac_compile) 2>&5
9210 echo "$as_me:9210: \$? = $ac_status" >&5
9211 (exit "$ac_status"); } &&
9212 { ac_try='test -s "conftest.$ac_objext"'
9213 { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9216 echo "$as_me:9216: \$? = $ac_status" >&5
9217 (exit "$ac_status"); }; }; then
9218 cf_cv_ncurses_h=$cf_header
9221 echo "$as_me: failed program was:" >&5
9222 cat "conftest.$ac_ext" >&5
9225 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9227 test "$cf_cv_ncurses_h" != no && break
9231 echo "$as_me:9231: result: $cf_cv_ncurses_h" >&5
9232 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9234 if test "$cf_cv_ncurses_h" != no ; then
9235 cf_cv_ncurses_header=$cf_cv_ncurses_h
9238 echo "$as_me:9238: checking for $cf_ncuhdr_root include-path" >&5
9239 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9240 if test "${cf_cv_ncurses_h2+set}" = set; then
9241 echo $ECHO_N "(cached) $ECHO_C" >&6
9244 test -n "$verbose" && echo
9248 # collect the current set of include-directories from compiler flags
9249 cf_header_path_list=""
9250 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9251 for cf_header_path in $CPPFLAGS $CFLAGS
9253 case "$cf_header_path" in
9255 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9257 test "x$cf_header_path" != "xNONE" && \
9258 test -d "$cf_header_path" && \
9260 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9261 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9262 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9263 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9264 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9265 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"
9268 cf_header_path_list="$cf_header_path_list $cf_search"
9274 # add the variations for the package we are looking for
9278 test "x$prefix" != "xNONE" && \
9279 test -d "$prefix" && \
9281 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9282 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9283 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9284 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9285 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9286 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9289 for cf_subdir_prefix in \
9298 test "x$cf_subdir_prefix" != "x$prefix" && \
9299 test -d "$cf_subdir_prefix" && \
9300 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9301 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9302 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9303 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9304 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9305 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9306 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"
9311 test "$includedir" != NONE && \
9312 test "$includedir" != "/usr/include" && \
9313 test -d "$includedir" && {
9314 test -d "$includedir" && cf_search="$cf_search $includedir"
9315 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9318 test "$oldincludedir" != NONE && \
9319 test "$oldincludedir" != "/usr/include" && \
9320 test -d "$oldincludedir" && {
9321 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9322 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9325 cf_search="$cf_search $cf_header_path_list"
9327 test -n "$verbose" && echo "search path $cf_search"
9328 cf_save2_CPPFLAGS="$CPPFLAGS"
9329 for cf_incdir in $cf_search
9332 if test -n "$cf_incdir" ; then
9333 for cf_add_incdir in $cf_incdir
9335 while test "$cf_add_incdir" != /usr/include
9337 if test -d "$cf_add_incdir"
9340 if test -n "$CFLAGS$CPPFLAGS" ; then
9341 # a loop is needed to ensure we can add subdirs of existing dirs
9342 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9343 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9344 cf_have_incdir=yes; break
9349 if test "$cf_have_incdir" = no ; then
9350 if test "$cf_add_incdir" = /usr/local/include ; then
9351 if test "$GCC" = yes
9353 cf_save_CPPFLAGS=$CPPFLAGS
9355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9356 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9358 cat >"conftest.$ac_ext" <<_ACEOF
9359 #line 9359 "configure"
9360 #include "confdefs.h"
9370 rm -f "conftest.$ac_objext"
9371 if { (eval echo "$as_me:9371: \"$ac_compile\"") >&5
9372 (eval $ac_compile) 2>&5
9374 echo "$as_me:9374: \$? = $ac_status" >&5
9375 (exit "$ac_status"); } &&
9376 { ac_try='test -s "conftest.$ac_objext"'
9377 { (eval echo "$as_me:9377: \"$ac_try\"") >&5
9380 echo "$as_me:9380: \$? = $ac_status" >&5
9381 (exit "$ac_status"); }; }; then
9384 echo "$as_me: failed program was:" >&5
9385 cat "conftest.$ac_ext" >&5
9388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9389 CPPFLAGS=$cf_save_CPPFLAGS
9394 if test "$cf_have_incdir" = no ; then
9395 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9397 echo "${as_me:-configure}:9397: testing adding $cf_add_incdir to include-path ..." 1>&5
9399 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9401 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9402 test "$cf_top_incdir" = "$cf_add_incdir" && break
9403 cf_add_incdir="$cf_top_incdir"
9419 cat >"conftest.$ac_ext" <<_ACEOF
9420 #line 9420 "configure"
9421 #include "confdefs.h"
9423 #include <$cf_header>
9428 #ifdef NCURSES_VERSION
9430 printf("%s\\n", NCURSES_VERSION);
9443 rm -f "conftest.$ac_objext"
9444 if { (eval echo "$as_me:9444: \"$ac_compile\"") >&5
9445 (eval $ac_compile) 2>&5
9447 echo "$as_me:9447: \$? = $ac_status" >&5
9448 (exit "$ac_status"); } &&
9449 { ac_try='test -s "conftest.$ac_objext"'
9450 { (eval echo "$as_me:9450: \"$ac_try\"") >&5
9453 echo "$as_me:9453: \$? = $ac_status" >&5
9454 (exit "$ac_status"); }; }; then
9455 cf_cv_ncurses_h2=$cf_header
9458 echo "$as_me: failed program was:" >&5
9459 cat "conftest.$ac_ext" >&5
9462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9464 if test "$cf_cv_ncurses_h2" != no ; then
9465 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9466 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9469 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9471 CPPFLAGS="$cf_save2_CPPFLAGS"
9472 test "$cf_cv_ncurses_h2" != no && break
9474 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9474: error: not found" >&5
9475 echo "$as_me: error: not found" >&2;}
9476 { (exit 1); exit 1; }; }
9479 echo "$as_me:9479: result: $cf_cv_ncurses_h2" >&5
9480 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9482 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9483 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9484 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9485 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9488 if test -n "$cf_1st_incdir" ; then
9489 for cf_add_incdir in $cf_1st_incdir
9491 while test "$cf_add_incdir" != /usr/include
9493 if test -d "$cf_add_incdir"
9496 if test -n "$CFLAGS$CPPFLAGS" ; then
9497 # a loop is needed to ensure we can add subdirs of existing dirs
9498 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9499 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9500 cf_have_incdir=yes; break
9505 if test "$cf_have_incdir" = no ; then
9506 if test "$cf_add_incdir" = /usr/local/include ; then
9507 if test "$GCC" = yes
9509 cf_save_CPPFLAGS=$CPPFLAGS
9511 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9512 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9514 cat >"conftest.$ac_ext" <<_ACEOF
9515 #line 9515 "configure"
9516 #include "confdefs.h"
9526 rm -f "conftest.$ac_objext"
9527 if { (eval echo "$as_me:9527: \"$ac_compile\"") >&5
9528 (eval $ac_compile) 2>&5
9530 echo "$as_me:9530: \$? = $ac_status" >&5
9531 (exit "$ac_status"); } &&
9532 { ac_try='test -s "conftest.$ac_objext"'
9533 { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9536 echo "$as_me:9536: \$? = $ac_status" >&5
9537 (exit "$ac_status"); }; }; then
9540 echo "$as_me: failed program was:" >&5
9541 cat "conftest.$ac_ext" >&5
9544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9545 CPPFLAGS=$cf_save_CPPFLAGS
9550 if test "$cf_have_incdir" = no ; then
9551 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9553 echo "${as_me:-configure}:9553: testing adding $cf_add_incdir to include-path ..." 1>&5
9555 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9557 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9558 test "$cf_top_incdir" = "$cf_add_incdir" && break
9559 cf_add_incdir="$cf_top_incdir"
9572 # Set definitions to allow ifdef'ing for ncurses.h
9574 case "$cf_cv_ncurses_header" in
9577 cat >>confdefs.h <<\EOF
9578 #define HAVE_NCURSES_H 1
9584 case "$cf_cv_ncurses_header" in
9585 (ncurses/curses.h|ncurses/ncurses.h)
9587 cat >>confdefs.h <<\EOF
9588 #define HAVE_NCURSES_NCURSES_H 1
9592 (ncursesw/curses.h|ncursesw/ncurses.h)
9594 cat >>confdefs.h <<\EOF
9595 #define HAVE_NCURSESW_NCURSES_H 1
9601 echo "$as_me:9601: checking for terminfo header" >&5
9602 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9603 if test "${cf_cv_term_header+set}" = set; then
9604 echo $ECHO_N "(cached) $ECHO_C" >&6
9607 case "${cf_cv_ncurses_header}" in
9608 (*/ncurses.h|*/ncursesw.h)
9609 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9612 cf_term_header=term.h
9616 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9618 cat >"conftest.$ac_ext" <<_ACEOF
9619 #line 9619 "configure"
9620 #include "confdefs.h"
9622 #include <${cf_cv_ncurses_header:-curses.h}>
9628 int x = auto_left_margin; (void)x
9633 rm -f "conftest.$ac_objext"
9634 if { (eval echo "$as_me:9634: \"$ac_compile\"") >&5
9635 (eval $ac_compile) 2>&5
9637 echo "$as_me:9637: \$? = $ac_status" >&5
9638 (exit "$ac_status"); } &&
9639 { ac_try='test -s "conftest.$ac_objext"'
9640 { (eval echo "$as_me:9640: \"$ac_try\"") >&5
9643 echo "$as_me:9643: \$? = $ac_status" >&5
9644 (exit "$ac_status"); }; }; then
9646 cf_cv_term_header="$cf_test"
9648 echo "$as_me: failed program was:" >&5
9649 cat "conftest.$ac_ext" >&5
9651 cf_cv_term_header=unknown
9654 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9655 test "$cf_cv_term_header" != unknown && break
9659 echo "$as_me:9659: result: $cf_cv_term_header" >&5
9660 echo "${ECHO_T}$cf_cv_term_header" >&6
9662 # Set definitions to allow ifdef'ing to accommodate subdirectories
9664 case "$cf_cv_term_header" in
9667 cat >>confdefs.h <<\EOF
9668 #define HAVE_TERM_H 1
9674 case "$cf_cv_term_header" in
9677 cat >>confdefs.h <<\EOF
9678 #define HAVE_NCURSES_TERM_H 1
9684 cat >>confdefs.h <<\EOF
9685 #define HAVE_NCURSESW_TERM_H 1
9691 # some applications need this, but should check for NCURSES_VERSION
9693 cat >>confdefs.h <<\EOF
9697 echo "$as_me:9697: checking for ncurses version" >&5
9698 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9699 if test "${cf_cv_ncurses_version+set}" = set; then
9700 echo $ECHO_N "(cached) $ECHO_C" >&6
9703 cf_cv_ncurses_version=no
9705 rm -f "$cf_tempfile"
9706 if test "$cross_compiling" = yes; then
9708 # This will not work if the preprocessor splits the line after the
9709 # Autoconf token. The 'unproto' program does that.
9710 cat > "conftest.$ac_ext" <<EOF
9711 #include <${cf_cv_ncurses_header:-curses.h}>
9713 #ifdef NCURSES_VERSION
9714 Autoconf NCURSES_VERSION
9722 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9723 { (eval echo "$as_me:9723: \"$cf_try\"") >&5
9726 echo "$as_me:9726: \$? = $ac_status" >&5
9727 (exit "$ac_status"); }
9728 if test -f conftest.out ; then
9729 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9730 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9735 cat >"conftest.$ac_ext" <<_ACEOF
9736 #line 9736 "configure"
9737 #include "confdefs.h"
9739 #include <${cf_cv_ncurses_header:-curses.h}>
9743 FILE *fp = fopen("$cf_tempfile", "w");
9744 #ifdef NCURSES_VERSION
9745 # ifdef NCURSES_VERSION_PATCH
9746 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9748 fprintf(fp, "%s\\n", NCURSES_VERSION);
9752 fprintf(fp, "old\\n");
9757 ${cf_cv_main_return:-return}(0);
9760 rm -f "conftest$ac_exeext"
9761 if { (eval echo "$as_me:9761: \"$ac_link\"") >&5
9762 (eval $ac_link) 2>&5
9764 echo "$as_me:9764: \$? = $ac_status" >&5
9765 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9766 { (eval echo "$as_me:9766: \"$ac_try\"") >&5
9769 echo "$as_me:9769: \$? = $ac_status" >&5
9770 (exit "$ac_status"); }; }; then
9772 cf_cv_ncurses_version=`cat $cf_tempfile`
9774 echo "$as_me: program exited with status $ac_status" >&5
9775 echo "$as_me: failed program was:" >&5
9776 cat "conftest.$ac_ext" >&5
9778 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9780 rm -f "$cf_tempfile"
9783 echo "$as_me:9783: result: $cf_cv_ncurses_version" >&5
9784 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9785 test "$cf_cv_ncurses_version" = no ||
9786 cat >>confdefs.h <<\EOF
9790 cf_nculib_root=$cf_cv_screen
9791 # This works, except for the special case where we find gpm, but
9792 # ncurses is in a nonstandard location via $LIBS, and we really want
9795 cf_ncurses_SAVE="$LIBS"
9796 echo "$as_me:9796: checking for Gpm_Open in -lgpm" >&5
9797 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9798 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9799 echo $ECHO_N "(cached) $ECHO_C" >&6
9801 ac_check_lib_save_LIBS=$LIBS
9803 cat >"conftest.$ac_ext" <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9807 /* Override any gcc2 internal prototype to avoid an error. */
9811 /* We use char because int might match the return type of a gcc2
9812 builtin and then its argument prototype would still apply. */
9822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9823 if { (eval echo "$as_me:9823: \"$ac_link\"") >&5
9824 (eval $ac_link) 2>&5
9826 echo "$as_me:9826: \$? = $ac_status" >&5
9827 (exit "$ac_status"); } &&
9828 { ac_try='test -s "conftest$ac_exeext"'
9829 { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9832 echo "$as_me:9832: \$? = $ac_status" >&5
9833 (exit "$ac_status"); }; }; then
9834 ac_cv_lib_gpm_Gpm_Open=yes
9836 echo "$as_me: failed program was:" >&5
9837 cat "conftest.$ac_ext" >&5
9838 ac_cv_lib_gpm_Gpm_Open=no
9840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9841 LIBS=$ac_check_lib_save_LIBS
9843 echo "$as_me:9843: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9844 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9845 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9846 echo "$as_me:9846: checking for initscr in -lgpm" >&5
9847 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9848 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9849 echo $ECHO_N "(cached) $ECHO_C" >&6
9851 ac_check_lib_save_LIBS=$LIBS
9853 cat >"conftest.$ac_ext" <<_ACEOF
9854 #line 9854 "configure"
9855 #include "confdefs.h"
9857 /* Override any gcc2 internal prototype to avoid an error. */
9861 /* We use char because int might match the return type of a gcc2
9862 builtin and then its argument prototype would still apply. */
9872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9873 if { (eval echo "$as_me:9873: \"$ac_link\"") >&5
9874 (eval $ac_link) 2>&5
9876 echo "$as_me:9876: \$? = $ac_status" >&5
9877 (exit "$ac_status"); } &&
9878 { ac_try='test -s "conftest$ac_exeext"'
9879 { (eval echo "$as_me:9879: \"$ac_try\"") >&5
9882 echo "$as_me:9882: \$? = $ac_status" >&5
9883 (exit "$ac_status"); }; }; then
9884 ac_cv_lib_gpm_initscr=yes
9886 echo "$as_me: failed program was:" >&5
9887 cat "conftest.$ac_ext" >&5
9888 ac_cv_lib_gpm_initscr=no
9890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9891 LIBS=$ac_check_lib_save_LIBS
9893 echo "$as_me:9893: result: $ac_cv_lib_gpm_initscr" >&5
9894 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9895 if test "$ac_cv_lib_gpm_initscr" = yes; then
9896 LIBS="$cf_ncurses_SAVE"
9898 cf_ncurses_LIBS="-lgpm"
9905 # This is only necessary if you are linking against an obsolete
9906 # version of ncurses (but it should do no harm, since it is static).
9907 if test "$cf_nculib_root" = ncurses ; then
9908 echo "$as_me:9908: checking for tgoto in -lmytinfo" >&5
9909 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9910 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
9913 ac_check_lib_save_LIBS=$LIBS
9914 LIBS="-lmytinfo $LIBS"
9915 cat >"conftest.$ac_ext" <<_ACEOF
9916 #line 9916 "configure"
9917 #include "confdefs.h"
9919 /* Override any gcc2 internal prototype to avoid an error. */
9923 /* We use char because int might match the return type of a gcc2
9924 builtin and then its argument prototype would still apply. */
9934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9935 if { (eval echo "$as_me:9935: \"$ac_link\"") >&5
9936 (eval $ac_link) 2>&5
9938 echo "$as_me:9938: \$? = $ac_status" >&5
9939 (exit "$ac_status"); } &&
9940 { ac_try='test -s "conftest$ac_exeext"'
9941 { (eval echo "$as_me:9941: \"$ac_try\"") >&5
9944 echo "$as_me:9944: \$? = $ac_status" >&5
9945 (exit "$ac_status"); }; }; then
9946 ac_cv_lib_mytinfo_tgoto=yes
9948 echo "$as_me: failed program was:" >&5
9949 cat "conftest.$ac_ext" >&5
9950 ac_cv_lib_mytinfo_tgoto=no
9952 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9953 LIBS=$ac_check_lib_save_LIBS
9955 echo "$as_me:9955: result: $ac_cv_lib_mytinfo_tgoto" >&5
9956 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9957 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9958 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9968 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9970 for cf_add_1lib in $cf_add_0lib; do
9971 for cf_add_2lib in $cf_add_libs; do
9972 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9977 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9981 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9987 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9989 for cf_add_1lib in $cf_add_0lib; do
9990 for cf_add_2lib in $cf_add_libs; do
9991 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9996 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10002 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10004 echo "$as_me:10004: checking for initscr" >&5
10005 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10006 if test "${ac_cv_func_initscr+set}" = set; then
10007 echo $ECHO_N "(cached) $ECHO_C" >&6
10009 cat >"conftest.$ac_ext" <<_ACEOF
10010 #line 10010 "configure"
10011 #include "confdefs.h"
10012 #define initscr autoconf_temporary
10013 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10020 /* We use char because int might match the return type of a gcc2
10021 builtin and then its argument prototype would still apply. */
10022 char initscr (void);
10028 /* The GNU C library defines stubs for functions which it implements
10029 to always fail with ENOSYS. Some functions are actually named
10030 something starting with __ and the normal name is an alias. */
10031 #if defined (__stub_initscr) || defined (__stub___initscr)
10032 #error found stub for initscr
10040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10041 if { (eval echo "$as_me:10041: \"$ac_link\"") >&5
10042 (eval $ac_link) 2>&5
10044 echo "$as_me:10044: \$? = $ac_status" >&5
10045 (exit "$ac_status"); } &&
10046 { ac_try='test -s "conftest$ac_exeext"'
10047 { (eval echo "$as_me:10047: \"$ac_try\"") >&5
10048 (eval $ac_try) 2>&5
10050 echo "$as_me:10050: \$? = $ac_status" >&5
10051 (exit "$ac_status"); }; }; then
10052 ac_cv_func_initscr=yes
10054 echo "$as_me: failed program was:" >&5
10055 cat "conftest.$ac_ext" >&5
10056 ac_cv_func_initscr=no
10058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10060 echo "$as_me:10060: result: $ac_cv_func_initscr" >&5
10061 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10062 if test "$ac_cv_func_initscr" = yes; then
10063 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10066 cf_save_LIBS="$LIBS"
10067 echo "$as_me:10067: checking for initscr in -l$cf_nculib_root" >&5
10068 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10069 LIBS="-l$cf_nculib_root $LIBS"
10070 cat >"conftest.$ac_ext" <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073 #include <${cf_cv_ncurses_header:-curses.h}>
10082 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10083 if { (eval echo "$as_me:10083: \"$ac_link\"") >&5
10084 (eval $ac_link) 2>&5
10086 echo "$as_me:10086: \$? = $ac_status" >&5
10087 (exit "$ac_status"); } &&
10088 { ac_try='test -s "conftest$ac_exeext"'
10089 { (eval echo "$as_me:10089: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10092 echo "$as_me:10092: \$? = $ac_status" >&5
10093 (exit "$ac_status"); }; }; then
10094 echo "$as_me:10094: result: yes" >&5
10095 echo "${ECHO_T}yes" >&6
10096 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10099 echo "$as_me: failed program was:" >&5
10100 cat "conftest.$ac_ext" >&5
10101 echo "$as_me:10101: result: no" >&5
10102 echo "${ECHO_T}no" >&6
10105 cf_library_path_list=""
10106 if test -n "${LDFLAGS}${LIBS}" ; then
10107 for cf_library_path in $LDFLAGS $LIBS
10109 case "$cf_library_path" in
10111 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10113 test "x$cf_library_path" != "xNONE" && \
10114 test -d "$cf_library_path" && \
10116 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10117 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10118 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10119 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10120 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10121 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"
10124 cf_library_path_list="$cf_library_path_list $cf_search"
10132 test "x$prefix" != "xNONE" && \
10133 test -d "$prefix" && \
10135 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10136 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10137 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10138 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10139 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10140 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10143 for cf_subdir_prefix in \
10152 test "x$cf_subdir_prefix" != "x$prefix" && \
10153 test -d "$cf_subdir_prefix" && \
10154 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10155 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10156 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10157 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10158 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10159 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10160 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"
10165 cf_search="$cf_library_path_list $cf_search"
10167 for cf_libdir in $cf_search
10169 echo "$as_me:10169: checking for -l$cf_nculib_root in $cf_libdir" >&5
10170 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10171 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10172 cat >"conftest.$ac_ext" <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175 #include <${cf_cv_ncurses_header:-curses.h}>
10184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10185 if { (eval echo "$as_me:10185: \"$ac_link\"") >&5
10186 (eval $ac_link) 2>&5
10188 echo "$as_me:10188: \$? = $ac_status" >&5
10189 (exit "$ac_status"); } &&
10190 { ac_try='test -s "conftest$ac_exeext"'
10191 { (eval echo "$as_me:10191: \"$ac_try\"") >&5
10192 (eval $ac_try) 2>&5
10194 echo "$as_me:10194: \$? = $ac_status" >&5
10195 (exit "$ac_status"); }; }; then
10196 echo "$as_me:10196: result: yes" >&5
10197 echo "${ECHO_T}yes" >&6
10198 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10201 echo "$as_me: failed program was:" >&5
10202 cat "conftest.$ac_ext" >&5
10203 echo "$as_me:10203: result: no" >&5
10204 echo "${ECHO_T}no" >&6
10205 LIBS="$cf_save_LIBS"
10207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10211 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10215 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10217 if test "$cf_found_library" = no ; then
10218 { { echo "$as_me:10218: error: Cannot link $cf_nculib_root library" >&5
10219 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10220 { (exit 1); exit 1; }; }
10225 if test -n "$cf_ncurses_LIBS" ; then
10226 echo "$as_me:10226: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10227 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10228 cf_ncurses_SAVE="$LIBS"
10229 for p in $cf_ncurses_LIBS ; do
10230 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10231 if test "$q" != "$LIBS" ; then
10235 cat >"conftest.$ac_ext" <<_ACEOF
10236 #line 10236 "configure"
10237 #include "confdefs.h"
10238 #include <${cf_cv_ncurses_header:-curses.h}>
10242 initscr(); mousemask(0,0); tigetstr((char *)0);
10247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10248 if { (eval echo "$as_me:10248: \"$ac_link\"") >&5
10249 (eval $ac_link) 2>&5
10251 echo "$as_me:10251: \$? = $ac_status" >&5
10252 (exit "$ac_status"); } &&
10253 { ac_try='test -s "conftest$ac_exeext"'
10254 { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255 (eval $ac_try) 2>&5
10257 echo "$as_me:10257: \$? = $ac_status" >&5
10258 (exit "$ac_status"); }; }; then
10259 echo "$as_me:10259: result: yes" >&5
10260 echo "${ECHO_T}yes" >&6
10262 echo "$as_me: failed program was:" >&5
10263 cat "conftest.$ac_ext" >&5
10264 echo "$as_me:10264: result: no" >&5
10265 echo "${ECHO_T}no" >&6
10266 LIBS="$cf_ncurses_SAVE"
10268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10271 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10273 cat >>confdefs.h <<EOF
10274 #define $cf_nculib_ROOT 1
10279 NCURSES_CONFIG=none
10285 cf_ncuconfig_root=$cf_cv_screen
10286 cf_have_ncuconfig=no
10288 if test "x${PKG_CONFIG:=none}" != xnone; then
10289 echo "$as_me:10289: checking pkg-config for $cf_ncuconfig_root" >&5
10290 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10291 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10292 echo "$as_me:10292: result: yes" >&5
10293 echo "${ECHO_T}yes" >&6
10295 echo "$as_me:10295: checking if the $cf_ncuconfig_root package files work" >&5
10296 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10297 cf_have_ncuconfig=unknown
10299 cf_save_CFLAGS="$CFLAGS"
10300 cf_save_CPPFLAGS="$CPPFLAGS"
10301 cf_save_LIBS="$LIBS"
10303 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10304 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10306 # while -W for passing linker flags is prevalent, it is not "standard".
10307 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10308 # incompatible _and_ non-standard -W option which gives an error. Work
10309 # around that pitfall.
10310 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10316 cf_new_extra_cppflags=
10318 for cf_add_cflags in $cf_pkg_cflags
10320 case "$cf_fix_cppflags" in
10322 case "$cf_add_cflags" in
10323 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10324 case "$cf_add_cflags" in
10326 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10328 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10329 && test -z "${cf_tst_cflags}" \
10330 && cf_fix_cppflags=yes
10332 if test "$cf_fix_cppflags" = yes ; then
10334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10338 elif test "${cf_tst_cflags}" = "\"'" ; then
10340 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10341 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10347 case "$CPPFLAGS" in
10351 case "$cf_add_cflags" in
10353 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10355 CPPFLAGS=`echo "$CPPFLAGS" | \
10356 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10357 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10362 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10363 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10370 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10371 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10378 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10379 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10381 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10384 && test -z "${cf_tst_cflags}" \
10385 && cf_fix_cppflags=no
10390 if test -n "$cf_new_cflags" ; then
10392 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10393 CFLAGS="${CFLAGS}$cf_new_cflags"
10397 if test -n "$cf_new_cppflags" ; then
10399 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10400 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10404 if test -n "$cf_new_extra_cppflags" ; then
10406 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10407 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10411 cf_add_libs="$LIBS"
10414 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10415 # filter duplicates
10416 for cf_add_1lib in $cf_add_0lib; do
10417 for cf_add_2lib in $cf_add_libs; do
10418 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10423 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10425 LIBS="$cf_add_libs"
10427 cat >"conftest.$ac_ext" <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <${cf_cv_ncurses_header:-curses.h}>
10434 initscr(); mousemask(0,0); tigetstr((char *)0);
10439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10440 if { (eval echo "$as_me:10440: \"$ac_link\"") >&5
10441 (eval $ac_link) 2>&5
10443 echo "$as_me:10443: \$? = $ac_status" >&5
10444 (exit "$ac_status"); } &&
10445 { ac_try='test -s "conftest$ac_exeext"'
10446 { (eval echo "$as_me:10446: \"$ac_try\"") >&5
10447 (eval $ac_try) 2>&5
10449 echo "$as_me:10449: \$? = $ac_status" >&5
10450 (exit "$ac_status"); }; }; then
10451 if test "$cross_compiling" = yes; then
10452 cf_test_ncuconfig=maybe
10454 cat >"conftest.$ac_ext" <<_ACEOF
10455 #line 10455 "configure"
10456 #include "confdefs.h"
10457 #include <${cf_cv_ncurses_header:-curses.h}>
10459 { const char *xx = curses_version(); return (xx == 0); }
10461 rm -f "conftest$ac_exeext"
10462 if { (eval echo "$as_me:10462: \"$ac_link\"") >&5
10463 (eval $ac_link) 2>&5
10465 echo "$as_me:10465: \$? = $ac_status" >&5
10466 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10467 { (eval echo "$as_me:10467: \"$ac_try\"") >&5
10468 (eval $ac_try) 2>&5
10470 echo "$as_me:10470: \$? = $ac_status" >&5
10471 (exit "$ac_status"); }; }; then
10472 cf_test_ncuconfig=yes
10474 echo "$as_me: program exited with status $ac_status" >&5
10475 echo "$as_me: failed program was:" >&5
10476 cat "conftest.$ac_ext" >&5
10477 cf_test_ncuconfig=no
10479 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10482 echo "$as_me: failed program was:" >&5
10483 cat "conftest.$ac_ext" >&5
10484 cf_test_ncuconfig=no
10486 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10488 CFLAGS="$cf_save_CFLAGS"
10489 CPPFLAGS="$cf_save_CPPFLAGS"
10490 LIBS="$cf_save_LIBS"
10492 if test "x$cf_test_ncuconfig" != xyes; then
10493 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10494 cf_pkg_cflags="$cf_temp"
10495 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10496 cf_pkg_libs="$cf_temp"
10501 for cf_add_cflags in $cf_pkg_cflags
10503 case "x$cf_add_cflags" in
10506 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10509 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'`
10510 test "$CFLAGS" != "$cf_old_cflag" || break
10512 CFLAGS="$cf_old_cflag"
10515 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10518 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'`
10519 test "$CPPFLAGS" != "$cf_old_cflag" || break
10521 CPPFLAGS="$cf_old_cflag"
10530 cf_new_extra_cppflags=
10532 for cf_add_cflags in $cf_add_cflags
10534 case "$cf_fix_cppflags" in
10536 case "$cf_add_cflags" in
10537 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10538 case "$cf_add_cflags" in
10540 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10543 && test -z "${cf_tst_cflags}" \
10544 && cf_fix_cppflags=yes
10546 if test "$cf_fix_cppflags" = yes ; then
10548 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10549 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10552 elif test "${cf_tst_cflags}" = "\"'" ; then
10554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10561 case "$CPPFLAGS" in
10565 case "$cf_add_cflags" in
10567 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10569 CPPFLAGS=`echo "$CPPFLAGS" | \
10570 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10571 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10576 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10577 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10584 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10585 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10595 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10598 && test -z "${cf_tst_cflags}" \
10599 && cf_fix_cppflags=no
10604 if test -n "$cf_new_cflags" ; then
10606 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10607 CFLAGS="${CFLAGS}$cf_new_cflags"
10611 if test -n "$cf_new_cppflags" ; then
10613 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10614 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10618 if test -n "$cf_new_extra_cppflags" ; then
10620 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10621 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10627 cf_add_libs="$LIBS"
10630 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10631 # filter duplicates
10632 for cf_add_1lib in $cf_add_0lib; do
10633 for cf_add_2lib in $cf_add_libs; do
10634 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10639 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10641 LIBS="$cf_add_libs"
10643 cat >"conftest.$ac_ext" <<_ACEOF
10644 #line 10644 "configure"
10645 #include "confdefs.h"
10646 #include <${cf_cv_ncurses_header:-curses.h}>
10650 initscr(); mousemask(0,0); tigetstr((char *)0);
10655 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10656 if { (eval echo "$as_me:10656: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10659 echo "$as_me:10659: \$? = $ac_status" >&5
10660 (exit "$ac_status"); } &&
10661 { ac_try='test -s "conftest$ac_exeext"'
10662 { (eval echo "$as_me:10662: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10665 echo "$as_me:10665: \$? = $ac_status" >&5
10666 (exit "$ac_status"); }; }; then
10667 if test "$cross_compiling" = yes; then
10668 cf_have_ncuconfig=maybe
10670 cat >"conftest.$ac_ext" <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673 #include <${cf_cv_ncurses_header:-curses.h}>
10675 { const char *xx = curses_version(); return (xx == 0); }
10677 rm -f "conftest$ac_exeext"
10678 if { (eval echo "$as_me:10678: \"$ac_link\"") >&5
10679 (eval $ac_link) 2>&5
10681 echo "$as_me:10681: \$? = $ac_status" >&5
10682 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10683 { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684 (eval $ac_try) 2>&5
10686 echo "$as_me:10686: \$? = $ac_status" >&5
10687 (exit "$ac_status"); }; }; then
10688 cf_have_ncuconfig=yes
10690 echo "$as_me: program exited with status $ac_status" >&5
10691 echo "$as_me: failed program was:" >&5
10692 cat "conftest.$ac_ext" >&5
10693 cf_have_ncuconfig=no
10695 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10698 echo "$as_me: failed program was:" >&5
10699 cat "conftest.$ac_ext" >&5
10700 cf_have_ncuconfig=no
10702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10703 echo "$as_me:10703: result: $cf_have_ncuconfig" >&5
10704 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10705 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10706 if test "$cf_have_ncuconfig" != "yes"
10708 CPPFLAGS="$cf_save_CPPFLAGS"
10709 LIBS="$cf_save_LIBS"
10710 NCURSES_CONFIG_PKG=none
10713 cat >>confdefs.h <<\EOF
10717 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10719 echo "$as_me:10719: checking for terminfo header" >&5
10720 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10721 if test "${cf_cv_term_header+set}" = set; then
10722 echo $ECHO_N "(cached) $ECHO_C" >&6
10725 case "${cf_cv_ncurses_header}" in
10726 (*/ncurses.h|*/ncursesw.h)
10727 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10730 cf_term_header=term.h
10734 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10736 cat >"conftest.$ac_ext" <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10740 #include <${cf_cv_ncurses_header:-curses.h}>
10741 #include <$cf_test>
10746 int x = auto_left_margin; (void)x
10751 rm -f "conftest.$ac_objext"
10752 if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
10753 (eval $ac_compile) 2>&5
10755 echo "$as_me:10755: \$? = $ac_status" >&5
10756 (exit "$ac_status"); } &&
10757 { ac_try='test -s "conftest.$ac_objext"'
10758 { (eval echo "$as_me:10758: \"$ac_try\"") >&5
10759 (eval $ac_try) 2>&5
10761 echo "$as_me:10761: \$? = $ac_status" >&5
10762 (exit "$ac_status"); }; }; then
10764 cf_cv_term_header="$cf_test"
10766 echo "$as_me: failed program was:" >&5
10767 cat "conftest.$ac_ext" >&5
10769 cf_cv_term_header=unknown
10772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10773 test "$cf_cv_term_header" != unknown && break
10777 echo "$as_me:10777: result: $cf_cv_term_header" >&5
10778 echo "${ECHO_T}$cf_cv_term_header" >&6
10780 # Set definitions to allow ifdef'ing to accommodate subdirectories
10782 case "$cf_cv_term_header" in
10785 cat >>confdefs.h <<\EOF
10786 #define HAVE_TERM_H 1
10792 case "$cf_cv_term_header" in
10795 cat >>confdefs.h <<\EOF
10796 #define HAVE_NCURSES_TERM_H 1
10802 cat >>confdefs.h <<\EOF
10803 #define HAVE_NCURSESW_TERM_H 1
10812 echo "$as_me:10812: result: no" >&5
10813 echo "${ECHO_T}no" >&6
10814 NCURSES_CONFIG_PKG=none
10817 NCURSES_CONFIG_PKG=none
10820 if test "x$cf_have_ncuconfig" = "xno"; then
10821 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10823 if test -n "$ac_tool_prefix"; then
10824 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10826 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10827 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10828 echo "$as_me:10828: checking for $ac_word" >&5
10829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10830 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10831 echo $ECHO_N "(cached) $ECHO_C" >&6
10833 if test -n "$NCURSES_CONFIG"; then
10834 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10836 ac_save_IFS=$IFS; IFS=$ac_path_separator
10838 for ac_dir in $ac_dummy; do
10840 test -z "$ac_dir" && ac_dir=.
10841 $as_executable_p "$ac_dir/$ac_word" || continue
10842 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10843 echo "$as_me:10843: found $ac_dir/$ac_word" >&5
10849 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10850 if test -n "$NCURSES_CONFIG"; then
10851 echo "$as_me:10851: result: $NCURSES_CONFIG" >&5
10852 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10854 echo "$as_me:10854: result: no" >&5
10855 echo "${ECHO_T}no" >&6
10858 test -n "$NCURSES_CONFIG" && break
10861 if test -z "$NCURSES_CONFIG"; then
10862 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10863 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10865 # Extract the first word of "$ac_prog", so it can be a program name with args.
10866 set dummy $ac_prog; ac_word=$2
10867 echo "$as_me:10867: checking for $ac_word" >&5
10868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10869 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10870 echo $ECHO_N "(cached) $ECHO_C" >&6
10872 if test -n "$ac_ct_NCURSES_CONFIG"; then
10873 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10875 ac_save_IFS=$IFS; IFS=$ac_path_separator
10877 for ac_dir in $ac_dummy; do
10879 test -z "$ac_dir" && ac_dir=.
10880 $as_executable_p "$ac_dir/$ac_word" || continue
10881 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10882 echo "$as_me:10882: found $ac_dir/$ac_word" >&5
10888 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10889 if test -n "$ac_ct_NCURSES_CONFIG"; then
10890 echo "$as_me:10890: result: $ac_ct_NCURSES_CONFIG" >&5
10891 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10893 echo "$as_me:10893: result: no" >&5
10894 echo "${ECHO_T}no" >&6
10897 test -n "$ac_ct_NCURSES_CONFIG" && break
10899 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10901 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10904 if test "$NCURSES_CONFIG" != none ; then
10906 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10908 case "x$cf_add_cflags" in
10911 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10914 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'`
10915 test "$CFLAGS" != "$cf_old_cflag" || break
10917 CFLAGS="$cf_old_cflag"
10920 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10923 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'`
10924 test "$CPPFLAGS" != "$cf_old_cflag" || break
10926 CPPFLAGS="$cf_old_cflag"
10935 cf_new_extra_cppflags=
10937 for cf_add_cflags in $cf_add_cflags
10939 case "$cf_fix_cppflags" in
10941 case "$cf_add_cflags" in
10942 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10943 case "$cf_add_cflags" in
10945 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10947 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10948 && test -z "${cf_tst_cflags}" \
10949 && cf_fix_cppflags=yes
10951 if test "$cf_fix_cppflags" = yes ; then
10953 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10954 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10957 elif test "${cf_tst_cflags}" = "\"'" ; then
10959 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10960 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10966 case "$CPPFLAGS" in
10970 case "$cf_add_cflags" in
10972 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10974 CPPFLAGS=`echo "$CPPFLAGS" | \
10975 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10976 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10981 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10982 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10989 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10990 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11000 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11002 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11003 && test -z "${cf_tst_cflags}" \
11004 && cf_fix_cppflags=no
11009 if test -n "$cf_new_cflags" ; then
11011 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11012 CFLAGS="${CFLAGS}$cf_new_cflags"
11016 if test -n "$cf_new_cppflags" ; then
11018 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11019 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11023 if test -n "$cf_new_extra_cppflags" ; then
11025 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11026 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11032 cf_add_libs="$LIBS"
11035 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11036 # filter duplicates
11037 for cf_add_1lib in $cf_add_0lib; do
11038 for cf_add_2lib in $cf_add_libs; do
11039 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11044 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11046 LIBS="$cf_add_libs"
11048 # even with config script, some packages use no-override for curses.h
11050 echo "$as_me:11050: checking if we have identified curses headers" >&5
11051 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11052 if test "${cf_cv_ncurses_header+set}" = set; then
11053 echo $ECHO_N "(cached) $ECHO_C" >&6
11056 cf_cv_ncurses_header=none
11058 ncurses.h $cf_cv_screen/ncurses.h \
11059 curses.h $cf_cv_screen/curses.h
11061 cat >"conftest.$ac_ext" <<_ACEOF
11062 #line 11062 "configure"
11063 #include "confdefs.h"
11064 #include <${cf_header}>
11068 initscr(); tgoto("?", 0,0)
11073 rm -f "conftest.$ac_objext"
11074 if { (eval echo "$as_me:11074: \"$ac_compile\"") >&5
11075 (eval $ac_compile) 2>&5
11077 echo "$as_me:11077: \$? = $ac_status" >&5
11078 (exit "$ac_status"); } &&
11079 { ac_try='test -s "conftest.$ac_objext"'
11080 { (eval echo "$as_me:11080: \"$ac_try\"") >&5
11081 (eval $ac_try) 2>&5
11083 echo "$as_me:11083: \$? = $ac_status" >&5
11084 (exit "$ac_status"); }; }; then
11085 cf_cv_ncurses_header=$cf_header; break
11087 echo "$as_me: failed program was:" >&5
11088 cat "conftest.$ac_ext" >&5
11090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11094 echo "$as_me:11094: result: $cf_cv_ncurses_header" >&5
11095 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11097 if test "$cf_cv_ncurses_header" = none ; then
11098 { { echo "$as_me:11098: error: No curses header-files found" >&5
11099 echo "$as_me: error: No curses header-files found" >&2;}
11100 { (exit 1); exit 1; }; }
11103 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11105 for ac_header in $cf_cv_ncurses_header
11107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11108 echo "$as_me:11108: checking for $ac_header" >&5
11109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11111 echo $ECHO_N "(cached) $ECHO_C" >&6
11113 cat >"conftest.$ac_ext" <<_ACEOF
11114 #line 11114 "configure"
11115 #include "confdefs.h"
11116 #include <$ac_header>
11118 if { (eval echo "$as_me:11118: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11119 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11121 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11123 cat conftest.err >&5
11124 echo "$as_me:11124: \$? = $ac_status" >&5
11125 (exit "$ac_status"); } >/dev/null; then
11126 if test -s conftest.err; then
11127 ac_cpp_err=$ac_c_preproc_warn_flag
11134 if test -z "$ac_cpp_err"; then
11135 eval "$as_ac_Header=yes"
11137 echo "$as_me: failed program was:" >&5
11138 cat "conftest.$ac_ext" >&5
11139 eval "$as_ac_Header=no"
11141 rm -f conftest.err "conftest.$ac_ext"
11143 echo "$as_me:11143: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11144 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11145 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11146 cat >>confdefs.h <<EOF
11147 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11153 cat >>confdefs.h <<\EOF
11157 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11159 cat >>confdefs.h <<EOF
11160 #define $cf_nculib_ROOT 1
11163 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11167 cf_ncuhdr_root=$cf_cv_screen
11169 test -n "$cf_cv_curses_dir" && \
11170 test "$cf_cv_curses_dir" != "no" && { \
11172 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11173 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11175 while test "$cf_add_incdir" != /usr/include
11177 if test -d "$cf_add_incdir"
11180 if test -n "$CFLAGS$CPPFLAGS" ; then
11181 # a loop is needed to ensure we can add subdirs of existing dirs
11182 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11183 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11184 cf_have_incdir=yes; break
11189 if test "$cf_have_incdir" = no ; then
11190 if test "$cf_add_incdir" = /usr/local/include ; then
11191 if test "$GCC" = yes
11193 cf_save_CPPFLAGS=$CPPFLAGS
11195 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11196 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11198 cat >"conftest.$ac_ext" <<_ACEOF
11199 #line 11199 "configure"
11200 #include "confdefs.h"
11210 rm -f "conftest.$ac_objext"
11211 if { (eval echo "$as_me:11211: \"$ac_compile\"") >&5
11212 (eval $ac_compile) 2>&5
11214 echo "$as_me:11214: \$? = $ac_status" >&5
11215 (exit "$ac_status"); } &&
11216 { ac_try='test -s "conftest.$ac_objext"'
11217 { (eval echo "$as_me:11217: \"$ac_try\"") >&5
11218 (eval $ac_try) 2>&5
11220 echo "$as_me:11220: \$? = $ac_status" >&5
11221 (exit "$ac_status"); }; }; then
11224 echo "$as_me: failed program was:" >&5
11225 cat "conftest.$ac_ext" >&5
11228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11229 CPPFLAGS=$cf_save_CPPFLAGS
11234 if test "$cf_have_incdir" = no ; then
11235 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11237 echo "${as_me:-configure}:11237: testing adding $cf_add_incdir to include-path ..." 1>&5
11239 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11241 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11242 test "$cf_top_incdir" = "$cf_add_incdir" && break
11243 cf_add_incdir="$cf_top_incdir"
11256 echo "$as_me:11256: checking for $cf_ncuhdr_root header in include-path" >&5
11257 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11258 if test "${cf_cv_ncurses_h+set}" = set; then
11259 echo $ECHO_N "(cached) $ECHO_C" >&6
11262 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11263 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11264 for cf_header in $cf_header_list
11267 cat >"conftest.$ac_ext" <<_ACEOF
11268 #line 11268 "configure"
11269 #include "confdefs.h"
11271 #include <$cf_header>
11276 #ifdef NCURSES_VERSION
11278 printf("%s\\n", NCURSES_VERSION);
11291 rm -f "conftest.$ac_objext"
11292 if { (eval echo "$as_me:11292: \"$ac_compile\"") >&5
11293 (eval $ac_compile) 2>&5
11295 echo "$as_me:11295: \$? = $ac_status" >&5
11296 (exit "$ac_status"); } &&
11297 { ac_try='test -s "conftest.$ac_objext"'
11298 { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299 (eval $ac_try) 2>&5
11301 echo "$as_me:11301: \$? = $ac_status" >&5
11302 (exit "$ac_status"); }; }; then
11303 cf_cv_ncurses_h=$cf_header
11306 echo "$as_me: failed program was:" >&5
11307 cat "conftest.$ac_ext" >&5
11310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11312 test "$cf_cv_ncurses_h" != no && break
11316 echo "$as_me:11316: result: $cf_cv_ncurses_h" >&5
11317 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11319 if test "$cf_cv_ncurses_h" != no ; then
11320 cf_cv_ncurses_header=$cf_cv_ncurses_h
11323 echo "$as_me:11323: checking for $cf_ncuhdr_root include-path" >&5
11324 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11325 if test "${cf_cv_ncurses_h2+set}" = set; then
11326 echo $ECHO_N "(cached) $ECHO_C" >&6
11329 test -n "$verbose" && echo
11333 # collect the current set of include-directories from compiler flags
11334 cf_header_path_list=""
11335 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11336 for cf_header_path in $CPPFLAGS $CFLAGS
11338 case "$cf_header_path" in
11340 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11342 test "x$cf_header_path" != "xNONE" && \
11343 test -d "$cf_header_path" && \
11345 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11346 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11347 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11348 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11349 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11350 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"
11353 cf_header_path_list="$cf_header_path_list $cf_search"
11359 # add the variations for the package we are looking for
11363 test "x$prefix" != "xNONE" && \
11364 test -d "$prefix" && \
11366 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11367 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11368 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11369 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11370 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11371 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11374 for cf_subdir_prefix in \
11383 test "x$cf_subdir_prefix" != "x$prefix" && \
11384 test -d "$cf_subdir_prefix" && \
11385 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11386 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11387 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11388 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11389 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11390 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11391 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"
11396 test "$includedir" != NONE && \
11397 test "$includedir" != "/usr/include" && \
11398 test -d "$includedir" && {
11399 test -d "$includedir" && cf_search="$cf_search $includedir"
11400 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11403 test "$oldincludedir" != NONE && \
11404 test "$oldincludedir" != "/usr/include" && \
11405 test -d "$oldincludedir" && {
11406 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11407 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11410 cf_search="$cf_search $cf_header_path_list"
11412 test -n "$verbose" && echo "search path $cf_search"
11413 cf_save2_CPPFLAGS="$CPPFLAGS"
11414 for cf_incdir in $cf_search
11417 if test -n "$cf_incdir" ; then
11418 for cf_add_incdir in $cf_incdir
11420 while test "$cf_add_incdir" != /usr/include
11422 if test -d "$cf_add_incdir"
11425 if test -n "$CFLAGS$CPPFLAGS" ; then
11426 # a loop is needed to ensure we can add subdirs of existing dirs
11427 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11428 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11429 cf_have_incdir=yes; break
11434 if test "$cf_have_incdir" = no ; then
11435 if test "$cf_add_incdir" = /usr/local/include ; then
11436 if test "$GCC" = yes
11438 cf_save_CPPFLAGS=$CPPFLAGS
11440 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11441 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11443 cat >"conftest.$ac_ext" <<_ACEOF
11444 #line 11444 "configure"
11445 #include "confdefs.h"
11455 rm -f "conftest.$ac_objext"
11456 if { (eval echo "$as_me:11456: \"$ac_compile\"") >&5
11457 (eval $ac_compile) 2>&5
11459 echo "$as_me:11459: \$? = $ac_status" >&5
11460 (exit "$ac_status"); } &&
11461 { ac_try='test -s "conftest.$ac_objext"'
11462 { (eval echo "$as_me:11462: \"$ac_try\"") >&5
11463 (eval $ac_try) 2>&5
11465 echo "$as_me:11465: \$? = $ac_status" >&5
11466 (exit "$ac_status"); }; }; then
11469 echo "$as_me: failed program was:" >&5
11470 cat "conftest.$ac_ext" >&5
11473 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11474 CPPFLAGS=$cf_save_CPPFLAGS
11479 if test "$cf_have_incdir" = no ; then
11480 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11482 echo "${as_me:-configure}:11482: testing adding $cf_add_incdir to include-path ..." 1>&5
11484 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11486 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11487 test "$cf_top_incdir" = "$cf_add_incdir" && break
11488 cf_add_incdir="$cf_top_incdir"
11504 cat >"conftest.$ac_ext" <<_ACEOF
11505 #line 11505 "configure"
11506 #include "confdefs.h"
11508 #include <$cf_header>
11513 #ifdef NCURSES_VERSION
11515 printf("%s\\n", NCURSES_VERSION);
11528 rm -f "conftest.$ac_objext"
11529 if { (eval echo "$as_me:11529: \"$ac_compile\"") >&5
11530 (eval $ac_compile) 2>&5
11532 echo "$as_me:11532: \$? = $ac_status" >&5
11533 (exit "$ac_status"); } &&
11534 { ac_try='test -s "conftest.$ac_objext"'
11535 { (eval echo "$as_me:11535: \"$ac_try\"") >&5
11536 (eval $ac_try) 2>&5
11538 echo "$as_me:11538: \$? = $ac_status" >&5
11539 (exit "$ac_status"); }; }; then
11540 cf_cv_ncurses_h2=$cf_header
11543 echo "$as_me: failed program was:" >&5
11544 cat "conftest.$ac_ext" >&5
11545 cf_cv_ncurses_h2=no
11547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11549 if test "$cf_cv_ncurses_h2" != no ; then
11550 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11551 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11554 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11556 CPPFLAGS="$cf_save2_CPPFLAGS"
11557 test "$cf_cv_ncurses_h2" != no && break
11559 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11559: error: not found" >&5
11560 echo "$as_me: error: not found" >&2;}
11561 { (exit 1); exit 1; }; }
11564 echo "$as_me:11564: result: $cf_cv_ncurses_h2" >&5
11565 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11567 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11568 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11569 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11570 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11573 if test -n "$cf_1st_incdir" ; then
11574 for cf_add_incdir in $cf_1st_incdir
11576 while test "$cf_add_incdir" != /usr/include
11578 if test -d "$cf_add_incdir"
11581 if test -n "$CFLAGS$CPPFLAGS" ; then
11582 # a loop is needed to ensure we can add subdirs of existing dirs
11583 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11584 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11585 cf_have_incdir=yes; break
11590 if test "$cf_have_incdir" = no ; then
11591 if test "$cf_add_incdir" = /usr/local/include ; then
11592 if test "$GCC" = yes
11594 cf_save_CPPFLAGS=$CPPFLAGS
11596 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11597 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11599 cat >"conftest.$ac_ext" <<_ACEOF
11600 #line 11600 "configure"
11601 #include "confdefs.h"
11611 rm -f "conftest.$ac_objext"
11612 if { (eval echo "$as_me:11612: \"$ac_compile\"") >&5
11613 (eval $ac_compile) 2>&5
11615 echo "$as_me:11615: \$? = $ac_status" >&5
11616 (exit "$ac_status"); } &&
11617 { ac_try='test -s "conftest.$ac_objext"'
11618 { (eval echo "$as_me:11618: \"$ac_try\"") >&5
11619 (eval $ac_try) 2>&5
11621 echo "$as_me:11621: \$? = $ac_status" >&5
11622 (exit "$ac_status"); }; }; then
11625 echo "$as_me: failed program was:" >&5
11626 cat "conftest.$ac_ext" >&5
11629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11630 CPPFLAGS=$cf_save_CPPFLAGS
11635 if test "$cf_have_incdir" = no ; then
11636 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11638 echo "${as_me:-configure}:11638: testing adding $cf_add_incdir to include-path ..." 1>&5
11640 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11642 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11643 test "$cf_top_incdir" = "$cf_add_incdir" && break
11644 cf_add_incdir="$cf_top_incdir"
11657 # Set definitions to allow ifdef'ing for ncurses.h
11659 case "$cf_cv_ncurses_header" in
11662 cat >>confdefs.h <<\EOF
11663 #define HAVE_NCURSES_H 1
11669 case "$cf_cv_ncurses_header" in
11670 (ncurses/curses.h|ncurses/ncurses.h)
11672 cat >>confdefs.h <<\EOF
11673 #define HAVE_NCURSES_NCURSES_H 1
11677 (ncursesw/curses.h|ncursesw/ncurses.h)
11679 cat >>confdefs.h <<\EOF
11680 #define HAVE_NCURSESW_NCURSES_H 1
11686 echo "$as_me:11686: checking for terminfo header" >&5
11687 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11688 if test "${cf_cv_term_header+set}" = set; then
11689 echo $ECHO_N "(cached) $ECHO_C" >&6
11692 case "${cf_cv_ncurses_header}" in
11693 (*/ncurses.h|*/ncursesw.h)
11694 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11697 cf_term_header=term.h
11701 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11703 cat >"conftest.$ac_ext" <<_ACEOF
11704 #line 11704 "configure"
11705 #include "confdefs.h"
11707 #include <${cf_cv_ncurses_header:-curses.h}>
11708 #include <$cf_test>
11713 int x = auto_left_margin; (void)x
11718 rm -f "conftest.$ac_objext"
11719 if { (eval echo "$as_me:11719: \"$ac_compile\"") >&5
11720 (eval $ac_compile) 2>&5
11722 echo "$as_me:11722: \$? = $ac_status" >&5
11723 (exit "$ac_status"); } &&
11724 { ac_try='test -s "conftest.$ac_objext"'
11725 { (eval echo "$as_me:11725: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11728 echo "$as_me:11728: \$? = $ac_status" >&5
11729 (exit "$ac_status"); }; }; then
11731 cf_cv_term_header="$cf_test"
11733 echo "$as_me: failed program was:" >&5
11734 cat "conftest.$ac_ext" >&5
11736 cf_cv_term_header=unknown
11739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11740 test "$cf_cv_term_header" != unknown && break
11744 echo "$as_me:11744: result: $cf_cv_term_header" >&5
11745 echo "${ECHO_T}$cf_cv_term_header" >&6
11747 # Set definitions to allow ifdef'ing to accommodate subdirectories
11749 case "$cf_cv_term_header" in
11752 cat >>confdefs.h <<\EOF
11753 #define HAVE_TERM_H 1
11759 case "$cf_cv_term_header" in
11762 cat >>confdefs.h <<\EOF
11763 #define HAVE_NCURSES_TERM_H 1
11769 cat >>confdefs.h <<\EOF
11770 #define HAVE_NCURSESW_TERM_H 1
11776 # some applications need this, but should check for NCURSES_VERSION
11778 cat >>confdefs.h <<\EOF
11782 echo "$as_me:11782: checking for ncurses version" >&5
11783 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11784 if test "${cf_cv_ncurses_version+set}" = set; then
11785 echo $ECHO_N "(cached) $ECHO_C" >&6
11788 cf_cv_ncurses_version=no
11790 rm -f "$cf_tempfile"
11791 if test "$cross_compiling" = yes; then
11793 # This will not work if the preprocessor splits the line after the
11794 # Autoconf token. The 'unproto' program does that.
11795 cat > "conftest.$ac_ext" <<EOF
11796 #include <${cf_cv_ncurses_header:-curses.h}>
11798 #ifdef NCURSES_VERSION
11799 Autoconf NCURSES_VERSION
11807 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11808 { (eval echo "$as_me:11808: \"$cf_try\"") >&5
11809 (eval $cf_try) 2>&5
11811 echo "$as_me:11811: \$? = $ac_status" >&5
11812 (exit "$ac_status"); }
11813 if test -f conftest.out ; then
11814 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11815 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11820 cat >"conftest.$ac_ext" <<_ACEOF
11821 #line 11821 "configure"
11822 #include "confdefs.h"
11824 #include <${cf_cv_ncurses_header:-curses.h}>
11828 FILE *fp = fopen("$cf_tempfile", "w");
11829 #ifdef NCURSES_VERSION
11830 # ifdef NCURSES_VERSION_PATCH
11831 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11833 fprintf(fp, "%s\\n", NCURSES_VERSION);
11836 # ifdef __NCURSES_H
11837 fprintf(fp, "old\\n");
11842 ${cf_cv_main_return:-return}(0);
11845 rm -f "conftest$ac_exeext"
11846 if { (eval echo "$as_me:11846: \"$ac_link\"") >&5
11847 (eval $ac_link) 2>&5
11849 echo "$as_me:11849: \$? = $ac_status" >&5
11850 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11851 { (eval echo "$as_me:11851: \"$ac_try\"") >&5
11852 (eval $ac_try) 2>&5
11854 echo "$as_me:11854: \$? = $ac_status" >&5
11855 (exit "$ac_status"); }; }; then
11857 cf_cv_ncurses_version=`cat $cf_tempfile`
11859 echo "$as_me: program exited with status $ac_status" >&5
11860 echo "$as_me: failed program was:" >&5
11861 cat "conftest.$ac_ext" >&5
11863 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11865 rm -f "$cf_tempfile"
11868 echo "$as_me:11868: result: $cf_cv_ncurses_version" >&5
11869 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11870 test "$cf_cv_ncurses_version" = no ||
11871 cat >>confdefs.h <<\EOF
11875 cf_nculib_root=$cf_cv_screen
11876 # This works, except for the special case where we find gpm, but
11877 # ncurses is in a nonstandard location via $LIBS, and we really want
11880 cf_ncurses_SAVE="$LIBS"
11881 echo "$as_me:11881: checking for Gpm_Open in -lgpm" >&5
11882 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11883 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11884 echo $ECHO_N "(cached) $ECHO_C" >&6
11886 ac_check_lib_save_LIBS=$LIBS
11888 cat >"conftest.$ac_ext" <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11892 /* Override any gcc2 internal prototype to avoid an error. */
11896 /* We use char because int might match the return type of a gcc2
11897 builtin and then its argument prototype would still apply. */
11907 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11908 if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
11909 (eval $ac_link) 2>&5
11911 echo "$as_me:11911: \$? = $ac_status" >&5
11912 (exit "$ac_status"); } &&
11913 { ac_try='test -s "conftest$ac_exeext"'
11914 { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11917 echo "$as_me:11917: \$? = $ac_status" >&5
11918 (exit "$ac_status"); }; }; then
11919 ac_cv_lib_gpm_Gpm_Open=yes
11921 echo "$as_me: failed program was:" >&5
11922 cat "conftest.$ac_ext" >&5
11923 ac_cv_lib_gpm_Gpm_Open=no
11925 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11926 LIBS=$ac_check_lib_save_LIBS
11928 echo "$as_me:11928: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11929 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11930 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11931 echo "$as_me:11931: checking for initscr in -lgpm" >&5
11932 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11933 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11934 echo $ECHO_N "(cached) $ECHO_C" >&6
11936 ac_check_lib_save_LIBS=$LIBS
11938 cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11942 /* Override any gcc2 internal prototype to avoid an error. */
11946 /* We use char because int might match the return type of a gcc2
11947 builtin and then its argument prototype would still apply. */
11957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11958 if { (eval echo "$as_me:11958: \"$ac_link\"") >&5
11959 (eval $ac_link) 2>&5
11961 echo "$as_me:11961: \$? = $ac_status" >&5
11962 (exit "$ac_status"); } &&
11963 { ac_try='test -s "conftest$ac_exeext"'
11964 { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965 (eval $ac_try) 2>&5
11967 echo "$as_me:11967: \$? = $ac_status" >&5
11968 (exit "$ac_status"); }; }; then
11969 ac_cv_lib_gpm_initscr=yes
11971 echo "$as_me: failed program was:" >&5
11972 cat "conftest.$ac_ext" >&5
11973 ac_cv_lib_gpm_initscr=no
11975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11976 LIBS=$ac_check_lib_save_LIBS
11978 echo "$as_me:11978: result: $ac_cv_lib_gpm_initscr" >&5
11979 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11980 if test "$ac_cv_lib_gpm_initscr" = yes; then
11981 LIBS="$cf_ncurses_SAVE"
11983 cf_ncurses_LIBS="-lgpm"
11990 # This is only necessary if you are linking against an obsolete
11991 # version of ncurses (but it should do no harm, since it is static).
11992 if test "$cf_nculib_root" = ncurses ; then
11993 echo "$as_me:11993: checking for tgoto in -lmytinfo" >&5
11994 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11995 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11996 echo $ECHO_N "(cached) $ECHO_C" >&6
11998 ac_check_lib_save_LIBS=$LIBS
11999 LIBS="-lmytinfo $LIBS"
12000 cat >"conftest.$ac_ext" <<_ACEOF
12001 #line 12001 "configure"
12002 #include "confdefs.h"
12004 /* Override any gcc2 internal prototype to avoid an error. */
12008 /* We use char because int might match the return type of a gcc2
12009 builtin and then its argument prototype would still apply. */
12019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12020 if { (eval echo "$as_me:12020: \"$ac_link\"") >&5
12021 (eval $ac_link) 2>&5
12023 echo "$as_me:12023: \$? = $ac_status" >&5
12024 (exit "$ac_status"); } &&
12025 { ac_try='test -s "conftest$ac_exeext"'
12026 { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027 (eval $ac_try) 2>&5
12029 echo "$as_me:12029: \$? = $ac_status" >&5
12030 (exit "$ac_status"); }; }; then
12031 ac_cv_lib_mytinfo_tgoto=yes
12033 echo "$as_me: failed program was:" >&5
12034 cat "conftest.$ac_ext" >&5
12035 ac_cv_lib_mytinfo_tgoto=no
12037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12038 LIBS=$ac_check_lib_save_LIBS
12040 echo "$as_me:12040: result: $ac_cv_lib_mytinfo_tgoto" >&5
12041 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12042 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12043 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12050 cf_add_libs="$LIBS"
12053 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12054 # filter duplicates
12055 for cf_add_1lib in $cf_add_0lib; do
12056 for cf_add_2lib in $cf_add_libs; do
12057 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12062 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12064 LIBS="$cf_add_libs"
12066 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12069 cf_add_libs="$LIBS"
12072 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12073 # filter duplicates
12074 for cf_add_1lib in $cf_add_0lib; do
12075 for cf_add_2lib in $cf_add_libs; do
12076 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12081 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12083 LIBS="$cf_add_libs"
12087 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12089 echo "$as_me:12089: checking for initscr" >&5
12090 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12091 if test "${ac_cv_func_initscr+set}" = set; then
12092 echo $ECHO_N "(cached) $ECHO_C" >&6
12094 cat >"conftest.$ac_ext" <<_ACEOF
12095 #line 12095 "configure"
12096 #include "confdefs.h"
12097 #define initscr autoconf_temporary
12098 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12105 /* We use char because int might match the return type of a gcc2
12106 builtin and then its argument prototype would still apply. */
12107 char initscr (void);
12113 /* The GNU C library defines stubs for functions which it implements
12114 to always fail with ENOSYS. Some functions are actually named
12115 something starting with __ and the normal name is an alias. */
12116 #if defined (__stub_initscr) || defined (__stub___initscr)
12117 #error found stub for initscr
12125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12126 if { (eval echo "$as_me:12126: \"$ac_link\"") >&5
12127 (eval $ac_link) 2>&5
12129 echo "$as_me:12129: \$? = $ac_status" >&5
12130 (exit "$ac_status"); } &&
12131 { ac_try='test -s "conftest$ac_exeext"'
12132 { (eval echo "$as_me:12132: \"$ac_try\"") >&5
12133 (eval $ac_try) 2>&5
12135 echo "$as_me:12135: \$? = $ac_status" >&5
12136 (exit "$ac_status"); }; }; then
12137 ac_cv_func_initscr=yes
12139 echo "$as_me: failed program was:" >&5
12140 cat "conftest.$ac_ext" >&5
12141 ac_cv_func_initscr=no
12143 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12145 echo "$as_me:12145: result: $ac_cv_func_initscr" >&5
12146 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12147 if test "$ac_cv_func_initscr" = yes; then
12148 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12151 cf_save_LIBS="$LIBS"
12152 echo "$as_me:12152: checking for initscr in -l$cf_nculib_root" >&5
12153 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12154 LIBS="-l$cf_nculib_root $LIBS"
12155 cat >"conftest.$ac_ext" <<_ACEOF
12156 #line 12156 "configure"
12157 #include "confdefs.h"
12158 #include <${cf_cv_ncurses_header:-curses.h}>
12167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12168 if { (eval echo "$as_me:12168: \"$ac_link\"") >&5
12169 (eval $ac_link) 2>&5
12171 echo "$as_me:12171: \$? = $ac_status" >&5
12172 (exit "$ac_status"); } &&
12173 { ac_try='test -s "conftest$ac_exeext"'
12174 { (eval echo "$as_me:12174: \"$ac_try\"") >&5
12175 (eval $ac_try) 2>&5
12177 echo "$as_me:12177: \$? = $ac_status" >&5
12178 (exit "$ac_status"); }; }; then
12179 echo "$as_me:12179: result: yes" >&5
12180 echo "${ECHO_T}yes" >&6
12181 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12184 echo "$as_me: failed program was:" >&5
12185 cat "conftest.$ac_ext" >&5
12186 echo "$as_me:12186: result: no" >&5
12187 echo "${ECHO_T}no" >&6
12190 cf_library_path_list=""
12191 if test -n "${LDFLAGS}${LIBS}" ; then
12192 for cf_library_path in $LDFLAGS $LIBS
12194 case "$cf_library_path" in
12196 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12198 test "x$cf_library_path" != "xNONE" && \
12199 test -d "$cf_library_path" && \
12201 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12202 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12203 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12204 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12205 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12206 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"
12209 cf_library_path_list="$cf_library_path_list $cf_search"
12217 test "x$prefix" != "xNONE" && \
12218 test -d "$prefix" && \
12220 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12221 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12222 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12223 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12224 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12225 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12228 for cf_subdir_prefix in \
12237 test "x$cf_subdir_prefix" != "x$prefix" && \
12238 test -d "$cf_subdir_prefix" && \
12239 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12240 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12241 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12242 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12243 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12244 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12245 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"
12250 cf_search="$cf_library_path_list $cf_search"
12252 for cf_libdir in $cf_search
12254 echo "$as_me:12254: checking for -l$cf_nculib_root in $cf_libdir" >&5
12255 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12256 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12257 cat >"conftest.$ac_ext" <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 #include <${cf_cv_ncurses_header:-curses.h}>
12269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12270 if { (eval echo "$as_me:12270: \"$ac_link\"") >&5
12271 (eval $ac_link) 2>&5
12273 echo "$as_me:12273: \$? = $ac_status" >&5
12274 (exit "$ac_status"); } &&
12275 { ac_try='test -s "conftest$ac_exeext"'
12276 { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277 (eval $ac_try) 2>&5
12279 echo "$as_me:12279: \$? = $ac_status" >&5
12280 (exit "$ac_status"); }; }; then
12281 echo "$as_me:12281: result: yes" >&5
12282 echo "${ECHO_T}yes" >&6
12283 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12286 echo "$as_me: failed program was:" >&5
12287 cat "conftest.$ac_ext" >&5
12288 echo "$as_me:12288: result: no" >&5
12289 echo "${ECHO_T}no" >&6
12290 LIBS="$cf_save_LIBS"
12292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12300 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12302 if test "$cf_found_library" = no ; then
12303 { { echo "$as_me:12303: error: Cannot link $cf_nculib_root library" >&5
12304 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12305 { (exit 1); exit 1; }; }
12310 if test -n "$cf_ncurses_LIBS" ; then
12311 echo "$as_me:12311: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12312 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12313 cf_ncurses_SAVE="$LIBS"
12314 for p in $cf_ncurses_LIBS ; do
12315 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12316 if test "$q" != "$LIBS" ; then
12320 cat >"conftest.$ac_ext" <<_ACEOF
12321 #line 12321 "configure"
12322 #include "confdefs.h"
12323 #include <${cf_cv_ncurses_header:-curses.h}>
12327 initscr(); mousemask(0,0); tigetstr((char *)0);
12332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12333 if { (eval echo "$as_me:12333: \"$ac_link\"") >&5
12334 (eval $ac_link) 2>&5
12336 echo "$as_me:12336: \$? = $ac_status" >&5
12337 (exit "$ac_status"); } &&
12338 { ac_try='test -s "conftest$ac_exeext"'
12339 { (eval echo "$as_me:12339: \"$ac_try\"") >&5
12340 (eval $ac_try) 2>&5
12342 echo "$as_me:12342: \$? = $ac_status" >&5
12343 (exit "$ac_status"); }; }; then
12344 echo "$as_me:12344: result: yes" >&5
12345 echo "${ECHO_T}yes" >&6
12347 echo "$as_me: failed program was:" >&5
12348 cat "conftest.$ac_ext" >&5
12349 echo "$as_me:12349: result: no" >&5
12350 echo "${ECHO_T}no" >&6
12351 LIBS="$cf_ncurses_SAVE"
12353 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12356 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12358 cat >>confdefs.h <<EOF
12359 #define $cf_nculib_ROOT 1
12364 NCURSES_CONFIG=none
12369 echo "$as_me:12369: checking for X" >&5
12370 echo $ECHO_N "checking for X... $ECHO_C" >&6
12372 # Check whether --with-x or --without-x was given.
12373 if test "${with_x+set}" = set; then
12377 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12378 if test "x$with_x" = xno; then
12379 # The user explicitly disabled X.
12382 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12383 # Both variables are already set.
12386 if test "${ac_cv_have_x+set}" = set; then
12387 echo $ECHO_N "(cached) $ECHO_C" >&6
12389 # One or both of the vars are not set, and there is no cached value.
12390 ac_x_includes=no ac_x_libraries=no
12391 rm -fr conftest.dir
12392 if mkdir conftest.dir; then
12394 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12395 cat >Imakefile <<'EOF'
12397 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12399 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12400 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12401 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12402 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12403 for ac_extension in a so sl dylib dll; do
12404 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12405 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12406 ac_im_usrlibdir=$ac_im_libdir; break
12409 # Screen out bogus values from the imake configuration. They are
12410 # bogus both because they are the default anyway, and because
12411 # using them would break gcc on systems where it needs fixed includes.
12412 case $ac_im_incroot in
12414 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12416 case $ac_im_usrlibdir in
12417 /usr/lib | /lib) ;;
12418 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12422 rm -fr conftest.dir
12425 # Standard set of common directories for X headers.
12426 # Check X11 before X11Rn because it is often a symlink to the current release.
12443 /usr/local/X11/include
12444 /usr/local/X11R7/include
12445 /usr/local/X11R6/include
12446 /usr/local/X11R5/include
12447 /usr/local/X11R4/include
12449 /usr/local/include/X11
12450 /usr/local/include/X11R7
12451 /usr/local/include/X11R6
12452 /usr/local/include/X11R5
12453 /usr/local/include/X11R4
12457 /usr/XFree86/include/X11
12461 /usr/unsupported/include
12462 /usr/athena/include
12463 /usr/local/x11r5/include
12464 /usr/lpp/Xamples/include
12466 /usr/openwin/include
12467 /usr/openwin/share/include'
12469 if test "$ac_x_includes" = no; then
12470 # Guess where to find include files, by looking for Intrinsic.h.
12471 # First, try using that file with no special directory specified.
12472 cat >"conftest.$ac_ext" <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475 #include <X11/Intrinsic.h>
12477 if { (eval echo "$as_me:12477: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12478 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12480 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12482 cat conftest.err >&5
12483 echo "$as_me:12483: \$? = $ac_status" >&5
12484 (exit "$ac_status"); } >/dev/null; then
12485 if test -s conftest.err; then
12486 ac_cpp_err=$ac_c_preproc_warn_flag
12493 if test -z "$ac_cpp_err"; then
12494 # We can compile using X headers with no special include directory.
12497 echo "$as_me: failed program was:" >&5
12498 cat "conftest.$ac_ext" >&5
12499 for ac_dir in $ac_x_header_dirs; do
12500 if test -r "$ac_dir/X11/Intrinsic.h"; then
12501 ac_x_includes=$ac_dir
12506 rm -f conftest.err "conftest.$ac_ext"
12507 fi # $ac_x_includes = no
12509 if test "$ac_x_libraries" = no; then
12510 # Check for the libraries.
12511 # See if we find them without any special options.
12512 # Don't add to $LIBS permanently.
12515 cat >"conftest.$ac_ext" <<_ACEOF
12516 #line 12516 "configure"
12517 #include "confdefs.h"
12518 #include <X11/Intrinsic.h>
12527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12528 if { (eval echo "$as_me:12528: \"$ac_link\"") >&5
12529 (eval $ac_link) 2>&5
12531 echo "$as_me:12531: \$? = $ac_status" >&5
12532 (exit "$ac_status"); } &&
12533 { ac_try='test -s "conftest$ac_exeext"'
12534 { (eval echo "$as_me:12534: \"$ac_try\"") >&5
12535 (eval $ac_try) 2>&5
12537 echo "$as_me:12537: \$? = $ac_status" >&5
12538 (exit "$ac_status"); }; }; then
12540 # We can link X programs with no special library path.
12543 echo "$as_me: failed program was:" >&5
12544 cat "conftest.$ac_ext" >&5
12546 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12548 # Don't even attempt the hair of trying to link an X program!
12549 for ac_extension in a so sl dylib dll; do
12550 if test -r "$ac_dir/libXt.$ac_extension"; then
12551 ac_x_libraries=$ac_dir
12557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12558 fi # $ac_x_libraries = no
12560 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12561 # Didn't find X anywhere. Cache the known absence of X.
12562 ac_cv_have_x="have_x=no"
12564 # Record where we found X for the cache.
12565 ac_cv_have_x="have_x=yes \
12566 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12571 eval "$ac_cv_have_x"
12574 if test "$have_x" != yes; then
12575 echo "$as_me:12575: result: $have_x" >&5
12576 echo "${ECHO_T}$have_x" >&6
12579 # If each of the values was on the command line, it overrides each guess.
12580 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12581 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12582 # Update the cache value to reflect the command line values.
12583 ac_cv_have_x="have_x=yes \
12584 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12585 echo "$as_me:12585: result: libraries $x_libraries, headers $x_includes" >&5
12586 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12589 if test "$no_x" = yes; then
12590 # Not all programs may use this symbol, but it does not hurt to define it.
12592 cat >>confdefs.h <<\EOF
12593 #define X_DISPLAY_MISSING 1
12601 if test -n "$x_includes"; then
12602 X_CFLAGS="$X_CFLAGS -I$x_includes"
12605 # It would also be nice to do this for all -L options, not just this one.
12606 if test -n "$x_libraries"; then
12607 X_LIBS="$X_LIBS -L$x_libraries"
12608 # For Solaris; some versions of Sun CC require a space after -R and
12609 # others require no space. Words are not sufficient . . . .
12610 case `(uname -sr) 2>/dev/null` in
12612 echo "$as_me:12612: checking whether -R must be followed by a space" >&5
12613 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12614 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12615 cat >"conftest.$ac_ext" <<_ACEOF
12616 #line 12616 "configure"
12617 #include "confdefs.h"
12627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12628 if { (eval echo "$as_me:12628: \"$ac_link\"") >&5
12629 (eval $ac_link) 2>&5
12631 echo "$as_me:12631: \$? = $ac_status" >&5
12632 (exit "$ac_status"); } &&
12633 { ac_try='test -s "conftest$ac_exeext"'
12634 { (eval echo "$as_me:12634: \"$ac_try\"") >&5
12635 (eval $ac_try) 2>&5
12637 echo "$as_me:12637: \$? = $ac_status" >&5
12638 (exit "$ac_status"); }; }; then
12641 echo "$as_me: failed program was:" >&5
12642 cat "conftest.$ac_ext" >&5
12645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12646 if test $ac_R_nospace = yes; then
12647 echo "$as_me:12647: result: no" >&5
12648 echo "${ECHO_T}no" >&6
12649 X_LIBS="$X_LIBS -R$x_libraries"
12651 LIBS="$ac_xsave_LIBS -R $x_libraries"
12652 cat >"conftest.$ac_ext" <<_ACEOF
12653 #line 12653 "configure"
12654 #include "confdefs.h"
12664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12665 if { (eval echo "$as_me:12665: \"$ac_link\"") >&5
12666 (eval $ac_link) 2>&5
12668 echo "$as_me:12668: \$? = $ac_status" >&5
12669 (exit "$ac_status"); } &&
12670 { ac_try='test -s "conftest$ac_exeext"'
12671 { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672 (eval $ac_try) 2>&5
12674 echo "$as_me:12674: \$? = $ac_status" >&5
12675 (exit "$ac_status"); }; }; then
12678 echo "$as_me: failed program was:" >&5
12679 cat "conftest.$ac_ext" >&5
12682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12683 if test $ac_R_space = yes; then
12684 echo "$as_me:12684: result: yes" >&5
12685 echo "${ECHO_T}yes" >&6
12686 X_LIBS="$X_LIBS -R $x_libraries"
12688 echo "$as_me:12688: result: neither works" >&5
12689 echo "${ECHO_T}neither works" >&6
12692 LIBS=$ac_xsave_LIBS
12696 # Check for system-dependent libraries X programs must link with.
12697 # Do this before checking for the system-independent R6 libraries
12698 # (-lICE), since we may need -lsocket or whatever for X linking.
12700 if test "$ISC" = yes; then
12701 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12703 # Martyn Johnson says this is needed for Ultrix, if the X
12704 # libraries were built with DECnet support. And Karl Berry says
12705 # the Alpha needs dnet_stub (dnet does not exist).
12706 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12707 cat >"conftest.$ac_ext" <<_ACEOF
12708 #line 12708 "configure"
12709 #include "confdefs.h"
12711 /* Override any gcc2 internal prototype to avoid an error. */
12715 /* We use char because int might match the return type of a gcc2
12716 builtin and then its argument prototype would still apply. */
12717 char XOpenDisplay ();
12726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12727 if { (eval echo "$as_me:12727: \"$ac_link\"") >&5
12728 (eval $ac_link) 2>&5
12730 echo "$as_me:12730: \$? = $ac_status" >&5
12731 (exit "$ac_status"); } &&
12732 { ac_try='test -s "conftest$ac_exeext"'
12733 { (eval echo "$as_me:12733: \"$ac_try\"") >&5
12734 (eval $ac_try) 2>&5
12736 echo "$as_me:12736: \$? = $ac_status" >&5
12737 (exit "$ac_status"); }; }; then
12740 echo "$as_me: failed program was:" >&5
12741 cat "conftest.$ac_ext" >&5
12742 echo "$as_me:12742: checking for dnet_ntoa in -ldnet" >&5
12743 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12744 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12745 echo $ECHO_N "(cached) $ECHO_C" >&6
12747 ac_check_lib_save_LIBS=$LIBS
12748 LIBS="-ldnet $LIBS"
12749 cat >"conftest.$ac_ext" <<_ACEOF
12750 #line 12750 "configure"
12751 #include "confdefs.h"
12753 /* Override any gcc2 internal prototype to avoid an error. */
12757 /* We use char because int might match the return type of a gcc2
12758 builtin and then its argument prototype would still apply. */
12768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12769 if { (eval echo "$as_me:12769: \"$ac_link\"") >&5
12770 (eval $ac_link) 2>&5
12772 echo "$as_me:12772: \$? = $ac_status" >&5
12773 (exit "$ac_status"); } &&
12774 { ac_try='test -s "conftest$ac_exeext"'
12775 { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12778 echo "$as_me:12778: \$? = $ac_status" >&5
12779 (exit "$ac_status"); }; }; then
12780 ac_cv_lib_dnet_dnet_ntoa=yes
12782 echo "$as_me: failed program was:" >&5
12783 cat "conftest.$ac_ext" >&5
12784 ac_cv_lib_dnet_dnet_ntoa=no
12786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12787 LIBS=$ac_check_lib_save_LIBS
12789 echo "$as_me:12789: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12790 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12791 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12792 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12795 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12796 echo "$as_me:12796: checking for dnet_ntoa in -ldnet_stub" >&5
12797 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12798 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12799 echo $ECHO_N "(cached) $ECHO_C" >&6
12801 ac_check_lib_save_LIBS=$LIBS
12802 LIBS="-ldnet_stub $LIBS"
12803 cat >"conftest.$ac_ext" <<_ACEOF
12804 #line 12804 "configure"
12805 #include "confdefs.h"
12807 /* Override any gcc2 internal prototype to avoid an error. */
12811 /* We use char because int might match the return type of a gcc2
12812 builtin and then its argument prototype would still apply. */
12822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12823 if { (eval echo "$as_me:12823: \"$ac_link\"") >&5
12824 (eval $ac_link) 2>&5
12826 echo "$as_me:12826: \$? = $ac_status" >&5
12827 (exit "$ac_status"); } &&
12828 { ac_try='test -s "conftest$ac_exeext"'
12829 { (eval echo "$as_me:12829: \"$ac_try\"") >&5
12830 (eval $ac_try) 2>&5
12832 echo "$as_me:12832: \$? = $ac_status" >&5
12833 (exit "$ac_status"); }; }; then
12834 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12836 echo "$as_me: failed program was:" >&5
12837 cat "conftest.$ac_ext" >&5
12838 ac_cv_lib_dnet_stub_dnet_ntoa=no
12840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12841 LIBS=$ac_check_lib_save_LIBS
12843 echo "$as_me:12843: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12844 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12845 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12846 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12851 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12852 LIBS="$ac_xsave_LIBS"
12854 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12855 # to get the SysV transport functions.
12856 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12858 # The nsl library prevents programs from opening the X display
12859 # on Irix 5.2, according to T.E. Dickey.
12860 # The functions gethostbyname, getservbyname, and inet_addr are
12861 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12862 echo "$as_me:12862: checking for gethostbyname" >&5
12863 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12864 if test "${ac_cv_func_gethostbyname+set}" = set; then
12865 echo $ECHO_N "(cached) $ECHO_C" >&6
12867 cat >"conftest.$ac_ext" <<_ACEOF
12868 #line 12868 "configure"
12869 #include "confdefs.h"
12870 #define gethostbyname autoconf_temporary
12871 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12872 #undef gethostbyname
12878 /* We use char because int might match the return type of a gcc2
12879 builtin and then its argument prototype would still apply. */
12880 char gethostbyname (void);
12886 /* The GNU C library defines stubs for functions which it implements
12887 to always fail with ENOSYS. Some functions are actually named
12888 something starting with __ and the normal name is an alias. */
12889 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12890 #error found stub for gethostbyname
12893 return gethostbyname ();
12898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12899 if { (eval echo "$as_me:12899: \"$ac_link\"") >&5
12900 (eval $ac_link) 2>&5
12902 echo "$as_me:12902: \$? = $ac_status" >&5
12903 (exit "$ac_status"); } &&
12904 { ac_try='test -s "conftest$ac_exeext"'
12905 { (eval echo "$as_me:12905: \"$ac_try\"") >&5
12906 (eval $ac_try) 2>&5
12908 echo "$as_me:12908: \$? = $ac_status" >&5
12909 (exit "$ac_status"); }; }; then
12910 ac_cv_func_gethostbyname=yes
12912 echo "$as_me: failed program was:" >&5
12913 cat "conftest.$ac_ext" >&5
12914 ac_cv_func_gethostbyname=no
12916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12918 echo "$as_me:12918: result: $ac_cv_func_gethostbyname" >&5
12919 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12921 if test $ac_cv_func_gethostbyname = no; then
12922 echo "$as_me:12922: checking for gethostbyname in -lnsl" >&5
12923 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12924 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12925 echo $ECHO_N "(cached) $ECHO_C" >&6
12927 ac_check_lib_save_LIBS=$LIBS
12929 cat >"conftest.$ac_ext" <<_ACEOF
12930 #line 12930 "configure"
12931 #include "confdefs.h"
12933 /* Override any gcc2 internal prototype to avoid an error. */
12937 /* We use char because int might match the return type of a gcc2
12938 builtin and then its argument prototype would still apply. */
12939 char gethostbyname ();
12948 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12949 if { (eval echo "$as_me:12949: \"$ac_link\"") >&5
12950 (eval $ac_link) 2>&5
12952 echo "$as_me:12952: \$? = $ac_status" >&5
12953 (exit "$ac_status"); } &&
12954 { ac_try='test -s "conftest$ac_exeext"'
12955 { (eval echo "$as_me:12955: \"$ac_try\"") >&5
12956 (eval $ac_try) 2>&5
12958 echo "$as_me:12958: \$? = $ac_status" >&5
12959 (exit "$ac_status"); }; }; then
12960 ac_cv_lib_nsl_gethostbyname=yes
12962 echo "$as_me: failed program was:" >&5
12963 cat "conftest.$ac_ext" >&5
12964 ac_cv_lib_nsl_gethostbyname=no
12966 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12967 LIBS=$ac_check_lib_save_LIBS
12969 echo "$as_me:12969: result: $ac_cv_lib_nsl_gethostbyname" >&5
12970 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12971 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12972 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12975 if test $ac_cv_lib_nsl_gethostbyname = no; then
12976 echo "$as_me:12976: checking for gethostbyname in -lbsd" >&5
12977 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12978 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12979 echo $ECHO_N "(cached) $ECHO_C" >&6
12981 ac_check_lib_save_LIBS=$LIBS
12983 cat >"conftest.$ac_ext" <<_ACEOF
12984 #line 12984 "configure"
12985 #include "confdefs.h"
12987 /* Override any gcc2 internal prototype to avoid an error. */
12991 /* We use char because int might match the return type of a gcc2
12992 builtin and then its argument prototype would still apply. */
12993 char gethostbyname ();
13002 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13003 if { (eval echo "$as_me:13003: \"$ac_link\"") >&5
13004 (eval $ac_link) 2>&5
13006 echo "$as_me:13006: \$? = $ac_status" >&5
13007 (exit "$ac_status"); } &&
13008 { ac_try='test -s "conftest$ac_exeext"'
13009 { (eval echo "$as_me:13009: \"$ac_try\"") >&5
13010 (eval $ac_try) 2>&5
13012 echo "$as_me:13012: \$? = $ac_status" >&5
13013 (exit "$ac_status"); }; }; then
13014 ac_cv_lib_bsd_gethostbyname=yes
13016 echo "$as_me: failed program was:" >&5
13017 cat "conftest.$ac_ext" >&5
13018 ac_cv_lib_bsd_gethostbyname=no
13020 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13021 LIBS=$ac_check_lib_save_LIBS
13023 echo "$as_me:13023: result: $ac_cv_lib_bsd_gethostbyname" >&5
13024 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13025 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13026 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13032 # lieder@skyler.mavd.honeywell.com says without -lsocket,
13033 # socket/setsockopt and other routines are undefined under SCO ODT
13034 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13035 # on later versions), says Simon Leinen: it contains gethostby*
13036 # variants that don't use the nameserver (or something). -lsocket
13037 # must be given before -lnsl if both are needed. We assume that
13038 # if connect needs -lnsl, so does gethostbyname.
13039 echo "$as_me:13039: checking for connect" >&5
13040 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13041 if test "${ac_cv_func_connect+set}" = set; then
13042 echo $ECHO_N "(cached) $ECHO_C" >&6
13044 cat >"conftest.$ac_ext" <<_ACEOF
13045 #line 13045 "configure"
13046 #include "confdefs.h"
13047 #define connect autoconf_temporary
13048 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13055 /* We use char because int might match the return type of a gcc2
13056 builtin and then its argument prototype would still apply. */
13057 char connect (void);
13063 /* The GNU C library defines stubs for functions which it implements
13064 to always fail with ENOSYS. Some functions are actually named
13065 something starting with __ and the normal name is an alias. */
13066 #if defined (__stub_connect) || defined (__stub___connect)
13067 #error found stub for connect
13075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13076 if { (eval echo "$as_me:13076: \"$ac_link\"") >&5
13077 (eval $ac_link) 2>&5
13079 echo "$as_me:13079: \$? = $ac_status" >&5
13080 (exit "$ac_status"); } &&
13081 { ac_try='test -s "conftest$ac_exeext"'
13082 { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083 (eval $ac_try) 2>&5
13085 echo "$as_me:13085: \$? = $ac_status" >&5
13086 (exit "$ac_status"); }; }; then
13087 ac_cv_func_connect=yes
13089 echo "$as_me: failed program was:" >&5
13090 cat "conftest.$ac_ext" >&5
13091 ac_cv_func_connect=no
13093 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13095 echo "$as_me:13095: result: $ac_cv_func_connect" >&5
13096 echo "${ECHO_T}$ac_cv_func_connect" >&6
13098 if test $ac_cv_func_connect = no; then
13099 echo "$as_me:13099: checking for connect in -lsocket" >&5
13100 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13101 if test "${ac_cv_lib_socket_connect+set}" = set; then
13102 echo $ECHO_N "(cached) $ECHO_C" >&6
13104 ac_check_lib_save_LIBS=$LIBS
13105 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13106 cat >"conftest.$ac_ext" <<_ACEOF
13107 #line 13107 "configure"
13108 #include "confdefs.h"
13110 /* Override any gcc2 internal prototype to avoid an error. */
13114 /* We use char because int might match the return type of a gcc2
13115 builtin and then its argument prototype would still apply. */
13125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13126 if { (eval echo "$as_me:13126: \"$ac_link\"") >&5
13127 (eval $ac_link) 2>&5
13129 echo "$as_me:13129: \$? = $ac_status" >&5
13130 (exit "$ac_status"); } &&
13131 { ac_try='test -s "conftest$ac_exeext"'
13132 { (eval echo "$as_me:13132: \"$ac_try\"") >&5
13133 (eval $ac_try) 2>&5
13135 echo "$as_me:13135: \$? = $ac_status" >&5
13136 (exit "$ac_status"); }; }; then
13137 ac_cv_lib_socket_connect=yes
13139 echo "$as_me: failed program was:" >&5
13140 cat "conftest.$ac_ext" >&5
13141 ac_cv_lib_socket_connect=no
13143 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13144 LIBS=$ac_check_lib_save_LIBS
13146 echo "$as_me:13146: result: $ac_cv_lib_socket_connect" >&5
13147 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13148 if test "$ac_cv_lib_socket_connect" = yes; then
13149 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13154 # Guillermo Gomez says -lposix is necessary on A/UX.
13155 echo "$as_me:13155: checking for remove" >&5
13156 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13157 if test "${ac_cv_func_remove+set}" = set; then
13158 echo $ECHO_N "(cached) $ECHO_C" >&6
13160 cat >"conftest.$ac_ext" <<_ACEOF
13161 #line 13161 "configure"
13162 #include "confdefs.h"
13163 #define remove autoconf_temporary
13164 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13171 /* We use char because int might match the return type of a gcc2
13172 builtin and then its argument prototype would still apply. */
13173 char remove (void);
13179 /* The GNU C library defines stubs for functions which it implements
13180 to always fail with ENOSYS. Some functions are actually named
13181 something starting with __ and the normal name is an alias. */
13182 #if defined (__stub_remove) || defined (__stub___remove)
13183 #error found stub for remove
13191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13192 if { (eval echo "$as_me:13192: \"$ac_link\"") >&5
13193 (eval $ac_link) 2>&5
13195 echo "$as_me:13195: \$? = $ac_status" >&5
13196 (exit "$ac_status"); } &&
13197 { ac_try='test -s "conftest$ac_exeext"'
13198 { (eval echo "$as_me:13198: \"$ac_try\"") >&5
13199 (eval $ac_try) 2>&5
13201 echo "$as_me:13201: \$? = $ac_status" >&5
13202 (exit "$ac_status"); }; }; then
13203 ac_cv_func_remove=yes
13205 echo "$as_me: failed program was:" >&5
13206 cat "conftest.$ac_ext" >&5
13207 ac_cv_func_remove=no
13209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13211 echo "$as_me:13211: result: $ac_cv_func_remove" >&5
13212 echo "${ECHO_T}$ac_cv_func_remove" >&6
13214 if test $ac_cv_func_remove = no; then
13215 echo "$as_me:13215: checking for remove in -lposix" >&5
13216 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13217 if test "${ac_cv_lib_posix_remove+set}" = set; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
13220 ac_check_lib_save_LIBS=$LIBS
13221 LIBS="-lposix $LIBS"
13222 cat >"conftest.$ac_ext" <<_ACEOF
13223 #line 13223 "configure"
13224 #include "confdefs.h"
13226 /* Override any gcc2 internal prototype to avoid an error. */
13230 /* We use char because int might match the return type of a gcc2
13231 builtin and then its argument prototype would still apply. */
13241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13242 if { (eval echo "$as_me:13242: \"$ac_link\"") >&5
13243 (eval $ac_link) 2>&5
13245 echo "$as_me:13245: \$? = $ac_status" >&5
13246 (exit "$ac_status"); } &&
13247 { ac_try='test -s "conftest$ac_exeext"'
13248 { (eval echo "$as_me:13248: \"$ac_try\"") >&5
13249 (eval $ac_try) 2>&5
13251 echo "$as_me:13251: \$? = $ac_status" >&5
13252 (exit "$ac_status"); }; }; then
13253 ac_cv_lib_posix_remove=yes
13255 echo "$as_me: failed program was:" >&5
13256 cat "conftest.$ac_ext" >&5
13257 ac_cv_lib_posix_remove=no
13259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13260 LIBS=$ac_check_lib_save_LIBS
13262 echo "$as_me:13262: result: $ac_cv_lib_posix_remove" >&5
13263 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13264 if test "$ac_cv_lib_posix_remove" = yes; then
13265 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13270 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13271 echo "$as_me:13271: checking for shmat" >&5
13272 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13273 if test "${ac_cv_func_shmat+set}" = set; then
13274 echo $ECHO_N "(cached) $ECHO_C" >&6
13276 cat >"conftest.$ac_ext" <<_ACEOF
13277 #line 13277 "configure"
13278 #include "confdefs.h"
13279 #define shmat autoconf_temporary
13280 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13287 /* We use char because int might match the return type of a gcc2
13288 builtin and then its argument prototype would still apply. */
13295 /* The GNU C library defines stubs for functions which it implements
13296 to always fail with ENOSYS. Some functions are actually named
13297 something starting with __ and the normal name is an alias. */
13298 #if defined (__stub_shmat) || defined (__stub___shmat)
13299 #error found stub for shmat
13307 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13308 if { (eval echo "$as_me:13308: \"$ac_link\"") >&5
13309 (eval $ac_link) 2>&5
13311 echo "$as_me:13311: \$? = $ac_status" >&5
13312 (exit "$ac_status"); } &&
13313 { ac_try='test -s "conftest$ac_exeext"'
13314 { (eval echo "$as_me:13314: \"$ac_try\"") >&5
13315 (eval $ac_try) 2>&5
13317 echo "$as_me:13317: \$? = $ac_status" >&5
13318 (exit "$ac_status"); }; }; then
13319 ac_cv_func_shmat=yes
13321 echo "$as_me: failed program was:" >&5
13322 cat "conftest.$ac_ext" >&5
13323 ac_cv_func_shmat=no
13325 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13327 echo "$as_me:13327: result: $ac_cv_func_shmat" >&5
13328 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13330 if test $ac_cv_func_shmat = no; then
13331 echo "$as_me:13331: checking for shmat in -lipc" >&5
13332 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13333 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13334 echo $ECHO_N "(cached) $ECHO_C" >&6
13336 ac_check_lib_save_LIBS=$LIBS
13338 cat >"conftest.$ac_ext" <<_ACEOF
13339 #line 13339 "configure"
13340 #include "confdefs.h"
13342 /* Override any gcc2 internal prototype to avoid an error. */
13346 /* We use char because int might match the return type of a gcc2
13347 builtin and then its argument prototype would still apply. */
13357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13358 if { (eval echo "$as_me:13358: \"$ac_link\"") >&5
13359 (eval $ac_link) 2>&5
13361 echo "$as_me:13361: \$? = $ac_status" >&5
13362 (exit "$ac_status"); } &&
13363 { ac_try='test -s "conftest$ac_exeext"'
13364 { (eval echo "$as_me:13364: \"$ac_try\"") >&5
13365 (eval $ac_try) 2>&5
13367 echo "$as_me:13367: \$? = $ac_status" >&5
13368 (exit "$ac_status"); }; }; then
13369 ac_cv_lib_ipc_shmat=yes
13371 echo "$as_me: failed program was:" >&5
13372 cat "conftest.$ac_ext" >&5
13373 ac_cv_lib_ipc_shmat=no
13375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13376 LIBS=$ac_check_lib_save_LIBS
13378 echo "$as_me:13378: result: $ac_cv_lib_ipc_shmat" >&5
13379 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13380 if test "$ac_cv_lib_ipc_shmat" = yes; then
13381 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13387 # Check for libraries that X11R6 Xt/Xaw programs need.
13388 ac_save_LDFLAGS=$LDFLAGS
13389 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13390 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13391 # check for ICE first), but we must link in the order -lSM -lICE or
13392 # we get undefined symbols. So assume we have SM if we have ICE.
13393 # These have to be linked with before -lX11, unlike the other
13394 # libraries we check for below, so use a different variable.
13395 # John Interrante, Karl Berry
13396 echo "$as_me:13396: checking for IceConnectionNumber in -lICE" >&5
13397 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13398 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13399 echo $ECHO_N "(cached) $ECHO_C" >&6
13401 ac_check_lib_save_LIBS=$LIBS
13402 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13403 cat >"conftest.$ac_ext" <<_ACEOF
13404 #line 13404 "configure"
13405 #include "confdefs.h"
13407 /* Override any gcc2 internal prototype to avoid an error. */
13411 /* We use char because int might match the return type of a gcc2
13412 builtin and then its argument prototype would still apply. */
13413 char IceConnectionNumber ();
13417 IceConnectionNumber ();
13422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13423 if { (eval echo "$as_me:13423: \"$ac_link\"") >&5
13424 (eval $ac_link) 2>&5
13426 echo "$as_me:13426: \$? = $ac_status" >&5
13427 (exit "$ac_status"); } &&
13428 { ac_try='test -s "conftest$ac_exeext"'
13429 { (eval echo "$as_me:13429: \"$ac_try\"") >&5
13430 (eval $ac_try) 2>&5
13432 echo "$as_me:13432: \$? = $ac_status" >&5
13433 (exit "$ac_status"); }; }; then
13434 ac_cv_lib_ICE_IceConnectionNumber=yes
13436 echo "$as_me: failed program was:" >&5
13437 cat "conftest.$ac_ext" >&5
13438 ac_cv_lib_ICE_IceConnectionNumber=no
13440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13441 LIBS=$ac_check_lib_save_LIBS
13443 echo "$as_me:13443: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13444 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13445 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13446 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13449 LDFLAGS=$ac_save_LDFLAGS
13453 cf_x_athena=${cf_x_athena:-Xaw}
13455 echo "$as_me:13455: checking if you want to link with Xaw 3d library" >&5
13456 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13459 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13460 if test "${with_Xaw3d+set}" = set; then
13461 withval="$with_Xaw3d"
13464 if test "$withval" = yes ; then
13466 echo "$as_me:13466: result: yes" >&5
13467 echo "${ECHO_T}yes" >&6
13469 echo "$as_me:13469: result: no" >&5
13470 echo "${ECHO_T}no" >&6
13473 echo "$as_me:13473: checking if you want to link with Xaw 3d xft library" >&5
13474 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13477 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13478 if test "${with_Xaw3dxft+set}" = set; then
13479 withval="$with_Xaw3dxft"
13482 if test "$withval" = yes ; then
13483 cf_x_athena=Xaw3dxft
13484 echo "$as_me:13484: result: yes" >&5
13485 echo "${ECHO_T}yes" >&6
13487 echo "$as_me:13487: result: no" >&5
13488 echo "${ECHO_T}no" >&6
13491 echo "$as_me:13491: checking if you want to link with neXT Athena library" >&5
13492 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13495 # Check whether --with-neXtaw or --without-neXtaw was given.
13496 if test "${with_neXtaw+set}" = set; then
13497 withval="$with_neXtaw"
13500 if test "$withval" = yes ; then
13502 echo "$as_me:13502: result: yes" >&5
13503 echo "${ECHO_T}yes" >&6
13505 echo "$as_me:13505: result: no" >&5
13506 echo "${ECHO_T}no" >&6
13509 echo "$as_me:13509: checking if you want to link with Athena-Plus library" >&5
13510 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13513 # Check whether --with-XawPlus or --without-XawPlus was given.
13514 if test "${with_XawPlus+set}" = set; then
13515 withval="$with_XawPlus"
13518 if test "$withval" = yes ; then
13519 cf_x_athena=XawPlus
13520 echo "$as_me:13520: result: yes" >&5
13521 echo "${ECHO_T}yes" >&6
13523 echo "$as_me:13523: result: no" >&5
13524 echo "${ECHO_T}no" >&6
13529 if test "$PKG_CONFIG" != none ; then
13531 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13532 for cf_athena_pkg in \
13535 ${cf_x_athena}-devel \
13536 lib${cf_x_athena} \
13537 lib${cf_x_athena}-devel
13540 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13541 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13543 echo "${as_me:-configure}:13543: testing found package $cf_athena_pkg ..." 1>&5
13545 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13546 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13547 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13549 echo "${as_me:-configure}:13549: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13551 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13553 echo "${as_me:-configure}:13553: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13558 cf_new_extra_cppflags=
13560 for cf_add_cflags in $cf_pkgconfig_incs
13562 case "$cf_fix_cppflags" in
13564 case "$cf_add_cflags" in
13565 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13566 case "$cf_add_cflags" in
13568 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13570 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13571 && test -z "${cf_tst_cflags}" \
13572 && cf_fix_cppflags=yes
13574 if test "$cf_fix_cppflags" = yes ; then
13576 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13577 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13580 elif test "${cf_tst_cflags}" = "\"'" ; then
13582 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13583 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13589 case "$CPPFLAGS" in
13593 case "$cf_add_cflags" in
13595 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13597 CPPFLAGS=`echo "$CPPFLAGS" | \
13598 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13599 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13604 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13605 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13612 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13613 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13620 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13621 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13623 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13625 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13626 && test -z "${cf_tst_cflags}" \
13627 && cf_fix_cppflags=no
13632 if test -n "$cf_new_cflags" ; then
13634 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13635 CFLAGS="${CFLAGS}$cf_new_cflags"
13639 if test -n "$cf_new_cppflags" ; then
13641 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13642 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13646 if test -n "$cf_new_extra_cppflags" ; then
13648 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13649 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13653 cf_add_libs="$LIBS"
13656 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13657 # filter duplicates
13658 for cf_add_1lib in $cf_add_0lib; do
13659 for cf_add_2lib in $cf_add_libs; do
13660 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13665 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13667 LIBS="$cf_add_libs"
13669 cf_x_athena_lib="$cf_pkgconfig_libs"
13671 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13673 cat >>confdefs.h <<EOF
13674 #define $cf_x_athena_LIBS 1
13677 for cf_trim_lib in Xmu Xt X11
13680 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13681 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13682 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13684 echo "${as_me:-configure}:13684: testing ..trimmed $LIBS ..." 1>&5
13690 echo "$as_me:13690: checking for usable $cf_x_athena/Xmu package" >&5
13691 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13692 if test "${cf_cv_xaw_compat+set}" = set; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
13696 cat >"conftest.$ac_ext" <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13700 #include <X11/Xmu/CharSet.h>
13706 int check = XmuCompareISOLatin1("big", "small");
13713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13714 if { (eval echo "$as_me:13714: \"$ac_link\"") >&5
13715 (eval $ac_link) 2>&5
13717 echo "$as_me:13717: \$? = $ac_status" >&5
13718 (exit "$ac_status"); } &&
13719 { ac_try='test -s "conftest$ac_exeext"'
13720 { (eval echo "$as_me:13720: \"$ac_try\"") >&5
13721 (eval $ac_try) 2>&5
13723 echo "$as_me:13723: \$? = $ac_status" >&5
13724 (exit "$ac_status"); }; }; then
13725 cf_cv_xaw_compat=yes
13727 echo "$as_me: failed program was:" >&5
13728 cat "conftest.$ac_ext" >&5
13729 cf_cv_xaw_compat=no
13731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13733 echo "$as_me:13733: result: $cf_cv_xaw_compat" >&5
13734 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13736 if test "$cf_cv_xaw_compat" = no
13738 # workaround for broken ".pc" files...
13739 case "$cf_x_athena_lib" in
13743 test -n "$verbose" && echo " work around broken package" 1>&6
13745 echo "${as_me:-configure}:13745: testing work around broken package ..." 1>&5
13747 cf_save_xmu="$LIBS"
13748 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13750 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13751 test -n "$verbose" && echo " found package xmu" 1>&6
13753 echo "${as_me:-configure}:13753: testing found package xmu ..." 1>&5
13755 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13756 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13757 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13759 echo "${as_me:-configure}:13759: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13761 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13763 echo "${as_me:-configure}:13763: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13768 cf_new_extra_cppflags=
13770 for cf_add_cflags in $cf_pkgconfig_incs
13772 case "$cf_fix_cppflags" in
13774 case "$cf_add_cflags" in
13775 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13776 case "$cf_add_cflags" in
13778 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13780 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13781 && test -z "${cf_tst_cflags}" \
13782 && cf_fix_cppflags=yes
13784 if test "$cf_fix_cppflags" = yes ; then
13786 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13787 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13790 elif test "${cf_tst_cflags}" = "\"'" ; then
13792 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13793 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13799 case "$CPPFLAGS" in
13803 case "$cf_add_cflags" in
13805 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13807 CPPFLAGS=`echo "$CPPFLAGS" | \
13808 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13809 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13814 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13815 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13822 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13823 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13833 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13835 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13836 && test -z "${cf_tst_cflags}" \
13837 && cf_fix_cppflags=no
13842 if test -n "$cf_new_cflags" ; then
13844 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13845 CFLAGS="${CFLAGS}$cf_new_cflags"
13849 if test -n "$cf_new_cppflags" ; then
13851 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13852 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13856 if test -n "$cf_new_extra_cppflags" ; then
13858 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13859 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13863 cf_add_libs="$LIBS"
13866 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13867 # filter duplicates
13868 for cf_add_1lib in $cf_add_0lib; do
13869 for cf_add_2lib in $cf_add_libs; do
13870 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13875 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13877 LIBS="$cf_add_libs"
13879 LIBS="$cf_save_xmu"
13881 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13883 echo "${as_me:-configure}:13883: testing ...before $LIBS ..." 1>&5
13885 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13886 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13888 echo "${as_me:-configure}:13888: testing ...after $LIBS ..." 1>&5
13894 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13896 echo "${as_me:-configure}:13896: testing ...before $LIBS ..." 1>&5
13898 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13899 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13901 echo "${as_me:-configure}:13901: testing ...after $LIBS ..." 1>&5
13905 for cf_trim_lib in Xmu Xt X11
13908 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13909 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13910 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13912 echo "${as_me:-configure}:13912: testing ..trimmed $LIBS ..." 1>&5
13932 if test -z "$cf_x_athena_lib" ; then
13934 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13935 test -n "$verbose" && echo " found package Xext" 1>&6
13937 echo "${as_me:-configure}:13937: testing found package Xext ..." 1>&5
13939 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13940 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13941 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13943 echo "${as_me:-configure}:13943: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13945 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13947 echo "${as_me:-configure}:13947: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13952 cf_new_extra_cppflags=
13954 for cf_add_cflags in $cf_pkgconfig_incs
13956 case "$cf_fix_cppflags" in
13958 case "$cf_add_cflags" in
13959 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13960 case "$cf_add_cflags" in
13962 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13964 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13965 && test -z "${cf_tst_cflags}" \
13966 && cf_fix_cppflags=yes
13968 if test "$cf_fix_cppflags" = yes ; then
13970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13974 elif test "${cf_tst_cflags}" = "\"'" ; then
13976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13983 case "$CPPFLAGS" in
13987 case "$cf_add_cflags" in
13989 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13991 CPPFLAGS=`echo "$CPPFLAGS" | \
13992 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13993 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13998 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13999 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14006 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14007 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14017 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14020 && test -z "${cf_tst_cflags}" \
14021 && cf_fix_cppflags=no
14026 if test -n "$cf_new_cflags" ; then
14028 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14029 CFLAGS="${CFLAGS}$cf_new_cflags"
14033 if test -n "$cf_new_cppflags" ; then
14035 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14036 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14040 if test -n "$cf_new_extra_cppflags" ; then
14042 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14043 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14047 cf_add_libs="$LIBS"
14050 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14051 # filter duplicates
14052 for cf_add_1lib in $cf_add_0lib; do
14053 for cf_add_2lib in $cf_add_libs; do
14054 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14059 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14061 LIBS="$cf_add_libs"
14068 echo "$as_me:14068: checking for XextCreateExtension in -lXext" >&5
14069 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14070 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14071 echo $ECHO_N "(cached) $ECHO_C" >&6
14073 ac_check_lib_save_LIBS=$LIBS
14074 LIBS="-lXext $LIBS"
14075 cat >"conftest.$ac_ext" <<_ACEOF
14076 #line 14076 "configure"
14077 #include "confdefs.h"
14079 /* Override any gcc2 internal prototype to avoid an error. */
14083 /* We use char because int might match the return type of a gcc2
14084 builtin and then its argument prototype would still apply. */
14085 char XextCreateExtension ();
14089 XextCreateExtension ();
14094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14095 if { (eval echo "$as_me:14095: \"$ac_link\"") >&5
14096 (eval $ac_link) 2>&5
14098 echo "$as_me:14098: \$? = $ac_status" >&5
14099 (exit "$ac_status"); } &&
14100 { ac_try='test -s "conftest$ac_exeext"'
14101 { (eval echo "$as_me:14101: \"$ac_try\"") >&5
14102 (eval $ac_try) 2>&5
14104 echo "$as_me:14104: \$? = $ac_status" >&5
14105 (exit "$ac_status"); }; }; then
14106 ac_cv_lib_Xext_XextCreateExtension=yes
14108 echo "$as_me: failed program was:" >&5
14109 cat "conftest.$ac_ext" >&5
14110 ac_cv_lib_Xext_XextCreateExtension=no
14112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14113 LIBS=$ac_check_lib_save_LIBS
14115 echo "$as_me:14115: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14116 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14117 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14119 cf_add_libs="$LIBS"
14122 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14123 # filter duplicates
14124 for cf_add_1lib in $cf_add_0lib; do
14125 for cf_add_2lib in $cf_add_libs; do
14126 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14131 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14133 LIBS="$cf_add_libs"
14139 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14140 # in some cases has installed dummy files in the former, other cases replaced
14141 # it with a link to the new location). This complicates the configure script.
14142 # Check for that pitfall, and recover using pkg-config
14144 # If none of these are set, the configuration is almost certainly broken.
14145 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14148 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14149 test -n "$verbose" && echo " found package x11" 1>&6
14151 echo "${as_me:-configure}:14151: testing found package x11 ..." 1>&5
14153 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14154 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14155 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14157 echo "${as_me:-configure}:14157: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14159 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14161 echo "${as_me:-configure}:14161: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14166 cf_new_extra_cppflags=
14168 for cf_add_cflags in $cf_pkgconfig_incs
14170 case "$cf_fix_cppflags" in
14172 case "$cf_add_cflags" in
14173 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14174 case "$cf_add_cflags" in
14176 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14178 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14179 && test -z "${cf_tst_cflags}" \
14180 && cf_fix_cppflags=yes
14182 if test "$cf_fix_cppflags" = yes ; then
14184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14188 elif test "${cf_tst_cflags}" = "\"'" ; then
14190 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14191 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14197 case "$CPPFLAGS" in
14201 case "$cf_add_cflags" in
14203 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14205 CPPFLAGS=`echo "$CPPFLAGS" | \
14206 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14207 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14212 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14213 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14220 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14221 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14228 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14229 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14231 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14233 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14234 && test -z "${cf_tst_cflags}" \
14235 && cf_fix_cppflags=no
14240 if test -n "$cf_new_cflags" ; then
14242 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14243 CFLAGS="${CFLAGS}$cf_new_cflags"
14247 if test -n "$cf_new_cppflags" ; then
14249 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14250 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14254 if test -n "$cf_new_extra_cppflags" ; then
14256 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14257 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14261 cf_add_libs="$LIBS"
14264 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14265 # filter duplicates
14266 for cf_add_1lib in $cf_add_0lib; do
14267 for cf_add_2lib in $cf_add_libs; do
14268 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14273 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14275 LIBS="$cf_add_libs"
14281 { echo "$as_me:14281: WARNING: unable to find X11 library" >&5
14282 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14285 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14286 test -n "$verbose" && echo " found package ice" 1>&6
14288 echo "${as_me:-configure}:14288: testing found package ice ..." 1>&5
14290 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14291 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14292 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14294 echo "${as_me:-configure}:14294: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14296 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14298 echo "${as_me:-configure}:14298: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14303 cf_new_extra_cppflags=
14305 for cf_add_cflags in $cf_pkgconfig_incs
14307 case "$cf_fix_cppflags" in
14309 case "$cf_add_cflags" in
14310 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14311 case "$cf_add_cflags" in
14313 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14315 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14316 && test -z "${cf_tst_cflags}" \
14317 && cf_fix_cppflags=yes
14319 if test "$cf_fix_cppflags" = yes ; then
14321 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14322 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14325 elif test "${cf_tst_cflags}" = "\"'" ; then
14327 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14328 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14334 case "$CPPFLAGS" in
14338 case "$cf_add_cflags" in
14340 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14342 CPPFLAGS=`echo "$CPPFLAGS" | \
14343 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14344 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14349 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14350 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14357 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14358 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14365 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14366 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14368 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14370 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14371 && test -z "${cf_tst_cflags}" \
14372 && cf_fix_cppflags=no
14377 if test -n "$cf_new_cflags" ; then
14379 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14380 CFLAGS="${CFLAGS}$cf_new_cflags"
14384 if test -n "$cf_new_cppflags" ; then
14386 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14387 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14391 if test -n "$cf_new_extra_cppflags" ; then
14393 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14394 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14398 cf_add_libs="$LIBS"
14401 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14402 # filter duplicates
14403 for cf_add_1lib in $cf_add_0lib; do
14404 for cf_add_2lib in $cf_add_libs; do
14405 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14410 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14412 LIBS="$cf_add_libs"
14418 { echo "$as_me:14418: WARNING: unable to find ICE library" >&5
14419 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14422 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14423 test -n "$verbose" && echo " found package sm" 1>&6
14425 echo "${as_me:-configure}:14425: testing found package sm ..." 1>&5
14427 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14428 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14429 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14431 echo "${as_me:-configure}:14431: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14433 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14435 echo "${as_me:-configure}:14435: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14440 cf_new_extra_cppflags=
14442 for cf_add_cflags in $cf_pkgconfig_incs
14444 case "$cf_fix_cppflags" in
14446 case "$cf_add_cflags" in
14447 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14448 case "$cf_add_cflags" in
14450 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14452 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14453 && test -z "${cf_tst_cflags}" \
14454 && cf_fix_cppflags=yes
14456 if test "$cf_fix_cppflags" = yes ; then
14458 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14459 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14462 elif test "${cf_tst_cflags}" = "\"'" ; then
14464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14471 case "$CPPFLAGS" in
14475 case "$cf_add_cflags" in
14477 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14479 CPPFLAGS=`echo "$CPPFLAGS" | \
14480 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14481 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14486 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14487 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14494 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14495 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14502 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14503 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14505 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14507 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14508 && test -z "${cf_tst_cflags}" \
14509 && cf_fix_cppflags=no
14514 if test -n "$cf_new_cflags" ; then
14516 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14517 CFLAGS="${CFLAGS}$cf_new_cflags"
14521 if test -n "$cf_new_cppflags" ; then
14523 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14524 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14528 if test -n "$cf_new_extra_cppflags" ; then
14530 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14531 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14535 cf_add_libs="$LIBS"
14538 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14539 # filter duplicates
14540 for cf_add_1lib in $cf_add_0lib; do
14541 for cf_add_2lib in $cf_add_libs; do
14542 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14547 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14549 LIBS="$cf_add_libs"
14555 { echo "$as_me:14555: WARNING: unable to find SM library" >&5
14556 echo "$as_me: WARNING: unable to find SM library" >&2;}
14559 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14560 test -n "$verbose" && echo " found package xt" 1>&6
14562 echo "${as_me:-configure}:14562: testing found package xt ..." 1>&5
14564 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14565 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14566 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14568 echo "${as_me:-configure}:14568: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14570 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14572 echo "${as_me:-configure}:14572: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14577 cf_new_extra_cppflags=
14579 for cf_add_cflags in $cf_pkgconfig_incs
14581 case "$cf_fix_cppflags" in
14583 case "$cf_add_cflags" in
14584 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14585 case "$cf_add_cflags" in
14587 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14590 && test -z "${cf_tst_cflags}" \
14591 && cf_fix_cppflags=yes
14593 if test "$cf_fix_cppflags" = yes ; then
14595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14599 elif test "${cf_tst_cflags}" = "\"'" ; then
14601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14608 case "$CPPFLAGS" in
14612 case "$cf_add_cflags" in
14614 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14616 CPPFLAGS=`echo "$CPPFLAGS" | \
14617 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14618 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14623 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14624 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14631 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14632 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14639 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14640 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14642 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14645 && test -z "${cf_tst_cflags}" \
14646 && cf_fix_cppflags=no
14651 if test -n "$cf_new_cflags" ; then
14653 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14654 CFLAGS="${CFLAGS}$cf_new_cflags"
14658 if test -n "$cf_new_cppflags" ; then
14660 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14661 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14665 if test -n "$cf_new_extra_cppflags" ; then
14667 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14668 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14672 cf_add_libs="$LIBS"
14675 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14676 # filter duplicates
14677 for cf_add_1lib in $cf_add_0lib; do
14678 for cf_add_2lib in $cf_add_libs; do
14679 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14684 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14686 LIBS="$cf_add_libs"
14692 { echo "$as_me:14692: WARNING: unable to find Xt library" >&5
14693 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14697 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14702 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14703 test -n "$verbose" && echo " found package xt" 1>&6
14705 echo "${as_me:-configure}:14705: testing found package xt ..." 1>&5
14707 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14708 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14709 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14711 echo "${as_me:-configure}:14711: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14713 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14715 echo "${as_me:-configure}:14715: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14720 cf_new_extra_cppflags=
14722 for cf_add_cflags in $cf_pkgconfig_incs
14724 case "$cf_fix_cppflags" in
14726 case "$cf_add_cflags" in
14727 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14728 case "$cf_add_cflags" in
14730 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14732 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14733 && test -z "${cf_tst_cflags}" \
14734 && cf_fix_cppflags=yes
14736 if test "$cf_fix_cppflags" = yes ; then
14738 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14739 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14742 elif test "${cf_tst_cflags}" = "\"'" ; then
14744 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14745 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14751 case "$CPPFLAGS" in
14755 case "$cf_add_cflags" in
14757 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14759 CPPFLAGS=`echo "$CPPFLAGS" | \
14760 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14761 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14766 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14767 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14774 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14775 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14782 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14783 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14785 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14787 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14788 && test -z "${cf_tst_cflags}" \
14789 && cf_fix_cppflags=no
14794 if test -n "$cf_new_cflags" ; then
14796 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14797 CFLAGS="${CFLAGS}$cf_new_cflags"
14801 if test -n "$cf_new_cppflags" ; then
14803 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14804 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14808 if test -n "$cf_new_extra_cppflags" ; then
14810 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14811 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14815 cf_add_libs="$LIBS"
14818 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14819 # filter duplicates
14820 for cf_add_1lib in $cf_add_0lib; do
14821 for cf_add_2lib in $cf_add_libs; do
14822 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14827 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14829 LIBS="$cf_add_libs"
14835 # we have an "xt" package, but it may omit Xt's dependency on X11
14836 echo "$as_me:14836: checking for usable X dependency" >&5
14837 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14838 if test "${cf_cv_xt_x11_compat+set}" = set; then
14839 echo $ECHO_N "(cached) $ECHO_C" >&6
14842 cat >"conftest.$ac_ext" <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14846 #include <X11/Xlib.h>
14852 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14853 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14854 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14855 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14862 if { (eval echo "$as_me:14862: \"$ac_link\"") >&5
14863 (eval $ac_link) 2>&5
14865 echo "$as_me:14865: \$? = $ac_status" >&5
14866 (exit "$ac_status"); } &&
14867 { ac_try='test -s "conftest$ac_exeext"'
14868 { (eval echo "$as_me:14868: \"$ac_try\"") >&5
14869 (eval $ac_try) 2>&5
14871 echo "$as_me:14871: \$? = $ac_status" >&5
14872 (exit "$ac_status"); }; }; then
14873 cf_cv_xt_x11_compat=yes
14875 echo "$as_me: failed program was:" >&5
14876 cat "conftest.$ac_ext" >&5
14877 cf_cv_xt_x11_compat=no
14879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14881 echo "$as_me:14881: result: $cf_cv_xt_x11_compat" >&5
14882 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14883 if test "$cf_cv_xt_x11_compat" = no
14885 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14887 echo "${as_me:-configure}:14887: testing work around broken X11 dependency ..." 1>&5
14889 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14891 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14892 test -n "$verbose" && echo " found package x11" 1>&6
14894 echo "${as_me:-configure}:14894: testing found package x11 ..." 1>&5
14896 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14897 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14898 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14900 echo "${as_me:-configure}:14900: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14902 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14904 echo "${as_me:-configure}:14904: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14909 cf_new_extra_cppflags=
14911 for cf_add_cflags in $cf_pkgconfig_incs
14913 case "$cf_fix_cppflags" in
14915 case "$cf_add_cflags" in
14916 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14917 case "$cf_add_cflags" in
14919 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14921 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14922 && test -z "${cf_tst_cflags}" \
14923 && cf_fix_cppflags=yes
14925 if test "$cf_fix_cppflags" = yes ; then
14927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14931 elif test "${cf_tst_cflags}" = "\"'" ; then
14933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14940 case "$CPPFLAGS" in
14944 case "$cf_add_cflags" in
14946 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14948 CPPFLAGS=`echo "$CPPFLAGS" | \
14949 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14950 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14955 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14956 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14963 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14964 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14971 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14972 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14974 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14976 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14977 && test -z "${cf_tst_cflags}" \
14978 && cf_fix_cppflags=no
14983 if test -n "$cf_new_cflags" ; then
14985 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14986 CFLAGS="${CFLAGS}$cf_new_cflags"
14990 if test -n "$cf_new_cppflags" ; then
14992 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14993 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14997 if test -n "$cf_new_extra_cppflags" ; then
14999 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15000 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15004 cf_add_libs="$LIBS"
15007 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15008 # filter duplicates
15009 for cf_add_1lib in $cf_add_0lib; do
15010 for cf_add_2lib in $cf_add_libs; do
15011 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15016 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15018 LIBS="$cf_add_libs"
15025 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15027 echo "${as_me:-configure}:15027: testing ...before $LIBS ..." 1>&5
15029 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
15030 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15032 echo "${as_me:-configure}:15032: testing ...after $LIBS ..." 1>&5
15040 echo "$as_me:15040: checking for usable X Toolkit package" >&5
15041 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15042 if test "${cf_cv_xt_ice_compat+set}" = set; then
15043 echo $ECHO_N "(cached) $ECHO_C" >&6
15046 cat >"conftest.$ac_ext" <<_ACEOF
15047 #line 15047 "configure"
15048 #include "confdefs.h"
15050 #include <X11/Shell.h>
15055 int num = IceConnectionNumber(0); (void) num
15061 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15062 if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063 (eval $ac_link) 2>&5
15065 echo "$as_me:15065: \$? = $ac_status" >&5
15066 (exit "$ac_status"); } &&
15067 { ac_try='test -s "conftest$ac_exeext"'
15068 { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069 (eval $ac_try) 2>&5
15071 echo "$as_me:15071: \$? = $ac_status" >&5
15072 (exit "$ac_status"); }; }; then
15073 cf_cv_xt_ice_compat=yes
15075 echo "$as_me: failed program was:" >&5
15076 cat "conftest.$ac_ext" >&5
15077 cf_cv_xt_ice_compat=no
15079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15081 echo "$as_me:15081: result: $cf_cv_xt_ice_compat" >&5
15082 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15084 if test "$cf_cv_xt_ice_compat" = no
15086 # workaround for broken ".pc" files used for X Toolkit.
15087 case "x$X_PRE_LIBS" in
15093 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15095 echo "${as_me:-configure}:15095: testing work around broken ICE dependency ..." 1>&5
15097 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15098 test -n "$verbose" && echo " found package ice" 1>&6
15100 echo "${as_me:-configure}:15100: testing found package ice ..." 1>&5
15102 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15103 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15104 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15106 echo "${as_me:-configure}:15106: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15108 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15110 echo "${as_me:-configure}:15110: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15115 cf_new_extra_cppflags=
15117 for cf_add_cflags in $cf_pkgconfig_incs
15119 case "$cf_fix_cppflags" in
15121 case "$cf_add_cflags" in
15122 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15123 case "$cf_add_cflags" in
15125 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15128 && test -z "${cf_tst_cflags}" \
15129 && cf_fix_cppflags=yes
15131 if test "$cf_fix_cppflags" = yes ; then
15133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15137 elif test "${cf_tst_cflags}" = "\"'" ; then
15139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15146 case "$CPPFLAGS" in
15150 case "$cf_add_cflags" in
15152 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15154 CPPFLAGS=`echo "$CPPFLAGS" | \
15155 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15156 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15161 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15162 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15169 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15170 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15180 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15183 && test -z "${cf_tst_cflags}" \
15184 && cf_fix_cppflags=no
15189 if test -n "$cf_new_cflags" ; then
15191 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15192 CFLAGS="${CFLAGS}$cf_new_cflags"
15196 if test -n "$cf_new_cppflags" ; then
15198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15199 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15203 if test -n "$cf_new_extra_cppflags" ; then
15205 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15206 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15210 cf_add_libs="$LIBS"
15213 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15214 # filter duplicates
15215 for cf_add_1lib in $cf_add_0lib; do
15216 for cf_add_2lib in $cf_add_libs; do
15217 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15224 LIBS="$cf_add_libs"
15226 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15227 test -n "$verbose" && echo " found package sm" 1>&6
15229 echo "${as_me:-configure}:15229: testing found package sm ..." 1>&5
15231 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15232 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15233 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15235 echo "${as_me:-configure}:15235: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15237 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15239 echo "${as_me:-configure}:15239: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15244 cf_new_extra_cppflags=
15246 for cf_add_cflags in $cf_pkgconfig_incs
15248 case "$cf_fix_cppflags" in
15250 case "$cf_add_cflags" in
15251 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15252 case "$cf_add_cflags" in
15254 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15257 && test -z "${cf_tst_cflags}" \
15258 && cf_fix_cppflags=yes
15260 if test "$cf_fix_cppflags" = yes ; then
15262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15266 elif test "${cf_tst_cflags}" = "\"'" ; then
15268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15275 case "$CPPFLAGS" in
15279 case "$cf_add_cflags" in
15281 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15283 CPPFLAGS=`echo "$CPPFLAGS" | \
15284 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15285 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15290 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15291 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15298 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15299 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15309 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15311 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15312 && test -z "${cf_tst_cflags}" \
15313 && cf_fix_cppflags=no
15318 if test -n "$cf_new_cflags" ; then
15320 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15321 CFLAGS="${CFLAGS}$cf_new_cflags"
15325 if test -n "$cf_new_cppflags" ; then
15327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15328 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15332 if test -n "$cf_new_extra_cppflags" ; then
15334 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15335 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15339 cf_add_libs="$LIBS"
15342 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15343 # filter duplicates
15344 for cf_add_1lib in $cf_add_0lib; do
15345 for cf_add_2lib in $cf_add_libs; do
15346 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15351 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15353 LIBS="$cf_add_libs"
15366 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15368 echo "${as_me:-configure}:15368: testing ...before $LIBS ..." 1>&5
15370 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15371 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15373 echo "${as_me:-configure}:15373: testing ...after $LIBS ..." 1>&5
15389 LDFLAGS="$X_LIBS $LDFLAGS"
15391 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15393 echo "${as_me:-configure}:15393: testing checking additions to CFLAGS ..." 1>&5
15395 cf_check_cflags="$CFLAGS"
15396 cf_check_cppflags="$CPPFLAGS"
15401 cf_new_extra_cppflags=
15403 for cf_add_cflags in $X_CFLAGS
15405 case "$cf_fix_cppflags" in
15407 case "$cf_add_cflags" in
15408 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15409 case "$cf_add_cflags" in
15411 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15413 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15414 && test -z "${cf_tst_cflags}" \
15415 && cf_fix_cppflags=yes
15417 if test "$cf_fix_cppflags" = yes ; then
15419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15423 elif test "${cf_tst_cflags}" = "\"'" ; then
15425 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15426 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15432 case "$CPPFLAGS" in
15436 case "$cf_add_cflags" in
15438 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15440 CPPFLAGS=`echo "$CPPFLAGS" | \
15441 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15442 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15447 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15448 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15455 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15456 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15466 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15469 && test -z "${cf_tst_cflags}" \
15470 && cf_fix_cppflags=no
15475 if test -n "$cf_new_cflags" ; then
15476 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15478 echo "${as_me:-configure}:15478: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15480 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15481 CFLAGS="${CFLAGS}$cf_new_cflags"
15485 if test -n "$cf_new_cppflags" ; then
15486 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15488 echo "${as_me:-configure}:15488: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15490 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15491 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15495 if test -n "$cf_new_extra_cppflags" ; then
15496 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15498 echo "${as_me:-configure}:15498: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15500 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15501 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15505 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15506 cat >"conftest.$ac_ext" <<_ACEOF
15507 #line 15507 "configure"
15508 #include "confdefs.h"
15513 printf("Hello world");
15518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15519 if { (eval echo "$as_me:15519: \"$ac_link\"") >&5
15520 (eval $ac_link) 2>&5
15522 echo "$as_me:15522: \$? = $ac_status" >&5
15523 (exit "$ac_status"); } &&
15524 { ac_try='test -s "conftest$ac_exeext"'
15525 { (eval echo "$as_me:15525: \"$ac_try\"") >&5
15526 (eval $ac_try) 2>&5
15528 echo "$as_me:15528: \$? = $ac_status" >&5
15529 (exit "$ac_status"); }; }; then
15532 echo "$as_me: failed program was:" >&5
15533 cat "conftest.$ac_ext" >&5
15534 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15536 echo "${as_me:-configure}:15536: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15538 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15539 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15541 echo "${as_me:-configure}:15541: testing but keeping change to \$CPPFLAGS ..." 1>&5
15544 CFLAGS="$cf_check_cflags"
15546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15549 echo "$as_me:15549: checking for XOpenDisplay" >&5
15550 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15551 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15552 echo $ECHO_N "(cached) $ECHO_C" >&6
15554 cat >"conftest.$ac_ext" <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557 #define XOpenDisplay autoconf_temporary
15558 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15559 #undef XOpenDisplay
15565 /* We use char because int might match the return type of a gcc2
15566 builtin and then its argument prototype would still apply. */
15567 char XOpenDisplay (void);
15573 /* The GNU C library defines stubs for functions which it implements
15574 to always fail with ENOSYS. Some functions are actually named
15575 something starting with __ and the normal name is an alias. */
15576 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15577 #error found stub for XOpenDisplay
15580 return XOpenDisplay ();
15585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15586 if { (eval echo "$as_me:15586: \"$ac_link\"") >&5
15587 (eval $ac_link) 2>&5
15589 echo "$as_me:15589: \$? = $ac_status" >&5
15590 (exit "$ac_status"); } &&
15591 { ac_try='test -s "conftest$ac_exeext"'
15592 { (eval echo "$as_me:15592: \"$ac_try\"") >&5
15593 (eval $ac_try) 2>&5
15595 echo "$as_me:15595: \$? = $ac_status" >&5
15596 (exit "$ac_status"); }; }; then
15597 ac_cv_func_XOpenDisplay=yes
15599 echo "$as_me: failed program was:" >&5
15600 cat "conftest.$ac_ext" >&5
15601 ac_cv_func_XOpenDisplay=no
15603 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15605 echo "$as_me:15605: result: $ac_cv_func_XOpenDisplay" >&5
15606 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15607 if test "$ac_cv_func_XOpenDisplay" = yes; then
15611 echo "$as_me:15611: checking for XOpenDisplay in -lX11" >&5
15612 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15613 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15614 echo $ECHO_N "(cached) $ECHO_C" >&6
15616 ac_check_lib_save_LIBS=$LIBS
15618 cat >"conftest.$ac_ext" <<_ACEOF
15619 #line 15619 "configure"
15620 #include "confdefs.h"
15622 /* Override any gcc2 internal prototype to avoid an error. */
15626 /* We use char because int might match the return type of a gcc2
15627 builtin and then its argument prototype would still apply. */
15628 char XOpenDisplay ();
15637 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15638 if { (eval echo "$as_me:15638: \"$ac_link\"") >&5
15639 (eval $ac_link) 2>&5
15641 echo "$as_me:15641: \$? = $ac_status" >&5
15642 (exit "$ac_status"); } &&
15643 { ac_try='test -s "conftest$ac_exeext"'
15644 { (eval echo "$as_me:15644: \"$ac_try\"") >&5
15645 (eval $ac_try) 2>&5
15647 echo "$as_me:15647: \$? = $ac_status" >&5
15648 (exit "$ac_status"); }; }; then
15649 ac_cv_lib_X11_XOpenDisplay=yes
15651 echo "$as_me: failed program was:" >&5
15652 cat "conftest.$ac_ext" >&5
15653 ac_cv_lib_X11_XOpenDisplay=no
15655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15656 LIBS=$ac_check_lib_save_LIBS
15658 echo "$as_me:15658: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15659 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15660 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15662 cf_add_libs="$LIBS"
15665 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15666 # filter duplicates
15667 for cf_add_1lib in $cf_add_0lib; do
15668 for cf_add_2lib in $cf_add_libs; do
15669 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15674 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15676 LIBS="$cf_add_libs"
15682 echo "$as_me:15682: checking for XtAppInitialize" >&5
15683 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15684 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15685 echo $ECHO_N "(cached) $ECHO_C" >&6
15687 cat >"conftest.$ac_ext" <<_ACEOF
15688 #line 15688 "configure"
15689 #include "confdefs.h"
15690 #define XtAppInitialize autoconf_temporary
15691 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15692 #undef XtAppInitialize
15698 /* We use char because int might match the return type of a gcc2
15699 builtin and then its argument prototype would still apply. */
15700 char XtAppInitialize (void);
15706 /* The GNU C library defines stubs for functions which it implements
15707 to always fail with ENOSYS. Some functions are actually named
15708 something starting with __ and the normal name is an alias. */
15709 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15710 #error found stub for XtAppInitialize
15713 return XtAppInitialize ();
15718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15719 if { (eval echo "$as_me:15719: \"$ac_link\"") >&5
15720 (eval $ac_link) 2>&5
15722 echo "$as_me:15722: \$? = $ac_status" >&5
15723 (exit "$ac_status"); } &&
15724 { ac_try='test -s "conftest$ac_exeext"'
15725 { (eval echo "$as_me:15725: \"$ac_try\"") >&5
15726 (eval $ac_try) 2>&5
15728 echo "$as_me:15728: \$? = $ac_status" >&5
15729 (exit "$ac_status"); }; }; then
15730 ac_cv_func_XtAppInitialize=yes
15732 echo "$as_me: failed program was:" >&5
15733 cat "conftest.$ac_ext" >&5
15734 ac_cv_func_XtAppInitialize=no
15736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15738 echo "$as_me:15738: result: $ac_cv_func_XtAppInitialize" >&5
15739 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15740 if test "$ac_cv_func_XtAppInitialize" = yes; then
15744 echo "$as_me:15744: checking for XtAppInitialize in -lXt" >&5
15745 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15746 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15747 echo $ECHO_N "(cached) $ECHO_C" >&6
15749 ac_check_lib_save_LIBS=$LIBS
15751 cat >"conftest.$ac_ext" <<_ACEOF
15752 #line 15752 "configure"
15753 #include "confdefs.h"
15755 /* Override any gcc2 internal prototype to avoid an error. */
15759 /* We use char because int might match the return type of a gcc2
15760 builtin and then its argument prototype would still apply. */
15761 char XtAppInitialize ();
15765 XtAppInitialize ();
15770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15771 if { (eval echo "$as_me:15771: \"$ac_link\"") >&5
15772 (eval $ac_link) 2>&5
15774 echo "$as_me:15774: \$? = $ac_status" >&5
15775 (exit "$ac_status"); } &&
15776 { ac_try='test -s "conftest$ac_exeext"'
15777 { (eval echo "$as_me:15777: \"$ac_try\"") >&5
15778 (eval $ac_try) 2>&5
15780 echo "$as_me:15780: \$? = $ac_status" >&5
15781 (exit "$ac_status"); }; }; then
15782 ac_cv_lib_Xt_XtAppInitialize=yes
15784 echo "$as_me: failed program was:" >&5
15785 cat "conftest.$ac_ext" >&5
15786 ac_cv_lib_Xt_XtAppInitialize=no
15788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15789 LIBS=$ac_check_lib_save_LIBS
15791 echo "$as_me:15791: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15792 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15793 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15795 cat >>confdefs.h <<\EOF
15796 #define HAVE_LIBXT 1
15807 if test "$cf_have_X_LIBS" = no ; then
15808 { echo "$as_me:15808: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15809 test program. You will have to check and add the proper libraries by hand
15811 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15812 test program. You will have to check and add the proper libraries by hand
15813 to makefile." >&2;}
15816 cf_x_athena_root=$cf_x_athena
15819 for cf_path in default \
15820 /usr/contrib/X11R6 \
15821 /usr/contrib/X11R5 \
15825 if test -z "$cf_x_athena_inc" ; then
15827 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15828 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15829 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15830 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15831 for cf_X_CFLAGS in $X_CFLAGS
15833 case "x$cf_X_CFLAGS" in
15835 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15838 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15843 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15844 if test "$cf_path" != default ; then
15846 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15847 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15849 echo "$as_me:15849: checking for $cf_test in $cf_path" >&5
15850 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15852 echo "$as_me:15852: checking for $cf_test" >&5
15853 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15855 cat >"conftest.$ac_ext" <<_ACEOF
15856 #line 15856 "configure"
15857 #include "confdefs.h"
15859 #include <X11/Intrinsic.h>
15860 #include <$cf_test>
15869 rm -f "conftest.$ac_objext"
15870 if { (eval echo "$as_me:15870: \"$ac_compile\"") >&5
15871 (eval $ac_compile) 2>&5
15873 echo "$as_me:15873: \$? = $ac_status" >&5
15874 (exit "$ac_status"); } &&
15875 { ac_try='test -s "conftest.$ac_objext"'
15876 { (eval echo "$as_me:15876: \"$ac_try\"") >&5
15877 (eval $ac_try) 2>&5
15879 echo "$as_me:15879: \$? = $ac_status" >&5
15880 (exit "$ac_status"); }; }; then
15883 echo "$as_me: failed program was:" >&5
15884 cat "conftest.$ac_ext" >&5
15887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15888 echo "$as_me:15888: result: $cf_result" >&5
15889 echo "${ECHO_T}$cf_result" >&6
15891 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15892 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15893 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15895 if test "$cf_result" = yes ; then
15896 test "$cf_path" = default && cf_x_athena_inc=default
15897 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15903 if test -z "$cf_x_athena_inc" ; then
15904 { echo "$as_me:15904: WARNING: Unable to find Athena header files" >&5
15905 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15906 elif test "$cf_x_athena_inc" != default ; then
15908 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15909 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15913 cf_x_athena_root=$cf_x_athena
15916 for cf_path in default \
15917 /usr/contrib/X11R6 \
15918 /usr/contrib/X11R5 \
15923 ${cf_x_athena_root} \
15924 ${cf_x_athena_root}7 \
15925 ${cf_x_athena_root}6
15928 "-l$cf_lib -lXmu" \
15929 "-l$cf_lib -lXpm -lXmu" \
15930 "-l${cf_lib}_s -lXmu_s"
15932 test -n "$cf_x_athena_lib" && break
15934 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15935 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15936 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15937 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15938 for cf_X_CFLAGS in $X_CFLAGS
15940 case "x$cf_X_CFLAGS" in
15942 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15945 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15950 cf_test=XawSimpleMenuAddGlobalActions
15951 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15953 cf_add_libs="$LIBS"
15956 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15957 # filter duplicates
15958 for cf_add_1lib in $cf_add_0lib; do
15959 for cf_add_2lib in $cf_add_libs; do
15960 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15965 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15967 LIBS="$cf_add_libs"
15969 echo "$as_me:15969: checking for $cf_test in $cf_libs" >&5
15970 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15971 cat >"conftest.$ac_ext" <<_ACEOF
15972 #line 15972 "configure"
15973 #include "confdefs.h"
15975 #include <X11/Intrinsic.h>
15976 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15982 $cf_test((XtAppContext) 0)
15987 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15988 if { (eval echo "$as_me:15988: \"$ac_link\"") >&5
15989 (eval $ac_link) 2>&5
15991 echo "$as_me:15991: \$? = $ac_status" >&5
15992 (exit "$ac_status"); } &&
15993 { ac_try='test -s "conftest$ac_exeext"'
15994 { (eval echo "$as_me:15994: \"$ac_try\"") >&5
15995 (eval $ac_try) 2>&5
15997 echo "$as_me:15997: \$? = $ac_status" >&5
15998 (exit "$ac_status"); }; }; then
16001 echo "$as_me: failed program was:" >&5
16002 cat "conftest.$ac_ext" >&5
16005 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16006 echo "$as_me:16006: result: $cf_result" >&5
16007 echo "${ECHO_T}$cf_result" >&6
16009 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16010 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16011 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16013 if test "$cf_result" = yes ; then
16014 cf_x_athena_lib="$cf_libs"
16018 test -n "$cf_x_athena_lib" && break
16022 if test -z "$cf_x_athena_lib" ; then
16023 { { echo "$as_me:16023: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16024 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16025 { (exit 1); exit 1; }; }
16028 cf_add_libs="$LIBS"
16031 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16032 # filter duplicates
16033 for cf_add_1lib in $cf_add_0lib; do
16034 for cf_add_2lib in $cf_add_libs; do
16035 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16040 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16042 LIBS="$cf_add_libs"
16044 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16046 cat >>confdefs.h <<EOF
16047 #define $cf_x_athena_LIBS 1
16052 if test -n "$ac_tool_prefix"; then
16053 for ac_prog in xcurses-config
16055 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16056 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16057 echo "$as_me:16057: checking for $ac_word" >&5
16058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16059 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16060 echo $ECHO_N "(cached) $ECHO_C" >&6
16062 if test -n "$XCURSES_CONFIG"; then
16063 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16065 ac_save_IFS=$IFS; IFS=$ac_path_separator
16067 for ac_dir in $ac_dummy; do
16069 test -z "$ac_dir" && ac_dir=.
16070 $as_executable_p "$ac_dir/$ac_word" || continue
16071 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16072 echo "$as_me:16072: found $ac_dir/$ac_word" >&5
16078 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16079 if test -n "$XCURSES_CONFIG"; then
16080 echo "$as_me:16080: result: $XCURSES_CONFIG" >&5
16081 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16083 echo "$as_me:16083: result: no" >&5
16084 echo "${ECHO_T}no" >&6
16087 test -n "$XCURSES_CONFIG" && break
16090 if test -z "$XCURSES_CONFIG"; then
16091 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16092 for ac_prog in xcurses-config
16094 # Extract the first word of "$ac_prog", so it can be a program name with args.
16095 set dummy $ac_prog; ac_word=$2
16096 echo "$as_me:16096: checking for $ac_word" >&5
16097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16098 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
16101 if test -n "$ac_ct_XCURSES_CONFIG"; then
16102 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16104 ac_save_IFS=$IFS; IFS=$ac_path_separator
16106 for ac_dir in $ac_dummy; do
16108 test -z "$ac_dir" && ac_dir=.
16109 $as_executable_p "$ac_dir/$ac_word" || continue
16110 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16111 echo "$as_me:16111: found $ac_dir/$ac_word" >&5
16117 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16118 if test -n "$ac_ct_XCURSES_CONFIG"; then
16119 echo "$as_me:16119: result: $ac_ct_XCURSES_CONFIG" >&5
16120 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16122 echo "$as_me:16122: result: no" >&5
16123 echo "${ECHO_T}no" >&6
16126 test -n "$ac_ct_XCURSES_CONFIG" && break
16128 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16130 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16133 if test "$XCURSES_CONFIG" != none ; then
16138 cf_new_extra_cppflags=
16140 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16142 case "$cf_fix_cppflags" in
16144 case "$cf_add_cflags" in
16145 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16146 case "$cf_add_cflags" in
16148 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16151 && test -z "${cf_tst_cflags}" \
16152 && cf_fix_cppflags=yes
16154 if test "$cf_fix_cppflags" = yes ; then
16156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16160 elif test "${cf_tst_cflags}" = "\"'" ; then
16162 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16163 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16169 case "$CPPFLAGS" in
16173 case "$cf_add_cflags" in
16175 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16177 CPPFLAGS=`echo "$CPPFLAGS" | \
16178 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16179 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16184 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16185 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16192 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16193 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16203 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16206 && test -z "${cf_tst_cflags}" \
16207 && cf_fix_cppflags=no
16212 if test -n "$cf_new_cflags" ; then
16214 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16215 CFLAGS="${CFLAGS}$cf_new_cflags"
16219 if test -n "$cf_new_cppflags" ; then
16221 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16222 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16226 if test -n "$cf_new_extra_cppflags" ; then
16228 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16229 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16233 cf_add_libs="$LIBS"
16236 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16237 # filter duplicates
16238 for cf_add_1lib in $cf_add_0lib; do
16239 for cf_add_2lib in $cf_add_libs; do
16240 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16245 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16247 LIBS="$cf_add_libs"
16249 cf_cv_lib_XCurses=yes
16253 LDFLAGS="$LDFLAGS $X_LIBS"
16255 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16257 echo "${as_me:-configure}:16257: testing checking additions to CFLAGS ..." 1>&5
16259 cf_check_cflags="$CFLAGS"
16260 cf_check_cppflags="$CPPFLAGS"
16265 cf_new_extra_cppflags=
16267 for cf_add_cflags in $X_CFLAGS
16269 case "$cf_fix_cppflags" in
16271 case "$cf_add_cflags" in
16272 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16273 case "$cf_add_cflags" in
16275 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16278 && test -z "${cf_tst_cflags}" \
16279 && cf_fix_cppflags=yes
16281 if test "$cf_fix_cppflags" = yes ; then
16283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16287 elif test "${cf_tst_cflags}" = "\"'" ; then
16289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16296 case "$CPPFLAGS" in
16300 case "$cf_add_cflags" in
16302 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16304 CPPFLAGS=`echo "$CPPFLAGS" | \
16305 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16306 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16311 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16312 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16319 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16320 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16327 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16328 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16330 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16332 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16333 && test -z "${cf_tst_cflags}" \
16334 && cf_fix_cppflags=no
16339 if test -n "$cf_new_cflags" ; then
16340 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16342 echo "${as_me:-configure}:16342: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16344 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16345 CFLAGS="${CFLAGS}$cf_new_cflags"
16349 if test -n "$cf_new_cppflags" ; then
16350 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16352 echo "${as_me:-configure}:16352: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16359 if test -n "$cf_new_extra_cppflags" ; then
16360 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16362 echo "${as_me:-configure}:16362: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16364 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16365 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16369 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16370 cat >"conftest.$ac_ext" <<_ACEOF
16371 #line 16371 "configure"
16372 #include "confdefs.h"
16377 printf("Hello world");
16382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16383 if { (eval echo "$as_me:16383: \"$ac_link\"") >&5
16384 (eval $ac_link) 2>&5
16386 echo "$as_me:16386: \$? = $ac_status" >&5
16387 (exit "$ac_status"); } &&
16388 { ac_try='test -s "conftest$ac_exeext"'
16389 { (eval echo "$as_me:16389: \"$ac_try\"") >&5
16390 (eval $ac_try) 2>&5
16392 echo "$as_me:16392: \$? = $ac_status" >&5
16393 (exit "$ac_status"); }; }; then
16396 echo "$as_me: failed program was:" >&5
16397 cat "conftest.$ac_ext" >&5
16398 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16400 echo "${as_me:-configure}:16400: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16402 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16403 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16405 echo "${as_me:-configure}:16405: testing but keeping change to \$CPPFLAGS ..." 1>&5
16408 CFLAGS="$cf_check_cflags"
16410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16413 echo "$as_me:16413: checking for XOpenDisplay in -lX11" >&5
16414 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16415 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16416 echo $ECHO_N "(cached) $ECHO_C" >&6
16418 ac_check_lib_save_LIBS=$LIBS
16419 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16420 cat >"conftest.$ac_ext" <<_ACEOF
16421 #line 16421 "configure"
16422 #include "confdefs.h"
16424 /* Override any gcc2 internal prototype to avoid an error. */
16428 /* We use char because int might match the return type of a gcc2
16429 builtin and then its argument prototype would still apply. */
16430 char XOpenDisplay ();
16439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16440 if { (eval echo "$as_me:16440: \"$ac_link\"") >&5
16441 (eval $ac_link) 2>&5
16443 echo "$as_me:16443: \$? = $ac_status" >&5
16444 (exit "$ac_status"); } &&
16445 { ac_try='test -s "conftest$ac_exeext"'
16446 { (eval echo "$as_me:16446: \"$ac_try\"") >&5
16447 (eval $ac_try) 2>&5
16449 echo "$as_me:16449: \$? = $ac_status" >&5
16450 (exit "$ac_status"); }; }; then
16451 ac_cv_lib_X11_XOpenDisplay=yes
16453 echo "$as_me: failed program was:" >&5
16454 cat "conftest.$ac_ext" >&5
16455 ac_cv_lib_X11_XOpenDisplay=no
16457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16458 LIBS=$ac_check_lib_save_LIBS
16460 echo "$as_me:16460: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16461 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16462 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16464 cf_add_libs="$LIBS"
16467 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16468 # filter duplicates
16469 for cf_add_1lib in $cf_add_0lib; do
16470 for cf_add_2lib in $cf_add_libs; do
16471 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16476 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16478 LIBS="$cf_add_libs"
16482 echo "$as_me:16482: checking for XCurses library" >&5
16483 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16484 if test "${cf_cv_lib_XCurses+set}" = set; then
16485 echo $ECHO_N "(cached) $ECHO_C" >&6
16488 cf_add_libs="$LIBS"
16491 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16492 # filter duplicates
16493 for cf_add_1lib in $cf_add_0lib; do
16494 for cf_add_2lib in $cf_add_libs; do
16495 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16500 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16502 LIBS="$cf_add_libs"
16504 cat >"conftest.$ac_ext" <<_ACEOF
16505 #line 16505 "configure"
16506 #include "confdefs.h"
16508 #include <xcurses.h>
16509 char *XCursesProgramName = "test";
16519 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16520 if { (eval echo "$as_me:16520: \"$ac_link\"") >&5
16521 (eval $ac_link) 2>&5
16523 echo "$as_me:16523: \$? = $ac_status" >&5
16524 (exit "$ac_status"); } &&
16525 { ac_try='test -s "conftest$ac_exeext"'
16526 { (eval echo "$as_me:16526: \"$ac_try\"") >&5
16527 (eval $ac_try) 2>&5
16529 echo "$as_me:16529: \$? = $ac_status" >&5
16530 (exit "$ac_status"); }; }; then
16531 cf_cv_lib_XCurses=yes
16533 echo "$as_me: failed program was:" >&5
16534 cat "conftest.$ac_ext" >&5
16535 cf_cv_lib_XCurses=no
16537 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16540 echo "$as_me:16540: result: $cf_cv_lib_XCurses" >&5
16541 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16545 if test "$cf_cv_lib_XCurses" = yes ; then
16547 cat >>confdefs.h <<\EOF
16551 cat >>confdefs.h <<\EOF
16555 echo "$as_me:16555: checking for xcurses.h" >&5
16556 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16557 if test "${ac_cv_header_xcurses_h+set}" = set; then
16558 echo $ECHO_N "(cached) $ECHO_C" >&6
16560 cat >"conftest.$ac_ext" <<_ACEOF
16561 #line 16561 "configure"
16562 #include "confdefs.h"
16563 #include <xcurses.h>
16565 if { (eval echo "$as_me:16565: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16566 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16568 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16570 cat conftest.err >&5
16571 echo "$as_me:16571: \$? = $ac_status" >&5
16572 (exit "$ac_status"); } >/dev/null; then
16573 if test -s conftest.err; then
16574 ac_cpp_err=$ac_c_preproc_warn_flag
16581 if test -z "$ac_cpp_err"; then
16582 ac_cv_header_xcurses_h=yes
16584 echo "$as_me: failed program was:" >&5
16585 cat "conftest.$ac_ext" >&5
16586 ac_cv_header_xcurses_h=no
16588 rm -f conftest.err "conftest.$ac_ext"
16590 echo "$as_me:16590: result: $ac_cv_header_xcurses_h" >&5
16591 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16592 if test "$ac_cv_header_xcurses_h" = yes; then
16594 cat >>confdefs.h <<\EOF
16595 #define HAVE_XCURSES 1
16601 { { echo "$as_me:16601: error: Cannot link with XCurses" >&5
16602 echo "$as_me: error: Cannot link with XCurses" >&2;}
16603 { (exit 1); exit 1; }; }
16608 { { echo "$as_me:16608: error: unexpected screen-value: $cf_cv_screen" >&5
16609 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16610 { (exit 1); exit 1; }; }
16614 : ${cf_nculib_root:=$cf_cv_screen}
16615 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16616 echo "$as_me:16616: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16617 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16618 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16619 echo $ECHO_N "(cached) $ECHO_C" >&6
16621 ac_check_lib_save_LIBS=$LIBS
16622 LIBS="-l$cf_nculib_root $LIBS"
16623 cat >"conftest.$ac_ext" <<_ACEOF
16624 #line 16624 "configure"
16625 #include "confdefs.h"
16627 /* Override any gcc2 internal prototype to avoid an error. */
16631 /* We use char because int might match the return type of a gcc2
16632 builtin and then its argument prototype would still apply. */
16633 char _nc_init_pthreads ();
16637 _nc_init_pthreads ();
16642 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16643 if { (eval echo "$as_me:16643: \"$ac_link\"") >&5
16644 (eval $ac_link) 2>&5
16646 echo "$as_me:16646: \$? = $ac_status" >&5
16647 (exit "$ac_status"); } &&
16648 { ac_try='test -s "conftest$ac_exeext"'
16649 { (eval echo "$as_me:16649: \"$ac_try\"") >&5
16650 (eval $ac_try) 2>&5
16652 echo "$as_me:16652: \$? = $ac_status" >&5
16653 (exit "$ac_status"); }; }; then
16654 eval "$as_ac_Lib=yes"
16656 echo "$as_me: failed program was:" >&5
16657 cat "conftest.$ac_ext" >&5
16658 eval "$as_ac_Lib=no"
16660 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16661 LIBS=$ac_check_lib_save_LIBS
16663 echo "$as_me:16663: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16664 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16665 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16666 cf_cv_ncurses_pthreads=yes
16668 cf_cv_ncurses_pthreads=no
16671 if test "$cf_cv_ncurses_pthreads" = yes
16674 cf_add_libs="$LIBS"
16677 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16678 # filter duplicates
16679 for cf_add_1lib in $cf_add_0lib; do
16680 for cf_add_2lib in $cf_add_libs; do
16681 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16686 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16688 LIBS="$cf_add_libs"
16692 case $cf_cv_screen in
16694 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16698 echo "$as_me:16698: checking for X11 rgb file" >&5
16699 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16701 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16702 if test "${with_x11_rgb+set}" = set; then
16703 withval="$with_x11_rgb"
16709 if test "x$RGB_PATH" = xauto
16711 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16713 /opt/local/share/X11/rgb.txt \
16714 /opt/X11/share/X11/rgb.txt \
16715 /usr/share/X11/rgb.txt \
16716 /usr/X11/share/X11/rgb.txt \
16717 /usr/X11/lib/X11/rgb.txt \
16718 /usr/lib/X11/rgb.txt \
16720 /usr/pkg/lib/X11/rgb.txt \
16721 /usr/X11R7/lib/X11/rgb.txt \
16722 /usr/X11R6/lib/X11/rgb.txt \
16723 /usr/X11R5/lib/X11/rgb.txt \
16724 /usr/X11R4/lib/X11/rgb.txt \
16725 /usr/local/lib/X11/rgb.txt \
16726 /usr/local/share/X11/rgb.txt \
16727 /usr/lib64/X11/rgb.txt
16729 if test -f "$cf_path" ; then
16730 RGB_PATH="$cf_path"
16737 if test "x$prefix" != xNONE; then
16738 cf_path_syntax="$prefix"
16740 cf_path_syntax="$ac_default_prefix"
16743 case ".$cf_path" in
16744 (.\$\(*\)*|.\'*\'*)
16748 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16750 (.\$\{*prefix\}*|.\$\{*dir\}*)
16751 eval cf_path="$cf_path"
16752 case ".$cf_path" in
16754 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16759 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16762 { { echo "$as_me:16762: error: expected a pathname, not \"$cf_path\"" >&5
16763 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16764 { (exit 1); exit 1; }; }
16770 echo "$as_me:16770: result: $RGB_PATH" >&5
16771 echo "${ECHO_T}$RGB_PATH" >&6
16773 cat >>confdefs.h <<EOF
16774 #define RGB_PATH "$cf_path"
16778 if test "$RGB_PATH" = no
16785 case $cf_cv_screen in
16787 cf_default_panel=no
16790 cf_default_tinfo=no
16792 (xcurses|bsdcurses)
16793 cf_default_panel=no
16796 cf_default_tinfo=yes
16799 cf_default_panel=yes
16800 cf_default_form=yes
16801 cf_default_menu=yes
16802 cf_default_tinfo=yes
16803 case $cf_cv_screen in
16805 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16811 echo "$as_me:16811: checking for desired basename for form library" >&5
16812 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16814 # Check whether --with-form-libname or --without-form-libname was given.
16815 if test "${with_form_libname+set}" = set; then
16816 withval="$with_form_libname"
16817 with_lib_basename=$withval
16819 with_lib_basename=form
16821 FORM_NAME="$with_lib_basename"
16823 case "x$FORM_NAME" in
16831 echo "$as_me:16831: result: $FORM_NAME" >&5
16832 echo "${ECHO_T}$FORM_NAME" >&6
16834 echo "$as_me:16834: checking for desired basename for menu library" >&5
16835 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16837 # Check whether --with-menu-libname or --without-menu-libname was given.
16838 if test "${with_menu_libname+set}" = set; then
16839 withval="$with_menu_libname"
16840 with_lib_basename=$withval
16842 with_lib_basename=menu
16844 MENU_NAME="$with_lib_basename"
16846 case "x$MENU_NAME" in
16854 echo "$as_me:16854: result: $MENU_NAME" >&5
16855 echo "${ECHO_T}$MENU_NAME" >&6
16857 echo "$as_me:16857: checking for desired basename for panel library" >&5
16858 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16860 # Check whether --with-panel-libname or --without-panel-libname was given.
16861 if test "${with_panel_libname+set}" = set; then
16862 withval="$with_panel_libname"
16863 with_lib_basename=$withval
16865 with_lib_basename=panel
16867 PANEL_NAME="$with_lib_basename"
16869 case "x$PANEL_NAME" in
16877 echo "$as_me:16877: result: $PANEL_NAME" >&5
16878 echo "${ECHO_T}$PANEL_NAME" >&6
16880 echo "$as_me:16880: checking if you want to check for panel functions" >&5
16881 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16883 # Check whether --enable-panel or --disable-panel was given.
16884 if test "${enable_panel+set}" = set; then
16885 enableval="$enable_panel"
16886 test "$enableval" != no && enableval=yes
16887 if test "$enableval" != "yes" ; then
16890 cf_enable_panel=$cf_default_panel
16894 cf_enable_panel=$cf_default_panel
16897 echo "$as_me:16897: result: $cf_enable_panel" >&5
16898 echo "${ECHO_T}$cf_enable_panel" >&6
16899 if test $cf_enable_panel = yes
16902 cf_have_curses_lib=no
16904 : ${NCURSES_CONFIG_PKG:=none}
16905 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16907 elif test "x${PKG_CONFIG:=none}" != xnone; then
16908 echo "$as_me:16908: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16909 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16910 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16911 echo "$as_me:16911: result: yes" >&5
16912 echo "${ECHO_T}yes" >&6
16914 echo "$as_me:16914: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16915 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16917 cf_save_CFLAGS="$CFLAGS"
16918 cf_save_CPPFLAGS="$CPPFLAGS"
16919 cf_save_LIBS="$LIBS"
16921 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16923 case "x$cf_add_cflags" in
16926 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16929 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'`
16930 test "$CFLAGS" != "$cf_old_cflag" || break
16932 CFLAGS="$cf_old_cflag"
16935 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16938 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'`
16939 test "$CPPFLAGS" != "$cf_old_cflag" || break
16941 CPPFLAGS="$cf_old_cflag"
16950 cf_new_extra_cppflags=
16952 for cf_add_cflags in $cf_add_cflags
16954 case "$cf_fix_cppflags" in
16956 case "$cf_add_cflags" in
16957 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16958 case "$cf_add_cflags" in
16960 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16962 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16963 && test -z "${cf_tst_cflags}" \
16964 && cf_fix_cppflags=yes
16966 if test "$cf_fix_cppflags" = yes ; then
16968 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16969 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16972 elif test "${cf_tst_cflags}" = "\"'" ; then
16974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16981 case "$CPPFLAGS" in
16985 case "$cf_add_cflags" in
16987 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16989 CPPFLAGS=`echo "$CPPFLAGS" | \
16990 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16991 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16996 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16997 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17004 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17005 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17012 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17013 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17015 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17017 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17018 && test -z "${cf_tst_cflags}" \
17019 && cf_fix_cppflags=no
17024 if test -n "$cf_new_cflags" ; then
17026 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17027 CFLAGS="${CFLAGS}$cf_new_cflags"
17031 if test -n "$cf_new_cppflags" ; then
17033 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17034 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17038 if test -n "$cf_new_extra_cppflags" ; then
17040 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17041 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17047 cf_add_libs="$LIBS"
17050 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17051 # filter duplicates
17052 for cf_add_1lib in $cf_add_0lib; do
17053 for cf_add_2lib in $cf_add_libs; do
17054 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17059 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17061 LIBS="$cf_add_libs"
17063 cat >"conftest.$ac_ext" <<_ACEOF
17064 #line 17064 "configure"
17065 #include "confdefs.h"
17066 #include <$PANEL_NAME.h>
17070 (void) new_panel ( 0 );
17075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17076 if { (eval echo "$as_me:17076: \"$ac_link\"") >&5
17077 (eval $ac_link) 2>&5
17079 echo "$as_me:17079: \$? = $ac_status" >&5
17080 (exit "$ac_status"); } &&
17081 { ac_try='test -s "conftest$ac_exeext"'
17082 { (eval echo "$as_me:17082: \"$ac_try\"") >&5
17083 (eval $ac_try) 2>&5
17085 echo "$as_me:17085: \$? = $ac_status" >&5
17086 (exit "$ac_status"); }; }; then
17087 if test "$cross_compiling" = yes; then
17088 cf_have_curses_lib=maybe
17090 cat >"conftest.$ac_ext" <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17093 #include <$PANEL_NAME.h>
17095 { (void) new_panel ( 0 ); return 0; }
17097 rm -f "conftest$ac_exeext"
17098 if { (eval echo "$as_me:17098: \"$ac_link\"") >&5
17099 (eval $ac_link) 2>&5
17101 echo "$as_me:17101: \$? = $ac_status" >&5
17102 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17103 { (eval echo "$as_me:17103: \"$ac_try\"") >&5
17104 (eval $ac_try) 2>&5
17106 echo "$as_me:17106: \$? = $ac_status" >&5
17107 (exit "$ac_status"); }; }; then
17108 cf_have_curses_lib=yes
17110 echo "$as_me: program exited with status $ac_status" >&5
17111 echo "$as_me: failed program was:" >&5
17112 cat "conftest.$ac_ext" >&5
17113 cf_have_curses_lib=no
17115 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17118 echo "$as_me: failed program was:" >&5
17119 cat "conftest.$ac_ext" >&5
17120 cf_have_curses_lib=no
17122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17123 echo "$as_me:17123: result: $cf_have_curses_lib" >&5
17124 echo "${ECHO_T}$cf_have_curses_lib" >&6
17125 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17126 if test "$cf_have_curses_lib" = "yes"
17129 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17131 cat >>confdefs.h <<EOF
17132 #define $cf_upper 1
17136 CFLAGS="$cf_save_CFLAGS"
17137 CPPFLAGS="$cf_save_CPPFLAGS"
17138 LIBS="$cf_save_LIBS"
17142 if test "$cf_have_curses_lib" = no; then
17143 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17144 echo "$as_me:17144: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17145 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17146 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17147 echo $ECHO_N "(cached) $ECHO_C" >&6
17149 ac_check_lib_save_LIBS=$LIBS
17150 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17151 cat >"conftest.$ac_ext" <<_ACEOF
17152 #line 17152 "configure"
17153 #include "confdefs.h"
17155 /* Override any gcc2 internal prototype to avoid an error. */
17159 /* We use char because int might match the return type of a gcc2
17160 builtin and then its argument prototype would still apply. */
17170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17171 if { (eval echo "$as_me:17171: \"$ac_link\"") >&5
17172 (eval $ac_link) 2>&5
17174 echo "$as_me:17174: \$? = $ac_status" >&5
17175 (exit "$ac_status"); } &&
17176 { ac_try='test -s "conftest$ac_exeext"'
17177 { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178 (eval $ac_try) 2>&5
17180 echo "$as_me:17180: \$? = $ac_status" >&5
17181 (exit "$ac_status"); }; }; then
17182 eval "$as_ac_Lib=yes"
17184 echo "$as_me: failed program was:" >&5
17185 cat "conftest.$ac_ext" >&5
17186 eval "$as_ac_Lib=no"
17188 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17189 LIBS=$ac_check_lib_save_LIBS
17191 echo "$as_me:17191: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17192 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17193 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17195 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17197 cf_add_libs="$LIBS"
17200 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17201 # filter duplicates
17202 for cf_add_1lib in $cf_add_0lib; do
17203 for cf_add_2lib in $cf_add_libs; do
17204 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17209 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17211 LIBS="$cf_add_libs"
17213 cat >>confdefs.h <<EOF
17214 #define $cf_upper 1
17221 cf_curses_headers="$cf_curses_headers panel.h"
17224 echo "$as_me:17224: checking if you want to check for menu functions" >&5
17225 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17227 # Check whether --enable-menu or --disable-menu was given.
17228 if test "${enable_menu+set}" = set; then
17229 enableval="$enable_menu"
17230 test "$enableval" != no && enableval=yes
17231 if test "$enableval" != "yes" ; then
17234 cf_enable_menu=$cf_default_menu
17238 cf_enable_menu=$cf_default_menu
17241 echo "$as_me:17241: result: $cf_enable_menu" >&5
17242 echo "${ECHO_T}$cf_enable_menu" >&6
17243 if test $cf_enable_menu = yes
17245 case $cf_cv_screen in
17250 echo "$as_me:17250: checking for NetBSD menu.h" >&5
17251 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17252 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17253 echo $ECHO_N "(cached) $ECHO_C" >&6
17256 cat >"conftest.$ac_ext" <<_ACEOF
17257 #line 17257 "configure"
17258 #include "confdefs.h"
17260 #include <${cf_cv_ncurses_header:-curses.h}>
17268 int y = menu->max_item_width;
17274 rm -f "conftest.$ac_objext"
17275 if { (eval echo "$as_me:17275: \"$ac_compile\"") >&5
17276 (eval $ac_compile) 2>&5
17278 echo "$as_me:17278: \$? = $ac_status" >&5
17279 (exit "$ac_status"); } &&
17280 { ac_try='test -s "conftest.$ac_objext"'
17281 { (eval echo "$as_me:17281: \"$ac_try\"") >&5
17282 (eval $ac_try) 2>&5
17284 echo "$as_me:17284: \$? = $ac_status" >&5
17285 (exit "$ac_status"); }; }; then
17286 cf_cv_netbsd_menu_h=yes
17289 echo "$as_me: failed program was:" >&5
17290 cat "conftest.$ac_ext" >&5
17291 cf_cv_netbsd_menu_h=no
17293 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17296 echo "$as_me:17296: result: $cf_cv_netbsd_menu_h" >&5
17297 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
17299 test "$cf_cv_netbsd_menu_h" = yes &&
17300 cat >>confdefs.h <<\EOF
17301 #define HAVE_NETBSD_MENU_H 1
17307 cf_have_curses_lib=no
17309 : ${NCURSES_CONFIG_PKG:=none}
17310 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17312 elif test "x${PKG_CONFIG:=none}" != xnone; then
17313 echo "$as_me:17313: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
17314 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17315 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
17316 echo "$as_me:17316: result: yes" >&5
17317 echo "${ECHO_T}yes" >&6
17319 echo "$as_me:17319: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
17320 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17322 cf_save_CFLAGS="$CFLAGS"
17323 cf_save_CPPFLAGS="$CPPFLAGS"
17324 cf_save_LIBS="$LIBS"
17326 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
17328 case "x$cf_add_cflags" in
17331 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17334 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'`
17335 test "$CFLAGS" != "$cf_old_cflag" || break
17337 CFLAGS="$cf_old_cflag"
17340 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17343 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'`
17344 test "$CPPFLAGS" != "$cf_old_cflag" || break
17346 CPPFLAGS="$cf_old_cflag"
17355 cf_new_extra_cppflags=
17357 for cf_add_cflags in $cf_add_cflags
17359 case "$cf_fix_cppflags" in
17361 case "$cf_add_cflags" in
17362 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17363 case "$cf_add_cflags" in
17365 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17367 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17368 && test -z "${cf_tst_cflags}" \
17369 && cf_fix_cppflags=yes
17371 if test "$cf_fix_cppflags" = yes ; then
17373 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17374 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17377 elif test "${cf_tst_cflags}" = "\"'" ; then
17379 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17380 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17386 case "$CPPFLAGS" in
17390 case "$cf_add_cflags" in
17392 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17394 CPPFLAGS=`echo "$CPPFLAGS" | \
17395 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17396 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17401 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17402 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17409 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17410 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17417 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17418 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17420 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17422 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17423 && test -z "${cf_tst_cflags}" \
17424 && cf_fix_cppflags=no
17429 if test -n "$cf_new_cflags" ; then
17431 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17432 CFLAGS="${CFLAGS}$cf_new_cflags"
17436 if test -n "$cf_new_cppflags" ; then
17438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17439 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17443 if test -n "$cf_new_extra_cppflags" ; then
17445 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17446 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17452 cf_add_libs="$LIBS"
17455 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17456 # filter duplicates
17457 for cf_add_1lib in $cf_add_0lib; do
17458 for cf_add_2lib in $cf_add_libs; do
17459 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17464 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17466 LIBS="$cf_add_libs"
17468 cat >"conftest.$ac_ext" <<_ACEOF
17469 #line 17469 "configure"
17470 #include "confdefs.h"
17471 #include <$MENU_NAME.h>
17475 (void) menu_driver ( 0,0 );
17480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17481 if { (eval echo "$as_me:17481: \"$ac_link\"") >&5
17482 (eval $ac_link) 2>&5
17484 echo "$as_me:17484: \$? = $ac_status" >&5
17485 (exit "$ac_status"); } &&
17486 { ac_try='test -s "conftest$ac_exeext"'
17487 { (eval echo "$as_me:17487: \"$ac_try\"") >&5
17488 (eval $ac_try) 2>&5
17490 echo "$as_me:17490: \$? = $ac_status" >&5
17491 (exit "$ac_status"); }; }; then
17492 if test "$cross_compiling" = yes; then
17493 cf_have_curses_lib=maybe
17495 cat >"conftest.$ac_ext" <<_ACEOF
17496 #line 17496 "configure"
17497 #include "confdefs.h"
17498 #include <$MENU_NAME.h>
17500 { (void) menu_driver ( 0,0 ); return 0; }
17502 rm -f "conftest$ac_exeext"
17503 if { (eval echo "$as_me:17503: \"$ac_link\"") >&5
17504 (eval $ac_link) 2>&5
17506 echo "$as_me:17506: \$? = $ac_status" >&5
17507 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17508 { (eval echo "$as_me:17508: \"$ac_try\"") >&5
17509 (eval $ac_try) 2>&5
17511 echo "$as_me:17511: \$? = $ac_status" >&5
17512 (exit "$ac_status"); }; }; then
17513 cf_have_curses_lib=yes
17515 echo "$as_me: program exited with status $ac_status" >&5
17516 echo "$as_me: failed program was:" >&5
17517 cat "conftest.$ac_ext" >&5
17518 cf_have_curses_lib=no
17520 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17523 echo "$as_me: failed program was:" >&5
17524 cat "conftest.$ac_ext" >&5
17525 cf_have_curses_lib=no
17527 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17528 echo "$as_me:17528: result: $cf_have_curses_lib" >&5
17529 echo "${ECHO_T}$cf_have_curses_lib" >&6
17530 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17531 if test "$cf_have_curses_lib" = "yes"
17534 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17536 cat >>confdefs.h <<EOF
17537 #define $cf_upper 1
17541 CFLAGS="$cf_save_CFLAGS"
17542 CPPFLAGS="$cf_save_CPPFLAGS"
17543 LIBS="$cf_save_LIBS"
17547 if test "$cf_have_curses_lib" = no; then
17548 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17549 echo "$as_me:17549: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17550 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17551 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17552 echo $ECHO_N "(cached) $ECHO_C" >&6
17554 ac_check_lib_save_LIBS=$LIBS
17555 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17556 cat >"conftest.$ac_ext" <<_ACEOF
17557 #line 17557 "configure"
17558 #include "confdefs.h"
17560 /* Override any gcc2 internal prototype to avoid an error. */
17564 /* We use char because int might match the return type of a gcc2
17565 builtin and then its argument prototype would still apply. */
17566 char menu_driver ();
17575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17576 if { (eval echo "$as_me:17576: \"$ac_link\"") >&5
17577 (eval $ac_link) 2>&5
17579 echo "$as_me:17579: \$? = $ac_status" >&5
17580 (exit "$ac_status"); } &&
17581 { ac_try='test -s "conftest$ac_exeext"'
17582 { (eval echo "$as_me:17582: \"$ac_try\"") >&5
17583 (eval $ac_try) 2>&5
17585 echo "$as_me:17585: \$? = $ac_status" >&5
17586 (exit "$ac_status"); }; }; then
17587 eval "$as_ac_Lib=yes"
17589 echo "$as_me: failed program was:" >&5
17590 cat "conftest.$ac_ext" >&5
17591 eval "$as_ac_Lib=no"
17593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17594 LIBS=$ac_check_lib_save_LIBS
17596 echo "$as_me:17596: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17597 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17598 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17600 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17602 cf_add_libs="$LIBS"
17605 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17606 # filter duplicates
17607 for cf_add_1lib in $cf_add_0lib; do
17608 for cf_add_2lib in $cf_add_libs; do
17609 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17614 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17616 LIBS="$cf_add_libs"
17618 cat >>confdefs.h <<EOF
17619 #define $cf_upper 1
17626 cf_curses_headers="$cf_curses_headers menu.h"
17629 echo "$as_me:17629: checking if you want to check for form functions" >&5
17630 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17632 # Check whether --enable-form or --disable-form was given.
17633 if test "${enable_form+set}" = set; then
17634 enableval="$enable_form"
17635 test "$enableval" != no && enableval=yes
17636 if test "$enableval" != "yes" ; then
17639 cf_enable_form=$cf_default_form
17643 cf_enable_form=$cf_default_form
17646 echo "$as_me:17646: result: $cf_enable_form" >&5
17647 echo "${ECHO_T}$cf_enable_form" >&6
17648 if test $cf_enable_form = yes
17650 case $cf_cv_screen in
17655 echo "$as_me:17655: checking for NetBSD form.h" >&5
17656 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17657 if test "${cf_cv_netbsd_form_h+set}" = set; then
17658 echo $ECHO_N "(cached) $ECHO_C" >&6
17661 cat >"conftest.$ac_ext" <<_ACEOF
17662 #line 17662 "configure"
17663 #include "confdefs.h"
17665 #include <${cf_cv_ncurses_header:-curses.h}>
17673 int y = current_field(form)->cursor_ypos;
17674 int x = current_field(form)->cursor_xpos;
17680 rm -f "conftest.$ac_objext"
17681 if { (eval echo "$as_me:17681: \"$ac_compile\"") >&5
17682 (eval $ac_compile) 2>&5
17684 echo "$as_me:17684: \$? = $ac_status" >&5
17685 (exit "$ac_status"); } &&
17686 { ac_try='test -s "conftest.$ac_objext"'
17687 { (eval echo "$as_me:17687: \"$ac_try\"") >&5
17688 (eval $ac_try) 2>&5
17690 echo "$as_me:17690: \$? = $ac_status" >&5
17691 (exit "$ac_status"); }; }; then
17692 cf_cv_netbsd_form_h=yes
17695 echo "$as_me: failed program was:" >&5
17696 cat "conftest.$ac_ext" >&5
17697 cf_cv_netbsd_form_h=no
17699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17702 echo "$as_me:17702: result: $cf_cv_netbsd_form_h" >&5
17703 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17705 test "$cf_cv_netbsd_form_h" = yes &&
17706 cat >>confdefs.h <<\EOF
17707 #define HAVE_NETBSD_FORM_H 1
17713 cf_have_curses_lib=no
17715 : ${NCURSES_CONFIG_PKG:=none}
17716 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17718 elif test "x${PKG_CONFIG:=none}" != xnone; then
17719 echo "$as_me:17719: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17720 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17721 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17722 echo "$as_me:17722: result: yes" >&5
17723 echo "${ECHO_T}yes" >&6
17725 echo "$as_me:17725: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17726 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17728 cf_save_CFLAGS="$CFLAGS"
17729 cf_save_CPPFLAGS="$CPPFLAGS"
17730 cf_save_LIBS="$LIBS"
17732 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17734 case "x$cf_add_cflags" in
17737 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17740 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'`
17741 test "$CFLAGS" != "$cf_old_cflag" || break
17743 CFLAGS="$cf_old_cflag"
17746 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17749 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'`
17750 test "$CPPFLAGS" != "$cf_old_cflag" || break
17752 CPPFLAGS="$cf_old_cflag"
17761 cf_new_extra_cppflags=
17763 for cf_add_cflags in $cf_add_cflags
17765 case "$cf_fix_cppflags" in
17767 case "$cf_add_cflags" in
17768 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17769 case "$cf_add_cflags" in
17771 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17774 && test -z "${cf_tst_cflags}" \
17775 && cf_fix_cppflags=yes
17777 if test "$cf_fix_cppflags" = yes ; then
17779 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17780 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17783 elif test "${cf_tst_cflags}" = "\"'" ; then
17785 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17786 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17792 case "$CPPFLAGS" in
17796 case "$cf_add_cflags" in
17798 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17800 CPPFLAGS=`echo "$CPPFLAGS" | \
17801 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17802 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17807 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17808 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17815 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17816 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17823 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17824 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17826 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17828 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17829 && test -z "${cf_tst_cflags}" \
17830 && cf_fix_cppflags=no
17835 if test -n "$cf_new_cflags" ; then
17837 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17838 CFLAGS="${CFLAGS}$cf_new_cflags"
17842 if test -n "$cf_new_cppflags" ; then
17844 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17845 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17849 if test -n "$cf_new_extra_cppflags" ; then
17851 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17852 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17858 cf_add_libs="$LIBS"
17861 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17862 # filter duplicates
17863 for cf_add_1lib in $cf_add_0lib; do
17864 for cf_add_2lib in $cf_add_libs; do
17865 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17872 LIBS="$cf_add_libs"
17874 cat >"conftest.$ac_ext" <<_ACEOF
17875 #line 17875 "configure"
17876 #include "confdefs.h"
17877 #include <$FORM_NAME.h>
17881 (void) form_driver ( 0,0 );
17886 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17887 if { (eval echo "$as_me:17887: \"$ac_link\"") >&5
17888 (eval $ac_link) 2>&5
17890 echo "$as_me:17890: \$? = $ac_status" >&5
17891 (exit "$ac_status"); } &&
17892 { ac_try='test -s "conftest$ac_exeext"'
17893 { (eval echo "$as_me:17893: \"$ac_try\"") >&5
17894 (eval $ac_try) 2>&5
17896 echo "$as_me:17896: \$? = $ac_status" >&5
17897 (exit "$ac_status"); }; }; then
17898 if test "$cross_compiling" = yes; then
17899 cf_have_curses_lib=maybe
17901 cat >"conftest.$ac_ext" <<_ACEOF
17902 #line 17902 "configure"
17903 #include "confdefs.h"
17904 #include <$FORM_NAME.h>
17906 { (void) form_driver ( 0,0 ); return 0; }
17908 rm -f "conftest$ac_exeext"
17909 if { (eval echo "$as_me:17909: \"$ac_link\"") >&5
17910 (eval $ac_link) 2>&5
17912 echo "$as_me:17912: \$? = $ac_status" >&5
17913 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17914 { (eval echo "$as_me:17914: \"$ac_try\"") >&5
17915 (eval $ac_try) 2>&5
17917 echo "$as_me:17917: \$? = $ac_status" >&5
17918 (exit "$ac_status"); }; }; then
17919 cf_have_curses_lib=yes
17921 echo "$as_me: program exited with status $ac_status" >&5
17922 echo "$as_me: failed program was:" >&5
17923 cat "conftest.$ac_ext" >&5
17924 cf_have_curses_lib=no
17926 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17929 echo "$as_me: failed program was:" >&5
17930 cat "conftest.$ac_ext" >&5
17931 cf_have_curses_lib=no
17933 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17934 echo "$as_me:17934: result: $cf_have_curses_lib" >&5
17935 echo "${ECHO_T}$cf_have_curses_lib" >&6
17936 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17937 if test "$cf_have_curses_lib" = "yes"
17940 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17942 cat >>confdefs.h <<EOF
17943 #define $cf_upper 1
17947 CFLAGS="$cf_save_CFLAGS"
17948 CPPFLAGS="$cf_save_CPPFLAGS"
17949 LIBS="$cf_save_LIBS"
17953 if test "$cf_have_curses_lib" = no; then
17954 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17955 echo "$as_me:17955: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17956 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17957 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17958 echo $ECHO_N "(cached) $ECHO_C" >&6
17960 ac_check_lib_save_LIBS=$LIBS
17961 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17962 cat >"conftest.$ac_ext" <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17966 /* Override any gcc2 internal prototype to avoid an error. */
17970 /* We use char because int might match the return type of a gcc2
17971 builtin and then its argument prototype would still apply. */
17972 char form_driver ();
17981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17982 if { (eval echo "$as_me:17982: \"$ac_link\"") >&5
17983 (eval $ac_link) 2>&5
17985 echo "$as_me:17985: \$? = $ac_status" >&5
17986 (exit "$ac_status"); } &&
17987 { ac_try='test -s "conftest$ac_exeext"'
17988 { (eval echo "$as_me:17988: \"$ac_try\"") >&5
17989 (eval $ac_try) 2>&5
17991 echo "$as_me:17991: \$? = $ac_status" >&5
17992 (exit "$ac_status"); }; }; then
17993 eval "$as_ac_Lib=yes"
17995 echo "$as_me: failed program was:" >&5
17996 cat "conftest.$ac_ext" >&5
17997 eval "$as_ac_Lib=no"
17999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18000 LIBS=$ac_check_lib_save_LIBS
18002 echo "$as_me:18002: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18003 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18004 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18006 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18008 cf_add_libs="$LIBS"
18011 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18012 # filter duplicates
18013 for cf_add_1lib in $cf_add_0lib; do
18014 for cf_add_2lib in $cf_add_libs; do
18015 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18020 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18022 LIBS="$cf_add_libs"
18024 cat >>confdefs.h <<EOF
18025 #define $cf_upper 1
18032 cf_curses_headers="$cf_curses_headers form.h"
18035 # look for curses-related headers
18037 for ac_header in $cf_curses_headers
18039 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18040 echo "$as_me:18040: checking for $ac_header" >&5
18041 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18043 echo $ECHO_N "(cached) $ECHO_C" >&6
18045 cat >"conftest.$ac_ext" <<_ACEOF
18046 #line 18046 "configure"
18047 #include "confdefs.h"
18048 #include <$ac_header>
18050 if { (eval echo "$as_me:18050: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18051 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18053 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18055 cat conftest.err >&5
18056 echo "$as_me:18056: \$? = $ac_status" >&5
18057 (exit "$ac_status"); } >/dev/null; then
18058 if test -s conftest.err; then
18059 ac_cpp_err=$ac_c_preproc_warn_flag
18066 if test -z "$ac_cpp_err"; then
18067 eval "$as_ac_Header=yes"
18069 echo "$as_me: failed program was:" >&5
18070 cat "conftest.$ac_ext" >&5
18071 eval "$as_ac_Header=no"
18073 rm -f conftest.err "conftest.$ac_ext"
18075 echo "$as_me:18075: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18076 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18077 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18078 cat >>confdefs.h <<EOF
18079 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18085 echo "$as_me:18085: checking for ANSI C header files" >&5
18086 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18087 if test "${ac_cv_header_stdc+set}" = set; then
18088 echo $ECHO_N "(cached) $ECHO_C" >&6
18090 cat >"conftest.$ac_ext" <<_ACEOF
18091 #line 18091 "configure"
18092 #include "confdefs.h"
18093 #include <stdlib.h>
18094 #include <stdarg.h>
18095 #include <string.h>
18099 if { (eval echo "$as_me:18099: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18100 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18102 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18104 cat conftest.err >&5
18105 echo "$as_me:18105: \$? = $ac_status" >&5
18106 (exit "$ac_status"); } >/dev/null; then
18107 if test -s conftest.err; then
18108 ac_cpp_err=$ac_c_preproc_warn_flag
18115 if test -z "$ac_cpp_err"; then
18116 ac_cv_header_stdc=yes
18118 echo "$as_me: failed program was:" >&5
18119 cat "conftest.$ac_ext" >&5
18120 ac_cv_header_stdc=no
18122 rm -f conftest.err "conftest.$ac_ext"
18124 if test $ac_cv_header_stdc = yes; then
18125 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18126 cat >"conftest.$ac_ext" <<_ACEOF
18127 #line 18127 "configure"
18128 #include "confdefs.h"
18129 #include <string.h>
18132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18133 $EGREP "memchr" >/dev/null 2>&1; then
18136 ac_cv_header_stdc=no
18142 if test $ac_cv_header_stdc = yes; then
18143 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18144 cat >"conftest.$ac_ext" <<_ACEOF
18145 #line 18145 "configure"
18146 #include "confdefs.h"
18147 #include <stdlib.h>
18150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18151 $EGREP "free" >/dev/null 2>&1; then
18154 ac_cv_header_stdc=no
18160 if test $ac_cv_header_stdc = yes; then
18161 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18162 if test "$cross_compiling" = yes; then
18165 cat >"conftest.$ac_ext" <<_ACEOF
18166 #line 18166 "configure"
18167 #include "confdefs.h"
18169 #if ((' ' & 0x0FF) == 0x020)
18170 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18171 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18173 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18174 || ('j' <= (c) && (c) <= 'r') \
18175 || ('s' <= (c) && (c) <= 'z'))
18176 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18179 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18184 for (i = 0; i < 256; i++)
18185 if (XOR (islower (i), ISLOWER (i))
18186 || toupper (i) != TOUPPER (i))
18187 $ac_main_return(2);
18188 $ac_main_return (0);
18191 rm -f "conftest$ac_exeext"
18192 if { (eval echo "$as_me:18192: \"$ac_link\"") >&5
18193 (eval $ac_link) 2>&5
18195 echo "$as_me:18195: \$? = $ac_status" >&5
18196 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18197 { (eval echo "$as_me:18197: \"$ac_try\"") >&5
18198 (eval $ac_try) 2>&5
18200 echo "$as_me:18200: \$? = $ac_status" >&5
18201 (exit "$ac_status"); }; }; then
18204 echo "$as_me: program exited with status $ac_status" >&5
18205 echo "$as_me: failed program was:" >&5
18206 cat "conftest.$ac_ext" >&5
18207 ac_cv_header_stdc=no
18209 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18213 echo "$as_me:18213: result: $ac_cv_header_stdc" >&5
18214 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18215 if test $ac_cv_header_stdc = yes; then
18217 cat >>confdefs.h <<\EOF
18218 #define STDC_HEADERS 1
18223 echo "$as_me:18223: checking whether time.h and sys/time.h may both be included" >&5
18224 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18225 if test "${ac_cv_header_time+set}" = set; then
18226 echo $ECHO_N "(cached) $ECHO_C" >&6
18228 cat >"conftest.$ac_ext" <<_ACEOF
18229 #line 18229 "configure"
18230 #include "confdefs.h"
18231 #include <sys/types.h>
18232 #include <sys/time.h>
18238 if ((struct tm *) 0)
18244 rm -f "conftest.$ac_objext"
18245 if { (eval echo "$as_me:18245: \"$ac_compile\"") >&5
18246 (eval $ac_compile) 2>&5
18248 echo "$as_me:18248: \$? = $ac_status" >&5
18249 (exit "$ac_status"); } &&
18250 { ac_try='test -s "conftest.$ac_objext"'
18251 { (eval echo "$as_me:18251: \"$ac_try\"") >&5
18252 (eval $ac_try) 2>&5
18254 echo "$as_me:18254: \$? = $ac_status" >&5
18255 (exit "$ac_status"); }; }; then
18256 ac_cv_header_time=yes
18258 echo "$as_me: failed program was:" >&5
18259 cat "conftest.$ac_ext" >&5
18260 ac_cv_header_time=no
18262 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18264 echo "$as_me:18264: result: $ac_cv_header_time" >&5
18265 echo "${ECHO_T}$ac_cv_header_time" >&6
18266 if test $ac_cv_header_time = yes; then
18268 cat >>confdefs.h <<\EOF
18269 #define TIME_WITH_SYS_TIME 1
18287 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18288 echo "$as_me:18288: checking for $ac_header" >&5
18289 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18290 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18291 echo $ECHO_N "(cached) $ECHO_C" >&6
18293 cat >"conftest.$ac_ext" <<_ACEOF
18294 #line 18294 "configure"
18295 #include "confdefs.h"
18296 #include <$ac_header>
18298 if { (eval echo "$as_me:18298: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18299 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18301 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18303 cat conftest.err >&5
18304 echo "$as_me:18304: \$? = $ac_status" >&5
18305 (exit "$ac_status"); } >/dev/null; then
18306 if test -s conftest.err; then
18307 ac_cpp_err=$ac_c_preproc_warn_flag
18314 if test -z "$ac_cpp_err"; then
18315 eval "$as_ac_Header=yes"
18317 echo "$as_me: failed program was:" >&5
18318 cat "conftest.$ac_ext" >&5
18319 eval "$as_ac_Header=no"
18321 rm -f conftest.err "conftest.$ac_ext"
18323 echo "$as_me:18323: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18324 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18325 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18326 cat >>confdefs.h <<EOF
18327 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18333 for ac_header in unistd.h getopt.h
18335 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18336 echo "$as_me:18336: checking for $ac_header" >&5
18337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18339 echo $ECHO_N "(cached) $ECHO_C" >&6
18341 cat >"conftest.$ac_ext" <<_ACEOF
18342 #line 18342 "configure"
18343 #include "confdefs.h"
18344 #include <$ac_header>
18346 if { (eval echo "$as_me:18346: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18347 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18349 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18351 cat conftest.err >&5
18352 echo "$as_me:18352: \$? = $ac_status" >&5
18353 (exit "$ac_status"); } >/dev/null; then
18354 if test -s conftest.err; then
18355 ac_cpp_err=$ac_c_preproc_warn_flag
18362 if test -z "$ac_cpp_err"; then
18363 eval "$as_ac_Header=yes"
18365 echo "$as_me: failed program was:" >&5
18366 cat "conftest.$ac_ext" >&5
18367 eval "$as_ac_Header=no"
18369 rm -f conftest.err "conftest.$ac_ext"
18371 echo "$as_me:18371: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18372 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18373 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18374 cat >>confdefs.h <<EOF
18375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18381 echo "$as_me:18381: checking for header declaring getopt variables" >&5
18382 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18383 if test "${cf_cv_getopt_header+set}" = set; then
18384 echo $ECHO_N "(cached) $ECHO_C" >&6
18387 cf_cv_getopt_header=none
18388 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18390 cat >"conftest.$ac_ext" <<_ACEOF
18391 #line 18391 "configure"
18392 #include "confdefs.h"
18394 #include <$cf_header>
18398 int x = optind; char *y = optarg; (void)x; (void)y
18403 rm -f "conftest.$ac_objext"
18404 if { (eval echo "$as_me:18404: \"$ac_compile\"") >&5
18405 (eval $ac_compile) 2>&5
18407 echo "$as_me:18407: \$? = $ac_status" >&5
18408 (exit "$ac_status"); } &&
18409 { ac_try='test -s "conftest.$ac_objext"'
18410 { (eval echo "$as_me:18410: \"$ac_try\"") >&5
18411 (eval $ac_try) 2>&5
18413 echo "$as_me:18413: \$? = $ac_status" >&5
18414 (exit "$ac_status"); }; }; then
18415 cf_cv_getopt_header=$cf_header
18418 echo "$as_me: failed program was:" >&5
18419 cat "conftest.$ac_ext" >&5
18421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18425 echo "$as_me:18425: result: $cf_cv_getopt_header" >&5
18426 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18427 if test "$cf_cv_getopt_header" != none ; then
18429 cat >>confdefs.h <<\EOF
18430 #define HAVE_GETOPT_HEADER 1
18434 if test "$cf_cv_getopt_header" = getopt.h ; then
18436 cat >>confdefs.h <<\EOF
18437 #define NEED_GETOPT_H 1
18452 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18453 echo "$as_me:18453: checking for $ac_func" >&5
18454 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18455 if eval "test \"\${$as_ac_var+set}\" = set"; then
18456 echo $ECHO_N "(cached) $ECHO_C" >&6
18458 cat >"conftest.$ac_ext" <<_ACEOF
18459 #line 18459 "configure"
18460 #include "confdefs.h"
18461 #define $ac_func autoconf_temporary
18462 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18469 /* We use char because int might match the return type of a gcc2
18470 builtin and then its argument prototype would still apply. */
18471 char $ac_func (void);
18477 /* The GNU C library defines stubs for functions which it implements
18478 to always fail with ENOSYS. Some functions are actually named
18479 something starting with __ and the normal name is an alias. */
18480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18481 #error found stub for $ac_func
18484 return $ac_func ();
18489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18490 if { (eval echo "$as_me:18490: \"$ac_link\"") >&5
18491 (eval $ac_link) 2>&5
18493 echo "$as_me:18493: \$? = $ac_status" >&5
18494 (exit "$ac_status"); } &&
18495 { ac_try='test -s "conftest$ac_exeext"'
18496 { (eval echo "$as_me:18496: \"$ac_try\"") >&5
18497 (eval $ac_try) 2>&5
18499 echo "$as_me:18499: \$? = $ac_status" >&5
18500 (exit "$ac_status"); }; }; then
18501 eval "$as_ac_var=yes"
18503 echo "$as_me: failed program was:" >&5
18504 cat "conftest.$ac_ext" >&5
18505 eval "$as_ac_var=no"
18507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18509 echo "$as_me:18509: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18510 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18511 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18512 cat >>confdefs.h <<EOF
18513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18519 # use a compile-check to work with ncurses*-config and subdirectory includes
18520 echo "$as_me:18520: checking if we can use termcap.h" >&5
18521 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18522 if test "${cf_cv_have_termcap_h+set}" = set; then
18523 echo $ECHO_N "(cached) $ECHO_C" >&6
18526 cat >"conftest.$ac_ext" <<_ACEOF
18527 #line 18527 "configure"
18528 #include "confdefs.h"
18530 #include <curses.h>
18531 #ifdef NCURSES_VERSION
18532 #undef NCURSES_VERSION
18534 #include <termcap.h>
18535 #ifndef NCURSES_VERSION
18536 #error wrong header
18547 rm -f "conftest.$ac_objext"
18548 if { (eval echo "$as_me:18548: \"$ac_compile\"") >&5
18549 (eval $ac_compile) 2>&5
18551 echo "$as_me:18551: \$? = $ac_status" >&5
18552 (exit "$ac_status"); } &&
18553 { ac_try='test -s "conftest.$ac_objext"'
18554 { (eval echo "$as_me:18554: \"$ac_try\"") >&5
18555 (eval $ac_try) 2>&5
18557 echo "$as_me:18557: \$? = $ac_status" >&5
18558 (exit "$ac_status"); }; }; then
18559 cf_cv_have_termcap_h=yes
18561 echo "$as_me: failed program was:" >&5
18562 cat "conftest.$ac_ext" >&5
18563 cf_cv_have_termcap_h=no
18565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18567 echo "$as_me:18567: result: $cf_cv_have_termcap_h" >&5
18568 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18569 if test "x$cf_cv_have_termcap_h" = xyes
18572 cat >>confdefs.h <<\EOF
18573 #define HAVE_TERMCAP_H 1
18577 echo "$as_me:18577: checking if we can use ncurses/termcap.h" >&5
18578 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18579 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18580 echo $ECHO_N "(cached) $ECHO_C" >&6
18583 cat >"conftest.$ac_ext" <<_ACEOF
18584 #line 18584 "configure"
18585 #include "confdefs.h"
18587 #include <ncurses/curses.h>
18588 #ifdef NCURSES_VERSION
18589 #undef NCURSES_VERSION
18591 #include <ncurses/termcap.h>
18592 #ifndef NCURSES_VERSION
18593 #error wrong header
18604 rm -f "conftest.$ac_objext"
18605 if { (eval echo "$as_me:18605: \"$ac_compile\"") >&5
18606 (eval $ac_compile) 2>&5
18608 echo "$as_me:18608: \$? = $ac_status" >&5
18609 (exit "$ac_status"); } &&
18610 { ac_try='test -s "conftest.$ac_objext"'
18611 { (eval echo "$as_me:18611: \"$ac_try\"") >&5
18612 (eval $ac_try) 2>&5
18614 echo "$as_me:18614: \$? = $ac_status" >&5
18615 (exit "$ac_status"); }; }; then
18616 cf_cv_have_ncurses_termcap_h=yes
18618 echo "$as_me: failed program was:" >&5
18619 cat "conftest.$ac_ext" >&5
18620 cf_cv_have_ncurses_termcap_h=no
18622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18624 echo "$as_me:18624: result: $cf_cv_have_ncurses_termcap_h" >&5
18625 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18626 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18627 cat >>confdefs.h <<\EOF
18628 #define HAVE_NCURSES_TERMCAP_H 1
18633 if test "x$ac_cv_func_getopt" = xno; then
18634 { { echo "$as_me:18634: error: getopt is required for building programs" >&5
18635 echo "$as_me: error: getopt is required for building programs" >&2;}
18636 { (exit 1); exit 1; }; }
18639 if test "$cf_enable_widec" = yes; then
18652 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18653 echo "$as_me:18653: checking for $ac_func" >&5
18654 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18655 if eval "test \"\${$as_ac_var+set}\" = set"; then
18656 echo $ECHO_N "(cached) $ECHO_C" >&6
18658 cat >"conftest.$ac_ext" <<_ACEOF
18659 #line 18659 "configure"
18660 #include "confdefs.h"
18661 #define $ac_func autoconf_temporary
18662 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18669 /* We use char because int might match the return type of a gcc2
18670 builtin and then its argument prototype would still apply. */
18671 char $ac_func (void);
18677 /* The GNU C library defines stubs for functions which it implements
18678 to always fail with ENOSYS. Some functions are actually named
18679 something starting with __ and the normal name is an alias. */
18680 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18681 #error found stub for $ac_func
18684 return $ac_func ();
18689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18690 if { (eval echo "$as_me:18690: \"$ac_link\"") >&5
18691 (eval $ac_link) 2>&5
18693 echo "$as_me:18693: \$? = $ac_status" >&5
18694 (exit "$ac_status"); } &&
18695 { ac_try='test -s "conftest$ac_exeext"'
18696 { (eval echo "$as_me:18696: \"$ac_try\"") >&5
18697 (eval $ac_try) 2>&5
18699 echo "$as_me:18699: \$? = $ac_status" >&5
18700 (exit "$ac_status"); }; }; then
18701 eval "$as_ac_var=yes"
18703 echo "$as_me: failed program was:" >&5
18704 cat "conftest.$ac_ext" >&5
18705 eval "$as_ac_var=no"
18707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18709 echo "$as_me:18709: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18710 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18711 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18712 cat >>confdefs.h <<EOF
18713 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18721 echo "$as_me:18721: checking definition to turn on extended curses functions" >&5
18722 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18723 if test "${cf_cv_need_xopen_extension+set}" = set; then
18724 echo $ECHO_N "(cached) $ECHO_C" >&6
18727 cf_cv_need_xopen_extension=unknown
18728 cat >"conftest.$ac_ext" <<_ACEOF
18729 #line 18729 "configure"
18730 #include "confdefs.h"
18732 #include <stdlib.h>
18733 #include <${cf_cv_ncurses_header:-curses.h}>
18738 #if defined(NCURSES_VERSION_PATCH)
18739 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18743 #ifdef NCURSES_WIDECHAR
18744 make an error /* prefer to fall-through on the second checks */
18747 int check2 = curs_set((int)sizeof(check));
18748 long x = winnstr(stdscr, "", 0);
18751 getbegyx(stdscr, y1, x1);
18760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18761 if { (eval echo "$as_me:18761: \"$ac_link\"") >&5
18762 (eval $ac_link) 2>&5
18764 echo "$as_me:18764: \$? = $ac_status" >&5
18765 (exit "$ac_status"); } &&
18766 { ac_try='test -s "conftest$ac_exeext"'
18767 { (eval echo "$as_me:18767: \"$ac_try\"") >&5
18768 (eval $ac_try) 2>&5
18770 echo "$as_me:18770: \$? = $ac_status" >&5
18771 (exit "$ac_status"); }; }; then
18772 cf_cv_need_xopen_extension=none
18774 echo "$as_me: failed program was:" >&5
18775 cat "conftest.$ac_ext" >&5
18777 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18779 cat >"conftest.$ac_ext" <<_ACEOF
18780 #line 18780 "configure"
18781 #include "confdefs.h"
18783 #define $cf_try_xopen_extension 1
18784 #include <stdlib.h>
18785 #include <${cf_cv_ncurses_header:-curses.h}>
18791 int check2 = curs_set((int)sizeof(check));
18792 long x = winnstr(stdscr, "", 0);
18794 getbegyx(stdscr, y1, x1);
18804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18805 if { (eval echo "$as_me:18805: \"$ac_link\"") >&5
18806 (eval $ac_link) 2>&5
18808 echo "$as_me:18808: \$? = $ac_status" >&5
18809 (exit "$ac_status"); } &&
18810 { ac_try='test -s "conftest$ac_exeext"'
18811 { (eval echo "$as_me:18811: \"$ac_try\"") >&5
18812 (eval $ac_try) 2>&5
18814 echo "$as_me:18814: \$? = $ac_status" >&5
18815 (exit "$ac_status"); }; }; then
18816 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18818 echo "$as_me: failed program was:" >&5
18819 cat "conftest.$ac_ext" >&5
18821 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18828 echo "$as_me:18828: result: $cf_cv_need_xopen_extension" >&5
18829 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18831 case "$cf_cv_need_xopen_extension" in
18834 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18835 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18840 echo "$as_me:18840: checking for term.h" >&5
18841 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18842 if test "${cf_cv_term_header+set}" = set; then
18843 echo $ECHO_N "(cached) $ECHO_C" >&6
18846 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18847 # for <term.h> if we do not find the variant.
18849 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18851 case "${cf_cv_ncurses_header:-curses.h}" in
18853 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18854 cf_header_list="$cf_header_item $cf_header_list"
18858 for cf_header in $cf_header_list
18860 cat >"conftest.$ac_ext" <<_ACEOF
18861 #line 18861 "configure"
18862 #include "confdefs.h"
18864 #include <${cf_cv_ncurses_header:-curses.h}>
18865 #include <${cf_header}>
18874 rm -f "conftest.$ac_objext"
18875 if { (eval echo "$as_me:18875: \"$ac_compile\"") >&5
18876 (eval $ac_compile) 2>&5
18878 echo "$as_me:18878: \$? = $ac_status" >&5
18879 (exit "$ac_status"); } &&
18880 { ac_try='test -s "conftest.$ac_objext"'
18881 { (eval echo "$as_me:18881: \"$ac_try\"") >&5
18882 (eval $ac_try) 2>&5
18884 echo "$as_me:18884: \$? = $ac_status" >&5
18885 (exit "$ac_status"); }; }; then
18886 cf_cv_term_header=$cf_header
18889 echo "$as_me: failed program was:" >&5
18890 cat "conftest.$ac_ext" >&5
18891 cf_cv_term_header=no
18893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18896 case "$cf_cv_term_header" in
18898 # If curses is ncurses, some packagers still mess it up by trying to make
18899 # us use GNU termcap. This handles the most common case.
18900 for cf_header in ncurses/term.h ncursesw/term.h
18902 cat >"conftest.$ac_ext" <<_ACEOF
18903 #line 18903 "configure"
18904 #include "confdefs.h"
18906 #include <${cf_cv_ncurses_header:-curses.h}>
18907 #ifdef NCURSES_VERSION
18908 #include <${cf_header}>
18920 rm -f "conftest.$ac_objext"
18921 if { (eval echo "$as_me:18921: \"$ac_compile\"") >&5
18922 (eval $ac_compile) 2>&5
18924 echo "$as_me:18924: \$? = $ac_status" >&5
18925 (exit "$ac_status"); } &&
18926 { ac_try='test -s "conftest.$ac_objext"'
18927 { (eval echo "$as_me:18927: \"$ac_try\"") >&5
18928 (eval $ac_try) 2>&5
18930 echo "$as_me:18930: \$? = $ac_status" >&5
18931 (exit "$ac_status"); }; }; then
18932 cf_cv_term_header=$cf_header
18935 echo "$as_me: failed program was:" >&5
18936 cat "conftest.$ac_ext" >&5
18937 cf_cv_term_header=no
18939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18945 echo "$as_me:18945: result: $cf_cv_term_header" >&5
18946 echo "${ECHO_T}$cf_cv_term_header" >&6
18948 case "$cf_cv_term_header" in
18951 cat >>confdefs.h <<\EOF
18952 #define HAVE_TERM_H 1
18958 cat >>confdefs.h <<\EOF
18959 #define HAVE_NCURSES_TERM_H 1
18965 cat >>confdefs.h <<\EOF
18966 #define HAVE_NCURSESW_TERM_H 1
18972 echo "$as_me:18972: checking for unctrl.h" >&5
18973 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18974 if test "${cf_cv_unctrl_header+set}" = set; then
18975 echo $ECHO_N "(cached) $ECHO_C" >&6
18978 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18979 # for <unctrl.h> if we do not find the variant.
18981 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18983 case "${cf_cv_ncurses_header:-curses.h}" in
18985 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18986 cf_header_list="$cf_header_item $cf_header_list"
18990 for cf_header in $cf_header_list
18992 cat >"conftest.$ac_ext" <<_ACEOF
18993 #line 18993 "configure"
18994 #include "confdefs.h"
18996 #include <${cf_cv_ncurses_header:-curses.h}>
18997 #include <${cf_header}>
19006 rm -f "conftest.$ac_objext"
19007 if { (eval echo "$as_me:19007: \"$ac_compile\"") >&5
19008 (eval $ac_compile) 2>&5
19010 echo "$as_me:19010: \$? = $ac_status" >&5
19011 (exit "$ac_status"); } &&
19012 { ac_try='test -s "conftest.$ac_objext"'
19013 { (eval echo "$as_me:19013: \"$ac_try\"") >&5
19014 (eval $ac_try) 2>&5
19016 echo "$as_me:19016: \$? = $ac_status" >&5
19017 (exit "$ac_status"); }; }; then
19018 cf_cv_unctrl_header=$cf_header
19021 echo "$as_me: failed program was:" >&5
19022 cat "conftest.$ac_ext" >&5
19023 cf_cv_unctrl_header=no
19025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19029 echo "$as_me:19029: result: $cf_cv_unctrl_header" >&5
19030 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19032 case "$cf_cv_unctrl_header" in
19034 { echo "$as_me:19034: WARNING: unctrl.h header not found" >&5
19035 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19039 case "$cf_cv_unctrl_header" in
19042 cat >>confdefs.h <<\EOF
19043 #define HAVE_UNCTRL_H 1
19049 cat >>confdefs.h <<\EOF
19050 #define HAVE_NCURSES_UNCTRL_H 1
19054 (ncursesw/unctrl.h)
19056 cat >>confdefs.h <<\EOF
19057 #define HAVE_NCURSESW_UNCTRL_H 1
19065 assume_default_colors \
19083 init_extended_color \
19091 reset_color_pairs \
19108 use_default_colors \
19110 use_extended_names \
19126 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19128 echo "$as_me:19128: checking for ${cf_func}" >&5
19129 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19131 echo "${as_me:-configure}:19131: testing ${cf_func} ..." 1>&5
19133 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19134 echo $ECHO_N "(cached) $ECHO_C" >&6
19137 eval cf_result='$ac_cv_func_'$cf_func
19138 if test ".$cf_result" != ".no"; then
19139 cat >"conftest.$ac_ext" <<_ACEOF
19140 #line 19140 "configure"
19141 #include "confdefs.h"
19143 #ifdef HAVE_XCURSES
19144 #include <xcurses.h>
19145 char * XCursesProgramName = "test";
19147 #include <${cf_cv_ncurses_header:-curses.h}>
19148 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19149 #include <ncursesw/term.h>
19150 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19151 #include <ncurses/term.h>
19152 #elif defined(HAVE_TERM_H)
19162 long foo = (long)(&${cf_func});
19163 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19164 if (foo + 1234L > 5678L)
19165 ${cf_cv_main_return:-return}(foo != 0);
19172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19173 if { (eval echo "$as_me:19173: \"$ac_link\"") >&5
19174 (eval $ac_link) 2>&5
19176 echo "$as_me:19176: \$? = $ac_status" >&5
19177 (exit "$ac_status"); } &&
19178 { ac_try='test -s "conftest$ac_exeext"'
19179 { (eval echo "$as_me:19179: \"$ac_try\"") >&5
19180 (eval $ac_try) 2>&5
19182 echo "$as_me:19182: \$? = $ac_status" >&5
19183 (exit "$ac_status"); }; }; then
19186 echo "$as_me: failed program was:" >&5
19187 cat "conftest.$ac_ext" >&5
19190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19192 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19196 # use the computed/retrieved cache-value:
19197 eval 'cf_result=$cf_cv_func_'$cf_func
19198 echo "$as_me:19198: result: $cf_result" >&5
19199 echo "${ECHO_T}$cf_result" >&6
19200 if test "$cf_result" != no; then
19201 cat >>confdefs.h <<EOF
19202 #define HAVE_${cf_tr_func} 1
19208 for cf_func in tputs
19211 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19213 echo "$as_me:19213: checking for ${cf_func}" >&5
19214 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19216 echo "${as_me:-configure}:19216: testing ${cf_func} ..." 1>&5
19218 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19219 echo $ECHO_N "(cached) $ECHO_C" >&6
19222 eval cf_result='$ac_cv_func_'$cf_func
19223 if test ".$cf_result" != ".no"; then
19224 cat >"conftest.$ac_ext" <<_ACEOF
19225 #line 19225 "configure"
19226 #include "confdefs.h"
19228 #ifdef HAVE_XCURSES
19229 #include <xcurses.h>
19230 char * XCursesProgramName = "test";
19232 #include <${cf_cv_ncurses_header:-curses.h}>
19233 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19234 #include <ncursesw/term.h>
19235 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19236 #include <ncurses/term.h>
19237 #elif defined(HAVE_TERM_H)
19247 long foo = (long)(&${cf_func});
19248 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19249 if (foo + 1234L > 5678L)
19250 ${cf_cv_main_return:-return}(foo != 0);
19257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259 (eval $ac_link) 2>&5
19261 echo "$as_me:19261: \$? = $ac_status" >&5
19262 (exit "$ac_status"); } &&
19263 { ac_try='test -s "conftest$ac_exeext"'
19264 { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265 (eval $ac_try) 2>&5
19267 echo "$as_me:19267: \$? = $ac_status" >&5
19268 (exit "$ac_status"); }; }; then
19271 echo "$as_me: failed program was:" >&5
19272 cat "conftest.$ac_ext" >&5
19275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19277 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19281 # use the computed/retrieved cache-value:
19282 eval 'cf_result=$cf_cv_func_'$cf_func
19283 echo "$as_me:19283: result: $cf_result" >&5
19284 echo "${ECHO_T}$cf_result" >&6
19285 if test "$cf_result" != no; then
19286 cat >>confdefs.h <<EOF
19287 #define HAVE_${cf_tr_func} 1
19293 if test "x$cf_cv_func_tputs" = xyes
19296 for cf_arg in int char
19298 for cf_ret in int void
19300 if test "$cf_ret" = void
19302 cf_return="/* nothing */"
19304 cf_return="return value"
19306 cat >"conftest.$ac_ext" <<_ACEOF
19307 #line 19307 "configure"
19308 #include "confdefs.h"
19310 #include <${cf_cv_ncurses_header:-curses.h}>
19311 #include <$cf_cv_term_header>
19313 static $cf_ret outc($cf_arg value) { $cf_return; }
19319 tputs("hello", 0, outc);
19320 ${cf_cv_main_return:-return}(0);
19326 rm -f "conftest.$ac_objext"
19327 if { (eval echo "$as_me:19327: \"$ac_compile\"") >&5
19328 (eval $ac_compile) 2>&5
19330 echo "$as_me:19330: \$? = $ac_status" >&5
19331 (exit "$ac_status"); } &&
19332 { ac_try='test -s "conftest.$ac_objext"'
19333 { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334 (eval $ac_try) 2>&5
19336 echo "$as_me:19336: \$? = $ac_status" >&5
19337 (exit "$ac_status"); }; }; then
19339 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19341 echo "${as_me:-configure}:19341: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19343 cat >>confdefs.h <<EOF
19344 #define TPUTS_ARG $cf_arg
19345 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19346 #define TPUTS_RETURN(value) $cf_return
19352 echo "$as_me: failed program was:" >&5
19353 cat "conftest.$ac_ext" >&5
19355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19357 test "$cf_done" = yes && break
19361 echo "$as_me:19361: checking for ncurses extended functions" >&5
19362 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19363 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19364 echo $ECHO_N "(cached) $ECHO_C" >&6
19367 cat >"conftest.$ac_ext" <<_ACEOF
19368 #line 19368 "configure"
19369 #include "confdefs.h"
19371 #include <${cf_cv_ncurses_header:-curses.h}>
19376 int x = NCURSES_EXT_FUNCS
19382 rm -f "conftest.$ac_objext"
19383 if { (eval echo "$as_me:19383: \"$ac_compile\"") >&5
19384 (eval $ac_compile) 2>&5
19386 echo "$as_me:19386: \$? = $ac_status" >&5
19387 (exit "$ac_status"); } &&
19388 { ac_try='test -s "conftest.$ac_objext"'
19389 { (eval echo "$as_me:19389: \"$ac_try\"") >&5
19390 (eval $ac_try) 2>&5
19392 echo "$as_me:19392: \$? = $ac_status" >&5
19393 (exit "$ac_status"); }; }; then
19394 cf_cv_ncurses_ext_funcs=defined
19396 echo "$as_me: failed program was:" >&5
19397 cat "conftest.$ac_ext" >&5
19399 cat >"conftest.$ac_ext" <<_ACEOF
19400 #line 19400 "configure"
19401 #include "confdefs.h"
19403 #include <${cf_cv_ncurses_header:-curses.h}>
19408 (void) assume_default_colors (0, 0);
19409 (void) curses_version ();
19410 (void) define_key (0, 0);
19411 (void) is_term_resized (0, 0);
19412 (void) key_defined (0);
19413 (void) keybound (0, 0);
19414 (void) keyok (0, 0);
19415 (void) resize_term (0, 0);
19416 (void) resizeterm (0, 0);
19417 (void) use_default_colors ();
19418 (void) use_extended_names (0);
19419 (void) wresize (0, 0, 0);
19424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19425 if { (eval echo "$as_me:19425: \"$ac_link\"") >&5
19426 (eval $ac_link) 2>&5
19428 echo "$as_me:19428: \$? = $ac_status" >&5
19429 (exit "$ac_status"); } &&
19430 { ac_try='test -s "conftest$ac_exeext"'
19431 { (eval echo "$as_me:19431: \"$ac_try\"") >&5
19432 (eval $ac_try) 2>&5
19434 echo "$as_me:19434: \$? = $ac_status" >&5
19435 (exit "$ac_status"); }; }; then
19436 cf_cv_ncurses_ext_funcs=yes
19438 echo "$as_me: failed program was:" >&5
19439 cat "conftest.$ac_ext" >&5
19440 cf_cv_ncurses_ext_funcs=no
19442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19448 echo "$as_me:19448: result: $cf_cv_ncurses_ext_funcs" >&5
19449 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19450 test "$cf_cv_ncurses_ext_funcs" = yes &&
19451 cat >>confdefs.h <<\EOF
19452 #define NCURSES_EXT_FUNCS 1
19455 if test "$cf_enable_widec" = yes
19457 # workaround for systems with ncurses before 20111029, due to change of
19458 # feature test macro from _XPG5 to _XOPEN_SOURCE
19459 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19462 echo "$as_me:19462: checking if _XPG5 should be defined to enable wide-characters" >&5
19463 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19465 cat >"conftest.$ac_ext" <<_ACEOF
19466 #line 19466 "configure"
19467 #include "confdefs.h"
19469 #include <${cf_cv_ncurses_header:-curses.h}>
19478 rm -f "conftest.$ac_objext"
19479 if { (eval echo "$as_me:19479: \"$ac_compile\"") >&5
19480 (eval $ac_compile) 2>&5
19482 echo "$as_me:19482: \$? = $ac_status" >&5
19483 (exit "$ac_status"); } &&
19484 { ac_try='test -s "conftest.$ac_objext"'
19485 { (eval echo "$as_me:19485: \"$ac_try\"") >&5
19486 (eval $ac_try) 2>&5
19488 echo "$as_me:19488: \$? = $ac_status" >&5
19489 (exit "$ac_status"); }; }; then
19492 echo "$as_me: failed program was:" >&5
19493 cat "conftest.$ac_ext" >&5
19494 cf_save_cppflags="$CPPFLAGS"
19495 CPPFLAGS="$CPPFLAGS -D_XPG5"
19496 cat >"conftest.$ac_ext" <<_ACEOF
19497 #line 19497 "configure"
19498 #include "confdefs.h"
19500 #include <${cf_cv_ncurses_header:-curses.h}>
19509 rm -f "conftest.$ac_objext"
19510 if { (eval echo "$as_me:19510: \"$ac_compile\"") >&5
19511 (eval $ac_compile) 2>&5
19513 echo "$as_me:19513: \$? = $ac_status" >&5
19514 (exit "$ac_status"); } &&
19515 { ac_try='test -s "conftest.$ac_objext"'
19516 { (eval echo "$as_me:19516: \"$ac_try\"") >&5
19517 (eval $ac_try) 2>&5
19519 echo "$as_me:19519: \$? = $ac_status" >&5
19520 (exit "$ac_status"); }; }; then
19523 echo "$as_me: failed program was:" >&5
19524 cat "conftest.$ac_ext" >&5
19526 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19527 CPPFLAGS="$cf_save_cppflags"
19529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19530 echo "$as_me:19530: result: $cf_define_xpg5" >&5
19531 echo "${ECHO_T}$cf_define_xpg5" >&6
19533 if test "$cf_define_xpg5" = yes
19535 CPPFLAGS="$CPPFLAGS -D_XPG5"
19539 echo "$as_me:19539: checking for wide-character functions" >&5
19540 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19541 if test "${cf_cv_widechar_funcs+set}" = set; then
19542 echo $ECHO_N "(cached) $ECHO_C" >&6
19545 cat >"conftest.$ac_ext" <<_ACEOF
19546 #line 19546 "configure"
19547 #include "confdefs.h"
19549 #include <${cf_cv_ncurses_header:-curses.h}>
19554 static wchar_t src_wchar[2];
19555 static cchar_t dst_cchar;
19556 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19562 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19563 if { (eval echo "$as_me:19563: \"$ac_link\"") >&5
19564 (eval $ac_link) 2>&5
19566 echo "$as_me:19566: \$? = $ac_status" >&5
19567 (exit "$ac_status"); } &&
19568 { ac_try='test -s "conftest$ac_exeext"'
19569 { (eval echo "$as_me:19569: \"$ac_try\"") >&5
19570 (eval $ac_try) 2>&5
19572 echo "$as_me:19572: \$? = $ac_status" >&5
19573 (exit "$ac_status"); }; }; then
19574 cf_cv_widechar_funcs=yes
19576 echo "$as_me: failed program was:" >&5
19577 cat "conftest.$ac_ext" >&5
19578 cf_cv_widechar_funcs=no
19580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19583 echo "$as_me:19583: result: $cf_cv_widechar_funcs" >&5
19584 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19585 if test "$cf_cv_widechar_funcs" != no ; then
19587 cat >>confdefs.h <<\EOF
19588 #define USE_WIDEC_SUPPORT 1
19592 cat >>confdefs.h <<\EOF
19593 #define USE_WIDEC_SUPPORT 0
19598 cat >>confdefs.h <<\EOF
19599 #define USE_WIDEC_SUPPORT 0
19604 echo "$as_me:19604: checking if $cf_cv_screen library uses pthreads" >&5
19605 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19606 if test "${cf_cv_use_pthreads+set}" = set; then
19607 echo $ECHO_N "(cached) $ECHO_C" >&6
19610 cat >"conftest.$ac_ext" <<_ACEOF
19611 #line 19611 "configure"
19612 #include "confdefs.h"
19614 #include <${cf_cv_ncurses_header:-curses.h}>
19615 extern void _nc_init_pthreads(void);
19622 _nc_init_pthreads();
19628 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19629 if { (eval echo "$as_me:19629: \"$ac_link\"") >&5
19630 (eval $ac_link) 2>&5
19632 echo "$as_me:19632: \$? = $ac_status" >&5
19633 (exit "$ac_status"); } &&
19634 { ac_try='test -s "conftest$ac_exeext"'
19635 { (eval echo "$as_me:19635: \"$ac_try\"") >&5
19636 (eval $ac_try) 2>&5
19638 echo "$as_me:19638: \$? = $ac_status" >&5
19639 (exit "$ac_status"); }; }; then
19640 cf_cv_use_pthreads=yes
19642 echo "$as_me: failed program was:" >&5
19643 cat "conftest.$ac_ext" >&5
19644 cf_cv_use_pthreads=no
19646 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19649 echo "$as_me:19649: result: $cf_cv_use_pthreads" >&5
19650 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19651 test $cf_cv_use_pthreads = yes &&
19652 cat >>confdefs.h <<\EOF
19653 #define USE_PTHREADS 1
19656 echo "$as_me:19656: checking if sys/time.h works with sys/select.h" >&5
19657 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19658 if test "${cf_cv_sys_time_select+set}" = set; then
19659 echo $ECHO_N "(cached) $ECHO_C" >&6
19662 cat >"conftest.$ac_ext" <<_ACEOF
19663 #line 19663 "configure"
19664 #include "confdefs.h"
19666 #include <sys/types.h>
19667 #ifdef HAVE_SYS_TIME_H
19668 #include <sys/time.h>
19670 #ifdef HAVE_SYS_SELECT_H
19671 #include <sys/select.h>
19682 rm -f "conftest.$ac_objext"
19683 if { (eval echo "$as_me:19683: \"$ac_compile\"") >&5
19684 (eval $ac_compile) 2>&5
19686 echo "$as_me:19686: \$? = $ac_status" >&5
19687 (exit "$ac_status"); } &&
19688 { ac_try='test -s "conftest.$ac_objext"'
19689 { (eval echo "$as_me:19689: \"$ac_try\"") >&5
19690 (eval $ac_try) 2>&5
19692 echo "$as_me:19692: \$? = $ac_status" >&5
19693 (exit "$ac_status"); }; }; then
19694 cf_cv_sys_time_select=yes
19696 echo "$as_me: failed program was:" >&5
19697 cat "conftest.$ac_ext" >&5
19698 cf_cv_sys_time_select=no
19700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19704 echo "$as_me:19704: result: $cf_cv_sys_time_select" >&5
19705 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19706 test "$cf_cv_sys_time_select" = yes &&
19707 cat >>confdefs.h <<\EOF
19708 #define HAVE_SYS_TIME_SELECT 1
19711 # special check for test/ditto.c
19713 echo "$as_me:19713: checking for openpty in -lutil" >&5
19714 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19715 if test "${ac_cv_lib_util_openpty+set}" = set; then
19716 echo $ECHO_N "(cached) $ECHO_C" >&6
19718 ac_check_lib_save_LIBS=$LIBS
19719 LIBS="-lutil $LIBS"
19720 cat >"conftest.$ac_ext" <<_ACEOF
19721 #line 19721 "configure"
19722 #include "confdefs.h"
19724 /* Override any gcc2 internal prototype to avoid an error. */
19728 /* We use char because int might match the return type of a gcc2
19729 builtin and then its argument prototype would still apply. */
19739 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19740 if { (eval echo "$as_me:19740: \"$ac_link\"") >&5
19741 (eval $ac_link) 2>&5
19743 echo "$as_me:19743: \$? = $ac_status" >&5
19744 (exit "$ac_status"); } &&
19745 { ac_try='test -s "conftest$ac_exeext"'
19746 { (eval echo "$as_me:19746: \"$ac_try\"") >&5
19747 (eval $ac_try) 2>&5
19749 echo "$as_me:19749: \$? = $ac_status" >&5
19750 (exit "$ac_status"); }; }; then
19751 ac_cv_lib_util_openpty=yes
19753 echo "$as_me: failed program was:" >&5
19754 cat "conftest.$ac_ext" >&5
19755 ac_cv_lib_util_openpty=no
19757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19758 LIBS=$ac_check_lib_save_LIBS
19760 echo "$as_me:19760: result: $ac_cv_lib_util_openpty" >&5
19761 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19762 if test "$ac_cv_lib_util_openpty" = yes; then
19768 echo "$as_me:19768: checking for openpty header" >&5
19769 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19770 if test "${cf_cv_func_openpty+set}" = set; then
19771 echo $ECHO_N "(cached) $ECHO_C" >&6
19774 cf_save_LIBS="$LIBS"
19775 test "$cf_cv_lib_util" = yes && {
19776 cf_add_libs="$LIBS"
19779 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19780 # filter duplicates
19781 for cf_add_1lib in $cf_add_0lib; do
19782 for cf_add_2lib in $cf_add_libs; do
19783 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19788 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19790 LIBS="$cf_add_libs"
19792 for cf_header in pty.h libutil.h util.h
19794 cat >"conftest.$ac_ext" <<_ACEOF
19795 #line 19795 "configure"
19796 #include "confdefs.h"
19798 #include <$cf_header>
19804 int x = openpty((int *)0, (int *)0, (char *)0,
19805 (struct termios *)0, (struct winsize *)0);
19811 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19812 if { (eval echo "$as_me:19812: \"$ac_link\"") >&5
19813 (eval $ac_link) 2>&5
19815 echo "$as_me:19815: \$? = $ac_status" >&5
19816 (exit "$ac_status"); } &&
19817 { ac_try='test -s "conftest$ac_exeext"'
19818 { (eval echo "$as_me:19818: \"$ac_try\"") >&5
19819 (eval $ac_try) 2>&5
19821 echo "$as_me:19821: \$? = $ac_status" >&5
19822 (exit "$ac_status"); }; }; then
19824 cf_cv_func_openpty=$cf_header
19828 echo "$as_me: failed program was:" >&5
19829 cat "conftest.$ac_ext" >&5
19831 cf_cv_func_openpty=no
19834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19836 LIBS="$cf_save_LIBS"
19839 echo "$as_me:19839: result: $cf_cv_func_openpty" >&5
19840 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19842 if test "$cf_cv_func_openpty" != no ; then
19844 cat >>confdefs.h <<EOF
19845 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19848 cat >>confdefs.h <<\EOF
19849 #define USE_XTERM_PTY 1
19852 if test "x$cf_cv_lib_util" = xyes ; then
19854 cf_add_libs="$TEST_LIBS"
19857 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19858 # filter duplicates
19859 for cf_add_1lib in $cf_add_0lib; do
19860 for cf_add_2lib in $cf_add_libs; do
19861 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19866 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19868 TEST_LIBS="$cf_add_libs"
19873 echo "$as_me:19873: checking for function curses_version" >&5
19874 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19875 if test "${cf_cv_func_curses_version+set}" = set; then
19876 echo $ECHO_N "(cached) $ECHO_C" >&6
19879 if test "$cross_compiling" = yes; then
19880 cf_cv_func_curses_version=unknown
19882 cat >"conftest.$ac_ext" <<_ACEOF
19883 #line 19883 "configure"
19884 #include "confdefs.h"
19886 #include <${cf_cv_ncurses_header:-curses.h}>
19890 sprintf(temp, "%s\\n", curses_version());
19891 ${cf_cv_main_return:-return}(0);
19895 rm -f "conftest$ac_exeext"
19896 if { (eval echo "$as_me:19896: \"$ac_link\"") >&5
19897 (eval $ac_link) 2>&5
19899 echo "$as_me:19899: \$? = $ac_status" >&5
19900 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19901 { (eval echo "$as_me:19901: \"$ac_try\"") >&5
19902 (eval $ac_try) 2>&5
19904 echo "$as_me:19904: \$? = $ac_status" >&5
19905 (exit "$ac_status"); }; }; then
19906 cf_cv_func_curses_version=yes
19909 echo "$as_me: program exited with status $ac_status" >&5
19910 echo "$as_me: failed program was:" >&5
19911 cat "conftest.$ac_ext" >&5
19912 cf_cv_func_curses_version=no
19915 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19919 echo "$as_me:19919: result: $cf_cv_func_curses_version" >&5
19920 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19921 test "$cf_cv_func_curses_version" = yes &&
19922 cat >>confdefs.h <<\EOF
19923 #define HAVE_CURSES_VERSION 1
19926 echo "$as_me:19926: checking for alternate character set array" >&5
19927 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19928 if test "${cf_cv_curses_acs_map+set}" = set; then
19929 echo $ECHO_N "(cached) $ECHO_C" >&6
19932 cf_cv_curses_acs_map=unknown
19933 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19935 cat >"conftest.$ac_ext" <<_ACEOF
19936 #line 19936 "configure"
19937 #include "confdefs.h"
19939 #include <${cf_cv_ncurses_header:-curses.h}>
19945 ${name}['k'] = ACS_PLUS
19951 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19952 if { (eval echo "$as_me:19952: \"$ac_link\"") >&5
19953 (eval $ac_link) 2>&5
19955 echo "$as_me:19955: \$? = $ac_status" >&5
19956 (exit "$ac_status"); } &&
19957 { ac_try='test -s "conftest$ac_exeext"'
19958 { (eval echo "$as_me:19958: \"$ac_try\"") >&5
19959 (eval $ac_try) 2>&5
19961 echo "$as_me:19961: \$? = $ac_status" >&5
19962 (exit "$ac_status"); }; }; then
19963 cf_cv_curses_acs_map=$name; break
19965 echo "$as_me: failed program was:" >&5
19966 cat "conftest.$ac_ext" >&5
19968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19972 echo "$as_me:19972: result: $cf_cv_curses_acs_map" >&5
19973 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19975 test "$cf_cv_curses_acs_map" != unknown &&
19976 cat >>confdefs.h <<EOF
19977 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19980 if test "$cf_enable_widec" = yes; then
19982 echo "$as_me:19982: checking for wide alternate character set array" >&5
19983 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19984 if test "${cf_cv_curses_wacs_map+set}" = set; then
19985 echo $ECHO_N "(cached) $ECHO_C" >&6
19988 cf_cv_curses_wacs_map=unknown
19989 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19991 cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19995 #ifndef _XOPEN_SOURCE_EXTENDED
19996 #define _XOPEN_SOURCE_EXTENDED
19998 #include <${cf_cv_ncurses_header:-curses.h}>
20002 void *foo = &(${name}['k']); (void)foo
20007 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20008 if { (eval echo "$as_me:20008: \"$ac_link\"") >&5
20009 (eval $ac_link) 2>&5
20011 echo "$as_me:20011: \$? = $ac_status" >&5
20012 (exit "$ac_status"); } &&
20013 { ac_try='test -s "conftest$ac_exeext"'
20014 { (eval echo "$as_me:20014: \"$ac_try\"") >&5
20015 (eval $ac_try) 2>&5
20017 echo "$as_me:20017: \$? = $ac_status" >&5
20018 (exit "$ac_status"); }; }; then
20019 cf_cv_curses_wacs_map=$name
20022 echo "$as_me: failed program was:" >&5
20023 cat "conftest.$ac_ext" >&5
20025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20028 echo "$as_me:20028: result: $cf_cv_curses_wacs_map" >&5
20029 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20031 test "$cf_cv_curses_wacs_map" != unknown &&
20032 cat >>confdefs.h <<EOF
20033 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20036 echo "$as_me:20036: checking for wide alternate character constants" >&5
20037 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20038 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20039 echo $ECHO_N "(cached) $ECHO_C" >&6
20042 cf_cv_curses_wacs_symbols=no
20043 if test "$cf_cv_curses_wacs_map" != unknown
20045 cat >"conftest.$ac_ext" <<_ACEOF
20046 #line 20046 "configure"
20047 #include "confdefs.h"
20049 #ifndef _XOPEN_SOURCE_EXTENDED
20050 #define _XOPEN_SOURCE_EXTENDED
20052 #include <${cf_cv_ncurses_header:-curses.h}>
20056 cchar_t *foo = WACS_PLUS;
20057 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20062 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20063 if { (eval echo "$as_me:20063: \"$ac_link\"") >&5
20064 (eval $ac_link) 2>&5
20066 echo "$as_me:20066: \$? = $ac_status" >&5
20067 (exit "$ac_status"); } &&
20068 { ac_try='test -s "conftest$ac_exeext"'
20069 { (eval echo "$as_me:20069: \"$ac_try\"") >&5
20070 (eval $ac_try) 2>&5
20072 echo "$as_me:20072: \$? = $ac_status" >&5
20073 (exit "$ac_status"); }; }; then
20074 cf_cv_curses_wacs_symbols=yes
20076 echo "$as_me: failed program was:" >&5
20077 cat "conftest.$ac_ext" >&5
20079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20081 cat >"conftest.$ac_ext" <<_ACEOF
20082 #line 20082 "configure"
20083 #include "confdefs.h"
20085 #ifndef _XOPEN_SOURCE_EXTENDED
20086 #define _XOPEN_SOURCE_EXTENDED
20088 #include <${cf_cv_ncurses_header:-curses.h}>
20092 cchar_t *foo = WACS_PLUS; (void)foo
20097 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20098 if { (eval echo "$as_me:20098: \"$ac_link\"") >&5
20099 (eval $ac_link) 2>&5
20101 echo "$as_me:20101: \$? = $ac_status" >&5
20102 (exit "$ac_status"); } &&
20103 { ac_try='test -s "conftest$ac_exeext"'
20104 { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105 (eval $ac_try) 2>&5
20107 echo "$as_me:20107: \$? = $ac_status" >&5
20108 (exit "$ac_status"); }; }; then
20109 cf_cv_curses_wacs_symbols=yes
20111 echo "$as_me: failed program was:" >&5
20112 cat "conftest.$ac_ext" >&5
20114 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20118 echo "$as_me:20118: result: $cf_cv_curses_wacs_symbols" >&5
20119 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20121 test "$cf_cv_curses_wacs_symbols" != no &&
20122 cat >>confdefs.h <<\EOF
20123 #define CURSES_WACS_SYMBOLS 1
20128 echo "$as_me:20128: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20129 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20130 cat >"conftest.$ac_ext" <<_ACEOF
20131 #line 20131 "configure"
20132 #include "confdefs.h"
20134 #ifndef _XOPEN_SOURCE_EXTENDED
20135 #define _XOPEN_SOURCE_EXTENDED
20137 #include <${cf_cv_ncurses_header:-curses.h}>
20148 rm -f "conftest.$ac_objext"
20149 if { (eval echo "$as_me:20149: \"$ac_compile\"") >&5
20150 (eval $ac_compile) 2>&5
20152 echo "$as_me:20152: \$? = $ac_status" >&5
20153 (exit "$ac_status"); } &&
20154 { ac_try='test -s "conftest.$ac_objext"'
20155 { (eval echo "$as_me:20155: \"$ac_try\"") >&5
20156 (eval $ac_try) 2>&5
20158 echo "$as_me:20158: \$? = $ac_status" >&5
20159 (exit "$ac_status"); }; }; then
20162 echo "$as_me: failed program was:" >&5
20163 cat "conftest.$ac_ext" >&5
20166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20167 echo "$as_me:20167: result: $cf_result" >&5
20168 echo "${ECHO_T}$cf_result" >&6
20169 if test "$cf_result" = yes ; then
20171 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20173 cat >>confdefs.h <<EOF
20174 #define $cf_result 1
20179 cat >>confdefs.h <<EOF
20180 #define attr_t long
20185 if test "$cf_enable_widec" = yes; then
20187 # This is needed on Tru64 5.0 to declare mbstate_t
20188 echo "$as_me:20188: checking if we must include wchar.h to declare mbstate_t" >&5
20189 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20190 if test "${cf_cv_mbstate_t+set}" = set; then
20191 echo $ECHO_N "(cached) $ECHO_C" >&6
20194 cat >"conftest.$ac_ext" <<_ACEOF
20195 #line 20195 "configure"
20196 #include "confdefs.h"
20198 #include <stdlib.h>
20199 #include <stdarg.h>
20201 #ifdef HAVE_LIBUTF8_H
20202 #include <libutf8.h>
20212 rm -f "conftest.$ac_objext"
20213 if { (eval echo "$as_me:20213: \"$ac_compile\"") >&5
20214 (eval $ac_compile) 2>&5
20216 echo "$as_me:20216: \$? = $ac_status" >&5
20217 (exit "$ac_status"); } &&
20218 { ac_try='test -s "conftest.$ac_objext"'
20219 { (eval echo "$as_me:20219: \"$ac_try\"") >&5
20220 (eval $ac_try) 2>&5
20222 echo "$as_me:20222: \$? = $ac_status" >&5
20223 (exit "$ac_status"); }; }; then
20226 echo "$as_me: failed program was:" >&5
20227 cat "conftest.$ac_ext" >&5
20228 cat >"conftest.$ac_ext" <<_ACEOF
20229 #line 20229 "configure"
20230 #include "confdefs.h"
20232 #include <stdlib.h>
20233 #include <stdarg.h>
20236 #ifdef HAVE_LIBUTF8_H
20237 #include <libutf8.h>
20247 rm -f "conftest.$ac_objext"
20248 if { (eval echo "$as_me:20248: \"$ac_compile\"") >&5
20249 (eval $ac_compile) 2>&5
20251 echo "$as_me:20251: \$? = $ac_status" >&5
20252 (exit "$ac_status"); } &&
20253 { ac_try='test -s "conftest.$ac_objext"'
20254 { (eval echo "$as_me:20254: \"$ac_try\"") >&5
20255 (eval $ac_try) 2>&5
20257 echo "$as_me:20257: \$? = $ac_status" >&5
20258 (exit "$ac_status"); }; }; then
20259 cf_cv_mbstate_t=yes
20261 echo "$as_me: failed program was:" >&5
20262 cat "conftest.$ac_ext" >&5
20263 cf_cv_mbstate_t=unknown
20265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20269 echo "$as_me:20269: result: $cf_cv_mbstate_t" >&5
20270 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20272 if test "$cf_cv_mbstate_t" = yes ; then
20274 cat >>confdefs.h <<\EOF
20275 #define NEED_WCHAR_H 1
20281 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20282 if test "$cf_cv_mbstate_t" = unknown ; then
20283 NCURSES_MBSTATE_T=1
20286 # if we find mbstate_t in either place, use substitution to provide a fallback.
20287 if test "$cf_cv_mbstate_t" != unknown ; then
20288 NCURSES_OK_MBSTATE_T=1
20291 # This is needed on Tru64 5.0 to declare wchar_t
20292 echo "$as_me:20292: checking if we must include wchar.h to declare wchar_t" >&5
20293 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20294 if test "${cf_cv_wchar_t+set}" = set; then
20295 echo $ECHO_N "(cached) $ECHO_C" >&6
20298 cat >"conftest.$ac_ext" <<_ACEOF
20299 #line 20299 "configure"
20300 #include "confdefs.h"
20302 #include <stdlib.h>
20303 #include <stdarg.h>
20305 #ifdef HAVE_LIBUTF8_H
20306 #include <libutf8.h>
20316 rm -f "conftest.$ac_objext"
20317 if { (eval echo "$as_me:20317: \"$ac_compile\"") >&5
20318 (eval $ac_compile) 2>&5
20320 echo "$as_me:20320: \$? = $ac_status" >&5
20321 (exit "$ac_status"); } &&
20322 { ac_try='test -s "conftest.$ac_objext"'
20323 { (eval echo "$as_me:20323: \"$ac_try\"") >&5
20324 (eval $ac_try) 2>&5
20326 echo "$as_me:20326: \$? = $ac_status" >&5
20327 (exit "$ac_status"); }; }; then
20330 echo "$as_me: failed program was:" >&5
20331 cat "conftest.$ac_ext" >&5
20332 cat >"conftest.$ac_ext" <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20336 #include <stdlib.h>
20337 #include <stdarg.h>
20340 #ifdef HAVE_LIBUTF8_H
20341 #include <libutf8.h>
20351 rm -f "conftest.$ac_objext"
20352 if { (eval echo "$as_me:20352: \"$ac_compile\"") >&5
20353 (eval $ac_compile) 2>&5
20355 echo "$as_me:20355: \$? = $ac_status" >&5
20356 (exit "$ac_status"); } &&
20357 { ac_try='test -s "conftest.$ac_objext"'
20358 { (eval echo "$as_me:20358: \"$ac_try\"") >&5
20359 (eval $ac_try) 2>&5
20361 echo "$as_me:20361: \$? = $ac_status" >&5
20362 (exit "$ac_status"); }; }; then
20365 echo "$as_me: failed program was:" >&5
20366 cat "conftest.$ac_ext" >&5
20367 cf_cv_wchar_t=unknown
20369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20373 echo "$as_me:20373: result: $cf_cv_wchar_t" >&5
20374 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20376 if test "$cf_cv_wchar_t" = yes ; then
20378 cat >>confdefs.h <<\EOF
20379 #define NEED_WCHAR_H 1
20385 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20386 if test "$cf_cv_wchar_t" = unknown ; then
20390 # if we find wchar_t in either place, use substitution to provide a fallback.
20391 if test "$cf_cv_wchar_t" != unknown ; then
20392 NCURSES_OK_WCHAR_T=1
20395 # This is needed on Tru64 5.0 to declare wint_t
20396 echo "$as_me:20396: checking if we must include wchar.h to declare wint_t" >&5
20397 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20398 if test "${cf_cv_wint_t+set}" = set; then
20399 echo $ECHO_N "(cached) $ECHO_C" >&6
20402 cat >"conftest.$ac_ext" <<_ACEOF
20403 #line 20403 "configure"
20404 #include "confdefs.h"
20406 #include <stdlib.h>
20407 #include <stdarg.h>
20409 #ifdef HAVE_LIBUTF8_H
20410 #include <libutf8.h>
20420 rm -f "conftest.$ac_objext"
20421 if { (eval echo "$as_me:20421: \"$ac_compile\"") >&5
20422 (eval $ac_compile) 2>&5
20424 echo "$as_me:20424: \$? = $ac_status" >&5
20425 (exit "$ac_status"); } &&
20426 { ac_try='test -s "conftest.$ac_objext"'
20427 { (eval echo "$as_me:20427: \"$ac_try\"") >&5
20428 (eval $ac_try) 2>&5
20430 echo "$as_me:20430: \$? = $ac_status" >&5
20431 (exit "$ac_status"); }; }; then
20434 echo "$as_me: failed program was:" >&5
20435 cat "conftest.$ac_ext" >&5
20436 cat >"conftest.$ac_ext" <<_ACEOF
20437 #line 20437 "configure"
20438 #include "confdefs.h"
20440 #include <stdlib.h>
20441 #include <stdarg.h>
20444 #ifdef HAVE_LIBUTF8_H
20445 #include <libutf8.h>
20455 rm -f "conftest.$ac_objext"
20456 if { (eval echo "$as_me:20456: \"$ac_compile\"") >&5
20457 (eval $ac_compile) 2>&5
20459 echo "$as_me:20459: \$? = $ac_status" >&5
20460 (exit "$ac_status"); } &&
20461 { ac_try='test -s "conftest.$ac_objext"'
20462 { (eval echo "$as_me:20462: \"$ac_try\"") >&5
20463 (eval $ac_try) 2>&5
20465 echo "$as_me:20465: \$? = $ac_status" >&5
20466 (exit "$ac_status"); }; }; then
20469 echo "$as_me: failed program was:" >&5
20470 cat "conftest.$ac_ext" >&5
20471 cf_cv_wint_t=unknown
20473 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20477 echo "$as_me:20477: result: $cf_cv_wint_t" >&5
20478 echo "${ECHO_T}$cf_cv_wint_t" >&6
20480 if test "$cf_cv_wint_t" = yes ; then
20482 cat >>confdefs.h <<\EOF
20483 #define NEED_WCHAR_H 1
20489 # if we do not find wint_t in either place, use substitution to provide a fallback.
20490 if test "$cf_cv_wint_t" = unknown ; then
20494 # if we find wint_t in either place, use substitution to provide a fallback.
20495 if test "$cf_cv_wint_t" != unknown ; then
20496 NCURSES_OK_WINT_T=1
20499 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20501 echo "$as_me:20501: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20502 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20503 cat >"conftest.$ac_ext" <<_ACEOF
20504 #line 20504 "configure"
20505 #include "confdefs.h"
20507 #ifndef _XOPEN_SOURCE_EXTENDED
20508 #define _XOPEN_SOURCE_EXTENDED
20510 #include <${cf_cv_ncurses_header:-curses.h}>
20521 rm -f "conftest.$ac_objext"
20522 if { (eval echo "$as_me:20522: \"$ac_compile\"") >&5
20523 (eval $ac_compile) 2>&5
20525 echo "$as_me:20525: \$? = $ac_status" >&5
20526 (exit "$ac_status"); } &&
20527 { ac_try='test -s "conftest.$ac_objext"'
20528 { (eval echo "$as_me:20528: \"$ac_try\"") >&5
20529 (eval $ac_try) 2>&5
20531 echo "$as_me:20531: \$? = $ac_status" >&5
20532 (exit "$ac_status"); }; }; then
20535 echo "$as_me: failed program was:" >&5
20536 cat "conftest.$ac_ext" >&5
20539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20540 echo "$as_me:20540: result: $cf_result" >&5
20541 echo "${ECHO_T}$cf_result" >&6
20542 if test "$cf_result" = yes ; then
20544 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20546 cat >>confdefs.h <<EOF
20547 #define $cf_result 1
20552 cat >>confdefs.h <<EOF
20553 #define mbstate_t long
20560 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20562 echo "$as_me:20562: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20563 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20564 cat >"conftest.$ac_ext" <<_ACEOF
20565 #line 20565 "configure"
20566 #include "confdefs.h"
20568 #ifndef _XOPEN_SOURCE_EXTENDED
20569 #define _XOPEN_SOURCE_EXTENDED
20571 #include <${cf_cv_ncurses_header:-curses.h}>
20582 rm -f "conftest.$ac_objext"
20583 if { (eval echo "$as_me:20583: \"$ac_compile\"") >&5
20584 (eval $ac_compile) 2>&5
20586 echo "$as_me:20586: \$? = $ac_status" >&5
20587 (exit "$ac_status"); } &&
20588 { ac_try='test -s "conftest.$ac_objext"'
20589 { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590 (eval $ac_try) 2>&5
20592 echo "$as_me:20592: \$? = $ac_status" >&5
20593 (exit "$ac_status"); }; }; then
20596 echo "$as_me: failed program was:" >&5
20597 cat "conftest.$ac_ext" >&5
20600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20601 echo "$as_me:20601: result: $cf_result" >&5
20602 echo "${ECHO_T}$cf_result" >&6
20603 if test "$cf_result" = yes ; then
20605 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20607 cat >>confdefs.h <<EOF
20608 #define $cf_result 1
20613 cat >>confdefs.h <<EOF
20614 #define wchar_t long
20621 if test "$NCURSES_OK_WINT_T" = 0 ; then
20623 echo "$as_me:20623: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20624 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20625 cat >"conftest.$ac_ext" <<_ACEOF
20626 #line 20626 "configure"
20627 #include "confdefs.h"
20629 #ifndef _XOPEN_SOURCE_EXTENDED
20630 #define _XOPEN_SOURCE_EXTENDED
20632 #include <${cf_cv_ncurses_header:-curses.h}>
20643 rm -f "conftest.$ac_objext"
20644 if { (eval echo "$as_me:20644: \"$ac_compile\"") >&5
20645 (eval $ac_compile) 2>&5
20647 echo "$as_me:20647: \$? = $ac_status" >&5
20648 (exit "$ac_status"); } &&
20649 { ac_try='test -s "conftest.$ac_objext"'
20650 { (eval echo "$as_me:20650: \"$ac_try\"") >&5
20651 (eval $ac_try) 2>&5
20653 echo "$as_me:20653: \$? = $ac_status" >&5
20654 (exit "$ac_status"); }; }; then
20657 echo "$as_me: failed program was:" >&5
20658 cat "conftest.$ac_ext" >&5
20661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20662 echo "$as_me:20662: result: $cf_result" >&5
20663 echo "${ECHO_T}$cf_result" >&6
20664 if test "$cf_result" = yes ; then
20666 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20668 cat >>confdefs.h <<EOF
20669 #define $cf_result 1
20674 cat >>confdefs.h <<EOF
20675 #define wint_t long
20691 echo "$as_me:20691: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20692 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20694 cat >"conftest.$ac_ext" <<_ACEOF
20695 #line 20695 "configure"
20696 #include "confdefs.h"
20698 #ifdef HAVE_XCURSES
20699 #include <xcurses.h>
20700 char * XCursesProgramName = "test";
20702 #include <${cf_cv_ncurses_header:-curses.h}>
20703 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20704 #include <ncursesw/term.h>
20705 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20706 #include <ncurses/term.h>
20707 #elif defined(HAVE_TERM_H)
20716 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20717 const void *foo = (const void *)($cf_data);
20719 const void *foo = &($cf_data);
20721 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20727 rm -f "conftest.$ac_objext"
20728 if { (eval echo "$as_me:20728: \"$ac_compile\"") >&5
20729 (eval $ac_compile) 2>&5
20731 echo "$as_me:20731: \$? = $ac_status" >&5
20732 (exit "$ac_status"); } &&
20733 { ac_try='test -s "conftest.$ac_objext"'
20734 { (eval echo "$as_me:20734: \"$ac_try\"") >&5
20735 (eval $ac_try) 2>&5
20737 echo "$as_me:20737: \$? = $ac_status" >&5
20738 (exit "$ac_status"); }; }; then
20742 echo "$as_me: failed program was:" >&5
20743 cat "conftest.$ac_ext" >&5
20746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20747 echo "$as_me:20747: result: $cf_result" >&5
20748 echo "${ECHO_T}$cf_result" >&6
20750 if test "$cf_result" = yes ; then
20752 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20754 cat >>confdefs.h <<EOF
20755 #define $cf_result 1
20759 echo "$as_me:20759: checking for data $cf_data in library" >&5
20760 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20761 # BSD linkers insist on making weak linkage, but resolve at runtime.
20762 if test "$cross_compiling" = yes; then
20765 cat >"conftest.$ac_ext" <<_ACEOF
20766 #line 20766 "configure"
20767 #include "confdefs.h"
20769 #ifdef HAVE_XCURSES
20770 #include <xcurses.h>
20771 char * XCursesProgramName = "test";
20773 #include <${cf_cv_ncurses_header:-curses.h}>
20774 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20775 #include <ncursesw/term.h>
20776 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20777 #include <ncurses/term.h>
20778 #elif defined(HAVE_TERM_H)
20783 extern char $cf_data;
20790 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20791 const void *foo = (const void *)($cf_data);
20793 const void *foo = &($cf_data);
20795 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20797 ${cf_cv_main_return:-return}(foo == 0);
20804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20805 if { (eval echo "$as_me:20805: \"$ac_link\"") >&5
20806 (eval $ac_link) 2>&5
20808 echo "$as_me:20808: \$? = $ac_status" >&5
20809 (exit "$ac_status"); } &&
20810 { ac_try='test -s "conftest$ac_exeext"'
20811 { (eval echo "$as_me:20811: \"$ac_try\"") >&5
20812 (eval $ac_try) 2>&5
20814 echo "$as_me:20814: \$? = $ac_status" >&5
20815 (exit "$ac_status"); }; }; then
20818 echo "$as_me: failed program was:" >&5
20819 cat "conftest.$ac_ext" >&5
20822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20825 cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20829 #ifdef HAVE_XCURSES
20830 #include <xcurses.h>
20831 char * XCursesProgramName = "test";
20833 #include <${cf_cv_ncurses_header:-curses.h}>
20834 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20835 #include <ncursesw/term.h>
20836 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20837 #include <ncurses/term.h>
20838 #elif defined(HAVE_TERM_H)
20843 extern char $cf_data;
20847 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20848 const void *foo = (const void *)($cf_data);
20850 const void *foo = &($cf_data);
20852 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20854 ${cf_cv_main_return:-return}(foo == 0);
20857 rm -f "conftest$ac_exeext"
20858 if { (eval echo "$as_me:20858: \"$ac_link\"") >&5
20859 (eval $ac_link) 2>&5
20861 echo "$as_me:20861: \$? = $ac_status" >&5
20862 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20863 { (eval echo "$as_me:20863: \"$ac_try\"") >&5
20864 (eval $ac_try) 2>&5
20866 echo "$as_me:20866: \$? = $ac_status" >&5
20867 (exit "$ac_status"); }; }; then
20871 echo "$as_me: program exited with status $ac_status" >&5
20872 echo "$as_me: failed program was:" >&5
20873 cat "conftest.$ac_ext" >&5
20876 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20878 echo "$as_me:20878: result: $cf_result" >&5
20879 echo "${ECHO_T}$cf_result" >&6
20880 if test "$cf_result" = yes ; then
20882 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20884 cat >>confdefs.h <<EOF
20885 #define $cf_result 1
20888 # do not exit loop here, since we prefer system's declarations
20893 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20895 echo "$as_me:20895: checking for X" >&5
20896 echo $ECHO_N "checking for X... $ECHO_C" >&6
20898 # Check whether --with-x or --without-x was given.
20899 if test "${with_x+set}" = set; then
20903 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20904 if test "x$with_x" = xno; then
20905 # The user explicitly disabled X.
20908 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20909 # Both variables are already set.
20912 if test "${ac_cv_have_x+set}" = set; then
20913 echo $ECHO_N "(cached) $ECHO_C" >&6
20915 # One or both of the vars are not set, and there is no cached value.
20916 ac_x_includes=no ac_x_libraries=no
20917 rm -fr conftest.dir
20918 if mkdir conftest.dir; then
20920 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20921 cat >Imakefile <<'EOF'
20923 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20925 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20927 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20928 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20929 for ac_extension in a so sl dylib dll; do
20930 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20931 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20932 ac_im_usrlibdir=$ac_im_libdir; break
20935 # Screen out bogus values from the imake configuration. They are
20936 # bogus both because they are the default anyway, and because
20937 # using them would break gcc on systems where it needs fixed includes.
20938 case $ac_im_incroot in
20940 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20942 case $ac_im_usrlibdir in
20943 /usr/lib | /lib) ;;
20944 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20948 rm -fr conftest.dir
20951 # Standard set of common directories for X headers.
20952 # Check X11 before X11Rn because it is often a symlink to the current release.
20969 /usr/local/X11/include
20970 /usr/local/X11R7/include
20971 /usr/local/X11R6/include
20972 /usr/local/X11R5/include
20973 /usr/local/X11R4/include
20975 /usr/local/include/X11
20976 /usr/local/include/X11R7
20977 /usr/local/include/X11R6
20978 /usr/local/include/X11R5
20979 /usr/local/include/X11R4
20983 /usr/XFree86/include/X11
20987 /usr/unsupported/include
20988 /usr/athena/include
20989 /usr/local/x11r5/include
20990 /usr/lpp/Xamples/include
20992 /usr/openwin/include
20993 /usr/openwin/share/include'
20995 if test "$ac_x_includes" = no; then
20996 # Guess where to find include files, by looking for Intrinsic.h.
20997 # First, try using that file with no special directory specified.
20998 cat >"conftest.$ac_ext" <<_ACEOF
20999 #line 20999 "configure"
21000 #include "confdefs.h"
21001 #include <X11/Intrinsic.h>
21003 if { (eval echo "$as_me:21003: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21004 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21006 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21008 cat conftest.err >&5
21009 echo "$as_me:21009: \$? = $ac_status" >&5
21010 (exit "$ac_status"); } >/dev/null; then
21011 if test -s conftest.err; then
21012 ac_cpp_err=$ac_c_preproc_warn_flag
21019 if test -z "$ac_cpp_err"; then
21020 # We can compile using X headers with no special include directory.
21023 echo "$as_me: failed program was:" >&5
21024 cat "conftest.$ac_ext" >&5
21025 for ac_dir in $ac_x_header_dirs; do
21026 if test -r "$ac_dir/X11/Intrinsic.h"; then
21027 ac_x_includes=$ac_dir
21032 rm -f conftest.err "conftest.$ac_ext"
21033 fi # $ac_x_includes = no
21035 if test "$ac_x_libraries" = no; then
21036 # Check for the libraries.
21037 # See if we find them without any special options.
21038 # Don't add to $LIBS permanently.
21041 cat >"conftest.$ac_ext" <<_ACEOF
21042 #line 21042 "configure"
21043 #include "confdefs.h"
21044 #include <X11/Intrinsic.h>
21053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21054 if { (eval echo "$as_me:21054: \"$ac_link\"") >&5
21055 (eval $ac_link) 2>&5
21057 echo "$as_me:21057: \$? = $ac_status" >&5
21058 (exit "$ac_status"); } &&
21059 { ac_try='test -s "conftest$ac_exeext"'
21060 { (eval echo "$as_me:21060: \"$ac_try\"") >&5
21061 (eval $ac_try) 2>&5
21063 echo "$as_me:21063: \$? = $ac_status" >&5
21064 (exit "$ac_status"); }; }; then
21066 # We can link X programs with no special library path.
21069 echo "$as_me: failed program was:" >&5
21070 cat "conftest.$ac_ext" >&5
21072 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
21074 # Don't even attempt the hair of trying to link an X program!
21075 for ac_extension in a so sl dylib dll; do
21076 if test -r "$ac_dir/libXt.$ac_extension"; then
21077 ac_x_libraries=$ac_dir
21083 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21084 fi # $ac_x_libraries = no
21086 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21087 # Didn't find X anywhere. Cache the known absence of X.
21088 ac_cv_have_x="have_x=no"
21090 # Record where we found X for the cache.
21091 ac_cv_have_x="have_x=yes \
21092 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21097 eval "$ac_cv_have_x"
21100 if test "$have_x" != yes; then
21101 echo "$as_me:21101: result: $have_x" >&5
21102 echo "${ECHO_T}$have_x" >&6
21105 # If each of the values was on the command line, it overrides each guess.
21106 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21107 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21108 # Update the cache value to reflect the command line values.
21109 ac_cv_have_x="have_x=yes \
21110 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21111 echo "$as_me:21111: result: libraries $x_libraries, headers $x_includes" >&5
21112 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21115 if test "$no_x" = yes; then
21116 # Not all programs may use this symbol, but it does not hurt to define it.
21118 cat >>confdefs.h <<\EOF
21119 #define X_DISPLAY_MISSING 1
21127 if test -n "$x_includes"; then
21128 X_CFLAGS="$X_CFLAGS -I$x_includes"
21131 # It would also be nice to do this for all -L options, not just this one.
21132 if test -n "$x_libraries"; then
21133 X_LIBS="$X_LIBS -L$x_libraries"
21134 # For Solaris; some versions of Sun CC require a space after -R and
21135 # others require no space. Words are not sufficient . . . .
21136 case `(uname -sr) 2>/dev/null` in
21138 echo "$as_me:21138: checking whether -R must be followed by a space" >&5
21139 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21140 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21141 cat >"conftest.$ac_ext" <<_ACEOF
21142 #line 21142 "configure"
21143 #include "confdefs.h"
21153 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21154 if { (eval echo "$as_me:21154: \"$ac_link\"") >&5
21155 (eval $ac_link) 2>&5
21157 echo "$as_me:21157: \$? = $ac_status" >&5
21158 (exit "$ac_status"); } &&
21159 { ac_try='test -s "conftest$ac_exeext"'
21160 { (eval echo "$as_me:21160: \"$ac_try\"") >&5
21161 (eval $ac_try) 2>&5
21163 echo "$as_me:21163: \$? = $ac_status" >&5
21164 (exit "$ac_status"); }; }; then
21167 echo "$as_me: failed program was:" >&5
21168 cat "conftest.$ac_ext" >&5
21171 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21172 if test $ac_R_nospace = yes; then
21173 echo "$as_me:21173: result: no" >&5
21174 echo "${ECHO_T}no" >&6
21175 X_LIBS="$X_LIBS -R$x_libraries"
21177 LIBS="$ac_xsave_LIBS -R $x_libraries"
21178 cat >"conftest.$ac_ext" <<_ACEOF
21179 #line 21179 "configure"
21180 #include "confdefs.h"
21190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21191 if { (eval echo "$as_me:21191: \"$ac_link\"") >&5
21192 (eval $ac_link) 2>&5
21194 echo "$as_me:21194: \$? = $ac_status" >&5
21195 (exit "$ac_status"); } &&
21196 { ac_try='test -s "conftest$ac_exeext"'
21197 { (eval echo "$as_me:21197: \"$ac_try\"") >&5
21198 (eval $ac_try) 2>&5
21200 echo "$as_me:21200: \$? = $ac_status" >&5
21201 (exit "$ac_status"); }; }; then
21204 echo "$as_me: failed program was:" >&5
21205 cat "conftest.$ac_ext" >&5
21208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21209 if test $ac_R_space = yes; then
21210 echo "$as_me:21210: result: yes" >&5
21211 echo "${ECHO_T}yes" >&6
21212 X_LIBS="$X_LIBS -R $x_libraries"
21214 echo "$as_me:21214: result: neither works" >&5
21215 echo "${ECHO_T}neither works" >&6
21218 LIBS=$ac_xsave_LIBS
21222 # Check for system-dependent libraries X programs must link with.
21223 # Do this before checking for the system-independent R6 libraries
21224 # (-lICE), since we may need -lsocket or whatever for X linking.
21226 if test "$ISC" = yes; then
21227 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21229 # Martyn Johnson says this is needed for Ultrix, if the X
21230 # libraries were built with DECnet support. And Karl Berry says
21231 # the Alpha needs dnet_stub (dnet does not exist).
21232 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21233 cat >"conftest.$ac_ext" <<_ACEOF
21234 #line 21234 "configure"
21235 #include "confdefs.h"
21237 /* Override any gcc2 internal prototype to avoid an error. */
21241 /* We use char because int might match the return type of a gcc2
21242 builtin and then its argument prototype would still apply. */
21243 char XOpenDisplay ();
21252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21253 if { (eval echo "$as_me:21253: \"$ac_link\"") >&5
21254 (eval $ac_link) 2>&5
21256 echo "$as_me:21256: \$? = $ac_status" >&5
21257 (exit "$ac_status"); } &&
21258 { ac_try='test -s "conftest$ac_exeext"'
21259 { (eval echo "$as_me:21259: \"$ac_try\"") >&5
21260 (eval $ac_try) 2>&5
21262 echo "$as_me:21262: \$? = $ac_status" >&5
21263 (exit "$ac_status"); }; }; then
21266 echo "$as_me: failed program was:" >&5
21267 cat "conftest.$ac_ext" >&5
21268 echo "$as_me:21268: checking for dnet_ntoa in -ldnet" >&5
21269 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21270 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21271 echo $ECHO_N "(cached) $ECHO_C" >&6
21273 ac_check_lib_save_LIBS=$LIBS
21274 LIBS="-ldnet $LIBS"
21275 cat >"conftest.$ac_ext" <<_ACEOF
21276 #line 21276 "configure"
21277 #include "confdefs.h"
21279 /* Override any gcc2 internal prototype to avoid an error. */
21283 /* We use char because int might match the return type of a gcc2
21284 builtin and then its argument prototype would still apply. */
21294 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21295 if { (eval echo "$as_me:21295: \"$ac_link\"") >&5
21296 (eval $ac_link) 2>&5
21298 echo "$as_me:21298: \$? = $ac_status" >&5
21299 (exit "$ac_status"); } &&
21300 { ac_try='test -s "conftest$ac_exeext"'
21301 { (eval echo "$as_me:21301: \"$ac_try\"") >&5
21302 (eval $ac_try) 2>&5
21304 echo "$as_me:21304: \$? = $ac_status" >&5
21305 (exit "$ac_status"); }; }; then
21306 ac_cv_lib_dnet_dnet_ntoa=yes
21308 echo "$as_me: failed program was:" >&5
21309 cat "conftest.$ac_ext" >&5
21310 ac_cv_lib_dnet_dnet_ntoa=no
21312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21313 LIBS=$ac_check_lib_save_LIBS
21315 echo "$as_me:21315: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21316 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21317 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21318 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21321 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21322 echo "$as_me:21322: checking for dnet_ntoa in -ldnet_stub" >&5
21323 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21324 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21325 echo $ECHO_N "(cached) $ECHO_C" >&6
21327 ac_check_lib_save_LIBS=$LIBS
21328 LIBS="-ldnet_stub $LIBS"
21329 cat >"conftest.$ac_ext" <<_ACEOF
21330 #line 21330 "configure"
21331 #include "confdefs.h"
21333 /* Override any gcc2 internal prototype to avoid an error. */
21337 /* We use char because int might match the return type of a gcc2
21338 builtin and then its argument prototype would still apply. */
21348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21349 if { (eval echo "$as_me:21349: \"$ac_link\"") >&5
21350 (eval $ac_link) 2>&5
21352 echo "$as_me:21352: \$? = $ac_status" >&5
21353 (exit "$ac_status"); } &&
21354 { ac_try='test -s "conftest$ac_exeext"'
21355 { (eval echo "$as_me:21355: \"$ac_try\"") >&5
21356 (eval $ac_try) 2>&5
21358 echo "$as_me:21358: \$? = $ac_status" >&5
21359 (exit "$ac_status"); }; }; then
21360 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21362 echo "$as_me: failed program was:" >&5
21363 cat "conftest.$ac_ext" >&5
21364 ac_cv_lib_dnet_stub_dnet_ntoa=no
21366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21367 LIBS=$ac_check_lib_save_LIBS
21369 echo "$as_me:21369: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21370 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21371 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21372 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21378 LIBS="$ac_xsave_LIBS"
21380 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21381 # to get the SysV transport functions.
21382 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21384 # The nsl library prevents programs from opening the X display
21385 # on Irix 5.2, according to T.E. Dickey.
21386 # The functions gethostbyname, getservbyname, and inet_addr are
21387 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21388 echo "$as_me:21388: checking for gethostbyname" >&5
21389 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21390 if test "${ac_cv_func_gethostbyname+set}" = set; then
21391 echo $ECHO_N "(cached) $ECHO_C" >&6
21393 cat >"conftest.$ac_ext" <<_ACEOF
21394 #line 21394 "configure"
21395 #include "confdefs.h"
21396 #define gethostbyname autoconf_temporary
21397 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21398 #undef gethostbyname
21404 /* We use char because int might match the return type of a gcc2
21405 builtin and then its argument prototype would still apply. */
21406 char gethostbyname (void);
21412 /* The GNU C library defines stubs for functions which it implements
21413 to always fail with ENOSYS. Some functions are actually named
21414 something starting with __ and the normal name is an alias. */
21415 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21416 #error found stub for gethostbyname
21419 return gethostbyname ();
21424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21425 if { (eval echo "$as_me:21425: \"$ac_link\"") >&5
21426 (eval $ac_link) 2>&5
21428 echo "$as_me:21428: \$? = $ac_status" >&5
21429 (exit "$ac_status"); } &&
21430 { ac_try='test -s "conftest$ac_exeext"'
21431 { (eval echo "$as_me:21431: \"$ac_try\"") >&5
21432 (eval $ac_try) 2>&5
21434 echo "$as_me:21434: \$? = $ac_status" >&5
21435 (exit "$ac_status"); }; }; then
21436 ac_cv_func_gethostbyname=yes
21438 echo "$as_me: failed program was:" >&5
21439 cat "conftest.$ac_ext" >&5
21440 ac_cv_func_gethostbyname=no
21442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21444 echo "$as_me:21444: result: $ac_cv_func_gethostbyname" >&5
21445 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21447 if test $ac_cv_func_gethostbyname = no; then
21448 echo "$as_me:21448: checking for gethostbyname in -lnsl" >&5
21449 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21450 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21451 echo $ECHO_N "(cached) $ECHO_C" >&6
21453 ac_check_lib_save_LIBS=$LIBS
21455 cat >"conftest.$ac_ext" <<_ACEOF
21456 #line 21456 "configure"
21457 #include "confdefs.h"
21459 /* Override any gcc2 internal prototype to avoid an error. */
21463 /* We use char because int might match the return type of a gcc2
21464 builtin and then its argument prototype would still apply. */
21465 char gethostbyname ();
21474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21475 if { (eval echo "$as_me:21475: \"$ac_link\"") >&5
21476 (eval $ac_link) 2>&5
21478 echo "$as_me:21478: \$? = $ac_status" >&5
21479 (exit "$ac_status"); } &&
21480 { ac_try='test -s "conftest$ac_exeext"'
21481 { (eval echo "$as_me:21481: \"$ac_try\"") >&5
21482 (eval $ac_try) 2>&5
21484 echo "$as_me:21484: \$? = $ac_status" >&5
21485 (exit "$ac_status"); }; }; then
21486 ac_cv_lib_nsl_gethostbyname=yes
21488 echo "$as_me: failed program was:" >&5
21489 cat "conftest.$ac_ext" >&5
21490 ac_cv_lib_nsl_gethostbyname=no
21492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21493 LIBS=$ac_check_lib_save_LIBS
21495 echo "$as_me:21495: result: $ac_cv_lib_nsl_gethostbyname" >&5
21496 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21497 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21498 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21501 if test $ac_cv_lib_nsl_gethostbyname = no; then
21502 echo "$as_me:21502: checking for gethostbyname in -lbsd" >&5
21503 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21504 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21505 echo $ECHO_N "(cached) $ECHO_C" >&6
21507 ac_check_lib_save_LIBS=$LIBS
21509 cat >"conftest.$ac_ext" <<_ACEOF
21510 #line 21510 "configure"
21511 #include "confdefs.h"
21513 /* Override any gcc2 internal prototype to avoid an error. */
21517 /* We use char because int might match the return type of a gcc2
21518 builtin and then its argument prototype would still apply. */
21519 char gethostbyname ();
21528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21529 if { (eval echo "$as_me:21529: \"$ac_link\"") >&5
21530 (eval $ac_link) 2>&5
21532 echo "$as_me:21532: \$? = $ac_status" >&5
21533 (exit "$ac_status"); } &&
21534 { ac_try='test -s "conftest$ac_exeext"'
21535 { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536 (eval $ac_try) 2>&5
21538 echo "$as_me:21538: \$? = $ac_status" >&5
21539 (exit "$ac_status"); }; }; then
21540 ac_cv_lib_bsd_gethostbyname=yes
21542 echo "$as_me: failed program was:" >&5
21543 cat "conftest.$ac_ext" >&5
21544 ac_cv_lib_bsd_gethostbyname=no
21546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21547 LIBS=$ac_check_lib_save_LIBS
21549 echo "$as_me:21549: result: $ac_cv_lib_bsd_gethostbyname" >&5
21550 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21551 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21552 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21558 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21559 # socket/setsockopt and other routines are undefined under SCO ODT
21560 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21561 # on later versions), says Simon Leinen: it contains gethostby*
21562 # variants that don't use the nameserver (or something). -lsocket
21563 # must be given before -lnsl if both are needed. We assume that
21564 # if connect needs -lnsl, so does gethostbyname.
21565 echo "$as_me:21565: checking for connect" >&5
21566 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21567 if test "${ac_cv_func_connect+set}" = set; then
21568 echo $ECHO_N "(cached) $ECHO_C" >&6
21570 cat >"conftest.$ac_ext" <<_ACEOF
21571 #line 21571 "configure"
21572 #include "confdefs.h"
21573 #define connect autoconf_temporary
21574 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21581 /* We use char because int might match the return type of a gcc2
21582 builtin and then its argument prototype would still apply. */
21583 char connect (void);
21589 /* The GNU C library defines stubs for functions which it implements
21590 to always fail with ENOSYS. Some functions are actually named
21591 something starting with __ and the normal name is an alias. */
21592 #if defined (__stub_connect) || defined (__stub___connect)
21593 #error found stub for connect
21601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21602 if { (eval echo "$as_me:21602: \"$ac_link\"") >&5
21603 (eval $ac_link) 2>&5
21605 echo "$as_me:21605: \$? = $ac_status" >&5
21606 (exit "$ac_status"); } &&
21607 { ac_try='test -s "conftest$ac_exeext"'
21608 { (eval echo "$as_me:21608: \"$ac_try\"") >&5
21609 (eval $ac_try) 2>&5
21611 echo "$as_me:21611: \$? = $ac_status" >&5
21612 (exit "$ac_status"); }; }; then
21613 ac_cv_func_connect=yes
21615 echo "$as_me: failed program was:" >&5
21616 cat "conftest.$ac_ext" >&5
21617 ac_cv_func_connect=no
21619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21621 echo "$as_me:21621: result: $ac_cv_func_connect" >&5
21622 echo "${ECHO_T}$ac_cv_func_connect" >&6
21624 if test $ac_cv_func_connect = no; then
21625 echo "$as_me:21625: checking for connect in -lsocket" >&5
21626 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21627 if test "${ac_cv_lib_socket_connect+set}" = set; then
21628 echo $ECHO_N "(cached) $ECHO_C" >&6
21630 ac_check_lib_save_LIBS=$LIBS
21631 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21632 cat >"conftest.$ac_ext" <<_ACEOF
21633 #line 21633 "configure"
21634 #include "confdefs.h"
21636 /* Override any gcc2 internal prototype to avoid an error. */
21640 /* We use char because int might match the return type of a gcc2
21641 builtin and then its argument prototype would still apply. */
21651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21652 if { (eval echo "$as_me:21652: \"$ac_link\"") >&5
21653 (eval $ac_link) 2>&5
21655 echo "$as_me:21655: \$? = $ac_status" >&5
21656 (exit "$ac_status"); } &&
21657 { ac_try='test -s "conftest$ac_exeext"'
21658 { (eval echo "$as_me:21658: \"$ac_try\"") >&5
21659 (eval $ac_try) 2>&5
21661 echo "$as_me:21661: \$? = $ac_status" >&5
21662 (exit "$ac_status"); }; }; then
21663 ac_cv_lib_socket_connect=yes
21665 echo "$as_me: failed program was:" >&5
21666 cat "conftest.$ac_ext" >&5
21667 ac_cv_lib_socket_connect=no
21669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21670 LIBS=$ac_check_lib_save_LIBS
21672 echo "$as_me:21672: result: $ac_cv_lib_socket_connect" >&5
21673 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21674 if test "$ac_cv_lib_socket_connect" = yes; then
21675 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21680 # Guillermo Gomez says -lposix is necessary on A/UX.
21681 echo "$as_me:21681: checking for remove" >&5
21682 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21683 if test "${ac_cv_func_remove+set}" = set; then
21684 echo $ECHO_N "(cached) $ECHO_C" >&6
21686 cat >"conftest.$ac_ext" <<_ACEOF
21687 #line 21687 "configure"
21688 #include "confdefs.h"
21689 #define remove autoconf_temporary
21690 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21697 /* We use char because int might match the return type of a gcc2
21698 builtin and then its argument prototype would still apply. */
21699 char remove (void);
21705 /* The GNU C library defines stubs for functions which it implements
21706 to always fail with ENOSYS. Some functions are actually named
21707 something starting with __ and the normal name is an alias. */
21708 #if defined (__stub_remove) || defined (__stub___remove)
21709 #error found stub for remove
21717 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21718 if { (eval echo "$as_me:21718: \"$ac_link\"") >&5
21719 (eval $ac_link) 2>&5
21721 echo "$as_me:21721: \$? = $ac_status" >&5
21722 (exit "$ac_status"); } &&
21723 { ac_try='test -s "conftest$ac_exeext"'
21724 { (eval echo "$as_me:21724: \"$ac_try\"") >&5
21725 (eval $ac_try) 2>&5
21727 echo "$as_me:21727: \$? = $ac_status" >&5
21728 (exit "$ac_status"); }; }; then
21729 ac_cv_func_remove=yes
21731 echo "$as_me: failed program was:" >&5
21732 cat "conftest.$ac_ext" >&5
21733 ac_cv_func_remove=no
21735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21737 echo "$as_me:21737: result: $ac_cv_func_remove" >&5
21738 echo "${ECHO_T}$ac_cv_func_remove" >&6
21740 if test $ac_cv_func_remove = no; then
21741 echo "$as_me:21741: checking for remove in -lposix" >&5
21742 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21743 if test "${ac_cv_lib_posix_remove+set}" = set; then
21744 echo $ECHO_N "(cached) $ECHO_C" >&6
21746 ac_check_lib_save_LIBS=$LIBS
21747 LIBS="-lposix $LIBS"
21748 cat >"conftest.$ac_ext" <<_ACEOF
21749 #line 21749 "configure"
21750 #include "confdefs.h"
21752 /* Override any gcc2 internal prototype to avoid an error. */
21756 /* We use char because int might match the return type of a gcc2
21757 builtin and then its argument prototype would still apply. */
21767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21768 if { (eval echo "$as_me:21768: \"$ac_link\"") >&5
21769 (eval $ac_link) 2>&5
21771 echo "$as_me:21771: \$? = $ac_status" >&5
21772 (exit "$ac_status"); } &&
21773 { ac_try='test -s "conftest$ac_exeext"'
21774 { (eval echo "$as_me:21774: \"$ac_try\"") >&5
21775 (eval $ac_try) 2>&5
21777 echo "$as_me:21777: \$? = $ac_status" >&5
21778 (exit "$ac_status"); }; }; then
21779 ac_cv_lib_posix_remove=yes
21781 echo "$as_me: failed program was:" >&5
21782 cat "conftest.$ac_ext" >&5
21783 ac_cv_lib_posix_remove=no
21785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21786 LIBS=$ac_check_lib_save_LIBS
21788 echo "$as_me:21788: result: $ac_cv_lib_posix_remove" >&5
21789 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21790 if test "$ac_cv_lib_posix_remove" = yes; then
21791 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21796 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21797 echo "$as_me:21797: checking for shmat" >&5
21798 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21799 if test "${ac_cv_func_shmat+set}" = set; then
21800 echo $ECHO_N "(cached) $ECHO_C" >&6
21802 cat >"conftest.$ac_ext" <<_ACEOF
21803 #line 21803 "configure"
21804 #include "confdefs.h"
21805 #define shmat autoconf_temporary
21806 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21813 /* We use char because int might match the return type of a gcc2
21814 builtin and then its argument prototype would still apply. */
21821 /* The GNU C library defines stubs for functions which it implements
21822 to always fail with ENOSYS. Some functions are actually named
21823 something starting with __ and the normal name is an alias. */
21824 #if defined (__stub_shmat) || defined (__stub___shmat)
21825 #error found stub for shmat
21833 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21834 if { (eval echo "$as_me:21834: \"$ac_link\"") >&5
21835 (eval $ac_link) 2>&5
21837 echo "$as_me:21837: \$? = $ac_status" >&5
21838 (exit "$ac_status"); } &&
21839 { ac_try='test -s "conftest$ac_exeext"'
21840 { (eval echo "$as_me:21840: \"$ac_try\"") >&5
21841 (eval $ac_try) 2>&5
21843 echo "$as_me:21843: \$? = $ac_status" >&5
21844 (exit "$ac_status"); }; }; then
21845 ac_cv_func_shmat=yes
21847 echo "$as_me: failed program was:" >&5
21848 cat "conftest.$ac_ext" >&5
21849 ac_cv_func_shmat=no
21851 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21853 echo "$as_me:21853: result: $ac_cv_func_shmat" >&5
21854 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21856 if test $ac_cv_func_shmat = no; then
21857 echo "$as_me:21857: checking for shmat in -lipc" >&5
21858 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21859 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21860 echo $ECHO_N "(cached) $ECHO_C" >&6
21862 ac_check_lib_save_LIBS=$LIBS
21864 cat >"conftest.$ac_ext" <<_ACEOF
21865 #line 21865 "configure"
21866 #include "confdefs.h"
21868 /* Override any gcc2 internal prototype to avoid an error. */
21872 /* We use char because int might match the return type of a gcc2
21873 builtin and then its argument prototype would still apply. */
21883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21884 if { (eval echo "$as_me:21884: \"$ac_link\"") >&5
21885 (eval $ac_link) 2>&5
21887 echo "$as_me:21887: \$? = $ac_status" >&5
21888 (exit "$ac_status"); } &&
21889 { ac_try='test -s "conftest$ac_exeext"'
21890 { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891 (eval $ac_try) 2>&5
21893 echo "$as_me:21893: \$? = $ac_status" >&5
21894 (exit "$ac_status"); }; }; then
21895 ac_cv_lib_ipc_shmat=yes
21897 echo "$as_me: failed program was:" >&5
21898 cat "conftest.$ac_ext" >&5
21899 ac_cv_lib_ipc_shmat=no
21901 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21902 LIBS=$ac_check_lib_save_LIBS
21904 echo "$as_me:21904: result: $ac_cv_lib_ipc_shmat" >&5
21905 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21906 if test "$ac_cv_lib_ipc_shmat" = yes; then
21907 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21913 # Check for libraries that X11R6 Xt/Xaw programs need.
21914 ac_save_LDFLAGS=$LDFLAGS
21915 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21916 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21917 # check for ICE first), but we must link in the order -lSM -lICE or
21918 # we get undefined symbols. So assume we have SM if we have ICE.
21919 # These have to be linked with before -lX11, unlike the other
21920 # libraries we check for below, so use a different variable.
21921 # John Interrante, Karl Berry
21922 echo "$as_me:21922: checking for IceConnectionNumber in -lICE" >&5
21923 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21924 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21925 echo $ECHO_N "(cached) $ECHO_C" >&6
21927 ac_check_lib_save_LIBS=$LIBS
21928 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21929 cat >"conftest.$ac_ext" <<_ACEOF
21930 #line 21930 "configure"
21931 #include "confdefs.h"
21933 /* Override any gcc2 internal prototype to avoid an error. */
21937 /* We use char because int might match the return type of a gcc2
21938 builtin and then its argument prototype would still apply. */
21939 char IceConnectionNumber ();
21943 IceConnectionNumber ();
21948 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21949 if { (eval echo "$as_me:21949: \"$ac_link\"") >&5
21950 (eval $ac_link) 2>&5
21952 echo "$as_me:21952: \$? = $ac_status" >&5
21953 (exit "$ac_status"); } &&
21954 { ac_try='test -s "conftest$ac_exeext"'
21955 { (eval echo "$as_me:21955: \"$ac_try\"") >&5
21956 (eval $ac_try) 2>&5
21958 echo "$as_me:21958: \$? = $ac_status" >&5
21959 (exit "$ac_status"); }; }; then
21960 ac_cv_lib_ICE_IceConnectionNumber=yes
21962 echo "$as_me: failed program was:" >&5
21963 cat "conftest.$ac_ext" >&5
21964 ac_cv_lib_ICE_IceConnectionNumber=no
21966 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21967 LIBS=$ac_check_lib_save_LIBS
21969 echo "$as_me:21969: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21970 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21971 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21972 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21975 LDFLAGS=$ac_save_LDFLAGS
21981 if test "$GCC" = yes || test "$GXX" = yes
21984 if test "$GCC" = yes || test "$GXX" = yes
21989 for cf_temp_scan in $CFLAGS
21991 case "x$cf_temp_scan" in
21994 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21995 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22000 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22001 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22006 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22007 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22012 if test "x$CFLAGS" != "x$cf_temp_flags"
22014 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22016 echo "${as_me:-configure}:22016: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22018 CFLAGS="$cf_temp_flags"
22019 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22021 echo "${as_me:-configure}:22021: testing ... fixed $CFLAGS ..." 1>&5
22023 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22025 echo "${as_me:-configure}:22025: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22032 if test "$GCC" = yes || test "$GXX" = yes
22037 for cf_temp_scan in $CPPFLAGS
22039 case "x$cf_temp_scan" in
22042 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22043 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22048 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22049 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22054 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22055 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22060 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22062 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22064 echo "${as_me:-configure}:22064: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22066 CPPFLAGS="$cf_temp_flags"
22067 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
22069 echo "${as_me:-configure}:22069: testing ... fixed $CPPFLAGS ..." 1>&5
22071 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22073 echo "${as_me:-configure}:22073: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22080 if test "$GCC" = yes || test "$GXX" = yes
22085 for cf_temp_scan in $LDFLAGS
22087 case "x$cf_temp_scan" in
22090 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22091 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22096 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22097 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22102 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22103 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22108 if test "x$LDFLAGS" != "x$cf_temp_flags"
22110 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
22112 echo "${as_me:-configure}:22112: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
22114 LDFLAGS="$cf_temp_flags"
22115 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22117 echo "${as_me:-configure}:22117: testing ... fixed $LDFLAGS ..." 1>&5
22119 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22121 echo "${as_me:-configure}:22121: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22128 echo "$as_me:22128: checking if you want to turn on gcc warnings" >&5
22129 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22131 # Check whether --enable-warnings or --disable-warnings was given.
22132 if test "${enable_warnings+set}" = set; then
22133 enableval="$enable_warnings"
22134 test "$enableval" != yes && enableval=no
22135 if test "$enableval" != "no" ; then
22136 enable_warnings=yes
22145 echo "$as_me:22145: result: $enable_warnings" >&5
22146 echo "${ECHO_T}$enable_warnings" >&6
22147 if test "$enable_warnings" = "yes"
22150 if test "$GCC" = yes || test "$GXX" = yes
22152 cat > conftest.i <<EOF
22154 #define GCC_PRINTF 0
22157 #define GCC_SCANF 0
22159 #ifndef GCC_NORETURN
22160 #define GCC_NORETURN /* nothing */
22163 #define GCC_UNUSED /* nothing */
22166 if test "$GCC" = yes
22168 { echo "$as_me:22168: checking for $CC __attribute__ directives..." >&5
22169 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22170 cat > "conftest.$ac_ext" <<EOF
22171 #line 22171 "${as_me:-configure}"
22172 #include "confdefs.h"
22173 #include "conftest.h"
22174 #include "conftest.i"
22176 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22178 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22181 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22183 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22185 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22186 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22187 extern GCC_NORETURN void foo(void);
22188 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22190 cf_printf_attribute=no
22191 cf_scanf_attribute=no
22192 for cf_attribute in scanf printf unused noreturn
22195 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22197 cf_directive="__attribute__(($cf_attribute))"
22198 echo "checking for $CC $cf_directive" 1>&5
22200 case "$cf_attribute" in
22202 cf_printf_attribute=yes
22203 cat >conftest.h <<EOF
22204 #define GCC_$cf_ATTRIBUTE 1
22208 cf_scanf_attribute=yes
22209 cat >conftest.h <<EOF
22210 #define GCC_$cf_ATTRIBUTE 1
22214 cat >conftest.h <<EOF
22215 #define GCC_$cf_ATTRIBUTE $cf_directive
22220 if { (eval echo "$as_me:22220: \"$ac_compile\"") >&5
22221 (eval $ac_compile) 2>&5
22223 echo "$as_me:22223: \$? = $ac_status" >&5
22224 (exit "$ac_status"); }; then
22225 test -n "$verbose" && echo "$as_me:22225: result: ... $cf_attribute" >&5
22226 echo "${ECHO_T}... $cf_attribute" >&6
22227 cat conftest.h >>confdefs.h
22228 case "$cf_attribute" in
22231 cat >>confdefs.h <<EOF
22232 #define GCC_NORETURN $cf_directive
22237 cf_value='/* nothing */'
22238 if test "$cf_printf_attribute" != no ; then
22239 cf_value='__attribute__((format(printf,fmt,var)))'
22241 cat >>confdefs.h <<\EOF
22242 #define GCC_PRINTF 1
22247 cat >>confdefs.h <<EOF
22248 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22253 cf_value='/* nothing */'
22254 if test "$cf_scanf_attribute" != no ; then
22255 cf_value='__attribute__((format(scanf,fmt,var)))'
22257 cat >>confdefs.h <<\EOF
22258 #define GCC_SCANF 1
22263 cat >>confdefs.h <<EOF
22264 #define GCC_SCANFLIKE(fmt,var) $cf_value
22270 cat >>confdefs.h <<EOF
22271 #define GCC_UNUSED $cf_directive
22279 ${FGREP-fgrep} define conftest.i >>confdefs.h
22284 if test "x$have_x" = xyes; then
22286 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22287 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22288 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22289 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22290 for cf_X_CFLAGS in $X_CFLAGS
22292 case "x$cf_X_CFLAGS" in
22294 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22297 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22302 cat >"conftest.$ac_ext" <<_ACEOF
22303 #line 22303 "configure"
22304 #include "confdefs.h"
22306 #include <stdlib.h>
22307 #include <X11/Intrinsic.h>
22312 String foo = malloc(1); free((void*)foo)
22317 rm -f "conftest.$ac_objext"
22318 if { (eval echo "$as_me:22318: \"$ac_compile\"") >&5
22319 (eval $ac_compile) 2>&5
22321 echo "$as_me:22321: \$? = $ac_status" >&5
22322 (exit "$ac_status"); } &&
22323 { ac_try='test -s "conftest.$ac_objext"'
22324 { (eval echo "$as_me:22324: \"$ac_try\"") >&5
22325 (eval $ac_try) 2>&5
22327 echo "$as_me:22327: \$? = $ac_status" >&5
22328 (exit "$ac_status"); }; }; then
22330 echo "$as_me:22330: checking for X11/Xt const-feature" >&5
22331 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22332 if test "${cf_cv_const_x_string+set}" = set; then
22333 echo $ECHO_N "(cached) $ECHO_C" >&6
22336 cat >"conftest.$ac_ext" <<_ACEOF
22337 #line 22337 "configure"
22338 #include "confdefs.h"
22340 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22341 #undef XTSTRINGDEFINES /* X11R5 and later */
22342 #include <stdlib.h>
22343 #include <X11/Intrinsic.h>
22348 String foo = malloc(1); *foo = 0
22353 rm -f "conftest.$ac_objext"
22354 if { (eval echo "$as_me:22354: \"$ac_compile\"") >&5
22355 (eval $ac_compile) 2>&5
22357 echo "$as_me:22357: \$? = $ac_status" >&5
22358 (exit "$ac_status"); } &&
22359 { ac_try='test -s "conftest.$ac_objext"'
22360 { (eval echo "$as_me:22360: \"$ac_try\"") >&5
22361 (eval $ac_try) 2>&5
22363 echo "$as_me:22363: \$? = $ac_status" >&5
22364 (exit "$ac_status"); }; }; then
22366 cf_cv_const_x_string=no
22369 echo "$as_me: failed program was:" >&5
22370 cat "conftest.$ac_ext" >&5
22372 cf_cv_const_x_string=yes
22375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22378 echo "$as_me:22378: result: $cf_cv_const_x_string" >&5
22379 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22381 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22382 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22383 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22385 case "$cf_cv_const_x_string" in
22388 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22389 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22394 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22395 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22401 echo "$as_me: failed program was:" >&5
22402 cat "conftest.$ac_ext" >&5
22404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22406 cat > "conftest.$ac_ext" <<EOF
22407 #line 22407 "${as_me:-configure}"
22408 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22410 if test "$INTEL_COMPILER" = yes
22412 # The "-wdXXX" options suppress warnings:
22413 # remark #1419: external declaration in primary source file
22414 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22415 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22416 # remark #193: zero used for undefined preprocessing identifier
22417 # remark #593: variable "curs_sb_left_arrow" was set but never used
22418 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22419 # remark #869: parameter "tw" was never referenced
22420 # remark #981: operands are evaluated in unspecified order
22421 # warning #279: controlling expression is constant
22423 { echo "$as_me:22423: checking for $CC warning options..." >&5
22424 echo "$as_me: checking for $CC warning options..." >&6;}
22425 cf_save_CFLAGS="$CFLAGS"
22426 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22438 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22439 if { (eval echo "$as_me:22439: \"$ac_compile\"") >&5
22440 (eval $ac_compile) 2>&5
22442 echo "$as_me:22442: \$? = $ac_status" >&5
22443 (exit "$ac_status"); }; then
22444 test -n "$verbose" && echo "$as_me:22444: result: ... -$cf_opt" >&5
22445 echo "${ECHO_T}... -$cf_opt" >&6
22446 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22449 CFLAGS="$cf_save_CFLAGS"
22450 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22452 { echo "$as_me:22452: checking for $CC warning options..." >&5
22453 echo "$as_me: checking for $CC warning options..." >&6;}
22454 cf_save_CFLAGS="$CFLAGS"
22456 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22457 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22458 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22459 for cf_opt in W Wall \
22460 Wbad-function-cast \
22463 Wdeclaration-after-statement \
22466 Wmissing-declarations \
22467 Wmissing-prototypes \
22471 Wstrict-prototypes \
22472 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22474 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22475 if { (eval echo "$as_me:22475: \"$ac_compile\"") >&5
22476 (eval $ac_compile) 2>&5
22478 echo "$as_me:22478: \$? = $ac_status" >&5
22479 (exit "$ac_status"); }; then
22480 test -n "$verbose" && echo "$as_me:22480: result: ... -$cf_opt" >&5
22481 echo "${ECHO_T}... -$cf_opt" >&6
22484 case "$GCC_VERSION" in
22486 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22488 echo "${as_me:-configure}:22488: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22494 case "$GCC_VERSION" in
22496 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22498 echo "${as_me:-configure}:22498: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22504 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22507 CFLAGS="$cf_save_CFLAGS"
22515 echo "$as_me:22515: checking if you want to use dmalloc for testing" >&5
22516 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22518 # Check whether --with-dmalloc or --without-dmalloc was given.
22519 if test "${with_dmalloc+set}" = set; then
22520 withval="$with_dmalloc"
22521 case "x$withval" in
22524 : "${with_cflags:=-g}"
22525 : "${enable_leaks:=no}"
22528 cat >>confdefs.h <<EOF
22529 #define USE_DMALLOC 1
22537 echo "$as_me:22537: result: ${with_dmalloc:-no}" >&5
22538 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22540 case ".$with_cflags" in
22550 cf_new_extra_cppflags=
22552 for cf_add_cflags in -g
22554 case "$cf_fix_cppflags" in
22556 case "$cf_add_cflags" in
22557 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22558 case "$cf_add_cflags" in
22560 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22562 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22563 && test -z "${cf_tst_cflags}" \
22564 && cf_fix_cppflags=yes
22566 if test "$cf_fix_cppflags" = yes ; then
22568 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22569 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22572 elif test "${cf_tst_cflags}" = "\"'" ; then
22574 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22575 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22581 case "$CPPFLAGS" in
22585 case "$cf_add_cflags" in
22587 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22589 CPPFLAGS=`echo "$CPPFLAGS" | \
22590 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22591 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22596 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22597 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22604 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22605 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22612 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22613 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22615 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22617 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22618 && test -z "${cf_tst_cflags}" \
22619 && cf_fix_cppflags=no
22624 if test -n "$cf_new_cflags" ; then
22626 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22627 CFLAGS="${CFLAGS}$cf_new_cflags"
22631 if test -n "$cf_new_cppflags" ; then
22633 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22634 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22638 if test -n "$cf_new_extra_cppflags" ; then
22640 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22641 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22650 if test "$with_dmalloc" = yes ; then
22651 echo "$as_me:22651: checking for dmalloc.h" >&5
22652 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22653 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22654 echo $ECHO_N "(cached) $ECHO_C" >&6
22656 cat >"conftest.$ac_ext" <<_ACEOF
22657 #line 22657 "configure"
22658 #include "confdefs.h"
22659 #include <dmalloc.h>
22661 if { (eval echo "$as_me:22661: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22662 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22664 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22666 cat conftest.err >&5
22667 echo "$as_me:22667: \$? = $ac_status" >&5
22668 (exit "$ac_status"); } >/dev/null; then
22669 if test -s conftest.err; then
22670 ac_cpp_err=$ac_c_preproc_warn_flag
22677 if test -z "$ac_cpp_err"; then
22678 ac_cv_header_dmalloc_h=yes
22680 echo "$as_me: failed program was:" >&5
22681 cat "conftest.$ac_ext" >&5
22682 ac_cv_header_dmalloc_h=no
22684 rm -f conftest.err "conftest.$ac_ext"
22686 echo "$as_me:22686: result: $ac_cv_header_dmalloc_h" >&5
22687 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22688 if test "$ac_cv_header_dmalloc_h" = yes; then
22690 echo "$as_me:22690: checking for dmalloc_debug in -ldmalloc" >&5
22691 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22692 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22693 echo $ECHO_N "(cached) $ECHO_C" >&6
22695 ac_check_lib_save_LIBS=$LIBS
22696 LIBS="-ldmalloc $LIBS"
22697 cat >"conftest.$ac_ext" <<_ACEOF
22698 #line 22698 "configure"
22699 #include "confdefs.h"
22701 /* Override any gcc2 internal prototype to avoid an error. */
22705 /* We use char because int might match the return type of a gcc2
22706 builtin and then its argument prototype would still apply. */
22707 char dmalloc_debug ();
22716 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22717 if { (eval echo "$as_me:22717: \"$ac_link\"") >&5
22718 (eval $ac_link) 2>&5
22720 echo "$as_me:22720: \$? = $ac_status" >&5
22721 (exit "$ac_status"); } &&
22722 { ac_try='test -s "conftest$ac_exeext"'
22723 { (eval echo "$as_me:22723: \"$ac_try\"") >&5
22724 (eval $ac_try) 2>&5
22726 echo "$as_me:22726: \$? = $ac_status" >&5
22727 (exit "$ac_status"); }; }; then
22728 ac_cv_lib_dmalloc_dmalloc_debug=yes
22730 echo "$as_me: failed program was:" >&5
22731 cat "conftest.$ac_ext" >&5
22732 ac_cv_lib_dmalloc_dmalloc_debug=no
22734 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22735 LIBS=$ac_check_lib_save_LIBS
22737 echo "$as_me:22737: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22738 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22739 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22740 cat >>confdefs.h <<EOF
22741 #define HAVE_LIBDMALLOC 1
22744 LIBS="-ldmalloc $LIBS"
22752 echo "$as_me:22752: checking if you want to use dbmalloc for testing" >&5
22753 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22755 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22756 if test "${with_dbmalloc+set}" = set; then
22757 withval="$with_dbmalloc"
22758 case "x$withval" in
22761 : "${with_cflags:=-g}"
22762 : "${enable_leaks:=no}"
22765 cat >>confdefs.h <<EOF
22766 #define USE_DBMALLOC 1
22774 echo "$as_me:22774: result: ${with_dbmalloc:-no}" >&5
22775 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22777 case ".$with_cflags" in
22787 cf_new_extra_cppflags=
22789 for cf_add_cflags in -g
22791 case "$cf_fix_cppflags" in
22793 case "$cf_add_cflags" in
22794 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22795 case "$cf_add_cflags" in
22797 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22799 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22800 && test -z "${cf_tst_cflags}" \
22801 && cf_fix_cppflags=yes
22803 if test "$cf_fix_cppflags" = yes ; then
22805 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22806 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22809 elif test "${cf_tst_cflags}" = "\"'" ; then
22811 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22812 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22818 case "$CPPFLAGS" in
22822 case "$cf_add_cflags" in
22824 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22826 CPPFLAGS=`echo "$CPPFLAGS" | \
22827 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22828 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22833 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22834 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22841 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22842 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22849 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22850 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22852 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22854 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22855 && test -z "${cf_tst_cflags}" \
22856 && cf_fix_cppflags=no
22861 if test -n "$cf_new_cflags" ; then
22863 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22864 CFLAGS="${CFLAGS}$cf_new_cflags"
22868 if test -n "$cf_new_cppflags" ; then
22870 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22871 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22875 if test -n "$cf_new_extra_cppflags" ; then
22877 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22878 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22887 if test "$with_dbmalloc" = yes ; then
22888 echo "$as_me:22888: checking for dbmalloc.h" >&5
22889 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22890 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22891 echo $ECHO_N "(cached) $ECHO_C" >&6
22893 cat >"conftest.$ac_ext" <<_ACEOF
22894 #line 22894 "configure"
22895 #include "confdefs.h"
22896 #include <dbmalloc.h>
22898 if { (eval echo "$as_me:22898: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22899 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22901 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22903 cat conftest.err >&5
22904 echo "$as_me:22904: \$? = $ac_status" >&5
22905 (exit "$ac_status"); } >/dev/null; then
22906 if test -s conftest.err; then
22907 ac_cpp_err=$ac_c_preproc_warn_flag
22914 if test -z "$ac_cpp_err"; then
22915 ac_cv_header_dbmalloc_h=yes
22917 echo "$as_me: failed program was:" >&5
22918 cat "conftest.$ac_ext" >&5
22919 ac_cv_header_dbmalloc_h=no
22921 rm -f conftest.err "conftest.$ac_ext"
22923 echo "$as_me:22923: result: $ac_cv_header_dbmalloc_h" >&5
22924 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22925 if test "$ac_cv_header_dbmalloc_h" = yes; then
22927 echo "$as_me:22927: checking for debug_malloc in -ldbmalloc" >&5
22928 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22929 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22930 echo $ECHO_N "(cached) $ECHO_C" >&6
22932 ac_check_lib_save_LIBS=$LIBS
22933 LIBS="-ldbmalloc $LIBS"
22934 cat >"conftest.$ac_ext" <<_ACEOF
22935 #line 22935 "configure"
22936 #include "confdefs.h"
22938 /* Override any gcc2 internal prototype to avoid an error. */
22942 /* We use char because int might match the return type of a gcc2
22943 builtin and then its argument prototype would still apply. */
22944 char debug_malloc ();
22953 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22954 if { (eval echo "$as_me:22954: \"$ac_link\"") >&5
22955 (eval $ac_link) 2>&5
22957 echo "$as_me:22957: \$? = $ac_status" >&5
22958 (exit "$ac_status"); } &&
22959 { ac_try='test -s "conftest$ac_exeext"'
22960 { (eval echo "$as_me:22960: \"$ac_try\"") >&5
22961 (eval $ac_try) 2>&5
22963 echo "$as_me:22963: \$? = $ac_status" >&5
22964 (exit "$ac_status"); }; }; then
22965 ac_cv_lib_dbmalloc_debug_malloc=yes
22967 echo "$as_me: failed program was:" >&5
22968 cat "conftest.$ac_ext" >&5
22969 ac_cv_lib_dbmalloc_debug_malloc=no
22971 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22972 LIBS=$ac_check_lib_save_LIBS
22974 echo "$as_me:22974: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22975 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22976 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22977 cat >>confdefs.h <<EOF
22978 #define HAVE_LIBDBMALLOC 1
22981 LIBS="-ldbmalloc $LIBS"
22989 echo "$as_me:22989: checking if you want to use valgrind for testing" >&5
22990 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22992 # Check whether --with-valgrind or --without-valgrind was given.
22993 if test "${with_valgrind+set}" = set; then
22994 withval="$with_valgrind"
22995 case "x$withval" in
22998 : "${with_cflags:=-g}"
22999 : "${enable_leaks:=no}"
23002 cat >>confdefs.h <<EOF
23003 #define USE_VALGRIND 1
23011 echo "$as_me:23011: result: ${with_valgrind:-no}" >&5
23012 echo "${ECHO_T}${with_valgrind:-no}" >&6
23014 case ".$with_cflags" in
23024 cf_new_extra_cppflags=
23026 for cf_add_cflags in -g
23028 case "$cf_fix_cppflags" in
23030 case "$cf_add_cflags" in
23031 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23032 case "$cf_add_cflags" in
23034 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23037 && test -z "${cf_tst_cflags}" \
23038 && cf_fix_cppflags=yes
23040 if test "$cf_fix_cppflags" = yes ; then
23042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23046 elif test "${cf_tst_cflags}" = "\"'" ; then
23048 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23049 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23055 case "$CPPFLAGS" in
23059 case "$cf_add_cflags" in
23061 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23063 CPPFLAGS=`echo "$CPPFLAGS" | \
23064 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23065 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23070 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23071 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23078 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23079 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23089 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23091 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23092 && test -z "${cf_tst_cflags}" \
23093 && cf_fix_cppflags=no
23098 if test -n "$cf_new_cflags" ; then
23100 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23101 CFLAGS="${CFLAGS}$cf_new_cflags"
23105 if test -n "$cf_new_cppflags" ; then
23107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23108 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23112 if test -n "$cf_new_extra_cppflags" ; then
23114 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23115 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23124 echo "$as_me:23124: checking if you want to perform memory-leak testing" >&5
23125 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23127 # Check whether --enable-leaks or --disable-leaks was given.
23128 if test "${enable_leaks+set}" = set; then
23129 enableval="$enable_leaks"
23130 enable_leaks=$enableval
23134 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23135 echo "$as_me:23135: result: $with_no_leaks" >&5
23136 echo "${ECHO_T}$with_no_leaks" >&6
23138 if test "$enable_leaks" = no ; then
23140 cat >>confdefs.h <<\EOF
23144 cat >>confdefs.h <<\EOF
23145 #define YY_NO_LEAKS 1
23151 if test "x$cf_cv_enable_rpath" != xno
23153 echo "$as_me:23153: checking for an rpath option" >&5
23154 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23155 case "$cf_cv_system_name" in
23157 if test "$GCC" = yes; then
23158 LD_RPATH_OPT="-Wl,-rpath,"
23160 LD_RPATH_OPT="-rpath "
23163 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23164 LD_RPATH_OPT="-Wl,-rpath,"
23166 (openbsd[2-9].*|mirbsd*)
23167 LD_RPATH_OPT="-Wl,-rpath,"
23170 LD_RPATH_OPT="-rpath "
23173 LD_RPATH_OPT="-Wl,-rpath,"
23176 LD_RPATH_OPT="-rpath "
23184 echo "$as_me:23184: result: $LD_RPATH_OPT" >&5
23185 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23187 case "x$LD_RPATH_OPT" in
23189 echo "$as_me:23189: checking if we need a space after rpath option" >&5
23190 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23191 cf_save_LIBS="$LIBS"
23193 cf_add_libs="$LIBS"
23196 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23197 # filter duplicates
23198 for cf_add_1lib in $cf_add_0lib; do
23199 for cf_add_2lib in $cf_add_libs; do
23200 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23205 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23207 LIBS="$cf_add_libs"
23209 cat >"conftest.$ac_ext" <<_ACEOF
23210 #line 23210 "configure"
23211 #include "confdefs.h"
23221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23222 if { (eval echo "$as_me:23222: \"$ac_link\"") >&5
23223 (eval $ac_link) 2>&5
23225 echo "$as_me:23225: \$? = $ac_status" >&5
23226 (exit "$ac_status"); } &&
23227 { ac_try='test -s "conftest$ac_exeext"'
23228 { (eval echo "$as_me:23228: \"$ac_try\"") >&5
23229 (eval $ac_try) 2>&5
23231 echo "$as_me:23231: \$? = $ac_status" >&5
23232 (exit "$ac_status"); }; }; then
23235 echo "$as_me: failed program was:" >&5
23236 cat "conftest.$ac_ext" >&5
23239 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23240 LIBS="$cf_save_LIBS"
23241 echo "$as_me:23241: result: $cf_rpath_space" >&5
23242 echo "${ECHO_T}$cf_rpath_space" >&6
23243 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23248 echo "$as_me:23248: checking if rpath-hack should be disabled" >&5
23249 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23251 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23252 if test "${enable_rpath_hack+set}" = set; then
23253 enableval="$enable_rpath_hack"
23254 test "$enableval" != no && enableval=yes
23255 if test "$enableval" != "yes" ; then
23256 enable_rpath_hack=no
23258 enable_rpath_hack=yes
23262 enable_rpath_hack=yes
23265 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23266 echo "$as_me:23266: result: $cf_disable_rpath_hack" >&5
23267 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23269 if test "$enable_rpath_hack" = yes ; then
23271 echo "$as_me:23271: checking for updated LDFLAGS" >&5
23272 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23273 if test -n "$LD_RPATH_OPT" ; then
23274 echo "$as_me:23274: result: maybe" >&5
23275 echo "${ECHO_T}maybe" >&6
23279 # Extract the first word of "$ac_prog", so it can be a program name with args.
23280 set dummy $ac_prog; ac_word=$2
23281 echo "$as_me:23281: checking for $ac_word" >&5
23282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23283 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23284 echo $ECHO_N "(cached) $ECHO_C" >&6
23286 if test -n "$cf_ldd_prog"; then
23287 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23289 ac_save_IFS=$IFS; IFS=$ac_path_separator
23291 for ac_dir in $ac_dummy; do
23293 test -z "$ac_dir" && ac_dir=.
23294 $as_executable_p "$ac_dir/$ac_word" || continue
23295 ac_cv_prog_cf_ldd_prog="$ac_prog"
23296 echo "$as_me:23296: found $ac_dir/$ac_word" >&5
23302 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23303 if test -n "$cf_ldd_prog"; then
23304 echo "$as_me:23304: result: $cf_ldd_prog" >&5
23305 echo "${ECHO_T}$cf_ldd_prog" >&6
23307 echo "$as_me:23307: result: no" >&5
23308 echo "${ECHO_T}no" >&6
23311 test -n "$cf_ldd_prog" && break
23313 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23315 cf_rpath_list="/usr/lib /lib"
23316 if test "$cf_ldd_prog" != no
23320 cat >"conftest.$ac_ext" <<_ACEOF
23321 #line 23321 "configure"
23322 #include "confdefs.h"
23332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23333 if { (eval echo "$as_me:23333: \"$ac_link\"") >&5
23334 (eval $ac_link) 2>&5
23336 echo "$as_me:23336: \$? = $ac_status" >&5
23337 (exit "$ac_status"); } &&
23338 { ac_try='test -s "conftest$ac_exeext"'
23339 { (eval echo "$as_me:23339: \"$ac_try\"") >&5
23340 (eval $ac_try) 2>&5
23342 echo "$as_me:23342: \$? = $ac_status" >&5
23343 (exit "$ac_status"); }; }; then
23344 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23345 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23347 echo "$as_me: failed program was:" >&5
23348 cat "conftest.$ac_ext" >&5
23350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23352 # If we passed the link-test, but get a "not found" on a given library,
23353 # this could be due to inept reconfiguration of gcc to make it only
23354 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23355 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23356 # /usr/local libraries.
23357 if test -n "$cf_rpath_oops"
23359 for cf_rpath_src in $cf_rpath_oops
23361 for cf_rpath_dir in \
23366 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23368 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23370 echo "${as_me:-configure}:23370: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23372 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23380 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23382 echo "${as_me:-configure}:23382: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23384 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23386 echo "${as_me:-configure}:23386: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23389 for cf_rpath_src in $LDFLAGS
23391 case "$cf_rpath_src" in
23394 # check if this refers to a directory which we will ignore
23396 if test -n "$cf_rpath_list"
23398 for cf_rpath_item in $cf_rpath_list
23400 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23408 if test "$cf_rpath_skip" = no
23410 # transform the option
23411 if test "$LD_RPATH_OPT" = "-R " ; then
23412 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23414 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23417 # if we have not already added this, add it now
23418 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23419 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23421 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23423 echo "${as_me:-configure}:23423: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23425 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23430 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23432 LDFLAGS=$cf_rpath_dst
23434 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23436 echo "${as_me:-configure}:23436: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23438 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23440 echo "${as_me:-configure}:23440: testing ...checking LIBS $LIBS ..." 1>&5
23443 for cf_rpath_src in $LIBS
23445 case "$cf_rpath_src" in
23448 # check if this refers to a directory which we will ignore
23450 if test -n "$cf_rpath_list"
23452 for cf_rpath_item in $cf_rpath_list
23454 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23462 if test "$cf_rpath_skip" = no
23464 # transform the option
23465 if test "$LD_RPATH_OPT" = "-R " ; then
23466 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23468 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23471 # if we have not already added this, add it now
23472 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23473 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23475 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23477 echo "${as_me:-configure}:23477: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23479 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23484 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23488 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23490 echo "${as_me:-configure}:23490: testing ...checked LIBS $LIBS ..." 1>&5
23492 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23494 echo "${as_me:-configure}:23494: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23497 echo "$as_me:23497: result: no" >&5
23498 echo "${ECHO_T}no" >&6
23506 ac_config_files="$ac_config_files Makefile"
23507 ac_config_commands="$ac_config_commands default"
23508 cat >confcache <<\_ACEOF
23509 # This file is a shell script that caches the results of configure
23510 # tests run on this system so they can be shared between configure
23511 # scripts and configure runs, see configure's option --config-cache.
23512 # It is not useful on other systems. If it contains results you don't
23513 # want to keep, you may remove or edit it.
23515 # config.status only pays attention to the cache file if you give it
23516 # the --recheck option to rerun configure.
23518 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23519 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23520 # following values.
23524 # The following way of writing the cache mishandles newlines in values,
23525 # but we know of no workaround that is simple, portable, and efficient.
23526 # So, don't put newlines in cache variables' values.
23527 # Ultrix sh set writes to stderr and can't be redirected directly,
23528 # and sets the high bit in the cache file unless we assign to the vars.
23531 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23533 # `set' does not quote correctly, so add quotes (double-quote
23534 # substitution turns \\\\ into \\, and sed turns \\ into \).
23537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23540 # `set' quotes correctly as required by POSIX, so do not add quotes.
23542 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23549 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23551 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23553 if cmp -s $cache_file confcache; then :; else
23554 if test -w $cache_file; then
23555 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23556 cat confcache >$cache_file
23558 echo "not updating unwritable cache $cache_file"
23563 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23564 # Let make expand exec_prefix.
23565 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23567 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23568 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23569 # trailing colons and then remove the whole line if VPATH becomes empty
23570 # (actually we leave an empty line to preserve line numbers).
23571 if test "x$srcdir" = x.; then
23572 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23573 s/:*\$(srcdir):*/:/;
23574 s/:*\${srcdir}:*/:/;
23576 s/^\([^=]*=[ ]*\):*/\1/;
23582 DEFS=-DHAVE_CONFIG_H
23584 : "${CONFIG_STATUS=./config.status}"
23585 ac_clean_files_save=$ac_clean_files
23586 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23587 { echo "$as_me:23587: creating $CONFIG_STATUS" >&5
23588 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23589 cat >"$CONFIG_STATUS" <<_ACEOF
23591 # Generated automatically by configure.
23592 # Run this file to recreate the current configuration.
23593 # Compiler output produced by configure, useful for debugging
23594 # configure, is in config.log if it exists.
23596 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
23599 SHELL=\${CONFIG_SHELL-$SHELL}
23600 ac_cs_invocation="\$0 \$@"
23602 CLICOLOR_FORCE= GREP_OPTIONS=
23603 unset CLICOLOR_FORCE GREP_OPTIONS
23606 cat >>"$CONFIG_STATUS" <<\_ACEOF
23607 # Be Bourne compatible
23608 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23611 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23615 # Name of the executable.
23616 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23618 if expr a : '\(a\)' >/dev/null 2>&1; then
23624 rm -f conf$$ conf$$.exe conf$$.file
23626 if ln -s conf$$.file conf$$ 2>/dev/null; then
23627 # We could just check for DJGPP; but this test a) works b) is more generic
23628 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23629 if test -f conf$$.exe; then
23630 # Don't use ln at all; we don't have any links
23635 elif ln conf$$.file conf$$ 2>/dev/null; then
23640 rm -f conf$$ conf$$.exe conf$$.file
23642 as_executable_p="test -f"
23644 # Support unset when possible.
23645 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23652 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23653 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23654 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23655 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23656 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23657 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23658 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23659 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23662 # We need space, tab and new line, in precisely that order.
23668 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23674 # Files that config.status was made for.
23675 if test -n "$ac_config_files"; then
23676 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23679 if test -n "$ac_config_headers"; then
23680 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23683 if test -n "$ac_config_links"; then
23684 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23687 if test -n "$ac_config_commands"; then
23688 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23691 cat >>"$CONFIG_STATUS" <<\EOF
23694 \`$as_me' instantiates files from templates according to the
23695 current configuration.
23697 Usage: $0 [OPTIONS] [FILE]...
23699 -h, --help print this help, then exit
23700 -V, --version print version number, then exit
23701 -d, --debug don't remove temporary files
23702 --recheck update $as_me by reconfiguring in the same conditions
23703 --file=FILE[:TEMPLATE]
23704 instantiate the configuration file FILE
23705 --header=FILE[:TEMPLATE]
23706 instantiate the configuration header FILE
23708 Configuration files:
23711 Configuration headers:
23714 Configuration commands:
23717 Report bugs to <dickey@invisible-island.net>."
23720 cat >>"$CONFIG_STATUS" <<EOF
23723 configured by $0, generated by GNU Autoconf 2.52.20221009,
23724 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23726 Copyright 2003-2021,2022 Thomas E. Dickey
23727 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23728 Free Software Foundation, Inc.
23729 This config.status script is free software; the Free Software Foundation
23730 gives unlimited permission to copy, distribute and modify it."
23735 cat >>"$CONFIG_STATUS" <<\EOF
23736 # If no file are specified by the user, then we need to provide default
23737 # value. By we need to know if files were specified by the user.
23743 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23744 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23746 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23750 *) # This is not an option, so the user has probably given explicit
23752 ac_need_defaults=false;;
23756 # Handling of the options.
23758 cat >>"$CONFIG_STATUS" <<EOF
23759 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23760 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23761 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23763 cat >>"$CONFIG_STATUS" <<\EOF
23764 --version | --vers* | -V )
23765 echo "$ac_cs_version"; exit 0 ;;
23767 # Conflict between --help and --header
23768 { { echo "$as_me:23768: error: ambiguous option: $1
23769 Try \`$0 --help' for more information." >&5
23770 echo "$as_me: error: ambiguous option: $1
23771 Try \`$0 --help' for more information." >&2;}
23772 { (exit 1); exit 1; }; };;
23773 --help | --hel | -h )
23774 echo "$ac_cs_usage"; exit 0 ;;
23775 --debug | --d* | -d )
23777 --file | --fil | --fi | --f )
23779 CONFIG_FILES="$CONFIG_FILES $1"
23780 ac_need_defaults=false;;
23781 --header | --heade | --head | --hea )
23783 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23784 ac_need_defaults=false;;
23786 # This is an error.
23787 -*) { { echo "$as_me:23787: error: unrecognized option: $1
23788 Try \`$0 --help' for more information." >&5
23789 echo "$as_me: error: unrecognized option: $1
23790 Try \`$0 --help' for more information." >&2;}
23791 { (exit 1); exit 1; }; } ;;
23793 *) ac_config_targets="$ac_config_targets $1" ;;
23802 ## ----------------------- ##
23803 ## Running config.status. ##
23804 ## ----------------------- ##
23806 This file was extended by $as_me 2.52.20221009, executed with
23807 CONFIG_FILES = $CONFIG_FILES
23808 CONFIG_HEADERS = $CONFIG_HEADERS
23809 CONFIG_LINKS = $CONFIG_LINKS
23810 CONFIG_COMMANDS = $CONFIG_COMMANDS
23811 > "$ac_cs_invocation"
23812 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23817 cat >>"$CONFIG_STATUS" <<EOF
23819 # INIT-COMMANDS section.
23829 cat >>"$CONFIG_STATUS" <<\EOF
23830 for ac_config_target in $ac_config_targets
23832 case "$ac_config_target" in
23833 # Handling of arguments.
23834 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23835 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23836 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23837 *) { { echo "$as_me:23837: error: invalid argument: $ac_config_target" >&5
23838 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23839 { (exit 1); exit 1; }; };;
23843 # If the user did not use the arguments to specify the items to instantiate,
23844 # then the envvar interface is used. Set only those that are not.
23845 # We use the long form for the default assignment because of an extremely
23846 # bizarre bug on SunOS 4.1.3.
23847 if "$ac_need_defaults"; then
23848 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23849 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23850 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23853 # Create a temporary directory, and hook for its removal unless debugging.
23856 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23857 trap '{ (exit 1); exit 1; }' 1 2 13 15
23860 # Create a (secure) tmp directory for tmp files.
23863 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23864 test -n "$tmp" && test -d "$tmp"
23867 tmp=$TMPDIR/cs$$-$RANDOM
23868 (umask 077 && mkdir "$tmp")
23871 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23872 { (exit 1); exit 1; }
23877 cat >>"$CONFIG_STATUS" <<EOF
23880 # CONFIG_FILES section.
23883 # No need to generate the scripts if there are no CONFIG_FILES.
23884 # This happens for instance when ./config.status config.h
23885 if test -n "\$CONFIG_FILES"; then
23886 # Protect against being on the right side of a sed subst in config.status.
23887 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23888 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
23889 s,@SHELL@,$SHELL,;t t
23890 s,@exec_prefix@,$exec_prefix,;t t
23891 s,@prefix@,$prefix,;t t
23892 s,@program_transform_name@,$program_transform_name,;t t
23893 s,@bindir@,$bindir,;t t
23894 s,@sbindir@,$sbindir,;t t
23895 s,@libexecdir@,$libexecdir,;t t
23896 s,@datarootdir@,$datarootdir,;t t
23897 s,@datadir@,$datadir,;t t
23898 s,@sysconfdir@,$sysconfdir,;t t
23899 s,@sharedstatedir@,$sharedstatedir,;t t
23900 s,@localstatedir@,$localstatedir,;t t
23901 s,@runstatedir@,$runstatedir,;t t
23902 s,@libdir@,$libdir,;t t
23903 s,@includedir@,$includedir,;t t
23904 s,@oldincludedir@,$oldincludedir,;t t
23905 s,@infodir@,$infodir,;t t
23906 s,@mandir@,$mandir,;t t
23907 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23908 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23909 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23910 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23911 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23912 s,@build_alias@,$build_alias,;t t
23913 s,@host_alias@,$host_alias,;t t
23914 s,@target_alias@,$target_alias,;t t
23915 s,@ECHO_C@,$ECHO_C,;t t
23916 s,@ECHO_N@,$ECHO_N,;t t
23917 s,@ECHO_T@,$ECHO_T,;t t
23918 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23919 s,@DEFS@,$DEFS,;t t
23920 s,@LIBS@,$LIBS,;t t
23921 s,@build@,$build,;t t
23922 s,@build_cpu@,$build_cpu,;t t
23923 s,@build_vendor@,$build_vendor,;t t
23924 s,@build_os@,$build_os,;t t
23925 s,@host@,$host,;t t
23926 s,@host_cpu@,$host_cpu,;t t
23927 s,@host_vendor@,$host_vendor,;t t
23928 s,@host_os@,$host_os,;t t
23929 s,@SET_MAKE@,$SET_MAKE,;t t
23931 s,@CFLAGS@,$CFLAGS,;t t
23932 s,@LDFLAGS@,$LDFLAGS,;t t
23933 s,@CPPFLAGS@,$CPPFLAGS,;t t
23934 s,@ac_ct_CC@,$ac_ct_CC,;t t
23935 s,@EXEEXT@,$EXEEXT,;t t
23936 s,@OBJEXT@,$OBJEXT,;t t
23937 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23939 s,@GREP@,$GREP,;t t
23940 s,@EGREP@,$EGREP,;t t
23942 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23943 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23944 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23945 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23946 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23947 s,@LINT@,$LINT,;t t
23948 s,@LINT_OPTS@,$LINT_OPTS,;t t
23949 s,@LINT_LIBS@,$LINT_LIBS,;t t
23950 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
23951 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
23952 s,@CTAGS@,$CTAGS,;t t
23953 s,@ETAGS@,$ETAGS,;t t
23954 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23955 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23956 s,@MATH_LIB@,$MATH_LIB,;t t
23957 s,@top_builddir@,$top_builddir,;t t
23958 s,@CC_G_OPT@,$CC_G_OPT,;t t
23959 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23960 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23961 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23962 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23964 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23965 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23966 s,@LD_MODEL@,$LD_MODEL,;t t
23967 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23968 s,@LIBTOOL@,$LIBTOOL,;t t
23969 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23970 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23971 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23972 s,@LIB_LINK@,$LIB_LINK,;t t
23973 s,@LINK_TESTS@,$LINK_TESTS,;t t
23974 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23975 s,@PACKAGE@,$PACKAGE,;t t
23976 s,@PTHREAD@,$PTHREAD,;t t
23977 s,@TEST_ARGS@,$TEST_ARGS,;t t
23978 s,@TEST_DEPS@,$TEST_DEPS,;t t
23979 s,@TEST_LIBS@,$TEST_LIBS,;t t
23980 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23981 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23982 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23983 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23984 s,@includesubdir@,$includesubdir,;t t
23985 s,@FGREP@,$FGREP,;t t
23986 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23987 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
23988 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23989 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23990 s,@ECHO_LT@,$ECHO_LT,;t t
23991 s,@ECHO_LD@,$ECHO_LD,;t t
23992 s,@RULE_CC@,$RULE_CC,;t t
23993 s,@SHOW_CC@,$SHOW_CC,;t t
23994 s,@ECHO_CC@,$ECHO_CC,;t t
23995 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23996 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23997 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23998 s,@X_CFLAGS@,$X_CFLAGS,;t t
23999 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24000 s,@X_LIBS@,$X_LIBS,;t t
24001 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24002 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24003 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24004 s,@RGB_PATH@,$RGB_PATH,;t t
24005 s,@no_x11_rgb@,$no_x11_rgb,;t t
24006 s,@FORM_NAME@,$FORM_NAME,;t t
24007 s,@MENU_NAME@,$MENU_NAME,;t t
24008 s,@PANEL_NAME@,$PANEL_NAME,;t t
24009 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24010 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24011 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24016 cat >>"$CONFIG_STATUS" <<\EOF
24017 # Split the substitutions into bite-sized pieces for seds with
24018 # small command number limits, like on Digital OSF/1 and HP-UX.
24019 ac_max_sed_lines=48
24020 ac_sed_frag=1 # Number of current file.
24021 ac_beg=1 # First line for current file.
24022 ac_end=$ac_max_sed_lines # Line after last line for current file.
24025 while "$ac_more_lines"; do
24026 if test "$ac_beg" -gt 1; then
24027 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24029 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24031 if test ! -s "$tmp"/subs.frag; then
24032 ac_more_lines=false
24034 # The purpose of the label and of the branching condition is to
24035 # speed up the sed processing (if there are no `@' at all, there
24036 # is no need to browse any of the substitutions).
24037 # These are the two extra sed commands mentioned above.
24039 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24040 # It is possible to make a multiline substitution using escaped newlines.
24041 # Ensure that we do not split the substitution between script fragments.
24043 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
24044 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
24045 if test -s "$tmp"/subs.next; then
24046 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
24047 if test ! -s "$tmp"/subs.edit; then
24048 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
24049 if test ! -s "$tmp"/subs.edit; then
24050 if test "$ac_beg" -gt 1; then
24051 ac_end=`expr "$ac_end" - 1`
24058 if test -z "$ac_sed_cmds"; then
24059 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24061 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24063 ac_sed_frag=`expr "$ac_sed_frag" + 1`
24065 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
24068 if test -z "$ac_sed_cmds"; then
24071 fi # test -n "$CONFIG_FILES"
24074 cat >>"$CONFIG_STATUS" <<\EOF
24075 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24076 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24078 - | *:- | *:-:* ) # input from stdin
24080 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24081 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24082 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24083 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24084 * ) ac_file_in=$ac_file.in ;;
24087 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24088 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24089 X"$ac_file" : 'X\(//\)[^/]' \| \
24090 X"$ac_file" : 'X\(//\)$' \| \
24091 X"$ac_file" : 'X\(/\)' \| \
24092 . : '\(.\)' 2>/dev/null ||
24094 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24095 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24096 /^X\(\/\/\)$/{ s//\1/; q; }
24097 /^X\(\/\).*/{ s//\1/; q; }
24099 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24100 { case "$ac_dir" in
24101 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24105 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24106 case $as_mkdir_dir in
24107 # Skip DOS drivespec
24108 ?:) as_incr_dir=$as_mkdir_dir ;;
24110 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24111 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24116 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
24117 # A "../" for each directory in $ac_dir_suffix.
24118 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24120 ac_dir_suffix= ac_dots=
24125 if test -z "$ac_dots"; then
24128 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24130 [\\/]* | ?:[\\/]* )
24131 ac_srcdir="$srcdir$ac_dir_suffix";
24132 ac_top_srcdir="$srcdir" ;;
24133 *) # Relative path.
24134 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24135 ac_top_srcdir="$ac_dots$srcdir" ;;
24139 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24140 *) ac_INSTALL=$ac_dots$INSTALL ;;
24143 if test x"$ac_file" != x-; then
24144 { echo "$as_me:24144: creating $ac_file" >&5
24145 echo "$as_me: creating $ac_file" >&6;}
24148 # Let's still pretend it is `configure' which instantiates (i.e., don't
24149 # use $as_me), people would be surprised to read:
24150 # /* config.h. Generated automatically by config.status. */
24151 configure_input="Generated automatically from `echo $ac_file_in |
24152 sed 's,.*/,,'` by configure."
24154 # First look for the input files in the build tree, otherwise in the
24156 ac_file_inputs=`IFS=:
24157 for f in $ac_file_in; do
24159 -) echo "$tmp"/stdin ;;
24161 # Absolute (can't be DOS-style, as IFS=:)
24162 test -f "$f" || { { echo "$as_me:24162: error: cannot find input file: $f" >&5
24163 echo "$as_me: error: cannot find input file: $f" >&2;}
24164 { (exit 1); exit 1; }; }
24167 if test -f "$f"; then
24170 elif test -f "$srcdir/$f"; then
24175 { { 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 done` || { (exit 1); exit 1; }
24182 cat >>"$CONFIG_STATUS" <<\EOF
24183 ac_warn_datarootdir=no
24184 if test x"$ac_file" != x-; then
24185 for ac_item in $ac_file_inputs
24187 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24188 if test -n "$ac_seen"; then
24189 ac_used=`grep '@datarootdir@' "$ac_item"`
24190 if test -z "$ac_used"; then
24191 { echo "$as_me:24191: WARNING: datarootdir was used implicitly but not set:
24193 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24195 ac_warn_datarootdir=yes
24198 ac_seen=`grep '${datarootdir}' "$ac_item"`
24199 if test -n "$ac_seen"; then
24200 { echo "$as_me:24200: WARNING: datarootdir was used explicitly but not set:
24202 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24204 ac_warn_datarootdir=yes
24209 if test "x$ac_warn_datarootdir" = xyes; then
24210 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24214 cat >>"$CONFIG_STATUS" <<EOF
24218 cat >>"$CONFIG_STATUS" <<\EOF
24220 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24221 s,@configure_input@,$configure_input,;t t
24222 s,@srcdir@,$ac_srcdir,;t t
24223 s,@top_srcdir@,$ac_top_srcdir,;t t
24224 s,@INSTALL@,$ac_INSTALL,;t t
24225 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
24228 : "${FGREP:=grep -F}"
24229 : "${EGREP:=grep -E}"
24230 cat >>"$CONFIG_STATUS" <<EOF
24231 : "\${FGREP:=$FGREP}"
24232 : "\${EGREP:=$EGREP}"
24234 cat >>"$CONFIG_STATUS" <<\EOF
24235 if test x"$ac_file" != x-; then
24236 cp "$tmp/out" "$ac_file"
24238 for ac_name in prefix exec_prefix datarootdir
24240 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
24241 if test -n "$ac_seen"; then
24242 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24243 if test -z "$ac_init"; then
24244 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
24245 { echo "$as_me:24245: WARNING: Variable $ac_name is used but was not set:
24247 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24252 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
24253 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
24254 if test -s "$tmp"/out; then
24255 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
24256 { echo "$as_me:24256: WARNING: Some variables may not be substituted:
24258 echo "$as_me: WARNING: Some variables may not be substituted:
24268 cat >>"$CONFIG_STATUS" <<\EOF
24271 # CONFIG_HEADER section.
24274 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24275 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24277 # ac_d sets the value in "#define NAME VALUE" lines.
24278 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24279 ac_dB='[ ].*$,\1#\2'
24282 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24283 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24284 ac_iB='\([ ]\),\1#\2define\3'
24287 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24288 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24289 ac_uB='$,\1#\2define\3'
24293 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24294 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24296 - | *:- | *:-:* ) # input from stdin
24298 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24299 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24300 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24301 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24302 * ) ac_file_in=$ac_file.in ;;
24305 test x"$ac_file" != x- && { echo "$as_me:24305: creating $ac_file" >&5
24306 echo "$as_me: creating $ac_file" >&6;}
24308 # First look for the input files in the build tree, otherwise in the
24310 ac_file_inputs=`IFS=:
24311 for f in $ac_file_in; do
24313 -) echo "$tmp"/stdin ;;
24315 # Absolute (can't be DOS-style, as IFS=:)
24316 test -f "$f" || { { echo "$as_me:24316: error: cannot find input file: $f" >&5
24317 echo "$as_me: error: cannot find input file: $f" >&2;}
24318 { (exit 1); exit 1; }; }
24321 if test -f "$f"; then
24324 elif test -f "$srcdir/$f"; then
24329 { { 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 done` || { (exit 1); exit 1; }
24335 # Remove the trailing spaces.
24336 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
24340 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24341 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24342 # be either 'cat' or 'sort'.
24343 cat confdefs.h | uniq >conftest.vals
24345 # Break up conftest.vals because some shells have a limit on
24346 # the size of here documents, and old seds have small limits too.
24348 rm -f conftest.tail
24349 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24350 while grep . conftest.vals >/dev/null
24352 # Write chunks of a limited-size here document to conftest.frag.
24353 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24354 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24355 echo 'CEOF' >> "$CONFIG_STATUS"
24356 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24357 rm -f conftest.vals
24358 mv conftest.tail conftest.vals
24360 rm -f conftest.vals
24362 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24364 echo ' cat >> conftest.edit <<CEOF
24365 /@DEFS@/r conftest.frag
24368 sed -f conftest.edit "$tmp"/in > "$tmp"/out
24370 mv "$tmp"/out "$tmp"/in
24371 rm -f conftest.edit conftest.frag
24372 ' >> "$CONFIG_STATUS"
24374 cat >>"$CONFIG_STATUS" <<\EOF
24375 # Let's still pretend it is `configure' which instantiates (i.e., don't
24376 # use $as_me), people would be surprised to read:
24377 # /* config.h. Generated automatically by config.status. */
24378 if test x"$ac_file" = x-; then
24379 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
24381 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
24383 cat "$tmp"/in >>"$tmp"/config.h
24385 if test x"$ac_file" != x-; then
24386 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24387 { echo "$as_me:24387: $ac_file is unchanged" >&5
24388 echo "$as_me: $ac_file is unchanged" >&6;}
24390 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24391 X"$ac_file" : 'X\(//\)[^/]' \| \
24392 X"$ac_file" : 'X\(//\)$' \| \
24393 X"$ac_file" : 'X\(/\)' \| \
24394 . : '\(.\)' 2>/dev/null ||
24396 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24397 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24398 /^X\(\/\/\)$/{ s//\1/; q; }
24399 /^X\(\/\).*/{ s//\1/; q; }
24401 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24402 { case "$ac_dir" in
24403 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24407 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24408 case $as_mkdir_dir in
24409 # Skip DOS drivespec
24410 ?:) as_incr_dir=$as_mkdir_dir ;;
24412 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24413 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24420 mv "$tmp/config.h" "$ac_file"
24423 cat "$tmp"/config.h
24424 rm -f "$tmp"/config.h
24428 cat >>"$CONFIG_STATUS" <<\EOF
24430 # CONFIG_COMMANDS section.
24432 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24433 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24434 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24441 if test ! -d "$srcdir/$cf_dir" ; then
24443 elif test -f "$srcdir/$cf_dir/programs" ; then
24444 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24448 cat >>Makefile <<TEST_EOF
24450 # These rules are generated so we do not rely on suffix rules, which do not
24451 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24452 # some, and the '\$x' confuses others).
24455 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24458 cat >>Makefile <<TEST_EOF
24460 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24461 \$(srcdir)/test.priv.h \\
24464 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24468 if test -f ../config.guess && test -f ../config.sub
24470 cat >>Makefile <<TEST_EOF
24472 # if we used CF_INHERIT for getting these files, we can remove them
24474 rm -f config.guess config.sub
24482 cat >>"$CONFIG_STATUS" <<\EOF
24484 { (exit 0); exit 0; }
24486 chmod +x "$CONFIG_STATUS"
24487 ac_clean_files=$ac_clean_files_save
24489 # configure is writing to config.log, and then calls config.status.
24490 # config.status does its own redirection, appending to config.log.
24491 # Unfortunately, on DOS this fails, as config.log is still kept open
24492 # by configure, so config.status won't be able to write to it; its
24493 # output is simply discarded. So we exec the FD to /dev/null,
24494 # effectively closing config.log, so it can be properly (re)opened and
24495 # appended to by config.status. When coming back to configure, we
24496 # need to make the FD available again.
24497 if test "$no_create" != yes; then
24500 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24502 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24503 # would make configure fail if this is the last instruction.
24504 "$ac_cs_success" || { (exit 1); exit 1; }