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
197 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
201 -host | --host | --hos | --ho)
203 -host=* | --host=* | --hos=* | --ho=*)
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
218 -libdir | --libdir | --libdi | --libd)
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
245 # Obsolete; use --without-fp.
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 sbindir="$ac_optarg" ;;
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 sharedstatedir="$ac_optarg" ;;
322 -site | --site | --sit)
324 -site=* | --site=* | --sit=*)
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
339 -target | --target | --targe | --targ | --tar | --ta | --t)
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 -version | --version | --versio | --versi | --vers)
348 echo "configure generated by autoconf version 2.13.20030927"
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}='$ac_optarg'" ;;
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
374 # Obsolete; use --with-x.
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407 if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413 # File descriptor usage:
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450 # Only set these to C if already set. These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=ncurses.c
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476 if test ! -r $srcdir/$ac_unique_file; then
480 ac_srcdir_defaulted=no
482 if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
506 if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
510 echo "creating cache $cache_file"
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532 ac_n= ac_c='\c' ac_t=
535 # If we find X, set shell vars x_includes and x_libraries to the
536 # paths, otherwise set no_x=yes.
537 # Uses ac_ vars as temps to allow command line to override cache and checks.
538 # --without-x overrides everything else, but does not touch the cache.
539 echo $ac_n "checking for X""... $ac_c" 1>&6
540 echo "configure:541: checking for X" >&5
543 # Check whether --with-x or --without-x was given.
544 if test "${with_x+set}" = set; then
549 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
550 if test "x$with_x" = xno; then
551 # The user explicitly disabled X.
554 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
555 # Both variables are already set.
558 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
561 # One or both of the vars are not set, and there is no cached value.
562 ac_x_includes=NO ac_x_libraries=NO
564 if mkdir conftestdir; then
566 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
567 cat > Imakefile <<'EOF'
569 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
571 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
572 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
573 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
574 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
575 for ac_extension in a so sl; do
576 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
577 test -f $ac_im_libdir/libX11.$ac_extension; then
578 ac_im_usrlibdir=$ac_im_libdir; break
581 # Screen out bogus values from the imake configuration. They are
582 # bogus both because they are the default anyway, and because
583 # using them would break gcc on systems where it needs fixed includes.
584 case "$ac_im_incroot" in
586 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
588 case "$ac_im_usrlibdir" in
590 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
597 if test "$ac_x_includes" = NO; then
598 # Guess where to find include files, by looking for this one X11 .h file.
599 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
601 # First, try using that file with no special directory specified.
602 cat > conftest.$ac_ext <<EOF
603 #line 604 "configure"
604 #include "confdefs.h"
605 #include <$x_direct_test_include>
607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
608 { (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
610 if test -z "$ac_err"; then
612 # We can compile using X headers with no special include directory.
616 echo "configure: failed program was:" >&5
617 cat conftest.$ac_ext >&5
619 # Look for the header file in a standard set of common directories.
620 # Check X11 before X11Rn because it is often a symlink to the current release.
632 /usr/local/X11/include \
633 /usr/local/X11R6/include \
634 /usr/local/X11R5/include \
635 /usr/local/X11R4/include \
637 /usr/local/include/X11 \
638 /usr/local/include/X11R6 \
639 /usr/local/include/X11R5 \
640 /usr/local/include/X11R4 \
644 /usr/XFree86/include/X11 \
648 /usr/unsupported/include \
649 /usr/athena/include \
650 /usr/local/x11r5/include \
651 /usr/lpp/Xamples/include \
653 /usr/openwin/include \
654 /usr/openwin/share/include \
657 if test -r "$ac_dir/$x_direct_test_include"; then
658 ac_x_includes=$ac_dir
664 fi # $ac_x_includes = NO
666 if test "$ac_x_libraries" = NO; then
667 # Check for the libraries.
669 test -z "$x_direct_test_library" && x_direct_test_library=Xt
670 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
672 # See if we find them without any special options.
673 # Don't add to $LIBS permanently.
675 LIBS="-l$x_direct_test_library $LIBS"
676 cat > conftest.$ac_ext <<EOF
677 #line 678 "configure"
678 #include "confdefs.h"
681 ${x_direct_test_function}()
684 if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687 # We can link X programs with no special library path.
690 echo "configure: failed program was:" >&5
691 cat conftest.$ac_ext >&5
694 # First see if replacing the include by lib works.
695 # Check X11 before X11Rn because it is often a symlink to the current release.
696 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
708 /usr/local/X11R6/lib \
709 /usr/local/X11R5/lib \
710 /usr/local/X11R4/lib \
713 /usr/local/lib/X11R6 \
714 /usr/local/lib/X11R5 \
715 /usr/local/lib/X11R4 \
719 /usr/XFree86/lib/X11 \
723 /usr/unsupported/lib \
725 /usr/local/x11r5/lib \
726 /usr/lpp/Xamples/lib \
730 /usr/openwin/share/lib \
733 for ac_extension in a so sl; do
734 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
735 ac_x_libraries=$ac_dir
742 fi # $ac_x_libraries = NO
744 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
745 # Didn't find X anywhere. Cache the known absence of X.
746 ac_cv_have_x="have_x=no"
748 # Record where we found X for the cache.
749 ac_cv_have_x="have_x=yes \
750 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
757 if test "$have_x" != yes; then
758 echo "$ac_t""$have_x" 1>&6
761 # If each of the values was on the command line, it overrides each guess.
762 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
763 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
764 # Update the cache value to reflect the command line values.
765 ac_cv_have_x="have_x=yes \
766 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
767 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
774 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
777 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
780 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
781 if test -f $ac_dir/install-sh; then
783 ac_install_sh="$ac_aux_dir/install-sh -c"
785 elif test -f $ac_dir/install.sh; then
787 ac_install_sh="$ac_aux_dir/install.sh -c"
791 if test -z "$ac_aux_dir"; then
792 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
794 ac_config_guess=$ac_aux_dir/config.guess
795 ac_config_sub=$ac_aux_dir/config.sub
796 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
799 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
801 # Make sure we can run config.sub.
802 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
803 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
806 echo $ac_n "checking host system type""... $ac_c" 1>&6
807 echo "configure:808: checking host system type" >&5
810 case "$host_alias" in
814 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
815 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
817 *) host_alias=$nonopt ;;
821 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
822 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
823 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
824 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
825 echo "$ac_t""$host" 1>&6
827 system_name="$host_os"
829 system_name="`(uname -s -r) 2>/dev/null`"
830 if test -z "$system_name" ; then
831 system_name="`(hostname) 2>/dev/null`"
834 test -n "$system_name" && cat >> confdefs.h <<EOF
835 #define SYSTEM_NAME "$system_name"
838 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
841 cf_cv_system_name="$system_name"
845 test -z "$system_name" && system_name="$cf_cv_system_name"
846 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
848 if test ".$system_name" != ".$cf_cv_system_name" ; then
849 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
850 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
854 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
855 echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
856 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
857 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
858 echo $ac_n "(cached) $ac_c" 1>&6
860 cat > conftestmake <<\EOF
862 @echo 'ac_maketemp="${MAKE}"'
864 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
865 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
866 if test -n "$ac_maketemp"; then
867 eval ac_cv_prog_make_${ac_make}_set=yes
869 eval ac_cv_prog_make_${ac_make}_set=no
873 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
874 echo "$ac_t""yes" 1>&6
877 echo "$ac_t""no" 1>&6
878 SET_MAKE="MAKE=${MAKE-make}"
881 # Extract the first word of "gcc", so it can be a program name with args.
882 set dummy gcc; ac_word=$2
883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
884 echo "configure:885: checking for $ac_word" >&5
885 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
893 for ac_dir in $ac_dummy; do
894 test -z "$ac_dir" && ac_dir=.
895 if test -f $ac_dir/$ac_word; then
904 if test -n "$CC"; then
905 echo "$ac_t""$CC" 1>&6
907 echo "$ac_t""no" 1>&6
910 if test -z "$CC"; then
911 # Extract the first word of "cc", so it can be a program name with args.
912 set dummy cc; ac_word=$2
913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
914 echo "configure:915: checking for $ac_word" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
918 if test -n "$CC"; then
919 ac_cv_prog_CC="$CC" # Let the user override the test.
921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
924 for ac_dir in $ac_dummy; do
925 test -z "$ac_dir" && ac_dir=.
926 if test -f $ac_dir/$ac_word; then
927 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
936 if test $ac_prog_rejected = yes; then
937 # We found a bogon in the path, so make sure we never use it.
938 set dummy $ac_cv_prog_CC
940 if test $# -gt 0; then
941 # We chose a different compiler from the bogus one.
942 # However, it has the same basename, so the bogon will be chosen
943 # first if we set CC to just the basename; use the full file name.
945 set dummy "$ac_dir/$ac_word" "$@"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
956 echo "$ac_t""no" 1>&6
959 if test -z "$CC"; then
962 # Extract the first word of "cl", so it can be a program name with args.
963 set dummy cl; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
969 if test -n "$CC"; then
970 ac_cv_prog_CC="$CC" # Let the user override the test.
972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
974 for ac_dir in $ac_dummy; do
975 test -z "$ac_dir" && ac_dir=.
976 if test -f $ac_dir/$ac_word; then
985 if test -n "$CC"; then
986 echo "$ac_t""$CC" 1>&6
988 echo "$ac_t""no" 1>&6
993 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
997 echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1000 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001 ac_cpp='$CPP $CPPFLAGS'
1002 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1003 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1004 cross_compiling=$ac_cv_prog_cc_cross
1006 cat > conftest.$ac_ext << EOF
1008 #line 1009 "configure"
1009 #include "confdefs.h"
1013 if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1014 ac_cv_prog_cc_works=yes
1015 # If we can't run a trivial program, we are probably using a cross compiler.
1016 if (./conftest; exit) 2>/dev/null; then
1017 ac_cv_prog_cc_cross=no
1019 ac_cv_prog_cc_cross=yes
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024 ac_cv_prog_cc_works=no
1028 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029 ac_cpp='$CPP $CPPFLAGS'
1030 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032 cross_compiling=$ac_cv_prog_cc_cross
1034 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1035 if test $ac_cv_prog_cc_works = no; then
1036 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1038 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1040 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1041 cross_compiling=$ac_cv_prog_cc_cross
1043 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether we are using GNU C" >&5
1045 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1046 echo $ac_n "(cached) $ac_c" 1>&6
1048 cat > conftest.c <<EOF
1053 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1060 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1062 if test $ac_cv_prog_gcc = yes; then
1068 ac_test_CFLAGS="${CFLAGS+set}"
1069 ac_save_CFLAGS="$CFLAGS"
1071 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1072 echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1076 echo 'void f(){}' > conftest.c
1077 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1086 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1087 if test "$ac_test_CFLAGS" = set; then
1088 CFLAGS="$ac_save_CFLAGS"
1089 elif test $ac_cv_prog_cc_g = yes; then
1090 if test "$GCC" = yes; then
1096 if test "$GCC" = yes; then
1103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1104 echo "configure:1105: checking how to run the C preprocessor" >&5
1105 # On Suns, sometimes $CPP names a directory.
1106 if test -n "$CPP" && test -d "$CPP"; then
1109 if test -z "$CPP"; then
1110 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 # This must be in double quotes, not single quotes, because CPP may get
1114 # substituted into the Makefile and "${CC-cc}" will confuse make.
1116 # On the NeXT, cc -E runs the code through the compiler's parser,
1117 # not just through cpp.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1134 CPP="${CC-cc} -E -traditional-cpp"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142 { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144 if test -z "$ac_err"; then
1148 echo "configure: failed program was:" >&5
1149 cat conftest.$ac_ext >&5
1151 CPP="${CC-cc} -nologo -E"
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1159 { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1161 if test -z "$ac_err"; then
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1175 ac_cv_prog_CPP="$CPP"
1177 CPP="$ac_cv_prog_CPP"
1179 ac_cv_prog_CPP="$CPP"
1181 echo "$ac_t""$CPP" 1>&6
1183 for ac_prog in mawk gawk nawk awk
1185 # Extract the first word of "$ac_prog", so it can be a program name with args.
1186 set dummy $ac_prog; ac_word=$2
1187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1188 echo "configure:1189: checking for $ac_word" >&5
1189 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1192 if test -n "$AWK"; then
1193 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1197 for ac_dir in $ac_dummy; do
1198 test -z "$ac_dir" && ac_dir=.
1199 if test -f $ac_dir/$ac_word; then
1200 ac_cv_prog_AWK="$ac_prog"
1207 AWK="$ac_cv_prog_AWK"
1208 if test -n "$AWK"; then
1209 echo "$ac_t""$AWK" 1>&6
1211 echo "$ac_t""no" 1>&6
1214 test -n "$AWK" && break
1219 CC_SHARED_OPTS=unknown
1220 CPPFLAGS="$CPPFLAGS"
1222 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1223 DFT_UPR_MODEL="NORMAL"
1242 TINFO_ARGS='$(LIBS_CURSES)'
1243 cf_cv_abi_version=""
1244 cf_cv_rel_version=""
1249 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1250 echo "configure:1251: checking for Cygwin environment" >&5
1251 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1261 #define __CYGWIN__ __CYGWIN32__
1266 if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1270 echo "configure: failed program was:" >&5
1271 cat conftest.$ac_ext >&5
1279 echo "$ac_t""$ac_cv_cygwin" 1>&6
1281 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1282 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1283 echo "configure:1284: checking for mingw32 environment" >&5
1284 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1285 echo $ac_n "(cached) $ac_c" 1>&6
1287 cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1295 if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1308 echo "$ac_t""$ac_cv_mingw32" 1>&6
1310 test "$ac_cv_mingw32" = yes && MINGW32=yes
1313 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1314 echo "configure:1315: checking for executable suffix" >&5
1315 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1316 echo $ac_n "(cached) $ac_c" 1>&6
1318 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1322 echo 'int main () { return 0; }' > conftest.$ac_ext
1324 if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1325 for file in conftest.*; do
1327 *.c | *.o | *.obj) ;;
1328 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1332 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1335 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1340 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1341 echo "$ac_t""${ac_cv_exeext}" 1>&6
1344 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1345 echo "configure:1346: checking for object suffix" >&5
1346 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1350 echo 'int i = 1;' > conftest.$ac_ext
1351 if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1352 for ac_file in conftest.*; do
1355 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1359 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1364 echo "$ac_t""$ac_cv_objext" 1>&6
1365 OBJEXT=$ac_cv_objext
1366 ac_objext=$ac_cv_objext
1370 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1371 echo "configure:1372: checking for ${CC-cc} option to accept ANSI C" >&5
1372 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1373 echo $ac_n "(cached) $ac_c" 1>&6
1377 cf_save_CFLAGS="$CFLAGS"
1378 cf_save_CPPFLAGS="$CPPFLAGS"
1379 # Don't try gcc -ansi; that turns off useful extensions and
1380 # breaks some systems' header files.
1381 # AIX -qlanglvl=ansi
1382 # Ultrix and OSF/1 -std1
1383 # HP-UX -Aa -D_HPUX_SOURCE
1385 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1386 for cf_arg in "-DCC_HAS_PROTOS" \
1391 "-Aa -D_HPUX_SOURCE" \
1398 cf_new_extra_cppflags=
1400 for cf_add_cflags in $cf_arg
1402 case $cf_fix_cppflags in
1404 case $cf_add_cflags in #(vi
1405 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1406 case $cf_add_cflags in
1408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1410 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1411 && test -z "${cf_tst_cflags}" \
1412 && cf_fix_cppflags=yes
1414 if test $cf_fix_cppflags = yes ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1417 elif test "${cf_tst_cflags}" = "\"'" ; then
1418 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1424 *$cf_add_cflags) #(vi
1427 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1432 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1439 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1441 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1442 && test -z "${cf_tst_cflags}" \
1443 && cf_fix_cppflags=no
1448 if test -n "$cf_new_cflags" ; then
1450 CFLAGS="$CFLAGS $cf_new_cflags"
1453 if test -n "$cf_new_cppflags" ; then
1455 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1458 if test -n "$cf_new_extra_cppflags" ; then
1460 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1470 #ifndef CC_HAS_PROTOS
1471 #if !defined(__STDC__) || (__STDC__ != 1)
1478 int test (int i, double x);
1479 struct s1 {int (*f) (int a);};
1480 struct s2 {int (*f) (double a);};
1483 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485 cf_cv_ansi_cc="$cf_arg"; break
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1492 CFLAGS="$cf_save_CFLAGS"
1493 CPPFLAGS="$cf_save_CPPFLAGS"
1497 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1499 if test "$cf_cv_ansi_cc" != "no"; then
1500 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1505 cf_new_extra_cppflags=
1507 for cf_add_cflags in $cf_cv_ansi_cc
1509 case $cf_fix_cppflags in
1511 case $cf_add_cflags in #(vi
1512 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1513 case $cf_add_cflags in
1515 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1517 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1518 && test -z "${cf_tst_cflags}" \
1519 && cf_fix_cppflags=yes
1521 if test $cf_fix_cppflags = yes ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1524 elif test "${cf_tst_cflags}" = "\"'" ; then
1525 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1531 *$cf_add_cflags) #(vi
1534 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1539 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1544 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1546 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1548 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1549 && test -z "${cf_tst_cflags}" \
1550 && cf_fix_cppflags=no
1555 if test -n "$cf_new_cflags" ; then
1557 CFLAGS="$CFLAGS $cf_new_cflags"
1560 if test -n "$cf_new_cppflags" ; then
1562 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1565 if test -n "$cf_new_extra_cppflags" ; then
1567 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1574 cat >> confdefs.h <<\EOF
1575 #define CC_HAS_PROTOS 1
1582 if test "$cf_cv_ansi_cc" = "no"; then
1583 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1584 You have the following choices:
1585 a. adjust your compiler options
1586 b. get an up-to-date compiler
1587 c. use a wrapper such as unproto" 1>&2; exit 1; }
1591 if test "$GCC" = yes
1593 cat > conftest.i <<EOF
1595 #define GCC_PRINTF 0
1600 #ifndef GCC_NORETURN
1601 #define GCC_NORETURN /* nothing */
1604 #define GCC_UNUSED /* nothing */
1607 if test "$GCC" = yes
1609 echo "checking for $CC __attribute__ directives" 1>&6
1610 echo "configure:1611: checking for $CC __attribute__ directives" >&5
1611 cat > conftest.$ac_ext <<EOF
1612 #line 1613 "${as_me-configure}"
1613 #include "confdefs.h"
1614 #include "conftest.h"
1615 #include "conftest.i"
1617 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1619 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1622 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1624 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1626 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1627 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1628 extern void foo(void) GCC_NORETURN;
1629 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1631 for cf_attribute in scanf printf unused noreturn
1634 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1636 cf_directive="__attribute__(($cf_attribute))"
1637 echo "checking for $CC $cf_directive" 1>&5
1638 case $cf_attribute in
1640 cat >conftest.h <<EOF
1641 #define GCC_$cf_ATTRIBUTE 1
1645 cat >conftest.h <<EOF
1646 #define GCC_$cf_ATTRIBUTE $cf_directive
1650 if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1651 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1652 cat conftest.h >>confdefs.h
1656 fgrep define conftest.i >>confdefs.h
1662 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1663 echo "configure:1664: checking if $CC -U and -D options work together" >&5
1664 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1668 cf_save_CPPFLAGS="$CPPFLAGS"
1669 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1677 make an undefined-error
1680 make a defined-error
1685 if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1688 cf_cv_cc_u_d_options=yes
1690 echo "configure: failed program was:" >&5
1691 cat conftest.$ac_ext >&5
1694 cf_cv_cc_u_d_options=no
1697 CPPFLAGS="$cf_save_CPPFLAGS"
1701 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1708 cf_POSIX_C_SOURCE=199506L
1710 case $host_os in #(vi
1712 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1714 freebsd*|dragonfly*) #(vi
1715 # 5.x headers associate
1716 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1717 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1718 cf_POSIX_C_SOURCE=200112L
1720 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1723 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1726 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1728 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1730 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1731 echo "configure:1732: checking if we must define _GNU_SOURCE" >&5
1732 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739 #include <sys/types.h>
1742 #ifndef _XOPEN_SOURCE
1747 if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1755 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1762 #ifdef _XOPEN_SOURCE
1767 if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1771 echo "configure: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1774 cf_cv_gnu_source=yes
1784 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1785 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1789 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1792 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1795 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1798 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1801 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1804 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1807 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1810 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1811 echo "configure:1812: checking if we should define _XOPEN_SOURCE" >&5
1812 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1813 echo $ac_n "(cached) $ac_c" 1>&6
1816 cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819 #include <sys/types.h>
1822 #ifndef _XOPEN_SOURCE
1827 if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1829 cf_cv_xopen_source=no
1831 echo "configure: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
1835 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1836 cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1839 #include <sys/types.h>
1842 #ifdef _XOPEN_SOURCE
1847 if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1849 cf_cv_xopen_source=no
1851 echo "configure: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1854 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1864 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1865 if test "$cf_cv_xopen_source" != no ; then
1867 # remove _XOPEN_SOURCE symbol from $CFLAGS
1868 CFLAGS=`echo "$CFLAGS" | \
1869 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1870 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1873 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1874 CPPFLAGS=`echo "$CPPFLAGS" | \
1875 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1876 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1878 test "$cf_cv_cc_u_d_options" = yes && \
1879 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1880 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1883 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1885 cf_save_CFLAGS="$CFLAGS"
1886 cf_save_CPPFLAGS="$CPPFLAGS"
1889 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1890 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1891 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1892 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1895 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1896 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1897 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1898 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1901 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1902 echo "configure:1903: checking if we should define _POSIX_C_SOURCE" >&5
1903 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1908 echo "${as_me-configure}:1909: testing if the symbol is already defined go no further ..." 1>&5
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include <sys/types.h>
1916 #ifndef _POSIX_C_SOURCE
1921 if { (eval echo configure:1922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1923 cf_cv_posix_c_source=no
1925 echo "configure: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1928 cf_want_posix_source=no
1929 case .$cf_POSIX_C_SOURCE in #(vi
1931 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1934 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1935 cf_want_posix_source=yes
1938 cf_want_posix_source=yes
1941 if test "$cf_want_posix_source" = yes ; then
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 #include <sys/types.h>
1948 #ifdef _POSIX_SOURCE
1953 if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1956 echo "configure: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1959 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1964 echo "${as_me-configure}:1965: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1966 CFLAGS="$cf_trim_CFLAGS"
1967 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1969 echo "${as_me-configure}:1970: testing if the second compile does not leave our definition intact error ..." 1>&5
1971 cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <sys/types.h>
1977 #ifndef _POSIX_C_SOURCE
1982 if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1985 echo "configure: failed program was:" >&5
1986 cat conftest.$ac_ext >&5
1988 cf_cv_posix_c_source=no
1991 CFLAGS="$cf_save_CFLAGS"
1992 CPPFLAGS="$cf_save_CPPFLAGS"
1999 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2001 if test "$cf_cv_posix_c_source" != no ; then
2002 CFLAGS="$cf_trim_CFLAGS"
2003 CPPFLAGS="$cf_trim_CPPFLAGS"
2004 if test "$cf_cv_cc_u_d_options" = yes ; then
2005 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2006 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2007 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2009 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2016 echo $ac_n "checking for working const""... $ac_c" 1>&6
2017 echo "configure:2018: checking for working const" >&5
2018 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2019 echo $ac_n "(cached) $ac_c" 1>&6
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2027 /* Ultrix mips cc rejects this. */
2028 typedef int charset[2]; const charset x;
2029 /* SunOS 4.1.1 cc rejects this. */
2030 char const *const *ccp;
2032 /* NEC SVR4.0.2 mips cc rejects this. */
2033 struct point {int x, y;};
2034 static struct point const zero = {0,0};
2035 /* AIX XL C 1.02.0.0 rejects this.
2036 It does not let you subtract one const X* pointer from another in an arm
2037 of an if-expression whose if-part is not a constant expression */
2038 const char *g = "string";
2039 ccp = &g + (g ? g-g : 0);
2040 /* HPUX 7.0 cc rejects these. */
2043 ccp = (char const *const *) p;
2044 { /* SCO 3.2v4 cc rejects this. */
2046 char const *s = 0 ? (char *) 0 : (char const *) 0;
2050 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2052 const int *foo = &x[0];
2055 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2056 typedef const int *iptr;
2060 { /* AIX XL C 1.02.0.0 rejects this saying
2061 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2062 struct s { int j; const int *ap[3]; };
2063 struct s *b; b->j = 5;
2065 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2071 if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2075 echo "configure: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2083 echo "$ac_t""$ac_cv_c_const" 1>&6
2084 if test $ac_cv_c_const = no; then
2085 cat >> confdefs.h <<\EOF
2092 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2093 echo "configure:2094: checking for signal global datatype" >&5
2094 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2095 echo $ac_n "(cached) $ac_c" 1>&6
2099 "volatile sig_atomic_t" \
2103 cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2107 #include <sys/types.h>
2113 static void handler(int sig)
2118 signal(SIGINT, handler);
2122 if { (eval echo configure:2123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2124 cf_cv_sig_atomic_t=$cf_type
2126 echo "configure: failed program was:" >&5
2127 cat conftest.$ac_ext >&5
2129 cf_cv_sig_atomic_t=no
2132 test "$cf_cv_sig_atomic_t" != no && break
2137 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2138 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2139 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2145 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2146 echo "configure:2147: checking if you want to see long compiling messages" >&5
2148 # Check whether --enable-echo or --disable-echo was given.
2149 if test "${enable_echo+set}" = set; then
2150 enableval="$enable_echo"
2151 test "$enableval" != no && enableval=yes
2152 if test "$enableval" != "yes" ; then
2155 ECHO_LD='@echo linking $@;'
2156 RULE_CC=' @echo compiling $<'
2157 SHOW_CC=' @echo compiling $@'
2164 RULE_CC='# compiling'
2165 SHOW_CC='# compiling'
2174 RULE_CC='# compiling'
2175 SHOW_CC='# compiling'
2181 echo "$ac_t""$enableval" 1>&6
2191 if test "$GCC" = yes ; then
2192 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2193 echo "configure:2194: checking version of $CC" >&5
2194 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2195 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2196 echo "$ac_t""$GCC_VERSION" 1>&6
2200 if ( test "$GCC" = yes || test "$GXX" = yes )
2202 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2203 echo "configure:2204: checking if you want to turn on gcc warnings" >&5
2205 # Check whether --enable-warnings or --disable-warnings was given.
2206 if test "${enable_warnings+set}" = set; then
2207 enableval="$enable_warnings"
2208 test "$enableval" != yes && enableval=no
2209 if test "$enableval" != "no" ; then
2220 echo "$ac_t""$with_warnings" 1>&6
2221 if test "$with_warnings" = "yes"
2228 if test "$GCC" = yes ; then
2231 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2232 echo "configure:2233: checking if this is really Intel C compiler" >&5
2233 cf_save_CFLAGS="$CFLAGS"
2234 CFLAGS="$CFLAGS -no-gcc"
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2241 #ifdef __INTEL_COMPILER
2248 if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2251 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
2258 CFLAGS="$cf_save_CFLAGS"
2259 echo "$ac_t""$INTEL_COMPILER" 1>&6
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2267 "${as_me-configure}"
2267 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2270 if test "$INTEL_COMPILER" = yes
2272 # The "-wdXXX" options suppress warnings:
2273 # remark #1419: external declaration in primary source file
2274 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2275 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2276 # remark #193: zero used for undefined preprocessing identifier
2277 # remark #593: variable "curs_sb_left_arrow" was set but never used
2278 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2279 # remark #869: parameter "tw" was never referenced
2280 # remark #981: operands are evaluated in unspecified order
2281 # warning #279: controlling expression is constant
2283 echo "checking for $CC warning options" 1>&6
2284 echo "configure:2285: checking for $CC warning options" >&5
2285 cf_save_CFLAGS="$CFLAGS"
2286 EXTRA_CFLAGS="-Wall"
2298 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2299 if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2300 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2301 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2304 CFLAGS="$cf_save_CFLAGS"
2306 elif test "$GCC" = yes
2308 echo "checking for $CC warning options" 1>&6
2309 echo "configure:2310: checking for $CC warning options" >&5
2310 cf_save_CFLAGS="$CFLAGS"
2311 EXTRA_CFLAGS="-W -Wall"
2313 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2315 Wbad-function-cast \
2319 Wmissing-declarations \
2320 Wmissing-prototypes \
2324 Wstrict-prototypes \
2325 Wundef $cf_warn_CONST
2327 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2328 if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2329 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2330 case $cf_opt in #(vi
2332 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2335 case $GCC_VERSION in
2337 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2339 echo "${as_me-configure}:2340: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2346 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2349 CFLAGS="$cf_save_CFLAGS"
2361 # Check whether --with-curses-dir or --without-curses-dir was given.
2362 if test "${with_curses_dir+set}" = set; then
2363 withval="$with_curses_dir"
2365 if test "x$prefix" != xNONE; then
2366 cf_path_syntax="$prefix"
2368 cf_path_syntax="$ac_default_prefix"
2371 case ".$withval" in #(vi
2372 .\$\(*\)*|.\'*\'*) #(vi
2376 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2379 eval withval="$withval"
2380 case ".$withval" in #(vi
2382 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2387 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2390 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2394 cf_cv_curses_dir=$withval
2402 # Check whether --with-5lib or --without-5lib was given.
2403 if test "${with_5lib+set}" = set; then
2404 withval="$with_5lib"
2405 LIBS="-L/usr/5lib $LIBS"
2406 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2411 # Check whether --with-ncursesw or --without-ncursesw was given.
2412 if test "${with_ncursesw+set}" = set; then
2413 withval="$with_ncursesw"
2414 cf_cv_screen=ncursesw
2419 # Check whether --with-ncurses or --without-ncurses was given.
2420 if test "${with_ncurses+set}" = set; then
2421 withval="$with_ncurses"
2422 cf_cv_screen=ncurses
2427 # Check whether --with-pdcurses or --without-pdcurses was given.
2428 if test "${with_pdcurses+set}" = set; then
2429 withval="$with_pdcurses"
2430 cf_cv_screen=pdcurses
2438 case $cf_cv_screen in
2442 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2443 echo "configure:2444: checking for extra include directories" >&5
2444 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2445 echo $ac_n "(cached) $ac_c" 1>&6
2448 cf_cv_curses_incdir=no
2449 case $host_os in #(vi
2451 test -d /usr/include/curses_colr && \
2452 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2455 test -d /usr/5lib && \
2456 test -d /usr/5include && \
2457 cf_cv_curses_incdir="-I/usr/5include"
2463 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2464 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2467 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2468 echo "configure:2469: checking if we have identified curses headers" >&5
2469 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2473 cf_cv_ncurses_header=none
2480 cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <${cf_header}>
2485 initscr(); tgoto("?", 0,0)
2488 if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2490 cf_cv_ncurses_header=$cf_header; break
2492 echo "configure: failed program was:" >&5
2493 cat conftest.$ac_ext >&5
2500 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2502 if test "$cf_cv_ncurses_header" = none ; then
2503 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2506 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2507 for ac_hdr in $cf_cv_ncurses_header
2509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2511 echo "configure:2512: checking for $ac_hdr" >&5
2512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2513 echo $ac_n "(cached) $ac_c" 1>&6
2515 cat > conftest.$ac_ext <<EOF
2516 #line 2517 "configure"
2517 #include "confdefs.h"
2520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2521 { (eval echo configure:2522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2523 if test -z "$ac_err"; then
2525 eval "ac_cv_header_$ac_safe=yes"
2528 echo "configure: failed program was:" >&5
2529 cat conftest.$ac_ext >&5
2531 eval "ac_cv_header_$ac_safe=no"
2535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2536 echo "$ac_t""yes" 1>&6
2537 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2538 cat >> confdefs.h <<EOF
2539 #define $ac_tr_hdr 1
2543 echo "$ac_t""no" 1>&6
2549 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2550 echo "configure:2551: checking for terminfo header" >&5
2551 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2552 echo $ac_n "(cached) $ac_c" 1>&6
2555 case ${cf_cv_ncurses_header} in #(vi
2556 */ncurses.h|*/ncursesw.h) #(vi
2557 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2560 cf_term_header=term.h
2564 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2566 cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2570 #include <${cf_cv_ncurses_header-curses.h}>
2574 int x = auto_left_margin
2577 if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2580 cf_cv_term_header="$cf_test"
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2586 cf_cv_term_header=unknown
2590 test "$cf_cv_term_header" != unknown && break
2595 echo "$ac_t""$cf_cv_term_header" 1>&6
2597 # Set definitions to allow ifdef'ing to accommodate subdirectories
2599 case $cf_cv_term_header in # (vi
2601 cat >> confdefs.h <<\EOF
2602 #define HAVE_TERM_H 1
2608 case $cf_cv_term_header in # (vi
2609 ncurses/term.h) #(vi
2610 cat >> confdefs.h <<\EOF
2611 #define HAVE_NCURSES_TERM_H 1
2616 cat >> confdefs.h <<\EOF
2617 #define HAVE_NCURSESW_TERM_H 1
2625 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2626 echo "configure:2627: checking for ncurses version" >&5
2627 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2631 cf_cv_ncurses_version=no
2634 if test "$cross_compiling" = yes; then
2637 # This will not work if the preprocessor splits the line after the
2638 # Autoconf token. The 'unproto' program does that.
2639 cat > conftest.$ac_ext <<EOF
2640 #include <${cf_cv_ncurses_header-curses.h}>
2642 #ifdef NCURSES_VERSION
2643 Autoconf NCURSES_VERSION
2651 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2652 { (eval echo configure:2653: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2653 if test -f conftest.out ; then
2654 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2655 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2660 cat > conftest.$ac_ext <<EOF
2661 #line 2662 "configure"
2662 #include "confdefs.h"
2664 #include <${cf_cv_ncurses_header-curses.h}>
2668 FILE *fp = fopen("$cf_tempfile", "w");
2669 #ifdef NCURSES_VERSION
2670 # ifdef NCURSES_VERSION_PATCH
2671 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2673 fprintf(fp, "%s\n", NCURSES_VERSION);
2677 fprintf(fp, "old\n");
2682 ${cf_cv_main_return-return}(0);
2685 if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2688 cf_cv_ncurses_version=`cat $cf_tempfile`
2690 echo "configure: failed program was:" >&5
2691 cat conftest.$ac_ext >&5
2700 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2701 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2708 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2709 echo "configure:2710: checking if we have identified curses libraries" >&5
2710 cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713 #include <${cf_cv_ncurses_header-curses.h}>
2715 initscr(); tgoto("?", 0,0)
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2728 echo "$ac_t""$cf_result" 1>&6
2730 if test "$cf_result" = no ; then
2731 case $host_os in #(vi
2733 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2734 echo "configure:2735: checking for tgoto in -lmytinfo" >&5
2735 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2737 echo $ac_n "(cached) $ac_c" 1>&6
2739 ac_save_LIBS="$LIBS"
2740 LIBS="-lmytinfo $LIBS"
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 /* Override any gcc2 internal prototype to avoid an error. */
2745 /* We use char because int might match the return type of a gcc2
2746 builtin and then its argument prototype would still apply. */
2753 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755 eval "ac_cv_lib_$ac_lib_var=yes"
2757 echo "configure: failed program was:" >&5
2758 cat conftest.$ac_ext >&5
2760 eval "ac_cv_lib_$ac_lib_var=no"
2763 LIBS="$ac_save_LIBS"
2766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2767 echo "$ac_t""yes" 1>&6
2768 LIBS="-lmytinfo $LIBS"
2770 echo "$ac_t""no" 1>&6
2775 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2776 echo "configure:2777: checking for initscr in -lcur_colr" >&5
2777 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2778 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2779 echo $ac_n "(cached) $ac_c" 1>&6
2781 ac_save_LIBS="$LIBS"
2782 LIBS="-lcur_colr $LIBS"
2783 cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 /* Override any gcc2 internal prototype to avoid an error. */
2787 /* We use char because int might match the return type of a gcc2
2788 builtin and then its argument prototype would still apply. */
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2797 eval "ac_cv_lib_$ac_lib_var=yes"
2799 echo "configure: failed program was:" >&5
2800 cat conftest.$ac_ext >&5
2802 eval "ac_cv_lib_$ac_lib_var=no"
2805 LIBS="$ac_save_LIBS"
2808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2809 echo "$ac_t""yes" 1>&6
2811 LIBS="-lcur_colr $LIBS"
2812 ac_cv_func_initscr=yes
2815 echo "$ac_t""no" 1>&6
2817 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2818 echo "configure:2819: checking for initscr in -lHcurses" >&5
2819 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
2823 ac_save_LIBS="$LIBS"
2824 LIBS="-lHcurses $LIBS"
2825 cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828 /* Override any gcc2 internal prototype to avoid an error. */
2829 /* We use char because int might match the return type of a gcc2
2830 builtin and then its argument prototype would still apply. */
2837 if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2839 eval "ac_cv_lib_$ac_lib_var=yes"
2841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2844 eval "ac_cv_lib_$ac_lib_var=no"
2847 LIBS="$ac_save_LIBS"
2850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2851 echo "$ac_t""yes" 1>&6
2853 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2854 LIBS="-lHcurses $LIBS"
2855 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
2856 ac_cv_func_initscr=yes
2859 echo "$ac_t""no" 1>&6
2865 linux*) # Suse Linux does not follow /usr/lib convention
2867 if test -n "/lib" ; then
2868 for cf_add_libdir in /lib
2870 if test $cf_add_libdir = /usr/lib ; then
2872 elif test -d $cf_add_libdir
2875 if test -n "$LDFLAGS$LIBS" ; then
2876 # a loop is needed to ensure we can add subdirs of existing dirs
2877 for cf_test_libdir in $LDFLAGS $LIBS ; do
2878 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2879 cf_have_libdir=yes; break
2883 if test "$cf_have_libdir" = no ; then
2884 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2886 echo "${as_me-configure}:2887: testing adding $cf_add_libdir to library-path ..." 1>&5
2889 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2897 if test -d /usr/5lib ; then
2899 if test -n "/usr/5lib" ; then
2900 for cf_add_libdir in /usr/5lib
2902 if test $cf_add_libdir = /usr/lib ; then
2904 elif test -d $cf_add_libdir
2907 if test -n "$LDFLAGS$LIBS" ; then
2908 # a loop is needed to ensure we can add subdirs of existing dirs
2909 for cf_test_libdir in $LDFLAGS $LIBS ; do
2910 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2911 cf_have_libdir=yes; break
2915 if test "$cf_have_libdir" = no ; then
2916 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2918 echo "${as_me-configure}:2919: testing adding $cf_add_libdir to library-path ..." 1>&5
2921 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2927 LIBS="$LIBS -lcurses -ltermcap"
2929 ac_cv_func_initscr=yes
2933 if test ".$ac_cv_func_initscr" != .yes ; then
2934 cf_save_LIBS="$LIBS"
2938 if test ".${cf_cv_ncurses_version-no}" != .no
2940 cf_check_list="ncurses curses cursesX"
2942 cf_check_list="cursesX curses ncurses"
2945 # Check for library containing tgoto. Do this before curses library
2946 # because it may be needed to link the test-case for initscr.
2947 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2948 echo "configure:2949: checking for tgoto" >&5
2949 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 /* System header to define __stub macros and hopefully few prototypes,
2956 which can conflict with char tgoto(); below. */
2958 /* Override any gcc2 internal prototype to avoid an error. */
2959 /* We use char because int might match the return type of a gcc2
2960 builtin and then its argument prototype would still apply. */
2965 /* The GNU C library defines this for functions which it implements
2966 to always fail with ENOSYS. Some functions are actually named
2967 something starting with __ and the normal name is an alias. */
2968 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2976 if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2978 eval "ac_cv_func_tgoto=yes"
2980 echo "configure: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2983 eval "ac_cv_func_tgoto=no"
2988 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2989 echo "$ac_t""yes" 1>&6
2990 cf_term_lib=predefined
2992 echo "$ac_t""no" 1>&6
2994 for cf_term_lib in $cf_check_list termcap termlib unknown
2996 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2997 echo "configure:2998: checking for tgoto in -l$cf_term_lib" >&5
2998 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3002 ac_save_LIBS="$LIBS"
3003 LIBS="-l$cf_term_lib $LIBS"
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007 /* Override any gcc2 internal prototype to avoid an error. */
3008 /* We use char because int might match the return type of a gcc2
3009 builtin and then its argument prototype would still apply. */
3016 if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3018 eval "ac_cv_lib_$ac_lib_var=yes"
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3023 eval "ac_cv_lib_$ac_lib_var=no"
3026 LIBS="$ac_save_LIBS"
3029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3030 echo "$ac_t""yes" 1>&6
3033 echo "$ac_t""no" 1>&6
3041 # Check for library containing initscr
3042 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3043 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3045 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3046 echo "configure:3047: checking for initscr in -l$cf_curs_lib" >&5
3047 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3048 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3049 echo $ac_n "(cached) $ac_c" 1>&6
3051 ac_save_LIBS="$LIBS"
3052 LIBS="-l$cf_curs_lib $LIBS"
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 /* Override any gcc2 internal prototype to avoid an error. */
3057 /* We use char because int might match the return type of a gcc2
3058 builtin and then its argument prototype would still apply. */
3065 if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067 eval "ac_cv_lib_$ac_lib_var=yes"
3069 echo "configure: failed program was:" >&5
3070 cat conftest.$ac_ext >&5
3072 eval "ac_cv_lib_$ac_lib_var=no"
3075 LIBS="$ac_save_LIBS"
3078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3079 echo "$ac_t""yes" 1>&6
3082 echo "$ac_t""no" 1>&6
3086 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3088 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3089 if test "$cf_term_lib" = unknown ; then
3090 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3091 echo "configure:3092: checking if we can link with $cf_curs_lib library" >&5
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 #include <${cf_cv_ncurses_header-curses.h}>
3100 if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
3110 echo "$ac_t""$cf_result" 1>&6
3111 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3112 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3114 elif test "$cf_term_lib" != predefined ; then
3115 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3116 echo "configure:3117: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <${cf_cv_ncurses_header-curses.h}>
3122 initscr(); tgoto((char *)0, 0, 0);
3125 if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3129 echo "configure: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3133 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 #include <${cf_cv_ncurses_header-curses.h}>
3142 if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3146 echo "configure: failed program was:" >&5
3147 cat conftest.$ac_ext >&5
3155 echo "$ac_t""$cf_result" 1>&6
3164 cf_ncuconfig_root=ncurses
3166 echo "Looking for ${cf_ncuconfig_root}-config"
3167 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3169 # Extract the first word of "$ac_prog", so it can be a program name with args.
3170 set dummy $ac_prog; ac_word=$2
3171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172 echo "configure:3173: checking for $ac_word" >&5
3173 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3176 case "$NCURSES_CONFIG" in
3178 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3181 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3186 for ac_dir in $ac_dummy; do
3187 test -z "$ac_dir" && ac_dir=.
3188 if test -f $ac_dir/$ac_word; then
3189 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3197 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3198 if test -n "$NCURSES_CONFIG"; then
3199 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3201 echo "$ac_t""no" 1>&6
3204 test -n "$NCURSES_CONFIG" && break
3206 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3209 if test "$NCURSES_CONFIG" != none ; then
3211 cf_cv_ncurses_header=curses.h
3213 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3214 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3216 cat >> confdefs.h <<\EOF
3222 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3224 cat >> confdefs.h <<EOF
3225 #define $cf_nculib_ROOT 1
3229 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3235 cf_ncuhdr_root=ncurses
3237 test -n "$cf_cv_curses_dir" && \
3238 test "$cf_cv_curses_dir" != "no" && { \
3240 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3241 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3243 while test $cf_add_incdir != /usr/include
3245 if test -d $cf_add_incdir
3248 if test -n "$CFLAGS$CPPFLAGS" ; then
3249 # a loop is needed to ensure we can add subdirs of existing dirs
3250 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3251 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3252 cf_have_incdir=yes; break
3257 if test "$cf_have_incdir" = no ; then
3258 if test "$cf_add_incdir" = /usr/local/include ; then
3259 if test "$GCC" = yes
3261 cf_save_CPPFLAGS=$CPPFLAGS
3262 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3263 cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3271 if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3280 CPPFLAGS=$cf_save_CPPFLAGS
3285 if test "$cf_have_incdir" = no ; then
3286 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3288 echo "${as_me-configure}:3289: testing adding $cf_add_incdir to include-path ..." 1>&5
3291 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3293 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3294 test "$cf_top_incdir" = "$cf_add_incdir" && break
3295 cf_add_incdir="$cf_top_incdir"
3306 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $cf_ncuhdr_root header in include-path" >&5
3308 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3309 echo $ac_n "(cached) $ac_c" 1>&6
3312 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3313 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3314 for cf_header in $cf_header_list
3317 cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3322 #include <$cf_header>
3325 #ifdef NCURSES_VERSION
3327 printf("%s\n", NCURSES_VERSION);
3339 if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3341 cf_cv_ncurses_h=$cf_header
3344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
3351 test "$cf_cv_ncurses_h" != no && break
3356 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3360 if test "$cf_cv_ncurses_h" != no ; then
3361 cf_cv_ncurses_header=$cf_cv_ncurses_h
3364 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $cf_ncuhdr_root include-path" >&5
3366 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3367 echo $ac_n "(cached) $ac_c" 1>&6
3370 test -n "$verbose" && echo
3372 cf_header_path_list=""
3373 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3374 for cf_header_path in $CPPFLAGS $CFLAGS
3376 case $cf_header_path in #(vi
3378 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3380 test "$cf_header_path" != "NONE" && \
3381 test -d "$cf_header_path" && \
3383 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3384 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3385 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3386 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3387 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3388 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3391 cf_header_path_list="$cf_header_path_list $cf_search"
3400 test "/usr" != "$prefix" && \
3402 (test $prefix = NONE || test -d $prefix) && {
3403 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3404 test -d /usr/include && cf_search="$cf_search /usr/include"
3405 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3406 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3407 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3408 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3412 test "$prefix" != "NONE" && \
3413 test -d "$prefix" && \
3415 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3416 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3417 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3418 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3419 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3420 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3424 test "/usr/local" != "$prefix" && \
3425 test -d "/usr/local" && \
3426 (test $prefix = NONE || test -d $prefix) && {
3427 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3428 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3429 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3430 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3431 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3432 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3436 test "/opt" != "$prefix" && \
3438 (test $prefix = NONE || test -d $prefix) && {
3439 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3440 test -d /opt/include && cf_search="$cf_search /opt/include"
3441 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3442 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3443 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3444 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3448 test "$HOME" != "$prefix" && \
3449 test -d "$HOME" && \
3450 (test $prefix = NONE || test -d $prefix) && {
3451 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3452 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3453 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3454 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3455 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3456 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3461 test "$includedir" != NONE && \
3462 test "$includedir" != "/usr/include" && \
3463 test -d "$includedir" && {
3464 test -d $includedir && cf_search="$cf_search $includedir"
3465 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3468 test "$oldincludedir" != NONE && \
3469 test "$oldincludedir" != "/usr/include" && \
3470 test -d "$oldincludedir" && {
3471 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3472 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3475 cf_search="$cf_header_path_list $cf_search"
3477 test -n "$verbose" && echo search path $cf_search
3478 cf_save2_CPPFLAGS="$CPPFLAGS"
3479 for cf_incdir in $cf_search
3482 if test -n "$cf_incdir" ; then
3483 for cf_add_incdir in $cf_incdir
3485 while test $cf_add_incdir != /usr/include
3487 if test -d $cf_add_incdir
3490 if test -n "$CFLAGS$CPPFLAGS" ; then
3491 # a loop is needed to ensure we can add subdirs of existing dirs
3492 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3493 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3494 cf_have_incdir=yes; break
3499 if test "$cf_have_incdir" = no ; then
3500 if test "$cf_add_incdir" = /usr/local/include ; then
3501 if test "$GCC" = yes
3503 cf_save_CPPFLAGS=$CPPFLAGS
3504 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3505 cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3516 echo "configure: failed program was:" >&5
3517 cat conftest.$ac_ext >&5
3522 CPPFLAGS=$cf_save_CPPFLAGS
3527 if test "$cf_have_incdir" = no ; then
3528 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3530 echo "${as_me-configure}:3531: testing adding $cf_add_incdir to include-path ..." 1>&5
3533 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3535 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3536 test "$cf_top_incdir" = "$cf_add_incdir" && break
3537 cf_add_incdir="$cf_top_incdir"
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3556 #include <$cf_header>
3559 #ifdef NCURSES_VERSION
3561 printf("%s\n", NCURSES_VERSION);
3573 if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3575 cf_cv_ncurses_h2=$cf_header
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3585 if test "$cf_cv_ncurses_h2" != no ; then
3586 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3587 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3590 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3592 CPPFLAGS="$cf_save2_CPPFLAGS"
3593 test "$cf_cv_ncurses_h2" != no && break
3595 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3599 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3601 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3602 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3603 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3604 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3607 if test -n "$cf_1st_incdir" ; then
3608 for cf_add_incdir in $cf_1st_incdir
3610 while test $cf_add_incdir != /usr/include
3612 if test -d $cf_add_incdir
3615 if test -n "$CFLAGS$CPPFLAGS" ; then
3616 # a loop is needed to ensure we can add subdirs of existing dirs
3617 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3618 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3619 cf_have_incdir=yes; break
3624 if test "$cf_have_incdir" = no ; then
3625 if test "$cf_add_incdir" = /usr/local/include ; then
3626 if test "$GCC" = yes
3628 cf_save_CPPFLAGS=$CPPFLAGS
3629 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3638 if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3641 echo "configure: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3647 CPPFLAGS=$cf_save_CPPFLAGS
3652 if test "$cf_have_incdir" = no ; then
3653 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3655 echo "${as_me-configure}:3656: testing adding $cf_add_incdir to include-path ..." 1>&5
3658 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3660 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3661 test "$cf_top_incdir" = "$cf_add_incdir" && break
3662 cf_add_incdir="$cf_top_incdir"
3674 # Set definitions to allow ifdef'ing for ncurses.h
3676 case $cf_cv_ncurses_header in # (vi
3678 cat >> confdefs.h <<\EOF
3679 #define HAVE_NCURSES_H 1
3685 case $cf_cv_ncurses_header in # (vi
3686 ncurses/curses.h|ncurses/ncurses.h)
3687 cat >> confdefs.h <<\EOF
3688 #define HAVE_NCURSES_NCURSES_H 1
3692 ncursesw/curses.h|ncursesw/ncurses.h)
3693 cat >> confdefs.h <<\EOF
3694 #define HAVE_NCURSESW_NCURSES_H 1
3702 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3703 echo "configure:3704: checking for terminfo header" >&5
3704 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3705 echo $ac_n "(cached) $ac_c" 1>&6
3708 case ${cf_cv_ncurses_header} in #(vi
3709 */ncurses.h|*/ncursesw.h) #(vi
3710 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3713 cf_term_header=term.h
3717 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3719 cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3723 #include <${cf_cv_ncurses_header-curses.h}>
3727 int x = auto_left_margin
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3733 cf_cv_term_header="$cf_test"
3735 echo "configure: failed program was:" >&5
3736 cat conftest.$ac_ext >&5
3739 cf_cv_term_header=unknown
3743 test "$cf_cv_term_header" != unknown && break
3748 echo "$ac_t""$cf_cv_term_header" 1>&6
3750 # Set definitions to allow ifdef'ing to accommodate subdirectories
3752 case $cf_cv_term_header in # (vi
3754 cat >> confdefs.h <<\EOF
3755 #define HAVE_TERM_H 1
3761 case $cf_cv_term_header in # (vi
3762 ncurses/term.h) #(vi
3763 cat >> confdefs.h <<\EOF
3764 #define HAVE_NCURSES_TERM_H 1
3769 cat >> confdefs.h <<\EOF
3770 #define HAVE_NCURSESW_TERM_H 1
3777 # some applications need this, but should check for NCURSES_VERSION
3778 cat >> confdefs.h <<\EOF
3784 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3785 echo "configure:3786: checking for ncurses version" >&5
3786 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3787 echo $ac_n "(cached) $ac_c" 1>&6
3790 cf_cv_ncurses_version=no
3793 if test "$cross_compiling" = yes; then
3796 # This will not work if the preprocessor splits the line after the
3797 # Autoconf token. The 'unproto' program does that.
3798 cat > conftest.$ac_ext <<EOF
3799 #include <${cf_cv_ncurses_header-curses.h}>
3801 #ifdef NCURSES_VERSION
3802 Autoconf NCURSES_VERSION
3810 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3811 { (eval echo configure:3812: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3812 if test -f conftest.out ; then
3813 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3814 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3823 #include <${cf_cv_ncurses_header-curses.h}>
3827 FILE *fp = fopen("$cf_tempfile", "w");
3828 #ifdef NCURSES_VERSION
3829 # ifdef NCURSES_VERSION_PATCH
3830 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3832 fprintf(fp, "%s\n", NCURSES_VERSION);
3836 fprintf(fp, "old\n");
3841 ${cf_cv_main_return-return}(0);
3844 if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3847 cf_cv_ncurses_version=`cat $cf_tempfile`
3849 echo "configure: failed program was:" >&5
3850 cat conftest.$ac_ext >&5
3859 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3860 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3868 cf_nculib_root=ncurses
3869 # This works, except for the special case where we find gpm, but
3870 # ncurses is in a nonstandard location via $LIBS, and we really want
3873 cf_ncurses_SAVE="$LIBS"
3874 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3875 echo "configure:3876: checking for Gpm_Open in -lgpm" >&5
3876 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3878 echo $ac_n "(cached) $ac_c" 1>&6
3880 ac_save_LIBS="$LIBS"
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 /* Override any gcc2 internal prototype to avoid an error. */
3886 /* We use char because int might match the return type of a gcc2
3887 builtin and then its argument prototype would still apply. */
3894 if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3896 eval "ac_cv_lib_$ac_lib_var=yes"
3898 echo "configure: failed program was:" >&5
3899 cat conftest.$ac_ext >&5
3901 eval "ac_cv_lib_$ac_lib_var=no"
3904 LIBS="$ac_save_LIBS"
3907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3908 echo "$ac_t""yes" 1>&6
3909 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3910 echo "configure:3911: checking for initscr in -lgpm" >&5
3911 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3912 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3915 ac_save_LIBS="$LIBS"
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 /* Override any gcc2 internal prototype to avoid an error. */
3921 /* We use char because int might match the return type of a gcc2
3922 builtin and then its argument prototype would still apply. */
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3931 eval "ac_cv_lib_$ac_lib_var=yes"
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3936 eval "ac_cv_lib_$ac_lib_var=no"
3939 LIBS="$ac_save_LIBS"
3942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3943 echo "$ac_t""yes" 1>&6
3944 LIBS="$cf_ncurses_SAVE"
3946 echo "$ac_t""no" 1>&6
3947 cf_ncurses_LIBS="-lgpm"
3951 echo "$ac_t""no" 1>&6
3955 case $host_os in #(vi
3957 # This is only necessary if you are linking against an obsolete
3958 # version of ncurses (but it should do no harm, since it's static).
3959 if test "$cf_nculib_root" = ncurses ; then
3960 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3961 echo "configure:3962: checking for tgoto in -lmytinfo" >&5
3962 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3966 ac_save_LIBS="$LIBS"
3967 LIBS="-lmytinfo $LIBS"
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 /* Override any gcc2 internal prototype to avoid an error. */
3972 /* We use char because int might match the return type of a gcc2
3973 builtin and then its argument prototype would still apply. */
3980 if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982 eval "ac_cv_lib_$ac_lib_var=yes"
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3987 eval "ac_cv_lib_$ac_lib_var=no"
3990 LIBS="$ac_save_LIBS"
3993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3994 echo "$ac_t""yes" 1>&6
3995 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3997 echo "$ac_t""no" 1>&6
4004 LIBS="$cf_ncurses_LIBS $LIBS"
4006 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4009 if test -n "$cf_cv_curses_dir/lib" ; then
4010 for cf_add_libdir in $cf_cv_curses_dir/lib
4012 if test $cf_add_libdir = /usr/lib ; then
4014 elif test -d $cf_add_libdir
4017 if test -n "$LDFLAGS$LIBS" ; then
4018 # a loop is needed to ensure we can add subdirs of existing dirs
4019 for cf_test_libdir in $LDFLAGS $LIBS ; do
4020 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4021 cf_have_libdir=yes; break
4025 if test "$cf_have_libdir" = no ; then
4026 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4028 echo "${as_me-configure}:4029: testing adding $cf_add_libdir to library-path ..." 1>&5
4031 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4037 LIBS="-l$cf_nculib_root $LIBS"
4040 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4042 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4043 echo "configure:4044: checking for initscr" >&5
4044 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4045 echo $ac_n "(cached) $ac_c" 1>&6
4047 cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 /* System header to define __stub macros and hopefully few prototypes,
4051 which can conflict with char initscr(); below. */
4053 /* Override any gcc2 internal prototype to avoid an error. */
4054 /* We use char because int might match the return type of a gcc2
4055 builtin and then its argument prototype would still apply. */
4060 /* The GNU C library defines this for functions which it implements
4061 to always fail with ENOSYS. Some functions are actually named
4062 something starting with __ and the normal name is an alias. */
4063 #if defined (__stub_initscr) || defined (__stub___initscr)
4071 if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4073 eval "ac_cv_func_initscr=yes"
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
4078 eval "ac_cv_func_initscr=no"
4083 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4084 echo "$ac_t""yes" 1>&6
4085 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4087 echo "$ac_t""no" 1>&6
4089 cf_save_LIBS="$LIBS"
4090 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4091 echo "configure:4092: checking for initscr in -l$cf_nculib_root" >&5
4092 LIBS="-l$cf_nculib_root $LIBS"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 #include <${cf_cv_ncurses_header-curses.h}>
4101 if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103 echo "$ac_t""yes" 1>&6
4104 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4107 echo "configure: failed program was:" >&5
4108 cat conftest.$ac_ext >&5
4110 echo "$ac_t""no" 1>&6
4112 cf_library_path_list=""
4113 if test -n "${LDFLAGS}${LIBS}" ; then
4114 for cf_library_path in $LDFLAGS $LIBS
4116 case $cf_library_path in #(vi
4118 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4120 test "$cf_library_path" != "NONE" && \
4121 test -d "$cf_library_path" && \
4123 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4124 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4125 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4126 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4127 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4128 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
4131 cf_library_path_list="$cf_library_path_list $cf_search"
4140 test "/usr" != "$prefix" && \
4142 (test $prefix = NONE || test -d $prefix) && {
4143 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4144 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4145 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4146 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4147 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4148 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4152 test "$prefix" != "NONE" && \
4153 test -d "$prefix" && \
4155 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4156 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4157 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4158 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4159 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4160 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4164 test "/usr/local" != "$prefix" && \
4165 test -d "/usr/local" && \
4166 (test $prefix = NONE || test -d $prefix) && {
4167 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4168 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4169 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4170 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4171 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4172 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4176 test "/opt" != "$prefix" && \
4178 (test $prefix = NONE || test -d $prefix) && {
4179 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4180 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4181 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4182 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4183 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4184 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4188 test "$HOME" != "$prefix" && \
4189 test -d "$HOME" && \
4190 (test $prefix = NONE || test -d $prefix) && {
4191 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4192 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4193 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4194 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4195 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4196 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4201 cf_search="$cf_library_path_list $cf_search"
4203 for cf_libdir in $cf_search
4205 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4206 echo "configure:4207: checking for -l$cf_nculib_root in $cf_libdir" >&5
4207 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4208 cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211 #include <${cf_cv_ncurses_header-curses.h}>
4216 if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218 echo "$ac_t""yes" 1>&6
4219 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4222 echo "configure: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4225 echo "$ac_t""no" 1>&6
4226 LIBS="$cf_save_LIBS"
4236 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4238 if test $cf_found_library = no ; then
4239 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4245 if test -n "$cf_ncurses_LIBS" ; then
4246 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4247 echo "configure:4248: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4248 cf_ncurses_SAVE="$LIBS"
4249 for p in $cf_ncurses_LIBS ; do
4250 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4251 if test "$q" != "$LIBS" ; then
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <${cf_cv_ncurses_header-curses.h}>
4260 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4265 echo "$ac_t""yes" 1>&6
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4270 echo "$ac_t""no" 1>&6
4271 LIBS="$cf_ncurses_SAVE"
4277 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4279 cat >> confdefs.h <<EOF
4280 #define $cf_nculib_ROOT 1
4291 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4292 echo "configure:4293: checking for multibyte character support" >&5
4293 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4294 echo $ac_n "(cached) $ac_c" 1>&6
4297 cf_save_LIBS="$LIBS"
4298 cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4316 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4317 # will be set on completion of the AC_TRY_LINK below.
4318 cf_cv_header_path_utf8=
4319 cf_cv_library_path_utf8=
4322 echo "${as_me-configure}:4323: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4325 cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4329 #include <libutf8.h>
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4336 cf_cv_find_linkage_utf8=yes
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4342 cf_cv_find_linkage_utf8=no
4344 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
4346 echo "${as_me-configure}:4347: testing find linkage for utf8 library ..." 1>&5
4350 echo "${as_me-configure}:4351: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4353 cf_save_CPPFLAGS="$CPPFLAGS"
4354 cf_test_CPPFLAGS="$CPPFLAGS"
4357 cf_header_path_list=""
4358 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4359 for cf_header_path in $CPPFLAGS $CFLAGS
4361 case $cf_header_path in #(vi
4363 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4365 test "$cf_header_path" != "NONE" && \
4366 test -d "$cf_header_path" && \
4368 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4369 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4370 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
4371 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
4372 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
4373 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4376 cf_header_path_list="$cf_header_path_list $cf_search"
4385 test "/usr" != "$prefix" && \
4387 (test $prefix = NONE || test -d $prefix) && {
4388 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4389 test -d /usr/include && cf_search="$cf_search /usr/include"
4390 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
4391 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
4392 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
4393 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
4397 test "$prefix" != "NONE" && \
4398 test -d "$prefix" && \
4400 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4401 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4402 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
4403 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
4404 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
4405 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
4409 test "/usr/local" != "$prefix" && \
4410 test -d "/usr/local" && \
4411 (test $prefix = NONE || test -d $prefix) && {
4412 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4413 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4414 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
4415 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
4416 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
4417 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
4421 test "/opt" != "$prefix" && \
4423 (test $prefix = NONE || test -d $prefix) && {
4424 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4425 test -d /opt/include && cf_search="$cf_search /opt/include"
4426 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
4427 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
4428 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
4429 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
4433 test "$HOME" != "$prefix" && \
4434 test -d "$HOME" && \
4435 (test $prefix = NONE || test -d $prefix) && {
4436 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4437 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4438 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
4439 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
4440 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
4441 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
4446 test "$includedir" != NONE && \
4447 test "$includedir" != "/usr/include" && \
4448 test -d "$includedir" && {
4449 test -d $includedir && cf_search="$cf_search $includedir"
4450 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4453 test "$oldincludedir" != NONE && \
4454 test "$oldincludedir" != "/usr/include" && \
4455 test -d "$oldincludedir" && {
4456 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4457 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4460 cf_search="$cf_header_path_list $cf_search"
4462 for cf_cv_header_path_utf8 in $cf_search
4464 if test -d $cf_cv_header_path_utf8 ; then
4465 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
4467 echo "${as_me-configure}:4468: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4470 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4475 #include <libutf8.h>
4480 if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4483 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4485 echo "${as_me-configure}:4486: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4488 cf_cv_find_linkage_utf8=maybe
4489 cf_test_CPPFLAGS="$CPPFLAGS"
4492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4496 CPPFLAGS="$cf_save_CPPFLAGS"
4503 if test "$cf_cv_find_linkage_utf8" = maybe ; then
4506 echo "${as_me-configure}:4507: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4509 cf_save_LIBS="$LIBS"
4510 cf_save_LDFLAGS="$LDFLAGS"
4514 if test "$cf_cv_find_linkage_utf8" != yes ; then
4516 cf_library_path_list=""
4517 if test -n "${LDFLAGS}${LIBS}" ; then
4518 for cf_library_path in $LDFLAGS $LIBS
4520 case $cf_library_path in #(vi
4522 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4524 test "$cf_library_path" != "NONE" && \
4525 test -d "$cf_library_path" && \
4527 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4528 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4529 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
4530 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4531 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
4532 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4535 cf_library_path_list="$cf_library_path_list $cf_search"
4544 test "/usr" != "$prefix" && \
4546 (test $prefix = NONE || test -d $prefix) && {
4547 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4548 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4549 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
4550 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
4551 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
4552 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
4556 test "$prefix" != "NONE" && \
4557 test -d "$prefix" && \
4559 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4560 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4561 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
4562 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
4563 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
4564 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
4568 test "/usr/local" != "$prefix" && \
4569 test -d "/usr/local" && \
4570 (test $prefix = NONE || test -d $prefix) && {
4571 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4572 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4573 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
4574 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
4575 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
4576 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
4580 test "/opt" != "$prefix" && \
4582 (test $prefix = NONE || test -d $prefix) && {
4583 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4584 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4585 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
4586 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
4587 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
4588 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
4592 test "$HOME" != "$prefix" && \
4593 test -d "$HOME" && \
4594 (test $prefix = NONE || test -d $prefix) && {
4595 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4596 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4597 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
4598 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
4599 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
4600 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
4605 cf_search="$cf_library_path_list $cf_search"
4607 for cf_cv_library_path_utf8 in $cf_search
4609 if test -d $cf_cv_library_path_utf8 ; then
4610 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
4612 echo "${as_me-configure}:4613: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4615 CPPFLAGS="$cf_test_CPPFLAGS"
4616 LIBS="-lutf8 $cf_save_LIBS"
4617 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4622 #include <libutf8.h>
4627 if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4630 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4632 echo "${as_me-configure}:4633: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4635 cf_cv_find_linkage_utf8=yes
4636 cf_cv_library_file_utf8="-lutf8"
4639 echo "configure: failed program was:" >&5
4640 cat conftest.$ac_ext >&5
4643 CPPFLAGS="$cf_save_CPPFLAGS"
4644 LIBS="$cf_save_LIBS"