dnl***************************************************************************
-dnl Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998-2015,2016 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 *
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.611 2015/04/18 17:26:15 tom Exp $
+dnl $Id: configure.in,v 1.631 2016/06/04 22:47:54 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.611 $)
+AC_REVISION($Revision: 1.631 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
CF_VERSION_INFO(NCURSES,ncurses)
CF_WITH_REL_VERSION(NCURSES)
-CF_WITH_ABI_VERSION
+CF_NCURSES_WITH_ABI_VERSION
CF_WITH_SYSTYPE
### Default install-location
CF_CFG_DEFAULTS
+### Defaults for ncurses ABI
+CF_ABI_DEFAULTS
### Checks for programs.
AC_ARG_WITH(ada,
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
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
[with_fallback=$withval],
[with_fallback=])
AC_MSG_RESULT($with_fallback)
-FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
+FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
AC_SUBST(FALLBACK_LIST)
AC_MSG_CHECKING(if you want modern xterm or antique)
[with_widec=$enableval],
[with_widec=no])
AC_MSG_RESULT($with_widec)
+
+NCURSES_WCWIDTH_GRAPHICS=1
+AC_SUBST(NCURSES_WCWIDTH_GRAPHICS)
+
if test "x$with_widec" = xyes ; then
if test "x$disable_lib_suffixes" = xno ; then
LIB_SUFFIX="w${LIB_SUFFIX}"
AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code])
CF_CHECK_WCHAR_H
+ CF_CHECK_WCWIDTH_GRAPHICS
+ test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
# with_overwrite=no
NCURSES_CH_T=cchar_t
AC_SUBST(NCURSES_OK_WINT_T)
### use option --disable-lp64 to allow long chtype
-case $cf_cv_abi_version in
-([[345]]*)
- default_with_lp64=no
- ;;
-(*)
- default_with_lp64=yes
- ;;
-esac
-
AC_MSG_CHECKING(whether to enable _LP64 definition in curses.h)
AC_ARG_ENABLE(lp64,
[ --disable-lp64 allow chtype to be long (ignore _LP64)],
[with_lp64=$enableval],
- [with_lp64=$default_with_lp64])
+ [with_lp64=$cf_dft_with_lp64])
AC_MSG_RESULT($with_lp64)
if test "x$with_lp64" = xyes ; then
AC_ARG_WITH(chtype,
[ --with-chtype=TYPE override type of chtype],
[NCURSES_CHTYPE="$withval"],
- [NCURSES_CHTYPE=auto])
+ [NCURSES_CHTYPE=$cf_dft_chtype])
AC_MSG_RESULT($NCURSES_CHTYPE)
### use option --with-ospeed to override ospeed's type
AC_ARG_WITH(mmask-t,
[ --with-mmask-t=TYPE override type of mmask_t],
[NCURSES_MMASK_T="$withval"],
- [NCURSES_MMASK_T=auto])
+ [NCURSES_MMASK_T=$cf_dft_mmask_t])
AC_MSG_RESULT($NCURSES_MMASK_T)
### use option --with-ccharw-max to override CCHARW_MAX size
AC_ARG_WITH(tparm-arg,
[ --with-tparm-arg=TYPE override parameter type of tparm],
[NCURSES_TPARM_ARG="$withval"],
- [NCURSES_TPARM_ARG=long])
+ [NCURSES_TPARM_ARG=$cf_dft_tparm_arg])
AC_MSG_RESULT($NCURSES_TPARM_ARG)
AC_SUBST(NCURSES_TPARM_ARG)
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:)
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])
AC_SUBST(NCURSES_EXT_FUNCS)
AC_SUBST(GENERATED_EXT_FUNCS)
-AC_MSG_CHECKING(if you want to build with experimental SCREEN extensions)
+AC_MSG_CHECKING(if you want to build with SCREEN extensions)
AC_ARG_ENABLE(sp-funcs,
- [ --enable-sp-funcs enable experimental SCREEN-extensions],
+ [ --enable-sp-funcs enable SCREEN-extensions],
[with_sp_funcs=$enableval],
- [with_sp_funcs=no])
+ [with_sp_funcs=$cf_dft_ext_spfuncs])
AC_MSG_RESULT($with_sp_funcs)
if test "x$with_sp_funcs" = xyes ; then
NCURSES_SP_FUNCS=1
- AC_DEFINE(NCURSES_SP_FUNCS,1,[Define to 1 to enable experimental SCREEN-extensions])
+ AC_DEFINE(NCURSES_SP_FUNCS,1,[Define to 1 to enable SCREEN-extensions])
GENERATED_SP_FUNCS=generated
else
NCURSES_SP_FUNCS=0
AC_SUBST(NCURSES_SP_FUNCS)
AC_SUBST(GENERATED_SP_FUNCS)
-AC_MSG_CHECKING(if you want to build with experimental terminal-driver)
+AC_MSG_CHECKING(if you want to build with terminal-driver)
AC_ARG_ENABLE(term-driver,
- [ --enable-term-driver enable experimental terminal-driver],
+ [ --enable-term-driver enable terminal-driver],
[with_term_driver=$enableval],
[with_term_driver=no])
AC_MSG_RESULT($with_term_driver)
if test "x$with_term_driver" = xyes ; then
- AC_DEFINE(USE_TERM_DRIVER,1,[Define to 1 to enable experimental terminal-driver])
+ AC_DEFINE(USE_TERM_DRIVER,1,[Define to 1 to enable terminal-driver])
+ if test "x$with_termlib" != xno ; then
+ AC_MSG_ERROR(The term-driver option conflicts with the termlib option)
+ fi
if test "x$with_sp_funcs" != xyes ; then
AC_MSG_ERROR(The term-driver option relies upon sp-funcs)
fi
AC_ARG_ENABLE(const,
[ --enable-const compile with extra/non-standard const],
[with_ext_const=$enableval],
- [with_ext_const=no])
+ [with_ext_const=$cf_dft_ext_const])
AC_MSG_RESULT($with_ext_const)
NCURSES_CONST='/*nothing*/'
if test "x$with_ext_const" = xyes ; then
AC_ARG_ENABLE(ext-colors,
[ --enable-ext-colors compile for 256-color support],
[with_ext_colors=$enableval],
- [with_ext_colors=no])
+ [with_ext_colors=$cf_dft_ext_colors])
AC_MSG_RESULT($with_ext_colors)
NCURSES_EXT_COLORS=0
if test "x$with_ext_colors" = xyes ; then
if test "x$with_widec" != xyes ; then
- AC_MSG_ERROR(This option applies only to wide-character library)
+ AC_MSG_WARN(This option applies only to wide-character library)
else
# cannot be ABI 5 since it changes sizeof(cchar_t)
CF_NCURSES_ABI_6
+ NCURSES_EXT_COLORS=1
+ AC_DEFINE(NCURSES_EXT_COLORS,1,[Define to 1 to compile for 256-color support])
fi
- NCURSES_EXT_COLORS=1
- AC_DEFINE(NCURSES_EXT_COLORS,1,[Define to 1 to compile for 256-color support])
fi
AC_SUBST(NCURSES_EXT_COLORS)
AC_ARG_ENABLE(ext-mouse,
[ --enable-ext-mouse compile for extended mouse-encoding],
[with_ext_mouse=$enableval],
- [with_ext_mouse=no])
+ [with_ext_mouse=$cf_dft_ext_mouse])
AC_MSG_RESULT($with_ext_mouse)
NCURSES_MOUSE_VERSION=1
if test "x$with_ext_mouse" = xyes ; then
AC_ARG_ENABLE(ext-putwin,
[ --enable-ext-putwin compile with extended putwin/screendump],
[with_ext_putwin=$enableval],
- [with_ext_putwin=no])
+ [with_ext_putwin=$cf_dft_ext_putwin])
AC_MSG_RESULT($with_ext_putwin)
if test "x$with_ext_putwin" = xyes ; then
AC_DEFINE(NCURSES_EXT_PUTWIN,1,[Define to 1 to compile with extended putwin/screendump])
### 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,
- [ --enable-interop compile-in experimental interop bindings],
+ [ --enable-interop compile-in interop bindings],
[with_exp_interop=$enableval],
- [with_exp_interop=no])
+ [with_exp_interop=$cf_dft_interop])
AC_MSG_RESULT($with_exp_interop)
NCURSES_INTEROP_FUNCS=0
# opaque outside of that, so there is no --enable-opaque option. We can use
# this option without --with-pthreads, but this will be always set for
# pthreads.
-AC_MSG_CHECKING(if you want experimental reentrant code)
+AC_MSG_CHECKING(if you want reentrant code)
AC_ARG_ENABLE(reentrant,
- [ --enable-reentrant compile with experimental reentrant code],
+ [ --enable-reentrant compile with reentrant code],
[with_reentrant=$enableval],
[with_reentrant=no])
AC_MSG_RESULT($with_reentrant)
;;
esac
fi
- AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use experimental reentrant feature])
+ AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use reentrant feature])
CF_NCURSES_ABI_6
else
cf_cv_enable_reentrant=0
test "x$with_scroll_hints" = xyes && AC_DEFINE(USE_SCROLL_HINTS,1,[Define to 1 to compile without scroll-hints code])
fi
-AC_MSG_CHECKING(if you want experimental wgetch-events code)
+AC_MSG_CHECKING(if you want wgetch-events code)
AC_ARG_ENABLE(wgetch-events,
- [ --enable-wgetch-events compile with experimental wgetch-events code],
+ [ --enable-wgetch-events compile with wgetch-events code],
[with_wgetch_events=$enableval],
[with_wgetch_events=no])
AC_MSG_RESULT($with_wgetch_events)
-test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with experimental wgetch-events code])
+test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with wgetch-events code])
###############################################################################
CF_HELP_MESSAGE(Testing/development Options:)
### Checks for libraries.
case $cf_cv_system_name in
(*mingw32*|*mingw64*)
- CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
+ CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
LIBS=" -lpsapi $LIBS"
;;
(*)
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]*)
if test "x$with_ticlib" != xyes ; then
TICS_NAME=$with_ticlib
+ TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TICS_LIB_SUFFIX="${with_ticlib}"
else
+ TICS_SUFFIX=${DFT_LIB_SUFFIX}
TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
fi
TICS_LDFLAGS="-L${LIB_DIR}"
- TICS_LIBS="-l${TICS_LIB_SUFFIX}"
+ TICS_LIBS="-l${TICS_ARG_SUFFIX}"
else
+ TICS_SUFFIX=${DFT_LIB_SUFFIX}
TICS_LDFLAGS="-L${LIB_DIR}"
TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
fi
CF_DIRS_TO_MAKE
# symbols that differ when compiling Ada95 by itself.
-NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
+NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
AC_SUBST(NCURSES_SHLIB2)
# values to use as strings
SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
-if test "x$enable_pc_files" = xyes ; then \
+if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
-MAKE_PC_FILES=
-else
-MAKE_PC_FILES="#"
fi
-AC_SUBST(MAKE_PC_FILES)
AC_SUBST(cross_compiling)
AC_PATH_PROG(TIC_PATH,tic,unknown,$PATH:/usr/local/ncurses/bin)
AC_SUBST(FORM_NAME)
AC_SUBST(CXX_NAME)
+# workaround for OS/2 (20151017)
+case $cf_cv_system_name in
+(os2*)
+ LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
+ ;;
+(*)
+ LIBTOOL_OPTS_CXX=
+ ;;
+esac
+AC_SUBST(LIBTOOL_OPTS_CXX)
+
# workaround for g++ versus Solaris (20131116)
case $cf_cv_system_name in
(solaris2*)
if test -n "$RESULTING_SYMS"
then
- case $cf_cv_abi_version in
- ([[6789]])
- CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
- cf_filter_syms=yes
- ;;
- (*)
- CF_VERBOSE(will map symbols to default ABI)
- ;;
- esac
+ cf_filter_syms=$cf_dft_filter_syms
+ CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version)
fi
if test "x$WILDCARD_SYMS" = xno
cf_filter_syms=yes
fi
+test "x$cf_with_trace" = xyes && NCURSES_INLINE=
+
UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
if test $cf_filter_syms = yes
then
fi
AC_SUBST(UNALTERED_SYMS)
+if test "x$cross_compiling" = xyes ; then
+ ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
+else
+ ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
+fi
+AC_SUBST(ADAGEN_LDFLAGS)
+
AC_OUTPUT( \
include/MKterm.h.awk \
include/curses.head:include/curses.h.in \
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
TICS_NAME="$TICS_NAME"
+TICS_SUFFIX="$TICS_SUFFIX"
TIC_PATH="$TIC_PATH"
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"