X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=e0c6b55e9f9457b3aa41cf65f13c45a6ce90fba5;hp=de2c1725c9e51b31894ce307a64c949d208992cf;hb=093902b4199bbc1d9afec433759e48344c06ed1a;hpb=a20e6eb464be80b9cd8cae7ce925d27fe9c209ed diff --git a/configure.in b/configure.in index de2c1725..e0c6b55e 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.646 2017/08/07 23:27:56 tom Exp $ +dnl $Id: configure.in,v 1.665 2018/09/01 19:15:02 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.20170501) -AC_REVISION($Revision: 1.646 $) +AC_REVISION($Revision: 1.665 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -217,13 +217,27 @@ AC_ARG_PROGRAM CF_PROG_AWK CF_PROG_EGREP -CF_PROG_INSTALL +AC_PROG_INSTALL CF_PROG_LINT 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 @@ -409,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 @@ -507,6 +491,39 @@ 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_PCRE2 +CF_WITH_SYSMOUSE + # pretend that ncurses==ncursesw==ncursest AC_MSG_CHECKING(if you want to disable library suffixes) CF_ARG_DISABLE(lib-suffixes, @@ -517,7 +534,7 @@ CF_ARG_DISABLE(lib-suffixes, 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 +if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then CF_DISABLE_RPATH_HACK fi @@ -839,7 +856,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 @@ -956,6 +973,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, @@ -1008,6 +1027,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, @@ -1127,6 +1161,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) @@ -1164,21 +1199,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, @@ -1200,6 +1220,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 @@ -1237,6 +1258,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) @@ -1259,6 +1281,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 @@ -1420,7 +1443,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 @@ -1456,6 +1478,24 @@ else fi AC_SUBST(ECHO_LINK) +# --disable-stripping is used for debugging +CF_INSTALL_OPTS + +# If we're avoiding relinking of shared libraries during install, that is to +# avoid modifying the build-tree. For the same reason, avoid doing ranlib if +# the install program has "-p" (for preserving timestamps). +cf_cv_do_reranlib=yes +if test "x$cf_cv_install_p" = xyes +then + if test "x$cf_cv_do_relink" != xyes + then + cf_cv_do_reranlib=no + INSTALL_OPT_P="-p" + INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P" + fi +fi +AC_SUBST(INSTALL_OPT_P) + ### use option --enable-warnings to turn on all gcc warnings AC_MSG_CHECKING(if you want to see compiler warnings) AC_ARG_ENABLE(warnings, @@ -1642,6 +1682,7 @@ sigaction \ sigvec \ strdup \ strstr \ +sysconf \ tcgetpgrp \ tdestroy \ times \ @@ -1654,6 +1695,16 @@ if test "x$ac_cv_func_getopt" = xno && \ 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 @@ -2292,6 +2343,7 @@ else 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]) @@ -2360,6 +2412,7 @@ WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_abi_version="$cf_cv_abi_version" cf_cv_do_relink="$cf_cv_do_relink" +cf_cv_do_reranlib="$cf_cv_do_reranlib" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" cf_cv_enable_opaque="$cf_cv_enable_opaque"