dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.651 2018/01/01 15:11:50 tom Exp $
+dnl $Id: configure.in,v 1.664 2018/08/18 20:27:17 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See https://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20170501)
-AC_REVISION($Revision: 1.651 $)
+AC_REVISION($Revision: 1.664 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
CF_PROG_AWK
CF_PROG_EGREP
-CF_PROG_INSTALL
+AC_PROG_INSTALL
CF_PROG_LINT
CF_PROG_LN_S
# of package conflict.
cf_config_suffix=
AC_ARG_WITH(config-suffix,
- [ --with-config-suffix=X suffixes pc-files],
+ [ --with-config-suffix=X suffixes ncursesXX-config file],
[case "x$withval" in
(xyes|xno)
AC_MSG_WARN(expected a value for config-suffix option)
[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 <gpm.h>],[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
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 <gpm.h>],[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,
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
# 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
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,
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,
AC_SUBST(NCURSES_XNAMES)
##############################################################################
+CF_HELP_MESSAGE(Reentrant Code:)
CF_WITH_PTHREAD
if test "x$with_pthread" != xno; 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)
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
[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
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,
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
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])
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"