X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=03b1c64a952dd0ff59a9ddf08c250f6bb62338c8;hp=de2c1725c9e51b31894ce307a64c949d208992cf;hb=8f6d94b8d6211a2323caef53fa4c96c475ec9a62;hpb=a20e6eb464be80b9cd8cae7ce925d27fe9c209ed diff --git a/configure.in b/configure.in index de2c1725..03b1c64a 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-2018,2019 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.679 2019/03/30 21:44:53 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.679 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -61,14 +61,14 @@ AC_ARG_WITH(ada, [ --without-ada suppress check for Ada95, don't build demo], [cf_with_ada=$withval], [cf_with_ada=yes]) + if test "x$cf_with_ada" = xyes then - cf_PROG_CC="gnatgcc gcc cc" + cf_prog_cc="gnatgcc gcc cc" else - cf_PROG_CC="gcc cc" + cf_prog_cc="gcc cc" fi - -CF_PROG_CC($cf_PROG_CC) +CF_PROG_CC($cf_prog_cc) AC_PROG_CPP AC_PROG_GCC_TRADITIONAL @@ -223,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 @@ -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 @@ -594,8 +611,23 @@ AC_ARG_WITH(fallbacks, [with_fallback=$withval], [with_fallback=]) AC_MSG_RESULT($with_fallback) -FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'` + +case ".$with_fallback" in +(.|.no) + FALLBACK_LIST= + ;; +(.yes) + AC_MSG_WARN(expected a list of terminal descriptions) + ;; +(*) + FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'` + ;; +esac + +USE_FALLBACKS= +test -z "$FALLBACK_LIST" && USE_FALLBACKS="#" AC_SUBST(FALLBACK_LIST) +AC_SUBST(USE_FALLBACKS) AC_MSG_CHECKING(if you want modern xterm or antique) AC_ARG_WITH(xterm-new, @@ -645,6 +677,13 @@ CF_WITH_PATHLIST(terminfo-dirs, AC_MSG_RESULT($TERMINFO_DIRS) test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS",[Define as needed to predefine the TERMINFO_DIR searchlist]) +case "x$TERMINFO" in +x???:*) + AC_MSG_WARN(ignoring non-directory/file TERMINFO value) + unset TERMINFO + ;; +esac + AC_MSG_CHECKING(for default terminfo directory) CF_WITH_PATH(default-terminfo-dir, [ --with-default-terminfo-dir=DIR default terminfo directory], @@ -839,7 +878,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 +995,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 +1049,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 +1183,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 +1221,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 +1242,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 +1280,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 +1303,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 +1465,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 +1500,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, @@ -1630,6 +1692,7 @@ geteuid \ getopt \ getttynam \ issetugid \ +localeconv \ poll \ putenv \ remove \ @@ -1642,8 +1705,8 @@ sigaction \ sigvec \ strdup \ strstr \ +sysconf \ tcgetpgrp \ -tdestroy \ times \ tsearch \ vsnprintf \ @@ -1654,6 +1717,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 @@ -1682,6 +1755,7 @@ CF_FUNC_MEMMOVE CF_FUNC_POLL CF_VA_COPY AC_FUNC_VFORK +CF_FOPEN_BIN_R # special check for test/ditto.c CF_FUNC_OPENPTY @@ -2250,6 +2324,13 @@ fi AC_SUBST(MISC_INSTALL_DATA) AC_SUBST(MISC_UNINSTALL_DATA) +if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then + MAKE_DATABASE="#" +else + MAKE_DATABASE="$MAKE_TERMINFO" +fi +AC_SUBST(MAKE_DATABASE) + SUB_SCRIPTS= dnl Override the package used for exported symbols @@ -2292,6 +2373,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 +2442,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"