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-x use the X Window System
194 --with-Xaw3d link with Xaw 3d library
195 --with-neXtaw link with neXT Athena library
196 --with-XawPlus link with Athena-Plus library
200 -host | --host | --hos | --ho)
202 -host=* | --host=* | --hos=* | --ho=*)
205 -includedir | --includedir | --includedi | --included | --include \
206 | --includ | --inclu | --incl | --inc)
207 ac_prev=includedir ;;
208 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
209 | --includ=* | --inclu=* | --incl=* | --inc=*)
210 includedir="$ac_optarg" ;;
212 -infodir | --infodir | --infodi | --infod | --info | --inf)
214 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
215 infodir="$ac_optarg" ;;
217 -libdir | --libdir | --libdi | --libd)
219 -libdir=* | --libdir=* | --libdi=* | --libd=*)
220 libdir="$ac_optarg" ;;
222 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
223 | --libexe | --libex | --libe)
224 ac_prev=libexecdir ;;
225 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
226 | --libexe=* | --libex=* | --libe=*)
227 libexecdir="$ac_optarg" ;;
229 -localstatedir | --localstatedir | --localstatedi | --localstated \
230 | --localstate | --localstat | --localsta | --localst \
231 | --locals | --local | --loca | --loc | --lo)
232 ac_prev=localstatedir ;;
233 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
234 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
235 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
236 localstatedir="$ac_optarg" ;;
238 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
241 mandir="$ac_optarg" ;;
244 # Obsolete; use --without-fp.
247 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
252 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
256 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
257 | --oldin | --oldi | --old | --ol | --o)
258 ac_prev=oldincludedir ;;
259 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
260 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
261 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
262 oldincludedir="$ac_optarg" ;;
264 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
267 prefix="$ac_optarg" ;;
269 -program-prefix | --program-prefix | --program-prefi | --program-pref \
270 | --program-pre | --program-pr | --program-p)
271 ac_prev=program_prefix ;;
272 -program-prefix=* | --program-prefix=* | --program-prefi=* \
273 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
274 program_prefix="$ac_optarg" ;;
276 -program-suffix | --program-suffix | --program-suffi | --program-suff \
277 | --program-suf | --program-su | --program-s)
278 ac_prev=program_suffix ;;
279 -program-suffix=* | --program-suffix=* | --program-suffi=* \
280 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
281 program_suffix="$ac_optarg" ;;
283 -program-transform-name | --program-transform-name \
284 | --program-transform-nam | --program-transform-na \
285 | --program-transform-n | --program-transform- \
286 | --program-transform | --program-transfor \
287 | --program-transfo | --program-transf \
288 | --program-trans | --program-tran \
289 | --progr-tra | --program-tr | --program-t)
290 ac_prev=program_transform_name ;;
291 -program-transform-name=* | --program-transform-name=* \
292 | --program-transform-nam=* | --program-transform-na=* \
293 | --program-transform-n=* | --program-transform-=* \
294 | --program-transform=* | --program-transfor=* \
295 | --program-transfo=* | --program-transf=* \
296 | --program-trans=* | --program-tran=* \
297 | --progr-tra=* | --program-tr=* | --program-t=*)
298 program_transform_name="$ac_optarg" ;;
300 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
301 | -silent | --silent | --silen | --sile | --sil)
304 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308 sbindir="$ac_optarg" ;;
310 -sharedstatedir | --sharedstatedir | --sharedstatedi \
311 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
312 | --sharedst | --shareds | --shared | --share | --shar \
314 ac_prev=sharedstatedir ;;
315 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
316 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
317 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319 sharedstatedir="$ac_optarg" ;;
321 -site | --site | --sit)
323 -site=* | --site=* | --sit=*)
326 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
329 srcdir="$ac_optarg" ;;
331 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
332 | --syscon | --sysco | --sysc | --sys | --sy)
333 ac_prev=sysconfdir ;;
334 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
335 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
336 sysconfdir="$ac_optarg" ;;
338 -target | --target | --targe | --targ | --tar | --ta | --t)
340 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
341 target="$ac_optarg" ;;
343 -v | -verbose | --verbose | --verbos | --verbo | --verb)
346 -version | --version | --versio | --versi | --vers)
347 echo "configure generated by autoconf version 2.13.20030927"
351 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
352 # Reject names that are not valid shell variable names.
353 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
354 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 ac_package=`echo $ac_package| sed 's/-/_/g'`
361 eval "with_${ac_package}='$ac_optarg'" ;;
363 -without-* | --without-*)
364 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
365 # Reject names that are not valid shell variable names.
366 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
367 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 ac_package=`echo $ac_package| sed 's/-/_/g'`
370 eval "with_${ac_package}=no" ;;
373 # Obsolete; use --with-x.
376 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
377 | --x-incl | --x-inc | --x-in | --x-i)
378 ac_prev=x_includes ;;
379 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
380 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
381 x_includes="$ac_optarg" ;;
383 -x-libraries | --x-libraries | --x-librarie | --x-librari \
384 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
385 ac_prev=x_libraries ;;
386 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
387 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
388 x_libraries="$ac_optarg" ;;
390 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
395 echo "configure: warning: $ac_option: invalid host type" 1>&2
397 if test "x$nonopt" != xNONE; then
398 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406 if test -n "$ac_prev"; then
407 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412 # File descriptor usage:
415 # 2 errors and warnings
416 # 3 some systems may open it to /dev/tty
417 # 4 used on the Kubota Titan
418 # 6 checking for... messages and results
419 # 5 compiler messages saved in config.log
420 if test "$silent" = yes; then
428 This file contains any messages produced by compilers while
429 running configure, to aid debugging if configure makes a mistake.
432 # Strip out --no-create and --no-recursion so they do not pile up.
433 # Also quote any args containing shell metacharacters.
438 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
439 | --no-cr | --no-c) ;;
440 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
441 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
442 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
443 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
444 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
449 # Only set these to C if already set. These must not be set unconditionally
450 # because not all systems understand e.g. LANG=C (notably SCO).
451 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
452 # Non-C LC_CTYPE values break the ctype check.
453 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
454 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
456 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
458 # confdefs.h avoids OS command line length limits that DEFS can exceed.
459 rm -rf conftest* confdefs.h
460 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
463 # A filename unique to this package, relative to the directory that
464 # configure is in, which we can look for to find out if srcdir is correct.
465 ac_unique_file=ncurses.c
467 # Find the source files, if location was not specified.
468 if test -z "$srcdir"; then
469 ac_srcdir_defaulted=yes
470 # Try the directory containing this script, then its parent.
472 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
473 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 if test ! -r $srcdir/$ac_unique_file; then
479 ac_srcdir_defaulted=no
481 if test ! -r $srcdir/$ac_unique_file; then
482 if test "$ac_srcdir_defaulted" = yes; then
483 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
488 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490 # Prefer explicitly selected file to automatically selected ones.
491 if test -z "$CONFIG_SITE"; then
492 if test "x$prefix" != xNONE; then
493 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
498 for ac_site_file in $CONFIG_SITE; do
499 if test -r "$ac_site_file"; then
500 echo "loading site script $ac_site_file"
505 if test -r "$cache_file"; then
506 echo "loading cache $cache_file"
509 echo "creating cache $cache_file"
514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
515 ac_cpp='$CPP $CPPFLAGS'
516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
517 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
518 cross_compiling=$ac_cv_prog_cc_cross
522 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
523 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
524 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531 ac_n= ac_c='\c' ac_t=
534 # If we find X, set shell vars x_includes and x_libraries to the
535 # paths, otherwise set no_x=yes.
536 # Uses ac_ vars as temps to allow command line to override cache and checks.
537 # --without-x overrides everything else, but does not touch the cache.
538 echo $ac_n "checking for X""... $ac_c" 1>&6
539 echo "configure:540: checking for X" >&5
542 # Check whether --with-x or --without-x was given.
543 if test "${with_x+set}" = set; then
548 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
549 if test "x$with_x" = xno; then
550 # The user explicitly disabled X.
553 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
554 # Both variables are already set.
557 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
558 echo $ac_n "(cached) $ac_c" 1>&6
560 # One or both of the vars are not set, and there is no cached value.
561 ac_x_includes=NO ac_x_libraries=NO
563 if mkdir conftestdir; then
565 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
566 cat > Imakefile <<'EOF'
568 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
570 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
571 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
572 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
573 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
574 for ac_extension in a so sl; do
575 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
576 test -f $ac_im_libdir/libX11.$ac_extension; then
577 ac_im_usrlibdir=$ac_im_libdir; break
580 # Screen out bogus values from the imake configuration. They are
581 # bogus both because they are the default anyway, and because
582 # using them would break gcc on systems where it needs fixed includes.
583 case "$ac_im_incroot" in
585 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
587 case "$ac_im_usrlibdir" in
589 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
596 if test "$ac_x_includes" = NO; then
597 # Guess where to find include files, by looking for this one X11 .h file.
598 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
600 # First, try using that file with no special directory specified.
601 cat > conftest.$ac_ext <<EOF
602 #line 603 "configure"
603 #include "confdefs.h"
604 #include <$x_direct_test_include>
606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
607 { (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
609 if test -z "$ac_err"; then
611 # We can compile using X headers with no special include directory.
615 echo "configure: failed program was:" >&5
616 cat conftest.$ac_ext >&5
618 # Look for the header file in a standard set of common directories.
619 # Check X11 before X11Rn because it is often a symlink to the current release.
631 /usr/local/X11/include \
632 /usr/local/X11R6/include \
633 /usr/local/X11R5/include \
634 /usr/local/X11R4/include \
636 /usr/local/include/X11 \
637 /usr/local/include/X11R6 \
638 /usr/local/include/X11R5 \
639 /usr/local/include/X11R4 \
643 /usr/XFree86/include/X11 \
647 /usr/unsupported/include \
648 /usr/athena/include \
649 /usr/local/x11r5/include \
650 /usr/lpp/Xamples/include \
652 /usr/openwin/include \
653 /usr/openwin/share/include \
656 if test -r "$ac_dir/$x_direct_test_include"; then
657 ac_x_includes=$ac_dir
663 fi # $ac_x_includes = NO
665 if test "$ac_x_libraries" = NO; then
666 # Check for the libraries.
668 test -z "$x_direct_test_library" && x_direct_test_library=Xt
669 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
671 # See if we find them without any special options.
672 # Don't add to $LIBS permanently.
674 LIBS="-l$x_direct_test_library $LIBS"
675 cat > conftest.$ac_ext <<EOF
676 #line 677 "configure"
677 #include "confdefs.h"
680 ${x_direct_test_function}()
683 if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
686 # We can link X programs with no special library path.
689 echo "configure: failed program was:" >&5
690 cat conftest.$ac_ext >&5
693 # First see if replacing the include by lib works.
694 # Check X11 before X11Rn because it is often a symlink to the current release.
695 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
707 /usr/local/X11R6/lib \
708 /usr/local/X11R5/lib \
709 /usr/local/X11R4/lib \
712 /usr/local/lib/X11R6 \
713 /usr/local/lib/X11R5 \
714 /usr/local/lib/X11R4 \
718 /usr/XFree86/lib/X11 \
722 /usr/unsupported/lib \
724 /usr/local/x11r5/lib \
725 /usr/lpp/Xamples/lib \
729 /usr/openwin/share/lib \
732 for ac_extension in a so sl; do
733 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
734 ac_x_libraries=$ac_dir
741 fi # $ac_x_libraries = NO
743 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
744 # Didn't find X anywhere. Cache the known absence of X.
745 ac_cv_have_x="have_x=no"
747 # Record where we found X for the cache.
748 ac_cv_have_x="have_x=yes \
749 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
756 if test "$have_x" != yes; then
757 echo "$ac_t""$have_x" 1>&6
760 # If each of the values was on the command line, it overrides each guess.
761 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
762 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
763 # Update the cache value to reflect the command line values.
764 ac_cv_have_x="have_x=yes \
765 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
766 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
773 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
776 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
779 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
780 if test -f $ac_dir/install-sh; then
782 ac_install_sh="$ac_aux_dir/install-sh -c"
784 elif test -f $ac_dir/install.sh; then
786 ac_install_sh="$ac_aux_dir/install.sh -c"
790 if test -z "$ac_aux_dir"; then
791 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
793 ac_config_guess=$ac_aux_dir/config.guess
794 ac_config_sub=$ac_aux_dir/config.sub
795 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
798 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
800 # Make sure we can run config.sub.
801 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
802 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
805 echo $ac_n "checking host system type""... $ac_c" 1>&6
806 echo "configure:807: checking host system type" >&5
809 case "$host_alias" in
813 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
814 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
816 *) host_alias=$nonopt ;;
820 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
821 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
822 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
823 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
824 echo "$ac_t""$host" 1>&6
826 system_name="$host_os"
828 system_name="`(uname -s -r) 2>/dev/null`"
829 if test -z "$system_name" ; then
830 system_name="`(hostname) 2>/dev/null`"
833 test -n "$system_name" && cat >> confdefs.h <<EOF
834 #define SYSTEM_NAME "$system_name"
837 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 cf_cv_system_name="$system_name"
844 test -z "$system_name" && system_name="$cf_cv_system_name"
845 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
847 if test ".$system_name" != ".$cf_cv_system_name" ; then
848 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
849 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
853 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
854 echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
855 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
856 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
857 echo $ac_n "(cached) $ac_c" 1>&6
859 cat > conftestmake <<\EOF
861 @echo 'ac_maketemp="${MAKE}"'
863 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
864 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
865 if test -n "$ac_maketemp"; then
866 eval ac_cv_prog_make_${ac_make}_set=yes
868 eval ac_cv_prog_make_${ac_make}_set=no
872 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
873 echo "$ac_t""yes" 1>&6
876 echo "$ac_t""no" 1>&6
877 SET_MAKE="MAKE=${MAKE-make}"
880 # Extract the first word of "gcc", so it can be a program name with args.
881 set dummy gcc; ac_word=$2
882 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
883 echo "configure:884: checking for $ac_word" >&5
884 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
885 echo $ac_n "(cached) $ac_c" 1>&6
887 if test -n "$CC"; then
888 ac_cv_prog_CC="$CC" # Let the user override the test.
890 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
892 for ac_dir in $ac_dummy; do
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
903 if test -n "$CC"; then
904 echo "$ac_t""$CC" 1>&6
906 echo "$ac_t""no" 1>&6
909 if test -z "$CC"; then
910 # Extract the first word of "cc", so it can be a program name with args.
911 set dummy cc; ac_word=$2
912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
913 echo "configure:914: checking for $ac_word" >&5
914 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
917 if test -n "$CC"; then
918 ac_cv_prog_CC="$CC" # Let the user override the test.
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
923 for ac_dir in $ac_dummy; do
924 test -z "$ac_dir" && ac_dir=.
925 if test -f $ac_dir/$ac_word; then
926 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
935 if test $ac_prog_rejected = yes; then
936 # We found a bogon in the path, so make sure we never use it.
937 set dummy $ac_cv_prog_CC
939 if test $# -gt 0; then
940 # We chose a different compiler from the bogus one.
941 # However, it has the same basename, so the bogon will be chosen
942 # first if we set CC to just the basename; use the full file name.
944 set dummy "$ac_dir/$ac_word" "$@"
952 if test -n "$CC"; then
953 echo "$ac_t""$CC" 1>&6
955 echo "$ac_t""no" 1>&6
958 if test -z "$CC"; then
961 # Extract the first word of "cl", so it can be a program name with args.
962 set dummy cl; ac_word=$2
963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
964 echo "configure:965: checking for $ac_word" >&5
965 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
968 if test -n "$CC"; then
969 ac_cv_prog_CC="$CC" # Let the user override the test.
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
973 for ac_dir in $ac_dummy; do
974 test -z "$ac_dir" && ac_dir=.
975 if test -f $ac_dir/$ac_word; then
984 if test -n "$CC"; then
985 echo "$ac_t""$CC" 1>&6
987 echo "$ac_t""no" 1>&6
992 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
995 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
996 echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
999 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1000 ac_cpp='$CPP $CPPFLAGS'
1001 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1002 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1003 cross_compiling=$ac_cv_prog_cc_cross
1005 cat > conftest.$ac_ext << EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1012 if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1013 ac_cv_prog_cc_works=yes
1014 # If we can't run a trivial program, we are probably using a cross compiler.
1015 if (./conftest; exit) 2>/dev/null; then
1016 ac_cv_prog_cc_cross=no
1018 ac_cv_prog_cc_cross=yes
1021 echo "configure: failed program was:" >&5
1022 cat conftest.$ac_ext >&5
1023 ac_cv_prog_cc_works=no
1027 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1028 ac_cpp='$CPP $CPPFLAGS'
1029 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1030 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1031 cross_compiling=$ac_cv_prog_cc_cross
1033 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1034 if test $ac_cv_prog_cc_works = no; then
1035 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1037 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1038 echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1039 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1040 cross_compiling=$ac_cv_prog_cc_cross
1042 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1043 echo "configure:1044: checking whether we are using GNU C" >&5
1044 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1045 echo $ac_n "(cached) $ac_c" 1>&6
1047 cat > conftest.c <<EOF
1052 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1059 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1061 if test $ac_cv_prog_gcc = yes; then
1067 ac_test_CFLAGS="${CFLAGS+set}"
1068 ac_save_CFLAGS="$CFLAGS"
1070 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1073 echo $ac_n "(cached) $ac_c" 1>&6
1075 echo 'void f(){}' > conftest.c
1076 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1085 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1086 if test "$ac_test_CFLAGS" = set; then
1087 CFLAGS="$ac_save_CFLAGS"
1088 elif test $ac_cv_prog_cc_g = yes; then
1089 if test "$GCC" = yes; then
1095 if test "$GCC" = yes; then
1102 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1103 echo "configure:1104: checking how to run the C preprocessor" >&5
1104 # On Suns, sometimes $CPP names a directory.
1105 if test -n "$CPP" && test -d "$CPP"; then
1108 if test -z "$CPP"; then
1109 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1110 echo $ac_n "(cached) $ac_c" 1>&6
1112 # This must be in double quotes, not single quotes, because CPP may get
1113 # substituted into the Makefile and "${CC-cc}" will confuse make.
1115 # On the NeXT, cc -E runs the code through the compiler's parser,
1116 # not just through cpp.
1117 cat > conftest.$ac_ext <<EOF
1118 #line 1119 "configure"
1119 #include "confdefs.h"
1123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1124 { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1126 if test -z "$ac_err"; then
1130 echo "configure: failed program was:" >&5
1131 cat conftest.$ac_ext >&5
1133 CPP="${CC-cc} -E -traditional-cpp"
1134 cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1141 { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1143 if test -z "$ac_err"; then
1147 echo "configure: failed program was:" >&5
1148 cat conftest.$ac_ext >&5
1150 CPP="${CC-cc} -nologo -E"
1151 cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1158 { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1160 if test -z "$ac_err"; then
1164 echo "configure: failed program was:" >&5
1165 cat conftest.$ac_ext >&5
1174 ac_cv_prog_CPP="$CPP"
1176 CPP="$ac_cv_prog_CPP"
1178 ac_cv_prog_CPP="$CPP"
1180 echo "$ac_t""$CPP" 1>&6
1182 for ac_prog in mawk gawk nawk awk
1184 # Extract the first word of "$ac_prog", so it can be a program name with args.
1185 set dummy $ac_prog; ac_word=$2
1186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1187 echo "configure:1188: checking for $ac_word" >&5
1188 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1189 echo $ac_n "(cached) $ac_c" 1>&6
1191 if test -n "$AWK"; then
1192 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1196 for ac_dir in $ac_dummy; do
1197 test -z "$ac_dir" && ac_dir=.
1198 if test -f $ac_dir/$ac_word; then
1199 ac_cv_prog_AWK="$ac_prog"
1206 AWK="$ac_cv_prog_AWK"
1207 if test -n "$AWK"; then
1208 echo "$ac_t""$AWK" 1>&6
1210 echo "$ac_t""no" 1>&6
1213 test -n "$AWK" && break
1218 CC_SHARED_OPTS=unknown
1219 CPPFLAGS="$CPPFLAGS"
1221 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1222 DFT_UPR_MODEL="NORMAL"
1239 TINFO_ARGS='$(LIBS_CURSES)'
1240 cf_cv_abi_version=""
1241 cf_cv_rel_version=""
1246 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1247 echo "configure:1248: checking for Cygwin environment" >&5
1248 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1249 echo $ac_n "(cached) $ac_c" 1>&6
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1253 "configure"
1253 #include "confdefs.h"
1258 #define __CYGWIN__ __CYGWIN32__
1263 if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1276 echo "$ac_t""$ac_cv_cygwin" 1>&6
1278 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1279 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1280 echo "configure:1281: checking for mingw32 environment" >&5
1281 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1284 cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1292 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1296 echo "configure: failed program was:" >&5
1297 cat conftest.$ac_ext >&5
1305 echo "$ac_t""$ac_cv_mingw32" 1>&6
1307 test "$ac_cv_mingw32" = yes && MINGW32=yes
1310 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1311 echo "configure:1312: checking for executable suffix" >&5
1312 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1315 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1319 echo 'int main () { return 0; }' > conftest.$ac_ext
1321 if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1322 for file in conftest.*; do
1324 *.c | *.o | *.obj) ;;
1325 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1329 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1332 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1337 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1338 echo "$ac_t""${ac_cv_exeext}" 1>&6
1341 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1342 echo "configure:1343: checking for object suffix" >&5
1343 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1347 echo 'int i = 1;' > conftest.$ac_ext
1348 if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1349 for ac_file in conftest.*; do
1352 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1356 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1361 echo "$ac_t""$ac_cv_objext" 1>&6
1362 OBJEXT=$ac_cv_objext
1363 ac_objext=$ac_cv_objext
1367 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1368 echo "configure:1369: checking for ${CC-cc} option to accept ANSI C" >&5
1369 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1374 cf_save_CFLAGS="$CFLAGS"
1375 cf_save_CPPFLAGS="$CPPFLAGS"
1376 # Don't try gcc -ansi; that turns off useful extensions and
1377 # breaks some systems' header files.
1378 # AIX -qlanglvl=ansi
1379 # Ultrix and OSF/1 -std1
1380 # HP-UX -Aa -D_HPUX_SOURCE
1382 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1383 for cf_arg in "-DCC_HAS_PROTOS" \
1388 "-Aa -D_HPUX_SOURCE" \
1395 cf_new_extra_cppflags=
1397 for cf_add_cflags in $cf_arg
1399 case $cf_fix_cppflags in
1401 case $cf_add_cflags in #(vi
1402 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1403 case $cf_add_cflags in
1405 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1407 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1408 && test -z "${cf_tst_cflags}" \
1409 && cf_fix_cppflags=yes
1411 if test $cf_fix_cppflags = yes ; then
1412 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1414 elif test "${cf_tst_cflags}" = "\"'" ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1421 *$cf_add_cflags) #(vi
1424 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1429 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1434 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1436 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1438 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1439 && test -z "${cf_tst_cflags}" \
1440 && cf_fix_cppflags=no
1445 if test -n "$cf_new_cflags" ; then
1447 CFLAGS="$CFLAGS $cf_new_cflags"
1450 if test -n "$cf_new_cppflags" ; then
1452 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1455 if test -n "$cf_new_extra_cppflags" ; then
1457 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1463 cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1467 #ifndef CC_HAS_PROTOS
1468 #if !defined(__STDC__) || (__STDC__ != 1)
1475 int test (int i, double x);
1476 struct s1 {int (*f) (int a);};
1477 struct s2 {int (*f) (double a);};
1480 if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1482 cf_cv_ansi_cc="$cf_arg"; break
1484 echo "configure: failed program was:" >&5
1485 cat conftest.$ac_ext >&5
1489 CFLAGS="$cf_save_CFLAGS"
1490 CPPFLAGS="$cf_save_CPPFLAGS"
1494 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1496 if test "$cf_cv_ansi_cc" != "no"; then
1497 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1502 cf_new_extra_cppflags=
1504 for cf_add_cflags in $cf_cv_ansi_cc
1506 case $cf_fix_cppflags in
1508 case $cf_add_cflags in #(vi
1509 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1510 case $cf_add_cflags in
1512 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1514 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1515 && test -z "${cf_tst_cflags}" \
1516 && cf_fix_cppflags=yes
1518 if test $cf_fix_cppflags = yes ; then
1519 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1521 elif test "${cf_tst_cflags}" = "\"'" ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1528 *$cf_add_cflags) #(vi
1531 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1536 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1541 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1543 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1545 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1546 && test -z "${cf_tst_cflags}" \
1547 && cf_fix_cppflags=no
1552 if test -n "$cf_new_cflags" ; then
1554 CFLAGS="$CFLAGS $cf_new_cflags"
1557 if test -n "$cf_new_cppflags" ; then
1559 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1562 if test -n "$cf_new_extra_cppflags" ; then
1564 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1571 cat >> confdefs.h <<\EOF
1572 #define CC_HAS_PROTOS 1
1579 if test "$cf_cv_ansi_cc" = "no"; then
1580 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1581 You have the following choices:
1582 a. adjust your compiler options
1583 b. get an up-to-date compiler
1584 c. use a wrapper such as unproto" 1>&2; exit 1; }
1588 if test "$GCC" = yes
1590 cat > conftest.i <<EOF
1592 #define GCC_PRINTF 0
1597 #ifndef GCC_NORETURN
1598 #define GCC_NORETURN /* nothing */
1601 #define GCC_UNUSED /* nothing */
1604 if test "$GCC" = yes
1606 echo "checking for $CC __attribute__ directives" 1>&6
1607 echo "configure:1608: checking for $CC __attribute__ directives" >&5
1608 cat > conftest.$ac_ext <<EOF
1609 #line 1610 "configure"
1610 #include "confdefs.h"
1611 #include "conftest.h"
1612 #include "conftest.i"
1614 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1616 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1619 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1621 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1623 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1624 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1625 extern void foo(void) GCC_NORETURN;
1626 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1628 for cf_attribute in scanf printf unused noreturn
1631 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1633 cf_directive="__attribute__(($cf_attribute))"
1634 echo "checking for $CC $cf_directive" 1>&5
1635 case $cf_attribute in
1637 cat >conftest.h <<EOF
1638 #define GCC_$cf_ATTRIBUTE 1
1642 cat >conftest.h <<EOF
1643 #define GCC_$cf_ATTRIBUTE $cf_directive
1647 if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1648 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1649 cat conftest.h >>confdefs.h
1653 fgrep define conftest.i >>confdefs.h
1659 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1660 echo "configure:1661: checking if $CC -U and -D options work together" >&5
1661 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1662 echo $ac_n "(cached) $ac_c" 1>&6
1665 cf_save_CPPFLAGS="$CPPFLAGS"
1666 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1667 cat > conftest.$ac_ext <<EOF
1668 #line 1669 "configure"
1669 #include "confdefs.h"
1674 make an undefined-error
1677 make a defined-error
1682 if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1685 cf_cv_cc_u_d_options=yes
1687 echo "configure: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
1691 cf_cv_cc_u_d_options=no
1694 CPPFLAGS="$cf_save_CPPFLAGS"
1698 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1705 cf_POSIX_C_SOURCE=199506L
1707 case $host_os in #(vi
1709 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1712 # 5.x headers associate
1713 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1714 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1715 cf_POSIX_C_SOURCE=200112L
1717 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1720 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1723 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1725 linux*|gnu*|k*bsd*-gnu) #(vi
1727 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1728 echo "configure:1729: checking if we must define _GNU_SOURCE" >&5
1729 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1730 echo $ac_n "(cached) $ac_c" 1>&6
1733 cat > conftest.$ac_ext <<EOF
1734 #line 1735 "configure"
1735 #include "confdefs.h"
1736 #include <sys/types.h>
1739 #ifndef _XOPEN_SOURCE
1744 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1748 echo "configure: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1752 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1753 cat > conftest.$ac_ext <<EOF
1754 #line 1755 "configure"
1755 #include "confdefs.h"
1756 #include <sys/types.h>
1759 #ifdef _XOPEN_SOURCE
1764 if { (eval echo configure:1765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1771 cf_cv_gnu_source=yes
1781 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1782 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1786 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1789 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1792 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1795 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1798 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1801 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1804 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1807 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1808 echo "configure:1809: checking if we should define _XOPEN_SOURCE" >&5
1809 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1813 cat > conftest.$ac_ext <<EOF
1814 #line 1815 "configure"
1815 #include "confdefs.h"
1816 #include <sys/types.h>
1819 #ifndef _XOPEN_SOURCE
1824 if { (eval echo configure:1825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1826 cf_cv_xopen_source=no
1828 echo "configure: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1832 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1833 cat > conftest.$ac_ext <<EOF
1834 #line 1835 "configure"
1835 #include "confdefs.h"
1836 #include <sys/types.h>
1839 #ifdef _XOPEN_SOURCE
1844 if { (eval echo configure:1845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1846 cf_cv_xopen_source=no
1848 echo "configure: failed program was:" >&5
1849 cat conftest.$ac_ext >&5
1851 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1861 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1862 if test "$cf_cv_xopen_source" != no ; then
1864 # remove _XOPEN_SOURCE symbol from $CFLAGS
1865 CFLAGS=`echo "$CFLAGS" | \
1866 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1867 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1870 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1871 CPPFLAGS=`echo "$CPPFLAGS" | \
1872 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1873 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1875 test "$cf_cv_cc_u_d_options" = yes && \
1876 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1877 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1880 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1882 cf_save_CFLAGS="$CFLAGS"
1883 cf_save_CPPFLAGS="$CPPFLAGS"
1886 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1887 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1888 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1889 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1892 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1893 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1894 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1895 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1898 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1899 echo "configure:1900: checking if we should define _POSIX_C_SOURCE" >&5
1900 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1901 echo $ac_n "(cached) $ac_c" 1>&6
1905 echo "(line 1906) testing if the symbol is already defined go no further ..." 1>&5
1907 cat > conftest.$ac_ext <<EOF
1908 #line 1909 "configure"
1909 #include "confdefs.h"
1910 #include <sys/types.h>
1913 #ifndef _POSIX_C_SOURCE
1918 if { (eval echo configure:1919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1920 cf_cv_posix_c_source=no
1922 echo "configure: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1925 cf_want_posix_source=no
1926 case .$cf_POSIX_C_SOURCE in #(vi
1928 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1931 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1932 cf_want_posix_source=yes
1935 cf_want_posix_source=yes
1938 if test "$cf_want_posix_source" = yes ; then
1939 cat > conftest.$ac_ext <<EOF
1940 #line 1941 "configure"
1941 #include "confdefs.h"
1942 #include <sys/types.h>
1945 #ifdef _POSIX_SOURCE
1950 if { (eval echo configure:1951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1953 echo "configure: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1956 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1961 echo "(line 1962) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1963 CFLAGS="$cf_trim_CFLAGS"
1964 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1966 echo "(line 1967) testing if the second compile does not leave our definition intact error ..." 1>&5
1968 cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <sys/types.h>
1974 #ifndef _POSIX_C_SOURCE
1979 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1982 echo "configure: failed program was:" >&5
1983 cat conftest.$ac_ext >&5
1985 cf_cv_posix_c_source=no
1988 CFLAGS="$cf_save_CFLAGS"
1989 CPPFLAGS="$cf_save_CPPFLAGS"
1996 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
1998 if test "$cf_cv_posix_c_source" != no ; then
1999 CFLAGS="$cf_trim_CFLAGS"
2000 CPPFLAGS="$cf_trim_CPPFLAGS"
2001 if test "$cf_cv_cc_u_d_options" = yes ; then
2002 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2003 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2004 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2006 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2013 echo $ac_n "checking for working const""... $ac_c" 1>&6
2014 echo "configure:2015: checking for working const" >&5
2015 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2018 cat > conftest.$ac_ext <<EOF
2019 #line 2020 "configure"
2020 #include "confdefs.h"
2024 /* Ultrix mips cc rejects this. */
2025 typedef int charset[2]; const charset x;
2026 /* SunOS 4.1.1 cc rejects this. */
2027 char const *const *ccp;
2029 /* NEC SVR4.0.2 mips cc rejects this. */
2030 struct point {int x, y;};
2031 static struct point const zero = {0,0};
2032 /* AIX XL C 1.02.0.0 rejects this.
2033 It does not let you subtract one const X* pointer from another in an arm
2034 of an if-expression whose if-part is not a constant expression */
2035 const char *g = "string";
2036 ccp = &g + (g ? g-g : 0);
2037 /* HPUX 7.0 cc rejects these. */
2040 ccp = (char const *const *) p;
2041 { /* SCO 3.2v4 cc rejects this. */
2043 char const *s = 0 ? (char *) 0 : (char const *) 0;
2047 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2049 const int *foo = &x[0];
2052 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2053 typedef const int *iptr;
2057 { /* AIX XL C 1.02.0.0 rejects this saying
2058 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2059 struct s { int j; const int *ap[3]; };
2060 struct s *b; b->j = 5;
2062 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2068 if { (eval echo configure:2069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2080 echo "$ac_t""$ac_cv_c_const" 1>&6
2081 if test $ac_cv_c_const = no; then
2082 cat >> confdefs.h <<\EOF
2089 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2090 echo "configure:2091: checking for signal global datatype" >&5
2091 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2096 "volatile sig_atomic_t" \
2100 cat > conftest.$ac_ext <<EOF
2101 #line 2102 "configure"
2102 #include "confdefs.h"
2104 #include <sys/types.h>
2110 static void handler(int sig)
2115 signal(SIGINT, handler);
2119 if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2121 cf_cv_sig_atomic_t=$cf_type
2123 echo "configure: failed program was:" >&5
2124 cat conftest.$ac_ext >&5
2126 cf_cv_sig_atomic_t=no
2129 test "$cf_cv_sig_atomic_t" != no && break
2134 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2135 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2136 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2142 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2143 echo "configure:2144: checking if you want to see long compiling messages" >&5
2145 # Check whether --enable-echo or --disable-echo was given.
2146 if test "${enable_echo+set}" = set; then
2147 enableval="$enable_echo"
2148 test "$enableval" != no && enableval=yes
2149 if test "$enableval" != "yes" ; then
2152 ECHO_LD='@echo linking $@;'
2153 RULE_CC=' @echo compiling $<'
2154 SHOW_CC=' @echo compiling $@'
2161 RULE_CC='# compiling'
2162 SHOW_CC='# compiling'
2171 RULE_CC='# compiling'
2172 SHOW_CC='# compiling'
2178 echo "$ac_t""$enableval" 1>&6
2188 if test "$GCC" = yes ; then
2189 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2190 echo "configure:2191: checking version of $CC" >&5
2191 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2192 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2193 echo "$ac_t""$GCC_VERSION" 1>&6
2197 if ( test "$GCC" = yes || test "$GXX" = yes )
2199 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2200 echo "configure:2201: checking if you want to turn on gcc warnings" >&5
2202 # Check whether --enable-warnings or --disable-warnings was given.
2203 if test "${enable_warnings+set}" = set; then
2204 enableval="$enable_warnings"
2205 test "$enableval" != yes && enableval=no
2206 if test "$enableval" != "no" ; then
2217 echo "$ac_t""$with_warnings" 1>&6
2218 if test "$with_warnings" = "yes"
2225 if test "$GCC" = yes ; then
2228 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2229 echo "configure:2230: checking if this is really Intel C compiler" >&5
2230 cf_save_CFLAGS="$CFLAGS"
2231 CFLAGS="$CFLAGS -no-gcc"
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2238 #ifdef __INTEL_COMPILER
2245 if { (eval echo configure:2246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2248 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2255 CFLAGS="$cf_save_CFLAGS"
2256 echo "$ac_t""$INTEL_COMPILER" 1>&6
2262 cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2267 if test "$INTEL_COMPILER" = yes
2269 # The "-wdXXX" options suppress warnings:
2270 # remark #1419: external declaration in primary source file
2271 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2272 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2273 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2274 # remark #193: zero used for undefined preprocessing identifier
2275 # remark #593: variable "curs_sb_left_arrow" was set but never used
2276 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2277 # remark #869: parameter "tw" was never referenced
2278 # remark #981: operands are evaluated in unspecified order
2279 # warning #269: invalid format string conversion
2281 echo "checking for $CC warning options" 1>&6
2282 echo "configure:2283: checking for $CC warning options" >&5
2283 cf_save_CFLAGS="$CFLAGS"
2284 EXTRA_CFLAGS="-Wall"
2297 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2298 if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2299 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2300 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2303 CFLAGS="$cf_save_CFLAGS"
2305 elif test "$GCC" = yes
2307 echo "checking for $CC warning options" 1>&6
2308 echo "configure:2309: checking for $CC warning options" >&5
2309 cf_save_CFLAGS="$CFLAGS"
2310 EXTRA_CFLAGS="-W -Wall"
2312 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2314 Wbad-function-cast \
2318 Wmissing-declarations \
2319 Wmissing-prototypes \
2323 Wstrict-prototypes \
2324 Wundef $cf_warn_CONST
2326 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2327 if { (eval echo configure:2328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2328 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2329 case $cf_opt in #(vi
2331 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2334 case $GCC_VERSION in
2336 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2342 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2345 CFLAGS="$cf_save_CFLAGS"
2357 # Check whether --with-curses-dir or --without-curses-dir was given.
2358 if test "${with_curses_dir+set}" = set; then
2359 withval="$with_curses_dir"
2361 if test "x$prefix" != xNONE; then
2362 cf_path_syntax="$prefix"
2364 cf_path_syntax="$ac_default_prefix"
2367 case ".$withval" in #(vi
2368 .\$\(*\)*|.\'*\'*) #(vi
2372 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2375 eval withval="$withval"
2376 case ".$withval" in #(vi
2378 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2383 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2386 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2390 cf_cv_curses_dir=$withval
2398 # Check whether --with-5lib or --without-5lib was given.
2399 if test "${with_5lib+set}" = set; then
2400 withval="$with_5lib"
2401 LIBS="-L/usr/5lib $LIBS"
2402 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2407 # Check whether --with-ncursesw or --without-ncursesw was given.
2408 if test "${with_ncursesw+set}" = set; then
2409 withval="$with_ncursesw"
2410 cf_cv_screen=ncursesw
2415 # Check whether --with-ncurses or --without-ncurses was given.
2416 if test "${with_ncurses+set}" = set; then
2417 withval="$with_ncurses"
2418 cf_cv_screen=ncurses
2423 # Check whether --with-pdcurses or --without-pdcurses was given.
2424 if test "${with_pdcurses+set}" = set; then
2425 withval="$with_pdcurses"
2426 cf_cv_screen=pdcurses
2434 case $cf_cv_screen in
2438 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2439 echo "configure:2440: checking for extra include directories" >&5
2440 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2441 echo $ac_n "(cached) $ac_c" 1>&6
2444 cf_cv_curses_incdir=no
2445 case $host_os in #(vi
2447 test -d /usr/include/curses_colr && \
2448 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2451 test -d /usr/5lib && \
2452 test -d /usr/5include && \
2453 cf_cv_curses_incdir="-I/usr/5include"
2459 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2460 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2463 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2464 echo "configure:2465: checking if we have identified curses headers" >&5
2465 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2466 echo $ac_n "(cached) $ac_c" 1>&6
2469 cf_cv_ncurses_header=none
2476 cat > conftest.$ac_ext <<EOF
2477 #line 2478 "configure"
2478 #include "confdefs.h"
2479 #include <${cf_header}>
2481 initscr(); tgoto("?", 0,0)
2484 if { (eval echo configure:2485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2486 cf_cv_ncurses_header=$cf_header; break
2488 echo "configure: failed program was:" >&5
2489 cat conftest.$ac_ext >&5
2496 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2498 if test "$cf_cv_ncurses_header" = none ; then
2499 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2502 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2503 for ac_hdr in $cf_cv_ncurses_header
2505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2507 echo "configure:2508: checking for $ac_hdr" >&5
2508 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2509 echo $ac_n "(cached) $ac_c" 1>&6
2511 cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2517 { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2519 if test -z "$ac_err"; then
2521 eval "ac_cv_header_$ac_safe=yes"
2524 echo "configure: failed program was:" >&5
2525 cat conftest.$ac_ext >&5
2527 eval "ac_cv_header_$ac_safe=no"
2531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2532 echo "$ac_t""yes" 1>&6
2533 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2534 cat >> confdefs.h <<EOF
2535 #define $ac_tr_hdr 1
2539 echo "$ac_t""no" 1>&6
2545 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2546 echo "configure:2547: checking for terminfo header" >&5
2547 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2548 echo $ac_n "(cached) $ac_c" 1>&6
2551 case ${cf_cv_ncurses_header} in #(vi
2552 */ncurses.h|*/ncursesw.h) #(vi
2553 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2556 cf_term_header=term.h
2560 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2562 cat > conftest.$ac_ext <<EOF
2563 #line 2564 "configure"
2564 #include "confdefs.h"
2566 #include <${cf_cv_ncurses_header-curses.h}>
2570 int x = auto_left_margin
2573 if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2576 cf_cv_term_header="$cf_test"
2578 echo "configure: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
2582 cf_cv_term_header=unknown
2586 test "$cf_cv_term_header" != unknown && break
2591 echo "$ac_t""$cf_cv_term_header" 1>&6
2593 # Set definitions to allow ifdef'ing to accommodate subdirectories
2595 case $cf_cv_term_header in # (vi
2597 cat >> confdefs.h <<\EOF
2598 #define HAVE_TERM_H 1
2604 case $cf_cv_term_header in # (vi
2605 ncurses/term.h) #(vi
2606 cat >> confdefs.h <<\EOF
2607 #define HAVE_NCURSES_TERM_H 1
2612 cat >> confdefs.h <<\EOF
2613 #define HAVE_NCURSESW_TERM_H 1
2621 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2622 echo "configure:2623: checking for ncurses version" >&5
2623 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2624 echo $ac_n "(cached) $ac_c" 1>&6
2627 cf_cv_ncurses_version=no
2630 if test "$cross_compiling" = yes; then
2633 # This will not work if the preprocessor splits the line after the
2634 # Autoconf token. The 'unproto' program does that.
2635 cat > conftest.$ac_ext <<EOF
2636 #include <${cf_cv_ncurses_header-curses.h}>
2638 #ifdef NCURSES_VERSION
2639 Autoconf NCURSES_VERSION
2647 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2648 { (eval echo configure:2649: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2649 if test -f conftest.out ; then
2650 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2651 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2656 cat > conftest.$ac_ext <<EOF
2657 #line 2658 "configure"
2658 #include "confdefs.h"
2660 #include <${cf_cv_ncurses_header-curses.h}>
2664 FILE *fp = fopen("$cf_tempfile", "w");
2665 #ifdef NCURSES_VERSION
2666 # ifdef NCURSES_VERSION_PATCH
2667 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2669 fprintf(fp, "%s\n", NCURSES_VERSION);
2673 fprintf(fp, "old\n");
2678 ${cf_cv_main_return-return}(0);
2681 if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2684 cf_cv_ncurses_version=`cat $cf_tempfile`
2686 echo "configure: failed program was:" >&5
2687 cat conftest.$ac_ext >&5
2696 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2697 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2704 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2705 echo "configure:2706: checking if we have identified curses libraries" >&5
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #include <${cf_cv_ncurses_header-curses.h}>
2711 initscr(); tgoto("?", 0,0)
2714 if { (eval echo configure:2715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718 echo "configure: failed program was:" >&5
2719 cat conftest.$ac_ext >&5
2724 echo "$ac_t""$cf_result" 1>&6
2726 if test "$cf_result" = no ; then
2727 case $host_os in #(vi
2729 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2730 echo "configure:2731: checking for tgoto in -lmytinfo" >&5
2731 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2732 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2733 echo $ac_n "(cached) $ac_c" 1>&6
2735 ac_save_LIBS="$LIBS"
2736 LIBS="-lmytinfo $LIBS"
2737 cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740 /* Override any gcc2 internal prototype to avoid an error. */
2741 /* We use char because int might match the return type of a gcc2
2742 builtin and then its argument prototype would still apply. */
2749 if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2751 eval "ac_cv_lib_$ac_lib_var=yes"
2753 echo "configure: failed program was:" >&5
2754 cat conftest.$ac_ext >&5
2756 eval "ac_cv_lib_$ac_lib_var=no"
2759 LIBS="$ac_save_LIBS"
2762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2763 echo "$ac_t""yes" 1>&6
2764 LIBS="-lmytinfo $LIBS"
2766 echo "$ac_t""no" 1>&6
2771 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2772 echo "configure:2773: checking for initscr in -lcur_colr" >&5
2773 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2775 echo $ac_n "(cached) $ac_c" 1>&6
2777 ac_save_LIBS="$LIBS"
2778 LIBS="-lcur_colr $LIBS"
2779 cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 /* Override any gcc2 internal prototype to avoid an error. */
2783 /* We use char because int might match the return type of a gcc2
2784 builtin and then its argument prototype would still apply. */
2791 if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2793 eval "ac_cv_lib_$ac_lib_var=yes"
2795 echo "configure: failed program was:" >&5
2796 cat conftest.$ac_ext >&5
2798 eval "ac_cv_lib_$ac_lib_var=no"
2801 LIBS="$ac_save_LIBS"
2804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2805 echo "$ac_t""yes" 1>&6
2807 LIBS="-lcur_colr $LIBS"
2808 ac_cv_func_initscr=yes
2811 echo "$ac_t""no" 1>&6
2813 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2814 echo "configure:2815: checking for initscr in -lHcurses" >&5
2815 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2817 echo $ac_n "(cached) $ac_c" 1>&6
2819 ac_save_LIBS="$LIBS"
2820 LIBS="-lHcurses $LIBS"
2821 cat > conftest.$ac_ext <<EOF
2822 #line 2823 "configure"
2823 #include "confdefs.h"
2824 /* Override any gcc2 internal prototype to avoid an error. */
2825 /* We use char because int might match the return type of a gcc2
2826 builtin and then its argument prototype would still apply. */
2833 if { (eval echo configure:2834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2835 eval "ac_cv_lib_$ac_lib_var=yes"
2837 echo "configure: failed program was:" >&5
2838 cat conftest.$ac_ext >&5
2840 eval "ac_cv_lib_$ac_lib_var=no"
2843 LIBS="$ac_save_LIBS"
2846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2847 echo "$ac_t""yes" 1>&6
2849 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2850 LIBS="-lHcurses $LIBS"
2851 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2852 ac_cv_func_initscr=yes
2855 echo "$ac_t""no" 1>&6
2861 linux*) # Suse Linux does not follow /usr/lib convention
2865 test -d /usr/5lib && \
2866 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2867 ac_cv_func_initscr=yes
2871 if test ".$ac_cv_func_initscr" != .yes ; then
2872 cf_save_LIBS="$LIBS"
2876 if test ".${cf_cv_ncurses_version-no}" != .no
2878 cf_check_list="ncurses curses cursesX"
2880 cf_check_list="cursesX curses ncurses"
2883 # Check for library containing tgoto. Do this before curses library
2884 # because it may be needed to link the test-case for initscr.
2885 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2886 echo "configure:2887: checking for tgoto" >&5
2887 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 /* System header to define __stub macros and hopefully few prototypes,
2894 which can conflict with char tgoto(); below. */
2896 /* Override any gcc2 internal prototype to avoid an error. */
2897 /* We use char because int might match the return type of a gcc2
2898 builtin and then its argument prototype would still apply. */
2903 /* The GNU C library defines this for functions which it implements
2904 to always fail with ENOSYS. Some functions are actually named
2905 something starting with __ and the normal name is an alias. */
2906 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2914 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2916 eval "ac_cv_func_tgoto=yes"
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2921 eval "ac_cv_func_tgoto=no"
2926 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2927 echo "$ac_t""yes" 1>&6
2928 cf_term_lib=predefined
2930 echo "$ac_t""no" 1>&6
2932 for cf_term_lib in $cf_check_list termcap termlib unknown
2934 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2935 echo "configure:2936: checking for tgoto in -l$cf_term_lib" >&5
2936 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2938 echo $ac_n "(cached) $ac_c" 1>&6
2940 ac_save_LIBS="$LIBS"
2941 LIBS="-l$cf_term_lib $LIBS"
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945 /* Override any gcc2 internal prototype to avoid an error. */
2946 /* We use char because int might match the return type of a gcc2
2947 builtin and then its argument prototype would still apply. */
2954 if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956 eval "ac_cv_lib_$ac_lib_var=yes"
2958 echo "configure: failed program was:" >&5
2959 cat conftest.$ac_ext >&5
2961 eval "ac_cv_lib_$ac_lib_var=no"
2964 LIBS="$ac_save_LIBS"
2967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2968 echo "$ac_t""yes" 1>&6
2971 echo "$ac_t""no" 1>&6
2979 # Check for library containing initscr
2980 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2981 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2983 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2984 echo "configure:2985: checking for initscr in -l$cf_curs_lib" >&5
2985 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
2989 ac_save_LIBS="$LIBS"
2990 LIBS="-l$cf_curs_lib $LIBS"
2991 cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994 /* Override any gcc2 internal prototype to avoid an error. */
2995 /* We use char because int might match the return type of a gcc2
2996 builtin and then its argument prototype would still apply. */
3003 if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3005 eval "ac_cv_lib_$ac_lib_var=yes"
3007 echo "configure: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3010 eval "ac_cv_lib_$ac_lib_var=no"
3013 LIBS="$ac_save_LIBS"
3016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3017 echo "$ac_t""yes" 1>&6
3020 echo "$ac_t""no" 1>&6
3024 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3026 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3027 if test "$cf_term_lib" = unknown ; then
3028 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3029 echo "configure:3030: checking if we can link with $cf_curs_lib library" >&5
3030 cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033 #include <${cf_cv_ncurses_header-curses.h}>
3038 if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3042 echo "configure: failed program was:" >&5
3043 cat conftest.$ac_ext >&5
3048 echo "$ac_t""$cf_result" 1>&6
3049 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3050 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3052 elif test "$cf_term_lib" != predefined ; then
3053 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3054 echo "configure:3055: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3055 cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 #include <${cf_cv_ncurses_header-curses.h}>
3060 initscr(); tgoto((char *)0, 0, 0);
3063 if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067 echo "configure: failed program was:" >&5
3068 cat conftest.$ac_ext >&5
3071 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 #include <${cf_cv_ncurses_header-curses.h}>
3080 if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3084 echo "configure: failed program was:" >&5
3085 cat conftest.$ac_ext >&5
3093 echo "$ac_t""$cf_result" 1>&6
3103 cf_ncuhdr_root=ncurses
3105 test -n "$cf_cv_curses_dir" && \
3106 test "$cf_cv_curses_dir" != "no" && \
3107 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3109 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3110 echo "configure:3111: checking for $cf_ncuhdr_root header in include-path" >&5
3111 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3112 echo $ac_n "(cached) $ac_c" 1>&6
3115 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3116 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3117 for cf_header in $cf_header_list
3120 cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3125 #include <$cf_header>
3128 #ifdef NCURSES_VERSION
3130 printf("%s\n", NCURSES_VERSION);
3142 if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3144 cf_cv_ncurses_h=$cf_header
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3154 test "$cf_cv_ncurses_h" != no && break
3159 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3163 if test "$cf_cv_ncurses_h" != no ; then
3164 cf_cv_ncurses_header=$cf_cv_ncurses_h
3167 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3168 echo "configure:3169: checking for $cf_ncuhdr_root include-path" >&5
3169 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3170 echo $ac_n "(cached) $ac_c" 1>&6
3173 test -n "$verbose" && echo
3176 test -d "$HOME" && {
3177 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3178 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3179 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3180 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3183 # For other stuff under the home directory, it should be sufficient to put
3184 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3185 test -d "$HOME/$cf_ncuhdr_root" && {
3186 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3187 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3188 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3191 test "$prefix" != /usr/local && \
3192 test -d /usr/local && {
3193 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3194 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3195 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3196 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3197 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3198 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3201 test "$prefix" != NONE && \
3202 test -d $prefix && {
3203 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3204 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3205 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3206 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3207 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3208 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3211 test "$prefix" != /opt && \
3213 test -n "$verbose" && echo " ... testing include-directories under /opt"
3214 test -d /opt/include && cf_search="$cf_search /opt/include"
3215 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3216 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3217 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3218 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3221 test "$prefix" != /usr && \
3223 test -n "$verbose" && echo " ... testing include-directories under /usr"
3224 test -d /usr/include && cf_search="$cf_search /usr/include"
3225 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3226 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3227 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3230 test "$includedir" != NONE && \
3231 test "$includedir" != "/usr/include" && \
3232 test -d "$includedir" && {
3233 test -d $includedir && cf_search="$cf_search $includedir"
3234 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3237 test "$oldincludedir" != NONE && \
3238 test "$oldincludedir" != "/usr/include" && \
3239 test -d "$oldincludedir" && {
3240 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3241 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3245 test -n "$verbose" && echo search path $cf_search
3246 cf_save2_CPPFLAGS="$CPPFLAGS"
3247 for cf_incdir in $cf_search
3250 for cf_add_incdir in $cf_incdir
3254 case $cf_add_incdir in
3257 /usr/local/include) # (vi
3258 if test "$GCC" = yes
3260 cf_save_CPPFLAGS="$CPPFLAGS"
3261 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3262 cat > conftest.$ac_ext <<EOF
3263 #line 3264 "configure"
3264 #include "confdefs.h"
3270 if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3273 echo "configure: failed program was:" >&5
3274 cat conftest.$ac_ext >&5
3276 CPPFLAGS="$cf_save_CPPFLAGS"
3282 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3285 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3286 test "$cf_top_incdir" = "$cf_add_incdir" && break
3287 cf_add_incdir="$cf_top_incdir"
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3301 #include <$cf_header>
3304 #ifdef NCURSES_VERSION
3306 printf("%s\n", NCURSES_VERSION);
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3320 cf_cv_ncurses_h2=$cf_header
3323 echo "configure: failed program was:" >&5
3324 cat conftest.$ac_ext >&5
3330 if test "$cf_cv_ncurses_h2" != no ; then
3331 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3332 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3335 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3337 CPPFLAGS="$cf_save2_CPPFLAGS"
3338 test "$cf_cv_ncurses_h2" != no && break
3340 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3344 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3346 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3347 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3348 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3349 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3352 for cf_add_incdir in $cf_1st_incdir
3356 case $cf_add_incdir in
3359 /usr/local/include) # (vi
3360 if test "$GCC" = yes
3362 cf_save_CPPFLAGS="$CPPFLAGS"
3363 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3364 cat > conftest.$ac_ext <<EOF
3365 #line 3366 "configure"
3366 #include "confdefs.h"
3372 if { (eval echo configure:3373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3375 echo "configure: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3378 CPPFLAGS="$cf_save_CPPFLAGS"
3384 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3387 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3388 test "$cf_top_incdir" = "$cf_add_incdir" && break
3389 cf_add_incdir="$cf_top_incdir"
3396 # Set definitions to allow ifdef'ing for ncurses.h
3398 case $cf_cv_ncurses_header in # (vi
3400 cat >> confdefs.h <<\EOF
3401 #define HAVE_NCURSES_H 1
3407 case $cf_cv_ncurses_header in # (vi
3408 ncurses/curses.h|ncurses/ncurses.h)
3409 cat >> confdefs.h <<\EOF
3410 #define HAVE_NCURSES_NCURSES_H 1
3414 ncursesw/curses.h|ncursesw/ncurses.h)
3415 cat >> confdefs.h <<\EOF
3416 #define HAVE_NCURSESW_NCURSES_H 1
3424 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3425 echo "configure:3426: checking for terminfo header" >&5
3426 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3427 echo $ac_n "(cached) $ac_c" 1>&6
3430 case ${cf_cv_ncurses_header} in #(vi
3431 */ncurses.h|*/ncursesw.h) #(vi
3432 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3435 cf_term_header=term.h
3439 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3441 cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3445 #include <${cf_cv_ncurses_header-curses.h}>
3449 int x = auto_left_margin
3452 if { (eval echo configure:3453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3455 cf_cv_term_header="$cf_test"
3457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3461 cf_cv_term_header=unknown
3465 test "$cf_cv_term_header" != unknown && break
3470 echo "$ac_t""$cf_cv_term_header" 1>&6
3472 # Set definitions to allow ifdef'ing to accommodate subdirectories
3474 case $cf_cv_term_header in # (vi
3476 cat >> confdefs.h <<\EOF
3477 #define HAVE_TERM_H 1
3483 case $cf_cv_term_header in # (vi
3484 ncurses/term.h) #(vi
3485 cat >> confdefs.h <<\EOF
3486 #define HAVE_NCURSES_TERM_H 1
3491 cat >> confdefs.h <<\EOF
3492 #define HAVE_NCURSESW_TERM_H 1
3499 # some applications need this, but should check for NCURSES_VERSION
3500 cat >> confdefs.h <<\EOF
3506 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3507 echo "configure:3508: checking for ncurses version" >&5
3508 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3509 echo $ac_n "(cached) $ac_c" 1>&6
3512 cf_cv_ncurses_version=no
3515 if test "$cross_compiling" = yes; then
3518 # This will not work if the preprocessor splits the line after the
3519 # Autoconf token. The 'unproto' program does that.
3520 cat > conftest.$ac_ext <<EOF
3521 #include <${cf_cv_ncurses_header-curses.h}>
3523 #ifdef NCURSES_VERSION
3524 Autoconf NCURSES_VERSION
3532 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3533 { (eval echo configure:3534: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3534 if test -f conftest.out ; then
3535 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3536 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3545 #include <${cf_cv_ncurses_header-curses.h}>
3549 FILE *fp = fopen("$cf_tempfile", "w");
3550 #ifdef NCURSES_VERSION
3551 # ifdef NCURSES_VERSION_PATCH
3552 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3554 fprintf(fp, "%s\n", NCURSES_VERSION);
3558 fprintf(fp, "old\n");
3563 ${cf_cv_main_return-return}(0);
3566 if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3569 cf_cv_ncurses_version=`cat $cf_tempfile`
3571 echo "configure: failed program was:" >&5
3572 cat conftest.$ac_ext >&5
3581 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3582 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3590 cf_nculib_root=ncurses
3591 # This works, except for the special case where we find gpm, but
3592 # ncurses is in a nonstandard location via $LIBS, and we really want
3595 cf_ncurses_SAVE="$LIBS"
3596 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3597 echo "configure:3598: checking for Gpm_Open in -lgpm" >&5
3598 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3599 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3600 echo $ac_n "(cached) $ac_c" 1>&6
3602 ac_save_LIBS="$LIBS"
3604 cat > conftest.$ac_ext <<EOF
3605 #line 3606 "configure"
3606 #include "confdefs.h"
3607 /* Override any gcc2 internal prototype to avoid an error. */
3608 /* We use char because int might match the return type of a gcc2
3609 builtin and then its argument prototype would still apply. */
3616 if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618 eval "ac_cv_lib_$ac_lib_var=yes"
3620 echo "configure: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
3623 eval "ac_cv_lib_$ac_lib_var=no"
3626 LIBS="$ac_save_LIBS"
3629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3630 echo "$ac_t""yes" 1>&6
3631 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3632 echo "configure:3633: checking for initscr in -lgpm" >&5
3633 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3635 echo $ac_n "(cached) $ac_c" 1>&6
3637 ac_save_LIBS="$LIBS"
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 /* Override any gcc2 internal prototype to avoid an error. */
3643 /* We use char because int might match the return type of a gcc2
3644 builtin and then its argument prototype would still apply. */
3651 if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3653 eval "ac_cv_lib_$ac_lib_var=yes"
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3658 eval "ac_cv_lib_$ac_lib_var=no"
3661 LIBS="$ac_save_LIBS"
3664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3665 echo "$ac_t""yes" 1>&6
3666 LIBS="$cf_ncurses_SAVE"
3668 echo "$ac_t""no" 1>&6
3669 cf_ncurses_LIBS="-lgpm"
3673 echo "$ac_t""no" 1>&6
3677 case $host_os in #(vi
3679 # This is only necessary if you are linking against an obsolete
3680 # version of ncurses (but it should do no harm, since it's static).
3681 if test "$cf_nculib_root" = ncurses ; then
3682 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3683 echo "configure:3684: checking for tgoto in -lmytinfo" >&5
3684 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
3688 ac_save_LIBS="$LIBS"
3689 LIBS="-lmytinfo $LIBS"
3690 cat > conftest.$ac_ext <<EOF
3691 #line 3692 "configure"
3692 #include "confdefs.h"
3693 /* Override any gcc2 internal prototype to avoid an error. */
3694 /* We use char because int might match the return type of a gcc2
3695 builtin and then its argument prototype would still apply. */
3702 if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3704 eval "ac_cv_lib_$ac_lib_var=yes"
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3709 eval "ac_cv_lib_$ac_lib_var=no"
3712 LIBS="$ac_save_LIBS"
3715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3716 echo "$ac_t""yes" 1>&6
3717 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3719 echo "$ac_t""no" 1>&6
3726 LIBS="$cf_ncurses_LIBS $LIBS"
3728 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3730 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3733 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3735 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3736 echo "configure:3737: checking for initscr" >&5
3737 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3738 echo $ac_n "(cached) $ac_c" 1>&6
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 /* System header to define __stub macros and hopefully few prototypes,
3744 which can conflict with char initscr(); below. */
3746 /* Override any gcc2 internal prototype to avoid an error. */
3747 /* We use char because int might match the return type of a gcc2
3748 builtin and then its argument prototype would still apply. */
3753 /* The GNU C library defines this for functions which it implements
3754 to always fail with ENOSYS. Some functions are actually named
3755 something starting with __ and the normal name is an alias. */
3756 #if defined (__stub_initscr) || defined (__stub___initscr)
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3766 eval "ac_cv_func_initscr=yes"
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3771 eval "ac_cv_func_initscr=no"
3776 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3777 echo "$ac_t""yes" 1>&6
3778 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3780 echo "$ac_t""no" 1>&6
3782 cf_save_LIBS="$LIBS"
3783 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3784 echo "configure:3785: checking for initscr in -l$cf_nculib_root" >&5
3785 LIBS="-l$cf_nculib_root $LIBS"
3786 cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789 #include <${cf_cv_ncurses_header-curses.h}>
3794 if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3796 echo "$ac_t""yes" 1>&6
3797 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3800 echo "configure: failed program was:" >&5
3801 cat conftest.$ac_ext >&5
3803 echo "$ac_t""no" 1>&6
3806 test -d "$HOME" && {
3807 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3808 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
3809 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3810 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3813 # For other stuff under the home directory, it should be sufficient to put
3814 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3815 test -d "$HOME/$cf_nculib_root" && {
3816 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3817 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3818 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3821 test "$prefix" != /usr/local && \
3822 test -d /usr/local && {
3823 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3824 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3825 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3826 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3827 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3828 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3831 test "$prefix" != NONE && \
3832 test -d $prefix && {
3833 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3834 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3835 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3836 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3837 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3838 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3841 test "$prefix" != /opt && \
3843 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3844 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3845 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3846 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3847 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3848 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3851 test "$prefix" != /usr && \
3853 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3854 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3855 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3856 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3857 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3860 for cf_libdir in $cf_search
3862 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3863 echo "configure:3864: checking for -l$cf_nculib_root in $cf_libdir" >&5
3864 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3865 cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868 #include <${cf_cv_ncurses_header-curses.h}>
3873 if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875 echo "$ac_t""yes" 1>&6
3876 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3879 echo "configure: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
3882 echo "$ac_t""no" 1>&6
3883 LIBS="$cf_save_LIBS"
3893 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3895 if test $cf_found_library = no ; then
3896 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3902 if test -n "$cf_ncurses_LIBS" ; then
3903 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3904 echo "configure:3905: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3905 cf_ncurses_SAVE="$LIBS"
3906 for p in $cf_ncurses_LIBS ; do
3907 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3908 if test "$q" != "$LIBS" ; then
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 #include <${cf_cv_ncurses_header-curses.h}>
3917 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3920 if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3922 echo "$ac_t""yes" 1>&6
3924 echo "configure: failed program was:" >&5
3925 cat conftest.$ac_ext >&5
3927 echo "$ac_t""no" 1>&6
3928 LIBS="$cf_ncurses_SAVE"
3934 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3936 cat >> confdefs.h <<EOF
3937 #define $cf_nculib_ROOT 1