X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=d64cb1c1ea4f2fd1d00ebb7b32209ba711db2cdb;hp=5983876f1b46a908fe495ad5ec3b910b0dbf441d;hb=d61c3c6a831d18ef0ed6f797ac97d60fffc2f158;hpb=3ef920d65fb2d4046096131d868ae8d4bba79d46 diff --git a/configure.in b/configure.in index 5983876f..d64cb1c1 100644 --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.700 2020/03/08 00:53:28 tom Exp $ +dnl $Id: configure.in,v 1.711 2020/07/11 20:18:40 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl For additional information, see @@ -38,7 +38,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20200111) -AC_REVISION($Revision: 1.700 $) +AC_REVISION($Revision: 1.711 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -145,9 +145,9 @@ fi CF_GXX_VERSION case $GXX_VERSION in -(1*|2.[[0-6]]*) - # GXX=""; CXX=""; ac_cv_prog_gxx=no - # cf_cxx_library=no +([[1-9]][[0-9]].*) + ;; +(1.*|2.[[0-6]]*) AC_MSG_WARN(templates do not work) ;; esac @@ -543,6 +543,23 @@ if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then CF_DISABLE_RPATH_HACK fi +### Depending on the system, someone may use rpath to build ncurses but not +# want users of the package to rely upon that feature. Give those people an +# option to suppress that detail from EXTRA_LDFLAGS. +EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS" +if test -n "$EXTRA_PKG_LDFLAGS" +then + AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts) + CF_ARG_DISABLE(pkg-ldflags, + [ --disable-pkg-ldflags disable extra LDFLAGS for package-scripts], + [disable_pkg_ldflags=yes], + [disable_pkg_ldflags=no], + no) + AC_MSG_RESULT($disable_pkg_ldflags) + test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS= +fi +AC_SUBST(EXTRA_PKG_LDFLAGS) + ############################################################################### CF_HELP_MESSAGE(Fine-Tuning Your Configuration:) @@ -1447,6 +1464,38 @@ AC_ARG_ENABLE(colorfgbg, AC_MSG_RESULT($with_colorfgbg) test "x$with_colorfgbg" = xyes && AC_DEFINE(USE_COLORFGBG,1,[Define to 1 to compile-in experimental $COLORFGBG code]) +### use option --enable-fvisibility to turn on use of gcc-specific feature +AC_MSG_CHECKING(if you want to use gcc -fvisibility option) +AC_ARG_ENABLE(fvisibility, + [ --enable-fvisibility compile with -fvisibility=hidden], + [cf_with_fvisibility=$enableval], + [cf_with_fvisibility=no]) +AC_MSG_RESULT($cf_with_fvisibility) + +NCURSES_IMPEXP= +NCURSES_CXX_IMPEXP= +if test "x$cf_with_fvisibility" = xyes; then + CF_CHECK_FVISIBILITY($CC,CFLAGS,cf_cv_fvisibility_hidden) + if test "x$cf_cv_fvisibility_hidden" = xyes + then + CF_ADD_CFLAGS([-fvisibility=hidden]) + NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))" + fi + if test -n "$CXX" + then + AC_LANG_PUSH(C++) + CF_CHECK_FVISIBILITY($CXX,CXXFLAGS,cf_cv_fvisibility_hidden2) + if test "x$cf_cv_fvisibility_hidden2" = xyes + then + CF_ADD_CXXFLAGS([-fvisibility=hidden]) + NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))" + fi + AC_LANG_POP + fi +fi +AC_SUBST(NCURSES_IMPEXP) +AC_SUBST(NCURSES_CXX_IMPEXP) + ### use option --enable-interop to turn on use of bindings used for interop AC_MSG_CHECKING(if you want interop bindings) AC_ARG_ENABLE(interop, @@ -1712,6 +1761,7 @@ setenv \ setvbuf \ sigaction \ sigvec \ +snprintf \ strdup \ strstr \ sysconf \ @@ -1799,7 +1849,7 @@ if test -n "$CXX" ; then CF_PROG_CC_C_O(CXX,[$CXXFLAGS $CPPFLAGS]) case $GXX_VERSION in - (1*|2.[0-6]*) + (1.*|2.[[0-6]]*|[[1-9]][[0-9]].*) cf_cxx_library=yes ;; (*-2.7*|2.7*) @@ -2181,6 +2231,17 @@ fi fi WITH_OVERWRITE=$with_overwrite +### At least on MinGW a shared library build without libtool +### requires adding the additional libs to the link list. +case $cf_cv_system_name in +(*mingw32*|*mingw64*) + if test "$DFT_LWR_MODEL" != "libtool"; then + SHLIB_LIST="$SHLIB_LIST ${LIBS}" + fi + ;; +*) ;; +esac + AC_SUBST(WITH_OVERWRITE) AC_SUBST(TICS_LIST) AC_SUBST(TINFO_LIST)