3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20030927
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
185 --enable and --with options recognized:
186 --disable-echo display "compiling" commands
187 --enable-warnings test: turn on gcc compiler warnings
188 --with-curses-dir=DIR directory in which (n)curses is installed
189 --with-5lib use SunOS sysv-libraries
190 --with-ncursesw use wide ncurses-libraries (installed)
191 --with-ncurses use ncurses-libraries (installed)
192 --with-pdcurses compile/link with pdcurses X11 library
193 --with-Xaw3d link with Xaw 3d library
194 --with-neXtaw link with neXT Athena library
195 --with-XawPlus link with Athena-Plus library
196 --with-pkg-config{=path} enable/disable use of pkg-config
197 --with-x use the X Window System
198 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
204 -host | --host | --hos | --ho)
206 -host=* | --host=* | --hos=* | --ho=*)
209 -includedir | --includedir | --includedi | --included | --include \
210 | --includ | --inclu | --incl | --inc)
211 ac_prev=includedir ;;
212 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
213 | --includ=* | --inclu=* | --incl=* | --inc=*)
214 includedir="$ac_optarg" ;;
216 -infodir | --infodir | --infodi | --infod | --info | --inf)
218 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
219 infodir="$ac_optarg" ;;
221 -libdir | --libdir | --libdi | --libd)
223 -libdir=* | --libdir=* | --libdi=* | --libd=*)
224 libdir="$ac_optarg" ;;
226 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
227 | --libexe | --libex | --libe)
228 ac_prev=libexecdir ;;
229 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
230 | --libexe=* | --libex=* | --libe=*)
231 libexecdir="$ac_optarg" ;;
233 -localstatedir | --localstatedir | --localstatedi | --localstated \
234 | --localstate | --localstat | --localsta | --localst \
235 | --locals | --local | --loca | --loc | --lo)
236 ac_prev=localstatedir ;;
237 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
238 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
239 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
240 localstatedir="$ac_optarg" ;;
242 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
245 mandir="$ac_optarg" ;;
248 # Obsolete; use --without-fp.
251 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
256 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
260 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
261 | --oldin | --oldi | --old | --ol | --o)
262 ac_prev=oldincludedir ;;
263 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
264 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
265 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
266 oldincludedir="$ac_optarg" ;;
268 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
271 prefix="$ac_optarg" ;;
273 -program-prefix | --program-prefix | --program-prefi | --program-pref \
274 | --program-pre | --program-pr | --program-p)
275 ac_prev=program_prefix ;;
276 -program-prefix=* | --program-prefix=* | --program-prefi=* \
277 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
278 program_prefix="$ac_optarg" ;;
280 -program-suffix | --program-suffix | --program-suffi | --program-suff \
281 | --program-suf | --program-su | --program-s)
282 ac_prev=program_suffix ;;
283 -program-suffix=* | --program-suffix=* | --program-suffi=* \
284 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
285 program_suffix="$ac_optarg" ;;
287 -program-transform-name | --program-transform-name \
288 | --program-transform-nam | --program-transform-na \
289 | --program-transform-n | --program-transform- \
290 | --program-transform | --program-transfor \
291 | --program-transfo | --program-transf \
292 | --program-trans | --program-tran \
293 | --progr-tra | --program-tr | --program-t)
294 ac_prev=program_transform_name ;;
295 -program-transform-name=* | --program-transform-name=* \
296 | --program-transform-nam=* | --program-transform-na=* \
297 | --program-transform-n=* | --program-transform-=* \
298 | --program-transform=* | --program-transfor=* \
299 | --program-transfo=* | --program-transf=* \
300 | --program-trans=* | --program-tran=* \
301 | --progr-tra=* | --program-tr=* | --program-t=*)
302 program_transform_name="$ac_optarg" ;;
304 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
305 | -silent | --silent | --silen | --sile | --sil)
308 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312 sbindir="$ac_optarg" ;;
314 -sharedstatedir | --sharedstatedir | --sharedstatedi \
315 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
316 | --sharedst | --shareds | --shared | --share | --shar \
318 ac_prev=sharedstatedir ;;
319 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
320 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
321 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323 sharedstatedir="$ac_optarg" ;;
325 -site | --site | --sit)
327 -site=* | --site=* | --sit=*)
330 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
333 srcdir="$ac_optarg" ;;
335 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
336 | --syscon | --sysco | --sysc | --sys | --sy)
337 ac_prev=sysconfdir ;;
338 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
339 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
340 sysconfdir="$ac_optarg" ;;
342 -target | --target | --targe | --targ | --tar | --ta | --t)
344 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
345 target="$ac_optarg" ;;
347 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 -version | --version | --versio | --versi | --vers)
351 echo "configure generated by autoconf version 2.13.20030927"
355 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
356 # Reject names that are not valid shell variable names.
357 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
358 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 eval "with_${ac_package}='$ac_optarg'" ;;
367 -without-* | --without-*)
368 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 eval "with_${ac_package}=no" ;;
377 # Obsolete; use --with-x.
380 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
381 | --x-incl | --x-inc | --x-in | --x-i)
382 ac_prev=x_includes ;;
383 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
384 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
385 x_includes="$ac_optarg" ;;
387 -x-libraries | --x-libraries | --x-librarie | --x-librari \
388 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
389 ac_prev=x_libraries ;;
390 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
391 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
392 x_libraries="$ac_optarg" ;;
394 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
399 echo "configure: warning: $ac_option: invalid host type" 1>&2
401 if test "x$nonopt" != xNONE; then
402 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410 if test -n "$ac_prev"; then
411 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416 # File descriptor usage:
419 # 2 errors and warnings
420 # 3 some systems may open it to /dev/tty
421 # 4 used on the Kubota Titan
422 # 6 checking for... messages and results
423 # 5 compiler messages saved in config.log
424 if test "$silent" = yes; then
432 This file contains any messages produced by compilers while
433 running configure, to aid debugging if configure makes a mistake.
436 # Strip out --no-create and --no-recursion so they do not pile up.
437 # Also quote any args containing shell metacharacters.
442 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
443 | --no-cr | --no-c) ;;
444 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
445 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
446 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
447 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
448 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
453 # Only set these to C if already set. These must not be set unconditionally
454 # because not all systems understand e.g. LANG=C (notably SCO).
455 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
456 # Non-C LC_CTYPE values break the ctype check.
457 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
458 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
460 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
462 # confdefs.h avoids OS command line length limits that DEFS can exceed.
463 rm -rf conftest* confdefs.h
464 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
467 # A filename unique to this package, relative to the directory that
468 # configure is in, which we can look for to find out if srcdir is correct.
469 ac_unique_file=ncurses.c
471 # Find the source files, if location was not specified.
472 if test -z "$srcdir"; then
473 ac_srcdir_defaulted=yes
474 # Try the directory containing this script, then its parent.
476 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
477 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479 if test ! -r $srcdir/$ac_unique_file; then
483 ac_srcdir_defaulted=no
485 if test ! -r $srcdir/$ac_unique_file; then
486 if test "$ac_srcdir_defaulted" = yes; then
487 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494 # Prefer explicitly selected file to automatically selected ones.
495 if test -z "$CONFIG_SITE"; then
496 if test "x$prefix" != xNONE; then
497 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502 for ac_site_file in $CONFIG_SITE; do
503 if test -r "$ac_site_file"; then
504 echo "loading site script $ac_site_file"
509 if test -r "$cache_file"; then
510 echo "loading cache $cache_file"
513 echo "creating cache $cache_file"
518 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
519 ac_cpp='$CPP $CPPFLAGS'
520 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
521 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
522 cross_compiling=$ac_cv_prog_cc_cross
526 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535 ac_n= ac_c='\c' ac_t=
542 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
545 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
548 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
549 if test -f $ac_dir/install-sh; then
551 ac_install_sh="$ac_aux_dir/install-sh -c"
553 elif test -f $ac_dir/install.sh; then
555 ac_install_sh="$ac_aux_dir/install.sh -c"
559 if test -z "$ac_aux_dir"; then
560 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
562 ac_config_guess=$ac_aux_dir/config.guess
563 ac_config_sub=$ac_aux_dir/config.sub
564 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
567 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
569 # Make sure we can run config.sub.
570 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
571 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
574 echo $ac_n "checking host system type""... $ac_c" 1>&6
575 echo "configure:576: checking host system type" >&5
578 case "$host_alias" in
582 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
583 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
585 *) host_alias=$nonopt ;;
589 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
590 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
591 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
592 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
593 echo "$ac_t""$host" 1>&6
595 system_name="$host_os"
597 system_name="`(uname -s -r) 2>/dev/null`"
598 if test -z "$system_name" ; then
599 system_name="`(hostname) 2>/dev/null`"
602 test -n "$system_name" && cat >> confdefs.h <<EOF
603 #define SYSTEM_NAME "$system_name"
606 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
607 echo $ac_n "(cached) $ac_c" 1>&6
609 cf_cv_system_name="$system_name"
613 test -z "$system_name" && system_name="$cf_cv_system_name"
614 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
616 if test ".$system_name" != ".$cf_cv_system_name" ; then
617 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
618 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
622 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
623 echo "configure:624: checking whether ${MAKE-make} sets \${MAKE}" >&5
624 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
625 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
626 echo $ac_n "(cached) $ac_c" 1>&6
628 cat > conftestmake <<\EOF
630 @echo 'ac_maketemp="${MAKE}"'
632 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
633 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
634 if test -n "$ac_maketemp"; then
635 eval ac_cv_prog_make_${ac_make}_set=yes
637 eval ac_cv_prog_make_${ac_make}_set=no
641 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
642 echo "$ac_t""yes" 1>&6
645 echo "$ac_t""no" 1>&6
646 SET_MAKE="MAKE=${MAKE-make}"
649 # Extract the first word of "gcc", so it can be a program name with args.
650 set dummy gcc; ac_word=$2
651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
652 echo "configure:653: checking for $ac_word" >&5
653 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
656 if test -n "$CC"; then
657 ac_cv_prog_CC="$CC" # Let the user override the test.
659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
661 for ac_dir in $ac_dummy; do
662 test -z "$ac_dir" && ac_dir=.
663 if test -f $ac_dir/$ac_word; then
672 if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
675 echo "$ac_t""no" 1>&6
678 if test -z "$CC"; then
679 # Extract the first word of "cc", so it can be a program name with args.
680 set dummy cc; ac_word=$2
681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
682 echo "configure:683: checking for $ac_word" >&5
683 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 for ac_dir in $ac_dummy; do
693 test -z "$ac_dir" && ac_dir=.
694 if test -f $ac_dir/$ac_word; then
695 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
704 if test $ac_prog_rejected = yes; then
705 # We found a bogon in the path, so make sure we never use it.
706 set dummy $ac_cv_prog_CC
708 if test $# -gt 0; then
709 # We chose a different compiler from the bogus one.
710 # However, it has the same basename, so the bogon will be chosen
711 # first if we set CC to just the basename; use the full file name.
713 set dummy "$ac_dir/$ac_word" "$@"
721 if test -n "$CC"; then
722 echo "$ac_t""$CC" 1>&6
724 echo "$ac_t""no" 1>&6
727 if test -z "$CC"; then
730 # Extract the first word of "cl", so it can be a program name with args.
731 set dummy cl; ac_word=$2
732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
733 echo "configure:734: checking for $ac_word" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
735 echo $ac_n "(cached) $ac_c" 1>&6
737 if test -n "$CC"; then
738 ac_cv_prog_CC="$CC" # Let the user override the test.
740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
742 for ac_dir in $ac_dummy; do
743 test -z "$ac_dir" && ac_dir=.
744 if test -f $ac_dir/$ac_word; then
753 if test -n "$CC"; then
754 echo "$ac_t""$CC" 1>&6
756 echo "$ac_t""no" 1>&6
761 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
765 echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
768 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
769 ac_cpp='$CPP $CPPFLAGS'
770 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
771 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
772 cross_compiling=$ac_cv_prog_cc_cross
774 cat > conftest.$ac_ext << EOF
776 #line 777 "configure"
777 #include "confdefs.h"
781 if { (eval echo configure:782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
782 ac_cv_prog_cc_works=yes
783 # If we can't run a trivial program, we are probably using a cross compiler.
784 if (./conftest; exit) 2>/dev/null; then
785 ac_cv_prog_cc_cross=no
787 ac_cv_prog_cc_cross=yes
790 echo "configure: failed program was:" >&5
791 cat conftest.$ac_ext >&5
792 ac_cv_prog_cc_works=no
796 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797 ac_cpp='$CPP $CPPFLAGS'
798 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800 cross_compiling=$ac_cv_prog_cc_cross
802 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
803 if test $ac_cv_prog_cc_works = no; then
804 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
807 echo "configure:808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
808 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
809 cross_compiling=$ac_cv_prog_cc_cross
811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
812 echo "configure:813: checking whether we are using GNU C" >&5
813 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
816 cat > conftest.c <<EOF
821 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
836 ac_test_CFLAGS="${CFLAGS+set}"
837 ac_save_CFLAGS="$CFLAGS"
839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
840 echo "configure:841: checking whether ${CC-cc} accepts -g" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
844 echo 'void f(){}' > conftest.c
845 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
854 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
855 if test "$ac_test_CFLAGS" = set; then
856 CFLAGS="$ac_save_CFLAGS"
857 elif test $ac_cv_prog_cc_g = yes; then
858 if test "$GCC" = yes; then
864 if test "$GCC" = yes; then
871 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
872 echo "configure:873: checking how to run the C preprocessor" >&5
873 # On Suns, sometimes $CPP names a directory.
874 if test -n "$CPP" && test -d "$CPP"; then
877 if test -z "$CPP"; then
878 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
879 echo $ac_n "(cached) $ac_c" 1>&6
881 # This must be in double quotes, not single quotes, because CPP may get
882 # substituted into the Makefile and "${CC-cc}" will confuse make.
884 # On the NeXT, cc -E runs the code through the compiler's parser,
885 # not just through cpp.
886 cat > conftest.$ac_ext <<EOF
887 #line 888 "configure"
888 #include "confdefs.h"
892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
893 { (eval echo configure:894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
895 if test -z "$ac_err"; then
899 echo "configure: failed program was:" >&5
900 cat conftest.$ac_ext >&5
902 CPP="${CC-cc} -E -traditional-cpp"
903 cat > conftest.$ac_ext <<EOF
904 #line 905 "configure"
905 #include "confdefs.h"
909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
910 { (eval echo configure:911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
912 if test -z "$ac_err"; then
916 echo "configure: failed program was:" >&5
917 cat conftest.$ac_ext >&5
919 CPP="${CC-cc} -nologo -E"
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
927 { (eval echo configure:928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
929 if test -z "$ac_err"; then
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
943 ac_cv_prog_CPP="$CPP"
945 CPP="$ac_cv_prog_CPP"
947 ac_cv_prog_CPP="$CPP"
949 echo "$ac_t""$CPP" 1>&6
951 for ac_prog in mawk gawk nawk awk
953 # Extract the first word of "$ac_prog", so it can be a program name with args.
954 set dummy $ac_prog; ac_word=$2
955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
956 echo "configure:957: checking for $ac_word" >&5
957 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
958 echo $ac_n "(cached) $ac_c" 1>&6
960 if test -n "$AWK"; then
961 ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
965 for ac_dir in $ac_dummy; do
966 test -z "$ac_dir" && ac_dir=.
967 if test -f $ac_dir/$ac_word; then
968 ac_cv_prog_AWK="$ac_prog"
975 AWK="$ac_cv_prog_AWK"
976 if test -n "$AWK"; then
977 echo "$ac_t""$AWK" 1>&6
979 echo "$ac_t""no" 1>&6
982 test -n "$AWK" && break
986 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
987 echo "configure:988: checking if filesystem supports mixed-case filenames" >&5
988 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
989 echo $ac_n "(cached) $ac_c" 1>&6
992 if test "$cross_compiling" = yes ; then
993 case $target_alias in #(vi
994 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1002 rm -f conftest CONFTEST
1004 if test -f CONFTEST ; then
1009 rm -f conftest CONFTEST
1014 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1015 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1016 #define MIXEDCASE_FILENAMES 1
1023 for ac_prog in exctags ctags
1025 # Extract the first word of "$ac_prog", so it can be a program name with args.
1026 set dummy $ac_prog; ac_word=$2
1027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1028 echo "configure:1029: checking for $ac_word" >&5
1029 if eval "test \"`echo '$''{'ac_cv_prog_CTAGS'+set}'`\" = set"; then
1030 echo $ac_n "(cached) $ac_c" 1>&6
1032 if test -n "$CTAGS"; then
1033 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
1035 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1037 for ac_dir in $ac_dummy; do
1038 test -z "$ac_dir" && ac_dir=.
1039 if test -f $ac_dir/$ac_word; then
1040 ac_cv_prog_CTAGS="$ac_prog"
1047 CTAGS="$ac_cv_prog_CTAGS"
1048 if test -n "$CTAGS"; then
1049 echo "$ac_t""$CTAGS" 1>&6
1051 echo "$ac_t""no" 1>&6
1054 test -n "$CTAGS" && break
1057 for ac_prog in exetags etags
1059 # Extract the first word of "$ac_prog", so it can be a program name with args.
1060 set dummy $ac_prog; ac_word=$2
1061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1062 echo "configure:1063: checking for $ac_word" >&5
1063 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
1064 echo $ac_n "(cached) $ac_c" 1>&6
1066 if test -n "$ETAGS"; then
1067 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
1069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1071 for ac_dir in $ac_dummy; do
1072 test -z "$ac_dir" && ac_dir=.
1073 if test -f $ac_dir/$ac_word; then
1074 ac_cv_prog_ETAGS="$ac_prog"
1081 ETAGS="$ac_cv_prog_ETAGS"
1082 if test -n "$ETAGS"; then
1083 echo "$ac_t""$ETAGS" 1>&6
1085 echo "$ac_t""no" 1>&6
1088 test -n "$ETAGS" && break
1092 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
1093 set dummy ${CTAGS-ctags}; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1099 if test -n "$MAKE_LOWER_TAGS"; then
1100 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1102 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1104 for ac_dir in $ac_dummy; do
1105 test -z "$ac_dir" && ac_dir=.
1106 if test -f $ac_dir/$ac_word; then
1107 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1112 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1115 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1116 if test -n "$MAKE_LOWER_TAGS"; then
1117 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1119 echo "$ac_t""no" 1>&6
1123 if test "$cf_cv_mixedcase" = yes ; then
1124 # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
1125 set dummy ${ETAGS-etags}; ac_word=$2
1126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1127 echo "configure:1128: checking for $ac_word" >&5
1128 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1129 echo $ac_n "(cached) $ac_c" 1>&6
1131 if test -n "$MAKE_UPPER_TAGS"; then
1132 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1134 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1136 for ac_dir in $ac_dummy; do
1137 test -z "$ac_dir" && ac_dir=.
1138 if test -f $ac_dir/$ac_word; then
1139 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1144 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1147 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1148 if test -n "$MAKE_UPPER_TAGS"; then
1149 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1151 echo "$ac_t""no" 1>&6
1158 if test "$MAKE_UPPER_TAGS" = yes ; then
1164 if test "$MAKE_LOWER_TAGS" = yes ; then
1178 CC_SHARED_OPTS=unknown
1179 CPPFLAGS="$CPPFLAGS"
1181 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1182 DFT_UPR_MODEL="NORMAL"
1201 TINFO_ARGS='$(LIBS_CURSES)'
1202 cf_cv_abi_version=""
1203 cf_cv_rel_version=""
1208 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1209 echo "configure:1210: checking for Cygwin environment" >&5
1210 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1211 echo $ac_n "(cached) $ac_c" 1>&6
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1220 #define __CYGWIN__ __CYGWIN32__
1225 if { (eval echo configure:1226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1238 echo "$ac_t""$ac_cv_cygwin" 1>&6
1240 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1241 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1242 echo "configure:1243: checking for mingw32 environment" >&5
1243 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1254 if { (eval echo configure:1255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1267 echo "$ac_t""$ac_cv_mingw32" 1>&6
1269 test "$ac_cv_mingw32" = yes && MINGW32=yes
1272 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1273 echo "configure:1274: checking for executable suffix" >&5
1274 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1277 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1281 echo 'int main () { return 0; }' > conftest.$ac_ext
1283 if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1284 for file in conftest.*; do
1286 *.c | *.o | *.obj) ;;
1287 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1291 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1294 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1299 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1300 echo "$ac_t""${ac_cv_exeext}" 1>&6
1303 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1304 echo "configure:1305: checking for object suffix" >&5
1305 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1309 echo 'int i = 1;' > conftest.$ac_ext
1310 if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1311 for ac_file in conftest.*; do
1314 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1318 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1323 echo "$ac_t""$ac_cv_objext" 1>&6
1324 OBJEXT=$ac_cv_objext
1325 ac_objext=$ac_cv_objext
1329 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1330 echo "configure:1331: checking for ${CC-cc} option to accept ANSI C" >&5
1331 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1332 echo $ac_n "(cached) $ac_c" 1>&6
1336 cf_save_CFLAGS="$CFLAGS"
1337 cf_save_CPPFLAGS="$CPPFLAGS"
1338 # Don't try gcc -ansi; that turns off useful extensions and
1339 # breaks some systems' header files.
1340 # AIX -qlanglvl=ansi
1341 # Ultrix and OSF/1 -std1
1342 # HP-UX -Aa -D_HPUX_SOURCE
1344 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1345 for cf_arg in "-DCC_HAS_PROTOS" \
1350 "-Aa -D_HPUX_SOURCE" \
1357 cf_new_extra_cppflags=
1359 for cf_add_cflags in $cf_arg
1361 case $cf_fix_cppflags in
1363 case $cf_add_cflags in #(vi
1364 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1365 case $cf_add_cflags in
1367 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1369 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1370 && test -z "${cf_tst_cflags}" \
1371 && cf_fix_cppflags=yes
1373 if test $cf_fix_cppflags = yes ; then
1374 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1376 elif test "${cf_tst_cflags}" = "\"'" ; then
1377 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1383 *$cf_add_cflags) #(vi
1386 case $cf_add_cflags in #(vi
1388 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1390 CPPFLAGS=`echo "$CPPFLAGS" | \
1391 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1392 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1396 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1401 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1406 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1410 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1411 && test -z "${cf_tst_cflags}" \
1412 && cf_fix_cppflags=no
1417 if test -n "$cf_new_cflags" ; then
1419 CFLAGS="$CFLAGS $cf_new_cflags"
1422 if test -n "$cf_new_cppflags" ; then
1424 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1427 if test -n "$cf_new_extra_cppflags" ; then
1429 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1439 #ifndef CC_HAS_PROTOS
1440 #if !defined(__STDC__) || (__STDC__ != 1)
1447 int test (int i, double x);
1448 struct s1 {int (*f) (int a);};
1449 struct s2 {int (*f) (double a);};
1452 if { (eval echo configure:1453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1454 cf_cv_ansi_cc="$cf_arg"; break
1456 echo "configure: failed program was:" >&5
1457 cat conftest.$ac_ext >&5
1461 CFLAGS="$cf_save_CFLAGS"
1462 CPPFLAGS="$cf_save_CPPFLAGS"
1466 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1468 if test "$cf_cv_ansi_cc" != "no"; then
1469 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1474 cf_new_extra_cppflags=
1476 for cf_add_cflags in $cf_cv_ansi_cc
1478 case $cf_fix_cppflags in
1480 case $cf_add_cflags in #(vi
1481 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1482 case $cf_add_cflags in
1484 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1486 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1487 && test -z "${cf_tst_cflags}" \
1488 && cf_fix_cppflags=yes
1490 if test $cf_fix_cppflags = yes ; then
1491 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1493 elif test "${cf_tst_cflags}" = "\"'" ; then
1494 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1500 *$cf_add_cflags) #(vi
1503 case $cf_add_cflags in #(vi
1505 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1507 CPPFLAGS=`echo "$CPPFLAGS" | \
1508 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1509 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1513 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1518 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1523 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1525 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1527 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1528 && test -z "${cf_tst_cflags}" \
1529 && cf_fix_cppflags=no
1534 if test -n "$cf_new_cflags" ; then
1536 CFLAGS="$CFLAGS $cf_new_cflags"
1539 if test -n "$cf_new_cppflags" ; then
1541 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1544 if test -n "$cf_new_extra_cppflags" ; then
1546 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1553 cat >> confdefs.h <<\EOF
1554 #define CC_HAS_PROTOS 1
1561 if test "$cf_cv_ansi_cc" = "no"; then
1562 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1563 You have the following choices:
1564 a. adjust your compiler options
1565 b. get an up-to-date compiler
1566 c. use a wrapper such as unproto" 1>&2; exit 1; }
1570 if test "$GCC" = yes
1572 cat > conftest.i <<EOF
1574 #define GCC_PRINTF 0
1579 #ifndef GCC_NORETURN
1580 #define GCC_NORETURN /* nothing */
1583 #define GCC_UNUSED /* nothing */
1586 if test "$GCC" = yes
1588 echo "checking for $CC __attribute__ directives" 1>&6
1589 echo "configure:1590: checking for $CC __attribute__ directives" >&5
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1592 "${as_me-configure}"
1592 #include "confdefs.h"
1593 #include "conftest.h"
1594 #include "conftest.i"
1596 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1598 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1601 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1603 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1605 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1606 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1607 extern void foo(void) GCC_NORETURN;
1608 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1610 cf_printf_attribute=no
1611 cf_scanf_attribute=no
1612 for cf_attribute in scanf printf unused noreturn
1615 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1617 cf_directive="__attribute__(($cf_attribute))"
1618 echo "checking for $CC $cf_directive" 1>&5
1620 case $cf_attribute in #(vi
1622 cf_printf_attribute=yes
1623 cat >conftest.h <<EOF
1624 #define GCC_$cf_ATTRIBUTE 1
1628 cf_scanf_attribute=yes
1629 cat >conftest.h <<EOF
1630 #define GCC_$cf_ATTRIBUTE 1
1634 cat >conftest.h <<EOF
1635 #define GCC_$cf_ATTRIBUTE $cf_directive
1640 if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1641 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1642 cat conftest.h >>confdefs.h
1643 case $cf_attribute in #(vi
1645 if test "$cf_printf_attribute" = no ; then
1646 cat >>confdefs.h <<EOF
1647 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
1650 cat >>confdefs.h <<EOF
1651 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1656 if test "$cf_scanf_attribute" = no ; then
1657 cat >>confdefs.h <<EOF
1658 #define GCC_SCANFLIKE(fmt,var) /* nothing */
1661 cat >>confdefs.h <<EOF
1662 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1670 fgrep define conftest.i >>confdefs.h
1678 cf_POSIX_C_SOURCE=199506L
1681 case $host_os in #(vi
1683 cf_xopen_source="-D_ALL_SOURCE"
1686 cf_xopen_source="-D_APPLE_C_SOURCE"
1689 cf_xopen_source="-D_DARWIN_C_SOURCE"
1691 freebsd*|dragonfly*) #(vi
1692 # 5.x headers associate
1693 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1694 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1695 cf_POSIX_C_SOURCE=200112L
1697 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1700 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1703 cf_xopen_source="-D_HPUX_SOURCE"
1706 cf_xopen_source="-D_SGI_SOURCE"
1708 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1710 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1711 echo "configure:1712: checking if we must define _GNU_SOURCE" >&5
1712 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1713 echo $ac_n "(cached) $ac_c" 1>&6
1716 cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719 #include <sys/types.h>
1722 #ifndef _XOPEN_SOURCE
1727 if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1735 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739 #include <sys/types.h>
1742 #ifdef _XOPEN_SOURCE
1747 if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1754 cf_cv_gnu_source=yes
1764 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1765 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1769 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1772 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1775 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1778 cf_xopen_source="-D_OSF_SOURCE"
1781 cf_xopen_source="-D_QNX_SOURCE"
1784 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1786 solaris2.1[0-9]) #(vi
1787 cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1789 solaris2.[1-9]) #(vi
1790 cf_xopen_source="-D__EXTENSIONS__"
1793 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1794 echo "configure:1795: checking if we should define _XOPEN_SOURCE" >&5
1795 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1796 echo $ac_n "(cached) $ac_c" 1>&6
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #include <sys/types.h>
1805 #ifndef _XOPEN_SOURCE
1810 if { (eval echo configure:1811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1812 cf_cv_xopen_source=no
1814 echo "configure: failed program was:" >&5
1815 cat conftest.$ac_ext >&5
1818 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 #include <sys/types.h>
1825 #ifdef _XOPEN_SOURCE
1830 if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1832 cf_cv_xopen_source=no
1834 echo "configure: failed program was:" >&5
1835 cat conftest.$ac_ext >&5
1837 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1847 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1848 if test "$cf_cv_xopen_source" != no ; then
1850 CFLAGS=`echo "$CFLAGS" | \
1851 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1852 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
1855 CPPFLAGS=`echo "$CPPFLAGS" | \
1856 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1857 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
1859 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
1864 cf_new_extra_cppflags=
1866 for cf_add_cflags in $cf_temp_xopen_source
1868 case $cf_fix_cppflags in
1870 case $cf_add_cflags in #(vi
1871 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1872 case $cf_add_cflags in
1874 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1876 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1877 && test -z "${cf_tst_cflags}" \
1878 && cf_fix_cppflags=yes
1880 if test $cf_fix_cppflags = yes ; then
1881 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1883 elif test "${cf_tst_cflags}" = "\"'" ; then
1884 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1890 *$cf_add_cflags) #(vi
1893 case $cf_add_cflags in #(vi
1895 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1897 CPPFLAGS=`echo "$CPPFLAGS" | \
1898 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1899 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1903 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1908 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1913 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1915 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1917 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1918 && test -z "${cf_tst_cflags}" \
1919 && cf_fix_cppflags=no
1924 if test -n "$cf_new_cflags" ; then
1926 CFLAGS="$CFLAGS $cf_new_cflags"
1929 if test -n "$cf_new_cppflags" ; then
1931 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1934 if test -n "$cf_new_extra_cppflags" ; then
1936 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1944 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1946 cf_save_CFLAGS="$CFLAGS"
1947 cf_save_CPPFLAGS="$CPPFLAGS"
1950 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1951 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1952 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
1955 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1956 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1957 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
1960 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1961 echo "configure:1962: checking if we should define _POSIX_C_SOURCE" >&5
1962 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1967 echo "${as_me-configure}:1968: testing if the symbol is already defined go no further ..." 1>&5
1969 cat > conftest.$ac_ext <<EOF
1970 #line 1971 "configure"
1971 #include "confdefs.h"
1972 #include <sys/types.h>
1975 #ifndef _POSIX_C_SOURCE
1980 if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1982 cf_cv_posix_c_source=no
1984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1987 cf_want_posix_source=no
1988 case .$cf_POSIX_C_SOURCE in #(vi
1990 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1993 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1994 cf_want_posix_source=yes
1997 cf_want_posix_source=yes
2000 if test "$cf_want_posix_source" = yes ; then
2001 cat > conftest.$ac_ext <<EOF
2002 #line 2003 "configure"
2003 #include "confdefs.h"
2004 #include <sys/types.h>
2007 #ifdef _POSIX_SOURCE
2012 if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2018 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2023 echo "${as_me-configure}:2024: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2025 CFLAGS="$cf_trim_CFLAGS"
2026 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2028 echo "${as_me-configure}:2029: testing if the second compile does not leave our definition intact error ..." 1>&5
2030 cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033 #include <sys/types.h>
2036 #ifndef _POSIX_C_SOURCE
2041 if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2047 cf_cv_posix_c_source=no
2050 CFLAGS="$cf_save_CFLAGS"
2051 CPPFLAGS="$cf_save_CPPFLAGS"
2058 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2060 if test "$cf_cv_posix_c_source" != no ; then
2061 CFLAGS="$cf_trim_CFLAGS"
2062 CPPFLAGS="$cf_trim_CPPFLAGS"
2067 cf_new_extra_cppflags=
2069 for cf_add_cflags in $cf_cv_posix_c_source
2071 case $cf_fix_cppflags in
2073 case $cf_add_cflags in #(vi
2074 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2075 case $cf_add_cflags in
2077 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2079 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2080 && test -z "${cf_tst_cflags}" \
2081 && cf_fix_cppflags=yes
2083 if test $cf_fix_cppflags = yes ; then
2084 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2086 elif test "${cf_tst_cflags}" = "\"'" ; then
2087 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2093 *$cf_add_cflags) #(vi
2096 case $cf_add_cflags in #(vi
2098 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2100 CPPFLAGS=`echo "$CPPFLAGS" | \
2101 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2102 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2106 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2111 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2116 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2118 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2120 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2121 && test -z "${cf_tst_cflags}" \
2122 && cf_fix_cppflags=no
2127 if test -n "$cf_new_cflags" ; then
2129 CFLAGS="$CFLAGS $cf_new_cflags"
2132 if test -n "$cf_new_cppflags" ; then
2134 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2137 if test -n "$cf_new_extra_cppflags" ; then
2139 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2151 if test -n "$cf_xopen_source" ; then
2156 cf_new_extra_cppflags=
2158 for cf_add_cflags in $cf_xopen_source
2160 case $cf_fix_cppflags in
2162 case $cf_add_cflags in #(vi
2163 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2164 case $cf_add_cflags in
2166 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2168 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2169 && test -z "${cf_tst_cflags}" \
2170 && cf_fix_cppflags=yes
2172 if test $cf_fix_cppflags = yes ; then
2173 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2175 elif test "${cf_tst_cflags}" = "\"'" ; then
2176 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2182 *$cf_add_cflags) #(vi
2185 case $cf_add_cflags in #(vi
2187 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2189 CPPFLAGS=`echo "$CPPFLAGS" | \
2190 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2191 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2195 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2200 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2205 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2207 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2209 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2210 && test -z "${cf_tst_cflags}" \
2211 && cf_fix_cppflags=no
2216 if test -n "$cf_new_cflags" ; then
2218 CFLAGS="$CFLAGS $cf_new_cflags"
2221 if test -n "$cf_new_cppflags" ; then
2223 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2226 if test -n "$cf_new_extra_cppflags" ; then
2228 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2236 echo $ac_n "checking for working const""... $ac_c" 1>&6
2237 echo "configure:2238: checking for working const" >&5
2238 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2239 echo $ac_n "(cached) $ac_c" 1>&6
2241 cat > conftest.$ac_ext <<EOF
2242 #line 2243 "configure"
2243 #include "confdefs.h"
2247 /* Ultrix mips cc rejects this. */
2248 typedef int charset[2]; const charset x;
2249 /* SunOS 4.1.1 cc rejects this. */
2250 char const *const *ccp;
2252 /* NEC SVR4.0.2 mips cc rejects this. */
2253 struct point {int x, y;};
2254 static struct point const zero = {0,0};
2255 /* AIX XL C 1.02.0.0 rejects this.
2256 It does not let you subtract one const X* pointer from another in an arm
2257 of an if-expression whose if-part is not a constant expression */
2258 const char *g = "string";
2259 ccp = &g + (g ? g-g : 0);
2260 /* HPUX 7.0 cc rejects these. */
2263 ccp = (char const *const *) p;
2264 { /* SCO 3.2v4 cc rejects this. */
2266 char const *s = 0 ? (char *) 0 : (char const *) 0;
2270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2272 const int *foo = &x[0];
2275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2276 typedef const int *iptr;
2280 { /* AIX XL C 1.02.0.0 rejects this saying
2281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2282 struct s { int j; const int *ap[3]; };
2283 struct s *b; b->j = 5;
2285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2291 if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2295 echo "configure: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2303 echo "$ac_t""$ac_cv_c_const" 1>&6
2304 if test $ac_cv_c_const = no; then
2305 cat >> confdefs.h <<\EOF
2312 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2313 echo "configure:2314: checking for signal global datatype" >&5
2314 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2315 echo $ac_n "(cached) $ac_c" 1>&6
2319 "volatile sig_atomic_t" \
2323 cat > conftest.$ac_ext <<EOF
2324 #line 2325 "configure"
2325 #include "confdefs.h"
2327 #include <sys/types.h>
2333 static void handler(int sig)
2338 signal(SIGINT, handler);
2342 if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2344 cf_cv_sig_atomic_t=$cf_type
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2349 cf_cv_sig_atomic_t=no
2352 test "$cf_cv_sig_atomic_t" != no && break
2357 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2358 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2359 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2365 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2366 echo "configure:2367: checking if you want to see long compiling messages" >&5
2368 # Check whether --enable-echo or --disable-echo was given.
2369 if test "${enable_echo+set}" = set; then
2370 enableval="$enable_echo"
2371 test "$enableval" != no && enableval=yes
2372 if test "$enableval" != "yes" ; then
2375 ECHO_LD='@echo linking $@;'
2376 RULE_CC='@echo compiling $<'
2377 SHOW_CC='@echo compiling $@'
2401 echo "$ac_t""$enableval" 1>&6
2411 if test "$GCC" = yes ; then
2412 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2413 echo "configure:2414: checking version of $CC" >&5
2414 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2415 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2416 echo "$ac_t""$GCC_VERSION" 1>&6
2420 if ( test "$GCC" = yes || test "$GXX" = yes )
2422 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2423 echo "configure:2424: checking if you want to turn on gcc warnings" >&5
2425 # Check whether --enable-warnings or --disable-warnings was given.
2426 if test "${enable_warnings+set}" = set; then
2427 enableval="$enable_warnings"
2428 test "$enableval" != yes && enableval=no
2429 if test "$enableval" != "no" ; then
2440 echo "$ac_t""$with_warnings" 1>&6
2441 if test "$with_warnings" = "yes"
2444 if test "$GCC" = yes
2446 cat > conftest.i <<EOF
2448 #define GCC_PRINTF 0
2453 #ifndef GCC_NORETURN
2454 #define GCC_NORETURN /* nothing */
2457 #define GCC_UNUSED /* nothing */
2460 if test "$GCC" = yes
2462 echo "checking for $CC __attribute__ directives" 1>&6
2463 echo "configure:2464: checking for $CC __attribute__ directives" >&5
2464 cat > conftest.$ac_ext <<EOF
2465 #line 2466 "${as_me-configure}"
2466 #include "confdefs.h"
2467 #include "conftest.h"
2468 #include "conftest.i"
2470 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2472 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2475 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2477 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2479 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2480 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2481 extern void foo(void) GCC_NORETURN;
2482 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2484 cf_printf_attribute=no
2485 cf_scanf_attribute=no
2486 for cf_attribute in scanf printf unused noreturn
2489 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2491 cf_directive="__attribute__(($cf_attribute))"
2492 echo "checking for $CC $cf_directive" 1>&5
2494 case $cf_attribute in #(vi
2496 cf_printf_attribute=yes
2497 cat >conftest.h <<EOF
2498 #define GCC_$cf_ATTRIBUTE 1
2502 cf_scanf_attribute=yes
2503 cat >conftest.h <<EOF
2504 #define GCC_$cf_ATTRIBUTE 1
2508 cat >conftest.h <<EOF
2509 #define GCC_$cf_ATTRIBUTE $cf_directive
2514 if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2515 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
2516 cat conftest.h >>confdefs.h
2517 case $cf_attribute in #(vi
2519 if test "$cf_printf_attribute" = no ; then
2520 cat >>confdefs.h <<EOF
2521 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2524 cat >>confdefs.h <<EOF
2525 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2530 if test "$cf_scanf_attribute" = no ; then
2531 cat >>confdefs.h <<EOF
2532 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2535 cat >>confdefs.h <<EOF
2536 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2544 fgrep define conftest.i >>confdefs.h
2554 if test "$GCC" = yes ; then
2557 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2558 echo "configure:2559: checking if this is really Intel C compiler" >&5
2559 cf_save_CFLAGS="$CFLAGS"
2560 CFLAGS="$CFLAGS -no-gcc"
2561 cat > conftest.$ac_ext <<EOF
2562 #line 2563 "configure"
2563 #include "confdefs.h"
2567 #ifdef __INTEL_COMPILER
2574 if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2577 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2580 echo "configure: failed program was:" >&5
2581 cat conftest.$ac_ext >&5
2584 CFLAGS="$cf_save_CFLAGS"
2585 echo "$ac_t""$INTEL_COMPILER" 1>&6
2591 cat > conftest.$ac_ext <<EOF
2592 #line 2593 "${as_me-configure}"
2593 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2596 if test "$INTEL_COMPILER" = yes
2598 # The "-wdXXX" options suppress warnings:
2599 # remark #1419: external declaration in primary source file
2600 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2601 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2602 # remark #193: zero used for undefined preprocessing identifier
2603 # remark #593: variable "curs_sb_left_arrow" was set but never used
2604 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2605 # remark #869: parameter "tw" was never referenced
2606 # remark #981: operands are evaluated in unspecified order
2607 # warning #279: controlling expression is constant
2609 echo "checking for $CC warning options" 1>&6
2610 echo "configure:2611: checking for $CC warning options" >&5
2611 cf_save_CFLAGS="$CFLAGS"
2612 EXTRA_CFLAGS="-Wall"
2624 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2625 if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2626 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2627 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2630 CFLAGS="$cf_save_CFLAGS"
2632 elif test "$GCC" = yes
2634 echo "checking for $CC warning options" 1>&6
2635 echo "configure:2636: checking for $CC warning options" >&5
2636 cf_save_CFLAGS="$CFLAGS"
2639 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2640 for cf_opt in W Wall \
2641 Wbad-function-cast \
2645 Wmissing-declarations \
2646 Wmissing-prototypes \
2650 Wstrict-prototypes \
2651 Wundef $cf_warn_CONST
2653 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2654 if { (eval echo configure:2655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2655 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2656 case $cf_opt in #(vi
2658 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2661 case $GCC_VERSION in
2663 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2665 echo "${as_me-configure}:2666: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2672 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2675 CFLAGS="$cf_save_CFLAGS"
2687 # Check whether --with-curses-dir or --without-curses-dir was given.
2688 if test "${with_curses_dir+set}" = set; then
2689 withval="$with_curses_dir"
2691 if test "x$prefix" != xNONE; then
2692 cf_path_syntax="$prefix"
2694 cf_path_syntax="$ac_default_prefix"
2697 case ".$withval" in #(vi
2698 .\$\(*\)*|.\'*\'*) #(vi
2702 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2705 eval withval="$withval"
2706 case ".$withval" in #(vi
2708 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2713 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2716 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2720 cf_cv_curses_dir=$withval
2728 # Check whether --with-5lib or --without-5lib was given.
2729 if test "${with_5lib+set}" = set; then
2730 withval="$with_5lib"
2731 LIBS="-L/usr/5lib $LIBS"
2732 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2737 # Check whether --with-ncursesw or --without-ncursesw was given.
2738 if test "${with_ncursesw+set}" = set; then
2739 withval="$with_ncursesw"
2740 cf_cv_screen=ncursesw
2745 # Check whether --with-ncurses or --without-ncurses was given.
2746 if test "${with_ncurses+set}" = set; then
2747 withval="$with_ncurses"
2748 cf_cv_screen=ncurses
2753 # Check whether --with-pdcurses or --without-pdcurses was given.
2754 if test "${with_pdcurses+set}" = set; then
2755 withval="$with_pdcurses"
2756 cf_cv_screen=pdcurses
2764 case $cf_cv_screen in
2769 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2770 echo "configure:2771: checking for extra include directories" >&5
2771 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2772 echo $ac_n "(cached) $ac_c" 1>&6
2775 cf_cv_curses_incdir=no
2776 case $host_os in #(vi
2778 test -d /usr/include/curses_colr && \
2779 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2782 test -d /usr/5lib && \
2783 test -d /usr/5include && \
2784 cf_cv_curses_incdir="-I/usr/5include"
2790 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2791 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2794 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2795 echo "configure:2796: checking if we have identified curses headers" >&5
2796 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2797 echo $ac_n "(cached) $ac_c" 1>&6
2800 cf_cv_ncurses_header=none
2803 ncurses.h ncurses/curses.h ncurses/ncurses.h
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 #include <${cf_header}>
2810 initscr(); tgoto("?", 0,0)
2813 if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2815 cf_cv_ncurses_header=$cf_header; break
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2825 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2827 if test "$cf_cv_ncurses_header" = none ; then
2828 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2831 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2832 for ac_hdr in $cf_cv_ncurses_header
2834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2836 echo "configure:2837: checking for $ac_hdr" >&5
2837 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2838 echo $ac_n "(cached) $ac_c" 1>&6
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2846 { (eval echo configure:2847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2848 if test -z "$ac_err"; then
2850 eval "ac_cv_header_$ac_safe=yes"
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2856 eval "ac_cv_header_$ac_safe=no"
2860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2861 echo "$ac_t""yes" 1>&6
2862 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2863 cat >> confdefs.h <<EOF
2864 #define $ac_tr_hdr 1
2868 echo "$ac_t""no" 1>&6
2874 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2875 echo "configure:2876: checking for terminfo header" >&5
2876 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2880 case ${cf_cv_ncurses_header} in #(vi
2881 */ncurses.h|*/ncursesw.h) #(vi
2882 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2885 cf_term_header=term.h
2889 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2893 "configure"
2893 #include "confdefs.h"
2895 #include <${cf_cv_ncurses_header-curses.h}>
2899 int x = auto_left_margin
2902 if { (eval echo configure:2903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2905 cf_cv_term_header="$cf_test"
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2911 cf_cv_term_header=unknown
2915 test "$cf_cv_term_header" != unknown && break
2920 echo "$ac_t""$cf_cv_term_header" 1>&6
2922 # Set definitions to allow ifdef'ing to accommodate subdirectories
2924 case $cf_cv_term_header in # (vi
2926 cat >> confdefs.h <<\EOF
2927 #define HAVE_TERM_H 1
2933 case $cf_cv_term_header in # (vi
2934 ncurses/term.h) #(vi
2935 cat >> confdefs.h <<\EOF
2936 #define HAVE_NCURSES_TERM_H 1
2941 cat >> confdefs.h <<\EOF
2942 #define HAVE_NCURSESW_TERM_H 1
2950 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2951 echo "configure:2952: checking for ncurses version" >&5
2952 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2953 echo $ac_n "(cached) $ac_c" 1>&6
2956 cf_cv_ncurses_version=no
2959 if test "$cross_compiling" = yes; then
2962 # This will not work if the preprocessor splits the line after the
2963 # Autoconf token. The 'unproto' program does that.
2964 cat > conftest.$ac_ext <<EOF
2965 #include <${cf_cv_ncurses_header-curses.h}>
2967 #ifdef NCURSES_VERSION
2968 Autoconf NCURSES_VERSION
2976 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2977 { (eval echo configure:2978: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2978 if test -f conftest.out ; then
2979 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2980 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2985 cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2989 #include <${cf_cv_ncurses_header-curses.h}>
2993 FILE *fp = fopen("$cf_tempfile", "w");
2994 #ifdef NCURSES_VERSION
2995 # ifdef NCURSES_VERSION_PATCH
2996 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2998 fprintf(fp, "%s\n", NCURSES_VERSION);
3002 fprintf(fp, "old\n");
3007 ${cf_cv_main_return-return}(0);
3010 if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3013 cf_cv_ncurses_version=`cat $cf_tempfile`
3015 echo "configure: failed program was:" >&5
3016 cat conftest.$ac_ext >&5
3025 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3026 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3033 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
3034 echo "configure:3035: checking if we have identified curses libraries" >&5
3035 cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038 #include <${cf_cv_ncurses_header-curses.h}>
3040 initscr(); tgoto("?", 0,0)
3043 if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
3053 echo "$ac_t""$cf_result" 1>&6
3055 if test "$cf_result" = no ; then
3056 case $host_os in #(vi
3058 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3059 echo "configure:3060: checking for tgoto in -lmytinfo" >&5
3060 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3061 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3062 echo $ac_n "(cached) $ac_c" 1>&6
3064 ac_save_LIBS="$LIBS"
3065 LIBS="-lmytinfo $LIBS"
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 /* Override any gcc2 internal prototype to avoid an error. */
3070 /* We use char because int might match the return type of a gcc2
3071 builtin and then its argument prototype would still apply. */
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080 eval "ac_cv_lib_$ac_lib_var=yes"
3082 echo "configure: failed program was:" >&5
3083 cat conftest.$ac_ext >&5
3085 eval "ac_cv_lib_$ac_lib_var=no"
3088 LIBS="$ac_save_LIBS"
3091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3092 echo "$ac_t""yes" 1>&6
3093 LIBS="-lmytinfo $LIBS"
3095 echo "$ac_t""no" 1>&6
3100 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
3101 echo "configure:3102: checking for initscr in -lcur_colr" >&5
3102 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
3103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3104 echo $ac_n "(cached) $ac_c" 1>&6
3106 ac_save_LIBS="$LIBS"
3107 LIBS="-lcur_colr $LIBS"
3108 cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111 /* Override any gcc2 internal prototype to avoid an error. */
3112 /* We use char because int might match the return type of a gcc2
3113 builtin and then its argument prototype would still apply. */
3120 if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122 eval "ac_cv_lib_$ac_lib_var=yes"
3124 echo "configure: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
3127 eval "ac_cv_lib_$ac_lib_var=no"
3130 LIBS="$ac_save_LIBS"
3133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3134 echo "$ac_t""yes" 1>&6
3136 LIBS="-lcur_colr $LIBS"
3137 ac_cv_func_initscr=yes
3140 echo "$ac_t""no" 1>&6
3142 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
3143 echo "configure:3144: checking for initscr in -lHcurses" >&5
3144 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
3145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3148 ac_save_LIBS="$LIBS"
3149 LIBS="-lHcurses $LIBS"
3150 cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 /* Override any gcc2 internal prototype to avoid an error. */
3154 /* We use char because int might match the return type of a gcc2
3155 builtin and then its argument prototype would still apply. */
3162 if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164 eval "ac_cv_lib_$ac_lib_var=yes"
3166 echo "configure: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3169 eval "ac_cv_lib_$ac_lib_var=no"
3172 LIBS="$ac_save_LIBS"
3175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3176 echo "$ac_t""yes" 1>&6
3178 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
3179 LIBS="-lHcurses $LIBS"
3180 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
3181 ac_cv_func_initscr=yes
3184 echo "$ac_t""no" 1>&6
3190 linux*) # Suse Linux does not follow /usr/lib convention
3192 if test -n "/lib" ; then
3193 for cf_add_libdir in /lib
3195 if test $cf_add_libdir = /usr/lib ; then
3197 elif test -d $cf_add_libdir
3200 if test -n "$LDFLAGS$LIBS" ; then
3201 # a loop is needed to ensure we can add subdirs of existing dirs
3202 for cf_test_libdir in $LDFLAGS $LIBS ; do
3203 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3204 cf_have_libdir=yes; break
3208 if test "$cf_have_libdir" = no ; then
3209 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3211 echo "${as_me-configure}:3212: testing adding $cf_add_libdir to library-path ..." 1>&5
3214 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3222 if test -d /usr/5lib ; then
3224 if test -n "/usr/5lib" ; then
3225 for cf_add_libdir in /usr/5lib
3227 if test $cf_add_libdir = /usr/lib ; then
3229 elif test -d $cf_add_libdir
3232 if test -n "$LDFLAGS$LIBS" ; then
3233 # a loop is needed to ensure we can add subdirs of existing dirs
3234 for cf_test_libdir in $LDFLAGS $LIBS ; do
3235 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3236 cf_have_libdir=yes; break
3240 if test "$cf_have_libdir" = no ; then
3241 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3243 echo "${as_me-configure}:3244: testing adding $cf_add_libdir to library-path ..." 1>&5
3246 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3252 LIBS="$LIBS -lcurses -ltermcap"
3254 ac_cv_func_initscr=yes
3258 if test ".$ac_cv_func_initscr" != .yes ; then
3259 cf_save_LIBS="$LIBS"
3263 if test ".${cf_cv_ncurses_version-no}" != .no
3265 cf_check_list="ncurses curses cursesX"
3267 cf_check_list="cursesX curses ncurses"
3270 # Check for library containing tgoto. Do this before curses library
3271 # because it may be needed to link the test-case for initscr.
3272 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
3273 echo "configure:3274: checking for tgoto" >&5
3274 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3277 cat > conftest.$ac_ext <<EOF
3278 #line 3279 "configure"
3279 #include "confdefs.h"
3280 /* System header to define __stub macros and hopefully few prototypes,
3281 which can conflict with char tgoto(); below. */
3283 /* Override any gcc2 internal prototype to avoid an error. */
3284 /* We use char because int might match the return type of a gcc2
3285 builtin and then its argument prototype would still apply. */
3290 /* The GNU C library defines this for functions which it implements
3291 to always fail with ENOSYS. Some functions are actually named
3292 something starting with __ and the normal name is an alias. */
3293 #if defined (__stub_tgoto) || defined (__stub___tgoto)
3301 if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3303 eval "ac_cv_func_tgoto=yes"
3305 echo "configure: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3308 eval "ac_cv_func_tgoto=no"
3313 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
3314 echo "$ac_t""yes" 1>&6
3315 cf_term_lib=predefined
3317 echo "$ac_t""no" 1>&6
3319 for cf_term_lib in $cf_check_list termcap termlib unknown
3321 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3322 echo "configure:3323: checking for tgoto in -l$cf_term_lib" >&5
3323 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3324 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3325 echo $ac_n "(cached) $ac_c" 1>&6
3327 ac_save_LIBS="$LIBS"
3328 LIBS="-l$cf_term_lib $LIBS"
3329 cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332 /* Override any gcc2 internal prototype to avoid an error. */
3333 /* We use char because int might match the return type of a gcc2
3334 builtin and then its argument prototype would still apply. */
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3343 eval "ac_cv_lib_$ac_lib_var=yes"
3345 echo "configure: failed program was:" >&5
3346 cat conftest.$ac_ext >&5
3348 eval "ac_cv_lib_$ac_lib_var=no"
3351 LIBS="$ac_save_LIBS"
3354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3355 echo "$ac_t""yes" 1>&6
3358 echo "$ac_t""no" 1>&6
3366 # Check for library containing initscr
3367 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3368 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3370 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3371 echo "configure:3372: checking for initscr in -l$cf_curs_lib" >&5
3372 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3374 echo $ac_n "(cached) $ac_c" 1>&6
3376 ac_save_LIBS="$LIBS"
3377 LIBS="-l$cf_curs_lib $LIBS"
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 /* Override any gcc2 internal prototype to avoid an error. */
3382 /* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3397 eval "ac_cv_lib_$ac_lib_var=no"
3400 LIBS="$ac_save_LIBS"
3403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3407 echo "$ac_t""no" 1>&6
3411 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3413 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3414 if test "$cf_term_lib" = unknown ; then
3415 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3416 echo "configure:3417: checking if we can link with $cf_curs_lib library" >&5
3417 cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 #include <${cf_cv_ncurses_header-curses.h}>
3425 if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429 echo "configure: failed program was:" >&5
3430 cat conftest.$ac_ext >&5
3435 echo "$ac_t""$cf_result" 1>&6
3436 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3437 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3439 elif test "$cf_term_lib" != predefined ; then
3440 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3441 echo "configure:3442: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3442 cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445 #include <${cf_cv_ncurses_header-curses.h}>
3447 initscr(); tgoto((char *)0, 0, 0);
3450 if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3454 echo "configure: failed program was:" >&5
3455 cat conftest.$ac_ext >&5
3458 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 #include <${cf_cv_ncurses_header-curses.h}>
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3471 echo "configure: failed program was:" >&5
3472 cat conftest.$ac_ext >&5
3480 echo "$ac_t""$cf_result" 1>&6
3490 cf_ncuconfig_root=ncurses
3492 echo "Looking for ${cf_ncuconfig_root}-config"
3493 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3495 # Extract the first word of "$ac_prog", so it can be a program name with args.
3496 set dummy $ac_prog; ac_word=$2
3497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $ac_word" >&5
3499 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3500 echo $ac_n "(cached) $ac_c" 1>&6
3502 case "$NCURSES_CONFIG" in
3504 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3507 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3512 for ac_dir in $ac_dummy; do
3513 test -z "$ac_dir" && ac_dir=.
3514 if test -f $ac_dir/$ac_word; then
3515 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3523 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3524 if test -n "$NCURSES_CONFIG"; then
3525 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3527 echo "$ac_t""no" 1>&6
3530 test -n "$NCURSES_CONFIG" && break
3532 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3535 if test "$NCURSES_CONFIG" != none ; then
3537 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3538 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3540 # even with config script, some packages use no-override for curses.h
3542 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
3543 echo "configure:3544: checking if we have identified curses headers" >&5
3544 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
3545 echo $ac_n "(cached) $ac_c" 1>&6
3548 cf_cv_ncurses_header=none
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <${cf_header}>
3560 initscr(); tgoto("?", 0,0)
3563 if { (eval echo configure:3564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565 cf_cv_ncurses_header=$cf_header; break
3567 echo "configure: failed program was:" >&5
3568 cat conftest.$ac_ext >&5
3575 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3577 if test "$cf_cv_ncurses_header" = none ; then
3578 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3581 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3582 for ac_hdr in $cf_cv_ncurses_header
3584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3586 echo "configure:3587: checking for $ac_hdr" >&5
3587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3588 echo $ac_n "(cached) $ac_c" 1>&6
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3596 { (eval echo configure:3597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3598 if test -z "$ac_err"; then
3600 eval "ac_cv_header_$ac_safe=yes"
3603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3606 eval "ac_cv_header_$ac_safe=no"
3610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3611 echo "$ac_t""yes" 1>&6
3612 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3613 cat >> confdefs.h <<EOF
3614 #define $ac_tr_hdr 1
3618 echo "$ac_t""no" 1>&6
3624 cat >> confdefs.h <<\EOF
3630 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3632 cat >> confdefs.h <<EOF
3633 #define $cf_nculib_ROOT 1
3637 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3643 cf_ncuhdr_root=ncurses
3645 test -n "$cf_cv_curses_dir" && \
3646 test "$cf_cv_curses_dir" != "no" && { \
3648 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3649 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3651 while test $cf_add_incdir != /usr/include
3653 if test -d $cf_add_incdir
3656 if test -n "$CFLAGS$CPPFLAGS" ; then
3657 # a loop is needed to ensure we can add subdirs of existing dirs
3658 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3659 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3660 cf_have_incdir=yes; break
3665 if test "$cf_have_incdir" = no ; then
3666 if test "$cf_add_incdir" = /usr/local/include ; then
3667 if test "$GCC" = yes
3669 cf_save_CPPFLAGS=$CPPFLAGS
3670 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3679 if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3688 CPPFLAGS=$cf_save_CPPFLAGS
3693 if test "$cf_have_incdir" = no ; then
3694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3696 echo "${as_me-configure}:3697: testing adding $cf_add_incdir to include-path ..." 1>&5
3699 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3701 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3702 test "$cf_top_incdir" = "$cf_add_incdir" && break
3703 cf_add_incdir="$cf_top_incdir"
3714 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3715 echo "configure:3716: checking for $cf_ncuhdr_root header in include-path" >&5
3716 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3717 echo $ac_n "(cached) $ac_c" 1>&6
3720 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3721 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3722 for cf_header in $cf_header_list
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3730 #include <$cf_header>
3733 #ifdef NCURSES_VERSION
3735 printf("%s\n", NCURSES_VERSION);
3747 if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3749 cf_cv_ncurses_h=$cf_header
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3759 test "$cf_cv_ncurses_h" != no && break
3764 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3768 if test "$cf_cv_ncurses_h" != no ; then
3769 cf_cv_ncurses_header=$cf_cv_ncurses_h
3772 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3773 echo "configure:3774: checking for $cf_ncuhdr_root include-path" >&5
3774 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3775 echo $ac_n "(cached) $ac_c" 1>&6
3778 test -n "$verbose" && echo
3782 # collect the current set of include-directories from compiler flags
3783 cf_header_path_list=""
3784 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3785 for cf_header_path in $CPPFLAGS $CFLAGS
3787 case $cf_header_path in #(vi
3789 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3791 test "$cf_header_path" != "NONE" && \
3792 test -d "$cf_header_path" && \
3794 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3795 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3796 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3797 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3798 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3799 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"
3802 cf_header_path_list="$cf_header_path_list $cf_search"
3808 # add the variations for the package we are looking for
3813 test "/usr" != "$prefix" && \
3815 (test $prefix = NONE || test -d $prefix) && {
3816 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3817 test -d /usr/include && cf_search="$cf_search /usr/include"
3818 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3819 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3820 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3821 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3825 test "$prefix" != "NONE" && \
3826 test -d "$prefix" && \
3828 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3829 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3830 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3831 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3832 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3833 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3837 test "/usr/local" != "$prefix" && \
3838 test -d "/usr/local" && \
3839 (test $prefix = NONE || test -d $prefix) && {
3840 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3841 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3842 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3843 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3844 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3845 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3849 test "/opt" != "$prefix" && \
3851 (test $prefix = NONE || test -d $prefix) && {
3852 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3853 test -d /opt/include && cf_search="$cf_search /opt/include"
3854 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3855 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3856 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3857 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3861 test "$HOME" != "$prefix" && \
3862 test -d "$HOME" && \
3863 (test $prefix = NONE || test -d $prefix) && {
3864 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3865 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3866 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3867 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3868 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3869 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3874 test "$includedir" != NONE && \
3875 test "$includedir" != "/usr/include" && \
3876 test -d "$includedir" && {
3877 test -d $includedir && cf_search="$cf_search $includedir"
3878 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3881 test "$oldincludedir" != NONE && \
3882 test "$oldincludedir" != "/usr/include" && \
3883 test -d "$oldincludedir" && {
3884 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3885 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3888 cf_search="$cf_search $cf_header_path_list"
3890 test -n "$verbose" && echo search path $cf_search
3891 cf_save2_CPPFLAGS="$CPPFLAGS"
3892 for cf_incdir in $cf_search
3895 if test -n "$cf_incdir" ; then
3896 for cf_add_incdir in $cf_incdir
3898 while test $cf_add_incdir != /usr/include
3900 if test -d $cf_add_incdir
3903 if test -n "$CFLAGS$CPPFLAGS" ; then
3904 # a loop is needed to ensure we can add subdirs of existing dirs
3905 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3906 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3907 cf_have_incdir=yes; break
3912 if test "$cf_have_incdir" = no ; then
3913 if test "$cf_add_incdir" = /usr/local/include ; then
3914 if test "$GCC" = yes
3916 cf_save_CPPFLAGS=$CPPFLAGS
3917 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3926 if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3929 echo "configure: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3935 CPPFLAGS=$cf_save_CPPFLAGS
3940 if test "$cf_have_incdir" = no ; then
3941 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3943 echo "${as_me-configure}:3944: testing adding $cf_add_incdir to include-path ..." 1>&5
3946 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3948 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3949 test "$cf_top_incdir" = "$cf_add_incdir" && break
3950 cf_add_incdir="$cf_top_incdir"
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3969 #include <$cf_header>
3972 #ifdef NCURSES_VERSION
3974 printf("%s\n", NCURSES_VERSION);
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3988 cf_cv_ncurses_h2=$cf_header
3991 echo "configure: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3998 if test "$cf_cv_ncurses_h2" != no ; then
3999 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4000 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4003 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4005 CPPFLAGS="$cf_save2_CPPFLAGS"
4006 test "$cf_cv_ncurses_h2" != no && break
4008 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4012 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4014 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4015 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4016 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4017 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4020 if test -n "$cf_1st_incdir" ; then
4021 for cf_add_incdir in $cf_1st_incdir
4023 while test $cf_add_incdir != /usr/include
4025 if test -d $cf_add_incdir
4028 if test -n "$CFLAGS$CPPFLAGS" ; then
4029 # a loop is needed to ensure we can add subdirs of existing dirs
4030 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4031 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4032 cf_have_incdir=yes; break
4037 if test "$cf_have_incdir" = no ; then
4038 if test "$cf_add_incdir" = /usr/local/include ; then
4039 if test "$GCC" = yes
4041 cf_save_CPPFLAGS=$CPPFLAGS
4042 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4051 if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054 echo "configure: failed program was:" >&5
4055 cat conftest.$ac_ext >&5
4060 CPPFLAGS=$cf_save_CPPFLAGS
4065 if test "$cf_have_incdir" = no ; then
4066 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4068 echo "${as_me-configure}:4069: testing adding $cf_add_incdir to include-path ..." 1>&5
4071 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4073 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4074 test "$cf_top_incdir" = "$cf_add_incdir" && break
4075 cf_add_incdir="$cf_top_incdir"
4087 # Set definitions to allow ifdef'ing for ncurses.h
4089 case $cf_cv_ncurses_header in # (vi
4091 cat >> confdefs.h <<\EOF
4092 #define HAVE_NCURSES_H 1
4098 case $cf_cv_ncurses_header in # (vi
4099 ncurses/curses.h|ncurses/ncurses.h)
4100 cat >> confdefs.h <<\EOF
4101 #define HAVE_NCURSES_NCURSES_H 1
4105 ncursesw/curses.h|ncursesw/ncurses.h)
4106 cat >> confdefs.h <<\EOF
4107 #define HAVE_NCURSESW_NCURSES_H 1
4115 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4116 echo "configure:4117: checking for terminfo header" >&5
4117 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4118 echo $ac_n "(cached) $ac_c" 1>&6
4121 case ${cf_cv_ncurses_header} in #(vi
4122 */ncurses.h|*/ncursesw.h) #(vi
4123 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4126 cf_term_header=term.h
4130 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4136 #include <${cf_cv_ncurses_header-curses.h}>
4140 int x = auto_left_margin
4143 if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146 cf_cv_term_header="$cf_test"
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4152 cf_cv_term_header=unknown
4156 test "$cf_cv_term_header" != unknown && break
4161 echo "$ac_t""$cf_cv_term_header" 1>&6
4163 # Set definitions to allow ifdef'ing to accommodate subdirectories
4165 case $cf_cv_term_header in # (vi
4167 cat >> confdefs.h <<\EOF
4168 #define HAVE_TERM_H 1
4174 case $cf_cv_term_header in # (vi
4175 ncurses/term.h) #(vi
4176 cat >> confdefs.h <<\EOF
4177 #define HAVE_NCURSES_TERM_H 1
4182 cat >> confdefs.h <<\EOF
4183 #define HAVE_NCURSESW_TERM_H 1
4190 # some applications need this, but should check for NCURSES_VERSION
4191 cat >> confdefs.h <<\EOF
4197 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4198 echo "configure:4199: checking for ncurses version" >&5
4199 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4203 cf_cv_ncurses_version=no
4206 if test "$cross_compiling" = yes; then
4209 # This will not work if the preprocessor splits the line after the
4210 # Autoconf token. The 'unproto' program does that.
4211 cat > conftest.$ac_ext <<EOF
4212 #include <${cf_cv_ncurses_header-curses.h}>
4214 #ifdef NCURSES_VERSION
4215 Autoconf NCURSES_VERSION
4223 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4224 { (eval echo configure:4225: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4225 if test -f conftest.out ; then
4226 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4227 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4236 #include <${cf_cv_ncurses_header-curses.h}>
4240 FILE *fp = fopen("$cf_tempfile", "w");
4241 #ifdef NCURSES_VERSION
4242 # ifdef NCURSES_VERSION_PATCH
4243 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4245 fprintf(fp, "%s\n", NCURSES_VERSION);
4249 fprintf(fp, "old\n");
4254 ${cf_cv_main_return-return}(0);
4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4260 cf_cv_ncurses_version=`cat $cf_tempfile`
4262 echo "configure: failed program was:" >&5
4263 cat conftest.$ac_ext >&5
4272 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4273 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4281 cf_nculib_root=ncurses
4282 # This works, except for the special case where we find gpm, but
4283 # ncurses is in a nonstandard location via $LIBS, and we really want
4286 cf_ncurses_SAVE="$LIBS"
4287 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4288 echo "configure:4289: checking for Gpm_Open in -lgpm" >&5
4289 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4291 echo $ac_n "(cached) $ac_c" 1>&6
4293 ac_save_LIBS="$LIBS"
4295 cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 /* Override any gcc2 internal prototype to avoid an error. */
4299 /* We use char because int might match the return type of a gcc2
4300 builtin and then its argument prototype would still apply. */
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4309 eval "ac_cv_lib_$ac_lib_var=yes"
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4314 eval "ac_cv_lib_$ac_lib_var=no"
4317 LIBS="$ac_save_LIBS"
4320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4321 echo "$ac_t""yes" 1>&6
4322 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4323 echo "configure:4324: checking for initscr in -lgpm" >&5
4324 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4325 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4326 echo $ac_n "(cached) $ac_c" 1>&6
4328 ac_save_LIBS="$LIBS"
4330 cat > conftest.$ac_ext <<EOF
4331 #line 4332 "configure"
4332 #include "confdefs.h"
4333 /* Override any gcc2 internal prototype to avoid an error. */
4334 /* We use char because int might match the return type of a gcc2
4335 builtin and then its argument prototype would still apply. */
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4344 eval "ac_cv_lib_$ac_lib_var=yes"
4346 echo "configure: failed program was:" >&5
4347 cat conftest.$ac_ext >&5
4349 eval "ac_cv_lib_$ac_lib_var=no"
4352 LIBS="$ac_save_LIBS"
4355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4356 echo "$ac_t""yes" 1>&6
4357 LIBS="$cf_ncurses_SAVE"
4359 echo "$ac_t""no" 1>&6
4360 cf_ncurses_LIBS="-lgpm"
4364 echo "$ac_t""no" 1>&6
4368 case $host_os in #(vi
4370 # This is only necessary if you are linking against an obsolete
4371 # version of ncurses (but it should do no harm, since it's static).
4372 if test "$cf_nculib_root" = ncurses ; then
4373 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4374 echo "configure:4375: checking for tgoto in -lmytinfo" >&5
4375 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377 echo $ac_n "(cached) $ac_c" 1>&6
4379 ac_save_LIBS="$LIBS"
4380 LIBS="-lmytinfo $LIBS"
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 /* Override any gcc2 internal prototype to avoid an error. */
4385 /* We use char because int might match the return type of a gcc2
4386 builtin and then its argument prototype would still apply. */
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4395 eval "ac_cv_lib_$ac_lib_var=yes"
4397 echo "configure: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4400 eval "ac_cv_lib_$ac_lib_var=no"
4403 LIBS="$ac_save_LIBS"
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407 echo "$ac_t""yes" 1>&6
4408 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4410 echo "$ac_t""no" 1>&6
4417 LIBS="$cf_ncurses_LIBS $LIBS"
4419 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4422 if test -n "$cf_cv_curses_dir/lib" ; then
4423 for cf_add_libdir in $cf_cv_curses_dir/lib
4425 if test $cf_add_libdir = /usr/lib ; then
4427 elif test -d $cf_add_libdir
4430 if test -n "$LDFLAGS$LIBS" ; then
4431 # a loop is needed to ensure we can add subdirs of existing dirs
4432 for cf_test_libdir in $LDFLAGS $LIBS ; do
4433 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4434 cf_have_libdir=yes; break
4438 if test "$cf_have_libdir" = no ; then
4439 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4441 echo "${as_me-configure}:4442: testing adding $cf_add_libdir to library-path ..." 1>&5
4444 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4450 LIBS="-l$cf_nculib_root $LIBS"
4453 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4455 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4456 echo "configure:4457: checking for initscr" >&5
4457 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4458 echo $ac_n "(cached) $ac_c" 1>&6
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 /* System header to define __stub macros and hopefully few prototypes,
4464 which can conflict with char initscr(); below. */
4466 /* Override any gcc2 internal prototype to avoid an error. */
4467 /* We use char because int might match the return type of a gcc2
4468 builtin and then its argument prototype would still apply. */
4473 /* The GNU C library defines this for functions which it implements
4474 to always fail with ENOSYS. Some functions are actually named
4475 something starting with __ and the normal name is an alias. */
4476 #if defined (__stub_initscr) || defined (__stub___initscr)
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4486 eval "ac_cv_func_initscr=yes"
4488 echo "configure: failed program was:" >&5
4489 cat conftest.$ac_ext >&5
4491 eval "ac_cv_func_initscr=no"
4496 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4497 echo "$ac_t""yes" 1>&6
4498 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4500 echo "$ac_t""no" 1>&6
4502 cf_save_LIBS="$LIBS"
4503 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4504 echo "configure:4505: checking for initscr in -l$cf_nculib_root" >&5
4505 LIBS="-l$cf_nculib_root $LIBS"
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <${cf_cv_ncurses_header-curses.h}>
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4516 echo "$ac_t""yes" 1>&6
4517 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
4523 echo "$ac_t""no" 1>&6
4526 cf_library_path_list=""
4527 if test -n "${LDFLAGS}${LIBS}" ; then
4528 for cf_library_path in $LDFLAGS $LIBS
4530 case $cf_library_path in #(vi
4532 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4534 test "$cf_library_path" != "NONE" && \
4535 test -d "$cf_library_path" && \
4537 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4538 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4539 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4540 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4541 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4542 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"
4545 cf_library_path_list="$cf_library_path_list $cf_search"
4555 test "/usr" != "$prefix" && \
4557 (test $prefix = NONE || test -d $prefix) && {
4558 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4559 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4560 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4561 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4562 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4563 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4567 test "$prefix" != "NONE" && \
4568 test -d "$prefix" && \
4570 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4571 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4572 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4573 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4574 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4575 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4579 test "/usr/local" != "$prefix" && \
4580 test -d "/usr/local" && \
4581 (test $prefix = NONE || test -d $prefix) && {
4582 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4583 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4584 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4585 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4586 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4587 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4591 test "/opt" != "$prefix" && \
4593 (test $prefix = NONE || test -d $prefix) && {
4594 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4595 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4596 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4597 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4598 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4599 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4603 test "$HOME" != "$prefix" && \
4604 test -d "$HOME" && \
4605 (test $prefix = NONE || test -d $prefix) && {
4606 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4607 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4608 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4609 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4610 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4611 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4616 cf_search="$cf_library_path_list $cf_search"
4618 for cf_libdir in $cf_search
4620 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4621 echo "configure:4622: checking for -l$cf_nculib_root in $cf_libdir" >&5
4622 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 #include <${cf_cv_ncurses_header-curses.h}>
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633 echo "$ac_t""yes" 1>&6
4634 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'