]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 6.0 - patch 20170204
[ncurses.git] / configure.in
index 2b9a9db858df02a817f0807bed238d9fa2294f7b..aec65495d2d5453105182611adbd05466d1e2efa 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.627 2016/03/05 23:44:23 tom Exp $
+dnl $Id: configure.in,v 1.633 2016/12/11 02:17:55 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.52.20030208)
-AC_REVISION($Revision: 1.627 $)
+AC_REVISION($Revision: 1.633 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -72,7 +72,7 @@ CF_PROG_CC($cf_PROG_CC)
 
 AC_PROG_CPP
 AC_PROG_GCC_TRADITIONAL
-CF_PROG_CC_C_O(CC)
+CF_PROG_CC_C_O(CC,[$CFLAGS $CPPFLAGS])
 CF_PROG_LDCONFIG
 
 dnl DEFECT in autoconf 2.12:   an attempt to set policy, this breaks the
@@ -474,6 +474,19 @@ for model in $cf_list_models; do
                if test "$CC_SHARED_OPTS" = "unknown"; then
                        AC_ERROR(Shared libraries are not supported in this version)
                fi
+               # workaround for inept transition to PIE vs PIC...
+               AC_MSG_CHECKING(if current CFLAGS link properly)
+               AC_TRY_LINK(
+                       [#include <stdio.h>],
+                       [printf("Hello work\n");],
+                       [cf_cflags_work=yes],
+                       [cf_cflags_work=no])
+               AC_MSG_RESULT($cf_cflags_work)
+               if test "$cf_cflags_work" = no
+               then
+                       CF_VERBOSE(try to work around by appending shared-options)
+                       CFLAGS="$CFLAGS $CC_SHARED_OPTS"
+               fi
                CF_WITH_VERSIONED_SYMS
                ;;
        esac
@@ -913,6 +926,21 @@ else
        with_tic_depends=no
 fi
 
+###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
+AC_MSG_CHECKING(if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition)
+AC_ARG_ENABLE(wattr-macros,
+       [  --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition],
+       [with_wattr_macros=$enableval],
+       [with_wattr_macros=yes])
+if [[ "x$with_wattr_macros" != xyes ]]; then
+       NCURSES_WATTR_MACROS=0
+       AC_MSG_RESULT(yes)
+else
+       NCURSES_WATTR_MACROS=1
+       AC_MSG_RESULT(no)
+fi
+AC_SUBST(NCURSES_WATTR_MACROS)
+
 ###   use option --with-bool to override bool's type
 AC_MSG_CHECKING(for type of bool)
 AC_ARG_WITH(bool,
@@ -984,7 +1012,7 @@ AC_MSG_RESULT($with_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 ])
+CF_MAN_PAGES([ captoinfo clear infocmp infotocap reset tabs tic toe tput tset ])
 
 ###############################################################################
 CF_HELP_MESSAGE(Extensions:)
@@ -1005,6 +1033,7 @@ if test "x$with_ext_funcs" = xyes ; then
        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_EXTENDED_NAMES,1,[Define to 1 to enable use_extended_names() 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])
@@ -1623,7 +1652,7 @@ CF_BOOL_DECL(cf_cv_cc_bool_type)
 if test -n "$CXX" ; then
        AC_LANG_CPLUSPLUS
        CF_STDCPP_LIBRARY
-       CF_PROG_CC_C_O(CXX)
+       CF_PROG_CC_C_O(CXX,[$CXXFLAGS $CPPFLAGS])
 
        case $GXX_VERSION in
        (1*|2.[0-6]*)