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 --with-curses-dir=DIR directory in which (n)curses is installed
187 --with-5lib use SunOS sysv-libraries
188 --with-ncursesw use wide ncurses-libraries (installed)
189 --with-ncurses use ncurses-libraries (installed)
193 -host | --host | --hos | --ho)
195 -host=* | --host=* | --hos=* | --ho=*)
198 -includedir | --includedir | --includedi | --included | --include \
199 | --includ | --inclu | --incl | --inc)
200 ac_prev=includedir ;;
201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202 | --includ=* | --inclu=* | --incl=* | --inc=*)
203 includedir="$ac_optarg" ;;
205 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
210 -libdir | --libdir | --libdi | --libd)
212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
213 libdir="$ac_optarg" ;;
215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216 | --libexe | --libex | --libe)
217 ac_prev=libexecdir ;;
218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219 | --libexe=* | --libex=* | --libe=*)
220 libexecdir="$ac_optarg" ;;
222 -localstatedir | --localstatedir | --localstatedi | --localstated \
223 | --localstate | --localstat | --localsta | --localst \
224 | --locals | --local | --loca | --loc | --lo)
225 ac_prev=localstatedir ;;
226 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229 localstatedir="$ac_optarg" ;;
231 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
237 # Obsolete; use --without-fp.
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250 | --oldin | --oldi | --old | --ol | --o)
251 ac_prev=oldincludedir ;;
252 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255 oldincludedir="$ac_optarg" ;;
257 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260 prefix="$ac_optarg" ;;
262 -program-prefix | --program-prefix | --program-prefi | --program-pref \
263 | --program-pre | --program-pr | --program-p)
264 ac_prev=program_prefix ;;
265 -program-prefix=* | --program-prefix=* | --program-prefi=* \
266 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267 program_prefix="$ac_optarg" ;;
269 -program-suffix | --program-suffix | --program-suffi | --program-suff \
270 | --program-suf | --program-su | --program-s)
271 ac_prev=program_suffix ;;
272 -program-suffix=* | --program-suffix=* | --program-suffi=* \
273 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274 program_suffix="$ac_optarg" ;;
276 -program-transform-name | --program-transform-name \
277 | --program-transform-nam | --program-transform-na \
278 | --program-transform-n | --program-transform- \
279 | --program-transform | --program-transfor \
280 | --program-transfo | --program-transf \
281 | --program-trans | --program-tran \
282 | --progr-tra | --program-tr | --program-t)
283 ac_prev=program_transform_name ;;
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 program_transform_name="$ac_optarg" ;;
293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294 | -silent | --silent | --silen | --sile | --sil)
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 sbindir="$ac_optarg" ;;
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 sharedstatedir="$ac_optarg" ;;
314 -site | --site | --sit)
316 -site=* | --site=* | --sit=*)
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322 srcdir="$ac_optarg" ;;
324 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325 | --syscon | --sysco | --sysc | --sys | --sy)
326 ac_prev=sysconfdir ;;
327 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329 sysconfdir="$ac_optarg" ;;
331 -target | --target | --targe | --targ | --tar | --ta | --t)
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.13.20030927"
344 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 eval "with_${ac_package}='$ac_optarg'" ;;
356 -without-* | --without-*)
357 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 eval "with_${ac_package}=no" ;;
366 # Obsolete; use --with-x.
369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370 | --x-incl | --x-inc | --x-in | --x-i)
371 ac_prev=x_includes ;;
372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374 x_includes="$ac_optarg" ;;
376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378 ac_prev=x_libraries ;;
379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381 x_libraries="$ac_optarg" ;;
383 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 if test "x$nonopt" != xNONE; then
391 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
399 if test -n "$ac_prev"; then
400 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405 # File descriptor usage:
408 # 2 errors and warnings
409 # 3 some systems may open it to /dev/tty
410 # 4 used on the Kubota Titan
411 # 6 checking for... messages and results
412 # 5 compiler messages saved in config.log
413 if test "$silent" = yes; then
421 This file contains any messages produced by compilers while
422 running configure, to aid debugging if configure makes a mistake.
425 # Strip out --no-create and --no-recursion so they do not pile up.
426 # Also quote any args containing shell metacharacters.
431 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432 | --no-cr | --no-c) ;;
433 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 # Only set these to C if already set. These must not be set unconditionally
443 # because not all systems understand e.g. LANG=C (notably SCO).
444 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445 # Non-C LC_CTYPE values break the ctype check.
446 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
447 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
451 # confdefs.h avoids OS command line length limits that DEFS can exceed.
452 rm -rf conftest* confdefs.h
453 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 # A filename unique to this package, relative to the directory that
457 # configure is in, which we can look for to find out if srcdir is correct.
458 ac_unique_file=ncurses.c
460 # Find the source files, if location was not specified.
461 if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 if test ! -r $srcdir/$ac_unique_file; then
472 ac_srcdir_defaulted=no
474 if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483 # Prefer explicitly selected file to automatically selected ones.
484 if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491 for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
498 if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
502 echo "creating cache $cache_file"
507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508 ac_cpp='$CPP $CPPFLAGS'
509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511 cross_compiling=$ac_cv_prog_cc_cross
515 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='\c' ac_t=
531 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
534 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538 if test -f $ac_dir/install-sh; then
540 ac_install_sh="$ac_aux_dir/install-sh -c"
542 elif test -f $ac_dir/install.sh; then
544 ac_install_sh="$ac_aux_dir/install.sh -c"
548 if test -z "$ac_aux_dir"; then
549 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
556 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
558 # Make sure we can run config.sub.
559 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
560 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
563 echo $ac_n "checking host system type""... $ac_c" 1>&6
564 echo "configure:565: checking host system type" >&5
567 case "$host_alias" in
571 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
572 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
574 *) host_alias=$nonopt ;;
578 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
579 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
580 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
581 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
582 echo "$ac_t""$host" 1>&6
584 system_name="$host_os"
586 system_name="`(uname -s -r) 2>/dev/null`"
587 if test -z "$system_name" ; then
588 system_name="`(hostname) 2>/dev/null`"
591 test -n "$system_name" && cat >> confdefs.h <<EOF
592 #define SYSTEM_NAME "$system_name"
595 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
596 echo $ac_n "(cached) $ac_c" 1>&6
598 cf_cv_system_name="$system_name"
602 test -z "$system_name" && system_name="$cf_cv_system_name"
603 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
605 if test ".$system_name" != ".$cf_cv_system_name" ; then
606 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
607 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
611 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
612 echo "configure:613: checking whether ${MAKE-make} sets \${MAKE}" >&5
613 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
614 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
615 echo $ac_n "(cached) $ac_c" 1>&6
617 cat > conftestmake <<\EOF
619 @echo 'ac_maketemp="${MAKE}"'
621 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
622 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
623 if test -n "$ac_maketemp"; then
624 eval ac_cv_prog_make_${ac_make}_set=yes
626 eval ac_cv_prog_make_${ac_make}_set=no
630 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
631 echo "$ac_t""yes" 1>&6
634 echo "$ac_t""no" 1>&6
635 SET_MAKE="MAKE=${MAKE-make}"
638 # Extract the first word of "gcc", so it can be a program name with args.
639 set dummy gcc; ac_word=$2
640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
641 echo "configure:642: checking for $ac_word" >&5
642 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
643 echo $ac_n "(cached) $ac_c" 1>&6
645 if test -n "$CC"; then
646 ac_cv_prog_CC="$CC" # Let the user override the test.
648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
661 if test -n "$CC"; then
662 echo "$ac_t""$CC" 1>&6
664 echo "$ac_t""no" 1>&6
667 if test -z "$CC"; then
668 # Extract the first word of "cc", so it can be a program name with args.
669 set dummy cc; ac_word=$2
670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
671 echo "configure:672: checking for $ac_word" >&5
672 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
673 echo $ac_n "(cached) $ac_c" 1>&6
675 if test -n "$CC"; then
676 ac_cv_prog_CC="$CC" # Let the user override the test.
678 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
681 for ac_dir in $ac_dummy; do
682 test -z "$ac_dir" && ac_dir=.
683 if test -f $ac_dir/$ac_word; then
684 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
693 if test $ac_prog_rejected = yes; then
694 # We found a bogon in the path, so make sure we never use it.
695 set dummy $ac_cv_prog_CC
697 if test $# -gt 0; then
698 # We chose a different compiler from the bogus one.
699 # However, it has the same basename, so the bogon will be chosen
700 # first if we set CC to just the basename; use the full file name.
702 set dummy "$ac_dir/$ac_word" "$@"
710 if test -n "$CC"; then
711 echo "$ac_t""$CC" 1>&6
713 echo "$ac_t""no" 1>&6
716 if test -z "$CC"; then
719 # Extract the first word of "cl", so it can be a program name with args.
720 set dummy cl; ac_word=$2
721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
722 echo "configure:723: checking for $ac_word" >&5
723 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
724 echo $ac_n "(cached) $ac_c" 1>&6
726 if test -n "$CC"; then
727 ac_cv_prog_CC="$CC" # Let the user override the test.
729 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
731 for ac_dir in $ac_dummy; do
732 test -z "$ac_dir" && ac_dir=.
733 if test -f $ac_dir/$ac_word; then
742 if test -n "$CC"; then
743 echo "$ac_t""$CC" 1>&6
745 echo "$ac_t""no" 1>&6
750 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
753 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
754 echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
757 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
758 ac_cpp='$CPP $CPPFLAGS'
759 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
760 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
761 cross_compiling=$ac_cv_prog_cc_cross
763 cat > conftest.$ac_ext << EOF
765 #line 766 "configure"
766 #include "confdefs.h"
770 if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
771 ac_cv_prog_cc_works=yes
772 # If we can't run a trivial program, we are probably using a cross compiler.
773 if (./conftest; exit) 2>/dev/null; then
774 ac_cv_prog_cc_cross=no
776 ac_cv_prog_cc_cross=yes
779 echo "configure: failed program was:" >&5
780 cat conftest.$ac_ext >&5
781 ac_cv_prog_cc_works=no
785 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
786 ac_cpp='$CPP $CPPFLAGS'
787 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
788 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
789 cross_compiling=$ac_cv_prog_cc_cross
791 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
792 if test $ac_cv_prog_cc_works = no; then
793 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
795 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
796 echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
797 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
798 cross_compiling=$ac_cv_prog_cc_cross
800 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
801 echo "configure:802: checking whether we are using GNU C" >&5
802 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
803 echo $ac_n "(cached) $ac_c" 1>&6
805 cat > conftest.c <<EOF
810 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
817 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
819 if test $ac_cv_prog_gcc = yes; then
825 ac_test_CFLAGS="${CFLAGS+set}"
826 ac_save_CFLAGS="$CFLAGS"
828 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
829 echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
830 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
831 echo $ac_n "(cached) $ac_c" 1>&6
833 echo 'void f(){}' > conftest.c
834 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
843 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
844 if test "$ac_test_CFLAGS" = set; then
845 CFLAGS="$ac_save_CFLAGS"
846 elif test $ac_cv_prog_cc_g = yes; then
847 if test "$GCC" = yes; then
853 if test "$GCC" = yes; then
860 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
861 echo "configure:862: checking how to run the C preprocessor" >&5
862 # On Suns, sometimes $CPP names a directory.
863 if test -n "$CPP" && test -d "$CPP"; then
866 if test -z "$CPP"; then
867 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
868 echo $ac_n "(cached) $ac_c" 1>&6
870 # This must be in double quotes, not single quotes, because CPP may get
871 # substituted into the Makefile and "${CC-cc}" will confuse make.
873 # On the NeXT, cc -E runs the code through the compiler's parser,
874 # not just through cpp.
875 cat > conftest.$ac_ext <<EOF
876 #line 877 "configure"
877 #include "confdefs.h"
881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
882 { (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
884 if test -z "$ac_err"; then
888 echo "configure: failed program was:" >&5
889 cat conftest.$ac_ext >&5
891 CPP="${CC-cc} -E -traditional-cpp"
892 cat > conftest.$ac_ext <<EOF
893 #line 894 "configure"
894 #include "confdefs.h"
898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
899 { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
901 if test -z "$ac_err"; then
905 echo "configure: failed program was:" >&5
906 cat conftest.$ac_ext >&5
908 CPP="${CC-cc} -nologo -E"
909 cat > conftest.$ac_ext <<EOF
910 #line 911 "configure"
911 #include "confdefs.h"
915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
916 { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
918 if test -z "$ac_err"; then
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
932 ac_cv_prog_CPP="$CPP"
934 CPP="$ac_cv_prog_CPP"
936 ac_cv_prog_CPP="$CPP"
938 echo "$ac_t""$CPP" 1>&6
942 CC_SHARED_OPTS=unknown
945 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
946 DFT_UPR_MODEL="NORMAL"
947 ECHO_LINK='@ echo linking $@ ... ;'
965 TINFO_ARGS='$(LIBS_CURSES)'
972 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
973 echo "configure:974: checking for Cygwin environment" >&5
974 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
975 echo $ac_n "(cached) $ac_c" 1>&6
977 cat > conftest.$ac_ext <<EOF
978 #line 979 "configure"
979 #include "confdefs.h"
984 #define __CYGWIN__ __CYGWIN32__
989 if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
993 echo "configure: failed program was:" >&5
994 cat conftest.$ac_ext >&5
1002 echo "$ac_t""$ac_cv_cygwin" 1>&6
1004 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1005 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1006 echo "configure:1007: checking for mingw32 environment" >&5
1007 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
1010 cat > conftest.$ac_ext <<EOF
1011 #line 1012 "configure"
1012 #include "confdefs.h"
1018 if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1031 echo "$ac_t""$ac_cv_mingw32" 1>&6
1033 test "$ac_cv_mingw32" = yes && MINGW32=yes
1036 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1037 echo "configure:1038: checking for executable suffix" >&5
1038 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1041 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1045 echo 'int main () { return 0; }' > conftest.$ac_ext
1047 if { (eval echo configure:1048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1048 for file in conftest.*; do
1050 *.c | *.o | *.obj) ;;
1051 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1055 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1058 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1063 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1064 echo "$ac_t""${ac_cv_exeext}" 1>&6
1067 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1068 echo "configure:1069: checking for object suffix" >&5
1069 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1073 echo 'int i = 1;' > conftest.$ac_ext
1074 if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1075 for ac_file in conftest.*; do
1078 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1082 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1087 echo "$ac_t""$ac_cv_objext" 1>&6
1088 OBJEXT=$ac_cv_objext
1089 ac_objext=$ac_cv_objext
1093 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1094 echo "configure:1095: checking for ${CC-cc} option to accept ANSI C" >&5
1095 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1096 echo $ac_n "(cached) $ac_c" 1>&6
1100 cf_save_CFLAGS="$CFLAGS"
1101 cf_save_CPPFLAGS="$CPPFLAGS"
1102 # Don't try gcc -ansi; that turns off useful extensions and
1103 # breaks some systems' header files.
1104 # AIX -qlanglvl=ansi
1105 # Ultrix and OSF/1 -std1
1106 # HP-UX -Aa -D_HPUX_SOURCE
1108 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1109 for cf_arg in "-DCC_HAS_PROTOS" \
1114 "-Aa -D_HPUX_SOURCE" \
1121 cf_new_extra_cppflags=
1123 for cf_add_cflags in $cf_arg
1125 case $cf_fix_cppflags in
1127 case $cf_add_cflags in #(vi
1128 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1129 case $cf_add_cflags in
1131 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1133 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1134 && test -z "${cf_tst_cflags}" \
1135 && cf_fix_cppflags=yes
1137 if test $cf_fix_cppflags = yes ; then
1138 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1140 elif test "${cf_tst_cflags}" = "\"'" ; then
1141 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1147 *$cf_add_cflags) #(vi
1150 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1155 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1160 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1162 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1164 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1165 && test -z "${cf_tst_cflags}" \
1166 && cf_fix_cppflags=no
1171 if test -n "$cf_new_cflags" ; then
1173 CFLAGS="$CFLAGS $cf_new_cflags"
1176 if test -n "$cf_new_cppflags" ; then
1178 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1181 if test -n "$cf_new_extra_cppflags" ; then
1183 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1189 cat > conftest.$ac_ext <<EOF
1190 #line 1191 "configure"
1191 #include "confdefs.h"
1193 #ifndef CC_HAS_PROTOS
1194 #if !defined(__STDC__) || (__STDC__ != 1)
1201 int test (int i, double x);
1202 struct s1 {int (*f) (int a);};
1203 struct s2 {int (*f) (double a);};
1206 if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1208 cf_cv_ansi_cc="$cf_arg"; break
1210 echo "configure: failed program was:" >&5
1211 cat conftest.$ac_ext >&5
1215 CFLAGS="$cf_save_CFLAGS"
1216 CPPFLAGS="$cf_save_CPPFLAGS"
1220 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1222 if test "$cf_cv_ansi_cc" != "no"; then
1223 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1228 cf_new_extra_cppflags=
1230 for cf_add_cflags in $cf_cv_ansi_cc
1232 case $cf_fix_cppflags in
1234 case $cf_add_cflags in #(vi
1235 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1236 case $cf_add_cflags in
1238 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1240 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1241 && test -z "${cf_tst_cflags}" \
1242 && cf_fix_cppflags=yes
1244 if test $cf_fix_cppflags = yes ; then
1245 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1247 elif test "${cf_tst_cflags}" = "\"'" ; then
1248 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1254 *$cf_add_cflags) #(vi
1257 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1262 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1267 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1269 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1271 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1272 && test -z "${cf_tst_cflags}" \
1273 && cf_fix_cppflags=no
1278 if test -n "$cf_new_cflags" ; then
1280 CFLAGS="$CFLAGS $cf_new_cflags"
1283 if test -n "$cf_new_cppflags" ; then
1285 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1288 if test -n "$cf_new_extra_cppflags" ; then
1290 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1297 cat >> confdefs.h <<\EOF
1298 #define CC_HAS_PROTOS 1
1305 if test "$cf_cv_ansi_cc" = "no"; then
1306 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1307 You have the following choices:
1308 a. adjust your compiler options
1309 b. get an up-to-date compiler
1310 c. use a wrapper such as unproto" 1>&2; exit 1; }
1318 if test "$GCC" = yes ; then
1321 echo $ac_n "checking if this is really Intel compiler""... $ac_c" 1>&6
1322 echo "configure:1323: checking if this is really Intel compiler" >&5
1323 cf_save_CFLAGS="$CFLAGS"
1324 CFLAGS="$CFLAGS -no-gcc"
1325 cat > conftest.$ac_ext <<EOF
1326 #line 1327 "configure"
1327 #include "confdefs.h"
1331 #ifdef __INTEL_COMPILER
1338 if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1341 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
1344 echo "configure: failed program was:" >&5
1345 cat conftest.$ac_ext >&5
1348 CFLAGS="$cf_save_CFLAGS"
1349 echo "$ac_t""$INTEL_COMPILER" 1>&6
1357 cf_POSIX_C_SOURCE=199506L
1359 case $host_os in #(vi
1361 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1364 # 5.x headers associate
1365 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1366 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1367 cf_POSIX_C_SOURCE=200112L
1369 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1372 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1375 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1381 if test "$INTEL_COMPILER" = no ; then
1382 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1383 echo "configure:1384: checking if we must define _GNU_SOURCE" >&5
1384 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1385 echo $ac_n "(cached) $ac_c" 1>&6
1388 cat > conftest.$ac_ext <<EOF
1389 #line 1390 "configure"
1390 #include "confdefs.h"
1391 #include <sys/types.h>
1394 #ifndef _XOPEN_SOURCE
1399 if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1407 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1408 cat > conftest.$ac_ext <<EOF
1409 #line 1410 "configure"
1410 #include "confdefs.h"
1411 #include <sys/types.h>
1414 #ifdef _XOPEN_SOURCE
1419 if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1423 echo "configure: failed program was:" >&5
1424 cat conftest.$ac_ext >&5
1426 cf_cv_gnu_source=yes
1436 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1437 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1442 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1445 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1448 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1451 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1454 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1457 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1460 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1461 echo "configure:1462: checking if we should define _XOPEN_SOURCE" >&5
1462 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1469 #include <sys/types.h>
1472 #ifndef _XOPEN_SOURCE
1477 if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1479 cf_cv_xopen_source=no
1481 echo "configure: failed program was:" >&5
1482 cat conftest.$ac_ext >&5
1485 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1486 cat > conftest.$ac_ext <<EOF
1487 #line 1488 "configure"
1488 #include "confdefs.h"
1489 #include <sys/types.h>
1492 #ifdef _XOPEN_SOURCE
1497 if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1499 cf_cv_xopen_source=no
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1504 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1514 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1515 test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1517 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1518 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1519 echo "configure:1520: checking if we should define _POSIX_C_SOURCE" >&5
1520 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1521 echo $ac_n "(cached) $ac_c" 1>&6
1525 echo "(line 1526) testing if the symbol is already defined go no further ..." 1>&5
1527 cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <sys/types.h>
1533 #ifndef _POSIX_C_SOURCE
1538 if { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1540 cf_cv_posix_c_source=no
1542 echo "configure: failed program was:" >&5
1543 cat conftest.$ac_ext >&5
1545 cf_want_posix_source=no
1546 case .$cf_POSIX_C_SOURCE in
1548 cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1551 cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1552 cf_want_posix_source=yes
1555 cf_want_posix_source=yes
1558 if test "$cf_want_posix_source" = yes ; then
1559 cat > conftest.$ac_ext <<EOF
1560 #line 1561 "configure"
1561 #include "confdefs.h"
1562 #include <sys/types.h>
1565 #ifdef _POSIX_SOURCE
1570 if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1573 echo "configure: failed program was:" >&5
1574 cat conftest.$ac_ext >&5
1576 cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE"
1581 echo "(line 1582) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1584 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
1586 echo "(line 1587) testing if the second compile does not leave our definition intact error ..." 1>&5
1588 cat > conftest.$ac_ext <<EOF
1589 #line 1590 "configure"
1590 #include "confdefs.h"
1591 #include <sys/types.h>
1594 #ifndef _POSIX_C_SOURCE
1599 if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1602 echo "configure: failed program was:" >&5
1603 cat conftest.$ac_ext >&5
1605 cf_cv_posix_c_source=no
1615 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
1616 test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
1624 # Check whether --with-curses-dir or --without-curses-dir was given.
1625 if test "${with_curses_dir+set}" = set; then
1626 withval="$with_curses_dir"
1628 case ".$withval" in #(vi
1629 .\$\(*\)*|.\'*\'*) #(vi
1633 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
1636 eval withval="$withval"
1637 case ".$withval" in #(vi
1639 withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
1644 withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
1647 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
1651 cf_cv_curses_dir=$withval
1659 # Check whether --with-5lib or --without-5lib was given.
1660 if test "${with_5lib+set}" = set; then
1661 withval="$with_5lib"
1662 LIBS="-L/usr/5lib $LIBS"
1663 CPPFLAGS="$CPPFLAGS -I/usr/5include"
1668 # Check whether --with-ncursesw or --without-ncursesw was given.
1669 if test "${with_ncursesw+set}" = set; then
1670 withval="$with_ncursesw"
1671 cf_cv_screen=ncursesw
1676 # Check whether --with-ncurses or --without-ncurses was given.
1677 if test "${with_ncurses+set}" = set; then
1678 withval="$with_ncurses"
1679 cf_cv_screen=ncurses
1683 case $cf_cv_screen in
1687 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
1688 echo "configure:1689: checking for extra include directories" >&5
1689 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
1690 echo $ac_n "(cached) $ac_c" 1>&6
1693 cf_cv_curses_incdir=no
1694 case $host_os in #(vi
1695 hpux10.*|hpux11.*) #(vi
1696 test -d /usr/include/curses_colr && \
1697 cf_cv_curses_incdir="-I/usr/include/curses_colr"
1700 test -d /usr/5lib && \
1701 test -d /usr/5include && \
1702 cf_cv_curses_incdir="-I/usr/5include"
1708 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
1709 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
1711 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
1712 echo "configure:1713: checking if we have identified curses headers" >&5
1713 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
1714 echo $ac_n "(cached) $ac_c" 1>&6
1717 cf_cv_ncurses_header=none
1724 cat > conftest.$ac_ext <<EOF
1725 #line 1726 "configure"
1726 #include "confdefs.h"
1727 #include <${cf_header}>
1729 initscr(); tgoto("?", 0,0)
1732 if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1734 cf_cv_ncurses_header=$cf_header; break
1736 echo "configure: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1744 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
1746 if test "$cf_cv_ncurses_header" = none ; then
1747 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
1750 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
1751 for ac_hdr in $cf_cv_ncurses_header
1753 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1754 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1755 echo "configure:1756: checking for $ac_hdr" >&5
1756 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1757 echo $ac_n "(cached) $ac_c" 1>&6
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1765 { (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1767 if test -z "$ac_err"; then
1769 eval "ac_cv_header_$ac_safe=yes"
1772 echo "configure: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1775 eval "ac_cv_header_$ac_safe=no"
1779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1780 echo "$ac_t""yes" 1>&6
1781 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1782 cat >> confdefs.h <<EOF
1783 #define $ac_tr_hdr 1
1787 echo "$ac_t""no" 1>&6
1794 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
1795 echo "configure:1796: checking for ncurses version" >&5
1796 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
1797 echo $ac_n "(cached) $ac_c" 1>&6
1800 cf_cv_ncurses_version=no
1803 if test "$cross_compiling" = yes; then
1806 # This will not work if the preprocessor splits the line after the
1807 # Autoconf token. The 'unproto' program does that.
1808 cat > conftest.$ac_ext <<EOF
1809 #include <${cf_cv_ncurses_header-curses.h}>
1811 #ifdef NCURSES_VERSION
1812 Autoconf NCURSES_VERSION
1820 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
1821 { (eval echo configure:1822: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
1822 if test -f conftest.out ; then
1823 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
1824 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
1829 cat > conftest.$ac_ext <<EOF
1830 #line 1831 "configure"
1831 #include "confdefs.h"
1833 #include <${cf_cv_ncurses_header-curses.h}>
1837 FILE *fp = fopen("$cf_tempfile", "w");
1838 #ifdef NCURSES_VERSION
1839 # ifdef NCURSES_VERSION_PATCH
1840 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
1842 fprintf(fp, "%s\n", NCURSES_VERSION);
1846 fprintf(fp, "old\n");
1854 if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1857 cf_cv_ncurses_version=`cat $cf_tempfile`
1859 echo "configure: failed program was:" >&5
1860 cat conftest.$ac_ext >&5
1869 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
1870 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
1877 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
1878 echo "configure:1879: checking if we have identified curses libraries" >&5
1879 cat > conftest.$ac_ext <<EOF
1880 #line 1881 "configure"
1881 #include "confdefs.h"
1882 #include <${cf_cv_ncurses_header-curses.h}>
1884 initscr(); tgoto("?", 0,0)
1887 if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1897 echo "$ac_t""$cf_result" 1>&6
1899 if test "$cf_result" = no ; then
1900 case $host_os in #(vi
1902 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
1903 echo "configure:1904: checking for tgoto in -lmytinfo" >&5
1904 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
1905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1908 ac_save_LIBS="$LIBS"
1909 LIBS="-lmytinfo $LIBS"
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 /* Override any gcc2 internal prototype to avoid an error. */
1914 /* We use char because int might match the return type of a gcc2
1915 builtin and then its argument prototype would still apply. */
1922 if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1924 eval "ac_cv_lib_$ac_lib_var=yes"
1926 echo "configure: failed program was:" >&5
1927 cat conftest.$ac_ext >&5
1929 eval "ac_cv_lib_$ac_lib_var=no"
1932 LIBS="$ac_save_LIBS"
1935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1936 echo "$ac_t""yes" 1>&6
1937 LIBS="-lmytinfo $LIBS"
1939 echo "$ac_t""no" 1>&6
1943 hpux10.*|hpux11.*) #(vi
1944 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
1945 echo "configure:1946: checking for initscr in -lcur_colr" >&5
1946 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
1947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1950 ac_save_LIBS="$LIBS"
1951 LIBS="-lcur_colr $LIBS"
1952 cat > conftest.$ac_ext <<EOF
1953 #line 1954 "configure"
1954 #include "confdefs.h"
1955 /* Override any gcc2 internal prototype to avoid an error. */
1956 /* We use char because int might match the return type of a gcc2
1957 builtin and then its argument prototype would still apply. */
1964 if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1966 eval "ac_cv_lib_$ac_lib_var=yes"
1968 echo "configure: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1971 eval "ac_cv_lib_$ac_lib_var=no"
1974 LIBS="$ac_save_LIBS"
1977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1978 echo "$ac_t""yes" 1>&6
1980 LIBS="-lcur_colr $LIBS"
1981 ac_cv_func_initscr=yes
1984 echo "$ac_t""no" 1>&6
1986 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
1987 echo "configure:1988: checking for initscr in -lHcurses" >&5
1988 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
1989 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1990 echo $ac_n "(cached) $ac_c" 1>&6
1992 ac_save_LIBS="$LIBS"
1993 LIBS="-lHcurses $LIBS"
1994 cat > conftest.$ac_ext <<EOF
1995 #line 1996 "configure"
1996 #include "confdefs.h"
1997 /* Override any gcc2 internal prototype to avoid an error. */
1998 /* We use char because int might match the return type of a gcc2
1999 builtin and then its argument prototype would still apply. */
2006 if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2008 eval "ac_cv_lib_$ac_lib_var=yes"
2010 echo "configure: failed program was:" >&5
2011 cat conftest.$ac_ext >&5
2013 eval "ac_cv_lib_$ac_lib_var=no"
2016 LIBS="$ac_save_LIBS"
2019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2020 echo "$ac_t""yes" 1>&6
2022 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2023 LIBS="-lHcurses $LIBS"
2024 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2025 ac_cv_func_initscr=yes
2028 echo "$ac_t""no" 1>&6
2034 linux*) # Suse Linux does not follow /usr/lib convention
2038 test -d /usr/5lib && \
2039 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2040 ac_cv_func_initscr=yes
2044 if test ".$ac_cv_func_initscr" != .yes ; then
2045 cf_save_LIBS="$LIBS"
2049 if test ".${cf_cv_ncurses_version-no}" != .no
2051 cf_check_list="ncurses curses cursesX"
2053 cf_check_list="cursesX curses ncurses"
2056 # Check for library containing tgoto. Do this before curses library
2057 # because it may be needed to link the test-case for initscr.
2058 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2059 echo "configure:2060: checking for tgoto" >&5
2060 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2061 echo $ac_n "(cached) $ac_c" 1>&6
2063 cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 /* System header to define __stub macros and hopefully few prototypes,
2067 which can conflict with char tgoto(); below. */
2069 /* Override any gcc2 internal prototype to avoid an error. */
2070 /* We use char because int might match the return type of a gcc2
2071 builtin and then its argument prototype would still apply. */
2076 /* The GNU C library defines this for functions which it implements
2077 to always fail with ENOSYS. Some functions are actually named
2078 something starting with __ and the normal name is an alias. */
2079 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2087 if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2089 eval "ac_cv_func_tgoto=yes"
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2094 eval "ac_cv_func_tgoto=no"
2099 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2100 echo "$ac_t""yes" 1>&6
2101 cf_term_lib=predefined
2103 echo "$ac_t""no" 1>&6
2105 for cf_term_lib in $cf_check_list termcap termlib unknown
2107 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2108 echo "configure:2109: checking for tgoto in -l$cf_term_lib" >&5
2109 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2110 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2111 echo $ac_n "(cached) $ac_c" 1>&6
2113 ac_save_LIBS="$LIBS"
2114 LIBS="-l$cf_term_lib $LIBS"
2115 cat > conftest.$ac_ext <<EOF
2116 #line 2117 "configure"
2117 #include "confdefs.h"
2118 /* Override any gcc2 internal prototype to avoid an error. */
2119 /* We use char because int might match the return type of a gcc2
2120 builtin and then its argument prototype would still apply. */
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2129 eval "ac_cv_lib_$ac_lib_var=yes"
2131 echo "configure: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
2134 eval "ac_cv_lib_$ac_lib_var=no"
2137 LIBS="$ac_save_LIBS"
2140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2141 echo "$ac_t""yes" 1>&6
2144 echo "$ac_t""no" 1>&6
2152 # Check for library containing initscr
2153 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2154 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2156 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2157 echo "configure:2158: checking for initscr in -l$cf_curs_lib" >&5
2158 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2160 echo $ac_n "(cached) $ac_c" 1>&6
2162 ac_save_LIBS="$LIBS"
2163 LIBS="-l$cf_curs_lib $LIBS"
2164 cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 /* Override any gcc2 internal prototype to avoid an error. */
2168 /* We use char because int might match the return type of a gcc2
2169 builtin and then its argument prototype would still apply. */
2176 if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2178 eval "ac_cv_lib_$ac_lib_var=yes"
2180 echo "configure: failed program was:" >&5
2181 cat conftest.$ac_ext >&5
2183 eval "ac_cv_lib_$ac_lib_var=no"
2186 LIBS="$ac_save_LIBS"
2189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2190 echo "$ac_t""yes" 1>&6
2193 echo "$ac_t""no" 1>&6
2197 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2199 LIBS="-l$cf_curs_lib $cf_save_LIBS"
2200 if test "$cf_term_lib" = unknown ; then
2201 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2202 echo "configure:2203: checking if we can link with $cf_curs_lib library" >&5
2203 cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 #include <${cf_cv_ncurses_header-curses.h}>
2211 if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2215 echo "configure: failed program was:" >&5
2216 cat conftest.$ac_ext >&5
2221 echo "$ac_t""$cf_result" 1>&6
2222 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2223 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
2225 elif test "$cf_term_lib" != predefined ; then
2226 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2227 echo "configure:2228: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2228 cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #include <${cf_cv_ncurses_header-curses.h}>
2233 initscr(); tgoto((char *)0, 0, 0);
2236 if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2240 echo "configure: failed program was:" >&5
2241 cat conftest.$ac_ext >&5
2244 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
2245 cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <${cf_cv_ncurses_header-curses.h}>
2253 if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2266 echo "$ac_t""$cf_result" 1>&6
2276 cf_ncuhdr_root=ncurses
2278 test -n "$cf_cv_curses_dir" && \
2279 test "$cf_cv_curses_dir" != "no" && \
2280 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2282 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2283 echo "configure:2284: checking for $cf_ncuhdr_root header in include-path" >&5
2284 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2285 echo $ac_n "(cached) $ac_c" 1>&6
2288 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2289 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2290 for cf_header in $cf_header_list
2293 cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2298 #include <$cf_header>
2301 #ifdef NCURSES_VERSION
2303 printf("%s\n", NCURSES_VERSION);
2315 if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2317 cf_cv_ncurses_h=$cf_header
2320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2327 test "$cf_cv_ncurses_h" != no && break
2332 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2334 if test "$cf_cv_ncurses_h" != no ; then
2335 cf_cv_ncurses_header=$cf_cv_ncurses_h
2337 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2338 echo "configure:2339: checking for $cf_ncuhdr_root include-path" >&5
2339 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2340 echo $ac_n "(cached) $ac_c" 1>&6
2343 test -n "$verbose" && echo
2347 test -n "$verbose" && echo " ... testing include-directories under $HOME"
2348 test -d $HOME/include && cf_search="$cf_search $HOME/include"
2349 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
2350 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
2353 # For other stuff under the home directory, it should be sufficient to put
2354 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
2355 test -d $HOME/$cf_ncuhdr_root && {
2356 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
2357 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
2358 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2361 test "$prefix" != /usr/local && \
2362 test -d /usr/local && {
2363 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
2364 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
2365 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
2366 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
2367 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
2368 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2371 test "$prefix" != NONE && \
2372 test -d $prefix && {
2373 test -n "$verbose" && echo " ... testing include-directories under $prefix"
2374 test -d $prefix/include && cf_search="$cf_search $prefix/include"
2375 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
2376 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
2377 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
2378 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2381 test "$prefix" != /opt && \
2383 test -n "$verbose" && echo " ... testing include-directories under /opt"
2384 test -d /opt/include && cf_search="$cf_search /opt/include"
2385 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
2386 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
2387 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
2388 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2391 test "$prefix" != /usr && \
2393 test -n "$verbose" && echo " ... testing include-directories under /usr"
2394 test -d /usr/include && cf_search="$cf_search /usr/include"
2395 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
2396 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
2397 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
2400 test "$includedir" != NONE && \
2401 test "$includedir" != "/usr/include" && \
2402 test -d "$includedir" && {
2403 test -d $includedir && cf_search="$cf_search $includedir"
2404 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
2407 test "$oldincludedir" != NONE && \
2408 test "$oldincludedir" != "/usr/include" && \
2409 test -d "$oldincludedir" && {
2410 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
2411 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
2415 test -n "$verbose" && echo search path $cf_search
2416 cf_save2_CPPFLAGS="$CPPFLAGS"
2417 for cf_incdir in $cf_search
2420 for cf_add_incdir in $cf_incdir
2424 case $cf_add_incdir in
2427 /usr/local/include) # (vi
2428 if test "$GCC" = yes
2430 cf_save_CPPFLAGS="$CPPFLAGS"
2431 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2432 cat > conftest.$ac_ext <<EOF
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2440 if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2443 echo "configure: failed program was:" >&5
2444 cat conftest.$ac_ext >&5
2446 CPPFLAGS="$cf_save_CPPFLAGS"
2452 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2455 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2456 test "$cf_top_incdir" = "$cf_add_incdir" && break
2457 cf_add_incdir="$cf_top_incdir"
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2471 #include <$cf_header>
2474 #ifdef NCURSES_VERSION
2476 printf("%s\n", NCURSES_VERSION);
2488 if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2490 cf_cv_ncurses_h2=$cf_header
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2500 if test "$cf_cv_ncurses_h2" != no ; then
2501 cf_cv_ncurses_h2=$cf_incdir/$cf_header
2502 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
2505 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
2507 CPPFLAGS="$cf_save2_CPPFLAGS"
2508 test "$cf_cv_ncurses_h2" != no && break
2510 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
2514 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
2516 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
2517 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
2518 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
2519 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
2522 for cf_add_incdir in $cf_1st_incdir
2526 case $cf_add_incdir in
2529 /usr/local/include) # (vi
2530 if test "$GCC" = yes
2532 cf_save_CPPFLAGS="$CPPFLAGS"
2533 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2542 if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2545 echo "configure: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2548 CPPFLAGS="$cf_save_CPPFLAGS"
2554 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2557 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2558 test "$cf_top_incdir" = "$cf_add_incdir" && break
2559 cf_add_incdir="$cf_top_incdir"
2566 cat >> confdefs.h <<\EOF
2571 case $cf_cv_ncurses_header in # (vi
2573 cat >> confdefs.h <<\EOF
2574 #define HAVE_NCURSES_H 1
2580 case $cf_cv_ncurses_header in # (vi
2581 ncurses/curses.h|ncurses/ncurses.h)
2582 cat >> confdefs.h <<\EOF
2583 #define HAVE_NCURSES_NCURSES_H 1
2587 ncursesw/curses.h|ncursesw/ncurses.h)
2588 cat >> confdefs.h <<\EOF
2589 #define HAVE_NCURSESW_NCURSES_H 1
2596 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2597 echo "configure:2598: checking for ncurses version" >&5
2598 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2599 echo $ac_n "(cached) $ac_c" 1>&6
2602 cf_cv_ncurses_version=no
2605 if test "$cross_compiling" = yes; then
2608 # This will not work if the preprocessor splits the line after the
2609 # Autoconf token. The 'unproto' program does that.
2610 cat > conftest.$ac_ext <<EOF
2611 #include <${cf_cv_ncurses_header-curses.h}>
2613 #ifdef NCURSES_VERSION
2614 Autoconf NCURSES_VERSION
2622 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2623 { (eval echo configure:2624: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2624 if test -f conftest.out ; then
2625 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2626 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2631 cat > conftest.$ac_ext <<EOF
2632 #line 2633 "configure"
2633 #include "confdefs.h"
2635 #include <${cf_cv_ncurses_header-curses.h}>
2639 FILE *fp = fopen("$cf_tempfile", "w");
2640 #ifdef NCURSES_VERSION
2641 # ifdef NCURSES_VERSION_PATCH
2642 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2644 fprintf(fp, "%s\n", NCURSES_VERSION);
2648 fprintf(fp, "old\n");
2656 if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2659 cf_cv_ncurses_version=`cat $cf_tempfile`
2661 echo "configure: failed program was:" >&5
2662 cat conftest.$ac_ext >&5
2671 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2672 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2680 cf_nculib_root=ncurses
2681 # This works, except for the special case where we find gpm, but
2682 # ncurses is in a nonstandard location via $LIBS, and we really want
2685 cf_ncurses_SAVE="$LIBS"
2686 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2687 echo "configure:2688: checking for Gpm_Open in -lgpm" >&5
2688 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2689 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2690 echo $ac_n "(cached) $ac_c" 1>&6
2692 ac_save_LIBS="$LIBS"
2694 cat > conftest.$ac_ext <<EOF
2695 #line 2696 "configure"
2696 #include "confdefs.h"
2697 /* Override any gcc2 internal prototype to avoid an error. */
2698 /* We use char because int might match the return type of a gcc2
2699 builtin and then its argument prototype would still apply. */
2706 if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2708 eval "ac_cv_lib_$ac_lib_var=yes"
2710 echo "configure: failed program was:" >&5
2711 cat conftest.$ac_ext >&5
2713 eval "ac_cv_lib_$ac_lib_var=no"
2716 LIBS="$ac_save_LIBS"
2719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2720 echo "$ac_t""yes" 1>&6
2721 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
2722 echo "configure:2723: checking for initscr in -lgpm" >&5
2723 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
2724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2725 echo $ac_n "(cached) $ac_c" 1>&6
2727 ac_save_LIBS="$LIBS"
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2731 "configure"
2731 #include "confdefs.h"
2732 /* Override any gcc2 internal prototype to avoid an error. */
2733 /* We use char because int might match the return type of a gcc2
2734 builtin and then its argument prototype would still apply. */
2741 if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2743 eval "ac_cv_lib_$ac_lib_var=yes"
2745 echo "configure: failed program was:" >&5
2746 cat conftest.$ac_ext >&5
2748 eval "ac_cv_lib_$ac_lib_var=no"
2751 LIBS="$ac_save_LIBS"
2754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2755 echo "$ac_t""yes" 1>&6
2756 LIBS="$cf_ncurses_SAVE"
2758 echo "$ac_t""no" 1>&6
2759 cf_ncurses_LIBS="-lgpm"
2763 echo "$ac_t""no" 1>&6
2767 case $host_os in #(vi
2769 # This is only necessary if you are linking against an obsolete
2770 # version of ncurses (but it should do no harm, since it's static).
2771 if test "$cf_nculib_root" = ncurses ; then
2772 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2773 echo "configure:2774: checking for tgoto in -lmytinfo" >&5
2774 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2776 echo $ac_n "(cached) $ac_c" 1>&6
2778 ac_save_LIBS="$LIBS"
2779 LIBS="-lmytinfo $LIBS"
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 /* Override any gcc2 internal prototype to avoid an error. */
2784 /* We use char because int might match the return type of a gcc2
2785 builtin and then its argument prototype would still apply. */
2792 if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2794 eval "ac_cv_lib_$ac_lib_var=yes"
2796 echo "configure: failed program was:" >&5
2797 cat conftest.$ac_ext >&5
2799 eval "ac_cv_lib_$ac_lib_var=no"
2802 LIBS="$ac_save_LIBS"
2805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2806 echo "$ac_t""yes" 1>&6
2807 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
2809 echo "$ac_t""no" 1>&6
2816 LIBS="$cf_ncurses_LIBS $LIBS"
2818 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
2820 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
2823 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
2825 echo $ac_n "checking for initscr""... $ac_c" 1>&6
2826 echo "configure:2827: checking for initscr" >&5
2827 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
2828 echo $ac_n "(cached) $ac_c" 1>&6
2830 cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 /* System header to define __stub macros and hopefully few prototypes,
2834 which can conflict with char initscr(); below. */
2836 /* Override any gcc2 internal prototype to avoid an error. */
2837 /* We use char because int might match the return type of a gcc2
2838 builtin and then its argument prototype would still apply. */
2843 /* The GNU C library defines this for functions which it implements
2844 to always fail with ENOSYS. Some functions are actually named
2845 something starting with __ and the normal name is an alias. */
2846 #if defined (__stub_initscr) || defined (__stub___initscr)
2854 if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2856 eval "ac_cv_func_initscr=yes"
2858 echo "configure: failed program was:" >&5
2859 cat conftest.$ac_ext >&5
2861 eval "ac_cv_func_initscr=no"
2866 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
2867 echo "$ac_t""yes" 1>&6
2868 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2870 echo "$ac_t""no" 1>&6
2872 cf_save_LIBS="$LIBS"
2873 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
2874 echo "configure:2875: checking for initscr in -l$cf_nculib_root" >&5
2875 LIBS="-l$cf_nculib_root $LIBS"
2876 cat > conftest.$ac_ext <<EOF
2877 #line 2878 "configure"
2878 #include "confdefs.h"
2879 #include <${cf_cv_ncurses_header-curses.h}>
2884 if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2886 echo "$ac_t""yes" 1>&6
2887 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2893 echo "$ac_t""no" 1>&6
2897 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
2898 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
2899 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
2900 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
2903 # For other stuff under the home directory, it should be sufficient to put
2904 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
2905 test -d $HOME/$cf_nculib_root && {
2906 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
2907 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
2908 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
2911 test "$prefix" != /usr/local && \
2912 test -d /usr/local && {
2913 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
2914 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
2915 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
2916 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
2917 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
2918 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
2921 test "$prefix" != NONE && \
2922 test -d $prefix && {
2923 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
2924 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
2925 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
2926 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
2927 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
2928 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
2931 test "$prefix" != /opt && \
2933 test -n "$verbose" && echo " ... testing lib-directories under /opt"
2934 test -d /opt/lib && cf_search="$cf_search /opt/lib"
2935 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
2936 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
2937 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
2938 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
2941 test "$prefix" != /usr && \
2943 test -n "$verbose" && echo " ... testing lib-directories under /usr"
2944 test -d /usr/lib && cf_search="$cf_search /usr/lib"
2945 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
2946 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
2947 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
2950 for cf_libdir in $cf_search
2952 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
2953 echo "configure:2954: checking for -l$cf_nculib_root in $cf_libdir" >&5
2954 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
2955 cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958 #include <${cf_cv_ncurses_header-curses.h}>
2963 if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2965 echo "$ac_t""yes" 1>&6
2966 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2969 echo "configure: failed program was:" >&5
2970 cat conftest.$ac_ext >&5
2972 echo "$ac_t""no" 1>&6
2973 LIBS="$cf_save_LIBS"
2983 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
2985 if test $cf_found_library = no ; then
2986 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
2992 if test -n "$cf_ncurses_LIBS" ; then
2993 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
2994 echo "configure:2995: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
2995 cf_ncurses_SAVE="$LIBS"
2996 for p in $cf_ncurses_LIBS ; do
2997 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
2998 if test "$q" != "$LIBS" ; then
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3005 #include <${cf_cv_ncurses_header-curses.h}>
3007 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3010 if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3012 echo "$ac_t""yes" 1>&6
3014 echo "configure: failed program was:" >&5
3015 cat conftest.$ac_ext >&5
3017 echo "$ac_t""no" 1>&6
3018 LIBS="$cf_ncurses_SAVE"
3024 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3026 cat >> confdefs.h <<EOF
3027 #define $cf_nculib_ROOT 1
3036 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
3037 echo "configure:3038: checking for multibyte character support" >&5
3038 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
3039 echo $ac_n "(cached) $ac_c" 1>&6
3042 cf_save_LIBS="$LIBS"
3043 cat > conftest.$ac_ext <<EOF
3044 #line 3045 "configure"
3045 #include "confdefs.h"
3052 if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3056 echo "configure: failed program was:" >&5
3057 cat conftest.$ac_ext >&5
3060 cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3064 #include <libutf8.h>
3069 if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3071 cf_cv_utf8_lib=add-on
3073 echo "configure: failed program was:" >&5
3074 cat conftest.$ac_ext >&5
3079 LIBS="$cf_save_LIBS"
3085 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
3087 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
3089 if test "$cf_cv_utf8_lib" = "add-on" ; then
3090 cat >> confdefs.h <<\EOF
3091 #define HAVE_LIBUTF8_H 1
3099 cf_ncuhdr_root=ncursesw
3101 test -n "$cf_cv_curses_dir" && \
3102 test "$cf_cv_curses_dir" != "no" && \
3103 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3105 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3106 echo "configure:3107: checking for $cf_ncuhdr_root header in include-path" >&5
3107 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3108 echo $ac_n "(cached) $ac_c" 1>&6
3111 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3112 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3113 for cf_header in $cf_header_list
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3121 #define _XOPEN_SOURCE_EXTENDED
3122 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3123 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3125 #include <$cf_header>
3128 #ifdef NCURSES_VERSION
3134 printf("%s\n", NCURSES_VERSION);
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3148 cf_cv_ncurses_h=$cf_header
3151 echo "configure: failed program was:" >&5
3152 cat conftest.$ac_ext >&5
3158 test "$cf_cv_ncurses_h" != no && break
3163 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3165 if test "$cf_cv_ncurses_h" != no ; then
3166 cf_cv_ncurses_header=$cf_cv_ncurses_h
3168 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3169 echo "configure:3170: checking for $cf_ncuhdr_root include-path" >&5
3170 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3171 echo $ac_n "(cached) $ac_c" 1>&6
3174 test -n "$verbose" && echo
3178 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3179 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3180 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3181 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3184 # For other stuff under the home directory, it should be sufficient to put
3185 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3186 test -d $HOME/$cf_ncuhdr_root && {
3187 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3188 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3189 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3192 test "$prefix" != /usr/local && \
3193 test -d /usr/local && {
3194 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3195 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3196 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3197 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3198 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3199 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3202 test "$prefix" != NONE && \
3203 test -d $prefix && {
3204 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3205 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3206 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3207 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3208 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3209 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3212 test "$prefix" != /opt && \
3214 test -n "$verbose" && echo " ... testing include-directories under /opt"
3215 test -d /opt/include && cf_search="$cf_search /opt/include"
3216 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3217 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3218 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3219 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3222 test "$prefix" != /usr && \
3224 test -n "$verbose" && echo " ... testing include-directories under /usr"
3225 test -d /usr/include && cf_search="$cf_search /usr/include"
3226 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3227 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3228 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3231 test "$includedir" != NONE && \
3232 test "$includedir" != "/usr/include" && \
3233 test -d "$includedir" && {
3234 test -d $includedir && cf_search="$cf_search $includedir"
3235 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3238 test "$oldincludedir" != NONE && \
3239 test "$oldincludedir" != "/usr/include" && \
3240 test -d "$oldincludedir" && {
3241 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3242 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3246 test -n "$verbose" && echo search path $cf_search
3247 cf_save2_CPPFLAGS="$CPPFLAGS"
3248 for cf_incdir in $cf_search
3251 for cf_add_incdir in $cf_incdir
3255 case $cf_add_incdir in
3258 /usr/local/include) # (vi
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
3277 CPPFLAGS="$cf_save_CPPFLAGS"
3283 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3286 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3287 test "$cf_top_incdir" = "$cf_add_incdir" && break
3288 cf_add_incdir="$cf_top_incdir"
3297 cat > conftest.$ac_ext <<EOF
3298 #line 3299 "configure"
3299 #include "confdefs.h"
3302 #define _XOPEN_SOURCE_EXTENDED
3303 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3304 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3306 #include <$cf_header>
3309 #ifdef NCURSES_VERSION
3315 printf("%s\n", NCURSES_VERSION);
3327 if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3329 cf_cv_ncurses_h2=$cf_header
3332 echo "configure: failed program was:" >&5
3333 cat conftest.$ac_ext >&5
3339 if test "$cf_cv_ncurses_h2" != no ; then
3340 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3341 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3344 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3346 CPPFLAGS="$cf_save2_CPPFLAGS"
3347 test "$cf_cv_ncurses_h2" != no && break
3349 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3353 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3355 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3356 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3357 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3358 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3361 for cf_add_incdir in $cf_1st_incdir
3365 case $cf_add_incdir in
3368 /usr/local/include) # (vi
3369 if test "$GCC" = yes
3371 cf_save_CPPFLAGS="$CPPFLAGS"
3372 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3373 cat > conftest.$ac_ext <<EOF
3374 #line 3375 "configure"
3375 #include "confdefs.h"
3381 if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3384 echo "configure: failed program was:" >&5
3385 cat conftest.$ac_ext >&5
3387 CPPFLAGS="$cf_save_CPPFLAGS"
3393 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3396 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3397 test "$cf_top_incdir" = "$cf_add_incdir" && break
3398 cf_add_incdir="$cf_top_incdir"
3405 cat >> confdefs.h <<\EOF
3410 case $cf_cv_ncurses_header in # (vi
3412 cat >> confdefs.h <<\EOF
3413 #define HAVE_NCURSES_H 1
3419 case $cf_cv_ncurses_header in # (vi
3420 ncurses/curses.h|ncurses/ncurses.h)
3421 cat >> confdefs.h <<\EOF
3422 #define HAVE_NCURSES_NCURSES_H 1
3426 ncursesw/curses.h|ncursesw/ncurses.h)
3427 cat >> confdefs.h <<\EOF
3428 #define HAVE_NCURSESW_NCURSES_H 1
3435 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3436 echo "configure:3437: checking for ncurses version" >&5
3437 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3438 echo $ac_n "(cached) $ac_c" 1>&6
3441 cf_cv_ncurses_version=no
3444 if test "$cross_compiling" = yes; then
3447 # This will not work if the preprocessor splits the line after the
3448 # Autoconf token. The 'unproto' program does that.
3449 cat > conftest.$ac_ext <<EOF
3450 #include <${cf_cv_ncurses_header-curses.h}>
3452 #ifdef NCURSES_VERSION
3453 Autoconf NCURSES_VERSION
3461 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3462 { (eval echo configure:3463: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3463 if test -f conftest.out ; then
3464 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3465 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3474 #include <${cf_cv_ncurses_header-curses.h}>
3478 FILE *fp = fopen("$cf_tempfile", "w");
3479 #ifdef NCURSES_VERSION
3480 # ifdef NCURSES_VERSION_PATCH
3481 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3483 fprintf(fp, "%s\n", NCURSES_VERSION);
3487 fprintf(fp, "old\n");
3495 if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3498 cf_cv_ncurses_version=`cat $cf_tempfile`
3500 echo "configure: failed program was:" >&5
3501 cat conftest.$ac_ext >&5
3510 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3511 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3519 cf_nculib_root=ncursesw
3520 # This works, except for the special case where we find gpm, but
3521 # ncurses is in a nonstandard location via $LIBS, and we really want
3524 cf_ncurses_SAVE="$LIBS"
3525 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3526 echo "configure:3527: checking for Gpm_Open in -lgpm" >&5
3527 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3528 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3529 echo $ac_n "(cached) $ac_c" 1>&6
3531 ac_save_LIBS="$LIBS"
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3536 /* Override any gcc2 internal prototype to avoid an error. */
3537 /* We use char because int might match the return type of a gcc2
3538 builtin and then its argument prototype would still apply. */
3545 if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547 eval "ac_cv_lib_$ac_lib_var=yes"
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
3552 eval "ac_cv_lib_$ac_lib_var=no"
3555 LIBS="$ac_save_LIBS"
3558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3559 echo "$ac_t""yes" 1>&6
3560 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3561 echo "configure:3562: checking for initscr in -lgpm" >&5
3562 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3564 echo $ac_n "(cached) $ac_c" 1>&6
3566 ac_save_LIBS="$LIBS"
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* Override any gcc2 internal prototype to avoid an error. */
3572 /* We use char because int might match the return type of a gcc2
3573 builtin and then its argument prototype would still apply. */
3580 if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3582 eval "ac_cv_lib_$ac_lib_var=yes"
3584 echo "configure: failed program was:" >&5
3585 cat conftest.$ac_ext >&5
3587 eval "ac_cv_lib_$ac_lib_var=no"
3590 LIBS="$ac_save_LIBS"
3593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3594 echo "$ac_t""yes" 1>&6
3595 LIBS="$cf_ncurses_SAVE"
3597 echo "$ac_t""no" 1>&6
3598 cf_ncurses_LIBS="-lgpm"
3602 echo "$ac_t""no" 1>&6
3606 case $host_os in #(vi
3608 # This is only necessary if you are linking against an obsolete
3609 # version of ncurses (but it should do no harm, since it's static).
3610 if test "$cf_nculib_root" = ncurses ; then
3611 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3612 echo "configure:3613: checking for tgoto in -lmytinfo" >&5
3613 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3614 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3615 echo $ac_n "(cached) $ac_c" 1>&6
3617 ac_save_LIBS="$LIBS"
3618 LIBS="-lmytinfo $LIBS"
3619 cat > conftest.$ac_ext <<EOF
3620 #line 3621 "configure"
3621 #include "confdefs.h"
3622 /* Override any gcc2 internal prototype to avoid an error. */
3623 /* We use char because int might match the return type of a gcc2
3624 builtin and then its argument prototype would still apply. */
3631 if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3633 eval "ac_cv_lib_$ac_lib_var=yes"
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3638 eval "ac_cv_lib_$ac_lib_var=no"
3641 LIBS="$ac_save_LIBS"
3644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3645 echo "$ac_t""yes" 1>&6
3646 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3648 echo "$ac_t""no" 1>&6
3655 LIBS="$cf_ncurses_LIBS $LIBS"
3657 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3659 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3662 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3664 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3665 echo "configure:3666: checking for initscr" >&5
3666 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3667 echo $ac_n "(cached) $ac_c" 1>&6
3669 cat > conftest.$ac_ext <<EOF
3670 #line 3671 "configure"
3671 #include "confdefs.h"
3672 /* System header to define __stub macros and hopefully few prototypes,
3673 which can conflict with char initscr(); below. */
3675 /* Override any gcc2 internal prototype to avoid an error. */
3676 /* We use char because int might match the return type of a gcc2
3677 builtin and then its argument prototype would still apply. */
3682 /* The GNU C library defines this for functions which it implements
3683 to always fail with ENOSYS. Some functions are actually named
3684 something starting with __ and the normal name is an alias. */
3685 #if defined (__stub_initscr) || defined (__stub___initscr)
3693 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3695 eval "ac_cv_func_initscr=yes"
3697 echo "configure: failed program was:" >&5
3698 cat conftest.$ac_ext >&5
3700 eval "ac_cv_func_initscr=no"
3705 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3706 echo "$ac_t""yes" 1>&6
3707 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3709 echo "$ac_t""no" 1>&6
3711 cf_save_LIBS="$LIBS"
3712 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3713 echo "configure:3714: checking for initscr in -l$cf_nculib_root" >&5
3714 LIBS="-l$cf_nculib_root $LIBS"
3715 cat > conftest.$ac_ext <<EOF
3716 #line 3717 "configure"
3717 #include "confdefs.h"
3718 #include <${cf_cv_ncurses_header-curses.h}>
3723 if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3725 echo "$ac_t""yes" 1>&6
3726 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3729 echo "configure: failed program was:" >&5
3730 cat conftest.$ac_ext >&5
3732 echo "$ac_t""no" 1>&6
3736 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3737 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
3738 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3739 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3742 # For other stuff under the home directory, it should be sufficient to put
3743 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3744 test -d $HOME/$cf_nculib_root && {
3745 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3746 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3747 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3750 test "$prefix" != /usr/local && \
3751 test -d /usr/local && {
3752 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3753 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3754 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3755 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3756 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3757 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3760 test "$prefix" != NONE && \
3761 test -d $prefix && {
3762 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3763 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3764 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3765 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3766 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3767 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3770 test "$prefix" != /opt && \
3772 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3773 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3774 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3775 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3776 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3777 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3780 test "$prefix" != /usr && \
3782 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3783 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3784 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3785 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3786 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3789 for cf_libdir in $cf_search
3791 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3792 echo "configure:3793: checking for -l$cf_nculib_root in $cf_libdir" >&5
3793 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3794 cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <${cf_cv_ncurses_header-curses.h}>
3802 if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3804 echo "$ac_t""yes" 1>&6
3805 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3808 echo "configure: failed program was:" >&5
3809 cat conftest.$ac_ext >&5
3811 echo "$ac_t""no" 1>&6
3812 LIBS="$cf_save_LIBS"
3822 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3824 if test $cf_found_library = no ; then
3825 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3831 if test -n "$cf_ncurses_LIBS" ; then
3832 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3833 echo "configure:3834: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3834 cf_ncurses_SAVE="$LIBS"
3835 for p in $cf_ncurses_LIBS ; do
3836 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3837 if test "$q" != "$LIBS" ; then
3841 cat > conftest.$ac_ext <<EOF
3842 #line 3843 "configure"
3843 #include "confdefs.h"
3844 #include <${cf_cv_ncurses_header-curses.h}>
3846 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3849 if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3851 echo "$ac_t""yes" 1>&6
3853 echo "configure: failed program was:" >&5
3854 cat conftest.$ac_ext >&5
3856 echo "$ac_t""no" 1>&6
3857 LIBS="$cf_ncurses_SAVE"
3863 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3865 cat >> confdefs.h <<EOF
3866 #define $cf_nculib_ROOT 1
3876 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
3877 echo "configure:3878: checking for new_panel in -lpanel$cf_cv_libtype" >&5
3878 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
3879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3882 ac_save_LIBS="$LIBS"
3883 LIBS="-lpanel$cf_cv_libtype $LIBS"
3884 cat > conftest.$ac_ext <<EOF
3885 #line 3886 "configure"
3886 #include "confdefs.h"
3887 /* Override any gcc2 internal prototype to avoid an error. */
3888 /* We use char because int might match the return type of a gcc2
3889 builtin and then its argument prototype would still apply. */
3896 if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3898 eval "ac_cv_lib_$ac_lib_var=yes"
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3903 eval "ac_cv_lib_$ac_lib_var=no"
3906 LIBS="$ac_save_LIBS"
3909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3910 echo "$ac_t""yes" 1>&6
3911 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3912 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3913 cat >> confdefs.h <<EOF
3914 #define $ac_tr_lib 1
3917 LIBS="-lpanel$cf_cv_libtype $LIBS"
3920 echo "$ac_t""no" 1>&6
3923 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
3924 echo "configure:3925: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
3925 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
3926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3927 echo $ac_n "(cached) $ac_c" 1>&6
3929 ac_save_LIBS="$LIBS"
3930 LIBS="-lmenu$cf_cv_libtype $LIBS"
3931 cat > conftest.$ac_ext <<EOF
3932 #line 3933 "configure"
3933 #include "confdefs.h"
3934 /* Override any gcc2 internal prototype to avoid an error. */
3935 /* We use char because int might match the return type of a gcc2
3936 builtin and then its argument prototype would still apply. */
3943 if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945 eval "ac_cv_lib_$ac_lib_var=yes"
3947 echo "configure: failed program was:" >&5
3948 cat conftest.$ac_ext >&5
3950 eval "ac_cv_lib_$ac_lib_var=no"
3953 LIBS="$ac_save_LIBS"
3956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3957 echo "$ac_t""yes" 1>&6
3958 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3959 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3960 cat >> confdefs.h <<EOF
3961 #define $ac_tr_lib 1
3964 LIBS="-lmenu$cf_cv_libtype $LIBS"
3967 echo "$ac_t""no" 1>&6
3970 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
3971 echo "configure:3972: checking for form_driver in -lform$cf_cv_libtype" >&5
3972 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
3973 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3974 echo $ac_n "(cached) $ac_c" 1>&6
3976 ac_save_LIBS="$LIBS"
3977 LIBS="-lform$cf_cv_libtype $LIBS"
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 /* Override any gcc2 internal prototype to avoid an error. */
3982 /* We use char because int might match the return type of a gcc2
3983 builtin and then its argument prototype would still apply. */
3990 if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3992 eval "ac_cv_lib_$ac_lib_var=yes"
3994 echo "configure: failed program was:" >&5
3995 cat conftest.$ac_ext >&5
3997 eval "ac_cv_lib_$ac_lib_var=no"
4000 LIBS="$ac_save_LIBS"
4003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4004 echo "$ac_t""yes" 1>&6
4005 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4006 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4007 cat >> confdefs.h <<EOF
4008 #define $ac_tr_lib 1
4011 LIBS="-lform$cf_cv_libtype $LIBS"
4014 echo "$ac_t""no" 1>&6
4018 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4019 echo "configure:4020: checking return type of signal handlers" >&5
4020 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4021 echo $ac_n "(cached) $ac_c" 1>&6
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 #include <sys/types.h>
4032 extern "C" void (*signal (int, void (*)(int)))(int);
4034 void (*signal ()) ();
4041 if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4043 ac_cv_type_signal=void
4045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4048 ac_cv_type_signal=int
4053 echo "$ac_t""$ac_cv_type_signal" 1>&6
4054 cat >> confdefs.h <<EOF
4055 #define RETSIGTYPE $ac_cv_type_signal
4060 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4061 echo "configure:4062: checking for ANSI C header files" >&5
4062 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4063 echo $ac_n "(cached) $ac_c" 1>&6
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4074 { (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4076 if test -z "$ac_err"; then
4078 ac_cv_header_stdc=yes
4081 echo "configure: failed program was:" >&5
4082 cat conftest.$ac_ext >&5
4084 ac_cv_header_stdc=no
4088 if test $ac_cv_header_stdc = yes; then
4089 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4096 egrep "memchr" >/dev/null 2>&1; then
4100 ac_cv_header_stdc=no
4106 if test $ac_cv_header_stdc = yes; then
4107 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4114 egrep "free" >/dev/null 2>&1; then
4118 ac_cv_header_stdc=no
4124 if test $ac_cv_header_stdc = yes; then
4125 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4126 if test "$cross_compiling" = yes; then
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4133 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4134 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4135 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4136 int main () { int i; for (i = 0; i < 256; i++)
4137 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4141 if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
4148 ac_cv_header_stdc=no
4156 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4157 if test $ac_cv_header_stdc = yes; then
4158 cat >> confdefs.h <<\EOF
4159 #define STDC_HEADERS 1
4164 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4165 echo "configure:4166: checking whether time.h and sys/time.h may both be included" >&5
4166 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4167 echo $ac_n "(cached) $ac_c" 1>&6
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4172 #include <sys/types.h>
4173 #include <sys/time.h>
4179 if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4181 ac_cv_header_time=yes
4183 echo "configure: failed program was:" >&5
4184 cat conftest.$ac_ext >&5
4186 ac_cv_header_time=no
4191 echo "$ac_t""$ac_cv_header_time" 1>&6
4192 if test $ac_cv_header_time = yes; then
4193 cat >> confdefs.h <<\EOF
4194 #define TIME_WITH_SYS_TIME 1
4214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4216 echo "configure:4217: checking for $ac_hdr" >&5
4217 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4218 echo $ac_n "(cached) $ac_c" 1>&6
4220 cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4226 { (eval echo configure:4227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4228 if test -z "$ac_err"; then
4230 eval "ac_cv_header_$ac_safe=yes"
4233 echo "configure: failed program was:" >&5
4234 cat conftest.$ac_ext >&5
4236 eval "ac_cv_header_$ac_safe=no"
4240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4241 echo "$ac_t""yes" 1>&6
4242 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4243 cat >> confdefs.h <<EOF
4244 #define $ac_tr_hdr 1
4248 echo "$ac_t""no" 1>&6
4262 use_default_colors \
4268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4269 echo "configure:4270: checking for $ac_func" >&5
4270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4271 echo $ac_n "(cached) $ac_c" 1>&6
4273 cat > conftest.$ac_ext <<EOF
4274 #line 4275 "configure"
4275 #include "confdefs.h"
4276 /* System header to define __stub macros and hopefully few prototypes,
4277 which can conflict with char $ac_func(); below. */
4279 /* Override any gcc2 internal prototype to avoid an error. */
4280 /* We use char because int might match the return type of a gcc2
4281 builtin and then its argument prototype would still apply. */
4286 /* The GNU C library defines this for functions which it implements
4287 to always fail with ENOSYS. Some functions are actually named
4288 something starting with __ and the normal name is an alias. */
4289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4299 eval "ac_cv_func_$ac_func=yes"
4301 echo "configure: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4304 eval "ac_cv_func_$ac_func=no"
4309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4310 echo "$ac_t""yes" 1>&6
4311 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4312 cat >> confdefs.h <<EOF
4313 #define $ac_tr_func 1
4317 echo "$ac_t""no" 1>&6
4322 cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4326 #include <${cf_cv_ncurses_header-curses.h}>
4329 (void) assume_default_colors (0, 0);
4330 (void) curses_version ();
4331 (void) define_key (0, 0);
4332 (void) is_term_resized (0, 0);
4333 (void) key_defined (0);
4334 (void) keybound (0, 0);
4335 (void) keyok (0, 0);
4336 (void) resize_term (0, 0);
4337 (void) resizeterm (0, 0);
4338 (void) use_default_colors ();
4339 (void) use_extended_names (0);
4340 (void) wresize (0, 0, 0);
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4346 cat >> confdefs.h <<\EOF
4347 #define NCURSES_EXT_FUNCS 1
4351 echo "configure: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4357 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
4358 echo "configure:4359: checking if sys/time.h works with sys/select.h" >&5
4359 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
4360 echo $ac_n "(cached) $ac_c" 1>&6
4363 cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4367 #include <sys/types.h>
4368 #ifdef HAVE_SYS_TIME_H
4369 #include <sys/time.h>
4371 #ifdef HAVE_SYS_SELECT_H
4372 #include <sys/select.h>
4379 if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4381 cf_cv_sys_time_select=yes
4383 echo "configure: failed program was:" >&5
4384 cat conftest.$ac_ext >&5
4386 cf_cv_sys_time_select=no
4392 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
4393 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
4394 #define HAVE_SYS_TIME_SELECT 1
4399 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
4400 echo "configure:4401: checking for function curses_version" >&5
4401 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
4402 echo $ac_n "(cached) $ac_c" 1>&6
4405 if test "$cross_compiling" = yes; then
4406 cf_cv_func_curses_version=unknown
4408 cat > conftest.$ac_ext <<EOF
4409 #line 4410 "configure"
4410 #include "confdefs.h"
4412 #include <${cf_cv_ncurses_header-curses.h}>
4416 sprintf(temp, "%s\n", curses_version());
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4423 cf_cv_func_curses_version=yes
4426 echo "configure: failed program was:" >&5
4427 cat conftest.$ac_ext >&5
4429 cf_cv_func_curses_version=no
4438 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
4439 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
4440 #define HAVE_CURSES_VERSION 1
4445 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
4446 echo "configure:4447: checking for alternate character set array" >&5
4447 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
4448 echo $ac_n "(cached) $ac_c" 1>&6
4451 cf_cv_curses_acs_map=unknown
4452 for name in acs_map _acs_map __acs_map _nc_acs_map
4454 cat > conftest.$ac_ext <<EOF
4455 #line 4456 "configure"
4456 #include "confdefs.h"
4458 #include <${cf_cv_ncurses_header-curses.h}>
4462 $name['k'] = ACS_PLUS
4466 if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4468 cf_cv_curses_acs_map=$name; break
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4478 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
4480 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
4481 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
4486 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
4487 echo "configure:4488: checking for wide alternate character set array" >&5
4488 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
4489 echo $ac_n "(cached) $ac_c" 1>&6
4492 cf_cv_curses_wacs_map=unknown
4493 for name in wacs_map _wacs_map __wacs_map _nc_wacs
4495 cat > conftest.$ac_ext <<EOF
4496 #line 4497 "configure"
4497 #include "confdefs.h"
4499 #ifndef _XOPEN_SOURCE_EXTENDED
4500 #define _XOPEN_SOURCE_EXTENDED
4502 #include <${cf_cv_ncurses_header-curses.h}>
4504 $name['k'] = *WACS_PLUS
4507 if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4509 cf_cv_curses_wacs_map=$name
4512 echo "configure: failed program was:" >&5
4513 cat conftest.$ac_ext >&5
4519 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
4522 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
4523 echo "configure:4524: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
4524 cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4528 #ifndef _XOPEN_SOURCE_EXTENDED
4529 #define _XOPEN_SOURCE_EXTENDED
4531 #include <${cf_cv_ncurses_header-curses.h}>
4538 if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4542 echo "configure: failed program was:" >&5
4543 cat conftest.$ac_ext >&5
4548 echo "$ac_t""$cf_result" 1>&6
4549 if test $cf_result = yes ; then
4551 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4553 cat >> confdefs.h <<EOF
4554 #define $cf_result 1
4558 cat >> confdefs.h <<EOF
4565 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
4566 echo "configure:4567: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
4567 cat > conftest.$ac_ext <<EOF
4568 #line 4569 "configure"
4569 #include "confdefs.h"
4571 #ifndef _XOPEN_SOURCE_EXTENDED
4572 #define _XOPEN_SOURCE_EXTENDED
4574 #include <${cf_cv_ncurses_header-curses.h}>
4581 if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4585 echo "configure: failed program was:" >&5
4586 cat conftest.$ac_ext >&5
4591 echo "$ac_t""$cf_result" 1>&6
4592 if test $cf_result = yes ; then
4594 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4596 cat >> confdefs.h <<EOF
4597 #define $cf_result 1
4601 cat >> confdefs.h <<EOF
4602 #define mbstate_t long
4613 cat > confcache <<\EOF
4614 # This file is a shell script that caches the results of configure
4615 # tests run on this system so they can be shared between configure
4616 # scripts and configure runs. It is not useful on other systems.
4617 # If it contains results you don't want to keep, you may remove or edit it.
4619 # By default, configure uses ./config.cache as the cache file,
4620 # creating it if it does not exist already. You can give configure
4621 # the --cache-file=FILE option to use a different cache file; that is
4622 # what configure does when it calls configure scripts in
4623 # subdirectories, so they share the cache.
4624 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4625 # config.status only pays attention to the cache file if you give it the
4626 # --recheck option to rerun configure.
4629 # The following way of writing the cache mishandles newlines in values,
4630 # but we know of no workaround that is simple, portable, and efficient.
4631 # So, don't put newlines in cache variables' values.
4632 # Ultrix sh set writes to stderr and can't be redirected directly,
4633 # and sets the high bit in the cache file unless we assign to the vars.
4635 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4637 # `set' does not quote correctly, so add quotes (double-quote substitution
4638 # turns \\\\ into \\, and sed turns \\ into \).
4640 -e "s/'/'\\\\''/g" \
4641 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4644 # `set' quotes correctly as required by POSIX, so do not add quotes.
4645 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4648 if cmp -s $cache_file confcache; then
4651 if test -w $cache_file; then
4652 echo "updating cache $cache_file"
4653 cat confcache > $cache_file
4655 echo "not updating unwritable cache $cache_file"
4660 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4662 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4663 # Let make expand exec_prefix.
4664 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4666 # Any assignment to VPATH causes Sun make to only execute
4667 # the first set of double-colon rules, so remove it if not needed.
4668 # If there is a colon in the path, we need to keep it.
4669 if test "x$srcdir" = x.; then
4670 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4673 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4675 DEFS=-DHAVE_CONFIG_H
4677 # Without the "./", some shells look in PATH for config.status.
4678 : ${CONFIG_STATUS=./config.status}
4680 echo creating $CONFIG_STATUS
4681 rm -f $CONFIG_STATUS
4682 cat > $CONFIG_STATUS <<EOF
4684 # Generated automatically by configure.
4685 # Run this file to recreate the current configuration.
4686 # This directory was configured as follows,
4687 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4689 # $0 $ac_configure_args
4691 # Compiler output produced by configure, useful for debugging
4692 # configure, is in ./config.log if it exists.
4694 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4697 case "\$ac_option" in
4698 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4699 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4700 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4701 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4702 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
4704 -help | --help | --hel | --he | --h)
4705 echo "\$ac_cs_usage"; exit 0 ;;
4706 *) echo "\$ac_cs_usage"; exit 1 ;;
4710 ac_given_srcdir=$srcdir
4712 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4714 cat >> $CONFIG_STATUS <<EOF
4716 # Protect against being on the right side of a sed subst in config.status.
4717 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4718 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4722 s%@CFLAGS@%$CFLAGS%g
4723 s%@CPPFLAGS@%$CPPFLAGS%g
4724 s%@CXXFLAGS@%$CXXFLAGS%g
4725 s%@FFLAGS@%$FFLAGS%g
4727 s%@LDFLAGS@%$LDFLAGS%g
4729 s%@exec_prefix@%$exec_prefix%g
4730 s%@prefix@%$prefix%g
4731 s%@program_transform_name@%$program_transform_name%g
4732 s%@bindir@%$bindir%g
4733 s%@sbindir@%$sbindir%g
4734 s%@libexecdir@%$libexecdir%g
4735 s%@datadir@%$datadir%g
4736 s%@sysconfdir@%$sysconfdir%g
4737 s%@sharedstatedir@%$sharedstatedir%g
4738 s%@localstatedir@%$localstatedir%g
4739 s%@libdir@%$libdir%g
4740 s%@includedir@%$includedir%g
4741 s%@oldincludedir@%$oldincludedir%g
4742 s%@infodir@%$infodir%g
4743 s%@mandir@%$mandir%g
4745 s%@host_alias@%$host_alias%g
4746 s%@host_cpu@%$host_cpu%g
4747 s%@host_vendor@%$host_vendor%g
4748 s%@host_os@%$host_os%g
4749 s%@SET_MAKE@%$SET_MAKE%g
4752 s%@CC_G_OPT@%$CC_G_OPT%g
4753 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
4754 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
4755 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
4756 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
4757 s%@ECHO_LINK@%$ECHO_LINK%g
4759 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
4760 s%@LD_MODEL@%$LD_MODEL%g
4761 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
4762 s%@LIBTOOL@%$LIBTOOL%g
4763 s%@LIB_CLEAN@%$LIB_CLEAN%g
4764 s%@LIB_COMPILE@%$LIB_COMPILE%g
4765 s%@LIB_LINK@%$LIB_LINK%g
4766 s%@LIB_NAME@%$LIB_NAME%g
4767 s%@LIB_PREFIX@%$LIB_PREFIX%g
4768 s%@LINK_TESTS@%$LINK_TESTS%g
4770 s%@LINT_OPTS@%$LINT_OPTS%g
4771 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
4772 s%@MATH_LIB@%$MATH_LIB%g
4773 s%@TEST_ARGS@%$TEST_ARGS%g
4774 s%@TEST_DEPS@%$TEST_DEPS%g
4775 s%@TINFO_ARGS@%$TINFO_ARGS%g
4776 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
4777 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
4778 s%@EXEEXT@%$EXEEXT%g
4779 s%@OBJEXT@%$OBJEXT%g
4780 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
4785 cat >> $CONFIG_STATUS <<\EOF
4787 # Split the substitutions into bite-sized pieces for seds with
4788 # small command number limits, like on Digital OSF/1 and HP-UX.
4789 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4790 ac_file=1 # Number of current file.
4791 ac_beg=1 # First line for current file.
4792 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4795 while $ac_more_lines; do
4796 if test $ac_beg -gt 1; then
4797 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4799 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4801 if test ! -s conftest.s$ac_file; then
4803 rm -f conftest.s$ac_file
4805 if test -z "$ac_sed_cmds"; then
4806 ac_sed_cmds="sed -f conftest.s$ac_file"
4808 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4810 ac_file=`expr $ac_file + 1`
4812 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4815 if test -z "$ac_sed_cmds"; then
4820 cat >> $CONFIG_STATUS <<EOF
4822 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4824 cat >> $CONFIG_STATUS <<\EOF
4825 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4826 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4828 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4829 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4830 *) ac_file_in="${ac_file}.in" ;;
4833 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4835 # Remove last slash and all that follows it. Not all systems have dirname.
4836 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4837 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4838 # The file is in a subdirectory.
4839 test ! -d "$ac_dir" && mkdir "$ac_dir"
4840 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4841 # A "../" for each directory in $ac_dir_suffix.
4842 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4844 ac_dir_suffix= ac_dots=
4847 case "$ac_given_srcdir" in
4849 if test -z "$ac_dots"; then top_srcdir=.
4850 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4851 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4853 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4854 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4858 echo creating "$ac_file"
4860 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4862 *Makefile*) ac_comsub="1i\\
4863 # $configure_input" ;;
4867 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4869 s%@configure_input@%$configure_input%g
4870 s%@srcdir@%$srcdir%g
4871 s%@top_srcdir@%$top_srcdir%g
4872 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4876 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4877 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4879 # ac_d sets the value in "#define NAME VALUE" lines.
4880 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4881 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4884 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4885 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4886 ac_uB='\([ ]\)%\1#\2define\3'
4889 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4890 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4891 ac_eB='$%\1#\2define\3'
4895 if test "${CONFIG_HEADERS+set}" != set; then
4897 cat >> $CONFIG_STATUS <<EOF
4898 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
4900 cat >> $CONFIG_STATUS <<\EOF
4902 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4903 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4905 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4906 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4907 *) ac_file_in="${ac_file}.in" ;;
4910 echo creating $ac_file
4912 rm -f conftest.frag conftest.in conftest.out
4913 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4914 cat $ac_file_inputs > conftest.in
4919 # Transform confdefs.h into a list of #define's. We won't use it as a sed
4920 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
4921 # be either 'cat' or 'sort'.
4922 sort confdefs.h >conftest.vals
4924 # Break up conftest.vals because some shells have a limit on
4925 # the size of here documents, and old seds have small limits too.
4928 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
4931 ac_lines=`grep -c . conftest.vals`
4932 # grep -c gives empty output for an empty file on some AIX systems.
4933 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4934 # Write chunks of a limited-size here document to conftest.frag.
4935 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
4936 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4937 echo 'CEOF' >> $CONFIG_STATUS
4938 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4940 mv conftest.tail conftest.vals
4944 # Run sed to substitute the contents of conftest.frag into conftest.in at the
4946 echo ' cat >> conftest.edit <<CEOF
4947 /@DEFS@/r conftest.frag
4950 sed -f conftest.edit conftest.in > conftest.out
4952 mv conftest.out conftest.in
4953 rm -f conftest.edit conftest.frag
4957 cat >> $CONFIG_STATUS <<\EOF
4958 rm -f conftest.frag conftest.h
4959 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4960 cat conftest.in >> conftest.h
4962 if cmp -s $ac_file conftest.h 2>/dev/null; then
4963 echo "$ac_file is unchanged"
4966 # Remove last slash and all that follows it. Not all systems have dirname.
4967 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4968 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4969 # The file is in a subdirectory.
4970 test ! -d "$ac_dir" && mkdir "$ac_dir"
4973 mv conftest.h $ac_file
4978 cat >> $CONFIG_STATUS <<EOF
4979 # Extra initialization commands, if any
4982 cat >> $CONFIG_STATUS <<\EOF
4983 # Extra commands, if any
4985 cat >>Makefile <<TEST_EOF
4987 # These rules are generated so we do not rely on suffix rules, which do not
4988 # work consistently for different make-programs (the '\$(MODEL)/' confuses
4989 # some, and the '\$x' confuses others).
4991 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
4994 cat >>Makefile <<TEST_EOF
4996 \$(MODEL)/$N.o : $N.c \\
4999 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
5005 chmod +x $CONFIG_STATUS
5006 rm -fr confdefs* $ac_clean_files
5007 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1