2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20230114.
5 # Copyright 2003-2022,2023 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
109 ac_unique_file="ncurses.c"
111 # Initialize some variables set by options.
113 ac_init_version=false
114 # The variables have the same names as the options, with
115 # dashes changed to underlines.
123 program_transform_name=s,x,x,
131 # Installation directory options.
132 # These are left unexpanded so users can "make install exec_prefix=/foo"
133 # and all the variables that are supposed to be based on exec_prefix
134 # by default will actually change.
135 # Use braces instead of parens because sh, perl, etc. also accept them.
136 bindir='${exec_prefix}/bin'
137 sbindir='${exec_prefix}/sbin'
138 libexecdir='${exec_prefix}/libexec'
139 datarootdir='${prefix}/share'
140 datadir='${datarootdir}'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 runstatedir='${localstatedir}/run'
145 libdir='${exec_prefix}/lib'
146 includedir='${prefix}/include'
147 oldincludedir='/usr/include'
148 infodir='${datarootdir}/info'
149 mandir='${datarootdir}/man'
151 # Identity of this package.
161 # If the previous option needs an argument, assign it.
162 if test -n "$ac_prev"; then
163 eval "$ac_prev=\$ac_option"
168 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
170 # Accept the important Cygnus configure options, so we can diagnose typos.
174 -bindir | --bindir | --bindi | --bind | --bin | --bi)
176 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
179 -build | --build | --buil | --bui | --bu)
180 ac_prev=build_alias ;;
181 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182 build_alias=$ac_optarg ;;
184 -cache-file | --cache-file | --cache-fil | --cache-fi \
185 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
186 ac_prev=cache_file ;;
187 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
188 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
189 cache_file=$ac_optarg ;;
192 cache_file=config.cache ;;
194 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
196 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
198 datadir=$ac_optarg ;;
200 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
201 | --dataroo | --dataro | --datar)
202 ac_prev=datarootdir ;;
203 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
204 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
205 datarootdir=$ac_optarg ;;
207 -disable-* | --disable-*)
208 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
209 # Reject names that are not valid shell variable names.
210 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
211 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
212 { (exit 1); exit 1; }; }
213 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
214 eval "enable_$ac_feature=no" ;;
216 -enable-* | --enable-*)
217 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
218 # Reject names that are not valid shell variable names.
219 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
220 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
221 { (exit 1); exit 1; }; }
222 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
224 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
227 eval "enable_$ac_feature='$ac_optarg'" ;;
229 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231 | --exec | --exe | --ex)
232 ac_prev=exec_prefix ;;
233 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235 | --exec=* | --exe=* | --ex=*)
236 exec_prefix=$ac_optarg ;;
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
242 -help | --help | --hel | --he | -h)
244 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
245 ac_init_help=recursive ;;
246 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
247 ac_init_help=short ;;
249 -host | --host | --hos | --ho)
250 ac_prev=host_alias ;;
251 -host=* | --host=* | --hos=* | --ho=*)
252 host_alias=$ac_optarg ;;
254 -includedir | --includedir | --includedi | --included | --include \
255 | --includ | --inclu | --incl | --inc)
256 ac_prev=includedir ;;
257 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258 | --includ=* | --inclu=* | --incl=* | --inc=*)
259 includedir=$ac_optarg ;;
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264 infodir=$ac_optarg ;;
266 -libdir | --libdir | --libdi | --libd)
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
271 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272 | --libexe | --libex | --libe)
273 ac_prev=libexecdir ;;
274 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275 | --libexe=* | --libex=* | --libe=*)
276 libexecdir=$ac_optarg ;;
278 -localstatedir | --localstatedir | --localstatedi | --localstated \
279 | --localstate | --localstat | --localsta | --localst \
280 | --locals | --local | --loca | --loc | --lo)
281 ac_prev=localstatedir ;;
282 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285 localstatedir=$ac_optarg ;;
287 -runstatedir | --runstatedir | --runstatedi | --runstated \
288 | --runstate | --runstat | --runsta | --runst \
289 | --runs | --run | --ru)
290 ac_prev=runstatedir ;;
291 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
292 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
293 | --runs=* | --run=* | --ru=*)
294 runstatedir=$ac_optarg ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 # Obsolete; use --without-fp.
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315 | --oldin | --oldi | --old | --ol | --o)
316 ac_prev=oldincludedir ;;
317 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320 oldincludedir=$ac_optarg ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327 -program-prefix | --program-prefix | --program-prefi | --program-pref \
328 | --program-pre | --program-pr | --program-p)
329 ac_prev=program_prefix ;;
330 -program-prefix=* | --program-prefix=* | --program-prefi=* \
331 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332 program_prefix=$ac_optarg ;;
334 -program-suffix | --program-suffix | --program-suffi | --program-suff \
335 | --program-suf | --program-su | --program-s)
336 ac_prev=program_suffix ;;
337 -program-suffix=* | --program-suffix=* | --program-suffi=* \
338 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339 program_suffix=$ac_optarg ;;
341 -program-transform-name | --program-transform-name \
342 | --program-transform-nam | --program-transform-na \
343 | --program-transform-n | --program-transform- \
344 | --program-transform | --program-transfor \
345 | --program-transfo | --program-transf \
346 | --program-trans | --program-tran \
347 | --progr-tra | --program-tr | --program-t)
348 ac_prev=program_transform_name ;;
349 -program-transform-name=* | --program-transform-name=* \
350 | --program-transform-nam=* | --program-transform-na=* \
351 | --program-transform-n=* | --program-transform-=* \
352 | --program-transform=* | --program-transfor=* \
353 | --program-transfo=* | --program-transf=* \
354 | --program-trans=* | --program-tran=* \
355 | --progr-tra=* | --program-tr=* | --program-t=*)
356 program_transform_name=$ac_optarg ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 sbindir=$ac_optarg ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 sharedstatedir=$ac_optarg ;;
379 -site | --site | --sit)
381 -site=* | --site=* | --sit=*)
384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
390 | --syscon | --sysco | --sysc | --sys | --sy)
391 ac_prev=sysconfdir ;;
392 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
393 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
394 sysconfdir=$ac_optarg ;;
396 -target | --target | --targe | --targ | --tar | --ta | --t)
397 ac_prev=target_alias ;;
398 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
399 target_alias=$ac_optarg ;;
401 -v | -verbose | --verbose | --verbos | --verbo | --verb)
404 -version | --version | --versio | --versi | --vers | -V)
408 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
409 # Reject names that are not valid shell variable names.
410 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid package name: $ac_package" >&2
412 { (exit 1); exit 1; }; }
413 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418 eval "with_$ac_package='$ac_optarg'" ;;
420 -without-* | --without-*)
421 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
422 # Reject names that are not valid shell variable names.
423 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
424 { echo "$as_me: error: invalid package name: $ac_package" >&2
425 { (exit 1); exit 1; }; }
426 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
427 eval "with_$ac_package=no" ;;
430 # Obsolete; use --with-x.
433 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434 | --x-incl | --x-inc | --x-in | --x-i)
435 ac_prev=x_includes ;;
436 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438 x_includes=$ac_optarg ;;
440 -x-libraries | --x-libraries | --x-librarie | --x-librari \
441 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442 ac_prev=x_libraries ;;
443 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445 x_libraries=$ac_optarg ;;
447 -*) { echo "$as_me: error: unrecognized option: $ac_option
448 Try \`$0 --help' for more information." >&2
449 { (exit 1); exit 1; }; }
453 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
454 # Reject names that are not valid shell variable names.
455 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
456 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
457 { (exit 1); exit 1; }; }
458 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
459 eval "$ac_envvar='$ac_optarg'"
460 export "$ac_envvar" ;;
463 # FIXME: should be removed in autoconf 3.0.
464 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
465 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
466 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
467 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
473 if test -n "$ac_prev"; then
474 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
475 { echo "$as_me: error: missing argument to $ac_option" >&2
476 { (exit 1); exit 1; }; }
479 # Be sure to have absolute paths.
480 for ac_var in exec_prefix prefix
482 eval ac_val=$`echo "$ac_var"`
484 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # Be sure to have absolute paths.
491 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492 localstatedir libdir includedir oldincludedir infodir mandir
494 eval ac_val=$`echo "$ac_var"`
496 [\\/$]* | ?:[\\/]* ) ;;
497 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498 { (exit 1); exit 1; }; };;
502 # There might be people who depend on the old broken behavior: `$host'
503 # used to hold the argument of --host etc.
508 # FIXME: should be removed in autoconf 3.0.
509 if test "x$host_alias" != x; then
510 if test "x$build_alias" = x; then
511 cross_compiling=maybe
512 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
513 If a cross compiler is detected then cross compile mode will be used." >&2
514 elif test "x$build_alias" != "x$host_alias"; then
520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
522 test "$silent" = yes && exec 6>/dev/null
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526 ac_srcdir_defaulted=yes
527 # Try the directory containing this script, then its parent.
529 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
532 if test ! -r "$srcdir/$ac_unique_file"; then
536 ac_srcdir_defaulted=no
538 if test ! -r "$srcdir/$ac_unique_file"; then
539 if test "$ac_srcdir_defaulted" = yes; then
540 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
541 { (exit 1); exit 1; }; }
543 { echo "$as_me: error: cannot find sources in $srcdir" >&2
544 { (exit 1); exit 1; }; }
547 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548 ac_env_build_alias_set=${build_alias+set}
549 ac_env_build_alias_value=$build_alias
550 ac_cv_env_build_alias_set=${build_alias+set}
551 ac_cv_env_build_alias_value=$build_alias
552 ac_env_host_alias_set=${host_alias+set}
553 ac_env_host_alias_value=$host_alias
554 ac_cv_env_host_alias_set=${host_alias+set}
555 ac_cv_env_host_alias_value=$host_alias
556 ac_env_target_alias_set=${target_alias+set}
557 ac_env_target_alias_value=$target_alias
558 ac_cv_env_target_alias_set=${target_alias+set}
559 ac_cv_env_target_alias_value=$target_alias
560 ac_env_CC_set=${CC+set}
562 ac_cv_env_CC_set=${CC+set}
563 ac_cv_env_CC_value=$CC
564 ac_env_CFLAGS_set=${CFLAGS+set}
565 ac_env_CFLAGS_value=$CFLAGS
566 ac_cv_env_CFLAGS_set=${CFLAGS+set}
567 ac_cv_env_CFLAGS_value=$CFLAGS
568 ac_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_env_LDFLAGS_value=$LDFLAGS
570 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571 ac_cv_env_LDFLAGS_value=$LDFLAGS
572 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_env_CPPFLAGS_value=$CPPFLAGS
574 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576 ac_env_CPP_set=${CPP+set}
577 ac_env_CPP_value=$CPP
578 ac_cv_env_CPP_set=${CPP+set}
579 ac_cv_env_CPP_value=$CPP
582 # Report the --help message.
584 if test "$ac_init_help" = "long"; then
585 # Omit some internal or obsolete options to make the list less imposing.
586 # This message is too long to be a string in the A/UX 3.1 sh.
588 \`configure' configures this package to adapt to many kinds of systems.
590 Usage: $0 [OPTION]... [VAR=VALUE]...
592 To assign environment variables (e.g., CC, CFLAGS...), specify them as
593 VAR=VALUE. See below for descriptions of some of the useful variables.
595 Defaults for the options are specified in brackets.
598 -h, --help display this help and exit
599 --help=short display options specific to this package
600 --help=recursive display the short help of all the included packages
601 -V, --version display version information and exit
602 -q, --quiet, --silent do not print \`checking...' messages
603 --cache-file=FILE cache test results in FILE [disabled]
604 -C, --config-cache alias for \`--cache-file=config.cache'
605 -n, --no-create do not create output files
606 --srcdir=DIR find the sources in DIR [configure dir or \`..']
611 Installation directories:
612 --prefix=PREFIX install architecture-independent files in PREFIX
614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
617 By default, \`make install' will install all the files in
618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620 for instance \`--prefix=\$HOME'.
622 For better control, use the options below.
624 Fine tuning of the installation directories:
625 --bindir=DIR user executables [EPREFIX/bin]
626 --sbindir=DIR system admin executables [EPREFIX/sbin]
627 --libexecdir=DIR program executables [EPREFIX/libexec]
628 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
629 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
630 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
631 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
632 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
633 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
634 --libdir=DIR object code libraries [EPREFIX/lib]
635 --includedir=DIR C header files [PREFIX/include]
636 --oldincludedir=DIR C header files for non-gcc [/usr/include]
637 --infodir=DIR info documentation [DATAROOTDIR/info]
638 --mandir=DIR man documentation [DATAROOTDIR/man]
644 --program-prefix=PREFIX prepend PREFIX to installed program names
645 --program-suffix=SUFFIX append SUFFIX to installed program names
646 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
649 --x-includes=DIR X include files are in DIR
650 --x-libraries=DIR X library files are in DIR
653 --build=BUILD configure for building on BUILD [guessed]
654 --host=HOST build programs to run on HOST [BUILD]
658 if test -n "$ac_init_help"; then
663 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
664 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
667 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
668 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
671 --disable-stripping do not strip (debug info) installed executables
672 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
673 --enable-string-hacks work around bogus compiler/loader warnings
674 --with-pkg-config{=path} enable/disable use of pkg-config
675 --disable-echo do not display "compiling" commands
676 Curses Version-dependent Options:
677 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
678 --disable-widec disable checks for wide-character functions
679 --with-curses-dir=DIR directory in which (n)curses is installed
680 --with-screen=XXX use specified curses-libraries
681 --with-ncursesw use wide ncurses-libraries
682 --with-ncurses use ncurses-libraries
683 --with-pdcurses compile/link with pdcurses X11 library
684 --with-curses-colr compile/link with HPUX 10.x color-curses
685 --with-curses-5lib compile/link with SunOS 5lib curses
686 --with-Xaw3d link with Xaw 3d library
687 --with-Xaw3dxft link with Xaw 3d xft library
688 --with-neXtaw link with neXT Athena library
689 --with-XawPlus link with Athena-Plus library
690 --with-x use the X Window System
691 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
692 --with-form-libname=XXX override form basename of library
693 --with-menu-libname=XXX override menu basename of library
694 --with-panel-libname=XXX override panel basename of library
695 --disable-panel disable checks for panel functions
696 --disable-menu disable checks for menu functions
697 --disable-form disable checks for form functions
698 Testing/development Options:
699 --enable-warnings test: turn on gcc compiler warnings
700 --with-dmalloc test: use Gray Watson's dmalloc library
701 --with-dbmalloc test: use Conor Cahill's dbmalloc library
702 --with-valgrind test: use valgrind
703 --disable-leaks test: free permanent memory, analyze leaks
704 --disable-rpath-hack don't add rpath options for additional libraries
706 Some influential environment variables:
707 CC C compiler command
708 CFLAGS C compiler flags
709 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
710 nonstandard directory <lib dir>
711 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
712 headers in a nonstandard directory <include dir>
715 Use these variables to override the choices made by `configure' or to help
716 it to find libraries and programs with nonstandard names/locations.
721 if test "$ac_init_help" = "recursive"; then
722 # If there are subdirs, report their specific --help.
724 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
726 # A "../" for each directory in /$ac_subdir.
727 ac_dots=`echo "$ac_subdir" |
728 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
731 .) # No --srcdir option. We are building in place.
732 ac_sub_srcdir="$srcdir" ;;
733 [\\/]* | ?:[\\/]* ) # Absolute path.
734 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
736 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
739 # Check for guested configure; otherwise get Cygnus style configure.
740 if test -f "$ac_sub_srcdir/configure.gnu"; then
742 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
743 elif test -f "$ac_sub_srcdir/configure"; then
745 $SHELL "$ac_sub_srcdir/configure" --help=recursive
746 elif test -f "$ac_sub_srcdir/configure.ac" ||
747 test -f "$ac_sub_srcdir/configure.in"; then
749 "$ac_configure" --help
751 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
757 test -n "$ac_init_help" && exit 0
758 if "$ac_init_version"; then
761 Copyright 2003-2022,2023 Thomas E. Dickey
762 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
763 Free Software Foundation, Inc.
764 This configure script is free software; the Free Software Foundation
765 gives unlimited permission to copy, distribute and modify it.
771 This file contains any messages produced by compilers while
772 running configure, to aid debugging if configure makes a mistake.
774 It was created by $as_me, which was
775 generated by GNU Autoconf 2.52.20230114. Invocation command line was
786 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
787 uname -m = `(uname -m) 2>/dev/null || echo unknown`
788 uname -r = `(uname -r) 2>/dev/null || echo unknown`
789 uname -s = `(uname -s) 2>/dev/null || echo unknown`
790 uname -v = `(uname -v) 2>/dev/null || echo unknown`
792 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
793 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
795 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
796 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
797 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
798 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
799 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
800 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
801 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
815 # Keep a trace of the command line.
816 # Strip out --no-create and --no-recursion so they do not pile up.
817 # Also quote any args containing shell meta-characters.
823 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
824 | --no-cr | --no-c) ;;
825 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
826 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
827 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
828 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
829 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
831 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
834 # Get rid of the leading space.
837 # When interrupted or exit'd, cleanup temporary files, and complete
838 # config.log. We remove comments because anyway the quotes in there
839 # would cause problems or look ugly.
841 # Save into config.log some information that might help in debugging.
843 echo "## ----------------- ##" >&5
844 echo "## Cache variables. ##" >&5
845 echo "## ----------------- ##" >&5
847 # The following way of writing the cache mishandles newlines in values,
850 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
853 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
854 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
858 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
862 sed "/^$/d" confdefs.h >conftest.log
863 if test -s conftest.log; then
865 echo "## ------------ ##" >&5
866 echo "## confdefs.h. ##" >&5
867 echo "## ------------ ##" >&5
872 test "$ac_signal" != 0 &&
873 echo "$as_me: caught signal $ac_signal" >&5
874 echo "$as_me: exit $exit_status" >&5
875 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
878 for ac_signal in 1 2 13 15; do
879 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
883 # confdefs.h avoids OS command line length limits that DEFS can exceed.
884 rm -rf conftest* confdefs.h
885 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
888 # Let the site file select an alternate cache file if it wants to.
889 # Prefer explicitly selected file to automatically selected ones.
890 if test -z "$CONFIG_SITE"; then
891 if test "x$prefix" != xNONE; then
892 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
894 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
897 for ac_site_file in $CONFIG_SITE; do
898 if test -r "$ac_site_file"; then
899 { echo "$as_me:899: loading site script $ac_site_file" >&5
900 echo "$as_me: loading site script $ac_site_file" >&6;}
901 cat "$ac_site_file" >&5
906 if test -r "$cache_file"; then
907 # Some versions of bash will fail to source /dev/null (special
908 # files actually), so we avoid doing that.
909 if test -f "$cache_file"; then
910 { echo "$as_me:910: loading cache $cache_file" >&5
911 echo "$as_me: loading cache $cache_file" >&6;}
913 [\\/]* | ?:[\\/]* ) . $cache_file;;
918 { echo "$as_me:918: creating cache $cache_file" >&5
919 echo "$as_me: creating cache $cache_file" >&6;}
923 # Check that the precious variables saved in the cache have kept the same
925 ac_cache_corrupted=false
926 for ac_var in `(set) 2>&1 |
927 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
928 eval ac_old_set=\$ac_cv_env_${ac_var}_set
929 eval ac_new_set=\$ac_env_${ac_var}_set
930 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
931 eval ac_new_val="\$ac_env_${ac_var}_value"
932 case "$ac_old_set,$ac_new_set" in
934 { echo "$as_me:934: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
938 { echo "$as_me:938: error: \`$ac_var' was not set in the previous run" >&5
939 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
940 ac_cache_corrupted=: ;;
943 if test "x$ac_old_val" != "x$ac_new_val"; then
944 { echo "$as_me:944: error: \`$ac_var' has changed since the previous run:" >&5
945 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
946 { echo "$as_me:946: former value: $ac_old_val" >&5
947 echo "$as_me: former value: $ac_old_val" >&2;}
948 { echo "$as_me:948: current value: $ac_new_val" >&5
949 echo "$as_me: current value: $ac_new_val" >&2;}
953 # Pass precious variables to config.status. It doesn't matter if
954 # we pass some twice (in addition to the command line arguments).
955 if test "$ac_new_set" = set; then
956 case "$ac_new_val" in
957 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
958 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
959 ac_configure_args="$ac_configure_args '$ac_arg'"
961 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
966 if "$ac_cache_corrupted"; then
967 { echo "$as_me:967: error: changes in the environment can compromise the build" >&5
968 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
969 { { echo "$as_me:969: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
970 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
971 { (exit 1); exit 1; }; }
975 ac_cpp='$CPP $CPPFLAGS'
976 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
977 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
979 ac_main_return="return"
981 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
983 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
995 echo "#! $SHELL" >conftest.sh
996 echo "exit 0" >>conftest.sh
998 if { (echo "$as_me:998: PATH=\".;.\"; conftest.sh") >&5
999 (PATH=".;."; conftest.sh) 2>&5
1001 echo "$as_me:1001: \$? = $ac_status" >&5
1002 (exit "$ac_status"); }; then
1003 ac_path_separator=';'
1007 PATH_SEPARATOR="$ac_path_separator"
1010 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1012 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1014 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1017 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1018 if test -f "$ac_dir/install-sh"; then
1020 ac_install_sh="$ac_aux_dir/install-sh -c"
1022 elif test -f "$ac_dir/install.sh"; then
1024 ac_install_sh="$ac_aux_dir/install.sh -c"
1026 elif test -f "$ac_dir/shtool"; then
1028 ac_install_sh="$ac_aux_dir/shtool install -c"
1032 if test -z "$ac_aux_dir"; then
1033 { { echo "$as_me:1033: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1034 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1035 { (exit 1); exit 1; }; }
1037 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1038 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1039 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1041 # Make sure we can run config.sub.
1042 $ac_config_sub sun4 >/dev/null 2>&1 ||
1043 { { echo "$as_me:1043: error: cannot run $ac_config_sub" >&5
1044 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1045 { (exit 1); exit 1; }; }
1047 echo "$as_me:1047: checking build system type" >&5
1048 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1049 if test "${ac_cv_build+set}" = set; then
1050 echo $ECHO_N "(cached) $ECHO_C" >&6
1052 ac_cv_build_alias=$build_alias
1053 test -z "$ac_cv_build_alias" &&
1054 ac_cv_build_alias=`$ac_config_guess`
1055 test -z "$ac_cv_build_alias" &&
1056 { { echo "$as_me:1056: error: cannot guess build type; you must specify one" >&5
1057 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1058 { (exit 1); exit 1; }; }
1059 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1060 { { echo "$as_me:1060: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1061 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1062 { (exit 1); exit 1; }; }
1065 echo "$as_me:1065: result: $ac_cv_build" >&5
1066 echo "${ECHO_T}$ac_cv_build" >&6
1068 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1069 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1070 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1072 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1073 echo "$as_me:1073: checking host system type" >&5
1074 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1075 if test "${ac_cv_host+set}" = set; then
1076 echo $ECHO_N "(cached) $ECHO_C" >&6
1078 ac_cv_host_alias=$host_alias
1079 test -z "$ac_cv_host_alias" &&
1080 ac_cv_host_alias=$ac_cv_build_alias
1081 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1082 { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1083 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1084 { (exit 1); exit 1; }; }
1087 echo "$as_me:1087: result: $ac_cv_host" >&5
1088 echo "${ECHO_T}$ac_cv_host" >&6
1090 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1094 system_name="$host_os"
1096 system_name="`(uname -s -r) 2>/dev/null`"
1097 if test -z "$system_name" ; then
1098 system_name="`(hostname) 2>/dev/null`"
1101 test -n "$system_name" &&
1102 cat >>confdefs.h <<EOF
1103 #define SYSTEM_NAME "$system_name"
1106 if test "${cf_cv_system_name+set}" = set; then
1107 echo $ECHO_N "(cached) $ECHO_C" >&6
1109 cf_cv_system_name="$system_name"
1112 test -z "$system_name" && system_name="$cf_cv_system_name"
1113 test -n "$cf_cv_system_name" && echo "$as_me:1113: result: Configuring for $cf_cv_system_name" >&5
1114 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116 if test ".$system_name" != ".$cf_cv_system_name" ; then
1117 echo "$as_me:1117: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1118 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1119 { { echo "$as_me:1119: error: \"Please remove config.cache and try again.\"" >&5
1120 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1121 { (exit 1); exit 1; }; }
1124 test "$program_prefix" != NONE &&
1125 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1126 # Use a double $ so make ignores it.
1127 test "$program_suffix" != NONE &&
1128 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1129 # Double any \ or $. echo might interpret backslashes.
1130 # By default was `s,x,x', remove it if useless.
1131 cat <<\_ACEOF >conftest.sed
1132 s/[\\$]/&&/g;s/;s,x,x,$//
1134 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1137 echo "$as_me:1137: checking whether ${MAKE-make} sets \${MAKE}" >&5
1138 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1139 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1140 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1141 echo $ECHO_N "(cached) $ECHO_C" >&6
1143 cat >conftest.make <<\EOF
1145 @echo 'ac_maketemp="${MAKE}"'
1147 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1148 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1149 if test -n "$ac_maketemp"; then
1150 eval ac_cv_prog_make_${ac_make}_set=yes
1152 eval ac_cv_prog_make_${ac_make}_set=no
1156 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1157 echo "$as_me:1157: result: yes" >&5
1158 echo "${ECHO_T}yes" >&6
1161 echo "$as_me:1161: result: no" >&5
1162 echo "${ECHO_T}no" >&6
1163 SET_MAKE="MAKE=${MAKE-make}"
1167 ac_cpp='$CPP $CPPFLAGS'
1168 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1169 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1171 ac_main_return="return"
1172 if test -n "$ac_tool_prefix"; then
1173 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1174 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1175 echo "$as_me:1175: checking for $ac_word" >&5
1176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1177 if test "${ac_cv_prog_CC+set}" = set; then
1178 echo $ECHO_N "(cached) $ECHO_C" >&6
1180 if test -n "$CC"; then
1181 ac_cv_prog_CC="$CC" # Let the user override the test.
1183 ac_save_IFS=$IFS; IFS=$ac_path_separator
1185 for ac_dir in $ac_dummy; do
1187 test -z "$ac_dir" && ac_dir=.
1188 $as_executable_p "$ac_dir/$ac_word" || continue
1189 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1190 echo "$as_me:1190: found $ac_dir/$ac_word" >&5
1197 if test -n "$CC"; then
1198 echo "$as_me:1198: result: $CC" >&5
1199 echo "${ECHO_T}$CC" >&6
1201 echo "$as_me:1201: result: no" >&5
1202 echo "${ECHO_T}no" >&6
1206 if test -z "$ac_cv_prog_CC"; then
1208 # Extract the first word of "gcc", so it can be a program name with args.
1209 set dummy gcc; ac_word=$2
1210 echo "$as_me:1210: checking for $ac_word" >&5
1211 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1212 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1213 echo $ECHO_N "(cached) $ECHO_C" >&6
1215 if test -n "$ac_ct_CC"; then
1216 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1218 ac_save_IFS=$IFS; IFS=$ac_path_separator
1220 for ac_dir in $ac_dummy; do
1222 test -z "$ac_dir" && ac_dir=.
1223 $as_executable_p "$ac_dir/$ac_word" || continue
1224 ac_cv_prog_ac_ct_CC="gcc"
1225 echo "$as_me:1225: found $ac_dir/$ac_word" >&5
1231 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1232 if test -n "$ac_ct_CC"; then
1233 echo "$as_me:1233: result: $ac_ct_CC" >&5
1234 echo "${ECHO_T}$ac_ct_CC" >&6
1236 echo "$as_me:1236: result: no" >&5
1237 echo "${ECHO_T}no" >&6
1245 if test -z "$CC"; then
1246 if test -n "$ac_tool_prefix"; then
1247 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1248 set dummy ${ac_tool_prefix}cc; ac_word=$2
1249 echo "$as_me:1249: checking for $ac_word" >&5
1250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1251 if test "${ac_cv_prog_CC+set}" = set; then
1252 echo $ECHO_N "(cached) $ECHO_C" >&6
1254 if test -n "$CC"; then
1255 ac_cv_prog_CC="$CC" # Let the user override the test.
1257 ac_save_IFS=$IFS; IFS=$ac_path_separator
1259 for ac_dir in $ac_dummy; do
1261 test -z "$ac_dir" && ac_dir=.
1262 $as_executable_p "$ac_dir/$ac_word" || continue
1263 ac_cv_prog_CC="${ac_tool_prefix}cc"
1264 echo "$as_me:1264: found $ac_dir/$ac_word" >&5
1271 if test -n "$CC"; then
1272 echo "$as_me:1272: result: $CC" >&5
1273 echo "${ECHO_T}$CC" >&6
1275 echo "$as_me:1275: result: no" >&5
1276 echo "${ECHO_T}no" >&6
1280 if test -z "$ac_cv_prog_CC"; then
1282 # Extract the first word of "cc", so it can be a program name with args.
1283 set dummy cc; ac_word=$2
1284 echo "$as_me:1284: checking for $ac_word" >&5
1285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1286 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1287 echo $ECHO_N "(cached) $ECHO_C" >&6
1289 if test -n "$ac_ct_CC"; then
1290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1292 ac_save_IFS=$IFS; IFS=$ac_path_separator
1294 for ac_dir in $ac_dummy; do
1296 test -z "$ac_dir" && ac_dir=.
1297 $as_executable_p "$ac_dir/$ac_word" || continue
1298 ac_cv_prog_ac_ct_CC="cc"
1299 echo "$as_me:1299: found $ac_dir/$ac_word" >&5
1305 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1306 if test -n "$ac_ct_CC"; then
1307 echo "$as_me:1307: result: $ac_ct_CC" >&5
1308 echo "${ECHO_T}$ac_ct_CC" >&6
1310 echo "$as_me:1310: result: no" >&5
1311 echo "${ECHO_T}no" >&6
1320 if test -z "$CC"; then
1321 # Extract the first word of "cc", so it can be a program name with args.
1322 set dummy cc; ac_word=$2
1323 echo "$as_me:1323: checking for $ac_word" >&5
1324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1325 if test "${ac_cv_prog_CC+set}" = set; then
1326 echo $ECHO_N "(cached) $ECHO_C" >&6
1328 if test -n "$CC"; then
1329 ac_cv_prog_CC="$CC" # Let the user override the test.
1332 ac_save_IFS=$IFS; IFS=$ac_path_separator
1334 for ac_dir in $ac_dummy; do
1336 test -z "$ac_dir" && ac_dir=.
1337 $as_executable_p "$ac_dir/$ac_word" || continue
1338 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1339 ac_prog_rejected=yes
1343 echo "$as_me:1343: found $ac_dir/$ac_word" >&5
1347 if test "$ac_prog_rejected" = yes; then
1348 # We found a bogon in the path, so make sure we never use it.
1349 set dummy $ac_cv_prog_CC
1351 if test $# != 0; then
1352 # We chose a different compiler from the bogus one.
1353 # However, it has the same basename, so the bogon will be chosen
1354 # first if we set CC to just the basename; use the full file name.
1356 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1364 if test -n "$CC"; then
1365 echo "$as_me:1365: result: $CC" >&5
1366 echo "${ECHO_T}$CC" >&6
1368 echo "$as_me:1368: result: no" >&5
1369 echo "${ECHO_T}no" >&6
1373 if test -z "$CC"; then
1374 if test -n "$ac_tool_prefix"; then
1377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1378 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1379 echo "$as_me:1379: checking for $ac_word" >&5
1380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1381 if test "${ac_cv_prog_CC+set}" = set; then
1382 echo $ECHO_N "(cached) $ECHO_C" >&6
1384 if test -n "$CC"; then
1385 ac_cv_prog_CC="$CC" # Let the user override the test.
1387 ac_save_IFS=$IFS; IFS=$ac_path_separator
1389 for ac_dir in $ac_dummy; do
1391 test -z "$ac_dir" && ac_dir=.
1392 $as_executable_p "$ac_dir/$ac_word" || continue
1393 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1394 echo "$as_me:1394: found $ac_dir/$ac_word" >&5
1401 if test -n "$CC"; then
1402 echo "$as_me:1402: result: $CC" >&5
1403 echo "${ECHO_T}$CC" >&6
1405 echo "$as_me:1405: result: no" >&5
1406 echo "${ECHO_T}no" >&6
1409 test -n "$CC" && break
1412 if test -z "$CC"; then
1416 # Extract the first word of "$ac_prog", so it can be a program name with args.
1417 set dummy $ac_prog; ac_word=$2
1418 echo "$as_me:1418: checking for $ac_word" >&5
1419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1421 echo $ECHO_N "(cached) $ECHO_C" >&6
1423 if test -n "$ac_ct_CC"; then
1424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1426 ac_save_IFS=$IFS; IFS=$ac_path_separator
1428 for ac_dir in $ac_dummy; do
1430 test -z "$ac_dir" && ac_dir=.
1431 $as_executable_p "$ac_dir/$ac_word" || continue
1432 ac_cv_prog_ac_ct_CC="$ac_prog"
1433 echo "$as_me:1433: found $ac_dir/$ac_word" >&5
1439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1440 if test -n "$ac_ct_CC"; then
1441 echo "$as_me:1441: result: $ac_ct_CC" >&5
1442 echo "${ECHO_T}$ac_ct_CC" >&6
1444 echo "$as_me:1444: result: no" >&5
1445 echo "${ECHO_T}no" >&6
1448 test -n "$ac_ct_CC" && break
1456 test -z "$CC" && { { echo "$as_me:1456: error: no acceptable cc found in \$PATH" >&5
1457 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1458 { (exit 1); exit 1; }; }
1460 # Provide some information about the compiler.
1461 echo "$as_me:1461:" \
1462 "checking for C compiler version" >&5
1463 ac_compiler=`set X $ac_compile; echo "$2"`
1464 { (eval echo "$as_me:1464: \"$ac_compiler --version </dev/null >&5\"") >&5
1465 (eval $ac_compiler --version </dev/null >&5) 2>&5
1467 echo "$as_me:1467: \$? = $ac_status" >&5
1468 (exit "$ac_status"); }
1469 { (eval echo "$as_me:1469: \"$ac_compiler -v </dev/null >&5\"") >&5
1470 (eval $ac_compiler -v </dev/null >&5) 2>&5
1472 echo "$as_me:1472: \$? = $ac_status" >&5
1473 (exit "$ac_status"); }
1474 { (eval echo "$as_me:1474: \"$ac_compiler -V </dev/null >&5\"") >&5
1475 (eval $ac_compiler -V </dev/null >&5) 2>&5
1477 echo "$as_me:1477: \$? = $ac_status" >&5
1478 (exit "$ac_status"); }
1480 cat >"conftest.$ac_ext" <<_ACEOF
1481 #line 1481 "configure"
1482 #include "confdefs.h"
1492 ac_clean_files_save=$ac_clean_files
1493 ac_clean_files="$ac_clean_files a.out a.exe"
1494 # Try to create an executable without -o first, disregard a.out.
1495 # It will help us diagnose broken compilers, and finding out an intuition
1497 echo "$as_me:1497: checking for C compiler default output" >&5
1498 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1499 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1500 if { (eval echo "$as_me:1500: \"$ac_link_default\"") >&5
1501 (eval $ac_link_default) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit "$ac_status"); }; then
1505 # Find the output, starting from the most likely. This scheme is
1506 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1508 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1509 ls a.out conftest 2>/dev/null;
1510 ls a.* conftest.* 2>/dev/null`; do
1512 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1513 a.out ) # We found the default executable, but exeext='' is most
1516 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1517 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1524 echo "$as_me: failed program was:" >&5
1525 cat "conftest.$ac_ext" >&5
1526 { { echo "$as_me:1526: error: C compiler cannot create executables" >&5
1527 echo "$as_me: error: C compiler cannot create executables" >&2;}
1528 { (exit 77); exit 77; }; }
1531 ac_exeext=$ac_cv_exeext
1532 echo "$as_me:1532: result: $ac_file" >&5
1533 echo "${ECHO_T}$ac_file" >&6
1535 # Check the compiler produces executables we can run. If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether the C compiler works" >&5
1538 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1539 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1540 # If not cross compiling, check that we can run a simple program.
1541 if test "$cross_compiling" != yes; then
1542 if { ac_try='./$ac_file'
1543 { (eval echo "$as_me:1543: \"$ac_try\"") >&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit "$ac_status"); }; }; then
1550 if test "$cross_compiling" = maybe; then
1553 { { echo "$as_me:1553: error: cannot run C compiled programs.
1554 If you meant to cross compile, use \`--host'." >&5
1555 echo "$as_me: error: cannot run C compiled programs.
1556 If you meant to cross compile, use \`--host'." >&2;}
1557 { (exit 1); exit 1; }; }
1561 echo "$as_me:1561: result: yes" >&5
1562 echo "${ECHO_T}yes" >&6
1564 rm -f a.out a.exe "conftest$ac_cv_exeext"
1565 ac_clean_files=$ac_clean_files_save
1566 # Check the compiler produces executables we can run. If not, either
1567 # the compiler is broken, or we cross compile.
1568 echo "$as_me:1568: checking whether we are cross compiling" >&5
1569 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1570 echo "$as_me:1570: result: $cross_compiling" >&5
1571 echo "${ECHO_T}$cross_compiling" >&6
1573 echo "$as_me:1573: checking for executable suffix" >&5
1574 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1575 if { (eval echo "$as_me:1575: \"$ac_link\"") >&5
1576 (eval $ac_link) 2>&5
1578 echo "$as_me:1578: \$? = $ac_status" >&5
1579 (exit "$ac_status"); }; then
1580 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1581 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1582 # work properly (i.e., refer to `conftest.exe'), while it won't with
1584 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1586 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1587 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1594 { { echo "$as_me:1594: error: cannot compute EXEEXT: cannot compile and link" >&5
1595 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1596 { (exit 1); exit 1; }; }
1599 rm -f "conftest$ac_cv_exeext"
1600 echo "$as_me:1600: result: $ac_cv_exeext" >&5
1601 echo "${ECHO_T}$ac_cv_exeext" >&6
1603 rm -f "conftest.$ac_ext"
1604 EXEEXT=$ac_cv_exeext
1606 echo "$as_me:1606: checking for object suffix" >&5
1607 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1608 if test "${ac_cv_objext+set}" = set; then
1609 echo $ECHO_N "(cached) $ECHO_C" >&6
1611 cat >"conftest.$ac_ext" <<_ACEOF
1612 #line 1612 "configure"
1613 #include "confdefs.h"
1623 rm -f conftest.o conftest.obj
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit "$ac_status"); }; then
1629 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1631 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1632 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1637 echo "$as_me: failed program was:" >&5
1638 cat "conftest.$ac_ext" >&5
1639 { { echo "$as_me:1639: error: cannot compute OBJEXT: cannot compile" >&5
1640 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1641 { (exit 1); exit 1; }; }
1644 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1646 echo "$as_me:1646: result: $ac_cv_objext" >&5
1647 echo "${ECHO_T}$ac_cv_objext" >&6
1648 OBJEXT=$ac_cv_objext
1650 echo "$as_me:1650: checking whether we are using the GNU C compiler" >&5
1651 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1652 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1653 echo $ECHO_N "(cached) $ECHO_C" >&6
1655 cat >"conftest.$ac_ext" <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1670 rm -f "conftest.$ac_objext"
1671 if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5
1672 (eval $ac_compile) 2>&5
1674 echo "$as_me:1674: \$? = $ac_status" >&5
1675 (exit "$ac_status"); } &&
1676 { ac_try='test -s "conftest.$ac_objext"'
1677 { (eval echo "$as_me:1677: \"$ac_try\"") >&5
1680 echo "$as_me:1680: \$? = $ac_status" >&5
1681 (exit "$ac_status"); }; }; then
1684 echo "$as_me: failed program was:" >&5
1685 cat "conftest.$ac_ext" >&5
1688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1689 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1692 echo "$as_me:1692: result: $ac_cv_c_compiler_gnu" >&5
1693 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1694 GCC=`test $ac_compiler_gnu = yes && echo yes`
1695 ac_test_CFLAGS=${CFLAGS+set}
1696 ac_save_CFLAGS=$CFLAGS
1698 echo "$as_me:1698: checking whether $CC accepts -g" >&5
1699 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1700 if test "${ac_cv_prog_cc_g+set}" = set; then
1701 echo $ECHO_N "(cached) $ECHO_C" >&6
1703 cat >"conftest.$ac_ext" <<_ACEOF
1704 #line 1704 "configure"
1705 #include "confdefs.h"
1715 rm -f "conftest.$ac_objext"
1716 if { (eval echo "$as_me:1716: \"$ac_compile\"") >&5
1717 (eval $ac_compile) 2>&5
1719 echo "$as_me:1719: \$? = $ac_status" >&5
1720 (exit "$ac_status"); } &&
1721 { ac_try='test -s "conftest.$ac_objext"'
1722 { (eval echo "$as_me:1722: \"$ac_try\"") >&5
1725 echo "$as_me:1725: \$? = $ac_status" >&5
1726 (exit "$ac_status"); }; }; then
1729 echo "$as_me: failed program was:" >&5
1730 cat "conftest.$ac_ext" >&5
1733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1735 echo "$as_me:1735: result: $ac_cv_prog_cc_g" >&5
1736 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1737 if test "$ac_test_CFLAGS" = set; then
1738 CFLAGS=$ac_save_CFLAGS
1739 elif test $ac_cv_prog_cc_g = yes; then
1740 if test "$GCC" = yes; then
1746 if test "$GCC" = yes; then
1752 # Some people use a C++ compiler to compile C. Since we use `exit',
1753 # in C++ we need to declare it. In case someone uses the same compiler
1754 # for both compiling C and C++ we need to have the C++ compiler decide
1755 # the declaration of exit, since it's the most demanding environment.
1756 cat >"conftest.$ac_ext" <<_ACEOF
1761 rm -f "conftest.$ac_objext"
1762 if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
1763 (eval $ac_compile) 2>&5
1765 echo "$as_me:1765: \$? = $ac_status" >&5
1766 (exit "$ac_status"); } &&
1767 { ac_try='test -s "conftest.$ac_objext"'
1768 { (eval echo "$as_me:1768: \"$ac_try\"") >&5
1771 echo "$as_me:1771: \$? = $ac_status" >&5
1772 (exit "$ac_status"); }; }; then
1773 for ac_declaration in \
1775 '#include <stdlib.h>' \
1776 'extern "C" void std::exit (int) throw (); using std::exit;' \
1777 'extern "C" void std::exit (int); using std::exit;' \
1778 'extern "C" void exit (int) throw ();' \
1779 'extern "C" void exit (int);' \
1782 cat >"conftest.$ac_ext" <<_ACEOF
1783 #line 1783 "configure"
1784 #include "confdefs.h"
1795 rm -f "conftest.$ac_objext"
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit "$ac_status"); } &&
1801 { ac_try='test -s "conftest.$ac_objext"'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit "$ac_status"); }; }; then
1809 echo "$as_me: failed program was:" >&5
1810 cat "conftest.$ac_ext" >&5
1813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1814 cat >"conftest.$ac_ext" <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1826 rm -f "conftest.$ac_objext"
1827 if { (eval echo "$as_me:1827: \"$ac_compile\"") >&5
1828 (eval $ac_compile) 2>&5
1830 echo "$as_me:1830: \$? = $ac_status" >&5
1831 (exit "$ac_status"); } &&
1832 { ac_try='test -s "conftest.$ac_objext"'
1833 { (eval echo "$as_me:1833: \"$ac_try\"") >&5
1836 echo "$as_me:1836: \$? = $ac_status" >&5
1837 (exit "$ac_status"); }; }; then
1840 echo "$as_me: failed program was:" >&5
1841 cat "conftest.$ac_ext" >&5
1843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 if test -n "$ac_declaration"; then
1847 echo '#ifdef __cplusplus' >>confdefs.h
1848 echo "$ac_declaration" >>confdefs.h
1849 echo '#endif' >>confdefs.h
1853 echo "$as_me: failed program was:" >&5
1854 cat "conftest.$ac_ext" >&5
1856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1858 ac_cpp='$CPP $CPPFLAGS'
1859 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1860 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1862 ac_main_return="return"
1865 if test "$GCC" = yes ; then
1866 echo "$as_me:1866: checking version of $CC" >&5
1867 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1868 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1869 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1870 echo "$as_me:1870: result: $GCC_VERSION" >&5
1871 echo "${ECHO_T}$GCC_VERSION" >&6
1876 if test "$GCC" = yes ; then
1879 echo "$as_me:1879: checking if this is really Intel C compiler" >&5
1880 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1881 cf_save_CFLAGS="$CFLAGS"
1882 CFLAGS="$CFLAGS -no-gcc"
1883 cat >"conftest.$ac_ext" <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1891 #ifdef __INTEL_COMPILER
1900 rm -f "conftest.$ac_objext"
1901 if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
1902 (eval $ac_compile) 2>&5
1904 echo "$as_me:1904: \$? = $ac_status" >&5
1905 (exit "$ac_status"); } &&
1906 { ac_try='test -s "conftest.$ac_objext"'
1907 { (eval echo "$as_me:1907: \"$ac_try\"") >&5
1910 echo "$as_me:1910: \$? = $ac_status" >&5
1911 (exit "$ac_status"); }; }; then
1913 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1916 echo "$as_me: failed program was:" >&5
1917 cat "conftest.$ac_ext" >&5
1919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1920 CFLAGS="$cf_save_CFLAGS"
1921 echo "$as_me:1921: result: $INTEL_COMPILER" >&5
1922 echo "${ECHO_T}$INTEL_COMPILER" >&6
1929 if test "$GCC" = yes ; then
1930 echo "$as_me:1930: checking if this is really Clang C compiler" >&5
1931 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1932 cf_save_CFLAGS="$CFLAGS"
1933 cat >"conftest.$ac_ext" <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1950 rm -f "conftest.$ac_objext"
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952 (eval $ac_compile) 2>&5
1954 echo "$as_me:1954: \$? = $ac_status" >&5
1955 (exit "$ac_status"); } &&
1956 { ac_try='test -s "conftest.$ac_objext"'
1957 { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1960 echo "$as_me:1960: \$? = $ac_status" >&5
1961 (exit "$ac_status"); }; }; then
1965 echo "$as_me: failed program was:" >&5
1966 cat "conftest.$ac_ext" >&5
1968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1969 CFLAGS="$cf_save_CFLAGS"
1970 echo "$as_me:1970: result: $CLANG_COMPILER" >&5
1971 echo "${ECHO_T}$CLANG_COMPILER" >&6
1976 if test "x$CLANG_COMPILER" = "xyes" ; then
1978 (c[1-9][0-9]|*/c[1-9][0-9])
1979 { echo "$as_me:1979: WARNING: replacing broken compiler alias $CC" >&5
1980 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1981 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1986 echo "$as_me:1986: checking version of $CC" >&5
1987 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1988 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1989 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1990 echo "$as_me:1990: result: $CLANG_VERSION" >&5
1991 echo "${ECHO_T}$CLANG_VERSION" >&6
1993 for cf_clang_opt in \
1994 -Qunused-arguments \
1995 -Wno-error=implicit-function-declaration
1997 echo "$as_me:1997: checking if option $cf_clang_opt works" >&5
1998 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1999 cf_save_CFLAGS="$CFLAGS"
2000 CFLAGS="$CFLAGS $cf_clang_opt"
2001 cat >"conftest.$ac_ext" <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2010 printf("hello!\\n");
2015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2016 if { (eval echo "$as_me:2016: \"$ac_link\"") >&5
2017 (eval $ac_link) 2>&5
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit "$ac_status"); } &&
2021 { ac_try='test -s "conftest$ac_exeext"'
2022 { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2025 echo "$as_me:2025: \$? = $ac_status" >&5
2026 (exit "$ac_status"); }; }; then
2030 echo "$as_me: failed program was:" >&5
2031 cat "conftest.$ac_ext" >&5
2035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2036 echo "$as_me:2036: result: $cf_clang_optok" >&5
2037 echo "${ECHO_T}$cf_clang_optok" >&6
2038 CFLAGS="$cf_save_CFLAGS"
2039 if test "$cf_clang_optok" = yes; then
2040 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2042 echo "${as_me:-configure}:2042: testing adding option $cf_clang_opt ..." 1>&5
2044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2045 CFLAGS="${CFLAGS}$cf_clang_opt"
2051 echo "$as_me:2051: checking for $CC option to accept ANSI C" >&5
2052 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2053 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2054 echo $ECHO_N "(cached) $ECHO_C" >&6
2056 ac_cv_prog_cc_stdc=no
2058 cat >"conftest.$ac_ext" <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2063 #include <sys/types.h>
2064 #include <sys/stat.h>
2065 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2066 struct buf { int x; };
2067 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2068 static char *e (char **p, int i)
2072 static char *f (char * (*g) (char **, int), char **p, ...)
2077 s = g (p, va_arg (v,int));
2081 int test (int i, double x);
2082 struct s1 {int (*f) (int a);};
2083 struct s2 {int (*f) (double a);};
2084 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2090 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2095 # Don't try gcc -ansi; that turns off useful extensions and
2096 # breaks some systems' header files.
2097 # AIX -qlanglvl=ansi
2098 # Ultrix and OSF/1 -std1
2099 # HP-UX 10.20 and later -Ae
2100 # HP-UX older versions -Aa -D_HPUX_SOURCE
2101 # SVR4 -Xc -D__EXTENSIONS__
2102 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2104 CC="$ac_save_CC $ac_arg"
2105 rm -f "conftest.$ac_objext"
2106 if { (eval echo "$as_me:2106: \"$ac_compile\"") >&5
2107 (eval $ac_compile) 2>&5
2109 echo "$as_me:2109: \$? = $ac_status" >&5
2110 (exit "$ac_status"); } &&
2111 { ac_try='test -s "conftest.$ac_objext"'
2112 { (eval echo "$as_me:2112: \"$ac_try\"") >&5
2115 echo "$as_me:2115: \$? = $ac_status" >&5
2116 (exit "$ac_status"); }; }; then
2117 ac_cv_prog_cc_stdc=$ac_arg
2120 echo "$as_me: failed program was:" >&5
2121 cat "conftest.$ac_ext" >&5
2123 rm -f "conftest.$ac_objext"
2125 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2130 case "x$ac_cv_prog_cc_stdc" in
2132 echo "$as_me:2132: result: none needed" >&5
2133 echo "${ECHO_T}none needed" >&6 ;;
2135 echo "$as_me:2135: result: $ac_cv_prog_cc_stdc" >&5
2136 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2137 CC="$CC $ac_cv_prog_cc_stdc" ;;
2140 # This should have been defined by AC_PROG_CC
2143 echo "$as_me:2143: checking \$CFLAGS variable" >&5
2144 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2147 echo "$as_me:2147: result: broken" >&5
2148 echo "${ECHO_T}broken" >&6
2149 { echo "$as_me:2149: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2150 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2153 for cf_arg in $cf_flags
2159 cf_new_extra_cppflags=
2161 for cf_add_cflags in $cf_arg
2163 case "$cf_fix_cppflags" in
2165 case "$cf_add_cflags" in
2166 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2167 case "$cf_add_cflags" in
2169 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2172 && test -z "${cf_tst_cflags}" \
2173 && cf_fix_cppflags=yes
2175 if test "$cf_fix_cppflags" = yes ; then
2177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2181 elif test "${cf_tst_cflags}" = "\"'" ; then
2183 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2184 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2194 case "$cf_add_cflags" in
2196 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2198 CPPFLAGS=`echo "$CPPFLAGS" | \
2199 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2200 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2205 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2206 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2213 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2214 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2221 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2222 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2224 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2226 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2227 && test -z "${cf_tst_cflags}" \
2228 && cf_fix_cppflags=no
2233 if test -n "$cf_new_cflags" ; then
2235 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2236 CFLAGS="${CFLAGS}$cf_new_cflags"
2240 if test -n "$cf_new_cppflags" ; then
2242 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2243 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2247 if test -n "$cf_new_extra_cppflags" ; then
2249 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2250 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2257 echo "$as_me:2257: result: ok" >&5
2258 echo "${ECHO_T}ok" >&6
2262 echo "$as_me:2262: checking \$CC variable" >&5
2263 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2266 echo "$as_me:2266: result: broken" >&5
2267 echo "${ECHO_T}broken" >&6
2268 { echo "$as_me:2268: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2269 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2271 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2272 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2274 for cf_arg in $cf_flags
2282 cf_new_extra_cppflags=
2284 for cf_add_cflags in $cf_arg
2286 case "$cf_fix_cppflags" in
2288 case "$cf_add_cflags" in
2289 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2290 case "$cf_add_cflags" in
2292 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2295 && test -z "${cf_tst_cflags}" \
2296 && cf_fix_cppflags=yes
2298 if test "$cf_fix_cppflags" = yes ; then
2300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2304 elif test "${cf_tst_cflags}" = "\"'" ; then
2306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2317 case "$cf_add_cflags" in
2319 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2321 CPPFLAGS=`echo "$CPPFLAGS" | \
2322 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2323 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2328 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2329 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2336 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2337 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2344 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2345 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2347 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2349 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2350 && test -z "${cf_tst_cflags}" \
2351 && cf_fix_cppflags=no
2356 if test -n "$cf_new_cflags" ; then
2358 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2359 CFLAGS="${CFLAGS}$cf_new_cflags"
2363 if test -n "$cf_new_cppflags" ; then
2365 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2366 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2370 if test -n "$cf_new_extra_cppflags" ; then
2372 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2373 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2383 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2385 echo "${as_me:-configure}:2385: testing resulting CC: '$CC' ..." 1>&5
2387 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2389 echo "${as_me:-configure}:2389: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2391 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2393 echo "${as_me:-configure}:2393: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2397 echo "$as_me:2397: result: ok" >&5
2398 echo "${ECHO_T}ok" >&6
2402 echo "$as_me:2402: checking for inline" >&5
2403 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2404 if test "${ac_cv_c_inline+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2408 for ac_kw in inline __inline__ __inline; do
2409 cat >"conftest.$ac_ext" <<_ACEOF
2410 #line 2410 "configure"
2411 #include "confdefs.h"
2413 static $ac_kw int static_foo () {return 0; }
2414 $ac_kw int foo () {return 0; }
2418 rm -f "conftest.$ac_objext"
2419 if { (eval echo "$as_me:2419: \"$ac_compile\"") >&5
2420 (eval $ac_compile) 2>&5
2422 echo "$as_me:2422: \$? = $ac_status" >&5
2423 (exit "$ac_status"); } &&
2424 { ac_try='test -s "conftest.$ac_objext"'
2425 { (eval echo "$as_me:2425: \"$ac_try\"") >&5
2428 echo "$as_me:2428: \$? = $ac_status" >&5
2429 (exit "$ac_status"); }; }; then
2430 ac_cv_c_inline=$ac_kw; break
2432 echo "$as_me: failed program was:" >&5
2433 cat "conftest.$ac_ext" >&5
2435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2439 echo "$as_me:2439: result: $ac_cv_c_inline" >&5
2440 echo "${ECHO_T}$ac_cv_c_inline" >&6
2441 case $ac_cv_c_inline in
2444 cat >>confdefs.h <<\EOF
2448 *) cat >>confdefs.h <<EOF
2449 #define inline $ac_cv_c_inline
2454 for ac_prog in ggrep grep
2456 # Extract the first word of "$ac_prog", so it can be a program name with args.
2457 set dummy $ac_prog; ac_word=$2
2458 echo "$as_me:2458: checking for $ac_word" >&5
2459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2460 if test "${ac_cv_prog_GREP+set}" = set; then
2461 echo $ECHO_N "(cached) $ECHO_C" >&6
2463 if test -n "$GREP"; then
2464 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2466 ac_save_IFS=$IFS; IFS=$ac_path_separator
2468 for ac_dir in $ac_dummy; do
2470 test -z "$ac_dir" && ac_dir=.
2471 $as_executable_p "$ac_dir/$ac_word" || continue
2472 ac_cv_prog_GREP="$ac_prog"
2473 echo "$as_me:2473: found $ac_dir/$ac_word" >&5
2479 GREP=$ac_cv_prog_GREP
2480 if test -n "$GREP"; then
2481 echo "$as_me:2481: result: $GREP" >&5
2482 echo "${ECHO_T}$GREP" >&6
2484 echo "$as_me:2484: result: no" >&5
2485 echo "${ECHO_T}no" >&6
2488 test -n "$GREP" && break
2490 test -n "$GREP" || GREP=": "
2492 echo "$as_me:2492: checking for egrep" >&5
2493 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2494 if test "${ac_cv_path_EGREP+set}" = set; then
2495 echo $ECHO_N "(cached) $ECHO_C" >&6
2497 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2498 then ac_cv_path_EGREP="$GREP -E"
2500 for ac_prog in gegrep egrep
2502 # Extract the first word of "$ac_prog", so it can be a program name with args.
2503 set dummy $ac_prog; ac_word=$2
2504 echo "$as_me:2504: checking for $ac_word" >&5
2505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2506 if test "${ac_cv_path_EGREP+set}" = set; then
2507 echo $ECHO_N "(cached) $ECHO_C" >&6
2511 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2514 ac_save_IFS=$IFS; IFS=$ac_path_separator
2516 for ac_dir in $ac_dummy; do
2518 test -z "$ac_dir" && ac_dir=.
2519 if $as_executable_p "$ac_dir/$ac_word"; then
2520 ac_cv_path_EGREP="$ac_dir/$ac_word"
2521 echo "$as_me:2521: found $ac_dir/$ac_word" >&5
2529 EGREP=$ac_cv_path_EGREP
2531 if test -n "$EGREP"; then
2532 echo "$as_me:2532: result: $EGREP" >&5
2533 echo "${ECHO_T}$EGREP" >&6
2535 echo "$as_me:2535: result: no" >&5
2536 echo "${ECHO_T}no" >&6
2539 test -n "$EGREP" && break
2541 test -n "$EGREP" || EGREP=": "
2543 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2543: error: cannot find workable egrep" >&5
2544 echo "$as_me: error: cannot find workable egrep" >&2;}
2545 { (exit 1); exit 1; }; }
2548 echo "$as_me:2548: result: $ac_cv_path_EGREP" >&5
2549 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2550 EGREP="$ac_cv_path_EGREP"
2553 ac_cpp='$CPP $CPPFLAGS'
2554 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2555 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2557 ac_main_return="return"
2558 echo "$as_me:2558: checking how to run the C preprocessor" >&5
2559 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2560 # On Suns, sometimes $CPP names a directory.
2561 if test -n "$CPP" && test -d "$CPP"; then
2564 if test -z "$CPP"; then
2565 if test "${ac_cv_prog_CPP+set}" = set; then
2566 echo $ECHO_N "(cached) $ECHO_C" >&6
2568 # Double quotes because CPP needs to be expanded
2569 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2572 for ac_c_preproc_warn_flag in '' yes
2574 # Use a header file that comes with gcc, so configuring glibc
2575 # with a fresh cross-compiler works.
2576 # On the NeXT, cc -E runs the code through the compiler's parser,
2577 # not just through cpp. "Syntax error" is here to catch this case.
2578 cat >"conftest.$ac_ext" <<_ACEOF
2579 #line 2579 "configure"
2580 #include "confdefs.h"
2584 if { (eval echo "$as_me:2584: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2585 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2587 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2589 cat conftest.err >&5
2590 echo "$as_me:2590: \$? = $ac_status" >&5
2591 (exit "$ac_status"); } >/dev/null; then
2592 if test -s conftest.err; then
2593 ac_cpp_err=$ac_c_preproc_warn_flag
2600 if test -z "$ac_cpp_err"; then
2603 echo "$as_me: failed program was:" >&5
2604 cat "conftest.$ac_ext" >&5
2605 # Broken: fails on valid input.
2608 rm -f conftest.err "conftest.$ac_ext"
2610 # OK, works on sane cases. Now check whether non-existent headers
2611 # can be detected and how.
2612 cat >"conftest.$ac_ext" <<_ACEOF
2613 #line 2613 "configure"
2614 #include "confdefs.h"
2615 #include <ac_nonexistent.h>
2617 if { (eval echo "$as_me:2617: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2618 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2620 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2622 cat conftest.err >&5
2623 echo "$as_me:2623: \$? = $ac_status" >&5
2624 (exit "$ac_status"); } >/dev/null; then
2625 if test -s conftest.err; then
2626 ac_cpp_err=$ac_c_preproc_warn_flag
2633 if test -z "$ac_cpp_err"; then
2634 # Broken: success on invalid input.
2637 echo "$as_me: failed program was:" >&5
2638 cat "conftest.$ac_ext" >&5
2639 # Passes both tests.
2643 rm -f conftest.err "conftest.$ac_ext"
2646 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2647 rm -f conftest.err "conftest.$ac_ext"
2648 if $ac_preproc_ok; then
2660 echo "$as_me:2660: result: $CPP" >&5
2661 echo "${ECHO_T}$CPP" >&6
2663 for ac_c_preproc_warn_flag in '' yes
2665 # Use a header file that comes with gcc, so configuring glibc
2666 # with a fresh cross-compiler works.
2667 # On the NeXT, cc -E runs the code through the compiler's parser,
2668 # not just through cpp. "Syntax error" is here to catch this case.
2669 cat >"conftest.$ac_ext" <<_ACEOF
2670 #line 2670 "configure"
2671 #include "confdefs.h"
2675 if { (eval echo "$as_me:2675: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2676 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2678 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2680 cat conftest.err >&5
2681 echo "$as_me:2681: \$? = $ac_status" >&5
2682 (exit "$ac_status"); } >/dev/null; then
2683 if test -s conftest.err; then
2684 ac_cpp_err=$ac_c_preproc_warn_flag
2691 if test -z "$ac_cpp_err"; then
2694 echo "$as_me: failed program was:" >&5
2695 cat "conftest.$ac_ext" >&5
2696 # Broken: fails on valid input.
2699 rm -f conftest.err "conftest.$ac_ext"
2701 # OK, works on sane cases. Now check whether non-existent headers
2702 # can be detected and how.
2703 cat >"conftest.$ac_ext" <<_ACEOF
2704 #line 2704 "configure"
2705 #include "confdefs.h"
2706 #include <ac_nonexistent.h>
2708 if { (eval echo "$as_me:2708: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2709 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2711 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2713 cat conftest.err >&5
2714 echo "$as_me:2714: \$? = $ac_status" >&5
2715 (exit "$ac_status"); } >/dev/null; then
2716 if test -s conftest.err; then
2717 ac_cpp_err=$ac_c_preproc_warn_flag
2724 if test -z "$ac_cpp_err"; then
2725 # Broken: success on invalid input.
2728 echo "$as_me: failed program was:" >&5
2729 cat "conftest.$ac_ext" >&5
2730 # Passes both tests.
2734 rm -f conftest.err "conftest.$ac_ext"
2737 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2738 rm -f conftest.err "conftest.$ac_ext"
2739 if $ac_preproc_ok; then
2742 { { echo "$as_me:2742: error: C preprocessor \"$CPP\" fails sanity check" >&5
2743 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2744 { (exit 1); exit 1; }; }
2748 ac_cpp='$CPP $CPPFLAGS'
2749 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2750 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2752 ac_main_return="return"
2754 for ac_prog in mawk gawk nawk awk
2756 # Extract the first word of "$ac_prog", so it can be a program name with args.
2757 set dummy $ac_prog; ac_word=$2
2758 echo "$as_me:2758: checking for $ac_word" >&5
2759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2760 if test "${ac_cv_prog_AWK+set}" = set; then
2761 echo $ECHO_N "(cached) $ECHO_C" >&6
2763 if test -n "$AWK"; then
2764 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2766 ac_save_IFS=$IFS; IFS=$ac_path_separator
2768 for ac_dir in $ac_dummy; do
2770 test -z "$ac_dir" && ac_dir=.
2771 $as_executable_p "$ac_dir/$ac_word" || continue
2772 ac_cv_prog_AWK="$ac_prog"
2773 echo "$as_me:2773: found $ac_dir/$ac_word" >&5
2780 if test -n "$AWK"; then
2781 echo "$as_me:2781: result: $AWK" >&5
2782 echo "${ECHO_T}$AWK" >&6
2784 echo "$as_me:2784: result: no" >&5
2785 echo "${ECHO_T}no" >&6
2788 test -n "$AWK" && break
2791 # Find a good install program. We prefer a C program (faster),
2792 # so one script is as good as another. But avoid the broken or
2793 # incompatible versions:
2794 # SysV /etc/install, /usr/sbin/install
2795 # SunOS /usr/etc/install
2796 # IRIX /sbin/install
2798 # AmigaOS /C/install, which installs bootblocks on floppy discs
2799 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2800 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2801 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2802 # ./install, which can be erroneously created by make from ./install.sh.
2803 echo "$as_me:2803: checking for a BSD compatible install" >&5
2804 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2805 if test -z "$INSTALL"; then
2806 if test "${ac_cv_path_install+set}" = set; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2809 ac_save_IFS=$IFS; IFS=$ac_path_separator
2810 for ac_dir in $PATH; do
2812 # Account for people who put trailing slashes in PATH elements.
2814 / | ./ | .// | /cC/* \
2815 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2818 # OSF1 and SCO ODT 3.0 have their own names for install.
2819 # Don't use installbsd from OSF since it installs stuff as root
2821 for ac_prog in ginstall scoinst install; do
2822 if $as_executable_p "$ac_dir/$ac_prog"; then
2823 if test $ac_prog = install &&
2824 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2825 # AIX install. It has an incompatible calling convention.
2827 elif test $ac_prog = install &&
2828 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2829 # program-specific install script used by HP pwplus--don't use.
2832 ac_cv_path_install="$ac_dir/$ac_prog -c"
2842 if test "${ac_cv_path_install+set}" = set; then
2843 INSTALL=$ac_cv_path_install
2845 # As a last resort, use the slow shell script. We don't cache a
2846 # path for INSTALL within a source directory, because that will
2847 # break other packages using the cache if that directory is
2848 # removed, or if the path is relative.
2849 INSTALL=$ac_install_sh
2852 echo "$as_me:2852: result: $INSTALL" >&5
2853 echo "${ECHO_T}$INSTALL" >&6
2855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2856 # It thinks the first close brace ends the variable substitution.
2857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2867 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2868 test -z "$cf_dir" && cf_dir=.
2869 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2873 echo "$as_me:2873: checking if you want to install stripped executables" >&5
2874 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2876 # Check whether --enable-stripping or --disable-stripping was given.
2877 if test "${enable_stripping+set}" = set; then
2878 enableval="$enable_stripping"
2879 test "$enableval" != no && enableval=yes
2880 if test "$enableval" != "yes" ; then
2883 enable_stripping=yes
2887 enable_stripping=yes
2890 echo "$as_me:2890: result: $enable_stripping" >&5
2891 echo "${ECHO_T}$enable_stripping" >&6
2893 if test "$enable_stripping" = yes
2900 : "${INSTALL:=install}"
2901 echo "$as_me:2901: checking if install accepts -p option" >&5
2902 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2903 if test "${cf_cv_install_p+set}" = set; then
2904 echo $ECHO_N "(cached) $ECHO_C" >&6
2911 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2913 if test -f conftest.out/conftest.in
2915 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2916 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2917 if test -s conftest.err
2932 echo "$as_me:2932: result: $cf_cv_install_p" >&5
2933 echo "${ECHO_T}$cf_cv_install_p" >&6
2935 echo "$as_me:2935: checking if install needs to be told about ownership" >&5
2936 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2937 case `$ac_config_guess` in
2946 echo "$as_me:2946: result: $with_install_o" >&5
2947 echo "${ECHO_T}$with_install_o" >&6
2948 if test "x$with_install_o" = xyes
2950 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'`"
2955 for ac_prog in lint cppcheck splint
2957 # Extract the first word of "$ac_prog", so it can be a program name with args.
2958 set dummy $ac_prog; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_prog_LINT+set}" = set; then
2962 echo $ECHO_N "(cached) $ECHO_C" >&6
2964 if test -n "$LINT"; then
2965 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2967 ac_save_IFS=$IFS; IFS=$ac_path_separator
2969 for ac_dir in $ac_dummy; do
2971 test -z "$ac_dir" && ac_dir=.
2972 $as_executable_p "$ac_dir/$ac_word" || continue
2973 ac_cv_prog_LINT="$ac_prog"
2974 echo "$as_me:2974: found $ac_dir/$ac_word" >&5
2980 LINT=$ac_cv_prog_LINT
2981 if test -n "$LINT"; then
2982 echo "$as_me:2982: result: $LINT" >&5
2983 echo "${ECHO_T}$LINT" >&6
2985 echo "$as_me:2985: result: no" >&5
2986 echo "${ECHO_T}no" >&6
2989 test -n "$LINT" && break
2993 (xcppcheck|x*/cppcheck)
2994 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2998 echo "$as_me:2998: checking for \".PHONY\" make-support" >&5
2999 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3000 if test "${cf_cv_make_PHONY+set}" = set; then
3001 echo $ECHO_N "(cached) $ECHO_C" >&6
3006 mkdir conftest || exit 1
3008 cat >makefile <<'CF_EOF'
3012 @echo "** making $@ $(DATA)"
3014 @echo "** making $@ $(DATA)"
3016 @echo "** making $@ $(DATA)"
3019 @echo "** making $@ $(DATA)"
3022 for cf_data in 1 2 3
3024 ${MAKE:-make} always DATA=$cf_data
3025 ${MAKE:-make} once DATA=$cf_data
3026 ${MAKE:-make} -t always once
3027 if test -f always ; then
3028 echo "no (case 1)" > ../conftest.tmp
3029 elif test ! -f always.out ; then
3030 echo "no (case 2)" > ../conftest.tmp
3031 elif test ! -f once.out ; then
3032 echo "no (case 3)" > ../conftest.tmp
3033 elif ! cmp -s always.out once.out ; then
3034 echo "no (case 4)" > ../conftest.tmp
3035 diff always.out once.out
3037 cf_check="`cat always.out`"
3038 if test "x$cf_check" != "x$cf_data" ; then
3039 echo "no (case 5)" > ../conftest.tmp
3041 echo yes > ../conftest.tmp
3049 cf_cv_make_PHONY="`cat conftest.tmp`"
3053 echo "$as_me:3053: result: $cf_cv_make_PHONY" >&5
3054 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3057 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3058 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3060 echo "$as_me:3060: checking if filesystem supports mixed-case filenames" >&5
3061 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3062 if test "${cf_cv_mixedcase+set}" = set; then
3063 echo $ECHO_N "(cached) $ECHO_C" >&6
3066 if test "$cross_compiling" = yes ; then
3067 case "$target_alias" in
3068 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3076 rm -f conftest CONFTEST
3078 if test -f CONFTEST ; then
3083 rm -f conftest CONFTEST
3087 echo "$as_me:3087: result: $cf_cv_mixedcase" >&5
3088 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3089 test "$cf_cv_mixedcase" = yes &&
3090 cat >>confdefs.h <<\EOF
3091 #define MIXEDCASE_FILENAMES 1
3094 for ac_prog in exctags ctags
3096 # Extract the first word of "$ac_prog", so it can be a program name with args.
3097 set dummy $ac_prog; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_prog_CTAGS+set}" = set; then
3101 echo $ECHO_N "(cached) $ECHO_C" >&6
3103 if test -n "$CTAGS"; then
3104 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3106 ac_save_IFS=$IFS; IFS=$ac_path_separator
3108 for ac_dir in $ac_dummy; do
3110 test -z "$ac_dir" && ac_dir=.
3111 $as_executable_p "$ac_dir/$ac_word" || continue
3112 ac_cv_prog_CTAGS="$ac_prog"
3113 echo "$as_me:3113: found $ac_dir/$ac_word" >&5
3119 CTAGS=$ac_cv_prog_CTAGS
3120 if test -n "$CTAGS"; then
3121 echo "$as_me:3121: result: $CTAGS" >&5
3122 echo "${ECHO_T}$CTAGS" >&6
3124 echo "$as_me:3124: result: no" >&5
3125 echo "${ECHO_T}no" >&6
3128 test -n "$CTAGS" && break
3131 for ac_prog in exetags etags
3133 # Extract the first word of "$ac_prog", so it can be a program name with args.
3134 set dummy $ac_prog; ac_word=$2
3135 echo "$as_me:3135: checking for $ac_word" >&5
3136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3137 if test "${ac_cv_prog_ETAGS+set}" = set; then
3138 echo $ECHO_N "(cached) $ECHO_C" >&6
3140 if test -n "$ETAGS"; then
3141 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3143 ac_save_IFS=$IFS; IFS=$ac_path_separator
3145 for ac_dir in $ac_dummy; do
3147 test -z "$ac_dir" && ac_dir=.
3148 $as_executable_p "$ac_dir/$ac_word" || continue
3149 ac_cv_prog_ETAGS="$ac_prog"
3150 echo "$as_me:3150: found $ac_dir/$ac_word" >&5
3156 ETAGS=$ac_cv_prog_ETAGS
3157 if test -n "$ETAGS"; then
3158 echo "$as_me:3158: result: $ETAGS" >&5
3159 echo "${ECHO_T}$ETAGS" >&6
3161 echo "$as_me:3161: result: no" >&5
3162 echo "${ECHO_T}no" >&6
3165 test -n "$ETAGS" && break
3168 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3169 set dummy ${CTAGS:-ctags}; ac_word=$2
3170 echo "$as_me:3170: checking for $ac_word" >&5
3171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3172 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3173 echo $ECHO_N "(cached) $ECHO_C" >&6
3175 if test -n "$MAKE_LOWER_TAGS"; then
3176 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3178 ac_save_IFS=$IFS; IFS=$ac_path_separator
3180 for ac_dir in $ac_dummy; do
3182 test -z "$ac_dir" && ac_dir=.
3183 $as_executable_p "$ac_dir/$ac_word" || continue
3184 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3185 echo "$as_me:3185: found $ac_dir/$ac_word" >&5
3189 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3192 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3193 if test -n "$MAKE_LOWER_TAGS"; then
3194 echo "$as_me:3194: result: $MAKE_LOWER_TAGS" >&5
3195 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3197 echo "$as_me:3197: result: no" >&5
3198 echo "${ECHO_T}no" >&6
3201 if test "$cf_cv_mixedcase" = yes ; then
3202 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3203 set dummy ${ETAGS:-etags}; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3209 if test -n "$MAKE_UPPER_TAGS"; then
3210 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3212 ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 for ac_dir in $ac_dummy; do
3216 test -z "$ac_dir" && ac_dir=.
3217 $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3223 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3226 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3227 if test -n "$MAKE_UPPER_TAGS"; then
3228 echo "$as_me:3228: result: $MAKE_UPPER_TAGS" >&5
3229 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3231 echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3239 if test "$MAKE_UPPER_TAGS" = yes ; then
3245 if test "$MAKE_LOWER_TAGS" = yes ; then
3251 echo "$as_me:3251: checking if -lm needed for math functions" >&5
3252 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3253 if test "${cf_cv_need_libm+set}" = set; then
3254 echo $ECHO_N "(cached) $ECHO_C" >&6
3257 cat >"conftest.$ac_ext" <<_ACEOF
3258 #line 3258 "configure"
3259 #include "confdefs.h"
3268 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3274 if { (eval echo "$as_me:3274: \"$ac_link\"") >&5
3275 (eval $ac_link) 2>&5
3277 echo "$as_me:3277: \$? = $ac_status" >&5
3278 (exit "$ac_status"); } &&
3279 { ac_try='test -s "conftest$ac_exeext"'
3280 { (eval echo "$as_me:3280: \"$ac_try\"") >&5
3283 echo "$as_me:3283: \$? = $ac_status" >&5
3284 (exit "$ac_status"); }; }; then
3287 echo "$as_me: failed program was:" >&5
3288 cat "conftest.$ac_ext" >&5
3291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3293 echo "$as_me:3293: result: $cf_cv_need_libm" >&5
3294 echo "${ECHO_T}$cf_cv_need_libm" >&6
3296 if test "$cf_cv_need_libm" = yes
3299 cf_save_LIBS="$LIBS"
3301 echo "$as_me:3301: checking if -lm is available for math functions" >&5
3302 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
3303 if test "${cf_cv_have_libm+set}" = set; then
3304 echo $ECHO_N "(cached) $ECHO_C" >&6
3307 cat >"conftest.$ac_ext" <<_ACEOF
3308 #line 3308 "configure"
3309 #include "confdefs.h"
3318 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3324 if { (eval echo "$as_me:3324: \"$ac_link\"") >&5
3325 (eval $ac_link) 2>&5
3327 echo "$as_me:3327: \$? = $ac_status" >&5
3328 (exit "$ac_status"); } &&
3329 { ac_try='test -s "conftest$ac_exeext"'
3330 { (eval echo "$as_me:3330: \"$ac_try\"") >&5
3333 echo "$as_me:3333: \$? = $ac_status" >&5
3334 (exit "$ac_status"); }; }; then
3337 echo "$as_me: failed program was:" >&5
3338 cat "conftest.$ac_ext" >&5
3341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3343 echo "$as_me:3343: result: $cf_cv_have_libm" >&5
3344 echo "${ECHO_T}$cf_cv_have_libm" >&6
3345 LIBS="$cf_save_LIBS"
3347 if test "$cf_cv_have_libm" = yes
3355 if test "$cf_cv_have_libm" = yes
3358 cat >>confdefs.h <<\EOF
3359 #define HAVE_MATH_FUNCS 1
3367 CC_SHARED_OPTS=unknown
3368 CPPFLAGS="$CPPFLAGS"
3370 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3371 DFT_UPR_MODEL="NORMAL"
3384 PACKAGE="ncurses-examples"
3390 TINFO_LIBS='$(LIBS_CURSES)'
3391 cf_cv_abi_version=""
3392 cf_cv_rel_version=""
3398 echo "$as_me:3398: checking for fgrep" >&5
3399 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3400 if test "${ac_cv_path_FGREP+set}" = set; then
3401 echo $ECHO_N "(cached) $ECHO_C" >&6
3403 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3404 then ac_cv_path_FGREP="$GREP -F"
3406 for ac_prog in gfgrep fgrep
3408 # Extract the first word of "$ac_prog", so it can be a program name with args.
3409 set dummy $ac_prog; ac_word=$2
3410 echo "$as_me:3410: checking for $ac_word" >&5
3411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3412 if test "${ac_cv_path_FGREP+set}" = set; then
3413 echo $ECHO_N "(cached) $ECHO_C" >&6
3417 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3420 ac_save_IFS=$IFS; IFS=$ac_path_separator
3422 for ac_dir in $ac_dummy; do
3424 test -z "$ac_dir" && ac_dir=.
3425 if $as_executable_p "$ac_dir/$ac_word"; then
3426 ac_cv_path_FGREP="$ac_dir/$ac_word"
3427 echo "$as_me:3427: found $ac_dir/$ac_word" >&5
3435 FGREP=$ac_cv_path_FGREP
3437 if test -n "$FGREP"; then
3438 echo "$as_me:3438: result: $FGREP" >&5
3439 echo "${ECHO_T}$FGREP" >&6
3441 echo "$as_me:3441: result: no" >&5
3442 echo "${ECHO_T}no" >&6
3445 test -n "$FGREP" && break
3447 test -n "$FGREP" || FGREP=": "
3449 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3449: error: cannot find workable fgrep" >&5
3450 echo "$as_me: error: cannot find workable fgrep" >&2;}
3451 { (exit 1); exit 1; }; }
3454 echo "$as_me:3454: result: $ac_cv_path_FGREP" >&5
3455 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3456 FGREP="$ac_cv_path_FGREP"
3458 echo "$as_me:3458: checking if you want to use C11 _Noreturn feature" >&5
3459 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3461 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3462 if test "${enable_stdnoreturn+set}" = set; then
3463 enableval="$enable_stdnoreturn"
3464 test "$enableval" != yes && enableval=no
3465 if test "$enableval" != "no" ; then
3466 enable_stdnoreturn=yes
3468 enable_stdnoreturn=no
3472 enable_stdnoreturn=no
3475 echo "$as_me:3475: result: $enable_stdnoreturn" >&5
3476 echo "${ECHO_T}$enable_stdnoreturn" >&6
3478 if test $enable_stdnoreturn = yes; then
3479 echo "$as_me:3479: checking for C11 _Noreturn feature" >&5
3480 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3481 if test "${cf_cv_c11_noreturn+set}" = set; then
3482 echo $ECHO_N "(cached) $ECHO_C" >&6
3484 cat >"conftest.$ac_ext" <<_ACEOF
3485 #line 3485 "configure"
3486 #include "confdefs.h"
3490 #include <stdnoreturn.h>
3491 static _Noreturn void giveup(void) { exit(0); }
3496 if (feof(stdin)) giveup()
3501 rm -f "conftest.$ac_objext"
3502 if { (eval echo "$as_me:3502: \"$ac_compile\"") >&5
3503 (eval $ac_compile) 2>&5
3505 echo "$as_me:3505: \$? = $ac_status" >&5
3506 (exit "$ac_status"); } &&
3507 { ac_try='test -s "conftest.$ac_objext"'
3508 { (eval echo "$as_me:3508: \"$ac_try\"") >&5
3511 echo "$as_me:3511: \$? = $ac_status" >&5
3512 (exit "$ac_status"); }; }; then
3513 cf_cv_c11_noreturn=yes
3515 echo "$as_me: failed program was:" >&5
3516 cat "conftest.$ac_ext" >&5
3517 cf_cv_c11_noreturn=no
3519 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3522 echo "$as_me:3522: result: $cf_cv_c11_noreturn" >&5
3523 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3525 cf_cv_c11_noreturn=no,
3528 if test "$cf_cv_c11_noreturn" = yes; then
3530 cat >>confdefs.h <<\EOF
3531 #define HAVE_STDNORETURN_H 1
3534 cat >>confdefs.h <<EOF
3535 #define STDC_NORETURN _Noreturn
3538 HAVE_STDNORETURN_H=1
3540 HAVE_STDNORETURN_H=0
3543 if test "$GCC" = yes || test "$GXX" = yes
3545 cat > conftest.i <<EOF
3547 #define GCC_PRINTF 0
3552 #ifndef GCC_NORETURN
3553 #define GCC_NORETURN /* nothing */
3556 #define GCC_UNUSED /* nothing */
3559 if test "$GCC" = yes
3561 { echo "$as_me:3561: checking for $CC __attribute__ directives..." >&5
3562 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3563 cat > "conftest.$ac_ext" <<EOF
3564 #line 3564 "${as_me:-configure}"
3566 #include "confdefs.h"
3567 #include "conftest.h"
3568 #include "conftest.i"
3570 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3572 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3575 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3577 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3579 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3580 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3581 extern GCC_NORETURN void foo(void);
3582 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3584 cf_printf_attribute=no
3585 cf_scanf_attribute=no
3586 for cf_attribute in scanf printf unused noreturn
3589 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3591 cf_directive="__attribute__(($cf_attribute))"
3592 echo "checking for $CC $cf_directive" 1>&5
3594 case "$cf_attribute" in
3596 cf_printf_attribute=yes
3597 cat >conftest.h <<EOF
3598 #define GCC_$cf_ATTRIBUTE 1
3602 cf_scanf_attribute=yes
3603 cat >conftest.h <<EOF
3604 #define GCC_$cf_ATTRIBUTE 1
3608 cat >conftest.h <<EOF
3609 #define GCC_$cf_ATTRIBUTE $cf_directive
3614 if { (eval echo "$as_me:3614: \"$ac_compile\"") >&5
3615 (eval $ac_compile) 2>&5
3617 echo "$as_me:3617: \$? = $ac_status" >&5
3618 (exit "$ac_status"); }; then
3619 test -n "$verbose" && echo "$as_me:3619: result: ... $cf_attribute" >&5
3620 echo "${ECHO_T}... $cf_attribute" >&6
3621 cat conftest.h >>confdefs.h
3622 case "$cf_attribute" in
3625 cat >>confdefs.h <<EOF
3626 #define GCC_NORETURN $cf_directive
3631 cf_value='/* nothing */'
3632 if test "$cf_printf_attribute" != no ; then
3633 cf_value='__attribute__((format(printf,fmt,var)))'
3635 cat >>confdefs.h <<\EOF
3636 #define GCC_PRINTF 1
3641 cat >>confdefs.h <<EOF
3642 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3647 cf_value='/* nothing */'
3648 if test "$cf_scanf_attribute" != no ; then
3649 cf_value='__attribute__((format(scanf,fmt,var)))'
3651 cat >>confdefs.h <<\EOF
3657 cat >>confdefs.h <<EOF
3658 #define GCC_SCANFLIKE(fmt,var) $cf_value
3664 cat >>confdefs.h <<EOF
3665 #define GCC_UNUSED $cf_directive
3673 ${FGREP-fgrep} define conftest.i >>confdefs.h
3678 echo "$as_me:3678: checking if you want to work around bogus compiler/loader warnings" >&5
3679 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3681 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3682 if test "${enable_string_hacks+set}" = set; then
3683 enableval="$enable_string_hacks"
3684 enable_string_hacks=$enableval
3686 enable_string_hacks=no
3688 echo "$as_me:3688: result: $enable_string_hacks" >&5
3689 echo "${ECHO_T}$enable_string_hacks" >&6
3691 if test "x$enable_string_hacks" = "xyes"; then
3693 cat >>confdefs.h <<\EOF
3694 #define USE_STRING_HACKS 1
3697 { echo "$as_me:3697: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3698 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3699 echo "$as_me:3699: checking for strlcat" >&5
3700 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3701 if test "${ac_cv_func_strlcat+set}" = set; then
3702 echo $ECHO_N "(cached) $ECHO_C" >&6
3704 cat >"conftest.$ac_ext" <<_ACEOF
3705 #line 3705 "configure"
3706 #include "confdefs.h"
3707 #define strlcat autoconf_temporary
3708 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3715 /* We use char because int might match the return type of a gcc2
3716 builtin and then its argument prototype would still apply. */
3717 char strlcat (void);
3723 /* The GNU C library defines stubs for functions which it implements
3724 to always fail with ENOSYS. Some functions are actually named
3725 something starting with __ and the normal name is an alias. */
3726 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3727 #error found stub for strlcat
3735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3736 if { (eval echo "$as_me:3736: \"$ac_link\"") >&5
3737 (eval $ac_link) 2>&5
3739 echo "$as_me:3739: \$? = $ac_status" >&5
3740 (exit "$ac_status"); } &&
3741 { ac_try='test -s "conftest$ac_exeext"'
3742 { (eval echo "$as_me:3742: \"$ac_try\"") >&5
3745 echo "$as_me:3745: \$? = $ac_status" >&5
3746 (exit "$ac_status"); }; }; then
3747 ac_cv_func_strlcat=yes
3749 echo "$as_me: failed program was:" >&5
3750 cat "conftest.$ac_ext" >&5
3751 ac_cv_func_strlcat=no
3753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3755 echo "$as_me:3755: result: $ac_cv_func_strlcat" >&5
3756 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3757 if test "$ac_cv_func_strlcat" = yes; then
3759 cat >>confdefs.h <<\EOF
3760 #define HAVE_STRLCAT 1
3765 echo "$as_me:3765: checking for strlcat in -lbsd" >&5
3766 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3767 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3768 echo $ECHO_N "(cached) $ECHO_C" >&6
3770 ac_check_lib_save_LIBS=$LIBS
3772 cat >"conftest.$ac_ext" <<_ACEOF
3773 #line 3773 "configure"
3774 #include "confdefs.h"
3776 /* Override any gcc2 internal prototype to avoid an error. */
3780 /* We use char because int might match the return type of a gcc2
3781 builtin and then its argument prototype would still apply. */
3791 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3792 if { (eval echo "$as_me:3792: \"$ac_link\"") >&5
3793 (eval $ac_link) 2>&5
3795 echo "$as_me:3795: \$? = $ac_status" >&5
3796 (exit "$ac_status"); } &&
3797 { ac_try='test -s "conftest$ac_exeext"'
3798 { (eval echo "$as_me:3798: \"$ac_try\"") >&5
3801 echo "$as_me:3801: \$? = $ac_status" >&5
3802 (exit "$ac_status"); }; }; then
3803 ac_cv_lib_bsd_strlcat=yes
3805 echo "$as_me: failed program was:" >&5
3806 cat "conftest.$ac_ext" >&5
3807 ac_cv_lib_bsd_strlcat=no
3809 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3810 LIBS=$ac_check_lib_save_LIBS
3812 echo "$as_me:3812: result: $ac_cv_lib_bsd_strlcat" >&5
3813 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3814 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3819 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3821 for cf_add_1lib in $cf_add_0lib; do
3822 for cf_add_2lib in $cf_add_libs; do
3823 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3828 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3832 for ac_header in bsd/string.h
3834 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3835 echo "$as_me:3835: checking for $ac_header" >&5
3836 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3837 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3838 echo $ECHO_N "(cached) $ECHO_C" >&6
3840 cat >"conftest.$ac_ext" <<_ACEOF
3841 #line 3841 "configure"
3842 #include "confdefs.h"
3843 #include <$ac_header>
3845 if { (eval echo "$as_me:3845: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3846 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3848 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3850 cat conftest.err >&5
3851 echo "$as_me:3851: \$? = $ac_status" >&5
3852 (exit "$ac_status"); } >/dev/null; then
3853 if test -s conftest.err; then
3854 ac_cpp_err=$ac_c_preproc_warn_flag
3861 if test -z "$ac_cpp_err"; then
3862 eval "$as_ac_Header=yes"
3864 echo "$as_me: failed program was:" >&5
3865 cat "conftest.$ac_ext" >&5
3866 eval "$as_ac_Header=no"
3868 rm -f conftest.err "conftest.$ac_ext"
3870 echo "$as_me:3870: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3871 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3872 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3873 cat >>confdefs.h <<EOF
3874 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3880 cat >>confdefs.h <<\EOF
3881 #define HAVE_STRLCAT 1
3888 for ac_func in strlcpy snprintf
3890 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3891 echo "$as_me:3891: checking for $ac_func" >&5
3892 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3893 if eval "test \"\${$as_ac_var+set}\" = set"; then
3894 echo $ECHO_N "(cached) $ECHO_C" >&6
3896 cat >"conftest.$ac_ext" <<_ACEOF
3897 #line 3897 "configure"
3898 #include "confdefs.h"
3899 #define $ac_func autoconf_temporary
3900 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3907 /* We use char because int might match the return type of a gcc2
3908 builtin and then its argument prototype would still apply. */
3909 char $ac_func (void);
3915 /* The GNU C library defines stubs for functions which it implements
3916 to always fail with ENOSYS. Some functions are actually named
3917 something starting with __ and the normal name is an alias. */
3918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3919 #error found stub for $ac_func
3927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3928 if { (eval echo "$as_me:3928: \"$ac_link\"") >&5
3929 (eval $ac_link) 2>&5
3931 echo "$as_me:3931: \$? = $ac_status" >&5
3932 (exit "$ac_status"); } &&
3933 { ac_try='test -s "conftest$ac_exeext"'
3934 { (eval echo "$as_me:3934: \"$ac_try\"") >&5
3937 echo "$as_me:3937: \$? = $ac_status" >&5
3938 (exit "$ac_status"); }; }; then
3939 eval "$as_ac_var=yes"
3941 echo "$as_me: failed program was:" >&5
3942 cat "conftest.$ac_ext" >&5
3943 eval "$as_ac_var=no"
3945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3947 echo "$as_me:3947: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3948 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3949 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3950 cat >>confdefs.h <<EOF
3951 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3959 echo "$as_me:3959: checking if the POSIX test-macros are already defined" >&5
3960 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3961 if test "${cf_cv_posix_visible+set}" = set; then
3962 echo $ECHO_N "(cached) $ECHO_C" >&6
3965 cat >"conftest.$ac_ext" <<_ACEOF
3966 #line 3966 "configure"
3967 #include "confdefs.h"
3973 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3974 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3975 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3976 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3977 #error conflicting symbols found
3984 rm -f "conftest.$ac_objext"
3985 if { (eval echo "$as_me:3985: \"$ac_compile\"") >&5
3986 (eval $ac_compile) 2>&5
3988 echo "$as_me:3988: \$? = $ac_status" >&5
3989 (exit "$ac_status"); } &&
3990 { ac_try='test -s "conftest.$ac_objext"'
3991 { (eval echo "$as_me:3991: \"$ac_try\"") >&5
3994 echo "$as_me:3994: \$? = $ac_status" >&5
3995 (exit "$ac_status"); }; }; then
3996 cf_cv_posix_visible=no
3998 echo "$as_me: failed program was:" >&5
3999 cat "conftest.$ac_ext" >&5
4000 cf_cv_posix_visible=yes
4002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4005 echo "$as_me:4005: result: $cf_cv_posix_visible" >&5
4006 echo "${ECHO_T}$cf_cv_posix_visible" >&6
4008 if test "$cf_cv_posix_visible" = no; then
4011 cf_POSIX_C_SOURCE=199506L
4016 cf_xopen_source="-D_ALL_SOURCE"
4022 cf_xopen_source="-D_APPLE_C_SOURCE"
4025 cf_xopen_source="-D_DARWIN_C_SOURCE"
4028 (freebsd*|dragonfly*|midnightbsd*)
4029 # 5.x headers associate
4030 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4031 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4032 cf_POSIX_C_SOURCE=200112L
4034 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4037 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
4040 cf_xopen_source="-D_HPUX_SOURCE"
4043 cf_xopen_source="-D_SGI_SOURCE"
4046 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
4048 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
4050 echo "$as_me:4050: checking if this is the GNU C library" >&5
4051 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
4052 if test "${cf_cv_gnu_library+set}" = set; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
4056 cat >"conftest.$ac_ext" <<_ACEOF
4057 #line 4057 "configure"
4058 #include "confdefs.h"
4059 #include <sys/types.h>
4064 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4066 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4069 # error not GNU C library
4075 rm -f "conftest.$ac_objext"
4076 if { (eval echo "$as_me:4076: \"$ac_compile\"") >&5
4077 (eval $ac_compile) 2>&5
4079 echo "$as_me:4079: \$? = $ac_status" >&5
4080 (exit "$ac_status"); } &&
4081 { ac_try='test -s "conftest.$ac_objext"'
4082 { (eval echo "$as_me:4082: \"$ac_try\"") >&5
4085 echo "$as_me:4085: \$? = $ac_status" >&5
4086 (exit "$ac_status"); }; }; then
4087 cf_cv_gnu_library=yes
4089 echo "$as_me: failed program was:" >&5
4090 cat "conftest.$ac_ext" >&5
4091 cf_cv_gnu_library=no
4093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4096 echo "$as_me:4096: result: $cf_cv_gnu_library" >&5
4097 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4099 if test x$cf_cv_gnu_library = xyes; then
4101 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4102 # was changed to help a little. newlib incorporated the change about 4
4104 echo "$as_me:4104: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4105 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4106 if test "${cf_cv_gnu_library_219+set}" = set; then
4107 echo $ECHO_N "(cached) $ECHO_C" >&6
4112 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4113 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4115 cat >"conftest.$ac_ext" <<_ACEOF
4116 #line 4116 "configure"
4117 #include "confdefs.h"
4118 #include <sys/types.h>
4123 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4125 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4128 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4134 rm -f "conftest.$ac_objext"
4135 if { (eval echo "$as_me:4135: \"$ac_compile\"") >&5
4136 (eval $ac_compile) 2>&5
4138 echo "$as_me:4138: \$? = $ac_status" >&5
4139 (exit "$ac_status"); } &&
4140 { ac_try='test -s "conftest.$ac_objext"'
4141 { (eval echo "$as_me:4141: \"$ac_try\"") >&5
4144 echo "$as_me:4144: \$? = $ac_status" >&5
4145 (exit "$ac_status"); }; }; then
4146 cf_cv_gnu_library_219=yes
4148 echo "$as_me: failed program was:" >&5
4149 cat "conftest.$ac_ext" >&5
4150 cf_cv_gnu_library_219=no
4152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4156 echo "$as_me:4156: result: $cf_cv_gnu_library_219" >&5
4157 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4159 if test "x$cf_cv_gnu_library_219" = xyes; then
4161 echo "$as_me:4161: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4162 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4163 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
4170 cf_new_extra_cppflags=
4172 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4174 case "$cf_fix_cppflags" in
4176 case "$cf_add_cflags" in
4177 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4178 case "$cf_add_cflags" in
4180 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4183 && test -z "${cf_tst_cflags}" \
4184 && cf_fix_cppflags=yes
4186 if test "$cf_fix_cppflags" = yes ; then
4188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4192 elif test "${cf_tst_cflags}" = "\"'" ; then
4194 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4195 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4205 case "$cf_add_cflags" in
4207 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4209 CPPFLAGS=`echo "$CPPFLAGS" | \
4210 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4211 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4216 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4217 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4224 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4225 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4232 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4233 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4235 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4237 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4238 && test -z "${cf_tst_cflags}" \
4239 && cf_fix_cppflags=no
4244 if test -n "$cf_new_cflags" ; then
4246 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4247 CFLAGS="${CFLAGS}$cf_new_cflags"
4251 if test -n "$cf_new_cppflags" ; then
4253 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4254 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4258 if test -n "$cf_new_extra_cppflags" ; then
4260 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4261 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4265 cat >"conftest.$ac_ext" <<_ACEOF
4266 #line 4266 "configure"
4267 #include "confdefs.h"
4270 #include <sys/types.h>
4276 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4279 # error GNU C library is too old
4285 rm -f "conftest.$ac_objext"
4286 if { (eval echo "$as_me:4286: \"$ac_compile\"") >&5
4287 (eval $ac_compile) 2>&5
4289 echo "$as_me:4289: \$? = $ac_status" >&5
4290 (exit "$ac_status"); } &&
4291 { ac_try='test -s "conftest.$ac_objext"'
4292 { (eval echo "$as_me:4292: \"$ac_try\"") >&5
4295 echo "$as_me:4295: \$? = $ac_status" >&5
4296 (exit "$ac_status"); }; }; then
4297 cf_cv_gnu_dftsrc_219=yes
4299 echo "$as_me: failed program was:" >&5
4300 cat "conftest.$ac_ext" >&5
4301 cf_cv_gnu_dftsrc_219=no
4303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4306 echo "$as_me:4306: result: $cf_cv_gnu_dftsrc_219" >&5
4307 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4308 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4310 cf_cv_gnu_dftsrc_219=maybe
4313 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4315 echo "$as_me:4315: checking if we must define _GNU_SOURCE" >&5
4316 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4317 if test "${cf_cv_gnu_source+set}" = set; then
4318 echo $ECHO_N "(cached) $ECHO_C" >&6
4321 cat >"conftest.$ac_ext" <<_ACEOF
4322 #line 4322 "configure"
4323 #include "confdefs.h"
4324 #include <sys/types.h>
4329 #ifndef _XOPEN_SOURCE
4330 #error expected _XOPEN_SOURCE to be defined
4336 rm -f "conftest.$ac_objext"
4337 if { (eval echo "$as_me:4337: \"$ac_compile\"") >&5
4338 (eval $ac_compile) 2>&5
4340 echo "$as_me:4340: \$? = $ac_status" >&5
4341 (exit "$ac_status"); } &&
4342 { ac_try='test -s "conftest.$ac_objext"'
4343 { (eval echo "$as_me:4343: \"$ac_try\"") >&5
4346 echo "$as_me:4346: \$? = $ac_status" >&5
4347 (exit "$ac_status"); }; }; then
4350 echo "$as_me: failed program was:" >&5
4351 cat "conftest.$ac_ext" >&5
4357 cf_new_extra_cppflags=
4359 for cf_add_cflags in -D_GNU_SOURCE
4361 case "$cf_fix_cppflags" in
4363 case "$cf_add_cflags" in
4364 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4365 case "$cf_add_cflags" in
4367 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4369 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4370 && test -z "${cf_tst_cflags}" \
4371 && cf_fix_cppflags=yes
4373 if test "$cf_fix_cppflags" = yes ; then
4375 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4376 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4379 elif test "${cf_tst_cflags}" = "\"'" ; then
4381 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4382 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4392 case "$cf_add_cflags" in
4394 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4396 CPPFLAGS=`echo "$CPPFLAGS" | \
4397 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4398 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4403 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4404 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4411 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4412 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4422 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4425 && test -z "${cf_tst_cflags}" \
4426 && cf_fix_cppflags=no
4431 if test -n "$cf_new_cflags" ; then
4433 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4434 CFLAGS="${CFLAGS}$cf_new_cflags"
4438 if test -n "$cf_new_cppflags" ; then
4440 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4441 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4445 if test -n "$cf_new_extra_cppflags" ; then
4447 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4448 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4452 cat >"conftest.$ac_ext" <<_ACEOF
4453 #line 4453 "configure"
4454 #include "confdefs.h"
4455 #include <sys/types.h>
4460 #ifdef _XOPEN_SOURCE
4461 #error expected _XOPEN_SOURCE to be undefined
4467 rm -f "conftest.$ac_objext"
4468 if { (eval echo "$as_me:4468: \"$ac_compile\"") >&5
4469 (eval $ac_compile) 2>&5
4471 echo "$as_me:4471: \$? = $ac_status" >&5
4472 (exit "$ac_status"); } &&
4473 { ac_try='test -s "conftest.$ac_objext"'
4474 { (eval echo "$as_me:4474: \"$ac_try\"") >&5
4477 echo "$as_me:4477: \$? = $ac_status" >&5
4478 (exit "$ac_status"); }; }; then
4481 echo "$as_me: failed program was:" >&5
4482 cat "conftest.$ac_ext" >&5
4483 cf_cv_gnu_source=yes
4485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4489 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4492 echo "$as_me:4492: result: $cf_cv_gnu_source" >&5
4493 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4495 if test "$cf_cv_gnu_source" = yes
4497 echo "$as_me:4497: checking if we should also define _DEFAULT_SOURCE" >&5
4498 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4499 if test "${cf_cv_default_source+set}" = set; then
4500 echo $ECHO_N "(cached) $ECHO_C" >&6
4503 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4504 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4506 cat >"conftest.$ac_ext" <<_ACEOF
4507 #line 4507 "configure"
4508 #include "confdefs.h"
4509 #include <sys/types.h>
4514 #ifdef _DEFAULT_SOURCE
4515 #error expected _DEFAULT_SOURCE to be undefined
4521 rm -f "conftest.$ac_objext"
4522 if { (eval echo "$as_me:4522: \"$ac_compile\"") >&5
4523 (eval $ac_compile) 2>&5
4525 echo "$as_me:4525: \$? = $ac_status" >&5
4526 (exit "$ac_status"); } &&
4527 { ac_try='test -s "conftest.$ac_objext"'
4528 { (eval echo "$as_me:4528: \"$ac_try\"") >&5
4531 echo "$as_me:4531: \$? = $ac_status" >&5
4532 (exit "$ac_status"); }; }; then
4533 cf_cv_default_source=no
4535 echo "$as_me: failed program was:" >&5
4536 cat "conftest.$ac_ext" >&5
4537 cf_cv_default_source=yes
4539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4542 echo "$as_me:4542: result: $cf_cv_default_source" >&5
4543 echo "${ECHO_T}$cf_cv_default_source" >&6
4544 if test "$cf_cv_default_source" = yes
4547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4548 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4558 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4561 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4564 if test "$cf_cv_posix_visible" = no; then
4566 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4568 cf_save_CFLAGS="$CFLAGS"
4569 cf_save_CPPFLAGS="$CPPFLAGS"
4571 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4572 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4573 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4575 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4576 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4577 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4579 echo "$as_me:4579: checking if we should define _POSIX_C_SOURCE" >&5
4580 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4581 if test "${cf_cv_posix_c_source+set}" = set; then
4582 echo $ECHO_N "(cached) $ECHO_C" >&6
4585 echo "${as_me:-configure}:4585: testing if the symbol is already defined go no further ..." 1>&5
4587 cat >"conftest.$ac_ext" <<_ACEOF
4588 #line 4588 "configure"
4589 #include "confdefs.h"
4590 #include <sys/types.h>
4595 #ifndef _POSIX_C_SOURCE
4602 rm -f "conftest.$ac_objext"
4603 if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
4604 (eval $ac_compile) 2>&5
4606 echo "$as_me:4606: \$? = $ac_status" >&5
4607 (exit "$ac_status"); } &&
4608 { ac_try='test -s "conftest.$ac_objext"'
4609 { (eval echo "$as_me:4609: \"$ac_try\"") >&5
4612 echo "$as_me:4612: \$? = $ac_status" >&5
4613 (exit "$ac_status"); }; }; then
4614 cf_cv_posix_c_source=no
4616 echo "$as_me: failed program was:" >&5
4617 cat "conftest.$ac_ext" >&5
4618 cf_want_posix_source=no
4619 case .$cf_POSIX_C_SOURCE in
4621 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4624 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4625 cf_want_posix_source=yes
4628 cf_want_posix_source=yes
4631 if test "$cf_want_posix_source" = yes ; then
4632 cat >"conftest.$ac_ext" <<_ACEOF
4633 #line 4633 "configure"
4634 #include "confdefs.h"
4635 #include <sys/types.h>
4640 #ifdef _POSIX_SOURCE
4647 rm -f "conftest.$ac_objext"
4648 if { (eval echo "$as_me:4648: \"$ac_compile\"") >&5
4649 (eval $ac_compile) 2>&5
4651 echo "$as_me:4651: \$? = $ac_status" >&5
4652 (exit "$ac_status"); } &&
4653 { ac_try='test -s "conftest.$ac_objext"'
4654 { (eval echo "$as_me:4654: \"$ac_try\"") >&5
4657 echo "$as_me:4657: \$? = $ac_status" >&5
4658 (exit "$ac_status"); }; }; then
4661 echo "$as_me: failed program was:" >&5
4662 cat "conftest.$ac_ext" >&5
4663 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4665 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4668 echo "${as_me:-configure}:4668: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4670 CFLAGS="$cf_trim_CFLAGS"
4671 CPPFLAGS="$cf_trim_CPPFLAGS"
4673 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4674 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4676 echo "${as_me:-configure}:4676: testing if the second compile does not leave our definition intact error ..." 1>&5
4678 cat >"conftest.$ac_ext" <<_ACEOF
4679 #line 4679 "configure"
4680 #include "confdefs.h"
4681 #include <sys/types.h>
4686 #ifndef _POSIX_C_SOURCE
4693 rm -f "conftest.$ac_objext"
4694 if { (eval echo "$as_me:4694: \"$ac_compile\"") >&5
4695 (eval $ac_compile) 2>&5
4697 echo "$as_me:4697: \$? = $ac_status" >&5
4698 (exit "$ac_status"); } &&
4699 { ac_try='test -s "conftest.$ac_objext"'
4700 { (eval echo "$as_me:4700: \"$ac_try\"") >&5
4703 echo "$as_me:4703: \$? = $ac_status" >&5
4704 (exit "$ac_status"); }; }; then
4707 echo "$as_me: failed program was:" >&5
4708 cat "conftest.$ac_ext" >&5
4709 cf_cv_posix_c_source=no
4711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4712 CFLAGS="$cf_save_CFLAGS"
4713 CPPFLAGS="$cf_save_CPPFLAGS"
4716 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4719 echo "$as_me:4719: result: $cf_cv_posix_c_source" >&5
4720 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4722 if test "$cf_cv_posix_c_source" != no ; then
4723 CFLAGS="$cf_trim_CFLAGS"
4724 CPPFLAGS="$cf_trim_CPPFLAGS"
4729 cf_new_extra_cppflags=
4731 for cf_add_cflags in $cf_cv_posix_c_source
4733 case "$cf_fix_cppflags" in
4735 case "$cf_add_cflags" in
4736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4737 case "$cf_add_cflags" in
4739 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4742 && test -z "${cf_tst_cflags}" \
4743 && cf_fix_cppflags=yes
4745 if test "$cf_fix_cppflags" = yes ; then
4747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4751 elif test "${cf_tst_cflags}" = "\"'" ; then
4753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4764 case "$cf_add_cflags" in
4766 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4768 CPPFLAGS=`echo "$CPPFLAGS" | \
4769 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4770 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4775 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4776 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4783 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4784 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4797 && test -z "${cf_tst_cflags}" \
4798 && cf_fix_cppflags=no
4803 if test -n "$cf_new_cflags" ; then
4805 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4806 CFLAGS="${CFLAGS}$cf_new_cflags"
4810 if test -n "$cf_new_cppflags" ; then
4812 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4813 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4817 if test -n "$cf_new_extra_cppflags" ; then
4819 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4820 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4826 fi # cf_cv_posix_visible
4830 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4833 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4834 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4835 # Abusing the conformance level is a workaround.
4836 { echo "$as_me:4836: WARNING: this system does not provide usable locale support" >&5
4837 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4838 cf_xopen_source="-D_BSD_SOURCE"
4842 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4843 cf_xopen_source="-D_BSD_SOURCE"
4847 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4850 cf_xopen_source="-D_OSF_SOURCE"
4853 cf_xopen_source="-D_QNX_SOURCE"
4856 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4859 cf_xopen_source="-D__EXTENSIONS__"
4860 cf_cv_xopen_source=broken
4862 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4868 echo "$as_me:4868: checking if we should define _XOPEN_SOURCE" >&5
4869 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4870 if test "${cf_cv_xopen_source+set}" = set; then
4871 echo $ECHO_N "(cached) $ECHO_C" >&6
4874 cat >"conftest.$ac_ext" <<_ACEOF
4875 #line 4875 "configure"
4876 #include "confdefs.h"
4880 #include <sys/types.h>
4886 #ifndef _XOPEN_SOURCE
4894 rm -f "conftest.$ac_objext"
4895 if { (eval echo "$as_me:4895: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4898 echo "$as_me:4898: \$? = $ac_status" >&5
4899 (exit "$ac_status"); } &&
4900 { ac_try='test -s "conftest.$ac_objext"'
4901 { (eval echo "$as_me:4901: \"$ac_try\"") >&5
4904 echo "$as_me:4904: \$? = $ac_status" >&5
4905 (exit "$ac_status"); }; }; then
4906 cf_cv_xopen_source=no
4908 echo "$as_me: failed program was:" >&5
4909 cat "conftest.$ac_ext" >&5
4912 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4913 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4915 cat >"conftest.$ac_ext" <<_ACEOF
4916 #line 4916 "configure"
4917 #include "confdefs.h"
4921 #include <sys/types.h>
4927 #ifndef _XOPEN_SOURCE
4935 rm -f "conftest.$ac_objext"
4936 if { (eval echo "$as_me:4936: \"$ac_compile\"") >&5
4937 (eval $ac_compile) 2>&5
4939 echo "$as_me:4939: \$? = $ac_status" >&5
4940 (exit "$ac_status"); } &&
4941 { ac_try='test -s "conftest.$ac_objext"'
4942 { (eval echo "$as_me:4942: \"$ac_try\"") >&5
4945 echo "$as_me:4945: \$? = $ac_status" >&5
4946 (exit "$ac_status"); }; }; then
4947 cf_cv_xopen_source=no
4949 echo "$as_me: failed program was:" >&5
4950 cat "conftest.$ac_ext" >&5
4951 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4960 echo "$as_me:4960: result: $cf_cv_xopen_source" >&5
4961 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4963 if test "$cf_cv_xopen_source" != no ; then
4965 CFLAGS=`echo "$CFLAGS" | \
4966 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4967 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4969 CPPFLAGS=`echo "$CPPFLAGS" | \
4970 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4971 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4973 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4975 for cf_add_cflags in $cf_temp_xopen_source
4977 case "x$cf_add_cflags" in
4980 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4983 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4984 test "$CFLAGS" != "$cf_old_cflag" || break
4986 CFLAGS="$cf_old_cflag"
4989 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4992 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4993 test "$CPPFLAGS" != "$cf_old_cflag" || break
4995 CPPFLAGS="$cf_old_cflag"
5004 cf_new_extra_cppflags=
5006 for cf_add_cflags in $cf_add_cflags
5008 case "$cf_fix_cppflags" in
5010 case "$cf_add_cflags" in
5011 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5012 case "$cf_add_cflags" in
5014 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5016 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5017 && test -z "${cf_tst_cflags}" \
5018 && cf_fix_cppflags=yes
5020 if test "$cf_fix_cppflags" = yes ; then
5022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5026 elif test "${cf_tst_cflags}" = "\"'" ; then
5028 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5029 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5039 case "$cf_add_cflags" in
5041 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5043 CPPFLAGS=`echo "$CPPFLAGS" | \
5044 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5045 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5050 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5051 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5058 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5059 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5066 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5067 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5069 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5071 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5072 && test -z "${cf_tst_cflags}" \
5073 && cf_fix_cppflags=no
5078 if test -n "$cf_new_cflags" ; then
5080 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5081 CFLAGS="${CFLAGS}$cf_new_cflags"
5085 if test -n "$cf_new_cppflags" ; then
5087 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5088 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5092 if test -n "$cf_new_extra_cppflags" ; then
5094 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5095 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5103 cf_save_xopen_cppflags="$CPPFLAGS"
5105 if test "$cf_cv_posix_visible" = no; then
5107 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5109 cf_save_CFLAGS="$CFLAGS"
5110 cf_save_CPPFLAGS="$CPPFLAGS"
5112 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5113 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5114 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5116 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5117 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5118 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5120 echo "$as_me:5120: checking if we should define _POSIX_C_SOURCE" >&5
5121 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5122 if test "${cf_cv_posix_c_source+set}" = set; then
5123 echo $ECHO_N "(cached) $ECHO_C" >&6
5126 echo "${as_me:-configure}:5126: testing if the symbol is already defined go no further ..." 1>&5
5128 cat >"conftest.$ac_ext" <<_ACEOF
5129 #line 5129 "configure"
5130 #include "confdefs.h"
5131 #include <sys/types.h>
5136 #ifndef _POSIX_C_SOURCE
5143 rm -f "conftest.$ac_objext"
5144 if { (eval echo "$as_me:5144: \"$ac_compile\"") >&5
5145 (eval $ac_compile) 2>&5
5147 echo "$as_me:5147: \$? = $ac_status" >&5
5148 (exit "$ac_status"); } &&
5149 { ac_try='test -s "conftest.$ac_objext"'
5150 { (eval echo "$as_me:5150: \"$ac_try\"") >&5
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit "$ac_status"); }; }; then
5155 cf_cv_posix_c_source=no
5157 echo "$as_me: failed program was:" >&5
5158 cat "conftest.$ac_ext" >&5
5159 cf_want_posix_source=no
5160 case .$cf_POSIX_C_SOURCE in
5162 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5165 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5166 cf_want_posix_source=yes
5169 cf_want_posix_source=yes
5172 if test "$cf_want_posix_source" = yes ; then
5173 cat >"conftest.$ac_ext" <<_ACEOF
5174 #line 5174 "configure"
5175 #include "confdefs.h"
5176 #include <sys/types.h>
5181 #ifdef _POSIX_SOURCE
5188 rm -f "conftest.$ac_objext"
5189 if { (eval echo "$as_me:5189: \"$ac_compile\"") >&5
5190 (eval $ac_compile) 2>&5
5192 echo "$as_me:5192: \$? = $ac_status" >&5
5193 (exit "$ac_status"); } &&
5194 { ac_try='test -s "conftest.$ac_objext"'
5195 { (eval echo "$as_me:5195: \"$ac_try\"") >&5
5198 echo "$as_me:5198: \$? = $ac_status" >&5
5199 (exit "$ac_status"); }; }; then
5202 echo "$as_me: failed program was:" >&5
5203 cat "conftest.$ac_ext" >&5
5204 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5206 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5209 echo "${as_me:-configure}:5209: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5211 CFLAGS="$cf_trim_CFLAGS"
5212 CPPFLAGS="$cf_trim_CPPFLAGS"
5214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5215 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5217 echo "${as_me:-configure}:5217: testing if the second compile does not leave our definition intact error ..." 1>&5
5219 cat >"conftest.$ac_ext" <<_ACEOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222 #include <sys/types.h>
5227 #ifndef _POSIX_C_SOURCE
5234 rm -f "conftest.$ac_objext"
5235 if { (eval echo "$as_me:5235: \"$ac_compile\"") >&5
5236 (eval $ac_compile) 2>&5
5238 echo "$as_me:5238: \$? = $ac_status" >&5
5239 (exit "$ac_status"); } &&
5240 { ac_try='test -s "conftest.$ac_objext"'
5241 { (eval echo "$as_me:5241: \"$ac_try\"") >&5
5244 echo "$as_me:5244: \$? = $ac_status" >&5
5245 (exit "$ac_status"); }; }; then
5248 echo "$as_me: failed program was:" >&5
5249 cat "conftest.$ac_ext" >&5
5250 cf_cv_posix_c_source=no
5252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5253 CFLAGS="$cf_save_CFLAGS"
5254 CPPFLAGS="$cf_save_CPPFLAGS"
5257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5260 echo "$as_me:5260: result: $cf_cv_posix_c_source" >&5
5261 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5263 if test "$cf_cv_posix_c_source" != no ; then
5264 CFLAGS="$cf_trim_CFLAGS"
5265 CPPFLAGS="$cf_trim_CPPFLAGS"
5270 cf_new_extra_cppflags=
5272 for cf_add_cflags in $cf_cv_posix_c_source
5274 case "$cf_fix_cppflags" in
5276 case "$cf_add_cflags" in
5277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5278 case "$cf_add_cflags" in
5280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5283 && test -z "${cf_tst_cflags}" \
5284 && cf_fix_cppflags=yes
5286 if test "$cf_fix_cppflags" = yes ; then
5288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5292 elif test "${cf_tst_cflags}" = "\"'" ; then
5294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5305 case "$cf_add_cflags" in
5307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5309 CPPFLAGS=`echo "$CPPFLAGS" | \
5310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5338 && test -z "${cf_tst_cflags}" \
5339 && cf_fix_cppflags=no
5344 if test -n "$cf_new_cflags" ; then
5346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5347 CFLAGS="${CFLAGS}$cf_new_cflags"
5351 if test -n "$cf_new_cppflags" ; then
5353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5358 if test -n "$cf_new_extra_cppflags" ; then
5360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5367 fi # cf_cv_posix_visible
5369 # Some of these niche implementations use copy/paste, double-check...
5370 if test "$cf_cv_xopen_source" != no ; then
5371 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
5373 echo "${as_me:-configure}:5373: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
5375 cat >"conftest.$ac_ext" <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5381 #include <sys/types.h>
5387 #ifndef _XOPEN_SOURCE
5395 rm -f "conftest.$ac_objext"
5396 if { (eval echo "$as_me:5396: \"$ac_compile\"") >&5
5397 (eval $ac_compile) 2>&5
5399 echo "$as_me:5399: \$? = $ac_status" >&5
5400 (exit "$ac_status"); } &&
5401 { ac_try='test -s "conftest.$ac_objext"'
5402 { (eval echo "$as_me:5402: \"$ac_try\"") >&5
5405 echo "$as_me:5405: \$? = $ac_status" >&5
5406 (exit "$ac_status"); }; }; then
5409 echo "$as_me: failed program was:" >&5
5410 cat "conftest.$ac_ext" >&5
5412 { echo "$as_me:5412: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5413 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5414 CPPFLAGS="$cf_save_xopen_cppflags"
5416 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5421 if test -n "$cf_xopen_source" ; then
5423 for cf_add_cflags in $cf_xopen_source
5425 case "x$cf_add_cflags" in
5428 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5431 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5432 test "$CFLAGS" != "$cf_old_cflag" || break
5433 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5435 echo "${as_me:-configure}:5435: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5437 CFLAGS="$cf_old_cflag"
5440 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5443 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5444 test "$CPPFLAGS" != "$cf_old_cflag" || break
5445 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5447 echo "${as_me:-configure}:5447: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5449 CPPFLAGS="$cf_old_cflag"
5458 cf_new_extra_cppflags=
5460 for cf_add_cflags in $cf_add_cflags
5462 case "$cf_fix_cppflags" in
5464 case "$cf_add_cflags" in
5465 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5466 case "$cf_add_cflags" in
5468 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5470 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5471 && test -z "${cf_tst_cflags}" \
5472 && cf_fix_cppflags=yes
5474 if test "$cf_fix_cppflags" = yes ; then
5476 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5477 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5480 elif test "${cf_tst_cflags}" = "\"'" ; then
5482 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5483 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5493 case "$cf_add_cflags" in
5495 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5497 CPPFLAGS=`echo "$CPPFLAGS" | \
5498 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5499 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5504 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5505 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5512 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5513 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5520 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5521 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5523 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5526 && test -z "${cf_tst_cflags}" \
5527 && cf_fix_cppflags=no
5532 if test -n "$cf_new_cflags" ; then
5533 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5535 echo "${as_me:-configure}:5535: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5537 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5538 CFLAGS="${CFLAGS}$cf_new_cflags"
5542 if test -n "$cf_new_cppflags" ; then
5543 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5545 echo "${as_me:-configure}:5545: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5548 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5552 if test -n "$cf_new_extra_cppflags" ; then
5553 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5555 echo "${as_me:-configure}:5555: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5557 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5558 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5566 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5567 echo "$as_me:5567: checking if _XOPEN_SOURCE really is set" >&5
5568 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5569 cat >"conftest.$ac_ext" <<_ACEOF
5570 #line 5570 "configure"
5571 #include "confdefs.h"
5577 #ifndef _XOPEN_SOURCE
5584 rm -f "conftest.$ac_objext"
5585 if { (eval echo "$as_me:5585: \"$ac_compile\"") >&5
5586 (eval $ac_compile) 2>&5
5588 echo "$as_me:5588: \$? = $ac_status" >&5
5589 (exit "$ac_status"); } &&
5590 { ac_try='test -s "conftest.$ac_objext"'
5591 { (eval echo "$as_me:5591: \"$ac_try\"") >&5
5594 echo "$as_me:5594: \$? = $ac_status" >&5
5595 (exit "$ac_status"); }; }; then
5596 cf_XOPEN_SOURCE_set=yes
5598 echo "$as_me: failed program was:" >&5
5599 cat "conftest.$ac_ext" >&5
5600 cf_XOPEN_SOURCE_set=no
5602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5603 echo "$as_me:5603: result: $cf_XOPEN_SOURCE_set" >&5
5604 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5605 if test "$cf_XOPEN_SOURCE_set" = yes
5607 cat >"conftest.$ac_ext" <<_ACEOF
5608 #line 5608 "configure"
5609 #include "confdefs.h"
5615 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5622 rm -f "conftest.$ac_objext"
5623 if { (eval echo "$as_me:5623: \"$ac_compile\"") >&5
5624 (eval $ac_compile) 2>&5
5626 echo "$as_me:5626: \$? = $ac_status" >&5
5627 (exit "$ac_status"); } &&
5628 { ac_try='test -s "conftest.$ac_objext"'
5629 { (eval echo "$as_me:5629: \"$ac_try\"") >&5
5632 echo "$as_me:5632: \$? = $ac_status" >&5
5633 (exit "$ac_status"); }; }; then
5634 cf_XOPEN_SOURCE_set_ok=yes
5636 echo "$as_me: failed program was:" >&5
5637 cat "conftest.$ac_ext" >&5
5638 cf_XOPEN_SOURCE_set_ok=no
5640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5641 if test "$cf_XOPEN_SOURCE_set_ok" = no
5643 { echo "$as_me:5643: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5644 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5648 echo "$as_me:5648: checking if we should define _XOPEN_SOURCE" >&5
5649 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5650 if test "${cf_cv_xopen_source+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
5654 cat >"conftest.$ac_ext" <<_ACEOF
5655 #line 5655 "configure"
5656 #include "confdefs.h"
5660 #include <sys/types.h>
5666 #ifndef _XOPEN_SOURCE
5674 rm -f "conftest.$ac_objext"
5675 if { (eval echo "$as_me:5675: \"$ac_compile\"") >&5
5676 (eval $ac_compile) 2>&5
5678 echo "$as_me:5678: \$? = $ac_status" >&5
5679 (exit "$ac_status"); } &&
5680 { ac_try='test -s "conftest.$ac_objext"'
5681 { (eval echo "$as_me:5681: \"$ac_try\"") >&5
5684 echo "$as_me:5684: \$? = $ac_status" >&5
5685 (exit "$ac_status"); }; }; then
5686 cf_cv_xopen_source=no
5688 echo "$as_me: failed program was:" >&5
5689 cat "conftest.$ac_ext" >&5
5692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5693 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5695 cat >"conftest.$ac_ext" <<_ACEOF
5696 #line 5696 "configure"
5697 #include "confdefs.h"
5701 #include <sys/types.h>
5707 #ifndef _XOPEN_SOURCE
5715 rm -f "conftest.$ac_objext"
5716 if { (eval echo "$as_me:5716: \"$ac_compile\"") >&5
5717 (eval $ac_compile) 2>&5
5719 echo "$as_me:5719: \$? = $ac_status" >&5
5720 (exit "$ac_status"); } &&
5721 { ac_try='test -s "conftest.$ac_objext"'
5722 { (eval echo "$as_me:5722: \"$ac_try\"") >&5
5725 echo "$as_me:5725: \$? = $ac_status" >&5
5726 (exit "$ac_status"); }; }; then
5727 cf_cv_xopen_source=no
5729 echo "$as_me: failed program was:" >&5
5730 cat "conftest.$ac_ext" >&5
5731 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5740 echo "$as_me:5740: result: $cf_cv_xopen_source" >&5
5741 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5743 if test "$cf_cv_xopen_source" != no ; then
5745 CFLAGS=`echo "$CFLAGS" | \
5746 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5747 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5749 CPPFLAGS=`echo "$CPPFLAGS" | \
5750 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5751 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5753 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5755 for cf_add_cflags in $cf_temp_xopen_source
5757 case "x$cf_add_cflags" in
5760 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5763 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5764 test "$CFLAGS" != "$cf_old_cflag" || break
5766 CFLAGS="$cf_old_cflag"
5769 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5772 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5773 test "$CPPFLAGS" != "$cf_old_cflag" || break
5775 CPPFLAGS="$cf_old_cflag"
5784 cf_new_extra_cppflags=
5786 for cf_add_cflags in $cf_add_cflags
5788 case "$cf_fix_cppflags" in
5790 case "$cf_add_cflags" in
5791 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5792 case "$cf_add_cflags" in
5794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5797 && test -z "${cf_tst_cflags}" \
5798 && cf_fix_cppflags=yes
5800 if test "$cf_fix_cppflags" = yes ; then
5802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5806 elif test "${cf_tst_cflags}" = "\"'" ; then
5808 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5809 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5819 case "$cf_add_cflags" in
5821 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5823 CPPFLAGS=`echo "$CPPFLAGS" | \
5824 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5825 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5830 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5831 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5838 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5839 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5849 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5851 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5852 && test -z "${cf_tst_cflags}" \
5853 && cf_fix_cppflags=no
5858 if test -n "$cf_new_cflags" ; then
5860 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5861 CFLAGS="${CFLAGS}$cf_new_cflags"
5865 if test -n "$cf_new_cppflags" ; then
5867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5868 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5872 if test -n "$cf_new_extra_cppflags" ; then
5874 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5875 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5885 fi # cf_cv_posix_visible
5887 echo "$as_me:5887: checking for signal global datatype" >&5
5888 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5889 if test "${cf_cv_sig_atomic_t+set}" = set; then
5890 echo $ECHO_N "(cached) $ECHO_C" >&6
5894 "volatile sig_atomic_t" \
5898 cat >"conftest.$ac_ext" <<_ACEOF
5899 #line 5899 "configure"
5900 #include "confdefs.h"
5902 #include <sys/types.h>
5908 static void handler(int sig)
5916 signal(SIGINT, handler);
5922 rm -f "conftest.$ac_objext"
5923 if { (eval echo "$as_me:5923: \"$ac_compile\"") >&5
5924 (eval $ac_compile) 2>&5
5926 echo "$as_me:5926: \$? = $ac_status" >&5
5927 (exit "$ac_status"); } &&
5928 { ac_try='test -s "conftest.$ac_objext"'
5929 { (eval echo "$as_me:5929: \"$ac_try\"") >&5
5932 echo "$as_me:5932: \$? = $ac_status" >&5
5933 (exit "$ac_status"); }; }; then
5934 cf_cv_sig_atomic_t=$cf_type
5936 echo "$as_me: failed program was:" >&5
5937 cat "conftest.$ac_ext" >&5
5938 cf_cv_sig_atomic_t=no
5940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5941 test "$cf_cv_sig_atomic_t" != no && break
5946 echo "$as_me:5946: result: $cf_cv_sig_atomic_t" >&5
5947 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5948 test "$cf_cv_sig_atomic_t" != no &&
5949 cat >>confdefs.h <<EOF
5950 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5953 # Work around breakage on OS X
5955 echo "$as_me:5955: checking if SIGWINCH is defined" >&5
5956 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5957 if test "${cf_cv_define_sigwinch+set}" = set; then
5958 echo $ECHO_N "(cached) $ECHO_C" >&6
5961 cat >"conftest.$ac_ext" <<_ACEOF
5962 #line 5962 "configure"
5963 #include "confdefs.h"
5965 #include <sys/types.h>
5966 #include <sys/signal.h>
5971 int x = SIGWINCH; (void)x
5976 rm -f "conftest.$ac_objext"
5977 if { (eval echo "$as_me:5977: \"$ac_compile\"") >&5
5978 (eval $ac_compile) 2>&5
5980 echo "$as_me:5980: \$? = $ac_status" >&5
5981 (exit "$ac_status"); } &&
5982 { ac_try='test -s "conftest.$ac_objext"'
5983 { (eval echo "$as_me:5983: \"$ac_try\"") >&5
5986 echo "$as_me:5986: \$? = $ac_status" >&5
5987 (exit "$ac_status"); }; }; then
5988 cf_cv_define_sigwinch=yes
5990 echo "$as_me: failed program was:" >&5
5991 cat "conftest.$ac_ext" >&5
5992 cat >"conftest.$ac_ext" <<_ACEOF
5993 #line 5993 "configure"
5994 #include "confdefs.h"
5996 #undef _XOPEN_SOURCE
5997 #undef _POSIX_SOURCE
5998 #undef _POSIX_C_SOURCE
5999 #include <sys/types.h>
6000 #include <sys/signal.h>
6005 int x = SIGWINCH; (void)x
6010 rm -f "conftest.$ac_objext"
6011 if { (eval echo "$as_me:6011: \"$ac_compile\"") >&5
6012 (eval $ac_compile) 2>&5
6014 echo "$as_me:6014: \$? = $ac_status" >&5
6015 (exit "$ac_status"); } &&
6016 { ac_try='test -s "conftest.$ac_objext"'
6017 { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit "$ac_status"); }; }; then
6022 cf_cv_define_sigwinch=maybe
6024 echo "$as_me: failed program was:" >&5
6025 cat "conftest.$ac_ext" >&5
6026 cf_cv_define_sigwinch=no
6028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6034 echo "$as_me:6034: result: $cf_cv_define_sigwinch" >&5
6035 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6037 if test "$cf_cv_define_sigwinch" = maybe ; then
6038 echo "$as_me:6038: checking for actual SIGWINCH definition" >&5
6039 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6040 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6044 cf_cv_fixup_sigwinch=unknown
6046 while test "$cf_sigwinch" != 1
6048 cat >"conftest.$ac_ext" <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6052 #undef _XOPEN_SOURCE
6053 #undef _POSIX_SOURCE
6054 #undef _POSIX_C_SOURCE
6055 #include <sys/types.h>
6056 #include <sys/signal.h>
6062 #if SIGWINCH != $cf_sigwinch
6065 int x = SIGWINCH; (void)x
6070 rm -f "conftest.$ac_objext"
6071 if { (eval echo "$as_me:6071: \"$ac_compile\"") >&5
6072 (eval $ac_compile) 2>&5
6074 echo "$as_me:6074: \$? = $ac_status" >&5
6075 (exit "$ac_status"); } &&
6076 { ac_try='test -s "conftest.$ac_objext"'
6077 { (eval echo "$as_me:6077: \"$ac_try\"") >&5
6080 echo "$as_me:6080: \$? = $ac_status" >&5
6081 (exit "$ac_status"); }; }; then
6082 cf_cv_fixup_sigwinch=$cf_sigwinch
6085 echo "$as_me: failed program was:" >&5
6086 cat "conftest.$ac_ext" >&5
6088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6090 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6094 echo "$as_me:6094: result: $cf_cv_fixup_sigwinch" >&5
6095 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6097 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6098 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6102 # Checks for CODESET support.
6104 echo "$as_me:6104: checking for nl_langinfo and CODESET" >&5
6105 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6106 if test "${am_cv_langinfo_codeset+set}" = set; then
6107 echo $ECHO_N "(cached) $ECHO_C" >&6
6109 cat >"conftest.$ac_ext" <<_ACEOF
6110 #line 6110 "configure"
6111 #include "confdefs.h"
6113 $ac_includes_default
6114 #include <langinfo.h>
6118 char* cs = nl_langinfo(CODESET); (void)cs
6123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6124 if { (eval echo "$as_me:6124: \"$ac_link\"") >&5
6125 (eval $ac_link) 2>&5
6127 echo "$as_me:6127: \$? = $ac_status" >&5
6128 (exit "$ac_status"); } &&
6129 { ac_try='test -s "conftest$ac_exeext"'
6130 { (eval echo "$as_me:6130: \"$ac_try\"") >&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit "$ac_status"); }; }; then
6135 am_cv_langinfo_codeset=yes
6137 echo "$as_me: failed program was:" >&5
6138 cat "conftest.$ac_ext" >&5
6139 am_cv_langinfo_codeset=no
6141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6144 echo "$as_me:6144: result: $am_cv_langinfo_codeset" >&5
6145 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6146 if test "$am_cv_langinfo_codeset" = yes; then
6148 cat >>confdefs.h <<\EOF
6149 #define HAVE_LANGINFO_CODESET 1
6154 echo "$as_me:6154: checking if you want to use pkg-config" >&5
6155 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6157 # Check whether --with-pkg-config or --without-pkg-config was given.
6158 if test "${with_pkg_config+set}" = set; then
6159 withval="$with_pkg_config"
6160 cf_pkg_config=$withval
6164 echo "$as_me:6164: result: $cf_pkg_config" >&5
6165 echo "${ECHO_T}$cf_pkg_config" >&6
6167 case "$cf_pkg_config" in
6173 if test -n "$ac_tool_prefix"; then
6174 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6175 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6176 echo "$as_me:6176: checking for $ac_word" >&5
6177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6178 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6179 echo $ECHO_N "(cached) $ECHO_C" >&6
6183 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6186 ac_save_IFS=$IFS; IFS=$ac_path_separator
6188 for ac_dir in $ac_dummy; do
6190 test -z "$ac_dir" && ac_dir=.
6191 if $as_executable_p "$ac_dir/$ac_word"; then
6192 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6193 echo "$as_me:6193: found $ac_dir/$ac_word" >&5
6201 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6203 if test -n "$PKG_CONFIG"; then
6204 echo "$as_me:6204: result: $PKG_CONFIG" >&5
6205 echo "${ECHO_T}$PKG_CONFIG" >&6
6207 echo "$as_me:6207: result: no" >&5
6208 echo "${ECHO_T}no" >&6
6212 if test -z "$ac_cv_path_PKG_CONFIG"; then
6213 ac_pt_PKG_CONFIG=$PKG_CONFIG
6214 # Extract the first word of "pkg-config", so it can be a program name with args.
6215 set dummy pkg-config; ac_word=$2
6216 echo "$as_me:6216: checking for $ac_word" >&5
6217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6218 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6219 echo $ECHO_N "(cached) $ECHO_C" >&6
6221 case $ac_pt_PKG_CONFIG in
6223 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6226 ac_save_IFS=$IFS; IFS=$ac_path_separator
6228 for ac_dir in $ac_dummy; do
6230 test -z "$ac_dir" && ac_dir=.
6231 if $as_executable_p "$ac_dir/$ac_word"; then
6232 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6233 echo "$as_me:6233: found $ac_dir/$ac_word" >&5
6238 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6242 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6244 if test -n "$ac_pt_PKG_CONFIG"; then
6245 echo "$as_me:6245: result: $ac_pt_PKG_CONFIG" >&5
6246 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6248 echo "$as_me:6248: result: no" >&5
6249 echo "${ECHO_T}no" >&6
6252 PKG_CONFIG=$ac_pt_PKG_CONFIG
6254 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6263 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6264 if test "$PKG_CONFIG" != none ; then
6266 if test "x$prefix" != xNONE; then
6267 cf_path_syntax="$prefix"
6269 cf_path_syntax="$ac_default_prefix"
6272 case ".$PKG_CONFIG" in
6277 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6279 (.\$\{*prefix\}*|.\$\{*dir\}*)
6280 eval PKG_CONFIG="$PKG_CONFIG"
6281 case ".$PKG_CONFIG" in
6283 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6288 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6291 { { echo "$as_me:6291: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6292 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6293 { (exit 1); exit 1; }; }
6297 elif test "x$cf_pkg_config" != xno ; then
6298 { echo "$as_me:6298: WARNING: pkg-config is not installed" >&5
6299 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6302 echo "$as_me:6302: checking if you want to see long compiling messages" >&5
6303 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6305 # Check whether --enable-echo or --disable-echo was given.
6306 if test "${enable_echo+set}" = set; then
6307 enableval="$enable_echo"
6308 test "$enableval" != no && enableval=yes
6309 if test "$enableval" != "yes" ; then
6312 ECHO_LD='@echo linking $@;'
6313 RULE_CC='@echo compiling $<'
6314 SHOW_CC='@echo compiling $@'
6336 echo "$as_me:6336: result: $enableval" >&5
6337 echo "${ECHO_T}$enableval" >&6
6339 echo "$as_me:6339: checking for ncurses wrap-prefix" >&5
6340 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6342 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6343 if test "${with_ncurses_wrap_prefix+set}" = set; then
6344 withval="$with_ncurses_wrap_prefix"
6345 NCURSES_WRAP_PREFIX=$withval
6347 NCURSES_WRAP_PREFIX=_nc_
6349 echo "$as_me:6349: result: $NCURSES_WRAP_PREFIX" >&5
6350 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6352 echo "$as_me:6352: checking if you want to check for wide-character functions" >&5
6353 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6355 # Check whether --enable-widec or --disable-widec was given.
6356 if test "${enable_widec+set}" = set; then
6357 enableval="$enable_widec"
6358 test "$enableval" != no && enableval=yes
6359 if test "$enableval" != "yes" ; then
6369 echo "$as_me:6369: result: $cf_enable_widec" >&5
6370 echo "${ECHO_T}$cf_enable_widec" >&6
6372 echo "$as_me:6372: checking for specific curses-directory" >&5
6373 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6375 # Check whether --with-curses-dir or --without-curses-dir was given.
6376 if test "${with_curses_dir+set}" = set; then
6377 withval="$with_curses_dir"
6378 cf_cv_curses_dir=$withval
6382 echo "$as_me:6382: result: $cf_cv_curses_dir" >&5
6383 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6385 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6388 if test "x$prefix" != xNONE; then
6389 cf_path_syntax="$prefix"
6391 cf_path_syntax="$ac_default_prefix"
6399 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6401 (.\$\{*prefix\}*|.\$\{*dir\}*)
6402 eval withval="$withval"
6405 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6410 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6413 { { echo "$as_me:6413: error: expected a pathname, not \"$withval\"" >&5
6414 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6415 { (exit 1); exit 1; }; }
6419 if test -d "$cf_cv_curses_dir"
6422 if test -n "$cf_cv_curses_dir/include" ; then
6423 for cf_add_incdir in $cf_cv_curses_dir/include
6425 while test "$cf_add_incdir" != /usr/include
6427 if test -d "$cf_add_incdir"
6430 if test -n "$CFLAGS$CPPFLAGS" ; then
6431 # a loop is needed to ensure we can add subdirs of existing dirs
6432 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6433 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6434 cf_have_incdir=yes; break
6439 if test "$cf_have_incdir" = no ; then
6440 if test "$cf_add_incdir" = /usr/local/include ; then
6441 if test "$GCC" = yes
6443 cf_save_CPPFLAGS=$CPPFLAGS
6445 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6446 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6448 cat >"conftest.$ac_ext" <<_ACEOF
6449 #line 6449 "configure"
6450 #include "confdefs.h"
6460 rm -f "conftest.$ac_objext"
6461 if { (eval echo "$as_me:6461: \"$ac_compile\"") >&5
6462 (eval $ac_compile) 2>&5
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit "$ac_status"); } &&
6466 { ac_try='test -s "conftest.$ac_objext"'
6467 { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6470 echo "$as_me:6470: \$? = $ac_status" >&5
6471 (exit "$ac_status"); }; }; then
6474 echo "$as_me: failed program was:" >&5
6475 cat "conftest.$ac_ext" >&5
6478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6479 CPPFLAGS=$cf_save_CPPFLAGS
6484 if test "$cf_have_incdir" = no ; then
6485 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6487 echo "${as_me:-configure}:6487: testing adding $cf_add_incdir to include-path ..." 1>&5
6489 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6491 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6492 test "$cf_top_incdir" = "$cf_add_incdir" && break
6493 cf_add_incdir="$cf_top_incdir"
6504 if test -n "$cf_cv_curses_dir/lib" ; then
6505 for cf_add_libdir in $cf_cv_curses_dir/lib
6507 if test "$cf_add_libdir" = /usr/lib ; then
6509 elif test -d "$cf_add_libdir"
6512 if test -n "$LDFLAGS$LIBS" ; then
6513 # a loop is needed to ensure we can add subdirs of existing dirs
6514 for cf_test_libdir in $LDFLAGS $LIBS ; do
6515 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6516 cf_have_libdir=yes; break
6520 if test "$cf_have_libdir" = no ; then
6521 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6523 echo "${as_me:-configure}:6523: testing adding $cf_add_libdir to library-path ..." 1>&5
6525 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6536 echo "$as_me:6536: checking for specified curses library type" >&5
6537 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6539 # Check whether --with-screen or --without-screen was given.
6540 if test "${with_screen+set}" = set; then
6541 withval="$with_screen"
6542 cf_cv_screen=$withval
6545 # Check whether --with-ncursesw or --without-ncursesw was given.
6546 if test "${with_ncursesw+set}" = set; then
6547 withval="$with_ncursesw"
6548 cf_cv_screen=ncursesw
6551 # Check whether --with-ncurses or --without-ncurses was given.
6552 if test "${with_ncurses+set}" = set; then
6553 withval="$with_ncurses"
6554 cf_cv_screen=ncurses
6557 # Check whether --with-pdcurses or --without-pdcurses was given.
6558 if test "${with_pdcurses+set}" = set; then
6559 withval="$with_pdcurses"
6560 cf_cv_screen=pdcurses
6563 # Check whether --with-curses-colr or --without-curses-colr was given.
6564 if test "${with_curses_colr+set}" = set; then
6565 withval="$with_curses_colr"
6566 cf_cv_screen=curses_colr
6569 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6570 if test "${with_curses_5lib+set}" = set; then
6571 withval="$with_curses_5lib"
6572 cf_cv_screen=curses_5lib
6580 echo "$as_me:6580: result: $cf_cv_screen" >&5
6581 echo "${ECHO_T}$cf_cv_screen" >&6
6583 case $cf_cv_screen in
6586 echo "$as_me:6586: checking for extra include directories" >&5
6587 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6588 if test "${cf_cv_curses_incdir+set}" = set; then
6589 echo $ECHO_N "(cached) $ECHO_C" >&6
6592 cf_cv_curses_incdir=no
6595 if test "x$cf_cv_screen" = "xcurses_colr"
6597 test -d /usr/include/curses_colr && \
6598 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6602 if test "x$cf_cv_screen" = "xcurses_5lib"
6604 test -d /usr/5lib && \
6605 test -d /usr/5include && \
6606 cf_cv_curses_incdir="-I/usr/5include"
6612 echo "$as_me:6612: result: $cf_cv_curses_incdir" >&5
6613 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6614 if test "$cf_cv_curses_incdir" != no
6617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6618 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6622 echo "$as_me:6622: checking if we have identified curses headers" >&5
6623 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6624 if test "${cf_cv_ncurses_header+set}" = set; then
6625 echo $ECHO_N "(cached) $ECHO_C" >&6
6628 cf_cv_ncurses_header=none
6631 curses.h ncurses/ncurses.h ncurses/curses.h
6633 cat >"conftest.$ac_ext" <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636 #include <${cf_header}>
6645 rm -f "conftest.$ac_objext"
6646 if { (eval echo "$as_me:6646: \"$ac_compile\"") >&5
6647 (eval $ac_compile) 2>&5
6649 echo "$as_me:6649: \$? = $ac_status" >&5
6650 (exit "$ac_status"); } &&
6651 { ac_try='test -s "conftest.$ac_objext"'
6652 { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6655 echo "$as_me:6655: \$? = $ac_status" >&5
6656 (exit "$ac_status"); }; }; then
6657 cf_cv_ncurses_header=$cf_header; break
6659 echo "$as_me: failed program was:" >&5
6660 cat "conftest.$ac_ext" >&5
6662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6666 echo "$as_me:6666: result: $cf_cv_ncurses_header" >&5
6667 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6669 if test "$cf_cv_ncurses_header" = none ; then
6670 { { echo "$as_me:6670: error: No curses header-files found" >&5
6671 echo "$as_me: error: No curses header-files found" >&2;}
6672 { (exit 1); exit 1; }; }
6675 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6677 for ac_header in $cf_cv_ncurses_header
6679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6680 echo "$as_me:6680: checking for $ac_header" >&5
6681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6683 echo $ECHO_N "(cached) $ECHO_C" >&6
6685 cat >"conftest.$ac_ext" <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688 #include <$ac_header>
6690 if { (eval echo "$as_me:6690: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6691 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6693 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6695 cat conftest.err >&5
6696 echo "$as_me:6696: \$? = $ac_status" >&5
6697 (exit "$ac_status"); } >/dev/null; then
6698 if test -s conftest.err; then
6699 ac_cpp_err=$ac_c_preproc_warn_flag
6706 if test -z "$ac_cpp_err"; then
6707 eval "$as_ac_Header=yes"
6709 echo "$as_me: failed program was:" >&5
6710 cat "conftest.$ac_ext" >&5
6711 eval "$as_ac_Header=no"
6713 rm -f conftest.err "conftest.$ac_ext"
6715 echo "$as_me:6715: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6716 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6717 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6718 cat >>confdefs.h <<EOF
6719 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6725 echo "$as_me:6725: checking for terminfo header" >&5
6726 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6727 if test "${cf_cv_term_header+set}" = set; then
6728 echo $ECHO_N "(cached) $ECHO_C" >&6
6731 case "${cf_cv_ncurses_header}" in
6732 (*/ncurses.h|*/ncursesw.h)
6733 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6736 cf_term_header=term.h
6740 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6742 cat >"conftest.$ac_ext" <<_ACEOF
6743 #line 6743 "configure"
6744 #include "confdefs.h"
6746 #include <${cf_cv_ncurses_header:-curses.h}>
6752 int x = auto_left_margin; (void)x
6757 rm -f "conftest.$ac_objext"
6758 if { (eval echo "$as_me:6758: \"$ac_compile\"") >&5
6759 (eval $ac_compile) 2>&5
6761 echo "$as_me:6761: \$? = $ac_status" >&5
6762 (exit "$ac_status"); } &&
6763 { ac_try='test -s "conftest.$ac_objext"'
6764 { (eval echo "$as_me:6764: \"$ac_try\"") >&5
6767 echo "$as_me:6767: \$? = $ac_status" >&5
6768 (exit "$ac_status"); }; }; then
6770 cf_cv_term_header="$cf_test"
6772 echo "$as_me: failed program was:" >&5
6773 cat "conftest.$ac_ext" >&5
6775 cf_cv_term_header=unknown
6778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6779 test "$cf_cv_term_header" != unknown && break
6783 echo "$as_me:6783: result: $cf_cv_term_header" >&5
6784 echo "${ECHO_T}$cf_cv_term_header" >&6
6786 # Set definitions to allow ifdef'ing to accommodate subdirectories
6788 case "$cf_cv_term_header" in
6791 cat >>confdefs.h <<\EOF
6792 #define HAVE_TERM_H 1
6798 case "$cf_cv_term_header" in
6801 cat >>confdefs.h <<\EOF
6802 #define HAVE_NCURSES_TERM_H 1
6808 cat >>confdefs.h <<\EOF
6809 #define HAVE_NCURSESW_TERM_H 1
6815 echo "$as_me:6815: checking for ncurses version" >&5
6816 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6817 if test "${cf_cv_ncurses_version+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6821 cf_cv_ncurses_version=no
6823 rm -f "$cf_tempfile"
6824 if test "$cross_compiling" = yes; then
6826 # This will not work if the preprocessor splits the line after the
6827 # Autoconf token. The 'unproto' program does that.
6828 cat > "conftest.$ac_ext" <<EOF
6829 #include <${cf_cv_ncurses_header:-curses.h}>
6831 #ifdef NCURSES_VERSION
6832 Autoconf NCURSES_VERSION
6840 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6841 { (eval echo "$as_me:6841: \"$cf_try\"") >&5
6844 echo "$as_me:6844: \$? = $ac_status" >&5
6845 (exit "$ac_status"); }
6846 if test -f conftest.out ; then
6847 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6848 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6853 cat >"conftest.$ac_ext" <<_ACEOF
6854 #line 6854 "configure"
6855 #include "confdefs.h"
6857 $ac_includes_default
6859 #include <${cf_cv_ncurses_header:-curses.h}>
6863 FILE *fp = fopen("$cf_tempfile", "w");
6864 #ifdef NCURSES_VERSION
6865 # ifdef NCURSES_VERSION_PATCH
6866 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6868 fprintf(fp, "%s\\n", NCURSES_VERSION);
6872 fprintf(fp, "old\\n");
6877 ${cf_cv_main_return:-return}(0);
6880 rm -f "conftest$ac_exeext"
6881 if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882 (eval $ac_link) 2>&5
6884 echo "$as_me:6884: \$? = $ac_status" >&5
6885 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6886 { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6889 echo "$as_me:6889: \$? = $ac_status" >&5
6890 (exit "$ac_status"); }; }; then
6892 cf_cv_ncurses_version=`cat $cf_tempfile`
6894 echo "$as_me: program exited with status $ac_status" >&5
6895 echo "$as_me: failed program was:" >&5
6896 cat "conftest.$ac_ext" >&5
6898 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6900 rm -f "$cf_tempfile"
6903 echo "$as_me:6903: result: $cf_cv_ncurses_version" >&5
6904 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6905 test "$cf_cv_ncurses_version" = no ||
6906 cat >>confdefs.h <<\EOF
6910 echo "$as_me:6910: checking if we have identified curses libraries" >&5
6911 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6912 cat >"conftest.$ac_ext" <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 #include <${cf_cv_ncurses_header:-curses.h}>
6924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6925 if { (eval echo "$as_me:6925: \"$ac_link\"") >&5
6926 (eval $ac_link) 2>&5
6928 echo "$as_me:6928: \$? = $ac_status" >&5
6929 (exit "$ac_status"); } &&
6930 { ac_try='test -s "conftest$ac_exeext"'
6931 { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6934 echo "$as_me:6934: \$? = $ac_status" >&5
6935 (exit "$ac_status"); }; }; then
6938 echo "$as_me: failed program was:" >&5
6939 cat "conftest.$ac_ext" >&5
6942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6943 echo "$as_me:6943: result: $cf_result" >&5
6944 echo "${ECHO_T}$cf_result" >&6
6946 if test "$cf_result" = no ; then
6949 echo "$as_me:6949: checking for tgoto in -lmytinfo" >&5
6950 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6951 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
6954 ac_check_lib_save_LIBS=$LIBS
6955 LIBS="-lmytinfo $LIBS"
6956 cat >"conftest.$ac_ext" <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6960 /* Override any gcc2 internal prototype to avoid an error. */
6964 /* We use char because int might match the return type of a gcc2
6965 builtin and then its argument prototype would still apply. */
6975 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6976 if { (eval echo "$as_me:6976: \"$ac_link\"") >&5
6977 (eval $ac_link) 2>&5
6979 echo "$as_me:6979: \$? = $ac_status" >&5
6980 (exit "$ac_status"); } &&
6981 { ac_try='test -s "conftest$ac_exeext"'
6982 { (eval echo "$as_me:6982: \"$ac_try\"") >&5
6985 echo "$as_me:6985: \$? = $ac_status" >&5
6986 (exit "$ac_status"); }; }; then
6987 ac_cv_lib_mytinfo_tgoto=yes
6989 echo "$as_me: failed program was:" >&5
6990 cat "conftest.$ac_ext" >&5
6991 ac_cv_lib_mytinfo_tgoto=no
6993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6994 LIBS=$ac_check_lib_save_LIBS
6996 echo "$as_me:6996: result: $ac_cv_lib_mytinfo_tgoto" >&5
6997 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6998 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
7003 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7005 for cf_add_1lib in $cf_add_0lib; do
7006 for cf_add_2lib in $cf_add_libs; do
7007 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7012 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7020 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7021 # next (1998), and xcurses "newer" (2000). There is no header file for
7022 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7023 # term.h) for cur_colr
7024 if test "x$cf_cv_screen" = "xcurses_colr"
7026 echo "$as_me:7026: checking for initscr in -lcur_colr" >&5
7027 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7028 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7029 echo $ECHO_N "(cached) $ECHO_C" >&6
7031 ac_check_lib_save_LIBS=$LIBS
7032 LIBS="-lcur_colr $LIBS"
7033 cat >"conftest.$ac_ext" <<_ACEOF
7034 #line 7034 "configure"
7035 #include "confdefs.h"
7037 /* Override any gcc2 internal prototype to avoid an error. */
7041 /* We use char because int might match the return type of a gcc2
7042 builtin and then its argument prototype would still apply. */
7052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7053 if { (eval echo "$as_me:7053: \"$ac_link\"") >&5
7054 (eval $ac_link) 2>&5
7056 echo "$as_me:7056: \$? = $ac_status" >&5
7057 (exit "$ac_status"); } &&
7058 { ac_try='test -s "conftest$ac_exeext"'
7059 { (eval echo "$as_me:7059: \"$ac_try\"") >&5
7062 echo "$as_me:7062: \$? = $ac_status" >&5
7063 (exit "$ac_status"); }; }; then
7064 ac_cv_lib_cur_colr_initscr=yes
7066 echo "$as_me: failed program was:" >&5
7067 cat "conftest.$ac_ext" >&5
7068 ac_cv_lib_cur_colr_initscr=no
7070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7071 LIBS=$ac_check_lib_save_LIBS
7073 echo "$as_me:7073: result: $ac_cv_lib_cur_colr_initscr" >&5
7074 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7075 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7080 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7082 for cf_add_1lib in $cf_add_0lib; do
7083 for cf_add_2lib in $cf_add_libs; do
7084 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7093 ac_cv_func_initscr=yes
7097 echo "$as_me:7097: checking for initscr in -lHcurses" >&5
7098 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7099 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7100 echo $ECHO_N "(cached) $ECHO_C" >&6
7102 ac_check_lib_save_LIBS=$LIBS
7103 LIBS="-lHcurses $LIBS"
7104 cat >"conftest.$ac_ext" <<_ACEOF
7105 #line 7105 "configure"
7106 #include "confdefs.h"
7108 /* Override any gcc2 internal prototype to avoid an error. */
7112 /* We use char because int might match the return type of a gcc2
7113 builtin and then its argument prototype would still apply. */
7123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7124 if { (eval echo "$as_me:7124: \"$ac_link\"") >&5
7125 (eval $ac_link) 2>&5
7127 echo "$as_me:7127: \$? = $ac_status" >&5
7128 (exit "$ac_status"); } &&
7129 { ac_try='test -s "conftest$ac_exeext"'
7130 { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7133 echo "$as_me:7133: \$? = $ac_status" >&5
7134 (exit "$ac_status"); }; }; then
7135 ac_cv_lib_Hcurses_initscr=yes
7137 echo "$as_me: failed program was:" >&5
7138 cat "conftest.$ac_ext" >&5
7139 ac_cv_lib_Hcurses_initscr=no
7141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7142 LIBS=$ac_check_lib_save_LIBS
7144 echo "$as_me:7144: result: $ac_cv_lib_Hcurses_initscr" >&5
7145 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7146 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7148 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7153 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7155 for cf_add_1lib in $cf_add_0lib; do
7156 for cf_add_2lib in $cf_add_libs; do
7157 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7162 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7167 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7169 ac_cv_func_initscr=yes
7178 case `arch 2>/dev/null` in
7183 if test -n "/lib64" ; then
7184 for cf_add_libdir in /lib64
7186 if test "$cf_add_libdir" = /usr/lib ; then
7188 elif test -d "$cf_add_libdir"
7191 if test -n "$LDFLAGS$LIBS" ; then
7192 # a loop is needed to ensure we can add subdirs of existing dirs
7193 for cf_test_libdir in $LDFLAGS $LIBS ; do
7194 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7195 cf_have_libdir=yes; break
7199 if test "$cf_have_libdir" = no ; then
7200 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7202 echo "${as_me:-configure}:7202: testing adding $cf_add_libdir to library-path ..." 1>&5
7204 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7212 if test -n "/lib" ; then
7213 for cf_add_libdir in /lib
7215 if test "$cf_add_libdir" = /usr/lib ; then
7217 elif test -d "$cf_add_libdir"
7220 if test -n "$LDFLAGS$LIBS" ; then
7221 # a loop is needed to ensure we can add subdirs of existing dirs
7222 for cf_test_libdir in $LDFLAGS $LIBS ; do
7223 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7224 cf_have_libdir=yes; break
7228 if test "$cf_have_libdir" = no ; then
7229 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7231 echo "${as_me:-configure}:7231: testing adding $cf_add_libdir to library-path ..." 1>&5
7233 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7243 if test -n "/lib" ; then
7244 for cf_add_libdir in /lib
7246 if test "$cf_add_libdir" = /usr/lib ; then
7248 elif test -d "$cf_add_libdir"
7251 if test -n "$LDFLAGS$LIBS" ; then
7252 # a loop is needed to ensure we can add subdirs of existing dirs
7253 for cf_test_libdir in $LDFLAGS $LIBS ; do
7254 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7255 cf_have_libdir=yes; break
7259 if test "$cf_have_libdir" = no ; then
7260 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7262 echo "${as_me:-configure}:7262: testing adding $cf_add_libdir to library-path ..." 1>&5
7264 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7274 if test "x$cf_cv_screen" = "xcurses_5lib"
7276 if test -d /usr/5lib ; then
7278 if test -n "/usr/5lib" ; then
7279 for cf_add_libdir in /usr/5lib
7281 if test "$cf_add_libdir" = /usr/lib ; then
7283 elif test -d "$cf_add_libdir"
7286 if test -n "$LDFLAGS$LIBS" ; then
7287 # a loop is needed to ensure we can add subdirs of existing dirs
7288 for cf_test_libdir in $LDFLAGS $LIBS ; do
7289 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7290 cf_have_libdir=yes; break
7294 if test "$cf_have_libdir" = no ; then
7295 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7297 echo "${as_me:-configure}:7297: testing adding $cf_add_libdir to library-path ..." 1>&5
7299 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7308 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7310 for cf_add_1lib in $cf_add_0lib; do
7311 for cf_add_2lib in $cf_add_libs; do
7312 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7317 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7323 ac_cv_func_initscr=yes
7327 if test ".$ac_cv_func_initscr" != .yes ; then
7328 cf_save_LIBS="$LIBS"
7330 if test ".${cf_cv_ncurses_version:-no}" != .no
7332 cf_check_list="ncurses curses cursesX"
7334 cf_check_list="cursesX curses ncurses"
7337 # Check for library containing tgoto. Do this before curses library
7338 # because it may be needed to link the test-case for initscr.
7339 if test "x$cf_term_lib" = x
7341 echo "$as_me:7341: checking for tgoto" >&5
7342 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7343 if test "${ac_cv_func_tgoto+set}" = set; then
7344 echo $ECHO_N "(cached) $ECHO_C" >&6
7346 cat >"conftest.$ac_ext" <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7349 #define tgoto autoconf_temporary
7350 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7357 /* We use char because int might match the return type of a gcc2
7358 builtin and then its argument prototype would still apply. */
7365 /* The GNU C library defines stubs for functions which it implements
7366 to always fail with ENOSYS. Some functions are actually named
7367 something starting with __ and the normal name is an alias. */
7368 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7369 #error found stub for tgoto
7377 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7378 if { (eval echo "$as_me:7378: \"$ac_link\"") >&5
7379 (eval $ac_link) 2>&5
7381 echo "$as_me:7381: \$? = $ac_status" >&5
7382 (exit "$ac_status"); } &&
7383 { ac_try='test -s "conftest$ac_exeext"'
7384 { (eval echo "$as_me:7384: \"$ac_try\"") >&5
7387 echo "$as_me:7387: \$? = $ac_status" >&5
7388 (exit "$ac_status"); }; }; then
7389 ac_cv_func_tgoto=yes
7391 echo "$as_me: failed program was:" >&5
7392 cat "conftest.$ac_ext" >&5
7395 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7397 echo "$as_me:7397: result: $ac_cv_func_tgoto" >&5
7398 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7399 if test "$ac_cv_func_tgoto" = yes; then
7400 cf_term_lib=predefined
7403 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7405 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7406 echo "$as_me:7406: checking for tgoto in -l$cf_term_lib" >&5
7407 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7408 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7409 echo $ECHO_N "(cached) $ECHO_C" >&6
7411 ac_check_lib_save_LIBS=$LIBS
7412 LIBS="-l$cf_term_lib $LIBS"
7413 cat >"conftest.$ac_ext" <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7417 /* Override any gcc2 internal prototype to avoid an error. */
7421 /* We use char because int might match the return type of a gcc2
7422 builtin and then its argument prototype would still apply. */
7432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7433 if { (eval echo "$as_me:7433: \"$ac_link\"") >&5
7434 (eval $ac_link) 2>&5
7436 echo "$as_me:7436: \$? = $ac_status" >&5
7437 (exit "$ac_status"); } &&
7438 { ac_try='test -s "conftest$ac_exeext"'
7439 { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7442 echo "$as_me:7442: \$? = $ac_status" >&5
7443 (exit "$ac_status"); }; }; then
7444 eval "$as_ac_Lib=yes"
7446 echo "$as_me: failed program was:" >&5
7447 cat "conftest.$ac_ext" >&5
7448 eval "$as_ac_Lib=no"
7450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7451 LIBS=$ac_check_lib_save_LIBS
7453 echo "$as_me:7453: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7454 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7455 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7457 : "${cf_nculib_root:=$cf_term_lib}"
7468 # Check for library containing initscr
7469 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7470 if test "x$cf_curs_lib" = x
7472 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7474 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7475 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7476 echo "$as_me:7476: checking if we can link with $cf_curs_lib library" >&5
7477 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7478 cat >"conftest.$ac_ext" <<_ACEOF
7479 #line 7479 "configure"
7480 #include "confdefs.h"
7481 #include <${cf_cv_ncurses_header:-curses.h}>
7490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7491 if { (eval echo "$as_me:7491: \"$ac_link\"") >&5
7492 (eval $ac_link) 2>&5
7494 echo "$as_me:7494: \$? = $ac_status" >&5
7495 (exit "$ac_status"); } &&
7496 { ac_try='test -s "conftest$ac_exeext"'
7497 { (eval echo "$as_me:7497: \"$ac_try\"") >&5
7500 echo "$as_me:7500: \$? = $ac_status" >&5
7501 (exit "$ac_status"); }; }; then
7504 echo "$as_me: failed program was:" >&5
7505 cat "conftest.$ac_ext" >&5
7508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7509 echo "$as_me:7509: result: $cf_result" >&5
7510 echo "${ECHO_T}$cf_result" >&6
7511 test "$cf_result" = yes && break
7512 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7514 elif test "$cf_term_lib" != predefined ; then
7515 echo "$as_me:7515: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7516 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7517 cat >"conftest.$ac_ext" <<_ACEOF
7518 #line 7518 "configure"
7519 #include "confdefs.h"
7520 #include <${cf_cv_ncurses_header:-curses.h}>
7524 initscr(); endwin();
7529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7530 if { (eval echo "$as_me:7530: \"$ac_link\"") >&5
7531 (eval $ac_link) 2>&5
7533 echo "$as_me:7533: \$? = $ac_status" >&5
7534 (exit "$ac_status"); } &&
7535 { ac_try='test -s "conftest$ac_exeext"'
7536 { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7539 echo "$as_me:7539: \$? = $ac_status" >&5
7540 (exit "$ac_status"); }; }; then
7543 echo "$as_me: failed program was:" >&5
7544 cat "conftest.$ac_ext" >&5
7546 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7547 cat >"conftest.$ac_ext" <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 #include <${cf_cv_ncurses_header:-curses.h}>
7559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7560 if { (eval echo "$as_me:7560: \"$ac_link\"") >&5
7561 (eval $ac_link) 2>&5
7563 echo "$as_me:7563: \$? = $ac_status" >&5
7564 (exit "$ac_status"); } &&
7565 { ac_try='test -s "conftest$ac_exeext"'
7566 { (eval echo "$as_me:7566: \"$ac_try\"") >&5
7569 echo "$as_me:7569: \$? = $ac_status" >&5
7570 (exit "$ac_status"); }; }; then
7573 echo "$as_me: failed program was:" >&5
7574 cat "conftest.$ac_ext" >&5
7577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7581 echo "$as_me:7581: result: $cf_result" >&5
7582 echo "${ECHO_T}$cf_result" >&6
7583 test "$cf_result" != error && break
7587 test "$cf_curs_lib" = unknown && { { echo "$as_me:7587: error: no curses library found" >&5
7588 echo "$as_me: error: no curses library found" >&2;}
7589 { (exit 1); exit 1; }; }
7596 for ac_header in wchar.h
7598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7599 echo "$as_me:7599: checking for $ac_header" >&5
7600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7602 echo $ECHO_N "(cached) $ECHO_C" >&6
7604 cat >"conftest.$ac_ext" <<_ACEOF
7605 #line 7605 "configure"
7606 #include "confdefs.h"
7607 #include <$ac_header>
7609 if { (eval echo "$as_me:7609: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7610 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7612 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7614 cat conftest.err >&5
7615 echo "$as_me:7615: \$? = $ac_status" >&5
7616 (exit "$ac_status"); } >/dev/null; then
7617 if test -s conftest.err; then
7618 ac_cpp_err=$ac_c_preproc_warn_flag
7625 if test -z "$ac_cpp_err"; then
7626 eval "$as_ac_Header=yes"
7628 echo "$as_me: failed program was:" >&5
7629 cat "conftest.$ac_ext" >&5
7630 eval "$as_ac_Header=no"
7632 rm -f conftest.err "conftest.$ac_ext"
7634 echo "$as_me:7634: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7635 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7636 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7637 cat >>confdefs.h <<EOF
7638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7644 echo "$as_me:7644: checking for multibyte character support" >&5
7645 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7646 if test "${cf_cv_utf8_lib+set}" = set; then
7647 echo $ECHO_N "(cached) $ECHO_C" >&6
7650 cf_save_LIBS="$LIBS"
7651 cat >"conftest.$ac_ext" <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7655 $ac_includes_default
7668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7669 if { (eval echo "$as_me:7669: \"$ac_link\"") >&5
7670 (eval $ac_link) 2>&5
7672 echo "$as_me:7672: \$? = $ac_status" >&5
7673 (exit "$ac_status"); } &&
7674 { ac_try='test -s "conftest$ac_exeext"'
7675 { (eval echo "$as_me:7675: \"$ac_try\"") >&5
7678 echo "$as_me:7678: \$? = $ac_status" >&5
7679 (exit "$ac_status"); }; }; then
7682 echo "$as_me: failed program was:" >&5
7683 cat "conftest.$ac_ext" >&5
7685 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7686 # will be set on completion of the AC_TRY_LINK below.
7687 cf_cv_header_path_utf8=
7688 cf_cv_library_path_utf8=
7690 echo "${as_me:-configure}:7690: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7692 cf_save_LIBS="$LIBS"
7694 cat >"conftest.$ac_ext" <<_ACEOF
7695 #line 7695 "configure"
7696 #include "confdefs.h"
7698 #include <libutf8.h>
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7708 if { (eval echo "$as_me:7708: \"$ac_link\"") >&5
7709 (eval $ac_link) 2>&5
7711 echo "$as_me:7711: \$? = $ac_status" >&5
7712 (exit "$ac_status"); } &&
7713 { ac_try='test -s "conftest$ac_exeext"'
7714 { (eval echo "$as_me:7714: \"$ac_try\"") >&5
7717 echo "$as_me:7717: \$? = $ac_status" >&5
7718 (exit "$ac_status"); }; }; then
7720 cf_cv_find_linkage_utf8=yes
7721 cf_cv_header_path_utf8=/usr/include
7722 cf_cv_library_path_utf8=/usr/lib
7725 echo "$as_me: failed program was:" >&5
7726 cat "conftest.$ac_ext" >&5
7728 LIBS="-lutf8 $cf_save_LIBS"
7730 cat >"conftest.$ac_ext" <<_ACEOF
7731 #line 7731 "configure"
7732 #include "confdefs.h"
7734 #include <libutf8.h>
7743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7744 if { (eval echo "$as_me:7744: \"$ac_link\"") >&5
7745 (eval $ac_link) 2>&5
7747 echo "$as_me:7747: \$? = $ac_status" >&5
7748 (exit "$ac_status"); } &&
7749 { ac_try='test -s "conftest$ac_exeext"'
7750 { (eval echo "$as_me:7750: \"$ac_try\"") >&5
7753 echo "$as_me:7753: \$? = $ac_status" >&5
7754 (exit "$ac_status"); }; }; then
7756 cf_cv_find_linkage_utf8=yes
7757 cf_cv_header_path_utf8=/usr/include
7758 cf_cv_library_path_utf8=/usr/lib
7759 cf_cv_library_file_utf8="-lutf8"
7762 echo "$as_me: failed program was:" >&5
7763 cat "conftest.$ac_ext" >&5
7765 cf_cv_find_linkage_utf8=no
7766 LIBS="$cf_save_LIBS"
7768 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7770 echo "${as_me:-configure}:7770: testing find linkage for utf8 library ..." 1>&5
7772 echo "${as_me:-configure}:7772: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7774 cf_save_CPPFLAGS="$CPPFLAGS"
7775 cf_test_CPPFLAGS="$CPPFLAGS"
7779 # collect the current set of include-directories from compiler flags
7780 cf_header_path_list=""
7781 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7782 for cf_header_path in $CPPFLAGS $CFLAGS
7784 case "$cf_header_path" in
7786 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7788 test "x$cf_header_path" != "xNONE" && \
7789 test -d "$cf_header_path" && \
7791 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7792 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7793 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7794 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7795 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7796 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7799 cf_header_path_list="$cf_header_path_list $cf_search"
7805 # add the variations for the package we are looking for
7809 test "x$prefix" != "xNONE" && \
7810 test -d "$prefix" && \
7812 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7813 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7814 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7815 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7816 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7817 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7820 for cf_subdir_prefix in \
7829 test "x$cf_subdir_prefix" != "x$prefix" && \
7830 test -d "$cf_subdir_prefix" && \
7831 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7832 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7833 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7834 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7835 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7836 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7837 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7842 test "$includedir" != NONE && \
7843 test "$includedir" != "/usr/include" && \
7844 test -d "$includedir" && {
7845 test -d "$includedir" && cf_search="$cf_search $includedir"
7846 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7849 test "$oldincludedir" != NONE && \
7850 test "$oldincludedir" != "/usr/include" && \
7851 test -d "$oldincludedir" && {
7852 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7853 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7856 cf_search="$cf_search $cf_header_path_list"
7858 for cf_cv_header_path_utf8 in $cf_search
7860 if test -d "$cf_cv_header_path_utf8" ; then
7861 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7863 echo "${as_me:-configure}:7863: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7865 CPPFLAGS="$cf_save_CPPFLAGS"
7867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7868 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7870 cat >"conftest.$ac_ext" <<_ACEOF
7871 #line 7871 "configure"
7872 #include "confdefs.h"
7874 #include <libutf8.h>
7883 rm -f "conftest.$ac_objext"
7884 if { (eval echo "$as_me:7884: \"$ac_compile\"") >&5
7885 (eval $ac_compile) 2>&5
7887 echo "$as_me:7887: \$? = $ac_status" >&5
7888 (exit "$ac_status"); } &&
7889 { ac_try='test -s "conftest.$ac_objext"'
7890 { (eval echo "$as_me:7890: \"$ac_try\"") >&5
7893 echo "$as_me:7893: \$? = $ac_status" >&5
7894 (exit "$ac_status"); }; }; then
7896 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7898 echo "${as_me:-configure}:7898: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7900 cf_cv_find_linkage_utf8=maybe
7901 cf_test_CPPFLAGS="$CPPFLAGS"
7904 echo "$as_me: failed program was:" >&5
7905 cat "conftest.$ac_ext" >&5
7907 CPPFLAGS="$cf_save_CPPFLAGS"
7910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7914 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7916 echo "${as_me:-configure}:7916: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7918 cf_save_LIBS="$LIBS"
7919 cf_save_LDFLAGS="$LDFLAGS"
7921 if test "$cf_cv_find_linkage_utf8" != yes ; then
7924 cf_library_path_list=""
7925 if test -n "${LDFLAGS}${LIBS}" ; then
7926 for cf_library_path in $LDFLAGS $LIBS
7928 case "$cf_library_path" in
7930 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7932 test "x$cf_library_path" != "xNONE" && \
7933 test -d "$cf_library_path" && \
7935 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7936 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7937 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7938 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7939 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7940 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7943 cf_library_path_list="$cf_library_path_list $cf_search"
7951 test "x$prefix" != "xNONE" && \
7952 test -d "$prefix" && \
7954 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7955 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7956 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7957 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7958 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7959 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7962 for cf_subdir_prefix in \
7971 test "x$cf_subdir_prefix" != "x$prefix" && \
7972 test -d "$cf_subdir_prefix" && \
7973 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7974 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7975 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7976 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7977 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7978 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7979 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7984 cf_search="$cf_library_path_list $cf_search"
7986 for cf_cv_library_path_utf8 in $cf_search
7988 if test -d "$cf_cv_library_path_utf8" ; then
7989 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7991 echo "${as_me:-configure}:7991: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7993 CPPFLAGS="$cf_test_CPPFLAGS"
7994 LIBS="-lutf8 $cf_save_LIBS"
7995 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7996 cat >"conftest.$ac_ext" <<_ACEOF
7997 #line 7997 "configure"
7998 #include "confdefs.h"
8000 #include <libutf8.h>
8009 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8010 if { (eval echo "$as_me:8010: \"$ac_link\"") >&5
8011 (eval $ac_link) 2>&5
8013 echo "$as_me:8013: \$? = $ac_status" >&5
8014 (exit "$ac_status"); } &&
8015 { ac_try='test -s "conftest$ac_exeext"'
8016 { (eval echo "$as_me:8016: \"$ac_try\"") >&5
8019 echo "$as_me:8019: \$? = $ac_status" >&5
8020 (exit "$ac_status"); }; }; then
8022 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8024 echo "${as_me:-configure}:8024: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8026 cf_cv_find_linkage_utf8=yes
8027 cf_cv_library_file_utf8="-lutf8"
8030 echo "$as_me: failed program was:" >&5
8031 cat "conftest.$ac_ext" >&5
8033 CPPFLAGS="$cf_save_CPPFLAGS"
8034 LIBS="$cf_save_LIBS"
8035 LDFLAGS="$cf_save_LDFLAGS"
8038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8041 CPPFLAGS="$cf_save_CPPFLAGS"
8042 LDFLAGS="$cf_save_LDFLAGS"
8046 cf_cv_find_linkage_utf8=no
8050 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8055 LIBS="$cf_save_LIBS"
8057 if test "$cf_cv_find_linkage_utf8" = yes ; then
8058 cf_cv_utf8_lib=add-on
8064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8066 echo "$as_me:8066: result: $cf_cv_utf8_lib" >&5
8067 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8069 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8071 if test "$cf_cv_utf8_lib" = "add-on" ; then
8073 cat >>confdefs.h <<\EOF
8074 #define HAVE_LIBUTF8_H 1
8077 if test -n "$cf_cv_header_path_utf8" ; then
8078 for cf_add_incdir in $cf_cv_header_path_utf8
8080 while test "$cf_add_incdir" != /usr/include
8082 if test -d "$cf_add_incdir"
8085 if test -n "$CFLAGS$CPPFLAGS" ; then
8086 # a loop is needed to ensure we can add subdirs of existing dirs
8087 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8088 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8089 cf_have_incdir=yes; break
8094 if test "$cf_have_incdir" = no ; then
8095 if test "$cf_add_incdir" = /usr/local/include ; then
8096 if test "$GCC" = yes
8098 cf_save_CPPFLAGS=$CPPFLAGS
8100 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8101 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8103 cat >"conftest.$ac_ext" <<_ACEOF
8104 #line 8104 "configure"
8105 #include "confdefs.h"
8115 rm -f "conftest.$ac_objext"
8116 if { (eval echo "$as_me:8116: \"$ac_compile\"") >&5
8117 (eval $ac_compile) 2>&5
8119 echo "$as_me:8119: \$? = $ac_status" >&5
8120 (exit "$ac_status"); } &&
8121 { ac_try='test -s "conftest.$ac_objext"'
8122 { (eval echo "$as_me:8122: \"$ac_try\"") >&5
8125 echo "$as_me:8125: \$? = $ac_status" >&5
8126 (exit "$ac_status"); }; }; then
8129 echo "$as_me: failed program was:" >&5
8130 cat "conftest.$ac_ext" >&5
8133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8134 CPPFLAGS=$cf_save_CPPFLAGS
8139 if test "$cf_have_incdir" = no ; then
8140 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8142 echo "${as_me:-configure}:8142: testing adding $cf_add_incdir to include-path ..." 1>&5
8144 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8146 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8147 test "$cf_top_incdir" = "$cf_add_incdir" && break
8148 cf_add_incdir="$cf_top_incdir"
8159 if test -n "$cf_cv_library_path_utf8" ; then
8160 for cf_add_libdir in $cf_cv_library_path_utf8
8162 if test "$cf_add_libdir" = /usr/lib ; then
8164 elif test -d "$cf_add_libdir"
8167 if test -n "$LDFLAGS$LIBS" ; then
8168 # a loop is needed to ensure we can add subdirs of existing dirs
8169 for cf_test_libdir in $LDFLAGS $LIBS ; do
8170 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8171 cf_have_libdir=yes; break
8175 if test "$cf_have_libdir" = no ; then
8176 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8178 echo "${as_me:-configure}:8178: testing adding $cf_add_libdir to library-path ..." 1>&5
8180 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8189 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8191 for cf_add_1lib in $cf_add_0lib; do
8192 for cf_add_2lib in $cf_add_libs; do
8193 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8198 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8204 cf_ncuconfig_root=$cf_cv_screen
8205 cf_have_ncuconfig=no
8207 if test "x${PKG_CONFIG:=none}" != xnone; then
8208 echo "$as_me:8208: checking pkg-config for $cf_ncuconfig_root" >&5
8209 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8210 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8211 echo "$as_me:8211: result: yes" >&5
8212 echo "${ECHO_T}yes" >&6
8214 echo "$as_me:8214: checking if the $cf_ncuconfig_root package files work" >&5
8215 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8216 cf_have_ncuconfig=unknown
8218 cf_save_CFLAGS="$CFLAGS"
8219 cf_save_CPPFLAGS="$CPPFLAGS"
8220 cf_save_LIBS="$LIBS"
8222 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8223 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8225 # while -W for passing linker flags is prevalent, it is not "standard".
8226 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8227 # incompatible _and_ non-standard -W option which gives an error. Work
8228 # around that pitfall.
8229 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8235 cf_new_extra_cppflags=
8237 for cf_add_cflags in $cf_pkg_cflags
8239 case "$cf_fix_cppflags" in
8241 case "$cf_add_cflags" in
8242 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8243 case "$cf_add_cflags" in
8245 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8247 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8248 && test -z "${cf_tst_cflags}" \
8249 && cf_fix_cppflags=yes
8251 if test "$cf_fix_cppflags" = yes ; then
8253 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8254 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8257 elif test "${cf_tst_cflags}" = "\"'" ; then
8259 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8260 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8270 case "$cf_add_cflags" in
8272 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8274 CPPFLAGS=`echo "$CPPFLAGS" | \
8275 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8276 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8281 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8282 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8289 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8290 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8297 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8298 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8300 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8302 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8303 && test -z "${cf_tst_cflags}" \
8304 && cf_fix_cppflags=no
8309 if test -n "$cf_new_cflags" ; then
8311 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8312 CFLAGS="${CFLAGS}$cf_new_cflags"
8316 if test -n "$cf_new_cppflags" ; then
8318 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8319 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8323 if test -n "$cf_new_extra_cppflags" ; then
8325 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8326 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8333 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8335 for cf_add_1lib in $cf_add_0lib; do
8336 for cf_add_2lib in $cf_add_libs; do
8337 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8342 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8346 cat >"conftest.$ac_ext" <<_ACEOF
8347 #line 8347 "configure"
8348 #include "confdefs.h"
8349 #include <${cf_cv_ncurses_header:-curses.h}>
8353 initscr(); mousemask(0,0); tigetstr((char *)0);
8358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8359 if { (eval echo "$as_me:8359: \"$ac_link\"") >&5
8360 (eval $ac_link) 2>&5
8362 echo "$as_me:8362: \$? = $ac_status" >&5
8363 (exit "$ac_status"); } &&
8364 { ac_try='test -s "conftest$ac_exeext"'
8365 { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8368 echo "$as_me:8368: \$? = $ac_status" >&5
8369 (exit "$ac_status"); }; }; then
8370 if test "$cross_compiling" = yes; then
8371 cf_test_ncuconfig=maybe
8373 cat >"conftest.$ac_ext" <<_ACEOF
8374 #line 8374 "configure"
8375 #include "confdefs.h"
8376 #include <${cf_cv_ncurses_header:-curses.h}>
8378 { const char *xx = curses_version(); return (xx == 0); }
8380 rm -f "conftest$ac_exeext"
8381 if { (eval echo "$as_me:8381: \"$ac_link\"") >&5
8382 (eval $ac_link) 2>&5
8384 echo "$as_me:8384: \$? = $ac_status" >&5
8385 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8386 { (eval echo "$as_me:8386: \"$ac_try\"") >&5
8389 echo "$as_me:8389: \$? = $ac_status" >&5
8390 (exit "$ac_status"); }; }; then
8391 cf_test_ncuconfig=yes
8393 echo "$as_me: program exited with status $ac_status" >&5
8394 echo "$as_me: failed program was:" >&5
8395 cat "conftest.$ac_ext" >&5
8396 cf_test_ncuconfig=no
8398 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8401 echo "$as_me: failed program was:" >&5
8402 cat "conftest.$ac_ext" >&5
8403 cf_test_ncuconfig=no
8405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8407 CFLAGS="$cf_save_CFLAGS"
8408 CPPFLAGS="$cf_save_CPPFLAGS"
8409 LIBS="$cf_save_LIBS"
8411 if test "x$cf_test_ncuconfig" != xyes; then
8412 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8413 cf_pkg_cflags="$cf_temp"
8414 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8415 cf_pkg_libs="$cf_temp"
8420 for cf_add_cflags in $cf_pkg_cflags
8422 case "x$cf_add_cflags" in
8425 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8428 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8429 test "$CFLAGS" != "$cf_old_cflag" || break
8431 CFLAGS="$cf_old_cflag"
8434 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8437 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8438 test "$CPPFLAGS" != "$cf_old_cflag" || break
8440 CPPFLAGS="$cf_old_cflag"
8449 cf_new_extra_cppflags=
8451 for cf_add_cflags in $cf_add_cflags
8453 case "$cf_fix_cppflags" in
8455 case "$cf_add_cflags" in
8456 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8457 case "$cf_add_cflags" in
8459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8462 && test -z "${cf_tst_cflags}" \
8463 && cf_fix_cppflags=yes
8465 if test "$cf_fix_cppflags" = yes ; then
8467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8471 elif test "${cf_tst_cflags}" = "\"'" ; then
8473 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8474 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8484 case "$cf_add_cflags" in
8486 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8488 CPPFLAGS=`echo "$CPPFLAGS" | \
8489 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8490 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8495 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8496 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8503 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8504 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8517 && test -z "${cf_tst_cflags}" \
8518 && cf_fix_cppflags=no
8523 if test -n "$cf_new_cflags" ; then
8525 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8526 CFLAGS="${CFLAGS}$cf_new_cflags"
8530 if test -n "$cf_new_cppflags" ; then
8532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8533 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8537 if test -n "$cf_new_extra_cppflags" ; then
8539 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8540 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8549 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8551 for cf_add_1lib in $cf_add_0lib; do
8552 for cf_add_2lib in $cf_add_libs; do
8553 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8562 cat >"conftest.$ac_ext" <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #include <${cf_cv_ncurses_header:-curses.h}>
8569 initscr(); mousemask(0,0); tigetstr((char *)0);
8574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8575 if { (eval echo "$as_me:8575: \"$ac_link\"") >&5
8576 (eval $ac_link) 2>&5
8578 echo "$as_me:8578: \$? = $ac_status" >&5
8579 (exit "$ac_status"); } &&
8580 { ac_try='test -s "conftest$ac_exeext"'
8581 { (eval echo "$as_me:8581: \"$ac_try\"") >&5
8584 echo "$as_me:8584: \$? = $ac_status" >&5
8585 (exit "$ac_status"); }; }; then
8586 if test "$cross_compiling" = yes; then
8587 cf_have_ncuconfig=maybe
8589 cat >"conftest.$ac_ext" <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8592 #include <${cf_cv_ncurses_header:-curses.h}>
8594 { const char *xx = curses_version(); return (xx == 0); }
8596 rm -f "conftest$ac_exeext"
8597 if { (eval echo "$as_me:8597: \"$ac_link\"") >&5
8598 (eval $ac_link) 2>&5
8600 echo "$as_me:8600: \$? = $ac_status" >&5
8601 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8602 { (eval echo "$as_me:8602: \"$ac_try\"") >&5
8605 echo "$as_me:8605: \$? = $ac_status" >&5
8606 (exit "$ac_status"); }; }; then
8607 cf_have_ncuconfig=yes
8609 echo "$as_me: program exited with status $ac_status" >&5
8610 echo "$as_me: failed program was:" >&5
8611 cat "conftest.$ac_ext" >&5
8612 cf_have_ncuconfig=no
8614 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8617 echo "$as_me: failed program was:" >&5
8618 cat "conftest.$ac_ext" >&5
8619 cf_have_ncuconfig=no
8621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8622 echo "$as_me:8622: result: $cf_have_ncuconfig" >&5
8623 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8624 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8625 if test "$cf_have_ncuconfig" != "yes"
8627 CPPFLAGS="$cf_save_CPPFLAGS"
8628 LIBS="$cf_save_LIBS"
8629 NCURSES_CONFIG_PKG=none
8632 cat >>confdefs.h <<\EOF
8636 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8638 echo "$as_me:8638: checking for terminfo header" >&5
8639 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8640 if test "${cf_cv_term_header+set}" = set; then
8641 echo $ECHO_N "(cached) $ECHO_C" >&6
8644 case "${cf_cv_ncurses_header}" in
8645 (*/ncurses.h|*/ncursesw.h)
8646 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8649 cf_term_header=term.h
8653 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8655 cat >"conftest.$ac_ext" <<_ACEOF
8656 #line 8656 "configure"
8657 #include "confdefs.h"
8659 #include <${cf_cv_ncurses_header:-curses.h}>
8665 int x = auto_left_margin; (void)x
8670 rm -f "conftest.$ac_objext"
8671 if { (eval echo "$as_me:8671: \"$ac_compile\"") >&5
8672 (eval $ac_compile) 2>&5
8674 echo "$as_me:8674: \$? = $ac_status" >&5
8675 (exit "$ac_status"); } &&
8676 { ac_try='test -s "conftest.$ac_objext"'
8677 { (eval echo "$as_me:8677: \"$ac_try\"") >&5
8680 echo "$as_me:8680: \$? = $ac_status" >&5
8681 (exit "$ac_status"); }; }; then
8683 cf_cv_term_header="$cf_test"
8685 echo "$as_me: failed program was:" >&5
8686 cat "conftest.$ac_ext" >&5
8688 cf_cv_term_header=unknown
8691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8692 test "$cf_cv_term_header" != unknown && break
8696 echo "$as_me:8696: result: $cf_cv_term_header" >&5
8697 echo "${ECHO_T}$cf_cv_term_header" >&6
8699 # Set definitions to allow ifdef'ing to accommodate subdirectories
8701 case "$cf_cv_term_header" in
8704 cat >>confdefs.h <<\EOF
8705 #define HAVE_TERM_H 1
8711 case "$cf_cv_term_header" in
8714 cat >>confdefs.h <<\EOF
8715 #define HAVE_NCURSES_TERM_H 1
8721 cat >>confdefs.h <<\EOF
8722 #define HAVE_NCURSESW_TERM_H 1
8731 echo "$as_me:8731: result: no" >&5
8732 echo "${ECHO_T}no" >&6
8733 NCURSES_CONFIG_PKG=none
8736 NCURSES_CONFIG_PKG=none
8739 if test "x$cf_have_ncuconfig" = "xno"; then
8740 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8742 if test -n "$ac_tool_prefix"; then
8743 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8745 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8746 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8747 echo "$as_me:8747: checking for $ac_word" >&5
8748 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8749 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8752 if test -n "$NCURSES_CONFIG"; then
8753 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8755 ac_save_IFS=$IFS; IFS=$ac_path_separator
8757 for ac_dir in $ac_dummy; do
8759 test -z "$ac_dir" && ac_dir=.
8760 $as_executable_p "$ac_dir/$ac_word" || continue
8761 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8762 echo "$as_me:8762: found $ac_dir/$ac_word" >&5
8768 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8769 if test -n "$NCURSES_CONFIG"; then
8770 echo "$as_me:8770: result: $NCURSES_CONFIG" >&5
8771 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8773 echo "$as_me:8773: result: no" >&5
8774 echo "${ECHO_T}no" >&6
8777 test -n "$NCURSES_CONFIG" && break
8780 if test -z "$NCURSES_CONFIG"; then
8781 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8782 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8784 # Extract the first word of "$ac_prog", so it can be a program name with args.
8785 set dummy $ac_prog; ac_word=$2
8786 echo "$as_me:8786: checking for $ac_word" >&5
8787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8788 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8789 echo $ECHO_N "(cached) $ECHO_C" >&6
8791 if test -n "$ac_ct_NCURSES_CONFIG"; then
8792 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8794 ac_save_IFS=$IFS; IFS=$ac_path_separator
8796 for ac_dir in $ac_dummy; do
8798 test -z "$ac_dir" && ac_dir=.
8799 $as_executable_p "$ac_dir/$ac_word" || continue
8800 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8801 echo "$as_me:8801: found $ac_dir/$ac_word" >&5
8807 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8808 if test -n "$ac_ct_NCURSES_CONFIG"; then
8809 echo "$as_me:8809: result: $ac_ct_NCURSES_CONFIG" >&5
8810 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8812 echo "$as_me:8812: result: no" >&5
8813 echo "${ECHO_T}no" >&6
8816 test -n "$ac_ct_NCURSES_CONFIG" && break
8818 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8820 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8823 if test "$NCURSES_CONFIG" != none ; then
8825 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8827 case "x$cf_add_cflags" in
8830 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8833 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8834 test "$CFLAGS" != "$cf_old_cflag" || break
8836 CFLAGS="$cf_old_cflag"
8839 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8842 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8843 test "$CPPFLAGS" != "$cf_old_cflag" || break
8845 CPPFLAGS="$cf_old_cflag"
8854 cf_new_extra_cppflags=
8856 for cf_add_cflags in $cf_add_cflags
8858 case "$cf_fix_cppflags" in
8860 case "$cf_add_cflags" in
8861 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8862 case "$cf_add_cflags" in
8864 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8866 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8867 && test -z "${cf_tst_cflags}" \
8868 && cf_fix_cppflags=yes
8870 if test "$cf_fix_cppflags" = yes ; then
8872 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8873 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8876 elif test "${cf_tst_cflags}" = "\"'" ; then
8878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8889 case "$cf_add_cflags" in
8891 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8893 CPPFLAGS=`echo "$CPPFLAGS" | \
8894 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8895 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8900 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8901 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8908 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8909 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8916 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8917 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8919 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8921 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8922 && test -z "${cf_tst_cflags}" \
8923 && cf_fix_cppflags=no
8928 if test -n "$cf_new_cflags" ; then
8930 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8931 CFLAGS="${CFLAGS}$cf_new_cflags"
8935 if test -n "$cf_new_cppflags" ; then
8937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8938 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8942 if test -n "$cf_new_extra_cppflags" ; then
8944 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8945 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8954 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8956 for cf_add_1lib in $cf_add_0lib; do
8957 for cf_add_2lib in $cf_add_libs; do
8958 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8963 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8967 # even with config script, some packages use no-override for curses.h
8969 echo "$as_me:8969: checking if we have identified curses headers" >&5
8970 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8971 if test "${cf_cv_ncurses_header+set}" = set; then
8972 echo $ECHO_N "(cached) $ECHO_C" >&6
8975 cf_cv_ncurses_header=none
8977 ncurses.h $cf_cv_screen/ncurses.h \
8978 curses.h $cf_cv_screen/curses.h
8980 cat >"conftest.$ac_ext" <<_ACEOF
8981 #line 8981 "configure"
8982 #include "confdefs.h"
8983 #include <${cf_header}>
8992 rm -f "conftest.$ac_objext"
8993 if { (eval echo "$as_me:8993: \"$ac_compile\"") >&5
8994 (eval $ac_compile) 2>&5
8996 echo "$as_me:8996: \$? = $ac_status" >&5
8997 (exit "$ac_status"); } &&
8998 { ac_try='test -s "conftest.$ac_objext"'
8999 { (eval echo "$as_me:8999: \"$ac_try\"") >&5
9002 echo "$as_me:9002: \$? = $ac_status" >&5
9003 (exit "$ac_status"); }; }; then
9004 cf_cv_ncurses_header=$cf_header; break
9006 echo "$as_me: failed program was:" >&5
9007 cat "conftest.$ac_ext" >&5
9009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9013 echo "$as_me:9013: result: $cf_cv_ncurses_header" >&5
9014 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9016 if test "$cf_cv_ncurses_header" = none ; then
9017 { { echo "$as_me:9017: error: No curses header-files found" >&5
9018 echo "$as_me: error: No curses header-files found" >&2;}
9019 { (exit 1); exit 1; }; }
9022 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9024 for ac_header in $cf_cv_ncurses_header
9026 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9027 echo "$as_me:9027: checking for $ac_header" >&5
9028 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9030 echo $ECHO_N "(cached) $ECHO_C" >&6
9032 cat >"conftest.$ac_ext" <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035 #include <$ac_header>
9037 if { (eval echo "$as_me:9037: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9038 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9040 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9042 cat conftest.err >&5
9043 echo "$as_me:9043: \$? = $ac_status" >&5
9044 (exit "$ac_status"); } >/dev/null; then
9045 if test -s conftest.err; then
9046 ac_cpp_err=$ac_c_preproc_warn_flag
9053 if test -z "$ac_cpp_err"; then
9054 eval "$as_ac_Header=yes"
9056 echo "$as_me: failed program was:" >&5
9057 cat "conftest.$ac_ext" >&5
9058 eval "$as_ac_Header=no"
9060 rm -f conftest.err "conftest.$ac_ext"
9062 echo "$as_me:9062: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9063 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9064 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9065 cat >>confdefs.h <<EOF
9066 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9072 cat >>confdefs.h <<\EOF
9076 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9078 cat >>confdefs.h <<EOF
9079 #define $cf_nculib_ROOT 1
9082 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9086 cf_ncuhdr_root=$cf_cv_screen
9088 test -n "$cf_cv_curses_dir" && \
9089 test "$cf_cv_curses_dir" != "no" && { \
9091 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9092 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9094 while test "$cf_add_incdir" != /usr/include
9096 if test -d "$cf_add_incdir"
9099 if test -n "$CFLAGS$CPPFLAGS" ; then
9100 # a loop is needed to ensure we can add subdirs of existing dirs
9101 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9102 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9103 cf_have_incdir=yes; break
9108 if test "$cf_have_incdir" = no ; then
9109 if test "$cf_add_incdir" = /usr/local/include ; then
9110 if test "$GCC" = yes
9112 cf_save_CPPFLAGS=$CPPFLAGS
9114 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9115 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9117 cat >"conftest.$ac_ext" <<_ACEOF
9118 #line 9118 "configure"
9119 #include "confdefs.h"
9129 rm -f "conftest.$ac_objext"
9130 if { (eval echo "$as_me:9130: \"$ac_compile\"") >&5
9131 (eval $ac_compile) 2>&5
9133 echo "$as_me:9133: \$? = $ac_status" >&5
9134 (exit "$ac_status"); } &&
9135 { ac_try='test -s "conftest.$ac_objext"'
9136 { (eval echo "$as_me:9136: \"$ac_try\"") >&5
9139 echo "$as_me:9139: \$? = $ac_status" >&5
9140 (exit "$ac_status"); }; }; then
9143 echo "$as_me: failed program was:" >&5
9144 cat "conftest.$ac_ext" >&5
9147 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9148 CPPFLAGS=$cf_save_CPPFLAGS
9153 if test "$cf_have_incdir" = no ; then
9154 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9156 echo "${as_me:-configure}:9156: testing adding $cf_add_incdir to include-path ..." 1>&5
9158 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9160 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9161 test "$cf_top_incdir" = "$cf_add_incdir" && break
9162 cf_add_incdir="$cf_top_incdir"
9175 echo "$as_me:9175: checking for $cf_ncuhdr_root header in include-path" >&5
9176 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9177 if test "${cf_cv_ncurses_h+set}" = set; then
9178 echo $ECHO_N "(cached) $ECHO_C" >&6
9181 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9182 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9183 for cf_header in $cf_header_list
9186 cat >"conftest.$ac_ext" <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9190 #include <$cf_header>
9195 #ifdef NCURSES_VERSION
9197 printf("%s\\n", NCURSES_VERSION);
9210 rm -f "conftest.$ac_objext"
9211 if { (eval echo "$as_me:9211: \"$ac_compile\"") >&5
9212 (eval $ac_compile) 2>&5
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit "$ac_status"); } &&
9216 { ac_try='test -s "conftest.$ac_objext"'
9217 { (eval echo "$as_me:9217: \"$ac_try\"") >&5
9220 echo "$as_me:9220: \$? = $ac_status" >&5
9221 (exit "$ac_status"); }; }; then
9222 cf_cv_ncurses_h=$cf_header
9225 echo "$as_me: failed program was:" >&5
9226 cat "conftest.$ac_ext" >&5
9229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9231 test "$cf_cv_ncurses_h" != no && break
9235 echo "$as_me:9235: result: $cf_cv_ncurses_h" >&5
9236 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9238 if test "$cf_cv_ncurses_h" != no ; then
9239 cf_cv_ncurses_header=$cf_cv_ncurses_h
9242 echo "$as_me:9242: checking for $cf_ncuhdr_root include-path" >&5
9243 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9244 if test "${cf_cv_ncurses_h2+set}" = set; then
9245 echo $ECHO_N "(cached) $ECHO_C" >&6
9248 test -n "$verbose" && echo
9252 # collect the current set of include-directories from compiler flags
9253 cf_header_path_list=""
9254 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9255 for cf_header_path in $CPPFLAGS $CFLAGS
9257 case "$cf_header_path" in
9259 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9261 test "x$cf_header_path" != "xNONE" && \
9262 test -d "$cf_header_path" && \
9264 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9265 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9266 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9267 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9268 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9269 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"
9272 cf_header_path_list="$cf_header_path_list $cf_search"
9278 # add the variations for the package we are looking for
9282 test "x$prefix" != "xNONE" && \
9283 test -d "$prefix" && \
9285 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9286 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9287 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9288 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9289 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9290 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9293 for cf_subdir_prefix in \
9302 test "x$cf_subdir_prefix" != "x$prefix" && \
9303 test -d "$cf_subdir_prefix" && \
9304 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9305 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9306 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9307 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9308 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9309 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9310 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"
9315 test "$includedir" != NONE && \
9316 test "$includedir" != "/usr/include" && \
9317 test -d "$includedir" && {
9318 test -d "$includedir" && cf_search="$cf_search $includedir"
9319 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9322 test "$oldincludedir" != NONE && \
9323 test "$oldincludedir" != "/usr/include" && \
9324 test -d "$oldincludedir" && {
9325 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9326 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9329 cf_search="$cf_search $cf_header_path_list"
9331 test -n "$verbose" && echo "search path $cf_search"
9332 cf_save2_CPPFLAGS="$CPPFLAGS"
9333 for cf_incdir in $cf_search
9336 if test -n "$cf_incdir" ; then
9337 for cf_add_incdir in $cf_incdir
9339 while test "$cf_add_incdir" != /usr/include
9341 if test -d "$cf_add_incdir"
9344 if test -n "$CFLAGS$CPPFLAGS" ; then
9345 # a loop is needed to ensure we can add subdirs of existing dirs
9346 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9347 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9348 cf_have_incdir=yes; break
9353 if test "$cf_have_incdir" = no ; then
9354 if test "$cf_add_incdir" = /usr/local/include ; then
9355 if test "$GCC" = yes
9357 cf_save_CPPFLAGS=$CPPFLAGS
9359 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9360 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9362 cat >"conftest.$ac_ext" <<_ACEOF
9363 #line 9363 "configure"
9364 #include "confdefs.h"
9374 rm -f "conftest.$ac_objext"
9375 if { (eval echo "$as_me:9375: \"$ac_compile\"") >&5
9376 (eval $ac_compile) 2>&5
9378 echo "$as_me:9378: \$? = $ac_status" >&5
9379 (exit "$ac_status"); } &&
9380 { ac_try='test -s "conftest.$ac_objext"'
9381 { (eval echo "$as_me:9381: \"$ac_try\"") >&5
9384 echo "$as_me:9384: \$? = $ac_status" >&5
9385 (exit "$ac_status"); }; }; then
9388 echo "$as_me: failed program was:" >&5
9389 cat "conftest.$ac_ext" >&5
9392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9393 CPPFLAGS=$cf_save_CPPFLAGS
9398 if test "$cf_have_incdir" = no ; then
9399 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9401 echo "${as_me:-configure}:9401: testing adding $cf_add_incdir to include-path ..." 1>&5
9403 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9405 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9406 test "$cf_top_incdir" = "$cf_add_incdir" && break
9407 cf_add_incdir="$cf_top_incdir"
9423 cat >"conftest.$ac_ext" <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9427 #include <$cf_header>
9432 #ifdef NCURSES_VERSION
9434 printf("%s\\n", NCURSES_VERSION);
9447 rm -f "conftest.$ac_objext"
9448 if { (eval echo "$as_me:9448: \"$ac_compile\"") >&5
9449 (eval $ac_compile) 2>&5
9451 echo "$as_me:9451: \$? = $ac_status" >&5
9452 (exit "$ac_status"); } &&
9453 { ac_try='test -s "conftest.$ac_objext"'
9454 { (eval echo "$as_me:9454: \"$ac_try\"") >&5
9457 echo "$as_me:9457: \$? = $ac_status" >&5
9458 (exit "$ac_status"); }; }; then
9459 cf_cv_ncurses_h2=$cf_header
9462 echo "$as_me: failed program was:" >&5
9463 cat "conftest.$ac_ext" >&5
9466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9468 if test "$cf_cv_ncurses_h2" != no ; then
9469 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9470 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9473 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9475 CPPFLAGS="$cf_save2_CPPFLAGS"
9476 test "$cf_cv_ncurses_h2" != no && break
9478 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9478: error: not found" >&5
9479 echo "$as_me: error: not found" >&2;}
9480 { (exit 1); exit 1; }; }
9483 echo "$as_me:9483: result: $cf_cv_ncurses_h2" >&5
9484 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9486 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9487 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9488 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9489 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9492 if test -n "$cf_1st_incdir" ; then
9493 for cf_add_incdir in $cf_1st_incdir
9495 while test "$cf_add_incdir" != /usr/include
9497 if test -d "$cf_add_incdir"
9500 if test -n "$CFLAGS$CPPFLAGS" ; then
9501 # a loop is needed to ensure we can add subdirs of existing dirs
9502 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9503 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9504 cf_have_incdir=yes; break
9509 if test "$cf_have_incdir" = no ; then
9510 if test "$cf_add_incdir" = /usr/local/include ; then
9511 if test "$GCC" = yes
9513 cf_save_CPPFLAGS=$CPPFLAGS
9515 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9516 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9518 cat >"conftest.$ac_ext" <<_ACEOF
9519 #line 9519 "configure"
9520 #include "confdefs.h"
9530 rm -f "conftest.$ac_objext"
9531 if { (eval echo "$as_me:9531: \"$ac_compile\"") >&5
9532 (eval $ac_compile) 2>&5
9534 echo "$as_me:9534: \$? = $ac_status" >&5
9535 (exit "$ac_status"); } &&
9536 { ac_try='test -s "conftest.$ac_objext"'
9537 { (eval echo "$as_me:9537: \"$ac_try\"") >&5
9540 echo "$as_me:9540: \$? = $ac_status" >&5
9541 (exit "$ac_status"); }; }; then
9544 echo "$as_me: failed program was:" >&5
9545 cat "conftest.$ac_ext" >&5
9548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9549 CPPFLAGS=$cf_save_CPPFLAGS
9554 if test "$cf_have_incdir" = no ; then
9555 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9557 echo "${as_me:-configure}:9557: testing adding $cf_add_incdir to include-path ..." 1>&5
9559 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9561 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9562 test "$cf_top_incdir" = "$cf_add_incdir" && break
9563 cf_add_incdir="$cf_top_incdir"
9576 # Set definitions to allow ifdef'ing for ncurses.h
9578 case "$cf_cv_ncurses_header" in
9581 cat >>confdefs.h <<\EOF
9582 #define HAVE_NCURSES_H 1
9588 case "$cf_cv_ncurses_header" in
9589 (ncurses/curses.h|ncurses/ncurses.h)
9591 cat >>confdefs.h <<\EOF
9592 #define HAVE_NCURSES_NCURSES_H 1
9596 (ncursesw/curses.h|ncursesw/ncurses.h)
9598 cat >>confdefs.h <<\EOF
9599 #define HAVE_NCURSESW_NCURSES_H 1
9605 echo "$as_me:9605: checking for terminfo header" >&5
9606 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9607 if test "${cf_cv_term_header+set}" = set; then
9608 echo $ECHO_N "(cached) $ECHO_C" >&6
9611 case "${cf_cv_ncurses_header}" in
9612 (*/ncurses.h|*/ncursesw.h)
9613 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9616 cf_term_header=term.h
9620 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9622 cat >"conftest.$ac_ext" <<_ACEOF
9623 #line 9623 "configure"
9624 #include "confdefs.h"
9626 #include <${cf_cv_ncurses_header:-curses.h}>
9632 int x = auto_left_margin; (void)x
9637 rm -f "conftest.$ac_objext"
9638 if { (eval echo "$as_me:9638: \"$ac_compile\"") >&5
9639 (eval $ac_compile) 2>&5
9641 echo "$as_me:9641: \$? = $ac_status" >&5
9642 (exit "$ac_status"); } &&
9643 { ac_try='test -s "conftest.$ac_objext"'
9644 { (eval echo "$as_me:9644: \"$ac_try\"") >&5
9647 echo "$as_me:9647: \$? = $ac_status" >&5
9648 (exit "$ac_status"); }; }; then
9650 cf_cv_term_header="$cf_test"
9652 echo "$as_me: failed program was:" >&5
9653 cat "conftest.$ac_ext" >&5
9655 cf_cv_term_header=unknown
9658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9659 test "$cf_cv_term_header" != unknown && break
9663 echo "$as_me:9663: result: $cf_cv_term_header" >&5
9664 echo "${ECHO_T}$cf_cv_term_header" >&6
9666 # Set definitions to allow ifdef'ing to accommodate subdirectories
9668 case "$cf_cv_term_header" in
9671 cat >>confdefs.h <<\EOF
9672 #define HAVE_TERM_H 1
9678 case "$cf_cv_term_header" in
9681 cat >>confdefs.h <<\EOF
9682 #define HAVE_NCURSES_TERM_H 1
9688 cat >>confdefs.h <<\EOF
9689 #define HAVE_NCURSESW_TERM_H 1
9695 # some applications need this, but should check for NCURSES_VERSION
9697 cat >>confdefs.h <<\EOF
9701 echo "$as_me:9701: checking for ncurses version" >&5
9702 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9703 if test "${cf_cv_ncurses_version+set}" = set; then
9704 echo $ECHO_N "(cached) $ECHO_C" >&6
9707 cf_cv_ncurses_version=no
9709 rm -f "$cf_tempfile"
9710 if test "$cross_compiling" = yes; then
9712 # This will not work if the preprocessor splits the line after the
9713 # Autoconf token. The 'unproto' program does that.
9714 cat > "conftest.$ac_ext" <<EOF
9715 #include <${cf_cv_ncurses_header:-curses.h}>
9717 #ifdef NCURSES_VERSION
9718 Autoconf NCURSES_VERSION
9726 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9727 { (eval echo "$as_me:9727: \"$cf_try\"") >&5
9730 echo "$as_me:9730: \$? = $ac_status" >&5
9731 (exit "$ac_status"); }
9732 if test -f conftest.out ; then
9733 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9734 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9739 cat >"conftest.$ac_ext" <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9743 $ac_includes_default
9745 #include <${cf_cv_ncurses_header:-curses.h}>
9749 FILE *fp = fopen("$cf_tempfile", "w");
9750 #ifdef NCURSES_VERSION
9751 # ifdef NCURSES_VERSION_PATCH
9752 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9754 fprintf(fp, "%s\\n", NCURSES_VERSION);
9758 fprintf(fp, "old\\n");
9763 ${cf_cv_main_return:-return}(0);
9766 rm -f "conftest$ac_exeext"
9767 if { (eval echo "$as_me:9767: \"$ac_link\"") >&5
9768 (eval $ac_link) 2>&5
9770 echo "$as_me:9770: \$? = $ac_status" >&5
9771 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9772 { (eval echo "$as_me:9772: \"$ac_try\"") >&5
9775 echo "$as_me:9775: \$? = $ac_status" >&5
9776 (exit "$ac_status"); }; }; then
9778 cf_cv_ncurses_version=`cat $cf_tempfile`
9780 echo "$as_me: program exited with status $ac_status" >&5
9781 echo "$as_me: failed program was:" >&5
9782 cat "conftest.$ac_ext" >&5
9784 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9786 rm -f "$cf_tempfile"
9789 echo "$as_me:9789: result: $cf_cv_ncurses_version" >&5
9790 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9791 test "$cf_cv_ncurses_version" = no ||
9792 cat >>confdefs.h <<\EOF
9796 cf_nculib_root=$cf_cv_screen
9797 # This works, except for the special case where we find gpm, but
9798 # ncurses is in a nonstandard location via $LIBS, and we really want
9801 cf_ncurses_SAVE="$LIBS"
9802 echo "$as_me:9802: checking for Gpm_Open in -lgpm" >&5
9803 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9804 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9805 echo $ECHO_N "(cached) $ECHO_C" >&6
9807 ac_check_lib_save_LIBS=$LIBS
9809 cat >"conftest.$ac_ext" <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9813 /* Override any gcc2 internal prototype to avoid an error. */
9817 /* We use char because int might match the return type of a gcc2
9818 builtin and then its argument prototype would still apply. */
9828 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9829 if { (eval echo "$as_me:9829: \"$ac_link\"") >&5
9830 (eval $ac_link) 2>&5
9832 echo "$as_me:9832: \$? = $ac_status" >&5
9833 (exit "$ac_status"); } &&
9834 { ac_try='test -s "conftest$ac_exeext"'
9835 { (eval echo "$as_me:9835: \"$ac_try\"") >&5
9838 echo "$as_me:9838: \$? = $ac_status" >&5
9839 (exit "$ac_status"); }; }; then
9840 ac_cv_lib_gpm_Gpm_Open=yes
9842 echo "$as_me: failed program was:" >&5
9843 cat "conftest.$ac_ext" >&5
9844 ac_cv_lib_gpm_Gpm_Open=no
9846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9847 LIBS=$ac_check_lib_save_LIBS
9849 echo "$as_me:9849: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9850 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9851 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9852 echo "$as_me:9852: checking for initscr in -lgpm" >&5
9853 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9854 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9855 echo $ECHO_N "(cached) $ECHO_C" >&6
9857 ac_check_lib_save_LIBS=$LIBS
9859 cat >"conftest.$ac_ext" <<_ACEOF
9860 #line 9860 "configure"
9861 #include "confdefs.h"
9863 /* Override any gcc2 internal prototype to avoid an error. */
9867 /* We use char because int might match the return type of a gcc2
9868 builtin and then its argument prototype would still apply. */
9878 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9879 if { (eval echo "$as_me:9879: \"$ac_link\"") >&5
9880 (eval $ac_link) 2>&5
9882 echo "$as_me:9882: \$? = $ac_status" >&5
9883 (exit "$ac_status"); } &&
9884 { ac_try='test -s "conftest$ac_exeext"'
9885 { (eval echo "$as_me:9885: \"$ac_try\"") >&5
9888 echo "$as_me:9888: \$? = $ac_status" >&5
9889 (exit "$ac_status"); }; }; then
9890 ac_cv_lib_gpm_initscr=yes
9892 echo "$as_me: failed program was:" >&5
9893 cat "conftest.$ac_ext" >&5
9894 ac_cv_lib_gpm_initscr=no
9896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9897 LIBS=$ac_check_lib_save_LIBS
9899 echo "$as_me:9899: result: $ac_cv_lib_gpm_initscr" >&5
9900 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9901 if test "$ac_cv_lib_gpm_initscr" = yes; then
9902 LIBS="$cf_ncurses_SAVE"
9904 cf_ncurses_LIBS="-lgpm"
9911 # This is only necessary if you are linking against an obsolete
9912 # version of ncurses (but it should do no harm, since it is static).
9913 if test "$cf_nculib_root" = ncurses ; then
9914 echo "$as_me:9914: checking for tgoto in -lmytinfo" >&5
9915 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9916 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9919 ac_check_lib_save_LIBS=$LIBS
9920 LIBS="-lmytinfo $LIBS"
9921 cat >"conftest.$ac_ext" <<_ACEOF
9922 #line 9922 "configure"
9923 #include "confdefs.h"
9925 /* Override any gcc2 internal prototype to avoid an error. */
9929 /* We use char because int might match the return type of a gcc2
9930 builtin and then its argument prototype would still apply. */
9940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9941 if { (eval echo "$as_me:9941: \"$ac_link\"") >&5
9942 (eval $ac_link) 2>&5
9944 echo "$as_me:9944: \$? = $ac_status" >&5
9945 (exit "$ac_status"); } &&
9946 { ac_try='test -s "conftest$ac_exeext"'
9947 { (eval echo "$as_me:9947: \"$ac_try\"") >&5
9950 echo "$as_me:9950: \$? = $ac_status" >&5
9951 (exit "$ac_status"); }; }; then
9952 ac_cv_lib_mytinfo_tgoto=yes
9954 echo "$as_me: failed program was:" >&5
9955 cat "conftest.$ac_ext" >&5
9956 ac_cv_lib_mytinfo_tgoto=no
9958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9959 LIBS=$ac_check_lib_save_LIBS
9961 echo "$as_me:9961: result: $ac_cv_lib_mytinfo_tgoto" >&5
9962 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9963 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9964 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9974 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9976 for cf_add_1lib in $cf_add_0lib; do
9977 for cf_add_2lib in $cf_add_libs; do
9978 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9987 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9993 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9995 for cf_add_1lib in $cf_add_0lib; do
9996 for cf_add_2lib in $cf_add_libs; do
9997 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10002 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10004 LIBS="$cf_add_libs"
10008 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10010 echo "$as_me:10010: checking for initscr" >&5
10011 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10012 if test "${ac_cv_func_initscr+set}" = set; then
10013 echo $ECHO_N "(cached) $ECHO_C" >&6
10015 cat >"conftest.$ac_ext" <<_ACEOF
10016 #line 10016 "configure"
10017 #include "confdefs.h"
10018 #define initscr autoconf_temporary
10019 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10026 /* We use char because int might match the return type of a gcc2
10027 builtin and then its argument prototype would still apply. */
10028 char initscr (void);
10034 /* The GNU C library defines stubs for functions which it implements
10035 to always fail with ENOSYS. Some functions are actually named
10036 something starting with __ and the normal name is an alias. */
10037 #if defined (__stub_initscr) || defined (__stub___initscr)
10038 #error found stub for initscr
10046 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10047 if { (eval echo "$as_me:10047: \"$ac_link\"") >&5
10048 (eval $ac_link) 2>&5
10050 echo "$as_me:10050: \$? = $ac_status" >&5
10051 (exit "$ac_status"); } &&
10052 { ac_try='test -s "conftest$ac_exeext"'
10053 { (eval echo "$as_me:10053: \"$ac_try\"") >&5
10054 (eval $ac_try) 2>&5
10056 echo "$as_me:10056: \$? = $ac_status" >&5
10057 (exit "$ac_status"); }; }; then
10058 ac_cv_func_initscr=yes
10060 echo "$as_me: failed program was:" >&5
10061 cat "conftest.$ac_ext" >&5
10062 ac_cv_func_initscr=no
10064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066 echo "$as_me:10066: result: $ac_cv_func_initscr" >&5
10067 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10068 if test "$ac_cv_func_initscr" = yes; then
10069 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10072 cf_save_LIBS="$LIBS"
10073 echo "$as_me:10073: checking for initscr in -l$cf_nculib_root" >&5
10074 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10075 LIBS="-l$cf_nculib_root $LIBS"
10076 cat >"conftest.$ac_ext" <<_ACEOF
10077 #line 10077 "configure"
10078 #include "confdefs.h"
10079 #include <${cf_cv_ncurses_header:-curses.h}>
10088 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10089 if { (eval echo "$as_me:10089: \"$ac_link\"") >&5
10090 (eval $ac_link) 2>&5
10092 echo "$as_me:10092: \$? = $ac_status" >&5
10093 (exit "$ac_status"); } &&
10094 { ac_try='test -s "conftest$ac_exeext"'
10095 { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10098 echo "$as_me:10098: \$? = $ac_status" >&5
10099 (exit "$ac_status"); }; }; then
10100 echo "$as_me:10100: result: yes" >&5
10101 echo "${ECHO_T}yes" >&6
10102 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10105 echo "$as_me: failed program was:" >&5
10106 cat "conftest.$ac_ext" >&5
10107 echo "$as_me:10107: result: no" >&5
10108 echo "${ECHO_T}no" >&6
10111 cf_library_path_list=""
10112 if test -n "${LDFLAGS}${LIBS}" ; then
10113 for cf_library_path in $LDFLAGS $LIBS
10115 case "$cf_library_path" in
10117 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10119 test "x$cf_library_path" != "xNONE" && \
10120 test -d "$cf_library_path" && \
10122 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10123 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10124 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10125 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10126 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10127 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"
10130 cf_library_path_list="$cf_library_path_list $cf_search"
10138 test "x$prefix" != "xNONE" && \
10139 test -d "$prefix" && \
10141 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10142 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10143 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10144 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10145 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10146 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10149 for cf_subdir_prefix in \
10158 test "x$cf_subdir_prefix" != "x$prefix" && \
10159 test -d "$cf_subdir_prefix" && \
10160 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10161 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10162 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10163 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10164 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10165 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10166 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"
10171 cf_search="$cf_library_path_list $cf_search"
10173 for cf_libdir in $cf_search
10175 echo "$as_me:10175: checking for -l$cf_nculib_root in $cf_libdir" >&5
10176 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10177 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10178 cat >"conftest.$ac_ext" <<_ACEOF
10179 #line 10179 "configure"
10180 #include "confdefs.h"
10181 #include <${cf_cv_ncurses_header:-curses.h}>
10190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10191 if { (eval echo "$as_me:10191: \"$ac_link\"") >&5
10192 (eval $ac_link) 2>&5
10194 echo "$as_me:10194: \$? = $ac_status" >&5
10195 (exit "$ac_status"); } &&
10196 { ac_try='test -s "conftest$ac_exeext"'
10197 { (eval echo "$as_me:10197: \"$ac_try\"") >&5
10198 (eval $ac_try) 2>&5
10200 echo "$as_me:10200: \$? = $ac_status" >&5
10201 (exit "$ac_status"); }; }; then
10202 echo "$as_me:10202: result: yes" >&5
10203 echo "${ECHO_T}yes" >&6
10204 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10207 echo "$as_me: failed program was:" >&5
10208 cat "conftest.$ac_ext" >&5
10209 echo "$as_me:10209: result: no" >&5
10210 echo "${ECHO_T}no" >&6
10211 LIBS="$cf_save_LIBS"
10213 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10221 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10223 if test "$cf_found_library" = no ; then
10224 { { echo "$as_me:10224: error: Cannot link $cf_nculib_root library" >&5
10225 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10226 { (exit 1); exit 1; }; }
10231 if test -n "$cf_ncurses_LIBS" ; then
10232 echo "$as_me:10232: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10233 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10234 cf_ncurses_SAVE="$LIBS"
10235 for p in $cf_ncurses_LIBS ; do
10236 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10237 if test "$q" != "$LIBS" ; then
10241 cat >"conftest.$ac_ext" <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10244 #include <${cf_cv_ncurses_header:-curses.h}>
10248 initscr(); mousemask(0,0); tigetstr((char *)0);
10253 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10254 if { (eval echo "$as_me:10254: \"$ac_link\"") >&5
10255 (eval $ac_link) 2>&5
10257 echo "$as_me:10257: \$? = $ac_status" >&5
10258 (exit "$ac_status"); } &&
10259 { ac_try='test -s "conftest$ac_exeext"'
10260 { (eval echo "$as_me:10260: \"$ac_try\"") >&5
10261 (eval $ac_try) 2>&5
10263 echo "$as_me:10263: \$? = $ac_status" >&5
10264 (exit "$ac_status"); }; }; then
10265 echo "$as_me:10265: result: yes" >&5
10266 echo "${ECHO_T}yes" >&6
10268 echo "$as_me: failed program was:" >&5
10269 cat "conftest.$ac_ext" >&5
10270 echo "$as_me:10270: result: no" >&5
10271 echo "${ECHO_T}no" >&6
10272 LIBS="$cf_ncurses_SAVE"
10274 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10277 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10279 cat >>confdefs.h <<EOF
10280 #define $cf_nculib_ROOT 1
10285 NCURSES_CONFIG=none
10291 cf_ncuconfig_root=$cf_cv_screen
10292 cf_have_ncuconfig=no
10294 if test "x${PKG_CONFIG:=none}" != xnone; then
10295 echo "$as_me:10295: checking pkg-config for $cf_ncuconfig_root" >&5
10296 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10297 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10298 echo "$as_me:10298: result: yes" >&5
10299 echo "${ECHO_T}yes" >&6
10301 echo "$as_me:10301: checking if the $cf_ncuconfig_root package files work" >&5
10302 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10303 cf_have_ncuconfig=unknown
10305 cf_save_CFLAGS="$CFLAGS"
10306 cf_save_CPPFLAGS="$CPPFLAGS"
10307 cf_save_LIBS="$LIBS"
10309 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10310 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10312 # while -W for passing linker flags is prevalent, it is not "standard".
10313 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10314 # incompatible _and_ non-standard -W option which gives an error. Work
10315 # around that pitfall.
10316 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10322 cf_new_extra_cppflags=
10324 for cf_add_cflags in $cf_pkg_cflags
10326 case "$cf_fix_cppflags" in
10328 case "$cf_add_cflags" in
10329 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10330 case "$cf_add_cflags" in
10332 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10334 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10335 && test -z "${cf_tst_cflags}" \
10336 && cf_fix_cppflags=yes
10338 if test "$cf_fix_cppflags" = yes ; then
10340 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10341 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10344 elif test "${cf_tst_cflags}" = "\"'" ; then
10346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10353 case "$CPPFLAGS" in
10357 case "$cf_add_cflags" in
10359 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10361 CPPFLAGS=`echo "$CPPFLAGS" | \
10362 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10363 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10368 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10369 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10376 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10377 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10387 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10389 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10390 && test -z "${cf_tst_cflags}" \
10391 && cf_fix_cppflags=no
10396 if test -n "$cf_new_cflags" ; then
10398 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10399 CFLAGS="${CFLAGS}$cf_new_cflags"
10403 if test -n "$cf_new_cppflags" ; then
10405 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10406 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10410 if test -n "$cf_new_extra_cppflags" ; then
10412 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10413 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10417 cf_add_libs="$LIBS"
10420 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10421 # filter duplicates
10422 for cf_add_1lib in $cf_add_0lib; do
10423 for cf_add_2lib in $cf_add_libs; do
10424 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10429 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10431 LIBS="$cf_add_libs"
10433 cat >"conftest.$ac_ext" <<_ACEOF
10434 #line 10434 "configure"
10435 #include "confdefs.h"
10436 #include <${cf_cv_ncurses_header:-curses.h}>
10440 initscr(); mousemask(0,0); tigetstr((char *)0);
10445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10446 if { (eval echo "$as_me:10446: \"$ac_link\"") >&5
10447 (eval $ac_link) 2>&5
10449 echo "$as_me:10449: \$? = $ac_status" >&5
10450 (exit "$ac_status"); } &&
10451 { ac_try='test -s "conftest$ac_exeext"'
10452 { (eval echo "$as_me:10452: \"$ac_try\"") >&5
10453 (eval $ac_try) 2>&5
10455 echo "$as_me:10455: \$? = $ac_status" >&5
10456 (exit "$ac_status"); }; }; then
10457 if test "$cross_compiling" = yes; then
10458 cf_test_ncuconfig=maybe
10460 cat >"conftest.$ac_ext" <<_ACEOF
10461 #line 10461 "configure"
10462 #include "confdefs.h"
10463 #include <${cf_cv_ncurses_header:-curses.h}>
10465 { const char *xx = curses_version(); return (xx == 0); }
10467 rm -f "conftest$ac_exeext"
10468 if { (eval echo "$as_me:10468: \"$ac_link\"") >&5
10469 (eval $ac_link) 2>&5
10471 echo "$as_me:10471: \$? = $ac_status" >&5
10472 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10473 { (eval echo "$as_me:10473: \"$ac_try\"") >&5
10474 (eval $ac_try) 2>&5
10476 echo "$as_me:10476: \$? = $ac_status" >&5
10477 (exit "$ac_status"); }; }; then
10478 cf_test_ncuconfig=yes
10480 echo "$as_me: program exited with status $ac_status" >&5
10481 echo "$as_me: failed program was:" >&5
10482 cat "conftest.$ac_ext" >&5
10483 cf_test_ncuconfig=no
10485 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10488 echo "$as_me: failed program was:" >&5
10489 cat "conftest.$ac_ext" >&5
10490 cf_test_ncuconfig=no
10492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10494 CFLAGS="$cf_save_CFLAGS"
10495 CPPFLAGS="$cf_save_CPPFLAGS"
10496 LIBS="$cf_save_LIBS"
10498 if test "x$cf_test_ncuconfig" != xyes; then
10499 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10500 cf_pkg_cflags="$cf_temp"
10501 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10502 cf_pkg_libs="$cf_temp"
10507 for cf_add_cflags in $cf_pkg_cflags
10509 case "x$cf_add_cflags" in
10512 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10515 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10516 test "$CFLAGS" != "$cf_old_cflag" || break
10518 CFLAGS="$cf_old_cflag"
10521 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10524 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10525 test "$CPPFLAGS" != "$cf_old_cflag" || break
10527 CPPFLAGS="$cf_old_cflag"
10536 cf_new_extra_cppflags=
10538 for cf_add_cflags in $cf_add_cflags
10540 case "$cf_fix_cppflags" in
10542 case "$cf_add_cflags" in
10543 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10544 case "$cf_add_cflags" in
10546 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10548 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10549 && test -z "${cf_tst_cflags}" \
10550 && cf_fix_cppflags=yes
10552 if test "$cf_fix_cppflags" = yes ; then
10554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10558 elif test "${cf_tst_cflags}" = "\"'" ; then
10560 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10561 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10567 case "$CPPFLAGS" in
10571 case "$cf_add_cflags" in
10573 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10575 CPPFLAGS=`echo "$CPPFLAGS" | \
10576 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10577 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10582 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10583 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10590 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10591 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10598 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10599 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10601 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10603 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10604 && test -z "${cf_tst_cflags}" \
10605 && cf_fix_cppflags=no
10610 if test -n "$cf_new_cflags" ; then
10612 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10613 CFLAGS="${CFLAGS}$cf_new_cflags"
10617 if test -n "$cf_new_cppflags" ; then
10619 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10620 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10624 if test -n "$cf_new_extra_cppflags" ; then
10626 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10627 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10633 cf_add_libs="$LIBS"
10636 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10637 # filter duplicates
10638 for cf_add_1lib in $cf_add_0lib; do
10639 for cf_add_2lib in $cf_add_libs; do
10640 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10645 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10647 LIBS="$cf_add_libs"
10649 cat >"conftest.$ac_ext" <<_ACEOF
10650 #line 10650 "configure"
10651 #include "confdefs.h"
10652 #include <${cf_cv_ncurses_header:-curses.h}>
10656 initscr(); mousemask(0,0); tigetstr((char *)0);
10661 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10662 if { (eval echo "$as_me:10662: \"$ac_link\"") >&5
10663 (eval $ac_link) 2>&5
10665 echo "$as_me:10665: \$? = $ac_status" >&5
10666 (exit "$ac_status"); } &&
10667 { ac_try='test -s "conftest$ac_exeext"'
10668 { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10671 echo "$as_me:10671: \$? = $ac_status" >&5
10672 (exit "$ac_status"); }; }; then
10673 if test "$cross_compiling" = yes; then
10674 cf_have_ncuconfig=maybe
10676 cat >"conftest.$ac_ext" <<_ACEOF
10677 #line 10677 "configure"
10678 #include "confdefs.h"
10679 #include <${cf_cv_ncurses_header:-curses.h}>
10681 { const char *xx = curses_version(); return (xx == 0); }
10683 rm -f "conftest$ac_exeext"
10684 if { (eval echo "$as_me:10684: \"$ac_link\"") >&5
10685 (eval $ac_link) 2>&5
10687 echo "$as_me:10687: \$? = $ac_status" >&5
10688 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10689 { (eval echo "$as_me:10689: \"$ac_try\"") >&5
10690 (eval $ac_try) 2>&5
10692 echo "$as_me:10692: \$? = $ac_status" >&5
10693 (exit "$ac_status"); }; }; then
10694 cf_have_ncuconfig=yes
10696 echo "$as_me: program exited with status $ac_status" >&5
10697 echo "$as_me: failed program was:" >&5
10698 cat "conftest.$ac_ext" >&5
10699 cf_have_ncuconfig=no
10701 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10704 echo "$as_me: failed program was:" >&5
10705 cat "conftest.$ac_ext" >&5
10706 cf_have_ncuconfig=no
10708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10709 echo "$as_me:10709: result: $cf_have_ncuconfig" >&5
10710 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10711 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10712 if test "$cf_have_ncuconfig" != "yes"
10714 CPPFLAGS="$cf_save_CPPFLAGS"
10715 LIBS="$cf_save_LIBS"
10716 NCURSES_CONFIG_PKG=none
10719 cat >>confdefs.h <<\EOF
10723 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10725 echo "$as_me:10725: checking for terminfo header" >&5
10726 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10727 if test "${cf_cv_term_header+set}" = set; then
10728 echo $ECHO_N "(cached) $ECHO_C" >&6
10731 case "${cf_cv_ncurses_header}" in
10732 (*/ncurses.h|*/ncursesw.h)
10733 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10736 cf_term_header=term.h
10740 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10742 cat >"conftest.$ac_ext" <<_ACEOF
10743 #line 10743 "configure"
10744 #include "confdefs.h"
10746 #include <${cf_cv_ncurses_header:-curses.h}>
10747 #include <$cf_test>
10752 int x = auto_left_margin; (void)x
10757 rm -f "conftest.$ac_objext"
10758 if { (eval echo "$as_me:10758: \"$ac_compile\"") >&5
10759 (eval $ac_compile) 2>&5
10761 echo "$as_me:10761: \$? = $ac_status" >&5
10762 (exit "$ac_status"); } &&
10763 { ac_try='test -s "conftest.$ac_objext"'
10764 { (eval echo "$as_me:10764: \"$ac_try\"") >&5
10765 (eval $ac_try) 2>&5
10767 echo "$as_me:10767: \$? = $ac_status" >&5
10768 (exit "$ac_status"); }; }; then
10770 cf_cv_term_header="$cf_test"
10772 echo "$as_me: failed program was:" >&5
10773 cat "conftest.$ac_ext" >&5
10775 cf_cv_term_header=unknown
10778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10779 test "$cf_cv_term_header" != unknown && break
10783 echo "$as_me:10783: result: $cf_cv_term_header" >&5
10784 echo "${ECHO_T}$cf_cv_term_header" >&6
10786 # Set definitions to allow ifdef'ing to accommodate subdirectories
10788 case "$cf_cv_term_header" in
10791 cat >>confdefs.h <<\EOF
10792 #define HAVE_TERM_H 1
10798 case "$cf_cv_term_header" in
10801 cat >>confdefs.h <<\EOF
10802 #define HAVE_NCURSES_TERM_H 1
10808 cat >>confdefs.h <<\EOF
10809 #define HAVE_NCURSESW_TERM_H 1
10818 echo "$as_me:10818: result: no" >&5
10819 echo "${ECHO_T}no" >&6
10820 NCURSES_CONFIG_PKG=none
10823 NCURSES_CONFIG_PKG=none
10826 if test "x$cf_have_ncuconfig" = "xno"; then
10827 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10829 if test -n "$ac_tool_prefix"; then
10830 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10832 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10833 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10834 echo "$as_me:10834: checking for $ac_word" >&5
10835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10836 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10837 echo $ECHO_N "(cached) $ECHO_C" >&6
10839 if test -n "$NCURSES_CONFIG"; then
10840 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10842 ac_save_IFS=$IFS; IFS=$ac_path_separator
10844 for ac_dir in $ac_dummy; do
10846 test -z "$ac_dir" && ac_dir=.
10847 $as_executable_p "$ac_dir/$ac_word" || continue
10848 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10849 echo "$as_me:10849: found $ac_dir/$ac_word" >&5
10855 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10856 if test -n "$NCURSES_CONFIG"; then
10857 echo "$as_me:10857: result: $NCURSES_CONFIG" >&5
10858 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10860 echo "$as_me:10860: result: no" >&5
10861 echo "${ECHO_T}no" >&6
10864 test -n "$NCURSES_CONFIG" && break
10867 if test -z "$NCURSES_CONFIG"; then
10868 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10869 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10871 # Extract the first word of "$ac_prog", so it can be a program name with args.
10872 set dummy $ac_prog; ac_word=$2
10873 echo "$as_me:10873: checking for $ac_word" >&5
10874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10875 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10876 echo $ECHO_N "(cached) $ECHO_C" >&6
10878 if test -n "$ac_ct_NCURSES_CONFIG"; then
10879 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10881 ac_save_IFS=$IFS; IFS=$ac_path_separator
10883 for ac_dir in $ac_dummy; do
10885 test -z "$ac_dir" && ac_dir=.
10886 $as_executable_p "$ac_dir/$ac_word" || continue
10887 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10888 echo "$as_me:10888: found $ac_dir/$ac_word" >&5
10894 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10895 if test -n "$ac_ct_NCURSES_CONFIG"; then
10896 echo "$as_me:10896: result: $ac_ct_NCURSES_CONFIG" >&5
10897 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10899 echo "$as_me:10899: result: no" >&5
10900 echo "${ECHO_T}no" >&6
10903 test -n "$ac_ct_NCURSES_CONFIG" && break
10905 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10907 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10910 if test "$NCURSES_CONFIG" != none ; then
10912 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10914 case "x$cf_add_cflags" in
10917 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10920 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10921 test "$CFLAGS" != "$cf_old_cflag" || break
10923 CFLAGS="$cf_old_cflag"
10926 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10929 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10930 test "$CPPFLAGS" != "$cf_old_cflag" || break
10932 CPPFLAGS="$cf_old_cflag"
10941 cf_new_extra_cppflags=
10943 for cf_add_cflags in $cf_add_cflags
10945 case "$cf_fix_cppflags" in
10947 case "$cf_add_cflags" in
10948 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10949 case "$cf_add_cflags" in
10951 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10953 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10954 && test -z "${cf_tst_cflags}" \
10955 && cf_fix_cppflags=yes
10957 if test "$cf_fix_cppflags" = yes ; then
10959 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10960 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10963 elif test "${cf_tst_cflags}" = "\"'" ; then
10965 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10966 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10972 case "$CPPFLAGS" in
10976 case "$cf_add_cflags" in
10978 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10980 CPPFLAGS=`echo "$CPPFLAGS" | \
10981 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10982 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10987 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10988 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10995 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10996 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11006 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11009 && test -z "${cf_tst_cflags}" \
11010 && cf_fix_cppflags=no
11015 if test -n "$cf_new_cflags" ; then
11017 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11018 CFLAGS="${CFLAGS}$cf_new_cflags"
11022 if test -n "$cf_new_cppflags" ; then
11024 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11025 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11029 if test -n "$cf_new_extra_cppflags" ; then
11031 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11032 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11038 cf_add_libs="$LIBS"
11041 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11042 # filter duplicates
11043 for cf_add_1lib in $cf_add_0lib; do
11044 for cf_add_2lib in $cf_add_libs; do
11045 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11050 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11052 LIBS="$cf_add_libs"
11054 # even with config script, some packages use no-override for curses.h
11056 echo "$as_me:11056: checking if we have identified curses headers" >&5
11057 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11058 if test "${cf_cv_ncurses_header+set}" = set; then
11059 echo $ECHO_N "(cached) $ECHO_C" >&6
11062 cf_cv_ncurses_header=none
11064 ncurses.h $cf_cv_screen/ncurses.h \
11065 curses.h $cf_cv_screen/curses.h
11067 cat >"conftest.$ac_ext" <<_ACEOF
11068 #line 11068 "configure"
11069 #include "confdefs.h"
11070 #include <${cf_header}>
11074 initscr(); endwin()
11079 rm -f "conftest.$ac_objext"
11080 if { (eval echo "$as_me:11080: \"$ac_compile\"") >&5
11081 (eval $ac_compile) 2>&5
11083 echo "$as_me:11083: \$? = $ac_status" >&5
11084 (exit "$ac_status"); } &&
11085 { ac_try='test -s "conftest.$ac_objext"'
11086 { (eval echo "$as_me:11086: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11089 echo "$as_me:11089: \$? = $ac_status" >&5
11090 (exit "$ac_status"); }; }; then
11091 cf_cv_ncurses_header=$cf_header; break
11093 echo "$as_me: failed program was:" >&5
11094 cat "conftest.$ac_ext" >&5
11096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11100 echo "$as_me:11100: result: $cf_cv_ncurses_header" >&5
11101 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11103 if test "$cf_cv_ncurses_header" = none ; then
11104 { { echo "$as_me:11104: error: No curses header-files found" >&5
11105 echo "$as_me: error: No curses header-files found" >&2;}
11106 { (exit 1); exit 1; }; }
11109 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11111 for ac_header in $cf_cv_ncurses_header
11113 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11114 echo "$as_me:11114: checking for $ac_header" >&5
11115 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11117 echo $ECHO_N "(cached) $ECHO_C" >&6
11119 cat >"conftest.$ac_ext" <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122 #include <$ac_header>
11124 if { (eval echo "$as_me:11124: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11125 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11127 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11129 cat conftest.err >&5
11130 echo "$as_me:11130: \$? = $ac_status" >&5
11131 (exit "$ac_status"); } >/dev/null; then
11132 if test -s conftest.err; then
11133 ac_cpp_err=$ac_c_preproc_warn_flag
11140 if test -z "$ac_cpp_err"; then
11141 eval "$as_ac_Header=yes"
11143 echo "$as_me: failed program was:" >&5
11144 cat "conftest.$ac_ext" >&5
11145 eval "$as_ac_Header=no"
11147 rm -f conftest.err "conftest.$ac_ext"
11149 echo "$as_me:11149: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11150 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11151 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11152 cat >>confdefs.h <<EOF
11153 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11159 cat >>confdefs.h <<\EOF
11163 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11165 cat >>confdefs.h <<EOF
11166 #define $cf_nculib_ROOT 1
11169 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11173 cf_ncuhdr_root=$cf_cv_screen
11175 test -n "$cf_cv_curses_dir" && \
11176 test "$cf_cv_curses_dir" != "no" && { \
11178 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11179 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11181 while test "$cf_add_incdir" != /usr/include
11183 if test -d "$cf_add_incdir"
11186 if test -n "$CFLAGS$CPPFLAGS" ; then
11187 # a loop is needed to ensure we can add subdirs of existing dirs
11188 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11189 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11190 cf_have_incdir=yes; break
11195 if test "$cf_have_incdir" = no ; then
11196 if test "$cf_add_incdir" = /usr/local/include ; then
11197 if test "$GCC" = yes
11199 cf_save_CPPFLAGS=$CPPFLAGS
11201 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11202 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11204 cat >"conftest.$ac_ext" <<_ACEOF
11205 #line 11205 "configure"
11206 #include "confdefs.h"
11216 rm -f "conftest.$ac_objext"
11217 if { (eval echo "$as_me:11217: \"$ac_compile\"") >&5
11218 (eval $ac_compile) 2>&5
11220 echo "$as_me:11220: \$? = $ac_status" >&5
11221 (exit "$ac_status"); } &&
11222 { ac_try='test -s "conftest.$ac_objext"'
11223 { (eval echo "$as_me:11223: \"$ac_try\"") >&5
11224 (eval $ac_try) 2>&5
11226 echo "$as_me:11226: \$? = $ac_status" >&5
11227 (exit "$ac_status"); }; }; then
11230 echo "$as_me: failed program was:" >&5
11231 cat "conftest.$ac_ext" >&5
11234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11235 CPPFLAGS=$cf_save_CPPFLAGS
11240 if test "$cf_have_incdir" = no ; then
11241 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11243 echo "${as_me:-configure}:11243: testing adding $cf_add_incdir to include-path ..." 1>&5
11245 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11247 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11248 test "$cf_top_incdir" = "$cf_add_incdir" && break
11249 cf_add_incdir="$cf_top_incdir"
11262 echo "$as_me:11262: checking for $cf_ncuhdr_root header in include-path" >&5
11263 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11264 if test "${cf_cv_ncurses_h+set}" = set; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
11268 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11269 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11270 for cf_header in $cf_header_list
11273 cat >"conftest.$ac_ext" <<_ACEOF
11274 #line 11274 "configure"
11275 #include "confdefs.h"
11277 #include <$cf_header>
11282 #ifdef NCURSES_VERSION
11284 printf("%s\\n", NCURSES_VERSION);
11297 rm -f "conftest.$ac_objext"
11298 if { (eval echo "$as_me:11298: \"$ac_compile\"") >&5
11299 (eval $ac_compile) 2>&5
11301 echo "$as_me:11301: \$? = $ac_status" >&5
11302 (exit "$ac_status"); } &&
11303 { ac_try='test -s "conftest.$ac_objext"'
11304 { (eval echo "$as_me:11304: \"$ac_try\"") >&5
11305 (eval $ac_try) 2>&5
11307 echo "$as_me:11307: \$? = $ac_status" >&5
11308 (exit "$ac_status"); }; }; then
11309 cf_cv_ncurses_h=$cf_header
11312 echo "$as_me: failed program was:" >&5
11313 cat "conftest.$ac_ext" >&5
11316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11318 test "$cf_cv_ncurses_h" != no && break
11322 echo "$as_me:11322: result: $cf_cv_ncurses_h" >&5
11323 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11325 if test "$cf_cv_ncurses_h" != no ; then
11326 cf_cv_ncurses_header=$cf_cv_ncurses_h
11329 echo "$as_me:11329: checking for $cf_ncuhdr_root include-path" >&5
11330 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11331 if test "${cf_cv_ncurses_h2+set}" = set; then
11332 echo $ECHO_N "(cached) $ECHO_C" >&6
11335 test -n "$verbose" && echo
11339 # collect the current set of include-directories from compiler flags
11340 cf_header_path_list=""
11341 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11342 for cf_header_path in $CPPFLAGS $CFLAGS
11344 case "$cf_header_path" in
11346 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11348 test "x$cf_header_path" != "xNONE" && \
11349 test -d "$cf_header_path" && \
11351 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11352 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11353 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11354 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11355 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11356 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"
11359 cf_header_path_list="$cf_header_path_list $cf_search"
11365 # add the variations for the package we are looking for
11369 test "x$prefix" != "xNONE" && \
11370 test -d "$prefix" && \
11372 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11373 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11374 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11375 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11376 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11377 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11380 for cf_subdir_prefix in \
11389 test "x$cf_subdir_prefix" != "x$prefix" && \
11390 test -d "$cf_subdir_prefix" && \
11391 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11392 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11393 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11394 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11395 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11396 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11397 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"
11402 test "$includedir" != NONE && \
11403 test "$includedir" != "/usr/include" && \
11404 test -d "$includedir" && {
11405 test -d "$includedir" && cf_search="$cf_search $includedir"
11406 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11409 test "$oldincludedir" != NONE && \
11410 test "$oldincludedir" != "/usr/include" && \
11411 test -d "$oldincludedir" && {
11412 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11413 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11416 cf_search="$cf_search $cf_header_path_list"
11418 test -n "$verbose" && echo "search path $cf_search"
11419 cf_save2_CPPFLAGS="$CPPFLAGS"
11420 for cf_incdir in $cf_search
11423 if test -n "$cf_incdir" ; then
11424 for cf_add_incdir in $cf_incdir
11426 while test "$cf_add_incdir" != /usr/include
11428 if test -d "$cf_add_incdir"
11431 if test -n "$CFLAGS$CPPFLAGS" ; then
11432 # a loop is needed to ensure we can add subdirs of existing dirs
11433 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11434 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11435 cf_have_incdir=yes; break
11440 if test "$cf_have_incdir" = no ; then
11441 if test "$cf_add_incdir" = /usr/local/include ; then
11442 if test "$GCC" = yes
11444 cf_save_CPPFLAGS=$CPPFLAGS
11446 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11447 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11449 cat >"conftest.$ac_ext" <<_ACEOF
11450 #line 11450 "configure"
11451 #include "confdefs.h"
11461 rm -f "conftest.$ac_objext"
11462 if { (eval echo "$as_me:11462: \"$ac_compile\"") >&5
11463 (eval $ac_compile) 2>&5
11465 echo "$as_me:11465: \$? = $ac_status" >&5
11466 (exit "$ac_status"); } &&
11467 { ac_try='test -s "conftest.$ac_objext"'
11468 { (eval echo "$as_me:11468: \"$ac_try\"") >&5
11469 (eval $ac_try) 2>&5
11471 echo "$as_me:11471: \$? = $ac_status" >&5
11472 (exit "$ac_status"); }; }; then
11475 echo "$as_me: failed program was:" >&5
11476 cat "conftest.$ac_ext" >&5
11479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11480 CPPFLAGS=$cf_save_CPPFLAGS
11485 if test "$cf_have_incdir" = no ; then
11486 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11488 echo "${as_me:-configure}:11488: testing adding $cf_add_incdir to include-path ..." 1>&5
11490 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11492 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11493 test "$cf_top_incdir" = "$cf_add_incdir" && break
11494 cf_add_incdir="$cf_top_incdir"
11510 cat >"conftest.$ac_ext" <<_ACEOF
11511 #line 11511 "configure"
11512 #include "confdefs.h"
11514 #include <$cf_header>
11519 #ifdef NCURSES_VERSION
11521 printf("%s\\n", NCURSES_VERSION);
11534 rm -f "conftest.$ac_objext"
11535 if { (eval echo "$as_me:11535: \"$ac_compile\"") >&5
11536 (eval $ac_compile) 2>&5
11538 echo "$as_me:11538: \$? = $ac_status" >&5
11539 (exit "$ac_status"); } &&
11540 { ac_try='test -s "conftest.$ac_objext"'
11541 { (eval echo "$as_me:11541: \"$ac_try\"") >&5
11542 (eval $ac_try) 2>&5
11544 echo "$as_me:11544: \$? = $ac_status" >&5
11545 (exit "$ac_status"); }; }; then
11546 cf_cv_ncurses_h2=$cf_header
11549 echo "$as_me: failed program was:" >&5
11550 cat "conftest.$ac_ext" >&5
11551 cf_cv_ncurses_h2=no
11553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11555 if test "$cf_cv_ncurses_h2" != no ; then
11556 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11557 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11560 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11562 CPPFLAGS="$cf_save2_CPPFLAGS"
11563 test "$cf_cv_ncurses_h2" != no && break
11565 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11565: error: not found" >&5
11566 echo "$as_me: error: not found" >&2;}
11567 { (exit 1); exit 1; }; }
11570 echo "$as_me:11570: result: $cf_cv_ncurses_h2" >&5
11571 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11573 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11574 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11575 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11576 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11579 if test -n "$cf_1st_incdir" ; then
11580 for cf_add_incdir in $cf_1st_incdir
11582 while test "$cf_add_incdir" != /usr/include
11584 if test -d "$cf_add_incdir"
11587 if test -n "$CFLAGS$CPPFLAGS" ; then
11588 # a loop is needed to ensure we can add subdirs of existing dirs
11589 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11590 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11591 cf_have_incdir=yes; break
11596 if test "$cf_have_incdir" = no ; then
11597 if test "$cf_add_incdir" = /usr/local/include ; then
11598 if test "$GCC" = yes
11600 cf_save_CPPFLAGS=$CPPFLAGS
11602 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11603 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11605 cat >"conftest.$ac_ext" <<_ACEOF
11606 #line 11606 "configure"
11607 #include "confdefs.h"
11617 rm -f "conftest.$ac_objext"
11618 if { (eval echo "$as_me:11618: \"$ac_compile\"") >&5
11619 (eval $ac_compile) 2>&5
11621 echo "$as_me:11621: \$? = $ac_status" >&5
11622 (exit "$ac_status"); } &&
11623 { ac_try='test -s "conftest.$ac_objext"'
11624 { (eval echo "$as_me:11624: \"$ac_try\"") >&5
11625 (eval $ac_try) 2>&5
11627 echo "$as_me:11627: \$? = $ac_status" >&5
11628 (exit "$ac_status"); }; }; then
11631 echo "$as_me: failed program was:" >&5
11632 cat "conftest.$ac_ext" >&5
11635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11636 CPPFLAGS=$cf_save_CPPFLAGS
11641 if test "$cf_have_incdir" = no ; then
11642 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11644 echo "${as_me:-configure}:11644: testing adding $cf_add_incdir to include-path ..." 1>&5
11646 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11648 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11649 test "$cf_top_incdir" = "$cf_add_incdir" && break
11650 cf_add_incdir="$cf_top_incdir"
11663 # Set definitions to allow ifdef'ing for ncurses.h
11665 case "$cf_cv_ncurses_header" in
11668 cat >>confdefs.h <<\EOF
11669 #define HAVE_NCURSES_H 1
11675 case "$cf_cv_ncurses_header" in
11676 (ncurses/curses.h|ncurses/ncurses.h)
11678 cat >>confdefs.h <<\EOF
11679 #define HAVE_NCURSES_NCURSES_H 1
11683 (ncursesw/curses.h|ncursesw/ncurses.h)
11685 cat >>confdefs.h <<\EOF
11686 #define HAVE_NCURSESW_NCURSES_H 1
11692 echo "$as_me:11692: checking for terminfo header" >&5
11693 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11694 if test "${cf_cv_term_header+set}" = set; then
11695 echo $ECHO_N "(cached) $ECHO_C" >&6
11698 case "${cf_cv_ncurses_header}" in
11699 (*/ncurses.h|*/ncursesw.h)
11700 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11703 cf_term_header=term.h
11707 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11709 cat >"conftest.$ac_ext" <<_ACEOF
11710 #line 11710 "configure"
11711 #include "confdefs.h"
11713 #include <${cf_cv_ncurses_header:-curses.h}>
11714 #include <$cf_test>
11719 int x = auto_left_margin; (void)x
11724 rm -f "conftest.$ac_objext"
11725 if { (eval echo "$as_me:11725: \"$ac_compile\"") >&5
11726 (eval $ac_compile) 2>&5
11728 echo "$as_me:11728: \$? = $ac_status" >&5
11729 (exit "$ac_status"); } &&
11730 { ac_try='test -s "conftest.$ac_objext"'
11731 { (eval echo "$as_me:11731: \"$ac_try\"") >&5
11732 (eval $ac_try) 2>&5
11734 echo "$as_me:11734: \$? = $ac_status" >&5
11735 (exit "$ac_status"); }; }; then
11737 cf_cv_term_header="$cf_test"
11739 echo "$as_me: failed program was:" >&5
11740 cat "conftest.$ac_ext" >&5
11742 cf_cv_term_header=unknown
11745 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11746 test "$cf_cv_term_header" != unknown && break
11750 echo "$as_me:11750: result: $cf_cv_term_header" >&5
11751 echo "${ECHO_T}$cf_cv_term_header" >&6
11753 # Set definitions to allow ifdef'ing to accommodate subdirectories
11755 case "$cf_cv_term_header" in
11758 cat >>confdefs.h <<\EOF
11759 #define HAVE_TERM_H 1
11765 case "$cf_cv_term_header" in
11768 cat >>confdefs.h <<\EOF
11769 #define HAVE_NCURSES_TERM_H 1
11775 cat >>confdefs.h <<\EOF
11776 #define HAVE_NCURSESW_TERM_H 1
11782 # some applications need this, but should check for NCURSES_VERSION
11784 cat >>confdefs.h <<\EOF
11788 echo "$as_me:11788: checking for ncurses version" >&5
11789 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11790 if test "${cf_cv_ncurses_version+set}" = set; then
11791 echo $ECHO_N "(cached) $ECHO_C" >&6
11794 cf_cv_ncurses_version=no
11796 rm -f "$cf_tempfile"
11797 if test "$cross_compiling" = yes; then
11799 # This will not work if the preprocessor splits the line after the
11800 # Autoconf token. The 'unproto' program does that.
11801 cat > "conftest.$ac_ext" <<EOF
11802 #include <${cf_cv_ncurses_header:-curses.h}>
11804 #ifdef NCURSES_VERSION
11805 Autoconf NCURSES_VERSION
11813 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11814 { (eval echo "$as_me:11814: \"$cf_try\"") >&5
11815 (eval $cf_try) 2>&5
11817 echo "$as_me:11817: \$? = $ac_status" >&5
11818 (exit "$ac_status"); }
11819 if test -f conftest.out ; then
11820 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11821 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11826 cat >"conftest.$ac_ext" <<_ACEOF
11827 #line 11827 "configure"
11828 #include "confdefs.h"
11830 $ac_includes_default
11832 #include <${cf_cv_ncurses_header:-curses.h}>
11836 FILE *fp = fopen("$cf_tempfile", "w");
11837 #ifdef NCURSES_VERSION
11838 # ifdef NCURSES_VERSION_PATCH
11839 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11841 fprintf(fp, "%s\\n", NCURSES_VERSION);
11844 # ifdef __NCURSES_H
11845 fprintf(fp, "old\\n");
11850 ${cf_cv_main_return:-return}(0);
11853 rm -f "conftest$ac_exeext"
11854 if { (eval echo "$as_me:11854: \"$ac_link\"") >&5
11855 (eval $ac_link) 2>&5
11857 echo "$as_me:11857: \$? = $ac_status" >&5
11858 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11859 { (eval echo "$as_me:11859: \"$ac_try\"") >&5
11860 (eval $ac_try) 2>&5
11862 echo "$as_me:11862: \$? = $ac_status" >&5
11863 (exit "$ac_status"); }; }; then
11865 cf_cv_ncurses_version=`cat $cf_tempfile`
11867 echo "$as_me: program exited with status $ac_status" >&5
11868 echo "$as_me: failed program was:" >&5
11869 cat "conftest.$ac_ext" >&5
11871 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11873 rm -f "$cf_tempfile"
11876 echo "$as_me:11876: result: $cf_cv_ncurses_version" >&5
11877 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11878 test "$cf_cv_ncurses_version" = no ||
11879 cat >>confdefs.h <<\EOF
11883 cf_nculib_root=$cf_cv_screen
11884 # This works, except for the special case where we find gpm, but
11885 # ncurses is in a nonstandard location via $LIBS, and we really want
11888 cf_ncurses_SAVE="$LIBS"
11889 echo "$as_me:11889: checking for Gpm_Open in -lgpm" >&5
11890 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11891 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11892 echo $ECHO_N "(cached) $ECHO_C" >&6
11894 ac_check_lib_save_LIBS=$LIBS
11896 cat >"conftest.$ac_ext" <<_ACEOF
11897 #line 11897 "configure"
11898 #include "confdefs.h"
11900 /* Override any gcc2 internal prototype to avoid an error. */
11904 /* We use char because int might match the return type of a gcc2
11905 builtin and then its argument prototype would still apply. */
11915 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11916 if { (eval echo "$as_me:11916: \"$ac_link\"") >&5
11917 (eval $ac_link) 2>&5
11919 echo "$as_me:11919: \$? = $ac_status" >&5
11920 (exit "$ac_status"); } &&
11921 { ac_try='test -s "conftest$ac_exeext"'
11922 { (eval echo "$as_me:11922: \"$ac_try\"") >&5
11923 (eval $ac_try) 2>&5
11925 echo "$as_me:11925: \$? = $ac_status" >&5
11926 (exit "$ac_status"); }; }; then
11927 ac_cv_lib_gpm_Gpm_Open=yes
11929 echo "$as_me: failed program was:" >&5
11930 cat "conftest.$ac_ext" >&5
11931 ac_cv_lib_gpm_Gpm_Open=no
11933 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11934 LIBS=$ac_check_lib_save_LIBS
11936 echo "$as_me:11936: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11937 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11938 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11939 echo "$as_me:11939: checking for initscr in -lgpm" >&5
11940 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11941 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11942 echo $ECHO_N "(cached) $ECHO_C" >&6
11944 ac_check_lib_save_LIBS=$LIBS
11946 cat >"conftest.$ac_ext" <<_ACEOF
11947 #line 11947 "configure"
11948 #include "confdefs.h"
11950 /* Override any gcc2 internal prototype to avoid an error. */
11954 /* We use char because int might match the return type of a gcc2
11955 builtin and then its argument prototype would still apply. */
11965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11966 if { (eval echo "$as_me:11966: \"$ac_link\"") >&5
11967 (eval $ac_link) 2>&5
11969 echo "$as_me:11969: \$? = $ac_status" >&5
11970 (exit "$ac_status"); } &&
11971 { ac_try='test -s "conftest$ac_exeext"'
11972 { (eval echo "$as_me:11972: \"$ac_try\"") >&5
11973 (eval $ac_try) 2>&5
11975 echo "$as_me:11975: \$? = $ac_status" >&5
11976 (exit "$ac_status"); }; }; then
11977 ac_cv_lib_gpm_initscr=yes
11979 echo "$as_me: failed program was:" >&5
11980 cat "conftest.$ac_ext" >&5
11981 ac_cv_lib_gpm_initscr=no
11983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11984 LIBS=$ac_check_lib_save_LIBS
11986 echo "$as_me:11986: result: $ac_cv_lib_gpm_initscr" >&5
11987 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11988 if test "$ac_cv_lib_gpm_initscr" = yes; then
11989 LIBS="$cf_ncurses_SAVE"
11991 cf_ncurses_LIBS="-lgpm"
11998 # This is only necessary if you are linking against an obsolete
11999 # version of ncurses (but it should do no harm, since it is static).
12000 if test "$cf_nculib_root" = ncurses ; then
12001 echo "$as_me:12001: checking for tgoto in -lmytinfo" >&5
12002 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12003 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12004 echo $ECHO_N "(cached) $ECHO_C" >&6
12006 ac_check_lib_save_LIBS=$LIBS
12007 LIBS="-lmytinfo $LIBS"
12008 cat >"conftest.$ac_ext" <<_ACEOF
12009 #line 12009 "configure"
12010 #include "confdefs.h"
12012 /* Override any gcc2 internal prototype to avoid an error. */
12016 /* We use char because int might match the return type of a gcc2
12017 builtin and then its argument prototype would still apply. */
12027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029 (eval $ac_link) 2>&5
12031 echo "$as_me:12031: \$? = $ac_status" >&5
12032 (exit "$ac_status"); } &&
12033 { ac_try='test -s "conftest$ac_exeext"'
12034 { (eval echo "$as_me:12034: \"$ac_try\"") >&5
12035 (eval $ac_try) 2>&5
12037 echo "$as_me:12037: \$? = $ac_status" >&5
12038 (exit "$ac_status"); }; }; then
12039 ac_cv_lib_mytinfo_tgoto=yes
12041 echo "$as_me: failed program was:" >&5
12042 cat "conftest.$ac_ext" >&5
12043 ac_cv_lib_mytinfo_tgoto=no
12045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12046 LIBS=$ac_check_lib_save_LIBS
12048 echo "$as_me:12048: result: $ac_cv_lib_mytinfo_tgoto" >&5
12049 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12050 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12051 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12058 cf_add_libs="$LIBS"
12061 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12062 # filter duplicates
12063 for cf_add_1lib in $cf_add_0lib; do
12064 for cf_add_2lib in $cf_add_libs; do
12065 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12070 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12072 LIBS="$cf_add_libs"
12074 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12077 cf_add_libs="$LIBS"
12080 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12081 # filter duplicates
12082 for cf_add_1lib in $cf_add_0lib; do
12083 for cf_add_2lib in $cf_add_libs; do
12084 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12091 LIBS="$cf_add_libs"
12095 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12097 echo "$as_me:12097: checking for initscr" >&5
12098 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12099 if test "${ac_cv_func_initscr+set}" = set; then
12100 echo $ECHO_N "(cached) $ECHO_C" >&6
12102 cat >"conftest.$ac_ext" <<_ACEOF
12103 #line 12103 "configure"
12104 #include "confdefs.h"
12105 #define initscr autoconf_temporary
12106 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12113 /* We use char because int might match the return type of a gcc2
12114 builtin and then its argument prototype would still apply. */
12115 char initscr (void);
12121 /* The GNU C library defines stubs for functions which it implements
12122 to always fail with ENOSYS. Some functions are actually named
12123 something starting with __ and the normal name is an alias. */
12124 #if defined (__stub_initscr) || defined (__stub___initscr)
12125 #error found stub for initscr
12133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12134 if { (eval echo "$as_me:12134: \"$ac_link\"") >&5
12135 (eval $ac_link) 2>&5
12137 echo "$as_me:12137: \$? = $ac_status" >&5
12138 (exit "$ac_status"); } &&
12139 { ac_try='test -s "conftest$ac_exeext"'
12140 { (eval echo "$as_me:12140: \"$ac_try\"") >&5
12141 (eval $ac_try) 2>&5
12143 echo "$as_me:12143: \$? = $ac_status" >&5
12144 (exit "$ac_status"); }; }; then
12145 ac_cv_func_initscr=yes
12147 echo "$as_me: failed program was:" >&5
12148 cat "conftest.$ac_ext" >&5
12149 ac_cv_func_initscr=no
12151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12153 echo "$as_me:12153: result: $ac_cv_func_initscr" >&5
12154 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12155 if test "$ac_cv_func_initscr" = yes; then
12156 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12159 cf_save_LIBS="$LIBS"
12160 echo "$as_me:12160: checking for initscr in -l$cf_nculib_root" >&5
12161 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12162 LIBS="-l$cf_nculib_root $LIBS"
12163 cat >"conftest.$ac_ext" <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12166 #include <${cf_cv_ncurses_header:-curses.h}>
12175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12176 if { (eval echo "$as_me:12176: \"$ac_link\"") >&5
12177 (eval $ac_link) 2>&5
12179 echo "$as_me:12179: \$? = $ac_status" >&5
12180 (exit "$ac_status"); } &&
12181 { ac_try='test -s "conftest$ac_exeext"'
12182 { (eval echo "$as_me:12182: \"$ac_try\"") >&5
12183 (eval $ac_try) 2>&5
12185 echo "$as_me:12185: \$? = $ac_status" >&5
12186 (exit "$ac_status"); }; }; then
12187 echo "$as_me:12187: result: yes" >&5
12188 echo "${ECHO_T}yes" >&6
12189 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12192 echo "$as_me: failed program was:" >&5
12193 cat "conftest.$ac_ext" >&5
12194 echo "$as_me:12194: result: no" >&5
12195 echo "${ECHO_T}no" >&6
12198 cf_library_path_list=""
12199 if test -n "${LDFLAGS}${LIBS}" ; then
12200 for cf_library_path in $LDFLAGS $LIBS
12202 case "$cf_library_path" in
12204 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12206 test "x$cf_library_path" != "xNONE" && \
12207 test -d "$cf_library_path" && \
12209 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12210 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12211 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12212 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12213 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12214 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"
12217 cf_library_path_list="$cf_library_path_list $cf_search"
12225 test "x$prefix" != "xNONE" && \
12226 test -d "$prefix" && \
12228 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12229 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12230 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12231 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12232 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12233 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12236 for cf_subdir_prefix in \
12245 test "x$cf_subdir_prefix" != "x$prefix" && \
12246 test -d "$cf_subdir_prefix" && \
12247 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12248 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12249 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12250 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12251 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12252 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12253 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"
12258 cf_search="$cf_library_path_list $cf_search"
12260 for cf_libdir in $cf_search
12262 echo "$as_me:12262: checking for -l$cf_nculib_root in $cf_libdir" >&5
12263 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12264 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12265 cat >"conftest.$ac_ext" <<_ACEOF
12266 #line 12266 "configure"
12267 #include "confdefs.h"
12268 #include <${cf_cv_ncurses_header:-curses.h}>
12277 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12278 if { (eval echo "$as_me:12278: \"$ac_link\"") >&5
12279 (eval $ac_link) 2>&5
12281 echo "$as_me:12281: \$? = $ac_status" >&5
12282 (exit "$ac_status"); } &&
12283 { ac_try='test -s "conftest$ac_exeext"'
12284 { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285 (eval $ac_try) 2>&5
12287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit "$ac_status"); }; }; then
12289 echo "$as_me:12289: result: yes" >&5
12290 echo "${ECHO_T}yes" >&6
12291 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12294 echo "$as_me: failed program was:" >&5
12295 cat "conftest.$ac_ext" >&5
12296 echo "$as_me:12296: result: no" >&5
12297 echo "${ECHO_T}no" >&6
12298 LIBS="$cf_save_LIBS"
12300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12308 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12310 if test "$cf_found_library" = no ; then
12311 { { echo "$as_me:12311: error: Cannot link $cf_nculib_root library" >&5
12312 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12313 { (exit 1); exit 1; }; }
12318 if test -n "$cf_ncurses_LIBS" ; then
12319 echo "$as_me:12319: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12320 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12321 cf_ncurses_SAVE="$LIBS"
12322 for p in $cf_ncurses_LIBS ; do
12323 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12324 if test "$q" != "$LIBS" ; then
12328 cat >"conftest.$ac_ext" <<_ACEOF
12329 #line 12329 "configure"
12330 #include "confdefs.h"
12331 #include <${cf_cv_ncurses_header:-curses.h}>
12335 initscr(); mousemask(0,0); tigetstr((char *)0);
12340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12341 if { (eval echo "$as_me:12341: \"$ac_link\"") >&5
12342 (eval $ac_link) 2>&5
12344 echo "$as_me:12344: \$? = $ac_status" >&5
12345 (exit "$ac_status"); } &&
12346 { ac_try='test -s "conftest$ac_exeext"'
12347 { (eval echo "$as_me:12347: \"$ac_try\"") >&5
12348 (eval $ac_try) 2>&5
12350 echo "$as_me:12350: \$? = $ac_status" >&5
12351 (exit "$ac_status"); }; }; then
12352 echo "$as_me:12352: result: yes" >&5
12353 echo "${ECHO_T}yes" >&6
12355 echo "$as_me: failed program was:" >&5
12356 cat "conftest.$ac_ext" >&5
12357 echo "$as_me:12357: result: no" >&5
12358 echo "${ECHO_T}no" >&6
12359 LIBS="$cf_ncurses_SAVE"
12361 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12364 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12366 cat >>confdefs.h <<EOF
12367 #define $cf_nculib_ROOT 1
12372 NCURSES_CONFIG=none
12377 echo "$as_me:12377: checking for X" >&5
12378 echo $ECHO_N "checking for X... $ECHO_C" >&6
12380 # Check whether --with-x or --without-x was given.
12381 if test "${with_x+set}" = set; then
12385 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12386 if test "x$with_x" = xno; then
12387 # The user explicitly disabled X.
12390 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12391 # Both variables are already set.
12394 if test "${ac_cv_have_x+set}" = set; then
12395 echo $ECHO_N "(cached) $ECHO_C" >&6
12397 # One or both of the vars are not set, and there is no cached value.
12398 ac_x_includes=no ac_x_libraries=no
12399 rm -fr conftest.dir
12400 if mkdir conftest.dir; then
12402 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12403 cat >Imakefile <<'EOF'
12405 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12407 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12408 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12409 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12410 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12411 for ac_extension in a so sl dylib dll; do
12412 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12413 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12414 ac_im_usrlibdir=$ac_im_libdir; break
12417 # Screen out bogus values from the imake configuration. They are
12418 # bogus both because they are the default anyway, and because
12419 # using them would break gcc on systems where it needs fixed includes.
12420 case $ac_im_incroot in
12422 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12424 case $ac_im_usrlibdir in
12425 /usr/lib | /lib) ;;
12426 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12430 rm -fr conftest.dir
12433 # Standard set of common directories for X headers.
12434 # Check X11 before X11Rn because it is often a symlink to the current release.
12451 /usr/local/X11/include
12452 /usr/local/X11R7/include
12453 /usr/local/X11R6/include
12454 /usr/local/X11R5/include
12455 /usr/local/X11R4/include
12457 /usr/local/include/X11
12458 /usr/local/include/X11R7
12459 /usr/local/include/X11R6
12460 /usr/local/include/X11R5
12461 /usr/local/include/X11R4
12465 /usr/XFree86/include/X11
12469 /usr/unsupported/include
12470 /usr/athena/include
12471 /usr/local/x11r5/include
12472 /usr/lpp/Xamples/include
12474 /usr/openwin/include
12475 /usr/openwin/share/include'
12477 if test "$ac_x_includes" = no; then
12478 # Guess where to find include files, by looking for Intrinsic.h.
12479 # First, try using that file with no special directory specified.
12480 cat >"conftest.$ac_ext" <<_ACEOF
12481 #line 12481 "configure"
12482 #include "confdefs.h"
12483 #include <X11/Intrinsic.h>
12485 if { (eval echo "$as_me:12485: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12486 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12488 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12490 cat conftest.err >&5
12491 echo "$as_me:12491: \$? = $ac_status" >&5
12492 (exit "$ac_status"); } >/dev/null; then
12493 if test -s conftest.err; then
12494 ac_cpp_err=$ac_c_preproc_warn_flag
12501 if test -z "$ac_cpp_err"; then
12502 # We can compile using X headers with no special include directory.
12505 echo "$as_me: failed program was:" >&5
12506 cat "conftest.$ac_ext" >&5
12507 for ac_dir in $ac_x_header_dirs; do
12508 if test -r "$ac_dir/X11/Intrinsic.h"; then
12509 ac_x_includes=$ac_dir
12514 rm -f conftest.err "conftest.$ac_ext"
12515 fi # $ac_x_includes = no
12517 if test "$ac_x_libraries" = no; then
12518 # Check for the libraries.
12519 # See if we find them without any special options.
12520 # Don't add to $LIBS permanently.
12523 cat >"conftest.$ac_ext" <<_ACEOF
12524 #line 12524 "configure"
12525 #include "confdefs.h"
12526 #include <X11/Intrinsic.h>
12535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12536 if { (eval echo "$as_me:12536: \"$ac_link\"") >&5
12537 (eval $ac_link) 2>&5
12539 echo "$as_me:12539: \$? = $ac_status" >&5
12540 (exit "$ac_status"); } &&
12541 { ac_try='test -s "conftest$ac_exeext"'
12542 { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543 (eval $ac_try) 2>&5
12545 echo "$as_me:12545: \$? = $ac_status" >&5
12546 (exit "$ac_status"); }; }; then
12548 # We can link X programs with no special library path.
12551 echo "$as_me: failed program was:" >&5
12552 cat "conftest.$ac_ext" >&5
12554 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12556 # Don't even attempt the hair of trying to link an X program!
12557 for ac_extension in a so sl dylib dll; do
12558 if test -r "$ac_dir/libXt.$ac_extension"; then
12559 ac_x_libraries=$ac_dir
12565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12566 fi # $ac_x_libraries = no
12568 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12569 # Didn't find X anywhere. Cache the known absence of X.
12570 ac_cv_have_x="have_x=no"
12572 # Record where we found X for the cache.
12573 ac_cv_have_x="have_x=yes \
12574 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12579 eval "$ac_cv_have_x"
12582 if test "$have_x" != yes; then
12583 echo "$as_me:12583: result: $have_x" >&5
12584 echo "${ECHO_T}$have_x" >&6
12587 # If each of the values was on the command line, it overrides each guess.
12588 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12589 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12590 # Update the cache value to reflect the command line values.
12591 ac_cv_have_x="have_x=yes \
12592 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12593 echo "$as_me:12593: result: libraries $x_libraries, headers $x_includes" >&5
12594 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12597 if test "$no_x" = yes; then
12598 # Not all programs may use this symbol, but it does not hurt to define it.
12600 cat >>confdefs.h <<\EOF
12601 #define X_DISPLAY_MISSING 1
12609 if test -n "$x_includes"; then
12610 X_CFLAGS="$X_CFLAGS -I$x_includes"
12613 # It would also be nice to do this for all -L options, not just this one.
12614 if test -n "$x_libraries"; then
12615 X_LIBS="$X_LIBS -L$x_libraries"
12616 # For Solaris; some versions of Sun CC require a space after -R and
12617 # others require no space. Words are not sufficient . . . .
12618 case `(uname -sr) 2>/dev/null` in
12620 echo "$as_me:12620: checking whether -R must be followed by a space" >&5
12621 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12622 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12623 cat >"conftest.$ac_ext" <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12636 if { (eval echo "$as_me:12636: \"$ac_link\"") >&5
12637 (eval $ac_link) 2>&5
12639 echo "$as_me:12639: \$? = $ac_status" >&5
12640 (exit "$ac_status"); } &&
12641 { ac_try='test -s "conftest$ac_exeext"'
12642 { (eval echo "$as_me:12642: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12645 echo "$as_me:12645: \$? = $ac_status" >&5
12646 (exit "$ac_status"); }; }; then
12649 echo "$as_me: failed program was:" >&5
12650 cat "conftest.$ac_ext" >&5
12653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12654 if test $ac_R_nospace = yes; then
12655 echo "$as_me:12655: result: no" >&5
12656 echo "${ECHO_T}no" >&6
12657 X_LIBS="$X_LIBS -R$x_libraries"
12659 LIBS="$ac_xsave_LIBS -R $x_libraries"
12660 cat >"conftest.$ac_ext" <<_ACEOF
12661 #line 12661 "configure"
12662 #include "confdefs.h"
12672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12673 if { (eval echo "$as_me:12673: \"$ac_link\"") >&5
12674 (eval $ac_link) 2>&5
12676 echo "$as_me:12676: \$? = $ac_status" >&5
12677 (exit "$ac_status"); } &&
12678 { ac_try='test -s "conftest$ac_exeext"'
12679 { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680 (eval $ac_try) 2>&5
12682 echo "$as_me:12682: \$? = $ac_status" >&5
12683 (exit "$ac_status"); }; }; then
12686 echo "$as_me: failed program was:" >&5
12687 cat "conftest.$ac_ext" >&5
12690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12691 if test $ac_R_space = yes; then
12692 echo "$as_me:12692: result: yes" >&5
12693 echo "${ECHO_T}yes" >&6
12694 X_LIBS="$X_LIBS -R $x_libraries"
12696 echo "$as_me:12696: result: neither works" >&5
12697 echo "${ECHO_T}neither works" >&6
12700 LIBS=$ac_xsave_LIBS
12704 # Check for system-dependent libraries X programs must link with.
12705 # Do this before checking for the system-independent R6 libraries
12706 # (-lICE), since we may need -lsocket or whatever for X linking.
12708 if test "$ISC" = yes; then
12709 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12711 # Martyn Johnson says this is needed for Ultrix, if the X
12712 # libraries were built with DECnet support. And Karl Berry says
12713 # the Alpha needs dnet_stub (dnet does not exist).
12714 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12715 cat >"conftest.$ac_ext" <<_ACEOF
12716 #line 12716 "configure"
12717 #include "confdefs.h"
12719 /* Override any gcc2 internal prototype to avoid an error. */
12723 /* We use char because int might match the return type of a gcc2
12724 builtin and then its argument prototype would still apply. */
12725 char XOpenDisplay ();
12734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12735 if { (eval echo "$as_me:12735: \"$ac_link\"") >&5
12736 (eval $ac_link) 2>&5
12738 echo "$as_me:12738: \$? = $ac_status" >&5
12739 (exit "$ac_status"); } &&
12740 { ac_try='test -s "conftest$ac_exeext"'
12741 { (eval echo "$as_me:12741: \"$ac_try\"") >&5
12742 (eval $ac_try) 2>&5
12744 echo "$as_me:12744: \$? = $ac_status" >&5
12745 (exit "$ac_status"); }; }; then
12748 echo "$as_me: failed program was:" >&5
12749 cat "conftest.$ac_ext" >&5
12750 echo "$as_me:12750: checking for dnet_ntoa in -ldnet" >&5
12751 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12752 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12753 echo $ECHO_N "(cached) $ECHO_C" >&6
12755 ac_check_lib_save_LIBS=$LIBS
12756 LIBS="-ldnet $LIBS"
12757 cat >"conftest.$ac_ext" <<_ACEOF
12758 #line 12758 "configure"
12759 #include "confdefs.h"
12761 /* Override any gcc2 internal prototype to avoid an error. */
12765 /* We use char because int might match the return type of a gcc2
12766 builtin and then its argument prototype would still apply. */
12776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12777 if { (eval echo "$as_me:12777: \"$ac_link\"") >&5
12778 (eval $ac_link) 2>&5
12780 echo "$as_me:12780: \$? = $ac_status" >&5
12781 (exit "$ac_status"); } &&
12782 { ac_try='test -s "conftest$ac_exeext"'
12783 { (eval echo "$as_me:12783: \"$ac_try\"") >&5
12784 (eval $ac_try) 2>&5
12786 echo "$as_me:12786: \$? = $ac_status" >&5
12787 (exit "$ac_status"); }; }; then
12788 ac_cv_lib_dnet_dnet_ntoa=yes
12790 echo "$as_me: failed program was:" >&5
12791 cat "conftest.$ac_ext" >&5
12792 ac_cv_lib_dnet_dnet_ntoa=no
12794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12795 LIBS=$ac_check_lib_save_LIBS
12797 echo "$as_me:12797: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12798 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12799 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12800 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12803 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12804 echo "$as_me:12804: checking for dnet_ntoa in -ldnet_stub" >&5
12805 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12806 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12807 echo $ECHO_N "(cached) $ECHO_C" >&6
12809 ac_check_lib_save_LIBS=$LIBS
12810 LIBS="-ldnet_stub $LIBS"
12811 cat >"conftest.$ac_ext" <<_ACEOF
12812 #line 12812 "configure"
12813 #include "confdefs.h"
12815 /* Override any gcc2 internal prototype to avoid an error. */
12819 /* We use char because int might match the return type of a gcc2
12820 builtin and then its argument prototype would still apply. */
12830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12831 if { (eval echo "$as_me:12831: \"$ac_link\"") >&5
12832 (eval $ac_link) 2>&5
12834 echo "$as_me:12834: \$? = $ac_status" >&5
12835 (exit "$ac_status"); } &&
12836 { ac_try='test -s "conftest$ac_exeext"'
12837 { (eval echo "$as_me:12837: \"$ac_try\"") >&5
12838 (eval $ac_try) 2>&5
12840 echo "$as_me:12840: \$? = $ac_status" >&5
12841 (exit "$ac_status"); }; }; then
12842 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12844 echo "$as_me: failed program was:" >&5
12845 cat "conftest.$ac_ext" >&5
12846 ac_cv_lib_dnet_stub_dnet_ntoa=no
12848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12849 LIBS=$ac_check_lib_save_LIBS
12851 echo "$as_me:12851: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12852 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12853 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12854 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12860 LIBS="$ac_xsave_LIBS"
12862 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12863 # to get the SysV transport functions.
12864 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12866 # The nsl library prevents programs from opening the X display
12867 # on Irix 5.2, according to T.E. Dickey.
12868 # The functions gethostbyname, getservbyname, and inet_addr are
12869 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12870 echo "$as_me:12870: checking for gethostbyname" >&5
12871 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12872 if test "${ac_cv_func_gethostbyname+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12875 cat >"conftest.$ac_ext" <<_ACEOF
12876 #line 12876 "configure"
12877 #include "confdefs.h"
12878 #define gethostbyname autoconf_temporary
12879 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12880 #undef gethostbyname
12886 /* We use char because int might match the return type of a gcc2
12887 builtin and then its argument prototype would still apply. */
12888 char gethostbyname (void);
12894 /* The GNU C library defines stubs for functions which it implements
12895 to always fail with ENOSYS. Some functions are actually named
12896 something starting with __ and the normal name is an alias. */
12897 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12898 #error found stub for gethostbyname
12901 return gethostbyname ();
12906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12907 if { (eval echo "$as_me:12907: \"$ac_link\"") >&5
12908 (eval $ac_link) 2>&5
12910 echo "$as_me:12910: \$? = $ac_status" >&5
12911 (exit "$ac_status"); } &&
12912 { ac_try='test -s "conftest$ac_exeext"'
12913 { (eval echo "$as_me:12913: \"$ac_try\"") >&5
12914 (eval $ac_try) 2>&5
12916 echo "$as_me:12916: \$? = $ac_status" >&5
12917 (exit "$ac_status"); }; }; then
12918 ac_cv_func_gethostbyname=yes
12920 echo "$as_me: failed program was:" >&5
12921 cat "conftest.$ac_ext" >&5
12922 ac_cv_func_gethostbyname=no
12924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12926 echo "$as_me:12926: result: $ac_cv_func_gethostbyname" >&5
12927 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12929 if test $ac_cv_func_gethostbyname = no; then
12930 echo "$as_me:12930: checking for gethostbyname in -lnsl" >&5
12931 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12932 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12933 echo $ECHO_N "(cached) $ECHO_C" >&6
12935 ac_check_lib_save_LIBS=$LIBS
12937 cat >"conftest.$ac_ext" <<_ACEOF
12938 #line 12938 "configure"
12939 #include "confdefs.h"
12941 /* Override any gcc2 internal prototype to avoid an error. */
12945 /* We use char because int might match the return type of a gcc2
12946 builtin and then its argument prototype would still apply. */
12947 char gethostbyname ();
12956 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12957 if { (eval echo "$as_me:12957: \"$ac_link\"") >&5
12958 (eval $ac_link) 2>&5
12960 echo "$as_me:12960: \$? = $ac_status" >&5
12961 (exit "$ac_status"); } &&
12962 { ac_try='test -s "conftest$ac_exeext"'
12963 { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964 (eval $ac_try) 2>&5
12966 echo "$as_me:12966: \$? = $ac_status" >&5
12967 (exit "$ac_status"); }; }; then
12968 ac_cv_lib_nsl_gethostbyname=yes
12970 echo "$as_me: failed program was:" >&5
12971 cat "conftest.$ac_ext" >&5
12972 ac_cv_lib_nsl_gethostbyname=no
12974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12975 LIBS=$ac_check_lib_save_LIBS
12977 echo "$as_me:12977: result: $ac_cv_lib_nsl_gethostbyname" >&5
12978 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12979 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12980 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12983 if test $ac_cv_lib_nsl_gethostbyname = no; then
12984 echo "$as_me:12984: checking for gethostbyname in -lbsd" >&5
12985 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12986 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12987 echo $ECHO_N "(cached) $ECHO_C" >&6
12989 ac_check_lib_save_LIBS=$LIBS
12991 cat >"conftest.$ac_ext" <<_ACEOF
12992 #line 12992 "configure"
12993 #include "confdefs.h"
12995 /* Override any gcc2 internal prototype to avoid an error. */
12999 /* We use char because int might match the return type of a gcc2
13000 builtin and then its argument prototype would still apply. */
13001 char gethostbyname ();
13010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13011 if { (eval echo "$as_me:13011: \"$ac_link\"") >&5
13012 (eval $ac_link) 2>&5
13014 echo "$as_me:13014: \$? = $ac_status" >&5
13015 (exit "$ac_status"); } &&
13016 { ac_try='test -s "conftest$ac_exeext"'
13017 { (eval echo "$as_me:13017: \"$ac_try\"") >&5
13018 (eval $ac_try) 2>&5
13020 echo "$as_me:13020: \$? = $ac_status" >&5
13021 (exit "$ac_status"); }; }; then
13022 ac_cv_lib_bsd_gethostbyname=yes
13024 echo "$as_me: failed program was:" >&5
13025 cat "conftest.$ac_ext" >&5
13026 ac_cv_lib_bsd_gethostbyname=no
13028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13029 LIBS=$ac_check_lib_save_LIBS
13031 echo "$as_me:13031: result: $ac_cv_lib_bsd_gethostbyname" >&5
13032 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13033 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13034 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13040 # lieder@skyler.mavd.honeywell.com says without -lsocket,
13041 # socket/setsockopt and other routines are undefined under SCO ODT
13042 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13043 # on later versions), says Simon Leinen: it contains gethostby*
13044 # variants that don't use the nameserver (or something). -lsocket
13045 # must be given before -lnsl if both are needed. We assume that
13046 # if connect needs -lnsl, so does gethostbyname.
13047 echo "$as_me:13047: checking for connect" >&5
13048 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13049 if test "${ac_cv_func_connect+set}" = set; then
13050 echo $ECHO_N "(cached) $ECHO_C" >&6
13052 cat >"conftest.$ac_ext" <<_ACEOF
13053 #line 13053 "configure"
13054 #include "confdefs.h"
13055 #define connect autoconf_temporary
13056 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13063 /* We use char because int might match the return type of a gcc2
13064 builtin and then its argument prototype would still apply. */
13065 char connect (void);
13071 /* The GNU C library defines stubs for functions which it implements
13072 to always fail with ENOSYS. Some functions are actually named
13073 something starting with __ and the normal name is an alias. */
13074 #if defined (__stub_connect) || defined (__stub___connect)
13075 #error found stub for connect
13083 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13084 if { (eval echo "$as_me:13084: \"$ac_link\"") >&5
13085 (eval $ac_link) 2>&5
13087 echo "$as_me:13087: \$? = $ac_status" >&5
13088 (exit "$ac_status"); } &&
13089 { ac_try='test -s "conftest$ac_exeext"'
13090 { (eval echo "$as_me:13090: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13093 echo "$as_me:13093: \$? = $ac_status" >&5
13094 (exit "$ac_status"); }; }; then
13095 ac_cv_func_connect=yes
13097 echo "$as_me: failed program was:" >&5
13098 cat "conftest.$ac_ext" >&5
13099 ac_cv_func_connect=no
13101 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13103 echo "$as_me:13103: result: $ac_cv_func_connect" >&5
13104 echo "${ECHO_T}$ac_cv_func_connect" >&6
13106 if test $ac_cv_func_connect = no; then
13107 echo "$as_me:13107: checking for connect in -lsocket" >&5
13108 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13109 if test "${ac_cv_lib_socket_connect+set}" = set; then
13110 echo $ECHO_N "(cached) $ECHO_C" >&6
13112 ac_check_lib_save_LIBS=$LIBS
13113 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13114 cat >"conftest.$ac_ext" <<_ACEOF
13115 #line 13115 "configure"
13116 #include "confdefs.h"
13118 /* Override any gcc2 internal prototype to avoid an error. */
13122 /* We use char because int might match the return type of a gcc2
13123 builtin and then its argument prototype would still apply. */
13133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13134 if { (eval echo "$as_me:13134: \"$ac_link\"") >&5
13135 (eval $ac_link) 2>&5
13137 echo "$as_me:13137: \$? = $ac_status" >&5
13138 (exit "$ac_status"); } &&
13139 { ac_try='test -s "conftest$ac_exeext"'
13140 { (eval echo "$as_me:13140: \"$ac_try\"") >&5
13141 (eval $ac_try) 2>&5
13143 echo "$as_me:13143: \$? = $ac_status" >&5
13144 (exit "$ac_status"); }; }; then
13145 ac_cv_lib_socket_connect=yes
13147 echo "$as_me: failed program was:" >&5
13148 cat "conftest.$ac_ext" >&5
13149 ac_cv_lib_socket_connect=no
13151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13152 LIBS=$ac_check_lib_save_LIBS
13154 echo "$as_me:13154: result: $ac_cv_lib_socket_connect" >&5
13155 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13156 if test "$ac_cv_lib_socket_connect" = yes; then
13157 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13162 # Guillermo Gomez says -lposix is necessary on A/UX.
13163 echo "$as_me:13163: checking for remove" >&5
13164 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13165 if test "${ac_cv_func_remove+set}" = set; then
13166 echo $ECHO_N "(cached) $ECHO_C" >&6
13168 cat >"conftest.$ac_ext" <<_ACEOF
13169 #line 13169 "configure"
13170 #include "confdefs.h"
13171 #define remove autoconf_temporary
13172 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13179 /* We use char because int might match the return type of a gcc2
13180 builtin and then its argument prototype would still apply. */
13181 char remove (void);
13187 /* The GNU C library defines stubs for functions which it implements
13188 to always fail with ENOSYS. Some functions are actually named
13189 something starting with __ and the normal name is an alias. */
13190 #if defined (__stub_remove) || defined (__stub___remove)
13191 #error found stub for remove
13199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13200 if { (eval echo "$as_me:13200: \"$ac_link\"") >&5
13201 (eval $ac_link) 2>&5
13203 echo "$as_me:13203: \$? = $ac_status" >&5
13204 (exit "$ac_status"); } &&
13205 { ac_try='test -s "conftest$ac_exeext"'
13206 { (eval echo "$as_me:13206: \"$ac_try\"") >&5
13207 (eval $ac_try) 2>&5
13209 echo "$as_me:13209: \$? = $ac_status" >&5
13210 (exit "$ac_status"); }; }; then
13211 ac_cv_func_remove=yes
13213 echo "$as_me: failed program was:" >&5
13214 cat "conftest.$ac_ext" >&5
13215 ac_cv_func_remove=no
13217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13219 echo "$as_me:13219: result: $ac_cv_func_remove" >&5
13220 echo "${ECHO_T}$ac_cv_func_remove" >&6
13222 if test $ac_cv_func_remove = no; then
13223 echo "$as_me:13223: checking for remove in -lposix" >&5
13224 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13225 if test "${ac_cv_lib_posix_remove+set}" = set; then
13226 echo $ECHO_N "(cached) $ECHO_C" >&6
13228 ac_check_lib_save_LIBS=$LIBS
13229 LIBS="-lposix $LIBS"
13230 cat >"conftest.$ac_ext" <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13234 /* Override any gcc2 internal prototype to avoid an error. */
13238 /* We use char because int might match the return type of a gcc2
13239 builtin and then its argument prototype would still apply. */
13249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13250 if { (eval echo "$as_me:13250: \"$ac_link\"") >&5
13251 (eval $ac_link) 2>&5
13253 echo "$as_me:13253: \$? = $ac_status" >&5
13254 (exit "$ac_status"); } &&
13255 { ac_try='test -s "conftest$ac_exeext"'
13256 { (eval echo "$as_me:13256: \"$ac_try\"") >&5
13257 (eval $ac_try) 2>&5
13259 echo "$as_me:13259: \$? = $ac_status" >&5
13260 (exit "$ac_status"); }; }; then
13261 ac_cv_lib_posix_remove=yes
13263 echo "$as_me: failed program was:" >&5
13264 cat "conftest.$ac_ext" >&5
13265 ac_cv_lib_posix_remove=no
13267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13268 LIBS=$ac_check_lib_save_LIBS
13270 echo "$as_me:13270: result: $ac_cv_lib_posix_remove" >&5
13271 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13272 if test "$ac_cv_lib_posix_remove" = yes; then
13273 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13278 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13279 echo "$as_me:13279: checking for shmat" >&5
13280 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13281 if test "${ac_cv_func_shmat+set}" = set; then
13282 echo $ECHO_N "(cached) $ECHO_C" >&6
13284 cat >"conftest.$ac_ext" <<_ACEOF
13285 #line 13285 "configure"
13286 #include "confdefs.h"
13287 #define shmat autoconf_temporary
13288 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13295 /* We use char because int might match the return type of a gcc2
13296 builtin and then its argument prototype would still apply. */
13303 /* The GNU C library defines stubs for functions which it implements
13304 to always fail with ENOSYS. Some functions are actually named
13305 something starting with __ and the normal name is an alias. */
13306 #if defined (__stub_shmat) || defined (__stub___shmat)
13307 #error found stub for shmat
13315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13316 if { (eval echo "$as_me:13316: \"$ac_link\"") >&5
13317 (eval $ac_link) 2>&5
13319 echo "$as_me:13319: \$? = $ac_status" >&5
13320 (exit "$ac_status"); } &&
13321 { ac_try='test -s "conftest$ac_exeext"'
13322 { (eval echo "$as_me:13322: \"$ac_try\"") >&5
13323 (eval $ac_try) 2>&5
13325 echo "$as_me:13325: \$? = $ac_status" >&5
13326 (exit "$ac_status"); }; }; then
13327 ac_cv_func_shmat=yes
13329 echo "$as_me: failed program was:" >&5
13330 cat "conftest.$ac_ext" >&5
13331 ac_cv_func_shmat=no
13333 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13335 echo "$as_me:13335: result: $ac_cv_func_shmat" >&5
13336 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13338 if test $ac_cv_func_shmat = no; then
13339 echo "$as_me:13339: checking for shmat in -lipc" >&5
13340 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13341 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13342 echo $ECHO_N "(cached) $ECHO_C" >&6
13344 ac_check_lib_save_LIBS=$LIBS
13346 cat >"conftest.$ac_ext" <<_ACEOF
13347 #line 13347 "configure"
13348 #include "confdefs.h"
13350 /* Override any gcc2 internal prototype to avoid an error. */
13354 /* We use char because int might match the return type of a gcc2
13355 builtin and then its argument prototype would still apply. */
13365 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13366 if { (eval echo "$as_me:13366: \"$ac_link\"") >&5
13367 (eval $ac_link) 2>&5
13369 echo "$as_me:13369: \$? = $ac_status" >&5
13370 (exit "$ac_status"); } &&
13371 { ac_try='test -s "conftest$ac_exeext"'
13372 { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373 (eval $ac_try) 2>&5
13375 echo "$as_me:13375: \$? = $ac_status" >&5
13376 (exit "$ac_status"); }; }; then
13377 ac_cv_lib_ipc_shmat=yes
13379 echo "$as_me: failed program was:" >&5
13380 cat "conftest.$ac_ext" >&5
13381 ac_cv_lib_ipc_shmat=no
13383 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13384 LIBS=$ac_check_lib_save_LIBS
13386 echo "$as_me:13386: result: $ac_cv_lib_ipc_shmat" >&5
13387 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13388 if test "$ac_cv_lib_ipc_shmat" = yes; then
13389 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13395 # Check for libraries that X11R6 Xt/Xaw programs need.
13396 ac_save_LDFLAGS=$LDFLAGS
13397 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13398 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13399 # check for ICE first), but we must link in the order -lSM -lICE or
13400 # we get undefined symbols. So assume we have SM if we have ICE.
13401 # These have to be linked with before -lX11, unlike the other
13402 # libraries we check for below, so use a different variable.
13403 # John Interrante, Karl Berry
13404 echo "$as_me:13404: checking for IceConnectionNumber in -lICE" >&5
13405 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13406 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13407 echo $ECHO_N "(cached) $ECHO_C" >&6
13409 ac_check_lib_save_LIBS=$LIBS
13410 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13411 cat >"conftest.$ac_ext" <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13415 /* Override any gcc2 internal prototype to avoid an error. */
13419 /* We use char because int might match the return type of a gcc2
13420 builtin and then its argument prototype would still apply. */
13421 char IceConnectionNumber ();
13425 IceConnectionNumber ();
13430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13431 if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
13432 (eval $ac_link) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit "$ac_status"); } &&
13436 { ac_try='test -s "conftest$ac_exeext"'
13437 { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13440 echo "$as_me:13440: \$? = $ac_status" >&5
13441 (exit "$ac_status"); }; }; then
13442 ac_cv_lib_ICE_IceConnectionNumber=yes
13444 echo "$as_me: failed program was:" >&5
13445 cat "conftest.$ac_ext" >&5
13446 ac_cv_lib_ICE_IceConnectionNumber=no
13448 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13449 LIBS=$ac_check_lib_save_LIBS
13451 echo "$as_me:13451: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13452 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13453 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13454 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13457 LDFLAGS=$ac_save_LDFLAGS
13461 cf_x_athena=${cf_x_athena:-Xaw}
13463 echo "$as_me:13463: checking if you want to link with Xaw 3d library" >&5
13464 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13467 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13468 if test "${with_Xaw3d+set}" = set; then
13469 withval="$with_Xaw3d"
13472 if test "$withval" = yes ; then
13474 echo "$as_me:13474: result: yes" >&5
13475 echo "${ECHO_T}yes" >&6
13477 echo "$as_me:13477: result: no" >&5
13478 echo "${ECHO_T}no" >&6
13481 echo "$as_me:13481: checking if you want to link with Xaw 3d xft library" >&5
13482 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13485 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13486 if test "${with_Xaw3dxft+set}" = set; then
13487 withval="$with_Xaw3dxft"
13490 if test "$withval" = yes ; then
13491 cf_x_athena=Xaw3dxft
13492 echo "$as_me:13492: result: yes" >&5
13493 echo "${ECHO_T}yes" >&6
13495 echo "$as_me:13495: result: no" >&5
13496 echo "${ECHO_T}no" >&6
13499 echo "$as_me:13499: checking if you want to link with neXT Athena library" >&5
13500 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13503 # Check whether --with-neXtaw or --without-neXtaw was given.
13504 if test "${with_neXtaw+set}" = set; then
13505 withval="$with_neXtaw"
13508 if test "$withval" = yes ; then
13510 echo "$as_me:13510: result: yes" >&5
13511 echo "${ECHO_T}yes" >&6
13513 echo "$as_me:13513: result: no" >&5
13514 echo "${ECHO_T}no" >&6
13517 echo "$as_me:13517: checking if you want to link with Athena-Plus library" >&5
13518 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13521 # Check whether --with-XawPlus or --without-XawPlus was given.
13522 if test "${with_XawPlus+set}" = set; then
13523 withval="$with_XawPlus"
13526 if test "$withval" = yes ; then
13527 cf_x_athena=XawPlus
13528 echo "$as_me:13528: result: yes" >&5
13529 echo "${ECHO_T}yes" >&6
13531 echo "$as_me:13531: result: no" >&5
13532 echo "${ECHO_T}no" >&6
13537 if test "$PKG_CONFIG" != none ; then
13539 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13540 for cf_athena_pkg in \
13543 ${cf_x_athena}-devel \
13544 lib${cf_x_athena} \
13545 lib${cf_x_athena}-devel
13548 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13549 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13551 echo "${as_me:-configure}:13551: testing found package $cf_athena_pkg ..." 1>&5
13553 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13554 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13555 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13557 echo "${as_me:-configure}:13557: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13559 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13561 echo "${as_me:-configure}:13561: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13566 cf_new_extra_cppflags=
13568 for cf_add_cflags in $cf_pkgconfig_incs
13570 case "$cf_fix_cppflags" in
13572 case "$cf_add_cflags" in
13573 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13574 case "$cf_add_cflags" in
13576 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13579 && test -z "${cf_tst_cflags}" \
13580 && cf_fix_cppflags=yes
13582 if test "$cf_fix_cppflags" = yes ; then
13584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13588 elif test "${cf_tst_cflags}" = "\"'" ; then
13590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13597 case "$CPPFLAGS" in
13601 case "$cf_add_cflags" in
13603 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13605 CPPFLAGS=`echo "$CPPFLAGS" | \
13606 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13607 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13612 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13613 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13620 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13621 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13631 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13633 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13634 && test -z "${cf_tst_cflags}" \
13635 && cf_fix_cppflags=no
13640 if test -n "$cf_new_cflags" ; then
13642 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13643 CFLAGS="${CFLAGS}$cf_new_cflags"
13647 if test -n "$cf_new_cppflags" ; then
13649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13650 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13654 if test -n "$cf_new_extra_cppflags" ; then
13656 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13657 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13661 cf_add_libs="$LIBS"
13664 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13665 # filter duplicates
13666 for cf_add_1lib in $cf_add_0lib; do
13667 for cf_add_2lib in $cf_add_libs; do
13668 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13673 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13675 LIBS="$cf_add_libs"
13677 cf_x_athena_lib="$cf_pkgconfig_libs"
13679 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13681 cat >>confdefs.h <<EOF
13682 #define $cf_x_athena_LIBS 1
13685 for cf_trim_lib in Xmu Xt X11
13688 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13689 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13690 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13692 echo "${as_me:-configure}:13692: testing ..trimmed $LIBS ..." 1>&5
13698 echo "$as_me:13698: checking for usable $cf_x_athena/Xmu package" >&5
13699 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13700 if test "${cf_cv_xaw_compat+set}" = set; then
13701 echo $ECHO_N "(cached) $ECHO_C" >&6
13704 cat >"conftest.$ac_ext" <<_ACEOF
13705 #line 13705 "configure"
13706 #include "confdefs.h"
13708 $ac_includes_default
13709 #include <X11/Xmu/CharSet.h>
13715 int check = XmuCompareISOLatin1("big", "small");
13722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13723 if { (eval echo "$as_me:13723: \"$ac_link\"") >&5
13724 (eval $ac_link) 2>&5
13726 echo "$as_me:13726: \$? = $ac_status" >&5
13727 (exit "$ac_status"); } &&
13728 { ac_try='test -s "conftest$ac_exeext"'
13729 { (eval echo "$as_me:13729: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13732 echo "$as_me:13732: \$? = $ac_status" >&5
13733 (exit "$ac_status"); }; }; then
13734 cf_cv_xaw_compat=yes
13736 echo "$as_me: failed program was:" >&5
13737 cat "conftest.$ac_ext" >&5
13738 cf_cv_xaw_compat=no
13740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13742 echo "$as_me:13742: result: $cf_cv_xaw_compat" >&5
13743 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13745 if test "$cf_cv_xaw_compat" = no
13747 # workaround for broken ".pc" files...
13748 case "$cf_x_athena_lib" in
13752 test -n "$verbose" && echo " work around broken package" 1>&6
13754 echo "${as_me:-configure}:13754: testing work around broken package ..." 1>&5
13756 cf_save_xmu="$LIBS"
13757 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13759 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13760 test -n "$verbose" && echo " found package xmu" 1>&6
13762 echo "${as_me:-configure}:13762: testing found package xmu ..." 1>&5
13764 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13765 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13766 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13768 echo "${as_me:-configure}:13768: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13770 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13772 echo "${as_me:-configure}:13772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13777 cf_new_extra_cppflags=
13779 for cf_add_cflags in $cf_pkgconfig_incs
13781 case "$cf_fix_cppflags" in
13783 case "$cf_add_cflags" in
13784 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13785 case "$cf_add_cflags" in
13787 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13790 && test -z "${cf_tst_cflags}" \
13791 && cf_fix_cppflags=yes
13793 if test "$cf_fix_cppflags" = yes ; then
13795 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13796 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13799 elif test "${cf_tst_cflags}" = "\"'" ; then
13801 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13802 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13808 case "$CPPFLAGS" in
13812 case "$cf_add_cflags" in
13814 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13816 CPPFLAGS=`echo "$CPPFLAGS" | \
13817 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13818 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13823 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13824 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13831 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13832 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13839 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13840 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13842 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13844 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13845 && test -z "${cf_tst_cflags}" \
13846 && cf_fix_cppflags=no
13851 if test -n "$cf_new_cflags" ; then
13853 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13854 CFLAGS="${CFLAGS}$cf_new_cflags"
13858 if test -n "$cf_new_cppflags" ; then
13860 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13861 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13865 if test -n "$cf_new_extra_cppflags" ; then
13867 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13868 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13872 cf_add_libs="$LIBS"
13875 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13876 # filter duplicates
13877 for cf_add_1lib in $cf_add_0lib; do
13878 for cf_add_2lib in $cf_add_libs; do
13879 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13884 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13886 LIBS="$cf_add_libs"
13888 LIBS="$cf_save_xmu"
13890 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13892 echo "${as_me:-configure}:13892: testing ...before $LIBS ..." 1>&5
13894 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13895 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13897 echo "${as_me:-configure}:13897: testing ...after $LIBS ..." 1>&5
13903 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13905 echo "${as_me:-configure}:13905: testing ...before $LIBS ..." 1>&5
13907 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13908 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13910 echo "${as_me:-configure}:13910: testing ...after $LIBS ..." 1>&5
13914 for cf_trim_lib in Xmu Xt X11
13917 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13918 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13919 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13921 echo "${as_me:-configure}:13921: testing ..trimmed $LIBS ..." 1>&5
13941 if test -z "$cf_x_athena_lib" ; then
13943 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13944 test -n "$verbose" && echo " found package Xext" 1>&6
13946 echo "${as_me:-configure}:13946: testing found package Xext ..." 1>&5
13948 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13949 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13950 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13952 echo "${as_me:-configure}:13952: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13954 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13956 echo "${as_me:-configure}:13956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13961 cf_new_extra_cppflags=
13963 for cf_add_cflags in $cf_pkgconfig_incs
13965 case "$cf_fix_cppflags" in
13967 case "$cf_add_cflags" in
13968 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13969 case "$cf_add_cflags" in
13971 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13973 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13974 && test -z "${cf_tst_cflags}" \
13975 && cf_fix_cppflags=yes
13977 if test "$cf_fix_cppflags" = yes ; then
13979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13983 elif test "${cf_tst_cflags}" = "\"'" ; then
13985 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13986 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13992 case "$CPPFLAGS" in
13996 case "$cf_add_cflags" in
13998 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14000 CPPFLAGS=`echo "$CPPFLAGS" | \
14001 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14002 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14007 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14008 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14015 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14016 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14026 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14028 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14029 && test -z "${cf_tst_cflags}" \
14030 && cf_fix_cppflags=no
14035 if test -n "$cf_new_cflags" ; then
14037 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14038 CFLAGS="${CFLAGS}$cf_new_cflags"
14042 if test -n "$cf_new_cppflags" ; then
14044 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14045 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14049 if test -n "$cf_new_extra_cppflags" ; then
14051 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14052 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14056 cf_add_libs="$LIBS"
14059 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14060 # filter duplicates
14061 for cf_add_1lib in $cf_add_0lib; do
14062 for cf_add_2lib in $cf_add_libs; do
14063 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14068 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14070 LIBS="$cf_add_libs"
14077 echo "$as_me:14077: checking for XextCreateExtension in -lXext" >&5
14078 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14079 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
14082 ac_check_lib_save_LIBS=$LIBS
14083 LIBS="-lXext $LIBS"
14084 cat >"conftest.$ac_ext" <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14088 /* Override any gcc2 internal prototype to avoid an error. */
14092 /* We use char because int might match the return type of a gcc2
14093 builtin and then its argument prototype would still apply. */
14094 char XextCreateExtension ();
14098 XextCreateExtension ();
14103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105 (eval $ac_link) 2>&5
14107 echo "$as_me:14107: \$? = $ac_status" >&5
14108 (exit "$ac_status"); } &&
14109 { ac_try='test -s "conftest$ac_exeext"'
14110 { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111 (eval $ac_try) 2>&5
14113 echo "$as_me:14113: \$? = $ac_status" >&5
14114 (exit "$ac_status"); }; }; then
14115 ac_cv_lib_Xext_XextCreateExtension=yes
14117 echo "$as_me: failed program was:" >&5
14118 cat "conftest.$ac_ext" >&5
14119 ac_cv_lib_Xext_XextCreateExtension=no
14121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14122 LIBS=$ac_check_lib_save_LIBS
14124 echo "$as_me:14124: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14125 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14126 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14128 cf_add_libs="$LIBS"
14131 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14132 # filter duplicates
14133 for cf_add_1lib in $cf_add_0lib; do
14134 for cf_add_2lib in $cf_add_libs; do
14135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14142 LIBS="$cf_add_libs"
14148 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14149 # in some cases has installed dummy files in the former, other cases replaced
14150 # it with a link to the new location). This complicates the configure script.
14151 # Check for that pitfall, and recover using pkg-config
14153 # If none of these are set, the configuration is almost certainly broken.
14154 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14157 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14158 test -n "$verbose" && echo " found package x11" 1>&6
14160 echo "${as_me:-configure}:14160: testing found package x11 ..." 1>&5
14162 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14163 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14164 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14166 echo "${as_me:-configure}:14166: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14168 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14170 echo "${as_me:-configure}:14170: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14175 cf_new_extra_cppflags=
14177 for cf_add_cflags in $cf_pkgconfig_incs
14179 case "$cf_fix_cppflags" in
14181 case "$cf_add_cflags" in
14182 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14183 case "$cf_add_cflags" in
14185 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14187 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14188 && test -z "${cf_tst_cflags}" \
14189 && cf_fix_cppflags=yes
14191 if test "$cf_fix_cppflags" = yes ; then
14193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14197 elif test "${cf_tst_cflags}" = "\"'" ; then
14199 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14200 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14206 case "$CPPFLAGS" in
14210 case "$cf_add_cflags" in
14212 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14214 CPPFLAGS=`echo "$CPPFLAGS" | \
14215 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14216 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14221 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14222 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14229 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14230 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14243 && test -z "${cf_tst_cflags}" \
14244 && cf_fix_cppflags=no
14249 if test -n "$cf_new_cflags" ; then
14251 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14252 CFLAGS="${CFLAGS}$cf_new_cflags"
14256 if test -n "$cf_new_cppflags" ; then
14258 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14259 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14263 if test -n "$cf_new_extra_cppflags" ; then
14265 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14266 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14270 cf_add_libs="$LIBS"
14273 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14274 # filter duplicates
14275 for cf_add_1lib in $cf_add_0lib; do
14276 for cf_add_2lib in $cf_add_libs; do
14277 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14282 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14284 LIBS="$cf_add_libs"
14290 { echo "$as_me:14290: WARNING: unable to find X11 library" >&5
14291 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14294 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14295 test -n "$verbose" && echo " found package ice" 1>&6
14297 echo "${as_me:-configure}:14297: testing found package ice ..." 1>&5
14299 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14300 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14301 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14303 echo "${as_me:-configure}:14303: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14305 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14307 echo "${as_me:-configure}:14307: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14312 cf_new_extra_cppflags=
14314 for cf_add_cflags in $cf_pkgconfig_incs
14316 case "$cf_fix_cppflags" in
14318 case "$cf_add_cflags" in
14319 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14320 case "$cf_add_cflags" in
14322 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14324 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14325 && test -z "${cf_tst_cflags}" \
14326 && cf_fix_cppflags=yes
14328 if test "$cf_fix_cppflags" = yes ; then
14330 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14331 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14334 elif test "${cf_tst_cflags}" = "\"'" ; then
14336 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14337 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14343 case "$CPPFLAGS" in
14347 case "$cf_add_cflags" in
14349 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14351 CPPFLAGS=`echo "$CPPFLAGS" | \
14352 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14353 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14358 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14359 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14366 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14367 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14374 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14375 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14377 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14379 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14380 && test -z "${cf_tst_cflags}" \
14381 && cf_fix_cppflags=no
14386 if test -n "$cf_new_cflags" ; then
14388 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14389 CFLAGS="${CFLAGS}$cf_new_cflags"
14393 if test -n "$cf_new_cppflags" ; then
14395 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14396 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14400 if test -n "$cf_new_extra_cppflags" ; then
14402 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14403 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14407 cf_add_libs="$LIBS"
14410 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14411 # filter duplicates
14412 for cf_add_1lib in $cf_add_0lib; do
14413 for cf_add_2lib in $cf_add_libs; do
14414 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14419 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14421 LIBS="$cf_add_libs"
14427 { echo "$as_me:14427: WARNING: unable to find ICE library" >&5
14428 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14431 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14432 test -n "$verbose" && echo " found package sm" 1>&6
14434 echo "${as_me:-configure}:14434: testing found package sm ..." 1>&5
14436 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14437 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14438 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14440 echo "${as_me:-configure}:14440: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14442 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14444 echo "${as_me:-configure}:14444: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14449 cf_new_extra_cppflags=
14451 for cf_add_cflags in $cf_pkgconfig_incs
14453 case "$cf_fix_cppflags" in
14455 case "$cf_add_cflags" in
14456 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14457 case "$cf_add_cflags" in
14459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14462 && test -z "${cf_tst_cflags}" \
14463 && cf_fix_cppflags=yes
14465 if test "$cf_fix_cppflags" = yes ; then
14467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14471 elif test "${cf_tst_cflags}" = "\"'" ; then
14473 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14474 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14480 case "$CPPFLAGS" in
14484 case "$cf_add_cflags" in
14486 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14488 CPPFLAGS=`echo "$CPPFLAGS" | \
14489 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14490 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14495 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14496 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14503 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14504 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14517 && test -z "${cf_tst_cflags}" \
14518 && cf_fix_cppflags=no
14523 if test -n "$cf_new_cflags" ; then
14525 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14526 CFLAGS="${CFLAGS}$cf_new_cflags"
14530 if test -n "$cf_new_cppflags" ; then
14532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14533 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14537 if test -n "$cf_new_extra_cppflags" ; then
14539 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14540 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14544 cf_add_libs="$LIBS"
14547 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14548 # filter duplicates
14549 for cf_add_1lib in $cf_add_0lib; do
14550 for cf_add_2lib in $cf_add_libs; do
14551 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14556 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14558 LIBS="$cf_add_libs"
14564 { echo "$as_me:14564: WARNING: unable to find SM library" >&5
14565 echo "$as_me: WARNING: unable to find SM library" >&2;}
14568 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14569 test -n "$verbose" && echo " found package xt" 1>&6
14571 echo "${as_me:-configure}:14571: testing found package xt ..." 1>&5
14573 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14574 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14575 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14577 echo "${as_me:-configure}:14577: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14579 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14581 echo "${as_me:-configure}:14581: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14586 cf_new_extra_cppflags=
14588 for cf_add_cflags in $cf_pkgconfig_incs
14590 case "$cf_fix_cppflags" in
14592 case "$cf_add_cflags" in
14593 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14594 case "$cf_add_cflags" in
14596 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14598 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14599 && test -z "${cf_tst_cflags}" \
14600 && cf_fix_cppflags=yes
14602 if test "$cf_fix_cppflags" = yes ; then
14604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14608 elif test "${cf_tst_cflags}" = "\"'" ; then
14610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14617 case "$CPPFLAGS" in
14621 case "$cf_add_cflags" in
14623 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14625 CPPFLAGS=`echo "$CPPFLAGS" | \
14626 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14627 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14632 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14633 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14640 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14641 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14648 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14649 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14651 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14653 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14654 && test -z "${cf_tst_cflags}" \
14655 && cf_fix_cppflags=no
14660 if test -n "$cf_new_cflags" ; then
14662 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14663 CFLAGS="${CFLAGS}$cf_new_cflags"
14667 if test -n "$cf_new_cppflags" ; then
14669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14670 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14674 if test -n "$cf_new_extra_cppflags" ; then
14676 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14677 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14681 cf_add_libs="$LIBS"
14684 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14685 # filter duplicates
14686 for cf_add_1lib in $cf_add_0lib; do
14687 for cf_add_2lib in $cf_add_libs; do
14688 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14693 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14695 LIBS="$cf_add_libs"
14701 { echo "$as_me:14701: WARNING: unable to find Xt library" >&5
14702 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14706 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14711 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14712 test -n "$verbose" && echo " found package xt" 1>&6
14714 echo "${as_me:-configure}:14714: testing found package xt ..." 1>&5
14716 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14717 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14718 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14720 echo "${as_me:-configure}:14720: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14722 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14724 echo "${as_me:-configure}:14724: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14729 cf_new_extra_cppflags=
14731 for cf_add_cflags in $cf_pkgconfig_incs
14733 case "$cf_fix_cppflags" in
14735 case "$cf_add_cflags" in
14736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14737 case "$cf_add_cflags" in
14739 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14742 && test -z "${cf_tst_cflags}" \
14743 && cf_fix_cppflags=yes
14745 if test "$cf_fix_cppflags" = yes ; then
14747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14751 elif test "${cf_tst_cflags}" = "\"'" ; then
14753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14760 case "$CPPFLAGS" in
14764 case "$cf_add_cflags" in
14766 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14768 CPPFLAGS=`echo "$CPPFLAGS" | \
14769 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14770 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14775 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14776 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14783 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14784 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14797 && test -z "${cf_tst_cflags}" \
14798 && cf_fix_cppflags=no
14803 if test -n "$cf_new_cflags" ; then
14805 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14806 CFLAGS="${CFLAGS}$cf_new_cflags"
14810 if test -n "$cf_new_cppflags" ; then
14812 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14813 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14817 if test -n "$cf_new_extra_cppflags" ; then
14819 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14820 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14824 cf_add_libs="$LIBS"
14827 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14828 # filter duplicates
14829 for cf_add_1lib in $cf_add_0lib; do
14830 for cf_add_2lib in $cf_add_libs; do
14831 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14836 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14838 LIBS="$cf_add_libs"
14844 # we have an "xt" package, but it may omit Xt's dependency on X11
14845 echo "$as_me:14845: checking for usable X dependency" >&5
14846 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14847 if test "${cf_cv_xt_x11_compat+set}" = set; then
14848 echo $ECHO_N "(cached) $ECHO_C" >&6
14851 cat >"conftest.$ac_ext" <<_ACEOF
14852 #line 14852 "configure"
14853 #include "confdefs.h"
14855 $ac_includes_default
14856 #include <X11/Xlib.h>
14862 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14863 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14864 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14865 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14872 if { (eval echo "$as_me:14872: \"$ac_link\"") >&5
14873 (eval $ac_link) 2>&5
14875 echo "$as_me:14875: \$? = $ac_status" >&5
14876 (exit "$ac_status"); } &&
14877 { ac_try='test -s "conftest$ac_exeext"'
14878 { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879 (eval $ac_try) 2>&5
14881 echo "$as_me:14881: \$? = $ac_status" >&5
14882 (exit "$ac_status"); }; }; then
14883 cf_cv_xt_x11_compat=yes
14885 echo "$as_me: failed program was:" >&5
14886 cat "conftest.$ac_ext" >&5
14887 cf_cv_xt_x11_compat=no
14889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14891 echo "$as_me:14891: result: $cf_cv_xt_x11_compat" >&5
14892 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14893 if test "$cf_cv_xt_x11_compat" = no
14895 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14897 echo "${as_me:-configure}:14897: testing work around broken X11 dependency ..." 1>&5
14899 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14901 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14902 test -n "$verbose" && echo " found package x11" 1>&6
14904 echo "${as_me:-configure}:14904: testing found package x11 ..." 1>&5
14906 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14907 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14908 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14910 echo "${as_me:-configure}:14910: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14912 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14914 echo "${as_me:-configure}:14914: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14919 cf_new_extra_cppflags=
14921 for cf_add_cflags in $cf_pkgconfig_incs
14923 case "$cf_fix_cppflags" in
14925 case "$cf_add_cflags" in
14926 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14927 case "$cf_add_cflags" in
14929 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14931 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14932 && test -z "${cf_tst_cflags}" \
14933 && cf_fix_cppflags=yes
14935 if test "$cf_fix_cppflags" = yes ; then
14937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14941 elif test "${cf_tst_cflags}" = "\"'" ; then
14943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14950 case "$CPPFLAGS" in
14954 case "$cf_add_cflags" in
14956 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14958 CPPFLAGS=`echo "$CPPFLAGS" | \
14959 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14960 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14965 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14966 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14973 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14974 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14984 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14986 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14987 && test -z "${cf_tst_cflags}" \
14988 && cf_fix_cppflags=no
14993 if test -n "$cf_new_cflags" ; then
14995 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14996 CFLAGS="${CFLAGS}$cf_new_cflags"
15000 if test -n "$cf_new_cppflags" ; then
15002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15003 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15007 if test -n "$cf_new_extra_cppflags" ; then
15009 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15010 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15014 cf_add_libs="$LIBS"
15017 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15018 # filter duplicates
15019 for cf_add_1lib in $cf_add_0lib; do
15020 for cf_add_2lib in $cf_add_libs; do
15021 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15026 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15028 LIBS="$cf_add_libs"
15035 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15037 echo "${as_me:-configure}:15037: testing ...before $LIBS ..." 1>&5
15039 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
15040 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15042 echo "${as_me:-configure}:15042: testing ...after $LIBS ..." 1>&5
15050 echo "$as_me:15050: checking for usable X Toolkit package" >&5
15051 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15052 if test "${cf_cv_xt_ice_compat+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
15056 cat >"conftest.$ac_ext" <<_ACEOF
15057 #line 15057 "configure"
15058 #include "confdefs.h"
15060 $ac_includes_default
15061 #include <X11/Shell.h>
15066 int num = IceConnectionNumber(0); (void) num
15072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15073 if { (eval echo "$as_me:15073: \"$ac_link\"") >&5
15074 (eval $ac_link) 2>&5
15076 echo "$as_me:15076: \$? = $ac_status" >&5
15077 (exit "$ac_status"); } &&
15078 { ac_try='test -s "conftest$ac_exeext"'
15079 { (eval echo "$as_me:15079: \"$ac_try\"") >&5
15080 (eval $ac_try) 2>&5
15082 echo "$as_me:15082: \$? = $ac_status" >&5
15083 (exit "$ac_status"); }; }; then
15084 cf_cv_xt_ice_compat=yes
15086 echo "$as_me: failed program was:" >&5
15087 cat "conftest.$ac_ext" >&5
15088 cf_cv_xt_ice_compat=no
15090 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15092 echo "$as_me:15092: result: $cf_cv_xt_ice_compat" >&5
15093 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15095 if test "$cf_cv_xt_ice_compat" = no
15097 # workaround for broken ".pc" files used for X Toolkit.
15098 case "x$X_PRE_LIBS" in
15104 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15106 echo "${as_me:-configure}:15106: testing work around broken ICE dependency ..." 1>&5
15108 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15109 test -n "$verbose" && echo " found package ice" 1>&6
15111 echo "${as_me:-configure}:15111: testing found package ice ..." 1>&5
15113 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15114 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15115 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15117 echo "${as_me:-configure}:15117: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15119 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15121 echo "${as_me:-configure}:15121: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15126 cf_new_extra_cppflags=
15128 for cf_add_cflags in $cf_pkgconfig_incs
15130 case "$cf_fix_cppflags" in
15132 case "$cf_add_cflags" in
15133 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15134 case "$cf_add_cflags" in
15136 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15139 && test -z "${cf_tst_cflags}" \
15140 && cf_fix_cppflags=yes
15142 if test "$cf_fix_cppflags" = yes ; then
15144 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15145 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15148 elif test "${cf_tst_cflags}" = "\"'" ; then
15150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15157 case "$CPPFLAGS" in
15161 case "$cf_add_cflags" in
15163 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15165 CPPFLAGS=`echo "$CPPFLAGS" | \
15166 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15167 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15172 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15173 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15180 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15181 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15191 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15194 && test -z "${cf_tst_cflags}" \
15195 && cf_fix_cppflags=no
15200 if test -n "$cf_new_cflags" ; then
15202 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15203 CFLAGS="${CFLAGS}$cf_new_cflags"
15207 if test -n "$cf_new_cppflags" ; then
15209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15210 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15214 if test -n "$cf_new_extra_cppflags" ; then
15216 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15217 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15221 cf_add_libs="$LIBS"
15224 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15225 # filter duplicates
15226 for cf_add_1lib in $cf_add_0lib; do
15227 for cf_add_2lib in $cf_add_libs; do
15228 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15235 LIBS="$cf_add_libs"
15237 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15238 test -n "$verbose" && echo " found package sm" 1>&6
15240 echo "${as_me:-configure}:15240: testing found package sm ..." 1>&5
15242 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15243 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15244 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15246 echo "${as_me:-configure}:15246: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15248 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15250 echo "${as_me:-configure}:15250: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15255 cf_new_extra_cppflags=
15257 for cf_add_cflags in $cf_pkgconfig_incs
15259 case "$cf_fix_cppflags" in
15261 case "$cf_add_cflags" in
15262 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15263 case "$cf_add_cflags" in
15265 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15267 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15268 && test -z "${cf_tst_cflags}" \
15269 && cf_fix_cppflags=yes
15271 if test "$cf_fix_cppflags" = yes ; then
15273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15277 elif test "${cf_tst_cflags}" = "\"'" ; then
15279 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15280 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15286 case "$CPPFLAGS" in
15290 case "$cf_add_cflags" in
15292 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15294 CPPFLAGS=`echo "$CPPFLAGS" | \
15295 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15296 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15301 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15302 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15309 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15310 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15317 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15318 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15320 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15322 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15323 && test -z "${cf_tst_cflags}" \
15324 && cf_fix_cppflags=no
15329 if test -n "$cf_new_cflags" ; then
15331 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15332 CFLAGS="${CFLAGS}$cf_new_cflags"
15336 if test -n "$cf_new_cppflags" ; then
15338 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15339 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15343 if test -n "$cf_new_extra_cppflags" ; then
15345 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15346 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15350 cf_add_libs="$LIBS"
15353 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15354 # filter duplicates
15355 for cf_add_1lib in $cf_add_0lib; do
15356 for cf_add_2lib in $cf_add_libs; do
15357 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15362 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15364 LIBS="$cf_add_libs"
15377 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15379 echo "${as_me:-configure}:15379: testing ...before $LIBS ..." 1>&5
15381 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15382 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15384 echo "${as_me:-configure}:15384: testing ...after $LIBS ..." 1>&5
15400 LDFLAGS="$X_LIBS $LDFLAGS"
15402 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15404 echo "${as_me:-configure}:15404: testing checking additions to CFLAGS ..." 1>&5
15406 cf_check_cflags="$CFLAGS"
15407 cf_check_cppflags="$CPPFLAGS"
15412 cf_new_extra_cppflags=
15414 for cf_add_cflags in $X_CFLAGS
15416 case "$cf_fix_cppflags" in
15418 case "$cf_add_cflags" in
15419 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15420 case "$cf_add_cflags" in
15422 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15425 && test -z "${cf_tst_cflags}" \
15426 && cf_fix_cppflags=yes
15428 if test "$cf_fix_cppflags" = yes ; then
15430 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15431 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15434 elif test "${cf_tst_cflags}" = "\"'" ; then
15436 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15437 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15443 case "$CPPFLAGS" in
15447 case "$cf_add_cflags" in
15449 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15451 CPPFLAGS=`echo "$CPPFLAGS" | \
15452 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15453 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15458 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15459 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15466 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15467 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15477 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15479 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15480 && test -z "${cf_tst_cflags}" \
15481 && cf_fix_cppflags=no
15486 if test -n "$cf_new_cflags" ; then
15487 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15489 echo "${as_me:-configure}:15489: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15491 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15492 CFLAGS="${CFLAGS}$cf_new_cflags"
15496 if test -n "$cf_new_cppflags" ; then
15497 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15499 echo "${as_me:-configure}:15499: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15501 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15502 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15506 if test -n "$cf_new_extra_cppflags" ; then
15507 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15509 echo "${as_me:-configure}:15509: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15511 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15512 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15516 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15517 cat >"conftest.$ac_ext" <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15524 printf("Hello world");
15529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15530 if { (eval echo "$as_me:15530: \"$ac_link\"") >&5
15531 (eval $ac_link) 2>&5
15533 echo "$as_me:15533: \$? = $ac_status" >&5
15534 (exit "$ac_status"); } &&
15535 { ac_try='test -s "conftest$ac_exeext"'
15536 { (eval echo "$as_me:15536: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15539 echo "$as_me:15539: \$? = $ac_status" >&5
15540 (exit "$ac_status"); }; }; then
15543 echo "$as_me: failed program was:" >&5
15544 cat "conftest.$ac_ext" >&5
15545 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15547 echo "${as_me:-configure}:15547: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15549 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15550 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15552 echo "${as_me:-configure}:15552: testing but keeping change to \$CPPFLAGS ..." 1>&5
15555 CFLAGS="$cf_check_cflags"
15557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15560 echo "$as_me:15560: checking for XOpenDisplay" >&5
15561 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15562 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15563 echo $ECHO_N "(cached) $ECHO_C" >&6
15565 cat >"conftest.$ac_ext" <<_ACEOF
15566 #line 15566 "configure"
15567 #include "confdefs.h"
15568 #define XOpenDisplay autoconf_temporary
15569 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15570 #undef XOpenDisplay
15576 /* We use char because int might match the return type of a gcc2
15577 builtin and then its argument prototype would still apply. */
15578 char XOpenDisplay (void);
15584 /* The GNU C library defines stubs for functions which it implements
15585 to always fail with ENOSYS. Some functions are actually named
15586 something starting with __ and the normal name is an alias. */
15587 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15588 #error found stub for XOpenDisplay
15591 return XOpenDisplay ();
15596 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15597 if { (eval echo "$as_me:15597: \"$ac_link\"") >&5
15598 (eval $ac_link) 2>&5
15600 echo "$as_me:15600: \$? = $ac_status" >&5
15601 (exit "$ac_status"); } &&
15602 { ac_try='test -s "conftest$ac_exeext"'
15603 { (eval echo "$as_me:15603: \"$ac_try\"") >&5
15604 (eval $ac_try) 2>&5
15606 echo "$as_me:15606: \$? = $ac_status" >&5
15607 (exit "$ac_status"); }; }; then
15608 ac_cv_func_XOpenDisplay=yes
15610 echo "$as_me: failed program was:" >&5
15611 cat "conftest.$ac_ext" >&5
15612 ac_cv_func_XOpenDisplay=no
15614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15616 echo "$as_me:15616: result: $ac_cv_func_XOpenDisplay" >&5
15617 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15618 if test "$ac_cv_func_XOpenDisplay" = yes; then
15622 echo "$as_me:15622: checking for XOpenDisplay in -lX11" >&5
15623 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15624 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15625 echo $ECHO_N "(cached) $ECHO_C" >&6
15627 ac_check_lib_save_LIBS=$LIBS
15629 cat >"conftest.$ac_ext" <<_ACEOF
15630 #line 15630 "configure"
15631 #include "confdefs.h"
15633 /* Override any gcc2 internal prototype to avoid an error. */
15637 /* We use char because int might match the return type of a gcc2
15638 builtin and then its argument prototype would still apply. */
15639 char XOpenDisplay ();
15648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15649 if { (eval echo "$as_me:15649: \"$ac_link\"") >&5
15650 (eval $ac_link) 2>&5
15652 echo "$as_me:15652: \$? = $ac_status" >&5
15653 (exit "$ac_status"); } &&
15654 { ac_try='test -s "conftest$ac_exeext"'
15655 { (eval echo "$as_me:15655: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15658 echo "$as_me:15658: \$? = $ac_status" >&5
15659 (exit "$ac_status"); }; }; then
15660 ac_cv_lib_X11_XOpenDisplay=yes
15662 echo "$as_me: failed program was:" >&5
15663 cat "conftest.$ac_ext" >&5
15664 ac_cv_lib_X11_XOpenDisplay=no
15666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15667 LIBS=$ac_check_lib_save_LIBS
15669 echo "$as_me:15669: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15670 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15671 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15673 cf_add_libs="$LIBS"
15676 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15677 # filter duplicates
15678 for cf_add_1lib in $cf_add_0lib; do
15679 for cf_add_2lib in $cf_add_libs; do
15680 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15685 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15687 LIBS="$cf_add_libs"
15693 echo "$as_me:15693: checking for XtAppInitialize" >&5
15694 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15695 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15696 echo $ECHO_N "(cached) $ECHO_C" >&6
15698 cat >"conftest.$ac_ext" <<_ACEOF
15699 #line 15699 "configure"
15700 #include "confdefs.h"
15701 #define XtAppInitialize autoconf_temporary
15702 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15703 #undef XtAppInitialize
15709 /* We use char because int might match the return type of a gcc2
15710 builtin and then its argument prototype would still apply. */
15711 char XtAppInitialize (void);
15717 /* The GNU C library defines stubs for functions which it implements
15718 to always fail with ENOSYS. Some functions are actually named
15719 something starting with __ and the normal name is an alias. */
15720 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15721 #error found stub for XtAppInitialize
15724 return XtAppInitialize ();
15729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15730 if { (eval echo "$as_me:15730: \"$ac_link\"") >&5
15731 (eval $ac_link) 2>&5
15733 echo "$as_me:15733: \$? = $ac_status" >&5
15734 (exit "$ac_status"); } &&
15735 { ac_try='test -s "conftest$ac_exeext"'
15736 { (eval echo "$as_me:15736: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15739 echo "$as_me:15739: \$? = $ac_status" >&5
15740 (exit "$ac_status"); }; }; then
15741 ac_cv_func_XtAppInitialize=yes
15743 echo "$as_me: failed program was:" >&5
15744 cat "conftest.$ac_ext" >&5
15745 ac_cv_func_XtAppInitialize=no
15747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15749 echo "$as_me:15749: result: $ac_cv_func_XtAppInitialize" >&5
15750 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15751 if test "$ac_cv_func_XtAppInitialize" = yes; then
15755 echo "$as_me:15755: checking for XtAppInitialize in -lXt" >&5
15756 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15757 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15758 echo $ECHO_N "(cached) $ECHO_C" >&6
15760 ac_check_lib_save_LIBS=$LIBS
15762 cat >"conftest.$ac_ext" <<_ACEOF
15763 #line 15763 "configure"
15764 #include "confdefs.h"
15766 /* Override any gcc2 internal prototype to avoid an error. */
15770 /* We use char because int might match the return type of a gcc2
15771 builtin and then its argument prototype would still apply. */
15772 char XtAppInitialize ();
15776 XtAppInitialize ();
15781 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15782 if { (eval echo "$as_me:15782: \"$ac_link\"") >&5
15783 (eval $ac_link) 2>&5
15785 echo "$as_me:15785: \$? = $ac_status" >&5
15786 (exit "$ac_status"); } &&
15787 { ac_try='test -s "conftest$ac_exeext"'
15788 { (eval echo "$as_me:15788: \"$ac_try\"") >&5
15789 (eval $ac_try) 2>&5
15791 echo "$as_me:15791: \$? = $ac_status" >&5
15792 (exit "$ac_status"); }; }; then
15793 ac_cv_lib_Xt_XtAppInitialize=yes
15795 echo "$as_me: failed program was:" >&5
15796 cat "conftest.$ac_ext" >&5
15797 ac_cv_lib_Xt_XtAppInitialize=no
15799 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15800 LIBS=$ac_check_lib_save_LIBS
15802 echo "$as_me:15802: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15803 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15804 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15806 cat >>confdefs.h <<\EOF
15807 #define HAVE_LIBXT 1
15818 if test "$cf_have_X_LIBS" = no ; then
15819 { echo "$as_me:15819: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15820 test program. You will have to check and add the proper libraries by hand
15822 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15823 test program. You will have to check and add the proper libraries by hand
15824 to makefile." >&2;}
15827 cf_x_athena_root=$cf_x_athena
15830 for cf_path in default \
15831 /usr/contrib/X11R6 \
15832 /usr/contrib/X11R5 \
15836 if test -z "$cf_x_athena_inc" ; then
15838 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15839 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15840 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15841 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15842 for cf_X_CFLAGS in $X_CFLAGS
15844 case "x$cf_X_CFLAGS" in
15846 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15849 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15854 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15855 if test "$cf_path" != default ; then
15857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15858 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15860 echo "$as_me:15860: checking for $cf_test in $cf_path" >&5
15861 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15863 echo "$as_me:15863: checking for $cf_test" >&5
15864 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15866 cat >"conftest.$ac_ext" <<_ACEOF
15867 #line 15867 "configure"
15868 #include "confdefs.h"
15870 #include <X11/Intrinsic.h>
15871 #include <$cf_test>
15880 rm -f "conftest.$ac_objext"
15881 if { (eval echo "$as_me:15881: \"$ac_compile\"") >&5
15882 (eval $ac_compile) 2>&5
15884 echo "$as_me:15884: \$? = $ac_status" >&5
15885 (exit "$ac_status"); } &&
15886 { ac_try='test -s "conftest.$ac_objext"'
15887 { (eval echo "$as_me:15887: \"$ac_try\"") >&5
15888 (eval $ac_try) 2>&5
15890 echo "$as_me:15890: \$? = $ac_status" >&5
15891 (exit "$ac_status"); }; }; then
15894 echo "$as_me: failed program was:" >&5
15895 cat "conftest.$ac_ext" >&5
15898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15899 echo "$as_me:15899: result: $cf_result" >&5
15900 echo "${ECHO_T}$cf_result" >&6
15902 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15903 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15904 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15906 if test "$cf_result" = yes ; then
15907 test "$cf_path" = default && cf_x_athena_inc=default
15908 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15914 if test -z "$cf_x_athena_inc" ; then
15915 { echo "$as_me:15915: WARNING: Unable to find Athena header files" >&5
15916 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15917 elif test "$cf_x_athena_inc" != default ; then
15919 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15920 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15924 cf_x_athena_root=$cf_x_athena
15927 for cf_path in default \
15928 /usr/contrib/X11R6 \
15929 /usr/contrib/X11R5 \
15934 ${cf_x_athena_root} \
15935 ${cf_x_athena_root}7 \
15936 ${cf_x_athena_root}6
15939 "-l$cf_lib -lXmu" \
15940 "-l$cf_lib -lXpm -lXmu" \
15941 "-l${cf_lib}_s -lXmu_s"
15943 test -n "$cf_x_athena_lib" && break
15945 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15946 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15947 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15948 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15949 for cf_X_CFLAGS in $X_CFLAGS
15951 case "x$cf_X_CFLAGS" in
15953 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15956 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15961 cf_test=XawSimpleMenuAddGlobalActions
15962 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15964 cf_add_libs="$LIBS"
15967 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15968 # filter duplicates
15969 for cf_add_1lib in $cf_add_0lib; do
15970 for cf_add_2lib in $cf_add_libs; do
15971 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15976 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15978 LIBS="$cf_add_libs"
15980 echo "$as_me:15980: checking for $cf_test in $cf_libs" >&5
15981 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15982 cat >"conftest.$ac_ext" <<_ACEOF
15983 #line 15983 "configure"
15984 #include "confdefs.h"
15986 $ac_includes_default
15987 #include <X11/Intrinsic.h>
15988 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15994 $cf_test((XtAppContext) 0)
15999 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16000 if { (eval echo "$as_me:16000: \"$ac_link\"") >&5
16001 (eval $ac_link) 2>&5
16003 echo "$as_me:16003: \$? = $ac_status" >&5
16004 (exit "$ac_status"); } &&
16005 { ac_try='test -s "conftest$ac_exeext"'
16006 { (eval echo "$as_me:16006: \"$ac_try\"") >&5
16007 (eval $ac_try) 2>&5
16009 echo "$as_me:16009: \$? = $ac_status" >&5
16010 (exit "$ac_status"); }; }; then
16013 echo "$as_me: failed program was:" >&5
16014 cat "conftest.$ac_ext" >&5
16017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16018 echo "$as_me:16018: result: $cf_result" >&5
16019 echo "${ECHO_T}$cf_result" >&6
16021 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16022 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16023 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16025 if test "$cf_result" = yes ; then
16026 cf_x_athena_lib="$cf_libs"
16030 test -n "$cf_x_athena_lib" && break
16034 if test -z "$cf_x_athena_lib" ; then
16035 { { echo "$as_me:16035: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16036 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16037 { (exit 1); exit 1; }; }
16040 cf_add_libs="$LIBS"
16043 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16044 # filter duplicates
16045 for cf_add_1lib in $cf_add_0lib; do
16046 for cf_add_2lib in $cf_add_libs; do
16047 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16052 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16054 LIBS="$cf_add_libs"
16056 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16058 cat >>confdefs.h <<EOF
16059 #define $cf_x_athena_LIBS 1
16064 if test -n "$ac_tool_prefix"; then
16065 for ac_prog in xcurses-config
16067 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16068 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16069 echo "$as_me:16069: checking for $ac_word" >&5
16070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16071 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16072 echo $ECHO_N "(cached) $ECHO_C" >&6
16074 if test -n "$XCURSES_CONFIG"; then
16075 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16077 ac_save_IFS=$IFS; IFS=$ac_path_separator
16079 for ac_dir in $ac_dummy; do
16081 test -z "$ac_dir" && ac_dir=.
16082 $as_executable_p "$ac_dir/$ac_word" || continue
16083 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16084 echo "$as_me:16084: found $ac_dir/$ac_word" >&5
16090 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16091 if test -n "$XCURSES_CONFIG"; then
16092 echo "$as_me:16092: result: $XCURSES_CONFIG" >&5
16093 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16095 echo "$as_me:16095: result: no" >&5
16096 echo "${ECHO_T}no" >&6
16099 test -n "$XCURSES_CONFIG" && break
16102 if test -z "$XCURSES_CONFIG"; then
16103 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16104 for ac_prog in xcurses-config
16106 # Extract the first word of "$ac_prog", so it can be a program name with args.
16107 set dummy $ac_prog; ac_word=$2
16108 echo "$as_me:16108: checking for $ac_word" >&5
16109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16110 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16111 echo $ECHO_N "(cached) $ECHO_C" >&6
16113 if test -n "$ac_ct_XCURSES_CONFIG"; then
16114 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16116 ac_save_IFS=$IFS; IFS=$ac_path_separator
16118 for ac_dir in $ac_dummy; do
16120 test -z "$ac_dir" && ac_dir=.
16121 $as_executable_p "$ac_dir/$ac_word" || continue
16122 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16123 echo "$as_me:16123: found $ac_dir/$ac_word" >&5
16129 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16130 if test -n "$ac_ct_XCURSES_CONFIG"; then
16131 echo "$as_me:16131: result: $ac_ct_XCURSES_CONFIG" >&5
16132 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16134 echo "$as_me:16134: result: no" >&5
16135 echo "${ECHO_T}no" >&6
16138 test -n "$ac_ct_XCURSES_CONFIG" && break
16140 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16142 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16145 if test "$XCURSES_CONFIG" != none ; then
16150 cf_new_extra_cppflags=
16152 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16154 case "$cf_fix_cppflags" in
16156 case "$cf_add_cflags" in
16157 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16158 case "$cf_add_cflags" in
16160 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16162 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16163 && test -z "${cf_tst_cflags}" \
16164 && cf_fix_cppflags=yes
16166 if test "$cf_fix_cppflags" = yes ; then
16168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16172 elif test "${cf_tst_cflags}" = "\"'" ; then
16174 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16175 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16181 case "$CPPFLAGS" in
16185 case "$cf_add_cflags" in
16187 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16189 CPPFLAGS=`echo "$CPPFLAGS" | \
16190 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16191 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16196 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16197 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16204 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16205 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16212 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16213 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16215 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16218 && test -z "${cf_tst_cflags}" \
16219 && cf_fix_cppflags=no
16224 if test -n "$cf_new_cflags" ; then
16226 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16227 CFLAGS="${CFLAGS}$cf_new_cflags"
16231 if test -n "$cf_new_cppflags" ; then
16233 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16234 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16238 if test -n "$cf_new_extra_cppflags" ; then
16240 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16241 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16245 cf_add_libs="$LIBS"
16248 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16249 # filter duplicates
16250 for cf_add_1lib in $cf_add_0lib; do
16251 for cf_add_2lib in $cf_add_libs; do
16252 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16259 LIBS="$cf_add_libs"
16261 cf_cv_lib_XCurses=yes
16265 LDFLAGS="$LDFLAGS $X_LIBS"
16267 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16269 echo "${as_me:-configure}:16269: testing checking additions to CFLAGS ..." 1>&5
16271 cf_check_cflags="$CFLAGS"
16272 cf_check_cppflags="$CPPFLAGS"
16277 cf_new_extra_cppflags=
16279 for cf_add_cflags in $X_CFLAGS
16281 case "$cf_fix_cppflags" in
16283 case "$cf_add_cflags" in
16284 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16285 case "$cf_add_cflags" in
16287 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16289 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16290 && test -z "${cf_tst_cflags}" \
16291 && cf_fix_cppflags=yes
16293 if test "$cf_fix_cppflags" = yes ; then
16295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16299 elif test "${cf_tst_cflags}" = "\"'" ; then
16301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16308 case "$CPPFLAGS" in
16312 case "$cf_add_cflags" in
16314 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16316 CPPFLAGS=`echo "$CPPFLAGS" | \
16317 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16318 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16323 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16324 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16331 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16332 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16339 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16340 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16342 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16344 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16345 && test -z "${cf_tst_cflags}" \
16346 && cf_fix_cppflags=no
16351 if test -n "$cf_new_cflags" ; then
16352 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16354 echo "${as_me:-configure}:16354: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16356 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16357 CFLAGS="${CFLAGS}$cf_new_cflags"
16361 if test -n "$cf_new_cppflags" ; then
16362 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16364 echo "${as_me:-configure}:16364: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16367 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16371 if test -n "$cf_new_extra_cppflags" ; then
16372 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16374 echo "${as_me:-configure}:16374: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16376 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16377 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16381 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16382 cat >"conftest.$ac_ext" <<_ACEOF
16383 #line 16383 "configure"
16384 #include "confdefs.h"
16389 printf("Hello world");
16394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16395 if { (eval echo "$as_me:16395: \"$ac_link\"") >&5
16396 (eval $ac_link) 2>&5
16398 echo "$as_me:16398: \$? = $ac_status" >&5
16399 (exit "$ac_status"); } &&
16400 { ac_try='test -s "conftest$ac_exeext"'
16401 { (eval echo "$as_me:16401: \"$ac_try\"") >&5
16402 (eval $ac_try) 2>&5
16404 echo "$as_me:16404: \$? = $ac_status" >&5
16405 (exit "$ac_status"); }; }; then
16408 echo "$as_me: failed program was:" >&5
16409 cat "conftest.$ac_ext" >&5
16410 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16412 echo "${as_me:-configure}:16412: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16414 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16415 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16417 echo "${as_me:-configure}:16417: testing but keeping change to \$CPPFLAGS ..." 1>&5
16420 CFLAGS="$cf_check_cflags"
16422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16425 echo "$as_me:16425: checking for XOpenDisplay in -lX11" >&5
16426 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16427 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16428 echo $ECHO_N "(cached) $ECHO_C" >&6
16430 ac_check_lib_save_LIBS=$LIBS
16431 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16432 cat >"conftest.$ac_ext" <<_ACEOF
16433 #line 16433 "configure"
16434 #include "confdefs.h"
16436 /* Override any gcc2 internal prototype to avoid an error. */
16440 /* We use char because int might match the return type of a gcc2
16441 builtin and then its argument prototype would still apply. */
16442 char XOpenDisplay ();
16451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16452 if { (eval echo "$as_me:16452: \"$ac_link\"") >&5
16453 (eval $ac_link) 2>&5
16455 echo "$as_me:16455: \$? = $ac_status" >&5
16456 (exit "$ac_status"); } &&
16457 { ac_try='test -s "conftest$ac_exeext"'
16458 { (eval echo "$as_me:16458: \"$ac_try\"") >&5
16459 (eval $ac_try) 2>&5
16461 echo "$as_me:16461: \$? = $ac_status" >&5
16462 (exit "$ac_status"); }; }; then
16463 ac_cv_lib_X11_XOpenDisplay=yes
16465 echo "$as_me: failed program was:" >&5
16466 cat "conftest.$ac_ext" >&5
16467 ac_cv_lib_X11_XOpenDisplay=no
16469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16470 LIBS=$ac_check_lib_save_LIBS
16472 echo "$as_me:16472: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16473 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16474 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16476 cf_add_libs="$LIBS"
16479 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16480 # filter duplicates
16481 for cf_add_1lib in $cf_add_0lib; do
16482 for cf_add_2lib in $cf_add_libs; do
16483 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16488 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16490 LIBS="$cf_add_libs"
16494 echo "$as_me:16494: checking for XCurses library" >&5
16495 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16496 if test "${cf_cv_lib_XCurses+set}" = set; then
16497 echo $ECHO_N "(cached) $ECHO_C" >&6
16500 cf_add_libs="$LIBS"
16503 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16504 # filter duplicates
16505 for cf_add_1lib in $cf_add_0lib; do
16506 for cf_add_2lib in $cf_add_libs; do
16507 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16512 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16514 LIBS="$cf_add_libs"
16516 cat >"conftest.$ac_ext" <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16520 #include <xcurses.h>
16521 char *XCursesProgramName = "test";
16531 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16532 if { (eval echo "$as_me:16532: \"$ac_link\"") >&5
16533 (eval $ac_link) 2>&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit "$ac_status"); } &&
16537 { ac_try='test -s "conftest$ac_exeext"'
16538 { (eval echo "$as_me:16538: \"$ac_try\"") >&5
16539 (eval $ac_try) 2>&5
16541 echo "$as_me:16541: \$? = $ac_status" >&5
16542 (exit "$ac_status"); }; }; then
16543 cf_cv_lib_XCurses=yes
16545 echo "$as_me: failed program was:" >&5
16546 cat "conftest.$ac_ext" >&5
16547 cf_cv_lib_XCurses=no
16549 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16552 echo "$as_me:16552: result: $cf_cv_lib_XCurses" >&5
16553 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16557 if test "$cf_cv_lib_XCurses" = yes ; then
16559 cat >>confdefs.h <<\EOF
16563 cat >>confdefs.h <<\EOF
16567 echo "$as_me:16567: checking for xcurses.h" >&5
16568 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16569 if test "${ac_cv_header_xcurses_h+set}" = set; then
16570 echo $ECHO_N "(cached) $ECHO_C" >&6
16572 cat >"conftest.$ac_ext" <<_ACEOF
16573 #line 16573 "configure"
16574 #include "confdefs.h"
16575 #include <xcurses.h>
16577 if { (eval echo "$as_me:16577: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16578 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16580 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16582 cat conftest.err >&5
16583 echo "$as_me:16583: \$? = $ac_status" >&5
16584 (exit "$ac_status"); } >/dev/null; then
16585 if test -s conftest.err; then
16586 ac_cpp_err=$ac_c_preproc_warn_flag
16593 if test -z "$ac_cpp_err"; then
16594 ac_cv_header_xcurses_h=yes
16596 echo "$as_me: failed program was:" >&5
16597 cat "conftest.$ac_ext" >&5
16598 ac_cv_header_xcurses_h=no
16600 rm -f conftest.err "conftest.$ac_ext"
16602 echo "$as_me:16602: result: $ac_cv_header_xcurses_h" >&5
16603 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16604 if test "$ac_cv_header_xcurses_h" = yes; then
16606 cat >>confdefs.h <<\EOF
16607 #define HAVE_XCURSES 1
16613 { { echo "$as_me:16613: error: Cannot link with XCurses" >&5
16614 echo "$as_me: error: Cannot link with XCurses" >&2;}
16615 { (exit 1); exit 1; }; }
16620 { { echo "$as_me:16620: error: unexpected screen-value: $cf_cv_screen" >&5
16621 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16622 { (exit 1); exit 1; }; }
16626 : ${cf_nculib_root:=$cf_cv_screen}
16627 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16628 echo "$as_me:16628: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16629 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16630 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16631 echo $ECHO_N "(cached) $ECHO_C" >&6
16633 ac_check_lib_save_LIBS=$LIBS
16634 LIBS="-l$cf_nculib_root $LIBS"
16635 cat >"conftest.$ac_ext" <<_ACEOF
16636 #line 16636 "configure"
16637 #include "confdefs.h"
16639 /* Override any gcc2 internal prototype to avoid an error. */
16643 /* We use char because int might match the return type of a gcc2
16644 builtin and then its argument prototype would still apply. */
16645 char _nc_init_pthreads ();
16649 _nc_init_pthreads ();
16654 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16655 if { (eval echo "$as_me:16655: \"$ac_link\"") >&5
16656 (eval $ac_link) 2>&5
16658 echo "$as_me:16658: \$? = $ac_status" >&5
16659 (exit "$ac_status"); } &&
16660 { ac_try='test -s "conftest$ac_exeext"'
16661 { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662 (eval $ac_try) 2>&5
16664 echo "$as_me:16664: \$? = $ac_status" >&5
16665 (exit "$ac_status"); }; }; then
16666 eval "$as_ac_Lib=yes"
16668 echo "$as_me: failed program was:" >&5
16669 cat "conftest.$ac_ext" >&5
16670 eval "$as_ac_Lib=no"
16672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16673 LIBS=$ac_check_lib_save_LIBS
16675 echo "$as_me:16675: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16676 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16677 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16678 cf_cv_ncurses_pthreads=yes
16680 cf_cv_ncurses_pthreads=no
16683 if test "$cf_cv_ncurses_pthreads" = yes
16686 cf_add_libs="$LIBS"
16689 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16690 # filter duplicates
16691 for cf_add_1lib in $cf_add_0lib; do
16692 for cf_add_2lib in $cf_add_libs; do
16693 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16700 LIBS="$cf_add_libs"
16704 case $cf_cv_screen in
16706 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16710 echo "$as_me:16710: checking for X11 rgb file" >&5
16711 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16713 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16714 if test "${with_x11_rgb+set}" = set; then
16715 withval="$with_x11_rgb"
16721 if test "x$RGB_PATH" = xauto
16723 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16725 /opt/local/share/X11/rgb.txt \
16726 /opt/X11/share/X11/rgb.txt \
16727 /usr/share/X11/rgb.txt \
16728 /usr/X11/share/X11/rgb.txt \
16729 /usr/X11/lib/X11/rgb.txt \
16730 /usr/lib/X11/rgb.txt \
16732 /usr/pkg/lib/X11/rgb.txt \
16733 /usr/X11R7/lib/X11/rgb.txt \
16734 /usr/X11R6/lib/X11/rgb.txt \
16735 /usr/X11R5/lib/X11/rgb.txt \
16736 /usr/X11R4/lib/X11/rgb.txt \
16737 /usr/local/lib/X11/rgb.txt \
16738 /usr/local/share/X11/rgb.txt \
16739 /usr/lib64/X11/rgb.txt
16741 if test -f "$cf_path" ; then
16742 RGB_PATH="$cf_path"
16749 if test "x$prefix" != xNONE; then
16750 cf_path_syntax="$prefix"
16752 cf_path_syntax="$ac_default_prefix"
16755 case ".$cf_path" in
16756 (.\$\(*\)*|.\'*\'*)
16760 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16762 (.\$\{*prefix\}*|.\$\{*dir\}*)
16763 eval cf_path="$cf_path"
16764 case ".$cf_path" in
16766 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16771 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16774 { { echo "$as_me:16774: error: expected a pathname, not \"$cf_path\"" >&5
16775 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16776 { (exit 1); exit 1; }; }
16782 echo "$as_me:16782: result: $RGB_PATH" >&5
16783 echo "${ECHO_T}$RGB_PATH" >&6
16785 cat >>confdefs.h <<EOF
16786 #define RGB_PATH "$cf_path"
16790 if test "$RGB_PATH" = no
16797 case $cf_cv_screen in
16799 cf_default_panel=no
16802 cf_default_tinfo=no
16804 (xcurses|bsdcurses)
16805 cf_default_panel=no
16808 cf_default_tinfo=yes
16811 cf_default_panel=yes
16812 cf_default_form=yes
16813 cf_default_menu=yes
16814 cf_default_tinfo=yes
16815 case $cf_cv_screen in
16817 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16823 echo "$as_me:16823: checking for desired basename for form library" >&5
16824 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16826 # Check whether --with-form-libname or --without-form-libname was given.
16827 if test "${with_form_libname+set}" = set; then
16828 withval="$with_form_libname"
16829 with_lib_basename=$withval
16831 with_lib_basename=form
16833 FORM_NAME="$with_lib_basename"
16835 case "x$FORM_NAME" in
16843 echo "$as_me:16843: result: $FORM_NAME" >&5
16844 echo "${ECHO_T}$FORM_NAME" >&6
16846 echo "$as_me:16846: checking for desired basename for menu library" >&5
16847 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16849 # Check whether --with-menu-libname or --without-menu-libname was given.
16850 if test "${with_menu_libname+set}" = set; then
16851 withval="$with_menu_libname"
16852 with_lib_basename=$withval
16854 with_lib_basename=menu
16856 MENU_NAME="$with_lib_basename"
16858 case "x$MENU_NAME" in
16866 echo "$as_me:16866: result: $MENU_NAME" >&5
16867 echo "${ECHO_T}$MENU_NAME" >&6
16869 echo "$as_me:16869: checking for desired basename for panel library" >&5
16870 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16872 # Check whether --with-panel-libname or --without-panel-libname was given.
16873 if test "${with_panel_libname+set}" = set; then
16874 withval="$with_panel_libname"
16875 with_lib_basename=$withval
16877 with_lib_basename=panel
16879 PANEL_NAME="$with_lib_basename"
16881 case "x$PANEL_NAME" in
16889 echo "$as_me:16889: result: $PANEL_NAME" >&5
16890 echo "${ECHO_T}$PANEL_NAME" >&6
16892 echo "$as_me:16892: checking if you want to check for panel functions" >&5
16893 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16895 # Check whether --enable-panel or --disable-panel was given.
16896 if test "${enable_panel+set}" = set; then
16897 enableval="$enable_panel"
16898 test "$enableval" != no && enableval=yes
16899 if test "$enableval" != "yes" ; then
16902 cf_enable_panel=$cf_default_panel
16906 cf_enable_panel=$cf_default_panel
16909 echo "$as_me:16909: result: $cf_enable_panel" >&5
16910 echo "${ECHO_T}$cf_enable_panel" >&6
16911 if test $cf_enable_panel = yes
16914 cf_have_curses_lib=no
16916 : ${NCURSES_CONFIG_PKG:=none}
16917 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16919 elif test "x${PKG_CONFIG:=none}" != xnone; then
16920 echo "$as_me:16920: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16921 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16922 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16923 echo "$as_me:16923: result: yes" >&5
16924 echo "${ECHO_T}yes" >&6
16926 echo "$as_me:16926: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16927 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16929 cf_save_CFLAGS="$CFLAGS"
16930 cf_save_CPPFLAGS="$CPPFLAGS"
16931 cf_save_LIBS="$LIBS"
16933 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16935 case "x$cf_add_cflags" in
16938 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16941 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
16942 test "$CFLAGS" != "$cf_old_cflag" || break
16944 CFLAGS="$cf_old_cflag"
16947 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16950 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
16951 test "$CPPFLAGS" != "$cf_old_cflag" || break
16953 CPPFLAGS="$cf_old_cflag"
16962 cf_new_extra_cppflags=
16964 for cf_add_cflags in $cf_add_cflags
16966 case "$cf_fix_cppflags" in
16968 case "$cf_add_cflags" in
16969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16970 case "$cf_add_cflags" in
16972 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16975 && test -z "${cf_tst_cflags}" \
16976 && cf_fix_cppflags=yes
16978 if test "$cf_fix_cppflags" = yes ; then
16980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16984 elif test "${cf_tst_cflags}" = "\"'" ; then
16986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16993 case "$CPPFLAGS" in
16997 case "$cf_add_cflags" in
16999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17001 CPPFLAGS=`echo "$CPPFLAGS" | \
17002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17027 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17030 && test -z "${cf_tst_cflags}" \
17031 && cf_fix_cppflags=no
17036 if test -n "$cf_new_cflags" ; then
17038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17039 CFLAGS="${CFLAGS}$cf_new_cflags"
17043 if test -n "$cf_new_cppflags" ; then
17045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17050 if test -n "$cf_new_extra_cppflags" ; then
17052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17059 cf_add_libs="$LIBS"
17062 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17063 # filter duplicates
17064 for cf_add_1lib in $cf_add_0lib; do
17065 for cf_add_2lib in $cf_add_libs; do
17066 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17071 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17073 LIBS="$cf_add_libs"
17075 cat >"conftest.$ac_ext" <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078 #include <$PANEL_NAME.h>
17082 (void) new_panel ( 0 );
17087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17088 if { (eval echo "$as_me:17088: \"$ac_link\"") >&5
17089 (eval $ac_link) 2>&5
17091 echo "$as_me:17091: \$? = $ac_status" >&5
17092 (exit "$ac_status"); } &&
17093 { ac_try='test -s "conftest$ac_exeext"'
17094 { (eval echo "$as_me:17094: \"$ac_try\"") >&5
17095 (eval $ac_try) 2>&5
17097 echo "$as_me:17097: \$? = $ac_status" >&5
17098 (exit "$ac_status"); }; }; then
17099 if test "$cross_compiling" = yes; then
17100 cf_have_curses_lib=maybe
17102 cat >"conftest.$ac_ext" <<_ACEOF
17103 #line 17103 "configure"
17104 #include "confdefs.h"
17105 #include <$PANEL_NAME.h>
17107 { (void) new_panel ( 0 ); return 0; }
17109 rm -f "conftest$ac_exeext"
17110 if { (eval echo "$as_me:17110: \"$ac_link\"") >&5
17111 (eval $ac_link) 2>&5
17113 echo "$as_me:17113: \$? = $ac_status" >&5
17114 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17115 { (eval echo "$as_me:17115: \"$ac_try\"") >&5
17116 (eval $ac_try) 2>&5
17118 echo "$as_me:17118: \$? = $ac_status" >&5
17119 (exit "$ac_status"); }; }; then
17120 cf_have_curses_lib=yes
17122 echo "$as_me: program exited with status $ac_status" >&5
17123 echo "$as_me: failed program was:" >&5
17124 cat "conftest.$ac_ext" >&5
17125 cf_have_curses_lib=no
17127 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17130 echo "$as_me: failed program was:" >&5
17131 cat "conftest.$ac_ext" >&5
17132 cf_have_curses_lib=no
17134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17135 echo "$as_me:17135: result: $cf_have_curses_lib" >&5
17136 echo "${ECHO_T}$cf_have_curses_lib" >&6
17137 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17138 if test "$cf_have_curses_lib" = "yes"
17141 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17143 cat >>confdefs.h <<EOF
17144 #define $cf_upper 1
17148 CFLAGS="$cf_save_CFLAGS"
17149 CPPFLAGS="$cf_save_CPPFLAGS"
17150 LIBS="$cf_save_LIBS"
17154 if test "$cf_have_curses_lib" = no; then
17155 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17156 echo "$as_me:17156: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17157 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17158 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17159 echo $ECHO_N "(cached) $ECHO_C" >&6
17161 ac_check_lib_save_LIBS=$LIBS
17162 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17163 cat >"conftest.$ac_ext" <<_ACEOF
17164 #line 17164 "configure"
17165 #include "confdefs.h"
17167 /* Override any gcc2 internal prototype to avoid an error. */
17171 /* We use char because int might match the return type of a gcc2
17172 builtin and then its argument prototype would still apply. */
17182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17183 if { (eval echo "$as_me:17183: \"$ac_link\"") >&5
17184 (eval $ac_link) 2>&5
17186 echo "$as_me:17186: \$? = $ac_status" >&5
17187 (exit "$ac_status"); } &&
17188 { ac_try='test -s "conftest$ac_exeext"'
17189 { (eval echo "$as_me:17189: \"$ac_try\"") >&5
17190 (eval $ac_try) 2>&5
17192 echo "$as_me:17192: \$? = $ac_status" >&5
17193 (exit "$ac_status"); }; }; then
17194 eval "$as_ac_Lib=yes"
17196 echo "$as_me: failed program was:" >&5
17197 cat "conftest.$ac_ext" >&5
17198 eval "$as_ac_Lib=no"
17200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17201 LIBS=$ac_check_lib_save_LIBS
17203 echo "$as_me:17203: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17204 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17205 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17207 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17209 cf_add_libs="$LIBS"
17212 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17213 # filter duplicates
17214 for cf_add_1lib in $cf_add_0lib; do
17215 for cf_add_2lib in $cf_add_libs; do
17216 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17223 LIBS="$cf_add_libs"
17225 cat >>confdefs.h <<EOF
17226 #define $cf_upper 1
17233 cf_curses_headers="$cf_curses_headers panel.h"
17236 echo "$as_me:17236: checking if you want to check for menu functions" >&5
17237 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17239 # Check whether --enable-menu or --disable-menu was given.
17240 if test "${enable_menu+set}" = set; then
17241 enableval="$enable_menu"
17242 test "$enableval" != no && enableval=yes
17243 if test "$enableval" != "yes" ; then
17246 cf_enable_menu=$cf_default_menu
17250 cf_enable_menu=$cf_default_menu
17253 echo "$as_me:17253: result: $cf_enable_menu" >&5
17254 echo "${ECHO_T}$cf_enable_menu" >&6
17255 if test $cf_enable_menu = yes
17257 case $cf_cv_screen in
17262 echo "$as_me:17262: checking for NetBSD menu.h" >&5
17263 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17264 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17265 echo $ECHO_N "(cached) $ECHO_C" >&6
17268 cat >"conftest.$ac_ext" <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17272 #include <${cf_cv_ncurses_header:-curses.h}>
17280 int y = menu->max_item_width;
17286 rm -f "conftest.$ac_objext"
17287 if { (eval echo "$as_me:17287: \"$ac_compile\"") >&5
17288 (eval $ac_compile) 2>&5
17290 echo "$as_me:17290: \$? = $ac_status" >&5
17291 (exit "$ac_status"); } &&
17292 { ac_try='test -s "conftest.$ac_objext"'
17293 { (eval echo "$as_me:17293: \"$ac_try\"") >&5
17294 (eval $ac_try) 2>&5
17296 echo "$as_me:17296: \$? = $ac_status" >&5
17297 (exit "$ac_status"); }; }; then
17298 cf_cv_netbsd_menu_h=yes
17301 echo "$as_me: failed program was:" >&5
17302 cat "conftest.$ac_ext" >&5
17303 cf_cv_netbsd_menu_h=no
17305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17308 echo "$as_me:17308: result: $cf_cv_netbsd_menu_h" >&5
17309 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
17311 test "$cf_cv_netbsd_menu_h" = yes &&
17312 cat >>confdefs.h <<\EOF
17313 #define HAVE_NETBSD_MENU_H 1
17319 cf_have_curses_lib=no
17321 : ${NCURSES_CONFIG_PKG:=none}
17322 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17324 elif test "x${PKG_CONFIG:=none}" != xnone; then
17325 echo "$as_me:17325: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
17326 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17327 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
17328 echo "$as_me:17328: result: yes" >&5
17329 echo "${ECHO_T}yes" >&6
17331 echo "$as_me:17331: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
17332 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17334 cf_save_CFLAGS="$CFLAGS"
17335 cf_save_CPPFLAGS="$CPPFLAGS"
17336 cf_save_LIBS="$LIBS"
17338 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
17340 case "x$cf_add_cflags" in
17343 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17346 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17347 test "$CFLAGS" != "$cf_old_cflag" || break
17349 CFLAGS="$cf_old_cflag"
17352 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17355 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17356 test "$CPPFLAGS" != "$cf_old_cflag" || break
17358 CPPFLAGS="$cf_old_cflag"
17367 cf_new_extra_cppflags=
17369 for cf_add_cflags in $cf_add_cflags
17371 case "$cf_fix_cppflags" in
17373 case "$cf_add_cflags" in
17374 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17375 case "$cf_add_cflags" in
17377 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17379 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17380 && test -z "${cf_tst_cflags}" \
17381 && cf_fix_cppflags=yes
17383 if test "$cf_fix_cppflags" = yes ; then
17385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17389 elif test "${cf_tst_cflags}" = "\"'" ; then
17391 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17392 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17398 case "$CPPFLAGS" in
17402 case "$cf_add_cflags" in
17404 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17406 CPPFLAGS=`echo "$CPPFLAGS" | \
17407 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17408 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17413 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17414 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17421 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17422 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17429 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17430 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17432 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17434 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17435 && test -z "${cf_tst_cflags}" \
17436 && cf_fix_cppflags=no
17441 if test -n "$cf_new_cflags" ; then
17443 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17444 CFLAGS="${CFLAGS}$cf_new_cflags"
17448 if test -n "$cf_new_cppflags" ; then
17450 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17451 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17455 if test -n "$cf_new_extra_cppflags" ; then
17457 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17458 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17464 cf_add_libs="$LIBS"
17467 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17468 # filter duplicates
17469 for cf_add_1lib in $cf_add_0lib; do
17470 for cf_add_2lib in $cf_add_libs; do
17471 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17476 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17478 LIBS="$cf_add_libs"
17480 cat >"conftest.$ac_ext" <<_ACEOF
17481 #line 17481 "configure"
17482 #include "confdefs.h"
17483 #include <$MENU_NAME.h>
17487 (void) menu_driver ( 0,0 );
17492 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17493 if { (eval echo "$as_me:17493: \"$ac_link\"") >&5
17494 (eval $ac_link) 2>&5
17496 echo "$as_me:17496: \$? = $ac_status" >&5
17497 (exit "$ac_status"); } &&
17498 { ac_try='test -s "conftest$ac_exeext"'
17499 { (eval echo "$as_me:17499: \"$ac_try\"") >&5
17500 (eval $ac_try) 2>&5
17502 echo "$as_me:17502: \$? = $ac_status" >&5
17503 (exit "$ac_status"); }; }; then
17504 if test "$cross_compiling" = yes; then
17505 cf_have_curses_lib=maybe
17507 cat >"conftest.$ac_ext" <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510 #include <$MENU_NAME.h>
17512 { (void) menu_driver ( 0,0 ); return 0; }
17514 rm -f "conftest$ac_exeext"
17515 if { (eval echo "$as_me:17515: \"$ac_link\"") >&5
17516 (eval $ac_link) 2>&5
17518 echo "$as_me:17518: \$? = $ac_status" >&5
17519 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17520 { (eval echo "$as_me:17520: \"$ac_try\"") >&5
17521 (eval $ac_try) 2>&5
17523 echo "$as_me:17523: \$? = $ac_status" >&5
17524 (exit "$ac_status"); }; }; then
17525 cf_have_curses_lib=yes
17527 echo "$as_me: program exited with status $ac_status" >&5
17528 echo "$as_me: failed program was:" >&5
17529 cat "conftest.$ac_ext" >&5
17530 cf_have_curses_lib=no
17532 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17535 echo "$as_me: failed program was:" >&5
17536 cat "conftest.$ac_ext" >&5
17537 cf_have_curses_lib=no
17539 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17540 echo "$as_me:17540: result: $cf_have_curses_lib" >&5
17541 echo "${ECHO_T}$cf_have_curses_lib" >&6
17542 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17543 if test "$cf_have_curses_lib" = "yes"
17546 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17548 cat >>confdefs.h <<EOF
17549 #define $cf_upper 1
17553 CFLAGS="$cf_save_CFLAGS"
17554 CPPFLAGS="$cf_save_CPPFLAGS"
17555 LIBS="$cf_save_LIBS"
17559 if test "$cf_have_curses_lib" = no; then
17560 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17561 echo "$as_me:17561: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17562 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17563 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17564 echo $ECHO_N "(cached) $ECHO_C" >&6
17566 ac_check_lib_save_LIBS=$LIBS
17567 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17568 cat >"conftest.$ac_ext" <<_ACEOF
17569 #line 17569 "configure"
17570 #include "confdefs.h"
17572 /* Override any gcc2 internal prototype to avoid an error. */
17576 /* We use char because int might match the return type of a gcc2
17577 builtin and then its argument prototype would still apply. */
17578 char menu_driver ();
17587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17588 if { (eval echo "$as_me:17588: \"$ac_link\"") >&5
17589 (eval $ac_link) 2>&5
17591 echo "$as_me:17591: \$? = $ac_status" >&5
17592 (exit "$ac_status"); } &&
17593 { ac_try='test -s "conftest$ac_exeext"'
17594 { (eval echo "$as_me:17594: \"$ac_try\"") >&5
17595 (eval $ac_try) 2>&5
17597 echo "$as_me:17597: \$? = $ac_status" >&5
17598 (exit "$ac_status"); }; }; then
17599 eval "$as_ac_Lib=yes"
17601 echo "$as_me: failed program was:" >&5
17602 cat "conftest.$ac_ext" >&5
17603 eval "$as_ac_Lib=no"
17605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17606 LIBS=$ac_check_lib_save_LIBS
17608 echo "$as_me:17608: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17609 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17610 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17612 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17614 cf_add_libs="$LIBS"
17617 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17618 # filter duplicates
17619 for cf_add_1lib in $cf_add_0lib; do
17620 for cf_add_2lib in $cf_add_libs; do
17621 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17626 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17628 LIBS="$cf_add_libs"
17630 cat >>confdefs.h <<EOF
17631 #define $cf_upper 1
17638 cf_curses_headers="$cf_curses_headers menu.h"
17641 echo "$as_me:17641: checking if you want to check for form functions" >&5
17642 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17644 # Check whether --enable-form or --disable-form was given.
17645 if test "${enable_form+set}" = set; then
17646 enableval="$enable_form"
17647 test "$enableval" != no && enableval=yes
17648 if test "$enableval" != "yes" ; then
17651 cf_enable_form=$cf_default_form
17655 cf_enable_form=$cf_default_form
17658 echo "$as_me:17658: result: $cf_enable_form" >&5
17659 echo "${ECHO_T}$cf_enable_form" >&6
17660 if test $cf_enable_form = yes
17662 case $cf_cv_screen in
17667 echo "$as_me:17667: checking for NetBSD form.h" >&5
17668 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17669 if test "${cf_cv_netbsd_form_h+set}" = set; then
17670 echo $ECHO_N "(cached) $ECHO_C" >&6
17673 cat >"conftest.$ac_ext" <<_ACEOF
17674 #line 17674 "configure"
17675 #include "confdefs.h"
17677 #include <${cf_cv_ncurses_header:-curses.h}>
17685 int y = current_field(form)->cursor_ypos;
17686 int x = current_field(form)->cursor_xpos;
17692 rm -f "conftest.$ac_objext"
17693 if { (eval echo "$as_me:17693: \"$ac_compile\"") >&5
17694 (eval $ac_compile) 2>&5
17696 echo "$as_me:17696: \$? = $ac_status" >&5
17697 (exit "$ac_status"); } &&
17698 { ac_try='test -s "conftest.$ac_objext"'
17699 { (eval echo "$as_me:17699: \"$ac_try\"") >&5
17700 (eval $ac_try) 2>&5
17702 echo "$as_me:17702: \$? = $ac_status" >&5
17703 (exit "$ac_status"); }; }; then
17704 cf_cv_netbsd_form_h=yes
17707 echo "$as_me: failed program was:" >&5
17708 cat "conftest.$ac_ext" >&5
17709 cf_cv_netbsd_form_h=no
17711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17714 echo "$as_me:17714: result: $cf_cv_netbsd_form_h" >&5
17715 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17717 test "$cf_cv_netbsd_form_h" = yes &&
17718 cat >>confdefs.h <<\EOF
17719 #define HAVE_NETBSD_FORM_H 1
17725 cf_have_curses_lib=no
17727 : ${NCURSES_CONFIG_PKG:=none}
17728 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17730 elif test "x${PKG_CONFIG:=none}" != xnone; then
17731 echo "$as_me:17731: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17732 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17733 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17734 echo "$as_me:17734: result: yes" >&5
17735 echo "${ECHO_T}yes" >&6
17737 echo "$as_me:17737: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17738 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17740 cf_save_CFLAGS="$CFLAGS"
17741 cf_save_CPPFLAGS="$CPPFLAGS"
17742 cf_save_LIBS="$LIBS"
17744 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17746 case "x$cf_add_cflags" in
17749 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17752 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17753 test "$CFLAGS" != "$cf_old_cflag" || break
17755 CFLAGS="$cf_old_cflag"
17758 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17761 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17762 test "$CPPFLAGS" != "$cf_old_cflag" || break
17764 CPPFLAGS="$cf_old_cflag"
17773 cf_new_extra_cppflags=
17775 for cf_add_cflags in $cf_add_cflags
17777 case "$cf_fix_cppflags" in
17779 case "$cf_add_cflags" in
17780 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17781 case "$cf_add_cflags" in
17783 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17786 && test -z "${cf_tst_cflags}" \
17787 && cf_fix_cppflags=yes
17789 if test "$cf_fix_cppflags" = yes ; then
17791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17795 elif test "${cf_tst_cflags}" = "\"'" ; then
17797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17804 case "$CPPFLAGS" in
17808 case "$cf_add_cflags" in
17810 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17812 CPPFLAGS=`echo "$CPPFLAGS" | \
17813 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17814 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17819 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17820 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17827 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17828 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17838 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17841 && test -z "${cf_tst_cflags}" \
17842 && cf_fix_cppflags=no
17847 if test -n "$cf_new_cflags" ; then
17849 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17850 CFLAGS="${CFLAGS}$cf_new_cflags"
17854 if test -n "$cf_new_cppflags" ; then
17856 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17857 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17861 if test -n "$cf_new_extra_cppflags" ; then
17863 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17864 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17870 cf_add_libs="$LIBS"
17873 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17874 # filter duplicates
17875 for cf_add_1lib in $cf_add_0lib; do
17876 for cf_add_2lib in $cf_add_libs; do
17877 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17882 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17884 LIBS="$cf_add_libs"
17886 cat >"conftest.$ac_ext" <<_ACEOF
17887 #line 17887 "configure"
17888 #include "confdefs.h"
17889 #include <$FORM_NAME.h>
17893 (void) form_driver ( 0,0 );
17898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17899 if { (eval echo "$as_me:17899: \"$ac_link\"") >&5
17900 (eval $ac_link) 2>&5
17902 echo "$as_me:17902: \$? = $ac_status" >&5
17903 (exit "$ac_status"); } &&
17904 { ac_try='test -s "conftest$ac_exeext"'
17905 { (eval echo "$as_me:17905: \"$ac_try\"") >&5
17906 (eval $ac_try) 2>&5
17908 echo "$as_me:17908: \$? = $ac_status" >&5
17909 (exit "$ac_status"); }; }; then
17910 if test "$cross_compiling" = yes; then
17911 cf_have_curses_lib=maybe
17913 cat >"conftest.$ac_ext" <<_ACEOF
17914 #line 17914 "configure"
17915 #include "confdefs.h"
17916 #include <$FORM_NAME.h>
17918 { (void) form_driver ( 0,0 ); return 0; }
17920 rm -f "conftest$ac_exeext"
17921 if { (eval echo "$as_me:17921: \"$ac_link\"") >&5
17922 (eval $ac_link) 2>&5
17924 echo "$as_me:17924: \$? = $ac_status" >&5
17925 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17926 { (eval echo "$as_me:17926: \"$ac_try\"") >&5
17927 (eval $ac_try) 2>&5
17929 echo "$as_me:17929: \$? = $ac_status" >&5
17930 (exit "$ac_status"); }; }; then
17931 cf_have_curses_lib=yes
17933 echo "$as_me: program exited with status $ac_status" >&5
17934 echo "$as_me: failed program was:" >&5
17935 cat "conftest.$ac_ext" >&5
17936 cf_have_curses_lib=no
17938 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17941 echo "$as_me: failed program was:" >&5
17942 cat "conftest.$ac_ext" >&5
17943 cf_have_curses_lib=no
17945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17946 echo "$as_me:17946: result: $cf_have_curses_lib" >&5
17947 echo "${ECHO_T}$cf_have_curses_lib" >&6
17948 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17949 if test "$cf_have_curses_lib" = "yes"
17952 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17954 cat >>confdefs.h <<EOF
17955 #define $cf_upper 1
17959 CFLAGS="$cf_save_CFLAGS"
17960 CPPFLAGS="$cf_save_CPPFLAGS"
17961 LIBS="$cf_save_LIBS"
17965 if test "$cf_have_curses_lib" = no; then
17966 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17967 echo "$as_me:17967: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17968 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17969 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17970 echo $ECHO_N "(cached) $ECHO_C" >&6
17972 ac_check_lib_save_LIBS=$LIBS
17973 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17974 cat >"conftest.$ac_ext" <<_ACEOF
17975 #line 17975 "configure"
17976 #include "confdefs.h"
17978 /* Override any gcc2 internal prototype to avoid an error. */
17982 /* We use char because int might match the return type of a gcc2
17983 builtin and then its argument prototype would still apply. */
17984 char form_driver ();
17993 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17994 if { (eval echo "$as_me:17994: \"$ac_link\"") >&5
17995 (eval $ac_link) 2>&5
17997 echo "$as_me:17997: \$? = $ac_status" >&5
17998 (exit "$ac_status"); } &&
17999 { ac_try='test -s "conftest$ac_exeext"'
18000 { (eval echo "$as_me:18000: \"$ac_try\"") >&5
18001 (eval $ac_try) 2>&5
18003 echo "$as_me:18003: \$? = $ac_status" >&5
18004 (exit "$ac_status"); }; }; then
18005 eval "$as_ac_Lib=yes"
18007 echo "$as_me: failed program was:" >&5
18008 cat "conftest.$ac_ext" >&5
18009 eval "$as_ac_Lib=no"
18011 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18012 LIBS=$ac_check_lib_save_LIBS
18014 echo "$as_me:18014: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18015 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18016 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18018 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18020 cf_add_libs="$LIBS"
18023 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18024 # filter duplicates
18025 for cf_add_1lib in $cf_add_0lib; do
18026 for cf_add_2lib in $cf_add_libs; do
18027 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18034 LIBS="$cf_add_libs"
18036 cat >>confdefs.h <<EOF
18037 #define $cf_upper 1
18044 cf_curses_headers="$cf_curses_headers form.h"
18047 # look for curses-related headers
18049 for ac_header in $cf_curses_headers
18051 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18052 echo "$as_me:18052: checking for $ac_header" >&5
18053 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18054 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18055 echo $ECHO_N "(cached) $ECHO_C" >&6
18057 cat >"conftest.$ac_ext" <<_ACEOF
18058 #line 18058 "configure"
18059 #include "confdefs.h"
18060 #include <$ac_header>
18062 if { (eval echo "$as_me:18062: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18063 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18065 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18067 cat conftest.err >&5
18068 echo "$as_me:18068: \$? = $ac_status" >&5
18069 (exit "$ac_status"); } >/dev/null; then
18070 if test -s conftest.err; then
18071 ac_cpp_err=$ac_c_preproc_warn_flag
18078 if test -z "$ac_cpp_err"; then
18079 eval "$as_ac_Header=yes"
18081 echo "$as_me: failed program was:" >&5
18082 cat "conftest.$ac_ext" >&5
18083 eval "$as_ac_Header=no"
18085 rm -f conftest.err "conftest.$ac_ext"
18087 echo "$as_me:18087: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18088 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18089 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18090 cat >>confdefs.h <<EOF
18091 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18097 echo "$as_me:18097: checking for ANSI C header files" >&5
18098 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18099 if test "${ac_cv_header_stdc+set}" = set; then
18100 echo $ECHO_N "(cached) $ECHO_C" >&6
18102 cat >"conftest.$ac_ext" <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105 #include <stdlib.h>
18106 #include <stdarg.h>
18107 #include <string.h>
18111 if { (eval echo "$as_me:18111: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18112 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18114 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18116 cat conftest.err >&5
18117 echo "$as_me:18117: \$? = $ac_status" >&5
18118 (exit "$ac_status"); } >/dev/null; then
18119 if test -s conftest.err; then
18120 ac_cpp_err=$ac_c_preproc_warn_flag
18127 if test -z "$ac_cpp_err"; then
18128 ac_cv_header_stdc=yes
18130 echo "$as_me: failed program was:" >&5
18131 cat "conftest.$ac_ext" >&5
18132 ac_cv_header_stdc=no
18134 rm -f conftest.err "conftest.$ac_ext"
18136 if test $ac_cv_header_stdc = yes; then
18137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18138 cat >"conftest.$ac_ext" <<_ACEOF
18139 #line 18139 "configure"
18140 #include "confdefs.h"
18141 #include <string.h>
18144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18145 $EGREP "memchr" >/dev/null 2>&1; then
18148 ac_cv_header_stdc=no
18154 if test $ac_cv_header_stdc = yes; then
18155 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18156 cat >"conftest.$ac_ext" <<_ACEOF
18157 #line 18157 "configure"
18158 #include "confdefs.h"
18159 #include <stdlib.h>
18162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18163 $EGREP "free" >/dev/null 2>&1; then
18166 ac_cv_header_stdc=no
18172 if test $ac_cv_header_stdc = yes; then
18173 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18174 if test "$cross_compiling" = yes; then
18177 cat >"conftest.$ac_ext" <<_ACEOF
18178 #line 18178 "configure"
18179 #include "confdefs.h"
18181 #if ((' ' & 0x0FF) == 0x020)
18182 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18183 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18185 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18186 || ('j' <= (c) && (c) <= 'r') \
18187 || ('s' <= (c) && (c) <= 'z'))
18188 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18191 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18196 for (i = 0; i < 256; i++)
18197 if (XOR (islower (i), ISLOWER (i))
18198 || toupper (i) != TOUPPER (i))
18199 $ac_main_return(2);
18200 $ac_main_return (0);
18203 rm -f "conftest$ac_exeext"
18204 if { (eval echo "$as_me:18204: \"$ac_link\"") >&5
18205 (eval $ac_link) 2>&5
18207 echo "$as_me:18207: \$? = $ac_status" >&5
18208 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18209 { (eval echo "$as_me:18209: \"$ac_try\"") >&5
18210 (eval $ac_try) 2>&5
18212 echo "$as_me:18212: \$? = $ac_status" >&5
18213 (exit "$ac_status"); }; }; then
18216 echo "$as_me: program exited with status $ac_status" >&5
18217 echo "$as_me: failed program was:" >&5
18218 cat "conftest.$ac_ext" >&5
18219 ac_cv_header_stdc=no
18221 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18225 echo "$as_me:18225: result: $ac_cv_header_stdc" >&5
18226 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18227 if test $ac_cv_header_stdc = yes; then
18229 cat >>confdefs.h <<\EOF
18230 #define STDC_HEADERS 1
18235 echo "$as_me:18235: checking whether time.h and sys/time.h may both be included" >&5
18236 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18237 if test "${ac_cv_header_time+set}" = set; then
18238 echo $ECHO_N "(cached) $ECHO_C" >&6
18240 cat >"conftest.$ac_ext" <<_ACEOF
18241 #line 18241 "configure"
18242 #include "confdefs.h"
18243 #include <sys/types.h>
18244 #include <sys/time.h>
18250 if ((struct tm *) 0)
18256 rm -f "conftest.$ac_objext"
18257 if { (eval echo "$as_me:18257: \"$ac_compile\"") >&5
18258 (eval $ac_compile) 2>&5
18260 echo "$as_me:18260: \$? = $ac_status" >&5
18261 (exit "$ac_status"); } &&
18262 { ac_try='test -s "conftest.$ac_objext"'
18263 { (eval echo "$as_me:18263: \"$ac_try\"") >&5
18264 (eval $ac_try) 2>&5
18266 echo "$as_me:18266: \$? = $ac_status" >&5
18267 (exit "$ac_status"); }; }; then
18268 ac_cv_header_time=yes
18270 echo "$as_me: failed program was:" >&5
18271 cat "conftest.$ac_ext" >&5
18272 ac_cv_header_time=no
18274 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18276 echo "$as_me:18276: result: $ac_cv_header_time" >&5
18277 echo "${ECHO_T}$ac_cv_header_time" >&6
18278 if test $ac_cv_header_time = yes; then
18280 cat >>confdefs.h <<\EOF
18281 #define TIME_WITH_SYS_TIME 1
18299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18300 echo "$as_me:18300: checking for $ac_header" >&5
18301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18303 echo $ECHO_N "(cached) $ECHO_C" >&6
18305 cat >"conftest.$ac_ext" <<_ACEOF
18306 #line 18306 "configure"
18307 #include "confdefs.h"
18308 #include <$ac_header>
18310 if { (eval echo "$as_me:18310: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18311 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18313 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18315 cat conftest.err >&5
18316 echo "$as_me:18316: \$? = $ac_status" >&5
18317 (exit "$ac_status"); } >/dev/null; then
18318 if test -s conftest.err; then
18319 ac_cpp_err=$ac_c_preproc_warn_flag
18326 if test -z "$ac_cpp_err"; then
18327 eval "$as_ac_Header=yes"
18329 echo "$as_me: failed program was:" >&5
18330 cat "conftest.$ac_ext" >&5
18331 eval "$as_ac_Header=no"
18333 rm -f conftest.err "conftest.$ac_ext"
18335 echo "$as_me:18335: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18336 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18337 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18338 cat >>confdefs.h <<EOF
18339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18345 for ac_header in unistd.h getopt.h
18347 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18348 echo "$as_me:18348: checking for $ac_header" >&5
18349 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18350 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18351 echo $ECHO_N "(cached) $ECHO_C" >&6
18353 cat >"conftest.$ac_ext" <<_ACEOF
18354 #line 18354 "configure"
18355 #include "confdefs.h"
18356 #include <$ac_header>
18358 if { (eval echo "$as_me:18358: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18359 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18361 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18363 cat conftest.err >&5
18364 echo "$as_me:18364: \$? = $ac_status" >&5
18365 (exit "$ac_status"); } >/dev/null; then
18366 if test -s conftest.err; then
18367 ac_cpp_err=$ac_c_preproc_warn_flag
18374 if test -z "$ac_cpp_err"; then
18375 eval "$as_ac_Header=yes"
18377 echo "$as_me: failed program was:" >&5
18378 cat "conftest.$ac_ext" >&5
18379 eval "$as_ac_Header=no"
18381 rm -f conftest.err "conftest.$ac_ext"
18383 echo "$as_me:18383: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18384 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18385 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18386 cat >>confdefs.h <<EOF
18387 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18393 echo "$as_me:18393: checking for header declaring getopt variables" >&5
18394 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18395 if test "${cf_cv_getopt_header+set}" = set; then
18396 echo $ECHO_N "(cached) $ECHO_C" >&6
18399 cf_cv_getopt_header=none
18400 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18402 cat >"conftest.$ac_ext" <<_ACEOF
18403 #line 18403 "configure"
18404 #include "confdefs.h"
18406 #include <$cf_header>
18410 int x = optind; char *y = optarg; (void)x; (void)y
18415 rm -f "conftest.$ac_objext"
18416 if { (eval echo "$as_me:18416: \"$ac_compile\"") >&5
18417 (eval $ac_compile) 2>&5
18419 echo "$as_me:18419: \$? = $ac_status" >&5
18420 (exit "$ac_status"); } &&
18421 { ac_try='test -s "conftest.$ac_objext"'
18422 { (eval echo "$as_me:18422: \"$ac_try\"") >&5
18423 (eval $ac_try) 2>&5
18425 echo "$as_me:18425: \$? = $ac_status" >&5
18426 (exit "$ac_status"); }; }; then
18427 cf_cv_getopt_header=$cf_header
18430 echo "$as_me: failed program was:" >&5
18431 cat "conftest.$ac_ext" >&5
18433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18437 echo "$as_me:18437: result: $cf_cv_getopt_header" >&5
18438 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18439 if test "$cf_cv_getopt_header" != none ; then
18441 cat >>confdefs.h <<\EOF
18442 #define HAVE_GETOPT_HEADER 1
18446 if test "$cf_cv_getopt_header" = getopt.h ; then
18448 cat >>confdefs.h <<\EOF
18449 #define NEED_GETOPT_H 1
18464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18465 echo "$as_me:18465: checking for $ac_func" >&5
18466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18467 if eval "test \"\${$as_ac_var+set}\" = set"; then
18468 echo $ECHO_N "(cached) $ECHO_C" >&6
18470 cat >"conftest.$ac_ext" <<_ACEOF
18471 #line 18471 "configure"
18472 #include "confdefs.h"
18473 #define $ac_func autoconf_temporary
18474 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18481 /* We use char because int might match the return type of a gcc2
18482 builtin and then its argument prototype would still apply. */
18483 char $ac_func (void);
18489 /* The GNU C library defines stubs for functions which it implements
18490 to always fail with ENOSYS. Some functions are actually named
18491 something starting with __ and the normal name is an alias. */
18492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18493 #error found stub for $ac_func
18496 return $ac_func ();
18501 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18502 if { (eval echo "$as_me:18502: \"$ac_link\"") >&5
18503 (eval $ac_link) 2>&5
18505 echo "$as_me:18505: \$? = $ac_status" >&5
18506 (exit "$ac_status"); } &&
18507 { ac_try='test -s "conftest$ac_exeext"'
18508 { (eval echo "$as_me:18508: \"$ac_try\"") >&5
18509 (eval $ac_try) 2>&5
18511 echo "$as_me:18511: \$? = $ac_status" >&5
18512 (exit "$ac_status"); }; }; then
18513 eval "$as_ac_var=yes"
18515 echo "$as_me: failed program was:" >&5
18516 cat "conftest.$ac_ext" >&5
18517 eval "$as_ac_var=no"
18519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18521 echo "$as_me:18521: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18522 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18523 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18524 cat >>confdefs.h <<EOF
18525 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18531 # use a compile-check to work with ncurses*-config and subdirectory includes
18532 echo "$as_me:18532: checking if we can use termcap.h" >&5
18533 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18534 if test "${cf_cv_have_termcap_h+set}" = set; then
18535 echo $ECHO_N "(cached) $ECHO_C" >&6
18538 cat >"conftest.$ac_ext" <<_ACEOF
18539 #line 18539 "configure"
18540 #include "confdefs.h"
18542 #include <curses.h>
18543 #ifdef NCURSES_VERSION
18544 #undef NCURSES_VERSION
18546 #include <termcap.h>
18547 #ifndef NCURSES_VERSION
18548 #error wrong header
18559 rm -f "conftest.$ac_objext"
18560 if { (eval echo "$as_me:18560: \"$ac_compile\"") >&5
18561 (eval $ac_compile) 2>&5
18563 echo "$as_me:18563: \$? = $ac_status" >&5
18564 (exit "$ac_status"); } &&
18565 { ac_try='test -s "conftest.$ac_objext"'
18566 { (eval echo "$as_me:18566: \"$ac_try\"") >&5
18567 (eval $ac_try) 2>&5
18569 echo "$as_me:18569: \$? = $ac_status" >&5
18570 (exit "$ac_status"); }; }; then
18571 cf_cv_have_termcap_h=yes
18573 echo "$as_me: failed program was:" >&5
18574 cat "conftest.$ac_ext" >&5
18575 cf_cv_have_termcap_h=no
18577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18579 echo "$as_me:18579: result: $cf_cv_have_termcap_h" >&5
18580 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18581 if test "x$cf_cv_have_termcap_h" = xyes
18584 cat >>confdefs.h <<\EOF
18585 #define HAVE_TERMCAP_H 1
18589 echo "$as_me:18589: checking if we can use ncurses/termcap.h" >&5
18590 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18591 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18592 echo $ECHO_N "(cached) $ECHO_C" >&6
18595 cat >"conftest.$ac_ext" <<_ACEOF
18596 #line 18596 "configure"
18597 #include "confdefs.h"
18599 #include <ncurses/curses.h>
18600 #ifdef NCURSES_VERSION
18601 #undef NCURSES_VERSION
18603 #include <ncurses/termcap.h>
18604 #ifndef NCURSES_VERSION
18605 #error wrong header
18616 rm -f "conftest.$ac_objext"
18617 if { (eval echo "$as_me:18617: \"$ac_compile\"") >&5
18618 (eval $ac_compile) 2>&5
18620 echo "$as_me:18620: \$? = $ac_status" >&5
18621 (exit "$ac_status"); } &&
18622 { ac_try='test -s "conftest.$ac_objext"'
18623 { (eval echo "$as_me:18623: \"$ac_try\"") >&5
18624 (eval $ac_try) 2>&5
18626 echo "$as_me:18626: \$? = $ac_status" >&5
18627 (exit "$ac_status"); }; }; then
18628 cf_cv_have_ncurses_termcap_h=yes
18630 echo "$as_me: failed program was:" >&5
18631 cat "conftest.$ac_ext" >&5
18632 cf_cv_have_ncurses_termcap_h=no
18634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18636 echo "$as_me:18636: result: $cf_cv_have_ncurses_termcap_h" >&5
18637 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18638 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18639 cat >>confdefs.h <<\EOF
18640 #define HAVE_NCURSES_TERMCAP_H 1
18645 if test "x$ac_cv_func_getopt" = xno; then
18646 { { echo "$as_me:18646: error: getopt is required for building programs" >&5
18647 echo "$as_me: error: getopt is required for building programs" >&2;}
18648 { (exit 1); exit 1; }; }
18651 if test "$cf_enable_widec" = yes; then
18664 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18665 echo "$as_me:18665: checking for $ac_func" >&5
18666 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18667 if eval "test \"\${$as_ac_var+set}\" = set"; then
18668 echo $ECHO_N "(cached) $ECHO_C" >&6
18670 cat >"conftest.$ac_ext" <<_ACEOF
18671 #line 18671 "configure"
18672 #include "confdefs.h"
18673 #define $ac_func autoconf_temporary
18674 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18681 /* We use char because int might match the return type of a gcc2
18682 builtin and then its argument prototype would still apply. */
18683 char $ac_func (void);
18689 /* The GNU C library defines stubs for functions which it implements
18690 to always fail with ENOSYS. Some functions are actually named
18691 something starting with __ and the normal name is an alias. */
18692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18693 #error found stub for $ac_func
18696 return $ac_func ();
18701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18702 if { (eval echo "$as_me:18702: \"$ac_link\"") >&5
18703 (eval $ac_link) 2>&5
18705 echo "$as_me:18705: \$? = $ac_status" >&5
18706 (exit "$ac_status"); } &&
18707 { ac_try='test -s "conftest$ac_exeext"'
18708 { (eval echo "$as_me:18708: \"$ac_try\"") >&5
18709 (eval $ac_try) 2>&5
18711 echo "$as_me:18711: \$? = $ac_status" >&5
18712 (exit "$ac_status"); }; }; then
18713 eval "$as_ac_var=yes"
18715 echo "$as_me: failed program was:" >&5
18716 cat "conftest.$ac_ext" >&5
18717 eval "$as_ac_var=no"
18719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18721 echo "$as_me:18721: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18722 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18723 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18724 cat >>confdefs.h <<EOF
18725 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18733 echo "$as_me:18733: checking definition to turn on extended curses functions" >&5
18734 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18735 if test "${cf_cv_need_xopen_extension+set}" = set; then
18736 echo $ECHO_N "(cached) $ECHO_C" >&6
18739 cf_cv_need_xopen_extension=unknown
18740 cat >"conftest.$ac_ext" <<_ACEOF
18741 #line 18741 "configure"
18742 #include "confdefs.h"
18744 $ac_includes_default
18745 #include <${cf_cv_ncurses_header:-curses.h}>
18750 #if defined(NCURSES_VERSION_PATCH)
18751 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18755 #ifdef NCURSES_WIDECHAR
18756 make an error /* prefer to fall-through on the second checks */
18759 int check2 = curs_set((int)sizeof(check));
18760 long x = winnstr(stdscr, "", 0);
18763 getbegyx(stdscr, y1, x1);
18772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18773 if { (eval echo "$as_me:18773: \"$ac_link\"") >&5
18774 (eval $ac_link) 2>&5
18776 echo "$as_me:18776: \$? = $ac_status" >&5
18777 (exit "$ac_status"); } &&
18778 { ac_try='test -s "conftest$ac_exeext"'
18779 { (eval echo "$as_me:18779: \"$ac_try\"") >&5
18780 (eval $ac_try) 2>&5
18782 echo "$as_me:18782: \$? = $ac_status" >&5
18783 (exit "$ac_status"); }; }; then
18784 cf_cv_need_xopen_extension=none
18786 echo "$as_me: failed program was:" >&5
18787 cat "conftest.$ac_ext" >&5
18789 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18791 cat >"conftest.$ac_ext" <<_ACEOF
18792 #line 18792 "configure"
18793 #include "confdefs.h"
18795 #define $cf_try_xopen_extension 1
18796 $ac_includes_default
18797 #include <${cf_cv_ncurses_header:-curses.h}>
18803 int check2 = curs_set((int)sizeof(check));
18804 long x = winnstr(stdscr, "", 0);
18806 getbegyx(stdscr, y1, x1);
18816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18817 if { (eval echo "$as_me:18817: \"$ac_link\"") >&5
18818 (eval $ac_link) 2>&5
18820 echo "$as_me:18820: \$? = $ac_status" >&5
18821 (exit "$ac_status"); } &&
18822 { ac_try='test -s "conftest$ac_exeext"'
18823 { (eval echo "$as_me:18823: \"$ac_try\"") >&5
18824 (eval $ac_try) 2>&5
18826 echo "$as_me:18826: \$? = $ac_status" >&5
18827 (exit "$ac_status"); }; }; then
18828 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18830 echo "$as_me: failed program was:" >&5
18831 cat "conftest.$ac_ext" >&5
18833 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18840 echo "$as_me:18840: result: $cf_cv_need_xopen_extension" >&5
18841 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18843 case "$cf_cv_need_xopen_extension" in
18846 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18847 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18852 echo "$as_me:18852: checking for term.h" >&5
18853 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18854 if test "${cf_cv_term_header+set}" = set; then
18855 echo $ECHO_N "(cached) $ECHO_C" >&6
18858 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18859 # for <term.h> if we do not find the variant.
18861 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18863 case "${cf_cv_ncurses_header:-curses.h}" in
18865 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18866 cf_header_list="$cf_header_item $cf_header_list"
18870 for cf_header in $cf_header_list
18872 cat >"conftest.$ac_ext" <<_ACEOF
18873 #line 18873 "configure"
18874 #include "confdefs.h"
18876 #include <${cf_cv_ncurses_header:-curses.h}>
18877 #include <${cf_header}>
18886 rm -f "conftest.$ac_objext"
18887 if { (eval echo "$as_me:18887: \"$ac_compile\"") >&5
18888 (eval $ac_compile) 2>&5
18890 echo "$as_me:18890: \$? = $ac_status" >&5
18891 (exit "$ac_status"); } &&
18892 { ac_try='test -s "conftest.$ac_objext"'
18893 { (eval echo "$as_me:18893: \"$ac_try\"") >&5
18894 (eval $ac_try) 2>&5
18896 echo "$as_me:18896: \$? = $ac_status" >&5
18897 (exit "$ac_status"); }; }; then
18898 cf_cv_term_header=$cf_header
18901 echo "$as_me: failed program was:" >&5
18902 cat "conftest.$ac_ext" >&5
18903 cf_cv_term_header=no
18905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18908 case "$cf_cv_term_header" in
18910 # If curses is ncurses, some packagers still mess it up by trying to make
18911 # us use GNU termcap. This handles the most common case.
18912 for cf_header in ncurses/term.h ncursesw/term.h
18914 cat >"conftest.$ac_ext" <<_ACEOF
18915 #line 18915 "configure"
18916 #include "confdefs.h"
18918 #include <${cf_cv_ncurses_header:-curses.h}>
18919 #ifdef NCURSES_VERSION
18920 #include <${cf_header}>
18932 rm -f "conftest.$ac_objext"
18933 if { (eval echo "$as_me:18933: \"$ac_compile\"") >&5
18934 (eval $ac_compile) 2>&5
18936 echo "$as_me:18936: \$? = $ac_status" >&5
18937 (exit "$ac_status"); } &&
18938 { ac_try='test -s "conftest.$ac_objext"'
18939 { (eval echo "$as_me:18939: \"$ac_try\"") >&5
18940 (eval $ac_try) 2>&5
18942 echo "$as_me:18942: \$? = $ac_status" >&5
18943 (exit "$ac_status"); }; }; then
18944 cf_cv_term_header=$cf_header
18947 echo "$as_me: failed program was:" >&5
18948 cat "conftest.$ac_ext" >&5
18949 cf_cv_term_header=no
18951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18957 echo "$as_me:18957: result: $cf_cv_term_header" >&5
18958 echo "${ECHO_T}$cf_cv_term_header" >&6
18960 case "$cf_cv_term_header" in
18963 cat >>confdefs.h <<\EOF
18964 #define HAVE_TERM_H 1
18970 cat >>confdefs.h <<\EOF
18971 #define HAVE_NCURSES_TERM_H 1
18977 cat >>confdefs.h <<\EOF
18978 #define HAVE_NCURSESW_TERM_H 1
18984 echo "$as_me:18984: checking for unctrl.h" >&5
18985 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18986 if test "${cf_cv_unctrl_header+set}" = set; then
18987 echo $ECHO_N "(cached) $ECHO_C" >&6
18990 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18991 # for <unctrl.h> if we do not find the variant.
18993 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18995 case "${cf_cv_ncurses_header:-curses.h}" in
18997 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18998 cf_header_list="$cf_header_item $cf_header_list"
19002 for cf_header in $cf_header_list
19004 cat >"conftest.$ac_ext" <<_ACEOF
19005 #line 19005 "configure"
19006 #include "confdefs.h"
19008 #include <${cf_cv_ncurses_header:-curses.h}>
19009 #include <${cf_header}>
19018 rm -f "conftest.$ac_objext"
19019 if { (eval echo "$as_me:19019: \"$ac_compile\"") >&5
19020 (eval $ac_compile) 2>&5
19022 echo "$as_me:19022: \$? = $ac_status" >&5
19023 (exit "$ac_status"); } &&
19024 { ac_try='test -s "conftest.$ac_objext"'
19025 { (eval echo "$as_me:19025: \"$ac_try\"") >&5
19026 (eval $ac_try) 2>&5
19028 echo "$as_me:19028: \$? = $ac_status" >&5
19029 (exit "$ac_status"); }; }; then
19030 cf_cv_unctrl_header=$cf_header
19033 echo "$as_me: failed program was:" >&5
19034 cat "conftest.$ac_ext" >&5
19035 cf_cv_unctrl_header=no
19037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19041 echo "$as_me:19041: result: $cf_cv_unctrl_header" >&5
19042 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19044 case "$cf_cv_unctrl_header" in
19046 { echo "$as_me:19046: WARNING: unctrl.h header not found" >&5
19047 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19051 case "$cf_cv_unctrl_header" in
19054 cat >>confdefs.h <<\EOF
19055 #define HAVE_UNCTRL_H 1
19061 cat >>confdefs.h <<\EOF
19062 #define HAVE_NCURSES_UNCTRL_H 1
19066 (ncursesw/unctrl.h)
19068 cat >>confdefs.h <<\EOF
19069 #define HAVE_NCURSESW_UNCTRL_H 1
19077 assume_default_colors \
19095 init_extended_color \
19103 reset_color_pairs \
19120 use_default_colors \
19122 use_extended_names \
19138 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19140 echo "$as_me:19140: checking for ${cf_func}" >&5
19141 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19143 echo "${as_me:-configure}:19143: testing ${cf_func} ..." 1>&5
19145 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19146 echo $ECHO_N "(cached) $ECHO_C" >&6
19149 eval cf_result='$ac_cv_func_'$cf_func
19150 if test ".$cf_result" != ".no"; then
19151 cat >"conftest.$ac_ext" <<_ACEOF
19152 #line 19152 "configure"
19153 #include "confdefs.h"
19155 #ifdef HAVE_XCURSES
19156 #include <xcurses.h>
19157 char * XCursesProgramName = "test";
19159 #include <${cf_cv_ncurses_header:-curses.h}>
19160 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19161 #include <ncursesw/term.h>
19162 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19163 #include <ncurses/term.h>
19164 #elif defined(HAVE_TERM_H)
19174 long foo = (long)(&${cf_func});
19175 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19176 if (foo + 1234L > 5678L)
19177 ${cf_cv_main_return:-return}(foo != 0);
19184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19185 if { (eval echo "$as_me:19185: \"$ac_link\"") >&5
19186 (eval $ac_link) 2>&5
19188 echo "$as_me:19188: \$? = $ac_status" >&5
19189 (exit "$ac_status"); } &&
19190 { ac_try='test -s "conftest$ac_exeext"'
19191 { (eval echo "$as_me:19191: \"$ac_try\"") >&5
19192 (eval $ac_try) 2>&5
19194 echo "$as_me:19194: \$? = $ac_status" >&5
19195 (exit "$ac_status"); }; }; then
19198 echo "$as_me: failed program was:" >&5
19199 cat "conftest.$ac_ext" >&5
19202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19204 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19208 # use the computed/retrieved cache-value:
19209 eval 'cf_result=$cf_cv_func_'$cf_func
19210 echo "$as_me:19210: result: $cf_result" >&5
19211 echo "${ECHO_T}$cf_result" >&6
19212 if test "$cf_result" != no; then
19213 cat >>confdefs.h <<EOF
19214 #define HAVE_${cf_tr_func} 1
19220 for cf_func in tputs
19223 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19225 echo "$as_me:19225: checking for ${cf_func}" >&5
19226 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19228 echo "${as_me:-configure}:19228: testing ${cf_func} ..." 1>&5
19230 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19231 echo $ECHO_N "(cached) $ECHO_C" >&6
19234 eval cf_result='$ac_cv_func_'$cf_func
19235 if test ".$cf_result" != ".no"; then
19236 cat >"conftest.$ac_ext" <<_ACEOF
19237 #line 19237 "configure"
19238 #include "confdefs.h"
19240 #ifdef HAVE_XCURSES
19241 #include <xcurses.h>
19242 char * XCursesProgramName = "test";
19244 #include <${cf_cv_ncurses_header:-curses.h}>
19245 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19246 #include <ncursesw/term.h>
19247 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19248 #include <ncurses/term.h>
19249 #elif defined(HAVE_TERM_H)
19259 long foo = (long)(&${cf_func});
19260 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19261 if (foo + 1234L > 5678L)
19262 ${cf_cv_main_return:-return}(foo != 0);
19269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19270 if { (eval echo "$as_me:19270: \"$ac_link\"") >&5
19271 (eval $ac_link) 2>&5
19273 echo "$as_me:19273: \$? = $ac_status" >&5
19274 (exit "$ac_status"); } &&
19275 { ac_try='test -s "conftest$ac_exeext"'
19276 { (eval echo "$as_me:19276: \"$ac_try\"") >&5
19277 (eval $ac_try) 2>&5
19279 echo "$as_me:19279: \$? = $ac_status" >&5
19280 (exit "$ac_status"); }; }; then
19283 echo "$as_me: failed program was:" >&5
19284 cat "conftest.$ac_ext" >&5
19287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19289 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19293 # use the computed/retrieved cache-value:
19294 eval 'cf_result=$cf_cv_func_'$cf_func
19295 echo "$as_me:19295: result: $cf_result" >&5
19296 echo "${ECHO_T}$cf_result" >&6
19297 if test "$cf_result" != no; then
19298 cat >>confdefs.h <<EOF
19299 #define HAVE_${cf_tr_func} 1
19305 if test "x$cf_cv_func_tputs" = xyes
19308 for cf_arg in int char
19310 for cf_ret in int void
19312 if test "$cf_ret" = void
19314 cf_return="/* nothing */"
19316 cf_return="return value"
19318 cat >"conftest.$ac_ext" <<_ACEOF
19319 #line 19319 "configure"
19320 #include "confdefs.h"
19322 #include <${cf_cv_ncurses_header:-curses.h}>
19323 #include <$cf_cv_term_header>
19325 static $cf_ret outc($cf_arg value) { $cf_return; }
19331 tputs("hello", 0, outc);
19332 ${cf_cv_main_return:-return}(0);
19338 rm -f "conftest.$ac_objext"
19339 if { (eval echo "$as_me:19339: \"$ac_compile\"") >&5
19340 (eval $ac_compile) 2>&5
19342 echo "$as_me:19342: \$? = $ac_status" >&5
19343 (exit "$ac_status"); } &&
19344 { ac_try='test -s "conftest.$ac_objext"'
19345 { (eval echo "$as_me:19345: \"$ac_try\"") >&5
19346 (eval $ac_try) 2>&5
19348 echo "$as_me:19348: \$? = $ac_status" >&5
19349 (exit "$ac_status"); }; }; then
19351 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19353 echo "${as_me:-configure}:19353: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19355 cat >>confdefs.h <<EOF
19356 #define TPUTS_ARG $cf_arg
19357 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19358 #define TPUTS_RETURN(value) $cf_return
19364 echo "$as_me: failed program was:" >&5
19365 cat "conftest.$ac_ext" >&5
19367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19369 test "$cf_done" = yes && break
19373 echo "$as_me:19373: checking for ncurses extended functions" >&5
19374 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19375 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19376 echo $ECHO_N "(cached) $ECHO_C" >&6
19379 cat >"conftest.$ac_ext" <<_ACEOF
19380 #line 19380 "configure"
19381 #include "confdefs.h"
19383 #include <${cf_cv_ncurses_header:-curses.h}>
19388 int x = NCURSES_EXT_FUNCS
19394 rm -f "conftest.$ac_objext"
19395 if { (eval echo "$as_me:19395: \"$ac_compile\"") >&5
19396 (eval $ac_compile) 2>&5
19398 echo "$as_me:19398: \$? = $ac_status" >&5
19399 (exit "$ac_status"); } &&
19400 { ac_try='test -s "conftest.$ac_objext"'
19401 { (eval echo "$as_me:19401: \"$ac_try\"") >&5
19402 (eval $ac_try) 2>&5
19404 echo "$as_me:19404: \$? = $ac_status" >&5
19405 (exit "$ac_status"); }; }; then
19406 cf_cv_ncurses_ext_funcs=defined
19408 echo "$as_me: failed program was:" >&5
19409 cat "conftest.$ac_ext" >&5
19411 cat >"conftest.$ac_ext" <<_ACEOF
19412 #line 19412 "configure"
19413 #include "confdefs.h"
19415 #include <${cf_cv_ncurses_header:-curses.h}>
19420 (void) assume_default_colors (0, 0);
19421 (void) curses_version ();
19422 (void) define_key (0, 0);
19423 (void) is_term_resized (0, 0);
19424 (void) key_defined (0);
19425 (void) keybound (0, 0);
19426 (void) keyok (0, 0);
19427 (void) resize_term (0, 0);
19428 (void) resizeterm (0, 0);
19429 (void) use_default_colors ();
19430 (void) use_extended_names (0);
19431 (void) wresize (0, 0, 0);
19436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19437 if { (eval echo "$as_me:19437: \"$ac_link\"") >&5
19438 (eval $ac_link) 2>&5
19440 echo "$as_me:19440: \$? = $ac_status" >&5
19441 (exit "$ac_status"); } &&
19442 { ac_try='test -s "conftest$ac_exeext"'
19443 { (eval echo "$as_me:19443: \"$ac_try\"") >&5
19444 (eval $ac_try) 2>&5
19446 echo "$as_me:19446: \$? = $ac_status" >&5
19447 (exit "$ac_status"); }; }; then
19448 cf_cv_ncurses_ext_funcs=yes
19450 echo "$as_me: failed program was:" >&5
19451 cat "conftest.$ac_ext" >&5
19452 cf_cv_ncurses_ext_funcs=no
19454 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19460 echo "$as_me:19460: result: $cf_cv_ncurses_ext_funcs" >&5
19461 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19462 test "$cf_cv_ncurses_ext_funcs" = yes &&
19463 cat >>confdefs.h <<\EOF
19464 #define NCURSES_EXT_FUNCS 1
19467 if test "$cf_enable_widec" = yes
19469 # workaround for systems with ncurses before 20111029, due to change of
19470 # feature test macro from _XPG5 to _XOPEN_SOURCE
19471 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19474 echo "$as_me:19474: checking if _XPG5 should be defined to enable wide-characters" >&5
19475 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19477 cat >"conftest.$ac_ext" <<_ACEOF
19478 #line 19478 "configure"
19479 #include "confdefs.h"
19481 #include <${cf_cv_ncurses_header:-curses.h}>
19490 rm -f "conftest.$ac_objext"
19491 if { (eval echo "$as_me:19491: \"$ac_compile\"") >&5
19492 (eval $ac_compile) 2>&5
19494 echo "$as_me:19494: \$? = $ac_status" >&5
19495 (exit "$ac_status"); } &&
19496 { ac_try='test -s "conftest.$ac_objext"'
19497 { (eval echo "$as_me:19497: \"$ac_try\"") >&5
19498 (eval $ac_try) 2>&5
19500 echo "$as_me:19500: \$? = $ac_status" >&5
19501 (exit "$ac_status"); }; }; then
19504 echo "$as_me: failed program was:" >&5
19505 cat "conftest.$ac_ext" >&5
19506 cf_save_cppflags="$CPPFLAGS"
19507 CPPFLAGS="$CPPFLAGS -D_XPG5"
19508 cat >"conftest.$ac_ext" <<_ACEOF
19509 #line 19509 "configure"
19510 #include "confdefs.h"
19512 #include <${cf_cv_ncurses_header:-curses.h}>
19521 rm -f "conftest.$ac_objext"
19522 if { (eval echo "$as_me:19522: \"$ac_compile\"") >&5
19523 (eval $ac_compile) 2>&5
19525 echo "$as_me:19525: \$? = $ac_status" >&5
19526 (exit "$ac_status"); } &&
19527 { ac_try='test -s "conftest.$ac_objext"'
19528 { (eval echo "$as_me:19528: \"$ac_try\"") >&5
19529 (eval $ac_try) 2>&5
19531 echo "$as_me:19531: \$? = $ac_status" >&5
19532 (exit "$ac_status"); }; }; then
19535 echo "$as_me: failed program was:" >&5
19536 cat "conftest.$ac_ext" >&5
19538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19539 CPPFLAGS="$cf_save_cppflags"
19541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19542 echo "$as_me:19542: result: $cf_define_xpg5" >&5
19543 echo "${ECHO_T}$cf_define_xpg5" >&6
19545 if test "$cf_define_xpg5" = yes
19547 CPPFLAGS="$CPPFLAGS -D_XPG5"
19551 echo "$as_me:19551: checking for wide-character functions" >&5
19552 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19553 if test "${cf_cv_widechar_funcs+set}" = set; then
19554 echo $ECHO_N "(cached) $ECHO_C" >&6
19557 cat >"conftest.$ac_ext" <<_ACEOF
19558 #line 19558 "configure"
19559 #include "confdefs.h"
19561 #include <${cf_cv_ncurses_header:-curses.h}>
19566 static wchar_t src_wchar[2];
19567 static cchar_t dst_cchar;
19568 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19575 if { (eval echo "$as_me:19575: \"$ac_link\"") >&5
19576 (eval $ac_link) 2>&5
19578 echo "$as_me:19578: \$? = $ac_status" >&5
19579 (exit "$ac_status"); } &&
19580 { ac_try='test -s "conftest$ac_exeext"'
19581 { (eval echo "$as_me:19581: \"$ac_try\"") >&5
19582 (eval $ac_try) 2>&5
19584 echo "$as_me:19584: \$? = $ac_status" >&5
19585 (exit "$ac_status"); }; }; then
19586 cf_cv_widechar_funcs=yes
19588 echo "$as_me: failed program was:" >&5
19589 cat "conftest.$ac_ext" >&5
19590 cf_cv_widechar_funcs=no
19592 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19595 echo "$as_me:19595: result: $cf_cv_widechar_funcs" >&5
19596 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19597 if test "$cf_cv_widechar_funcs" != no ; then
19599 cat >>confdefs.h <<\EOF
19600 #define USE_WIDEC_SUPPORT 1
19604 cat >>confdefs.h <<\EOF
19605 #define USE_WIDEC_SUPPORT 0
19610 cat >>confdefs.h <<\EOF
19611 #define USE_WIDEC_SUPPORT 0
19616 echo "$as_me:19616: checking if $cf_cv_screen library uses pthreads" >&5
19617 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19618 if test "${cf_cv_use_pthreads+set}" = set; then
19619 echo $ECHO_N "(cached) $ECHO_C" >&6
19622 cat >"conftest.$ac_ext" <<_ACEOF
19623 #line 19623 "configure"
19624 #include "confdefs.h"
19626 #include <${cf_cv_ncurses_header:-curses.h}>
19627 extern void _nc_init_pthreads(void);
19634 _nc_init_pthreads();
19640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19641 if { (eval echo "$as_me:19641: \"$ac_link\"") >&5
19642 (eval $ac_link) 2>&5
19644 echo "$as_me:19644: \$? = $ac_status" >&5
19645 (exit "$ac_status"); } &&
19646 { ac_try='test -s "conftest$ac_exeext"'
19647 { (eval echo "$as_me:19647: \"$ac_try\"") >&5
19648 (eval $ac_try) 2>&5
19650 echo "$as_me:19650: \$? = $ac_status" >&5
19651 (exit "$ac_status"); }; }; then
19652 cf_cv_use_pthreads=yes
19654 echo "$as_me: failed program was:" >&5
19655 cat "conftest.$ac_ext" >&5
19656 cf_cv_use_pthreads=no
19658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19661 echo "$as_me:19661: result: $cf_cv_use_pthreads" >&5
19662 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19663 test $cf_cv_use_pthreads = yes &&
19664 cat >>confdefs.h <<\EOF
19665 #define USE_PTHREADS 1
19668 echo "$as_me:19668: checking if sys/time.h works with sys/select.h" >&5
19669 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19670 if test "${cf_cv_sys_time_select+set}" = set; then
19671 echo $ECHO_N "(cached) $ECHO_C" >&6
19674 cat >"conftest.$ac_ext" <<_ACEOF
19675 #line 19675 "configure"
19676 #include "confdefs.h"
19678 #include <sys/types.h>
19679 #ifdef HAVE_SYS_TIME_H
19680 #include <sys/time.h>
19682 #ifdef HAVE_SYS_SELECT_H
19683 #include <sys/select.h>
19694 rm -f "conftest.$ac_objext"
19695 if { (eval echo "$as_me:19695: \"$ac_compile\"") >&5
19696 (eval $ac_compile) 2>&5
19698 echo "$as_me:19698: \$? = $ac_status" >&5
19699 (exit "$ac_status"); } &&
19700 { ac_try='test -s "conftest.$ac_objext"'
19701 { (eval echo "$as_me:19701: \"$ac_try\"") >&5
19702 (eval $ac_try) 2>&5
19704 echo "$as_me:19704: \$? = $ac_status" >&5
19705 (exit "$ac_status"); }; }; then
19706 cf_cv_sys_time_select=yes
19708 echo "$as_me: failed program was:" >&5
19709 cat "conftest.$ac_ext" >&5
19710 cf_cv_sys_time_select=no
19712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19716 echo "$as_me:19716: result: $cf_cv_sys_time_select" >&5
19717 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19718 test "$cf_cv_sys_time_select" = yes &&
19719 cat >>confdefs.h <<\EOF
19720 #define HAVE_SYS_TIME_SELECT 1
19723 # special check for test/ditto.c
19725 echo "$as_me:19725: checking for openpty in -lutil" >&5
19726 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19727 if test "${ac_cv_lib_util_openpty+set}" = set; then
19728 echo $ECHO_N "(cached) $ECHO_C" >&6
19730 ac_check_lib_save_LIBS=$LIBS
19731 LIBS="-lutil $LIBS"
19732 cat >"conftest.$ac_ext" <<_ACEOF
19733 #line 19733 "configure"
19734 #include "confdefs.h"
19736 /* Override any gcc2 internal prototype to avoid an error. */
19740 /* We use char because int might match the return type of a gcc2
19741 builtin and then its argument prototype would still apply. */
19751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19752 if { (eval echo "$as_me:19752: \"$ac_link\"") >&5
19753 (eval $ac_link) 2>&5
19755 echo "$as_me:19755: \$? = $ac_status" >&5
19756 (exit "$ac_status"); } &&
19757 { ac_try='test -s "conftest$ac_exeext"'
19758 { (eval echo "$as_me:19758: \"$ac_try\"") >&5
19759 (eval $ac_try) 2>&5
19761 echo "$as_me:19761: \$? = $ac_status" >&5
19762 (exit "$ac_status"); }; }; then
19763 ac_cv_lib_util_openpty=yes
19765 echo "$as_me: failed program was:" >&5
19766 cat "conftest.$ac_ext" >&5
19767 ac_cv_lib_util_openpty=no
19769 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19770 LIBS=$ac_check_lib_save_LIBS
19772 echo "$as_me:19772: result: $ac_cv_lib_util_openpty" >&5
19773 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19774 if test "$ac_cv_lib_util_openpty" = yes; then
19780 echo "$as_me:19780: checking for openpty header" >&5
19781 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19782 if test "${cf_cv_func_openpty+set}" = set; then
19783 echo $ECHO_N "(cached) $ECHO_C" >&6
19786 cf_save_LIBS="$LIBS"
19787 test "$cf_cv_lib_util" = yes && {
19788 cf_add_libs="$LIBS"
19791 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19792 # filter duplicates
19793 for cf_add_1lib in $cf_add_0lib; do
19794 for cf_add_2lib in $cf_add_libs; do
19795 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19800 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19802 LIBS="$cf_add_libs"
19804 for cf_header in pty.h libutil.h util.h
19806 cat >"conftest.$ac_ext" <<_ACEOF
19807 #line 19807 "configure"
19808 #include "confdefs.h"
19810 #include <$cf_header>
19816 int x = openpty((int *)0, (int *)0, (char *)0,
19817 (struct termios *)0, (struct winsize *)0);
19823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19824 if { (eval echo "$as_me:19824: \"$ac_link\"") >&5
19825 (eval $ac_link) 2>&5
19827 echo "$as_me:19827: \$? = $ac_status" >&5
19828 (exit "$ac_status"); } &&
19829 { ac_try='test -s "conftest$ac_exeext"'
19830 { (eval echo "$as_me:19830: \"$ac_try\"") >&5
19831 (eval $ac_try) 2>&5
19833 echo "$as_me:19833: \$? = $ac_status" >&5
19834 (exit "$ac_status"); }; }; then
19836 cf_cv_func_openpty=$cf_header
19840 echo "$as_me: failed program was:" >&5
19841 cat "conftest.$ac_ext" >&5
19843 cf_cv_func_openpty=no
19846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19848 LIBS="$cf_save_LIBS"
19851 echo "$as_me:19851: result: $cf_cv_func_openpty" >&5
19852 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19854 if test "$cf_cv_func_openpty" != no ; then
19856 cat >>confdefs.h <<EOF
19857 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19860 cat >>confdefs.h <<\EOF
19861 #define USE_XTERM_PTY 1
19864 if test "x$cf_cv_lib_util" = xyes ; then
19866 cf_add_libs="$TEST_LIBS"
19869 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19870 # filter duplicates
19871 for cf_add_1lib in $cf_add_0lib; do
19872 for cf_add_2lib in $cf_add_libs; do
19873 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19878 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19880 TEST_LIBS="$cf_add_libs"
19885 echo "$as_me:19885: checking for function curses_version" >&5
19886 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19887 if test "${cf_cv_func_curses_version+set}" = set; then
19888 echo $ECHO_N "(cached) $ECHO_C" >&6
19891 if test "$cross_compiling" = yes; then
19892 cf_cv_func_curses_version=unknown
19894 cat >"conftest.$ac_ext" <<_ACEOF
19895 #line 19895 "configure"
19896 #include "confdefs.h"
19898 $ac_includes_default
19900 #include <${cf_cv_ncurses_header:-curses.h}>
19905 sprintf(temp, "%.999s\\n", curses_version());
19906 ${cf_cv_main_return:-return}(0);
19910 rm -f "conftest$ac_exeext"
19911 if { (eval echo "$as_me:19911: \"$ac_link\"") >&5
19912 (eval $ac_link) 2>&5
19914 echo "$as_me:19914: \$? = $ac_status" >&5
19915 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19916 { (eval echo "$as_me:19916: \"$ac_try\"") >&5
19917 (eval $ac_try) 2>&5
19919 echo "$as_me:19919: \$? = $ac_status" >&5
19920 (exit "$ac_status"); }; }; then
19921 cf_cv_func_curses_version=yes
19924 echo "$as_me: program exited with status $ac_status" >&5
19925 echo "$as_me: failed program was:" >&5
19926 cat "conftest.$ac_ext" >&5
19927 cf_cv_func_curses_version=no
19930 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19934 echo "$as_me:19934: result: $cf_cv_func_curses_version" >&5
19935 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19936 test "$cf_cv_func_curses_version" = yes &&
19937 cat >>confdefs.h <<\EOF
19938 #define HAVE_CURSES_VERSION 1
19941 echo "$as_me:19941: checking for alternate character set array" >&5
19942 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19943 if test "${cf_cv_curses_acs_map+set}" = set; then
19944 echo $ECHO_N "(cached) $ECHO_C" >&6
19947 cf_cv_curses_acs_map=unknown
19948 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19950 cat >"conftest.$ac_ext" <<_ACEOF
19951 #line 19951 "configure"
19952 #include "confdefs.h"
19954 #include <${cf_cv_ncurses_header:-curses.h}>
19960 ${name}['k'] = ACS_PLUS
19966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19967 if { (eval echo "$as_me:19967: \"$ac_link\"") >&5
19968 (eval $ac_link) 2>&5
19970 echo "$as_me:19970: \$? = $ac_status" >&5
19971 (exit "$ac_status"); } &&
19972 { ac_try='test -s "conftest$ac_exeext"'
19973 { (eval echo "$as_me:19973: \"$ac_try\"") >&5
19974 (eval $ac_try) 2>&5
19976 echo "$as_me:19976: \$? = $ac_status" >&5
19977 (exit "$ac_status"); }; }; then
19978 cf_cv_curses_acs_map=$name; break
19980 echo "$as_me: failed program was:" >&5
19981 cat "conftest.$ac_ext" >&5
19983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19987 echo "$as_me:19987: result: $cf_cv_curses_acs_map" >&5
19988 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19990 test "$cf_cv_curses_acs_map" != unknown &&
19991 cat >>confdefs.h <<EOF
19992 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19995 if test "$cf_enable_widec" = yes; then
19997 echo "$as_me:19997: checking for wide alternate character set array" >&5
19998 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19999 if test "${cf_cv_curses_wacs_map+set}" = set; then
20000 echo $ECHO_N "(cached) $ECHO_C" >&6
20003 cf_cv_curses_wacs_map=unknown
20004 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
20006 cat >"conftest.$ac_ext" <<_ACEOF
20007 #line 20007 "configure"
20008 #include "confdefs.h"
20010 #ifndef _XOPEN_SOURCE_EXTENDED
20011 #define _XOPEN_SOURCE_EXTENDED
20013 #include <${cf_cv_ncurses_header:-curses.h}>
20017 void *foo = &(${name}['k']); (void)foo
20022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20023 if { (eval echo "$as_me:20023: \"$ac_link\"") >&5
20024 (eval $ac_link) 2>&5
20026 echo "$as_me:20026: \$? = $ac_status" >&5
20027 (exit "$ac_status"); } &&
20028 { ac_try='test -s "conftest$ac_exeext"'
20029 { (eval echo "$as_me:20029: \"$ac_try\"") >&5
20030 (eval $ac_try) 2>&5
20032 echo "$as_me:20032: \$? = $ac_status" >&5
20033 (exit "$ac_status"); }; }; then
20034 cf_cv_curses_wacs_map=$name
20037 echo "$as_me: failed program was:" >&5
20038 cat "conftest.$ac_ext" >&5
20040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20043 echo "$as_me:20043: result: $cf_cv_curses_wacs_map" >&5
20044 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20046 test "$cf_cv_curses_wacs_map" != unknown &&
20047 cat >>confdefs.h <<EOF
20048 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20051 echo "$as_me:20051: checking for wide alternate character constants" >&5
20052 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20053 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20054 echo $ECHO_N "(cached) $ECHO_C" >&6
20057 cf_cv_curses_wacs_symbols=no
20058 if test "$cf_cv_curses_wacs_map" != unknown
20060 cat >"conftest.$ac_ext" <<_ACEOF
20061 #line 20061 "configure"
20062 #include "confdefs.h"
20064 #ifndef _XOPEN_SOURCE_EXTENDED
20065 #define _XOPEN_SOURCE_EXTENDED
20067 #include <${cf_cv_ncurses_header:-curses.h}>
20071 cchar_t *foo = WACS_PLUS;
20072 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079 (eval $ac_link) 2>&5
20081 echo "$as_me:20081: \$? = $ac_status" >&5
20082 (exit "$ac_status"); } &&
20083 { ac_try='test -s "conftest$ac_exeext"'
20084 { (eval echo "$as_me:20084: \"$ac_try\"") >&5
20085 (eval $ac_try) 2>&5
20087 echo "$as_me:20087: \$? = $ac_status" >&5
20088 (exit "$ac_status"); }; }; then
20089 cf_cv_curses_wacs_symbols=yes
20091 echo "$as_me: failed program was:" >&5
20092 cat "conftest.$ac_ext" >&5
20094 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20096 cat >"conftest.$ac_ext" <<_ACEOF
20097 #line 20097 "configure"
20098 #include "confdefs.h"
20100 #ifndef _XOPEN_SOURCE_EXTENDED
20101 #define _XOPEN_SOURCE_EXTENDED
20103 #include <${cf_cv_ncurses_header:-curses.h}>
20107 cchar_t *foo = WACS_PLUS; (void)foo
20112 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20113 if { (eval echo "$as_me:20113: \"$ac_link\"") >&5
20114 (eval $ac_link) 2>&5
20116 echo "$as_me:20116: \$? = $ac_status" >&5
20117 (exit "$ac_status"); } &&
20118 { ac_try='test -s "conftest$ac_exeext"'
20119 { (eval echo "$as_me:20119: \"$ac_try\"") >&5
20120 (eval $ac_try) 2>&5
20122 echo "$as_me:20122: \$? = $ac_status" >&5
20123 (exit "$ac_status"); }; }; then
20124 cf_cv_curses_wacs_symbols=yes
20126 echo "$as_me: failed program was:" >&5
20127 cat "conftest.$ac_ext" >&5
20129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20133 echo "$as_me:20133: result: $cf_cv_curses_wacs_symbols" >&5
20134 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20136 test "$cf_cv_curses_wacs_symbols" != no &&
20137 cat >>confdefs.h <<\EOF
20138 #define CURSES_WACS_SYMBOLS 1
20143 echo "$as_me:20143: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20144 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20145 cat >"conftest.$ac_ext" <<_ACEOF
20146 #line 20146 "configure"
20147 #include "confdefs.h"
20149 #ifndef _XOPEN_SOURCE_EXTENDED
20150 #define _XOPEN_SOURCE_EXTENDED
20152 #include <${cf_cv_ncurses_header:-curses.h}>
20163 rm -f "conftest.$ac_objext"
20164 if { (eval echo "$as_me:20164: \"$ac_compile\"") >&5
20165 (eval $ac_compile) 2>&5
20167 echo "$as_me:20167: \$? = $ac_status" >&5
20168 (exit "$ac_status"); } &&
20169 { ac_try='test -s "conftest.$ac_objext"'
20170 { (eval echo "$as_me:20170: \"$ac_try\"") >&5
20171 (eval $ac_try) 2>&5
20173 echo "$as_me:20173: \$? = $ac_status" >&5
20174 (exit "$ac_status"); }; }; then
20177 echo "$as_me: failed program was:" >&5
20178 cat "conftest.$ac_ext" >&5
20181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20182 echo "$as_me:20182: result: $cf_result" >&5
20183 echo "${ECHO_T}$cf_result" >&6
20184 if test "$cf_result" = yes ; then
20186 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20188 cat >>confdefs.h <<EOF
20189 #define $cf_result 1
20194 cat >>confdefs.h <<EOF
20195 #define attr_t long
20200 if test "$cf_enable_widec" = yes; then
20202 # This is needed on Tru64 5.0 to declare mbstate_t
20203 echo "$as_me:20203: checking if we must include wchar.h to declare mbstate_t" >&5
20204 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20205 if test "${cf_cv_mbstate_t+set}" = set; then
20206 echo $ECHO_N "(cached) $ECHO_C" >&6
20209 cat >"conftest.$ac_ext" <<_ACEOF
20210 #line 20210 "configure"
20211 #include "confdefs.h"
20213 #include <stdlib.h>
20214 #include <stdarg.h>
20216 #ifdef HAVE_LIBUTF8_H
20217 #include <libutf8.h>
20227 rm -f "conftest.$ac_objext"
20228 if { (eval echo "$as_me:20228: \"$ac_compile\"") >&5
20229 (eval $ac_compile) 2>&5
20231 echo "$as_me:20231: \$? = $ac_status" >&5
20232 (exit "$ac_status"); } &&
20233 { ac_try='test -s "conftest.$ac_objext"'
20234 { (eval echo "$as_me:20234: \"$ac_try\"") >&5
20235 (eval $ac_try) 2>&5
20237 echo "$as_me:20237: \$? = $ac_status" >&5
20238 (exit "$ac_status"); }; }; then
20241 echo "$as_me: failed program was:" >&5
20242 cat "conftest.$ac_ext" >&5
20243 cat >"conftest.$ac_ext" <<_ACEOF
20244 #line 20244 "configure"
20245 #include "confdefs.h"
20247 #include <stdlib.h>
20248 #include <stdarg.h>
20251 #ifdef HAVE_LIBUTF8_H
20252 #include <libutf8.h>
20262 rm -f "conftest.$ac_objext"
20263 if { (eval echo "$as_me:20263: \"$ac_compile\"") >&5
20264 (eval $ac_compile) 2>&5
20266 echo "$as_me:20266: \$? = $ac_status" >&5
20267 (exit "$ac_status"); } &&
20268 { ac_try='test -s "conftest.$ac_objext"'
20269 { (eval echo "$as_me:20269: \"$ac_try\"") >&5
20270 (eval $ac_try) 2>&5
20272 echo "$as_me:20272: \$? = $ac_status" >&5
20273 (exit "$ac_status"); }; }; then
20274 cf_cv_mbstate_t=yes
20276 echo "$as_me: failed program was:" >&5
20277 cat "conftest.$ac_ext" >&5
20278 cf_cv_mbstate_t=unknown
20280 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20284 echo "$as_me:20284: result: $cf_cv_mbstate_t" >&5
20285 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20287 if test "$cf_cv_mbstate_t" = yes ; then
20289 cat >>confdefs.h <<\EOF
20290 #define NEED_WCHAR_H 1
20296 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20297 if test "$cf_cv_mbstate_t" = unknown ; then
20298 NCURSES_MBSTATE_T=1
20301 # if we find mbstate_t in either place, use substitution to provide a fallback.
20302 if test "$cf_cv_mbstate_t" != unknown ; then
20303 NCURSES_OK_MBSTATE_T=1
20306 # This is needed on Tru64 5.0 to declare wchar_t
20307 echo "$as_me:20307: checking if we must include wchar.h to declare wchar_t" >&5
20308 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20309 if test "${cf_cv_wchar_t+set}" = set; then
20310 echo $ECHO_N "(cached) $ECHO_C" >&6
20313 cat >"conftest.$ac_ext" <<_ACEOF
20314 #line 20314 "configure"
20315 #include "confdefs.h"
20317 #include <stdlib.h>
20318 #include <stdarg.h>
20320 #ifdef HAVE_LIBUTF8_H
20321 #include <libutf8.h>
20331 rm -f "conftest.$ac_objext"
20332 if { (eval echo "$as_me:20332: \"$ac_compile\"") >&5
20333 (eval $ac_compile) 2>&5
20335 echo "$as_me:20335: \$? = $ac_status" >&5
20336 (exit "$ac_status"); } &&
20337 { ac_try='test -s "conftest.$ac_objext"'
20338 { (eval echo "$as_me:20338: \"$ac_try\"") >&5
20339 (eval $ac_try) 2>&5
20341 echo "$as_me:20341: \$? = $ac_status" >&5
20342 (exit "$ac_status"); }; }; then
20345 echo "$as_me: failed program was:" >&5
20346 cat "conftest.$ac_ext" >&5
20347 cat >"conftest.$ac_ext" <<_ACEOF
20348 #line 20348 "configure"
20349 #include "confdefs.h"
20351 #include <stdlib.h>
20352 #include <stdarg.h>
20355 #ifdef HAVE_LIBUTF8_H
20356 #include <libutf8.h>
20366 rm -f "conftest.$ac_objext"
20367 if { (eval echo "$as_me:20367: \"$ac_compile\"") >&5
20368 (eval $ac_compile) 2>&5
20370 echo "$as_me:20370: \$? = $ac_status" >&5
20371 (exit "$ac_status"); } &&
20372 { ac_try='test -s "conftest.$ac_objext"'
20373 { (eval echo "$as_me:20373: \"$ac_try\"") >&5
20374 (eval $ac_try) 2>&5
20376 echo "$as_me:20376: \$? = $ac_status" >&5
20377 (exit "$ac_status"); }; }; then
20380 echo "$as_me: failed program was:" >&5
20381 cat "conftest.$ac_ext" >&5
20382 cf_cv_wchar_t=unknown
20384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20388 echo "$as_me:20388: result: $cf_cv_wchar_t" >&5
20389 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20391 if test "$cf_cv_wchar_t" = yes ; then
20393 cat >>confdefs.h <<\EOF
20394 #define NEED_WCHAR_H 1
20400 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20401 if test "$cf_cv_wchar_t" = unknown ; then
20405 # if we find wchar_t in either place, use substitution to provide a fallback.
20406 if test "$cf_cv_wchar_t" != unknown ; then
20407 NCURSES_OK_WCHAR_T=1
20410 # This is needed on Tru64 5.0 to declare wint_t
20411 echo "$as_me:20411: checking if we must include wchar.h to declare wint_t" >&5
20412 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20413 if test "${cf_cv_wint_t+set}" = set; then
20414 echo $ECHO_N "(cached) $ECHO_C" >&6
20417 cat >"conftest.$ac_ext" <<_ACEOF
20418 #line 20418 "configure"
20419 #include "confdefs.h"
20421 #include <stdlib.h>
20422 #include <stdarg.h>
20424 #ifdef HAVE_LIBUTF8_H
20425 #include <libutf8.h>
20435 rm -f "conftest.$ac_objext"
20436 if { (eval echo "$as_me:20436: \"$ac_compile\"") >&5
20437 (eval $ac_compile) 2>&5
20439 echo "$as_me:20439: \$? = $ac_status" >&5
20440 (exit "$ac_status"); } &&
20441 { ac_try='test -s "conftest.$ac_objext"'
20442 { (eval echo "$as_me:20442: \"$ac_try\"") >&5
20443 (eval $ac_try) 2>&5
20445 echo "$as_me:20445: \$? = $ac_status" >&5
20446 (exit "$ac_status"); }; }; then
20449 echo "$as_me: failed program was:" >&5
20450 cat "conftest.$ac_ext" >&5
20451 cat >"conftest.$ac_ext" <<_ACEOF
20452 #line 20452 "configure"
20453 #include "confdefs.h"
20455 #include <stdlib.h>
20456 #include <stdarg.h>
20459 #ifdef HAVE_LIBUTF8_H
20460 #include <libutf8.h>
20470 rm -f "conftest.$ac_objext"
20471 if { (eval echo "$as_me:20471: \"$ac_compile\"") >&5
20472 (eval $ac_compile) 2>&5
20474 echo "$as_me:20474: \$? = $ac_status" >&5
20475 (exit "$ac_status"); } &&
20476 { ac_try='test -s "conftest.$ac_objext"'
20477 { (eval echo "$as_me:20477: \"$ac_try\"") >&5
20478 (eval $ac_try) 2>&5
20480 echo "$as_me:20480: \$? = $ac_status" >&5
20481 (exit "$ac_status"); }; }; then
20484 echo "$as_me: failed program was:" >&5
20485 cat "conftest.$ac_ext" >&5
20486 cf_cv_wint_t=unknown
20488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20492 echo "$as_me:20492: result: $cf_cv_wint_t" >&5
20493 echo "${ECHO_T}$cf_cv_wint_t" >&6
20495 if test "$cf_cv_wint_t" = yes ; then
20497 cat >>confdefs.h <<\EOF
20498 #define NEED_WCHAR_H 1
20504 # if we do not find wint_t in either place, use substitution to provide a fallback.
20505 if test "$cf_cv_wint_t" = unknown ; then
20509 # if we find wint_t in either place, use substitution to provide a fallback.
20510 if test "$cf_cv_wint_t" != unknown ; then
20511 NCURSES_OK_WINT_T=1
20514 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20516 echo "$as_me:20516: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20517 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20518 cat >"conftest.$ac_ext" <<_ACEOF
20519 #line 20519 "configure"
20520 #include "confdefs.h"
20522 #ifndef _XOPEN_SOURCE_EXTENDED
20523 #define _XOPEN_SOURCE_EXTENDED
20525 #include <${cf_cv_ncurses_header:-curses.h}>
20536 rm -f "conftest.$ac_objext"
20537 if { (eval echo "$as_me:20537: \"$ac_compile\"") >&5
20538 (eval $ac_compile) 2>&5
20540 echo "$as_me:20540: \$? = $ac_status" >&5
20541 (exit "$ac_status"); } &&
20542 { ac_try='test -s "conftest.$ac_objext"'
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_ext"
20555 echo "$as_me:20555: result: $cf_result" >&5
20556 echo "${ECHO_T}$cf_result" >&6
20557 if test "$cf_result" = yes ; then
20559 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20561 cat >>confdefs.h <<EOF
20562 #define $cf_result 1
20567 cat >>confdefs.h <<EOF
20568 #define mbstate_t long
20575 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20577 echo "$as_me:20577: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20578 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20579 cat >"conftest.$ac_ext" <<_ACEOF
20580 #line 20580 "configure"
20581 #include "confdefs.h"
20583 #ifndef _XOPEN_SOURCE_EXTENDED
20584 #define _XOPEN_SOURCE_EXTENDED
20586 #include <${cf_cv_ncurses_header:-curses.h}>
20597 rm -f "conftest.$ac_objext"
20598 if { (eval echo "$as_me:20598: \"$ac_compile\"") >&5
20599 (eval $ac_compile) 2>&5
20601 echo "$as_me:20601: \$? = $ac_status" >&5
20602 (exit "$ac_status"); } &&
20603 { ac_try='test -s "conftest.$ac_objext"'
20604 { (eval echo "$as_me:20604: \"$ac_try\"") >&5
20605 (eval $ac_try) 2>&5
20607 echo "$as_me:20607: \$? = $ac_status" >&5
20608 (exit "$ac_status"); }; }; then
20611 echo "$as_me: failed program was:" >&5
20612 cat "conftest.$ac_ext" >&5
20615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20616 echo "$as_me:20616: result: $cf_result" >&5
20617 echo "${ECHO_T}$cf_result" >&6
20618 if test "$cf_result" = yes ; then
20620 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20622 cat >>confdefs.h <<EOF
20623 #define $cf_result 1
20628 cat >>confdefs.h <<EOF
20629 #define wchar_t long
20636 if test "$NCURSES_OK_WINT_T" = 0 ; then
20638 echo "$as_me:20638: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20639 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20640 cat >"conftest.$ac_ext" <<_ACEOF
20641 #line 20641 "configure"
20642 #include "confdefs.h"
20644 #ifndef _XOPEN_SOURCE_EXTENDED
20645 #define _XOPEN_SOURCE_EXTENDED
20647 #include <${cf_cv_ncurses_header:-curses.h}>
20658 rm -f "conftest.$ac_objext"
20659 if { (eval echo "$as_me:20659: \"$ac_compile\"") >&5
20660 (eval $ac_compile) 2>&5
20662 echo "$as_me:20662: \$? = $ac_status" >&5
20663 (exit "$ac_status"); } &&
20664 { ac_try='test -s "conftest.$ac_objext"'
20665 { (eval echo "$as_me:20665: \"$ac_try\"") >&5
20666 (eval $ac_try) 2>&5
20668 echo "$as_me:20668: \$? = $ac_status" >&5
20669 (exit "$ac_status"); }; }; then
20672 echo "$as_me: failed program was:" >&5
20673 cat "conftest.$ac_ext" >&5
20676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20677 echo "$as_me:20677: result: $cf_result" >&5
20678 echo "${ECHO_T}$cf_result" >&6
20679 if test "$cf_result" = yes ; then
20681 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20683 cat >>confdefs.h <<EOF
20684 #define $cf_result 1
20689 cat >>confdefs.h <<EOF
20690 #define wint_t long
20706 echo "$as_me:20706: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20707 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20709 cat >"conftest.$ac_ext" <<_ACEOF
20710 #line 20710 "configure"
20711 #include "confdefs.h"
20713 #ifdef HAVE_XCURSES
20714 #include <xcurses.h>
20715 char * XCursesProgramName = "test";
20717 #include <${cf_cv_ncurses_header:-curses.h}>
20718 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20719 #include <ncursesw/term.h>
20720 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20721 #include <ncurses/term.h>
20722 #elif defined(HAVE_TERM_H)
20731 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20732 const void *foo = (const void *)($cf_data);
20734 const void *foo = &($cf_data);
20736 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20742 rm -f "conftest.$ac_objext"
20743 if { (eval echo "$as_me:20743: \"$ac_compile\"") >&5
20744 (eval $ac_compile) 2>&5
20746 echo "$as_me:20746: \$? = $ac_status" >&5
20747 (exit "$ac_status"); } &&
20748 { ac_try='test -s "conftest.$ac_objext"'
20749 { (eval echo "$as_me:20749: \"$ac_try\"") >&5
20750 (eval $ac_try) 2>&5
20752 echo "$as_me:20752: \$? = $ac_status" >&5
20753 (exit "$ac_status"); }; }; then
20757 echo "$as_me: failed program was:" >&5
20758 cat "conftest.$ac_ext" >&5
20761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20762 echo "$as_me:20762: result: $cf_result" >&5
20763 echo "${ECHO_T}$cf_result" >&6
20765 if test "$cf_result" = yes ; then
20767 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20769 cat >>confdefs.h <<EOF
20770 #define $cf_result 1
20774 echo "$as_me:20774: checking for data $cf_data in library" >&5
20775 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20776 # BSD linkers insist on making weak linkage, but resolve at runtime.
20777 if test "$cross_compiling" = yes; then
20780 cat >"conftest.$ac_ext" <<_ACEOF
20781 #line 20781 "configure"
20782 #include "confdefs.h"
20784 #ifdef HAVE_XCURSES
20785 #include <xcurses.h>
20786 char * XCursesProgramName = "test";
20788 #include <${cf_cv_ncurses_header:-curses.h}>
20789 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20790 #include <ncursesw/term.h>
20791 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20792 #include <ncurses/term.h>
20793 #elif defined(HAVE_TERM_H)
20798 extern char $cf_data;
20805 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20806 const void *foo = (const void *)($cf_data);
20808 const void *foo = &($cf_data);
20810 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20812 ${cf_cv_main_return:-return}(foo == 0);
20819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20820 if { (eval echo "$as_me:20820: \"$ac_link\"") >&5
20821 (eval $ac_link) 2>&5
20823 echo "$as_me:20823: \$? = $ac_status" >&5
20824 (exit "$ac_status"); } &&
20825 { ac_try='test -s "conftest$ac_exeext"'
20826 { (eval echo "$as_me:20826: \"$ac_try\"") >&5
20827 (eval $ac_try) 2>&5
20829 echo "$as_me:20829: \$? = $ac_status" >&5
20830 (exit "$ac_status"); }; }; then
20833 echo "$as_me: failed program was:" >&5
20834 cat "conftest.$ac_ext" >&5
20837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20840 cat >"conftest.$ac_ext" <<_ACEOF
20841 #line 20841 "configure"
20842 #include "confdefs.h"
20844 #ifdef HAVE_XCURSES
20845 #include <xcurses.h>
20846 char * XCursesProgramName = "test";
20848 #include <${cf_cv_ncurses_header:-curses.h}>
20849 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20850 #include <ncursesw/term.h>
20851 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20852 #include <ncurses/term.h>
20853 #elif defined(HAVE_TERM_H)
20858 extern char $cf_data;
20862 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20863 const void *foo = (const void *)($cf_data);
20865 const void *foo = &($cf_data);
20867 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20869 ${cf_cv_main_return:-return}(foo == 0);
20872 rm -f "conftest$ac_exeext"
20873 if { (eval echo "$as_me:20873: \"$ac_link\"") >&5
20874 (eval $ac_link) 2>&5
20876 echo "$as_me:20876: \$? = $ac_status" >&5
20877 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20878 { (eval echo "$as_me:20878: \"$ac_try\"") >&5
20879 (eval $ac_try) 2>&5
20881 echo "$as_me:20881: \$? = $ac_status" >&5
20882 (exit "$ac_status"); }; }; then
20886 echo "$as_me: program exited with status $ac_status" >&5
20887 echo "$as_me: failed program was:" >&5
20888 cat "conftest.$ac_ext" >&5
20891 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20893 echo "$as_me:20893: result: $cf_result" >&5
20894 echo "${ECHO_T}$cf_result" >&6
20895 if test "$cf_result" = yes ; then
20897 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20899 cat >>confdefs.h <<EOF
20900 #define $cf_result 1
20903 # do not exit loop here, since we prefer system's declarations
20908 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20910 echo "$as_me:20910: checking for X" >&5
20911 echo $ECHO_N "checking for X... $ECHO_C" >&6
20913 # Check whether --with-x or --without-x was given.
20914 if test "${with_x+set}" = set; then
20918 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20919 if test "x$with_x" = xno; then
20920 # The user explicitly disabled X.
20923 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20924 # Both variables are already set.
20927 if test "${ac_cv_have_x+set}" = set; then
20928 echo $ECHO_N "(cached) $ECHO_C" >&6
20930 # One or both of the vars are not set, and there is no cached value.
20931 ac_x_includes=no ac_x_libraries=no
20932 rm -fr conftest.dir
20933 if mkdir conftest.dir; then
20935 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20936 cat >Imakefile <<'EOF'
20938 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20940 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20941 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20942 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20943 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20944 for ac_extension in a so sl dylib dll; do
20945 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20946 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20947 ac_im_usrlibdir=$ac_im_libdir; break
20950 # Screen out bogus values from the imake configuration. They are
20951 # bogus both because they are the default anyway, and because
20952 # using them would break gcc on systems where it needs fixed includes.
20953 case $ac_im_incroot in
20955 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20957 case $ac_im_usrlibdir in
20958 /usr/lib | /lib) ;;
20959 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20963 rm -fr conftest.dir
20966 # Standard set of common directories for X headers.
20967 # Check X11 before X11Rn because it is often a symlink to the current release.
20984 /usr/local/X11/include
20985 /usr/local/X11R7/include
20986 /usr/local/X11R6/include
20987 /usr/local/X11R5/include
20988 /usr/local/X11R4/include
20990 /usr/local/include/X11
20991 /usr/local/include/X11R7
20992 /usr/local/include/X11R6
20993 /usr/local/include/X11R5
20994 /usr/local/include/X11R4
20998 /usr/XFree86/include/X11
21002 /usr/unsupported/include
21003 /usr/athena/include
21004 /usr/local/x11r5/include
21005 /usr/lpp/Xamples/include
21007 /usr/openwin/include
21008 /usr/openwin/share/include'
21010 if test "$ac_x_includes" = no; then
21011 # Guess where to find include files, by looking for Intrinsic.h.
21012 # First, try using that file with no special directory specified.
21013 cat >"conftest.$ac_ext" <<_ACEOF
21014 #line 21014 "configure"
21015 #include "confdefs.h"
21016 #include <X11/Intrinsic.h>
21018 if { (eval echo "$as_me:21018: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21019 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21021 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21023 cat conftest.err >&5
21024 echo "$as_me:21024: \$? = $ac_status" >&5
21025 (exit "$ac_status"); } >/dev/null; then
21026 if test -s conftest.err; then
21027 ac_cpp_err=$ac_c_preproc_warn_flag
21034 if test -z "$ac_cpp_err"; then
21035 # We can compile using X headers with no special include directory.
21038 echo "$as_me: failed program was:" >&5
21039 cat "conftest.$ac_ext" >&5
21040 for ac_dir in $ac_x_header_dirs; do
21041 if test -r "$ac_dir/X11/Intrinsic.h"; then
21042 ac_x_includes=$ac_dir
21047 rm -f conftest.err "conftest.$ac_ext"
21048 fi # $ac_x_includes = no
21050 if test "$ac_x_libraries" = no; then
21051 # Check for the libraries.
21052 # See if we find them without any special options.
21053 # Don't add to $LIBS permanently.
21056 cat >"conftest.$ac_ext" <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059 #include <X11/Intrinsic.h>
21068 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21069 if { (eval echo "$as_me:21069: \"$ac_link\"") >&5
21070 (eval $ac_link) 2>&5
21072 echo "$as_me:21072: \$? = $ac_status" >&5
21073 (exit "$ac_status"); } &&
21074 { ac_try='test -s "conftest$ac_exeext"'
21075 { (eval echo "$as_me:21075: \"$ac_try\"") >&5
21076 (eval $ac_try) 2>&5
21078 echo "$as_me:21078: \$? = $ac_status" >&5
21079 (exit "$ac_status"); }; }; then
21081 # We can link X programs with no special library path.
21084 echo "$as_me: failed program was:" >&5
21085 cat "conftest.$ac_ext" >&5
21087 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
21089 # Don't even attempt the hair of trying to link an X program!
21090 for ac_extension in a so sl dylib dll; do
21091 if test -r "$ac_dir/libXt.$ac_extension"; then
21092 ac_x_libraries=$ac_dir
21098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21099 fi # $ac_x_libraries = no
21101 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21102 # Didn't find X anywhere. Cache the known absence of X.
21103 ac_cv_have_x="have_x=no"
21105 # Record where we found X for the cache.
21106 ac_cv_have_x="have_x=yes \
21107 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21112 eval "$ac_cv_have_x"
21115 if test "$have_x" != yes; then
21116 echo "$as_me:21116: result: $have_x" >&5
21117 echo "${ECHO_T}$have_x" >&6
21120 # If each of the values was on the command line, it overrides each guess.
21121 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21122 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21123 # Update the cache value to reflect the command line values.
21124 ac_cv_have_x="have_x=yes \
21125 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21126 echo "$as_me:21126: result: libraries $x_libraries, headers $x_includes" >&5
21127 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21130 if test "$no_x" = yes; then
21131 # Not all programs may use this symbol, but it does not hurt to define it.
21133 cat >>confdefs.h <<\EOF
21134 #define X_DISPLAY_MISSING 1
21142 if test -n "$x_includes"; then
21143 X_CFLAGS="$X_CFLAGS -I$x_includes"
21146 # It would also be nice to do this for all -L options, not just this one.
21147 if test -n "$x_libraries"; then
21148 X_LIBS="$X_LIBS -L$x_libraries"
21149 # For Solaris; some versions of Sun CC require a space after -R and
21150 # others require no space. Words are not sufficient . . . .
21151 case `(uname -sr) 2>/dev/null` in
21153 echo "$as_me:21153: checking whether -R must be followed by a space" >&5
21154 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21155 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21156 cat >"conftest.$ac_ext" <<_ACEOF
21157 #line 21157 "configure"
21158 #include "confdefs.h"
21168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21169 if { (eval echo "$as_me:21169: \"$ac_link\"") >&5
21170 (eval $ac_link) 2>&5
21172 echo "$as_me:21172: \$? = $ac_status" >&5
21173 (exit "$ac_status"); } &&
21174 { ac_try='test -s "conftest$ac_exeext"'
21175 { (eval echo "$as_me:21175: \"$ac_try\"") >&5
21176 (eval $ac_try) 2>&5
21178 echo "$as_me:21178: \$? = $ac_status" >&5
21179 (exit "$ac_status"); }; }; then
21182 echo "$as_me: failed program was:" >&5
21183 cat "conftest.$ac_ext" >&5
21186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21187 if test $ac_R_nospace = yes; then
21188 echo "$as_me:21188: result: no" >&5
21189 echo "${ECHO_T}no" >&6
21190 X_LIBS="$X_LIBS -R$x_libraries"
21192 LIBS="$ac_xsave_LIBS -R $x_libraries"
21193 cat >"conftest.$ac_ext" <<_ACEOF
21194 #line 21194 "configure"
21195 #include "confdefs.h"
21205 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21206 if { (eval echo "$as_me:21206: \"$ac_link\"") >&5
21207 (eval $ac_link) 2>&5
21209 echo "$as_me:21209: \$? = $ac_status" >&5
21210 (exit "$ac_status"); } &&
21211 { ac_try='test -s "conftest$ac_exeext"'
21212 { (eval echo "$as_me:21212: \"$ac_try\"") >&5
21213 (eval $ac_try) 2>&5
21215 echo "$as_me:21215: \$? = $ac_status" >&5
21216 (exit "$ac_status"); }; }; then
21219 echo "$as_me: failed program was:" >&5
21220 cat "conftest.$ac_ext" >&5
21223 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21224 if test $ac_R_space = yes; then
21225 echo "$as_me:21225: result: yes" >&5
21226 echo "${ECHO_T}yes" >&6
21227 X_LIBS="$X_LIBS -R $x_libraries"
21229 echo "$as_me:21229: result: neither works" >&5
21230 echo "${ECHO_T}neither works" >&6
21233 LIBS=$ac_xsave_LIBS
21237 # Check for system-dependent libraries X programs must link with.
21238 # Do this before checking for the system-independent R6 libraries
21239 # (-lICE), since we may need -lsocket or whatever for X linking.
21241 if test "$ISC" = yes; then
21242 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21244 # Martyn Johnson says this is needed for Ultrix, if the X
21245 # libraries were built with DECnet support. And Karl Berry says
21246 # the Alpha needs dnet_stub (dnet does not exist).
21247 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21248 cat >"conftest.$ac_ext" <<_ACEOF
21249 #line 21249 "configure"
21250 #include "confdefs.h"
21252 /* Override any gcc2 internal prototype to avoid an error. */
21256 /* We use char because int might match the return type of a gcc2
21257 builtin and then its argument prototype would still apply. */
21258 char XOpenDisplay ();
21267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21268 if { (eval echo "$as_me:21268: \"$ac_link\"") >&5
21269 (eval $ac_link) 2>&5
21271 echo "$as_me:21271: \$? = $ac_status" >&5
21272 (exit "$ac_status"); } &&
21273 { ac_try='test -s "conftest$ac_exeext"'
21274 { (eval echo "$as_me:21274: \"$ac_try\"") >&5
21275 (eval $ac_try) 2>&5
21277 echo "$as_me:21277: \$? = $ac_status" >&5
21278 (exit "$ac_status"); }; }; then
21281 echo "$as_me: failed program was:" >&5
21282 cat "conftest.$ac_ext" >&5
21283 echo "$as_me:21283: checking for dnet_ntoa in -ldnet" >&5
21284 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21285 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21286 echo $ECHO_N "(cached) $ECHO_C" >&6
21288 ac_check_lib_save_LIBS=$LIBS
21289 LIBS="-ldnet $LIBS"
21290 cat >"conftest.$ac_ext" <<_ACEOF
21291 #line 21291 "configure"
21292 #include "confdefs.h"
21294 /* Override any gcc2 internal prototype to avoid an error. */
21298 /* We use char because int might match the return type of a gcc2
21299 builtin and then its argument prototype would still apply. */
21309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21310 if { (eval echo "$as_me:21310: \"$ac_link\"") >&5
21311 (eval $ac_link) 2>&5
21313 echo "$as_me:21313: \$? = $ac_status" >&5
21314 (exit "$ac_status"); } &&
21315 { ac_try='test -s "conftest$ac_exeext"'
21316 { (eval echo "$as_me:21316: \"$ac_try\"") >&5
21317 (eval $ac_try) 2>&5
21319 echo "$as_me:21319: \$? = $ac_status" >&5
21320 (exit "$ac_status"); }; }; then
21321 ac_cv_lib_dnet_dnet_ntoa=yes
21323 echo "$as_me: failed program was:" >&5
21324 cat "conftest.$ac_ext" >&5
21325 ac_cv_lib_dnet_dnet_ntoa=no
21327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21328 LIBS=$ac_check_lib_save_LIBS
21330 echo "$as_me:21330: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21331 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21332 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21333 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21336 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21337 echo "$as_me:21337: checking for dnet_ntoa in -ldnet_stub" >&5
21338 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21339 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21340 echo $ECHO_N "(cached) $ECHO_C" >&6
21342 ac_check_lib_save_LIBS=$LIBS
21343 LIBS="-ldnet_stub $LIBS"
21344 cat >"conftest.$ac_ext" <<_ACEOF
21345 #line 21345 "configure"
21346 #include "confdefs.h"
21348 /* Override any gcc2 internal prototype to avoid an error. */
21352 /* We use char because int might match the return type of a gcc2
21353 builtin and then its argument prototype would still apply. */
21363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21364 if { (eval echo "$as_me:21364: \"$ac_link\"") >&5
21365 (eval $ac_link) 2>&5
21367 echo "$as_me:21367: \$? = $ac_status" >&5
21368 (exit "$ac_status"); } &&
21369 { ac_try='test -s "conftest$ac_exeext"'
21370 { (eval echo "$as_me:21370: \"$ac_try\"") >&5
21371 (eval $ac_try) 2>&5
21373 echo "$as_me:21373: \$? = $ac_status" >&5
21374 (exit "$ac_status"); }; }; then
21375 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21377 echo "$as_me: failed program was:" >&5
21378 cat "conftest.$ac_ext" >&5
21379 ac_cv_lib_dnet_stub_dnet_ntoa=no
21381 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21382 LIBS=$ac_check_lib_save_LIBS
21384 echo "$as_me:21384: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21385 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21386 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21387 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21392 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21393 LIBS="$ac_xsave_LIBS"
21395 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21396 # to get the SysV transport functions.
21397 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21399 # The nsl library prevents programs from opening the X display
21400 # on Irix 5.2, according to T.E. Dickey.
21401 # The functions gethostbyname, getservbyname, and inet_addr are
21402 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21403 echo "$as_me:21403: checking for gethostbyname" >&5
21404 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21405 if test "${ac_cv_func_gethostbyname+set}" = set; then
21406 echo $ECHO_N "(cached) $ECHO_C" >&6
21408 cat >"conftest.$ac_ext" <<_ACEOF
21409 #line 21409 "configure"
21410 #include "confdefs.h"
21411 #define gethostbyname autoconf_temporary
21412 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21413 #undef gethostbyname
21419 /* We use char because int might match the return type of a gcc2
21420 builtin and then its argument prototype would still apply. */
21421 char gethostbyname (void);
21427 /* The GNU C library defines stubs for functions which it implements
21428 to always fail with ENOSYS. Some functions are actually named
21429 something starting with __ and the normal name is an alias. */
21430 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21431 #error found stub for gethostbyname
21434 return gethostbyname ();
21439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21440 if { (eval echo "$as_me:21440: \"$ac_link\"") >&5
21441 (eval $ac_link) 2>&5
21443 echo "$as_me:21443: \$? = $ac_status" >&5
21444 (exit "$ac_status"); } &&
21445 { ac_try='test -s "conftest$ac_exeext"'
21446 { (eval echo "$as_me:21446: \"$ac_try\"") >&5
21447 (eval $ac_try) 2>&5
21449 echo "$as_me:21449: \$? = $ac_status" >&5
21450 (exit "$ac_status"); }; }; then
21451 ac_cv_func_gethostbyname=yes
21453 echo "$as_me: failed program was:" >&5
21454 cat "conftest.$ac_ext" >&5
21455 ac_cv_func_gethostbyname=no
21457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21459 echo "$as_me:21459: result: $ac_cv_func_gethostbyname" >&5
21460 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21462 if test $ac_cv_func_gethostbyname = no; then
21463 echo "$as_me:21463: checking for gethostbyname in -lnsl" >&5
21464 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21465 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21466 echo $ECHO_N "(cached) $ECHO_C" >&6
21468 ac_check_lib_save_LIBS=$LIBS
21470 cat >"conftest.$ac_ext" <<_ACEOF
21471 #line 21471 "configure"
21472 #include "confdefs.h"
21474 /* Override any gcc2 internal prototype to avoid an error. */
21478 /* We use char because int might match the return type of a gcc2
21479 builtin and then its argument prototype would still apply. */
21480 char gethostbyname ();
21489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21490 if { (eval echo "$as_me:21490: \"$ac_link\"") >&5
21491 (eval $ac_link) 2>&5
21493 echo "$as_me:21493: \$? = $ac_status" >&5
21494 (exit "$ac_status"); } &&
21495 { ac_try='test -s "conftest$ac_exeext"'
21496 { (eval echo "$as_me:21496: \"$ac_try\"") >&5
21497 (eval $ac_try) 2>&5
21499 echo "$as_me:21499: \$? = $ac_status" >&5
21500 (exit "$ac_status"); }; }; then
21501 ac_cv_lib_nsl_gethostbyname=yes
21503 echo "$as_me: failed program was:" >&5
21504 cat "conftest.$ac_ext" >&5
21505 ac_cv_lib_nsl_gethostbyname=no
21507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21508 LIBS=$ac_check_lib_save_LIBS
21510 echo "$as_me:21510: result: $ac_cv_lib_nsl_gethostbyname" >&5
21511 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21512 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21513 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21516 if test $ac_cv_lib_nsl_gethostbyname = no; then
21517 echo "$as_me:21517: checking for gethostbyname in -lbsd" >&5
21518 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21519 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21520 echo $ECHO_N "(cached) $ECHO_C" >&6
21522 ac_check_lib_save_LIBS=$LIBS
21524 cat >"conftest.$ac_ext" <<_ACEOF
21525 #line 21525 "configure"
21526 #include "confdefs.h"
21528 /* Override any gcc2 internal prototype to avoid an error. */
21532 /* We use char because int might match the return type of a gcc2
21533 builtin and then its argument prototype would still apply. */
21534 char gethostbyname ();
21543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21544 if { (eval echo "$as_me:21544: \"$ac_link\"") >&5
21545 (eval $ac_link) 2>&5
21547 echo "$as_me:21547: \$? = $ac_status" >&5
21548 (exit "$ac_status"); } &&
21549 { ac_try='test -s "conftest$ac_exeext"'
21550 { (eval echo "$as_me:21550: \"$ac_try\"") >&5
21551 (eval $ac_try) 2>&5
21553 echo "$as_me:21553: \$? = $ac_status" >&5
21554 (exit "$ac_status"); }; }; then
21555 ac_cv_lib_bsd_gethostbyname=yes
21557 echo "$as_me: failed program was:" >&5
21558 cat "conftest.$ac_ext" >&5
21559 ac_cv_lib_bsd_gethostbyname=no
21561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21562 LIBS=$ac_check_lib_save_LIBS
21564 echo "$as_me:21564: result: $ac_cv_lib_bsd_gethostbyname" >&5
21565 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21566 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21567 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21573 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21574 # socket/setsockopt and other routines are undefined under SCO ODT
21575 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21576 # on later versions), says Simon Leinen: it contains gethostby*
21577 # variants that don't use the nameserver (or something). -lsocket
21578 # must be given before -lnsl if both are needed. We assume that
21579 # if connect needs -lnsl, so does gethostbyname.
21580 echo "$as_me:21580: checking for connect" >&5
21581 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21582 if test "${ac_cv_func_connect+set}" = set; then
21583 echo $ECHO_N "(cached) $ECHO_C" >&6
21585 cat >"conftest.$ac_ext" <<_ACEOF
21586 #line 21586 "configure"
21587 #include "confdefs.h"
21588 #define connect autoconf_temporary
21589 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21596 /* We use char because int might match the return type of a gcc2
21597 builtin and then its argument prototype would still apply. */
21598 char connect (void);
21604 /* The GNU C library defines stubs for functions which it implements
21605 to always fail with ENOSYS. Some functions are actually named
21606 something starting with __ and the normal name is an alias. */
21607 #if defined (__stub_connect) || defined (__stub___connect)
21608 #error found stub for connect
21616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21617 if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618 (eval $ac_link) 2>&5
21620 echo "$as_me:21620: \$? = $ac_status" >&5
21621 (exit "$ac_status"); } &&
21622 { ac_try='test -s "conftest$ac_exeext"'
21623 { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624 (eval $ac_try) 2>&5
21626 echo "$as_me:21626: \$? = $ac_status" >&5
21627 (exit "$ac_status"); }; }; then
21628 ac_cv_func_connect=yes
21630 echo "$as_me: failed program was:" >&5
21631 cat "conftest.$ac_ext" >&5
21632 ac_cv_func_connect=no
21634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21636 echo "$as_me:21636: result: $ac_cv_func_connect" >&5
21637 echo "${ECHO_T}$ac_cv_func_connect" >&6
21639 if test $ac_cv_func_connect = no; then
21640 echo "$as_me:21640: checking for connect in -lsocket" >&5
21641 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21642 if test "${ac_cv_lib_socket_connect+set}" = set; then
21643 echo $ECHO_N "(cached) $ECHO_C" >&6
21645 ac_check_lib_save_LIBS=$LIBS
21646 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21647 cat >"conftest.$ac_ext" <<_ACEOF
21648 #line 21648 "configure"
21649 #include "confdefs.h"
21651 /* Override any gcc2 internal prototype to avoid an error. */
21655 /* We use char because int might match the return type of a gcc2
21656 builtin and then its argument prototype would still apply. */
21666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21667 if { (eval echo "$as_me:21667: \"$ac_link\"") >&5
21668 (eval $ac_link) 2>&5
21670 echo "$as_me:21670: \$? = $ac_status" >&5
21671 (exit "$ac_status"); } &&
21672 { ac_try='test -s "conftest$ac_exeext"'
21673 { (eval echo "$as_me:21673: \"$ac_try\"") >&5
21674 (eval $ac_try) 2>&5
21676 echo "$as_me:21676: \$? = $ac_status" >&5
21677 (exit "$ac_status"); }; }; then
21678 ac_cv_lib_socket_connect=yes
21680 echo "$as_me: failed program was:" >&5
21681 cat "conftest.$ac_ext" >&5
21682 ac_cv_lib_socket_connect=no
21684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21685 LIBS=$ac_check_lib_save_LIBS
21687 echo "$as_me:21687: result: $ac_cv_lib_socket_connect" >&5
21688 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21689 if test "$ac_cv_lib_socket_connect" = yes; then
21690 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21695 # Guillermo Gomez says -lposix is necessary on A/UX.
21696 echo "$as_me:21696: checking for remove" >&5
21697 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21698 if test "${ac_cv_func_remove+set}" = set; then
21699 echo $ECHO_N "(cached) $ECHO_C" >&6
21701 cat >"conftest.$ac_ext" <<_ACEOF
21702 #line 21702 "configure"
21703 #include "confdefs.h"
21704 #define remove autoconf_temporary
21705 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21712 /* We use char because int might match the return type of a gcc2
21713 builtin and then its argument prototype would still apply. */
21714 char remove (void);
21720 /* The GNU C library defines stubs for functions which it implements
21721 to always fail with ENOSYS. Some functions are actually named
21722 something starting with __ and the normal name is an alias. */
21723 #if defined (__stub_remove) || defined (__stub___remove)
21724 #error found stub for remove
21732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21733 if { (eval echo "$as_me:21733: \"$ac_link\"") >&5
21734 (eval $ac_link) 2>&5
21736 echo "$as_me:21736: \$? = $ac_status" >&5
21737 (exit "$ac_status"); } &&
21738 { ac_try='test -s "conftest$ac_exeext"'
21739 { (eval echo "$as_me:21739: \"$ac_try\"") >&5
21740 (eval $ac_try) 2>&5
21742 echo "$as_me:21742: \$? = $ac_status" >&5
21743 (exit "$ac_status"); }; }; then
21744 ac_cv_func_remove=yes
21746 echo "$as_me: failed program was:" >&5
21747 cat "conftest.$ac_ext" >&5
21748 ac_cv_func_remove=no
21750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21752 echo "$as_me:21752: result: $ac_cv_func_remove" >&5
21753 echo "${ECHO_T}$ac_cv_func_remove" >&6
21755 if test $ac_cv_func_remove = no; then
21756 echo "$as_me:21756: checking for remove in -lposix" >&5
21757 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21758 if test "${ac_cv_lib_posix_remove+set}" = set; then
21759 echo $ECHO_N "(cached) $ECHO_C" >&6
21761 ac_check_lib_save_LIBS=$LIBS
21762 LIBS="-lposix $LIBS"
21763 cat >"conftest.$ac_ext" <<_ACEOF
21764 #line 21764 "configure"
21765 #include "confdefs.h"
21767 /* Override any gcc2 internal prototype to avoid an error. */
21771 /* We use char because int might match the return type of a gcc2
21772 builtin and then its argument prototype would still apply. */
21782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21783 if { (eval echo "$as_me:21783: \"$ac_link\"") >&5
21784 (eval $ac_link) 2>&5
21786 echo "$as_me:21786: \$? = $ac_status" >&5
21787 (exit "$ac_status"); } &&
21788 { ac_try='test -s "conftest$ac_exeext"'
21789 { (eval echo "$as_me:21789: \"$ac_try\"") >&5
21790 (eval $ac_try) 2>&5
21792 echo "$as_me:21792: \$? = $ac_status" >&5
21793 (exit "$ac_status"); }; }; then
21794 ac_cv_lib_posix_remove=yes
21796 echo "$as_me: failed program was:" >&5
21797 cat "conftest.$ac_ext" >&5
21798 ac_cv_lib_posix_remove=no
21800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21801 LIBS=$ac_check_lib_save_LIBS
21803 echo "$as_me:21803: result: $ac_cv_lib_posix_remove" >&5
21804 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21805 if test "$ac_cv_lib_posix_remove" = yes; then
21806 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21811 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21812 echo "$as_me:21812: checking for shmat" >&5
21813 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21814 if test "${ac_cv_func_shmat+set}" = set; then
21815 echo $ECHO_N "(cached) $ECHO_C" >&6
21817 cat >"conftest.$ac_ext" <<_ACEOF
21818 #line 21818 "configure"
21819 #include "confdefs.h"
21820 #define shmat autoconf_temporary
21821 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21828 /* We use char because int might match the return type of a gcc2
21829 builtin and then its argument prototype would still apply. */
21836 /* The GNU C library defines stubs for functions which it implements
21837 to always fail with ENOSYS. Some functions are actually named
21838 something starting with __ and the normal name is an alias. */
21839 #if defined (__stub_shmat) || defined (__stub___shmat)
21840 #error found stub for shmat
21848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21849 if { (eval echo "$as_me:21849: \"$ac_link\"") >&5
21850 (eval $ac_link) 2>&5
21852 echo "$as_me:21852: \$? = $ac_status" >&5
21853 (exit "$ac_status"); } &&
21854 { ac_try='test -s "conftest$ac_exeext"'
21855 { (eval echo "$as_me:21855: \"$ac_try\"") >&5
21856 (eval $ac_try) 2>&5
21858 echo "$as_me:21858: \$? = $ac_status" >&5
21859 (exit "$ac_status"); }; }; then
21860 ac_cv_func_shmat=yes
21862 echo "$as_me: failed program was:" >&5
21863 cat "conftest.$ac_ext" >&5
21864 ac_cv_func_shmat=no
21866 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21868 echo "$as_me:21868: result: $ac_cv_func_shmat" >&5
21869 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21871 if test $ac_cv_func_shmat = no; then
21872 echo "$as_me:21872: checking for shmat in -lipc" >&5
21873 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21874 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21875 echo $ECHO_N "(cached) $ECHO_C" >&6
21877 ac_check_lib_save_LIBS=$LIBS
21879 cat >"conftest.$ac_ext" <<_ACEOF
21880 #line 21880 "configure"
21881 #include "confdefs.h"
21883 /* Override any gcc2 internal prototype to avoid an error. */
21887 /* We use char because int might match the return type of a gcc2
21888 builtin and then its argument prototype would still apply. */
21898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21899 if { (eval echo "$as_me:21899: \"$ac_link\"") >&5
21900 (eval $ac_link) 2>&5
21902 echo "$as_me:21902: \$? = $ac_status" >&5
21903 (exit "$ac_status"); } &&
21904 { ac_try='test -s "conftest$ac_exeext"'
21905 { (eval echo "$as_me:21905: \"$ac_try\"") >&5
21906 (eval $ac_try) 2>&5
21908 echo "$as_me:21908: \$? = $ac_status" >&5
21909 (exit "$ac_status"); }; }; then
21910 ac_cv_lib_ipc_shmat=yes
21912 echo "$as_me: failed program was:" >&5
21913 cat "conftest.$ac_ext" >&5
21914 ac_cv_lib_ipc_shmat=no
21916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21917 LIBS=$ac_check_lib_save_LIBS
21919 echo "$as_me:21919: result: $ac_cv_lib_ipc_shmat" >&5
21920 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21921 if test "$ac_cv_lib_ipc_shmat" = yes; then
21922 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21928 # Check for libraries that X11R6 Xt/Xaw programs need.
21929 ac_save_LDFLAGS=$LDFLAGS
21930 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21931 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21932 # check for ICE first), but we must link in the order -lSM -lICE or
21933 # we get undefined symbols. So assume we have SM if we have ICE.
21934 # These have to be linked with before -lX11, unlike the other
21935 # libraries we check for below, so use a different variable.
21936 # John Interrante, Karl Berry
21937 echo "$as_me:21937: checking for IceConnectionNumber in -lICE" >&5
21938 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21939 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21940 echo $ECHO_N "(cached) $ECHO_C" >&6
21942 ac_check_lib_save_LIBS=$LIBS
21943 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21944 cat >"conftest.$ac_ext" <<_ACEOF
21945 #line 21945 "configure"
21946 #include "confdefs.h"
21948 /* Override any gcc2 internal prototype to avoid an error. */
21952 /* We use char because int might match the return type of a gcc2
21953 builtin and then its argument prototype would still apply. */
21954 char IceConnectionNumber ();
21958 IceConnectionNumber ();
21963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21964 if { (eval echo "$as_me:21964: \"$ac_link\"") >&5
21965 (eval $ac_link) 2>&5
21967 echo "$as_me:21967: \$? = $ac_status" >&5
21968 (exit "$ac_status"); } &&
21969 { ac_try='test -s "conftest$ac_exeext"'
21970 { (eval echo "$as_me:21970: \"$ac_try\"") >&5
21971 (eval $ac_try) 2>&5
21973 echo "$as_me:21973: \$? = $ac_status" >&5
21974 (exit "$ac_status"); }; }; then
21975 ac_cv_lib_ICE_IceConnectionNumber=yes
21977 echo "$as_me: failed program was:" >&5
21978 cat "conftest.$ac_ext" >&5
21979 ac_cv_lib_ICE_IceConnectionNumber=no
21981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21982 LIBS=$ac_check_lib_save_LIBS
21984 echo "$as_me:21984: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21985 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21986 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21987 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21990 LDFLAGS=$ac_save_LDFLAGS
21996 if test "$GCC" = yes || test "$GXX" = yes
21999 if test "$GCC" = yes || test "$GXX" = yes
22004 for cf_temp_scan in $CFLAGS
22006 case "x$cf_temp_scan" in
22009 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22010 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22015 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22016 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22021 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22022 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22027 if test "x$CFLAGS" != "x$cf_temp_flags"
22029 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22031 echo "${as_me:-configure}:22031: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22033 CFLAGS="$cf_temp_flags"
22034 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22036 echo "${as_me:-configure}:22036: testing ... fixed $CFLAGS ..." 1>&5
22038 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22040 echo "${as_me:-configure}:22040: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22047 if test "$GCC" = yes || test "$GXX" = yes
22052 for cf_temp_scan in $CPPFLAGS
22054 case "x$cf_temp_scan" in
22057 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22058 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22063 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22064 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22069 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22070 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22075 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22077 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22079 echo "${as_me:-configure}:22079: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22081 CPPFLAGS="$cf_temp_flags"
22082 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
22084 echo "${as_me:-configure}:22084: testing ... fixed $CPPFLAGS ..." 1>&5
22086 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22088 echo "${as_me:-configure}:22088: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22095 if test "$GCC" = yes || test "$GXX" = yes
22100 for cf_temp_scan in $LDFLAGS
22102 case "x$cf_temp_scan" in
22105 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22106 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22111 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22112 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22117 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22118 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22123 if test "x$LDFLAGS" != "x$cf_temp_flags"
22125 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
22127 echo "${as_me:-configure}:22127: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
22129 LDFLAGS="$cf_temp_flags"
22130 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22132 echo "${as_me:-configure}:22132: testing ... fixed $LDFLAGS ..." 1>&5
22134 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22136 echo "${as_me:-configure}:22136: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22143 echo "$as_me:22143: checking if you want to turn on gcc warnings" >&5
22144 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22146 # Check whether --enable-warnings or --disable-warnings was given.
22147 if test "${enable_warnings+set}" = set; then
22148 enableval="$enable_warnings"
22149 test "$enableval" != yes && enableval=no
22150 if test "$enableval" != "no" ; then
22151 enable_warnings=yes
22160 echo "$as_me:22160: result: $enable_warnings" >&5
22161 echo "${ECHO_T}$enable_warnings" >&6
22162 if test "$enable_warnings" = "yes"
22165 if test "$GCC" = yes || test "$GXX" = yes
22167 cat > conftest.i <<EOF
22169 #define GCC_PRINTF 0
22172 #define GCC_SCANF 0
22174 #ifndef GCC_NORETURN
22175 #define GCC_NORETURN /* nothing */
22178 #define GCC_UNUSED /* nothing */
22181 if test "$GCC" = yes
22183 { echo "$as_me:22183: checking for $CC __attribute__ directives..." >&5
22184 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22185 cat > "conftest.$ac_ext" <<EOF
22186 #line 22186 "${as_me:-configure}"
22188 #include "confdefs.h"
22189 #include "conftest.h"
22190 #include "conftest.i"
22192 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22194 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22197 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22199 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22201 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22202 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22203 extern GCC_NORETURN void foo(void);
22204 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22206 cf_printf_attribute=no
22207 cf_scanf_attribute=no
22208 for cf_attribute in scanf printf unused noreturn
22211 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22213 cf_directive="__attribute__(($cf_attribute))"
22214 echo "checking for $CC $cf_directive" 1>&5
22216 case "$cf_attribute" in
22218 cf_printf_attribute=yes
22219 cat >conftest.h <<EOF
22220 #define GCC_$cf_ATTRIBUTE 1
22224 cf_scanf_attribute=yes
22225 cat >conftest.h <<EOF
22226 #define GCC_$cf_ATTRIBUTE 1
22230 cat >conftest.h <<EOF
22231 #define GCC_$cf_ATTRIBUTE $cf_directive
22236 if { (eval echo "$as_me:22236: \"$ac_compile\"") >&5
22237 (eval $ac_compile) 2>&5
22239 echo "$as_me:22239: \$? = $ac_status" >&5
22240 (exit "$ac_status"); }; then
22241 test -n "$verbose" && echo "$as_me:22241: result: ... $cf_attribute" >&5
22242 echo "${ECHO_T}... $cf_attribute" >&6
22243 cat conftest.h >>confdefs.h
22244 case "$cf_attribute" in
22247 cat >>confdefs.h <<EOF
22248 #define GCC_NORETURN $cf_directive
22253 cf_value='/* nothing */'
22254 if test "$cf_printf_attribute" != no ; then
22255 cf_value='__attribute__((format(printf,fmt,var)))'
22257 cat >>confdefs.h <<\EOF
22258 #define GCC_PRINTF 1
22263 cat >>confdefs.h <<EOF
22264 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22269 cf_value='/* nothing */'
22270 if test "$cf_scanf_attribute" != no ; then
22271 cf_value='__attribute__((format(scanf,fmt,var)))'
22273 cat >>confdefs.h <<\EOF
22274 #define GCC_SCANF 1
22279 cat >>confdefs.h <<EOF
22280 #define GCC_SCANFLIKE(fmt,var) $cf_value
22286 cat >>confdefs.h <<EOF
22287 #define GCC_UNUSED $cf_directive
22295 ${FGREP-fgrep} define conftest.i >>confdefs.h
22300 if test "x$have_x" = xyes; then
22302 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22303 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22304 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22305 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22306 for cf_X_CFLAGS in $X_CFLAGS
22308 case "x$cf_X_CFLAGS" in
22310 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22313 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22318 cat >"conftest.$ac_ext" <<_ACEOF
22319 #line 22319 "configure"
22320 #include "confdefs.h"
22322 #include <stdlib.h>
22323 #include <X11/Intrinsic.h>
22328 String foo = malloc(1); free((void*)foo)
22333 rm -f "conftest.$ac_objext"
22334 if { (eval echo "$as_me:22334: \"$ac_compile\"") >&5
22335 (eval $ac_compile) 2>&5
22337 echo "$as_me:22337: \$? = $ac_status" >&5
22338 (exit "$ac_status"); } &&
22339 { ac_try='test -s "conftest.$ac_objext"'
22340 { (eval echo "$as_me:22340: \"$ac_try\"") >&5
22341 (eval $ac_try) 2>&5
22343 echo "$as_me:22343: \$? = $ac_status" >&5
22344 (exit "$ac_status"); }; }; then
22346 echo "$as_me:22346: checking for X11/Xt const-feature" >&5
22347 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22348 if test "${cf_cv_const_x_string+set}" = set; then
22349 echo $ECHO_N "(cached) $ECHO_C" >&6
22352 cat >"conftest.$ac_ext" <<_ACEOF
22353 #line 22353 "configure"
22354 #include "confdefs.h"
22356 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22357 #undef XTSTRINGDEFINES /* X11R5 and later */
22358 #include <stdlib.h>
22359 #include <X11/Intrinsic.h>
22364 String foo = malloc(1); *foo = 0
22369 rm -f "conftest.$ac_objext"
22370 if { (eval echo "$as_me:22370: \"$ac_compile\"") >&5
22371 (eval $ac_compile) 2>&5
22373 echo "$as_me:22373: \$? = $ac_status" >&5
22374 (exit "$ac_status"); } &&
22375 { ac_try='test -s "conftest.$ac_objext"'
22376 { (eval echo "$as_me:22376: \"$ac_try\"") >&5
22377 (eval $ac_try) 2>&5
22379 echo "$as_me:22379: \$? = $ac_status" >&5
22380 (exit "$ac_status"); }; }; then
22382 cf_cv_const_x_string=no
22385 echo "$as_me: failed program was:" >&5
22386 cat "conftest.$ac_ext" >&5
22388 cf_cv_const_x_string=yes
22391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22394 echo "$as_me:22394: result: $cf_cv_const_x_string" >&5
22395 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22397 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22398 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22399 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22401 case "$cf_cv_const_x_string" in
22404 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22405 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22411 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22417 echo "$as_me: failed program was:" >&5
22418 cat "conftest.$ac_ext" >&5
22420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22422 cat > "conftest.$ac_ext" <<EOF
22423 #line 22423 "${as_me:-configure}"
22424 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22426 if test "$INTEL_COMPILER" = yes
22428 # The "-wdXXX" options suppress warnings:
22429 # remark #1419: external declaration in primary source file
22430 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22431 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22432 # remark #193: zero used for undefined preprocessing identifier
22433 # remark #593: variable "curs_sb_left_arrow" was set but never used
22434 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22435 # remark #869: parameter "tw" was never referenced
22436 # remark #981: operands are evaluated in unspecified order
22437 # warning #279: controlling expression is constant
22439 { echo "$as_me:22439: checking for $CC warning options..." >&5
22440 echo "$as_me: checking for $CC warning options..." >&6;}
22441 cf_save_CFLAGS="$CFLAGS"
22442 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22454 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22455 if { (eval echo "$as_me:22455: \"$ac_compile\"") >&5
22456 (eval $ac_compile) 2>&5
22458 echo "$as_me:22458: \$? = $ac_status" >&5
22459 (exit "$ac_status"); }; then
22460 test -n "$verbose" && echo "$as_me:22460: result: ... -$cf_opt" >&5
22461 echo "${ECHO_T}... -$cf_opt" >&6
22462 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22465 CFLAGS="$cf_save_CFLAGS"
22466 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22468 { echo "$as_me:22468: checking for $CC warning options..." >&5
22469 echo "$as_me: checking for $CC warning options..." >&6;}
22470 cf_save_CFLAGS="$CFLAGS"
22472 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22473 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22474 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22475 for cf_opt in W Wall \
22476 Wbad-function-cast \
22479 Wdeclaration-after-statement \
22482 Wmissing-declarations \
22483 Wmissing-prototypes \
22487 Wstrict-prototypes \
22488 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22490 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22491 if { (eval echo "$as_me:22491: \"$ac_compile\"") >&5
22492 (eval $ac_compile) 2>&5
22494 echo "$as_me:22494: \$? = $ac_status" >&5
22495 (exit "$ac_status"); }; then
22496 test -n "$verbose" && echo "$as_me:22496: result: ... -$cf_opt" >&5
22497 echo "${ECHO_T}... -$cf_opt" >&6
22500 case "$GCC_VERSION" in
22502 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22504 echo "${as_me:-configure}:22504: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22510 case "$GCC_VERSION" in
22512 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22514 echo "${as_me:-configure}:22514: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22520 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22523 CFLAGS="$cf_save_CFLAGS"
22531 echo "$as_me:22531: checking if you want to use dmalloc for testing" >&5
22532 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22534 # Check whether --with-dmalloc or --without-dmalloc was given.
22535 if test "${with_dmalloc+set}" = set; then
22536 withval="$with_dmalloc"
22537 case "x$withval" in
22540 : "${with_cflags:=-g}"
22541 : "${enable_leaks:=no}"
22544 cat >>confdefs.h <<EOF
22545 #define USE_DMALLOC 1
22553 echo "$as_me:22553: result: ${with_dmalloc:-no}" >&5
22554 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22556 case ".$with_cflags" in
22566 cf_new_extra_cppflags=
22568 for cf_add_cflags in -g
22570 case "$cf_fix_cppflags" in
22572 case "$cf_add_cflags" in
22573 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22574 case "$cf_add_cflags" in
22576 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22579 && test -z "${cf_tst_cflags}" \
22580 && cf_fix_cppflags=yes
22582 if test "$cf_fix_cppflags" = yes ; then
22584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22588 elif test "${cf_tst_cflags}" = "\"'" ; then
22590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22597 case "$CPPFLAGS" in
22601 case "$cf_add_cflags" in
22603 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22605 CPPFLAGS=`echo "$CPPFLAGS" | \
22606 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22607 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22612 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22613 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22620 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22621 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22628 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22629 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22631 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22633 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22634 && test -z "${cf_tst_cflags}" \
22635 && cf_fix_cppflags=no
22640 if test -n "$cf_new_cflags" ; then
22642 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22643 CFLAGS="${CFLAGS}$cf_new_cflags"
22647 if test -n "$cf_new_cppflags" ; then
22649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22650 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22654 if test -n "$cf_new_extra_cppflags" ; then
22656 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22657 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22666 if test "$with_dmalloc" = yes ; then
22667 echo "$as_me:22667: checking for dmalloc.h" >&5
22668 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22669 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22670 echo $ECHO_N "(cached) $ECHO_C" >&6
22672 cat >"conftest.$ac_ext" <<_ACEOF
22673 #line 22673 "configure"
22674 #include "confdefs.h"
22675 #include <dmalloc.h>
22677 if { (eval echo "$as_me:22677: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22678 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22680 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22682 cat conftest.err >&5
22683 echo "$as_me:22683: \$? = $ac_status" >&5
22684 (exit "$ac_status"); } >/dev/null; then
22685 if test -s conftest.err; then
22686 ac_cpp_err=$ac_c_preproc_warn_flag
22693 if test -z "$ac_cpp_err"; then
22694 ac_cv_header_dmalloc_h=yes
22696 echo "$as_me: failed program was:" >&5
22697 cat "conftest.$ac_ext" >&5
22698 ac_cv_header_dmalloc_h=no
22700 rm -f conftest.err "conftest.$ac_ext"
22702 echo "$as_me:22702: result: $ac_cv_header_dmalloc_h" >&5
22703 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22704 if test "$ac_cv_header_dmalloc_h" = yes; then
22706 echo "$as_me:22706: checking for dmalloc_debug in -ldmalloc" >&5
22707 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22708 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22709 echo $ECHO_N "(cached) $ECHO_C" >&6
22711 ac_check_lib_save_LIBS=$LIBS
22712 LIBS="-ldmalloc $LIBS"
22713 cat >"conftest.$ac_ext" <<_ACEOF
22714 #line 22714 "configure"
22715 #include "confdefs.h"
22717 /* Override any gcc2 internal prototype to avoid an error. */
22721 /* We use char because int might match the return type of a gcc2
22722 builtin and then its argument prototype would still apply. */
22723 char dmalloc_debug ();
22732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22733 if { (eval echo "$as_me:22733: \"$ac_link\"") >&5
22734 (eval $ac_link) 2>&5
22736 echo "$as_me:22736: \$? = $ac_status" >&5
22737 (exit "$ac_status"); } &&
22738 { ac_try='test -s "conftest$ac_exeext"'
22739 { (eval echo "$as_me:22739: \"$ac_try\"") >&5
22740 (eval $ac_try) 2>&5
22742 echo "$as_me:22742: \$? = $ac_status" >&5
22743 (exit "$ac_status"); }; }; then
22744 ac_cv_lib_dmalloc_dmalloc_debug=yes
22746 echo "$as_me: failed program was:" >&5
22747 cat "conftest.$ac_ext" >&5
22748 ac_cv_lib_dmalloc_dmalloc_debug=no
22750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22751 LIBS=$ac_check_lib_save_LIBS
22753 echo "$as_me:22753: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22754 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22755 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22756 cat >>confdefs.h <<EOF
22757 #define HAVE_LIBDMALLOC 1
22760 LIBS="-ldmalloc $LIBS"
22768 echo "$as_me:22768: checking if you want to use dbmalloc for testing" >&5
22769 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22771 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22772 if test "${with_dbmalloc+set}" = set; then
22773 withval="$with_dbmalloc"
22774 case "x$withval" in
22777 : "${with_cflags:=-g}"
22778 : "${enable_leaks:=no}"
22781 cat >>confdefs.h <<EOF
22782 #define USE_DBMALLOC 1
22790 echo "$as_me:22790: result: ${with_dbmalloc:-no}" >&5
22791 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22793 case ".$with_cflags" in
22803 cf_new_extra_cppflags=
22805 for cf_add_cflags in -g
22807 case "$cf_fix_cppflags" in
22809 case "$cf_add_cflags" in
22810 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22811 case "$cf_add_cflags" in
22813 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22815 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22816 && test -z "${cf_tst_cflags}" \
22817 && cf_fix_cppflags=yes
22819 if test "$cf_fix_cppflags" = yes ; then
22821 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22822 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22825 elif test "${cf_tst_cflags}" = "\"'" ; then
22827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22834 case "$CPPFLAGS" in
22838 case "$cf_add_cflags" in
22840 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22842 CPPFLAGS=`echo "$CPPFLAGS" | \
22843 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22844 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22849 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22850 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22857 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22858 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22868 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22870 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22871 && test -z "${cf_tst_cflags}" \
22872 && cf_fix_cppflags=no
22877 if test -n "$cf_new_cflags" ; then
22879 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22880 CFLAGS="${CFLAGS}$cf_new_cflags"
22884 if test -n "$cf_new_cppflags" ; then
22886 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22887 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22891 if test -n "$cf_new_extra_cppflags" ; then
22893 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22894 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22903 if test "$with_dbmalloc" = yes ; then
22904 echo "$as_me:22904: checking for dbmalloc.h" >&5
22905 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22906 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22907 echo $ECHO_N "(cached) $ECHO_C" >&6
22909 cat >"conftest.$ac_ext" <<_ACEOF
22910 #line 22910 "configure"
22911 #include "confdefs.h"
22912 #include <dbmalloc.h>
22914 if { (eval echo "$as_me:22914: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22915 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22917 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22919 cat conftest.err >&5
22920 echo "$as_me:22920: \$? = $ac_status" >&5
22921 (exit "$ac_status"); } >/dev/null; then
22922 if test -s conftest.err; then
22923 ac_cpp_err=$ac_c_preproc_warn_flag
22930 if test -z "$ac_cpp_err"; then
22931 ac_cv_header_dbmalloc_h=yes
22933 echo "$as_me: failed program was:" >&5
22934 cat "conftest.$ac_ext" >&5
22935 ac_cv_header_dbmalloc_h=no
22937 rm -f conftest.err "conftest.$ac_ext"
22939 echo "$as_me:22939: result: $ac_cv_header_dbmalloc_h" >&5
22940 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22941 if test "$ac_cv_header_dbmalloc_h" = yes; then
22943 echo "$as_me:22943: checking for debug_malloc in -ldbmalloc" >&5
22944 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22945 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22946 echo $ECHO_N "(cached) $ECHO_C" >&6
22948 ac_check_lib_save_LIBS=$LIBS
22949 LIBS="-ldbmalloc $LIBS"
22950 cat >"conftest.$ac_ext" <<_ACEOF
22951 #line 22951 "configure"
22952 #include "confdefs.h"
22954 /* Override any gcc2 internal prototype to avoid an error. */
22958 /* We use char because int might match the return type of a gcc2
22959 builtin and then its argument prototype would still apply. */
22960 char debug_malloc ();
22969 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22970 if { (eval echo "$as_me:22970: \"$ac_link\"") >&5
22971 (eval $ac_link) 2>&5
22973 echo "$as_me:22973: \$? = $ac_status" >&5
22974 (exit "$ac_status"); } &&
22975 { ac_try='test -s "conftest$ac_exeext"'
22976 { (eval echo "$as_me:22976: \"$ac_try\"") >&5
22977 (eval $ac_try) 2>&5
22979 echo "$as_me:22979: \$? = $ac_status" >&5
22980 (exit "$ac_status"); }; }; then
22981 ac_cv_lib_dbmalloc_debug_malloc=yes
22983 echo "$as_me: failed program was:" >&5
22984 cat "conftest.$ac_ext" >&5
22985 ac_cv_lib_dbmalloc_debug_malloc=no
22987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22988 LIBS=$ac_check_lib_save_LIBS
22990 echo "$as_me:22990: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22991 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22992 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22993 cat >>confdefs.h <<EOF
22994 #define HAVE_LIBDBMALLOC 1
22997 LIBS="-ldbmalloc $LIBS"
23005 echo "$as_me:23005: checking if you want to use valgrind for testing" >&5
23006 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23008 # Check whether --with-valgrind or --without-valgrind was given.
23009 if test "${with_valgrind+set}" = set; then
23010 withval="$with_valgrind"
23011 case "x$withval" in
23014 : "${with_cflags:=-g}"
23015 : "${enable_leaks:=no}"
23018 cat >>confdefs.h <<EOF
23019 #define USE_VALGRIND 1
23027 echo "$as_me:23027: result: ${with_valgrind:-no}" >&5
23028 echo "${ECHO_T}${with_valgrind:-no}" >&6
23030 case ".$with_cflags" in
23040 cf_new_extra_cppflags=
23042 for cf_add_cflags in -g
23044 case "$cf_fix_cppflags" in
23046 case "$cf_add_cflags" in
23047 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23048 case "$cf_add_cflags" in
23050 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23052 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23053 && test -z "${cf_tst_cflags}" \
23054 && cf_fix_cppflags=yes
23056 if test "$cf_fix_cppflags" = yes ; then
23058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23062 elif test "${cf_tst_cflags}" = "\"'" ; then
23064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23071 case "$CPPFLAGS" in
23075 case "$cf_add_cflags" in
23077 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23079 CPPFLAGS=`echo "$CPPFLAGS" | \
23080 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23081 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23086 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23087 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23094 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23095 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23105 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23107 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23108 && test -z "${cf_tst_cflags}" \
23109 && cf_fix_cppflags=no
23114 if test -n "$cf_new_cflags" ; then
23116 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23117 CFLAGS="${CFLAGS}$cf_new_cflags"
23121 if test -n "$cf_new_cppflags" ; then
23123 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23124 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23128 if test -n "$cf_new_extra_cppflags" ; then
23130 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23131 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23140 echo "$as_me:23140: checking if you want to perform memory-leak testing" >&5
23141 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23143 # Check whether --enable-leaks or --disable-leaks was given.
23144 if test "${enable_leaks+set}" = set; then
23145 enableval="$enable_leaks"
23146 enable_leaks=$enableval
23150 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23151 echo "$as_me:23151: result: $with_no_leaks" >&5
23152 echo "${ECHO_T}$with_no_leaks" >&6
23154 if test "$enable_leaks" = no ; then
23156 cat >>confdefs.h <<\EOF
23160 cat >>confdefs.h <<\EOF
23161 #define YY_NO_LEAKS 1
23167 if test "x$cf_cv_enable_rpath" != xno
23169 echo "$as_me:23169: checking for an rpath option" >&5
23170 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23171 case "$cf_cv_system_name" in
23173 if test "$GCC" = yes; then
23174 LD_RPATH_OPT="-Wl,-rpath,"
23176 LD_RPATH_OPT="-rpath "
23179 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23180 LD_RPATH_OPT="-Wl,-rpath,"
23182 (openbsd[2-9].*|mirbsd*)
23183 LD_RPATH_OPT="-Wl,-rpath,"
23186 LD_RPATH_OPT="-rpath "
23189 LD_RPATH_OPT="-Wl,-rpath,"
23192 LD_RPATH_OPT="-rpath "
23200 echo "$as_me:23200: result: $LD_RPATH_OPT" >&5
23201 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23203 case "x$LD_RPATH_OPT" in
23205 echo "$as_me:23205: checking if we need a space after rpath option" >&5
23206 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23207 cf_save_LIBS="$LIBS"
23209 cf_add_libs="$LIBS"
23212 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23213 # filter duplicates
23214 for cf_add_1lib in $cf_add_0lib; do
23215 for cf_add_2lib in $cf_add_libs; do
23216 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23223 LIBS="$cf_add_libs"
23225 cat >"conftest.$ac_ext" <<_ACEOF
23226 #line 23226 "configure"
23227 #include "confdefs.h"
23237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23238 if { (eval echo "$as_me:23238: \"$ac_link\"") >&5
23239 (eval $ac_link) 2>&5
23241 echo "$as_me:23241: \$? = $ac_status" >&5
23242 (exit "$ac_status"); } &&
23243 { ac_try='test -s "conftest$ac_exeext"'
23244 { (eval echo "$as_me:23244: \"$ac_try\"") >&5
23245 (eval $ac_try) 2>&5
23247 echo "$as_me:23247: \$? = $ac_status" >&5
23248 (exit "$ac_status"); }; }; then
23251 echo "$as_me: failed program was:" >&5
23252 cat "conftest.$ac_ext" >&5
23255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23256 LIBS="$cf_save_LIBS"
23257 echo "$as_me:23257: result: $cf_rpath_space" >&5
23258 echo "${ECHO_T}$cf_rpath_space" >&6
23259 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23264 echo "$as_me:23264: checking if rpath-hack should be disabled" >&5
23265 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23267 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23268 if test "${enable_rpath_hack+set}" = set; then
23269 enableval="$enable_rpath_hack"
23270 test "$enableval" != no && enableval=yes
23271 if test "$enableval" != "yes" ; then
23272 enable_rpath_hack=no
23274 enable_rpath_hack=yes
23278 enable_rpath_hack=yes
23281 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23282 echo "$as_me:23282: result: $cf_disable_rpath_hack" >&5
23283 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23285 if test "$enable_rpath_hack" = yes ; then
23287 echo "$as_me:23287: checking for updated LDFLAGS" >&5
23288 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23289 if test -n "$LD_RPATH_OPT" ; then
23290 echo "$as_me:23290: result: maybe" >&5
23291 echo "${ECHO_T}maybe" >&6
23295 # Extract the first word of "$ac_prog", so it can be a program name with args.
23296 set dummy $ac_prog; ac_word=$2
23297 echo "$as_me:23297: checking for $ac_word" >&5
23298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23299 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23300 echo $ECHO_N "(cached) $ECHO_C" >&6
23302 if test -n "$cf_ldd_prog"; then
23303 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23305 ac_save_IFS=$IFS; IFS=$ac_path_separator
23307 for ac_dir in $ac_dummy; do
23309 test -z "$ac_dir" && ac_dir=.
23310 $as_executable_p "$ac_dir/$ac_word" || continue
23311 ac_cv_prog_cf_ldd_prog="$ac_prog"
23312 echo "$as_me:23312: found $ac_dir/$ac_word" >&5
23318 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23319 if test -n "$cf_ldd_prog"; then
23320 echo "$as_me:23320: result: $cf_ldd_prog" >&5
23321 echo "${ECHO_T}$cf_ldd_prog" >&6
23323 echo "$as_me:23323: result: no" >&5
23324 echo "${ECHO_T}no" >&6
23327 test -n "$cf_ldd_prog" && break
23329 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23331 cf_rpath_list="/usr/lib /lib"
23332 if test "$cf_ldd_prog" != no
23336 cat >"conftest.$ac_ext" <<_ACEOF
23337 #line 23337 "configure"
23338 #include "confdefs.h"
23348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23349 if { (eval echo "$as_me:23349: \"$ac_link\"") >&5
23350 (eval $ac_link) 2>&5
23352 echo "$as_me:23352: \$? = $ac_status" >&5
23353 (exit "$ac_status"); } &&
23354 { ac_try='test -s "conftest$ac_exeext"'
23355 { (eval echo "$as_me:23355: \"$ac_try\"") >&5
23356 (eval $ac_try) 2>&5
23358 echo "$as_me:23358: \$? = $ac_status" >&5
23359 (exit "$ac_status"); }; }; then
23360 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23361 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23363 echo "$as_me: failed program was:" >&5
23364 cat "conftest.$ac_ext" >&5
23366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23368 # If we passed the link-test, but get a "not found" on a given library,
23369 # this could be due to inept reconfiguration of gcc to make it only
23370 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23371 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23372 # /usr/local libraries.
23373 if test -n "$cf_rpath_oops"
23375 for cf_rpath_src in $cf_rpath_oops
23377 for cf_rpath_dir in \
23382 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23384 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23386 echo "${as_me:-configure}:23386: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23388 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23396 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23398 echo "${as_me:-configure}:23398: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23400 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23402 echo "${as_me:-configure}:23402: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23405 for cf_rpath_src in $LDFLAGS
23407 case "$cf_rpath_src" in
23410 # check if this refers to a directory which we will ignore
23412 if test -n "$cf_rpath_list"
23414 for cf_rpath_item in $cf_rpath_list
23416 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23424 if test "$cf_rpath_skip" = no
23426 # transform the option
23427 if test "$LD_RPATH_OPT" = "-R " ; then
23428 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23430 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23433 # if we have not already added this, add it now
23434 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23435 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23437 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23439 echo "${as_me:-configure}:23439: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23441 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23446 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23448 LDFLAGS=$cf_rpath_dst
23450 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23452 echo "${as_me:-configure}:23452: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23454 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23456 echo "${as_me:-configure}:23456: testing ...checking LIBS $LIBS ..." 1>&5
23459 for cf_rpath_src in $LIBS
23461 case "$cf_rpath_src" in
23464 # check if this refers to a directory which we will ignore
23466 if test -n "$cf_rpath_list"
23468 for cf_rpath_item in $cf_rpath_list
23470 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23478 if test "$cf_rpath_skip" = no
23480 # transform the option
23481 if test "$LD_RPATH_OPT" = "-R " ; then
23482 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23484 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23487 # if we have not already added this, add it now
23488 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23489 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23491 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23493 echo "${as_me:-configure}:23493: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23495 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23500 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23504 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23506 echo "${as_me:-configure}:23506: testing ...checked LIBS $LIBS ..." 1>&5
23508 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23510 echo "${as_me:-configure}:23510: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23513 echo "$as_me:23513: result: no" >&5
23514 echo "${ECHO_T}no" >&6
23522 ac_config_files="$ac_config_files Makefile"
23523 ac_config_commands="$ac_config_commands default"
23524 cat >confcache <<\_ACEOF
23525 # This file is a shell script that caches the results of configure
23526 # tests run on this system so they can be shared between configure
23527 # scripts and configure runs, see configure's option --config-cache.
23528 # It is not useful on other systems. If it contains results you don't
23529 # want to keep, you may remove or edit it.
23531 # config.status only pays attention to the cache file if you give it
23532 # the --recheck option to rerun configure.
23534 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23535 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23536 # following values.
23540 # The following way of writing the cache mishandles newlines in values,
23541 # but we know of no workaround that is simple, portable, and efficient.
23542 # So, don't put newlines in cache variables' values.
23543 # Ultrix sh set writes to stderr and can't be redirected directly,
23544 # and sets the high bit in the cache file unless we assign to the vars.
23547 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23549 # `set' does not quote correctly, so add quotes (double-quote
23550 # substitution turns \\\\ into \\, and sed turns \\ into \).
23553 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23556 # `set' quotes correctly as required by POSIX, so do not add quotes.
23558 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23565 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23567 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23569 if cmp -s $cache_file confcache; then :; else
23570 if test -w $cache_file; then
23571 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23572 cat confcache >$cache_file
23574 echo "not updating unwritable cache $cache_file"
23579 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23580 # Let make expand exec_prefix.
23581 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23583 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23584 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23585 # trailing colons and then remove the whole line if VPATH becomes empty
23586 # (actually we leave an empty line to preserve line numbers).
23587 if test "x$srcdir" = x.; then
23588 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23589 s/:*\$(srcdir):*/:/;
23590 s/:*\${srcdir}:*/:/;
23592 s/^\([^=]*=[ ]*\):*/\1/;
23598 DEFS=-DHAVE_CONFIG_H
23600 : "${CONFIG_STATUS=./config.status}"
23601 ac_clean_files_save=$ac_clean_files
23602 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23603 { echo "$as_me:23603: creating $CONFIG_STATUS" >&5
23604 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23605 cat >"$CONFIG_STATUS" <<_ACEOF
23607 # Generated automatically by configure.
23608 # Run this file to recreate the current configuration.
23609 # Compiler output produced by configure, useful for debugging
23610 # configure, is in config.log if it exists.
23612 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
23615 SHELL=\${CONFIG_SHELL-$SHELL}
23616 ac_cs_invocation="\$0 \$@"
23618 CLICOLOR_FORCE= GREP_OPTIONS=
23619 unset CLICOLOR_FORCE GREP_OPTIONS
23622 cat >>"$CONFIG_STATUS" <<\_ACEOF
23623 # Be Bourne compatible
23624 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23627 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23631 # Name of the executable.
23632 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23634 if expr a : '\(a\)' >/dev/null 2>&1; then
23640 rm -f conf$$ conf$$.exe conf$$.file
23642 if ln -s conf$$.file conf$$ 2>/dev/null; then
23643 # We could just check for DJGPP; but this test a) works b) is more generic
23644 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23645 if test -f conf$$.exe; then
23646 # Don't use ln at all; we don't have any links
23651 elif ln conf$$.file conf$$ 2>/dev/null; then
23656 rm -f conf$$ conf$$.exe conf$$.file
23658 as_executable_p="test -f"
23660 # Support unset when possible.
23661 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23668 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23669 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23670 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23671 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23672 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23673 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23674 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23675 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23678 # We need space, tab and new line, in precisely that order.
23684 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23690 # Files that config.status was made for.
23691 if test -n "$ac_config_files"; then
23692 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23695 if test -n "$ac_config_headers"; then
23696 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23699 if test -n "$ac_config_links"; then
23700 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23703 if test -n "$ac_config_commands"; then
23704 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23707 cat >>"$CONFIG_STATUS" <<\EOF
23710 \`$as_me' instantiates files from templates according to the
23711 current configuration.
23713 Usage: $0 [OPTIONS] [FILE]...
23715 -h, --help print this help, then exit
23716 -V, --version print version number, then exit
23717 -d, --debug don't remove temporary files
23718 --recheck update $as_me by reconfiguring in the same conditions
23719 --file=FILE[:TEMPLATE]
23720 instantiate the configuration file FILE
23721 --header=FILE[:TEMPLATE]
23722 instantiate the configuration header FILE
23724 Configuration files:
23727 Configuration headers:
23730 Configuration commands:
23733 Report bugs to <dickey@invisible-island.net>."
23736 cat >>"$CONFIG_STATUS" <<EOF
23739 configured by $0, generated by GNU Autoconf 2.52.20230114,
23740 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23742 Copyright 2003-2022,2023 Thomas E. Dickey
23743 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23744 Free Software Foundation, Inc.
23745 This config.status script is free software; the Free Software Foundation
23746 gives unlimited permission to copy, distribute and modify it."
23751 cat >>"$CONFIG_STATUS" <<\EOF
23752 # If no file are specified by the user, then we need to provide default
23753 # value. By we need to know if files were specified by the user.
23759 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23760 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23762 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23766 *) # This is not an option, so the user has probably given explicit
23768 ac_need_defaults=false;;
23772 # Handling of the options.
23774 cat >>"$CONFIG_STATUS" <<EOF
23775 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23776 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23777 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23779 cat >>"$CONFIG_STATUS" <<\EOF
23780 --version | --vers* | -V )
23781 echo "$ac_cs_version"; exit 0 ;;
23783 # Conflict between --help and --header
23784 { { echo "$as_me:23784: error: ambiguous option: $1
23785 Try \`$0 --help' for more information." >&5
23786 echo "$as_me: error: ambiguous option: $1
23787 Try \`$0 --help' for more information." >&2;}
23788 { (exit 1); exit 1; }; };;
23789 --help | --hel | -h )
23790 echo "$ac_cs_usage"; exit 0 ;;
23791 --debug | --d* | -d )
23793 --file | --fil | --fi | --f )
23795 CONFIG_FILES="$CONFIG_FILES $1"
23796 ac_need_defaults=false;;
23797 --header | --heade | --head | --hea )
23799 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23800 ac_need_defaults=false;;
23802 # This is an error.
23803 -*) { { echo "$as_me:23803: error: unrecognized option: $1
23804 Try \`$0 --help' for more information." >&5
23805 echo "$as_me: error: unrecognized option: $1
23806 Try \`$0 --help' for more information." >&2;}
23807 { (exit 1); exit 1; }; } ;;
23809 *) ac_config_targets="$ac_config_targets $1" ;;
23818 ## ----------------------- ##
23819 ## Running config.status. ##
23820 ## ----------------------- ##
23822 This file was extended by $as_me 2.52.20230114, executed with
23823 CONFIG_FILES = $CONFIG_FILES
23824 CONFIG_HEADERS = $CONFIG_HEADERS
23825 CONFIG_LINKS = $CONFIG_LINKS
23826 CONFIG_COMMANDS = $CONFIG_COMMANDS
23827 > "$ac_cs_invocation"
23828 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23833 cat >>"$CONFIG_STATUS" <<EOF
23835 # INIT-COMMANDS section.
23845 cat >>"$CONFIG_STATUS" <<\EOF
23846 for ac_config_target in $ac_config_targets
23848 case "$ac_config_target" in
23849 # Handling of arguments.
23850 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23851 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23852 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23853 *) { { echo "$as_me:23853: error: invalid argument: $ac_config_target" >&5
23854 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23855 { (exit 1); exit 1; }; };;
23859 # If the user did not use the arguments to specify the items to instantiate,
23860 # then the envvar interface is used. Set only those that are not.
23861 # We use the long form for the default assignment because of an extremely
23862 # bizarre bug on SunOS 4.1.3.
23863 if "$ac_need_defaults"; then
23864 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23865 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23866 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23869 # Create a temporary directory, and hook for its removal unless debugging.
23872 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23873 trap '{ (exit 1); exit 1; }' 1 2 13 15
23876 # Create a (secure) tmp directory for tmp files.
23879 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23880 test -n "$tmp" && test -d "$tmp"
23883 tmp=$TMPDIR/cs$$-$RANDOM
23884 (umask 077 && mkdir "$tmp")
23887 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23888 { (exit 1); exit 1; }
23893 cat >>"$CONFIG_STATUS" <<EOF
23896 # CONFIG_FILES section.
23899 # No need to generate the scripts if there are no CONFIG_FILES.
23900 # This happens for instance when ./config.status config.h
23901 if test -n "\$CONFIG_FILES"; then
23902 # Protect against being on the right side of a sed subst in config.status.
23903 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23904 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
23905 s,@SHELL@,$SHELL,;t t
23906 s,@exec_prefix@,$exec_prefix,;t t
23907 s,@prefix@,$prefix,;t t
23908 s,@program_transform_name@,$program_transform_name,;t t
23909 s,@bindir@,$bindir,;t t
23910 s,@sbindir@,$sbindir,;t t
23911 s,@libexecdir@,$libexecdir,;t t
23912 s,@datarootdir@,$datarootdir,;t t
23913 s,@datadir@,$datadir,;t t
23914 s,@sysconfdir@,$sysconfdir,;t t
23915 s,@sharedstatedir@,$sharedstatedir,;t t
23916 s,@localstatedir@,$localstatedir,;t t
23917 s,@runstatedir@,$runstatedir,;t t
23918 s,@libdir@,$libdir,;t t
23919 s,@includedir@,$includedir,;t t
23920 s,@oldincludedir@,$oldincludedir,;t t
23921 s,@infodir@,$infodir,;t t
23922 s,@mandir@,$mandir,;t t
23923 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23924 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23925 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23926 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23927 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23928 s,@build_alias@,$build_alias,;t t
23929 s,@host_alias@,$host_alias,;t t
23930 s,@target_alias@,$target_alias,;t t
23931 s,@ECHO_C@,$ECHO_C,;t t
23932 s,@ECHO_N@,$ECHO_N,;t t
23933 s,@ECHO_T@,$ECHO_T,;t t
23934 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23935 s,@DEFS@,$DEFS,;t t
23936 s,@LIBS@,$LIBS,;t t
23937 s,@build@,$build,;t t
23938 s,@build_cpu@,$build_cpu,;t t
23939 s,@build_vendor@,$build_vendor,;t t
23940 s,@build_os@,$build_os,;t t
23941 s,@host@,$host,;t t
23942 s,@host_cpu@,$host_cpu,;t t
23943 s,@host_vendor@,$host_vendor,;t t
23944 s,@host_os@,$host_os,;t t
23945 s,@SET_MAKE@,$SET_MAKE,;t t
23947 s,@CFLAGS@,$CFLAGS,;t t
23948 s,@LDFLAGS@,$LDFLAGS,;t t
23949 s,@CPPFLAGS@,$CPPFLAGS,;t t
23950 s,@ac_ct_CC@,$ac_ct_CC,;t t
23951 s,@EXEEXT@,$EXEEXT,;t t
23952 s,@OBJEXT@,$OBJEXT,;t t
23953 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23955 s,@GREP@,$GREP,;t t
23956 s,@EGREP@,$EGREP,;t t
23958 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23959 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23960 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23961 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23962 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23963 s,@LINT@,$LINT,;t t
23964 s,@LINT_OPTS@,$LINT_OPTS,;t t
23965 s,@LINT_LIBS@,$LINT_LIBS,;t t
23966 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
23967 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
23968 s,@CTAGS@,$CTAGS,;t t
23969 s,@ETAGS@,$ETAGS,;t t
23970 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23971 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23972 s,@MATH_LIB@,$MATH_LIB,;t t
23973 s,@top_builddir@,$top_builddir,;t t
23974 s,@CC_G_OPT@,$CC_G_OPT,;t t
23975 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23976 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23977 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23978 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23980 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23981 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23982 s,@LD_MODEL@,$LD_MODEL,;t t
23983 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23984 s,@LIBTOOL@,$LIBTOOL,;t t
23985 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23986 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23987 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23988 s,@LIB_LINK@,$LIB_LINK,;t t
23989 s,@LINK_TESTS@,$LINK_TESTS,;t t
23990 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23991 s,@PACKAGE@,$PACKAGE,;t t
23992 s,@PTHREAD@,$PTHREAD,;t t
23993 s,@TEST_ARGS@,$TEST_ARGS,;t t
23994 s,@TEST_DEPS@,$TEST_DEPS,;t t
23995 s,@TEST_LIBS@,$TEST_LIBS,;t t
23996 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23997 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23998 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23999 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24000 s,@includesubdir@,$includesubdir,;t t
24001 s,@FGREP@,$FGREP,;t t
24002 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
24003 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
24004 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24005 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24006 s,@ECHO_LT@,$ECHO_LT,;t t
24007 s,@ECHO_LD@,$ECHO_LD,;t t
24008 s,@RULE_CC@,$RULE_CC,;t t
24009 s,@SHOW_CC@,$SHOW_CC,;t t
24010 s,@ECHO_CC@,$ECHO_CC,;t t
24011 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24012 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
24013 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
24014 s,@X_CFLAGS@,$X_CFLAGS,;t t
24015 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24016 s,@X_LIBS@,$X_LIBS,;t t
24017 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24018 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24019 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24020 s,@RGB_PATH@,$RGB_PATH,;t t
24021 s,@no_x11_rgb@,$no_x11_rgb,;t t
24022 s,@FORM_NAME@,$FORM_NAME,;t t
24023 s,@MENU_NAME@,$MENU_NAME,;t t
24024 s,@PANEL_NAME@,$PANEL_NAME,;t t
24025 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24026 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24027 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24032 cat >>"$CONFIG_STATUS" <<\EOF
24033 # Split the substitutions into bite-sized pieces for seds with
24034 # small command number limits, like on Digital OSF/1 and HP-UX.
24035 ac_max_sed_lines=48
24036 ac_sed_frag=1 # Number of current file.
24037 ac_beg=1 # First line for current file.
24038 ac_end=$ac_max_sed_lines # Line after last line for current file.
24041 while "$ac_more_lines"; do
24042 if test "$ac_beg" -gt 1; then
24043 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24045 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24047 if test ! -s "$tmp"/subs.frag; then
24048 ac_more_lines=false
24050 # The purpose of the label and of the branching condition is to
24051 # speed up the sed processing (if there are no `@' at all, there
24052 # is no need to browse any of the substitutions).
24053 # These are the two extra sed commands mentioned above.
24055 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24056 # It is possible to make a multiline substitution using escaped newlines.
24057 # Ensure that we do not split the substitution between script fragments.
24059 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
24060 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
24061 if test -s "$tmp"/subs.next; then
24062 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
24063 if test ! -s "$tmp"/subs.edit; then
24064 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
24065 if test ! -s "$tmp"/subs.edit; then
24066 if test "$ac_beg" -gt 1; then
24067 ac_end=`expr "$ac_end" - 1`
24074 if test -z "$ac_sed_cmds"; then
24075 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24077 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24079 ac_sed_frag=`expr "$ac_sed_frag" + 1`
24081 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
24084 if test -z "$ac_sed_cmds"; then
24087 fi # test -n "$CONFIG_FILES"
24090 cat >>"$CONFIG_STATUS" <<\EOF
24091 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24092 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24094 - | *:- | *:-:* ) # input from stdin
24096 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24097 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24098 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24099 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24100 * ) ac_file_in=$ac_file.in ;;
24103 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24104 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24105 X"$ac_file" : 'X\(//\)[^/]' \| \
24106 X"$ac_file" : 'X\(//\)$' \| \
24107 X"$ac_file" : 'X\(/\)' \| \
24108 . : '\(.\)' 2>/dev/null ||
24110 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24111 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24112 /^X\(\/\/\)$/{ s//\1/; q; }
24113 /^X\(\/\).*/{ s//\1/; q; }
24115 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24116 { case "$ac_dir" in
24117 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24121 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24122 case $as_mkdir_dir in
24123 # Skip DOS drivespec
24124 ?:) as_incr_dir=$as_mkdir_dir ;;
24126 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24127 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24132 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
24133 # A "../" for each directory in $ac_dir_suffix.
24134 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24136 ac_dir_suffix= ac_dots=
24141 if test -z "$ac_dots"; then
24144 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24146 [\\/]* | ?:[\\/]* )
24147 ac_srcdir="$srcdir$ac_dir_suffix";
24148 ac_top_srcdir="$srcdir" ;;
24149 *) # Relative path.
24150 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24151 ac_top_srcdir="$ac_dots$srcdir" ;;
24155 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24156 *) ac_INSTALL=$ac_dots$INSTALL ;;
24159 if test x"$ac_file" != x-; then
24160 { echo "$as_me:24160: creating $ac_file" >&5
24161 echo "$as_me: creating $ac_file" >&6;}
24164 # Let's still pretend it is `configure' which instantiates (i.e., don't
24165 # use $as_me), people would be surprised to read:
24166 # /* config.h. Generated automatically by config.status. */
24167 configure_input="Generated automatically from `echo $ac_file_in |
24168 sed 's,.*/,,'` by configure."
24170 # First look for the input files in the build tree, otherwise in the
24172 ac_file_inputs=`IFS=:
24173 for f in $ac_file_in; do
24175 -) echo "$tmp"/stdin ;;
24177 # Absolute (can't be DOS-style, as IFS=:)
24178 test -f "$f" || { { echo "$as_me:24178: error: cannot find input file: $f" >&5
24179 echo "$as_me: error: cannot find input file: $f" >&2;}
24180 { (exit 1); exit 1; }; }
24183 if test -f "$f"; then
24186 elif test -f "$srcdir/$f"; then
24191 { { echo "$as_me:24191: error: cannot find input file: $f" >&5
24192 echo "$as_me: error: cannot find input file: $f" >&2;}
24193 { (exit 1); exit 1; }; }
24196 done` || { (exit 1); exit 1; }
24198 cat >>"$CONFIG_STATUS" <<\EOF
24199 ac_warn_datarootdir=no
24200 if test x"$ac_file" != x-; then
24201 for ac_item in $ac_file_inputs
24203 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24204 if test -n "$ac_seen"; then
24205 ac_used=`grep '@datarootdir@' "$ac_item"`
24206 if test -z "$ac_used"; then
24207 { echo "$as_me:24207: WARNING: datarootdir was used implicitly but not set:
24209 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24211 ac_warn_datarootdir=yes
24214 ac_seen=`grep '${datarootdir}' "$ac_item"`
24215 if test -n "$ac_seen"; then
24216 { echo "$as_me:24216: WARNING: datarootdir was used explicitly but not set:
24218 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24220 ac_warn_datarootdir=yes
24225 if test "x$ac_warn_datarootdir" = xyes; then
24226 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24230 cat >>"$CONFIG_STATUS" <<EOF
24234 cat >>"$CONFIG_STATUS" <<\EOF
24236 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24237 s,@configure_input@,$configure_input,;t t
24238 s,@srcdir@,$ac_srcdir,;t t
24239 s,@top_srcdir@,$ac_top_srcdir,;t t
24240 s,@INSTALL@,$ac_INSTALL,;t t
24241 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
24244 : "${FGREP:=grep -F}"
24245 : "${EGREP:=grep -E}"
24246 cat >>"$CONFIG_STATUS" <<EOF
24247 : "\${FGREP:=$FGREP}"
24248 : "\${EGREP:=$EGREP}"
24250 cat >>"$CONFIG_STATUS" <<\EOF
24251 if test x"$ac_file" != x-; then
24252 cp "$tmp/out" "$ac_file"
24254 for ac_name in prefix exec_prefix datarootdir
24256 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
24257 if test -n "$ac_seen"; then
24258 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24259 if test -z "$ac_init"; then
24260 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
24261 { echo "$as_me:24261: WARNING: Variable $ac_name is used but was not set:
24263 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24268 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
24269 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
24270 if test -s "$tmp"/out; then
24271 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
24272 { echo "$as_me:24272: WARNING: Some variables may not be substituted:
24274 echo "$as_me: WARNING: Some variables may not be substituted:
24284 cat >>"$CONFIG_STATUS" <<\EOF
24287 # CONFIG_HEADER section.
24290 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24291 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24293 # ac_d sets the value in "#define NAME VALUE" lines.
24294 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24295 ac_dB='[ ].*$,\1#\2'
24298 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24299 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24300 ac_iB='\([ ]\),\1#\2define\3'
24303 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24304 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24305 ac_uB='$,\1#\2define\3'
24309 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24310 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24312 - | *:- | *:-:* ) # input from stdin
24314 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24315 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24316 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24317 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24318 * ) ac_file_in=$ac_file.in ;;
24321 test x"$ac_file" != x- && { echo "$as_me:24321: creating $ac_file" >&5
24322 echo "$as_me: creating $ac_file" >&6;}
24324 # First look for the input files in the build tree, otherwise in the
24326 ac_file_inputs=`IFS=:
24327 for f in $ac_file_in; do
24329 -) echo "$tmp"/stdin ;;
24331 # Absolute (can't be DOS-style, as IFS=:)
24332 test -f "$f" || { { echo "$as_me:24332: error: cannot find input file: $f" >&5
24333 echo "$as_me: error: cannot find input file: $f" >&2;}
24334 { (exit 1); exit 1; }; }
24337 if test -f "$f"; then
24340 elif test -f "$srcdir/$f"; then
24345 { { echo "$as_me:24345: error: cannot find input file: $f" >&5
24346 echo "$as_me: error: cannot find input file: $f" >&2;}
24347 { (exit 1); exit 1; }; }
24350 done` || { (exit 1); exit 1; }
24351 # Remove the trailing spaces.
24352 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
24356 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24357 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24358 # be either 'cat' or 'sort'.
24359 cat confdefs.h | uniq >conftest.vals
24361 # Break up conftest.vals because some shells have a limit on
24362 # the size of here documents, and old seds have small limits too.
24364 rm -f conftest.tail
24365 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24366 while grep . conftest.vals >/dev/null
24368 # Write chunks of a limited-size here document to conftest.frag.
24369 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24370 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24371 echo 'CEOF' >> "$CONFIG_STATUS"
24372 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24373 rm -f conftest.vals
24374 mv conftest.tail conftest.vals
24376 rm -f conftest.vals
24378 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24380 echo ' cat >> conftest.edit <<CEOF
24381 /@DEFS@/r conftest.frag
24384 sed -f conftest.edit "$tmp"/in > "$tmp"/out
24386 mv "$tmp"/out "$tmp"/in
24387 rm -f conftest.edit conftest.frag
24388 ' >> "$CONFIG_STATUS"
24390 cat >>"$CONFIG_STATUS" <<\EOF
24391 # Let's still pretend it is `configure' which instantiates (i.e., don't
24392 # use $as_me), people would be surprised to read:
24393 # /* config.h. Generated automatically by config.status. */
24394 if test x"$ac_file" = x-; then
24395 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
24397 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
24399 cat "$tmp"/in >>"$tmp"/config.h
24401 if test x"$ac_file" != x-; then
24402 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24403 { echo "$as_me:24403: $ac_file is unchanged" >&5
24404 echo "$as_me: $ac_file is unchanged" >&6;}
24406 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24407 X"$ac_file" : 'X\(//\)[^/]' \| \
24408 X"$ac_file" : 'X\(//\)$' \| \
24409 X"$ac_file" : 'X\(/\)' \| \
24410 . : '\(.\)' 2>/dev/null ||
24412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24413 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24414 /^X\(\/\/\)$/{ s//\1/; q; }
24415 /^X\(\/\).*/{ s//\1/; q; }
24417 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24418 { case "$ac_dir" in
24419 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24423 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24424 case $as_mkdir_dir in
24425 # Skip DOS drivespec
24426 ?:) as_incr_dir=$as_mkdir_dir ;;
24428 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24429 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24436 mv "$tmp/config.h" "$ac_file"
24439 cat "$tmp"/config.h
24440 rm -f "$tmp"/config.h
24444 cat >>"$CONFIG_STATUS" <<\EOF
24446 # CONFIG_COMMANDS section.
24448 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24449 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24450 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24457 if test ! -d "$srcdir/$cf_dir" ; then
24459 elif test -f "$srcdir/$cf_dir/programs" ; then
24460 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24464 cat >>Makefile <<TEST_EOF
24466 # These rules are generated so we do not rely on suffix rules, which do not
24467 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24468 # some, and the '\$x' confuses others).
24471 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24474 cat >>Makefile <<TEST_EOF
24476 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24477 \$(srcdir)/test.priv.h \\
24480 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24484 if test -f ../config.guess && test -f ../config.sub
24486 cat >>Makefile <<TEST_EOF
24488 # if we used CF_INHERIT for getting these files, we can remove them
24490 rm -f config.guess config.sub
24498 cat >>"$CONFIG_STATUS" <<\EOF
24500 { (exit 0); exit 0; }
24502 chmod +x "$CONFIG_STATUS"
24503 ac_clean_files=$ac_clean_files_save
24505 # configure is writing to config.log, and then calls config.status.
24506 # config.status does its own redirection, appending to config.log.
24507 # Unfortunately, on DOS this fails, as config.log is still kept open
24508 # by configure, so config.status won't be able to write to it; its
24509 # output is simply discarded. So we exec the FD to /dev/null,
24510 # effectively closing config.log, so it can be properly (re)opened and
24511 # appended to by config.status. When coming back to configure, we
24512 # need to make the FD available again.
24513 if test "$no_create" != yes; then
24516 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24518 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24519 # would make configure fail if this is the last instruction.
24520 "$ac_cs_success" || { (exit 1); exit 1; }