dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.768 2015/09/26 21:56:12 tom Exp $
+dnl $Id: aclocal.m4,v 1.785 2015/11/08 01:03:06 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_AR_FLAGS version: 5 updated: 2010/05/20 20:24:29
+dnl CF_AR_FLAGS version: 6 updated: 2015/10/10 15:25:05
dnl -----------
dnl Check for suitable "ar" (archiver) options for updating an archive.
+dnl
+dnl In particular, handle some obsolete cases where the "-" might be omitted,
+dnl as well as a workaround for breakage of make's archive rules by the GNU
+dnl binutils "ar" program.
AC_DEFUN([CF_AR_FLAGS],[
AC_REQUIRE([CF_PROG_AR])
AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
cf_cv_ar_flags=unknown
- for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
do
# check if $ARFLAGS already contains this choice
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_ENABLE_PC_FILES version: 12 updated: 2015/04/17 21:13:04
+dnl CF_ENABLE_PC_FILES version: 13 updated: 2015/11/01 05:27:39
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
if test "x$enable_pc_files" != xno
then
+ MAKE_PC_FILES=
case "x$PKG_CONFIG_LIBDIR" in
(xno|xyes)
AC_MSG_WARN(no PKG_CONFIG_LIBDIR was found)
- MAKE_PC_FILES="#"
;;
(*)
CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
- MAKE_PC_FILES=
;;
esac
else
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_POLL version: 8 updated: 2012/10/04 05:24:07
+dnl CF_FUNC_POLL version: 9 updated: 2015/10/10 13:27:32
dnl ------------
dnl See if the poll function really works. Some platforms have poll(), but
dnl it does not work for terminals or files.
AC_DEFUN([CF_FUNC_POLL],[
+tty 2>&1 >/dev/null || { AC_CHECK_FUNCS(posix_openpt) }
AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
AC_TRY_RUN([
#include <stdlib.h>
#else
#include <sys/poll.h>
#endif
-int main() {
+int main(void) {
struct pollfd myfds;
int ret;
if (!isatty(fd)) {
fd = open("/dev/tty", 2); /* O_RDWR */
}
+#ifdef HAVE_POSIX_OPENPT
+ if (fd < 0) {
+ fd = posix_openpt(O_RDWR);
+ }
+#endif
if (fd >= 0) {
/* also check with standard input */
test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_PREFIX version: 11 updated: 2015/04/18 08:56:57
+dnl CF_LIB_PREFIX version: 12 updated: 2015/10/17 19:03:33
dnl -------------
dnl Compute the library-prefix for the given host system
dnl $1 = variable to set
[
case $cf_cv_system_name in
(OS/2*|os2*)
- LIB_PREFIX=''
+ if test "$DFT_LWR_MODEL" = libtool; then
+ LIB_PREFIX='lib'
+ else
+ LIB_PREFIX=''
+ fi
;;
(*) LIB_PREFIX='lib'
;;
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 84 updated: 2015/09/26 17:54:46
+dnl CF_LIB_RULES version: 86 updated: 2015/11/07 20:01:34
dnl ------------
dnl Append definitions and rules for the given models to the subdirectory
dnl Makefiles, and the recursion rule for the top-level Makefile. If the
SHARED_LIB=
Libs_To_Make=
-
- cf_sed_options=
+ cf_awk_program=
if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
then
- cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([[WT]]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
- cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
+ cf_awk_program="$cf_awk_program\
+/deprecated in ABI${cf_cv_abi_version}/ { next; }\
+{ sub(\"NCURSES([[WT]]+)?\", \"&${cf_cv_abi_version}\"); }\
+"
fi
if test "x$WILDCARD_SYMS" = xno
then
- cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
+ cf_awk_program="$cf_awk_program\
+/[[ ]]_\\*;/ { skip=1; next; }\
+"
fi
- if test "x$cf_sed_options" != "x"
+ if test "x$cf_awk_program" != "x"
then
cat >>$cf_dir/Makefile <<CF_EOF
# Generated by CF_LIB_RULES
resulting.map: $UNALTERED_SYMS
- sed $cf_sed_options < $UNALTERED_SYMS >\[$]@
+ $AWK 'BEGIN { skip = 1; last=""; } \
+$cf_awk_program \
+{ if ( last != "" && ( skip == 0 || \[$]\[$]0 !~ /}/ ) ) { print last; }\
+ skip = 0; last = \[$]\[$]0; } \
+END { print last; }' < $UNALTERED_SYMS >\[$]@
distclean::
rm -f resulting.map
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_STDCPP_LIBRARY version: 10 updated: 2015/09/12 15:53:39
+dnl CF_STDCPP_LIBRARY version: 11 updated: 2015/10/17 19:03:33
dnl -----------------
dnl Check for -lstdc++, which is GNU's standard C++ library.
dnl If $CXXLIBS is set, add that to the libraries used for test-linking.
then
case $cf_cv_system_name in
(os2*)
- cf_stdcpp_libname=stdcpp
+ if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
+ cf_stdcpp_libname=stdcpp
+ else
+ cf_stdcpp_libname=stdc++
+ fi
;;
(*)
cf_stdcpp_libname=stdc++
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 32 updated: 2015/04/17 21:13:04
+dnl CF_WITH_LIBTOOL version: 33 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in
- (cygwin*|msys*|mingw32*|uwin*|aix[[4-7]])
+ (cygwin*|msys*|mingw32*|os2*|uwin*|aix[[4-7]])
LT_UNDEF=-no-undefined
;;
esac
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_VERSIONED_SYMS version: 5 updated: 2015/04/17 21:13:04
+dnl CF_WITH_VERSIONED_SYMS version: 7 updated: 2015/10/24 20:50:26
dnl ----------------------
dnl Use this when building shared library with ELF, to markup symbols with the
dnl version identifier from the given input file. Generally that identifier is
# compile source, make library
if make -f conftest.mk 2>&AC_FD_CC >/dev/null
then
- # test for missing symbol
- cf_missing=`nm -P conftest.so 2>&AC_FD_CC |fgrep _ismissing | egrep '[[ ]]T[[ ]]'`
+ # test for missing symbol in either Data or Text section
+ cf_missing=`nm -P conftest.so 2>&AC_FD_CC |fgrep _ismissing | egrep '[[ ]][[DT]][[ ]]'`
test -n "$cf_missing" && WILDCARD_SYMS=yes
fi
AC_MSG_RESULT($WILDCARD_SYMS)
AC_SUBST(WILDCARD_SYMS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
+dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
+(os2*)
+ cf_XOPEN_SOURCE=
+ ;;
(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;