2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20210105.
5 # Copyright 2003-2020,2021 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
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-string-hacks work around bogus compiler/loader warnings
673 --with-pkg-config{=path} enable/disable use of pkg-config
674 --disable-echo do not display "compiling" commands
675 Curses Version-dependent Options:
676 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
677 --disable-widec disable checks for wide-character functions
678 --with-curses-dir=DIR directory in which (n)curses is installed
679 --with-screen=XXX use specified curses-libraries
680 --with-ncursesw use wide ncurses-libraries
681 --with-ncurses use ncurses-libraries
682 --with-pdcurses compile/link with pdcurses X11 library
683 --with-curses-colr compile/link with HPUX 10.x color-curses
684 --with-curses-5lib compile/link with SunOS 5lib curses
685 --with-Xaw3d link with Xaw 3d library
686 --with-Xaw3dxft link with Xaw 3d xft library
687 --with-neXtaw link with neXT Athena library
688 --with-XawPlus link with Athena-Plus library
689 --with-x use the X Window System
690 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
691 --with-form-libname=XXX override form basename of library
692 --with-menu-libname=XXX override menu basename of library
693 --with-panel-libname=XXX override panel basename of library
694 --disable-panel disable checks for panel functions
695 --disable-menu disable checks for menu functions
696 --disable-form disable checks for form functions
697 Testing/development Options:
698 --enable-warnings test: turn on gcc compiler warnings
699 --with-dmalloc test: use Gray Watson's dmalloc library
700 --with-dbmalloc test: use Conor Cahill's dbmalloc library
701 --with-valgrind test: use valgrind
702 --disable-leaks test: free permanent memory, analyze leaks
703 --disable-rpath-hack don't add rpath options for additional libraries
705 Some influential environment variables:
706 CC C compiler command
707 CFLAGS C compiler flags
708 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
709 nonstandard directory <lib dir>
710 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
711 headers in a nonstandard directory <include dir>
714 Use these variables to override the choices made by `configure' or to help
715 it to find libraries and programs with nonstandard names/locations.
720 if test "$ac_init_help" = "recursive"; then
721 # If there are subdirs, report their specific --help.
723 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
725 # A "../" for each directory in /$ac_subdir.
726 ac_dots=`echo "$ac_subdir" |
727 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
730 .) # No --srcdir option. We are building in place.
731 ac_sub_srcdir="$srcdir" ;;
732 [\\/]* | ?:[\\/]* ) # Absolute path.
733 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
735 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
738 # Check for guested configure; otherwise get Cygnus style configure.
739 if test -f "$ac_sub_srcdir/configure.gnu"; then
741 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
742 elif test -f "$ac_sub_srcdir/configure"; then
744 $SHELL "$ac_sub_srcdir/configure" --help=recursive
745 elif test -f "$ac_sub_srcdir/configure.ac" ||
746 test -f "$ac_sub_srcdir/configure.in"; then
748 "$ac_configure" --help
750 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
756 test -n "$ac_init_help" && exit 0
757 if "$ac_init_version"; then
760 Copyright 2003-2020,2021 Thomas E. Dickey
761 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
762 Free Software Foundation, Inc.
763 This configure script is free software; the Free Software Foundation
764 gives unlimited permission to copy, distribute and modify it.
770 This file contains any messages produced by compilers while
771 running configure, to aid debugging if configure makes a mistake.
773 It was created by $as_me, which was
774 generated by GNU Autoconf 2.52.20210105. Invocation command line was
785 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
786 uname -m = `(uname -m) 2>/dev/null || echo unknown`
787 uname -r = `(uname -r) 2>/dev/null || echo unknown`
788 uname -s = `(uname -s) 2>/dev/null || echo unknown`
789 uname -v = `(uname -v) 2>/dev/null || echo unknown`
791 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
792 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
794 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
795 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
796 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
797 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
798 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
799 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
800 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
814 # Keep a trace of the command line.
815 # Strip out --no-create and --no-recursion so they do not pile up.
816 # Also quote any args containing shell meta-characters.
822 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
823 | --no-cr | --no-c) ;;
824 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
825 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
826 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
827 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
828 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
830 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
833 # Get rid of the leading space.
836 # When interrupted or exit'd, cleanup temporary files, and complete
837 # config.log. We remove comments because anyway the quotes in there
838 # would cause problems or look ugly.
840 # Save into config.log some information that might help in debugging.
842 echo "## ----------------- ##" >&5
843 echo "## Cache variables. ##" >&5
844 echo "## ----------------- ##" >&5
846 # The following way of writing the cache mishandles newlines in values,
849 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
852 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
853 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
857 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
861 sed "/^$/d" confdefs.h >conftest.log
862 if test -s conftest.log; then
864 echo "## ------------ ##" >&5
865 echo "## confdefs.h. ##" >&5
866 echo "## ------------ ##" >&5
871 test "$ac_signal" != 0 &&
872 echo "$as_me: caught signal $ac_signal" >&5
873 echo "$as_me: exit $exit_status" >&5
874 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
877 for ac_signal in 1 2 13 15; do
878 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
882 # confdefs.h avoids OS command line length limits that DEFS can exceed.
883 rm -rf conftest* confdefs.h
884 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
887 # Let the site file select an alternate cache file if it wants to.
888 # Prefer explicitly selected file to automatically selected ones.
889 if test -z "$CONFIG_SITE"; then
890 if test "x$prefix" != xNONE; then
891 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
893 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
896 for ac_site_file in $CONFIG_SITE; do
897 if test -r "$ac_site_file"; then
898 { echo "$as_me:898: loading site script $ac_site_file" >&5
899 echo "$as_me: loading site script $ac_site_file" >&6;}
900 cat "$ac_site_file" >&5
905 if test -r "$cache_file"; then
906 # Some versions of bash will fail to source /dev/null (special
907 # files actually), so we avoid doing that.
908 if test -f "$cache_file"; then
909 { echo "$as_me:909: loading cache $cache_file" >&5
910 echo "$as_me: loading cache $cache_file" >&6;}
912 [\\/]* | ?:[\\/]* ) . $cache_file;;
917 { echo "$as_me:917: creating cache $cache_file" >&5
918 echo "$as_me: creating cache $cache_file" >&6;}
922 # Check that the precious variables saved in the cache have kept the same
924 ac_cache_corrupted=false
925 for ac_var in `(set) 2>&1 |
926 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
927 eval ac_old_set=\$ac_cv_env_${ac_var}_set
928 eval ac_new_set=\$ac_env_${ac_var}_set
929 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
930 eval ac_new_val="\$ac_env_${ac_var}_value"
931 case "$ac_old_set,$ac_new_set" in
933 { echo "$as_me:933: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
934 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
935 ac_cache_corrupted=: ;;
937 { echo "$as_me:937: error: \`$ac_var' was not set in the previous run" >&5
938 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
939 ac_cache_corrupted=: ;;
942 if test "x$ac_old_val" != "x$ac_new_val"; then
943 { echo "$as_me:943: error: \`$ac_var' has changed since the previous run:" >&5
944 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
945 { echo "$as_me:945: former value: $ac_old_val" >&5
946 echo "$as_me: former value: $ac_old_val" >&2;}
947 { echo "$as_me:947: current value: $ac_new_val" >&5
948 echo "$as_me: current value: $ac_new_val" >&2;}
952 # Pass precious variables to config.status. It doesn't matter if
953 # we pass some twice (in addition to the command line arguments).
954 if test "$ac_new_set" = set; then
955 case "$ac_new_val" in
956 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
958 ac_configure_args="$ac_configure_args '$ac_arg'"
960 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
965 if "$ac_cache_corrupted"; then
966 { echo "$as_me:966: error: changes in the environment can compromise the build" >&5
967 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
968 { { echo "$as_me:968: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
969 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
970 { (exit 1); exit 1; }; }
974 ac_cpp='$CPP $CPPFLAGS'
975 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
976 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
978 ac_main_return="return"
980 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
982 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
994 echo "#! $SHELL" >conftest.sh
995 echo "exit 0" >>conftest.sh
997 if { (echo "$as_me:997: PATH=\".;.\"; conftest.sh") >&5
998 (PATH=".;."; conftest.sh) 2>&5
1000 echo "$as_me:1000: \$? = $ac_status" >&5
1001 (exit "$ac_status"); }; then
1002 ac_path_separator=';'
1006 PATH_SEPARATOR="$ac_path_separator"
1009 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1011 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1013 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1016 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1017 if test -f "$ac_dir/install-sh"; then
1019 ac_install_sh="$ac_aux_dir/install-sh -c"
1021 elif test -f "$ac_dir/install.sh"; then
1023 ac_install_sh="$ac_aux_dir/install.sh -c"
1025 elif test -f "$ac_dir/shtool"; then
1027 ac_install_sh="$ac_aux_dir/shtool install -c"
1031 if test -z "$ac_aux_dir"; then
1032 { { echo "$as_me:1032: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1033 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1034 { (exit 1); exit 1; }; }
1036 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1037 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1038 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1040 # Make sure we can run config.sub.
1041 $ac_config_sub sun4 >/dev/null 2>&1 ||
1042 { { echo "$as_me:1042: error: cannot run $ac_config_sub" >&5
1043 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1044 { (exit 1); exit 1; }; }
1046 echo "$as_me:1046: checking build system type" >&5
1047 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1048 if test "${ac_cv_build+set}" = set; then
1049 echo $ECHO_N "(cached) $ECHO_C" >&6
1051 ac_cv_build_alias=$build_alias
1052 test -z "$ac_cv_build_alias" &&
1053 ac_cv_build_alias=`$ac_config_guess`
1054 test -z "$ac_cv_build_alias" &&
1055 { { echo "$as_me:1055: error: cannot guess build type; you must specify one" >&5
1056 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1057 { (exit 1); exit 1; }; }
1058 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1059 { { echo "$as_me:1059: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1060 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1061 { (exit 1); exit 1; }; }
1064 echo "$as_me:1064: result: $ac_cv_build" >&5
1065 echo "${ECHO_T}$ac_cv_build" >&6
1067 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1068 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1069 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1071 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1072 echo "$as_me:1072: checking host system type" >&5
1073 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1074 if test "${ac_cv_host+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1077 ac_cv_host_alias=$host_alias
1078 test -z "$ac_cv_host_alias" &&
1079 ac_cv_host_alias=$ac_cv_build_alias
1080 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1081 { { echo "$as_me:1081: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1082 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1083 { (exit 1); exit 1; }; }
1086 echo "$as_me:1086: result: $ac_cv_host" >&5
1087 echo "${ECHO_T}$ac_cv_host" >&6
1089 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1090 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1091 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1093 system_name="$host_os"
1095 system_name="`(uname -s -r) 2>/dev/null`"
1096 if test -z "$system_name" ; then
1097 system_name="`(hostname) 2>/dev/null`"
1100 test -n "$system_name" &&
1101 cat >>confdefs.h <<EOF
1102 #define SYSTEM_NAME "$system_name"
1105 if test "${cf_cv_system_name+set}" = set; then
1106 echo $ECHO_N "(cached) $ECHO_C" >&6
1108 cf_cv_system_name="$system_name"
1111 test -z "$system_name" && system_name="$cf_cv_system_name"
1112 test -n "$cf_cv_system_name" && echo "$as_me:1112: result: Configuring for $cf_cv_system_name" >&5
1113 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1115 if test ".$system_name" != ".$cf_cv_system_name" ; then
1116 echo "$as_me:1116: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1117 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1118 { { echo "$as_me:1118: error: \"Please remove config.cache and try again.\"" >&5
1119 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1120 { (exit 1); exit 1; }; }
1123 test "$program_prefix" != NONE &&
1124 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1125 # Use a double $ so make ignores it.
1126 test "$program_suffix" != NONE &&
1127 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1128 # Double any \ or $. echo might interpret backslashes.
1129 # By default was `s,x,x', remove it if useless.
1130 cat <<\_ACEOF >conftest.sed
1131 s/[\\$]/&&/g;s/;s,x,x,$//
1133 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1136 echo "$as_me:1136: checking whether ${MAKE-make} sets \${MAKE}" >&5
1137 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1138 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1139 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1140 echo $ECHO_N "(cached) $ECHO_C" >&6
1142 cat >conftest.make <<\EOF
1144 @echo 'ac_maketemp="${MAKE}"'
1146 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1147 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1148 if test -n "$ac_maketemp"; then
1149 eval ac_cv_prog_make_${ac_make}_set=yes
1151 eval ac_cv_prog_make_${ac_make}_set=no
1155 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1156 echo "$as_me:1156: result: yes" >&5
1157 echo "${ECHO_T}yes" >&6
1160 echo "$as_me:1160: result: no" >&5
1161 echo "${ECHO_T}no" >&6
1162 SET_MAKE="MAKE=${MAKE-make}"
1166 ac_cpp='$CPP $CPPFLAGS'
1167 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1168 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1169 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1170 ac_main_return="return"
1171 if test -n "$ac_tool_prefix"; then
1172 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1173 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1174 echo "$as_me:1174: checking for $ac_word" >&5
1175 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1176 if test "${ac_cv_prog_CC+set}" = set; then
1177 echo $ECHO_N "(cached) $ECHO_C" >&6
1179 if test -n "$CC"; then
1180 ac_cv_prog_CC="$CC" # Let the user override the test.
1182 ac_save_IFS=$IFS; IFS=$ac_path_separator
1184 for ac_dir in $ac_dummy; do
1186 test -z "$ac_dir" && ac_dir=.
1187 $as_executable_p "$ac_dir/$ac_word" || continue
1188 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1189 echo "$as_me:1189: found $ac_dir/$ac_word" >&5
1196 if test -n "$CC"; then
1197 echo "$as_me:1197: result: $CC" >&5
1198 echo "${ECHO_T}$CC" >&6
1200 echo "$as_me:1200: result: no" >&5
1201 echo "${ECHO_T}no" >&6
1205 if test -z "$ac_cv_prog_CC"; then
1207 # Extract the first word of "gcc", so it can be a program name with args.
1208 set dummy gcc; ac_word=$2
1209 echo "$as_me:1209: checking for $ac_word" >&5
1210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1211 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1212 echo $ECHO_N "(cached) $ECHO_C" >&6
1214 if test -n "$ac_ct_CC"; then
1215 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1217 ac_save_IFS=$IFS; IFS=$ac_path_separator
1219 for ac_dir in $ac_dummy; do
1221 test -z "$ac_dir" && ac_dir=.
1222 $as_executable_p "$ac_dir/$ac_word" || continue
1223 ac_cv_prog_ac_ct_CC="gcc"
1224 echo "$as_me:1224: found $ac_dir/$ac_word" >&5
1230 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1231 if test -n "$ac_ct_CC"; then
1232 echo "$as_me:1232: result: $ac_ct_CC" >&5
1233 echo "${ECHO_T}$ac_ct_CC" >&6
1235 echo "$as_me:1235: result: no" >&5
1236 echo "${ECHO_T}no" >&6
1244 if test -z "$CC"; then
1245 if test -n "$ac_tool_prefix"; then
1246 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1247 set dummy ${ac_tool_prefix}cc; ac_word=$2
1248 echo "$as_me:1248: checking for $ac_word" >&5
1249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1250 if test "${ac_cv_prog_CC+set}" = set; then
1251 echo $ECHO_N "(cached) $ECHO_C" >&6
1253 if test -n "$CC"; then
1254 ac_cv_prog_CC="$CC" # Let the user override the test.
1256 ac_save_IFS=$IFS; IFS=$ac_path_separator
1258 for ac_dir in $ac_dummy; do
1260 test -z "$ac_dir" && ac_dir=.
1261 $as_executable_p "$ac_dir/$ac_word" || continue
1262 ac_cv_prog_CC="${ac_tool_prefix}cc"
1263 echo "$as_me:1263: found $ac_dir/$ac_word" >&5
1270 if test -n "$CC"; then
1271 echo "$as_me:1271: result: $CC" >&5
1272 echo "${ECHO_T}$CC" >&6
1274 echo "$as_me:1274: result: no" >&5
1275 echo "${ECHO_T}no" >&6
1279 if test -z "$ac_cv_prog_CC"; then
1281 # Extract the first word of "cc", so it can be a program name with args.
1282 set dummy cc; ac_word=$2
1283 echo "$as_me:1283: checking for $ac_word" >&5
1284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1285 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1286 echo $ECHO_N "(cached) $ECHO_C" >&6
1288 if test -n "$ac_ct_CC"; then
1289 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1291 ac_save_IFS=$IFS; IFS=$ac_path_separator
1293 for ac_dir in $ac_dummy; do
1295 test -z "$ac_dir" && ac_dir=.
1296 $as_executable_p "$ac_dir/$ac_word" || continue
1297 ac_cv_prog_ac_ct_CC="cc"
1298 echo "$as_me:1298: found $ac_dir/$ac_word" >&5
1304 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1305 if test -n "$ac_ct_CC"; then
1306 echo "$as_me:1306: result: $ac_ct_CC" >&5
1307 echo "${ECHO_T}$ac_ct_CC" >&6
1309 echo "$as_me:1309: result: no" >&5
1310 echo "${ECHO_T}no" >&6
1319 if test -z "$CC"; then
1320 # Extract the first word of "cc", so it can be a program name with args.
1321 set dummy cc; ac_word=$2
1322 echo "$as_me:1322: checking for $ac_word" >&5
1323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1324 if test "${ac_cv_prog_CC+set}" = set; then
1325 echo $ECHO_N "(cached) $ECHO_C" >&6
1327 if test -n "$CC"; then
1328 ac_cv_prog_CC="$CC" # Let the user override the test.
1331 ac_save_IFS=$IFS; IFS=$ac_path_separator
1333 for ac_dir in $ac_dummy; do
1335 test -z "$ac_dir" && ac_dir=.
1336 $as_executable_p "$ac_dir/$ac_word" || continue
1337 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1338 ac_prog_rejected=yes
1342 echo "$as_me:1342: found $ac_dir/$ac_word" >&5
1346 if test "$ac_prog_rejected" = yes; then
1347 # We found a bogon in the path, so make sure we never use it.
1348 set dummy $ac_cv_prog_CC
1350 if test $# != 0; then
1351 # We chose a different compiler from the bogus one.
1352 # However, it has the same basename, so the bogon will be chosen
1353 # first if we set CC to just the basename; use the full file name.
1355 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1363 if test -n "$CC"; then
1364 echo "$as_me:1364: result: $CC" >&5
1365 echo "${ECHO_T}$CC" >&6
1367 echo "$as_me:1367: result: no" >&5
1368 echo "${ECHO_T}no" >&6
1372 if test -z "$CC"; then
1373 if test -n "$ac_tool_prefix"; then
1376 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1377 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1378 echo "$as_me:1378: checking for $ac_word" >&5
1379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1380 if test "${ac_cv_prog_CC+set}" = set; then
1381 echo $ECHO_N "(cached) $ECHO_C" >&6
1383 if test -n "$CC"; then
1384 ac_cv_prog_CC="$CC" # Let the user override the test.
1386 ac_save_IFS=$IFS; IFS=$ac_path_separator
1388 for ac_dir in $ac_dummy; do
1390 test -z "$ac_dir" && ac_dir=.
1391 $as_executable_p "$ac_dir/$ac_word" || continue
1392 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1393 echo "$as_me:1393: found $ac_dir/$ac_word" >&5
1400 if test -n "$CC"; then
1401 echo "$as_me:1401: result: $CC" >&5
1402 echo "${ECHO_T}$CC" >&6
1404 echo "$as_me:1404: result: no" >&5
1405 echo "${ECHO_T}no" >&6
1408 test -n "$CC" && break
1411 if test -z "$CC"; then
1415 # Extract the first word of "$ac_prog", so it can be a program name with args.
1416 set dummy $ac_prog; ac_word=$2
1417 echo "$as_me:1417: checking for $ac_word" >&5
1418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1419 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1420 echo $ECHO_N "(cached) $ECHO_C" >&6
1422 if test -n "$ac_ct_CC"; then
1423 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1425 ac_save_IFS=$IFS; IFS=$ac_path_separator
1427 for ac_dir in $ac_dummy; do
1429 test -z "$ac_dir" && ac_dir=.
1430 $as_executable_p "$ac_dir/$ac_word" || continue
1431 ac_cv_prog_ac_ct_CC="$ac_prog"
1432 echo "$as_me:1432: found $ac_dir/$ac_word" >&5
1438 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1439 if test -n "$ac_ct_CC"; then
1440 echo "$as_me:1440: result: $ac_ct_CC" >&5
1441 echo "${ECHO_T}$ac_ct_CC" >&6
1443 echo "$as_me:1443: result: no" >&5
1444 echo "${ECHO_T}no" >&6
1447 test -n "$ac_ct_CC" && break
1455 test -z "$CC" && { { echo "$as_me:1455: error: no acceptable cc found in \$PATH" >&5
1456 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1457 { (exit 1); exit 1; }; }
1459 # Provide some information about the compiler.
1460 echo "$as_me:1460:" \
1461 "checking for C compiler version" >&5
1462 ac_compiler=`set X $ac_compile; echo "$2"`
1463 { (eval echo "$as_me:1463: \"$ac_compiler --version </dev/null >&5\"") >&5
1464 (eval $ac_compiler --version </dev/null >&5) 2>&5
1466 echo "$as_me:1466: \$? = $ac_status" >&5
1467 (exit "$ac_status"); }
1468 { (eval echo "$as_me:1468: \"$ac_compiler -v </dev/null >&5\"") >&5
1469 (eval $ac_compiler -v </dev/null >&5) 2>&5
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit "$ac_status"); }
1473 { (eval echo "$as_me:1473: \"$ac_compiler -V </dev/null >&5\"") >&5
1474 (eval $ac_compiler -V </dev/null >&5) 2>&5
1476 echo "$as_me:1476: \$? = $ac_status" >&5
1477 (exit "$ac_status"); }
1479 cat >"conftest.$ac_ext" <<_ACEOF
1480 #line 1480 "configure"
1481 #include "confdefs.h"
1491 ac_clean_files_save=$ac_clean_files
1492 ac_clean_files="$ac_clean_files a.out a.exe"
1493 # Try to create an executable without -o first, disregard a.out.
1494 # It will help us diagnose broken compilers, and finding out an intuition
1496 echo "$as_me:1496: checking for C compiler default output" >&5
1497 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1498 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1499 if { (eval echo "$as_me:1499: \"$ac_link_default\"") >&5
1500 (eval $ac_link_default) 2>&5
1502 echo "$as_me:1502: \$? = $ac_status" >&5
1503 (exit "$ac_status"); }; then
1504 # Find the output, starting from the most likely. This scheme is
1505 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1507 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1508 ls a.out conftest 2>/dev/null;
1509 ls a.* conftest.* 2>/dev/null`; do
1511 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1512 a.out ) # We found the default executable, but exeext='' is most
1515 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1516 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1523 echo "$as_me: failed program was:" >&5
1524 cat "conftest.$ac_ext" >&5
1525 { { echo "$as_me:1525: error: C compiler cannot create executables" >&5
1526 echo "$as_me: error: C compiler cannot create executables" >&2;}
1527 { (exit 77); exit 77; }; }
1530 ac_exeext=$ac_cv_exeext
1531 echo "$as_me:1531: result: $ac_file" >&5
1532 echo "${ECHO_T}$ac_file" >&6
1534 # Check the compiler produces executables we can run. If not, either
1535 # the compiler is broken, or we cross compile.
1536 echo "$as_me:1536: checking whether the C compiler works" >&5
1537 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1538 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1539 # If not cross compiling, check that we can run a simple program.
1540 if test "$cross_compiling" != yes; then
1541 if { ac_try='./$ac_file'
1542 { (eval echo "$as_me:1542: \"$ac_try\"") >&5
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit "$ac_status"); }; }; then
1549 if test "$cross_compiling" = maybe; then
1552 { { echo "$as_me:1552: error: cannot run C compiled programs.
1553 If you meant to cross compile, use \`--host'." >&5
1554 echo "$as_me: error: cannot run C compiled programs.
1555 If you meant to cross compile, use \`--host'." >&2;}
1556 { (exit 1); exit 1; }; }
1560 echo "$as_me:1560: result: yes" >&5
1561 echo "${ECHO_T}yes" >&6
1563 rm -f a.out a.exe "conftest$ac_cv_exeext"
1564 ac_clean_files=$ac_clean_files_save
1565 # Check the compiler produces executables we can run. If not, either
1566 # the compiler is broken, or we cross compile.
1567 echo "$as_me:1567: checking whether we are cross compiling" >&5
1568 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1569 echo "$as_me:1569: result: $cross_compiling" >&5
1570 echo "${ECHO_T}$cross_compiling" >&6
1572 echo "$as_me:1572: checking for executable suffix" >&5
1573 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1574 if { (eval echo "$as_me:1574: \"$ac_link\"") >&5
1575 (eval $ac_link) 2>&5
1577 echo "$as_me:1577: \$? = $ac_status" >&5
1578 (exit "$ac_status"); }; then
1579 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1580 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1581 # work properly (i.e., refer to `conftest.exe'), while it won't with
1583 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1585 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1586 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1593 { { echo "$as_me:1593: error: cannot compute EXEEXT: cannot compile and link" >&5
1594 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1595 { (exit 1); exit 1; }; }
1598 rm -f "conftest$ac_cv_exeext"
1599 echo "$as_me:1599: result: $ac_cv_exeext" >&5
1600 echo "${ECHO_T}$ac_cv_exeext" >&6
1602 rm -f "conftest.$ac_ext"
1603 EXEEXT=$ac_cv_exeext
1605 echo "$as_me:1605: checking for object suffix" >&5
1606 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1607 if test "${ac_cv_objext+set}" = set; then
1608 echo $ECHO_N "(cached) $ECHO_C" >&6
1610 cat >"conftest.$ac_ext" <<_ACEOF
1611 #line 1611 "configure"
1612 #include "confdefs.h"
1622 rm -f conftest.o conftest.obj
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624 (eval $ac_compile) 2>&5
1626 echo "$as_me:1626: \$? = $ac_status" >&5
1627 (exit "$ac_status"); }; then
1628 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1630 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1631 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1636 echo "$as_me: failed program was:" >&5
1637 cat "conftest.$ac_ext" >&5
1638 { { echo "$as_me:1638: error: cannot compute OBJEXT: cannot compile" >&5
1639 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1640 { (exit 1); exit 1; }; }
1643 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1645 echo "$as_me:1645: result: $ac_cv_objext" >&5
1646 echo "${ECHO_T}$ac_cv_objext" >&6
1647 OBJEXT=$ac_cv_objext
1649 echo "$as_me:1649: checking whether we are using the GNU C compiler" >&5
1650 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1651 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1652 echo $ECHO_N "(cached) $ECHO_C" >&6
1654 cat >"conftest.$ac_ext" <<_ACEOF
1655 #line 1655 "configure"
1656 #include "confdefs.h"
1669 rm -f "conftest.$ac_objext"
1670 if { (eval echo "$as_me:1670: \"$ac_compile\"") >&5
1671 (eval $ac_compile) 2>&5
1673 echo "$as_me:1673: \$? = $ac_status" >&5
1674 (exit "$ac_status"); } &&
1675 { ac_try='test -s "conftest.$ac_objext"'
1676 { (eval echo "$as_me:1676: \"$ac_try\"") >&5
1679 echo "$as_me:1679: \$? = $ac_status" >&5
1680 (exit "$ac_status"); }; }; then
1683 echo "$as_me: failed program was:" >&5
1684 cat "conftest.$ac_ext" >&5
1687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1688 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1691 echo "$as_me:1691: result: $ac_cv_c_compiler_gnu" >&5
1692 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1693 GCC=`test $ac_compiler_gnu = yes && echo yes`
1694 ac_test_CFLAGS=${CFLAGS+set}
1695 ac_save_CFLAGS=$CFLAGS
1697 echo "$as_me:1697: checking whether $CC accepts -g" >&5
1698 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1699 if test "${ac_cv_prog_cc_g+set}" = set; then
1700 echo $ECHO_N "(cached) $ECHO_C" >&6
1702 cat >"conftest.$ac_ext" <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1714 rm -f "conftest.$ac_objext"
1715 if { (eval echo "$as_me:1715: \"$ac_compile\"") >&5
1716 (eval $ac_compile) 2>&5
1718 echo "$as_me:1718: \$? = $ac_status" >&5
1719 (exit "$ac_status"); } &&
1720 { ac_try='test -s "conftest.$ac_objext"'
1721 { (eval echo "$as_me:1721: \"$ac_try\"") >&5
1724 echo "$as_me:1724: \$? = $ac_status" >&5
1725 (exit "$ac_status"); }; }; then
1728 echo "$as_me: failed program was:" >&5
1729 cat "conftest.$ac_ext" >&5
1732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1734 echo "$as_me:1734: result: $ac_cv_prog_cc_g" >&5
1735 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1736 if test "$ac_test_CFLAGS" = set; then
1737 CFLAGS=$ac_save_CFLAGS
1738 elif test $ac_cv_prog_cc_g = yes; then
1739 if test "$GCC" = yes; then
1745 if test "$GCC" = yes; then
1751 # Some people use a C++ compiler to compile C. Since we use `exit',
1752 # in C++ we need to declare it. In case someone uses the same compiler
1753 # for both compiling C and C++ we need to have the C++ compiler decide
1754 # the declaration of exit, since it's the most demanding environment.
1755 cat >"conftest.$ac_ext" <<_ACEOF
1760 rm -f "conftest.$ac_objext"
1761 if { (eval echo "$as_me:1761: \"$ac_compile\"") >&5
1762 (eval $ac_compile) 2>&5
1764 echo "$as_me:1764: \$? = $ac_status" >&5
1765 (exit "$ac_status"); } &&
1766 { ac_try='test -s "conftest.$ac_objext"'
1767 { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1770 echo "$as_me:1770: \$? = $ac_status" >&5
1771 (exit "$ac_status"); }; }; then
1772 for ac_declaration in \
1774 '#include <stdlib.h>' \
1775 'extern "C" void std::exit (int) throw (); using std::exit;' \
1776 'extern "C" void std::exit (int); using std::exit;' \
1777 'extern "C" void exit (int) throw ();' \
1778 'extern "C" void exit (int);' \
1781 cat >"conftest.$ac_ext" <<_ACEOF
1782 #line 1782 "configure"
1783 #include "confdefs.h"
1794 rm -f "conftest.$ac_objext"
1795 if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit "$ac_status"); } &&
1800 { ac_try='test -s "conftest.$ac_objext"'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit "$ac_status"); }; }; then
1808 echo "$as_me: failed program was:" >&5
1809 cat "conftest.$ac_ext" >&5
1812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1813 cat >"conftest.$ac_ext" <<_ACEOF
1814 #line 1814 "configure"
1815 #include "confdefs.h"
1825 rm -f "conftest.$ac_objext"
1826 if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
1827 (eval $ac_compile) 2>&5
1829 echo "$as_me:1829: \$? = $ac_status" >&5
1830 (exit "$ac_status"); } &&
1831 { ac_try='test -s "conftest.$ac_objext"'
1832 { (eval echo "$as_me:1832: \"$ac_try\"") >&5
1835 echo "$as_me:1835: \$? = $ac_status" >&5
1836 (exit "$ac_status"); }; }; then
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1845 if test -n "$ac_declaration"; then
1846 echo '#ifdef __cplusplus' >>confdefs.h
1847 echo "$ac_declaration" >>confdefs.h
1848 echo '#endif' >>confdefs.h
1852 echo "$as_me: failed program was:" >&5
1853 cat "conftest.$ac_ext" >&5
1855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1857 ac_cpp='$CPP $CPPFLAGS'
1858 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1859 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1860 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1861 ac_main_return="return"
1864 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking version of $CC" >&5
1866 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1867 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.].*//'`"
1868 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1869 echo "$as_me:1869: result: $GCC_VERSION" >&5
1870 echo "${ECHO_T}$GCC_VERSION" >&6
1875 if test "$GCC" = yes ; then
1878 echo "$as_me:1878: checking if this is really Intel C compiler" >&5
1879 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1880 cf_save_CFLAGS="$CFLAGS"
1881 CFLAGS="$CFLAGS -no-gcc"
1882 cat >"conftest.$ac_ext" <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1890 #ifdef __INTEL_COMPILER
1899 rm -f "conftest.$ac_objext"
1900 if { (eval echo "$as_me:1900: \"$ac_compile\"") >&5
1901 (eval $ac_compile) 2>&5
1903 echo "$as_me:1903: \$? = $ac_status" >&5
1904 (exit "$ac_status"); } &&
1905 { ac_try='test -s "conftest.$ac_objext"'
1906 { (eval echo "$as_me:1906: \"$ac_try\"") >&5
1909 echo "$as_me:1909: \$? = $ac_status" >&5
1910 (exit "$ac_status"); }; }; then
1912 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1915 echo "$as_me: failed program was:" >&5
1916 cat "conftest.$ac_ext" >&5
1918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1919 CFLAGS="$cf_save_CFLAGS"
1920 echo "$as_me:1920: result: $INTEL_COMPILER" >&5
1921 echo "${ECHO_T}$INTEL_COMPILER" >&6
1928 if test "$GCC" = yes ; then
1929 echo "$as_me:1929: checking if this is really Clang C compiler" >&5
1930 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1931 cf_save_CFLAGS="$CFLAGS"
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1949 rm -f "conftest.$ac_objext"
1950 if { (eval echo "$as_me:1950: \"$ac_compile\"") >&5
1951 (eval $ac_compile) 2>&5
1953 echo "$as_me:1953: \$? = $ac_status" >&5
1954 (exit "$ac_status"); } &&
1955 { ac_try='test -s "conftest.$ac_objext"'
1956 { (eval echo "$as_me:1956: \"$ac_try\"") >&5
1959 echo "$as_me:1959: \$? = $ac_status" >&5
1960 (exit "$ac_status"); }; }; then
1964 echo "$as_me: failed program was:" >&5
1965 cat "conftest.$ac_ext" >&5
1967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1968 CFLAGS="$cf_save_CFLAGS"
1969 echo "$as_me:1969: result: $CLANG_COMPILER" >&5
1970 echo "${ECHO_T}$CLANG_COMPILER" >&6
1975 if test "x$CLANG_COMPILER" = "xyes" ; then
1977 (c[1-9][0-9]|*/c[1-9][0-9])
1978 { echo "$as_me:1978: WARNING: replacing broken compiler alias $CC" >&5
1979 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1980 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1985 echo "$as_me:1985: checking version of $CC" >&5
1986 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1987 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.].*//'`"
1988 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1989 echo "$as_me:1989: result: $CLANG_VERSION" >&5
1990 echo "${ECHO_T}$CLANG_VERSION" >&6
1992 for cf_clang_opt in \
1993 -Qunused-arguments \
1994 -Wno-error=implicit-function-declaration
1996 echo "$as_me:1996: checking if option $cf_clang_opt works" >&5
1997 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1998 cf_save_CFLAGS="$CFLAGS"
1999 CFLAGS="$CFLAGS $cf_clang_opt"
2000 cat >"conftest.$ac_ext" <<_ACEOF
2001 #line 2001 "configure"
2002 #include "confdefs.h"
2009 printf("hello!\\n");
2014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2015 if { (eval echo "$as_me:2015: \"$ac_link\"") >&5
2016 (eval $ac_link) 2>&5
2018 echo "$as_me:2018: \$? = $ac_status" >&5
2019 (exit "$ac_status"); } &&
2020 { ac_try='test -s "conftest$ac_exeext"'
2021 { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2024 echo "$as_me:2024: \$? = $ac_status" >&5
2025 (exit "$ac_status"); }; }; then
2029 echo "$as_me: failed program was:" >&5
2030 cat "conftest.$ac_ext" >&5
2034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2035 echo "$as_me:2035: result: $cf_clang_optok" >&5
2036 echo "${ECHO_T}$cf_clang_optok" >&6
2037 CFLAGS="$cf_save_CFLAGS"
2038 if test "$cf_clang_optok" = yes; then
2039 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2041 echo "${as_me:-configure}:2041: testing adding option $cf_clang_opt ..." 1>&5
2043 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2044 CFLAGS="${CFLAGS}$cf_clang_opt"
2050 echo "$as_me:2050: checking for $CC option to accept ANSI C" >&5
2051 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2052 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2053 echo $ECHO_N "(cached) $ECHO_C" >&6
2055 ac_cv_prog_cc_stdc=no
2057 cat >"conftest.$ac_ext" <<_ACEOF
2058 #line 2058 "configure"
2059 #include "confdefs.h"
2062 #include <sys/types.h>
2063 #include <sys/stat.h>
2064 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2065 struct buf { int x; };
2066 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2067 static char *e (p, i)
2073 static char *f (char * (*g) (char **, int), char **p, ...)
2078 s = g (p, va_arg (v,int));
2082 int test (int i, double x);
2083 struct s1 {int (*f) (int a);};
2084 struct s2 {int (*f) (double a);};
2085 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2091 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2096 # Don't try gcc -ansi; that turns off useful extensions and
2097 # breaks some systems' header files.
2098 # AIX -qlanglvl=ansi
2099 # Ultrix and OSF/1 -std1
2100 # HP-UX 10.20 and later -Ae
2101 # HP-UX older versions -Aa -D_HPUX_SOURCE
2102 # SVR4 -Xc -D__EXTENSIONS__
2103 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2105 CC="$ac_save_CC $ac_arg"
2106 rm -f "conftest.$ac_objext"
2107 if { (eval echo "$as_me:2107: \"$ac_compile\"") >&5
2108 (eval $ac_compile) 2>&5
2110 echo "$as_me:2110: \$? = $ac_status" >&5
2111 (exit "$ac_status"); } &&
2112 { ac_try='test -s "conftest.$ac_objext"'
2113 { (eval echo "$as_me:2113: \"$ac_try\"") >&5
2116 echo "$as_me:2116: \$? = $ac_status" >&5
2117 (exit "$ac_status"); }; }; then
2118 ac_cv_prog_cc_stdc=$ac_arg
2121 echo "$as_me: failed program was:" >&5
2122 cat "conftest.$ac_ext" >&5
2124 rm -f "conftest.$ac_objext"
2126 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2131 case "x$ac_cv_prog_cc_stdc" in
2133 echo "$as_me:2133: result: none needed" >&5
2134 echo "${ECHO_T}none needed" >&6 ;;
2136 echo "$as_me:2136: result: $ac_cv_prog_cc_stdc" >&5
2137 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2138 CC="$CC $ac_cv_prog_cc_stdc" ;;
2141 # This should have been defined by AC_PROG_CC
2144 echo "$as_me:2144: checking \$CFLAGS variable" >&5
2145 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2148 echo "$as_me:2148: result: broken" >&5
2149 echo "${ECHO_T}broken" >&6
2150 { echo "$as_me:2150: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2151 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2154 for cf_arg in $cf_flags
2160 cf_new_extra_cppflags=
2162 for cf_add_cflags in $cf_arg
2164 case "$cf_fix_cppflags" in
2166 case "$cf_add_cflags" in
2167 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2168 case "$cf_add_cflags" in
2170 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2173 && test -z "${cf_tst_cflags}" \
2174 && cf_fix_cppflags=yes
2176 if test "$cf_fix_cppflags" = yes ; then
2178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 elif test "${cf_tst_cflags}" = "\"'" ; then
2184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2195 case "$cf_add_cflags" in
2197 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2199 CPPFLAGS=`echo "$CPPFLAGS" | \
2200 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2201 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2206 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2207 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2214 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2215 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2228 && test -z "${cf_tst_cflags}" \
2229 && cf_fix_cppflags=no
2234 if test -n "$cf_new_cflags" ; then
2236 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2237 CFLAGS="${CFLAGS}$cf_new_cflags"
2241 if test -n "$cf_new_cppflags" ; then
2243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2244 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2248 if test -n "$cf_new_extra_cppflags" ; then
2250 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2251 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2258 echo "$as_me:2258: result: ok" >&5
2259 echo "${ECHO_T}ok" >&6
2263 echo "$as_me:2263: checking \$CC variable" >&5
2264 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2267 echo "$as_me:2267: result: broken" >&5
2268 echo "${ECHO_T}broken" >&6
2269 { echo "$as_me:2269: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2270 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2272 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2273 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2275 for cf_arg in $cf_flags
2283 cf_new_extra_cppflags=
2285 for cf_add_cflags in $cf_arg
2287 case "$cf_fix_cppflags" in
2289 case "$cf_add_cflags" in
2290 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2291 case "$cf_add_cflags" in
2293 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2296 && test -z "${cf_tst_cflags}" \
2297 && cf_fix_cppflags=yes
2299 if test "$cf_fix_cppflags" = yes ; then
2301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 elif test "${cf_tst_cflags}" = "\"'" ; then
2307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2318 case "$cf_add_cflags" in
2320 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2322 CPPFLAGS=`echo "$CPPFLAGS" | \
2323 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2324 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2329 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2330 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2337 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2338 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2345 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2346 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2348 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2351 && test -z "${cf_tst_cflags}" \
2352 && cf_fix_cppflags=no
2357 if test -n "$cf_new_cflags" ; then
2359 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2360 CFLAGS="${CFLAGS}$cf_new_cflags"
2364 if test -n "$cf_new_cppflags" ; then
2366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2367 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2371 if test -n "$cf_new_extra_cppflags" ; then
2373 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2374 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2384 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2386 echo "${as_me:-configure}:2386: testing resulting CC: '$CC' ..." 1>&5
2388 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2390 echo "${as_me:-configure}:2390: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2392 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2394 echo "${as_me:-configure}:2394: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2398 echo "$as_me:2398: result: ok" >&5
2399 echo "${ECHO_T}ok" >&6
2403 echo "$as_me:2403: checking for inline" >&5
2404 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2405 if test "${ac_cv_c_inline+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 for ac_kw in inline __inline__ __inline; do
2410 cat >"conftest.$ac_ext" <<_ACEOF
2411 #line 2411 "configure"
2412 #include "confdefs.h"
2414 static $ac_kw int static_foo () {return 0; }
2415 $ac_kw int foo () {return 0; }
2419 rm -f "conftest.$ac_objext"
2420 if { (eval echo "$as_me:2420: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2423 echo "$as_me:2423: \$? = $ac_status" >&5
2424 (exit "$ac_status"); } &&
2425 { ac_try='test -s "conftest.$ac_objext"'
2426 { (eval echo "$as_me:2426: \"$ac_try\"") >&5
2429 echo "$as_me:2429: \$? = $ac_status" >&5
2430 (exit "$ac_status"); }; }; then
2431 ac_cv_c_inline=$ac_kw; break
2433 echo "$as_me: failed program was:" >&5
2434 cat "conftest.$ac_ext" >&5
2436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2440 echo "$as_me:2440: result: $ac_cv_c_inline" >&5
2441 echo "${ECHO_T}$ac_cv_c_inline" >&6
2442 case $ac_cv_c_inline in
2445 cat >>confdefs.h <<\EOF
2449 *) cat >>confdefs.h <<EOF
2450 #define inline $ac_cv_c_inline
2455 for ac_prog in ggrep grep
2457 # Extract the first word of "$ac_prog", so it can be a program name with args.
2458 set dummy $ac_prog; ac_word=$2
2459 echo "$as_me:2459: checking for $ac_word" >&5
2460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2461 if test "${ac_cv_prog_GREP+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2464 if test -n "$GREP"; then
2465 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2467 ac_save_IFS=$IFS; IFS=$ac_path_separator
2469 for ac_dir in $ac_dummy; do
2471 test -z "$ac_dir" && ac_dir=.
2472 $as_executable_p "$ac_dir/$ac_word" || continue
2473 ac_cv_prog_GREP="$ac_prog"
2474 echo "$as_me:2474: found $ac_dir/$ac_word" >&5
2480 GREP=$ac_cv_prog_GREP
2481 if test -n "$GREP"; then
2482 echo "$as_me:2482: result: $GREP" >&5
2483 echo "${ECHO_T}$GREP" >&6
2485 echo "$as_me:2485: result: no" >&5
2486 echo "${ECHO_T}no" >&6
2489 test -n "$GREP" && break
2491 test -n "$GREP" || GREP=": "
2493 echo "$as_me:2493: checking for egrep" >&5
2494 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2495 if test "${ac_cv_path_EGREP+set}" = set; then
2496 echo $ECHO_N "(cached) $ECHO_C" >&6
2498 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2499 then ac_cv_path_EGREP="$GREP -E"
2501 for ac_prog in gegrep egrep
2503 # Extract the first word of "$ac_prog", so it can be a program name with args.
2504 set dummy $ac_prog; ac_word=$2
2505 echo "$as_me:2505: checking for $ac_word" >&5
2506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2507 if test "${ac_cv_path_EGREP+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2512 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2515 ac_save_IFS=$IFS; IFS=$ac_path_separator
2517 for ac_dir in $ac_dummy; do
2519 test -z "$ac_dir" && ac_dir=.
2520 if $as_executable_p "$ac_dir/$ac_word"; then
2521 ac_cv_path_EGREP="$ac_dir/$ac_word"
2522 echo "$as_me:2522: found $ac_dir/$ac_word" >&5
2530 EGREP=$ac_cv_path_EGREP
2532 if test -n "$EGREP"; then
2533 echo "$as_me:2533: result: $EGREP" >&5
2534 echo "${ECHO_T}$EGREP" >&6
2536 echo "$as_me:2536: result: no" >&5
2537 echo "${ECHO_T}no" >&6
2540 test -n "$EGREP" && break
2542 test -n "$EGREP" || EGREP=": "
2544 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2544: error: cannot find workable egrep" >&5
2545 echo "$as_me: error: cannot find workable egrep" >&2;}
2546 { (exit 1); exit 1; }; }
2549 echo "$as_me:2549: result: $ac_cv_path_EGREP" >&5
2550 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2551 EGREP="$ac_cv_path_EGREP"
2554 ac_cpp='$CPP $CPPFLAGS'
2555 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2556 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2558 ac_main_return="return"
2559 echo "$as_me:2559: checking how to run the C preprocessor" >&5
2560 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2561 # On Suns, sometimes $CPP names a directory.
2562 if test -n "$CPP" && test -d "$CPP"; then
2565 if test -z "$CPP"; then
2566 if test "${ac_cv_prog_CPP+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2569 # Double quotes because CPP needs to be expanded
2570 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2573 for ac_c_preproc_warn_flag in '' yes
2575 # Use a header file that comes with gcc, so configuring glibc
2576 # with a fresh cross-compiler works.
2577 # On the NeXT, cc -E runs the code through the compiler's parser,
2578 # not just through cpp. "Syntax error" is here to catch this case.
2579 cat >"conftest.$ac_ext" <<_ACEOF
2580 #line 2580 "configure"
2581 #include "confdefs.h"
2585 if { (eval echo "$as_me:2585: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2586 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2588 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2590 cat conftest.err >&5
2591 echo "$as_me:2591: \$? = $ac_status" >&5
2592 (exit "$ac_status"); } >/dev/null; then
2593 if test -s conftest.err; then
2594 ac_cpp_err=$ac_c_preproc_warn_flag
2601 if test -z "$ac_cpp_err"; then
2604 echo "$as_me: failed program was:" >&5
2605 cat "conftest.$ac_ext" >&5
2606 # Broken: fails on valid input.
2609 rm -f conftest.err "conftest.$ac_ext"
2611 # OK, works on sane cases. Now check whether non-existent headers
2612 # can be detected and how.
2613 cat >"conftest.$ac_ext" <<_ACEOF
2614 #line 2614 "configure"
2615 #include "confdefs.h"
2616 #include <ac_nonexistent.h>
2618 if { (eval echo "$as_me:2618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2619 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2621 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2623 cat conftest.err >&5
2624 echo "$as_me:2624: \$? = $ac_status" >&5
2625 (exit "$ac_status"); } >/dev/null; then
2626 if test -s conftest.err; then
2627 ac_cpp_err=$ac_c_preproc_warn_flag
2634 if test -z "$ac_cpp_err"; then
2635 # Broken: success on invalid input.
2638 echo "$as_me: failed program was:" >&5
2639 cat "conftest.$ac_ext" >&5
2640 # Passes both tests.
2644 rm -f conftest.err "conftest.$ac_ext"
2647 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2648 rm -f conftest.err "conftest.$ac_ext"
2649 if $ac_preproc_ok; then
2661 echo "$as_me:2661: result: $CPP" >&5
2662 echo "${ECHO_T}$CPP" >&6
2664 for ac_c_preproc_warn_flag in '' yes
2666 # Use a header file that comes with gcc, so configuring glibc
2667 # with a fresh cross-compiler works.
2668 # On the NeXT, cc -E runs the code through the compiler's parser,
2669 # not just through cpp. "Syntax error" is here to catch this case.
2670 cat >"conftest.$ac_ext" <<_ACEOF
2671 #line 2671 "configure"
2672 #include "confdefs.h"
2676 if { (eval echo "$as_me:2676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2677 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2679 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2681 cat conftest.err >&5
2682 echo "$as_me:2682: \$? = $ac_status" >&5
2683 (exit "$ac_status"); } >/dev/null; then
2684 if test -s conftest.err; then
2685 ac_cpp_err=$ac_c_preproc_warn_flag
2692 if test -z "$ac_cpp_err"; then
2695 echo "$as_me: failed program was:" >&5
2696 cat "conftest.$ac_ext" >&5
2697 # Broken: fails on valid input.
2700 rm -f conftest.err "conftest.$ac_ext"
2702 # OK, works on sane cases. Now check whether non-existent headers
2703 # can be detected and how.
2704 cat >"conftest.$ac_ext" <<_ACEOF
2705 #line 2705 "configure"
2706 #include "confdefs.h"
2707 #include <ac_nonexistent.h>
2709 if { (eval echo "$as_me:2709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2710 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2712 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2714 cat conftest.err >&5
2715 echo "$as_me:2715: \$? = $ac_status" >&5
2716 (exit "$ac_status"); } >/dev/null; then
2717 if test -s conftest.err; then
2718 ac_cpp_err=$ac_c_preproc_warn_flag
2725 if test -z "$ac_cpp_err"; then
2726 # Broken: success on invalid input.
2729 echo "$as_me: failed program was:" >&5
2730 cat "conftest.$ac_ext" >&5
2731 # Passes both tests.
2735 rm -f conftest.err "conftest.$ac_ext"
2738 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2739 rm -f conftest.err "conftest.$ac_ext"
2740 if $ac_preproc_ok; then
2743 { { echo "$as_me:2743: error: C preprocessor \"$CPP\" fails sanity check" >&5
2744 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2745 { (exit 1); exit 1; }; }
2749 ac_cpp='$CPP $CPPFLAGS'
2750 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2751 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753 ac_main_return="return"
2755 for ac_prog in mawk gawk nawk awk
2757 # Extract the first word of "$ac_prog", so it can be a program name with args.
2758 set dummy $ac_prog; ac_word=$2
2759 echo "$as_me:2759: checking for $ac_word" >&5
2760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2761 if test "${ac_cv_prog_AWK+set}" = set; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2764 if test -n "$AWK"; then
2765 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2767 ac_save_IFS=$IFS; IFS=$ac_path_separator
2769 for ac_dir in $ac_dummy; do
2771 test -z "$ac_dir" && ac_dir=.
2772 $as_executable_p "$ac_dir/$ac_word" || continue
2773 ac_cv_prog_AWK="$ac_prog"
2774 echo "$as_me:2774: found $ac_dir/$ac_word" >&5
2781 if test -n "$AWK"; then
2782 echo "$as_me:2782: result: $AWK" >&5
2783 echo "${ECHO_T}$AWK" >&6
2785 echo "$as_me:2785: result: no" >&5
2786 echo "${ECHO_T}no" >&6
2789 test -n "$AWK" && break
2792 # Find a good install program. We prefer a C program (faster),
2793 # so one script is as good as another. But avoid the broken or
2794 # incompatible versions:
2795 # SysV /etc/install, /usr/sbin/install
2796 # SunOS /usr/etc/install
2797 # IRIX /sbin/install
2799 # AmigaOS /C/install, which installs bootblocks on floppy discs
2800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2803 # ./install, which can be erroneously created by make from ./install.sh.
2804 echo "$as_me:2804: checking for a BSD compatible install" >&5
2805 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2806 if test -z "$INSTALL"; then
2807 if test "${ac_cv_path_install+set}" = set; then
2808 echo $ECHO_N "(cached) $ECHO_C" >&6
2810 ac_save_IFS=$IFS; IFS=$ac_path_separator
2811 for ac_dir in $PATH; do
2813 # Account for people who put trailing slashes in PATH elements.
2815 / | ./ | .// | /cC/* \
2816 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2819 # OSF1 and SCO ODT 3.0 have their own names for install.
2820 # Don't use installbsd from OSF since it installs stuff as root
2822 for ac_prog in ginstall scoinst install; do
2823 if $as_executable_p "$ac_dir/$ac_prog"; then
2824 if test $ac_prog = install &&
2825 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2826 # AIX install. It has an incompatible calling convention.
2828 elif test $ac_prog = install &&
2829 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2830 # program-specific install script used by HP pwplus--don't use.
2833 ac_cv_path_install="$ac_dir/$ac_prog -c"
2843 if test "${ac_cv_path_install+set}" = set; then
2844 INSTALL=$ac_cv_path_install
2846 # As a last resort, use the slow shell script. We don't cache a
2847 # path for INSTALL within a source directory, because that will
2848 # break other packages using the cache if that directory is
2849 # removed, or if the path is relative.
2850 INSTALL=$ac_install_sh
2853 echo "$as_me:2853: result: $INSTALL" >&5
2854 echo "${ECHO_T}$INSTALL" >&6
2856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2857 # It thinks the first close brace ends the variable substitution.
2858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2868 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2869 test -z "$cf_dir" && cf_dir=.
2870 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2874 echo "$as_me:2874: checking if you want to install stripped executables" >&5
2875 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2877 # Check whether --enable-stripping or --disable-stripping was given.
2878 if test "${enable_stripping+set}" = set; then
2879 enableval="$enable_stripping"
2880 test "$enableval" != no && enableval=yes
2881 if test "$enableval" != "yes" ; then
2884 enable_stripping=yes
2888 enable_stripping=yes
2891 echo "$as_me:2891: result: $enable_stripping" >&5
2892 echo "${ECHO_T}$enable_stripping" >&6
2894 if test "$enable_stripping" = yes
2901 : "${INSTALL:=install}"
2902 echo "$as_me:2902: checking if install accepts -p option" >&5
2903 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2904 if test "${cf_cv_install_p+set}" = set; then
2905 echo $ECHO_N "(cached) $ECHO_C" >&6
2912 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2914 if test -f conftest.out/conftest.in
2916 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2917 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2918 if test -s conftest.err
2933 echo "$as_me:2933: result: $cf_cv_install_p" >&5
2934 echo "${ECHO_T}$cf_cv_install_p" >&6
2936 echo "$as_me:2936: checking if install needs to be told about ownership" >&5
2937 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2938 case `$ac_config_guess` in
2947 echo "$as_me:2947: result: $with_install_o" >&5
2948 echo "${ECHO_T}$with_install_o" >&6
2949 if test "x$with_install_o" = xyes
2951 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'`"
2956 for ac_prog in lint cppcheck splint
2958 # Extract the first word of "$ac_prog", so it can be a program name with args.
2959 set dummy $ac_prog; ac_word=$2
2960 echo "$as_me:2960: checking for $ac_word" >&5
2961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2962 if test "${ac_cv_prog_LINT+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2965 if test -n "$LINT"; then
2966 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2968 ac_save_IFS=$IFS; IFS=$ac_path_separator
2970 for ac_dir in $ac_dummy; do
2972 test -z "$ac_dir" && ac_dir=.
2973 $as_executable_p "$ac_dir/$ac_word" || continue
2974 ac_cv_prog_LINT="$ac_prog"
2975 echo "$as_me:2975: found $ac_dir/$ac_word" >&5
2981 LINT=$ac_cv_prog_LINT
2982 if test -n "$LINT"; then
2983 echo "$as_me:2983: result: $LINT" >&5
2984 echo "${ECHO_T}$LINT" >&6
2986 echo "$as_me:2986: result: no" >&5
2987 echo "${ECHO_T}no" >&6
2990 test -n "$LINT" && break
2994 (xcppcheck|x*/cppcheck)
2995 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2999 echo "$as_me:2999: checking if filesystem supports mixed-case filenames" >&5
3000 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3001 if test "${cf_cv_mixedcase+set}" = set; then
3002 echo $ECHO_N "(cached) $ECHO_C" >&6
3005 if test "$cross_compiling" = yes ; then
3006 case "$target_alias" in
3007 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3015 rm -f conftest CONFTEST
3017 if test -f CONFTEST ; then
3022 rm -f conftest CONFTEST
3026 echo "$as_me:3026: result: $cf_cv_mixedcase" >&5
3027 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3028 test "$cf_cv_mixedcase" = yes &&
3029 cat >>confdefs.h <<\EOF
3030 #define MIXEDCASE_FILENAMES 1
3033 for ac_prog in exctags ctags
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo "$as_me:3037: checking for $ac_word" >&5
3038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3039 if test "${ac_cv_prog_CTAGS+set}" = set; then
3040 echo $ECHO_N "(cached) $ECHO_C" >&6
3042 if test -n "$CTAGS"; then
3043 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3045 ac_save_IFS=$IFS; IFS=$ac_path_separator
3047 for ac_dir in $ac_dummy; do
3049 test -z "$ac_dir" && ac_dir=.
3050 $as_executable_p "$ac_dir/$ac_word" || continue
3051 ac_cv_prog_CTAGS="$ac_prog"
3052 echo "$as_me:3052: found $ac_dir/$ac_word" >&5
3058 CTAGS=$ac_cv_prog_CTAGS
3059 if test -n "$CTAGS"; then
3060 echo "$as_me:3060: result: $CTAGS" >&5
3061 echo "${ECHO_T}$CTAGS" >&6
3063 echo "$as_me:3063: result: no" >&5
3064 echo "${ECHO_T}no" >&6
3067 test -n "$CTAGS" && break
3070 for ac_prog in exetags etags
3072 # Extract the first word of "$ac_prog", so it can be a program name with args.
3073 set dummy $ac_prog; ac_word=$2
3074 echo "$as_me:3074: checking for $ac_word" >&5
3075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3076 if test "${ac_cv_prog_ETAGS+set}" = set; then
3077 echo $ECHO_N "(cached) $ECHO_C" >&6
3079 if test -n "$ETAGS"; then
3080 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3082 ac_save_IFS=$IFS; IFS=$ac_path_separator
3084 for ac_dir in $ac_dummy; do
3086 test -z "$ac_dir" && ac_dir=.
3087 $as_executable_p "$ac_dir/$ac_word" || continue
3088 ac_cv_prog_ETAGS="$ac_prog"
3089 echo "$as_me:3089: found $ac_dir/$ac_word" >&5
3095 ETAGS=$ac_cv_prog_ETAGS
3096 if test -n "$ETAGS"; then
3097 echo "$as_me:3097: result: $ETAGS" >&5
3098 echo "${ECHO_T}$ETAGS" >&6
3100 echo "$as_me:3100: result: no" >&5
3101 echo "${ECHO_T}no" >&6
3104 test -n "$ETAGS" && break
3107 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3108 set dummy ${CTAGS:-ctags}; ac_word=$2
3109 echo "$as_me:3109: checking for $ac_word" >&5
3110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3111 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3114 if test -n "$MAKE_LOWER_TAGS"; then
3115 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3117 ac_save_IFS=$IFS; IFS=$ac_path_separator
3119 for ac_dir in $ac_dummy; do
3121 test -z "$ac_dir" && ac_dir=.
3122 $as_executable_p "$ac_dir/$ac_word" || continue
3123 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3124 echo "$as_me:3124: found $ac_dir/$ac_word" >&5
3128 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3131 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3132 if test -n "$MAKE_LOWER_TAGS"; then
3133 echo "$as_me:3133: result: $MAKE_LOWER_TAGS" >&5
3134 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3136 echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3140 if test "$cf_cv_mixedcase" = yes ; then
3141 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3142 set dummy ${ETAGS:-etags}; ac_word=$2
3143 echo "$as_me:3143: checking for $ac_word" >&5
3144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3145 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3146 echo $ECHO_N "(cached) $ECHO_C" >&6
3148 if test -n "$MAKE_UPPER_TAGS"; then
3149 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3151 ac_save_IFS=$IFS; IFS=$ac_path_separator
3153 for ac_dir in $ac_dummy; do
3155 test -z "$ac_dir" && ac_dir=.
3156 $as_executable_p "$ac_dir/$ac_word" || continue
3157 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3158 echo "$as_me:3158: found $ac_dir/$ac_word" >&5
3162 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3165 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3166 if test -n "$MAKE_UPPER_TAGS"; then
3167 echo "$as_me:3167: result: $MAKE_UPPER_TAGS" >&5
3168 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3170 echo "$as_me:3170: result: no" >&5
3171 echo "${ECHO_T}no" >&6
3178 if test "$MAKE_UPPER_TAGS" = yes ; then
3184 if test "$MAKE_LOWER_TAGS" = yes ; then
3190 echo "$as_me:3190: checking if -lm needed for math functions" >&5
3191 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3192 if test "${cf_cv_need_libm+set}" = set; then
3193 echo $ECHO_N "(cached) $ECHO_C" >&6
3196 cat >"conftest.$ac_ext" <<_ACEOF
3197 #line 3197 "configure"
3198 #include "confdefs.h"
3207 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3213 if { (eval echo "$as_me:3213: \"$ac_link\"") >&5
3214 (eval $ac_link) 2>&5
3216 echo "$as_me:3216: \$? = $ac_status" >&5
3217 (exit "$ac_status"); } &&
3218 { ac_try='test -s "conftest$ac_exeext"'
3219 { (eval echo "$as_me:3219: \"$ac_try\"") >&5
3222 echo "$as_me:3222: \$? = $ac_status" >&5
3223 (exit "$ac_status"); }; }; then
3226 echo "$as_me: failed program was:" >&5
3227 cat "conftest.$ac_ext" >&5
3230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3232 echo "$as_me:3232: result: $cf_cv_need_libm" >&5
3233 echo "${ECHO_T}$cf_cv_need_libm" >&6
3234 if test "$cf_cv_need_libm" = yes
3242 CC_SHARED_OPTS=unknown
3243 CPPFLAGS="$CPPFLAGS"
3245 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3246 DFT_UPR_MODEL="NORMAL"
3259 PACKAGE="ncurses-examples"
3265 TINFO_LIBS='$(LIBS_CURSES)'
3266 cf_cv_abi_version=""
3267 cf_cv_rel_version=""
3273 echo "$as_me:3273: checking for fgrep" >&5
3274 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3275 if test "${ac_cv_path_FGREP+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3278 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3279 then ac_cv_path_FGREP="$GREP -F"
3281 for ac_prog in gfgrep fgrep
3283 # Extract the first word of "$ac_prog", so it can be a program name with args.
3284 set dummy $ac_prog; ac_word=$2
3285 echo "$as_me:3285: checking for $ac_word" >&5
3286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3287 if test "${ac_cv_path_FGREP+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3292 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3295 ac_save_IFS=$IFS; IFS=$ac_path_separator
3297 for ac_dir in $ac_dummy; do
3299 test -z "$ac_dir" && ac_dir=.
3300 if $as_executable_p "$ac_dir/$ac_word"; then
3301 ac_cv_path_FGREP="$ac_dir/$ac_word"
3302 echo "$as_me:3302: found $ac_dir/$ac_word" >&5
3310 FGREP=$ac_cv_path_FGREP
3312 if test -n "$FGREP"; then
3313 echo "$as_me:3313: result: $FGREP" >&5
3314 echo "${ECHO_T}$FGREP" >&6
3316 echo "$as_me:3316: result: no" >&5
3317 echo "${ECHO_T}no" >&6
3320 test -n "$FGREP" && break
3322 test -n "$FGREP" || FGREP=": "
3324 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3324: error: cannot find workable fgrep" >&5
3325 echo "$as_me: error: cannot find workable fgrep" >&2;}
3326 { (exit 1); exit 1; }; }
3329 echo "$as_me:3329: result: $ac_cv_path_FGREP" >&5
3330 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3331 FGREP="$ac_cv_path_FGREP"
3333 if test "$GCC" = yes || test "$GXX" = yes
3335 cat > conftest.i <<EOF
3337 #define GCC_PRINTF 0
3342 #ifndef GCC_NORETURN
3343 #define GCC_NORETURN /* nothing */
3346 #define GCC_UNUSED /* nothing */
3349 if test "$GCC" = yes
3351 { echo "$as_me:3351: checking for $CC __attribute__ directives..." >&5
3352 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3353 cat > "conftest.$ac_ext" <<EOF
3354 #line 3354 "${as_me:-configure}"
3355 #include "confdefs.h"
3356 #include "conftest.h"
3357 #include "conftest.i"
3359 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3361 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3364 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3366 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3368 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3369 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3370 extern void foo(void) GCC_NORETURN;
3371 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3373 cf_printf_attribute=no
3374 cf_scanf_attribute=no
3375 for cf_attribute in scanf printf unused noreturn
3378 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3380 cf_directive="__attribute__(($cf_attribute))"
3381 echo "checking for $CC $cf_directive" 1>&5
3383 case "$cf_attribute" in
3385 cf_printf_attribute=yes
3386 cat >conftest.h <<EOF
3387 #define GCC_$cf_ATTRIBUTE 1
3391 cf_scanf_attribute=yes
3392 cat >conftest.h <<EOF
3393 #define GCC_$cf_ATTRIBUTE 1
3397 cat >conftest.h <<EOF
3398 #define GCC_$cf_ATTRIBUTE $cf_directive
3403 if { (eval echo "$as_me:3403: \"$ac_compile\"") >&5
3404 (eval $ac_compile) 2>&5
3406 echo "$as_me:3406: \$? = $ac_status" >&5
3407 (exit "$ac_status"); }; then
3408 test -n "$verbose" && echo "$as_me:3408: result: ... $cf_attribute" >&5
3409 echo "${ECHO_T}... $cf_attribute" >&6
3410 cat conftest.h >>confdefs.h
3411 case "$cf_attribute" in
3414 cat >>confdefs.h <<EOF
3415 #define GCC_NORETURN $cf_directive
3420 cf_value='/* nothing */'
3421 if test "$cf_printf_attribute" != no ; then
3422 cf_value='__attribute__((format(printf,fmt,var)))'
3424 cat >>confdefs.h <<\EOF
3425 #define GCC_PRINTF 1
3430 cat >>confdefs.h <<EOF
3431 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3436 cf_value='/* nothing */'
3437 if test "$cf_scanf_attribute" != no ; then
3438 cf_value='__attribute__((format(scanf,fmt,var)))'
3440 cat >>confdefs.h <<\EOF
3446 cat >>confdefs.h <<EOF
3447 #define GCC_SCANFLIKE(fmt,var) $cf_value
3453 cat >>confdefs.h <<EOF
3454 #define GCC_UNUSED $cf_directive
3462 ${FGREP-fgrep} define conftest.i >>confdefs.h
3467 echo "$as_me:3467: checking if you want to work around bogus compiler/loader warnings" >&5
3468 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3470 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3471 if test "${enable_string_hacks+set}" = set; then
3472 enableval="$enable_string_hacks"
3473 enable_string_hacks=$enableval
3475 enable_string_hacks=no
3477 echo "$as_me:3477: result: $enable_string_hacks" >&5
3478 echo "${ECHO_T}$enable_string_hacks" >&6
3480 if test "x$enable_string_hacks" = "xyes"; then
3482 cat >>confdefs.h <<\EOF
3483 #define USE_STRING_HACKS 1
3486 { echo "$as_me:3486: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3487 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3488 echo "$as_me:3488: checking for strlcat" >&5
3489 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3490 if test "${ac_cv_func_strlcat+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
3493 cat >"conftest.$ac_ext" <<_ACEOF
3494 #line 3494 "configure"
3495 #include "confdefs.h"
3496 #define strlcat autoconf_temporary
3497 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3504 /* We use char because int might match the return type of a gcc2
3505 builtin and then its argument prototype would still apply. */
3506 char strlcat (void);
3512 /* The GNU C library defines stubs for functions which it implements
3513 to always fail with ENOSYS. Some functions are actually named
3514 something starting with __ and the normal name is an alias. */
3515 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3516 #error found stub for strlcat
3524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3525 if { (eval echo "$as_me:3525: \"$ac_link\"") >&5
3526 (eval $ac_link) 2>&5
3528 echo "$as_me:3528: \$? = $ac_status" >&5
3529 (exit "$ac_status"); } &&
3530 { ac_try='test -s "conftest$ac_exeext"'
3531 { (eval echo "$as_me:3531: \"$ac_try\"") >&5
3534 echo "$as_me:3534: \$? = $ac_status" >&5
3535 (exit "$ac_status"); }; }; then
3536 ac_cv_func_strlcat=yes
3538 echo "$as_me: failed program was:" >&5
3539 cat "conftest.$ac_ext" >&5
3540 ac_cv_func_strlcat=no
3542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3544 echo "$as_me:3544: result: $ac_cv_func_strlcat" >&5
3545 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3546 if test "$ac_cv_func_strlcat" = yes; then
3548 cat >>confdefs.h <<\EOF
3549 #define HAVE_STRLCAT 1
3554 echo "$as_me:3554: checking for strlcat in -lbsd" >&5
3555 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3556 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
3559 ac_check_lib_save_LIBS=$LIBS
3561 cat >"conftest.$ac_ext" <<_ACEOF
3562 #line 3562 "configure"
3563 #include "confdefs.h"
3565 /* Override any gcc2 internal prototype to avoid an error. */
3569 /* We use char because int might match the return type of a gcc2
3570 builtin and then its argument prototype would still apply. */
3580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3581 if { (eval echo "$as_me:3581: \"$ac_link\"") >&5
3582 (eval $ac_link) 2>&5
3584 echo "$as_me:3584: \$? = $ac_status" >&5
3585 (exit "$ac_status"); } &&
3586 { ac_try='test -s "conftest$ac_exeext"'
3587 { (eval echo "$as_me:3587: \"$ac_try\"") >&5
3590 echo "$as_me:3590: \$? = $ac_status" >&5
3591 (exit "$ac_status"); }; }; then
3592 ac_cv_lib_bsd_strlcat=yes
3594 echo "$as_me: failed program was:" >&5
3595 cat "conftest.$ac_ext" >&5
3596 ac_cv_lib_bsd_strlcat=no
3598 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3599 LIBS=$ac_check_lib_save_LIBS
3601 echo "$as_me:3601: result: $ac_cv_lib_bsd_strlcat" >&5
3602 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3603 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3608 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3610 for cf_add_1lib in $cf_add_0lib; do
3611 for cf_add_2lib in $cf_add_libs; do
3612 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3617 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3621 for ac_header in bsd/string.h
3623 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3624 echo "$as_me:3624: checking for $ac_header" >&5
3625 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3626 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3627 echo $ECHO_N "(cached) $ECHO_C" >&6
3629 cat >"conftest.$ac_ext" <<_ACEOF
3630 #line 3630 "configure"
3631 #include "confdefs.h"
3632 #include <$ac_header>
3634 if { (eval echo "$as_me:3634: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3635 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3637 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3639 cat conftest.err >&5
3640 echo "$as_me:3640: \$? = $ac_status" >&5
3641 (exit "$ac_status"); } >/dev/null; then
3642 if test -s conftest.err; then
3643 ac_cpp_err=$ac_c_preproc_warn_flag
3650 if test -z "$ac_cpp_err"; then
3651 eval "$as_ac_Header=yes"
3653 echo "$as_me: failed program was:" >&5
3654 cat "conftest.$ac_ext" >&5
3655 eval "$as_ac_Header=no"
3657 rm -f conftest.err "conftest.$ac_ext"
3659 echo "$as_me:3659: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3660 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3661 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3662 cat >>confdefs.h <<EOF
3663 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3669 cat >>confdefs.h <<\EOF
3670 #define HAVE_STRLCAT 1
3677 for ac_func in strlcpy snprintf
3679 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3680 echo "$as_me:3680: checking for $ac_func" >&5
3681 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3682 if eval "test \"\${$as_ac_var+set}\" = set"; then
3683 echo $ECHO_N "(cached) $ECHO_C" >&6
3685 cat >"conftest.$ac_ext" <<_ACEOF
3686 #line 3686 "configure"
3687 #include "confdefs.h"
3688 #define $ac_func autoconf_temporary
3689 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3696 /* We use char because int might match the return type of a gcc2
3697 builtin and then its argument prototype would still apply. */
3698 char $ac_func (void);
3704 /* The GNU C library defines stubs for functions which it implements
3705 to always fail with ENOSYS. Some functions are actually named
3706 something starting with __ and the normal name is an alias. */
3707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3708 #error found stub for $ac_func
3716 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3717 if { (eval echo "$as_me:3717: \"$ac_link\"") >&5
3718 (eval $ac_link) 2>&5
3720 echo "$as_me:3720: \$? = $ac_status" >&5
3721 (exit "$ac_status"); } &&
3722 { ac_try='test -s "conftest$ac_exeext"'
3723 { (eval echo "$as_me:3723: \"$ac_try\"") >&5
3726 echo "$as_me:3726: \$? = $ac_status" >&5
3727 (exit "$ac_status"); }; }; then
3728 eval "$as_ac_var=yes"
3730 echo "$as_me: failed program was:" >&5
3731 cat "conftest.$ac_ext" >&5
3732 eval "$as_ac_var=no"
3734 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3736 echo "$as_me:3736: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3737 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3738 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3739 cat >>confdefs.h <<EOF
3740 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3748 echo "$as_me:3748: checking if the POSIX test-macros are already defined" >&5
3749 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3750 if test "${cf_cv_posix_visible+set}" = set; then
3751 echo $ECHO_N "(cached) $ECHO_C" >&6
3754 cat >"conftest.$ac_ext" <<_ACEOF
3755 #line 3755 "configure"
3756 #include "confdefs.h"
3762 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3763 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3764 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3765 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3766 #error conflicting symbols found
3773 rm -f "conftest.$ac_objext"
3774 if { (eval echo "$as_me:3774: \"$ac_compile\"") >&5
3775 (eval $ac_compile) 2>&5
3777 echo "$as_me:3777: \$? = $ac_status" >&5
3778 (exit "$ac_status"); } &&
3779 { ac_try='test -s "conftest.$ac_objext"'
3780 { (eval echo "$as_me:3780: \"$ac_try\"") >&5
3783 echo "$as_me:3783: \$? = $ac_status" >&5
3784 (exit "$ac_status"); }; }; then
3785 cf_cv_posix_visible=no
3787 echo "$as_me: failed program was:" >&5
3788 cat "conftest.$ac_ext" >&5
3789 cf_cv_posix_visible=yes
3791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3794 echo "$as_me:3794: result: $cf_cv_posix_visible" >&5
3795 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3797 if test "$cf_cv_posix_visible" = no; then
3800 cf_POSIX_C_SOURCE=199506L
3805 cf_xopen_source="-D_ALL_SOURCE"
3811 cf_xopen_source="-D_APPLE_C_SOURCE"
3814 cf_xopen_source="-D_DARWIN_C_SOURCE"
3817 (freebsd*|dragonfly*|midnightbsd*)
3818 # 5.x headers associate
3819 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3820 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3821 cf_POSIX_C_SOURCE=200112L
3823 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3826 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3829 cf_xopen_source="-D_HPUX_SOURCE"
3832 cf_xopen_source="-D_SGI_SOURCE"
3835 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3837 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3839 echo "$as_me:3839: checking if this is the GNU C library" >&5
3840 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3841 if test "${cf_cv_gnu_library+set}" = set; then
3842 echo $ECHO_N "(cached) $ECHO_C" >&6
3845 cat >"conftest.$ac_ext" <<_ACEOF
3846 #line 3846 "configure"
3847 #include "confdefs.h"
3848 #include <sys/types.h>
3853 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3855 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3858 # error not GNU C library
3864 rm -f "conftest.$ac_objext"
3865 if { (eval echo "$as_me:3865: \"$ac_compile\"") >&5
3866 (eval $ac_compile) 2>&5
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit "$ac_status"); } &&
3870 { ac_try='test -s "conftest.$ac_objext"'
3871 { (eval echo "$as_me:3871: \"$ac_try\"") >&5
3874 echo "$as_me:3874: \$? = $ac_status" >&5
3875 (exit "$ac_status"); }; }; then
3876 cf_cv_gnu_library=yes
3878 echo "$as_me: failed program was:" >&5
3879 cat "conftest.$ac_ext" >&5
3880 cf_cv_gnu_library=no
3882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3885 echo "$as_me:3885: result: $cf_cv_gnu_library" >&5
3886 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3888 if test x$cf_cv_gnu_library = xyes; then
3890 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3891 # was changed to help a little. newlib incorporated the change about 4
3893 echo "$as_me:3893: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3894 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3895 if test "${cf_cv_gnu_library_219+set}" = set; then
3896 echo $ECHO_N "(cached) $ECHO_C" >&6
3901 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3902 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3904 cat >"conftest.$ac_ext" <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3907 #include <sys/types.h>
3912 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3914 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3917 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3923 rm -f "conftest.$ac_objext"
3924 if { (eval echo "$as_me:3924: \"$ac_compile\"") >&5
3925 (eval $ac_compile) 2>&5
3927 echo "$as_me:3927: \$? = $ac_status" >&5
3928 (exit "$ac_status"); } &&
3929 { ac_try='test -s "conftest.$ac_objext"'
3930 { (eval echo "$as_me:3930: \"$ac_try\"") >&5
3933 echo "$as_me:3933: \$? = $ac_status" >&5
3934 (exit "$ac_status"); }; }; then
3935 cf_cv_gnu_library_219=yes
3937 echo "$as_me: failed program was:" >&5
3938 cat "conftest.$ac_ext" >&5
3939 cf_cv_gnu_library_219=no
3941 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3945 echo "$as_me:3945: result: $cf_cv_gnu_library_219" >&5
3946 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3948 if test "x$cf_cv_gnu_library_219" = xyes; then
3950 echo "$as_me:3950: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3951 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3952 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3953 echo $ECHO_N "(cached) $ECHO_C" >&6
3959 cf_new_extra_cppflags=
3961 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3963 case "$cf_fix_cppflags" in
3965 case "$cf_add_cflags" in
3966 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3967 case "$cf_add_cflags" in
3969 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3971 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3972 && test -z "${cf_tst_cflags}" \
3973 && cf_fix_cppflags=yes
3975 if test "$cf_fix_cppflags" = yes ; then
3977 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3978 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3981 elif test "${cf_tst_cflags}" = "\"'" ; then
3983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3994 case "$cf_add_cflags" in
3996 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3998 CPPFLAGS=`echo "$CPPFLAGS" | \
3999 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4000 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4005 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4006 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4013 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4014 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4021 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4022 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4024 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4026 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4027 && test -z "${cf_tst_cflags}" \
4028 && cf_fix_cppflags=no
4033 if test -n "$cf_new_cflags" ; then
4035 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4036 CFLAGS="${CFLAGS}$cf_new_cflags"
4040 if test -n "$cf_new_cppflags" ; then
4042 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4043 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4047 if test -n "$cf_new_extra_cppflags" ; then
4049 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4050 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4054 cat >"conftest.$ac_ext" <<_ACEOF
4055 #line 4055 "configure"
4056 #include "confdefs.h"
4059 #include <sys/types.h>
4065 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4068 # error GNU C library is too old
4074 rm -f "conftest.$ac_objext"
4075 if { (eval echo "$as_me:4075: \"$ac_compile\"") >&5
4076 (eval $ac_compile) 2>&5
4078 echo "$as_me:4078: \$? = $ac_status" >&5
4079 (exit "$ac_status"); } &&
4080 { ac_try='test -s "conftest.$ac_objext"'
4081 { (eval echo "$as_me:4081: \"$ac_try\"") >&5
4084 echo "$as_me:4084: \$? = $ac_status" >&5
4085 (exit "$ac_status"); }; }; then
4086 cf_cv_gnu_dftsrc_219=yes
4088 echo "$as_me: failed program was:" >&5
4089 cat "conftest.$ac_ext" >&5
4090 cf_cv_gnu_dftsrc_219=no
4092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4095 echo "$as_me:4095: result: $cf_cv_gnu_dftsrc_219" >&5
4096 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4097 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4099 cf_cv_gnu_dftsrc_219=maybe
4102 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4104 echo "$as_me:4104: checking if we must define _GNU_SOURCE" >&5
4105 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4106 if test "${cf_cv_gnu_source+set}" = set; then
4107 echo $ECHO_N "(cached) $ECHO_C" >&6
4110 cat >"conftest.$ac_ext" <<_ACEOF
4111 #line 4111 "configure"
4112 #include "confdefs.h"
4113 #include <sys/types.h>
4118 #ifndef _XOPEN_SOURCE
4119 #error expected _XOPEN_SOURCE to be defined
4125 rm -f "conftest.$ac_objext"
4126 if { (eval echo "$as_me:4126: \"$ac_compile\"") >&5
4127 (eval $ac_compile) 2>&5
4129 echo "$as_me:4129: \$? = $ac_status" >&5
4130 (exit "$ac_status"); } &&
4131 { ac_try='test -s "conftest.$ac_objext"'
4132 { (eval echo "$as_me:4132: \"$ac_try\"") >&5
4135 echo "$as_me:4135: \$? = $ac_status" >&5
4136 (exit "$ac_status"); }; }; then
4139 echo "$as_me: failed program was:" >&5
4140 cat "conftest.$ac_ext" >&5
4146 cf_new_extra_cppflags=
4148 for cf_add_cflags in -D_GNU_SOURCE
4150 case "$cf_fix_cppflags" in
4152 case "$cf_add_cflags" in
4153 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4154 case "$cf_add_cflags" in
4156 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4158 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4159 && test -z "${cf_tst_cflags}" \
4160 && cf_fix_cppflags=yes
4162 if test "$cf_fix_cppflags" = yes ; then
4164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4168 elif test "${cf_tst_cflags}" = "\"'" ; then
4170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4181 case "$cf_add_cflags" in
4183 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4185 CPPFLAGS=`echo "$CPPFLAGS" | \
4186 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4187 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4192 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4193 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4200 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4201 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4208 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4209 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4211 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4214 && test -z "${cf_tst_cflags}" \
4215 && cf_fix_cppflags=no
4220 if test -n "$cf_new_cflags" ; then
4222 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4223 CFLAGS="${CFLAGS}$cf_new_cflags"
4227 if test -n "$cf_new_cppflags" ; then
4229 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4230 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4234 if test -n "$cf_new_extra_cppflags" ; then
4236 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4237 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4241 cat >"conftest.$ac_ext" <<_ACEOF
4242 #line 4242 "configure"
4243 #include "confdefs.h"
4244 #include <sys/types.h>
4249 #ifdef _XOPEN_SOURCE
4250 #error expected _XOPEN_SOURCE to be undefined
4256 rm -f "conftest.$ac_objext"
4257 if { (eval echo "$as_me:4257: \"$ac_compile\"") >&5
4258 (eval $ac_compile) 2>&5
4260 echo "$as_me:4260: \$? = $ac_status" >&5
4261 (exit "$ac_status"); } &&
4262 { ac_try='test -s "conftest.$ac_objext"'
4263 { (eval echo "$as_me:4263: \"$ac_try\"") >&5
4266 echo "$as_me:4266: \$? = $ac_status" >&5
4267 (exit "$ac_status"); }; }; then
4270 echo "$as_me: failed program was:" >&5
4271 cat "conftest.$ac_ext" >&5
4272 cf_cv_gnu_source=yes
4274 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4281 echo "$as_me:4281: result: $cf_cv_gnu_source" >&5
4282 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4284 if test "$cf_cv_gnu_source" = yes
4286 echo "$as_me:4286: checking if we should also define _DEFAULT_SOURCE" >&5
4287 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4288 if test "${cf_cv_default_source+set}" = set; then
4289 echo $ECHO_N "(cached) $ECHO_C" >&6
4292 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4293 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4295 cat >"conftest.$ac_ext" <<_ACEOF
4296 #line 4296 "configure"
4297 #include "confdefs.h"
4298 #include <sys/types.h>
4303 #ifdef _DEFAULT_SOURCE
4304 #error expected _DEFAULT_SOURCE to be undefined
4310 rm -f "conftest.$ac_objext"
4311 if { (eval echo "$as_me:4311: \"$ac_compile\"") >&5
4312 (eval $ac_compile) 2>&5
4314 echo "$as_me:4314: \$? = $ac_status" >&5
4315 (exit "$ac_status"); } &&
4316 { ac_try='test -s "conftest.$ac_objext"'
4317 { (eval echo "$as_me:4317: \"$ac_try\"") >&5
4320 echo "$as_me:4320: \$? = $ac_status" >&5
4321 (exit "$ac_status"); }; }; then
4322 cf_cv_default_source=no
4324 echo "$as_me: failed program was:" >&5
4325 cat "conftest.$ac_ext" >&5
4326 cf_cv_default_source=yes
4328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4331 echo "$as_me:4331: result: $cf_cv_default_source" >&5
4332 echo "${ECHO_T}$cf_cv_default_source" >&6
4333 if test "$cf_cv_default_source" = yes
4336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4337 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4347 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4350 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4353 if test "$cf_cv_posix_visible" = no; then
4355 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4357 cf_save_CFLAGS="$CFLAGS"
4358 cf_save_CPPFLAGS="$CPPFLAGS"
4360 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4361 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4362 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4364 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4365 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4366 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4368 echo "$as_me:4368: checking if we should define _POSIX_C_SOURCE" >&5
4369 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4370 if test "${cf_cv_posix_c_source+set}" = set; then
4371 echo $ECHO_N "(cached) $ECHO_C" >&6
4374 echo "${as_me:-configure}:4374: testing if the symbol is already defined go no further ..." 1>&5
4376 cat >"conftest.$ac_ext" <<_ACEOF
4377 #line 4377 "configure"
4378 #include "confdefs.h"
4379 #include <sys/types.h>
4384 #ifndef _POSIX_C_SOURCE
4391 rm -f "conftest.$ac_objext"
4392 if { (eval echo "$as_me:4392: \"$ac_compile\"") >&5
4393 (eval $ac_compile) 2>&5
4395 echo "$as_me:4395: \$? = $ac_status" >&5
4396 (exit "$ac_status"); } &&
4397 { ac_try='test -s "conftest.$ac_objext"'
4398 { (eval echo "$as_me:4398: \"$ac_try\"") >&5
4401 echo "$as_me:4401: \$? = $ac_status" >&5
4402 (exit "$ac_status"); }; }; then
4403 cf_cv_posix_c_source=no
4405 echo "$as_me: failed program was:" >&5
4406 cat "conftest.$ac_ext" >&5
4407 cf_want_posix_source=no
4408 case .$cf_POSIX_C_SOURCE in
4410 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4413 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4414 cf_want_posix_source=yes
4417 cf_want_posix_source=yes
4420 if test "$cf_want_posix_source" = yes ; then
4421 cat >"conftest.$ac_ext" <<_ACEOF
4422 #line 4422 "configure"
4423 #include "confdefs.h"
4424 #include <sys/types.h>
4429 #ifdef _POSIX_SOURCE
4436 rm -f "conftest.$ac_objext"
4437 if { (eval echo "$as_me:4437: \"$ac_compile\"") >&5
4438 (eval $ac_compile) 2>&5
4440 echo "$as_me:4440: \$? = $ac_status" >&5
4441 (exit "$ac_status"); } &&
4442 { ac_try='test -s "conftest.$ac_objext"'
4443 { (eval echo "$as_me:4443: \"$ac_try\"") >&5
4446 echo "$as_me:4446: \$? = $ac_status" >&5
4447 (exit "$ac_status"); }; }; then
4450 echo "$as_me: failed program was:" >&5
4451 cat "conftest.$ac_ext" >&5
4452 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4457 echo "${as_me:-configure}:4457: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4459 CFLAGS="$cf_trim_CFLAGS"
4460 CPPFLAGS="$cf_trim_CPPFLAGS"
4462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4463 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4465 echo "${as_me:-configure}:4465: testing if the second compile does not leave our definition intact error ..." 1>&5
4467 cat >"conftest.$ac_ext" <<_ACEOF
4468 #line 4468 "configure"
4469 #include "confdefs.h"
4470 #include <sys/types.h>
4475 #ifndef _POSIX_C_SOURCE
4482 rm -f "conftest.$ac_objext"
4483 if { (eval echo "$as_me:4483: \"$ac_compile\"") >&5
4484 (eval $ac_compile) 2>&5
4486 echo "$as_me:4486: \$? = $ac_status" >&5
4487 (exit "$ac_status"); } &&
4488 { ac_try='test -s "conftest.$ac_objext"'
4489 { (eval echo "$as_me:4489: \"$ac_try\"") >&5
4492 echo "$as_me:4492: \$? = $ac_status" >&5
4493 (exit "$ac_status"); }; }; then
4496 echo "$as_me: failed program was:" >&5
4497 cat "conftest.$ac_ext" >&5
4498 cf_cv_posix_c_source=no
4500 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4501 CFLAGS="$cf_save_CFLAGS"
4502 CPPFLAGS="$cf_save_CPPFLAGS"
4505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4508 echo "$as_me:4508: result: $cf_cv_posix_c_source" >&5
4509 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4511 if test "$cf_cv_posix_c_source" != no ; then
4512 CFLAGS="$cf_trim_CFLAGS"
4513 CPPFLAGS="$cf_trim_CPPFLAGS"
4518 cf_new_extra_cppflags=
4520 for cf_add_cflags in $cf_cv_posix_c_source
4522 case "$cf_fix_cppflags" in
4524 case "$cf_add_cflags" in
4525 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4526 case "$cf_add_cflags" in
4528 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4530 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4531 && test -z "${cf_tst_cflags}" \
4532 && cf_fix_cppflags=yes
4534 if test "$cf_fix_cppflags" = yes ; then
4536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4540 elif test "${cf_tst_cflags}" = "\"'" ; then
4542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4553 case "$cf_add_cflags" in
4555 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4557 CPPFLAGS=`echo "$CPPFLAGS" | \
4558 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4559 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4564 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4565 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4572 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4573 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4580 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4581 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4583 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4585 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4586 && test -z "${cf_tst_cflags}" \
4587 && cf_fix_cppflags=no
4592 if test -n "$cf_new_cflags" ; then
4594 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4595 CFLAGS="${CFLAGS}$cf_new_cflags"
4599 if test -n "$cf_new_cppflags" ; then
4601 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4602 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4606 if test -n "$cf_new_extra_cppflags" ; then
4608 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4609 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4615 fi # cf_cv_posix_visible
4619 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4622 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4623 cf_xopen_source="-D_BSD_SOURCE"
4627 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4630 cf_xopen_source="-D_OSF_SOURCE"
4633 cf_xopen_source="-D_QNX_SOURCE"
4636 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4639 cf_xopen_source="-D__EXTENSIONS__"
4640 cf_cv_xopen_source=broken
4642 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4648 echo "$as_me:4648: checking if we should define _XOPEN_SOURCE" >&5
4649 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4650 if test "${cf_cv_xopen_source+set}" = set; then
4651 echo $ECHO_N "(cached) $ECHO_C" >&6
4654 cat >"conftest.$ac_ext" <<_ACEOF
4655 #line 4655 "configure"
4656 #include "confdefs.h"
4660 #include <sys/types.h>
4666 #ifndef _XOPEN_SOURCE
4673 rm -f "conftest.$ac_objext"
4674 if { (eval echo "$as_me:4674: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>&5
4677 echo "$as_me:4677: \$? = $ac_status" >&5
4678 (exit "$ac_status"); } &&
4679 { ac_try='test -s "conftest.$ac_objext"'
4680 { (eval echo "$as_me:4680: \"$ac_try\"") >&5
4683 echo "$as_me:4683: \$? = $ac_status" >&5
4684 (exit "$ac_status"); }; }; then
4685 cf_cv_xopen_source=no
4687 echo "$as_me: failed program was:" >&5
4688 cat "conftest.$ac_ext" >&5
4691 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4692 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4694 cat >"conftest.$ac_ext" <<_ACEOF
4695 #line 4695 "configure"
4696 #include "confdefs.h"
4700 #include <sys/types.h>
4706 #ifdef _XOPEN_SOURCE
4713 rm -f "conftest.$ac_objext"
4714 if { (eval echo "$as_me:4714: \"$ac_compile\"") >&5
4715 (eval $ac_compile) 2>&5
4717 echo "$as_me:4717: \$? = $ac_status" >&5
4718 (exit "$ac_status"); } &&
4719 { ac_try='test -s "conftest.$ac_objext"'
4720 { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4723 echo "$as_me:4723: \$? = $ac_status" >&5
4724 (exit "$ac_status"); }; }; then
4725 cf_cv_xopen_source=no
4727 echo "$as_me: failed program was:" >&5
4728 cat "conftest.$ac_ext" >&5
4729 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4738 echo "$as_me:4738: result: $cf_cv_xopen_source" >&5
4739 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4741 if test "$cf_cv_xopen_source" != no ; then
4743 CFLAGS=`echo "$CFLAGS" | \
4744 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4745 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4747 CPPFLAGS=`echo "$CPPFLAGS" | \
4748 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4749 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4751 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4756 cf_new_extra_cppflags=
4758 for cf_add_cflags in $cf_temp_xopen_source
4760 case "$cf_fix_cppflags" in
4762 case "$cf_add_cflags" in
4763 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4764 case "$cf_add_cflags" in
4766 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4768 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4769 && test -z "${cf_tst_cflags}" \
4770 && cf_fix_cppflags=yes
4772 if test "$cf_fix_cppflags" = yes ; then
4774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4778 elif test "${cf_tst_cflags}" = "\"'" ; then
4780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4791 case "$cf_add_cflags" in
4793 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4795 CPPFLAGS=`echo "$CPPFLAGS" | \
4796 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4797 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4802 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4803 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4810 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4811 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4821 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4823 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4824 && test -z "${cf_tst_cflags}" \
4825 && cf_fix_cppflags=no
4830 if test -n "$cf_new_cflags" ; then
4832 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4833 CFLAGS="${CFLAGS}$cf_new_cflags"
4837 if test -n "$cf_new_cppflags" ; then
4839 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4840 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4844 if test -n "$cf_new_extra_cppflags" ; then
4846 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4847 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4853 if test "$cf_cv_posix_visible" = no; then
4855 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4857 cf_save_CFLAGS="$CFLAGS"
4858 cf_save_CPPFLAGS="$CPPFLAGS"
4860 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4861 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4862 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4864 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4865 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4866 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4868 echo "$as_me:4868: checking if we should define _POSIX_C_SOURCE" >&5
4869 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4870 if test "${cf_cv_posix_c_source+set}" = set; then
4871 echo $ECHO_N "(cached) $ECHO_C" >&6
4874 echo "${as_me:-configure}:4874: testing if the symbol is already defined go no further ..." 1>&5
4876 cat >"conftest.$ac_ext" <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4879 #include <sys/types.h>
4884 #ifndef _POSIX_C_SOURCE
4891 rm -f "conftest.$ac_objext"
4892 if { (eval echo "$as_me:4892: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>&5
4895 echo "$as_me:4895: \$? = $ac_status" >&5
4896 (exit "$ac_status"); } &&
4897 { ac_try='test -s "conftest.$ac_objext"'
4898 { (eval echo "$as_me:4898: \"$ac_try\"") >&5
4901 echo "$as_me:4901: \$? = $ac_status" >&5
4902 (exit "$ac_status"); }; }; then
4903 cf_cv_posix_c_source=no
4905 echo "$as_me: failed program was:" >&5
4906 cat "conftest.$ac_ext" >&5
4907 cf_want_posix_source=no
4908 case .$cf_POSIX_C_SOURCE in
4910 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4913 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4914 cf_want_posix_source=yes
4917 cf_want_posix_source=yes
4920 if test "$cf_want_posix_source" = yes ; then
4921 cat >"conftest.$ac_ext" <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924 #include <sys/types.h>
4929 #ifdef _POSIX_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
4950 echo "$as_me: failed program was:" >&5
4951 cat "conftest.$ac_ext" >&5
4952 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4957 echo "${as_me:-configure}:4957: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4959 CFLAGS="$cf_trim_CFLAGS"
4960 CPPFLAGS="$cf_trim_CPPFLAGS"
4962 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4963 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4965 echo "${as_me:-configure}:4965: testing if the second compile does not leave our definition intact error ..." 1>&5
4967 cat >"conftest.$ac_ext" <<_ACEOF
4968 #line 4968 "configure"
4969 #include "confdefs.h"
4970 #include <sys/types.h>
4975 #ifndef _POSIX_C_SOURCE
4982 rm -f "conftest.$ac_objext"
4983 if { (eval echo "$as_me:4983: \"$ac_compile\"") >&5
4984 (eval $ac_compile) 2>&5
4986 echo "$as_me:4986: \$? = $ac_status" >&5
4987 (exit "$ac_status"); } &&
4988 { ac_try='test -s "conftest.$ac_objext"'
4989 { (eval echo "$as_me:4989: \"$ac_try\"") >&5
4992 echo "$as_me:4992: \$? = $ac_status" >&5
4993 (exit "$ac_status"); }; }; then
4996 echo "$as_me: failed program was:" >&5
4997 cat "conftest.$ac_ext" >&5
4998 cf_cv_posix_c_source=no
5000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5001 CFLAGS="$cf_save_CFLAGS"
5002 CPPFLAGS="$cf_save_CPPFLAGS"
5005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5008 echo "$as_me:5008: result: $cf_cv_posix_c_source" >&5
5009 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5011 if test "$cf_cv_posix_c_source" != no ; then
5012 CFLAGS="$cf_trim_CFLAGS"
5013 CPPFLAGS="$cf_trim_CPPFLAGS"
5018 cf_new_extra_cppflags=
5020 for cf_add_cflags in $cf_cv_posix_c_source
5022 case "$cf_fix_cppflags" in
5024 case "$cf_add_cflags" in
5025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5026 case "$cf_add_cflags" in
5028 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5031 && test -z "${cf_tst_cflags}" \
5032 && cf_fix_cppflags=yes
5034 if test "$cf_fix_cppflags" = yes ; then
5036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5040 elif test "${cf_tst_cflags}" = "\"'" ; then
5042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5053 case "$cf_add_cflags" in
5055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5057 CPPFLAGS=`echo "$CPPFLAGS" | \
5058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5083 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5086 && test -z "${cf_tst_cflags}" \
5087 && cf_fix_cppflags=no
5092 if test -n "$cf_new_cflags" ; then
5094 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5095 CFLAGS="${CFLAGS}$cf_new_cflags"
5099 if test -n "$cf_new_cppflags" ; then
5101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5102 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5106 if test -n "$cf_new_extra_cppflags" ; then
5108 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5109 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5115 fi # cf_cv_posix_visible
5120 if test -n "$cf_xopen_source" ; then
5125 cf_new_extra_cppflags=
5127 for cf_add_cflags in $cf_xopen_source
5129 case "$cf_fix_cppflags" in
5131 case "$cf_add_cflags" in
5132 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5133 case "$cf_add_cflags" in
5135 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5138 && test -z "${cf_tst_cflags}" \
5139 && cf_fix_cppflags=yes
5141 if test "$cf_fix_cppflags" = yes ; then
5143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5147 elif test "${cf_tst_cflags}" = "\"'" ; then
5149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5160 case "$cf_add_cflags" in
5162 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5164 CPPFLAGS=`echo "$CPPFLAGS" | \
5165 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5166 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5171 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5172 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5179 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5180 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5187 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5188 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5190 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5192 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5193 && test -z "${cf_tst_cflags}" \
5194 && cf_fix_cppflags=no
5199 if test -n "$cf_new_cflags" ; then
5200 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5202 echo "${as_me:-configure}:5202: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5204 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5205 CFLAGS="${CFLAGS}$cf_new_cflags"
5209 if test -n "$cf_new_cppflags" ; then
5210 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5212 echo "${as_me:-configure}:5212: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5215 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5219 if test -n "$cf_new_extra_cppflags" ; then
5220 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5222 echo "${as_me:-configure}:5222: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5224 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5225 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5231 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5232 echo "$as_me:5232: checking if _XOPEN_SOURCE really is set" >&5
5233 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5234 cat >"conftest.$ac_ext" <<_ACEOF
5235 #line 5235 "configure"
5236 #include "confdefs.h"
5242 #ifndef _XOPEN_SOURCE
5249 rm -f "conftest.$ac_objext"
5250 if { (eval echo "$as_me:5250: \"$ac_compile\"") >&5
5251 (eval $ac_compile) 2>&5
5253 echo "$as_me:5253: \$? = $ac_status" >&5
5254 (exit "$ac_status"); } &&
5255 { ac_try='test -s "conftest.$ac_objext"'
5256 { (eval echo "$as_me:5256: \"$ac_try\"") >&5
5259 echo "$as_me:5259: \$? = $ac_status" >&5
5260 (exit "$ac_status"); }; }; then
5261 cf_XOPEN_SOURCE_set=yes
5263 echo "$as_me: failed program was:" >&5
5264 cat "conftest.$ac_ext" >&5
5265 cf_XOPEN_SOURCE_set=no
5267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5268 echo "$as_me:5268: result: $cf_XOPEN_SOURCE_set" >&5
5269 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5270 if test "$cf_XOPEN_SOURCE_set" = yes
5272 cat >"conftest.$ac_ext" <<_ACEOF
5273 #line 5273 "configure"
5274 #include "confdefs.h"
5280 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5287 rm -f "conftest.$ac_objext"
5288 if { (eval echo "$as_me:5288: \"$ac_compile\"") >&5
5289 (eval $ac_compile) 2>&5
5291 echo "$as_me:5291: \$? = $ac_status" >&5
5292 (exit "$ac_status"); } &&
5293 { ac_try='test -s "conftest.$ac_objext"'
5294 { (eval echo "$as_me:5294: \"$ac_try\"") >&5
5297 echo "$as_me:5297: \$? = $ac_status" >&5
5298 (exit "$ac_status"); }; }; then
5299 cf_XOPEN_SOURCE_set_ok=yes
5301 echo "$as_me: failed program was:" >&5
5302 cat "conftest.$ac_ext" >&5
5303 cf_XOPEN_SOURCE_set_ok=no
5305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5306 if test "$cf_XOPEN_SOURCE_set_ok" = no
5308 { echo "$as_me:5308: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5309 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5313 echo "$as_me:5313: checking if we should define _XOPEN_SOURCE" >&5
5314 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5315 if test "${cf_cv_xopen_source+set}" = set; then
5316 echo $ECHO_N "(cached) $ECHO_C" >&6
5319 cat >"conftest.$ac_ext" <<_ACEOF
5320 #line 5320 "configure"
5321 #include "confdefs.h"
5325 #include <sys/types.h>
5331 #ifndef _XOPEN_SOURCE
5338 rm -f "conftest.$ac_objext"
5339 if { (eval echo "$as_me:5339: \"$ac_compile\"") >&5
5340 (eval $ac_compile) 2>&5
5342 echo "$as_me:5342: \$? = $ac_status" >&5
5343 (exit "$ac_status"); } &&
5344 { ac_try='test -s "conftest.$ac_objext"'
5345 { (eval echo "$as_me:5345: \"$ac_try\"") >&5
5348 echo "$as_me:5348: \$? = $ac_status" >&5
5349 (exit "$ac_status"); }; }; then
5350 cf_cv_xopen_source=no
5352 echo "$as_me: failed program was:" >&5
5353 cat "conftest.$ac_ext" >&5
5356 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5357 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5359 cat >"conftest.$ac_ext" <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5365 #include <sys/types.h>
5371 #ifdef _XOPEN_SOURCE
5378 rm -f "conftest.$ac_objext"
5379 if { (eval echo "$as_me:5379: \"$ac_compile\"") >&5
5380 (eval $ac_compile) 2>&5
5382 echo "$as_me:5382: \$? = $ac_status" >&5
5383 (exit "$ac_status"); } &&
5384 { ac_try='test -s "conftest.$ac_objext"'
5385 { (eval echo "$as_me:5385: \"$ac_try\"") >&5
5388 echo "$as_me:5388: \$? = $ac_status" >&5
5389 (exit "$ac_status"); }; }; then
5390 cf_cv_xopen_source=no
5392 echo "$as_me: failed program was:" >&5
5393 cat "conftest.$ac_ext" >&5
5394 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5403 echo "$as_me:5403: result: $cf_cv_xopen_source" >&5
5404 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5406 if test "$cf_cv_xopen_source" != no ; then
5408 CFLAGS=`echo "$CFLAGS" | \
5409 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5410 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5412 CPPFLAGS=`echo "$CPPFLAGS" | \
5413 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5414 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5416 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5421 cf_new_extra_cppflags=
5423 for cf_add_cflags in $cf_temp_xopen_source
5425 case "$cf_fix_cppflags" in
5427 case "$cf_add_cflags" in
5428 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5429 case "$cf_add_cflags" in
5431 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5434 && test -z "${cf_tst_cflags}" \
5435 && cf_fix_cppflags=yes
5437 if test "$cf_fix_cppflags" = yes ; then
5439 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5440 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5443 elif test "${cf_tst_cflags}" = "\"'" ; then
5445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5456 case "$cf_add_cflags" in
5458 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5460 CPPFLAGS=`echo "$CPPFLAGS" | \
5461 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5462 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5467 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5468 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5475 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5476 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5486 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5488 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5489 && test -z "${cf_tst_cflags}" \
5490 && cf_fix_cppflags=no
5495 if test -n "$cf_new_cflags" ; then
5497 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5498 CFLAGS="${CFLAGS}$cf_new_cflags"
5502 if test -n "$cf_new_cppflags" ; then
5504 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5505 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5509 if test -n "$cf_new_extra_cppflags" ; then
5511 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5512 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5520 fi # cf_cv_posix_visible
5522 echo "$as_me:5522: checking for signal global datatype" >&5
5523 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5524 if test "${cf_cv_sig_atomic_t+set}" = set; then
5525 echo $ECHO_N "(cached) $ECHO_C" >&6
5529 "volatile sig_atomic_t" \
5533 cat >"conftest.$ac_ext" <<_ACEOF
5534 #line 5534 "configure"
5535 #include "confdefs.h"
5537 #include <sys/types.h>
5543 static void handler(int sig)
5551 signal(SIGINT, handler);
5557 rm -f "conftest.$ac_objext"
5558 if { (eval echo "$as_me:5558: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>&5
5561 echo "$as_me:5561: \$? = $ac_status" >&5
5562 (exit "$ac_status"); } &&
5563 { ac_try='test -s "conftest.$ac_objext"'
5564 { (eval echo "$as_me:5564: \"$ac_try\"") >&5
5567 echo "$as_me:5567: \$? = $ac_status" >&5
5568 (exit "$ac_status"); }; }; then
5569 cf_cv_sig_atomic_t=$cf_type
5571 echo "$as_me: failed program was:" >&5
5572 cat "conftest.$ac_ext" >&5
5573 cf_cv_sig_atomic_t=no
5575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5576 test "$cf_cv_sig_atomic_t" != no && break
5581 echo "$as_me:5581: result: $cf_cv_sig_atomic_t" >&5
5582 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5583 test "$cf_cv_sig_atomic_t" != no &&
5584 cat >>confdefs.h <<EOF
5585 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5588 # Work around breakage on OS X
5590 echo "$as_me:5590: checking if SIGWINCH is defined" >&5
5591 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5592 if test "${cf_cv_define_sigwinch+set}" = set; then
5593 echo $ECHO_N "(cached) $ECHO_C" >&6
5596 cat >"conftest.$ac_ext" <<_ACEOF
5597 #line 5597 "configure"
5598 #include "confdefs.h"
5600 #include <sys/types.h>
5601 #include <sys/signal.h>
5606 int x = SIGWINCH; (void)x
5611 rm -f "conftest.$ac_objext"
5612 if { (eval echo "$as_me:5612: \"$ac_compile\"") >&5
5613 (eval $ac_compile) 2>&5
5615 echo "$as_me:5615: \$? = $ac_status" >&5
5616 (exit "$ac_status"); } &&
5617 { ac_try='test -s "conftest.$ac_objext"'
5618 { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5621 echo "$as_me:5621: \$? = $ac_status" >&5
5622 (exit "$ac_status"); }; }; then
5623 cf_cv_define_sigwinch=yes
5625 echo "$as_me: failed program was:" >&5
5626 cat "conftest.$ac_ext" >&5
5627 cat >"conftest.$ac_ext" <<_ACEOF
5628 #line 5628 "configure"
5629 #include "confdefs.h"
5631 #undef _XOPEN_SOURCE
5632 #undef _POSIX_SOURCE
5633 #undef _POSIX_C_SOURCE
5634 #include <sys/types.h>
5635 #include <sys/signal.h>
5640 int x = SIGWINCH; (void)x
5645 rm -f "conftest.$ac_objext"
5646 if { (eval echo "$as_me:5646: \"$ac_compile\"") >&5
5647 (eval $ac_compile) 2>&5
5649 echo "$as_me:5649: \$? = $ac_status" >&5
5650 (exit "$ac_status"); } &&
5651 { ac_try='test -s "conftest.$ac_objext"'
5652 { (eval echo "$as_me:5652: \"$ac_try\"") >&5
5655 echo "$as_me:5655: \$? = $ac_status" >&5
5656 (exit "$ac_status"); }; }; then
5657 cf_cv_define_sigwinch=maybe
5659 echo "$as_me: failed program was:" >&5
5660 cat "conftest.$ac_ext" >&5
5661 cf_cv_define_sigwinch=no
5663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5666 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5669 echo "$as_me:5669: result: $cf_cv_define_sigwinch" >&5
5670 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5672 if test "$cf_cv_define_sigwinch" = maybe ; then
5673 echo "$as_me:5673: checking for actual SIGWINCH definition" >&5
5674 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5675 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5676 echo $ECHO_N "(cached) $ECHO_C" >&6
5679 cf_cv_fixup_sigwinch=unknown
5681 while test "$cf_sigwinch" != 1
5683 cat >"conftest.$ac_ext" <<_ACEOF
5684 #line 5684 "configure"
5685 #include "confdefs.h"
5687 #undef _XOPEN_SOURCE
5688 #undef _POSIX_SOURCE
5689 #undef _POSIX_C_SOURCE
5690 #include <sys/types.h>
5691 #include <sys/signal.h>
5697 #if SIGWINCH != $cf_sigwinch
5700 int x = SIGWINCH; (void)x
5705 rm -f "conftest.$ac_objext"
5706 if { (eval echo "$as_me:5706: \"$ac_compile\"") >&5
5707 (eval $ac_compile) 2>&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit "$ac_status"); } &&
5711 { ac_try='test -s "conftest.$ac_objext"'
5712 { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit "$ac_status"); }; }; then
5717 cf_cv_fixup_sigwinch=$cf_sigwinch
5720 echo "$as_me: failed program was:" >&5
5721 cat "conftest.$ac_ext" >&5
5723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5725 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5729 echo "$as_me:5729: result: $cf_cv_fixup_sigwinch" >&5
5730 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5732 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5733 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5737 # Checks for CODESET support.
5739 echo "$as_me:5739: checking for nl_langinfo and CODESET" >&5
5740 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5741 if test "${am_cv_langinfo_codeset+set}" = set; then
5742 echo $ECHO_N "(cached) $ECHO_C" >&6
5744 cat >"conftest.$ac_ext" <<_ACEOF
5745 #line 5745 "configure"
5746 #include "confdefs.h"
5747 #include <langinfo.h>
5751 char* cs = nl_langinfo(CODESET); (void)cs
5756 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5757 if { (eval echo "$as_me:5757: \"$ac_link\"") >&5
5758 (eval $ac_link) 2>&5
5760 echo "$as_me:5760: \$? = $ac_status" >&5
5761 (exit "$ac_status"); } &&
5762 { ac_try='test -s "conftest$ac_exeext"'
5763 { (eval echo "$as_me:5763: \"$ac_try\"") >&5
5766 echo "$as_me:5766: \$? = $ac_status" >&5
5767 (exit "$ac_status"); }; }; then
5768 am_cv_langinfo_codeset=yes
5770 echo "$as_me: failed program was:" >&5
5771 cat "conftest.$ac_ext" >&5
5772 am_cv_langinfo_codeset=no
5774 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5777 echo "$as_me:5777: result: $am_cv_langinfo_codeset" >&5
5778 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5779 if test "$am_cv_langinfo_codeset" = yes; then
5781 cat >>confdefs.h <<\EOF
5782 #define HAVE_LANGINFO_CODESET 1
5787 echo "$as_me:5787: checking if you want to use pkg-config" >&5
5788 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5790 # Check whether --with-pkg-config or --without-pkg-config was given.
5791 if test "${with_pkg_config+set}" = set; then
5792 withval="$with_pkg_config"
5793 cf_pkg_config=$withval
5797 echo "$as_me:5797: result: $cf_pkg_config" >&5
5798 echo "${ECHO_T}$cf_pkg_config" >&6
5800 case "$cf_pkg_config" in
5806 if test -n "$ac_tool_prefix"; then
5807 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5808 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5809 echo "$as_me:5809: checking for $ac_word" >&5
5810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5811 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5812 echo $ECHO_N "(cached) $ECHO_C" >&6
5816 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5819 ac_save_IFS=$IFS; IFS=$ac_path_separator
5821 for ac_dir in $ac_dummy; do
5823 test -z "$ac_dir" && ac_dir=.
5824 if $as_executable_p "$ac_dir/$ac_word"; then
5825 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5826 echo "$as_me:5826: found $ac_dir/$ac_word" >&5
5834 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5836 if test -n "$PKG_CONFIG"; then
5837 echo "$as_me:5837: result: $PKG_CONFIG" >&5
5838 echo "${ECHO_T}$PKG_CONFIG" >&6
5840 echo "$as_me:5840: result: no" >&5
5841 echo "${ECHO_T}no" >&6
5845 if test -z "$ac_cv_path_PKG_CONFIG"; then
5846 ac_pt_PKG_CONFIG=$PKG_CONFIG
5847 # Extract the first word of "pkg-config", so it can be a program name with args.
5848 set dummy pkg-config; ac_word=$2
5849 echo "$as_me:5849: checking for $ac_word" >&5
5850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5851 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5852 echo $ECHO_N "(cached) $ECHO_C" >&6
5854 case $ac_pt_PKG_CONFIG in
5856 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5859 ac_save_IFS=$IFS; IFS=$ac_path_separator
5861 for ac_dir in $ac_dummy; do
5863 test -z "$ac_dir" && ac_dir=.
5864 if $as_executable_p "$ac_dir/$ac_word"; then
5865 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5866 echo "$as_me:5866: found $ac_dir/$ac_word" >&5
5871 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5875 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5877 if test -n "$ac_pt_PKG_CONFIG"; then
5878 echo "$as_me:5878: result: $ac_pt_PKG_CONFIG" >&5
5879 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5881 echo "$as_me:5881: result: no" >&5
5882 echo "${ECHO_T}no" >&6
5885 PKG_CONFIG=$ac_pt_PKG_CONFIG
5887 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5896 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5897 if test "$PKG_CONFIG" != none ; then
5899 if test "x$prefix" != xNONE; then
5900 cf_path_syntax="$prefix"
5902 cf_path_syntax="$ac_default_prefix"
5905 case ".$PKG_CONFIG" in
5910 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5912 (.\$\{*prefix\}*|.\$\{*dir\}*)
5913 eval PKG_CONFIG="$PKG_CONFIG"
5914 case ".$PKG_CONFIG" in
5916 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
5921 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
5924 { { echo "$as_me:5924: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5925 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5926 { (exit 1); exit 1; }; }
5930 elif test "x$cf_pkg_config" != xno ; then
5931 { echo "$as_me:5931: WARNING: pkg-config is not installed" >&5
5932 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5935 echo "$as_me:5935: checking if you want to see long compiling messages" >&5
5936 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5938 # Check whether --enable-echo or --disable-echo was given.
5939 if test "${enable_echo+set}" = set; then
5940 enableval="$enable_echo"
5941 test "$enableval" != no && enableval=yes
5942 if test "$enableval" != "yes" ; then
5945 ECHO_LD='@echo linking $@;'
5946 RULE_CC='@echo compiling $<'
5947 SHOW_CC='@echo compiling $@'
5969 echo "$as_me:5969: result: $enableval" >&5
5970 echo "${ECHO_T}$enableval" >&6
5972 echo "$as_me:5972: checking for ncurses wrap-prefix" >&5
5973 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
5975 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
5976 if test "${with_ncurses_wrap_prefix+set}" = set; then
5977 withval="$with_ncurses_wrap_prefix"
5978 NCURSES_WRAP_PREFIX=$withval
5980 NCURSES_WRAP_PREFIX=_nc_
5982 echo "$as_me:5982: result: $NCURSES_WRAP_PREFIX" >&5
5983 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
5985 echo "$as_me:5985: checking if you want to check for wide-character functions" >&5
5986 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5988 # Check whether --enable-widec or --disable-widec was given.
5989 if test "${enable_widec+set}" = set; then
5990 enableval="$enable_widec"
5991 test "$enableval" != no && enableval=yes
5992 if test "$enableval" != "yes" ; then
6002 echo "$as_me:6002: result: $cf_enable_widec" >&5
6003 echo "${ECHO_T}$cf_enable_widec" >&6
6005 echo "$as_me:6005: checking for specific curses-directory" >&5
6006 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6008 # Check whether --with-curses-dir or --without-curses-dir was given.
6009 if test "${with_curses_dir+set}" = set; then
6010 withval="$with_curses_dir"
6011 cf_cv_curses_dir=$withval
6015 echo "$as_me:6015: result: $cf_cv_curses_dir" >&5
6016 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6018 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6021 if test "x$prefix" != xNONE; then
6022 cf_path_syntax="$prefix"
6024 cf_path_syntax="$ac_default_prefix"
6032 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6034 (.\$\{*prefix\}*|.\$\{*dir\}*)
6035 eval withval="$withval"
6038 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6043 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6046 { { echo "$as_me:6046: error: expected a pathname, not \"$withval\"" >&5
6047 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6048 { (exit 1); exit 1; }; }
6052 if test -d "$cf_cv_curses_dir"
6055 if test -n "$cf_cv_curses_dir/include" ; then
6056 for cf_add_incdir in $cf_cv_curses_dir/include
6058 while test "$cf_add_incdir" != /usr/include
6060 if test -d "$cf_add_incdir"
6063 if test -n "$CFLAGS$CPPFLAGS" ; then
6064 # a loop is needed to ensure we can add subdirs of existing dirs
6065 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6066 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6067 cf_have_incdir=yes; break
6072 if test "$cf_have_incdir" = no ; then
6073 if test "$cf_add_incdir" = /usr/local/include ; then
6074 if test "$GCC" = yes
6076 cf_save_CPPFLAGS=$CPPFLAGS
6078 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6079 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6081 cat >"conftest.$ac_ext" <<_ACEOF
6082 #line 6082 "configure"
6083 #include "confdefs.h"
6093 rm -f "conftest.$ac_objext"
6094 if { (eval echo "$as_me:6094: \"$ac_compile\"") >&5
6095 (eval $ac_compile) 2>&5
6097 echo "$as_me:6097: \$? = $ac_status" >&5
6098 (exit "$ac_status"); } &&
6099 { ac_try='test -s "conftest.$ac_objext"'
6100 { (eval echo "$as_me:6100: \"$ac_try\"") >&5
6103 echo "$as_me:6103: \$? = $ac_status" >&5
6104 (exit "$ac_status"); }; }; then
6107 echo "$as_me: failed program was:" >&5
6108 cat "conftest.$ac_ext" >&5
6111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6112 CPPFLAGS=$cf_save_CPPFLAGS
6117 if test "$cf_have_incdir" = no ; then
6118 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6120 echo "${as_me:-configure}:6120: testing adding $cf_add_incdir to include-path ..." 1>&5
6122 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6124 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6125 test "$cf_top_incdir" = "$cf_add_incdir" && break
6126 cf_add_incdir="$cf_top_incdir"
6137 if test -n "$cf_cv_curses_dir/lib" ; then
6138 for cf_add_libdir in $cf_cv_curses_dir/lib
6140 if test "$cf_add_libdir" = /usr/lib ; then
6142 elif test -d "$cf_add_libdir"
6145 if test -n "$LDFLAGS$LIBS" ; then
6146 # a loop is needed to ensure we can add subdirs of existing dirs
6147 for cf_test_libdir in $LDFLAGS $LIBS ; do
6148 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6149 cf_have_libdir=yes; break
6153 if test "$cf_have_libdir" = no ; then
6154 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6156 echo "${as_me:-configure}:6156: testing adding $cf_add_libdir to library-path ..." 1>&5
6158 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6169 echo "$as_me:6169: checking for specified curses library type" >&5
6170 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6172 # Check whether --with-screen or --without-screen was given.
6173 if test "${with_screen+set}" = set; then
6174 withval="$with_screen"
6175 cf_cv_screen=$withval
6178 # Check whether --with-ncursesw or --without-ncursesw was given.
6179 if test "${with_ncursesw+set}" = set; then
6180 withval="$with_ncursesw"
6181 cf_cv_screen=ncursesw
6184 # Check whether --with-ncurses or --without-ncurses was given.
6185 if test "${with_ncurses+set}" = set; then
6186 withval="$with_ncurses"
6187 cf_cv_screen=ncurses
6190 # Check whether --with-pdcurses or --without-pdcurses was given.
6191 if test "${with_pdcurses+set}" = set; then
6192 withval="$with_pdcurses"
6193 cf_cv_screen=pdcurses
6196 # Check whether --with-curses-colr or --without-curses-colr was given.
6197 if test "${with_curses_colr+set}" = set; then
6198 withval="$with_curses_colr"
6199 cf_cv_screen=curses_colr
6202 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6203 if test "${with_curses_5lib+set}" = set; then
6204 withval="$with_curses_5lib"
6205 cf_cv_screen=curses_5lib
6213 echo "$as_me:6213: result: $cf_cv_screen" >&5
6214 echo "${ECHO_T}$cf_cv_screen" >&6
6216 case $cf_cv_screen in
6219 echo "$as_me:6219: checking for extra include directories" >&5
6220 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6221 if test "${cf_cv_curses_incdir+set}" = set; then
6222 echo $ECHO_N "(cached) $ECHO_C" >&6
6225 cf_cv_curses_incdir=no
6228 if test "x$cf_cv_screen" = "xcurses_colr"
6230 test -d /usr/include/curses_colr && \
6231 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6235 if test "x$cf_cv_screen" = "xcurses_5lib"
6237 test -d /usr/5lib && \
6238 test -d /usr/5include && \
6239 cf_cv_curses_incdir="-I/usr/5include"
6245 echo "$as_me:6245: result: $cf_cv_curses_incdir" >&5
6246 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6247 if test "$cf_cv_curses_incdir" != no
6250 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6251 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6255 echo "$as_me:6255: checking if we have identified curses headers" >&5
6256 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6257 if test "${cf_cv_ncurses_header+set}" = set; then
6258 echo $ECHO_N "(cached) $ECHO_C" >&6
6261 cf_cv_ncurses_header=none
6264 curses.h ncurses/ncurses.h ncurses/curses.h
6266 cat >"conftest.$ac_ext" <<_ACEOF
6267 #line 6267 "configure"
6268 #include "confdefs.h"
6269 #include <${cf_header}>
6273 initscr(); tgoto("?", 0,0)
6278 rm -f "conftest.$ac_objext"
6279 if { (eval echo "$as_me:6279: \"$ac_compile\"") >&5
6280 (eval $ac_compile) 2>&5
6282 echo "$as_me:6282: \$? = $ac_status" >&5
6283 (exit "$ac_status"); } &&
6284 { ac_try='test -s "conftest.$ac_objext"'
6285 { (eval echo "$as_me:6285: \"$ac_try\"") >&5
6288 echo "$as_me:6288: \$? = $ac_status" >&5
6289 (exit "$ac_status"); }; }; then
6290 cf_cv_ncurses_header=$cf_header; break
6292 echo "$as_me: failed program was:" >&5
6293 cat "conftest.$ac_ext" >&5
6295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6299 echo "$as_me:6299: result: $cf_cv_ncurses_header" >&5
6300 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6302 if test "$cf_cv_ncurses_header" = none ; then
6303 { { echo "$as_me:6303: error: No curses header-files found" >&5
6304 echo "$as_me: error: No curses header-files found" >&2;}
6305 { (exit 1); exit 1; }; }
6308 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6310 for ac_header in $cf_cv_ncurses_header
6312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6313 echo "$as_me:6313: checking for $ac_header" >&5
6314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6316 echo $ECHO_N "(cached) $ECHO_C" >&6
6318 cat >"conftest.$ac_ext" <<_ACEOF
6319 #line 6319 "configure"
6320 #include "confdefs.h"
6321 #include <$ac_header>
6323 if { (eval echo "$as_me:6323: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6324 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6326 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6328 cat conftest.err >&5
6329 echo "$as_me:6329: \$? = $ac_status" >&5
6330 (exit "$ac_status"); } >/dev/null; then
6331 if test -s conftest.err; then
6332 ac_cpp_err=$ac_c_preproc_warn_flag
6339 if test -z "$ac_cpp_err"; then
6340 eval "$as_ac_Header=yes"
6342 echo "$as_me: failed program was:" >&5
6343 cat "conftest.$ac_ext" >&5
6344 eval "$as_ac_Header=no"
6346 rm -f conftest.err "conftest.$ac_ext"
6348 echo "$as_me:6348: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6349 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6350 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6351 cat >>confdefs.h <<EOF
6352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6358 echo "$as_me:6358: checking for terminfo header" >&5
6359 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6360 if test "${cf_cv_term_header+set}" = set; then
6361 echo $ECHO_N "(cached) $ECHO_C" >&6
6364 case "${cf_cv_ncurses_header}" in
6365 (*/ncurses.h|*/ncursesw.h)
6366 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6369 cf_term_header=term.h
6373 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6375 cat >"conftest.$ac_ext" <<_ACEOF
6376 #line 6376 "configure"
6377 #include "confdefs.h"
6379 #include <${cf_cv_ncurses_header:-curses.h}>
6385 int x = auto_left_margin; (void)x
6390 rm -f "conftest.$ac_objext"
6391 if { (eval echo "$as_me:6391: \"$ac_compile\"") >&5
6392 (eval $ac_compile) 2>&5
6394 echo "$as_me:6394: \$? = $ac_status" >&5
6395 (exit "$ac_status"); } &&
6396 { ac_try='test -s "conftest.$ac_objext"'
6397 { (eval echo "$as_me:6397: \"$ac_try\"") >&5
6400 echo "$as_me:6400: \$? = $ac_status" >&5
6401 (exit "$ac_status"); }; }; then
6403 cf_cv_term_header="$cf_test"
6405 echo "$as_me: failed program was:" >&5
6406 cat "conftest.$ac_ext" >&5
6408 cf_cv_term_header=unknown
6411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6412 test "$cf_cv_term_header" != unknown && break
6416 echo "$as_me:6416: result: $cf_cv_term_header" >&5
6417 echo "${ECHO_T}$cf_cv_term_header" >&6
6419 # Set definitions to allow ifdef'ing to accommodate subdirectories
6421 case "$cf_cv_term_header" in
6424 cat >>confdefs.h <<\EOF
6425 #define HAVE_TERM_H 1
6431 case "$cf_cv_term_header" in
6434 cat >>confdefs.h <<\EOF
6435 #define HAVE_NCURSES_TERM_H 1
6441 cat >>confdefs.h <<\EOF
6442 #define HAVE_NCURSESW_TERM_H 1
6448 echo "$as_me:6448: checking for ncurses version" >&5
6449 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6450 if test "${cf_cv_ncurses_version+set}" = set; then
6451 echo $ECHO_N "(cached) $ECHO_C" >&6
6454 cf_cv_ncurses_version=no
6456 rm -f "$cf_tempfile"
6457 if test "$cross_compiling" = yes; then
6459 # This will not work if the preprocessor splits the line after the
6460 # Autoconf token. The 'unproto' program does that.
6461 cat > "conftest.$ac_ext" <<EOF
6462 #include <${cf_cv_ncurses_header:-curses.h}>
6464 #ifdef NCURSES_VERSION
6465 Autoconf NCURSES_VERSION
6473 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6474 { (eval echo "$as_me:6474: \"$cf_try\"") >&5
6477 echo "$as_me:6477: \$? = $ac_status" >&5
6478 (exit "$ac_status"); }
6479 if test -f conftest.out ; then
6480 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6481 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6486 cat >"conftest.$ac_ext" <<_ACEOF
6487 #line 6487 "configure"
6488 #include "confdefs.h"
6490 #include <${cf_cv_ncurses_header:-curses.h}>
6494 FILE *fp = fopen("$cf_tempfile", "w");
6495 #ifdef NCURSES_VERSION
6496 # ifdef NCURSES_VERSION_PATCH
6497 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6499 fprintf(fp, "%s\\n", NCURSES_VERSION);
6503 fprintf(fp, "old\\n");
6508 ${cf_cv_main_return:-return}(0);
6511 rm -f "conftest$ac_exeext"
6512 if { (eval echo "$as_me:6512: \"$ac_link\"") >&5
6513 (eval $ac_link) 2>&5
6515 echo "$as_me:6515: \$? = $ac_status" >&5
6516 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6517 { (eval echo "$as_me:6517: \"$ac_try\"") >&5
6520 echo "$as_me:6520: \$? = $ac_status" >&5
6521 (exit "$ac_status"); }; }; then
6523 cf_cv_ncurses_version=`cat $cf_tempfile`
6525 echo "$as_me: program exited with status $ac_status" >&5
6526 echo "$as_me: failed program was:" >&5
6527 cat "conftest.$ac_ext" >&5
6529 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6531 rm -f "$cf_tempfile"
6534 echo "$as_me:6534: result: $cf_cv_ncurses_version" >&5
6535 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6536 test "$cf_cv_ncurses_version" = no ||
6537 cat >>confdefs.h <<\EOF
6541 echo "$as_me:6541: checking if we have identified curses libraries" >&5
6542 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6543 cat >"conftest.$ac_ext" <<_ACEOF
6544 #line 6544 "configure"
6545 #include "confdefs.h"
6546 #include <${cf_cv_ncurses_header:-curses.h}>
6550 initscr(); tgoto("?", 0,0)
6555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6556 if { (eval echo "$as_me:6556: \"$ac_link\"") >&5
6557 (eval $ac_link) 2>&5
6559 echo "$as_me:6559: \$? = $ac_status" >&5
6560 (exit "$ac_status"); } &&
6561 { ac_try='test -s "conftest$ac_exeext"'
6562 { (eval echo "$as_me:6562: \"$ac_try\"") >&5
6565 echo "$as_me:6565: \$? = $ac_status" >&5
6566 (exit "$ac_status"); }; }; then
6569 echo "$as_me: failed program was:" >&5
6570 cat "conftest.$ac_ext" >&5
6573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6574 echo "$as_me:6574: result: $cf_result" >&5
6575 echo "${ECHO_T}$cf_result" >&6
6577 if test "$cf_result" = no ; then
6580 echo "$as_me:6580: checking for tgoto in -lmytinfo" >&5
6581 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6582 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6583 echo $ECHO_N "(cached) $ECHO_C" >&6
6585 ac_check_lib_save_LIBS=$LIBS
6586 LIBS="-lmytinfo $LIBS"
6587 cat >"conftest.$ac_ext" <<_ACEOF
6588 #line 6588 "configure"
6589 #include "confdefs.h"
6591 /* Override any gcc2 internal prototype to avoid an error. */
6595 /* We use char because int might match the return type of a gcc2
6596 builtin and then its argument prototype would still apply. */
6606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6607 if { (eval echo "$as_me:6607: \"$ac_link\"") >&5
6608 (eval $ac_link) 2>&5
6610 echo "$as_me:6610: \$? = $ac_status" >&5
6611 (exit "$ac_status"); } &&
6612 { ac_try='test -s "conftest$ac_exeext"'
6613 { (eval echo "$as_me:6613: \"$ac_try\"") >&5
6616 echo "$as_me:6616: \$? = $ac_status" >&5
6617 (exit "$ac_status"); }; }; then
6618 ac_cv_lib_mytinfo_tgoto=yes
6620 echo "$as_me: failed program was:" >&5
6621 cat "conftest.$ac_ext" >&5
6622 ac_cv_lib_mytinfo_tgoto=no
6624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6625 LIBS=$ac_check_lib_save_LIBS
6627 echo "$as_me:6627: result: $ac_cv_lib_mytinfo_tgoto" >&5
6628 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6629 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6634 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6636 for cf_add_1lib in $cf_add_0lib; do
6637 for cf_add_2lib in $cf_add_libs; do
6638 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6643 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6651 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6652 # next (1998), and xcurses "newer" (2000). There is no header file for
6653 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6654 # term.h) for cur_colr
6655 if test "x$cf_cv_screen" = "xcurses_colr"
6657 echo "$as_me:6657: checking for initscr in -lcur_colr" >&5
6658 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6659 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6660 echo $ECHO_N "(cached) $ECHO_C" >&6
6662 ac_check_lib_save_LIBS=$LIBS
6663 LIBS="-lcur_colr $LIBS"
6664 cat >"conftest.$ac_ext" <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6668 /* Override any gcc2 internal prototype to avoid an error. */
6672 /* We use char because int might match the return type of a gcc2
6673 builtin and then its argument prototype would still apply. */
6683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6684 if { (eval echo "$as_me:6684: \"$ac_link\"") >&5
6685 (eval $ac_link) 2>&5
6687 echo "$as_me:6687: \$? = $ac_status" >&5
6688 (exit "$ac_status"); } &&
6689 { ac_try='test -s "conftest$ac_exeext"'
6690 { (eval echo "$as_me:6690: \"$ac_try\"") >&5
6693 echo "$as_me:6693: \$? = $ac_status" >&5
6694 (exit "$ac_status"); }; }; then
6695 ac_cv_lib_cur_colr_initscr=yes
6697 echo "$as_me: failed program was:" >&5
6698 cat "conftest.$ac_ext" >&5
6699 ac_cv_lib_cur_colr_initscr=no
6701 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6702 LIBS=$ac_check_lib_save_LIBS
6704 echo "$as_me:6704: result: $ac_cv_lib_cur_colr_initscr" >&5
6705 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6706 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6711 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6713 for cf_add_1lib in $cf_add_0lib; do
6714 for cf_add_2lib in $cf_add_libs; do
6715 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6720 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6724 ac_cv_func_initscr=yes
6728 echo "$as_me:6728: checking for initscr in -lHcurses" >&5
6729 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6730 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6731 echo $ECHO_N "(cached) $ECHO_C" >&6
6733 ac_check_lib_save_LIBS=$LIBS
6734 LIBS="-lHcurses $LIBS"
6735 cat >"conftest.$ac_ext" <<_ACEOF
6736 #line 6736 "configure"
6737 #include "confdefs.h"
6739 /* Override any gcc2 internal prototype to avoid an error. */
6743 /* We use char because int might match the return type of a gcc2
6744 builtin and then its argument prototype would still apply. */
6754 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6755 if { (eval echo "$as_me:6755: \"$ac_link\"") >&5
6756 (eval $ac_link) 2>&5
6758 echo "$as_me:6758: \$? = $ac_status" >&5
6759 (exit "$ac_status"); } &&
6760 { ac_try='test -s "conftest$ac_exeext"'
6761 { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit "$ac_status"); }; }; then
6766 ac_cv_lib_Hcurses_initscr=yes
6768 echo "$as_me: failed program was:" >&5
6769 cat "conftest.$ac_ext" >&5
6770 ac_cv_lib_Hcurses_initscr=no
6772 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6773 LIBS=$ac_check_lib_save_LIBS
6775 echo "$as_me:6775: result: $ac_cv_lib_Hcurses_initscr" >&5
6776 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6777 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6779 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6784 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6786 for cf_add_1lib in $cf_add_0lib; do
6787 for cf_add_2lib in $cf_add_libs; do
6788 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6793 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6797 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6798 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6800 ac_cv_func_initscr=yes
6809 case `arch 2>/dev/null` in
6814 if test -n "/lib64" ; then
6815 for cf_add_libdir in /lib64
6817 if test "$cf_add_libdir" = /usr/lib ; then
6819 elif test -d "$cf_add_libdir"
6822 if test -n "$LDFLAGS$LIBS" ; then
6823 # a loop is needed to ensure we can add subdirs of existing dirs
6824 for cf_test_libdir in $LDFLAGS $LIBS ; do
6825 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6826 cf_have_libdir=yes; break
6830 if test "$cf_have_libdir" = no ; then
6831 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6833 echo "${as_me:-configure}:6833: testing adding $cf_add_libdir to library-path ..." 1>&5
6835 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6843 if test -n "/lib" ; then
6844 for cf_add_libdir in /lib
6846 if test "$cf_add_libdir" = /usr/lib ; then
6848 elif test -d "$cf_add_libdir"
6851 if test -n "$LDFLAGS$LIBS" ; then
6852 # a loop is needed to ensure we can add subdirs of existing dirs
6853 for cf_test_libdir in $LDFLAGS $LIBS ; do
6854 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6855 cf_have_libdir=yes; break
6859 if test "$cf_have_libdir" = no ; then
6860 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6862 echo "${as_me:-configure}:6862: testing adding $cf_add_libdir to library-path ..." 1>&5
6864 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6874 if test -n "/lib" ; then
6875 for cf_add_libdir in /lib
6877 if test "$cf_add_libdir" = /usr/lib ; then
6879 elif test -d "$cf_add_libdir"
6882 if test -n "$LDFLAGS$LIBS" ; then
6883 # a loop is needed to ensure we can add subdirs of existing dirs
6884 for cf_test_libdir in $LDFLAGS $LIBS ; do
6885 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6886 cf_have_libdir=yes; break
6890 if test "$cf_have_libdir" = no ; then
6891 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6893 echo "${as_me:-configure}:6893: testing adding $cf_add_libdir to library-path ..." 1>&5
6895 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6905 if test "x$cf_cv_screen" = "xcurses_5lib"
6907 if test -d /usr/5lib ; then
6909 if test -n "/usr/5lib" ; then
6910 for cf_add_libdir in /usr/5lib
6912 if test "$cf_add_libdir" = /usr/lib ; then
6914 elif test -d "$cf_add_libdir"
6917 if test -n "$LDFLAGS$LIBS" ; then
6918 # a loop is needed to ensure we can add subdirs of existing dirs
6919 for cf_test_libdir in $LDFLAGS $LIBS ; do
6920 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6921 cf_have_libdir=yes; break
6925 if test "$cf_have_libdir" = no ; then
6926 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6928 echo "${as_me:-configure}:6928: testing adding $cf_add_libdir to library-path ..." 1>&5
6930 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6939 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6941 for cf_add_1lib in $cf_add_0lib; do
6942 for cf_add_2lib in $cf_add_libs; do
6943 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6948 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6954 ac_cv_func_initscr=yes
6958 if test ".$ac_cv_func_initscr" != .yes ; then
6959 cf_save_LIBS="$LIBS"
6961 if test ".${cf_cv_ncurses_version:-no}" != .no
6963 cf_check_list="ncurses curses cursesX"
6965 cf_check_list="cursesX curses ncurses"
6968 # Check for library containing tgoto. Do this before curses library
6969 # because it may be needed to link the test-case for initscr.
6970 if test "x$cf_term_lib" = x
6972 echo "$as_me:6972: checking for tgoto" >&5
6973 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6974 if test "${ac_cv_func_tgoto+set}" = set; then
6975 echo $ECHO_N "(cached) $ECHO_C" >&6
6977 cat >"conftest.$ac_ext" <<_ACEOF
6978 #line 6978 "configure"
6979 #include "confdefs.h"
6980 #define tgoto autoconf_temporary
6981 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6988 /* We use char because int might match the return type of a gcc2
6989 builtin and then its argument prototype would still apply. */
6996 /* The GNU C library defines stubs for functions which it implements
6997 to always fail with ENOSYS. Some functions are actually named
6998 something starting with __ and the normal name is an alias. */
6999 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7000 #error found stub for tgoto
7008 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7009 if { (eval echo "$as_me:7009: \"$ac_link\"") >&5
7010 (eval $ac_link) 2>&5
7012 echo "$as_me:7012: \$? = $ac_status" >&5
7013 (exit "$ac_status"); } &&
7014 { ac_try='test -s "conftest$ac_exeext"'
7015 { (eval echo "$as_me:7015: \"$ac_try\"") >&5
7018 echo "$as_me:7018: \$? = $ac_status" >&5
7019 (exit "$ac_status"); }; }; then
7020 ac_cv_func_tgoto=yes
7022 echo "$as_me: failed program was:" >&5
7023 cat "conftest.$ac_ext" >&5
7026 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7028 echo "$as_me:7028: result: $ac_cv_func_tgoto" >&5
7029 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7030 if test "$ac_cv_func_tgoto" = yes; then
7031 cf_term_lib=predefined
7034 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7036 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7037 echo "$as_me:7037: checking for tgoto in -l$cf_term_lib" >&5
7038 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7039 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7040 echo $ECHO_N "(cached) $ECHO_C" >&6
7042 ac_check_lib_save_LIBS=$LIBS
7043 LIBS="-l$cf_term_lib $LIBS"
7044 cat >"conftest.$ac_ext" <<_ACEOF
7045 #line 7045 "configure"
7046 #include "confdefs.h"
7048 /* Override any gcc2 internal prototype to avoid an error. */
7052 /* We use char because int might match the return type of a gcc2
7053 builtin and then its argument prototype would still apply. */
7063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7064 if { (eval echo "$as_me:7064: \"$ac_link\"") >&5
7065 (eval $ac_link) 2>&5
7067 echo "$as_me:7067: \$? = $ac_status" >&5
7068 (exit "$ac_status"); } &&
7069 { ac_try='test -s "conftest$ac_exeext"'
7070 { (eval echo "$as_me:7070: \"$ac_try\"") >&5
7073 echo "$as_me:7073: \$? = $ac_status" >&5
7074 (exit "$ac_status"); }; }; then
7075 eval "$as_ac_Lib=yes"
7077 echo "$as_me: failed program was:" >&5
7078 cat "conftest.$ac_ext" >&5
7079 eval "$as_ac_Lib=no"
7081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7082 LIBS=$ac_check_lib_save_LIBS
7084 echo "$as_me:7084: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7085 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7086 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7088 : "${cf_nculib_root:=$cf_term_lib}"
7099 # Check for library containing initscr
7100 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7101 if test "x$cf_curs_lib" = x
7103 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7105 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7106 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7107 echo "$as_me:7107: checking if we can link with $cf_curs_lib library" >&5
7108 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7109 cat >"conftest.$ac_ext" <<_ACEOF
7110 #line 7110 "configure"
7111 #include "confdefs.h"
7112 #include <${cf_cv_ncurses_header:-curses.h}>
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7122 if { (eval echo "$as_me:7122: \"$ac_link\"") >&5
7123 (eval $ac_link) 2>&5
7125 echo "$as_me:7125: \$? = $ac_status" >&5
7126 (exit "$ac_status"); } &&
7127 { ac_try='test -s "conftest$ac_exeext"'
7128 { (eval echo "$as_me:7128: \"$ac_try\"") >&5
7131 echo "$as_me:7131: \$? = $ac_status" >&5
7132 (exit "$ac_status"); }; }; then
7135 echo "$as_me: failed program was:" >&5
7136 cat "conftest.$ac_ext" >&5
7139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7140 echo "$as_me:7140: result: $cf_result" >&5
7141 echo "${ECHO_T}$cf_result" >&6
7142 test "$cf_result" = yes && break
7143 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7145 elif test "$cf_term_lib" != predefined ; then
7146 echo "$as_me:7146: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7147 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7148 cat >"conftest.$ac_ext" <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151 #include <${cf_cv_ncurses_header:-curses.h}>
7155 initscr(); tgoto((char *)0, 0, 0);
7160 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7161 if { (eval echo "$as_me:7161: \"$ac_link\"") >&5
7162 (eval $ac_link) 2>&5
7164 echo "$as_me:7164: \$? = $ac_status" >&5
7165 (exit "$ac_status"); } &&
7166 { ac_try='test -s "conftest$ac_exeext"'
7167 { (eval echo "$as_me:7167: \"$ac_try\"") >&5
7170 echo "$as_me:7170: \$? = $ac_status" >&5
7171 (exit "$ac_status"); }; }; then
7174 echo "$as_me: failed program was:" >&5
7175 cat "conftest.$ac_ext" >&5
7177 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7178 cat >"conftest.$ac_ext" <<_ACEOF
7179 #line 7179 "configure"
7180 #include "confdefs.h"
7181 #include <${cf_cv_ncurses_header:-curses.h}>
7190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7191 if { (eval echo "$as_me:7191: \"$ac_link\"") >&5
7192 (eval $ac_link) 2>&5
7194 echo "$as_me:7194: \$? = $ac_status" >&5
7195 (exit "$ac_status"); } &&
7196 { ac_try='test -s "conftest$ac_exeext"'
7197 { (eval echo "$as_me:7197: \"$ac_try\"") >&5
7200 echo "$as_me:7200: \$? = $ac_status" >&5
7201 (exit "$ac_status"); }; }; then
7204 echo "$as_me: failed program was:" >&5
7205 cat "conftest.$ac_ext" >&5
7208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7211 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7212 echo "$as_me:7212: result: $cf_result" >&5
7213 echo "${ECHO_T}$cf_result" >&6
7214 test "$cf_result" != error && break
7218 test "$cf_curs_lib" = unknown && { { echo "$as_me:7218: error: no curses library found" >&5
7219 echo "$as_me: error: no curses library found" >&2;}
7220 { (exit 1); exit 1; }; }
7227 echo "$as_me:7227: checking for multibyte character support" >&5
7228 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7229 if test "${cf_cv_utf8_lib+set}" = set; then
7230 echo $ECHO_N "(cached) $ECHO_C" >&6
7233 cf_save_LIBS="$LIBS"
7234 cat >"conftest.$ac_ext" <<_ACEOF
7235 #line 7235 "configure"
7236 #include "confdefs.h"
7247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7248 if { (eval echo "$as_me:7248: \"$ac_link\"") >&5
7249 (eval $ac_link) 2>&5
7251 echo "$as_me:7251: \$? = $ac_status" >&5
7252 (exit "$ac_status"); } &&
7253 { ac_try='test -s "conftest$ac_exeext"'
7254 { (eval echo "$as_me:7254: \"$ac_try\"") >&5
7257 echo "$as_me:7257: \$? = $ac_status" >&5
7258 (exit "$ac_status"); }; }; then
7261 echo "$as_me: failed program was:" >&5
7262 cat "conftest.$ac_ext" >&5
7264 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7265 # will be set on completion of the AC_TRY_LINK below.
7266 cf_cv_header_path_utf8=
7267 cf_cv_library_path_utf8=
7269 echo "${as_me:-configure}:7269: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7271 cf_save_LIBS="$LIBS"
7273 cat >"conftest.$ac_ext" <<_ACEOF
7274 #line 7274 "configure"
7275 #include "confdefs.h"
7277 #include <libutf8.h>
7286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288 (eval $ac_link) 2>&5
7290 echo "$as_me:7290: \$? = $ac_status" >&5
7291 (exit "$ac_status"); } &&
7292 { ac_try='test -s "conftest$ac_exeext"'
7293 { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7296 echo "$as_me:7296: \$? = $ac_status" >&5
7297 (exit "$ac_status"); }; }; then
7299 cf_cv_find_linkage_utf8=yes
7300 cf_cv_header_path_utf8=/usr/include
7301 cf_cv_library_path_utf8=/usr/lib
7304 echo "$as_me: failed program was:" >&5
7305 cat "conftest.$ac_ext" >&5
7307 LIBS="-lutf8 $cf_save_LIBS"
7309 cat >"conftest.$ac_ext" <<_ACEOF
7310 #line 7310 "configure"
7311 #include "confdefs.h"
7313 #include <libutf8.h>
7322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7323 if { (eval echo "$as_me:7323: \"$ac_link\"") >&5
7324 (eval $ac_link) 2>&5
7326 echo "$as_me:7326: \$? = $ac_status" >&5
7327 (exit "$ac_status"); } &&
7328 { ac_try='test -s "conftest$ac_exeext"'
7329 { (eval echo "$as_me:7329: \"$ac_try\"") >&5
7332 echo "$as_me:7332: \$? = $ac_status" >&5
7333 (exit "$ac_status"); }; }; then
7335 cf_cv_find_linkage_utf8=yes
7336 cf_cv_header_path_utf8=/usr/include
7337 cf_cv_library_path_utf8=/usr/lib
7338 cf_cv_library_file_utf8="-lutf8"
7341 echo "$as_me: failed program was:" >&5
7342 cat "conftest.$ac_ext" >&5
7344 cf_cv_find_linkage_utf8=no
7345 LIBS="$cf_save_LIBS"
7347 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7349 echo "${as_me:-configure}:7349: testing find linkage for utf8 library ..." 1>&5
7351 echo "${as_me:-configure}:7351: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7353 cf_save_CPPFLAGS="$CPPFLAGS"
7354 cf_test_CPPFLAGS="$CPPFLAGS"
7358 # collect the current set of include-directories from compiler flags
7359 cf_header_path_list=""
7360 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7361 for cf_header_path in $CPPFLAGS $CFLAGS
7363 case "$cf_header_path" in
7365 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7367 test "x$cf_header_path" != "xNONE" && \
7368 test -d "$cf_header_path" && \
7370 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7371 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7372 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7373 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7374 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7375 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7378 cf_header_path_list="$cf_header_path_list $cf_search"
7384 # add the variations for the package we are looking for
7388 test "x$prefix" != "xNONE" && \
7389 test -d "$prefix" && \
7391 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7392 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7393 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7394 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7395 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7396 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7399 for cf_subdir_prefix in \
7408 test "x$cf_subdir_prefix" != "x$prefix" && \
7409 test -d "$cf_subdir_prefix" && \
7410 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7411 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7412 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7413 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7414 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7415 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7416 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7421 test "$includedir" != NONE && \
7422 test "$includedir" != "/usr/include" && \
7423 test -d "$includedir" && {
7424 test -d "$includedir" && cf_search="$cf_search $includedir"
7425 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7428 test "$oldincludedir" != NONE && \
7429 test "$oldincludedir" != "/usr/include" && \
7430 test -d "$oldincludedir" && {
7431 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7432 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7435 cf_search="$cf_search $cf_header_path_list"
7437 for cf_cv_header_path_utf8 in $cf_search
7439 if test -d "$cf_cv_header_path_utf8" ; then
7440 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7442 echo "${as_me:-configure}:7442: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7444 CPPFLAGS="$cf_save_CPPFLAGS"
7446 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7447 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7449 cat >"conftest.$ac_ext" <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7453 #include <libutf8.h>
7462 rm -f "conftest.$ac_objext"
7463 if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
7464 (eval $ac_compile) 2>&5
7466 echo "$as_me:7466: \$? = $ac_status" >&5
7467 (exit "$ac_status"); } &&
7468 { ac_try='test -s "conftest.$ac_objext"'
7469 { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7472 echo "$as_me:7472: \$? = $ac_status" >&5
7473 (exit "$ac_status"); }; }; then
7475 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7477 echo "${as_me:-configure}:7477: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7479 cf_cv_find_linkage_utf8=maybe
7480 cf_test_CPPFLAGS="$CPPFLAGS"
7483 echo "$as_me: failed program was:" >&5
7484 cat "conftest.$ac_ext" >&5
7486 CPPFLAGS="$cf_save_CPPFLAGS"
7489 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7493 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7495 echo "${as_me:-configure}:7495: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7497 cf_save_LIBS="$LIBS"
7498 cf_save_LDFLAGS="$LDFLAGS"
7500 if test "$cf_cv_find_linkage_utf8" != yes ; then
7503 cf_library_path_list=""
7504 if test -n "${LDFLAGS}${LIBS}" ; then
7505 for cf_library_path in $LDFLAGS $LIBS
7507 case "$cf_library_path" in
7509 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7511 test "x$cf_library_path" != "xNONE" && \
7512 test -d "$cf_library_path" && \
7514 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7515 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7516 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7517 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7518 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7519 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7522 cf_library_path_list="$cf_library_path_list $cf_search"
7530 test "x$prefix" != "xNONE" && \
7531 test -d "$prefix" && \
7533 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7534 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7535 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7536 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7537 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7538 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7541 for cf_subdir_prefix in \
7550 test "x$cf_subdir_prefix" != "x$prefix" && \
7551 test -d "$cf_subdir_prefix" && \
7552 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7553 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7554 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7555 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7556 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7557 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7558 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7563 cf_search="$cf_library_path_list $cf_search"
7565 for cf_cv_library_path_utf8 in $cf_search
7567 if test -d "$cf_cv_library_path_utf8" ; then
7568 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7570 echo "${as_me:-configure}:7570: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7572 CPPFLAGS="$cf_test_CPPFLAGS"
7573 LIBS="-lutf8 $cf_save_LIBS"
7574 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7575 cat >"conftest.$ac_ext" <<_ACEOF
7576 #line 7576 "configure"
7577 #include "confdefs.h"
7579 #include <libutf8.h>
7588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7589 if { (eval echo "$as_me:7589: \"$ac_link\"") >&5
7590 (eval $ac_link) 2>&5
7592 echo "$as_me:7592: \$? = $ac_status" >&5
7593 (exit "$ac_status"); } &&
7594 { ac_try='test -s "conftest$ac_exeext"'
7595 { (eval echo "$as_me:7595: \"$ac_try\"") >&5
7598 echo "$as_me:7598: \$? = $ac_status" >&5
7599 (exit "$ac_status"); }; }; then
7601 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7603 echo "${as_me:-configure}:7603: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7605 cf_cv_find_linkage_utf8=yes
7606 cf_cv_library_file_utf8="-lutf8"
7609 echo "$as_me: failed program was:" >&5
7610 cat "conftest.$ac_ext" >&5
7612 CPPFLAGS="$cf_save_CPPFLAGS"
7613 LIBS="$cf_save_LIBS"
7614 LDFLAGS="$cf_save_LDFLAGS"
7617 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7620 CPPFLAGS="$cf_save_CPPFLAGS"
7621 LDFLAGS="$cf_save_LDFLAGS"
7625 cf_cv_find_linkage_utf8=no
7629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7634 LIBS="$cf_save_LIBS"
7636 if test "$cf_cv_find_linkage_utf8" = yes ; then
7637 cf_cv_utf8_lib=add-on
7643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7645 echo "$as_me:7645: result: $cf_cv_utf8_lib" >&5
7646 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7648 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7650 if test "$cf_cv_utf8_lib" = "add-on" ; then
7652 cat >>confdefs.h <<\EOF
7653 #define HAVE_LIBUTF8_H 1
7656 if test -n "$cf_cv_header_path_utf8" ; then
7657 for cf_add_incdir in $cf_cv_header_path_utf8
7659 while test "$cf_add_incdir" != /usr/include
7661 if test -d "$cf_add_incdir"
7664 if test -n "$CFLAGS$CPPFLAGS" ; then
7665 # a loop is needed to ensure we can add subdirs of existing dirs
7666 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7667 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7668 cf_have_incdir=yes; break
7673 if test "$cf_have_incdir" = no ; then
7674 if test "$cf_add_incdir" = /usr/local/include ; then
7675 if test "$GCC" = yes
7677 cf_save_CPPFLAGS=$CPPFLAGS
7679 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7680 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7682 cat >"conftest.$ac_ext" <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7694 rm -f "conftest.$ac_objext"
7695 if { (eval echo "$as_me:7695: \"$ac_compile\"") >&5
7696 (eval $ac_compile) 2>&5
7698 echo "$as_me:7698: \$? = $ac_status" >&5
7699 (exit "$ac_status"); } &&
7700 { ac_try='test -s "conftest.$ac_objext"'
7701 { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7704 echo "$as_me:7704: \$? = $ac_status" >&5
7705 (exit "$ac_status"); }; }; then
7708 echo "$as_me: failed program was:" >&5
7709 cat "conftest.$ac_ext" >&5
7712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7713 CPPFLAGS=$cf_save_CPPFLAGS
7718 if test "$cf_have_incdir" = no ; then
7719 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7721 echo "${as_me:-configure}:7721: testing adding $cf_add_incdir to include-path ..." 1>&5
7723 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7725 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7726 test "$cf_top_incdir" = "$cf_add_incdir" && break
7727 cf_add_incdir="$cf_top_incdir"
7738 if test -n "$cf_cv_library_path_utf8" ; then
7739 for cf_add_libdir in $cf_cv_library_path_utf8
7741 if test "$cf_add_libdir" = /usr/lib ; then
7743 elif test -d "$cf_add_libdir"
7746 if test -n "$LDFLAGS$LIBS" ; then
7747 # a loop is needed to ensure we can add subdirs of existing dirs
7748 for cf_test_libdir in $LDFLAGS $LIBS ; do
7749 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7750 cf_have_libdir=yes; break
7754 if test "$cf_have_libdir" = no ; then
7755 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7757 echo "${as_me:-configure}:7757: testing adding $cf_add_libdir to library-path ..." 1>&5
7759 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7768 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7770 for cf_add_1lib in $cf_add_0lib; do
7771 for cf_add_2lib in $cf_add_libs; do
7772 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7777 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7783 cf_ncuconfig_root=$cf_cv_screen
7784 cf_have_ncuconfig=no
7786 if test "x${PKG_CONFIG:=none}" != xnone; then
7787 echo "$as_me:7787: checking pkg-config for $cf_ncuconfig_root" >&5
7788 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7789 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7790 echo "$as_me:7790: result: yes" >&5
7791 echo "${ECHO_T}yes" >&6
7793 echo "$as_me:7793: checking if the $cf_ncuconfig_root package files work" >&5
7794 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7795 cf_have_ncuconfig=unknown
7797 cf_save_CFLAGS="$CFLAGS"
7798 cf_save_CPPFLAGS="$CPPFLAGS"
7799 cf_save_LIBS="$LIBS"
7801 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7802 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7804 # while -W for passing linker flags is prevalent, it is not "standard".
7805 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7806 # incompatible _and_ non-standard -W option which gives an error. Work
7807 # around that pitfall.
7808 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7814 cf_new_extra_cppflags=
7816 for cf_add_cflags in $cf_pkg_cflags
7818 case "$cf_fix_cppflags" in
7820 case "$cf_add_cflags" in
7821 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7822 case "$cf_add_cflags" in
7824 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7827 && test -z "${cf_tst_cflags}" \
7828 && cf_fix_cppflags=yes
7830 if test "$cf_fix_cppflags" = yes ; then
7832 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7833 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7836 elif test "${cf_tst_cflags}" = "\"'" ; then
7838 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7839 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7849 case "$cf_add_cflags" in
7851 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7853 CPPFLAGS=`echo "$CPPFLAGS" | \
7854 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7855 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7860 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7861 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7868 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7869 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7876 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7877 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7879 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7881 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7882 && test -z "${cf_tst_cflags}" \
7883 && cf_fix_cppflags=no
7888 if test -n "$cf_new_cflags" ; then
7890 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7891 CFLAGS="${CFLAGS}$cf_new_cflags"
7895 if test -n "$cf_new_cppflags" ; then
7897 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7898 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7902 if test -n "$cf_new_extra_cppflags" ; then
7904 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7905 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7912 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7914 for cf_add_1lib in $cf_add_0lib; do
7915 for cf_add_2lib in $cf_add_libs; do
7916 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7921 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7925 cat >"conftest.$ac_ext" <<_ACEOF
7926 #line 7926 "configure"
7927 #include "confdefs.h"
7928 #include <${cf_cv_ncurses_header:-curses.h}>
7932 initscr(); mousemask(0,0); tigetstr((char *)0);
7937 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7938 if { (eval echo "$as_me:7938: \"$ac_link\"") >&5
7939 (eval $ac_link) 2>&5
7941 echo "$as_me:7941: \$? = $ac_status" >&5
7942 (exit "$ac_status"); } &&
7943 { ac_try='test -s "conftest$ac_exeext"'
7944 { (eval echo "$as_me:7944: \"$ac_try\"") >&5
7947 echo "$as_me:7947: \$? = $ac_status" >&5
7948 (exit "$ac_status"); }; }; then
7949 if test "$cross_compiling" = yes; then
7950 cf_test_ncuconfig=maybe
7952 cat >"conftest.$ac_ext" <<_ACEOF
7953 #line 7953 "configure"
7954 #include "confdefs.h"
7955 #include <${cf_cv_ncurses_header:-curses.h}>
7957 { char *xx = curses_version(); return (xx == 0); }
7959 rm -f "conftest$ac_exeext"
7960 if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
7961 (eval $ac_link) 2>&5
7963 echo "$as_me:7963: \$? = $ac_status" >&5
7964 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7965 { (eval echo "$as_me:7965: \"$ac_try\"") >&5
7968 echo "$as_me:7968: \$? = $ac_status" >&5
7969 (exit "$ac_status"); }; }; then
7970 cf_test_ncuconfig=yes
7972 echo "$as_me: program exited with status $ac_status" >&5
7973 echo "$as_me: failed program was:" >&5
7974 cat "conftest.$ac_ext" >&5
7975 cf_test_ncuconfig=no
7977 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7980 echo "$as_me: failed program was:" >&5
7981 cat "conftest.$ac_ext" >&5
7982 cf_test_ncuconfig=no
7984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7986 CFLAGS="$cf_save_CFLAGS"
7987 CPPFLAGS="$cf_save_CPPFLAGS"
7988 LIBS="$cf_save_LIBS"
7990 if test "x$cf_test_ncuconfig" != xyes; then
7991 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7992 cf_pkg_cflags="$cf_temp"
7993 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7994 cf_pkg_libs="$cf_temp"
8002 cf_new_extra_cppflags=
8004 for cf_add_cflags in $cf_pkg_cflags
8006 case "$cf_fix_cppflags" in
8008 case "$cf_add_cflags" in
8009 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8010 case "$cf_add_cflags" in
8012 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8014 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8015 && test -z "${cf_tst_cflags}" \
8016 && cf_fix_cppflags=yes
8018 if test "$cf_fix_cppflags" = yes ; then
8020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8024 elif test "${cf_tst_cflags}" = "\"'" ; then
8026 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8027 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8037 case "$cf_add_cflags" in
8039 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8041 CPPFLAGS=`echo "$CPPFLAGS" | \
8042 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8043 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8048 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8049 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8056 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8057 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8067 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8069 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8070 && test -z "${cf_tst_cflags}" \
8071 && cf_fix_cppflags=no
8076 if test -n "$cf_new_cflags" ; then
8078 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8079 CFLAGS="${CFLAGS}$cf_new_cflags"
8083 if test -n "$cf_new_cppflags" ; then
8085 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8086 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8090 if test -n "$cf_new_extra_cppflags" ; then
8092 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8093 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8100 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8102 for cf_add_1lib in $cf_add_0lib; do
8103 for cf_add_2lib in $cf_add_libs; do
8104 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8109 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8113 cat >"conftest.$ac_ext" <<_ACEOF
8114 #line 8114 "configure"
8115 #include "confdefs.h"
8116 #include <${cf_cv_ncurses_header:-curses.h}>
8120 initscr(); mousemask(0,0); tigetstr((char *)0);
8125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8126 if { (eval echo "$as_me:8126: \"$ac_link\"") >&5
8127 (eval $ac_link) 2>&5
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit "$ac_status"); } &&
8131 { ac_try='test -s "conftest$ac_exeext"'
8132 { (eval echo "$as_me:8132: \"$ac_try\"") >&5
8135 echo "$as_me:8135: \$? = $ac_status" >&5
8136 (exit "$ac_status"); }; }; then
8137 if test "$cross_compiling" = yes; then
8138 cf_have_ncuconfig=maybe
8140 cat >"conftest.$ac_ext" <<_ACEOF
8141 #line 8141 "configure"
8142 #include "confdefs.h"
8143 #include <${cf_cv_ncurses_header:-curses.h}>
8145 { char *xx = curses_version(); return (xx == 0); }
8147 rm -f "conftest$ac_exeext"
8148 if { (eval echo "$as_me:8148: \"$ac_link\"") >&5
8149 (eval $ac_link) 2>&5
8151 echo "$as_me:8151: \$? = $ac_status" >&5
8152 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8153 { (eval echo "$as_me:8153: \"$ac_try\"") >&5
8156 echo "$as_me:8156: \$? = $ac_status" >&5
8157 (exit "$ac_status"); }; }; then
8158 cf_have_ncuconfig=yes
8160 echo "$as_me: program exited with status $ac_status" >&5
8161 echo "$as_me: failed program was:" >&5
8162 cat "conftest.$ac_ext" >&5
8163 cf_have_ncuconfig=no
8165 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8168 echo "$as_me: failed program was:" >&5
8169 cat "conftest.$ac_ext" >&5
8170 cf_have_ncuconfig=no
8172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8173 echo "$as_me:8173: result: $cf_have_ncuconfig" >&5
8174 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8175 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8176 if test "$cf_have_ncuconfig" != "yes"
8178 CPPFLAGS="$cf_save_CPPFLAGS"
8179 LIBS="$cf_save_LIBS"
8180 NCURSES_CONFIG_PKG=none
8183 cat >>confdefs.h <<\EOF
8187 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8189 echo "$as_me:8189: checking for terminfo header" >&5
8190 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8191 if test "${cf_cv_term_header+set}" = set; then
8192 echo $ECHO_N "(cached) $ECHO_C" >&6
8195 case "${cf_cv_ncurses_header}" in
8196 (*/ncurses.h|*/ncursesw.h)
8197 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8200 cf_term_header=term.h
8204 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8206 cat >"conftest.$ac_ext" <<_ACEOF
8207 #line 8207 "configure"
8208 #include "confdefs.h"
8210 #include <${cf_cv_ncurses_header:-curses.h}>
8216 int x = auto_left_margin; (void)x
8221 rm -f "conftest.$ac_objext"
8222 if { (eval echo "$as_me:8222: \"$ac_compile\"") >&5
8223 (eval $ac_compile) 2>&5
8225 echo "$as_me:8225: \$? = $ac_status" >&5
8226 (exit "$ac_status"); } &&
8227 { ac_try='test -s "conftest.$ac_objext"'
8228 { (eval echo "$as_me:8228: \"$ac_try\"") >&5
8231 echo "$as_me:8231: \$? = $ac_status" >&5
8232 (exit "$ac_status"); }; }; then
8234 cf_cv_term_header="$cf_test"
8236 echo "$as_me: failed program was:" >&5
8237 cat "conftest.$ac_ext" >&5
8239 cf_cv_term_header=unknown
8242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8243 test "$cf_cv_term_header" != unknown && break
8247 echo "$as_me:8247: result: $cf_cv_term_header" >&5
8248 echo "${ECHO_T}$cf_cv_term_header" >&6
8250 # Set definitions to allow ifdef'ing to accommodate subdirectories
8252 case "$cf_cv_term_header" in
8255 cat >>confdefs.h <<\EOF
8256 #define HAVE_TERM_H 1
8262 case "$cf_cv_term_header" in
8265 cat >>confdefs.h <<\EOF
8266 #define HAVE_NCURSES_TERM_H 1
8272 cat >>confdefs.h <<\EOF
8273 #define HAVE_NCURSESW_TERM_H 1
8282 echo "$as_me:8282: result: no" >&5
8283 echo "${ECHO_T}no" >&6
8284 NCURSES_CONFIG_PKG=none
8287 NCURSES_CONFIG_PKG=none
8290 if test "x$cf_have_ncuconfig" = "xno"; then
8291 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8293 if test -n "$ac_tool_prefix"; then
8294 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8296 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8297 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8298 echo "$as_me:8298: checking for $ac_word" >&5
8299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8300 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8301 echo $ECHO_N "(cached) $ECHO_C" >&6
8303 if test -n "$NCURSES_CONFIG"; then
8304 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8306 ac_save_IFS=$IFS; IFS=$ac_path_separator
8308 for ac_dir in $ac_dummy; do
8310 test -z "$ac_dir" && ac_dir=.
8311 $as_executable_p "$ac_dir/$ac_word" || continue
8312 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8313 echo "$as_me:8313: found $ac_dir/$ac_word" >&5
8319 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8320 if test -n "$NCURSES_CONFIG"; then
8321 echo "$as_me:8321: result: $NCURSES_CONFIG" >&5
8322 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8324 echo "$as_me:8324: result: no" >&5
8325 echo "${ECHO_T}no" >&6
8328 test -n "$NCURSES_CONFIG" && break
8331 if test -z "$NCURSES_CONFIG"; then
8332 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8333 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8335 # Extract the first word of "$ac_prog", so it can be a program name with args.
8336 set dummy $ac_prog; ac_word=$2
8337 echo "$as_me:8337: checking for $ac_word" >&5
8338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8339 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8342 if test -n "$ac_ct_NCURSES_CONFIG"; then
8343 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8345 ac_save_IFS=$IFS; IFS=$ac_path_separator
8347 for ac_dir in $ac_dummy; do
8349 test -z "$ac_dir" && ac_dir=.
8350 $as_executable_p "$ac_dir/$ac_word" || continue
8351 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8352 echo "$as_me:8352: found $ac_dir/$ac_word" >&5
8358 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8359 if test -n "$ac_ct_NCURSES_CONFIG"; then
8360 echo "$as_me:8360: result: $ac_ct_NCURSES_CONFIG" >&5
8361 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8363 echo "$as_me:8363: result: no" >&5
8364 echo "${ECHO_T}no" >&6
8367 test -n "$ac_ct_NCURSES_CONFIG" && break
8369 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8371 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8374 if test "$NCURSES_CONFIG" != none ; then
8379 cf_new_extra_cppflags=
8381 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8383 case "$cf_fix_cppflags" in
8385 case "$cf_add_cflags" in
8386 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8387 case "$cf_add_cflags" in
8389 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8392 && test -z "${cf_tst_cflags}" \
8393 && cf_fix_cppflags=yes
8395 if test "$cf_fix_cppflags" = yes ; then
8397 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8398 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8401 elif test "${cf_tst_cflags}" = "\"'" ; then
8403 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8404 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8414 case "$cf_add_cflags" in
8416 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8418 CPPFLAGS=`echo "$CPPFLAGS" | \
8419 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8420 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8425 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8426 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8433 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8434 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8444 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8447 && test -z "${cf_tst_cflags}" \
8448 && cf_fix_cppflags=no
8453 if test -n "$cf_new_cflags" ; then
8455 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8456 CFLAGS="${CFLAGS}$cf_new_cflags"
8460 if test -n "$cf_new_cppflags" ; then
8462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8463 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8467 if test -n "$cf_new_extra_cppflags" ; then
8469 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8470 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8477 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8479 for cf_add_1lib in $cf_add_0lib; do
8480 for cf_add_2lib in $cf_add_libs; do
8481 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8486 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8490 # even with config script, some packages use no-override for curses.h
8492 echo "$as_me:8492: checking if we have identified curses headers" >&5
8493 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8494 if test "${cf_cv_ncurses_header+set}" = set; then
8495 echo $ECHO_N "(cached) $ECHO_C" >&6
8498 cf_cv_ncurses_header=none
8500 ncurses.h $cf_cv_screen/ncurses.h \
8501 curses.h $cf_cv_screen/curses.h
8503 cat >"conftest.$ac_ext" <<_ACEOF
8504 #line 8504 "configure"
8505 #include "confdefs.h"
8506 #include <${cf_header}>
8510 initscr(); tgoto("?", 0,0)
8515 rm -f "conftest.$ac_objext"
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517 (eval $ac_compile) 2>&5
8519 echo "$as_me:8519: \$? = $ac_status" >&5
8520 (exit "$ac_status"); } &&
8521 { ac_try='test -s "conftest.$ac_objext"'
8522 { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8525 echo "$as_me:8525: \$? = $ac_status" >&5
8526 (exit "$ac_status"); }; }; then
8527 cf_cv_ncurses_header=$cf_header; break
8529 echo "$as_me: failed program was:" >&5
8530 cat "conftest.$ac_ext" >&5
8532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8536 echo "$as_me:8536: result: $cf_cv_ncurses_header" >&5
8537 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8539 if test "$cf_cv_ncurses_header" = none ; then
8540 { { echo "$as_me:8540: error: No curses header-files found" >&5
8541 echo "$as_me: error: No curses header-files found" >&2;}
8542 { (exit 1); exit 1; }; }
8545 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8547 for ac_header in $cf_cv_ncurses_header
8549 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8550 echo "$as_me:8550: checking for $ac_header" >&5
8551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8553 echo $ECHO_N "(cached) $ECHO_C" >&6
8555 cat >"conftest.$ac_ext" <<_ACEOF
8556 #line 8556 "configure"
8557 #include "confdefs.h"
8558 #include <$ac_header>
8560 if { (eval echo "$as_me:8560: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8561 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8563 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8565 cat conftest.err >&5
8566 echo "$as_me:8566: \$? = $ac_status" >&5
8567 (exit "$ac_status"); } >/dev/null; then
8568 if test -s conftest.err; then
8569 ac_cpp_err=$ac_c_preproc_warn_flag
8576 if test -z "$ac_cpp_err"; then
8577 eval "$as_ac_Header=yes"
8579 echo "$as_me: failed program was:" >&5
8580 cat "conftest.$ac_ext" >&5
8581 eval "$as_ac_Header=no"
8583 rm -f conftest.err "conftest.$ac_ext"
8585 echo "$as_me:8585: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8586 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8587 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8588 cat >>confdefs.h <<EOF
8589 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8595 cat >>confdefs.h <<\EOF
8599 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8601 cat >>confdefs.h <<EOF
8602 #define $cf_nculib_ROOT 1
8605 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8609 cf_ncuhdr_root=$cf_cv_screen
8611 test -n "$cf_cv_curses_dir" && \
8612 test "$cf_cv_curses_dir" != "no" && { \
8614 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8615 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8617 while test "$cf_add_incdir" != /usr/include
8619 if test -d "$cf_add_incdir"
8622 if test -n "$CFLAGS$CPPFLAGS" ; then
8623 # a loop is needed to ensure we can add subdirs of existing dirs
8624 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8625 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8626 cf_have_incdir=yes; break
8631 if test "$cf_have_incdir" = no ; then
8632 if test "$cf_add_incdir" = /usr/local/include ; then
8633 if test "$GCC" = yes
8635 cf_save_CPPFLAGS=$CPPFLAGS
8637 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8638 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8640 cat >"conftest.$ac_ext" <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8652 rm -f "conftest.$ac_objext"
8653 if { (eval echo "$as_me:8653: \"$ac_compile\"") >&5
8654 (eval $ac_compile) 2>&5
8656 echo "$as_me:8656: \$? = $ac_status" >&5
8657 (exit "$ac_status"); } &&
8658 { ac_try='test -s "conftest.$ac_objext"'
8659 { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8662 echo "$as_me:8662: \$? = $ac_status" >&5
8663 (exit "$ac_status"); }; }; then
8666 echo "$as_me: failed program was:" >&5
8667 cat "conftest.$ac_ext" >&5
8670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8671 CPPFLAGS=$cf_save_CPPFLAGS
8676 if test "$cf_have_incdir" = no ; then
8677 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8679 echo "${as_me:-configure}:8679: testing adding $cf_add_incdir to include-path ..." 1>&5
8681 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8683 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8684 test "$cf_top_incdir" = "$cf_add_incdir" && break
8685 cf_add_incdir="$cf_top_incdir"
8698 echo "$as_me:8698: checking for $cf_ncuhdr_root header in include-path" >&5
8699 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8700 if test "${cf_cv_ncurses_h+set}" = set; then
8701 echo $ECHO_N "(cached) $ECHO_C" >&6
8704 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8705 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8706 for cf_header in $cf_header_list
8709 cat >"conftest.$ac_ext" <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8713 #include <$cf_header>
8718 #ifdef NCURSES_VERSION
8720 printf("%s\\n", NCURSES_VERSION);
8733 rm -f "conftest.$ac_objext"
8734 if { (eval echo "$as_me:8734: \"$ac_compile\"") >&5
8735 (eval $ac_compile) 2>&5
8737 echo "$as_me:8737: \$? = $ac_status" >&5
8738 (exit "$ac_status"); } &&
8739 { ac_try='test -s "conftest.$ac_objext"'
8740 { (eval echo "$as_me:8740: \"$ac_try\"") >&5
8743 echo "$as_me:8743: \$? = $ac_status" >&5
8744 (exit "$ac_status"); }; }; then
8745 cf_cv_ncurses_h=$cf_header
8748 echo "$as_me: failed program was:" >&5
8749 cat "conftest.$ac_ext" >&5
8752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8754 test "$cf_cv_ncurses_h" != no && break
8758 echo "$as_me:8758: result: $cf_cv_ncurses_h" >&5
8759 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8761 if test "$cf_cv_ncurses_h" != no ; then
8762 cf_cv_ncurses_header=$cf_cv_ncurses_h
8765 echo "$as_me:8765: checking for $cf_ncuhdr_root include-path" >&5
8766 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8767 if test "${cf_cv_ncurses_h2+set}" = set; then
8768 echo $ECHO_N "(cached) $ECHO_C" >&6
8771 test -n "$verbose" && echo
8775 # collect the current set of include-directories from compiler flags
8776 cf_header_path_list=""
8777 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8778 for cf_header_path in $CPPFLAGS $CFLAGS
8780 case "$cf_header_path" in
8782 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8784 test "x$cf_header_path" != "xNONE" && \
8785 test -d "$cf_header_path" && \
8787 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8788 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8789 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8790 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8791 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8792 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"
8795 cf_header_path_list="$cf_header_path_list $cf_search"
8801 # add the variations for the package we are looking for
8805 test "x$prefix" != "xNONE" && \
8806 test -d "$prefix" && \
8808 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8809 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8810 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8811 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8812 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8813 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8816 for cf_subdir_prefix in \
8825 test "x$cf_subdir_prefix" != "x$prefix" && \
8826 test -d "$cf_subdir_prefix" && \
8827 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8828 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8829 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8830 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8831 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8832 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8833 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"
8838 test "$includedir" != NONE && \
8839 test "$includedir" != "/usr/include" && \
8840 test -d "$includedir" && {
8841 test -d "$includedir" && cf_search="$cf_search $includedir"
8842 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8845 test "$oldincludedir" != NONE && \
8846 test "$oldincludedir" != "/usr/include" && \
8847 test -d "$oldincludedir" && {
8848 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8849 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8852 cf_search="$cf_search $cf_header_path_list"
8854 test -n "$verbose" && echo "search path $cf_search"
8855 cf_save2_CPPFLAGS="$CPPFLAGS"
8856 for cf_incdir in $cf_search
8859 if test -n "$cf_incdir" ; then
8860 for cf_add_incdir in $cf_incdir
8862 while test "$cf_add_incdir" != /usr/include
8864 if test -d "$cf_add_incdir"
8867 if test -n "$CFLAGS$CPPFLAGS" ; then
8868 # a loop is needed to ensure we can add subdirs of existing dirs
8869 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8870 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8871 cf_have_incdir=yes; break
8876 if test "$cf_have_incdir" = no ; then
8877 if test "$cf_add_incdir" = /usr/local/include ; then
8878 if test "$GCC" = yes
8880 cf_save_CPPFLAGS=$CPPFLAGS
8882 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8883 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8885 cat >"conftest.$ac_ext" <<_ACEOF
8886 #line 8886 "configure"
8887 #include "confdefs.h"
8897 rm -f "conftest.$ac_objext"
8898 if { (eval echo "$as_me:8898: \"$ac_compile\"") >&5
8899 (eval $ac_compile) 2>&5
8901 echo "$as_me:8901: \$? = $ac_status" >&5
8902 (exit "$ac_status"); } &&
8903 { ac_try='test -s "conftest.$ac_objext"'
8904 { (eval echo "$as_me:8904: \"$ac_try\"") >&5
8907 echo "$as_me:8907: \$? = $ac_status" >&5
8908 (exit "$ac_status"); }; }; then
8911 echo "$as_me: failed program was:" >&5
8912 cat "conftest.$ac_ext" >&5
8915 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8916 CPPFLAGS=$cf_save_CPPFLAGS
8921 if test "$cf_have_incdir" = no ; then
8922 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8924 echo "${as_me:-configure}:8924: testing adding $cf_add_incdir to include-path ..." 1>&5
8926 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8928 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8929 test "$cf_top_incdir" = "$cf_add_incdir" && break
8930 cf_add_incdir="$cf_top_incdir"
8946 cat >"conftest.$ac_ext" <<_ACEOF
8947 #line 8947 "configure"
8948 #include "confdefs.h"
8950 #include <$cf_header>
8955 #ifdef NCURSES_VERSION
8957 printf("%s\\n", NCURSES_VERSION);
8970 rm -f "conftest.$ac_objext"
8971 if { (eval echo "$as_me:8971: \"$ac_compile\"") >&5
8972 (eval $ac_compile) 2>&5
8974 echo "$as_me:8974: \$? = $ac_status" >&5
8975 (exit "$ac_status"); } &&
8976 { ac_try='test -s "conftest.$ac_objext"'
8977 { (eval echo "$as_me:8977: \"$ac_try\"") >&5
8980 echo "$as_me:8980: \$? = $ac_status" >&5
8981 (exit "$ac_status"); }; }; then
8982 cf_cv_ncurses_h2=$cf_header
8985 echo "$as_me: failed program was:" >&5
8986 cat "conftest.$ac_ext" >&5
8989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8991 if test "$cf_cv_ncurses_h2" != no ; then
8992 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8993 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8996 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8998 CPPFLAGS="$cf_save2_CPPFLAGS"
8999 test "$cf_cv_ncurses_h2" != no && break
9001 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9001: error: not found" >&5
9002 echo "$as_me: error: not found" >&2;}
9003 { (exit 1); exit 1; }; }
9006 echo "$as_me:9006: result: $cf_cv_ncurses_h2" >&5
9007 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9009 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9010 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9011 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9012 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9015 if test -n "$cf_1st_incdir" ; then
9016 for cf_add_incdir in $cf_1st_incdir
9018 while test "$cf_add_incdir" != /usr/include
9020 if test -d "$cf_add_incdir"
9023 if test -n "$CFLAGS$CPPFLAGS" ; then
9024 # a loop is needed to ensure we can add subdirs of existing dirs
9025 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9026 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9027 cf_have_incdir=yes; break
9032 if test "$cf_have_incdir" = no ; then
9033 if test "$cf_add_incdir" = /usr/local/include ; then
9034 if test "$GCC" = yes
9036 cf_save_CPPFLAGS=$CPPFLAGS
9038 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9039 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9041 cat >"conftest.$ac_ext" <<_ACEOF
9042 #line 9042 "configure"
9043 #include "confdefs.h"
9053 rm -f "conftest.$ac_objext"
9054 if { (eval echo "$as_me:9054: \"$ac_compile\"") >&5
9055 (eval $ac_compile) 2>&5
9057 echo "$as_me:9057: \$? = $ac_status" >&5
9058 (exit "$ac_status"); } &&
9059 { ac_try='test -s "conftest.$ac_objext"'
9060 { (eval echo "$as_me:9060: \"$ac_try\"") >&5
9063 echo "$as_me:9063: \$? = $ac_status" >&5
9064 (exit "$ac_status"); }; }; then
9067 echo "$as_me: failed program was:" >&5
9068 cat "conftest.$ac_ext" >&5
9071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9072 CPPFLAGS=$cf_save_CPPFLAGS
9077 if test "$cf_have_incdir" = no ; then
9078 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9080 echo "${as_me:-configure}:9080: testing adding $cf_add_incdir to include-path ..." 1>&5
9082 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9084 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9085 test "$cf_top_incdir" = "$cf_add_incdir" && break
9086 cf_add_incdir="$cf_top_incdir"
9099 # Set definitions to allow ifdef'ing for ncurses.h
9101 case "$cf_cv_ncurses_header" in
9104 cat >>confdefs.h <<\EOF
9105 #define HAVE_NCURSES_H 1
9111 case "$cf_cv_ncurses_header" in
9112 (ncurses/curses.h|ncurses/ncurses.h)
9114 cat >>confdefs.h <<\EOF
9115 #define HAVE_NCURSES_NCURSES_H 1
9119 (ncursesw/curses.h|ncursesw/ncurses.h)
9121 cat >>confdefs.h <<\EOF
9122 #define HAVE_NCURSESW_NCURSES_H 1
9128 echo "$as_me:9128: checking for terminfo header" >&5
9129 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9130 if test "${cf_cv_term_header+set}" = set; then
9131 echo $ECHO_N "(cached) $ECHO_C" >&6
9134 case "${cf_cv_ncurses_header}" in
9135 (*/ncurses.h|*/ncursesw.h)
9136 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9139 cf_term_header=term.h
9143 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9145 cat >"conftest.$ac_ext" <<_ACEOF
9146 #line 9146 "configure"
9147 #include "confdefs.h"
9149 #include <${cf_cv_ncurses_header:-curses.h}>
9155 int x = auto_left_margin; (void)x
9160 rm -f "conftest.$ac_objext"
9161 if { (eval echo "$as_me:9161: \"$ac_compile\"") >&5
9162 (eval $ac_compile) 2>&5
9164 echo "$as_me:9164: \$? = $ac_status" >&5
9165 (exit "$ac_status"); } &&
9166 { ac_try='test -s "conftest.$ac_objext"'
9167 { (eval echo "$as_me:9167: \"$ac_try\"") >&5
9170 echo "$as_me:9170: \$? = $ac_status" >&5
9171 (exit "$ac_status"); }; }; then
9173 cf_cv_term_header="$cf_test"
9175 echo "$as_me: failed program was:" >&5
9176 cat "conftest.$ac_ext" >&5
9178 cf_cv_term_header=unknown
9181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9182 test "$cf_cv_term_header" != unknown && break
9186 echo "$as_me:9186: result: $cf_cv_term_header" >&5
9187 echo "${ECHO_T}$cf_cv_term_header" >&6
9189 # Set definitions to allow ifdef'ing to accommodate subdirectories
9191 case "$cf_cv_term_header" in
9194 cat >>confdefs.h <<\EOF
9195 #define HAVE_TERM_H 1
9201 case "$cf_cv_term_header" in
9204 cat >>confdefs.h <<\EOF
9205 #define HAVE_NCURSES_TERM_H 1
9211 cat >>confdefs.h <<\EOF
9212 #define HAVE_NCURSESW_TERM_H 1
9218 # some applications need this, but should check for NCURSES_VERSION
9220 cat >>confdefs.h <<\EOF
9224 echo "$as_me:9224: checking for ncurses version" >&5
9225 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9226 if test "${cf_cv_ncurses_version+set}" = set; then
9227 echo $ECHO_N "(cached) $ECHO_C" >&6
9230 cf_cv_ncurses_version=no
9232 rm -f "$cf_tempfile"
9233 if test "$cross_compiling" = yes; then
9235 # This will not work if the preprocessor splits the line after the
9236 # Autoconf token. The 'unproto' program does that.
9237 cat > "conftest.$ac_ext" <<EOF
9238 #include <${cf_cv_ncurses_header:-curses.h}>
9240 #ifdef NCURSES_VERSION
9241 Autoconf NCURSES_VERSION
9249 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9250 { (eval echo "$as_me:9250: \"$cf_try\"") >&5
9253 echo "$as_me:9253: \$? = $ac_status" >&5
9254 (exit "$ac_status"); }
9255 if test -f conftest.out ; then
9256 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9257 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9262 cat >"conftest.$ac_ext" <<_ACEOF
9263 #line 9263 "configure"
9264 #include "confdefs.h"
9266 #include <${cf_cv_ncurses_header:-curses.h}>
9270 FILE *fp = fopen("$cf_tempfile", "w");
9271 #ifdef NCURSES_VERSION
9272 # ifdef NCURSES_VERSION_PATCH
9273 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9275 fprintf(fp, "%s\\n", NCURSES_VERSION);
9279 fprintf(fp, "old\\n");
9284 ${cf_cv_main_return:-return}(0);
9287 rm -f "conftest$ac_exeext"
9288 if { (eval echo "$as_me:9288: \"$ac_link\"") >&5
9289 (eval $ac_link) 2>&5
9291 echo "$as_me:9291: \$? = $ac_status" >&5
9292 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9293 { (eval echo "$as_me:9293: \"$ac_try\"") >&5
9296 echo "$as_me:9296: \$? = $ac_status" >&5
9297 (exit "$ac_status"); }; }; then
9299 cf_cv_ncurses_version=`cat $cf_tempfile`
9301 echo "$as_me: program exited with status $ac_status" >&5
9302 echo "$as_me: failed program was:" >&5
9303 cat "conftest.$ac_ext" >&5
9305 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9307 rm -f "$cf_tempfile"
9310 echo "$as_me:9310: result: $cf_cv_ncurses_version" >&5
9311 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9312 test "$cf_cv_ncurses_version" = no ||
9313 cat >>confdefs.h <<\EOF
9317 cf_nculib_root=$cf_cv_screen
9318 # This works, except for the special case where we find gpm, but
9319 # ncurses is in a nonstandard location via $LIBS, and we really want
9322 cf_ncurses_SAVE="$LIBS"
9323 echo "$as_me:9323: checking for Gpm_Open in -lgpm" >&5
9324 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9325 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9326 echo $ECHO_N "(cached) $ECHO_C" >&6
9328 ac_check_lib_save_LIBS=$LIBS
9330 cat >"conftest.$ac_ext" <<_ACEOF
9331 #line 9331 "configure"
9332 #include "confdefs.h"
9334 /* Override any gcc2 internal prototype to avoid an error. */
9338 /* We use char because int might match the return type of a gcc2
9339 builtin and then its argument prototype would still apply. */
9349 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9350 if { (eval echo "$as_me:9350: \"$ac_link\"") >&5
9351 (eval $ac_link) 2>&5
9353 echo "$as_me:9353: \$? = $ac_status" >&5
9354 (exit "$ac_status"); } &&
9355 { ac_try='test -s "conftest$ac_exeext"'
9356 { (eval echo "$as_me:9356: \"$ac_try\"") >&5
9359 echo "$as_me:9359: \$? = $ac_status" >&5
9360 (exit "$ac_status"); }; }; then
9361 ac_cv_lib_gpm_Gpm_Open=yes
9363 echo "$as_me: failed program was:" >&5
9364 cat "conftest.$ac_ext" >&5
9365 ac_cv_lib_gpm_Gpm_Open=no
9367 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9368 LIBS=$ac_check_lib_save_LIBS
9370 echo "$as_me:9370: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9371 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9372 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9373 echo "$as_me:9373: checking for initscr in -lgpm" >&5
9374 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9375 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9376 echo $ECHO_N "(cached) $ECHO_C" >&6
9378 ac_check_lib_save_LIBS=$LIBS
9380 cat >"conftest.$ac_ext" <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9384 /* Override any gcc2 internal prototype to avoid an error. */
9388 /* We use char because int might match the return type of a gcc2
9389 builtin and then its argument prototype would still apply. */
9399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9400 if { (eval echo "$as_me:9400: \"$ac_link\"") >&5
9401 (eval $ac_link) 2>&5
9403 echo "$as_me:9403: \$? = $ac_status" >&5
9404 (exit "$ac_status"); } &&
9405 { ac_try='test -s "conftest$ac_exeext"'
9406 { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9409 echo "$as_me:9409: \$? = $ac_status" >&5
9410 (exit "$ac_status"); }; }; then
9411 ac_cv_lib_gpm_initscr=yes
9413 echo "$as_me: failed program was:" >&5
9414 cat "conftest.$ac_ext" >&5
9415 ac_cv_lib_gpm_initscr=no
9417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9418 LIBS=$ac_check_lib_save_LIBS
9420 echo "$as_me:9420: result: $ac_cv_lib_gpm_initscr" >&5
9421 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9422 if test "$ac_cv_lib_gpm_initscr" = yes; then
9423 LIBS="$cf_ncurses_SAVE"
9425 cf_ncurses_LIBS="-lgpm"
9432 # This is only necessary if you are linking against an obsolete
9433 # version of ncurses (but it should do no harm, since it's static).
9434 if test "$cf_nculib_root" = ncurses ; then
9435 echo "$as_me:9435: checking for tgoto in -lmytinfo" >&5
9436 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9437 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9438 echo $ECHO_N "(cached) $ECHO_C" >&6
9440 ac_check_lib_save_LIBS=$LIBS
9441 LIBS="-lmytinfo $LIBS"
9442 cat >"conftest.$ac_ext" <<_ACEOF
9443 #line 9443 "configure"
9444 #include "confdefs.h"
9446 /* Override any gcc2 internal prototype to avoid an error. */
9450 /* We use char because int might match the return type of a gcc2
9451 builtin and then its argument prototype would still apply. */
9461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9462 if { (eval echo "$as_me:9462: \"$ac_link\"") >&5
9463 (eval $ac_link) 2>&5
9465 echo "$as_me:9465: \$? = $ac_status" >&5
9466 (exit "$ac_status"); } &&
9467 { ac_try='test -s "conftest$ac_exeext"'
9468 { (eval echo "$as_me:9468: \"$ac_try\"") >&5
9471 echo "$as_me:9471: \$? = $ac_status" >&5
9472 (exit "$ac_status"); }; }; then
9473 ac_cv_lib_mytinfo_tgoto=yes
9475 echo "$as_me: failed program was:" >&5
9476 cat "conftest.$ac_ext" >&5
9477 ac_cv_lib_mytinfo_tgoto=no
9479 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9480 LIBS=$ac_check_lib_save_LIBS
9482 echo "$as_me:9482: result: $ac_cv_lib_mytinfo_tgoto" >&5
9483 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9484 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9485 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9495 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9497 for cf_add_1lib in $cf_add_0lib; do
9498 for cf_add_2lib in $cf_add_libs; do
9499 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9504 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9508 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9514 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9516 for cf_add_1lib in $cf_add_0lib; do
9517 for cf_add_2lib in $cf_add_libs; do
9518 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9523 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9529 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9531 echo "$as_me:9531: checking for initscr" >&5
9532 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9533 if test "${ac_cv_func_initscr+set}" = set; then
9534 echo $ECHO_N "(cached) $ECHO_C" >&6
9536 cat >"conftest.$ac_ext" <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #define initscr autoconf_temporary
9540 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9547 /* We use char because int might match the return type of a gcc2
9548 builtin and then its argument prototype would still apply. */
9549 char initscr (void);
9555 /* The GNU C library defines stubs for functions which it implements
9556 to always fail with ENOSYS. Some functions are actually named
9557 something starting with __ and the normal name is an alias. */
9558 #if defined (__stub_initscr) || defined (__stub___initscr)
9559 #error found stub for initscr
9567 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9568 if { (eval echo "$as_me:9568: \"$ac_link\"") >&5
9569 (eval $ac_link) 2>&5
9571 echo "$as_me:9571: \$? = $ac_status" >&5
9572 (exit "$ac_status"); } &&
9573 { ac_try='test -s "conftest$ac_exeext"'
9574 { (eval echo "$as_me:9574: \"$ac_try\"") >&5
9577 echo "$as_me:9577: \$? = $ac_status" >&5
9578 (exit "$ac_status"); }; }; then
9579 ac_cv_func_initscr=yes
9581 echo "$as_me: failed program was:" >&5
9582 cat "conftest.$ac_ext" >&5
9583 ac_cv_func_initscr=no
9585 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9587 echo "$as_me:9587: result: $ac_cv_func_initscr" >&5
9588 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9589 if test "$ac_cv_func_initscr" = yes; then
9590 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9593 cf_save_LIBS="$LIBS"
9594 echo "$as_me:9594: checking for initscr in -l$cf_nculib_root" >&5
9595 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9596 LIBS="-l$cf_nculib_root $LIBS"
9597 cat >"conftest.$ac_ext" <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600 #include <${cf_cv_ncurses_header:-curses.h}>
9609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9610 if { (eval echo "$as_me:9610: \"$ac_link\"") >&5
9611 (eval $ac_link) 2>&5
9613 echo "$as_me:9613: \$? = $ac_status" >&5
9614 (exit "$ac_status"); } &&
9615 { ac_try='test -s "conftest$ac_exeext"'
9616 { (eval echo "$as_me:9616: \"$ac_try\"") >&5
9619 echo "$as_me:9619: \$? = $ac_status" >&5
9620 (exit "$ac_status"); }; }; then
9621 echo "$as_me:9621: result: yes" >&5
9622 echo "${ECHO_T}yes" >&6
9623 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9626 echo "$as_me: failed program was:" >&5
9627 cat "conftest.$ac_ext" >&5
9628 echo "$as_me:9628: result: no" >&5
9629 echo "${ECHO_T}no" >&6
9632 cf_library_path_list=""
9633 if test -n "${LDFLAGS}${LIBS}" ; then
9634 for cf_library_path in $LDFLAGS $LIBS
9636 case "$cf_library_path" in
9638 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9640 test "x$cf_library_path" != "xNONE" && \
9641 test -d "$cf_library_path" && \
9643 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9644 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9645 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9646 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9647 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9648 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"
9651 cf_library_path_list="$cf_library_path_list $cf_search"
9659 test "x$prefix" != "xNONE" && \
9660 test -d "$prefix" && \
9662 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9663 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9664 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9665 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9666 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9667 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9670 for cf_subdir_prefix in \
9679 test "x$cf_subdir_prefix" != "x$prefix" && \
9680 test -d "$cf_subdir_prefix" && \
9681 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9682 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9683 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9684 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9685 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9686 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9687 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"
9692 cf_search="$cf_library_path_list $cf_search"
9694 for cf_libdir in $cf_search
9696 echo "$as_me:9696: checking for -l$cf_nculib_root in $cf_libdir" >&5
9697 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9698 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9699 cat >"conftest.$ac_ext" <<_ACEOF
9700 #line 9700 "configure"
9701 #include "confdefs.h"
9702 #include <${cf_cv_ncurses_header:-curses.h}>
9711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9712 if { (eval echo "$as_me:9712: \"$ac_link\"") >&5
9713 (eval $ac_link) 2>&5
9715 echo "$as_me:9715: \$? = $ac_status" >&5
9716 (exit "$ac_status"); } &&
9717 { ac_try='test -s "conftest$ac_exeext"'
9718 { (eval echo "$as_me:9718: \"$ac_try\"") >&5
9721 echo "$as_me:9721: \$? = $ac_status" >&5
9722 (exit "$ac_status"); }; }; then
9723 echo "$as_me:9723: result: yes" >&5
9724 echo "${ECHO_T}yes" >&6
9725 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9728 echo "$as_me: failed program was:" >&5
9729 cat "conftest.$ac_ext" >&5
9730 echo "$as_me:9730: result: no" >&5
9731 echo "${ECHO_T}no" >&6
9732 LIBS="$cf_save_LIBS"
9734 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9742 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9744 if test "$cf_found_library" = no ; then
9745 { { echo "$as_me:9745: error: Cannot link $cf_nculib_root library" >&5
9746 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9747 { (exit 1); exit 1; }; }
9752 if test -n "$cf_ncurses_LIBS" ; then
9753 echo "$as_me:9753: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9754 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9755 cf_ncurses_SAVE="$LIBS"
9756 for p in $cf_ncurses_LIBS ; do
9757 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9758 if test "$q" != "$LIBS" ; then
9762 cat >"conftest.$ac_ext" <<_ACEOF
9763 #line 9763 "configure"
9764 #include "confdefs.h"
9765 #include <${cf_cv_ncurses_header:-curses.h}>
9769 initscr(); mousemask(0,0); tigetstr((char *)0);
9774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9775 if { (eval echo "$as_me:9775: \"$ac_link\"") >&5
9776 (eval $ac_link) 2>&5
9778 echo "$as_me:9778: \$? = $ac_status" >&5
9779 (exit "$ac_status"); } &&
9780 { ac_try='test -s "conftest$ac_exeext"'
9781 { (eval echo "$as_me:9781: \"$ac_try\"") >&5
9784 echo "$as_me:9784: \$? = $ac_status" >&5
9785 (exit "$ac_status"); }; }; then
9786 echo "$as_me:9786: result: yes" >&5
9787 echo "${ECHO_T}yes" >&6
9789 echo "$as_me: failed program was:" >&5
9790 cat "conftest.$ac_ext" >&5
9791 echo "$as_me:9791: result: no" >&5
9792 echo "${ECHO_T}no" >&6
9793 LIBS="$cf_ncurses_SAVE"
9795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9798 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9800 cat >>confdefs.h <<EOF
9801 #define $cf_nculib_ROOT 1
9812 cf_ncuconfig_root=$cf_cv_screen
9813 cf_have_ncuconfig=no
9815 if test "x${PKG_CONFIG:=none}" != xnone; then
9816 echo "$as_me:9816: checking pkg-config for $cf_ncuconfig_root" >&5
9817 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9818 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9819 echo "$as_me:9819: result: yes" >&5
9820 echo "${ECHO_T}yes" >&6
9822 echo "$as_me:9822: checking if the $cf_ncuconfig_root package files work" >&5
9823 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9824 cf_have_ncuconfig=unknown
9826 cf_save_CFLAGS="$CFLAGS"
9827 cf_save_CPPFLAGS="$CPPFLAGS"
9828 cf_save_LIBS="$LIBS"
9830 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9831 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9833 # while -W for passing linker flags is prevalent, it is not "standard".
9834 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9835 # incompatible _and_ non-standard -W option which gives an error. Work
9836 # around that pitfall.
9837 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9843 cf_new_extra_cppflags=
9845 for cf_add_cflags in $cf_pkg_cflags
9847 case "$cf_fix_cppflags" in
9849 case "$cf_add_cflags" in
9850 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9851 case "$cf_add_cflags" in
9853 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9855 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9856 && test -z "${cf_tst_cflags}" \
9857 && cf_fix_cppflags=yes
9859 if test "$cf_fix_cppflags" = yes ; then
9861 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9862 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9865 elif test "${cf_tst_cflags}" = "\"'" ; then
9867 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9868 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9878 case "$cf_add_cflags" in
9880 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9882 CPPFLAGS=`echo "$CPPFLAGS" | \
9883 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9884 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9889 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9890 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9897 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9898 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9905 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9906 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9908 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9910 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9911 && test -z "${cf_tst_cflags}" \
9912 && cf_fix_cppflags=no
9917 if test -n "$cf_new_cflags" ; then
9919 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9920 CFLAGS="${CFLAGS}$cf_new_cflags"
9924 if test -n "$cf_new_cppflags" ; then
9926 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9927 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9931 if test -n "$cf_new_extra_cppflags" ; then
9933 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9934 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9941 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9943 for cf_add_1lib in $cf_add_0lib; do
9944 for cf_add_2lib in $cf_add_libs; do
9945 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9950 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9954 cat >"conftest.$ac_ext" <<_ACEOF
9955 #line 9955 "configure"
9956 #include "confdefs.h"
9957 #include <${cf_cv_ncurses_header:-curses.h}>
9961 initscr(); mousemask(0,0); tigetstr((char *)0);
9966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9967 if { (eval echo "$as_me:9967: \"$ac_link\"") >&5
9968 (eval $ac_link) 2>&5
9970 echo "$as_me:9970: \$? = $ac_status" >&5
9971 (exit "$ac_status"); } &&
9972 { ac_try='test -s "conftest$ac_exeext"'
9973 { (eval echo "$as_me:9973: \"$ac_try\"") >&5
9976 echo "$as_me:9976: \$? = $ac_status" >&5
9977 (exit "$ac_status"); }; }; then
9978 if test "$cross_compiling" = yes; then
9979 cf_test_ncuconfig=maybe
9981 cat >"conftest.$ac_ext" <<_ACEOF
9982 #line 9982 "configure"
9983 #include "confdefs.h"
9984 #include <${cf_cv_ncurses_header:-curses.h}>
9986 { char *xx = curses_version(); return (xx == 0); }
9988 rm -f "conftest$ac_exeext"
9989 if { (eval echo "$as_me:9989: \"$ac_link\"") >&5
9990 (eval $ac_link) 2>&5
9992 echo "$as_me:9992: \$? = $ac_status" >&5
9993 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9994 { (eval echo "$as_me:9994: \"$ac_try\"") >&5
9997 echo "$as_me:9997: \$? = $ac_status" >&5
9998 (exit "$ac_status"); }; }; then
9999 cf_test_ncuconfig=yes
10001 echo "$as_me: program exited with status $ac_status" >&5
10002 echo "$as_me: failed program was:" >&5
10003 cat "conftest.$ac_ext" >&5
10004 cf_test_ncuconfig=no
10006 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10009 echo "$as_me: failed program was:" >&5
10010 cat "conftest.$ac_ext" >&5
10011 cf_test_ncuconfig=no
10013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10015 CFLAGS="$cf_save_CFLAGS"
10016 CPPFLAGS="$cf_save_CPPFLAGS"
10017 LIBS="$cf_save_LIBS"
10019 if test "x$cf_test_ncuconfig" != xyes; then
10020 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10021 cf_pkg_cflags="$cf_temp"
10022 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10023 cf_pkg_libs="$cf_temp"
10031 cf_new_extra_cppflags=
10033 for cf_add_cflags in $cf_pkg_cflags
10035 case "$cf_fix_cppflags" in
10037 case "$cf_add_cflags" in
10038 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10039 case "$cf_add_cflags" in
10041 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10043 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10044 && test -z "${cf_tst_cflags}" \
10045 && cf_fix_cppflags=yes
10047 if test "$cf_fix_cppflags" = yes ; then
10049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10053 elif test "${cf_tst_cflags}" = "\"'" ; then
10055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10062 case "$CPPFLAGS" in
10066 case "$cf_add_cflags" in
10068 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10070 CPPFLAGS=`echo "$CPPFLAGS" | \
10071 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10072 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10077 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10078 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10085 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10086 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10093 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10094 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10096 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10098 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10099 && test -z "${cf_tst_cflags}" \
10100 && cf_fix_cppflags=no
10105 if test -n "$cf_new_cflags" ; then
10107 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10108 CFLAGS="${CFLAGS}$cf_new_cflags"
10112 if test -n "$cf_new_cppflags" ; then
10114 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10115 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10119 if test -n "$cf_new_extra_cppflags" ; then
10121 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10122 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10126 cf_add_libs="$LIBS"
10129 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10130 # filter duplicates
10131 for cf_add_1lib in $cf_add_0lib; do
10132 for cf_add_2lib in $cf_add_libs; do
10133 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10138 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10140 LIBS="$cf_add_libs"
10142 cat >"conftest.$ac_ext" <<_ACEOF
10143 #line 10143 "configure"
10144 #include "confdefs.h"
10145 #include <${cf_cv_ncurses_header:-curses.h}>
10149 initscr(); mousemask(0,0); tigetstr((char *)0);
10154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10155 if { (eval echo "$as_me:10155: \"$ac_link\"") >&5
10156 (eval $ac_link) 2>&5
10158 echo "$as_me:10158: \$? = $ac_status" >&5
10159 (exit "$ac_status"); } &&
10160 { ac_try='test -s "conftest$ac_exeext"'
10161 { (eval echo "$as_me:10161: \"$ac_try\"") >&5
10162 (eval $ac_try) 2>&5
10164 echo "$as_me:10164: \$? = $ac_status" >&5
10165 (exit "$ac_status"); }; }; then
10166 if test "$cross_compiling" = yes; then
10167 cf_have_ncuconfig=maybe
10169 cat >"conftest.$ac_ext" <<_ACEOF
10170 #line 10170 "configure"
10171 #include "confdefs.h"
10172 #include <${cf_cv_ncurses_header:-curses.h}>
10174 { char *xx = curses_version(); return (xx == 0); }
10176 rm -f "conftest$ac_exeext"
10177 if { (eval echo "$as_me:10177: \"$ac_link\"") >&5
10178 (eval $ac_link) 2>&5
10180 echo "$as_me:10180: \$? = $ac_status" >&5
10181 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10182 { (eval echo "$as_me:10182: \"$ac_try\"") >&5
10183 (eval $ac_try) 2>&5
10185 echo "$as_me:10185: \$? = $ac_status" >&5
10186 (exit "$ac_status"); }; }; then
10187 cf_have_ncuconfig=yes
10189 echo "$as_me: program exited with status $ac_status" >&5
10190 echo "$as_me: failed program was:" >&5
10191 cat "conftest.$ac_ext" >&5
10192 cf_have_ncuconfig=no
10194 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10197 echo "$as_me: failed program was:" >&5
10198 cat "conftest.$ac_ext" >&5
10199 cf_have_ncuconfig=no
10201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10202 echo "$as_me:10202: result: $cf_have_ncuconfig" >&5
10203 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10204 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10205 if test "$cf_have_ncuconfig" != "yes"
10207 CPPFLAGS="$cf_save_CPPFLAGS"
10208 LIBS="$cf_save_LIBS"
10209 NCURSES_CONFIG_PKG=none
10212 cat >>confdefs.h <<\EOF
10216 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10218 echo "$as_me:10218: checking for terminfo header" >&5
10219 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10220 if test "${cf_cv_term_header+set}" = set; then
10221 echo $ECHO_N "(cached) $ECHO_C" >&6
10224 case "${cf_cv_ncurses_header}" in
10225 (*/ncurses.h|*/ncursesw.h)
10226 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10229 cf_term_header=term.h
10233 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10235 cat >"conftest.$ac_ext" <<_ACEOF
10236 #line 10236 "configure"
10237 #include "confdefs.h"
10239 #include <${cf_cv_ncurses_header:-curses.h}>
10240 #include <$cf_test>
10245 int x = auto_left_margin; (void)x
10250 rm -f "conftest.$ac_objext"
10251 if { (eval echo "$as_me:10251: \"$ac_compile\"") >&5
10252 (eval $ac_compile) 2>&5
10254 echo "$as_me:10254: \$? = $ac_status" >&5
10255 (exit "$ac_status"); } &&
10256 { ac_try='test -s "conftest.$ac_objext"'
10257 { (eval echo "$as_me:10257: \"$ac_try\"") >&5
10258 (eval $ac_try) 2>&5
10260 echo "$as_me:10260: \$? = $ac_status" >&5
10261 (exit "$ac_status"); }; }; then
10263 cf_cv_term_header="$cf_test"
10265 echo "$as_me: failed program was:" >&5
10266 cat "conftest.$ac_ext" >&5
10268 cf_cv_term_header=unknown
10271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10272 test "$cf_cv_term_header" != unknown && break
10276 echo "$as_me:10276: result: $cf_cv_term_header" >&5
10277 echo "${ECHO_T}$cf_cv_term_header" >&6
10279 # Set definitions to allow ifdef'ing to accommodate subdirectories
10281 case "$cf_cv_term_header" in
10284 cat >>confdefs.h <<\EOF
10285 #define HAVE_TERM_H 1
10291 case "$cf_cv_term_header" in
10294 cat >>confdefs.h <<\EOF
10295 #define HAVE_NCURSES_TERM_H 1
10301 cat >>confdefs.h <<\EOF
10302 #define HAVE_NCURSESW_TERM_H 1
10311 echo "$as_me:10311: result: no" >&5
10312 echo "${ECHO_T}no" >&6
10313 NCURSES_CONFIG_PKG=none
10316 NCURSES_CONFIG_PKG=none
10319 if test "x$cf_have_ncuconfig" = "xno"; then
10320 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10322 if test -n "$ac_tool_prefix"; then
10323 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10325 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10326 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10327 echo "$as_me:10327: checking for $ac_word" >&5
10328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10329 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10330 echo $ECHO_N "(cached) $ECHO_C" >&6
10332 if test -n "$NCURSES_CONFIG"; then
10333 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10335 ac_save_IFS=$IFS; IFS=$ac_path_separator
10337 for ac_dir in $ac_dummy; do
10339 test -z "$ac_dir" && ac_dir=.
10340 $as_executable_p "$ac_dir/$ac_word" || continue
10341 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10342 echo "$as_me:10342: found $ac_dir/$ac_word" >&5
10348 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10349 if test -n "$NCURSES_CONFIG"; then
10350 echo "$as_me:10350: result: $NCURSES_CONFIG" >&5
10351 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10353 echo "$as_me:10353: result: no" >&5
10354 echo "${ECHO_T}no" >&6
10357 test -n "$NCURSES_CONFIG" && break
10360 if test -z "$NCURSES_CONFIG"; then
10361 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10362 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10364 # Extract the first word of "$ac_prog", so it can be a program name with args.
10365 set dummy $ac_prog; ac_word=$2
10366 echo "$as_me:10366: checking for $ac_word" >&5
10367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10368 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
10371 if test -n "$ac_ct_NCURSES_CONFIG"; then
10372 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10374 ac_save_IFS=$IFS; IFS=$ac_path_separator
10376 for ac_dir in $ac_dummy; do
10378 test -z "$ac_dir" && ac_dir=.
10379 $as_executable_p "$ac_dir/$ac_word" || continue
10380 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10381 echo "$as_me:10381: found $ac_dir/$ac_word" >&5
10387 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10388 if test -n "$ac_ct_NCURSES_CONFIG"; then
10389 echo "$as_me:10389: result: $ac_ct_NCURSES_CONFIG" >&5
10390 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10392 echo "$as_me:10392: result: no" >&5
10393 echo "${ECHO_T}no" >&6
10396 test -n "$ac_ct_NCURSES_CONFIG" && break
10398 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10400 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10403 if test "$NCURSES_CONFIG" != none ; then
10408 cf_new_extra_cppflags=
10410 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10412 case "$cf_fix_cppflags" in
10414 case "$cf_add_cflags" in
10415 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10416 case "$cf_add_cflags" in
10418 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10420 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10421 && test -z "${cf_tst_cflags}" \
10422 && cf_fix_cppflags=yes
10424 if test "$cf_fix_cppflags" = yes ; then
10426 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10427 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10430 elif test "${cf_tst_cflags}" = "\"'" ; then
10432 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10433 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10439 case "$CPPFLAGS" in
10443 case "$cf_add_cflags" in
10445 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10447 CPPFLAGS=`echo "$CPPFLAGS" | \
10448 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10449 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10454 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10455 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10462 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10463 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10470 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10471 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10473 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10475 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10476 && test -z "${cf_tst_cflags}" \
10477 && cf_fix_cppflags=no
10482 if test -n "$cf_new_cflags" ; then
10484 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10485 CFLAGS="${CFLAGS}$cf_new_cflags"
10489 if test -n "$cf_new_cppflags" ; then
10491 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10492 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10496 if test -n "$cf_new_extra_cppflags" ; then
10498 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10499 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10503 cf_add_libs="$LIBS"
10506 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10507 # filter duplicates
10508 for cf_add_1lib in $cf_add_0lib; do
10509 for cf_add_2lib in $cf_add_libs; do
10510 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10515 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10517 LIBS="$cf_add_libs"
10519 # even with config script, some packages use no-override for curses.h
10521 echo "$as_me:10521: checking if we have identified curses headers" >&5
10522 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10523 if test "${cf_cv_ncurses_header+set}" = set; then
10524 echo $ECHO_N "(cached) $ECHO_C" >&6
10527 cf_cv_ncurses_header=none
10529 ncurses.h $cf_cv_screen/ncurses.h \
10530 curses.h $cf_cv_screen/curses.h
10532 cat >"conftest.$ac_ext" <<_ACEOF
10533 #line 10533 "configure"
10534 #include "confdefs.h"
10535 #include <${cf_header}>
10539 initscr(); tgoto("?", 0,0)
10544 rm -f "conftest.$ac_objext"
10545 if { (eval echo "$as_me:10545: \"$ac_compile\"") >&5
10546 (eval $ac_compile) 2>&5
10548 echo "$as_me:10548: \$? = $ac_status" >&5
10549 (exit "$ac_status"); } &&
10550 { ac_try='test -s "conftest.$ac_objext"'
10551 { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552 (eval $ac_try) 2>&5
10554 echo "$as_me:10554: \$? = $ac_status" >&5
10555 (exit "$ac_status"); }; }; then
10556 cf_cv_ncurses_header=$cf_header; break
10558 echo "$as_me: failed program was:" >&5
10559 cat "conftest.$ac_ext" >&5
10561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10565 echo "$as_me:10565: result: $cf_cv_ncurses_header" >&5
10566 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10568 if test "$cf_cv_ncurses_header" = none ; then
10569 { { echo "$as_me:10569: error: No curses header-files found" >&5
10570 echo "$as_me: error: No curses header-files found" >&2;}
10571 { (exit 1); exit 1; }; }
10574 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10576 for ac_header in $cf_cv_ncurses_header
10578 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10579 echo "$as_me:10579: checking for $ac_header" >&5
10580 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10582 echo $ECHO_N "(cached) $ECHO_C" >&6
10584 cat >"conftest.$ac_ext" <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 #include <$ac_header>
10589 if { (eval echo "$as_me:10589: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10590 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10592 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10594 cat conftest.err >&5
10595 echo "$as_me:10595: \$? = $ac_status" >&5
10596 (exit "$ac_status"); } >/dev/null; then
10597 if test -s conftest.err; then
10598 ac_cpp_err=$ac_c_preproc_warn_flag
10605 if test -z "$ac_cpp_err"; then
10606 eval "$as_ac_Header=yes"
10608 echo "$as_me: failed program was:" >&5
10609 cat "conftest.$ac_ext" >&5
10610 eval "$as_ac_Header=no"
10612 rm -f conftest.err "conftest.$ac_ext"
10614 echo "$as_me:10614: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10615 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10616 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10617 cat >>confdefs.h <<EOF
10618 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10624 cat >>confdefs.h <<\EOF
10628 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10630 cat >>confdefs.h <<EOF
10631 #define $cf_nculib_ROOT 1
10634 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10638 cf_ncuhdr_root=$cf_cv_screen
10640 test -n "$cf_cv_curses_dir" && \
10641 test "$cf_cv_curses_dir" != "no" && { \
10643 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10644 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10646 while test "$cf_add_incdir" != /usr/include
10648 if test -d "$cf_add_incdir"
10651 if test -n "$CFLAGS$CPPFLAGS" ; then
10652 # a loop is needed to ensure we can add subdirs of existing dirs
10653 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10654 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10655 cf_have_incdir=yes; break
10660 if test "$cf_have_incdir" = no ; then
10661 if test "$cf_add_incdir" = /usr/local/include ; then
10662 if test "$GCC" = yes
10664 cf_save_CPPFLAGS=$CPPFLAGS
10666 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10667 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10669 cat >"conftest.$ac_ext" <<_ACEOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10681 rm -f "conftest.$ac_objext"
10682 if { (eval echo "$as_me:10682: \"$ac_compile\"") >&5
10683 (eval $ac_compile) 2>&5
10685 echo "$as_me:10685: \$? = $ac_status" >&5
10686 (exit "$ac_status"); } &&
10687 { ac_try='test -s "conftest.$ac_objext"'
10688 { (eval echo "$as_me:10688: \"$ac_try\"") >&5
10689 (eval $ac_try) 2>&5
10691 echo "$as_me:10691: \$? = $ac_status" >&5
10692 (exit "$ac_status"); }; }; then
10695 echo "$as_me: failed program was:" >&5
10696 cat "conftest.$ac_ext" >&5
10699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10700 CPPFLAGS=$cf_save_CPPFLAGS
10705 if test "$cf_have_incdir" = no ; then
10706 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10708 echo "${as_me:-configure}:10708: testing adding $cf_add_incdir to include-path ..." 1>&5
10710 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10712 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10713 test "$cf_top_incdir" = "$cf_add_incdir" && break
10714 cf_add_incdir="$cf_top_incdir"
10727 echo "$as_me:10727: checking for $cf_ncuhdr_root header in include-path" >&5
10728 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10729 if test "${cf_cv_ncurses_h+set}" = set; then
10730 echo $ECHO_N "(cached) $ECHO_C" >&6
10733 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10734 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10735 for cf_header in $cf_header_list
10738 cat >"conftest.$ac_ext" <<_ACEOF
10739 #line 10739 "configure"
10740 #include "confdefs.h"
10742 #include <$cf_header>
10747 #ifdef NCURSES_VERSION
10749 printf("%s\\n", NCURSES_VERSION);
10762 rm -f "conftest.$ac_objext"
10763 if { (eval echo "$as_me:10763: \"$ac_compile\"") >&5
10764 (eval $ac_compile) 2>&5
10766 echo "$as_me:10766: \$? = $ac_status" >&5
10767 (exit "$ac_status"); } &&
10768 { ac_try='test -s "conftest.$ac_objext"'
10769 { (eval echo "$as_me:10769: \"$ac_try\"") >&5
10770 (eval $ac_try) 2>&5
10772 echo "$as_me:10772: \$? = $ac_status" >&5
10773 (exit "$ac_status"); }; }; then
10774 cf_cv_ncurses_h=$cf_header
10777 echo "$as_me: failed program was:" >&5
10778 cat "conftest.$ac_ext" >&5
10781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10783 test "$cf_cv_ncurses_h" != no && break
10787 echo "$as_me:10787: result: $cf_cv_ncurses_h" >&5
10788 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10790 if test "$cf_cv_ncurses_h" != no ; then
10791 cf_cv_ncurses_header=$cf_cv_ncurses_h
10794 echo "$as_me:10794: checking for $cf_ncuhdr_root include-path" >&5
10795 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10796 if test "${cf_cv_ncurses_h2+set}" = set; then
10797 echo $ECHO_N "(cached) $ECHO_C" >&6
10800 test -n "$verbose" && echo
10804 # collect the current set of include-directories from compiler flags
10805 cf_header_path_list=""
10806 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10807 for cf_header_path in $CPPFLAGS $CFLAGS
10809 case "$cf_header_path" in
10811 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10813 test "x$cf_header_path" != "xNONE" && \
10814 test -d "$cf_header_path" && \
10816 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10817 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10818 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10819 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10820 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10821 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"
10824 cf_header_path_list="$cf_header_path_list $cf_search"
10830 # add the variations for the package we are looking for
10834 test "x$prefix" != "xNONE" && \
10835 test -d "$prefix" && \
10837 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10838 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10839 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10840 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10841 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10842 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10845 for cf_subdir_prefix in \
10854 test "x$cf_subdir_prefix" != "x$prefix" && \
10855 test -d "$cf_subdir_prefix" && \
10856 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10857 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10858 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10859 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10860 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10861 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10862 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"
10867 test "$includedir" != NONE && \
10868 test "$includedir" != "/usr/include" && \
10869 test -d "$includedir" && {
10870 test -d "$includedir" && cf_search="$cf_search $includedir"
10871 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10874 test "$oldincludedir" != NONE && \
10875 test "$oldincludedir" != "/usr/include" && \
10876 test -d "$oldincludedir" && {
10877 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10878 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10881 cf_search="$cf_search $cf_header_path_list"
10883 test -n "$verbose" && echo "search path $cf_search"
10884 cf_save2_CPPFLAGS="$CPPFLAGS"
10885 for cf_incdir in $cf_search
10888 if test -n "$cf_incdir" ; then
10889 for cf_add_incdir in $cf_incdir
10891 while test "$cf_add_incdir" != /usr/include
10893 if test -d "$cf_add_incdir"
10896 if test -n "$CFLAGS$CPPFLAGS" ; then
10897 # a loop is needed to ensure we can add subdirs of existing dirs
10898 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10899 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10900 cf_have_incdir=yes; break
10905 if test "$cf_have_incdir" = no ; then
10906 if test "$cf_add_incdir" = /usr/local/include ; then
10907 if test "$GCC" = yes
10909 cf_save_CPPFLAGS=$CPPFLAGS
10911 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10912 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10914 cat >"conftest.$ac_ext" <<_ACEOF
10915 #line 10915 "configure"
10916 #include "confdefs.h"
10926 rm -f "conftest.$ac_objext"
10927 if { (eval echo "$as_me:10927: \"$ac_compile\"") >&5
10928 (eval $ac_compile) 2>&5
10930 echo "$as_me:10930: \$? = $ac_status" >&5
10931 (exit "$ac_status"); } &&
10932 { ac_try='test -s "conftest.$ac_objext"'
10933 { (eval echo "$as_me:10933: \"$ac_try\"") >&5
10934 (eval $ac_try) 2>&5
10936 echo "$as_me:10936: \$? = $ac_status" >&5
10937 (exit "$ac_status"); }; }; then
10940 echo "$as_me: failed program was:" >&5
10941 cat "conftest.$ac_ext" >&5
10944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10945 CPPFLAGS=$cf_save_CPPFLAGS
10950 if test "$cf_have_incdir" = no ; then
10951 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10953 echo "${as_me:-configure}:10953: testing adding $cf_add_incdir to include-path ..." 1>&5
10955 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10957 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10958 test "$cf_top_incdir" = "$cf_add_incdir" && break
10959 cf_add_incdir="$cf_top_incdir"
10975 cat >"conftest.$ac_ext" <<_ACEOF
10976 #line 10976 "configure"
10977 #include "confdefs.h"
10979 #include <$cf_header>
10984 #ifdef NCURSES_VERSION
10986 printf("%s\\n", NCURSES_VERSION);
10999 rm -f "conftest.$ac_objext"
11000 if { (eval echo "$as_me:11000: \"$ac_compile\"") >&5
11001 (eval $ac_compile) 2>&5
11003 echo "$as_me:11003: \$? = $ac_status" >&5
11004 (exit "$ac_status"); } &&
11005 { ac_try='test -s "conftest.$ac_objext"'
11006 { (eval echo "$as_me:11006: \"$ac_try\"") >&5
11007 (eval $ac_try) 2>&5
11009 echo "$as_me:11009: \$? = $ac_status" >&5
11010 (exit "$ac_status"); }; }; then
11011 cf_cv_ncurses_h2=$cf_header
11014 echo "$as_me: failed program was:" >&5
11015 cat "conftest.$ac_ext" >&5
11016 cf_cv_ncurses_h2=no
11018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11020 if test "$cf_cv_ncurses_h2" != no ; then
11021 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11022 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11025 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11027 CPPFLAGS="$cf_save2_CPPFLAGS"
11028 test "$cf_cv_ncurses_h2" != no && break
11030 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11030: error: not found" >&5
11031 echo "$as_me: error: not found" >&2;}
11032 { (exit 1); exit 1; }; }
11035 echo "$as_me:11035: result: $cf_cv_ncurses_h2" >&5
11036 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11038 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11039 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11040 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11041 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11044 if test -n "$cf_1st_incdir" ; then
11045 for cf_add_incdir in $cf_1st_incdir
11047 while test "$cf_add_incdir" != /usr/include
11049 if test -d "$cf_add_incdir"
11052 if test -n "$CFLAGS$CPPFLAGS" ; then
11053 # a loop is needed to ensure we can add subdirs of existing dirs
11054 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11055 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11056 cf_have_incdir=yes; break
11061 if test "$cf_have_incdir" = no ; then
11062 if test "$cf_add_incdir" = /usr/local/include ; then
11063 if test "$GCC" = yes
11065 cf_save_CPPFLAGS=$CPPFLAGS
11067 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11068 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11070 cat >"conftest.$ac_ext" <<_ACEOF
11071 #line 11071 "configure"
11072 #include "confdefs.h"
11082 rm -f "conftest.$ac_objext"
11083 if { (eval echo "$as_me:11083: \"$ac_compile\"") >&5
11084 (eval $ac_compile) 2>&5
11086 echo "$as_me:11086: \$? = $ac_status" >&5
11087 (exit "$ac_status"); } &&
11088 { ac_try='test -s "conftest.$ac_objext"'
11089 { (eval echo "$as_me:11089: \"$ac_try\"") >&5
11090 (eval $ac_try) 2>&5
11092 echo "$as_me:11092: \$? = $ac_status" >&5
11093 (exit "$ac_status"); }; }; then
11096 echo "$as_me: failed program was:" >&5
11097 cat "conftest.$ac_ext" >&5
11100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11101 CPPFLAGS=$cf_save_CPPFLAGS
11106 if test "$cf_have_incdir" = no ; then
11107 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11109 echo "${as_me:-configure}:11109: testing adding $cf_add_incdir to include-path ..." 1>&5
11111 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11113 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11114 test "$cf_top_incdir" = "$cf_add_incdir" && break
11115 cf_add_incdir="$cf_top_incdir"
11128 # Set definitions to allow ifdef'ing for ncurses.h
11130 case "$cf_cv_ncurses_header" in
11133 cat >>confdefs.h <<\EOF
11134 #define HAVE_NCURSES_H 1
11140 case "$cf_cv_ncurses_header" in
11141 (ncurses/curses.h|ncurses/ncurses.h)
11143 cat >>confdefs.h <<\EOF
11144 #define HAVE_NCURSES_NCURSES_H 1
11148 (ncursesw/curses.h|ncursesw/ncurses.h)
11150 cat >>confdefs.h <<\EOF
11151 #define HAVE_NCURSESW_NCURSES_H 1
11157 echo "$as_me:11157: checking for terminfo header" >&5
11158 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11159 if test "${cf_cv_term_header+set}" = set; then
11160 echo $ECHO_N "(cached) $ECHO_C" >&6
11163 case "${cf_cv_ncurses_header}" in
11164 (*/ncurses.h|*/ncursesw.h)
11165 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11168 cf_term_header=term.h
11172 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11174 cat >"conftest.$ac_ext" <<_ACEOF
11175 #line 11175 "configure"
11176 #include "confdefs.h"
11178 #include <${cf_cv_ncurses_header:-curses.h}>
11179 #include <$cf_test>
11184 int x = auto_left_margin; (void)x
11189 rm -f "conftest.$ac_objext"
11190 if { (eval echo "$as_me:11190: \"$ac_compile\"") >&5
11191 (eval $ac_compile) 2>&5
11193 echo "$as_me:11193: \$? = $ac_status" >&5
11194 (exit "$ac_status"); } &&
11195 { ac_try='test -s "conftest.$ac_objext"'
11196 { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit "$ac_status"); }; }; then
11202 cf_cv_term_header="$cf_test"
11204 echo "$as_me: failed program was:" >&5
11205 cat "conftest.$ac_ext" >&5
11207 cf_cv_term_header=unknown
11210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11211 test "$cf_cv_term_header" != unknown && break
11215 echo "$as_me:11215: result: $cf_cv_term_header" >&5
11216 echo "${ECHO_T}$cf_cv_term_header" >&6
11218 # Set definitions to allow ifdef'ing to accommodate subdirectories
11220 case "$cf_cv_term_header" in
11223 cat >>confdefs.h <<\EOF
11224 #define HAVE_TERM_H 1
11230 case "$cf_cv_term_header" in
11233 cat >>confdefs.h <<\EOF
11234 #define HAVE_NCURSES_TERM_H 1
11240 cat >>confdefs.h <<\EOF
11241 #define HAVE_NCURSESW_TERM_H 1
11247 # some applications need this, but should check for NCURSES_VERSION
11249 cat >>confdefs.h <<\EOF
11253 echo "$as_me:11253: checking for ncurses version" >&5
11254 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11255 if test "${cf_cv_ncurses_version+set}" = set; then
11256 echo $ECHO_N "(cached) $ECHO_C" >&6
11259 cf_cv_ncurses_version=no
11261 rm -f "$cf_tempfile"
11262 if test "$cross_compiling" = yes; then
11264 # This will not work if the preprocessor splits the line after the
11265 # Autoconf token. The 'unproto' program does that.
11266 cat > "conftest.$ac_ext" <<EOF
11267 #include <${cf_cv_ncurses_header:-curses.h}>
11269 #ifdef NCURSES_VERSION
11270 Autoconf NCURSES_VERSION
11278 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11279 { (eval echo "$as_me:11279: \"$cf_try\"") >&5
11280 (eval $cf_try) 2>&5
11282 echo "$as_me:11282: \$? = $ac_status" >&5
11283 (exit "$ac_status"); }
11284 if test -f conftest.out ; then
11285 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11286 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11291 cat >"conftest.$ac_ext" <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11295 #include <${cf_cv_ncurses_header:-curses.h}>
11299 FILE *fp = fopen("$cf_tempfile", "w");
11300 #ifdef NCURSES_VERSION
11301 # ifdef NCURSES_VERSION_PATCH
11302 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11304 fprintf(fp, "%s\\n", NCURSES_VERSION);
11307 # ifdef __NCURSES_H
11308 fprintf(fp, "old\\n");
11313 ${cf_cv_main_return:-return}(0);
11316 rm -f "conftest$ac_exeext"
11317 if { (eval echo "$as_me:11317: \"$ac_link\"") >&5
11318 (eval $ac_link) 2>&5
11320 echo "$as_me:11320: \$? = $ac_status" >&5
11321 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11322 { (eval echo "$as_me:11322: \"$ac_try\"") >&5
11323 (eval $ac_try) 2>&5
11325 echo "$as_me:11325: \$? = $ac_status" >&5
11326 (exit "$ac_status"); }; }; then
11328 cf_cv_ncurses_version=`cat $cf_tempfile`
11330 echo "$as_me: program exited with status $ac_status" >&5
11331 echo "$as_me: failed program was:" >&5
11332 cat "conftest.$ac_ext" >&5
11334 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11336 rm -f "$cf_tempfile"
11339 echo "$as_me:11339: result: $cf_cv_ncurses_version" >&5
11340 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11341 test "$cf_cv_ncurses_version" = no ||
11342 cat >>confdefs.h <<\EOF
11346 cf_nculib_root=$cf_cv_screen
11347 # This works, except for the special case where we find gpm, but
11348 # ncurses is in a nonstandard location via $LIBS, and we really want
11351 cf_ncurses_SAVE="$LIBS"
11352 echo "$as_me:11352: checking for Gpm_Open in -lgpm" >&5
11353 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11354 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11355 echo $ECHO_N "(cached) $ECHO_C" >&6
11357 ac_check_lib_save_LIBS=$LIBS
11359 cat >"conftest.$ac_ext" <<_ACEOF
11360 #line 11360 "configure"
11361 #include "confdefs.h"
11363 /* Override any gcc2 internal prototype to avoid an error. */
11367 /* We use char because int might match the return type of a gcc2
11368 builtin and then its argument prototype would still apply. */
11378 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11379 if { (eval echo "$as_me:11379: \"$ac_link\"") >&5
11380 (eval $ac_link) 2>&5
11382 echo "$as_me:11382: \$? = $ac_status" >&5
11383 (exit "$ac_status"); } &&
11384 { ac_try='test -s "conftest$ac_exeext"'
11385 { (eval echo "$as_me:11385: \"$ac_try\"") >&5
11386 (eval $ac_try) 2>&5
11388 echo "$as_me:11388: \$? = $ac_status" >&5
11389 (exit "$ac_status"); }; }; then
11390 ac_cv_lib_gpm_Gpm_Open=yes
11392 echo "$as_me: failed program was:" >&5
11393 cat "conftest.$ac_ext" >&5
11394 ac_cv_lib_gpm_Gpm_Open=no
11396 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11397 LIBS=$ac_check_lib_save_LIBS
11399 echo "$as_me:11399: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11400 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11401 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11402 echo "$as_me:11402: checking for initscr in -lgpm" >&5
11403 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11404 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11405 echo $ECHO_N "(cached) $ECHO_C" >&6
11407 ac_check_lib_save_LIBS=$LIBS
11409 cat >"conftest.$ac_ext" <<_ACEOF
11410 #line 11410 "configure"
11411 #include "confdefs.h"
11413 /* Override any gcc2 internal prototype to avoid an error. */
11417 /* We use char because int might match the return type of a gcc2
11418 builtin and then its argument prototype would still apply. */
11428 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11429 if { (eval echo "$as_me:11429: \"$ac_link\"") >&5
11430 (eval $ac_link) 2>&5
11432 echo "$as_me:11432: \$? = $ac_status" >&5
11433 (exit "$ac_status"); } &&
11434 { ac_try='test -s "conftest$ac_exeext"'
11435 { (eval echo "$as_me:11435: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11438 echo "$as_me:11438: \$? = $ac_status" >&5
11439 (exit "$ac_status"); }; }; then
11440 ac_cv_lib_gpm_initscr=yes
11442 echo "$as_me: failed program was:" >&5
11443 cat "conftest.$ac_ext" >&5
11444 ac_cv_lib_gpm_initscr=no
11446 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11447 LIBS=$ac_check_lib_save_LIBS
11449 echo "$as_me:11449: result: $ac_cv_lib_gpm_initscr" >&5
11450 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11451 if test "$ac_cv_lib_gpm_initscr" = yes; then
11452 LIBS="$cf_ncurses_SAVE"
11454 cf_ncurses_LIBS="-lgpm"
11461 # This is only necessary if you are linking against an obsolete
11462 # version of ncurses (but it should do no harm, since it's static).
11463 if test "$cf_nculib_root" = ncurses ; then
11464 echo "$as_me:11464: checking for tgoto in -lmytinfo" >&5
11465 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11466 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11467 echo $ECHO_N "(cached) $ECHO_C" >&6
11469 ac_check_lib_save_LIBS=$LIBS
11470 LIBS="-lmytinfo $LIBS"
11471 cat >"conftest.$ac_ext" <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11475 /* Override any gcc2 internal prototype to avoid an error. */
11479 /* We use char because int might match the return type of a gcc2
11480 builtin and then its argument prototype would still apply. */
11490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11491 if { (eval echo "$as_me:11491: \"$ac_link\"") >&5
11492 (eval $ac_link) 2>&5
11494 echo "$as_me:11494: \$? = $ac_status" >&5
11495 (exit "$ac_status"); } &&
11496 { ac_try='test -s "conftest$ac_exeext"'
11497 { (eval echo "$as_me:11497: \"$ac_try\"") >&5
11498 (eval $ac_try) 2>&5
11500 echo "$as_me:11500: \$? = $ac_status" >&5
11501 (exit "$ac_status"); }; }; then
11502 ac_cv_lib_mytinfo_tgoto=yes
11504 echo "$as_me: failed program was:" >&5
11505 cat "conftest.$ac_ext" >&5
11506 ac_cv_lib_mytinfo_tgoto=no
11508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11509 LIBS=$ac_check_lib_save_LIBS
11511 echo "$as_me:11511: result: $ac_cv_lib_mytinfo_tgoto" >&5
11512 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11513 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11514 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11521 cf_add_libs="$LIBS"
11524 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11525 # filter duplicates
11526 for cf_add_1lib in $cf_add_0lib; do
11527 for cf_add_2lib in $cf_add_libs; do
11528 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11533 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11535 LIBS="$cf_add_libs"
11537 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11540 cf_add_libs="$LIBS"
11543 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11544 # filter duplicates
11545 for cf_add_1lib in $cf_add_0lib; do
11546 for cf_add_2lib in $cf_add_libs; do
11547 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11552 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11554 LIBS="$cf_add_libs"
11558 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11560 echo "$as_me:11560: checking for initscr" >&5
11561 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11562 if test "${ac_cv_func_initscr+set}" = set; then
11563 echo $ECHO_N "(cached) $ECHO_C" >&6
11565 cat >"conftest.$ac_ext" <<_ACEOF
11566 #line 11566 "configure"
11567 #include "confdefs.h"
11568 #define initscr autoconf_temporary
11569 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11576 /* We use char because int might match the return type of a gcc2
11577 builtin and then its argument prototype would still apply. */
11578 char initscr (void);
11584 /* The GNU C library defines stubs for functions which it implements
11585 to always fail with ENOSYS. Some functions are actually named
11586 something starting with __ and the normal name is an alias. */
11587 #if defined (__stub_initscr) || defined (__stub___initscr)
11588 #error found stub for initscr
11596 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11597 if { (eval echo "$as_me:11597: \"$ac_link\"") >&5
11598 (eval $ac_link) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit "$ac_status"); } &&
11602 { ac_try='test -s "conftest$ac_exeext"'
11603 { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604 (eval $ac_try) 2>&5
11606 echo "$as_me:11606: \$? = $ac_status" >&5
11607 (exit "$ac_status"); }; }; then
11608 ac_cv_func_initscr=yes
11610 echo "$as_me: failed program was:" >&5
11611 cat "conftest.$ac_ext" >&5
11612 ac_cv_func_initscr=no
11614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11616 echo "$as_me:11616: result: $ac_cv_func_initscr" >&5
11617 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11618 if test "$ac_cv_func_initscr" = yes; then
11619 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11622 cf_save_LIBS="$LIBS"
11623 echo "$as_me:11623: checking for initscr in -l$cf_nculib_root" >&5
11624 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11625 LIBS="-l$cf_nculib_root $LIBS"
11626 cat >"conftest.$ac_ext" <<_ACEOF
11627 #line 11627 "configure"
11628 #include "confdefs.h"
11629 #include <${cf_cv_ncurses_header:-curses.h}>
11638 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11639 if { (eval echo "$as_me:11639: \"$ac_link\"") >&5
11640 (eval $ac_link) 2>&5
11642 echo "$as_me:11642: \$? = $ac_status" >&5
11643 (exit "$ac_status"); } &&
11644 { ac_try='test -s "conftest$ac_exeext"'
11645 { (eval echo "$as_me:11645: \"$ac_try\"") >&5
11646 (eval $ac_try) 2>&5
11648 echo "$as_me:11648: \$? = $ac_status" >&5
11649 (exit "$ac_status"); }; }; then
11650 echo "$as_me:11650: result: yes" >&5
11651 echo "${ECHO_T}yes" >&6
11652 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11655 echo "$as_me: failed program was:" >&5
11656 cat "conftest.$ac_ext" >&5
11657 echo "$as_me:11657: result: no" >&5
11658 echo "${ECHO_T}no" >&6
11661 cf_library_path_list=""
11662 if test -n "${LDFLAGS}${LIBS}" ; then
11663 for cf_library_path in $LDFLAGS $LIBS
11665 case "$cf_library_path" in
11667 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11669 test "x$cf_library_path" != "xNONE" && \
11670 test -d "$cf_library_path" && \
11672 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11673 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11674 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11675 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11676 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11677 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"
11680 cf_library_path_list="$cf_library_path_list $cf_search"
11688 test "x$prefix" != "xNONE" && \
11689 test -d "$prefix" && \
11691 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11692 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11693 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11694 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11695 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11696 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11699 for cf_subdir_prefix in \
11708 test "x$cf_subdir_prefix" != "x$prefix" && \
11709 test -d "$cf_subdir_prefix" && \
11710 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11711 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11712 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11713 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11714 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11715 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11716 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"
11721 cf_search="$cf_library_path_list $cf_search"
11723 for cf_libdir in $cf_search
11725 echo "$as_me:11725: checking for -l$cf_nculib_root in $cf_libdir" >&5
11726 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11727 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11728 cat >"conftest.$ac_ext" <<_ACEOF
11729 #line 11729 "configure"
11730 #include "confdefs.h"
11731 #include <${cf_cv_ncurses_header:-curses.h}>
11740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11741 if { (eval echo "$as_me:11741: \"$ac_link\"") >&5
11742 (eval $ac_link) 2>&5
11744 echo "$as_me:11744: \$? = $ac_status" >&5
11745 (exit "$ac_status"); } &&
11746 { ac_try='test -s "conftest$ac_exeext"'
11747 { (eval echo "$as_me:11747: \"$ac_try\"") >&5
11748 (eval $ac_try) 2>&5
11750 echo "$as_me:11750: \$? = $ac_status" >&5
11751 (exit "$ac_status"); }; }; then
11752 echo "$as_me:11752: result: yes" >&5
11753 echo "${ECHO_T}yes" >&6
11754 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11757 echo "$as_me: failed program was:" >&5
11758 cat "conftest.$ac_ext" >&5
11759 echo "$as_me:11759: result: no" >&5
11760 echo "${ECHO_T}no" >&6
11761 LIBS="$cf_save_LIBS"
11763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11767 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11771 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11773 if test "$cf_found_library" = no ; then
11774 { { echo "$as_me:11774: error: Cannot link $cf_nculib_root library" >&5
11775 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11776 { (exit 1); exit 1; }; }
11781 if test -n "$cf_ncurses_LIBS" ; then
11782 echo "$as_me:11782: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11783 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11784 cf_ncurses_SAVE="$LIBS"
11785 for p in $cf_ncurses_LIBS ; do
11786 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11787 if test "$q" != "$LIBS" ; then
11791 cat >"conftest.$ac_ext" <<_ACEOF
11792 #line 11792 "configure"
11793 #include "confdefs.h"
11794 #include <${cf_cv_ncurses_header:-curses.h}>
11798 initscr(); mousemask(0,0); tigetstr((char *)0);
11803 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11804 if { (eval echo "$as_me:11804: \"$ac_link\"") >&5
11805 (eval $ac_link) 2>&5
11807 echo "$as_me:11807: \$? = $ac_status" >&5
11808 (exit "$ac_status"); } &&
11809 { ac_try='test -s "conftest$ac_exeext"'
11810 { (eval echo "$as_me:11810: \"$ac_try\"") >&5
11811 (eval $ac_try) 2>&5
11813 echo "$as_me:11813: \$? = $ac_status" >&5
11814 (exit "$ac_status"); }; }; then
11815 echo "$as_me:11815: result: yes" >&5
11816 echo "${ECHO_T}yes" >&6
11818 echo "$as_me: failed program was:" >&5
11819 cat "conftest.$ac_ext" >&5
11820 echo "$as_me:11820: result: no" >&5
11821 echo "${ECHO_T}no" >&6
11822 LIBS="$cf_ncurses_SAVE"
11824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11827 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11829 cat >>confdefs.h <<EOF
11830 #define $cf_nculib_ROOT 1
11835 NCURSES_CONFIG=none
11840 echo "$as_me:11840: checking for X" >&5
11841 echo $ECHO_N "checking for X... $ECHO_C" >&6
11843 # Check whether --with-x or --without-x was given.
11844 if test "${with_x+set}" = set; then
11848 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11849 if test "x$with_x" = xno; then
11850 # The user explicitly disabled X.
11853 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11854 # Both variables are already set.
11857 if test "${ac_cv_have_x+set}" = set; then
11858 echo $ECHO_N "(cached) $ECHO_C" >&6
11860 # One or both of the vars are not set, and there is no cached value.
11861 ac_x_includes=no ac_x_libraries=no
11862 rm -fr conftest.dir
11863 if mkdir conftest.dir; then
11865 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11866 cat >Imakefile <<'EOF'
11868 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11870 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11871 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11872 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
11873 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11874 for ac_extension in a so sl dylib dll; do
11875 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11876 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11877 ac_im_usrlibdir=$ac_im_libdir; break
11880 # Screen out bogus values from the imake configuration. They are
11881 # bogus both because they are the default anyway, and because
11882 # using them would break gcc on systems where it needs fixed includes.
11883 case $ac_im_incroot in
11885 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11887 case $ac_im_usrlibdir in
11888 /usr/lib | /lib) ;;
11889 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11893 rm -fr conftest.dir
11896 # Standard set of common directories for X headers.
11897 # Check X11 before X11Rn because it is often a symlink to the current release.
11914 /usr/local/X11/include
11915 /usr/local/X11R7/include
11916 /usr/local/X11R6/include
11917 /usr/local/X11R5/include
11918 /usr/local/X11R4/include
11920 /usr/local/include/X11
11921 /usr/local/include/X11R7
11922 /usr/local/include/X11R6
11923 /usr/local/include/X11R5
11924 /usr/local/include/X11R4
11928 /usr/XFree86/include/X11
11932 /usr/unsupported/include
11933 /usr/athena/include
11934 /usr/local/x11r5/include
11935 /usr/lpp/Xamples/include
11937 /usr/openwin/include
11938 /usr/openwin/share/include'
11940 if test "$ac_x_includes" = no; then
11941 # Guess where to find include files, by looking for Intrinsic.h.
11942 # First, try using that file with no special directory specified.
11943 cat >"conftest.$ac_ext" <<_ACEOF
11944 #line 11944 "configure"
11945 #include "confdefs.h"
11946 #include <X11/Intrinsic.h>
11948 if { (eval echo "$as_me:11948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11949 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11951 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11953 cat conftest.err >&5
11954 echo "$as_me:11954: \$? = $ac_status" >&5
11955 (exit "$ac_status"); } >/dev/null; then
11956 if test -s conftest.err; then
11957 ac_cpp_err=$ac_c_preproc_warn_flag
11964 if test -z "$ac_cpp_err"; then
11965 # We can compile using X headers with no special include directory.
11968 echo "$as_me: failed program was:" >&5
11969 cat "conftest.$ac_ext" >&5
11970 for ac_dir in $ac_x_header_dirs; do
11971 if test -r "$ac_dir/X11/Intrinsic.h"; then
11972 ac_x_includes=$ac_dir
11977 rm -f conftest.err "conftest.$ac_ext"
11978 fi # $ac_x_includes = no
11980 if test "$ac_x_libraries" = no; then
11981 # Check for the libraries.
11982 # See if we find them without any special options.
11983 # Don't add to $LIBS permanently.
11986 cat >"conftest.$ac_ext" <<_ACEOF
11987 #line 11987 "configure"
11988 #include "confdefs.h"
11989 #include <X11/Intrinsic.h>
11998 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11999 if { (eval echo "$as_me:11999: \"$ac_link\"") >&5
12000 (eval $ac_link) 2>&5
12002 echo "$as_me:12002: \$? = $ac_status" >&5
12003 (exit "$ac_status"); } &&
12004 { ac_try='test -s "conftest$ac_exeext"'
12005 { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006 (eval $ac_try) 2>&5
12008 echo "$as_me:12008: \$? = $ac_status" >&5
12009 (exit "$ac_status"); }; }; then
12011 # We can link X programs with no special library path.
12014 echo "$as_me: failed program was:" >&5
12015 cat "conftest.$ac_ext" >&5
12017 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12019 # Don't even attempt the hair of trying to link an X program!
12020 for ac_extension in a so sl dylib dll; do
12021 if test -r "$ac_dir/libXt.$ac_extension"; then
12022 ac_x_libraries=$ac_dir
12028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12029 fi # $ac_x_libraries = no
12031 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12032 # Didn't find X anywhere. Cache the known absence of X.
12033 ac_cv_have_x="have_x=no"
12035 # Record where we found X for the cache.
12036 ac_cv_have_x="have_x=yes \
12037 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12042 eval "$ac_cv_have_x"
12045 if test "$have_x" != yes; then
12046 echo "$as_me:12046: result: $have_x" >&5
12047 echo "${ECHO_T}$have_x" >&6
12050 # If each of the values was on the command line, it overrides each guess.
12051 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12052 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12053 # Update the cache value to reflect the command line values.
12054 ac_cv_have_x="have_x=yes \
12055 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12056 echo "$as_me:12056: result: libraries $x_libraries, headers $x_includes" >&5
12057 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12060 if test "$no_x" = yes; then
12061 # Not all programs may use this symbol, but it does not hurt to define it.
12063 cat >>confdefs.h <<\EOF
12064 #define X_DISPLAY_MISSING 1
12072 if test -n "$x_includes"; then
12073 X_CFLAGS="$X_CFLAGS -I$x_includes"
12076 # It would also be nice to do this for all -L options, not just this one.
12077 if test -n "$x_libraries"; then
12078 X_LIBS="$X_LIBS -L$x_libraries"
12079 # For Solaris; some versions of Sun CC require a space after -R and
12080 # others require no space. Words are not sufficient . . . .
12081 case `(uname -sr) 2>/dev/null` in
12083 echo "$as_me:12083: checking whether -R must be followed by a space" >&5
12084 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12085 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12086 cat >"conftest.$ac_ext" <<_ACEOF
12087 #line 12087 "configure"
12088 #include "confdefs.h"
12098 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12099 if { (eval echo "$as_me:12099: \"$ac_link\"") >&5
12100 (eval $ac_link) 2>&5
12102 echo "$as_me:12102: \$? = $ac_status" >&5
12103 (exit "$ac_status"); } &&
12104 { ac_try='test -s "conftest$ac_exeext"'
12105 { (eval echo "$as_me:12105: \"$ac_try\"") >&5
12106 (eval $ac_try) 2>&5
12108 echo "$as_me:12108: \$? = $ac_status" >&5
12109 (exit "$ac_status"); }; }; then
12112 echo "$as_me: failed program was:" >&5
12113 cat "conftest.$ac_ext" >&5
12116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12117 if test $ac_R_nospace = yes; then
12118 echo "$as_me:12118: result: no" >&5
12119 echo "${ECHO_T}no" >&6
12120 X_LIBS="$X_LIBS -R$x_libraries"
12122 LIBS="$ac_xsave_LIBS -R $x_libraries"
12123 cat >"conftest.$ac_ext" <<_ACEOF
12124 #line 12124 "configure"
12125 #include "confdefs.h"
12135 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12136 if { (eval echo "$as_me:12136: \"$ac_link\"") >&5
12137 (eval $ac_link) 2>&5
12139 echo "$as_me:12139: \$? = $ac_status" >&5
12140 (exit "$ac_status"); } &&
12141 { ac_try='test -s "conftest$ac_exeext"'
12142 { (eval echo "$as_me:12142: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12145 echo "$as_me:12145: \$? = $ac_status" >&5
12146 (exit "$ac_status"); }; }; then
12149 echo "$as_me: failed program was:" >&5
12150 cat "conftest.$ac_ext" >&5
12153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12154 if test $ac_R_space = yes; then
12155 echo "$as_me:12155: result: yes" >&5
12156 echo "${ECHO_T}yes" >&6
12157 X_LIBS="$X_LIBS -R $x_libraries"
12159 echo "$as_me:12159: result: neither works" >&5
12160 echo "${ECHO_T}neither works" >&6
12163 LIBS=$ac_xsave_LIBS
12167 # Check for system-dependent libraries X programs must link with.
12168 # Do this before checking for the system-independent R6 libraries
12169 # (-lICE), since we may need -lsocket or whatever for X linking.
12171 if test "$ISC" = yes; then
12172 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12174 # Martyn Johnson says this is needed for Ultrix, if the X
12175 # libraries were built with DECnet support. And Karl Berry says
12176 # the Alpha needs dnet_stub (dnet does not exist).
12177 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12178 cat >"conftest.$ac_ext" <<_ACEOF
12179 #line 12179 "configure"
12180 #include "confdefs.h"
12182 /* Override any gcc2 internal prototype to avoid an error. */
12186 /* We use char because int might match the return type of a gcc2
12187 builtin and then its argument prototype would still apply. */
12188 char XOpenDisplay ();
12197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12198 if { (eval echo "$as_me:12198: \"$ac_link\"") >&5
12199 (eval $ac_link) 2>&5
12201 echo "$as_me:12201: \$? = $ac_status" >&5
12202 (exit "$ac_status"); } &&
12203 { ac_try='test -s "conftest$ac_exeext"'
12204 { (eval echo "$as_me:12204: \"$ac_try\"") >&5
12205 (eval $ac_try) 2>&5
12207 echo "$as_me:12207: \$? = $ac_status" >&5
12208 (exit "$ac_status"); }; }; then
12211 echo "$as_me: failed program was:" >&5
12212 cat "conftest.$ac_ext" >&5
12213 echo "$as_me:12213: checking for dnet_ntoa in -ldnet" >&5
12214 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12215 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12216 echo $ECHO_N "(cached) $ECHO_C" >&6
12218 ac_check_lib_save_LIBS=$LIBS
12219 LIBS="-ldnet $LIBS"
12220 cat >"conftest.$ac_ext" <<_ACEOF
12221 #line 12221 "configure"
12222 #include "confdefs.h"
12224 /* Override any gcc2 internal prototype to avoid an error. */
12228 /* We use char because int might match the return type of a gcc2
12229 builtin and then its argument prototype would still apply. */
12239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12240 if { (eval echo "$as_me:12240: \"$ac_link\"") >&5
12241 (eval $ac_link) 2>&5
12243 echo "$as_me:12243: \$? = $ac_status" >&5
12244 (exit "$ac_status"); } &&
12245 { ac_try='test -s "conftest$ac_exeext"'
12246 { (eval echo "$as_me:12246: \"$ac_try\"") >&5
12247 (eval $ac_try) 2>&5
12249 echo "$as_me:12249: \$? = $ac_status" >&5
12250 (exit "$ac_status"); }; }; then
12251 ac_cv_lib_dnet_dnet_ntoa=yes
12253 echo "$as_me: failed program was:" >&5
12254 cat "conftest.$ac_ext" >&5
12255 ac_cv_lib_dnet_dnet_ntoa=no
12257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12258 LIBS=$ac_check_lib_save_LIBS
12260 echo "$as_me:12260: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12261 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12262 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12263 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12266 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12267 echo "$as_me:12267: checking for dnet_ntoa in -ldnet_stub" >&5
12268 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12269 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12270 echo $ECHO_N "(cached) $ECHO_C" >&6
12272 ac_check_lib_save_LIBS=$LIBS
12273 LIBS="-ldnet_stub $LIBS"
12274 cat >"conftest.$ac_ext" <<_ACEOF
12275 #line 12275 "configure"
12276 #include "confdefs.h"
12278 /* Override any gcc2 internal prototype to avoid an error. */
12282 /* We use char because int might match the return type of a gcc2
12283 builtin and then its argument prototype would still apply. */
12293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12294 if { (eval echo "$as_me:12294: \"$ac_link\"") >&5
12295 (eval $ac_link) 2>&5
12297 echo "$as_me:12297: \$? = $ac_status" >&5
12298 (exit "$ac_status"); } &&
12299 { ac_try='test -s "conftest$ac_exeext"'
12300 { (eval echo "$as_me:12300: \"$ac_try\"") >&5
12301 (eval $ac_try) 2>&5
12303 echo "$as_me:12303: \$? = $ac_status" >&5
12304 (exit "$ac_status"); }; }; then
12305 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12307 echo "$as_me: failed program was:" >&5
12308 cat "conftest.$ac_ext" >&5
12309 ac_cv_lib_dnet_stub_dnet_ntoa=no
12311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12312 LIBS=$ac_check_lib_save_LIBS
12314 echo "$as_me:12314: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12315 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12316 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12317 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12323 LIBS="$ac_xsave_LIBS"
12325 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12326 # to get the SysV transport functions.
12327 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12329 # The nsl library prevents programs from opening the X display
12330 # on Irix 5.2, according to T.E. Dickey.
12331 # The functions gethostbyname, getservbyname, and inet_addr are
12332 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12333 echo "$as_me:12333: checking for gethostbyname" >&5
12334 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12335 if test "${ac_cv_func_gethostbyname+set}" = set; then
12336 echo $ECHO_N "(cached) $ECHO_C" >&6
12338 cat >"conftest.$ac_ext" <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341 #define gethostbyname autoconf_temporary
12342 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12343 #undef gethostbyname
12349 /* We use char because int might match the return type of a gcc2
12350 builtin and then its argument prototype would still apply. */
12351 char gethostbyname (void);
12357 /* The GNU C library defines stubs for functions which it implements
12358 to always fail with ENOSYS. Some functions are actually named
12359 something starting with __ and the normal name is an alias. */
12360 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12361 #error found stub for gethostbyname
12364 return gethostbyname ();
12369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12370 if { (eval echo "$as_me:12370: \"$ac_link\"") >&5
12371 (eval $ac_link) 2>&5
12373 echo "$as_me:12373: \$? = $ac_status" >&5
12374 (exit "$ac_status"); } &&
12375 { ac_try='test -s "conftest$ac_exeext"'
12376 { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377 (eval $ac_try) 2>&5
12379 echo "$as_me:12379: \$? = $ac_status" >&5
12380 (exit "$ac_status"); }; }; then
12381 ac_cv_func_gethostbyname=yes
12383 echo "$as_me: failed program was:" >&5
12384 cat "conftest.$ac_ext" >&5
12385 ac_cv_func_gethostbyname=no
12387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12389 echo "$as_me:12389: result: $ac_cv_func_gethostbyname" >&5
12390 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12392 if test $ac_cv_func_gethostbyname = no; then
12393 echo "$as_me:12393: checking for gethostbyname in -lnsl" >&5
12394 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12395 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12396 echo $ECHO_N "(cached) $ECHO_C" >&6
12398 ac_check_lib_save_LIBS=$LIBS
12400 cat >"conftest.$ac_ext" <<_ACEOF
12401 #line 12401 "configure"
12402 #include "confdefs.h"
12404 /* Override any gcc2 internal prototype to avoid an error. */
12408 /* We use char because int might match the return type of a gcc2
12409 builtin and then its argument prototype would still apply. */
12410 char gethostbyname ();
12419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12420 if { (eval echo "$as_me:12420: \"$ac_link\"") >&5
12421 (eval $ac_link) 2>&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit "$ac_status"); } &&
12425 { ac_try='test -s "conftest$ac_exeext"'
12426 { (eval echo "$as_me:12426: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12429 echo "$as_me:12429: \$? = $ac_status" >&5
12430 (exit "$ac_status"); }; }; then
12431 ac_cv_lib_nsl_gethostbyname=yes
12433 echo "$as_me: failed program was:" >&5
12434 cat "conftest.$ac_ext" >&5
12435 ac_cv_lib_nsl_gethostbyname=no
12437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12438 LIBS=$ac_check_lib_save_LIBS
12440 echo "$as_me:12440: result: $ac_cv_lib_nsl_gethostbyname" >&5
12441 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12442 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12443 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12446 if test $ac_cv_lib_nsl_gethostbyname = no; then
12447 echo "$as_me:12447: checking for gethostbyname in -lbsd" >&5
12448 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12449 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12450 echo $ECHO_N "(cached) $ECHO_C" >&6
12452 ac_check_lib_save_LIBS=$LIBS
12454 cat >"conftest.$ac_ext" <<_ACEOF
12455 #line 12455 "configure"
12456 #include "confdefs.h"
12458 /* Override any gcc2 internal prototype to avoid an error. */
12462 /* We use char because int might match the return type of a gcc2
12463 builtin and then its argument prototype would still apply. */
12464 char gethostbyname ();
12473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12474 if { (eval echo "$as_me:12474: \"$ac_link\"") >&5
12475 (eval $ac_link) 2>&5
12477 echo "$as_me:12477: \$? = $ac_status" >&5
12478 (exit "$ac_status"); } &&
12479 { ac_try='test -s "conftest$ac_exeext"'
12480 { (eval echo "$as_me:12480: \"$ac_try\"") >&5
12481 (eval $ac_try) 2>&5
12483 echo "$as_me:12483: \$? = $ac_status" >&5
12484 (exit "$ac_status"); }; }; then
12485 ac_cv_lib_bsd_gethostbyname=yes
12487 echo "$as_me: failed program was:" >&5
12488 cat "conftest.$ac_ext" >&5
12489 ac_cv_lib_bsd_gethostbyname=no
12491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12492 LIBS=$ac_check_lib_save_LIBS
12494 echo "$as_me:12494: result: $ac_cv_lib_bsd_gethostbyname" >&5
12495 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12496 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12497 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12503 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12504 # socket/setsockopt and other routines are undefined under SCO ODT
12505 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12506 # on later versions), says Simon Leinen: it contains gethostby*
12507 # variants that don't use the nameserver (or something). -lsocket
12508 # must be given before -lnsl if both are needed. We assume that
12509 # if connect needs -lnsl, so does gethostbyname.
12510 echo "$as_me:12510: checking for connect" >&5
12511 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12512 if test "${ac_cv_func_connect+set}" = set; then
12513 echo $ECHO_N "(cached) $ECHO_C" >&6
12515 cat >"conftest.$ac_ext" <<_ACEOF
12516 #line 12516 "configure"
12517 #include "confdefs.h"
12518 #define connect autoconf_temporary
12519 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12526 /* We use char because int might match the return type of a gcc2
12527 builtin and then its argument prototype would still apply. */
12528 char connect (void);
12534 /* The GNU C library defines stubs for functions which it implements
12535 to always fail with ENOSYS. Some functions are actually named
12536 something starting with __ and the normal name is an alias. */
12537 #if defined (__stub_connect) || defined (__stub___connect)
12538 #error found stub for connect
12546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12547 if { (eval echo "$as_me:12547: \"$ac_link\"") >&5
12548 (eval $ac_link) 2>&5
12550 echo "$as_me:12550: \$? = $ac_status" >&5
12551 (exit "$ac_status"); } &&
12552 { ac_try='test -s "conftest$ac_exeext"'
12553 { (eval echo "$as_me:12553: \"$ac_try\"") >&5
12554 (eval $ac_try) 2>&5
12556 echo "$as_me:12556: \$? = $ac_status" >&5
12557 (exit "$ac_status"); }; }; then
12558 ac_cv_func_connect=yes
12560 echo "$as_me: failed program was:" >&5
12561 cat "conftest.$ac_ext" >&5
12562 ac_cv_func_connect=no
12564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12566 echo "$as_me:12566: result: $ac_cv_func_connect" >&5
12567 echo "${ECHO_T}$ac_cv_func_connect" >&6
12569 if test $ac_cv_func_connect = no; then
12570 echo "$as_me:12570: checking for connect in -lsocket" >&5
12571 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12572 if test "${ac_cv_lib_socket_connect+set}" = set; then
12573 echo $ECHO_N "(cached) $ECHO_C" >&6
12575 ac_check_lib_save_LIBS=$LIBS
12576 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12577 cat >"conftest.$ac_ext" <<_ACEOF
12578 #line 12578 "configure"
12579 #include "confdefs.h"
12581 /* Override any gcc2 internal prototype to avoid an error. */
12585 /* We use char because int might match the return type of a gcc2
12586 builtin and then its argument prototype would still apply. */
12596 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12597 if { (eval echo "$as_me:12597: \"$ac_link\"") >&5
12598 (eval $ac_link) 2>&5
12600 echo "$as_me:12600: \$? = $ac_status" >&5
12601 (exit "$ac_status"); } &&
12602 { ac_try='test -s "conftest$ac_exeext"'
12603 { (eval echo "$as_me:12603: \"$ac_try\"") >&5
12604 (eval $ac_try) 2>&5
12606 echo "$as_me:12606: \$? = $ac_status" >&5
12607 (exit "$ac_status"); }; }; then
12608 ac_cv_lib_socket_connect=yes
12610 echo "$as_me: failed program was:" >&5
12611 cat "conftest.$ac_ext" >&5
12612 ac_cv_lib_socket_connect=no
12614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12615 LIBS=$ac_check_lib_save_LIBS
12617 echo "$as_me:12617: result: $ac_cv_lib_socket_connect" >&5
12618 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12619 if test "$ac_cv_lib_socket_connect" = yes; then
12620 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12625 # Guillermo Gomez says -lposix is necessary on A/UX.
12626 echo "$as_me:12626: checking for remove" >&5
12627 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12628 if test "${ac_cv_func_remove+set}" = set; then
12629 echo $ECHO_N "(cached) $ECHO_C" >&6
12631 cat >"conftest.$ac_ext" <<_ACEOF
12632 #line 12632 "configure"
12633 #include "confdefs.h"
12634 #define remove autoconf_temporary
12635 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12642 /* We use char because int might match the return type of a gcc2
12643 builtin and then its argument prototype would still apply. */
12644 char remove (void);
12650 /* The GNU C library defines stubs for functions which it implements
12651 to always fail with ENOSYS. Some functions are actually named
12652 something starting with __ and the normal name is an alias. */
12653 #if defined (__stub_remove) || defined (__stub___remove)
12654 #error found stub for remove
12662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12663 if { (eval echo "$as_me:12663: \"$ac_link\"") >&5
12664 (eval $ac_link) 2>&5
12666 echo "$as_me:12666: \$? = $ac_status" >&5
12667 (exit "$ac_status"); } &&
12668 { ac_try='test -s "conftest$ac_exeext"'
12669 { (eval echo "$as_me:12669: \"$ac_try\"") >&5
12670 (eval $ac_try) 2>&5
12672 echo "$as_me:12672: \$? = $ac_status" >&5
12673 (exit "$ac_status"); }; }; then
12674 ac_cv_func_remove=yes
12676 echo "$as_me: failed program was:" >&5
12677 cat "conftest.$ac_ext" >&5
12678 ac_cv_func_remove=no
12680 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12682 echo "$as_me:12682: result: $ac_cv_func_remove" >&5
12683 echo "${ECHO_T}$ac_cv_func_remove" >&6
12685 if test $ac_cv_func_remove = no; then
12686 echo "$as_me:12686: checking for remove in -lposix" >&5
12687 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12688 if test "${ac_cv_lib_posix_remove+set}" = set; then
12689 echo $ECHO_N "(cached) $ECHO_C" >&6
12691 ac_check_lib_save_LIBS=$LIBS
12692 LIBS="-lposix $LIBS"
12693 cat >"conftest.$ac_ext" <<_ACEOF
12694 #line 12694 "configure"
12695 #include "confdefs.h"
12697 /* Override any gcc2 internal prototype to avoid an error. */
12701 /* We use char because int might match the return type of a gcc2
12702 builtin and then its argument prototype would still apply. */
12712 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12713 if { (eval echo "$as_me:12713: \"$ac_link\"") >&5
12714 (eval $ac_link) 2>&5
12716 echo "$as_me:12716: \$? = $ac_status" >&5
12717 (exit "$ac_status"); } &&
12718 { ac_try='test -s "conftest$ac_exeext"'
12719 { (eval echo "$as_me:12719: \"$ac_try\"") >&5
12720 (eval $ac_try) 2>&5
12722 echo "$as_me:12722: \$? = $ac_status" >&5
12723 (exit "$ac_status"); }; }; then
12724 ac_cv_lib_posix_remove=yes
12726 echo "$as_me: failed program was:" >&5
12727 cat "conftest.$ac_ext" >&5
12728 ac_cv_lib_posix_remove=no
12730 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12731 LIBS=$ac_check_lib_save_LIBS
12733 echo "$as_me:12733: result: $ac_cv_lib_posix_remove" >&5
12734 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12735 if test "$ac_cv_lib_posix_remove" = yes; then
12736 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12741 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12742 echo "$as_me:12742: checking for shmat" >&5
12743 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12744 if test "${ac_cv_func_shmat+set}" = set; then
12745 echo $ECHO_N "(cached) $ECHO_C" >&6
12747 cat >"conftest.$ac_ext" <<_ACEOF
12748 #line 12748 "configure"
12749 #include "confdefs.h"
12750 #define shmat autoconf_temporary
12751 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12758 /* We use char because int might match the return type of a gcc2
12759 builtin and then its argument prototype would still apply. */
12766 /* The GNU C library defines stubs for functions which it implements
12767 to always fail with ENOSYS. Some functions are actually named
12768 something starting with __ and the normal name is an alias. */
12769 #if defined (__stub_shmat) || defined (__stub___shmat)
12770 #error found stub for shmat
12778 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12779 if { (eval echo "$as_me:12779: \"$ac_link\"") >&5
12780 (eval $ac_link) 2>&5
12782 echo "$as_me:12782: \$? = $ac_status" >&5
12783 (exit "$ac_status"); } &&
12784 { ac_try='test -s "conftest$ac_exeext"'
12785 { (eval echo "$as_me:12785: \"$ac_try\"") >&5
12786 (eval $ac_try) 2>&5
12788 echo "$as_me:12788: \$? = $ac_status" >&5
12789 (exit "$ac_status"); }; }; then
12790 ac_cv_func_shmat=yes
12792 echo "$as_me: failed program was:" >&5
12793 cat "conftest.$ac_ext" >&5
12794 ac_cv_func_shmat=no
12796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12798 echo "$as_me:12798: result: $ac_cv_func_shmat" >&5
12799 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12801 if test $ac_cv_func_shmat = no; then
12802 echo "$as_me:12802: checking for shmat in -lipc" >&5
12803 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12804 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12805 echo $ECHO_N "(cached) $ECHO_C" >&6
12807 ac_check_lib_save_LIBS=$LIBS
12809 cat >"conftest.$ac_ext" <<_ACEOF
12810 #line 12810 "configure"
12811 #include "confdefs.h"
12813 /* Override any gcc2 internal prototype to avoid an error. */
12817 /* We use char because int might match the return type of a gcc2
12818 builtin and then its argument prototype would still apply. */
12828 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12829 if { (eval echo "$as_me:12829: \"$ac_link\"") >&5
12830 (eval $ac_link) 2>&5
12832 echo "$as_me:12832: \$? = $ac_status" >&5
12833 (exit "$ac_status"); } &&
12834 { ac_try='test -s "conftest$ac_exeext"'
12835 { (eval echo "$as_me:12835: \"$ac_try\"") >&5
12836 (eval $ac_try) 2>&5
12838 echo "$as_me:12838: \$? = $ac_status" >&5
12839 (exit "$ac_status"); }; }; then
12840 ac_cv_lib_ipc_shmat=yes
12842 echo "$as_me: failed program was:" >&5
12843 cat "conftest.$ac_ext" >&5
12844 ac_cv_lib_ipc_shmat=no
12846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12847 LIBS=$ac_check_lib_save_LIBS
12849 echo "$as_me:12849: result: $ac_cv_lib_ipc_shmat" >&5
12850 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12851 if test "$ac_cv_lib_ipc_shmat" = yes; then
12852 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12858 # Check for libraries that X11R6 Xt/Xaw programs need.
12859 ac_save_LDFLAGS=$LDFLAGS
12860 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12861 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12862 # check for ICE first), but we must link in the order -lSM -lICE or
12863 # we get undefined symbols. So assume we have SM if we have ICE.
12864 # These have to be linked with before -lX11, unlike the other
12865 # libraries we check for below, so use a different variable.
12866 # John Interrante, Karl Berry
12867 echo "$as_me:12867: checking for IceConnectionNumber in -lICE" >&5
12868 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12869 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12870 echo $ECHO_N "(cached) $ECHO_C" >&6
12872 ac_check_lib_save_LIBS=$LIBS
12873 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12874 cat >"conftest.$ac_ext" <<_ACEOF
12875 #line 12875 "configure"
12876 #include "confdefs.h"
12878 /* Override any gcc2 internal prototype to avoid an error. */
12882 /* We use char because int might match the return type of a gcc2
12883 builtin and then its argument prototype would still apply. */
12884 char IceConnectionNumber ();
12888 IceConnectionNumber ();
12893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12894 if { (eval echo "$as_me:12894: \"$ac_link\"") >&5
12895 (eval $ac_link) 2>&5
12897 echo "$as_me:12897: \$? = $ac_status" >&5
12898 (exit "$ac_status"); } &&
12899 { ac_try='test -s "conftest$ac_exeext"'
12900 { (eval echo "$as_me:12900: \"$ac_try\"") >&5
12901 (eval $ac_try) 2>&5
12903 echo "$as_me:12903: \$? = $ac_status" >&5
12904 (exit "$ac_status"); }; }; then
12905 ac_cv_lib_ICE_IceConnectionNumber=yes
12907 echo "$as_me: failed program was:" >&5
12908 cat "conftest.$ac_ext" >&5
12909 ac_cv_lib_ICE_IceConnectionNumber=no
12911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12912 LIBS=$ac_check_lib_save_LIBS
12914 echo "$as_me:12914: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12915 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12916 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
12917 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12920 LDFLAGS=$ac_save_LDFLAGS
12924 cf_x_athena=${cf_x_athena:-Xaw}
12926 echo "$as_me:12926: checking if you want to link with Xaw 3d library" >&5
12927 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12930 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12931 if test "${with_Xaw3d+set}" = set; then
12932 withval="$with_Xaw3d"
12935 if test "$withval" = yes ; then
12937 echo "$as_me:12937: result: yes" >&5
12938 echo "${ECHO_T}yes" >&6
12940 echo "$as_me:12940: result: no" >&5
12941 echo "${ECHO_T}no" >&6
12944 echo "$as_me:12944: checking if you want to link with Xaw 3d xft library" >&5
12945 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12948 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12949 if test "${with_Xaw3dxft+set}" = set; then
12950 withval="$with_Xaw3dxft"
12953 if test "$withval" = yes ; then
12954 cf_x_athena=Xaw3dxft
12955 echo "$as_me:12955: result: yes" >&5
12956 echo "${ECHO_T}yes" >&6
12958 echo "$as_me:12958: result: no" >&5
12959 echo "${ECHO_T}no" >&6
12962 echo "$as_me:12962: checking if you want to link with neXT Athena library" >&5
12963 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12966 # Check whether --with-neXtaw or --without-neXtaw was given.
12967 if test "${with_neXtaw+set}" = set; then
12968 withval="$with_neXtaw"
12971 if test "$withval" = yes ; then
12973 echo "$as_me:12973: result: yes" >&5
12974 echo "${ECHO_T}yes" >&6
12976 echo "$as_me:12976: result: no" >&5
12977 echo "${ECHO_T}no" >&6
12980 echo "$as_me:12980: checking if you want to link with Athena-Plus library" >&5
12981 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12984 # Check whether --with-XawPlus or --without-XawPlus was given.
12985 if test "${with_XawPlus+set}" = set; then
12986 withval="$with_XawPlus"
12989 if test "$withval" = yes ; then
12990 cf_x_athena=XawPlus
12991 echo "$as_me:12991: result: yes" >&5
12992 echo "${ECHO_T}yes" >&6
12994 echo "$as_me:12994: result: no" >&5
12995 echo "${ECHO_T}no" >&6
13000 if test "$PKG_CONFIG" != none ; then
13002 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13003 for cf_athena_pkg in \
13006 ${cf_x_athena}-devel \
13007 lib${cf_x_athena} \
13008 lib${cf_x_athena}-devel
13011 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13012 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13014 echo "${as_me:-configure}:13014: testing found package $cf_athena_pkg ..." 1>&5
13016 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13017 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13018 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13020 echo "${as_me:-configure}:13020: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13022 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13024 echo "${as_me:-configure}:13024: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13029 cf_new_extra_cppflags=
13031 for cf_add_cflags in $cf_pkgconfig_incs
13033 case "$cf_fix_cppflags" in
13035 case "$cf_add_cflags" in
13036 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13037 case "$cf_add_cflags" in
13039 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13041 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13042 && test -z "${cf_tst_cflags}" \
13043 && cf_fix_cppflags=yes
13045 if test "$cf_fix_cppflags" = yes ; then
13047 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13048 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13051 elif test "${cf_tst_cflags}" = "\"'" ; then
13053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13060 case "$CPPFLAGS" in
13064 case "$cf_add_cflags" in
13066 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13068 CPPFLAGS=`echo "$CPPFLAGS" | \
13069 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13070 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13075 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13076 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13083 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13084 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13094 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13097 && test -z "${cf_tst_cflags}" \
13098 && cf_fix_cppflags=no
13103 if test -n "$cf_new_cflags" ; then
13105 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13106 CFLAGS="${CFLAGS}$cf_new_cflags"
13110 if test -n "$cf_new_cppflags" ; then
13112 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13113 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13117 if test -n "$cf_new_extra_cppflags" ; then
13119 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13120 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13124 cf_add_libs="$LIBS"
13127 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13128 # filter duplicates
13129 for cf_add_1lib in $cf_add_0lib; do
13130 for cf_add_2lib in $cf_add_libs; do
13131 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13136 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13138 LIBS="$cf_add_libs"
13140 cf_x_athena_lib="$cf_pkgconfig_libs"
13142 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13144 cat >>confdefs.h <<EOF
13145 #define $cf_x_athena_LIBS 1
13148 for cf_trim_lib in Xmu Xt X11
13151 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13152 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13153 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13155 echo "${as_me:-configure}:13155: testing ..trimmed $LIBS ..." 1>&5
13161 echo "$as_me:13161: checking for usable $cf_x_athena/Xmu package" >&5
13162 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13163 if test "${cf_cv_xaw_compat+set}" = set; then
13164 echo $ECHO_N "(cached) $ECHO_C" >&6
13167 cat >"conftest.$ac_ext" <<_ACEOF
13168 #line 13168 "configure"
13169 #include "confdefs.h"
13171 #include <X11/Xmu/CharSet.h>
13177 int check = XmuCompareISOLatin1("big", "small");
13184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13185 if { (eval echo "$as_me:13185: \"$ac_link\"") >&5
13186 (eval $ac_link) 2>&5
13188 echo "$as_me:13188: \$? = $ac_status" >&5
13189 (exit "$ac_status"); } &&
13190 { ac_try='test -s "conftest$ac_exeext"'
13191 { (eval echo "$as_me:13191: \"$ac_try\"") >&5
13192 (eval $ac_try) 2>&5
13194 echo "$as_me:13194: \$? = $ac_status" >&5
13195 (exit "$ac_status"); }; }; then
13196 cf_cv_xaw_compat=yes
13198 echo "$as_me: failed program was:" >&5
13199 cat "conftest.$ac_ext" >&5
13200 cf_cv_xaw_compat=no
13202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13204 echo "$as_me:13204: result: $cf_cv_xaw_compat" >&5
13205 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13207 if test "$cf_cv_xaw_compat" = no
13209 # workaround for broken ".pc" files...
13210 case "$cf_x_athena_lib" in
13214 test -n "$verbose" && echo " work around broken package" 1>&6
13216 echo "${as_me:-configure}:13216: testing work around broken package ..." 1>&5
13218 cf_save_xmu="$LIBS"
13219 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13221 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13222 test -n "$verbose" && echo " found package xmu" 1>&6
13224 echo "${as_me:-configure}:13224: testing found package xmu ..." 1>&5
13226 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13227 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13228 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13230 echo "${as_me:-configure}:13230: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13232 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13234 echo "${as_me:-configure}:13234: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13239 cf_new_extra_cppflags=
13241 for cf_add_cflags in $cf_pkgconfig_incs
13243 case "$cf_fix_cppflags" in
13245 case "$cf_add_cflags" in
13246 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13247 case "$cf_add_cflags" in
13249 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13251 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13252 && test -z "${cf_tst_cflags}" \
13253 && cf_fix_cppflags=yes
13255 if test "$cf_fix_cppflags" = yes ; then
13257 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13258 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13261 elif test "${cf_tst_cflags}" = "\"'" ; then
13263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13270 case "$CPPFLAGS" in
13274 case "$cf_add_cflags" in
13276 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13278 CPPFLAGS=`echo "$CPPFLAGS" | \
13279 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13280 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13285 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13286 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13293 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13294 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13304 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13306 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13307 && test -z "${cf_tst_cflags}" \
13308 && cf_fix_cppflags=no
13313 if test -n "$cf_new_cflags" ; then
13315 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13316 CFLAGS="${CFLAGS}$cf_new_cflags"
13320 if test -n "$cf_new_cppflags" ; then
13322 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13323 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13327 if test -n "$cf_new_extra_cppflags" ; then
13329 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13330 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13334 cf_add_libs="$LIBS"
13337 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13338 # filter duplicates
13339 for cf_add_1lib in $cf_add_0lib; do
13340 for cf_add_2lib in $cf_add_libs; do
13341 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13346 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13348 LIBS="$cf_add_libs"
13350 LIBS="$cf_save_xmu"
13352 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13354 echo "${as_me:-configure}:13354: testing ...before $LIBS ..." 1>&5
13356 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13357 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13359 echo "${as_me:-configure}:13359: testing ...after $LIBS ..." 1>&5
13365 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13367 echo "${as_me:-configure}:13367: testing ...before $LIBS ..." 1>&5
13369 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13370 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13372 echo "${as_me:-configure}:13372: testing ...after $LIBS ..." 1>&5
13376 for cf_trim_lib in Xmu Xt X11
13379 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13380 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13381 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13383 echo "${as_me:-configure}:13383: testing ..trimmed $LIBS ..." 1>&5
13403 if test -z "$cf_x_athena_lib" ; then
13405 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13406 test -n "$verbose" && echo " found package Xext" 1>&6
13408 echo "${as_me:-configure}:13408: testing found package Xext ..." 1>&5
13410 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13411 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13412 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13414 echo "${as_me:-configure}:13414: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13416 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13418 echo "${as_me:-configure}:13418: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13423 cf_new_extra_cppflags=
13425 for cf_add_cflags in $cf_pkgconfig_incs
13427 case "$cf_fix_cppflags" in
13429 case "$cf_add_cflags" in
13430 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13431 case "$cf_add_cflags" in
13433 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13435 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13436 && test -z "${cf_tst_cflags}" \
13437 && cf_fix_cppflags=yes
13439 if test "$cf_fix_cppflags" = yes ; then
13441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13445 elif test "${cf_tst_cflags}" = "\"'" ; then
13447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13454 case "$CPPFLAGS" in
13458 case "$cf_add_cflags" in
13460 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13462 CPPFLAGS=`echo "$CPPFLAGS" | \
13463 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13464 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13469 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13470 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13477 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13478 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13485 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13486 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13488 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13491 && test -z "${cf_tst_cflags}" \
13492 && cf_fix_cppflags=no
13497 if test -n "$cf_new_cflags" ; then
13499 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13500 CFLAGS="${CFLAGS}$cf_new_cflags"
13504 if test -n "$cf_new_cppflags" ; then
13506 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13507 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13511 if test -n "$cf_new_extra_cppflags" ; then
13513 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13514 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13518 cf_add_libs="$LIBS"
13521 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13522 # filter duplicates
13523 for cf_add_1lib in $cf_add_0lib; do
13524 for cf_add_2lib in $cf_add_libs; do
13525 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13530 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13532 LIBS="$cf_add_libs"
13539 echo "$as_me:13539: checking for XextCreateExtension in -lXext" >&5
13540 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13541 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13542 echo $ECHO_N "(cached) $ECHO_C" >&6
13544 ac_check_lib_save_LIBS=$LIBS
13545 LIBS="-lXext $LIBS"
13546 cat >"conftest.$ac_ext" <<_ACEOF
13547 #line 13547 "configure"
13548 #include "confdefs.h"
13550 /* Override any gcc2 internal prototype to avoid an error. */
13554 /* We use char because int might match the return type of a gcc2
13555 builtin and then its argument prototype would still apply. */
13556 char XextCreateExtension ();
13560 XextCreateExtension ();
13565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13566 if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13567 (eval $ac_link) 2>&5
13569 echo "$as_me:13569: \$? = $ac_status" >&5
13570 (exit "$ac_status"); } &&
13571 { ac_try='test -s "conftest$ac_exeext"'
13572 { (eval echo "$as_me:13572: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit "$ac_status"); }; }; then
13577 ac_cv_lib_Xext_XextCreateExtension=yes
13579 echo "$as_me: failed program was:" >&5
13580 cat "conftest.$ac_ext" >&5
13581 ac_cv_lib_Xext_XextCreateExtension=no
13583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13584 LIBS=$ac_check_lib_save_LIBS
13586 echo "$as_me:13586: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13587 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13588 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13590 cf_add_libs="$LIBS"
13593 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13594 # filter duplicates
13595 for cf_add_1lib in $cf_add_0lib; do
13596 for cf_add_2lib in $cf_add_libs; do
13597 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13602 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13604 LIBS="$cf_add_libs"
13610 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13611 # in some cases has installed dummy files in the former, other cases replaced
13612 # it with a link to the new location). This complicates the configure script.
13613 # Check for that pitfall, and recover using pkg-config
13615 # If none of these are set, the configuration is almost certainly broken.
13616 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13619 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13620 test -n "$verbose" && echo " found package x11" 1>&6
13622 echo "${as_me:-configure}:13622: testing found package x11 ..." 1>&5
13624 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13625 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13626 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13628 echo "${as_me:-configure}:13628: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13630 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13632 echo "${as_me:-configure}:13632: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13637 cf_new_extra_cppflags=
13639 for cf_add_cflags in $cf_pkgconfig_incs
13641 case "$cf_fix_cppflags" in
13643 case "$cf_add_cflags" in
13644 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13645 case "$cf_add_cflags" in
13647 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13649 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13650 && test -z "${cf_tst_cflags}" \
13651 && cf_fix_cppflags=yes
13653 if test "$cf_fix_cppflags" = yes ; then
13655 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13656 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13659 elif test "${cf_tst_cflags}" = "\"'" ; then
13661 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13662 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13668 case "$CPPFLAGS" in
13672 case "$cf_add_cflags" in
13674 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13676 CPPFLAGS=`echo "$CPPFLAGS" | \
13677 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13678 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13683 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13684 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13691 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13692 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13699 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13700 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13702 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13704 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13705 && test -z "${cf_tst_cflags}" \
13706 && cf_fix_cppflags=no
13711 if test -n "$cf_new_cflags" ; then
13713 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13714 CFLAGS="${CFLAGS}$cf_new_cflags"
13718 if test -n "$cf_new_cppflags" ; then
13720 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13721 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13725 if test -n "$cf_new_extra_cppflags" ; then
13727 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13728 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13732 cf_add_libs="$LIBS"
13735 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13736 # filter duplicates
13737 for cf_add_1lib in $cf_add_0lib; do
13738 for cf_add_2lib in $cf_add_libs; do
13739 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13744 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13746 LIBS="$cf_add_libs"
13752 { echo "$as_me:13752: WARNING: unable to find X11 library" >&5
13753 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13756 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13757 test -n "$verbose" && echo " found package ice" 1>&6
13759 echo "${as_me:-configure}:13759: testing found package ice ..." 1>&5
13761 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13762 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13763 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13765 echo "${as_me:-configure}:13765: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13767 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13769 echo "${as_me:-configure}:13769: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13774 cf_new_extra_cppflags=
13776 for cf_add_cflags in $cf_pkgconfig_incs
13778 case "$cf_fix_cppflags" in
13780 case "$cf_add_cflags" in
13781 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13782 case "$cf_add_cflags" in
13784 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13786 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13787 && test -z "${cf_tst_cflags}" \
13788 && cf_fix_cppflags=yes
13790 if test "$cf_fix_cppflags" = yes ; 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"
13796 elif test "${cf_tst_cflags}" = "\"'" ; then
13798 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13799 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13805 case "$CPPFLAGS" in
13809 case "$cf_add_cflags" in
13811 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13813 CPPFLAGS=`echo "$CPPFLAGS" | \
13814 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13815 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13820 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13821 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13828 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13829 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13836 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13837 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13839 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13841 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13842 && test -z "${cf_tst_cflags}" \
13843 && cf_fix_cppflags=no
13848 if test -n "$cf_new_cflags" ; then
13850 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13851 CFLAGS="${CFLAGS}$cf_new_cflags"
13855 if test -n "$cf_new_cppflags" ; then
13857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13858 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13862 if test -n "$cf_new_extra_cppflags" ; then
13864 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13865 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13869 cf_add_libs="$LIBS"
13872 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13873 # filter duplicates
13874 for cf_add_1lib in $cf_add_0lib; do
13875 for cf_add_2lib in $cf_add_libs; do
13876 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13881 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13883 LIBS="$cf_add_libs"
13889 { echo "$as_me:13889: WARNING: unable to find ICE library" >&5
13890 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13893 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13894 test -n "$verbose" && echo " found package sm" 1>&6
13896 echo "${as_me:-configure}:13896: testing found package sm ..." 1>&5
13898 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13899 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
13900 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13902 echo "${as_me:-configure}:13902: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13904 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13906 echo "${as_me:-configure}:13906: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13911 cf_new_extra_cppflags=
13913 for cf_add_cflags in $cf_pkgconfig_incs
13915 case "$cf_fix_cppflags" in
13917 case "$cf_add_cflags" in
13918 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13919 case "$cf_add_cflags" in
13921 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13923 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13924 && test -z "${cf_tst_cflags}" \
13925 && cf_fix_cppflags=yes
13927 if test "$cf_fix_cppflags" = yes ; then
13929 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13930 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13933 elif test "${cf_tst_cflags}" = "\"'" ; then
13935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13942 case "$CPPFLAGS" in
13946 case "$cf_add_cflags" in
13948 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13950 CPPFLAGS=`echo "$CPPFLAGS" | \
13951 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13952 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13957 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13958 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13965 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13966 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13973 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13974 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13976 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13978 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13979 && test -z "${cf_tst_cflags}" \
13980 && cf_fix_cppflags=no
13985 if test -n "$cf_new_cflags" ; then
13987 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13988 CFLAGS="${CFLAGS}$cf_new_cflags"
13992 if test -n "$cf_new_cppflags" ; then
13994 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13995 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13999 if test -n "$cf_new_extra_cppflags" ; then
14001 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14002 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14006 cf_add_libs="$LIBS"
14009 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14010 # filter duplicates
14011 for cf_add_1lib in $cf_add_0lib; do
14012 for cf_add_2lib in $cf_add_libs; do
14013 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14018 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14020 LIBS="$cf_add_libs"
14026 { echo "$as_me:14026: WARNING: unable to find SM library" >&5
14027 echo "$as_me: WARNING: unable to find SM library" >&2;}
14030 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14031 test -n "$verbose" && echo " found package xt" 1>&6
14033 echo "${as_me:-configure}:14033: testing found package xt ..." 1>&5
14035 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14036 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14037 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14039 echo "${as_me:-configure}:14039: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14041 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14043 echo "${as_me:-configure}:14043: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14048 cf_new_extra_cppflags=
14050 for cf_add_cflags in $cf_pkgconfig_incs
14052 case "$cf_fix_cppflags" in
14054 case "$cf_add_cflags" in
14055 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14056 case "$cf_add_cflags" in
14058 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14060 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14061 && test -z "${cf_tst_cflags}" \
14062 && cf_fix_cppflags=yes
14064 if test "$cf_fix_cppflags" = yes ; then
14066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14070 elif test "${cf_tst_cflags}" = "\"'" ; then
14072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14079 case "$CPPFLAGS" in
14083 case "$cf_add_cflags" in
14085 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14087 CPPFLAGS=`echo "$CPPFLAGS" | \
14088 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14089 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14094 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14095 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14102 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14103 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14113 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14115 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14116 && test -z "${cf_tst_cflags}" \
14117 && cf_fix_cppflags=no
14122 if test -n "$cf_new_cflags" ; then
14124 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14125 CFLAGS="${CFLAGS}$cf_new_cflags"
14129 if test -n "$cf_new_cppflags" ; then
14131 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14132 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14136 if test -n "$cf_new_extra_cppflags" ; then
14138 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14139 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14143 cf_add_libs="$LIBS"
14146 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14147 # filter duplicates
14148 for cf_add_1lib in $cf_add_0lib; do
14149 for cf_add_2lib in $cf_add_libs; do
14150 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14155 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14157 LIBS="$cf_add_libs"
14163 { echo "$as_me:14163: WARNING: unable to find Xt library" >&5
14164 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14168 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14173 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14174 test -n "$verbose" && echo " found package xt" 1>&6
14176 echo "${as_me:-configure}:14176: testing found package xt ..." 1>&5
14178 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14179 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14180 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14182 echo "${as_me:-configure}:14182: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14184 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14186 echo "${as_me:-configure}:14186: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14191 cf_new_extra_cppflags=
14193 for cf_add_cflags in $cf_pkgconfig_incs
14195 case "$cf_fix_cppflags" in
14197 case "$cf_add_cflags" in
14198 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14199 case "$cf_add_cflags" in
14201 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14204 && test -z "${cf_tst_cflags}" \
14205 && cf_fix_cppflags=yes
14207 if test "$cf_fix_cppflags" = yes ; then
14209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14213 elif test "${cf_tst_cflags}" = "\"'" ; then
14215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14222 case "$CPPFLAGS" in
14226 case "$cf_add_cflags" in
14228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14230 CPPFLAGS=`echo "$CPPFLAGS" | \
14231 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14232 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14237 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14238 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14245 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14246 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14253 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14254 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14256 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14259 && test -z "${cf_tst_cflags}" \
14260 && cf_fix_cppflags=no
14265 if test -n "$cf_new_cflags" ; then
14267 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14268 CFLAGS="${CFLAGS}$cf_new_cflags"
14272 if test -n "$cf_new_cppflags" ; then
14274 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14275 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14279 if test -n "$cf_new_extra_cppflags" ; then
14281 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14282 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14286 cf_add_libs="$LIBS"
14289 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14290 # filter duplicates
14291 for cf_add_1lib in $cf_add_0lib; do
14292 for cf_add_2lib in $cf_add_libs; do
14293 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14298 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14300 LIBS="$cf_add_libs"
14306 # we have an "xt" package, but it may omit Xt's dependency on X11
14307 echo "$as_me:14307: checking for usable X dependency" >&5
14308 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14309 if test "${cf_cv_xt_x11_compat+set}" = set; then
14310 echo $ECHO_N "(cached) $ECHO_C" >&6
14313 cat >"conftest.$ac_ext" <<_ACEOF
14314 #line 14314 "configure"
14315 #include "confdefs.h"
14317 #include <X11/Xlib.h>
14323 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14324 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14325 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14326 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14333 if { (eval echo "$as_me:14333: \"$ac_link\"") >&5
14334 (eval $ac_link) 2>&5
14336 echo "$as_me:14336: \$? = $ac_status" >&5
14337 (exit "$ac_status"); } &&
14338 { ac_try='test -s "conftest$ac_exeext"'
14339 { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340 (eval $ac_try) 2>&5
14342 echo "$as_me:14342: \$? = $ac_status" >&5
14343 (exit "$ac_status"); }; }; then
14344 cf_cv_xt_x11_compat=yes
14346 echo "$as_me: failed program was:" >&5
14347 cat "conftest.$ac_ext" >&5
14348 cf_cv_xt_x11_compat=no
14350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14352 echo "$as_me:14352: result: $cf_cv_xt_x11_compat" >&5
14353 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14354 if test "$cf_cv_xt_x11_compat" = no
14356 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14358 echo "${as_me:-configure}:14358: testing work around broken X11 dependency ..." 1>&5
14360 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14362 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14363 test -n "$verbose" && echo " found package x11" 1>&6
14365 echo "${as_me:-configure}:14365: testing found package x11 ..." 1>&5
14367 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14368 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14369 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14371 echo "${as_me:-configure}:14371: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14373 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14375 echo "${as_me:-configure}:14375: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14380 cf_new_extra_cppflags=
14382 for cf_add_cflags in $cf_pkgconfig_incs
14384 case "$cf_fix_cppflags" in
14386 case "$cf_add_cflags" in
14387 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14388 case "$cf_add_cflags" in
14390 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14392 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14393 && test -z "${cf_tst_cflags}" \
14394 && cf_fix_cppflags=yes
14396 if test "$cf_fix_cppflags" = yes ; then
14398 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14399 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14402 elif test "${cf_tst_cflags}" = "\"'" ; then
14404 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14405 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14411 case "$CPPFLAGS" in
14415 case "$cf_add_cflags" in
14417 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14419 CPPFLAGS=`echo "$CPPFLAGS" | \
14420 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14421 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14426 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14427 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14434 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14435 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14445 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14447 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14448 && test -z "${cf_tst_cflags}" \
14449 && cf_fix_cppflags=no
14454 if test -n "$cf_new_cflags" ; then
14456 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14457 CFLAGS="${CFLAGS}$cf_new_cflags"
14461 if test -n "$cf_new_cppflags" ; then
14463 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14464 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14468 if test -n "$cf_new_extra_cppflags" ; then
14470 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14471 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14475 cf_add_libs="$LIBS"
14478 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14479 # filter duplicates
14480 for cf_add_1lib in $cf_add_0lib; do
14481 for cf_add_2lib in $cf_add_libs; do
14482 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14487 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14489 LIBS="$cf_add_libs"
14496 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14498 echo "${as_me:-configure}:14498: testing ...before $LIBS ..." 1>&5
14500 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14501 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14503 echo "${as_me:-configure}:14503: testing ...after $LIBS ..." 1>&5
14511 echo "$as_me:14511: checking for usable X Toolkit package" >&5
14512 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14513 if test "${cf_cv_xt_ice_compat+set}" = set; then
14514 echo $ECHO_N "(cached) $ECHO_C" >&6
14517 cat >"conftest.$ac_ext" <<_ACEOF
14518 #line 14518 "configure"
14519 #include "confdefs.h"
14521 #include <X11/Shell.h>
14526 int num = IceConnectionNumber(0); (void) num
14532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14533 if { (eval echo "$as_me:14533: \"$ac_link\"") >&5
14534 (eval $ac_link) 2>&5
14536 echo "$as_me:14536: \$? = $ac_status" >&5
14537 (exit "$ac_status"); } &&
14538 { ac_try='test -s "conftest$ac_exeext"'
14539 { (eval echo "$as_me:14539: \"$ac_try\"") >&5
14540 (eval $ac_try) 2>&5
14542 echo "$as_me:14542: \$? = $ac_status" >&5
14543 (exit "$ac_status"); }; }; then
14544 cf_cv_xt_ice_compat=yes
14546 echo "$as_me: failed program was:" >&5
14547 cat "conftest.$ac_ext" >&5
14548 cf_cv_xt_ice_compat=no
14550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14552 echo "$as_me:14552: result: $cf_cv_xt_ice_compat" >&5
14553 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14555 if test "$cf_cv_xt_ice_compat" = no
14557 # workaround for broken ".pc" files used for X Toolkit.
14558 case "x$X_PRE_LIBS" in
14564 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14566 echo "${as_me:-configure}:14566: testing work around broken ICE dependency ..." 1>&5
14568 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14569 test -n "$verbose" && echo " found package ice" 1>&6
14571 echo "${as_me:-configure}:14571: testing found package ice ..." 1>&5
14573 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14574 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14575 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14577 echo "${as_me:-configure}:14577: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14579 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14581 echo "${as_me:-configure}:14581: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14586 cf_new_extra_cppflags=
14588 for cf_add_cflags in $cf_pkgconfig_incs
14590 case "$cf_fix_cppflags" in
14592 case "$cf_add_cflags" in
14593 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14594 case "$cf_add_cflags" in
14596 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14598 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14599 && test -z "${cf_tst_cflags}" \
14600 && cf_fix_cppflags=yes
14602 if test "$cf_fix_cppflags" = yes ; then
14604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14608 elif test "${cf_tst_cflags}" = "\"'" ; then
14610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14617 case "$CPPFLAGS" in
14621 case "$cf_add_cflags" in
14623 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14625 CPPFLAGS=`echo "$CPPFLAGS" | \
14626 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14627 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14632 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14633 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14640 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14641 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14648 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14649 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14651 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14653 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14654 && test -z "${cf_tst_cflags}" \
14655 && cf_fix_cppflags=no
14660 if test -n "$cf_new_cflags" ; then
14662 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14663 CFLAGS="${CFLAGS}$cf_new_cflags"
14667 if test -n "$cf_new_cppflags" ; then
14669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14670 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14674 if test -n "$cf_new_extra_cppflags" ; then
14676 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14677 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14681 cf_add_libs="$LIBS"
14684 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14685 # filter duplicates
14686 for cf_add_1lib in $cf_add_0lib; do
14687 for cf_add_2lib in $cf_add_libs; do
14688 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14693 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14695 LIBS="$cf_add_libs"
14697 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14698 test -n "$verbose" && echo " found package sm" 1>&6
14700 echo "${as_me:-configure}:14700: testing found package sm ..." 1>&5
14702 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14703 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14704 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14706 echo "${as_me:-configure}:14706: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14708 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14710 echo "${as_me:-configure}:14710: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14715 cf_new_extra_cppflags=
14717 for cf_add_cflags in $cf_pkgconfig_incs
14719 case "$cf_fix_cppflags" in
14721 case "$cf_add_cflags" in
14722 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14723 case "$cf_add_cflags" in
14725 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14727 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14728 && test -z "${cf_tst_cflags}" \
14729 && cf_fix_cppflags=yes
14731 if test "$cf_fix_cppflags" = yes ; then
14733 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14734 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14737 elif test "${cf_tst_cflags}" = "\"'" ; then
14739 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14740 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14746 case "$CPPFLAGS" in
14750 case "$cf_add_cflags" in
14752 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14754 CPPFLAGS=`echo "$CPPFLAGS" | \
14755 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14756 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14761 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14762 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14769 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14770 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14777 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14778 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14780 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14782 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14783 && test -z "${cf_tst_cflags}" \
14784 && cf_fix_cppflags=no
14789 if test -n "$cf_new_cflags" ; then
14791 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14792 CFLAGS="${CFLAGS}$cf_new_cflags"
14796 if test -n "$cf_new_cppflags" ; then
14798 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14799 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14803 if test -n "$cf_new_extra_cppflags" ; then
14805 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14806 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14810 cf_add_libs="$LIBS"
14813 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14814 # filter duplicates
14815 for cf_add_1lib in $cf_add_0lib; do
14816 for cf_add_2lib in $cf_add_libs; do
14817 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14822 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14824 LIBS="$cf_add_libs"
14837 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14839 echo "${as_me:-configure}:14839: testing ...before $LIBS ..." 1>&5
14841 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14842 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14844 echo "${as_me:-configure}:14844: testing ...after $LIBS ..." 1>&5
14860 LDFLAGS="$X_LIBS $LDFLAGS"
14862 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14864 echo "${as_me:-configure}:14864: testing checking additions to CFLAGS ..." 1>&5
14866 cf_check_cflags="$CFLAGS"
14867 cf_check_cppflags="$CPPFLAGS"
14872 cf_new_extra_cppflags=
14874 for cf_add_cflags in $X_CFLAGS
14876 case "$cf_fix_cppflags" in
14878 case "$cf_add_cflags" in
14879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14880 case "$cf_add_cflags" in
14882 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14885 && test -z "${cf_tst_cflags}" \
14886 && cf_fix_cppflags=yes
14888 if test "$cf_fix_cppflags" = yes ; then
14890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14894 elif test "${cf_tst_cflags}" = "\"'" ; then
14896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14903 case "$CPPFLAGS" in
14907 case "$cf_add_cflags" in
14909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14911 CPPFLAGS=`echo "$CPPFLAGS" | \
14912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14937 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14940 && test -z "${cf_tst_cflags}" \
14941 && cf_fix_cppflags=no
14946 if test -n "$cf_new_cflags" ; then
14947 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14949 echo "${as_me:-configure}:14949: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14951 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14952 CFLAGS="${CFLAGS}$cf_new_cflags"
14956 if test -n "$cf_new_cppflags" ; then
14957 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14959 echo "${as_me:-configure}:14959: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14961 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14962 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14966 if test -n "$cf_new_extra_cppflags" ; then
14967 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14969 echo "${as_me:-configure}:14969: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14971 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14972 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14976 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14977 cat >"conftest.$ac_ext" <<_ACEOF
14978 #line 14978 "configure"
14979 #include "confdefs.h"
14984 printf("Hello world");
14989 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14990 if { (eval echo "$as_me:14990: \"$ac_link\"") >&5
14991 (eval $ac_link) 2>&5
14993 echo "$as_me:14993: \$? = $ac_status" >&5
14994 (exit "$ac_status"); } &&
14995 { ac_try='test -s "conftest$ac_exeext"'
14996 { (eval echo "$as_me:14996: \"$ac_try\"") >&5
14997 (eval $ac_try) 2>&5
14999 echo "$as_me:14999: \$? = $ac_status" >&5
15000 (exit "$ac_status"); }; }; then
15003 echo "$as_me: failed program was:" >&5
15004 cat "conftest.$ac_ext" >&5
15005 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15007 echo "${as_me:-configure}:15007: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15009 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15010 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15012 echo "${as_me:-configure}:15012: testing but keeping change to \$CPPFLAGS ..." 1>&5
15015 CFLAGS="$cf_check_cflags"
15017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15020 echo "$as_me:15020: checking for XOpenDisplay" >&5
15021 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15022 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15023 echo $ECHO_N "(cached) $ECHO_C" >&6
15025 cat >"conftest.$ac_ext" <<_ACEOF
15026 #line 15026 "configure"
15027 #include "confdefs.h"
15028 #define XOpenDisplay autoconf_temporary
15029 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15030 #undef XOpenDisplay
15036 /* We use char because int might match the return type of a gcc2
15037 builtin and then its argument prototype would still apply. */
15038 char XOpenDisplay (void);
15044 /* The GNU C library defines stubs for functions which it implements
15045 to always fail with ENOSYS. Some functions are actually named
15046 something starting with __ and the normal name is an alias. */
15047 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15048 #error found stub for XOpenDisplay
15051 return XOpenDisplay ();
15056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15057 if { (eval echo "$as_me:15057: \"$ac_link\"") >&5
15058 (eval $ac_link) 2>&5
15060 echo "$as_me:15060: \$? = $ac_status" >&5
15061 (exit "$ac_status"); } &&
15062 { ac_try='test -s "conftest$ac_exeext"'
15063 { (eval echo "$as_me:15063: \"$ac_try\"") >&5
15064 (eval $ac_try) 2>&5
15066 echo "$as_me:15066: \$? = $ac_status" >&5
15067 (exit "$ac_status"); }; }; then
15068 ac_cv_func_XOpenDisplay=yes
15070 echo "$as_me: failed program was:" >&5
15071 cat "conftest.$ac_ext" >&5
15072 ac_cv_func_XOpenDisplay=no
15074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15076 echo "$as_me:15076: result: $ac_cv_func_XOpenDisplay" >&5
15077 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15078 if test "$ac_cv_func_XOpenDisplay" = yes; then
15082 echo "$as_me:15082: checking for XOpenDisplay in -lX11" >&5
15083 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15084 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15085 echo $ECHO_N "(cached) $ECHO_C" >&6
15087 ac_check_lib_save_LIBS=$LIBS
15089 cat >"conftest.$ac_ext" <<_ACEOF
15090 #line 15090 "configure"
15091 #include "confdefs.h"
15093 /* Override any gcc2 internal prototype to avoid an error. */
15097 /* We use char because int might match the return type of a gcc2
15098 builtin and then its argument prototype would still apply. */
15099 char XOpenDisplay ();
15108 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15109 if { (eval echo "$as_me:15109: \"$ac_link\"") >&5
15110 (eval $ac_link) 2>&5
15112 echo "$as_me:15112: \$? = $ac_status" >&5
15113 (exit "$ac_status"); } &&
15114 { ac_try='test -s "conftest$ac_exeext"'
15115 { (eval echo "$as_me:15115: \"$ac_try\"") >&5
15116 (eval $ac_try) 2>&5
15118 echo "$as_me:15118: \$? = $ac_status" >&5
15119 (exit "$ac_status"); }; }; then
15120 ac_cv_lib_X11_XOpenDisplay=yes
15122 echo "$as_me: failed program was:" >&5
15123 cat "conftest.$ac_ext" >&5
15124 ac_cv_lib_X11_XOpenDisplay=no
15126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15127 LIBS=$ac_check_lib_save_LIBS
15129 echo "$as_me:15129: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15130 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15131 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15133 cf_add_libs="$LIBS"
15136 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15137 # filter duplicates
15138 for cf_add_1lib in $cf_add_0lib; do
15139 for cf_add_2lib in $cf_add_libs; do
15140 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15145 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15147 LIBS="$cf_add_libs"
15153 echo "$as_me:15153: checking for XtAppInitialize" >&5
15154 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15155 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15158 cat >"conftest.$ac_ext" <<_ACEOF
15159 #line 15159 "configure"
15160 #include "confdefs.h"
15161 #define XtAppInitialize autoconf_temporary
15162 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15163 #undef XtAppInitialize
15169 /* We use char because int might match the return type of a gcc2
15170 builtin and then its argument prototype would still apply. */
15171 char XtAppInitialize (void);
15177 /* The GNU C library defines stubs for functions which it implements
15178 to always fail with ENOSYS. Some functions are actually named
15179 something starting with __ and the normal name is an alias. */
15180 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15181 #error found stub for XtAppInitialize
15184 return XtAppInitialize ();
15189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15190 if { (eval echo "$as_me:15190: \"$ac_link\"") >&5
15191 (eval $ac_link) 2>&5
15193 echo "$as_me:15193: \$? = $ac_status" >&5
15194 (exit "$ac_status"); } &&
15195 { ac_try='test -s "conftest$ac_exeext"'
15196 { (eval echo "$as_me:15196: \"$ac_try\"") >&5
15197 (eval $ac_try) 2>&5
15199 echo "$as_me:15199: \$? = $ac_status" >&5
15200 (exit "$ac_status"); }; }; then
15201 ac_cv_func_XtAppInitialize=yes
15203 echo "$as_me: failed program was:" >&5
15204 cat "conftest.$ac_ext" >&5
15205 ac_cv_func_XtAppInitialize=no
15207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15209 echo "$as_me:15209: result: $ac_cv_func_XtAppInitialize" >&5
15210 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15211 if test "$ac_cv_func_XtAppInitialize" = yes; then
15215 echo "$as_me:15215: checking for XtAppInitialize in -lXt" >&5
15216 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15217 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15218 echo $ECHO_N "(cached) $ECHO_C" >&6
15220 ac_check_lib_save_LIBS=$LIBS
15222 cat >"conftest.$ac_ext" <<_ACEOF
15223 #line 15223 "configure"
15224 #include "confdefs.h"
15226 /* Override any gcc2 internal prototype to avoid an error. */
15230 /* We use char because int might match the return type of a gcc2
15231 builtin and then its argument prototype would still apply. */
15232 char XtAppInitialize ();
15236 XtAppInitialize ();
15241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15242 if { (eval echo "$as_me:15242: \"$ac_link\"") >&5
15243 (eval $ac_link) 2>&5
15245 echo "$as_me:15245: \$? = $ac_status" >&5
15246 (exit "$ac_status"); } &&
15247 { ac_try='test -s "conftest$ac_exeext"'
15248 { (eval echo "$as_me:15248: \"$ac_try\"") >&5
15249 (eval $ac_try) 2>&5
15251 echo "$as_me:15251: \$? = $ac_status" >&5
15252 (exit "$ac_status"); }; }; then
15253 ac_cv_lib_Xt_XtAppInitialize=yes
15255 echo "$as_me: failed program was:" >&5
15256 cat "conftest.$ac_ext" >&5
15257 ac_cv_lib_Xt_XtAppInitialize=no
15259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15260 LIBS=$ac_check_lib_save_LIBS
15262 echo "$as_me:15262: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15263 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15264 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15266 cat >>confdefs.h <<\EOF
15267 #define HAVE_LIBXT 1
15278 if test "$cf_have_X_LIBS" = no ; then
15279 { echo "$as_me:15279: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15280 test program. You will have to check and add the proper libraries by hand
15282 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15283 test program. You will have to check and add the proper libraries by hand
15284 to makefile." >&2;}
15287 cf_x_athena_root=$cf_x_athena
15290 for cf_path in default \
15291 /usr/contrib/X11R6 \
15292 /usr/contrib/X11R5 \
15296 if test -z "$cf_x_athena_inc" ; then
15298 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15299 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15300 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15301 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15302 for cf_X_CFLAGS in $X_CFLAGS
15304 case "x$cf_X_CFLAGS" in
15306 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15309 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15314 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15315 if test "$cf_path" != default ; then
15317 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15318 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15320 echo "$as_me:15320: checking for $cf_test in $cf_path" >&5
15321 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15323 echo "$as_me:15323: checking for $cf_test" >&5
15324 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15326 cat >"conftest.$ac_ext" <<_ACEOF
15327 #line 15327 "configure"
15328 #include "confdefs.h"
15330 #include <X11/Intrinsic.h>
15331 #include <$cf_test>
15340 rm -f "conftest.$ac_objext"
15341 if { (eval echo "$as_me:15341: \"$ac_compile\"") >&5
15342 (eval $ac_compile) 2>&5
15344 echo "$as_me:15344: \$? = $ac_status" >&5
15345 (exit "$ac_status"); } &&
15346 { ac_try='test -s "conftest.$ac_objext"'
15347 { (eval echo "$as_me:15347: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15350 echo "$as_me:15350: \$? = $ac_status" >&5
15351 (exit "$ac_status"); }; }; then
15354 echo "$as_me: failed program was:" >&5
15355 cat "conftest.$ac_ext" >&5
15358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15359 echo "$as_me:15359: result: $cf_result" >&5
15360 echo "${ECHO_T}$cf_result" >&6
15362 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15363 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15364 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15366 if test "$cf_result" = yes ; then
15367 test "$cf_path" = default && cf_x_athena_inc=default
15368 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15374 if test -z "$cf_x_athena_inc" ; then
15375 { echo "$as_me:15375: WARNING: Unable to find Athena header files" >&5
15376 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15377 elif test "$cf_x_athena_inc" != default ; then
15379 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15380 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15384 cf_x_athena_root=$cf_x_athena
15387 for cf_path in default \
15388 /usr/contrib/X11R6 \
15389 /usr/contrib/X11R5 \
15394 ${cf_x_athena_root} \
15395 ${cf_x_athena_root}7 \
15396 ${cf_x_athena_root}6
15399 "-l$cf_lib -lXmu" \
15400 "-l$cf_lib -lXpm -lXmu" \
15401 "-l${cf_lib}_s -lXmu_s"
15403 test -n "$cf_x_athena_lib" && break
15405 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15406 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15407 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15408 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15409 for cf_X_CFLAGS in $X_CFLAGS
15411 case "x$cf_X_CFLAGS" in
15413 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15416 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15421 cf_test=XawSimpleMenuAddGlobalActions
15422 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15424 cf_add_libs="$LIBS"
15427 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15428 # filter duplicates
15429 for cf_add_1lib in $cf_add_0lib; do
15430 for cf_add_2lib in $cf_add_libs; do
15431 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15436 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15438 LIBS="$cf_add_libs"
15440 echo "$as_me:15440: checking for $cf_test in $cf_libs" >&5
15441 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15442 cat >"conftest.$ac_ext" <<_ACEOF
15443 #line 15443 "configure"
15444 #include "confdefs.h"
15446 #include <X11/Intrinsic.h>
15447 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15453 $cf_test((XtAppContext) 0)
15458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15459 if { (eval echo "$as_me:15459: \"$ac_link\"") >&5
15460 (eval $ac_link) 2>&5
15462 echo "$as_me:15462: \$? = $ac_status" >&5
15463 (exit "$ac_status"); } &&
15464 { ac_try='test -s "conftest$ac_exeext"'
15465 { (eval echo "$as_me:15465: \"$ac_try\"") >&5
15466 (eval $ac_try) 2>&5
15468 echo "$as_me:15468: \$? = $ac_status" >&5
15469 (exit "$ac_status"); }; }; then
15472 echo "$as_me: failed program was:" >&5
15473 cat "conftest.$ac_ext" >&5
15476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15477 echo "$as_me:15477: result: $cf_result" >&5
15478 echo "${ECHO_T}$cf_result" >&6
15480 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15481 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15482 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15484 if test "$cf_result" = yes ; then
15485 cf_x_athena_lib="$cf_libs"
15489 test -n "$cf_x_athena_lib" && break
15493 if test -z "$cf_x_athena_lib" ; then
15494 { { echo "$as_me:15494: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15495 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15496 { (exit 1); exit 1; }; }
15499 cf_add_libs="$LIBS"
15502 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15503 # filter duplicates
15504 for cf_add_1lib in $cf_add_0lib; do
15505 for cf_add_2lib in $cf_add_libs; do
15506 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15511 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15513 LIBS="$cf_add_libs"
15515 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15517 cat >>confdefs.h <<EOF
15518 #define $cf_x_athena_LIBS 1
15523 if test -n "$ac_tool_prefix"; then
15524 for ac_prog in xcurses-config
15526 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15527 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15528 echo "$as_me:15528: checking for $ac_word" >&5
15529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15530 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15531 echo $ECHO_N "(cached) $ECHO_C" >&6
15533 if test -n "$XCURSES_CONFIG"; then
15534 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15536 ac_save_IFS=$IFS; IFS=$ac_path_separator
15538 for ac_dir in $ac_dummy; do
15540 test -z "$ac_dir" && ac_dir=.
15541 $as_executable_p "$ac_dir/$ac_word" || continue
15542 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15543 echo "$as_me:15543: found $ac_dir/$ac_word" >&5
15549 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15550 if test -n "$XCURSES_CONFIG"; then
15551 echo "$as_me:15551: result: $XCURSES_CONFIG" >&5
15552 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15554 echo "$as_me:15554: result: no" >&5
15555 echo "${ECHO_T}no" >&6
15558 test -n "$XCURSES_CONFIG" && break
15561 if test -z "$XCURSES_CONFIG"; then
15562 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15563 for ac_prog in xcurses-config
15565 # Extract the first word of "$ac_prog", so it can be a program name with args.
15566 set dummy $ac_prog; ac_word=$2
15567 echo "$as_me:15567: checking for $ac_word" >&5
15568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15569 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15570 echo $ECHO_N "(cached) $ECHO_C" >&6
15572 if test -n "$ac_ct_XCURSES_CONFIG"; then
15573 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15575 ac_save_IFS=$IFS; IFS=$ac_path_separator
15577 for ac_dir in $ac_dummy; do
15579 test -z "$ac_dir" && ac_dir=.
15580 $as_executable_p "$ac_dir/$ac_word" || continue
15581 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15582 echo "$as_me:15582: found $ac_dir/$ac_word" >&5
15588 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15589 if test -n "$ac_ct_XCURSES_CONFIG"; then
15590 echo "$as_me:15590: result: $ac_ct_XCURSES_CONFIG" >&5
15591 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15593 echo "$as_me:15593: result: no" >&5
15594 echo "${ECHO_T}no" >&6
15597 test -n "$ac_ct_XCURSES_CONFIG" && break
15599 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15601 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15604 if test "$XCURSES_CONFIG" != none ; then
15609 cf_new_extra_cppflags=
15611 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15613 case "$cf_fix_cppflags" in
15615 case "$cf_add_cflags" in
15616 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15617 case "$cf_add_cflags" in
15619 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15622 && test -z "${cf_tst_cflags}" \
15623 && cf_fix_cppflags=yes
15625 if test "$cf_fix_cppflags" = yes ; then
15627 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15628 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15631 elif test "${cf_tst_cflags}" = "\"'" ; then
15633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15640 case "$CPPFLAGS" in
15644 case "$cf_add_cflags" in
15646 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15648 CPPFLAGS=`echo "$CPPFLAGS" | \
15649 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15650 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15655 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15656 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15663 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15664 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15674 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15676 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15677 && test -z "${cf_tst_cflags}" \
15678 && cf_fix_cppflags=no
15683 if test -n "$cf_new_cflags" ; then
15685 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15686 CFLAGS="${CFLAGS}$cf_new_cflags"
15690 if test -n "$cf_new_cppflags" ; then
15692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15693 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15697 if test -n "$cf_new_extra_cppflags" ; then
15699 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15700 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15704 cf_add_libs="$LIBS"
15707 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15708 # filter duplicates
15709 for cf_add_1lib in $cf_add_0lib; do
15710 for cf_add_2lib in $cf_add_libs; do
15711 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15716 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15718 LIBS="$cf_add_libs"
15720 cf_cv_lib_XCurses=yes
15724 LDFLAGS="$LDFLAGS $X_LIBS"
15726 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15728 echo "${as_me:-configure}:15728: testing checking additions to CFLAGS ..." 1>&5
15730 cf_check_cflags="$CFLAGS"
15731 cf_check_cppflags="$CPPFLAGS"
15736 cf_new_extra_cppflags=
15738 for cf_add_cflags in $X_CFLAGS
15740 case "$cf_fix_cppflags" in
15742 case "$cf_add_cflags" in
15743 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15744 case "$cf_add_cflags" in
15746 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15748 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15749 && test -z "${cf_tst_cflags}" \
15750 && cf_fix_cppflags=yes
15752 if test "$cf_fix_cppflags" = yes ; then
15754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15758 elif test "${cf_tst_cflags}" = "\"'" ; then
15760 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15761 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15767 case "$CPPFLAGS" in
15771 case "$cf_add_cflags" in
15773 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15775 CPPFLAGS=`echo "$CPPFLAGS" | \
15776 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15777 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15782 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15783 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15790 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15791 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15798 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15799 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15801 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15803 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15804 && test -z "${cf_tst_cflags}" \
15805 && cf_fix_cppflags=no
15810 if test -n "$cf_new_cflags" ; then
15811 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15813 echo "${as_me:-configure}:15813: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15815 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15816 CFLAGS="${CFLAGS}$cf_new_cflags"
15820 if test -n "$cf_new_cppflags" ; then
15821 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15823 echo "${as_me:-configure}:15823: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15825 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15826 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15830 if test -n "$cf_new_extra_cppflags" ; then
15831 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15833 echo "${as_me:-configure}:15833: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15835 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15836 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15840 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15841 cat >"conftest.$ac_ext" <<_ACEOF
15842 #line 15842 "configure"
15843 #include "confdefs.h"
15848 printf("Hello world");
15853 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15854 if { (eval echo "$as_me:15854: \"$ac_link\"") >&5
15855 (eval $ac_link) 2>&5
15857 echo "$as_me:15857: \$? = $ac_status" >&5
15858 (exit "$ac_status"); } &&
15859 { ac_try='test -s "conftest$ac_exeext"'
15860 { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861 (eval $ac_try) 2>&5
15863 echo "$as_me:15863: \$? = $ac_status" >&5
15864 (exit "$ac_status"); }; }; then
15867 echo "$as_me: failed program was:" >&5
15868 cat "conftest.$ac_ext" >&5
15869 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15871 echo "${as_me:-configure}:15871: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15873 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15874 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15876 echo "${as_me:-configure}:15876: testing but keeping change to \$CPPFLAGS ..." 1>&5
15879 CFLAGS="$cf_check_cflags"
15881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15884 echo "$as_me:15884: checking for XOpenDisplay in -lX11" >&5
15885 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15886 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
15889 ac_check_lib_save_LIBS=$LIBS
15890 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15891 cat >"conftest.$ac_ext" <<_ACEOF
15892 #line 15892 "configure"
15893 #include "confdefs.h"
15895 /* Override any gcc2 internal prototype to avoid an error. */
15899 /* We use char because int might match the return type of a gcc2
15900 builtin and then its argument prototype would still apply. */
15901 char XOpenDisplay ();
15910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15911 if { (eval echo "$as_me:15911: \"$ac_link\"") >&5
15912 (eval $ac_link) 2>&5
15914 echo "$as_me:15914: \$? = $ac_status" >&5
15915 (exit "$ac_status"); } &&
15916 { ac_try='test -s "conftest$ac_exeext"'
15917 { (eval echo "$as_me:15917: \"$ac_try\"") >&5
15918 (eval $ac_try) 2>&5
15920 echo "$as_me:15920: \$? = $ac_status" >&5
15921 (exit "$ac_status"); }; }; then
15922 ac_cv_lib_X11_XOpenDisplay=yes
15924 echo "$as_me: failed program was:" >&5
15925 cat "conftest.$ac_ext" >&5
15926 ac_cv_lib_X11_XOpenDisplay=no
15928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15929 LIBS=$ac_check_lib_save_LIBS
15931 echo "$as_me:15931: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15932 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15933 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15935 cf_add_libs="$LIBS"
15938 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15939 # filter duplicates
15940 for cf_add_1lib in $cf_add_0lib; do
15941 for cf_add_2lib in $cf_add_libs; do
15942 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15947 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15949 LIBS="$cf_add_libs"
15953 echo "$as_me:15953: checking for XCurses library" >&5
15954 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
15955 if test "${cf_cv_lib_XCurses+set}" = set; then
15956 echo $ECHO_N "(cached) $ECHO_C" >&6
15959 cf_add_libs="$LIBS"
15962 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15963 # filter duplicates
15964 for cf_add_1lib in $cf_add_0lib; do
15965 for cf_add_2lib in $cf_add_libs; do
15966 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15971 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15973 LIBS="$cf_add_libs"
15975 cat >"conftest.$ac_ext" <<_ACEOF
15976 #line 15976 "configure"
15977 #include "confdefs.h"
15979 #include <xcurses.h>
15980 char *XCursesProgramName = "test";
15990 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15991 if { (eval echo "$as_me:15991: \"$ac_link\"") >&5
15992 (eval $ac_link) 2>&5
15994 echo "$as_me:15994: \$? = $ac_status" >&5
15995 (exit "$ac_status"); } &&
15996 { ac_try='test -s "conftest$ac_exeext"'
15997 { (eval echo "$as_me:15997: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit "$ac_status"); }; }; then
16002 cf_cv_lib_XCurses=yes
16004 echo "$as_me: failed program was:" >&5
16005 cat "conftest.$ac_ext" >&5
16006 cf_cv_lib_XCurses=no
16008 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16011 echo "$as_me:16011: result: $cf_cv_lib_XCurses" >&5
16012 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16016 if test "$cf_cv_lib_XCurses" = yes ; then
16018 cat >>confdefs.h <<\EOF
16022 cat >>confdefs.h <<\EOF
16026 echo "$as_me:16026: checking for xcurses.h" >&5
16027 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16028 if test "${ac_cv_header_xcurses_h+set}" = set; then
16029 echo $ECHO_N "(cached) $ECHO_C" >&6
16031 cat >"conftest.$ac_ext" <<_ACEOF
16032 #line 16032 "configure"
16033 #include "confdefs.h"
16034 #include <xcurses.h>
16036 if { (eval echo "$as_me:16036: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16037 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16039 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16041 cat conftest.err >&5
16042 echo "$as_me:16042: \$? = $ac_status" >&5
16043 (exit "$ac_status"); } >/dev/null; then
16044 if test -s conftest.err; then
16045 ac_cpp_err=$ac_c_preproc_warn_flag
16052 if test -z "$ac_cpp_err"; then
16053 ac_cv_header_xcurses_h=yes
16055 echo "$as_me: failed program was:" >&5
16056 cat "conftest.$ac_ext" >&5
16057 ac_cv_header_xcurses_h=no
16059 rm -f conftest.err "conftest.$ac_ext"
16061 echo "$as_me:16061: result: $ac_cv_header_xcurses_h" >&5
16062 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16063 if test "$ac_cv_header_xcurses_h" = yes; then
16065 cat >>confdefs.h <<\EOF
16066 #define HAVE_XCURSES 1
16072 { { echo "$as_me:16072: error: Cannot link with XCurses" >&5
16073 echo "$as_me: error: Cannot link with XCurses" >&2;}
16074 { (exit 1); exit 1; }; }
16079 { { echo "$as_me:16079: error: unexpected screen-value: $cf_cv_screen" >&5
16080 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16081 { (exit 1); exit 1; }; }
16085 : ${cf_nculib_root:=$cf_cv_screen}
16086 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16087 echo "$as_me:16087: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16088 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16089 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16090 echo $ECHO_N "(cached) $ECHO_C" >&6
16092 ac_check_lib_save_LIBS=$LIBS
16093 LIBS="-l$cf_nculib_root $LIBS"
16094 cat >"conftest.$ac_ext" <<_ACEOF
16095 #line 16095 "configure"
16096 #include "confdefs.h"
16098 /* Override any gcc2 internal prototype to avoid an error. */
16102 /* We use char because int might match the return type of a gcc2
16103 builtin and then its argument prototype would still apply. */
16104 char _nc_init_pthreads ();
16108 _nc_init_pthreads ();
16113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16114 if { (eval echo "$as_me:16114: \"$ac_link\"") >&5
16115 (eval $ac_link) 2>&5
16117 echo "$as_me:16117: \$? = $ac_status" >&5
16118 (exit "$ac_status"); } &&
16119 { ac_try='test -s "conftest$ac_exeext"'
16120 { (eval echo "$as_me:16120: \"$ac_try\"") >&5
16121 (eval $ac_try) 2>&5
16123 echo "$as_me:16123: \$? = $ac_status" >&5
16124 (exit "$ac_status"); }; }; then
16125 eval "$as_ac_Lib=yes"
16127 echo "$as_me: failed program was:" >&5
16128 cat "conftest.$ac_ext" >&5
16129 eval "$as_ac_Lib=no"
16131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16132 LIBS=$ac_check_lib_save_LIBS
16134 echo "$as_me:16134: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16135 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16136 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16137 cf_cv_ncurses_pthreads=yes
16139 cf_cv_ncurses_pthreads=no
16142 if test "$cf_cv_ncurses_pthreads" = yes
16145 cf_add_libs="$LIBS"
16148 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16149 # filter duplicates
16150 for cf_add_1lib in $cf_add_0lib; do
16151 for cf_add_2lib in $cf_add_libs; do
16152 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16157 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16159 LIBS="$cf_add_libs"
16163 case $cf_cv_screen in
16165 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16169 echo "$as_me:16169: checking for X11 rgb file" >&5
16170 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16172 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16173 if test "${with_x11_rgb+set}" = set; then
16174 withval="$with_x11_rgb"
16180 if test "x$RGB_PATH" = xauto
16182 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16184 /opt/local/share/X11/rgb.txt \
16185 /opt/X11/share/X11/rgb.txt \
16186 /usr/share/X11/rgb.txt \
16187 /usr/X11/share/X11/rgb.txt \
16188 /usr/X11/lib/X11/rgb.txt \
16189 /usr/lib/X11/rgb.txt \
16191 /usr/pkg/lib/X11/rgb.txt \
16192 /usr/X11R7/lib/X11/rgb.txt \
16193 /usr/X11R6/lib/X11/rgb.txt \
16194 /usr/X11R5/lib/X11/rgb.txt \
16195 /usr/X11R4/lib/X11/rgb.txt \
16196 /usr/local/lib/X11/rgb.txt \
16197 /usr/local/share/X11/rgb.txt \
16198 /usr/lib64/X11/rgb.txt
16200 if test -f "$cf_path" ; then
16201 RGB_PATH="$cf_path"
16208 if test "x$prefix" != xNONE; then
16209 cf_path_syntax="$prefix"
16211 cf_path_syntax="$ac_default_prefix"
16214 case ".$cf_path" in
16215 (.\$\(*\)*|.\'*\'*)
16219 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16221 (.\$\{*prefix\}*|.\$\{*dir\}*)
16222 eval cf_path="$cf_path"
16223 case ".$cf_path" in
16225 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16230 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16233 { { echo "$as_me:16233: error: expected a pathname, not \"$cf_path\"" >&5
16234 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16235 { (exit 1); exit 1; }; }
16241 echo "$as_me:16241: result: $RGB_PATH" >&5
16242 echo "${ECHO_T}$RGB_PATH" >&6
16244 cat >>confdefs.h <<EOF
16245 #define RGB_PATH "$cf_path"
16249 if test "$RGB_PATH" = no
16256 case $cf_cv_screen in
16258 cf_default_panel=no
16261 cf_default_tinfo=no
16263 (xcurses|bsdcurses)
16264 cf_default_panel=no
16267 cf_default_tinfo=yes
16270 cf_default_panel=yes
16271 cf_default_form=yes
16272 cf_default_menu=yes
16273 cf_default_tinfo=yes
16274 case $cf_cv_screen in
16276 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16282 echo "$as_me:16282: checking for desired basename for form library" >&5
16283 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16285 # Check whether --with-form-libname or --without-form-libname was given.
16286 if test "${with_form_libname+set}" = set; then
16287 withval="$with_form_libname"
16288 with_lib_basename=$withval
16290 with_lib_basename=form
16292 FORM_NAME="$with_lib_basename"
16294 case "x$FORM_NAME" in
16302 echo "$as_me:16302: result: $FORM_NAME" >&5
16303 echo "${ECHO_T}$FORM_NAME" >&6
16305 echo "$as_me:16305: checking for desired basename for menu library" >&5
16306 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16308 # Check whether --with-menu-libname or --without-menu-libname was given.
16309 if test "${with_menu_libname+set}" = set; then
16310 withval="$with_menu_libname"
16311 with_lib_basename=$withval
16313 with_lib_basename=menu
16315 MENU_NAME="$with_lib_basename"
16317 case "x$MENU_NAME" in
16325 echo "$as_me:16325: result: $MENU_NAME" >&5
16326 echo "${ECHO_T}$MENU_NAME" >&6
16328 echo "$as_me:16328: checking for desired basename for panel library" >&5
16329 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16331 # Check whether --with-panel-libname or --without-panel-libname was given.
16332 if test "${with_panel_libname+set}" = set; then
16333 withval="$with_panel_libname"
16334 with_lib_basename=$withval
16336 with_lib_basename=panel
16338 PANEL_NAME="$with_lib_basename"
16340 case "x$PANEL_NAME" in
16348 echo "$as_me:16348: result: $PANEL_NAME" >&5
16349 echo "${ECHO_T}$PANEL_NAME" >&6
16351 echo "$as_me:16351: checking if you want to check for panel functions" >&5
16352 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16354 # Check whether --enable-panel or --disable-panel was given.
16355 if test "${enable_panel+set}" = set; then
16356 enableval="$enable_panel"
16357 test "$enableval" != no && enableval=yes
16358 if test "$enableval" != "yes" ; then
16361 cf_enable_panel=$cf_default_panel
16365 cf_enable_panel=$cf_default_panel
16368 echo "$as_me:16368: result: $cf_enable_panel" >&5
16369 echo "${ECHO_T}$cf_enable_panel" >&6
16370 if test $cf_enable_panel = yes
16373 cf_have_curses_lib=no
16375 : ${NCURSES_CONFIG_PKG:=none}
16376 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16378 elif test "x${PKG_CONFIG:=none}" != xnone; then
16379 echo "$as_me:16379: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16380 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16381 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16382 echo "$as_me:16382: result: yes" >&5
16383 echo "${ECHO_T}yes" >&6
16385 echo "$as_me:16385: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16386 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16388 cf_save_CPPFLAGS="$CPPFLAGS"
16389 cf_save_LIBS="$LIBS"
16394 cf_new_extra_cppflags=
16396 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16398 case "$cf_fix_cppflags" in
16400 case "$cf_add_cflags" in
16401 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16402 case "$cf_add_cflags" in
16404 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16406 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16407 && test -z "${cf_tst_cflags}" \
16408 && cf_fix_cppflags=yes
16410 if test "$cf_fix_cppflags" = yes ; then
16412 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16413 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16416 elif test "${cf_tst_cflags}" = "\"'" ; then
16418 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16419 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16425 case "$CPPFLAGS" in
16429 case "$cf_add_cflags" in
16431 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16433 CPPFLAGS=`echo "$CPPFLAGS" | \
16434 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16435 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16440 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16441 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16448 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16449 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16456 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16457 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16462 && test -z "${cf_tst_cflags}" \
16463 && cf_fix_cppflags=no
16468 if test -n "$cf_new_cflags" ; then
16470 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16471 CFLAGS="${CFLAGS}$cf_new_cflags"
16475 if test -n "$cf_new_cppflags" ; then
16477 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16478 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16482 if test -n "$cf_new_extra_cppflags" ; then
16484 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16485 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16489 cf_add_libs="$LIBS"
16492 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16493 # filter duplicates
16494 for cf_add_1lib in $cf_add_0lib; do
16495 for cf_add_2lib in $cf_add_libs; do
16496 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16501 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16503 LIBS="$cf_add_libs"
16505 cat >"conftest.$ac_ext" <<_ACEOF
16506 #line 16506 "configure"
16507 #include "confdefs.h"
16508 #include <$PANEL_NAME.h>
16512 (void) new_panel ( 0 );
16517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16518 if { (eval echo "$as_me:16518: \"$ac_link\"") >&5
16519 (eval $ac_link) 2>&5
16521 echo "$as_me:16521: \$? = $ac_status" >&5
16522 (exit "$ac_status"); } &&
16523 { ac_try='test -s "conftest$ac_exeext"'
16524 { (eval echo "$as_me:16524: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16527 echo "$as_me:16527: \$? = $ac_status" >&5
16528 (exit "$ac_status"); }; }; then
16529 if test "$cross_compiling" = yes; then
16530 cf_have_curses_lib=maybe
16532 cat >"conftest.$ac_ext" <<_ACEOF
16533 #line 16533 "configure"
16534 #include "confdefs.h"
16535 #include <$PANEL_NAME.h>
16537 { (void) new_panel ( 0 ); return 0; }
16539 rm -f "conftest$ac_exeext"
16540 if { (eval echo "$as_me:16540: \"$ac_link\"") >&5
16541 (eval $ac_link) 2>&5
16543 echo "$as_me:16543: \$? = $ac_status" >&5
16544 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16545 { (eval echo "$as_me:16545: \"$ac_try\"") >&5
16546 (eval $ac_try) 2>&5
16548 echo "$as_me:16548: \$? = $ac_status" >&5
16549 (exit "$ac_status"); }; }; then
16550 cf_have_curses_lib=yes
16552 echo "$as_me: program exited with status $ac_status" >&5
16553 echo "$as_me: failed program was:" >&5
16554 cat "conftest.$ac_ext" >&5
16555 cf_have_curses_lib=no
16557 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16560 echo "$as_me: failed program was:" >&5
16561 cat "conftest.$ac_ext" >&5
16562 cf_have_curses_lib=no
16564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16565 echo "$as_me:16565: result: $cf_have_curses_lib" >&5
16566 echo "${ECHO_T}$cf_have_curses_lib" >&6
16567 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16568 if test "$cf_have_curses_lib" != "yes"
16570 CPPFLAGS="$cf_save_CPPFLAGS"
16571 LIBS="$cf_save_LIBS"
16574 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16576 cat >>confdefs.h <<EOF
16577 #define $cf_upper 1
16583 if test "$cf_have_curses_lib" = no; then
16584 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16585 echo "$as_me:16585: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16586 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16587 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16590 ac_check_lib_save_LIBS=$LIBS
16591 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16592 cat >"conftest.$ac_ext" <<_ACEOF
16593 #line 16593 "configure"
16594 #include "confdefs.h"
16596 /* Override any gcc2 internal prototype to avoid an error. */
16600 /* We use char because int might match the return type of a gcc2
16601 builtin and then its argument prototype would still apply. */
16611 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16612 if { (eval echo "$as_me:16612: \"$ac_link\"") >&5
16613 (eval $ac_link) 2>&5
16615 echo "$as_me:16615: \$? = $ac_status" >&5
16616 (exit "$ac_status"); } &&
16617 { ac_try='test -s "conftest$ac_exeext"'
16618 { (eval echo "$as_me:16618: \"$ac_try\"") >&5
16619 (eval $ac_try) 2>&5
16621 echo "$as_me:16621: \$? = $ac_status" >&5
16622 (exit "$ac_status"); }; }; then
16623 eval "$as_ac_Lib=yes"
16625 echo "$as_me: failed program was:" >&5
16626 cat "conftest.$ac_ext" >&5
16627 eval "$as_ac_Lib=no"
16629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16630 LIBS=$ac_check_lib_save_LIBS
16632 echo "$as_me:16632: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16633 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16634 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16636 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16638 cf_add_libs="$LIBS"
16641 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16642 # filter duplicates
16643 for cf_add_1lib in $cf_add_0lib; do
16644 for cf_add_2lib in $cf_add_libs; do
16645 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16650 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16652 LIBS="$cf_add_libs"
16654 cat >>confdefs.h <<EOF
16655 #define $cf_upper 1
16662 cf_curses_headers="$cf_curses_headers panel.h"
16665 echo "$as_me:16665: checking if you want to check for menu functions" >&5
16666 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16668 # Check whether --enable-menu or --disable-menu was given.
16669 if test "${enable_menu+set}" = set; then
16670 enableval="$enable_menu"
16671 test "$enableval" != no && enableval=yes
16672 if test "$enableval" != "yes" ; then
16675 cf_enable_menu=$cf_default_menu
16679 cf_enable_menu=$cf_default_menu
16682 echo "$as_me:16682: result: $cf_enable_menu" >&5
16683 echo "${ECHO_T}$cf_enable_menu" >&6
16684 if test $cf_enable_menu = yes
16686 case $cf_cv_screen in
16691 echo "$as_me:16691: checking for NetBSD menu.h" >&5
16692 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16693 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16694 echo $ECHO_N "(cached) $ECHO_C" >&6
16697 cat >"conftest.$ac_ext" <<_ACEOF
16698 #line 16698 "configure"
16699 #include "confdefs.h"
16701 #include <${cf_cv_ncurses_header:-curses.h}>
16709 int y = menu->max_item_width;
16715 rm -f "conftest.$ac_objext"
16716 if { (eval echo "$as_me:16716: \"$ac_compile\"") >&5
16717 (eval $ac_compile) 2>&5
16719 echo "$as_me:16719: \$? = $ac_status" >&5
16720 (exit "$ac_status"); } &&
16721 { ac_try='test -s "conftest.$ac_objext"'
16722 { (eval echo "$as_me:16722: \"$ac_try\"") >&5
16723 (eval $ac_try) 2>&5
16725 echo "$as_me:16725: \$? = $ac_status" >&5
16726 (exit "$ac_status"); }; }; then
16727 cf_cv_netbsd_menu_h=yes
16730 echo "$as_me: failed program was:" >&5
16731 cat "conftest.$ac_ext" >&5
16732 cf_cv_netbsd_menu_h=no
16734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16737 echo "$as_me:16737: result: $cf_cv_netbsd_menu_h" >&5
16738 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16740 test "$cf_cv_netbsd_menu_h" = yes &&
16741 cat >>confdefs.h <<\EOF
16742 #define HAVE_NETBSD_MENU_H 1
16748 cf_have_curses_lib=no
16750 : ${NCURSES_CONFIG_PKG:=none}
16751 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16753 elif test "x${PKG_CONFIG:=none}" != xnone; then
16754 echo "$as_me:16754: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16755 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16756 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16757 echo "$as_me:16757: result: yes" >&5
16758 echo "${ECHO_T}yes" >&6
16760 echo "$as_me:16760: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16761 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16763 cf_save_CPPFLAGS="$CPPFLAGS"
16764 cf_save_LIBS="$LIBS"
16769 cf_new_extra_cppflags=
16771 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16773 case "$cf_fix_cppflags" in
16775 case "$cf_add_cflags" in
16776 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16777 case "$cf_add_cflags" in
16779 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16781 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16782 && test -z "${cf_tst_cflags}" \
16783 && cf_fix_cppflags=yes
16785 if test "$cf_fix_cppflags" = yes ; then
16787 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16788 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16791 elif test "${cf_tst_cflags}" = "\"'" ; then
16793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16800 case "$CPPFLAGS" in
16804 case "$cf_add_cflags" in
16806 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16808 CPPFLAGS=`echo "$CPPFLAGS" | \
16809 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16810 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16815 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16816 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16823 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16824 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16834 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16836 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16837 && test -z "${cf_tst_cflags}" \
16838 && cf_fix_cppflags=no
16843 if test -n "$cf_new_cflags" ; then
16845 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16846 CFLAGS="${CFLAGS}$cf_new_cflags"
16850 if test -n "$cf_new_cppflags" ; then
16852 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16853 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16857 if test -n "$cf_new_extra_cppflags" ; then
16859 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16860 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16864 cf_add_libs="$LIBS"
16867 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16868 # filter duplicates
16869 for cf_add_1lib in $cf_add_0lib; do
16870 for cf_add_2lib in $cf_add_libs; do
16871 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16876 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16878 LIBS="$cf_add_libs"
16880 cat >"conftest.$ac_ext" <<_ACEOF
16881 #line 16881 "configure"
16882 #include "confdefs.h"
16883 #include <$MENU_NAME.h>
16887 (void) menu_driver ( 0,0 );
16892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16893 if { (eval echo "$as_me:16893: \"$ac_link\"") >&5
16894 (eval $ac_link) 2>&5
16896 echo "$as_me:16896: \$? = $ac_status" >&5
16897 (exit "$ac_status"); } &&
16898 { ac_try='test -s "conftest$ac_exeext"'
16899 { (eval echo "$as_me:16899: \"$ac_try\"") >&5
16900 (eval $ac_try) 2>&5
16902 echo "$as_me:16902: \$? = $ac_status" >&5
16903 (exit "$ac_status"); }; }; then
16904 if test "$cross_compiling" = yes; then
16905 cf_have_curses_lib=maybe
16907 cat >"conftest.$ac_ext" <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16910 #include <$MENU_NAME.h>
16912 { (void) menu_driver ( 0,0 ); return 0; }
16914 rm -f "conftest$ac_exeext"
16915 if { (eval echo "$as_me:16915: \"$ac_link\"") >&5
16916 (eval $ac_link) 2>&5
16918 echo "$as_me:16918: \$? = $ac_status" >&5
16919 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16920 { (eval echo "$as_me:16920: \"$ac_try\"") >&5
16921 (eval $ac_try) 2>&5
16923 echo "$as_me:16923: \$? = $ac_status" >&5
16924 (exit "$ac_status"); }; }; then
16925 cf_have_curses_lib=yes
16927 echo "$as_me: program exited with status $ac_status" >&5
16928 echo "$as_me: failed program was:" >&5
16929 cat "conftest.$ac_ext" >&5
16930 cf_have_curses_lib=no
16932 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16935 echo "$as_me: failed program was:" >&5
16936 cat "conftest.$ac_ext" >&5
16937 cf_have_curses_lib=no
16939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16940 echo "$as_me:16940: result: $cf_have_curses_lib" >&5
16941 echo "${ECHO_T}$cf_have_curses_lib" >&6
16942 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16943 if test "$cf_have_curses_lib" != "yes"
16945 CPPFLAGS="$cf_save_CPPFLAGS"
16946 LIBS="$cf_save_LIBS"
16949 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16951 cat >>confdefs.h <<EOF
16952 #define $cf_upper 1
16958 if test "$cf_have_curses_lib" = no; then
16959 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
16960 echo "$as_me:16960: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
16961 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16962 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16963 echo $ECHO_N "(cached) $ECHO_C" >&6
16965 ac_check_lib_save_LIBS=$LIBS
16966 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
16967 cat >"conftest.$ac_ext" <<_ACEOF
16968 #line 16968 "configure"
16969 #include "confdefs.h"
16971 /* Override any gcc2 internal prototype to avoid an error. */
16975 /* We use char because int might match the return type of a gcc2
16976 builtin and then its argument prototype would still apply. */
16977 char menu_driver ();
16986 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16987 if { (eval echo "$as_me:16987: \"$ac_link\"") >&5
16988 (eval $ac_link) 2>&5
16990 echo "$as_me:16990: \$? = $ac_status" >&5
16991 (exit "$ac_status"); } &&
16992 { ac_try='test -s "conftest$ac_exeext"'
16993 { (eval echo "$as_me:16993: \"$ac_try\"") >&5
16994 (eval $ac_try) 2>&5
16996 echo "$as_me:16996: \$? = $ac_status" >&5
16997 (exit "$ac_status"); }; }; then
16998 eval "$as_ac_Lib=yes"
17000 echo "$as_me: failed program was:" >&5
17001 cat "conftest.$ac_ext" >&5
17002 eval "$as_ac_Lib=no"
17004 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17005 LIBS=$ac_check_lib_save_LIBS
17007 echo "$as_me:17007: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17008 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17009 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17011 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17013 cf_add_libs="$LIBS"
17016 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17017 # filter duplicates
17018 for cf_add_1lib in $cf_add_0lib; do
17019 for cf_add_2lib in $cf_add_libs; do
17020 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17025 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17027 LIBS="$cf_add_libs"
17029 cat >>confdefs.h <<EOF
17030 #define $cf_upper 1
17037 cf_curses_headers="$cf_curses_headers menu.h"
17040 echo "$as_me:17040: checking if you want to check for form functions" >&5
17041 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17043 # Check whether --enable-form or --disable-form was given.
17044 if test "${enable_form+set}" = set; then
17045 enableval="$enable_form"
17046 test "$enableval" != no && enableval=yes
17047 if test "$enableval" != "yes" ; then
17050 cf_enable_form=$cf_default_form
17054 cf_enable_form=$cf_default_form
17057 echo "$as_me:17057: result: $cf_enable_form" >&5
17058 echo "${ECHO_T}$cf_enable_form" >&6
17059 if test $cf_enable_form = yes
17061 case $cf_cv_screen in
17066 echo "$as_me:17066: checking for NetBSD form.h" >&5
17067 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17068 if test "${cf_cv_netbsd_form_h+set}" = set; then
17069 echo $ECHO_N "(cached) $ECHO_C" >&6
17072 cat >"conftest.$ac_ext" <<_ACEOF
17073 #line 17073 "configure"
17074 #include "confdefs.h"
17076 #include <${cf_cv_ncurses_header:-curses.h}>
17084 int y = current_field(form)->cursor_ypos;
17085 int x = current_field(form)->cursor_xpos;
17091 rm -f "conftest.$ac_objext"
17092 if { (eval echo "$as_me:17092: \"$ac_compile\"") >&5
17093 (eval $ac_compile) 2>&5
17095 echo "$as_me:17095: \$? = $ac_status" >&5
17096 (exit "$ac_status"); } &&
17097 { ac_try='test -s "conftest.$ac_objext"'
17098 { (eval echo "$as_me:17098: \"$ac_try\"") >&5
17099 (eval $ac_try) 2>&5
17101 echo "$as_me:17101: \$? = $ac_status" >&5
17102 (exit "$ac_status"); }; }; then
17103 cf_cv_netbsd_form_h=yes
17106 echo "$as_me: failed program was:" >&5
17107 cat "conftest.$ac_ext" >&5
17108 cf_cv_netbsd_form_h=no
17110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17113 echo "$as_me:17113: result: $cf_cv_netbsd_form_h" >&5
17114 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17116 test "$cf_cv_netbsd_form_h" = yes &&
17117 cat >>confdefs.h <<\EOF
17118 #define HAVE_NETBSD_FORM_H 1
17124 cf_have_curses_lib=no
17126 : ${NCURSES_CONFIG_PKG:=none}
17127 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17129 elif test "x${PKG_CONFIG:=none}" != xnone; then
17130 echo "$as_me:17130: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17131 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17132 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17133 echo "$as_me:17133: result: yes" >&5
17134 echo "${ECHO_T}yes" >&6
17136 echo "$as_me:17136: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17137 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17139 cf_save_CPPFLAGS="$CPPFLAGS"
17140 cf_save_LIBS="$LIBS"
17145 cf_new_extra_cppflags=
17147 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17149 case "$cf_fix_cppflags" in
17151 case "$cf_add_cflags" in
17152 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17153 case "$cf_add_cflags" in
17155 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17157 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17158 && test -z "${cf_tst_cflags}" \
17159 && cf_fix_cppflags=yes
17161 if test "$cf_fix_cppflags" = yes ; then
17163 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17164 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17167 elif test "${cf_tst_cflags}" = "\"'" ; then
17169 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17170 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17176 case "$CPPFLAGS" in
17180 case "$cf_add_cflags" in
17182 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17184 CPPFLAGS=`echo "$CPPFLAGS" | \
17185 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17186 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17191 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17192 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17199 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17200 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17210 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17212 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17213 && test -z "${cf_tst_cflags}" \
17214 && cf_fix_cppflags=no
17219 if test -n "$cf_new_cflags" ; then
17221 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17222 CFLAGS="${CFLAGS}$cf_new_cflags"
17226 if test -n "$cf_new_cppflags" ; then
17228 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17229 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17233 if test -n "$cf_new_extra_cppflags" ; then
17235 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17236 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17240 cf_add_libs="$LIBS"
17243 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17244 # filter duplicates
17245 for cf_add_1lib in $cf_add_0lib; do
17246 for cf_add_2lib in $cf_add_libs; do
17247 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17252 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17254 LIBS="$cf_add_libs"
17256 cat >"conftest.$ac_ext" <<_ACEOF
17257 #line 17257 "configure"
17258 #include "confdefs.h"
17259 #include <$FORM_NAME.h>
17263 (void) form_driver ( 0,0 );
17268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17269 if { (eval echo "$as_me:17269: \"$ac_link\"") >&5
17270 (eval $ac_link) 2>&5
17272 echo "$as_me:17272: \$? = $ac_status" >&5
17273 (exit "$ac_status"); } &&
17274 { ac_try='test -s "conftest$ac_exeext"'
17275 { (eval echo "$as_me:17275: \"$ac_try\"") >&5
17276 (eval $ac_try) 2>&5
17278 echo "$as_me:17278: \$? = $ac_status" >&5
17279 (exit "$ac_status"); }; }; then
17280 if test "$cross_compiling" = yes; then
17281 cf_have_curses_lib=maybe
17283 cat >"conftest.$ac_ext" <<_ACEOF
17284 #line 17284 "configure"
17285 #include "confdefs.h"
17286 #include <$FORM_NAME.h>
17288 { (void) form_driver ( 0,0 ); return 0; }
17290 rm -f "conftest$ac_exeext"
17291 if { (eval echo "$as_me:17291: \"$ac_link\"") >&5
17292 (eval $ac_link) 2>&5
17294 echo "$as_me:17294: \$? = $ac_status" >&5
17295 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17296 { (eval echo "$as_me:17296: \"$ac_try\"") >&5
17297 (eval $ac_try) 2>&5
17299 echo "$as_me:17299: \$? = $ac_status" >&5
17300 (exit "$ac_status"); }; }; then
17301 cf_have_curses_lib=yes
17303 echo "$as_me: program exited with status $ac_status" >&5
17304 echo "$as_me: failed program was:" >&5
17305 cat "conftest.$ac_ext" >&5
17306 cf_have_curses_lib=no
17308 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17311 echo "$as_me: failed program was:" >&5
17312 cat "conftest.$ac_ext" >&5
17313 cf_have_curses_lib=no
17315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17316 echo "$as_me:17316: result: $cf_have_curses_lib" >&5
17317 echo "${ECHO_T}$cf_have_curses_lib" >&6
17318 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17319 if test "$cf_have_curses_lib" != "yes"
17321 CPPFLAGS="$cf_save_CPPFLAGS"
17322 LIBS="$cf_save_LIBS"
17325 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17327 cat >>confdefs.h <<EOF
17328 #define $cf_upper 1
17334 if test "$cf_have_curses_lib" = no; then
17335 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17336 echo "$as_me:17336: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17337 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17338 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17339 echo $ECHO_N "(cached) $ECHO_C" >&6
17341 ac_check_lib_save_LIBS=$LIBS
17342 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17343 cat >"conftest.$ac_ext" <<_ACEOF
17344 #line 17344 "configure"
17345 #include "confdefs.h"
17347 /* Override any gcc2 internal prototype to avoid an error. */
17351 /* We use char because int might match the return type of a gcc2
17352 builtin and then its argument prototype would still apply. */
17353 char form_driver ();
17362 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17363 if { (eval echo "$as_me:17363: \"$ac_link\"") >&5
17364 (eval $ac_link) 2>&5
17366 echo "$as_me:17366: \$? = $ac_status" >&5
17367 (exit "$ac_status"); } &&
17368 { ac_try='test -s "conftest$ac_exeext"'
17369 { (eval echo "$as_me:17369: \"$ac_try\"") >&5
17370 (eval $ac_try) 2>&5
17372 echo "$as_me:17372: \$? = $ac_status" >&5
17373 (exit "$ac_status"); }; }; then
17374 eval "$as_ac_Lib=yes"
17376 echo "$as_me: failed program was:" >&5
17377 cat "conftest.$ac_ext" >&5
17378 eval "$as_ac_Lib=no"
17380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17381 LIBS=$ac_check_lib_save_LIBS
17383 echo "$as_me:17383: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17384 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17385 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17387 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17389 cf_add_libs="$LIBS"
17392 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17393 # filter duplicates
17394 for cf_add_1lib in $cf_add_0lib; do
17395 for cf_add_2lib in $cf_add_libs; do
17396 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17401 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17403 LIBS="$cf_add_libs"
17405 cat >>confdefs.h <<EOF
17406 #define $cf_upper 1
17413 cf_curses_headers="$cf_curses_headers form.h"
17416 # look for curses-related headers
17418 for ac_header in $cf_curses_headers
17420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17421 echo "$as_me:17421: checking for $ac_header" >&5
17422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17424 echo $ECHO_N "(cached) $ECHO_C" >&6
17426 cat >"conftest.$ac_ext" <<_ACEOF
17427 #line 17427 "configure"
17428 #include "confdefs.h"
17429 #include <$ac_header>
17431 if { (eval echo "$as_me:17431: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17432 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17434 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17436 cat conftest.err >&5
17437 echo "$as_me:17437: \$? = $ac_status" >&5
17438 (exit "$ac_status"); } >/dev/null; then
17439 if test -s conftest.err; then
17440 ac_cpp_err=$ac_c_preproc_warn_flag
17447 if test -z "$ac_cpp_err"; then
17448 eval "$as_ac_Header=yes"
17450 echo "$as_me: failed program was:" >&5
17451 cat "conftest.$ac_ext" >&5
17452 eval "$as_ac_Header=no"
17454 rm -f conftest.err "conftest.$ac_ext"
17456 echo "$as_me:17456: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17457 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17458 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17459 cat >>confdefs.h <<EOF
17460 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17466 echo "$as_me:17466: checking for ANSI C header files" >&5
17467 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17468 if test "${ac_cv_header_stdc+set}" = set; then
17469 echo $ECHO_N "(cached) $ECHO_C" >&6
17471 cat >"conftest.$ac_ext" <<_ACEOF
17472 #line 17472 "configure"
17473 #include "confdefs.h"
17474 #include <stdlib.h>
17475 #include <stdarg.h>
17476 #include <string.h>
17480 if { (eval echo "$as_me:17480: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17481 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17483 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17485 cat conftest.err >&5
17486 echo "$as_me:17486: \$? = $ac_status" >&5
17487 (exit "$ac_status"); } >/dev/null; then
17488 if test -s conftest.err; then
17489 ac_cpp_err=$ac_c_preproc_warn_flag
17496 if test -z "$ac_cpp_err"; then
17497 ac_cv_header_stdc=yes
17499 echo "$as_me: failed program was:" >&5
17500 cat "conftest.$ac_ext" >&5
17501 ac_cv_header_stdc=no
17503 rm -f conftest.err "conftest.$ac_ext"
17505 if test $ac_cv_header_stdc = yes; then
17506 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17507 cat >"conftest.$ac_ext" <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510 #include <string.h>
17513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17514 $EGREP "memchr" >/dev/null 2>&1; then
17517 ac_cv_header_stdc=no
17523 if test $ac_cv_header_stdc = yes; then
17524 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17525 cat >"conftest.$ac_ext" <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528 #include <stdlib.h>
17531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17532 $EGREP "free" >/dev/null 2>&1; then
17535 ac_cv_header_stdc=no
17541 if test $ac_cv_header_stdc = yes; then
17542 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17543 if test "$cross_compiling" = yes; then
17546 cat >"conftest.$ac_ext" <<_ACEOF
17547 #line 17547 "configure"
17548 #include "confdefs.h"
17550 #if ((' ' & 0x0FF) == 0x020)
17551 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17552 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17554 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17555 || ('j' <= (c) && (c) <= 'r') \
17556 || ('s' <= (c) && (c) <= 'z'))
17557 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17560 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17565 for (i = 0; i < 256; i++)
17566 if (XOR (islower (i), ISLOWER (i))
17567 || toupper (i) != TOUPPER (i))
17568 $ac_main_return(2);
17569 $ac_main_return (0);
17572 rm -f "conftest$ac_exeext"
17573 if { (eval echo "$as_me:17573: \"$ac_link\"") >&5
17574 (eval $ac_link) 2>&5
17576 echo "$as_me:17576: \$? = $ac_status" >&5
17577 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17578 { (eval echo "$as_me:17578: \"$ac_try\"") >&5
17579 (eval $ac_try) 2>&5
17581 echo "$as_me:17581: \$? = $ac_status" >&5
17582 (exit "$ac_status"); }; }; then
17585 echo "$as_me: program exited with status $ac_status" >&5
17586 echo "$as_me: failed program was:" >&5
17587 cat "conftest.$ac_ext" >&5
17588 ac_cv_header_stdc=no
17590 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17594 echo "$as_me:17594: result: $ac_cv_header_stdc" >&5
17595 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17596 if test $ac_cv_header_stdc = yes; then
17598 cat >>confdefs.h <<\EOF
17599 #define STDC_HEADERS 1
17604 echo "$as_me:17604: checking whether time.h and sys/time.h may both be included" >&5
17605 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17606 if test "${ac_cv_header_time+set}" = set; then
17607 echo $ECHO_N "(cached) $ECHO_C" >&6
17609 cat >"conftest.$ac_ext" <<_ACEOF
17610 #line 17610 "configure"
17611 #include "confdefs.h"
17612 #include <sys/types.h>
17613 #include <sys/time.h>
17619 if ((struct tm *) 0)
17625 rm -f "conftest.$ac_objext"
17626 if { (eval echo "$as_me:17626: \"$ac_compile\"") >&5
17627 (eval $ac_compile) 2>&5
17629 echo "$as_me:17629: \$? = $ac_status" >&5
17630 (exit "$ac_status"); } &&
17631 { ac_try='test -s "conftest.$ac_objext"'
17632 { (eval echo "$as_me:17632: \"$ac_try\"") >&5
17633 (eval $ac_try) 2>&5
17635 echo "$as_me:17635: \$? = $ac_status" >&5
17636 (exit "$ac_status"); }; }; then
17637 ac_cv_header_time=yes
17639 echo "$as_me: failed program was:" >&5
17640 cat "conftest.$ac_ext" >&5
17641 ac_cv_header_time=no
17643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17645 echo "$as_me:17645: result: $ac_cv_header_time" >&5
17646 echo "${ECHO_T}$ac_cv_header_time" >&6
17647 if test $ac_cv_header_time = yes; then
17649 cat >>confdefs.h <<\EOF
17650 #define TIME_WITH_SYS_TIME 1
17668 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17669 echo "$as_me:17669: checking for $ac_header" >&5
17670 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17671 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17672 echo $ECHO_N "(cached) $ECHO_C" >&6
17674 cat >"conftest.$ac_ext" <<_ACEOF
17675 #line 17675 "configure"
17676 #include "confdefs.h"
17677 #include <$ac_header>
17679 if { (eval echo "$as_me:17679: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17680 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17682 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17684 cat conftest.err >&5
17685 echo "$as_me:17685: \$? = $ac_status" >&5
17686 (exit "$ac_status"); } >/dev/null; then
17687 if test -s conftest.err; then
17688 ac_cpp_err=$ac_c_preproc_warn_flag
17695 if test -z "$ac_cpp_err"; then
17696 eval "$as_ac_Header=yes"
17698 echo "$as_me: failed program was:" >&5
17699 cat "conftest.$ac_ext" >&5
17700 eval "$as_ac_Header=no"
17702 rm -f conftest.err "conftest.$ac_ext"
17704 echo "$as_me:17704: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17705 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17706 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17707 cat >>confdefs.h <<EOF
17708 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17714 for ac_header in unistd.h getopt.h
17716 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17717 echo "$as_me:17717: checking for $ac_header" >&5
17718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17720 echo $ECHO_N "(cached) $ECHO_C" >&6
17722 cat >"conftest.$ac_ext" <<_ACEOF
17723 #line 17723 "configure"
17724 #include "confdefs.h"
17725 #include <$ac_header>
17727 if { (eval echo "$as_me:17727: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17728 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17730 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17732 cat conftest.err >&5
17733 echo "$as_me:17733: \$? = $ac_status" >&5
17734 (exit "$ac_status"); } >/dev/null; then
17735 if test -s conftest.err; then
17736 ac_cpp_err=$ac_c_preproc_warn_flag
17743 if test -z "$ac_cpp_err"; then
17744 eval "$as_ac_Header=yes"
17746 echo "$as_me: failed program was:" >&5
17747 cat "conftest.$ac_ext" >&5
17748 eval "$as_ac_Header=no"
17750 rm -f conftest.err "conftest.$ac_ext"
17752 echo "$as_me:17752: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17753 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17754 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17755 cat >>confdefs.h <<EOF
17756 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17762 echo "$as_me:17762: checking for header declaring getopt variables" >&5
17763 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17764 if test "${cf_cv_getopt_header+set}" = set; then
17765 echo $ECHO_N "(cached) $ECHO_C" >&6
17768 cf_cv_getopt_header=none
17769 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17771 cat >"conftest.$ac_ext" <<_ACEOF
17772 #line 17772 "configure"
17773 #include "confdefs.h"
17775 #include <$cf_header>
17779 int x = optind; char *y = optarg
17784 rm -f "conftest.$ac_objext"
17785 if { (eval echo "$as_me:17785: \"$ac_compile\"") >&5
17786 (eval $ac_compile) 2>&5
17788 echo "$as_me:17788: \$? = $ac_status" >&5
17789 (exit "$ac_status"); } &&
17790 { ac_try='test -s "conftest.$ac_objext"'
17791 { (eval echo "$as_me:17791: \"$ac_try\"") >&5
17792 (eval $ac_try) 2>&5
17794 echo "$as_me:17794: \$? = $ac_status" >&5
17795 (exit "$ac_status"); }; }; then
17796 cf_cv_getopt_header=$cf_header
17799 echo "$as_me: failed program was:" >&5
17800 cat "conftest.$ac_ext" >&5
17802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17806 echo "$as_me:17806: result: $cf_cv_getopt_header" >&5
17807 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17808 if test "$cf_cv_getopt_header" != none ; then
17810 cat >>confdefs.h <<\EOF
17811 #define HAVE_GETOPT_HEADER 1
17815 if test "$cf_cv_getopt_header" = getopt.h ; then
17817 cat >>confdefs.h <<\EOF
17818 #define NEED_GETOPT_H 1
17832 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17833 echo "$as_me:17833: checking for $ac_func" >&5
17834 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17835 if eval "test \"\${$as_ac_var+set}\" = set"; then
17836 echo $ECHO_N "(cached) $ECHO_C" >&6
17838 cat >"conftest.$ac_ext" <<_ACEOF
17839 #line 17839 "configure"
17840 #include "confdefs.h"
17841 #define $ac_func autoconf_temporary
17842 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17849 /* We use char because int might match the return type of a gcc2
17850 builtin and then its argument prototype would still apply. */
17851 char $ac_func (void);
17857 /* The GNU C library defines stubs for functions which it implements
17858 to always fail with ENOSYS. Some functions are actually named
17859 something starting with __ and the normal name is an alias. */
17860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17861 #error found stub for $ac_func
17864 return $ac_func ();
17869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17870 if { (eval echo "$as_me:17870: \"$ac_link\"") >&5
17871 (eval $ac_link) 2>&5
17873 echo "$as_me:17873: \$? = $ac_status" >&5
17874 (exit "$ac_status"); } &&
17875 { ac_try='test -s "conftest$ac_exeext"'
17876 { (eval echo "$as_me:17876: \"$ac_try\"") >&5
17877 (eval $ac_try) 2>&5
17879 echo "$as_me:17879: \$? = $ac_status" >&5
17880 (exit "$ac_status"); }; }; then
17881 eval "$as_ac_var=yes"
17883 echo "$as_me: failed program was:" >&5
17884 cat "conftest.$ac_ext" >&5
17885 eval "$as_ac_var=no"
17887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17889 echo "$as_me:17889: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17890 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17891 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17892 cat >>confdefs.h <<EOF
17893 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17899 # use a compile-check to work with ncurses*-config and subdirectory includes
17900 echo "$as_me:17900: checking if we can use termcap.h" >&5
17901 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17902 if test "${cf_cv_have_termcap_h+set}" = set; then
17903 echo $ECHO_N "(cached) $ECHO_C" >&6
17906 cat >"conftest.$ac_ext" <<_ACEOF
17907 #line 17907 "configure"
17908 #include "confdefs.h"
17910 #include <curses.h>
17911 #ifdef NCURSES_VERSION
17912 #undef NCURSES_VERSION
17914 #include <termcap.h>
17915 #ifndef NCURSES_VERSION
17916 #error wrong header
17927 rm -f "conftest.$ac_objext"
17928 if { (eval echo "$as_me:17928: \"$ac_compile\"") >&5
17929 (eval $ac_compile) 2>&5
17931 echo "$as_me:17931: \$? = $ac_status" >&5
17932 (exit "$ac_status"); } &&
17933 { ac_try='test -s "conftest.$ac_objext"'
17934 { (eval echo "$as_me:17934: \"$ac_try\"") >&5
17935 (eval $ac_try) 2>&5
17937 echo "$as_me:17937: \$? = $ac_status" >&5
17938 (exit "$ac_status"); }; }; then
17939 cf_cv_have_termcap_h=yes
17941 echo "$as_me: failed program was:" >&5
17942 cat "conftest.$ac_ext" >&5
17943 cf_cv_have_termcap_h=no
17945 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17947 echo "$as_me:17947: result: $cf_cv_have_termcap_h" >&5
17948 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
17949 if test "x$cf_cv_have_termcap_h" = xyes
17952 cat >>confdefs.h <<\EOF
17953 #define HAVE_TERMCAP_H 1
17957 echo "$as_me:17957: checking if we can use ncurses/termcap.h" >&5
17958 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
17959 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
17960 echo $ECHO_N "(cached) $ECHO_C" >&6
17963 cat >"conftest.$ac_ext" <<_ACEOF
17964 #line 17964 "configure"
17965 #include "confdefs.h"
17967 #include <ncurses/curses.h>
17968 #ifdef NCURSES_VERSION
17969 #undef NCURSES_VERSION
17971 #include <ncurses/termcap.h>
17972 #ifndef NCURSES_VERSION
17973 #error wrong header
17984 rm -f "conftest.$ac_objext"
17985 if { (eval echo "$as_me:17985: \"$ac_compile\"") >&5
17986 (eval $ac_compile) 2>&5
17988 echo "$as_me:17988: \$? = $ac_status" >&5
17989 (exit "$ac_status"); } &&
17990 { ac_try='test -s "conftest.$ac_objext"'
17991 { (eval echo "$as_me:17991: \"$ac_try\"") >&5
17992 (eval $ac_try) 2>&5
17994 echo "$as_me:17994: \$? = $ac_status" >&5
17995 (exit "$ac_status"); }; }; then
17996 cf_cv_have_ncurses_termcap_h=yes
17998 echo "$as_me: failed program was:" >&5
17999 cat "conftest.$ac_ext" >&5
18000 cf_cv_have_ncurses_termcap_h=no
18002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18004 echo "$as_me:18004: result: $cf_cv_have_ncurses_termcap_h" >&5
18005 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18006 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18007 cat >>confdefs.h <<\EOF
18008 #define HAVE_NCURSES_TERMCAP_H 1
18013 if test "x$ac_cv_func_getopt" = xno; then
18014 { { echo "$as_me:18014: error: getopt is required for building programs" >&5
18015 echo "$as_me: error: getopt is required for building programs" >&2;}
18016 { (exit 1); exit 1; }; }
18019 if test "$cf_enable_widec" = yes; then
18032 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18033 echo "$as_me:18033: checking for $ac_func" >&5
18034 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18035 if eval "test \"\${$as_ac_var+set}\" = set"; then
18036 echo $ECHO_N "(cached) $ECHO_C" >&6
18038 cat >"conftest.$ac_ext" <<_ACEOF
18039 #line 18039 "configure"
18040 #include "confdefs.h"
18041 #define $ac_func autoconf_temporary
18042 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18049 /* We use char because int might match the return type of a gcc2
18050 builtin and then its argument prototype would still apply. */
18051 char $ac_func (void);
18057 /* The GNU C library defines stubs for functions which it implements
18058 to always fail with ENOSYS. Some functions are actually named
18059 something starting with __ and the normal name is an alias. */
18060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18061 #error found stub for $ac_func
18064 return $ac_func ();
18069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18070 if { (eval echo "$as_me:18070: \"$ac_link\"") >&5
18071 (eval $ac_link) 2>&5
18073 echo "$as_me:18073: \$? = $ac_status" >&5
18074 (exit "$ac_status"); } &&
18075 { ac_try='test -s "conftest$ac_exeext"'
18076 { (eval echo "$as_me:18076: \"$ac_try\"") >&5
18077 (eval $ac_try) 2>&5
18079 echo "$as_me:18079: \$? = $ac_status" >&5
18080 (exit "$ac_status"); }; }; then
18081 eval "$as_ac_var=yes"
18083 echo "$as_me: failed program was:" >&5
18084 cat "conftest.$ac_ext" >&5
18085 eval "$as_ac_var=no"
18087 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18089 echo "$as_me:18089: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18090 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18091 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18092 cat >>confdefs.h <<EOF
18093 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18101 echo "$as_me:18101: checking definition to turn on extended curses functions" >&5
18102 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18103 if test "${cf_cv_need_xopen_extension+set}" = set; then
18104 echo $ECHO_N "(cached) $ECHO_C" >&6
18107 cf_cv_need_xopen_extension=unknown
18108 cat >"conftest.$ac_ext" <<_ACEOF
18109 #line 18109 "configure"
18110 #include "confdefs.h"
18112 #include <stdlib.h>
18113 #include <${cf_cv_ncurses_header:-curses.h}>
18118 #if defined(NCURSES_VERSION_PATCH)
18119 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18123 #ifdef NCURSES_VERSION
18125 int check2 = curs_set((int)sizeof(check));
18127 long x = winnstr(stdscr, "", 0);
18129 #ifdef NCURSES_VERSION
18132 getbegyx(stdscr, y1, x1);
18141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18142 if { (eval echo "$as_me:18142: \"$ac_link\"") >&5
18143 (eval $ac_link) 2>&5
18145 echo "$as_me:18145: \$? = $ac_status" >&5
18146 (exit "$ac_status"); } &&
18147 { ac_try='test -s "conftest$ac_exeext"'
18148 { (eval echo "$as_me:18148: \"$ac_try\"") >&5
18149 (eval $ac_try) 2>&5
18151 echo "$as_me:18151: \$? = $ac_status" >&5
18152 (exit "$ac_status"); }; }; then
18153 cf_cv_need_xopen_extension=none
18155 echo "$as_me: failed program was:" >&5
18156 cat "conftest.$ac_ext" >&5
18158 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18160 cat >"conftest.$ac_ext" <<_ACEOF
18161 #line 18161 "configure"
18162 #include "confdefs.h"
18164 #define $cf_try_xopen_extension 1
18165 #include <stdlib.h>
18166 #include <${cf_cv_ncurses_header:-curses.h}>
18171 #ifdef NCURSES_VERSION
18173 int check2 = curs_set((int)sizeof(check));
18175 long x = winnstr(stdscr, "", 0);
18177 getbegyx(stdscr, y1, x1);
18178 #ifdef NCURSES_VERSION
18189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18190 if { (eval echo "$as_me:18190: \"$ac_link\"") >&5
18191 (eval $ac_link) 2>&5
18193 echo "$as_me:18193: \$? = $ac_status" >&5
18194 (exit "$ac_status"); } &&
18195 { ac_try='test -s "conftest$ac_exeext"'
18196 { (eval echo "$as_me:18196: \"$ac_try\"") >&5
18197 (eval $ac_try) 2>&5
18199 echo "$as_me:18199: \$? = $ac_status" >&5
18200 (exit "$ac_status"); }; }; then
18201 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18203 echo "$as_me: failed program was:" >&5
18204 cat "conftest.$ac_ext" >&5
18206 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18210 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18213 echo "$as_me:18213: result: $cf_cv_need_xopen_extension" >&5
18214 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18216 case "$cf_cv_need_xopen_extension" in
18219 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18220 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18225 echo "$as_me:18225: checking for term.h" >&5
18226 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18227 if test "${cf_cv_term_header+set}" = set; then
18228 echo $ECHO_N "(cached) $ECHO_C" >&6
18231 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18232 # for <term.h> if we do not find the variant.
18234 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18236 case "${cf_cv_ncurses_header:-curses.h}" in
18238 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18239 cf_header_list="$cf_header_item $cf_header_list"
18243 for cf_header in $cf_header_list
18245 cat >"conftest.$ac_ext" <<_ACEOF
18246 #line 18246 "configure"
18247 #include "confdefs.h"
18249 #include <${cf_cv_ncurses_header:-curses.h}>
18250 #include <${cf_header}>
18259 rm -f "conftest.$ac_objext"
18260 if { (eval echo "$as_me:18260: \"$ac_compile\"") >&5
18261 (eval $ac_compile) 2>&5
18263 echo "$as_me:18263: \$? = $ac_status" >&5
18264 (exit "$ac_status"); } &&
18265 { ac_try='test -s "conftest.$ac_objext"'
18266 { (eval echo "$as_me:18266: \"$ac_try\"") >&5
18267 (eval $ac_try) 2>&5
18269 echo "$as_me:18269: \$? = $ac_status" >&5
18270 (exit "$ac_status"); }; }; then
18271 cf_cv_term_header=$cf_header
18274 echo "$as_me: failed program was:" >&5
18275 cat "conftest.$ac_ext" >&5
18276 cf_cv_term_header=no
18278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18281 case "$cf_cv_term_header" in
18283 # If curses is ncurses, some packagers still mess it up by trying to make
18284 # us use GNU termcap. This handles the most common case.
18285 for cf_header in ncurses/term.h ncursesw/term.h
18287 cat >"conftest.$ac_ext" <<_ACEOF
18288 #line 18288 "configure"
18289 #include "confdefs.h"
18291 #include <${cf_cv_ncurses_header:-curses.h}>
18292 #ifdef NCURSES_VERSION
18293 #include <${cf_header}>
18305 rm -f "conftest.$ac_objext"
18306 if { (eval echo "$as_me:18306: \"$ac_compile\"") >&5
18307 (eval $ac_compile) 2>&5
18309 echo "$as_me:18309: \$? = $ac_status" >&5
18310 (exit "$ac_status"); } &&
18311 { ac_try='test -s "conftest.$ac_objext"'
18312 { (eval echo "$as_me:18312: \"$ac_try\"") >&5
18313 (eval $ac_try) 2>&5
18315 echo "$as_me:18315: \$? = $ac_status" >&5
18316 (exit "$ac_status"); }; }; then
18317 cf_cv_term_header=$cf_header
18320 echo "$as_me: failed program was:" >&5
18321 cat "conftest.$ac_ext" >&5
18322 cf_cv_term_header=no
18324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18330 echo "$as_me:18330: result: $cf_cv_term_header" >&5
18331 echo "${ECHO_T}$cf_cv_term_header" >&6
18333 case "$cf_cv_term_header" in
18336 cat >>confdefs.h <<\EOF
18337 #define HAVE_TERM_H 1
18343 cat >>confdefs.h <<\EOF
18344 #define HAVE_NCURSES_TERM_H 1
18350 cat >>confdefs.h <<\EOF
18351 #define HAVE_NCURSESW_TERM_H 1
18357 echo "$as_me:18357: checking for unctrl.h" >&5
18358 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18359 if test "${cf_cv_unctrl_header+set}" = set; then
18360 echo $ECHO_N "(cached) $ECHO_C" >&6
18363 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18364 # for <unctrl.h> if we do not find the variant.
18366 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18368 case "${cf_cv_ncurses_header:-curses.h}" in
18370 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18371 cf_header_list="$cf_header_item $cf_header_list"
18375 for cf_header in $cf_header_list
18377 cat >"conftest.$ac_ext" <<_ACEOF
18378 #line 18378 "configure"
18379 #include "confdefs.h"
18381 #include <${cf_cv_ncurses_header:-curses.h}>
18382 #include <${cf_header}>
18391 rm -f "conftest.$ac_objext"
18392 if { (eval echo "$as_me:18392: \"$ac_compile\"") >&5
18393 (eval $ac_compile) 2>&5
18395 echo "$as_me:18395: \$? = $ac_status" >&5
18396 (exit "$ac_status"); } &&
18397 { ac_try='test -s "conftest.$ac_objext"'
18398 { (eval echo "$as_me:18398: \"$ac_try\"") >&5
18399 (eval $ac_try) 2>&5
18401 echo "$as_me:18401: \$? = $ac_status" >&5
18402 (exit "$ac_status"); }; }; then
18403 cf_cv_unctrl_header=$cf_header
18406 echo "$as_me: failed program was:" >&5
18407 cat "conftest.$ac_ext" >&5
18408 cf_cv_unctrl_header=no
18410 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18414 echo "$as_me:18414: result: $cf_cv_unctrl_header" >&5
18415 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18417 case "$cf_cv_unctrl_header" in
18419 { echo "$as_me:18419: WARNING: unctrl.h header not found" >&5
18420 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18424 case "$cf_cv_unctrl_header" in
18427 cat >>confdefs.h <<\EOF
18428 #define HAVE_UNCTRL_H 1
18434 cat >>confdefs.h <<\EOF
18435 #define HAVE_NCURSES_UNCTRL_H 1
18439 (ncursesw/unctrl.h)
18441 cat >>confdefs.h <<\EOF
18442 #define HAVE_NCURSESW_UNCTRL_H 1
18450 assume_default_colors \
18467 init_extended_color \
18475 reset_color_pairs \
18491 use_default_colors \
18493 use_extended_names \
18509 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18511 echo "$as_me:18511: checking for ${cf_func}" >&5
18512 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18514 echo "${as_me:-configure}:18514: testing ${cf_func} ..." 1>&5
18516 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18517 echo $ECHO_N "(cached) $ECHO_C" >&6
18520 eval cf_result='$ac_cv_func_'$cf_func
18521 if test ".$cf_result" != ".no"; then
18522 cat >"conftest.$ac_ext" <<_ACEOF
18523 #line 18523 "configure"
18524 #include "confdefs.h"
18526 #ifdef HAVE_XCURSES
18527 #include <xcurses.h>
18528 char * XCursesProgramName = "test";
18530 #include <${cf_cv_ncurses_header:-curses.h}>
18531 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18532 #include <ncursesw/term.h>
18533 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18534 #include <ncurses/term.h>
18535 #elif defined(HAVE_TERM_H)
18545 long foo = (long)(&${cf_func});
18546 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18547 if (foo + 1234L > 5678L)
18548 ${cf_cv_main_return:-return}(foo != 0);
18555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18556 if { (eval echo "$as_me:18556: \"$ac_link\"") >&5
18557 (eval $ac_link) 2>&5
18559 echo "$as_me:18559: \$? = $ac_status" >&5
18560 (exit "$ac_status"); } &&
18561 { ac_try='test -s "conftest$ac_exeext"'
18562 { (eval echo "$as_me:18562: \"$ac_try\"") >&5
18563 (eval $ac_try) 2>&5
18565 echo "$as_me:18565: \$? = $ac_status" >&5
18566 (exit "$ac_status"); }; }; then
18569 echo "$as_me: failed program was:" >&5
18570 cat "conftest.$ac_ext" >&5
18573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18575 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18579 # use the computed/retrieved cache-value:
18580 eval 'cf_result=$cf_cv_func_'$cf_func
18581 echo "$as_me:18581: result: $cf_result" >&5
18582 echo "${ECHO_T}$cf_result" >&6
18583 if test "$cf_result" != no; then
18584 cat >>confdefs.h <<EOF
18585 #define HAVE_${cf_tr_func} 1
18591 for cf_func in tputs
18594 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18596 echo "$as_me:18596: checking for ${cf_func}" >&5
18597 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18599 echo "${as_me:-configure}:18599: testing ${cf_func} ..." 1>&5
18601 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18602 echo $ECHO_N "(cached) $ECHO_C" >&6
18605 eval cf_result='$ac_cv_func_'$cf_func
18606 if test ".$cf_result" != ".no"; then
18607 cat >"conftest.$ac_ext" <<_ACEOF
18608 #line 18608 "configure"
18609 #include "confdefs.h"
18611 #ifdef HAVE_XCURSES
18612 #include <xcurses.h>
18613 char * XCursesProgramName = "test";
18615 #include <${cf_cv_ncurses_header:-curses.h}>
18616 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18617 #include <ncursesw/term.h>
18618 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18619 #include <ncurses/term.h>
18620 #elif defined(HAVE_TERM_H)
18630 long foo = (long)(&${cf_func});
18631 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18632 if (foo + 1234L > 5678L)
18633 ${cf_cv_main_return:-return}(foo != 0);
18640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18641 if { (eval echo "$as_me:18641: \"$ac_link\"") >&5
18642 (eval $ac_link) 2>&5
18644 echo "$as_me:18644: \$? = $ac_status" >&5
18645 (exit "$ac_status"); } &&
18646 { ac_try='test -s "conftest$ac_exeext"'
18647 { (eval echo "$as_me:18647: \"$ac_try\"") >&5
18648 (eval $ac_try) 2>&5
18650 echo "$as_me:18650: \$? = $ac_status" >&5
18651 (exit "$ac_status"); }; }; then
18654 echo "$as_me: failed program was:" >&5
18655 cat "conftest.$ac_ext" >&5
18658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18660 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18664 # use the computed/retrieved cache-value:
18665 eval 'cf_result=$cf_cv_func_'$cf_func
18666 echo "$as_me:18666: result: $cf_result" >&5
18667 echo "${ECHO_T}$cf_result" >&6
18668 if test "$cf_result" != no; then
18669 cat >>confdefs.h <<EOF
18670 #define HAVE_${cf_tr_func} 1
18676 if test "x$cf_cv_func_tputs" = xyes
18679 for cf_arg in int char
18681 for cf_ret in int void
18683 if test "$cf_ret" = void
18685 cf_return="/* nothing */"
18687 cf_return="return value"
18689 cat >"conftest.$ac_ext" <<_ACEOF
18690 #line 18690 "configure"
18691 #include "confdefs.h"
18693 #include <${cf_cv_ncurses_header:-curses.h}>
18694 #include <$cf_cv_term_header>
18696 static $cf_ret outc($cf_arg value) { $cf_return; }
18702 tputs("hello", 0, outc);
18703 ${cf_cv_main_return:-return}(0);
18709 rm -f "conftest.$ac_objext"
18710 if { (eval echo "$as_me:18710: \"$ac_compile\"") >&5
18711 (eval $ac_compile) 2>&5
18713 echo "$as_me:18713: \$? = $ac_status" >&5
18714 (exit "$ac_status"); } &&
18715 { ac_try='test -s "conftest.$ac_objext"'
18716 { (eval echo "$as_me:18716: \"$ac_try\"") >&5
18717 (eval $ac_try) 2>&5
18719 echo "$as_me:18719: \$? = $ac_status" >&5
18720 (exit "$ac_status"); }; }; then
18722 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18724 echo "${as_me:-configure}:18724: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18726 cat >>confdefs.h <<EOF
18727 #define TPUTS_ARG $cf_arg
18728 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18729 #define TPUTS_RETURN(value) $cf_return
18735 echo "$as_me: failed program was:" >&5
18736 cat "conftest.$ac_ext" >&5
18738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18740 test "$cf_done" = yes && break
18744 echo "$as_me:18744: checking for ncurses extended functions" >&5
18745 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18746 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18747 echo $ECHO_N "(cached) $ECHO_C" >&6
18750 cat >"conftest.$ac_ext" <<_ACEOF
18751 #line 18751 "configure"
18752 #include "confdefs.h"
18754 #include <${cf_cv_ncurses_header:-curses.h}>
18759 int x = NCURSES_EXT_FUNCS
18765 rm -f "conftest.$ac_objext"
18766 if { (eval echo "$as_me:18766: \"$ac_compile\"") >&5
18767 (eval $ac_compile) 2>&5
18769 echo "$as_me:18769: \$? = $ac_status" >&5
18770 (exit "$ac_status"); } &&
18771 { ac_try='test -s "conftest.$ac_objext"'
18772 { (eval echo "$as_me:18772: \"$ac_try\"") >&5
18773 (eval $ac_try) 2>&5
18775 echo "$as_me:18775: \$? = $ac_status" >&5
18776 (exit "$ac_status"); }; }; then
18777 cf_cv_ncurses_ext_funcs=defined
18779 echo "$as_me: failed program was:" >&5
18780 cat "conftest.$ac_ext" >&5
18782 cat >"conftest.$ac_ext" <<_ACEOF
18783 #line 18783 "configure"
18784 #include "confdefs.h"
18786 #include <${cf_cv_ncurses_header:-curses.h}>
18791 (void) assume_default_colors (0, 0);
18792 (void) curses_version ();
18793 (void) define_key (0, 0);
18794 (void) is_term_resized (0, 0);
18795 (void) key_defined (0);
18796 (void) keybound (0, 0);
18797 (void) keyok (0, 0);
18798 (void) resize_term (0, 0);
18799 (void) resizeterm (0, 0);
18800 (void) use_default_colors ();
18801 (void) use_extended_names (0);
18802 (void) wresize (0, 0, 0);
18807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18808 if { (eval echo "$as_me:18808: \"$ac_link\"") >&5
18809 (eval $ac_link) 2>&5
18811 echo "$as_me:18811: \$? = $ac_status" >&5
18812 (exit "$ac_status"); } &&
18813 { ac_try='test -s "conftest$ac_exeext"'
18814 { (eval echo "$as_me:18814: \"$ac_try\"") >&5
18815 (eval $ac_try) 2>&5
18817 echo "$as_me:18817: \$? = $ac_status" >&5
18818 (exit "$ac_status"); }; }; then
18819 cf_cv_ncurses_ext_funcs=yes
18821 echo "$as_me: failed program was:" >&5
18822 cat "conftest.$ac_ext" >&5
18823 cf_cv_ncurses_ext_funcs=no
18825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18828 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18831 echo "$as_me:18831: result: $cf_cv_ncurses_ext_funcs" >&5
18832 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18833 test "$cf_cv_ncurses_ext_funcs" = yes &&
18834 cat >>confdefs.h <<\EOF
18835 #define NCURSES_EXT_FUNCS 1
18838 if test "$cf_enable_widec" = yes
18840 # workaround for systems with ncurses before 20111029, due to change of
18841 # feature test macro from _XPG5 to _XOPEN_SOURCE
18842 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18845 echo "$as_me:18845: checking if _XPG5 should be defined to enable wide-characters" >&5
18846 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18848 cat >"conftest.$ac_ext" <<_ACEOF
18849 #line 18849 "configure"
18850 #include "confdefs.h"
18852 #include <${cf_cv_ncurses_header:-curses.h}>
18861 rm -f "conftest.$ac_objext"
18862 if { (eval echo "$as_me:18862: \"$ac_compile\"") >&5
18863 (eval $ac_compile) 2>&5
18865 echo "$as_me:18865: \$? = $ac_status" >&5
18866 (exit "$ac_status"); } &&
18867 { ac_try='test -s "conftest.$ac_objext"'
18868 { (eval echo "$as_me:18868: \"$ac_try\"") >&5
18869 (eval $ac_try) 2>&5
18871 echo "$as_me:18871: \$? = $ac_status" >&5
18872 (exit "$ac_status"); }; }; then
18875 echo "$as_me: failed program was:" >&5
18876 cat "conftest.$ac_ext" >&5
18877 cf_save_cppflags="$CPPFLAGS"
18878 CPPFLAGS="$CPPFLAGS -D_XPG5"
18879 cat >"conftest.$ac_ext" <<_ACEOF
18880 #line 18880 "configure"
18881 #include "confdefs.h"
18883 #include <${cf_cv_ncurses_header:-curses.h}>
18892 rm -f "conftest.$ac_objext"
18893 if { (eval echo "$as_me:18893: \"$ac_compile\"") >&5
18894 (eval $ac_compile) 2>&5
18896 echo "$as_me:18896: \$? = $ac_status" >&5
18897 (exit "$ac_status"); } &&
18898 { ac_try='test -s "conftest.$ac_objext"'
18899 { (eval echo "$as_me:18899: \"$ac_try\"") >&5
18900 (eval $ac_try) 2>&5
18902 echo "$as_me:18902: \$? = $ac_status" >&5
18903 (exit "$ac_status"); }; }; then
18906 echo "$as_me: failed program was:" >&5
18907 cat "conftest.$ac_ext" >&5
18909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18910 CPPFLAGS="$cf_save_cppflags"
18912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18913 echo "$as_me:18913: result: $cf_define_xpg5" >&5
18914 echo "${ECHO_T}$cf_define_xpg5" >&6
18916 if test "$cf_define_xpg5" = yes
18918 CPPFLAGS="$CPPFLAGS -D_XPG5"
18922 echo "$as_me:18922: checking for wide-character functions" >&5
18923 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18924 if test "${cf_cv_widechar_funcs+set}" = set; then
18925 echo $ECHO_N "(cached) $ECHO_C" >&6
18928 cat >"conftest.$ac_ext" <<_ACEOF
18929 #line 18929 "configure"
18930 #include "confdefs.h"
18932 #include <${cf_cv_ncurses_header:-curses.h}>
18937 static wchar_t src_wchar[2];
18938 static cchar_t dst_cchar;
18939 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
18945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18946 if { (eval echo "$as_me:18946: \"$ac_link\"") >&5
18947 (eval $ac_link) 2>&5
18949 echo "$as_me:18949: \$? = $ac_status" >&5
18950 (exit "$ac_status"); } &&
18951 { ac_try='test -s "conftest$ac_exeext"'
18952 { (eval echo "$as_me:18952: \"$ac_try\"") >&5
18953 (eval $ac_try) 2>&5
18955 echo "$as_me:18955: \$? = $ac_status" >&5
18956 (exit "$ac_status"); }; }; then
18957 cf_cv_widechar_funcs=yes
18959 echo "$as_me: failed program was:" >&5
18960 cat "conftest.$ac_ext" >&5
18961 cf_cv_widechar_funcs=no
18963 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18966 echo "$as_me:18966: result: $cf_cv_widechar_funcs" >&5
18967 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
18968 if test "$cf_cv_widechar_funcs" != no ; then
18970 cat >>confdefs.h <<\EOF
18971 #define USE_WIDEC_SUPPORT 1
18975 cat >>confdefs.h <<\EOF
18976 #define USE_WIDEC_SUPPORT 0
18981 cat >>confdefs.h <<\EOF
18982 #define USE_WIDEC_SUPPORT 0
18987 echo "$as_me:18987: checking if $cf_cv_screen library uses pthreads" >&5
18988 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
18989 if test "${cf_cv_use_pthreads+set}" = set; then
18990 echo $ECHO_N "(cached) $ECHO_C" >&6
18993 cat >"conftest.$ac_ext" <<_ACEOF
18994 #line 18994 "configure"
18995 #include "confdefs.h"
18997 #include <${cf_cv_ncurses_header:-curses.h}>
18998 extern void _nc_init_pthreads(void);
19005 _nc_init_pthreads();
19011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19012 if { (eval echo "$as_me:19012: \"$ac_link\"") >&5
19013 (eval $ac_link) 2>&5
19015 echo "$as_me:19015: \$? = $ac_status" >&5
19016 (exit "$ac_status"); } &&
19017 { ac_try='test -s "conftest$ac_exeext"'
19018 { (eval echo "$as_me:19018: \"$ac_try\"") >&5
19019 (eval $ac_try) 2>&5
19021 echo "$as_me:19021: \$? = $ac_status" >&5
19022 (exit "$ac_status"); }; }; then
19023 cf_cv_use_pthreads=yes
19025 echo "$as_me: failed program was:" >&5
19026 cat "conftest.$ac_ext" >&5
19027 cf_cv_use_pthreads=no
19029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19032 echo "$as_me:19032: result: $cf_cv_use_pthreads" >&5
19033 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19034 test $cf_cv_use_pthreads = yes &&
19035 cat >>confdefs.h <<\EOF
19036 #define USE_PTHREADS 1
19039 echo "$as_me:19039: checking if sys/time.h works with sys/select.h" >&5
19040 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19041 if test "${cf_cv_sys_time_select+set}" = set; then
19042 echo $ECHO_N "(cached) $ECHO_C" >&6
19045 cat >"conftest.$ac_ext" <<_ACEOF
19046 #line 19046 "configure"
19047 #include "confdefs.h"
19049 #include <sys/types.h>
19050 #ifdef HAVE_SYS_TIME_H
19051 #include <sys/time.h>
19053 #ifdef HAVE_SYS_SELECT_H
19054 #include <sys/select.h>
19065 rm -f "conftest.$ac_objext"
19066 if { (eval echo "$as_me:19066: \"$ac_compile\"") >&5
19067 (eval $ac_compile) 2>&5
19069 echo "$as_me:19069: \$? = $ac_status" >&5
19070 (exit "$ac_status"); } &&
19071 { ac_try='test -s "conftest.$ac_objext"'
19072 { (eval echo "$as_me:19072: \"$ac_try\"") >&5
19073 (eval $ac_try) 2>&5
19075 echo "$as_me:19075: \$? = $ac_status" >&5
19076 (exit "$ac_status"); }; }; then
19077 cf_cv_sys_time_select=yes
19079 echo "$as_me: failed program was:" >&5
19080 cat "conftest.$ac_ext" >&5
19081 cf_cv_sys_time_select=no
19083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19087 echo "$as_me:19087: result: $cf_cv_sys_time_select" >&5
19088 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19089 test "$cf_cv_sys_time_select" = yes &&
19090 cat >>confdefs.h <<\EOF
19091 #define HAVE_SYS_TIME_SELECT 1
19094 # special check for test/ditto.c
19096 echo "$as_me:19096: checking for openpty in -lutil" >&5
19097 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19098 if test "${ac_cv_lib_util_openpty+set}" = set; then
19099 echo $ECHO_N "(cached) $ECHO_C" >&6
19101 ac_check_lib_save_LIBS=$LIBS
19102 LIBS="-lutil $LIBS"
19103 cat >"conftest.$ac_ext" <<_ACEOF
19104 #line 19104 "configure"
19105 #include "confdefs.h"
19107 /* Override any gcc2 internal prototype to avoid an error. */
19111 /* We use char because int might match the return type of a gcc2
19112 builtin and then its argument prototype would still apply. */
19122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19123 if { (eval echo "$as_me:19123: \"$ac_link\"") >&5
19124 (eval $ac_link) 2>&5
19126 echo "$as_me:19126: \$? = $ac_status" >&5
19127 (exit "$ac_status"); } &&
19128 { ac_try='test -s "conftest$ac_exeext"'
19129 { (eval echo "$as_me:19129: \"$ac_try\"") >&5
19130 (eval $ac_try) 2>&5
19132 echo "$as_me:19132: \$? = $ac_status" >&5
19133 (exit "$ac_status"); }; }; then
19134 ac_cv_lib_util_openpty=yes
19136 echo "$as_me: failed program was:" >&5
19137 cat "conftest.$ac_ext" >&5
19138 ac_cv_lib_util_openpty=no
19140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19141 LIBS=$ac_check_lib_save_LIBS
19143 echo "$as_me:19143: result: $ac_cv_lib_util_openpty" >&5
19144 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19145 if test "$ac_cv_lib_util_openpty" = yes; then
19151 echo "$as_me:19151: checking for openpty header" >&5
19152 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19153 if test "${cf_cv_func_openpty+set}" = set; then
19154 echo $ECHO_N "(cached) $ECHO_C" >&6
19157 cf_save_LIBS="$LIBS"
19158 test "$cf_cv_lib_util" = yes && {
19159 cf_add_libs="$LIBS"
19162 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19163 # filter duplicates
19164 for cf_add_1lib in $cf_add_0lib; do
19165 for cf_add_2lib in $cf_add_libs; do
19166 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19171 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19173 LIBS="$cf_add_libs"
19175 for cf_header in pty.h libutil.h util.h
19177 cat >"conftest.$ac_ext" <<_ACEOF
19178 #line 19178 "configure"
19179 #include "confdefs.h"
19181 #include <$cf_header>
19187 int x = openpty((int *)0, (int *)0, (char *)0,
19188 (struct termios *)0, (struct winsize *)0);
19194 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19195 if { (eval echo "$as_me:19195: \"$ac_link\"") >&5
19196 (eval $ac_link) 2>&5
19198 echo "$as_me:19198: \$? = $ac_status" >&5
19199 (exit "$ac_status"); } &&
19200 { ac_try='test -s "conftest$ac_exeext"'
19201 { (eval echo "$as_me:19201: \"$ac_try\"") >&5
19202 (eval $ac_try) 2>&5
19204 echo "$as_me:19204: \$? = $ac_status" >&5
19205 (exit "$ac_status"); }; }; then
19207 cf_cv_func_openpty=$cf_header
19211 echo "$as_me: failed program was:" >&5
19212 cat "conftest.$ac_ext" >&5
19214 cf_cv_func_openpty=no
19217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19219 LIBS="$cf_save_LIBS"
19222 echo "$as_me:19222: result: $cf_cv_func_openpty" >&5
19223 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19225 if test "$cf_cv_func_openpty" != no ; then
19227 cat >>confdefs.h <<EOF
19228 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19231 cat >>confdefs.h <<\EOF
19232 #define USE_XTERM_PTY 1
19235 if test "x$cf_cv_lib_util" = xyes ; then
19237 cf_add_libs="$TEST_LIBS"
19240 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19241 # filter duplicates
19242 for cf_add_1lib in $cf_add_0lib; do
19243 for cf_add_2lib in $cf_add_libs; do
19244 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19249 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19251 TEST_LIBS="$cf_add_libs"
19256 echo "$as_me:19256: checking for function curses_version" >&5
19257 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19258 if test "${cf_cv_func_curses_version+set}" = set; then
19259 echo $ECHO_N "(cached) $ECHO_C" >&6
19262 if test "$cross_compiling" = yes; then
19263 cf_cv_func_curses_version=unknown
19265 cat >"conftest.$ac_ext" <<_ACEOF
19266 #line 19266 "configure"
19267 #include "confdefs.h"
19269 #include <${cf_cv_ncurses_header:-curses.h}>
19273 sprintf(temp, "%s\\n", curses_version());
19274 ${cf_cv_main_return:-return}(0);
19278 rm -f "conftest$ac_exeext"
19279 if { (eval echo "$as_me:19279: \"$ac_link\"") >&5
19280 (eval $ac_link) 2>&5
19282 echo "$as_me:19282: \$? = $ac_status" >&5
19283 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19284 { (eval echo "$as_me:19284: \"$ac_try\"") >&5
19285 (eval $ac_try) 2>&5
19287 echo "$as_me:19287: \$? = $ac_status" >&5
19288 (exit "$ac_status"); }; }; then
19289 cf_cv_func_curses_version=yes
19292 echo "$as_me: program exited with status $ac_status" >&5
19293 echo "$as_me: failed program was:" >&5
19294 cat "conftest.$ac_ext" >&5
19295 cf_cv_func_curses_version=no
19298 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19302 echo "$as_me:19302: result: $cf_cv_func_curses_version" >&5
19303 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19304 test "$cf_cv_func_curses_version" = yes &&
19305 cat >>confdefs.h <<\EOF
19306 #define HAVE_CURSES_VERSION 1
19309 echo "$as_me:19309: checking for alternate character set array" >&5
19310 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19311 if test "${cf_cv_curses_acs_map+set}" = set; then
19312 echo $ECHO_N "(cached) $ECHO_C" >&6
19315 cf_cv_curses_acs_map=unknown
19316 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19318 cat >"conftest.$ac_ext" <<_ACEOF
19319 #line 19319 "configure"
19320 #include "confdefs.h"
19322 #include <${cf_cv_ncurses_header:-curses.h}>
19328 ${name}['k'] = ACS_PLUS
19334 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19335 if { (eval echo "$as_me:19335: \"$ac_link\"") >&5
19336 (eval $ac_link) 2>&5
19338 echo "$as_me:19338: \$? = $ac_status" >&5
19339 (exit "$ac_status"); } &&
19340 { ac_try='test -s "conftest$ac_exeext"'
19341 { (eval echo "$as_me:19341: \"$ac_try\"") >&5
19342 (eval $ac_try) 2>&5
19344 echo "$as_me:19344: \$? = $ac_status" >&5
19345 (exit "$ac_status"); }; }; then
19346 cf_cv_curses_acs_map=$name; break
19348 echo "$as_me: failed program was:" >&5
19349 cat "conftest.$ac_ext" >&5
19351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19355 echo "$as_me:19355: result: $cf_cv_curses_acs_map" >&5
19356 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19358 test "$cf_cv_curses_acs_map" != unknown &&
19359 cat >>confdefs.h <<EOF
19360 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19363 if test "$cf_enable_widec" = yes; then
19365 echo "$as_me:19365: checking for wide alternate character set array" >&5
19366 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19367 if test "${cf_cv_curses_wacs_map+set}" = set; then
19368 echo $ECHO_N "(cached) $ECHO_C" >&6
19371 cf_cv_curses_wacs_map=unknown
19372 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19374 cat >"conftest.$ac_ext" <<_ACEOF
19375 #line 19375 "configure"
19376 #include "confdefs.h"
19378 #ifndef _XOPEN_SOURCE_EXTENDED
19379 #define _XOPEN_SOURCE_EXTENDED
19381 #include <${cf_cv_ncurses_header:-curses.h}>
19385 void *foo = &(${name}['k']); (void)foo
19390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19391 if { (eval echo "$as_me:19391: \"$ac_link\"") >&5
19392 (eval $ac_link) 2>&5
19394 echo "$as_me:19394: \$? = $ac_status" >&5
19395 (exit "$ac_status"); } &&
19396 { ac_try='test -s "conftest$ac_exeext"'
19397 { (eval echo "$as_me:19397: \"$ac_try\"") >&5
19398 (eval $ac_try) 2>&5
19400 echo "$as_me:19400: \$? = $ac_status" >&5
19401 (exit "$ac_status"); }; }; then
19402 cf_cv_curses_wacs_map=$name
19405 echo "$as_me: failed program was:" >&5
19406 cat "conftest.$ac_ext" >&5
19408 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19411 echo "$as_me:19411: result: $cf_cv_curses_wacs_map" >&5
19412 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19414 test "$cf_cv_curses_wacs_map" != unknown &&
19415 cat >>confdefs.h <<EOF
19416 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19419 echo "$as_me:19419: checking for wide alternate character constants" >&5
19420 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19421 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19422 echo $ECHO_N "(cached) $ECHO_C" >&6
19425 cf_cv_curses_wacs_symbols=no
19426 if test "$cf_cv_curses_wacs_map" != unknown
19428 cat >"conftest.$ac_ext" <<_ACEOF
19429 #line 19429 "configure"
19430 #include "confdefs.h"
19432 #ifndef _XOPEN_SOURCE_EXTENDED
19433 #define _XOPEN_SOURCE_EXTENDED
19435 #include <${cf_cv_ncurses_header:-curses.h}>
19439 cchar_t *foo = WACS_PLUS;
19440 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19446 if { (eval echo "$as_me:19446: \"$ac_link\"") >&5
19447 (eval $ac_link) 2>&5
19449 echo "$as_me:19449: \$? = $ac_status" >&5
19450 (exit "$ac_status"); } &&
19451 { ac_try='test -s "conftest$ac_exeext"'
19452 { (eval echo "$as_me:19452: \"$ac_try\"") >&5
19453 (eval $ac_try) 2>&5
19455 echo "$as_me:19455: \$? = $ac_status" >&5
19456 (exit "$ac_status"); }; }; then
19457 cf_cv_curses_wacs_symbols=yes
19459 echo "$as_me: failed program was:" >&5
19460 cat "conftest.$ac_ext" >&5
19462 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19464 cat >"conftest.$ac_ext" <<_ACEOF
19465 #line 19465 "configure"
19466 #include "confdefs.h"
19468 #ifndef _XOPEN_SOURCE_EXTENDED
19469 #define _XOPEN_SOURCE_EXTENDED
19471 #include <${cf_cv_ncurses_header:-curses.h}>
19475 cchar_t *foo = WACS_PLUS; (void)foo
19480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19481 if { (eval echo "$as_me:19481: \"$ac_link\"") >&5
19482 (eval $ac_link) 2>&5
19484 echo "$as_me:19484: \$? = $ac_status" >&5
19485 (exit "$ac_status"); } &&
19486 { ac_try='test -s "conftest$ac_exeext"'
19487 { (eval echo "$as_me:19487: \"$ac_try\"") >&5
19488 (eval $ac_try) 2>&5
19490 echo "$as_me:19490: \$? = $ac_status" >&5
19491 (exit "$ac_status"); }; }; then
19492 cf_cv_curses_wacs_symbols=yes
19494 echo "$as_me: failed program was:" >&5
19495 cat "conftest.$ac_ext" >&5
19497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19501 echo "$as_me:19501: result: $cf_cv_curses_wacs_symbols" >&5
19502 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19504 test "$cf_cv_curses_wacs_symbols" != no &&
19505 cat >>confdefs.h <<\EOF
19506 #define CURSES_WACS_SYMBOLS 1
19511 echo "$as_me:19511: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19512 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19513 cat >"conftest.$ac_ext" <<_ACEOF
19514 #line 19514 "configure"
19515 #include "confdefs.h"
19517 #ifndef _XOPEN_SOURCE_EXTENDED
19518 #define _XOPEN_SOURCE_EXTENDED
19520 #include <${cf_cv_ncurses_header:-curses.h}>
19531 rm -f "conftest.$ac_objext"
19532 if { (eval echo "$as_me:19532: \"$ac_compile\"") >&5
19533 (eval $ac_compile) 2>&5
19535 echo "$as_me:19535: \$? = $ac_status" >&5
19536 (exit "$ac_status"); } &&
19537 { ac_try='test -s "conftest.$ac_objext"'
19538 { (eval echo "$as_me:19538: \"$ac_try\"") >&5
19539 (eval $ac_try) 2>&5
19541 echo "$as_me:19541: \$? = $ac_status" >&5
19542 (exit "$ac_status"); }; }; then
19545 echo "$as_me: failed program was:" >&5
19546 cat "conftest.$ac_ext" >&5
19549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19550 echo "$as_me:19550: result: $cf_result" >&5
19551 echo "${ECHO_T}$cf_result" >&6
19552 if test "$cf_result" = yes ; then
19554 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19556 cat >>confdefs.h <<EOF
19557 #define $cf_result 1
19562 cat >>confdefs.h <<EOF
19563 #define attr_t long
19568 if test "$cf_enable_widec" = yes; then
19570 # This is needed on Tru64 5.0 to declare mbstate_t
19571 echo "$as_me:19571: checking if we must include wchar.h to declare mbstate_t" >&5
19572 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19573 if test "${cf_cv_mbstate_t+set}" = set; then
19574 echo $ECHO_N "(cached) $ECHO_C" >&6
19577 cat >"conftest.$ac_ext" <<_ACEOF
19578 #line 19578 "configure"
19579 #include "confdefs.h"
19581 #include <stdlib.h>
19582 #include <stdarg.h>
19584 #ifdef HAVE_LIBUTF8_H
19585 #include <libutf8.h>
19595 rm -f "conftest.$ac_objext"
19596 if { (eval echo "$as_me:19596: \"$ac_compile\"") >&5
19597 (eval $ac_compile) 2>&5
19599 echo "$as_me:19599: \$? = $ac_status" >&5
19600 (exit "$ac_status"); } &&
19601 { ac_try='test -s "conftest.$ac_objext"'
19602 { (eval echo "$as_me:19602: \"$ac_try\"") >&5
19603 (eval $ac_try) 2>&5
19605 echo "$as_me:19605: \$? = $ac_status" >&5
19606 (exit "$ac_status"); }; }; then
19609 echo "$as_me: failed program was:" >&5
19610 cat "conftest.$ac_ext" >&5
19611 cat >"conftest.$ac_ext" <<_ACEOF
19612 #line 19612 "configure"
19613 #include "confdefs.h"
19615 #include <stdlib.h>
19616 #include <stdarg.h>
19619 #ifdef HAVE_LIBUTF8_H
19620 #include <libutf8.h>
19630 rm -f "conftest.$ac_objext"
19631 if { (eval echo "$as_me:19631: \"$ac_compile\"") >&5
19632 (eval $ac_compile) 2>&5
19634 echo "$as_me:19634: \$? = $ac_status" >&5
19635 (exit "$ac_status"); } &&
19636 { ac_try='test -s "conftest.$ac_objext"'
19637 { (eval echo "$as_me:19637: \"$ac_try\"") >&5
19638 (eval $ac_try) 2>&5
19640 echo "$as_me:19640: \$? = $ac_status" >&5
19641 (exit "$ac_status"); }; }; then
19642 cf_cv_mbstate_t=yes
19644 echo "$as_me: failed program was:" >&5
19645 cat "conftest.$ac_ext" >&5
19646 cf_cv_mbstate_t=unknown
19648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19652 echo "$as_me:19652: result: $cf_cv_mbstate_t" >&5
19653 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19655 if test "$cf_cv_mbstate_t" = yes ; then
19657 cat >>confdefs.h <<\EOF
19658 #define NEED_WCHAR_H 1
19664 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19665 if test "$cf_cv_mbstate_t" = unknown ; then
19666 NCURSES_MBSTATE_T=1
19669 # if we find mbstate_t in either place, use substitution to provide a fallback.
19670 if test "$cf_cv_mbstate_t" != unknown ; then
19671 NCURSES_OK_MBSTATE_T=1
19674 # This is needed on Tru64 5.0 to declare wchar_t
19675 echo "$as_me:19675: checking if we must include wchar.h to declare wchar_t" >&5
19676 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19677 if test "${cf_cv_wchar_t+set}" = set; then
19678 echo $ECHO_N "(cached) $ECHO_C" >&6
19681 cat >"conftest.$ac_ext" <<_ACEOF
19682 #line 19682 "configure"
19683 #include "confdefs.h"
19685 #include <stdlib.h>
19686 #include <stdarg.h>
19688 #ifdef HAVE_LIBUTF8_H
19689 #include <libutf8.h>
19699 rm -f "conftest.$ac_objext"
19700 if { (eval echo "$as_me:19700: \"$ac_compile\"") >&5
19701 (eval $ac_compile) 2>&5
19703 echo "$as_me:19703: \$? = $ac_status" >&5
19704 (exit "$ac_status"); } &&
19705 { ac_try='test -s "conftest.$ac_objext"'
19706 { (eval echo "$as_me:19706: \"$ac_try\"") >&5
19707 (eval $ac_try) 2>&5
19709 echo "$as_me:19709: \$? = $ac_status" >&5
19710 (exit "$ac_status"); }; }; then
19713 echo "$as_me: failed program was:" >&5
19714 cat "conftest.$ac_ext" >&5
19715 cat >"conftest.$ac_ext" <<_ACEOF
19716 #line 19716 "configure"
19717 #include "confdefs.h"
19719 #include <stdlib.h>
19720 #include <stdarg.h>
19723 #ifdef HAVE_LIBUTF8_H
19724 #include <libutf8.h>
19734 rm -f "conftest.$ac_objext"
19735 if { (eval echo "$as_me:19735: \"$ac_compile\"") >&5
19736 (eval $ac_compile) 2>&5
19738 echo "$as_me:19738: \$? = $ac_status" >&5
19739 (exit "$ac_status"); } &&
19740 { ac_try='test -s "conftest.$ac_objext"'
19741 { (eval echo "$as_me:19741: \"$ac_try\"") >&5
19742 (eval $ac_try) 2>&5
19744 echo "$as_me:19744: \$? = $ac_status" >&5
19745 (exit "$ac_status"); }; }; then
19748 echo "$as_me: failed program was:" >&5
19749 cat "conftest.$ac_ext" >&5
19750 cf_cv_wchar_t=unknown
19752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19756 echo "$as_me:19756: result: $cf_cv_wchar_t" >&5
19757 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19759 if test "$cf_cv_wchar_t" = yes ; then
19761 cat >>confdefs.h <<\EOF
19762 #define NEED_WCHAR_H 1
19768 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19769 if test "$cf_cv_wchar_t" = unknown ; then
19773 # if we find wchar_t in either place, use substitution to provide a fallback.
19774 if test "$cf_cv_wchar_t" != unknown ; then
19775 NCURSES_OK_WCHAR_T=1
19778 # This is needed on Tru64 5.0 to declare wint_t
19779 echo "$as_me:19779: checking if we must include wchar.h to declare wint_t" >&5
19780 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19781 if test "${cf_cv_wint_t+set}" = set; then
19782 echo $ECHO_N "(cached) $ECHO_C" >&6
19785 cat >"conftest.$ac_ext" <<_ACEOF
19786 #line 19786 "configure"
19787 #include "confdefs.h"
19789 #include <stdlib.h>
19790 #include <stdarg.h>
19792 #ifdef HAVE_LIBUTF8_H
19793 #include <libutf8.h>
19803 rm -f "conftest.$ac_objext"
19804 if { (eval echo "$as_me:19804: \"$ac_compile\"") >&5
19805 (eval $ac_compile) 2>&5
19807 echo "$as_me:19807: \$? = $ac_status" >&5
19808 (exit "$ac_status"); } &&
19809 { ac_try='test -s "conftest.$ac_objext"'
19810 { (eval echo "$as_me:19810: \"$ac_try\"") >&5
19811 (eval $ac_try) 2>&5
19813 echo "$as_me:19813: \$? = $ac_status" >&5
19814 (exit "$ac_status"); }; }; then
19817 echo "$as_me: failed program was:" >&5
19818 cat "conftest.$ac_ext" >&5
19819 cat >"conftest.$ac_ext" <<_ACEOF
19820 #line 19820 "configure"
19821 #include "confdefs.h"
19823 #include <stdlib.h>
19824 #include <stdarg.h>
19827 #ifdef HAVE_LIBUTF8_H
19828 #include <libutf8.h>
19838 rm -f "conftest.$ac_objext"
19839 if { (eval echo "$as_me:19839: \"$ac_compile\"") >&5
19840 (eval $ac_compile) 2>&5
19842 echo "$as_me:19842: \$? = $ac_status" >&5
19843 (exit "$ac_status"); } &&
19844 { ac_try='test -s "conftest.$ac_objext"'
19845 { (eval echo "$as_me:19845: \"$ac_try\"") >&5
19846 (eval $ac_try) 2>&5
19848 echo "$as_me:19848: \$? = $ac_status" >&5
19849 (exit "$ac_status"); }; }; then
19852 echo "$as_me: failed program was:" >&5
19853 cat "conftest.$ac_ext" >&5
19854 cf_cv_wint_t=unknown
19856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19860 echo "$as_me:19860: result: $cf_cv_wint_t" >&5
19861 echo "${ECHO_T}$cf_cv_wint_t" >&6
19863 if test "$cf_cv_wint_t" = yes ; then
19865 cat >>confdefs.h <<\EOF
19866 #define NEED_WCHAR_H 1
19872 # if we do not find wint_t in either place, use substitution to provide a fallback.
19873 if test "$cf_cv_wint_t" = unknown ; then
19877 # if we find wint_t in either place, use substitution to provide a fallback.
19878 if test "$cf_cv_wint_t" != unknown ; then
19879 NCURSES_OK_WINT_T=1
19882 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19884 echo "$as_me:19884: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19885 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19886 cat >"conftest.$ac_ext" <<_ACEOF
19887 #line 19887 "configure"
19888 #include "confdefs.h"
19890 #ifndef _XOPEN_SOURCE_EXTENDED
19891 #define _XOPEN_SOURCE_EXTENDED
19893 #include <${cf_cv_ncurses_header:-curses.h}>
19904 rm -f "conftest.$ac_objext"
19905 if { (eval echo "$as_me:19905: \"$ac_compile\"") >&5
19906 (eval $ac_compile) 2>&5
19908 echo "$as_me:19908: \$? = $ac_status" >&5
19909 (exit "$ac_status"); } &&
19910 { ac_try='test -s "conftest.$ac_objext"'
19911 { (eval echo "$as_me:19911: \"$ac_try\"") >&5
19912 (eval $ac_try) 2>&5
19914 echo "$as_me:19914: \$? = $ac_status" >&5
19915 (exit "$ac_status"); }; }; then
19918 echo "$as_me: failed program was:" >&5
19919 cat "conftest.$ac_ext" >&5
19922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19923 echo "$as_me:19923: result: $cf_result" >&5
19924 echo "${ECHO_T}$cf_result" >&6
19925 if test "$cf_result" = yes ; then
19927 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19929 cat >>confdefs.h <<EOF
19930 #define $cf_result 1
19935 cat >>confdefs.h <<EOF
19936 #define mbstate_t long
19943 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
19945 echo "$as_me:19945: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19946 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19947 cat >"conftest.$ac_ext" <<_ACEOF
19948 #line 19948 "configure"
19949 #include "confdefs.h"
19951 #ifndef _XOPEN_SOURCE_EXTENDED
19952 #define _XOPEN_SOURCE_EXTENDED
19954 #include <${cf_cv_ncurses_header:-curses.h}>
19965 rm -f "conftest.$ac_objext"
19966 if { (eval echo "$as_me:19966: \"$ac_compile\"") >&5
19967 (eval $ac_compile) 2>&5
19969 echo "$as_me:19969: \$? = $ac_status" >&5
19970 (exit "$ac_status"); } &&
19971 { ac_try='test -s "conftest.$ac_objext"'
19972 { (eval echo "$as_me:19972: \"$ac_try\"") >&5
19973 (eval $ac_try) 2>&5
19975 echo "$as_me:19975: \$? = $ac_status" >&5
19976 (exit "$ac_status"); }; }; then
19979 echo "$as_me: failed program was:" >&5
19980 cat "conftest.$ac_ext" >&5
19983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19984 echo "$as_me:19984: result: $cf_result" >&5
19985 echo "${ECHO_T}$cf_result" >&6
19986 if test "$cf_result" = yes ; then
19988 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19990 cat >>confdefs.h <<EOF
19991 #define $cf_result 1
19996 cat >>confdefs.h <<EOF
19997 #define wchar_t long
20004 if test "$NCURSES_OK_WINT_T" = 0 ; then
20006 echo "$as_me:20006: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20007 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20008 cat >"conftest.$ac_ext" <<_ACEOF
20009 #line 20009 "configure"
20010 #include "confdefs.h"
20012 #ifndef _XOPEN_SOURCE_EXTENDED
20013 #define _XOPEN_SOURCE_EXTENDED
20015 #include <${cf_cv_ncurses_header:-curses.h}>
20026 rm -f "conftest.$ac_objext"
20027 if { (eval echo "$as_me:20027: \"$ac_compile\"") >&5
20028 (eval $ac_compile) 2>&5
20030 echo "$as_me:20030: \$? = $ac_status" >&5
20031 (exit "$ac_status"); } &&
20032 { ac_try='test -s "conftest.$ac_objext"'
20033 { (eval echo "$as_me:20033: \"$ac_try\"") >&5
20034 (eval $ac_try) 2>&5
20036 echo "$as_me:20036: \$? = $ac_status" >&5
20037 (exit "$ac_status"); }; }; then
20040 echo "$as_me: failed program was:" >&5
20041 cat "conftest.$ac_ext" >&5
20044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20045 echo "$as_me:20045: result: $cf_result" >&5
20046 echo "${ECHO_T}$cf_result" >&6
20047 if test "$cf_result" = yes ; then
20049 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20051 cat >>confdefs.h <<EOF
20052 #define $cf_result 1
20057 cat >>confdefs.h <<EOF
20058 #define wint_t long
20074 echo "$as_me:20074: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20075 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20077 cat >"conftest.$ac_ext" <<_ACEOF
20078 #line 20078 "configure"
20079 #include "confdefs.h"
20081 #ifdef HAVE_XCURSES
20082 #include <xcurses.h>
20083 char * XCursesProgramName = "test";
20085 #include <${cf_cv_ncurses_header:-curses.h}>
20086 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20087 #include <ncursesw/term.h>
20088 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20089 #include <ncurses/term.h>
20090 #elif defined(HAVE_TERM_H)
20099 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20100 const void *foo = (const void *)($cf_data);
20102 const void *foo = &($cf_data);
20104 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20110 rm -f "conftest.$ac_objext"
20111 if { (eval echo "$as_me:20111: \"$ac_compile\"") >&5
20112 (eval $ac_compile) 2>&5
20114 echo "$as_me:20114: \$? = $ac_status" >&5
20115 (exit "$ac_status"); } &&
20116 { ac_try='test -s "conftest.$ac_objext"'
20117 { (eval echo "$as_me:20117: \"$ac_try\"") >&5
20118 (eval $ac_try) 2>&5
20120 echo "$as_me:20120: \$? = $ac_status" >&5
20121 (exit "$ac_status"); }; }; then
20125 echo "$as_me: failed program was:" >&5
20126 cat "conftest.$ac_ext" >&5
20129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20130 echo "$as_me:20130: result: $cf_result" >&5
20131 echo "${ECHO_T}$cf_result" >&6
20133 if test "$cf_result" = yes ; then
20135 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20137 cat >>confdefs.h <<EOF
20138 #define $cf_result 1
20142 echo "$as_me:20142: checking for data $cf_data in library" >&5
20143 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20144 # BSD linkers insist on making weak linkage, but resolve at runtime.
20145 if test "$cross_compiling" = yes; then
20148 cat >"conftest.$ac_ext" <<_ACEOF
20149 #line 20149 "configure"
20150 #include "confdefs.h"
20152 #ifdef HAVE_XCURSES
20153 #include <xcurses.h>
20154 char * XCursesProgramName = "test";
20156 #include <${cf_cv_ncurses_header:-curses.h}>
20157 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20158 #include <ncursesw/term.h>
20159 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20160 #include <ncurses/term.h>
20161 #elif defined(HAVE_TERM_H)
20166 extern char $cf_data;
20173 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20174 const void *foo = (const void *)($cf_data);
20176 const void *foo = &($cf_data);
20178 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20180 ${cf_cv_main_return:-return}(foo == 0);
20187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20188 if { (eval echo "$as_me:20188: \"$ac_link\"") >&5
20189 (eval $ac_link) 2>&5
20191 echo "$as_me:20191: \$? = $ac_status" >&5
20192 (exit "$ac_status"); } &&
20193 { ac_try='test -s "conftest$ac_exeext"'
20194 { (eval echo "$as_me:20194: \"$ac_try\"") >&5
20195 (eval $ac_try) 2>&5
20197 echo "$as_me:20197: \$? = $ac_status" >&5
20198 (exit "$ac_status"); }; }; then
20201 echo "$as_me: failed program was:" >&5
20202 cat "conftest.$ac_ext" >&5
20205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20208 cat >"conftest.$ac_ext" <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20212 #ifdef HAVE_XCURSES
20213 #include <xcurses.h>
20214 char * XCursesProgramName = "test";
20216 #include <${cf_cv_ncurses_header:-curses.h}>
20217 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20218 #include <ncursesw/term.h>
20219 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20220 #include <ncurses/term.h>
20221 #elif defined(HAVE_TERM_H)
20226 extern char $cf_data;
20230 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20231 const void *foo = (const void *)($cf_data);
20233 const void *foo = &($cf_data);
20235 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20237 ${cf_cv_main_return:-return}(foo == 0);
20240 rm -f "conftest$ac_exeext"
20241 if { (eval echo "$as_me:20241: \"$ac_link\"") >&5
20242 (eval $ac_link) 2>&5
20244 echo "$as_me:20244: \$? = $ac_status" >&5
20245 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20246 { (eval echo "$as_me:20246: \"$ac_try\"") >&5
20247 (eval $ac_try) 2>&5
20249 echo "$as_me:20249: \$? = $ac_status" >&5
20250 (exit "$ac_status"); }; }; then
20254 echo "$as_me: program exited with status $ac_status" >&5
20255 echo "$as_me: failed program was:" >&5
20256 cat "conftest.$ac_ext" >&5
20259 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20261 echo "$as_me:20261: result: $cf_result" >&5
20262 echo "${ECHO_T}$cf_result" >&6
20263 if test "$cf_result" = yes ; then
20265 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20267 cat >>confdefs.h <<EOF
20268 #define $cf_result 1
20271 # do not exit loop here, since we prefer system's declarations
20276 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20278 echo "$as_me:20278: checking for X" >&5
20279 echo $ECHO_N "checking for X... $ECHO_C" >&6
20281 # Check whether --with-x or --without-x was given.
20282 if test "${with_x+set}" = set; then
20286 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20287 if test "x$with_x" = xno; then
20288 # The user explicitly disabled X.
20291 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20292 # Both variables are already set.
20295 if test "${ac_cv_have_x+set}" = set; then
20296 echo $ECHO_N "(cached) $ECHO_C" >&6
20298 # One or both of the vars are not set, and there is no cached value.
20299 ac_x_includes=no ac_x_libraries=no
20300 rm -fr conftest.dir
20301 if mkdir conftest.dir; then
20303 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20304 cat >Imakefile <<'EOF'
20306 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20308 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20309 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20310 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20311 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20312 for ac_extension in a so sl dylib dll; do
20313 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20314 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20315 ac_im_usrlibdir=$ac_im_libdir; break
20318 # Screen out bogus values from the imake configuration. They are
20319 # bogus both because they are the default anyway, and because
20320 # using them would break gcc on systems where it needs fixed includes.
20321 case $ac_im_incroot in
20323 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20325 case $ac_im_usrlibdir in
20326 /usr/lib | /lib) ;;
20327 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20331 rm -fr conftest.dir
20334 # Standard set of common directories for X headers.
20335 # Check X11 before X11Rn because it is often a symlink to the current release.
20352 /usr/local/X11/include
20353 /usr/local/X11R7/include
20354 /usr/local/X11R6/include
20355 /usr/local/X11R5/include
20356 /usr/local/X11R4/include
20358 /usr/local/include/X11
20359 /usr/local/include/X11R7
20360 /usr/local/include/X11R6
20361 /usr/local/include/X11R5
20362 /usr/local/include/X11R4
20366 /usr/XFree86/include/X11
20370 /usr/unsupported/include
20371 /usr/athena/include
20372 /usr/local/x11r5/include
20373 /usr/lpp/Xamples/include
20375 /usr/openwin/include
20376 /usr/openwin/share/include'
20378 if test "$ac_x_includes" = no; then
20379 # Guess where to find include files, by looking for Intrinsic.h.
20380 # First, try using that file with no special directory specified.
20381 cat >"conftest.$ac_ext" <<_ACEOF
20382 #line 20382 "configure"
20383 #include "confdefs.h"
20384 #include <X11/Intrinsic.h>
20386 if { (eval echo "$as_me:20386: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20387 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20389 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20391 cat conftest.err >&5
20392 echo "$as_me:20392: \$? = $ac_status" >&5
20393 (exit "$ac_status"); } >/dev/null; then
20394 if test -s conftest.err; then
20395 ac_cpp_err=$ac_c_preproc_warn_flag
20402 if test -z "$ac_cpp_err"; then
20403 # We can compile using X headers with no special include directory.
20406 echo "$as_me: failed program was:" >&5
20407 cat "conftest.$ac_ext" >&5
20408 for ac_dir in $ac_x_header_dirs; do
20409 if test -r "$ac_dir/X11/Intrinsic.h"; then
20410 ac_x_includes=$ac_dir
20415 rm -f conftest.err "conftest.$ac_ext"
20416 fi # $ac_x_includes = no
20418 if test "$ac_x_libraries" = no; then
20419 # Check for the libraries.
20420 # See if we find them without any special options.
20421 # Don't add to $LIBS permanently.
20424 cat >"conftest.$ac_ext" <<_ACEOF
20425 #line 20425 "configure"
20426 #include "confdefs.h"
20427 #include <X11/Intrinsic.h>
20436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20437 if { (eval echo "$as_me:20437: \"$ac_link\"") >&5
20438 (eval $ac_link) 2>&5
20440 echo "$as_me:20440: \$? = $ac_status" >&5
20441 (exit "$ac_status"); } &&
20442 { ac_try='test -s "conftest$ac_exeext"'
20443 { (eval echo "$as_me:20443: \"$ac_try\"") >&5
20444 (eval $ac_try) 2>&5
20446 echo "$as_me:20446: \$? = $ac_status" >&5
20447 (exit "$ac_status"); }; }; then
20449 # We can link X programs with no special library path.
20452 echo "$as_me: failed program was:" >&5
20453 cat "conftest.$ac_ext" >&5
20455 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20457 # Don't even attempt the hair of trying to link an X program!
20458 for ac_extension in a so sl dylib dll; do
20459 if test -r "$ac_dir/libXt.$ac_extension"; then
20460 ac_x_libraries=$ac_dir
20466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20467 fi # $ac_x_libraries = no
20469 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20470 # Didn't find X anywhere. Cache the known absence of X.
20471 ac_cv_have_x="have_x=no"
20473 # Record where we found X for the cache.
20474 ac_cv_have_x="have_x=yes \
20475 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20480 eval "$ac_cv_have_x"
20483 if test "$have_x" != yes; then
20484 echo "$as_me:20484: result: $have_x" >&5
20485 echo "${ECHO_T}$have_x" >&6
20488 # If each of the values was on the command line, it overrides each guess.
20489 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20490 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20491 # Update the cache value to reflect the command line values.
20492 ac_cv_have_x="have_x=yes \
20493 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20494 echo "$as_me:20494: result: libraries $x_libraries, headers $x_includes" >&5
20495 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20498 if test "$no_x" = yes; then
20499 # Not all programs may use this symbol, but it does not hurt to define it.
20501 cat >>confdefs.h <<\EOF
20502 #define X_DISPLAY_MISSING 1
20510 if test -n "$x_includes"; then
20511 X_CFLAGS="$X_CFLAGS -I$x_includes"
20514 # It would also be nice to do this for all -L options, not just this one.
20515 if test -n "$x_libraries"; then
20516 X_LIBS="$X_LIBS -L$x_libraries"
20517 # For Solaris; some versions of Sun CC require a space after -R and
20518 # others require no space. Words are not sufficient . . . .
20519 case `(uname -sr) 2>/dev/null` in
20521 echo "$as_me:20521: checking whether -R must be followed by a space" >&5
20522 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20523 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20524 cat >"conftest.$ac_ext" <<_ACEOF
20525 #line 20525 "configure"
20526 #include "confdefs.h"
20536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20537 if { (eval echo "$as_me:20537: \"$ac_link\"") >&5
20538 (eval $ac_link) 2>&5
20540 echo "$as_me:20540: \$? = $ac_status" >&5
20541 (exit "$ac_status"); } &&
20542 { ac_try='test -s "conftest$ac_exeext"'
20543 { (eval echo "$as_me:20543: \"$ac_try\"") >&5
20544 (eval $ac_try) 2>&5
20546 echo "$as_me:20546: \$? = $ac_status" >&5
20547 (exit "$ac_status"); }; }; then
20550 echo "$as_me: failed program was:" >&5
20551 cat "conftest.$ac_ext" >&5
20554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20555 if test $ac_R_nospace = yes; then
20556 echo "$as_me:20556: result: no" >&5
20557 echo "${ECHO_T}no" >&6
20558 X_LIBS="$X_LIBS -R$x_libraries"
20560 LIBS="$ac_xsave_LIBS -R $x_libraries"
20561 cat >"conftest.$ac_ext" <<_ACEOF
20562 #line 20562 "configure"
20563 #include "confdefs.h"
20573 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20574 if { (eval echo "$as_me:20574: \"$ac_link\"") >&5
20575 (eval $ac_link) 2>&5
20577 echo "$as_me:20577: \$? = $ac_status" >&5
20578 (exit "$ac_status"); } &&
20579 { ac_try='test -s "conftest$ac_exeext"'
20580 { (eval echo "$as_me:20580: \"$ac_try\"") >&5
20581 (eval $ac_try) 2>&5
20583 echo "$as_me:20583: \$? = $ac_status" >&5
20584 (exit "$ac_status"); }; }; then
20587 echo "$as_me: failed program was:" >&5
20588 cat "conftest.$ac_ext" >&5
20591 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20592 if test $ac_R_space = yes; then
20593 echo "$as_me:20593: result: yes" >&5
20594 echo "${ECHO_T}yes" >&6
20595 X_LIBS="$X_LIBS -R $x_libraries"
20597 echo "$as_me:20597: result: neither works" >&5
20598 echo "${ECHO_T}neither works" >&6
20601 LIBS=$ac_xsave_LIBS
20605 # Check for system-dependent libraries X programs must link with.
20606 # Do this before checking for the system-independent R6 libraries
20607 # (-lICE), since we may need -lsocket or whatever for X linking.
20609 if test "$ISC" = yes; then
20610 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20612 # Martyn Johnson says this is needed for Ultrix, if the X
20613 # libraries were built with DECnet support. And Karl Berry says
20614 # the Alpha needs dnet_stub (dnet does not exist).
20615 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20616 cat >"conftest.$ac_ext" <<_ACEOF
20617 #line 20617 "configure"
20618 #include "confdefs.h"
20620 /* Override any gcc2 internal prototype to avoid an error. */
20624 /* We use char because int might match the return type of a gcc2
20625 builtin and then its argument prototype would still apply. */
20626 char XOpenDisplay ();
20635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20636 if { (eval echo "$as_me:20636: \"$ac_link\"") >&5
20637 (eval $ac_link) 2>&5
20639 echo "$as_me:20639: \$? = $ac_status" >&5
20640 (exit "$ac_status"); } &&
20641 { ac_try='test -s "conftest$ac_exeext"'
20642 { (eval echo "$as_me:20642: \"$ac_try\"") >&5
20643 (eval $ac_try) 2>&5
20645 echo "$as_me:20645: \$? = $ac_status" >&5
20646 (exit "$ac_status"); }; }; then
20649 echo "$as_me: failed program was:" >&5
20650 cat "conftest.$ac_ext" >&5
20651 echo "$as_me:20651: checking for dnet_ntoa in -ldnet" >&5
20652 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20653 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20654 echo $ECHO_N "(cached) $ECHO_C" >&6
20656 ac_check_lib_save_LIBS=$LIBS
20657 LIBS="-ldnet $LIBS"
20658 cat >"conftest.$ac_ext" <<_ACEOF
20659 #line 20659 "configure"
20660 #include "confdefs.h"
20662 /* Override any gcc2 internal prototype to avoid an error. */
20666 /* We use char because int might match the return type of a gcc2
20667 builtin and then its argument prototype would still apply. */
20677 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20678 if { (eval echo "$as_me:20678: \"$ac_link\"") >&5
20679 (eval $ac_link) 2>&5
20681 echo "$as_me:20681: \$? = $ac_status" >&5
20682 (exit "$ac_status"); } &&
20683 { ac_try='test -s "conftest$ac_exeext"'
20684 { (eval echo "$as_me:20684: \"$ac_try\"") >&5
20685 (eval $ac_try) 2>&5
20687 echo "$as_me:20687: \$? = $ac_status" >&5
20688 (exit "$ac_status"); }; }; then
20689 ac_cv_lib_dnet_dnet_ntoa=yes
20691 echo "$as_me: failed program was:" >&5
20692 cat "conftest.$ac_ext" >&5
20693 ac_cv_lib_dnet_dnet_ntoa=no
20695 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20696 LIBS=$ac_check_lib_save_LIBS
20698 echo "$as_me:20698: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20699 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20700 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20701 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20704 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20705 echo "$as_me:20705: checking for dnet_ntoa in -ldnet_stub" >&5
20706 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20707 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20708 echo $ECHO_N "(cached) $ECHO_C" >&6
20710 ac_check_lib_save_LIBS=$LIBS
20711 LIBS="-ldnet_stub $LIBS"
20712 cat >"conftest.$ac_ext" <<_ACEOF
20713 #line 20713 "configure"
20714 #include "confdefs.h"
20716 /* Override any gcc2 internal prototype to avoid an error. */
20720 /* We use char because int might match the return type of a gcc2
20721 builtin and then its argument prototype would still apply. */
20731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20732 if { (eval echo "$as_me:20732: \"$ac_link\"") >&5
20733 (eval $ac_link) 2>&5
20735 echo "$as_me:20735: \$? = $ac_status" >&5
20736 (exit "$ac_status"); } &&
20737 { ac_try='test -s "conftest$ac_exeext"'
20738 { (eval echo "$as_me:20738: \"$ac_try\"") >&5
20739 (eval $ac_try) 2>&5
20741 echo "$as_me:20741: \$? = $ac_status" >&5
20742 (exit "$ac_status"); }; }; then
20743 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20745 echo "$as_me: failed program was:" >&5
20746 cat "conftest.$ac_ext" >&5
20747 ac_cv_lib_dnet_stub_dnet_ntoa=no
20749 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20750 LIBS=$ac_check_lib_save_LIBS
20752 echo "$as_me:20752: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20753 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20754 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20755 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20761 LIBS="$ac_xsave_LIBS"
20763 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20764 # to get the SysV transport functions.
20765 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20767 # The nsl library prevents programs from opening the X display
20768 # on Irix 5.2, according to T.E. Dickey.
20769 # The functions gethostbyname, getservbyname, and inet_addr are
20770 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20771 echo "$as_me:20771: checking for gethostbyname" >&5
20772 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20773 if test "${ac_cv_func_gethostbyname+set}" = set; then
20774 echo $ECHO_N "(cached) $ECHO_C" >&6
20776 cat >"conftest.$ac_ext" <<_ACEOF
20777 #line 20777 "configure"
20778 #include "confdefs.h"
20779 #define gethostbyname autoconf_temporary
20780 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20781 #undef gethostbyname
20787 /* We use char because int might match the return type of a gcc2
20788 builtin and then its argument prototype would still apply. */
20789 char gethostbyname (void);
20795 /* The GNU C library defines stubs for functions which it implements
20796 to always fail with ENOSYS. Some functions are actually named
20797 something starting with __ and the normal name is an alias. */
20798 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20799 #error found stub for gethostbyname
20802 return gethostbyname ();
20807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20808 if { (eval echo "$as_me:20808: \"$ac_link\"") >&5
20809 (eval $ac_link) 2>&5
20811 echo "$as_me:20811: \$? = $ac_status" >&5
20812 (exit "$ac_status"); } &&
20813 { ac_try='test -s "conftest$ac_exeext"'
20814 { (eval echo "$as_me:20814: \"$ac_try\"") >&5
20815 (eval $ac_try) 2>&5
20817 echo "$as_me:20817: \$? = $ac_status" >&5
20818 (exit "$ac_status"); }; }; then
20819 ac_cv_func_gethostbyname=yes
20821 echo "$as_me: failed program was:" >&5
20822 cat "conftest.$ac_ext" >&5
20823 ac_cv_func_gethostbyname=no
20825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20827 echo "$as_me:20827: result: $ac_cv_func_gethostbyname" >&5
20828 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20830 if test $ac_cv_func_gethostbyname = no; then
20831 echo "$as_me:20831: checking for gethostbyname in -lnsl" >&5
20832 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20833 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20834 echo $ECHO_N "(cached) $ECHO_C" >&6
20836 ac_check_lib_save_LIBS=$LIBS
20838 cat >"conftest.$ac_ext" <<_ACEOF
20839 #line 20839 "configure"
20840 #include "confdefs.h"
20842 /* Override any gcc2 internal prototype to avoid an error. */
20846 /* We use char because int might match the return type of a gcc2
20847 builtin and then its argument prototype would still apply. */
20848 char gethostbyname ();
20857 rm -f "conftest.$ac_objext" "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"); } &&
20863 { ac_try='test -s "conftest$ac_exeext"'
20864 { (eval echo "$as_me:20864: \"$ac_try\"") >&5
20865 (eval $ac_try) 2>&5
20867 echo "$as_me:20867: \$? = $ac_status" >&5
20868 (exit "$ac_status"); }; }; then
20869 ac_cv_lib_nsl_gethostbyname=yes
20871 echo "$as_me: failed program was:" >&5
20872 cat "conftest.$ac_ext" >&5
20873 ac_cv_lib_nsl_gethostbyname=no
20875 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20876 LIBS=$ac_check_lib_save_LIBS
20878 echo "$as_me:20878: result: $ac_cv_lib_nsl_gethostbyname" >&5
20879 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20880 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
20881 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20884 if test $ac_cv_lib_nsl_gethostbyname = no; then
20885 echo "$as_me:20885: checking for gethostbyname in -lbsd" >&5
20886 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20887 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20888 echo $ECHO_N "(cached) $ECHO_C" >&6
20890 ac_check_lib_save_LIBS=$LIBS
20892 cat >"conftest.$ac_ext" <<_ACEOF
20893 #line 20893 "configure"
20894 #include "confdefs.h"
20896 /* Override any gcc2 internal prototype to avoid an error. */
20900 /* We use char because int might match the return type of a gcc2
20901 builtin and then its argument prototype would still apply. */
20902 char gethostbyname ();
20911 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20912 if { (eval echo "$as_me:20912: \"$ac_link\"") >&5
20913 (eval $ac_link) 2>&5
20915 echo "$as_me:20915: \$? = $ac_status" >&5
20916 (exit "$ac_status"); } &&
20917 { ac_try='test -s "conftest$ac_exeext"'
20918 { (eval echo "$as_me:20918: \"$ac_try\"") >&5
20919 (eval $ac_try) 2>&5
20921 echo "$as_me:20921: \$? = $ac_status" >&5
20922 (exit "$ac_status"); }; }; then
20923 ac_cv_lib_bsd_gethostbyname=yes
20925 echo "$as_me: failed program was:" >&5
20926 cat "conftest.$ac_ext" >&5
20927 ac_cv_lib_bsd_gethostbyname=no
20929 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20930 LIBS=$ac_check_lib_save_LIBS
20932 echo "$as_me:20932: result: $ac_cv_lib_bsd_gethostbyname" >&5
20933 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
20934 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
20935 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
20941 # lieder@skyler.mavd.honeywell.com says without -lsocket,
20942 # socket/setsockopt and other routines are undefined under SCO ODT
20943 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
20944 # on later versions), says Simon Leinen: it contains gethostby*
20945 # variants that don't use the nameserver (or something). -lsocket
20946 # must be given before -lnsl if both are needed. We assume that
20947 # if connect needs -lnsl, so does gethostbyname.
20948 echo "$as_me:20948: checking for connect" >&5
20949 echo $ECHO_N "checking for connect... $ECHO_C" >&6
20950 if test "${ac_cv_func_connect+set}" = set; then
20951 echo $ECHO_N "(cached) $ECHO_C" >&6
20953 cat >"conftest.$ac_ext" <<_ACEOF
20954 #line 20954 "configure"
20955 #include "confdefs.h"
20956 #define connect autoconf_temporary
20957 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20964 /* We use char because int might match the return type of a gcc2
20965 builtin and then its argument prototype would still apply. */
20966 char connect (void);
20972 /* The GNU C library defines stubs for functions which it implements
20973 to always fail with ENOSYS. Some functions are actually named
20974 something starting with __ and the normal name is an alias. */
20975 #if defined (__stub_connect) || defined (__stub___connect)
20976 #error found stub for connect
20984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20985 if { (eval echo "$as_me:20985: \"$ac_link\"") >&5
20986 (eval $ac_link) 2>&5
20988 echo "$as_me:20988: \$? = $ac_status" >&5
20989 (exit "$ac_status"); } &&
20990 { ac_try='test -s "conftest$ac_exeext"'
20991 { (eval echo "$as_me:20991: \"$ac_try\"") >&5
20992 (eval $ac_try) 2>&5
20994 echo "$as_me:20994: \$? = $ac_status" >&5
20995 (exit "$ac_status"); }; }; then
20996 ac_cv_func_connect=yes
20998 echo "$as_me: failed program was:" >&5
20999 cat "conftest.$ac_ext" >&5
21000 ac_cv_func_connect=no
21002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21004 echo "$as_me:21004: result: $ac_cv_func_connect" >&5
21005 echo "${ECHO_T}$ac_cv_func_connect" >&6
21007 if test $ac_cv_func_connect = no; then
21008 echo "$as_me:21008: checking for connect in -lsocket" >&5
21009 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21010 if test "${ac_cv_lib_socket_connect+set}" = set; then
21011 echo $ECHO_N "(cached) $ECHO_C" >&6
21013 ac_check_lib_save_LIBS=$LIBS
21014 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21015 cat >"conftest.$ac_ext" <<_ACEOF
21016 #line 21016 "configure"
21017 #include "confdefs.h"
21019 /* Override any gcc2 internal prototype to avoid an error. */
21023 /* We use char because int might match the return type of a gcc2
21024 builtin and then its argument prototype would still apply. */
21034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21035 if { (eval echo "$as_me:21035: \"$ac_link\"") >&5
21036 (eval $ac_link) 2>&5
21038 echo "$as_me:21038: \$? = $ac_status" >&5
21039 (exit "$ac_status"); } &&
21040 { ac_try='test -s "conftest$ac_exeext"'
21041 { (eval echo "$as_me:21041: \"$ac_try\"") >&5
21042 (eval $ac_try) 2>&5
21044 echo "$as_me:21044: \$? = $ac_status" >&5
21045 (exit "$ac_status"); }; }; then
21046 ac_cv_lib_socket_connect=yes
21048 echo "$as_me: failed program was:" >&5
21049 cat "conftest.$ac_ext" >&5
21050 ac_cv_lib_socket_connect=no
21052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21053 LIBS=$ac_check_lib_save_LIBS
21055 echo "$as_me:21055: result: $ac_cv_lib_socket_connect" >&5
21056 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21057 if test "$ac_cv_lib_socket_connect" = yes; then
21058 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21063 # Guillermo Gomez says -lposix is necessary on A/UX.
21064 echo "$as_me:21064: checking for remove" >&5
21065 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21066 if test "${ac_cv_func_remove+set}" = set; then
21067 echo $ECHO_N "(cached) $ECHO_C" >&6
21069 cat >"conftest.$ac_ext" <<_ACEOF
21070 #line 21070 "configure"
21071 #include "confdefs.h"
21072 #define remove autoconf_temporary
21073 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21080 /* We use char because int might match the return type of a gcc2
21081 builtin and then its argument prototype would still apply. */
21082 char remove (void);
21088 /* The GNU C library defines stubs for functions which it implements
21089 to always fail with ENOSYS. Some functions are actually named
21090 something starting with __ and the normal name is an alias. */
21091 #if defined (__stub_remove) || defined (__stub___remove)
21092 #error found stub for remove
21100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21101 if { (eval echo "$as_me:21101: \"$ac_link\"") >&5
21102 (eval $ac_link) 2>&5
21104 echo "$as_me:21104: \$? = $ac_status" >&5
21105 (exit "$ac_status"); } &&
21106 { ac_try='test -s "conftest$ac_exeext"'
21107 { (eval echo "$as_me:21107: \"$ac_try\"") >&5
21108 (eval $ac_try) 2>&5
21110 echo "$as_me:21110: \$? = $ac_status" >&5
21111 (exit "$ac_status"); }; }; then
21112 ac_cv_func_remove=yes
21114 echo "$as_me: failed program was:" >&5
21115 cat "conftest.$ac_ext" >&5
21116 ac_cv_func_remove=no
21118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21120 echo "$as_me:21120: result: $ac_cv_func_remove" >&5
21121 echo "${ECHO_T}$ac_cv_func_remove" >&6
21123 if test $ac_cv_func_remove = no; then
21124 echo "$as_me:21124: checking for remove in -lposix" >&5
21125 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21126 if test "${ac_cv_lib_posix_remove+set}" = set; then
21127 echo $ECHO_N "(cached) $ECHO_C" >&6
21129 ac_check_lib_save_LIBS=$LIBS
21130 LIBS="-lposix $LIBS"
21131 cat >"conftest.$ac_ext" <<_ACEOF
21132 #line 21132 "configure"
21133 #include "confdefs.h"
21135 /* Override any gcc2 internal prototype to avoid an error. */
21139 /* We use char because int might match the return type of a gcc2
21140 builtin and then its argument prototype would still apply. */
21150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21151 if { (eval echo "$as_me:21151: \"$ac_link\"") >&5
21152 (eval $ac_link) 2>&5
21154 echo "$as_me:21154: \$? = $ac_status" >&5
21155 (exit "$ac_status"); } &&
21156 { ac_try='test -s "conftest$ac_exeext"'
21157 { (eval echo "$as_me:21157: \"$ac_try\"") >&5
21158 (eval $ac_try) 2>&5
21160 echo "$as_me:21160: \$? = $ac_status" >&5
21161 (exit "$ac_status"); }; }; then
21162 ac_cv_lib_posix_remove=yes
21164 echo "$as_me: failed program was:" >&5
21165 cat "conftest.$ac_ext" >&5
21166 ac_cv_lib_posix_remove=no
21168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21169 LIBS=$ac_check_lib_save_LIBS
21171 echo "$as_me:21171: result: $ac_cv_lib_posix_remove" >&5
21172 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21173 if test "$ac_cv_lib_posix_remove" = yes; then
21174 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21179 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21180 echo "$as_me:21180: checking for shmat" >&5
21181 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21182 if test "${ac_cv_func_shmat+set}" = set; then
21183 echo $ECHO_N "(cached) $ECHO_C" >&6
21185 cat >"conftest.$ac_ext" <<_ACEOF
21186 #line 21186 "configure"
21187 #include "confdefs.h"
21188 #define shmat autoconf_temporary
21189 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21196 /* We use char because int might match the return type of a gcc2
21197 builtin and then its argument prototype would still apply. */
21204 /* The GNU C library defines stubs for functions which it implements
21205 to always fail with ENOSYS. Some functions are actually named
21206 something starting with __ and the normal name is an alias. */
21207 #if defined (__stub_shmat) || defined (__stub___shmat)
21208 #error found stub for shmat
21216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21217 if { (eval echo "$as_me:21217: \"$ac_link\"") >&5
21218 (eval $ac_link) 2>&5
21220 echo "$as_me:21220: \$? = $ac_status" >&5
21221 (exit "$ac_status"); } &&
21222 { ac_try='test -s "conftest$ac_exeext"'
21223 { (eval echo "$as_me:21223: \"$ac_try\"") >&5
21224 (eval $ac_try) 2>&5
21226 echo "$as_me:21226: \$? = $ac_status" >&5
21227 (exit "$ac_status"); }; }; then
21228 ac_cv_func_shmat=yes
21230 echo "$as_me: failed program was:" >&5
21231 cat "conftest.$ac_ext" >&5
21232 ac_cv_func_shmat=no
21234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21236 echo "$as_me:21236: result: $ac_cv_func_shmat" >&5
21237 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21239 if test $ac_cv_func_shmat = no; then
21240 echo "$as_me:21240: checking for shmat in -lipc" >&5
21241 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21242 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21243 echo $ECHO_N "(cached) $ECHO_C" >&6
21245 ac_check_lib_save_LIBS=$LIBS
21247 cat >"conftest.$ac_ext" <<_ACEOF
21248 #line 21248 "configure"
21249 #include "confdefs.h"
21251 /* Override any gcc2 internal prototype to avoid an error. */
21255 /* We use char because int might match the return type of a gcc2
21256 builtin and then its argument prototype would still apply. */
21266 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21267 if { (eval echo "$as_me:21267: \"$ac_link\"") >&5
21268 (eval $ac_link) 2>&5
21270 echo "$as_me:21270: \$? = $ac_status" >&5
21271 (exit "$ac_status"); } &&
21272 { ac_try='test -s "conftest$ac_exeext"'
21273 { (eval echo "$as_me:21273: \"$ac_try\"") >&5
21274 (eval $ac_try) 2>&5
21276 echo "$as_me:21276: \$? = $ac_status" >&5
21277 (exit "$ac_status"); }; }; then
21278 ac_cv_lib_ipc_shmat=yes
21280 echo "$as_me: failed program was:" >&5
21281 cat "conftest.$ac_ext" >&5
21282 ac_cv_lib_ipc_shmat=no
21284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21285 LIBS=$ac_check_lib_save_LIBS
21287 echo "$as_me:21287: result: $ac_cv_lib_ipc_shmat" >&5
21288 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21289 if test "$ac_cv_lib_ipc_shmat" = yes; then
21290 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21296 # Check for libraries that X11R6 Xt/Xaw programs need.
21297 ac_save_LDFLAGS=$LDFLAGS
21298 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21299 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21300 # check for ICE first), but we must link in the order -lSM -lICE or
21301 # we get undefined symbols. So assume we have SM if we have ICE.
21302 # These have to be linked with before -lX11, unlike the other
21303 # libraries we check for below, so use a different variable.
21304 # John Interrante, Karl Berry
21305 echo "$as_me:21305: checking for IceConnectionNumber in -lICE" >&5
21306 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21307 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21308 echo $ECHO_N "(cached) $ECHO_C" >&6
21310 ac_check_lib_save_LIBS=$LIBS
21311 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21312 cat >"conftest.$ac_ext" <<_ACEOF
21313 #line 21313 "configure"
21314 #include "confdefs.h"
21316 /* Override any gcc2 internal prototype to avoid an error. */
21320 /* We use char because int might match the return type of a gcc2
21321 builtin and then its argument prototype would still apply. */
21322 char IceConnectionNumber ();
21326 IceConnectionNumber ();
21331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21332 if { (eval echo "$as_me:21332: \"$ac_link\"") >&5
21333 (eval $ac_link) 2>&5
21335 echo "$as_me:21335: \$? = $ac_status" >&5
21336 (exit "$ac_status"); } &&
21337 { ac_try='test -s "conftest$ac_exeext"'
21338 { (eval echo "$as_me:21338: \"$ac_try\"") >&5
21339 (eval $ac_try) 2>&5
21341 echo "$as_me:21341: \$? = $ac_status" >&5
21342 (exit "$ac_status"); }; }; then
21343 ac_cv_lib_ICE_IceConnectionNumber=yes
21345 echo "$as_me: failed program was:" >&5
21346 cat "conftest.$ac_ext" >&5
21347 ac_cv_lib_ICE_IceConnectionNumber=no
21349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21350 LIBS=$ac_check_lib_save_LIBS
21352 echo "$as_me:21352: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21353 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21354 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21355 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21358 LDFLAGS=$ac_save_LDFLAGS
21364 if test "$GCC" = yes || test "$GXX" = yes
21367 if test "$GCC" = yes || test "$GXX" = yes
21371 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21373 echo "${as_me:-configure}:21373: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21376 for cf_temp_scan in $CFLAGS
21378 case "x$cf_temp_scan" in
21381 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21382 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21387 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21388 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21393 CFLAGS="$cf_temp_flags"
21394 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21396 echo "${as_me:-configure}:21396: testing ... fixed $CFLAGS ..." 1>&5
21398 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21400 echo "${as_me:-configure}:21400: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21406 if test "$GCC" = yes || test "$GXX" = yes
21410 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21412 echo "${as_me:-configure}:21412: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21415 for cf_temp_scan in $CPPFLAGS
21417 case "x$cf_temp_scan" in
21420 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21421 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21426 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21427 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21432 CPPFLAGS="$cf_temp_flags"
21433 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21435 echo "${as_me:-configure}:21435: testing ... fixed $CPPFLAGS ..." 1>&5
21437 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21439 echo "${as_me:-configure}:21439: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21445 if test "$GCC" = yes || test "$GXX" = yes
21449 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21451 echo "${as_me:-configure}:21451: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21454 for cf_temp_scan in $LDFLAGS
21456 case "x$cf_temp_scan" in
21459 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21460 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21465 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21466 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21471 LDFLAGS="$cf_temp_flags"
21472 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21474 echo "${as_me:-configure}:21474: testing ... fixed $LDFLAGS ..." 1>&5
21476 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21478 echo "${as_me:-configure}:21478: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21484 echo "$as_me:21484: checking if you want to turn on gcc warnings" >&5
21485 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21487 # Check whether --enable-warnings or --disable-warnings was given.
21488 if test "${enable_warnings+set}" = set; then
21489 enableval="$enable_warnings"
21490 test "$enableval" != yes && enableval=no
21491 if test "$enableval" != "no" ; then
21492 enable_warnings=yes
21501 echo "$as_me:21501: result: $enable_warnings" >&5
21502 echo "${ECHO_T}$enable_warnings" >&6
21503 if test "$enable_warnings" = "yes"
21506 if test "$GCC" = yes || test "$GXX" = yes
21508 cat > conftest.i <<EOF
21510 #define GCC_PRINTF 0
21513 #define GCC_SCANF 0
21515 #ifndef GCC_NORETURN
21516 #define GCC_NORETURN /* nothing */
21519 #define GCC_UNUSED /* nothing */
21522 if test "$GCC" = yes
21524 { echo "$as_me:21524: checking for $CC __attribute__ directives..." >&5
21525 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21526 cat > "conftest.$ac_ext" <<EOF
21527 #line 21527 "${as_me:-configure}"
21528 #include "confdefs.h"
21529 #include "conftest.h"
21530 #include "conftest.i"
21532 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21534 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21537 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21539 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21541 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21542 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
21543 extern void foo(void) GCC_NORETURN;
21544 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21546 cf_printf_attribute=no
21547 cf_scanf_attribute=no
21548 for cf_attribute in scanf printf unused noreturn
21551 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21553 cf_directive="__attribute__(($cf_attribute))"
21554 echo "checking for $CC $cf_directive" 1>&5
21556 case "$cf_attribute" in
21558 cf_printf_attribute=yes
21559 cat >conftest.h <<EOF
21560 #define GCC_$cf_ATTRIBUTE 1
21564 cf_scanf_attribute=yes
21565 cat >conftest.h <<EOF
21566 #define GCC_$cf_ATTRIBUTE 1
21570 cat >conftest.h <<EOF
21571 #define GCC_$cf_ATTRIBUTE $cf_directive
21576 if { (eval echo "$as_me:21576: \"$ac_compile\"") >&5
21577 (eval $ac_compile) 2>&5
21579 echo "$as_me:21579: \$? = $ac_status" >&5
21580 (exit "$ac_status"); }; then
21581 test -n "$verbose" && echo "$as_me:21581: result: ... $cf_attribute" >&5
21582 echo "${ECHO_T}... $cf_attribute" >&6
21583 cat conftest.h >>confdefs.h
21584 case "$cf_attribute" in
21587 cat >>confdefs.h <<EOF
21588 #define GCC_NORETURN $cf_directive
21593 cf_value='/* nothing */'
21594 if test "$cf_printf_attribute" != no ; then
21595 cf_value='__attribute__((format(printf,fmt,var)))'
21597 cat >>confdefs.h <<\EOF
21598 #define GCC_PRINTF 1
21603 cat >>confdefs.h <<EOF
21604 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21609 cf_value='/* nothing */'
21610 if test "$cf_scanf_attribute" != no ; then
21611 cf_value='__attribute__((format(scanf,fmt,var)))'
21613 cat >>confdefs.h <<\EOF
21614 #define GCC_SCANF 1
21619 cat >>confdefs.h <<EOF
21620 #define GCC_SCANFLIKE(fmt,var) $cf_value
21626 cat >>confdefs.h <<EOF
21627 #define GCC_UNUSED $cf_directive
21635 ${FGREP-fgrep} define conftest.i >>confdefs.h
21640 if test "x$have_x" = xyes; then
21642 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21643 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21644 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21645 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21646 for cf_X_CFLAGS in $X_CFLAGS
21648 case "x$cf_X_CFLAGS" in
21650 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21653 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21658 cat >"conftest.$ac_ext" <<_ACEOF
21659 #line 21659 "configure"
21660 #include "confdefs.h"
21662 #include <stdlib.h>
21663 #include <X11/Intrinsic.h>
21668 String foo = malloc(1); (void)foo
21673 rm -f "conftest.$ac_objext"
21674 if { (eval echo "$as_me:21674: \"$ac_compile\"") >&5
21675 (eval $ac_compile) 2>&5
21677 echo "$as_me:21677: \$? = $ac_status" >&5
21678 (exit "$ac_status"); } &&
21679 { ac_try='test -s "conftest.$ac_objext"'
21680 { (eval echo "$as_me:21680: \"$ac_try\"") >&5
21681 (eval $ac_try) 2>&5
21683 echo "$as_me:21683: \$? = $ac_status" >&5
21684 (exit "$ac_status"); }; }; then
21686 echo "$as_me:21686: checking for X11/Xt const-feature" >&5
21687 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21688 if test "${cf_cv_const_x_string+set}" = set; then
21689 echo $ECHO_N "(cached) $ECHO_C" >&6
21692 cat >"conftest.$ac_ext" <<_ACEOF
21693 #line 21693 "configure"
21694 #include "confdefs.h"
21696 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21697 #undef XTSTRINGDEFINES /* X11R5 and later */
21698 #include <stdlib.h>
21699 #include <X11/Intrinsic.h>
21704 String foo = malloc(1); *foo = 0
21709 rm -f "conftest.$ac_objext"
21710 if { (eval echo "$as_me:21710: \"$ac_compile\"") >&5
21711 (eval $ac_compile) 2>&5
21713 echo "$as_me:21713: \$? = $ac_status" >&5
21714 (exit "$ac_status"); } &&
21715 { ac_try='test -s "conftest.$ac_objext"'
21716 { (eval echo "$as_me:21716: \"$ac_try\"") >&5
21717 (eval $ac_try) 2>&5
21719 echo "$as_me:21719: \$? = $ac_status" >&5
21720 (exit "$ac_status"); }; }; then
21722 cf_cv_const_x_string=no
21725 echo "$as_me: failed program was:" >&5
21726 cat "conftest.$ac_ext" >&5
21728 cf_cv_const_x_string=yes
21731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21734 echo "$as_me:21734: result: $cf_cv_const_x_string" >&5
21735 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21737 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21738 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21739 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21741 case "$cf_cv_const_x_string" in
21744 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21745 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21750 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21751 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21757 echo "$as_me: failed program was:" >&5
21758 cat "conftest.$ac_ext" >&5
21760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21762 cat > "conftest.$ac_ext" <<EOF
21763 #line 21763 "${as_me:-configure}"
21764 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21766 if test "$INTEL_COMPILER" = yes
21768 # The "-wdXXX" options suppress warnings:
21769 # remark #1419: external declaration in primary source file
21770 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21771 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21772 # remark #193: zero used for undefined preprocessing identifier
21773 # remark #593: variable "curs_sb_left_arrow" was set but never used
21774 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21775 # remark #869: parameter "tw" was never referenced
21776 # remark #981: operands are evaluated in unspecified order
21777 # warning #279: controlling expression is constant
21779 { echo "$as_me:21779: checking for $CC warning options..." >&5
21780 echo "$as_me: checking for $CC warning options..." >&6;}
21781 cf_save_CFLAGS="$CFLAGS"
21782 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21794 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21795 if { (eval echo "$as_me:21795: \"$ac_compile\"") >&5
21796 (eval $ac_compile) 2>&5
21798 echo "$as_me:21798: \$? = $ac_status" >&5
21799 (exit "$ac_status"); }; then
21800 test -n "$verbose" && echo "$as_me:21800: result: ... -$cf_opt" >&5
21801 echo "${ECHO_T}... -$cf_opt" >&6
21802 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21805 CFLAGS="$cf_save_CFLAGS"
21806 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21808 { echo "$as_me:21808: checking for $CC warning options..." >&5
21809 echo "$as_me: checking for $CC warning options..." >&6;}
21810 cf_save_CFLAGS="$CFLAGS"
21812 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21813 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21814 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21815 for cf_opt in W Wall \
21816 Wbad-function-cast \
21819 Wdeclaration-after-statement \
21822 Wmissing-declarations \
21823 Wmissing-prototypes \
21827 Wstrict-prototypes \
21828 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21830 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21831 if { (eval echo "$as_me:21831: \"$ac_compile\"") >&5
21832 (eval $ac_compile) 2>&5
21834 echo "$as_me:21834: \$? = $ac_status" >&5
21835 (exit "$ac_status"); }; then
21836 test -n "$verbose" && echo "$as_me:21836: result: ... -$cf_opt" >&5
21837 echo "${ECHO_T}... -$cf_opt" >&6
21840 case "$GCC_VERSION" in
21842 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21844 echo "${as_me:-configure}:21844: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21850 case "$GCC_VERSION" in
21852 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21854 echo "${as_me:-configure}:21854: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21860 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21863 CFLAGS="$cf_save_CFLAGS"
21871 echo "$as_me:21871: checking if you want to use dmalloc for testing" >&5
21872 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21874 # Check whether --with-dmalloc or --without-dmalloc was given.
21875 if test "${with_dmalloc+set}" = set; then
21876 withval="$with_dmalloc"
21878 cat >>confdefs.h <<EOF
21879 #define USE_DMALLOC 1
21882 : "${with_cflags:=-g}"
21883 : "${enable_leaks:=no}"
21888 echo "$as_me:21888: result: ${with_dmalloc:-no}" >&5
21889 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21891 case ".$with_cflags" in
21901 cf_new_extra_cppflags=
21903 for cf_add_cflags in -g
21905 case "$cf_fix_cppflags" in
21907 case "$cf_add_cflags" in
21908 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21909 case "$cf_add_cflags" in
21911 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21913 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21914 && test -z "${cf_tst_cflags}" \
21915 && cf_fix_cppflags=yes
21917 if test "$cf_fix_cppflags" = yes ; then
21919 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21920 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21923 elif test "${cf_tst_cflags}" = "\"'" ; then
21925 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21926 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21932 case "$CPPFLAGS" in
21936 case "$cf_add_cflags" in
21938 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21940 CPPFLAGS=`echo "$CPPFLAGS" | \
21941 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21942 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21947 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21948 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21955 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21956 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21963 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21964 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21966 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21968 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21969 && test -z "${cf_tst_cflags}" \
21970 && cf_fix_cppflags=no
21975 if test -n "$cf_new_cflags" ; then
21977 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21978 CFLAGS="${CFLAGS}$cf_new_cflags"
21982 if test -n "$cf_new_cppflags" ; then
21984 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21985 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21989 if test -n "$cf_new_extra_cppflags" ; then
21991 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21992 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22001 if test "$with_dmalloc" = yes ; then
22002 echo "$as_me:22002: checking for dmalloc.h" >&5
22003 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22004 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22005 echo $ECHO_N "(cached) $ECHO_C" >&6
22007 cat >"conftest.$ac_ext" <<_ACEOF
22008 #line 22008 "configure"
22009 #include "confdefs.h"
22010 #include <dmalloc.h>
22012 if { (eval echo "$as_me:22012: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22013 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22015 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22017 cat conftest.err >&5
22018 echo "$as_me:22018: \$? = $ac_status" >&5
22019 (exit "$ac_status"); } >/dev/null; then
22020 if test -s conftest.err; then
22021 ac_cpp_err=$ac_c_preproc_warn_flag
22028 if test -z "$ac_cpp_err"; then
22029 ac_cv_header_dmalloc_h=yes
22031 echo "$as_me: failed program was:" >&5
22032 cat "conftest.$ac_ext" >&5
22033 ac_cv_header_dmalloc_h=no
22035 rm -f conftest.err "conftest.$ac_ext"
22037 echo "$as_me:22037: result: $ac_cv_header_dmalloc_h" >&5
22038 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22039 if test "$ac_cv_header_dmalloc_h" = yes; then
22041 echo "$as_me:22041: checking for dmalloc_debug in -ldmalloc" >&5
22042 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22043 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22044 echo $ECHO_N "(cached) $ECHO_C" >&6
22046 ac_check_lib_save_LIBS=$LIBS
22047 LIBS="-ldmalloc $LIBS"
22048 cat >"conftest.$ac_ext" <<_ACEOF
22049 #line 22049 "configure"
22050 #include "confdefs.h"
22052 /* Override any gcc2 internal prototype to avoid an error. */
22056 /* We use char because int might match the return type of a gcc2
22057 builtin and then its argument prototype would still apply. */
22058 char dmalloc_debug ();
22067 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22068 if { (eval echo "$as_me:22068: \"$ac_link\"") >&5
22069 (eval $ac_link) 2>&5
22071 echo "$as_me:22071: \$? = $ac_status" >&5
22072 (exit "$ac_status"); } &&
22073 { ac_try='test -s "conftest$ac_exeext"'
22074 { (eval echo "$as_me:22074: \"$ac_try\"") >&5
22075 (eval $ac_try) 2>&5
22077 echo "$as_me:22077: \$? = $ac_status" >&5
22078 (exit "$ac_status"); }; }; then
22079 ac_cv_lib_dmalloc_dmalloc_debug=yes
22081 echo "$as_me: failed program was:" >&5
22082 cat "conftest.$ac_ext" >&5
22083 ac_cv_lib_dmalloc_dmalloc_debug=no
22085 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22086 LIBS=$ac_check_lib_save_LIBS
22088 echo "$as_me:22088: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22089 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22090 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22091 cat >>confdefs.h <<EOF
22092 #define HAVE_LIBDMALLOC 1
22095 LIBS="-ldmalloc $LIBS"
22103 echo "$as_me:22103: checking if you want to use dbmalloc for testing" >&5
22104 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22106 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22107 if test "${with_dbmalloc+set}" = set; then
22108 withval="$with_dbmalloc"
22110 cat >>confdefs.h <<EOF
22111 #define USE_DBMALLOC 1
22114 : "${with_cflags:=-g}"
22115 : "${enable_leaks:=no}"
22120 echo "$as_me:22120: result: ${with_dbmalloc:-no}" >&5
22121 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22123 case ".$with_cflags" in
22133 cf_new_extra_cppflags=
22135 for cf_add_cflags in -g
22137 case "$cf_fix_cppflags" in
22139 case "$cf_add_cflags" in
22140 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22141 case "$cf_add_cflags" in
22143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22146 && test -z "${cf_tst_cflags}" \
22147 && cf_fix_cppflags=yes
22149 if test "$cf_fix_cppflags" = yes ; then
22151 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22152 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22155 elif test "${cf_tst_cflags}" = "\"'" ; then
22157 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22158 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22164 case "$CPPFLAGS" in
22168 case "$cf_add_cflags" in
22170 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22172 CPPFLAGS=`echo "$CPPFLAGS" | \
22173 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22174 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22179 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22180 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22187 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22188 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22198 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22200 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22201 && test -z "${cf_tst_cflags}" \
22202 && cf_fix_cppflags=no
22207 if test -n "$cf_new_cflags" ; then
22209 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22210 CFLAGS="${CFLAGS}$cf_new_cflags"
22214 if test -n "$cf_new_cppflags" ; then
22216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22217 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22221 if test -n "$cf_new_extra_cppflags" ; then
22223 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22224 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22233 if test "$with_dbmalloc" = yes ; then
22234 echo "$as_me:22234: checking for dbmalloc.h" >&5
22235 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22236 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22237 echo $ECHO_N "(cached) $ECHO_C" >&6
22239 cat >"conftest.$ac_ext" <<_ACEOF
22240 #line 22240 "configure"
22241 #include "confdefs.h"
22242 #include <dbmalloc.h>
22244 if { (eval echo "$as_me:22244: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22245 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22247 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22249 cat conftest.err >&5
22250 echo "$as_me:22250: \$? = $ac_status" >&5
22251 (exit "$ac_status"); } >/dev/null; then
22252 if test -s conftest.err; then
22253 ac_cpp_err=$ac_c_preproc_warn_flag
22260 if test -z "$ac_cpp_err"; then
22261 ac_cv_header_dbmalloc_h=yes
22263 echo "$as_me: failed program was:" >&5
22264 cat "conftest.$ac_ext" >&5
22265 ac_cv_header_dbmalloc_h=no
22267 rm -f conftest.err "conftest.$ac_ext"
22269 echo "$as_me:22269: result: $ac_cv_header_dbmalloc_h" >&5
22270 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22271 if test "$ac_cv_header_dbmalloc_h" = yes; then
22273 echo "$as_me:22273: checking for debug_malloc in -ldbmalloc" >&5
22274 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22275 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22276 echo $ECHO_N "(cached) $ECHO_C" >&6
22278 ac_check_lib_save_LIBS=$LIBS
22279 LIBS="-ldbmalloc $LIBS"
22280 cat >"conftest.$ac_ext" <<_ACEOF
22281 #line 22281 "configure"
22282 #include "confdefs.h"
22284 /* Override any gcc2 internal prototype to avoid an error. */
22288 /* We use char because int might match the return type of a gcc2
22289 builtin and then its argument prototype would still apply. */
22290 char debug_malloc ();
22299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22300 if { (eval echo "$as_me:22300: \"$ac_link\"") >&5
22301 (eval $ac_link) 2>&5
22303 echo "$as_me:22303: \$? = $ac_status" >&5
22304 (exit "$ac_status"); } &&
22305 { ac_try='test -s "conftest$ac_exeext"'
22306 { (eval echo "$as_me:22306: \"$ac_try\"") >&5
22307 (eval $ac_try) 2>&5
22309 echo "$as_me:22309: \$? = $ac_status" >&5
22310 (exit "$ac_status"); }; }; then
22311 ac_cv_lib_dbmalloc_debug_malloc=yes
22313 echo "$as_me: failed program was:" >&5
22314 cat "conftest.$ac_ext" >&5
22315 ac_cv_lib_dbmalloc_debug_malloc=no
22317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22318 LIBS=$ac_check_lib_save_LIBS
22320 echo "$as_me:22320: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22321 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22322 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22323 cat >>confdefs.h <<EOF
22324 #define HAVE_LIBDBMALLOC 1
22327 LIBS="-ldbmalloc $LIBS"
22335 echo "$as_me:22335: checking if you want to use valgrind for testing" >&5
22336 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22338 # Check whether --with-valgrind or --without-valgrind was given.
22339 if test "${with_valgrind+set}" = set; then
22340 withval="$with_valgrind"
22342 cat >>confdefs.h <<EOF
22343 #define USE_VALGRIND 1
22346 : "${with_cflags:=-g}"
22347 : "${enable_leaks:=no}"
22352 echo "$as_me:22352: result: ${with_valgrind:-no}" >&5
22353 echo "${ECHO_T}${with_valgrind:-no}" >&6
22355 case ".$with_cflags" in
22365 cf_new_extra_cppflags=
22367 for cf_add_cflags in -g
22369 case "$cf_fix_cppflags" in
22371 case "$cf_add_cflags" in
22372 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22373 case "$cf_add_cflags" in
22375 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22377 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22378 && test -z "${cf_tst_cflags}" \
22379 && cf_fix_cppflags=yes
22381 if test "$cf_fix_cppflags" = yes ; then
22383 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22384 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22387 elif test "${cf_tst_cflags}" = "\"'" ; then
22389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22396 case "$CPPFLAGS" in
22400 case "$cf_add_cflags" in
22402 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22404 CPPFLAGS=`echo "$CPPFLAGS" | \
22405 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22406 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22411 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22412 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22419 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22420 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22427 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22428 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22430 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22432 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22433 && test -z "${cf_tst_cflags}" \
22434 && cf_fix_cppflags=no
22439 if test -n "$cf_new_cflags" ; then
22441 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22442 CFLAGS="${CFLAGS}$cf_new_cflags"
22446 if test -n "$cf_new_cppflags" ; then
22448 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22449 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22453 if test -n "$cf_new_extra_cppflags" ; then
22455 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22456 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22465 echo "$as_me:22465: checking if you want to perform memory-leak testing" >&5
22466 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22468 # Check whether --enable-leaks or --disable-leaks was given.
22469 if test "${enable_leaks+set}" = set; then
22470 enableval="$enable_leaks"
22475 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22476 echo "$as_me:22476: result: $with_no_leaks" >&5
22477 echo "${ECHO_T}$with_no_leaks" >&6
22479 if test "$enable_leaks" = no ; then
22481 cat >>confdefs.h <<\EOF
22485 cat >>confdefs.h <<\EOF
22486 #define YY_NO_LEAKS 1
22492 if test "x$cf_cv_enable_rpath" != xno
22494 echo "$as_me:22494: checking for an rpath option" >&5
22495 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22496 case "$cf_cv_system_name" in
22498 if test "$GCC" = yes; then
22499 LD_RPATH_OPT="-Wl,-rpath,"
22501 LD_RPATH_OPT="-rpath "
22504 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22505 LD_RPATH_OPT="-Wl,-rpath,"
22507 (openbsd[2-9].*|mirbsd*)
22508 LD_RPATH_OPT="-Wl,-rpath,"
22511 LD_RPATH_OPT="-rpath "
22514 LD_RPATH_OPT="-Wl,-rpath,"
22517 LD_RPATH_OPT="-rpath "
22525 echo "$as_me:22525: result: $LD_RPATH_OPT" >&5
22526 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22528 case "x$LD_RPATH_OPT" in
22530 echo "$as_me:22530: checking if we need a space after rpath option" >&5
22531 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22532 cf_save_LIBS="$LIBS"
22534 cf_add_libs="$LIBS"
22537 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22538 # filter duplicates
22539 for cf_add_1lib in $cf_add_0lib; do
22540 for cf_add_2lib in $cf_add_libs; do
22541 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22546 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22548 LIBS="$cf_add_libs"
22550 cat >"conftest.$ac_ext" <<_ACEOF
22551 #line 22551 "configure"
22552 #include "confdefs.h"
22562 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22563 if { (eval echo "$as_me:22563: \"$ac_link\"") >&5
22564 (eval $ac_link) 2>&5
22566 echo "$as_me:22566: \$? = $ac_status" >&5
22567 (exit "$ac_status"); } &&
22568 { ac_try='test -s "conftest$ac_exeext"'
22569 { (eval echo "$as_me:22569: \"$ac_try\"") >&5
22570 (eval $ac_try) 2>&5
22572 echo "$as_me:22572: \$? = $ac_status" >&5
22573 (exit "$ac_status"); }; }; then
22576 echo "$as_me: failed program was:" >&5
22577 cat "conftest.$ac_ext" >&5
22580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22581 LIBS="$cf_save_LIBS"
22582 echo "$as_me:22582: result: $cf_rpath_space" >&5
22583 echo "${ECHO_T}$cf_rpath_space" >&6
22584 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22589 echo "$as_me:22589: checking if rpath-hack should be disabled" >&5
22590 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22592 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22593 if test "${enable_rpath_hack+set}" = set; then
22594 enableval="$enable_rpath_hack"
22595 test "$enableval" != no && enableval=yes
22596 if test "$enableval" != "yes" ; then
22597 enable_rpath_hack=no
22599 enable_rpath_hack=yes
22603 enable_rpath_hack=yes
22606 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22607 echo "$as_me:22607: result: $cf_disable_rpath_hack" >&5
22608 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22610 if test "$enable_rpath_hack" = yes ; then
22612 echo "$as_me:22612: checking for updated LDFLAGS" >&5
22613 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22614 if test -n "$LD_RPATH_OPT" ; then
22615 echo "$as_me:22615: result: maybe" >&5
22616 echo "${ECHO_T}maybe" >&6
22620 # Extract the first word of "$ac_prog", so it can be a program name with args.
22621 set dummy $ac_prog; ac_word=$2
22622 echo "$as_me:22622: checking for $ac_word" >&5
22623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22624 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22625 echo $ECHO_N "(cached) $ECHO_C" >&6
22627 if test -n "$cf_ldd_prog"; then
22628 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22630 ac_save_IFS=$IFS; IFS=$ac_path_separator
22632 for ac_dir in $ac_dummy; do
22634 test -z "$ac_dir" && ac_dir=.
22635 $as_executable_p "$ac_dir/$ac_word" || continue
22636 ac_cv_prog_cf_ldd_prog="$ac_prog"
22637 echo "$as_me:22637: found $ac_dir/$ac_word" >&5
22643 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22644 if test -n "$cf_ldd_prog"; then
22645 echo "$as_me:22645: result: $cf_ldd_prog" >&5
22646 echo "${ECHO_T}$cf_ldd_prog" >&6
22648 echo "$as_me:22648: result: no" >&5
22649 echo "${ECHO_T}no" >&6
22652 test -n "$cf_ldd_prog" && break
22654 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22656 cf_rpath_list="/usr/lib /lib"
22657 if test "$cf_ldd_prog" != no
22661 cat >"conftest.$ac_ext" <<_ACEOF
22662 #line 22662 "configure"
22663 #include "confdefs.h"
22673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22674 if { (eval echo "$as_me:22674: \"$ac_link\"") >&5
22675 (eval $ac_link) 2>&5
22677 echo "$as_me:22677: \$? = $ac_status" >&5
22678 (exit "$ac_status"); } &&
22679 { ac_try='test -s "conftest$ac_exeext"'
22680 { (eval echo "$as_me:22680: \"$ac_try\"") >&5
22681 (eval $ac_try) 2>&5
22683 echo "$as_me:22683: \$? = $ac_status" >&5
22684 (exit "$ac_status"); }; }; then
22685 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22686 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22688 echo "$as_me: failed program was:" >&5
22689 cat "conftest.$ac_ext" >&5
22691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22693 # If we passed the link-test, but get a "not found" on a given library,
22694 # this could be due to inept reconfiguration of gcc to make it only
22695 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22696 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22697 # /usr/local libraries.
22698 if test -n "$cf_rpath_oops"
22700 for cf_rpath_src in $cf_rpath_oops
22702 for cf_rpath_dir in \
22707 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22709 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22711 echo "${as_me:-configure}:22711: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22713 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22721 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22723 echo "${as_me:-configure}:22723: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22725 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22727 echo "${as_me:-configure}:22727: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22730 for cf_rpath_src in $LDFLAGS
22732 case "$cf_rpath_src" in
22735 # check if this refers to a directory which we will ignore
22737 if test -n "$cf_rpath_list"
22739 for cf_rpath_item in $cf_rpath_list
22741 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22749 if test "$cf_rpath_skip" = no
22751 # transform the option
22752 if test "$LD_RPATH_OPT" = "-R " ; then
22753 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22755 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22758 # if we have not already added this, add it now
22759 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22760 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22762 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22764 echo "${as_me:-configure}:22764: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22766 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22771 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22773 LDFLAGS=$cf_rpath_dst
22775 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22777 echo "${as_me:-configure}:22777: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22779 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22781 echo "${as_me:-configure}:22781: testing ...checking LIBS $LIBS ..." 1>&5
22784 for cf_rpath_src in $LIBS
22786 case "$cf_rpath_src" in
22789 # check if this refers to a directory which we will ignore
22791 if test -n "$cf_rpath_list"
22793 for cf_rpath_item in $cf_rpath_list
22795 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22803 if test "$cf_rpath_skip" = no
22805 # transform the option
22806 if test "$LD_RPATH_OPT" = "-R " ; then
22807 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22809 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22812 # if we have not already added this, add it now
22813 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22814 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22816 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22818 echo "${as_me:-configure}:22818: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22820 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22825 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22829 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22831 echo "${as_me:-configure}:22831: testing ...checked LIBS $LIBS ..." 1>&5
22833 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22835 echo "${as_me:-configure}:22835: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22838 echo "$as_me:22838: result: no" >&5
22839 echo "${ECHO_T}no" >&6
22847 ac_config_files="$ac_config_files Makefile"
22848 ac_config_commands="$ac_config_commands default"
22849 cat >confcache <<\_ACEOF
22850 # This file is a shell script that caches the results of configure
22851 # tests run on this system so they can be shared between configure
22852 # scripts and configure runs, see configure's option --config-cache.
22853 # It is not useful on other systems. If it contains results you don't
22854 # want to keep, you may remove or edit it.
22856 # config.status only pays attention to the cache file if you give it
22857 # the --recheck option to rerun configure.
22859 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22860 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22861 # following values.
22865 # The following way of writing the cache mishandles newlines in values,
22866 # but we know of no workaround that is simple, portable, and efficient.
22867 # So, don't put newlines in cache variables' values.
22868 # Ultrix sh set writes to stderr and can't be redirected directly,
22869 # and sets the high bit in the cache file unless we assign to the vars.
22872 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22874 # `set' does not quote correctly, so add quotes (double-quote
22875 # substitution turns \\\\ into \\, and sed turns \\ into \).
22878 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22881 # `set' quotes correctly as required by POSIX, so do not add quotes.
22883 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22890 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22892 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22894 if cmp -s $cache_file confcache; then :; else
22895 if test -w $cache_file; then
22896 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22897 cat confcache >$cache_file
22899 echo "not updating unwritable cache $cache_file"
22904 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22905 # Let make expand exec_prefix.
22906 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22908 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22909 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22910 # trailing colons and then remove the whole line if VPATH becomes empty
22911 # (actually we leave an empty line to preserve line numbers).
22912 if test "x$srcdir" = x.; then
22913 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22914 s/:*\$(srcdir):*/:/;
22915 s/:*\${srcdir}:*/:/;
22917 s/^\([^=]*=[ ]*\):*/\1/;
22923 DEFS=-DHAVE_CONFIG_H
22925 : "${CONFIG_STATUS=./config.status}"
22926 ac_clean_files_save=$ac_clean_files
22927 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22928 { echo "$as_me:22928: creating $CONFIG_STATUS" >&5
22929 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22930 cat >"$CONFIG_STATUS" <<_ACEOF
22932 # Generated automatically by configure.
22933 # Run this file to recreate the current configuration.
22934 # Compiler output produced by configure, useful for debugging
22935 # configure, is in config.log if it exists.
22938 SHELL=\${CONFIG_SHELL-$SHELL}
22939 ac_cs_invocation="\$0 \$@"
22941 CLICOLOR_FORCE= GREP_OPTIONS=
22942 unset CLICOLOR_FORCE GREP_OPTIONS
22945 cat >>"$CONFIG_STATUS" <<\_ACEOF
22946 # Be Bourne compatible
22947 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22950 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22954 # Name of the executable.
22955 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22957 if expr a : '\(a\)' >/dev/null 2>&1; then
22963 rm -f conf$$ conf$$.exe conf$$.file
22965 if ln -s conf$$.file conf$$ 2>/dev/null; then
22966 # We could just check for DJGPP; but this test a) works b) is more generic
22967 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22968 if test -f conf$$.exe; then
22969 # Don't use ln at all; we don't have any links
22974 elif ln conf$$.file conf$$ 2>/dev/null; then
22979 rm -f conf$$ conf$$.exe conf$$.file
22981 as_executable_p="test -f"
22983 # Support unset when possible.
22984 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22991 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22992 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22993 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22994 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22995 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22996 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22997 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22998 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23001 # We need space, tab and new line, in precisely that order.
23007 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23013 # Files that config.status was made for.
23014 if test -n "$ac_config_files"; then
23015 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23018 if test -n "$ac_config_headers"; then
23019 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23022 if test -n "$ac_config_links"; then
23023 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23026 if test -n "$ac_config_commands"; then
23027 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23030 cat >>"$CONFIG_STATUS" <<\EOF
23033 \`$as_me' instantiates files from templates according to the
23034 current configuration.
23036 Usage: $0 [OPTIONS] [FILE]...
23038 -h, --help print this help, then exit
23039 -V, --version print version number, then exit
23040 -d, --debug don't remove temporary files
23041 --recheck update $as_me by reconfiguring in the same conditions
23042 --file=FILE[:TEMPLATE]
23043 instantiate the configuration file FILE
23044 --header=FILE[:TEMPLATE]
23045 instantiate the configuration header FILE
23047 Configuration files:
23050 Configuration headers:
23053 Configuration commands:
23056 Report bugs to <dickey@invisible-island.net>."
23059 cat >>"$CONFIG_STATUS" <<EOF
23062 configured by $0, generated by GNU Autoconf 2.52.20210105,
23063 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23065 Copyright 2003-2020,2021 Thomas E. Dickey
23066 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23067 Free Software Foundation, Inc.
23068 This config.status script is free software; the Free Software Foundation
23069 gives unlimited permission to copy, distribute and modify it."
23074 cat >>"$CONFIG_STATUS" <<\EOF
23075 # If no file are specified by the user, then we need to provide default
23076 # value. By we need to know if files were specified by the user.
23082 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23083 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23085 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23089 *) # This is not an option, so the user has probably given explicit
23091 ac_need_defaults=false;;
23095 # Handling of the options.
23097 cat >>"$CONFIG_STATUS" <<EOF
23098 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23099 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23100 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23102 cat >>"$CONFIG_STATUS" <<\EOF
23103 --version | --vers* | -V )
23104 echo "$ac_cs_version"; exit 0 ;;
23106 # Conflict between --help and --header
23107 { { echo "$as_me:23107: error: ambiguous option: $1
23108 Try \`$0 --help' for more information." >&5
23109 echo "$as_me: error: ambiguous option: $1
23110 Try \`$0 --help' for more information." >&2;}
23111 { (exit 1); exit 1; }; };;
23112 --help | --hel | -h )
23113 echo "$ac_cs_usage"; exit 0 ;;
23114 --debug | --d* | -d )
23116 --file | --fil | --fi | --f )
23118 CONFIG_FILES="$CONFIG_FILES $1"
23119 ac_need_defaults=false;;
23120 --header | --heade | --head | --hea )
23122 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23123 ac_need_defaults=false;;
23125 # This is an error.
23126 -*) { { echo "$as_me:23126: error: unrecognized option: $1
23127 Try \`$0 --help' for more information." >&5
23128 echo "$as_me: error: unrecognized option: $1
23129 Try \`$0 --help' for more information." >&2;}
23130 { (exit 1); exit 1; }; } ;;
23132 *) ac_config_targets="$ac_config_targets $1" ;;
23141 ## ----------------------- ##
23142 ## Running config.status. ##
23143 ## ----------------------- ##
23145 This file was extended by $as_me 2.52.20210105, executed with
23146 CONFIG_FILES = $CONFIG_FILES
23147 CONFIG_HEADERS = $CONFIG_HEADERS
23148 CONFIG_LINKS = $CONFIG_LINKS
23149 CONFIG_COMMANDS = $CONFIG_COMMANDS
23150 > "$ac_cs_invocation"
23151 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23156 cat >>"$CONFIG_STATUS" <<EOF
23158 # INIT-COMMANDS section.
23168 cat >>"$CONFIG_STATUS" <<\EOF
23169 for ac_config_target in $ac_config_targets
23171 case "$ac_config_target" in
23172 # Handling of arguments.
23173 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23174 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23175 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23176 *) { { echo "$as_me:23176: error: invalid argument: $ac_config_target" >&5
23177 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23178 { (exit 1); exit 1; }; };;
23182 # If the user did not use the arguments to specify the items to instantiate,
23183 # then the envvar interface is used. Set only those that are not.
23184 # We use the long form for the default assignment because of an extremely
23185 # bizarre bug on SunOS 4.1.3.
23186 if "$ac_need_defaults"; then
23187 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23188 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23189 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23192 # Create a temporary directory, and hook for its removal unless debugging.
23195 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23196 trap '{ (exit 1); exit 1; }' 1 2 13 15
23199 # Create a (secure) tmp directory for tmp files.
23202 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23203 test -n "$tmp" && test -d "$tmp"
23206 tmp=$TMPDIR/cs$$-$RANDOM
23207 (umask 077 && mkdir $tmp)
23210 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23211 { (exit 1); exit 1; }
23216 cat >>"$CONFIG_STATUS" <<EOF
23219 # CONFIG_FILES section.
23222 # No need to generate the scripts if there are no CONFIG_FILES.
23223 # This happens for instance when ./config.status config.h
23224 if test -n "\$CONFIG_FILES"; then
23225 # Protect against being on the right side of a sed subst in config.status.
23226 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23227 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23228 s,@SHELL@,$SHELL,;t t
23229 s,@exec_prefix@,$exec_prefix,;t t
23230 s,@prefix@,$prefix,;t t
23231 s,@program_transform_name@,$program_transform_name,;t t
23232 s,@bindir@,$bindir,;t t
23233 s,@sbindir@,$sbindir,;t t
23234 s,@libexecdir@,$libexecdir,;t t
23235 s,@datarootdir@,$datarootdir,;t t
23236 s,@datadir@,$datadir,;t t
23237 s,@sysconfdir@,$sysconfdir,;t t
23238 s,@sharedstatedir@,$sharedstatedir,;t t
23239 s,@localstatedir@,$localstatedir,;t t
23240 s,@runstatedir@,$runstatedir,;t t
23241 s,@libdir@,$libdir,;t t
23242 s,@includedir@,$includedir,;t t
23243 s,@oldincludedir@,$oldincludedir,;t t
23244 s,@infodir@,$infodir,;t t
23245 s,@mandir@,$mandir,;t t
23246 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23247 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23248 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23249 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23250 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23251 s,@build_alias@,$build_alias,;t t
23252 s,@host_alias@,$host_alias,;t t
23253 s,@target_alias@,$target_alias,;t t
23254 s,@ECHO_C@,$ECHO_C,;t t
23255 s,@ECHO_N@,$ECHO_N,;t t
23256 s,@ECHO_T@,$ECHO_T,;t t
23257 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23258 s,@DEFS@,$DEFS,;t t
23259 s,@LIBS@,$LIBS,;t t
23260 s,@build@,$build,;t t
23261 s,@build_cpu@,$build_cpu,;t t
23262 s,@build_vendor@,$build_vendor,;t t
23263 s,@build_os@,$build_os,;t t
23264 s,@host@,$host,;t t
23265 s,@host_cpu@,$host_cpu,;t t
23266 s,@host_vendor@,$host_vendor,;t t
23267 s,@host_os@,$host_os,;t t
23268 s,@SET_MAKE@,$SET_MAKE,;t t
23270 s,@CFLAGS@,$CFLAGS,;t t
23271 s,@LDFLAGS@,$LDFLAGS,;t t
23272 s,@CPPFLAGS@,$CPPFLAGS,;t t
23273 s,@ac_ct_CC@,$ac_ct_CC,;t t
23274 s,@EXEEXT@,$EXEEXT,;t t
23275 s,@OBJEXT@,$OBJEXT,;t t
23276 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23278 s,@GREP@,$GREP,;t t
23279 s,@EGREP@,$EGREP,;t t
23281 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23282 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23283 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23284 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23285 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23286 s,@LINT@,$LINT,;t t
23287 s,@LINT_OPTS@,$LINT_OPTS,;t t
23288 s,@CTAGS@,$CTAGS,;t t
23289 s,@ETAGS@,$ETAGS,;t t
23290 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23291 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23292 s,@MATH_LIB@,$MATH_LIB,;t t
23293 s,@top_builddir@,$top_builddir,;t t
23294 s,@CC_G_OPT@,$CC_G_OPT,;t t
23295 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23296 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23297 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23298 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23300 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23301 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23302 s,@LD_MODEL@,$LD_MODEL,;t t
23303 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23304 s,@LIBTOOL@,$LIBTOOL,;t t
23305 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23306 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23307 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23308 s,@LIB_LINK@,$LIB_LINK,;t t
23309 s,@LINK_TESTS@,$LINK_TESTS,;t t
23310 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23311 s,@PACKAGE@,$PACKAGE,;t t
23312 s,@PTHREAD@,$PTHREAD,;t t
23313 s,@TEST_ARGS@,$TEST_ARGS,;t t
23314 s,@TEST_DEPS@,$TEST_DEPS,;t t
23315 s,@TEST_LIBS@,$TEST_LIBS,;t t
23316 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23317 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23318 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23319 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23320 s,@includesubdir@,$includesubdir,;t t
23321 s,@FGREP@,$FGREP,;t t
23322 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23323 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23324 s,@ECHO_LT@,$ECHO_LT,;t t
23325 s,@ECHO_LD@,$ECHO_LD,;t t
23326 s,@RULE_CC@,$RULE_CC,;t t
23327 s,@SHOW_CC@,$SHOW_CC,;t t
23328 s,@ECHO_CC@,$ECHO_CC,;t t
23329 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23330 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23331 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23332 s,@X_CFLAGS@,$X_CFLAGS,;t t
23333 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23334 s,@X_LIBS@,$X_LIBS,;t t
23335 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23336 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23337 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23338 s,@RGB_PATH@,$RGB_PATH,;t t
23339 s,@no_x11_rgb@,$no_x11_rgb,;t t
23340 s,@FORM_NAME@,$FORM_NAME,;t t
23341 s,@MENU_NAME@,$MENU_NAME,;t t
23342 s,@PANEL_NAME@,$PANEL_NAME,;t t
23343 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23344 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23345 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23350 cat >>"$CONFIG_STATUS" <<\EOF
23351 # Split the substitutions into bite-sized pieces for seds with
23352 # small command number limits, like on Digital OSF/1 and HP-UX.
23353 ac_max_sed_lines=48
23354 ac_sed_frag=1 # Number of current file.
23355 ac_beg=1 # First line for current file.
23356 ac_end=$ac_max_sed_lines # Line after last line for current file.
23359 while "$ac_more_lines"; do
23360 if test "$ac_beg" -gt 1; then
23361 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23363 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23365 if test ! -s $tmp/subs.frag; then
23366 ac_more_lines=false
23368 # The purpose of the label and of the branching condition is to
23369 # speed up the sed processing (if there are no `@' at all, there
23370 # is no need to browse any of the substitutions).
23371 # These are the two extra sed commands mentioned above.
23373 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23374 # It is possible to make a multiline substitution using escaped newlines.
23375 # Ensure that we do not split the substitution between script fragments.
23377 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23378 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23379 if test -s $tmp/subs.next; then
23380 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23381 if test ! -s $tmp/subs.edit; then
23382 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23383 if test ! -s $tmp/subs.edit; then
23384 if test "$ac_beg" -gt 1; then
23385 ac_end=`expr "$ac_end" - 1`
23392 if test -z "$ac_sed_cmds"; then
23393 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23395 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23397 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23399 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23402 if test -z "$ac_sed_cmds"; then
23405 fi # test -n "$CONFIG_FILES"
23408 cat >>"$CONFIG_STATUS" <<\EOF
23409 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23410 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23412 - | *:- | *:-:* ) # input from stdin
23414 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23415 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23416 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23417 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23418 * ) ac_file_in=$ac_file.in ;;
23421 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23422 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23423 X"$ac_file" : 'X\(//\)[^/]' \| \
23424 X"$ac_file" : 'X\(//\)$' \| \
23425 X"$ac_file" : 'X\(/\)' \| \
23426 . : '\(.\)' 2>/dev/null ||
23428 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23429 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23430 /^X\(\/\/\)$/{ s//\1/; q; }
23431 /^X\(\/\).*/{ s//\1/; q; }
23433 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23434 { case "$ac_dir" in
23435 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23439 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23440 case $as_mkdir_dir in
23441 # Skip DOS drivespec
23442 ?:) as_incr_dir=$as_mkdir_dir ;;
23444 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23445 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23450 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23451 # A "../" for each directory in $ac_dir_suffix.
23452 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23454 ac_dir_suffix= ac_dots=
23459 if test -z "$ac_dots"; then
23462 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23464 [\\/]* | ?:[\\/]* )
23465 ac_srcdir="$srcdir$ac_dir_suffix";
23466 ac_top_srcdir="$srcdir" ;;
23467 *) # Relative path.
23468 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23469 ac_top_srcdir="$ac_dots$srcdir" ;;
23473 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23474 *) ac_INSTALL=$ac_dots$INSTALL ;;
23477 if test x"$ac_file" != x-; then
23478 { echo "$as_me:23478: creating $ac_file" >&5
23479 echo "$as_me: creating $ac_file" >&6;}
23482 # Let's still pretend it is `configure' which instantiates (i.e., don't
23483 # use $as_me), people would be surprised to read:
23484 # /* config.h. Generated automatically by config.status. */
23485 configure_input="Generated automatically from `echo $ac_file_in |
23486 sed 's,.*/,,'` by configure."
23488 # First look for the input files in the build tree, otherwise in the
23490 ac_file_inputs=`IFS=:
23491 for f in $ac_file_in; do
23493 -) echo $tmp/stdin ;;
23495 # Absolute (can't be DOS-style, as IFS=:)
23496 test -f "$f" || { { echo "$as_me:23496: error: cannot find input file: $f" >&5
23497 echo "$as_me: error: cannot find input file: $f" >&2;}
23498 { (exit 1); exit 1; }; }
23501 if test -f "$f"; then
23504 elif test -f "$srcdir/$f"; then
23509 { { echo "$as_me:23509: error: cannot find input file: $f" >&5
23510 echo "$as_me: error: cannot find input file: $f" >&2;}
23511 { (exit 1); exit 1; }; }
23514 done` || { (exit 1); exit 1; }
23516 cat >>"$CONFIG_STATUS" <<\EOF
23517 ac_warn_datarootdir=no
23518 if test x"$ac_file" != x-; then
23519 for ac_item in $ac_file_inputs
23521 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23522 if test -n "$ac_seen"; then
23523 ac_used=`grep '@datarootdir@' "$ac_item"`
23524 if test -z "$ac_used"; then
23525 { echo "$as_me:23525: WARNING: datarootdir was used implicitly but not set:
23527 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23529 ac_warn_datarootdir=yes
23532 ac_seen=`grep '${datarootdir}' "$ac_item"`
23533 if test -n "$ac_seen"; then
23534 { echo "$as_me:23534: WARNING: datarootdir was used explicitly but not set:
23536 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23538 ac_warn_datarootdir=yes
23543 if test "x$ac_warn_datarootdir" = xyes; then
23544 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23548 cat >>"$CONFIG_STATUS" <<EOF
23552 cat >>"$CONFIG_STATUS" <<\EOF
23554 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23555 s,@configure_input@,$configure_input,;t t
23556 s,@srcdir@,$ac_srcdir,;t t
23557 s,@top_srcdir@,$ac_top_srcdir,;t t
23558 s,@INSTALL@,$ac_INSTALL,;t t
23559 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23561 if test x"$ac_file" != x-; then
23562 cp "$tmp/out" "$ac_file"
23564 for ac_name in prefix exec_prefix datarootdir
23566 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23567 if test -n "$ac_seen"; then
23568 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23569 if test -z "$ac_init"; then
23570 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23571 { echo "$as_me:23571: WARNING: Variable $ac_name is used but was not set:
23573 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23578 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23579 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23580 if test -s $tmp/out; then
23581 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23582 { echo "$as_me:23582: WARNING: Some variables may not be substituted:
23584 echo "$as_me: WARNING: Some variables may not be substituted:
23594 cat >>"$CONFIG_STATUS" <<\EOF
23597 # CONFIG_HEADER section.
23600 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23601 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23603 # ac_d sets the value in "#define NAME VALUE" lines.
23604 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23605 ac_dB='[ ].*$,\1#\2'
23608 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23609 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23610 ac_iB='\([ ]\),\1#\2define\3'
23613 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23614 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23615 ac_uB='$,\1#\2define\3'
23619 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23620 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23622 - | *:- | *:-:* ) # input from stdin
23624 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23625 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23626 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23627 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23628 * ) ac_file_in=$ac_file.in ;;
23631 test x"$ac_file" != x- && { echo "$as_me:23631: creating $ac_file" >&5
23632 echo "$as_me: creating $ac_file" >&6;}
23634 # First look for the input files in the build tree, otherwise in the
23636 ac_file_inputs=`IFS=:
23637 for f in $ac_file_in; do
23639 -) echo $tmp/stdin ;;
23641 # Absolute (can't be DOS-style, as IFS=:)
23642 test -f "$f" || { { echo "$as_me:23642: error: cannot find input file: $f" >&5
23643 echo "$as_me: error: cannot find input file: $f" >&2;}
23644 { (exit 1); exit 1; }; }
23647 if test -f "$f"; then
23650 elif test -f "$srcdir/$f"; then
23655 { { echo "$as_me:23655: error: cannot find input file: $f" >&5
23656 echo "$as_me: error: cannot find input file: $f" >&2;}
23657 { (exit 1); exit 1; }; }
23660 done` || { (exit 1); exit 1; }
23661 # Remove the trailing spaces.
23662 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23666 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23667 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23668 # be either 'cat' or 'sort'.
23669 cat confdefs.h | uniq >conftest.vals
23671 # Break up conftest.vals because some shells have a limit on
23672 # the size of here documents, and old seds have small limits too.
23674 rm -f conftest.tail
23675 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23676 while grep . conftest.vals >/dev/null
23678 # Write chunks of a limited-size here document to conftest.frag.
23679 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23680 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23681 echo 'CEOF' >> "$CONFIG_STATUS"
23682 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23683 rm -f conftest.vals
23684 mv conftest.tail conftest.vals
23686 rm -f conftest.vals
23688 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23690 echo ' cat >> conftest.edit <<CEOF
23691 /@DEFS@/r conftest.frag
23694 sed -f conftest.edit $tmp/in > $tmp/out
23696 mv $tmp/out $tmp/in
23697 rm -f conftest.edit conftest.frag
23698 ' >> "$CONFIG_STATUS"
23700 cat >>"$CONFIG_STATUS" <<\EOF
23701 # Let's still pretend it is `configure' which instantiates (i.e., don't
23702 # use $as_me), people would be surprised to read:
23703 # /* config.h. Generated automatically by config.status. */
23704 if test x"$ac_file" = x-; then
23705 echo "/* Generated automatically by configure. */" >$tmp/config.h
23707 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23709 cat $tmp/in >>$tmp/config.h
23711 if test x"$ac_file" != x-; then
23712 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23713 { echo "$as_me:23713: $ac_file is unchanged" >&5
23714 echo "$as_me: $ac_file is unchanged" >&6;}
23716 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23717 X"$ac_file" : 'X\(//\)[^/]' \| \
23718 X"$ac_file" : 'X\(//\)$' \| \
23719 X"$ac_file" : 'X\(/\)' \| \
23720 . : '\(.\)' 2>/dev/null ||
23722 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23723 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23724 /^X\(\/\/\)$/{ s//\1/; q; }
23725 /^X\(\/\).*/{ s//\1/; q; }
23727 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23728 { case "$ac_dir" in
23729 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23733 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23734 case $as_mkdir_dir in
23735 # Skip DOS drivespec
23736 ?:) as_incr_dir=$as_mkdir_dir ;;
23738 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23739 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23746 mv "$tmp/config.h" "$ac_file"
23750 rm -f $tmp/config.h
23754 cat >>"$CONFIG_STATUS" <<\EOF
23756 # CONFIG_COMMANDS section.
23758 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23759 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23760 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23767 if test ! -d "$srcdir/$cf_dir" ; then
23769 elif test -f "$srcdir/$cf_dir/programs" ; then
23770 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23774 cat >>Makefile <<TEST_EOF
23776 # These rules are generated so we do not rely on suffix rules, which do not
23777 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23778 # some, and the '\$x' confuses others).
23781 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23784 cat >>Makefile <<TEST_EOF
23786 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23787 \$(srcdir)/test.priv.h \\
23790 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23794 if test -f ../config.guess && test -f ../config.sub
23796 cat >>Makefile <<TEST_EOF
23798 # if we used CF_INHERIT for getting these files, we can remove them
23800 rm -f config.guess config.sub
23808 cat >>"$CONFIG_STATUS" <<\EOF
23810 { (exit 0); exit 0; }
23812 chmod +x "$CONFIG_STATUS"
23813 ac_clean_files=$ac_clean_files_save
23815 # configure is writing to config.log, and then calls config.status.
23816 # config.status does its own redirection, appending to config.log.
23817 # Unfortunately, on DOS this fails, as config.log is still kept open
23818 # by configure, so config.status won't be able to write to it; its
23819 # output is simply discarded. So we exec the FD to /dev/null,
23820 # effectively closing config.log, so it can be properly (re)opened and
23821 # appended to by config.status. When coming back to configure, we
23822 # need to make the FD available again.
23823 if test "$no_create" != yes; then
23826 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
23828 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23829 # would make configure fail if this is the last instruction.
23830 "$ac_cs_success" || { (exit 1); exit 1; }