X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=b229618c4bc78105719a5052dfb2e9c93e6d20eb;hp=2eade1beba89c47aa071a1db0bc49725996602ec;hb=0948e2c7ac34642a1f8a3a85000933bcbb258cff;hpb=0573f2d712e4b5cb2a02a3fe52d513843d536b34 diff --git a/configure.in b/configure.in index 2eade1be..b229618c 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * dnl copy of this software and associated documentation files (the * @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.553 2012/09/01 19:53:17 tom Exp $ +dnl $Id: configure.in,v 1.583 2014/08/02 20:35:31 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- -AC_PREREQ(2.13.20020210) -AC_REVISION($Revision: 1.553 $) +AC_PREREQ(2.52.20030208) +AC_REVISION($Revision: 1.583 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -45,11 +45,7 @@ CF_SUBST_NCURSES_VERSION CF_WITH_REL_VERSION(NCURSES) CF_WITH_ABI_VERSION -CF_CHECK_CACHE([AC_CANONICAL_SYSTEM]) -AC_ARG_WITH(system-type, -[ --with-system-type=XXX test: override derived host system-type], -[AC_MSG_WARN(overriding system type to $withval) - cf_cv_system_name=$withval]) +CF_WITH_SYSTYPE ### Save the given $CFLAGS to allow user-override. cf_user_CFLAGS="$CFLAGS" @@ -69,15 +65,11 @@ else cf_PROG_CC="gcc cc" fi -AC_PROG_CC($cf_PROG_CC) -CF_GCC_VERSION +CF_PROG_CC($cf_PROG_CC) AC_PROG_CPP AC_PROG_GCC_TRADITIONAL CF_PROG_CC_C_O(CC) -AC_ISC_POSIX -CF_ANSI_CC_REQD -CF_PROG_EXT CF_PROG_LDCONFIG dnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks the @@ -131,6 +123,13 @@ AC_MSG_RESULT($cf_with_cxx_binding) AC_MSG_CHECKING(if you want to build with Ada95) AC_MSG_RESULT($cf_with_ada) +AC_MSG_CHECKING(if you want to install terminal database) +AC_ARG_ENABLE(db-install, + [ --disable-db-install suppress install of terminal database], + [cf_with_db_install=$enableval], + [cf_with_db_install=yes]) +AC_MSG_RESULT($cf_with_db_install) + AC_MSG_CHECKING(if you want to install manpages) AC_ARG_WITH(manpages, [ --without-manpages suppress install of manpages], @@ -140,14 +139,14 @@ AC_MSG_RESULT($cf_with_manpages) AC_MSG_CHECKING(if you want to build programs such as tic) AC_ARG_WITH(progs, - [ --without-progs suppress build with programs (e.g., tic)], + [ --without-progs suppress build/install with programs (e.g., tic)], [cf_with_progs=$withval], [cf_with_progs=yes]) AC_MSG_RESULT($cf_with_progs) AC_MSG_CHECKING(if you want to build test-programs) AC_ARG_WITH(tests, - [ --without-tests suppress build with test-programs], + [ --without-tests suppress build/install with test-programs], [cf_with_tests=$withval], [cf_with_tests=yes]) AC_MSG_RESULT($cf_with_tests) @@ -191,7 +190,7 @@ if test "$enable_mixedcase" = "auto" ; then else cf_cv_mixedcase=$enable_mixedcase if test "x$enable_mixedcase" = "xyes" ; then - AC_DEFINE(MIXEDCASE_FILENAMES) + AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if tic should assume mixed-case filenames]) fi fi @@ -204,6 +203,7 @@ dnl These are standard among *NIX systems, but not when cross-compiling AC_CHECK_TOOL(RANLIB, ranlib, ':') AC_CHECK_TOOL(LD, ld, ld) AC_CHECK_TOOL(AR, ar, ar) +AC_CHECK_TOOL(NM, nm, nm) CF_AR_FLAGS dnl Special option for use by system-builders: the install-prefix is used to @@ -278,6 +278,17 @@ test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile" fi +if test "X$cf_with_cxx_binding" != Xno; then +if test "x$with_shared" = "xyes"; then +AC_MSG_CHECKING(if you want to build C++ shared libraries) +AC_ARG_WITH(cxx-shared, + [ --with-cxx-shared generate C++ shared-libraries], + [with_shared_cxx=$withval], + [with_shared_cxx=no]) +AC_MSG_RESULT($with_shared_cxx) +fi +fi + ############################################################################### AC_MSG_CHECKING(for specified models) @@ -314,6 +325,7 @@ CF_WITH_LIB_PREFIX(cf_prefix) LIB_SUFFIX= AC_SUBST(LIB_SUFFIX) +CF_PATHSEP ############################################################################### @@ -349,13 +361,13 @@ if test "$with_gpm" != no ; then else CF_LIB_SONAME([#include ],[if (Gpm_Open(0,0)) Gpm_Close();],gpm) fi - test "$cf_cv_gpm_soname" != "unknown" && AC_DEFINE_UNQUOTED(LIBGPM_SONAME,"$cf_cv_gpm_soname") + test "$cf_cv_gpm_soname" != "unknown" && AC_DEFINE_UNQUOTED(LIBGPM_SONAME,"$cf_cv_gpm_soname",[Define as needed to set the gpm share library soname]) SHLIB_LIST="-ldl $SHLIB_LIST" else SHLIB_LIST="-lgpm $SHLIB_LIST" CF_ADD_LIB(gpm,TEST_LIBS) fi - AC_DEFINE(HAVE_LIBGPM) + AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library]) CF_CHECK_GPM_WGETCH fi @@ -398,6 +410,8 @@ AC_MSG_RESULT($cf_cv_do_relink) ;; esac +# we will build libraries one-level down. +rel_builddir=.. CF_SHARED_OPTS if test "$CC_SHARED_OPTS" = "unknown"; then for model in $cf_list_models; do @@ -407,6 +421,14 @@ if test "$CC_SHARED_OPTS" = "unknown"; then done fi +# pretend that ncurses==ncursesw==ncursest +AC_MSG_CHECKING(if you want to disable library suffixes) +AC_ARG_ENABLE(lib-suffixes, + [ --disable-lib-suffixes disable library suffixes], + [disable_lib_suffixes=$enableval], + [disable_lib_suffixes=no]) +AC_MSG_RESULT($disable_lib_suffixes) + ### If we're building with rpath, try to link non-standard libs that way too. if test "$DFT_LWR_MODEL" = "shared"; then CF_DISABLE_RPATH_HACK @@ -440,8 +462,9 @@ os2*) #(vi esac AC_SUBST(TERMINFO_SRC) +NCURSES_USE_DATABASE=0 if test "$use_database" != no ; then - AC_DEFINE(USE_DATABASE) + NCURSES_USE_DATABASE=1 AC_MSG_CHECKING(which terminfo source-file will be installed) AC_ARG_WITH(database, @@ -457,6 +480,7 @@ if test "$use_database" != no ; then else with_hashed_db=no fi +AC_SUBST(NCURSES_USE_DATABASE) AC_MSG_CHECKING(for list of fallback descriptions) AC_ARG_WITH(fallbacks, @@ -482,7 +506,7 @@ AC_SUBST(WHICH_XTERM) AC_MSG_CHECKING(if xterm backspace sends BS or DEL) AC_ARG_WITH(xterm-kbs, - [ --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL], + [ --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL], [with_xterm_kbs=$withval], [with_xterm_kbs=BS]) case x$with_xterm_kbs in @@ -513,7 +537,7 @@ CF_WITH_PATHLIST(terminfo-dirs, DATADIR/terminfo, ${datadir}/terminfo) AC_MSG_RESULT($TERMINFO_DIRS) -test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS") +test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS",[Define as needed to predefine the TERMINFO_DIR searchlist]) AC_MSG_CHECKING(for default terminfo directory) CF_WITH_PATH(default-terminfo-dir, @@ -522,7 +546,7 @@ CF_WITH_PATH(default-terminfo-dir, DATADIR/terminfo, ${datadir}/terminfo) AC_MSG_RESULT($TERMINFO) -AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO") +AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO",[Define to set the default terminal database path]) fi @@ -549,7 +573,7 @@ int main() { [with_big_core=no], [with_big_core=no])]) AC_MSG_RESULT($with_big_core) -test "x$with_big_core" = "xyes" && AC_DEFINE(HAVE_BIG_CORE) +test "x$with_big_core" = "xyes" && AC_DEFINE(HAVE_BIG_CORE,1,[Define to 1 if machine has ample memory for tic]) ### ISO C only guarantees 512-char strings, we have tables which load faster ### when constructed using "big" strings. More than the C compiler, the awk @@ -573,46 +597,48 @@ AC_ARG_ENABLE(termcap, [with_termcap=no]) AC_MSG_RESULT($with_termcap) +NCURSES_USE_TERMCAP=0 if test "x$with_termcap" != "xyes" ; then if test "$use_database" = no ; then if test -z "$with_fallback" ; then AC_ERROR(You have disabled the database w/o specifying fallbacks) fi fi - AC_DEFINE(PURE_TERMINFO) + AC_DEFINE(PURE_TERMINFO,1,[Define to 1 if we should support only terminfo]) else -if test "$with_ticlib" != no ; then - AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined) -fi - -AC_DEFINE(USE_TERMCAP) -AC_MSG_CHECKING(for list of termcap files) -CF_WITH_PATHLIST(termpath, - [ --with-termpath=XXX specify list of termcap files], - TERMPATH, - /etc/termcap:/usr/share/misc/termcap) -AC_MSG_RESULT($TERMPATH) -test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH") - -### use option --enable-getcap to use a hacked getcap for reading termcaps -AC_MSG_CHECKING(if fast termcap-loader is needed) -AC_ARG_ENABLE(getcap, - [ --enable-getcap fast termcap load, no xrefs to terminfo], - [with_getcap=$enableval], - [with_getcap=no]) -AC_MSG_RESULT($with_getcap) -test "x$with_getcap" = "xyes" && AC_DEFINE(USE_GETCAP) - -AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo) -AC_ARG_ENABLE(getcap-cache, - [ --enable-getcap-cache cache translated termcaps in ~/.terminfo], - [with_getcap_cache=$enableval], - [with_getcap_cache=no]) -AC_MSG_RESULT($with_getcap_cache) -test "x$with_getcap_cache" = "xyes" && AC_DEFINE(USE_GETCAP_CACHE) + if test "$with_ticlib" != no ; then + AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined) + fi -fi + NCURSES_USE_TERMCAP=1 + AC_MSG_CHECKING(for list of termcap files) + CF_WITH_PATHLIST(termpath, + [ --with-termpath=XXX specify list of termcap files], + TERMPATH, + /etc/termcap:/usr/share/misc/termcap) + AC_MSG_RESULT($TERMPATH) + test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH",[Define to set the termcap searchlist]) + + ### use option --enable-getcap to use a hacked getcap for reading termcaps + AC_MSG_CHECKING(if fast termcap-loader is needed) + AC_ARG_ENABLE(getcap, + [ --enable-getcap fast termcap load, no xrefs to terminfo], + [with_getcap=$enableval], + [with_getcap=no]) + AC_MSG_RESULT($with_getcap) + test "x$with_getcap" = "xyes" && AC_DEFINE(USE_GETCAP,1,[Define to 1 to use fast termcap-loader]) + + AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo) + AC_ARG_ENABLE(getcap-cache, + [ --enable-getcap-cache cache translated termcaps in ~/.terminfo], + [with_getcap_cache=$enableval], + [with_getcap_cache=no]) + AC_MSG_RESULT($with_getcap_cache) + test "x$with_getcap_cache" = "xyes" && AC_DEFINE(USE_GETCAP_CACHE,1,[Define to 1 if translated termcap should be stored in $HOME/.terminfo]) + +fi +AC_SUBST(NCURSES_USE_TERMCAP) ### Use option --disable-home-terminfo to completely remove ~/.terminfo AC_MSG_CHECKING(if ~/.terminfo is wanted) @@ -621,7 +647,7 @@ AC_ARG_ENABLE(home-terminfo, [with_home_terminfo=$enableval], [with_home_terminfo=yes]) AC_MSG_RESULT($with_home_terminfo) -test "x$with_home_terminfo" = "xyes" && AC_DEFINE(USE_HOME_TERMINFO) +test "x$with_home_terminfo" = "xyes" && AC_DEFINE(USE_HOME_TERMINFO,1,[Define to 1 if $HOME/.terminfo feature is wanted]) AC_MSG_CHECKING(if you want to use restricted environment when running as root) AC_ARG_ENABLE(root-environ, @@ -629,7 +655,7 @@ AC_ARG_ENABLE(root-environ, [with_root_environ=$enableval], [with_root_environ=yes]) AC_MSG_RESULT($with_root_environ) -test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON) +test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if environment should be restricted for root user]) ### Use option --enable-symlinks to make tic use symlinks, not hard links ### to reduce storage requirements for the terminfo database. @@ -661,8 +687,8 @@ if test "$with_symlinks" = no ; then AC_MSG_RESULT($with_links) fi -test "x$with_links" = xyes && AC_DEFINE(USE_LINKS) -test "x$with_symlinks" = xyes && AC_DEFINE(USE_SYMLINKS) +test "x$with_links" = xyes && AC_DEFINE(USE_LINKS,1,[Define to 1 if hardlinks should be used in terminfo database]) +test "x$with_symlinks" = xyes && AC_DEFINE(USE_SYMLINKS,1,[Define to 1 if symbolic links should be used in terminfo database]) ### use option --enable-broken-linker to force on use of broken-linker support AC_MSG_CHECKING(if you want broken-linker support code) @@ -674,12 +700,12 @@ AC_MSG_RESULT($with_broken_linker) BROKEN_LINKER=0 if test "x$with_broken_linker" = xyes ; then - AC_DEFINE(BROKEN_LINKER) + AC_DEFINE(BROKEN_LINKER,1,[Define to 1 to work around linkers which cannot link data-only modules]) BROKEN_LINKER=1 elif test "$DFT_LWR_MODEL" = shared ; then case $cf_cv_system_name in #(vi cygwin*) - AC_DEFINE(BROKEN_LINKER) + AC_DEFINE(BROKEN_LINKER,1,[Define to 1 to work around linkers which cannot link data-only modules]) BROKEN_LINKER=1 CF_VERBOSE(cygwin linker is broken anyway) ;; @@ -694,7 +720,7 @@ AC_ARG_ENABLE(bsdpad, [with_bsdpad=$enableval], [with_bsdpad=no]) AC_MSG_RESULT($with_bsdpad) -test "x$with_bsdpad" = xyes && AC_DEFINE(BSD_TPUTS) +test "x$with_bsdpad" = xyes && AC_DEFINE(BSD_TPUTS,1,[Define to 1 to recognize BSD-style prefix padding]) ### use option --enable-widec to turn on use of wide-character support NCURSES_CH_T=chtype @@ -725,9 +751,11 @@ AC_ARG_ENABLE(widec, [with_widec=no]) AC_MSG_RESULT($with_widec) if test "x$with_widec" = xyes ; then - LIB_SUFFIX="w${LIB_SUFFIX}" - AC_DEFINE(USE_WIDEC_SUPPORT) - AC_DEFINE(NCURSES_WIDECHAR) + if test "x$disable_lib_suffixes" = xno ; then + LIB_SUFFIX="w${LIB_SUFFIX}" + fi + AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code]) + AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code]) CF_CHECK_WCHAR_H @@ -745,7 +773,7 @@ if test "x$with_widec" = xyes ; then CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T) if test "$NCURSES_MBSTATE_T" != 0; then - AC_DEFINE(NEED_MBSTATE_T_DEF) + AC_DEFINE(NEED_MBSTATE_T_DEF,1,[Define to 1 if we must declare mbstate_t]) fi fi AC_SUBST(NCURSES_CH_T) @@ -876,7 +904,7 @@ AC_ARG_WITH(rcs-ids, [with_rcs_ids=$withval], [with_rcs_ids=no]) AC_MSG_RESULT($with_rcs_ids) -test "x$with_rcs_ids" = xyes && AC_DEFINE(USE_RCS_IDS) +test "x$with_rcs_ids" = xyes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 to compile-in RCS identifiers]) ############################################################################### CF_MAN_PAGES([ captoinfo clear infocmp infotocap tabs tic toe tput tset ]) @@ -893,17 +921,17 @@ AC_ARG_ENABLE(ext-funcs, AC_MSG_RESULT($with_ext_funcs) if test "x$with_ext_funcs" = xyes ; then NCURSES_EXT_FUNCS=1 - AC_DEFINE(HAVE_ASSUME_DEFAULT_COLORS) - AC_DEFINE(HAVE_CURSES_VERSION) - AC_DEFINE(HAVE_HAS_KEY) - AC_DEFINE(HAVE_RESIZETERM) - AC_DEFINE(HAVE_RESIZE_TERM) - AC_DEFINE(HAVE_TERM_ENTRY_H) - AC_DEFINE(HAVE_USE_DEFAULT_COLORS) - AC_DEFINE(HAVE_USE_SCREEN) - AC_DEFINE(HAVE_USE_WINDOW) - AC_DEFINE(HAVE_WRESIZE) - AC_DEFINE(NCURSES_EXT_FUNCS) + AC_DEFINE(HAVE_ASSUME_DEFAULT_COLORS,1,[Define to 1 to enable assume_default_colors() function]) + AC_DEFINE(HAVE_CURSES_VERSION,1,[Define to 1 to enable curses_version() function]) + AC_DEFINE(HAVE_HAS_KEY,1,[Define to 1 to enable has_key() function]) + AC_DEFINE(HAVE_RESIZETERM,1,[Define to 1 to enable resizeterm() function]) + AC_DEFINE(HAVE_RESIZE_TERM,1,[Define to 1 to enable resize_term() function]) + AC_DEFINE(HAVE_TERM_ENTRY_H,1,[Define to 1 to enable term_entry() function]) + AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 to enable use_default_colors() function]) + AC_DEFINE(HAVE_USE_SCREEN,1,[Define to 1 to enable use_screen() function]) + AC_DEFINE(HAVE_USE_WINDOW,1,[Define to 1 to enable use_window() function]) + AC_DEFINE(HAVE_WRESIZE,1,[Define to 1 to enable wresize() function]) + AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 to enable ncurses extended functions]) GENERATED_EXT_FUNCS=generated else NCURSES_EXT_FUNCS=0 @@ -920,7 +948,7 @@ AC_ARG_ENABLE(sp-funcs, AC_MSG_RESULT($with_sp_funcs) if test "x$with_sp_funcs" = xyes ; then NCURSES_SP_FUNCS=1 - AC_DEFINE(NCURSES_SP_FUNCS) + AC_DEFINE(NCURSES_SP_FUNCS,1,[Define to 1 to enable experimental SCREEN-extensions]) GENERATED_SP_FUNCS=generated else NCURSES_SP_FUNCS=0 @@ -936,7 +964,7 @@ AC_ARG_ENABLE(term-driver, [with_term_driver=no]) AC_MSG_RESULT($with_term_driver) if test "x$with_term_driver" = xyes ; then - AC_DEFINE(USE_TERM_DRIVER) + AC_DEFINE(USE_TERM_DRIVER,1,[Define to 1 to enable experimental terminal-driver]) if test "x$with_sp_funcs" != xyes ; then AC_MSG_ERROR(The term-driver option relies upon sp-funcs) fi @@ -971,7 +999,7 @@ if test "x$with_ext_colors" = xyes ; then CF_NCURSES_ABI_6 fi NCURSES_EXT_COLORS=1 - AC_DEFINE(NCURSES_EXT_COLORS) + AC_DEFINE(NCURSES_EXT_COLORS,1,[Define to 1 to compile for 256-color support]) fi AC_SUBST(NCURSES_EXT_COLORS) @@ -995,7 +1023,7 @@ AC_ARG_ENABLE(no-padding, [with_no_padding=$enableval], [with_no_padding=$with_ext_funcs]) AC_MSG_RESULT($with_no_padding) -test "x$with_no_padding" = xyes && AC_DEFINE(NCURSES_NO_PADDING) +test "x$with_no_padding" = xyes && AC_DEFINE(NCURSES_NO_PADDING,1,[Define to 1 to compile with $NCURSES_NO_PADDING code]) AC_CHECK_SIZEOF([signed char], 0) if test "$ac_cv_sizeof_signed_char" = 1 ; then @@ -1019,7 +1047,7 @@ AC_ARG_ENABLE(sigwinch, [with_sigwinch=$enableval], [with_sigwinch=$with_ext_funcs]) AC_MSG_RESULT($with_sigwinch) -test "x$with_sigwinch" = xyes && AC_DEFINE(USE_SIGWINCH) +test "x$with_sigwinch" = xyes && AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler]) ### use option --enable-tcap-names to allow user to define new capabilities AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap) @@ -1048,7 +1076,7 @@ AC_ARG_ENABLE(hard-tabs, [ --enable-hard-tabs compile with hard-tabs code],, [enable_hard_tabs=$with_develop]) AC_MSG_RESULT($enable_hard_tabs) -test "x$enable_hard_tabs" = xyes && AC_DEFINE(USE_HARD_TABS) +test "x$enable_hard_tabs" = xyes && AC_DEFINE(USE_HARD_TABS,1,[Define to 1 to compile with hard-tabs code]) ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize AC_MSG_CHECKING(if you want limited support for xmc) @@ -1056,7 +1084,7 @@ AC_ARG_ENABLE(xmc-glitch, [ --enable-xmc-glitch compile with support for xmc (magic-cookie)],, [enable_xmc_glitch=$with_develop]) AC_MSG_RESULT($enable_xmc_glitch) -test "x$enable_xmc_glitch" = xyes && AC_DEFINE(USE_XMC_SUPPORT) +test "x$enable_xmc_glitch" = xyes && AC_DEFINE(USE_XMC_SUPPORT,1,[Define to 1 to compile with support for xmc (magic-cookie)]) ############################################################################### # These are just experimental, probably should not be in a package: @@ -1068,7 +1096,7 @@ AC_ARG_ENABLE(assumed-color, [with_assumed_color=$enableval], [with_assumed_color=yes]) AC_MSG_RESULT($with_assumed_color) -test "x$with_assumed_color" = xyes && AC_DEFINE(USE_ASSUMED_COLOR) +test "x$with_assumed_color" = xyes && AC_DEFINE(USE_ASSUMED_COLOR,1,[Define to 1 to assume things about default-colors]) ### use option --enable-hashmap to turn on use of hashmap scrolling logic AC_MSG_CHECKING(if you want hashmap scrolling-optimization code) @@ -1077,7 +1105,7 @@ AC_ARG_ENABLE(hashmap, [with_hashmap=$enableval], [with_hashmap=yes]) AC_MSG_RESULT($with_hashmap) -test "x$with_hashmap" = xyes && AC_DEFINE(USE_HASHMAP) +test "x$with_hashmap" = xyes && AC_DEFINE(USE_HASHMAP,1,[Define to 1 to compile with hashmap scrolling-optimization]) ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment AC_MSG_CHECKING(if you want colorfgbg code) @@ -1086,7 +1114,7 @@ AC_ARG_ENABLE(colorfgbg, [with_colorfgbg=$enableval], [with_colorfgbg=no]) AC_MSG_RESULT($with_colorfgbg) -test "x$with_colorfgbg" = xyes && AC_DEFINE(USE_COLORFGBG) +test "x$with_colorfgbg" = xyes && AC_DEFINE(USE_COLORFGBG,1,[Define to 1 to compile-in experimental $COLORFGBG code]) ### use option --enable-interop to turn on use of bindings used for interop AC_MSG_CHECKING(if you want interop bindings) @@ -1113,7 +1141,7 @@ if test "x$with_pthread" != xno; then [use_pthreads_eintr=no]) AC_MSG_RESULT($use_pthreads_eintr) if test "x$use_pthreads_eintr" = xyes ; then - AC_DEFINE(USE_PTHREADS_EINTR) + AC_DEFINE(USE_PTHREADS_EINTR,1,[Define to 1 to enable EINTR in wgetch with pthreads]) fi]) AC_MSG_CHECKING(if you want to use weak-symbols for pthreads) @@ -1129,13 +1157,13 @@ if test "x$with_pthread" != xno; then fi if test "x$cf_cv_weak_symbols" = xyes ; then - AC_DEFINE(USE_WEAK_SYMBOLS) + AC_DEFINE(USE_WEAK_SYMBOLS,1,[Define to 1 to enable weak-symbols for pthreads]) fi fi PTHREAD= if test "x$with_pthread" = "xyes" ; then - AC_DEFINE(USE_PTHREADS) + AC_DEFINE(USE_PTHREADS,1,[Define to 1 to use pthreads feature]) enable_reentrant=yes if test "x$cf_cv_weak_symbols" = xyes ; then PTHREAD=-lpthread @@ -1163,9 +1191,25 @@ if test "x$with_reentrant" = xyes ; then CF_ADD_LIB(pthread,TEST_LIBS) CF_ADD_LIB(pthread,TEST_LIBS2) else - LIB_SUFFIX="t${LIB_SUFFIX}" + # when not using weak symbols but with_reentrant, + # add 't' to the library suffix on all platforms + # except cygwin, where we only do that if ALSO + # compiling with full thread support. + case "$host" in + *cygwin* | *msys*) #(vi + if test "$with_pthread" = "yes" ; then + if test "x$disable_lib_suffixes" = "xno" ; then + LIB_SUFFIX="t${LIB_SUFFIX}" + fi + fi ;; + *) + if test "x$disable_lib_suffixes" = "xno" ; then + LIB_SUFFIX="t${LIB_SUFFIX}" + fi + ;; + esac fi - AC_DEFINE(USE_REENTRANT) + AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use experimental reentrant feature]) CF_NCURSES_ABI_6 else cf_cv_enable_reentrant=0 @@ -1190,7 +1234,7 @@ else NCURSES_WRAP_PREFIX=_nc_ fi AC_SUBST(NCURSES_WRAP_PREFIX) -AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX") +AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX",[Define to override _nc_ prefix]) AC_MSG_CHECKING(if you want experimental safe-sprintf code) AC_ARG_ENABLE(safe-sprintf, @@ -1198,7 +1242,7 @@ AC_ARG_ENABLE(safe-sprintf, [with_safe_sprintf=$enableval], [with_safe_sprintf=no]) AC_MSG_RESULT($with_safe_sprintf) -test "x$with_safe_sprintf" = xyes && AC_DEFINE(USE_SAFE_SPRINTF) +test "x$with_safe_sprintf" = xyes && AC_DEFINE(USE_SAFE_SPRINTF,1,[Define to 1 to compile with experimental safe-sprintf code]) ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic # when hashmap is used scroll hints are useless @@ -1209,7 +1253,7 @@ AC_ARG_ENABLE(scroll-hints, [with_scroll_hints=$enableval], [with_scroll_hints=yes]) AC_MSG_RESULT($with_scroll_hints) -test "x$with_scroll_hints" = xyes && AC_DEFINE(USE_SCROLL_HINTS) +test "x$with_scroll_hints" = xyes && AC_DEFINE(USE_SCROLL_HINTS,1,[Define to 1 to compile without scroll-hints code]) fi AC_MSG_CHECKING(if you want experimental wgetch-events code) @@ -1218,7 +1262,7 @@ AC_ARG_ENABLE(wgetch-events, [with_wgetch_events=$enableval], [with_wgetch_events=no]) AC_MSG_RESULT($with_wgetch_events) -test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS) +test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with experimental wgetch-events code]) ############################################################################### CF_HELP_MESSAGE(Testing/development Options:) @@ -1243,7 +1287,7 @@ AC_MSG_RESULT($with_warnings) if test "x$with_warnings" = "xyes"; then CF_ADD_ADAFLAGS(-gnatg) - CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) + CF_GCC_WARNINGS(Wno-unknown-pragmas Wswitch-enum) if test "x$cf_with_cxx" = xyes ; then CF_GXX_WARNINGS(Wno-unused) fi @@ -1270,17 +1314,17 @@ fi ### use option --disable-leaks to suppress "permanent" leaks, for testing CF_DISABLE_LEAKS -AC_DEFINE(HAVE_NC_ALLOC_H) +AC_DEFINE(HAVE_NC_ALLOC_H,1,[Define to 1 if we have nc_alloc.h header]) ### use option --enable-expanded to generate certain macros as functions AC_ARG_ENABLE(expanded, [ --enable-expanded test: generate functions for certain macros], - [test "x$enableval" = xyes && AC_DEFINE(NCURSES_EXPANDED)]) + [test "x$enableval" = xyes && AC_DEFINE(NCURSES_EXPANDED,1,[Define to 1 to generate functions for certain macros])]) ### use option --disable-macros to suppress macros in favor of functions AC_ARG_ENABLE(macros, [ --disable-macros test: use functions rather than macros], - [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)]) + [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS,1,[Define to 1 to use functions rather than macros])]) # Normally we only add trace() to the debug-library. Allow this to be # extended to all models of the ncurses library: @@ -1309,21 +1353,25 @@ fi AC_SUBST(ADA_TRACE) +CF_DISABLE_GNAT_PROJECTS + ### Checks for libraries. case $cf_cv_system_name in #(vi *mingw32*) #(vi + CPPFLAGS="$CPPFLAGS -DWINVER=0x0501" + LIBS=" -lpsapi $LIBS" ;; *) AC_CHECK_FUNC(gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY),[ + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ AC_CHECK_LIB(bsd, gettimeofday, - AC_DEFINE(HAVE_GETTIMEOFDAY) + AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday ;; esac -CF_MATH_LIB(MATH_LIB,sin(x)) +CF_MATH_LIB(MATH_LIB,pow(sin(x),x)) AC_SUBST(MATH_LIB) ### Checks for header files. @@ -1438,7 +1486,6 @@ if test "x$cross_compiling" = xyes ; then else AC_FUNC_SETVBUF_REVERSED fi -AC_TYPE_SIGNAL AC_CHECK_TYPE(intptr_t, long) CF_TYPE_SIGACTION CF_SIZECHANGE @@ -1450,8 +1497,8 @@ AC_FUNC_VFORK # special check for test/ditto.c CF_FUNC_OPENPTY if test "$cf_cv_func_openpty" != no ; then - AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>) - AC_DEFINE(USE_XTERM_PTY) + AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>,[Define to actual header for openpty function]) + AC_DEFINE(USE_XTERM_PTY,1,[Define to 1 if we should assume xterm pseudoterminal interface]) if test "x$cf_cv_lib_util" = xyes ; then CF_ADD_LIB(util,TEST_LIBS) fi @@ -1460,7 +1507,7 @@ AC_SUBST(TEST_LIBS) AC_SUBST(TEST_LIBS2) if test "$with_hashed_db" != no ; then - AC_DEFINE(USE_HASHED_DB) + AC_DEFINE(USE_HASHED_DB,1,[Define to 1 if we should build terminfo in hashed database]) CF_HASHED_DB($with_hashed_db) fi @@ -1574,9 +1621,10 @@ dnl At the moment we support no other Ada95 compiler. CF_ADD_ADAFLAGS(-gnatpn) CF_FIXUP_ADAFLAGS + CF_GNATPREP_OPT_T + CF_GNAT_GENERICS CF_GNAT_SIGINT - CF_GNAT_PRAGMA_UNREF CF_GNAT_PROJECTS CF_WITH_ADA_COMPILER @@ -1593,6 +1641,11 @@ else cf_with_ada=no fi +# do this "late" to avoid conflict with header-checks +if test "x$with_widec" = xyes ; then + AC_CHECK_SIZEOF(wchar_t) +fi + ### Construct the ncurses library-subsets, if any, from this set of keywords: ### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar ### @@ -1665,13 +1718,17 @@ CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj") AC_MSG_RESULT($DFT_OBJ_SUBDIR) -# libtool thinks it can make c++ shared libraries (perhaps only g++) if test "x$cf_with_cxx" = xyes ; then AC_MSG_CHECKING(c++ library-dependency suffix) if test "$with_libtool" != "no"; then + # libtool thinks it can make c++ shared libraries (perhaps only g++) + CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX +elif test "$with_shared_cxx" != "no"; then + # also for g++ users... CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX else - CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX)dnl we normally make a static library + # we normally make a static library because C/C++ library rules differ + CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX) fi AC_MSG_RESULT($CXX_LIB_SUFFIX) AC_SUBST(CXX_LIB_SUFFIX) @@ -1772,8 +1829,8 @@ fi if test "$DFT_LWR_MODEL" = shared ; then case $cf_cv_system_name in #(vi - cygwin*) - # "lib" files have ".dll.a" suffix, "cyg" files have ".dll" + cygwin*|msys*) + # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll" TINFO_SUFFIX=.dll ;; esac @@ -1804,10 +1861,15 @@ normal|debug|profile) esac AC_MSG_CHECKING(where we will install curses.h) -test "$with_overwrite" = no && \ -test "x$includedir" = 'x${prefix}/include' && \ - includedir='${prefix}/include/ncurses'${LIB_SUFFIX} -AC_MSG_RESULT($includedir) +AC_SUBST(includesubdir) +includesubdir= +if test "$with_overwrite" = no && \ + ( test "x$includedir" = 'x${prefix}/include' || \ + test "x$includedir" = "x${prefix}/include" ) +then + includesubdir="/ncurses${LIB_SUFFIX}" +fi +AC_MSG_RESULT(${includedir}${includesubdir}) ### Resolve a conflict between normal and wide-curses by forcing applications ### that will need libutf8 to add it to their configure script. @@ -1829,7 +1891,7 @@ NCURSES_TREE= AC_SUBST(NCURSES_TREE) ### predefined stuff for the test programs -AC_DEFINE(HAVE_SLK_COLOR) +AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs]) ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. @@ -1848,15 +1910,16 @@ NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib' AC_SUBST(NCURSES_SHLIB2) # values to use as strings -AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR') +AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as library path-separator]) -AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}") +AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}",[Define to 1 if machine has ample memory for tic]) ### Now that we're done running tests, add the compiler-warnings, if any CF_ADD_CFLAGS($EXTRA_CFLAGS) ### Define substitutions for header files to avoid name-pollution CF_SUBST_IF(["x$cf_cv_have_tcgetattr" = xyes], HAVE_TCGETATTR, 1, 0) +CF_SUBST_IF(["x$ac_cv_header_stdint_h" = xyes], HAVE_STDINT_H, 1, 0) CF_SUBST_IF(["x$ac_cv_header_termio_h" = xyes], HAVE_TERMIO_H, 1, 0) CF_SUBST_IF(["x$ac_cv_header_termios_h" = xyes], HAVE_TERMIOS_H, 1, 0) @@ -1896,6 +1959,53 @@ AC_SUBST(MAKE_TESTS) ADAHTML_DIR=../../doc/html/ada AC_SUBST(ADAHTML_DIR) +# these could be configurable, but are not currently +PANEL_NAME=panel +MENU_NAME=menu +FORM_NAME=form +CXX_NAME=ncurses++ + +AC_SUBST(PANEL_NAME) +AC_SUBST(MENU_NAME) +AC_SUBST(FORM_NAME) +AC_SUBST(CXX_NAME) + +# workaround for g++ versus Solaris (20131116) +case $cf_cv_system_name in #(vi +solaris2*) #(vi + case "x$CPPFLAGS" in #(vi + *-D_XOPEN_SOURCE_EXTENDED*) + CF_VERBOSE(moving _XOPEN_SOURCE_EXTENDED to work around g++ problem) + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" + CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` + ;; + esac + ;; +esac + +# AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this. +case "x$NCURSES_OSPEED" in #(vi +*short*) #(vi + cf_compatible=1 + ;; +*) + cf_compatible=0 + ;; +esac +AC_DEFINE_UNQUOTED(NCURSES_OSPEED_COMPAT,$cf_compatible,[Define to 1 if termcap variable ospeed is short]) + +case "x$cf_cv_typeof_chtype" in +xshort|xint|xlong) + cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype" + ;; +esac + +case "x$cf_cv_typeof_mmask_t" in +xshort|xint|xlong) + cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t" + ;; +esac + SUB_SCRIPTS= AC_OUTPUT( \ @@ -1970,8 +2080,10 @@ cf_cv_system_name="$cf_cv_system_name" cf_cv_term_driver="$with_term_driver" cf_with_ada="$cf_with_ada" cf_with_cxx_binding="$cf_with_cxx_binding" +cf_with_db_install="$cf_with_db_install" cf_with_manpages="$cf_with_manpages" cf_with_tests="$cf_with_tests" +with_shared_cxx="$with_shared_cxx" host="$host" target="$target"