1 dnl***************************************************************************
2 dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
4 dnl Permission is hereby granted, free of charge, to any person obtaining a *
5 dnl copy of this software and associated documentation files (the *
6 dnl "Software"), to deal in the Software without restriction, including *
7 dnl without limitation the rights to use, copy, modify, merge, publish, *
8 dnl distribute, distribute with modifications, sublicense, and/or sell *
9 dnl copies of the Software, and to permit persons to whom the Software is *
10 dnl furnished to do so, subject to the following conditions: *
12 dnl The above copyright notice and this permission notice shall be included *
13 dnl in all copies or substantial portions of the Software. *
15 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 dnl Except as contained in this notice, the name(s) of the above copyright *
24 dnl holders shall not be used in advertising or otherwise to promote the *
25 dnl sale, use or other dealings in this Software without prior written *
27 dnl***************************************************************************
29 dnl Author: Thomas E. Dickey 1995-on
31 dnl $Id: configure.in,v 1.351 2005/09/17 22:41:48 tom Exp $
32 dnl Process this file with autoconf to produce a configure script.
34 dnl See http://invisible-island.net/autoconf/ for additional information.
36 dnl ---------------------------------------------------------------------------
37 AC_PREREQ(2.13.20020210)
38 AC_REVISION($Revision: 1.351 $)
39 AC_INIT(ncurses/base/lib_initscr.c)
40 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
42 CF_SUBST_NCURSES_VERSION
44 CF_WITH_REL_VERSION(NCURSES)
47 CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
48 AC_ARG_WITH(system-type,
49 [ --with-system-type=XXX test: override derived host system-type],
50 [AC_MSG_WARN(overriding system type to $withval)
51 cf_cv_system_name=$withval])
53 ### Save the given $CFLAGS to allow user-override.
54 cf_user_CFLAGS="$CFLAGS"
56 ### Default install-location
59 ### Checks for programs.
64 AC_PROG_GCC_TRADITIONAL
71 dnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks the
72 dnl configure script by not letting us test if C++
73 dnl is present, making this option necessary.
74 AC_MSG_CHECKING(if you want to ensure bool is consistent with C++)
76 [ --without-cxx do not adjust ncurses bool to match C++],
77 [cf_with_cxx=$withval],
79 AC_MSG_RESULT($cf_with_cxx)
80 if test "X$cf_with_cxx" = Xno ; then
84 # with autoconf 2.13, we can change the error to a warning:
85 pushdef([AC_MSG_ERROR],
87 AC_MSG_WARN([You don't have any C++ compiler, too bad])
88 cf_with_cxx=no; CXX=""; GXX="";])dnl
90 popdef([AC_MSG_ERROR])dnl
91 # autoconf 2.5x removed the error - by hardcoding it to g++.
92 if test "$CXX" = "g++" ; then
95 if test "$CXX" = "g++" ; then
96 AC_MSG_WARN(ignoring hardcoded g++)
97 cf_with_cxx=no; CXX=""; GXX="";
104 GXX=""; CXX=""; ac_cv_prog_gxx=no
106 AC_MSG_WARN(templates do not work)
110 AC_MSG_CHECKING(if you want to build C++ binding and demo)
111 AC_ARG_WITH(cxx-binding,
112 [ --without-cxx-binding do not build C++ binding and demo],
113 [cf_with_cxx_binding=$withval],
114 [cf_with_cxx_binding=$cf_with_cxx])
115 AC_MSG_RESULT($cf_with_cxx_binding)
117 AC_MSG_CHECKING(if you want to build with Ada95)
119 [ --without-ada suppress check for Ada95, don't build demo],
120 [cf_with_ada=$withval],
122 AC_MSG_RESULT($cf_with_ada)
124 AC_MSG_CHECKING(if you want to build programs such as tic)
126 [ --without-progs suppress build with programs (e.g., tic)],
127 [cf_with_progs=$withval],
129 AC_MSG_RESULT($cf_with_progs)
131 AC_MSG_CHECKING(if you wish to install curses.h)
132 AC_ARG_WITH(curses-h,
133 [ --without-curses-h install curses.h as ncurses.h only],
134 [with_curses_h=$withval],
136 AC_MSG_RESULT($with_curses_h)
138 modules_to_build="ncurses"
139 if test "X$cf_with_progs" != Xno ; then
140 modules_to_build="$modules_to_build progs tack"
142 modules_to_build="$modules_to_build panel menu form"
148 AC_SYS_LONG_FILE_NAMES
149 CF_MIXEDCASE_FILENAMES
152 AC_CHECK_PROGS(LINT, tdlint lint alint)
153 AC_CHECK_PROGS(MAN, man man_db)
156 dnl These are standard among *NIX systems, but not when cross-compiling
157 AC_CHECK_TOOL(RANLIB, ranlib, ':')
158 AC_CHECK_TOOL(LD, ld, ld)
159 AC_CHECK_TOOL(AR, ar, ar)
160 CF_SUBST(archiver options,AR_OPTS,rv)
164 dnl Special option for use by system-builders: the install-prefix is used to
165 dnl adjust the location into which the actual install is done, so that an
166 dnl archive can be built without modifying the host system's configuration.
167 AC_MSG_CHECKING(if you have specified an install-prefix)
168 AC_ARG_WITH(install-prefix,
169 [ --with-install-prefix prefixes actual install-location ($DESTDIR)],
170 [case "$withval" in #(vi
173 *) DESTDIR="$withval"
176 AC_MSG_RESULT($DESTDIR)
179 ###############################################################################
180 CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
181 # If we're cross-compiling, allow the user to override the tools and their
182 # options. The configure script is oriented toward identifying the host
183 # compiler, etc., but we need a build compiler to generate parts of the source.
186 ###############################################################################
187 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
189 ### Options to allow the user to specify the set of libraries which are used.
190 ### Use "--without-normal --with-shared" to allow the default model to be
191 ### shared, for example.
193 AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")
196 if test "$with_libtool" != "no" ; then
198 cf_list_models="$cf_list_models libtool"
202 AC_MSG_CHECKING(if you want to build shared libraries)
204 [ --with-shared generate shared-libraries],
205 [with_shared=$withval],
207 AC_MSG_RESULT($with_shared)
208 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
210 AC_MSG_CHECKING(if you want to build static libraries)
212 [ --with-normal generate normal-libraries (default)],
213 [with_normal=$withval],
215 AC_MSG_RESULT($with_normal)
216 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
218 AC_MSG_CHECKING(if you want to build debug libraries)
220 [ --with-debug generate debug-libraries (default)],
221 [with_debug=$withval],
223 AC_MSG_RESULT($with_debug)
224 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
226 AC_MSG_CHECKING(if you want to build profiling libraries)
228 [ --with-profile generate profile-libraries],
229 [with_profile=$withval],
231 AC_MSG_RESULT($with_profile)
232 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
236 ###############################################################################
238 AC_MSG_CHECKING(for specified models)
239 test -z "$cf_list_models" && cf_list_models=normal
240 dnl If we use libtool to generate libraries, then it must be the only
242 test "$with_libtool" != "no" && cf_list_models=libtool
243 AC_MSG_RESULT($cf_list_models)
245 ### Use the first model as the default, and save its suffix for use in building
246 ### up test-applications.
247 AC_MSG_CHECKING(for default model)
248 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
249 AC_MSG_RESULT($DFT_LWR_MODEL)
251 CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
253 AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")
254 AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")
265 CF_LIB_PREFIX(cf_prefix)
266 LIB_PREFIX=$cf_prefix
272 ###############################################################################
274 AC_MSG_CHECKING(if you want to build a separate terminfo library)
276 [ --with-termlib generate separate terminfo library],
277 [with_termlib=$withval],
279 AC_MSG_RESULT($with_termlib)
281 ### Checks for special libraries, must be done up-front.
287 if test "$with_gpm" = yes ; then
289 CF_LIB_SONAME([#include <gpm.h>],[if (Gpm_Open(0,0)) Gpm_Close();],gpm)
290 test "$cf_cv_gpm_soname" != "unknown" && AC_DEFINE_UNQUOTED(LIBGPM_SONAME,"$cf_cv_gpm_soname")
291 SHLIB_LIST="-ldl $SHLIB_LIST"
292 AC_DEFINE(HAVE_LIBGPM)
293 AC_CHECK_LIB(gpm,Gpm_Wgetch,[
294 AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
300 dnl Not all ports of gcc support the -g option
302 if test X"$CC_G_OPT" = X"" ; then
304 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
308 if test X"$CXX_G_OPT" = X"" ; then
310 test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
314 AC_MSG_CHECKING(for default loader flags)
315 case $DFT_LWR_MODEL in
316 libtool) LD_MODEL='' ;;
317 normal) LD_MODEL='' ;;
318 debug) LD_MODEL=$CC_G_OPT ;;
319 profile) LD_MODEL='-pg';;
320 shared) LD_MODEL='' ;;
322 AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
323 AC_MSG_RESULT($LD_MODEL)
325 AC_MSG_CHECKING(if rpath option should be used)
327 [ --enable-rpath use rpath option when generating shared libraries],
328 [cf_cv_ld_rpath=$enableval],
330 AC_MSG_RESULT($cf_cv_ld_rpath)
333 if test "$CC_SHARED_OPTS" = "unknown"; then
334 for model in $cf_list_models; do
335 if test "$model" = "shared"; then
336 AC_ERROR(Shared libraries are not supported in this version)
341 ###############################################################################
342 CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
344 ### use option --disable-overwrite to leave out the link to -lcurses
345 AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
346 AC_ARG_ENABLE(overwrite,
347 [ --disable-overwrite leave out the link to -lcurses],
348 [with_overwrite=$enableval],
349 [if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi])
350 AC_MSG_RESULT($with_overwrite)
352 AC_MSG_CHECKING(if external terminfo-database is used)
353 AC_ARG_ENABLE(database,
354 [ --disable-database do not use terminfo, only fallbacks/termcap],
355 [use_database=$enableval],
357 AC_MSG_RESULT($use_database)
359 case $host_os in #(vi
361 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
364 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
367 AC_SUBST(TERMINFO_SRC)
370 if test "$use_database" != no ; then
371 AC_DEFINE(USE_DATABASE)
372 AC_MSG_CHECKING(which terminfo source-file will be installed)
373 AC_ARG_ENABLE(database,
374 [ --with-database=XXX specify terminfo source to install],
375 [TERMINFO_SRC=$withval])
376 AC_MSG_RESULT($TERMINFO_SRC)
379 AC_MSG_CHECKING(for list of fallback descriptions)
380 AC_ARG_WITH(fallbacks,
381 [ --with-fallbacks=XXX specify list of fallback terminal descriptions],
382 [with_fallback=$withval],
384 AC_MSG_RESULT($with_fallback)
385 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
386 AC_SUBST(FALLBACK_LIST)
388 AC_MSG_CHECKING(if you want modern xterm or antique)
389 AC_ARG_WITH(xterm-new,
390 [ --without-xterm-new specify if xterm terminfo should be old version],
391 [with_xterm_new=$withval],
392 [with_xterm_new=yes])
393 case $with_xterm_new in
394 no) with_xterm_new=xterm-old;;
395 *) with_xterm_new=xterm-new;;
397 AC_MSG_RESULT($with_xterm_new)
398 WHICH_XTERM=$with_xterm_new
399 AC_SUBST(WHICH_XTERM)
402 if test "$use_database" = no ; then
403 TERMINFO="${datadir}/terminfo"
407 AC_MSG_CHECKING(for list of terminfo directories)
408 CF_WITH_PATHLIST(terminfo-dirs,
409 [ --with-terminfo-dirs=XXX specify list of terminfo directories],
413 AC_MSG_RESULT($TERMINFO_DIRS)
414 test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS")
416 AC_MSG_CHECKING(for default terminfo directory)
417 CF_WITH_PATH(default-terminfo-dir,
418 [ --with-default-terminfo-dir=DIR default terminfo directory],
422 AC_MSG_RESULT($TERMINFO)
423 AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO")
428 AC_SUBST(MAKE_TERMINFO)
430 ### use option --disable-big-core to make tic run on small machines
431 ### We need 4Mb, check if we can allocate 50% more than that.
432 AC_MSG_CHECKING(if big-core option selected)
433 AC_ARG_ENABLE(big-core,
434 [ --disable-big-core assume machine has little memory],
435 [with_big_core=$enableval],
440 unsigned long n = 6000000L;
448 [with_big_core=no])])
449 AC_MSG_RESULT($with_big_core)
450 test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
452 ### use option --enable-termcap to compile in the termcap fallback support
453 AC_MSG_CHECKING(if you want termcap-fallback support)
454 AC_ARG_ENABLE(termcap,
455 [ --enable-termcap compile in termcap fallback support],
456 [with_termcap=$enableval],
458 AC_MSG_RESULT($with_termcap)
460 if test "$with_termcap" != "yes" ; then
461 if test "$use_database" = no ; then
462 if test -z "$with_fallback" ; then
463 AC_ERROR(You have disabled the database w/o specifying fallbacks)
466 AC_DEFINE(PURE_TERMINFO)
469 AC_DEFINE(USE_TERMCAP)
470 AC_MSG_CHECKING(for list of termcap files)
471 CF_WITH_PATHLIST(termpath,
472 [ --with-termpath=XXX specify list of termcap files],
474 /etc/termcap:/usr/share/misc/termcap)
475 AC_MSG_RESULT($TERMPATH)
476 test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH")
478 ### use option --enable-getcap to use a hacked getcap for reading termcaps
479 AC_MSG_CHECKING(if fast termcap-loader is needed)
480 AC_ARG_ENABLE(getcap,
481 [ --enable-getcap fast termcap load, no xrefs to terminfo],
482 [with_getcap=$enableval],
484 AC_MSG_RESULT($with_getcap)
485 test "$with_getcap" = "yes" && AC_DEFINE(USE_GETCAP)
487 AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
488 AC_ARG_ENABLE(getcap-cache,
489 [ --enable-getcap-cache cache translated termcaps in ~/.terminfo],
490 [with_getcap_cache=$enableval],
491 [with_getcap_cache=no])
492 AC_MSG_RESULT($with_getcap_cache)
493 test "$with_getcap_cache" = "yes" && AC_DEFINE(USE_GETCAP_CACHE)
497 ### Use option --disable-home-terminfo to completely remove ~/.terminfo
498 AC_MSG_CHECKING(if ~/.terminfo is wanted)
499 AC_ARG_ENABLE(home-terminfo,
500 [ --disable-home-terminfo drop ~/.terminfo from terminfo search-path],
501 [with_home_terminfo=$enableval],
502 [with_home_terminfo=yes])
503 AC_MSG_RESULT($with_home_terminfo)
504 test "$with_home_terminfo" = "yes" && AC_DEFINE(USE_HOME_TERMINFO)
506 AC_MSG_CHECKING(if you want to use restrict environment when running as root)
507 AC_ARG_ENABLE(root-environ,
508 [ --disable-root-environ limit environment when running as root],
509 [with_root_environ=$enableval],
510 [with_root_environ=yes])
511 AC_MSG_RESULT($with_root_environ)
512 test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
514 ### Use option --enable-symlinks to make tic use symlinks, not hard links
515 ### to reduce storage requirements for the terminfo database.
521 if test "$ac_cv_func_link" != yes ; then
522 AC_MSG_CHECKING(if tic should use symbolic links)
523 if test "$ac_cv_func_symlink" = yes ; then
528 AC_MSG_RESULT($with_symlinks)
529 elif test "$ac_cv_func_symlink" != yes ; then
530 AC_MSG_CHECKING(if tic should use hard links)
531 if test "$ac_cv_func_link" = yes ; then
536 AC_MSG_RESULT($with_links)
538 AC_MSG_CHECKING(if tic should use symbolic links)
539 AC_ARG_ENABLE(symlinks,
540 [ --enable-symlinks make tic use symbolic links not hard links],
541 [with_symlinks=$enableval],
543 AC_MSG_RESULT($with_symlinks)
546 test "$with_links" = yes && AC_DEFINE(USE_LINKS)
547 test "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS)
549 ### use option --enable-broken-linker to force on use of broken-linker support
550 AC_MSG_CHECKING(if you want broken-linker support code)
551 AC_ARG_ENABLE(broken_linker,
552 [ --enable-broken_linker compile with broken-linker support code],
553 [with_broken_linker=$enableval],
554 [with_broken_linker=${BROKEN_LINKER-no}])
555 AC_MSG_RESULT($with_broken_linker)
558 if test "$with_broken_linker" = yes ; then
559 AC_DEFINE(BROKEN_LINKER)
561 elif test "$DFT_LWR_MODEL" = shared ; then
562 case $cf_cv_system_name in #(vi
564 AC_DEFINE(BROKEN_LINKER)
566 CF_VERBOSE(cygwin linker is broken anyway)
570 AC_SUBST(BROKEN_LINKER)
572 ### use option --enable-widec to turn on use of wide-character support
581 # Check to define _XOPEN_SOURCE "automatically"
584 # Checks for CODESET support.
587 # use these variables to work around a defect in gcc's fixincludes.
591 AC_MSG_CHECKING(if you want wide-character code)
593 [ --enable-widec compile with wide-char/UTF-8 code],
594 [with_widec=$enableval],
596 AC_MSG_RESULT($with_widec)
597 if test "$with_widec" = yes ; then
598 LIB_SUFFIX="w${LIB_SUFFIX}"
599 AC_DEFINE(USE_WIDEC_SUPPORT)
600 CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
603 AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc)
604 if test "$ac_cv_func_putwc" != yes ; then
606 if test "$cf_cv_libutf8" = yes ; then
610 CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T)
611 CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T)
612 CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T)
614 if test "$NCURSES_MBSTATE_T" != 0; then
615 AC_DEFINE(NEED_MBSTATE_T_DEF)
618 AC_SUBST(NCURSES_CH_T)
619 AC_SUBST(NCURSES_LIBUTF8)
621 AC_SUBST(NEED_WCHAR_H)
622 AC_SUBST(NCURSES_MBSTATE_T)
623 AC_SUBST(NCURSES_WCHAR_T)
624 AC_SUBST(NCURSES_WINT_T)
626 AC_SUBST(NCURSES_OK_WCHAR_T)
627 AC_SUBST(NCURSES_OK_WINT_T)
629 ### use option --disable-lp64 to allow long chtype
630 case $cf_cv_abi_version in
635 default_with_lp64=yes
639 AC_MSG_CHECKING(whether to enable _LP64 definition in curses.h)
641 [ --disable-lp64 allow chtype to be long (ignore _LP64)],
642 [with_lp64=$enableval],
643 [with_lp64=$default_with_lp64])
644 AC_MSG_RESULT($with_lp64)
646 if test "$with_lp64" = yes ; then
651 AC_SUBST(cf_cv_enable_lp64)
655 ### use option --with-bool to override bool's type
656 AC_MSG_CHECKING(for type of bool)
658 [ --with-bool=TYPE override fallback type of bool variable],
659 [NCURSES_BOOL="$withval"],
661 AC_MSG_RESULT($NCURSES_BOOL)
662 AC_SUBST(NCURSES_BOOL)
664 AC_MSG_CHECKING(for alternate terminal capabilities file)
666 [ --with-caps=alt compile with alternate Caps file],
667 [TERMINFO_CAPS=Caps.$withval],
668 [TERMINFO_CAPS=Caps])
669 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
670 AC_MSG_RESULT($TERMINFO_CAPS)
671 AC_SUBST(TERMINFO_CAPS)
673 ### use option --with-chtype to override chtype's type
674 AC_MSG_CHECKING(for type of chtype)
676 [ --with-chtype=TYPE override type of chtype],
677 [NCURSES_CHTYPE="$withval"],
678 [NCURSES_CHTYPE=auto])
679 AC_MSG_RESULT($NCURSES_CHTYPE)
681 ### use option --with-ospeed to override ospeed's type
682 AC_MSG_CHECKING(for type of ospeed)
684 [ --with-ospeed=TYPE override type of ospeed variable],
685 [NCURSES_OSPEED="$withval"],
686 [NCURSES_OSPEED=short])
687 AC_MSG_RESULT($NCURSES_OSPEED)
688 AC_SUBST(NCURSES_OSPEED)
690 ### use option --with-mmask-t to override mmask_t's type
691 AC_MSG_CHECKING(for type of mmask_t)
693 [ --with-mmask-t=TYPE override type of mmask_t],
694 [NCURSES_MMASK_T="$withval"],
695 [NCURSES_MMASK_T=auto])
696 AC_MSG_RESULT($NCURSES_MMASK_T)
698 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
699 AC_MSG_CHECKING(if tputs should process BSD-style prefix padding)
700 AC_ARG_ENABLE(bsdpad,
701 [ --enable-bsdpad recognize BSD-style prefix padding],
702 [with_bsdpad=$enableval],
704 AC_MSG_RESULT($with_bsdpad)
705 test "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS)
707 ### Enable compiling-in rcs id's
708 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
710 [ --with-rcs-ids compile-in RCS identifiers],
711 [with_rcs_ids=$withval],
713 AC_MSG_RESULT($with_rcs_ids)
714 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
716 ###############################################################################
717 CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
719 ###############################################################################
720 CF_HELP_MESSAGE(Extensions:)
722 ### Note that some functions (such as const) are normally disabled anyway.
723 AC_MSG_CHECKING(if you want to build with function extensions)
724 AC_ARG_ENABLE(ext-funcs,
725 [ --disable-ext-funcs disable function-extensions],
726 [with_ext_funcs=$enableval],
727 [with_ext_funcs=yes])
728 AC_MSG_RESULT($with_ext_funcs)
729 if test "$with_ext_funcs" = yes ; then
731 AC_DEFINE(HAVE_CURSES_VERSION)
732 AC_DEFINE(HAVE_HAS_KEY)
733 AC_DEFINE(HAVE_RESIZETERM)
734 AC_DEFINE(HAVE_RESIZE_TERM)
735 AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
736 AC_DEFINE(HAVE_WRESIZE)
737 AC_DEFINE(NCURSES_EXT_FUNCS)
741 AC_SUBST(NCURSES_EXT_FUNCS)
743 ### use option --enable-const to turn on use of const beyond that in XSI.
744 AC_MSG_CHECKING(for extended use of const keyword)
746 [ --enable-const compile with extra/non-standard const],
747 [with_ext_const=$enableval],
749 AC_MSG_RESULT($with_ext_const)
750 NCURSES_CONST='/*nothing*/'
751 if test "$with_ext_const" = yes ; then
754 AC_SUBST(NCURSES_CONST)
756 AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code)
757 AC_ARG_ENABLE(no-padding,
758 [ --enable-no-padding compile with $NCURSES_NO_PADDING code],
759 [with_no_padding=$enableval],
760 [with_no_padding=$with_ext_funcs])
761 AC_MSG_RESULT($with_no_padding)
762 test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING)
764 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
765 AC_MSG_CHECKING(if you want SIGWINCH handler)
766 AC_ARG_ENABLE(sigwinch,
767 [ --enable-sigwinch compile with SIGWINCH handler],
768 [with_sigwinch=$enableval],
769 [with_sigwinch=$with_ext_funcs])
770 AC_MSG_RESULT($with_sigwinch)
771 test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
773 ### use option --enable-tcap-names to allow user to define new capabilities
774 AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap)
775 AC_ARG_ENABLE(tcap-names,
776 [ --enable-tcap-names compile with user-definable terminal capabilities],
777 [with_tcap_names=$enableval],
778 [with_tcap_names=$with_ext_funcs])
779 AC_MSG_RESULT($with_tcap_names)
781 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
782 AC_SUBST(NCURSES_XNAMES)
784 ###############################################################################
785 # These options are relatively safe to experiment with.
786 CF_HELP_MESSAGE(Development Code:)
787 AC_MSG_CHECKING(if you want all development code)
789 [ --with-develop enable all development options],
790 [with_develop=$withval],
792 AC_MSG_RESULT($with_develop)
794 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
795 AC_MSG_CHECKING(if you want hard-tabs code)
796 AC_ARG_ENABLE(hard-tabs,
797 [ --enable-hard-tabs compile with hard-tabs code],
798 [with_hardtabs=$enableval],
799 [with_hardtabs=$with_develop])
800 AC_MSG_RESULT($with_hardtabs)
801 test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
803 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
804 AC_MSG_CHECKING(if you want limited support for xmc)
805 AC_ARG_ENABLE(xmc-glitch,
806 [ --enable-xmc-glitch compile with limited support for xmc],
807 [with_xmc_glitch=$enableval],
808 [with_xmc_glitch=$with_develop])
809 AC_MSG_RESULT($with_xmc_glitch)
810 test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
812 ###############################################################################
813 # These are just experimental, probably should not be in a package:
814 CF_HELP_MESSAGE(Experimental Code:)
816 AC_MSG_CHECKING(if you do not want to assume colors are white-on-black)
817 AC_ARG_ENABLE(assumed-color,
818 [ --disable-assumed-color do not assume anything about default-colors],
819 [with_assumed_color=$enableval],
820 [with_assumed_color=yes])
821 AC_MSG_RESULT($with_assumed_color)
822 test "$with_assumed_color" = yes && AC_DEFINE(USE_ASSUMED_COLOR)
824 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
825 AC_MSG_CHECKING(if you want hashmap scrolling-optimization code)
826 AC_ARG_ENABLE(hashmap,
827 [ --disable-hashmap compile without hashmap scrolling-optimization],
828 [with_hashmap=$enableval],
830 AC_MSG_RESULT($with_hashmap)
831 test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
833 ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
834 AC_MSG_CHECKING(if you want colorfgbg code)
835 AC_ARG_ENABLE(colorfgbg,
836 [ --enable-colorfgbg compile with $COLORFGBG code],
837 [with_colorfgbg=$enableval],
839 AC_MSG_RESULT($with_colorfgbg)
840 test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
842 ### use option --enable-ext-colors to turn on use of colors beyond 16.
843 AC_MSG_CHECKING(if you want to use experimental extended colors)
844 AC_ARG_ENABLE(ext-colors,
845 [ --enable-ext-colors compile for experimental 256-color support],
846 [with_ext_colors=$enableval],
847 [with_ext_colors=no])
848 AC_MSG_RESULT($with_ext_colors)
850 if test "$with_ext_colors" = yes ; then
851 if test "$with_widec" != yes ; then
852 AC_MSG_WARN(This option applies only to wide-character library)
854 # cannot be ABI 5 since it changes sizeof(cchar_t)
858 AC_DEFINE(NCURSES_EXT_COLORS)
860 AC_SUBST(NCURSES_EXT_COLORS)
862 ### use option --enable-ext-mouse to modify coding to support 5-button mice
863 AC_MSG_CHECKING(if you want to use experimental extended mouse encoding)
864 AC_ARG_ENABLE(ext-mouse,
865 [ --enable-ext-mouse compile for experimental mouse-encoding],
866 [with_ext_mouse=$enableval],
868 AC_MSG_RESULT($with_ext_mouse)
869 NCURSES_MOUSE_VERSION=1
870 if test "$with_ext_mouse" = yes ; then
871 NCURSES_MOUSE_VERSION=2
874 AC_SUBST(NCURSES_MOUSE_VERSION)
876 AC_MSG_CHECKING(if you want experimental safe-sprintf code)
877 AC_ARG_ENABLE(safe-sprintf,
878 [ --enable-safe-sprintf compile with experimental safe-sprintf code],
879 [with_safe_sprintf=$enableval],
880 [with_safe_sprintf=no])
881 AC_MSG_RESULT($with_safe_sprintf)
882 test "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF)
884 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
885 # when hashmap is used scroll hints are useless
886 if test "$with_hashmap" = no ; then
887 AC_MSG_CHECKING(if you want to experiment without scrolling-hints code)
888 AC_ARG_ENABLE(scroll-hints,
889 [ --disable-scroll-hints compile without scroll-hints code],
890 [with_scroll_hints=$enableval],
891 [with_scroll_hints=yes])
892 AC_MSG_RESULT($with_scroll_hints)
893 test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
896 ###############################################################################
897 CF_HELP_MESSAGE(Testing/development Options:)
899 ### use option --disable-echo to suppress full display compiling commands
900 AC_MSG_CHECKING(if you want to display full commands during build)
902 [ --enable-echo build: display "compiling" commands (default)],
903 [with_echo=$enableval],
905 if test "$with_echo" = yes; then
908 ECHO_LINK='@ echo linking $@ ... ;'
909 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
911 AC_MSG_RESULT($with_echo)
914 ### use option --enable-warnings to turn on all gcc warnings
915 AC_MSG_CHECKING(if you want to see compiler warnings)
916 AC_ARG_ENABLE(warnings,
917 [ --enable-warnings build: turn on GCC compiler warnings],
918 [with_warnings=$enableval])
919 AC_MSG_RESULT($with_warnings)
921 if test -n "$with_warnings"; then
922 ADAFLAGS="$ADAFLAGS -gnatg"
924 if test "$cf_with_cxx" = yes ; then
925 CF_GXX_WARNINGS(Wno-unused)
930 ### use option --enable-assertions to turn on generation of assertion code
931 AC_MSG_CHECKING(if you want to enable runtime assertions)
932 AC_ARG_ENABLE(assertions,
933 [ --enable-assertions test: turn on generation of assertion code],
934 [with_assertions=$enableval],
935 [with_assertions=no])
936 AC_MSG_RESULT($with_assertions)
939 if test "$with_assertions" = no
942 CPPFLAGS="$CPPFLAGS -DNDEBUG"
944 ADAFLAGS="$ADAFLAGS -gnata"
948 ### use option --disable-leaks to suppress "permanent" leaks, for testing
950 [ --disable-leaks test: suppress permanent memory-leaks],
951 [test "$enableval" = no && AC_DEFINE(NO_LEAKS)])
952 AC_DEFINE(HAVE_NC_ALLOC_H)
954 ### use option --enable-expanded to generate certain macros as functions
955 AC_ARG_ENABLE(expanded,
956 [ --enable-expanded test: generate functions for certain macros],
957 [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
959 ### use option --disable-macros to suppress macros in favor of functions
960 AC_ARG_ENABLE(macros,
961 [ --disable-macros test: use functions rather than macros],
962 [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
964 # Normally we only add trace() to the debug-library. Allow this to be
965 # extended to all models of the ncurses library:
967 case "$CFLAGS $CPPFLAGS" in
973 AC_MSG_CHECKING(whether to add trace feature to all models)
975 [ --with-trace test: add trace() function to all models of ncurses],
976 [cf_with_trace=$withval],
977 [cf_with_trace=$cf_all_traces])
978 AC_MSG_RESULT($cf_with_trace)
980 if test "$cf_with_trace" = yes ; then
983 CF_ADD_CFLAGS(-DTRACE)
991 ### Checks for libraries.
992 AC_CHECK_FUNC(gettimeofday,
993 AC_DEFINE(HAVE_GETTIMEOFDAY),[
995 AC_CHECK_LIB(bsd, gettimeofday,
996 AC_DEFINE(HAVE_GETTIMEOFDAY)
997 LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
999 CF_MATH_LIB(MATH_LIB,sin(x))
1002 ### Checks for header files.
1008 dnl These are some other potentially nonportable headers.
1027 # check for ISC (this may also define _POSIX_SOURCE)
1028 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
1029 if test "$ISC" = yes ; then
1030 AC_CHECK_LIB(cposix,main)
1031 AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
1036 ### checks for compiler characteristics
1040 test "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
1042 if test $NCURSES_CHTYPE = auto ; then
1045 cf_cv_typeof_chtype=$NCURSES_CHTYPE
1047 AC_SUBST(cf_cv_typeof_chtype)
1049 CF_UNSIGNED_LITERALS
1051 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
1052 test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
1055 if test $NCURSES_MMASK_T = auto ; then
1056 cf_cv_typeof_mmask_t=long
1058 cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
1060 AC_SUBST(cf_cv_typeof_mmask_t)
1062 ### Checks for external-data
1066 ### Checks for library functions.
1087 if test "$with_getcap" = "yes" ; then
1098 # setup for prototype of fallback for vsscanf()
1099 if test "$cf_cv_func_vsscanf" = vsscanf ; then
1104 AC_SUBST(HAVE_VSSCANF)
1106 dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS
1107 if test "$cross_compiling" = yes ; then
1108 AC_MSG_WARN(cross compiling: assume setvbuf params not reversed)
1110 AC_FUNC_SETVBUF_REVERSED
1118 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
1119 if test -z "$cf_user_CFLAGS" ; then
1120 CF_STRIP_G_OPT(CFLAGS)
1121 CF_STRIP_G_OPT(CXXFLAGS)
1124 # Just in case, check if the C compiler has a bool type.
1125 CF_BOOL_DECL(cf_cv_cc_bool_type)
1127 # Check for C++ compiler characteristics (and ensure that it's there!)
1128 if test -n "$CXX" ; then
1133 case $GXX_VERSION in
1145 AC_CHECK_HEADERS(typeinfo)
1155 CXX_AR_OPTS='$(AR_OPTS)'
1156 case $cf_cv_system_name in #(vi
1158 if test "$GXX" != yes ; then
1160 CXX_AR_OPTS='-ar -o'
1164 CXXLDFLAGS="-u main"
1167 if test "$GXX" != yes ; then
1169 CXX_AR_OPTS='-xar -o'
1173 AC_SUBST(CXXLDFLAGS)
1175 AC_SUBST(CXX_AR_OPTS)
1178 cf_cv_builtin_bool=1
1180 # Just because we are not configuring against C++ right now does not
1181 # mean that a user will not want to use C++. Some distributors disable
1182 # the C++ portion of this configuration as a shortcut (or just to avoid
1183 # compiling the demo in the c++ directory). So we need a reasonable
1184 # default for the 'bool' type.
1186 # Caveat: since the storage of the bool type is not standardized, it
1189 if test "$NCURSES_BOOL" != auto ; then
1190 cf_cv_type_of_bool=$NCURSES_AUTO
1192 if test "$cf_cv_header_stdbool_h" = 1 ; then
1195 AC_MSG_CHECKING(for fallback type of bool)
1196 case "$host_cpu" in #(vi
1197 i?86) cf_cv_type_of_bool=char ;; #(vi
1198 *) cf_cv_type_of_bool=int ;;
1200 AC_MSG_RESULT($cf_cv_type_of_bool)
1206 # If the C compiler did not declare bool, and we did not determine that the C++
1207 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
1208 # ncurses library use the same type as C++ bool. Note that this allows one to
1209 # specify the type of bool in a configure-script option and postpone
1210 # integration with the C++ compiler provided that the types are compatible.
1212 if test $cf_cv_cc_bool_type = 1
1214 # oops: C has a bool. Unlikely, but C++ could differ.
1216 elif test $cf_cv_builtin_bool = 0
1221 # this is the normal case
1222 USE_CXX_BOOL='defined(__cplusplus)'
1224 AC_SUBST(USE_CXX_BOOL)
1226 CF_HELP_MESSAGE(Ada95 Binding Options:)
1228 dnl Check for availability of GNU Ada Translator (GNAT).
1229 dnl At the moment we support no other Ada95 compiler.
1230 if test "$cf_with_ada" != "no" ; then
1231 cf_ada_make=gnatmake
1232 AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
1233 if test "$ac_cv_prog_gnat_exists" = no; then
1237 AC_CHECK_PROG(M4_exists, m4, yes, no)
1238 if test "$ac_cv_prog_M4_exists" = no; then
1239 cf_cv_prog_gnat_correct=no
1240 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
1242 if test "$cf_cv_prog_gnat_correct" = yes; then
1243 AC_MSG_CHECKING(if GNAT works)
1244 CF_GNAT_TRY_RUN([procedure conftest;],
1247 procedure conftest is
1249 Text_IO.Put ("Hello World");
1251 GNAT.OS_Lib.OS_Exit (0);
1252 end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no])
1253 AC_MSG_RESULT($cf_cv_prog_gnat_correct)
1256 if test "$cf_cv_prog_gnat_correct" = yes; then
1257 ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
1259 AC_MSG_CHECKING(if GNAT pragma Unreferenced works)
1260 CF_GNAT_TRY_LINK([procedure conftest;],
1263 procedure conftest is
1265 pragma Unreferenced (test);
1268 Text_IO.Put ("Hello World");
1270 GNAT.OS_Lib.OS_Exit (0);
1271 end conftest;],[cf_cv_pragma_unreferenced=yes],[cf_cv_pragma_unreferenced=no])
1272 AC_MSG_RESULT($cf_cv_pragma_unreferenced)
1274 # if the pragma is supported, use it (needed in the Trace code).
1275 if test $cf_cv_pragma_unreferenced = yes ; then
1281 AC_ARG_WITH(ada-compiler,
1282 [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
1283 [cf_ada_compiler=$withval],
1284 [cf_ada_compiler=gnatmake])
1286 cf_ada_package=terminal_interface
1288 AC_SUBST(cf_ada_make)
1289 AC_SUBST(cf_ada_compiler)
1290 AC_SUBST(cf_ada_package)
1292 AC_SUBST(cf_compile_generics)
1293 AC_SUBST(cf_generic_objects)
1294 AC_SUBST(PRAGMA_UNREF)
1296 CF_WITH_PATH(ada-include,
1297 [ --with-ada-include=DIR Ada includes are in DIR],
1299 PREFIX/lib/ada/adainclude,
1300 [$]prefix/lib/ada/adainclude)
1301 AC_SUBST(ADA_INCLUDE)
1303 CF_WITH_PATH(ada-objects,
1304 [ --with-ada-objects=DIR Ada objects are in DIR],
1306 PREFIX/lib/ada/adalib,
1307 [$]prefix/lib/ada/adalib)
1308 AC_SUBST(ADA_OBJECTS)
1313 ### Construct the library-subsets, if any, from this set of keywords:
1314 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
1315 AC_MSG_CHECKING(for library subsets)
1316 if test "$with_termlib" != no ; then
1317 LIB_SUBSETS="termlib"
1318 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
1319 LIB_SUBSETS="${LIB_SUBSETS} "
1321 LIB_SUBSETS="termlib+"
1322 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
1324 LIB_SUBSETS="${LIB_SUBSETS}base"
1325 test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
1326 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
1327 AC_MSG_RESULT($LIB_SUBSETS)
1329 ### Construct the list of include-directories to be generated
1333 ### Build up pieces for makefile rules
1334 AC_MSG_CHECKING(default library suffix)
1335 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
1336 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
1337 AC_MSG_RESULT($DFT_ARG_SUFFIX)
1339 AC_MSG_CHECKING(default library-dependency suffix)
1340 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
1341 if test $DFT_LWR_MODEL = shared ; then
1342 case $cf_cv_system_name in #(vi
1344 DFT_DEP_SUFFIX=".dll.a"
1348 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
1349 AC_MSG_RESULT($DFT_DEP_SUFFIX)
1351 AC_MSG_CHECKING(default object directory)
1352 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
1353 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
1354 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
1356 # libtool thinks it can make c++ shared libraries (perhaps only g++)
1357 if test "$cf_with_cxx" = yes ; then
1358 AC_MSG_CHECKING(c++ library-dependency suffix)
1359 if test "$with_libtool" != "no"; then
1360 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
1362 CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static library
1364 AC_MSG_RESULT($CXX_LIB_SUFFIX)
1365 AC_SUBST(CXX_LIB_SUFFIX)
1368 ### Set up low-level terminfo dependencies for makefiles.
1369 TINFO_LIST="$SHLIB_LIST"
1370 if test "$with_termlib" != no ; then
1372 if test "$with_termlib" != yes ; then
1373 TINFO_NAME=$with_termlib
1374 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
1375 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
1376 TINFO_LIB_SUFFIX="${with_termlib}"
1378 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
1379 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
1380 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
1383 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
1384 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
1385 if test "$DFT_LWR_MODEL" = "libtool"; then
1386 TEST_ARGS="${TEST_DEPS}"
1387 TEST_ARG2="${TEST_DEP2}"
1388 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
1390 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
1391 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
1392 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
1393 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
1396 TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
1398 AC_SUBST(TINFO_ARG_SUFFIX)
1399 AC_SUBST(TINFO_DEP_SUFFIX)
1400 AC_SUBST(TINFO_LIB_SUFFIX)
1401 AC_SUBST(TINFO_ARGS)
1404 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
1405 AC_SUBST(TINFO_ARGS2)
1407 AC_MSG_CHECKING(where we will install curses.h)
1408 test "$with_overwrite" = no && \
1409 test "x$includedir" = 'x${prefix}/include' && \
1410 includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
1411 AC_MSG_RESULT($includedir)
1413 ### Resolve a conflict between normal and wide-curses by forcing applications
1414 ### that will need libutf8 to add it to their configure script.
1415 if test "$with_overwrite" != no ; then
1416 if test "$NCURSES_LIBUTF8" = 1 ; then
1417 NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
1418 AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)
1422 AC_SUBST(TINFO_LIST)
1423 AC_SUBST(SHLIB_LIST)
1425 ### predefined stuff for the test programs
1426 AC_DEFINE(HAVE_SLK_COLOR)
1428 ### Construct the list of subdirectories for which we'll customize makefiles
1429 ### with the appropriate compile-rules.
1431 CF_SRC_MODULES($modules_to_build)
1434 AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
1436 AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}")
1438 ### Now that we're done running tests, add the compiler-warnings, if any
1439 CF_ADD_CFLAGS($EXTRA_CFLAGS)
1441 ################################################################################
1442 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
1444 include/MKterm.h.awk \
1445 include/curses.head:include/curses.h.in \
1452 ### Special initialization commands, used to pass information from the
1453 ### configuration-run into config.status
1456 CF_LIST_MODELS="$cf_list_models"
1457 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
1458 DFT_LWR_MODEL="$DFT_LWR_MODEL"
1459 LDCONFIG="$LDCONFIG"
1460 LIB_NAME="$LIB_NAME"
1461 LIB_SUBSETS="$LIB_SUBSETS"
1462 LIB_SUFFIX="$LIB_SUFFIX"
1463 LIB_TRACING="$LIB_TRACING"
1464 MAKE_TERMINFO="$MAKE_TERMINFO"
1465 NCURSES_OSPEED="$NCURSES_OSPEED"
1466 SRC_SUBDIRS="$SRC_SUBDIRS"
1467 TERMINFO="$TERMINFO"
1468 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
1469 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
1470 TINFO_NAME="$TINFO_NAME"
1471 WITH_CURSES_H="$with_curses_h"
1472 WITH_ECHO="$with_echo"
1473 WITH_OVERWRITE="$with_overwrite"
1474 cf_cv_abi_version="$cf_cv_abi_version"
1475 cf_cv_do_symlinks="$cf_cv_do_symlinks"
1476 cf_cv_enable_lp64="$cf_cv_enable_lp64"
1477 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
1478 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
1479 cf_cv_rel_version="$cf_cv_rel_version"
1480 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
1481 cf_cv_shlib_version="$cf_cv_shlib_version"
1482 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
1483 cf_cv_system_name="$cf_cv_system_name"
1484 cf_with_cxx_binding="$cf_with_cxx_binding"
1489 ${MAKE-make} preinstall