X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=b42214598d7d106aa36fd320aa2f6dbc0929a7fe;hp=04e09bf3e024fee38c78b2993b295dba62fa7627;hb=746490c7ab9f66c7521c500684e65eca223c551c;hpb=3eda6f30a84d53844d2ebceadb457e2e7e9cfbf3;ds=sidebyside diff --git a/configure.in b/configure.in index 04e09bf3..b4221459 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2017,2018 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.640 2017/04/01 21:10:59 tom Exp $ +dnl $Id: configure.in,v 1.659 2018/06/16 21:26:41 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 See https://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- -AC_PREREQ(2.52.20030208) -AC_REVISION($Revision: 1.640 $) +AC_PREREQ(2.52.20170501) +AC_REVISION($Revision: 1.659 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -178,6 +178,22 @@ AC_ARG_WITH(progs, [cf_with_progs=yes]) AC_MSG_RESULT($cf_with_progs) +if test -f $srcdir/tack/tack.h; then + if test "x$cross_compiling" = xyes ; then + CF_VERBOSE(ignoring tack because we are cross-compiling) + cf_with_tack=no + else + AC_MSG_CHECKING(if you want to build the tack program) + AC_ARG_WITH(tack, + [ --without-tack suppress build/install with tack program], + [cf_with_tack=$withval], + [cf_with_tack=$cf_with_progs]) + AC_MSG_RESULT($cf_with_tack) + fi +else + cf_with_tack=no +fi + AC_MSG_CHECKING(if you want to build test-programs) AC_ARG_WITH(tests, [ --without-tests suppress build/install with test-programs], @@ -193,9 +209,8 @@ AC_ARG_WITH(curses-h, AC_MSG_RESULT($with_curses_h) modules_to_build="ncurses" -if test "X$cf_with_progs" != Xno ; then -modules_to_build="$modules_to_build progs tack" -fi +test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs" +test "X$cf_with_tack" != Xno && modules_to_build="$modules_to_build tack" modules_to_build="$modules_to_build panel menu form" AC_ARG_PROGRAM @@ -208,7 +223,21 @@ CF_PROG_LN_S AC_SYS_LONG_FILE_NAMES -# if we find pkg-config, check if we should install the ".pc" files. +# Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case +# of package conflict. +cf_config_suffix= +AC_ARG_WITH(config-suffix, + [ --with-config-suffix=X suffixes ncursesXX-config file], + [case "x$withval" in + (xyes|xno) + AC_MSG_WARN(expected a value for config-suffix option) + ;; + (*) cf_config_suffix="$withval" + ;; + esac]) +AC_SUBST(cf_config_suffix) + +# If we find pkg-config, check if we should install the ".pc" files. CF_PKG_CONFIG CF_WITH_PKG_CONFIG_LIBDIR CF_ENABLE_PC_FILES @@ -394,36 +423,6 @@ AC_ARG_WITH(ticlib, [with_ticlib=no]) AC_MSG_RESULT($with_ticlib) -### Checks for special libraries, must be done up-front. -SHLIB_LIST="" -CF_WITH_GPM -if test "$with_gpm" != no ; then - AC_MSG_CHECKING(if you want to load GPM dynamically) - AC_ARG_WITH(dlsym, - [ --without-dlsym do not use dlsym() to load GPM dynamically], - [with_dlsym=$withval], - [with_dlsym=yes]) - AC_MSG_RESULT($with_dlsym) - if test "x$with_dlsym" = xyes ; then - CF_FUNC_DLSYM - if test "x$with_gpm" != xyes ; then - CF_VERBOSE(assuming soname for gpm is $with_gpm) - cf_cv_gpm_soname="$with_gpm" - 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",[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,1,[Define to 1 if we have the gpm library]) - CF_CHECK_GPM_WGETCH -fi - -CF_WITH_SYSMOUSE - dnl Not all ports of gcc support the -g option if test X"$CC_G_OPT" = X"" ; then @@ -492,6 +491,38 @@ for model in $cf_list_models; do esac done +### Checks for special libraries, must be done up-front. +SHLIB_LIST="" +CF_WITH_GPM +if test "$with_gpm" != no ; then + AC_MSG_CHECKING(if you want to load GPM dynamically) + AC_ARG_WITH(dlsym, + [ --without-dlsym do not use dlsym() to load GPM dynamically], + [with_dlsym=$withval], + [with_dlsym=yes]) + AC_MSG_RESULT($with_dlsym) + if test "x$with_dlsym" = xyes ; then + CF_FUNC_DLSYM + if test "x$with_gpm" != xyes ; then + CF_VERBOSE(assuming soname for gpm is $with_gpm) + cf_cv_gpm_soname="$with_gpm" + 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",[Define as needed to set the gpm share library soname]) + SHLIB_LIST="-ldl $SHLIB_LIST" + CF_ADD_LIB(dl,PRIVATE_LIBS) + else + SHLIB_LIST="-lgpm $SHLIB_LIST" + CF_ADD_LIB(gpm,TEST_LIBS) + CF_ADD_LIB(gpm,PRIVATE_LIBS) + fi + AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library]) + CF_CHECK_GPM_WGETCH +fi + +CF_WITH_SYSMOUSE + # pretend that ncurses==ncursesw==ncursest AC_MSG_CHECKING(if you want to disable library suffixes) CF_ARG_DISABLE(lib-suffixes, @@ -824,7 +855,7 @@ NCURSES_WINT_T=0 # Check to define _XOPEN_SOURCE "automatically" CPPFLAGS_before_XOPEN="$CPPFLAGS" -CF_XOPEN_SOURCE(500) +CF_XOPEN_SOURCE(600) CPPFLAGS_after_XOPEN="$CPPFLAGS" # Work around breakage on OS X @@ -941,6 +972,8 @@ else fi AC_SUBST(NCURSES_WATTR_MACROS) +CF_WITH_X11_RGB + ### use option --with-bool to override bool's type AC_MSG_CHECKING(for type of bool) AC_ARG_WITH(bool, @@ -993,6 +1026,21 @@ AC_ARG_WITH(ccharw-max, AC_MSG_RESULT($NCURSES_CCHARW_MAX) AC_SUBST(NCURSES_CCHARW_MAX) +AC_CHECK_SIZEOF([signed char], 0) +if test "$ac_cv_sizeof_signed_char" = 1 ; then + NCURSES_SBOOL="signed char" +else + NCURSES_SBOOL="char" +fi +AC_MSG_CHECKING(if you want to use signed Boolean array in term.h) +AC_ARG_ENABLE(signed-char, + [ --enable-signed-char compile using signed Boolean's in term.h], + [with_signed_char=$enableval], + [with_signed_char=no]) +AC_MSG_RESULT($with_signed_char) +test "x$with_signed_char" != xyes && NCURSES_SBOOL="char" +AC_SUBST(NCURSES_SBOOL) + ### use option --with-tparm-arg to override tparm's argument type AC_MSG_CHECKING(for type of tparm args) AC_ARG_WITH(tparm-arg, @@ -1112,6 +1160,7 @@ if test "x$with_ext_colors" = xyes ; then AC_DEFINE(NCURSES_EXT_COLORS,1,[Define to 1 to compile for 256-color support]) AC_DEFINE(HAVE_ALLOC_PAIR,1,[Define to 1 to enable alloc_pair() function]) AC_DEFINE(HAVE_INIT_EXTENDED_COLOR,1,[Define to 1 to enable init_extended_color() function in test-programs]) + AC_DEFINE(HAVE_RESET_COLOR_PAIRS,1,[Define to 1 to enable reset_color_pairs() function in test-programs]) fi fi AC_SUBST(NCURSES_EXT_COLORS) @@ -1149,21 +1198,6 @@ AC_ARG_ENABLE(no-padding, AC_MSG_RESULT($with_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 - NCURSES_SBOOL="signed char" -else - NCURSES_SBOOL="char" -fi -AC_MSG_CHECKING(if you want to use signed Boolean array in term.h) -AC_ARG_ENABLE(signed-char, - [ --enable-signed-char compile using signed Boolean's in term.h], - [with_signed_char=$enableval], - [with_signed_char=no]) -AC_MSG_RESULT($with_signed_char) -test "x$with_signed_char" != xyes && NCURSES_SBOOL="char" -AC_SUBST(NCURSES_SBOOL) - ### use option --enable-sigwinch to turn on use of SIGWINCH logic AC_MSG_CHECKING(if you want SIGWINCH handler) AC_ARG_ENABLE(sigwinch, @@ -1185,6 +1219,7 @@ test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1 AC_SUBST(NCURSES_XNAMES) ############################################################################## +CF_HELP_MESSAGE(Reentrant Code:) CF_WITH_PTHREAD if test "x$with_pthread" != xno; then @@ -1222,6 +1257,7 @@ if test "x$with_pthread" = "xyes" ; then enable_reentrant=yes if test "x$cf_cv_weak_symbols" = xyes ; then PTHREAD=-lpthread + CF_ADD_LIB(pthread,PRIVATE_LIBS) fi fi AC_SUBST(PTHREAD) @@ -1244,6 +1280,7 @@ if test "x$with_reentrant" = xyes ; then CF_REMOVE_LIB(LIBS,$LIBS,pthread) CF_ADD_LIB(pthread,TEST_LIBS) CF_ADD_LIB(pthread,TEST_LIBS2) + CF_ADD_LIB(pthread,PRIVATE_LIBS) else # when not using weak symbols but with_reentrant, # add 't' to the library suffix on all platforms @@ -1405,7 +1442,6 @@ 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,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 @@ -1441,6 +1477,9 @@ else fi AC_SUBST(ECHO_LINK) +# --disable-stripping is used for debugging +CF_INSTALL_OPTS + ### use option --enable-warnings to turn on all gcc warnings AC_MSG_CHECKING(if you want to see compiler warnings) AC_ARG_ENABLE(warnings, @@ -1509,6 +1548,7 @@ if test "x$cf_with_trace" = xyes ; then LIB_TRACING=all ADA_TRACE=TRUE CF_ADD_CFLAGS(-DTRACE) + AC_DEFINE(HAVE__TRACEF,1,[Define to 1 if we have _tracef function]) else LIB_TRACING=DEBUG ADA_TRACE=FALSE @@ -1627,15 +1667,27 @@ sigvec \ strdup \ strstr \ tcgetpgrp \ +tdestroy \ times \ +tsearch \ vsnprintf \ ) -if test "x$ac_cv_func_getopt" = xno && +if test "x$ac_cv_func_getopt" = xno && \ test "x$cf_with_progs$cf_with_tests" != xnono; then AC_MSG_ERROR(getopt is required for building programs) fi +if test "x$with_safe_sprintf" = xyes +then + if test "x$ac_cv_func_vsnprintf" = xyes + then + AC_MSG_WARN(will use vsnprintf instead of safe-sprintf option) + else + AC_DEFINE(USE_SAFE_SPRINTF,1,[Define to 1 to compile with experimental safe-sprintf code]) + fi +fi + if test "x$with_getcap" = "xyes" ; then CF_CGETENT fi @@ -2267,10 +2319,16 @@ AC_SUBST(UNALTERED_SYMS) if test "x$cross_compiling" = xyes ; then ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)' + CHECK_BUILD="#" else ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)' + CHECK_BUILD= fi AC_SUBST(ADAGEN_LDFLAGS) +AC_SUBST(CHECK_BUILD) +AC_SUBST(PRIVATE_LIBS) + +AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack]) AC_OUTPUT( \ include/MKterm.h.awk \