X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=30127c5ed43ca4476024fa08dba886e917df7e7b;hp=5878b039313530f9f2c74e559f104844e3ceac0e;hb=45a2b5bc1a4536173178e9907feb268c708797c7;hpb=d30f99439fcc8d4bb4c38e5c4afb4f6555fc6ad4 diff --git a/aclocal.m4 b/aclocal.m4 index 5878b039..30127c5e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.957 2021/04/03 20:43:02 tom Exp $ +dnl $Id: aclocal.m4,v 1.960 2021/05/01 21:51:55 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1328,21 +1328,34 @@ if test "$cf_cv_check_gpm_wgetch" != yes ; then fi ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09 +dnl CF_CHECK_LIBTOOL_VERSION version: 2 updated: 2021/05/01 16:24:34 dnl ------------------------ dnl Show the version of libtool dnl dnl Save the version in a cache variable - this is not entirely a good thing, dnl but the version string from libtool is very ugly, and for bug reports it dnl might be useful to have the original string. +dnl +dnl There is an imitation in OpenBSD, which has no apparent use other than to +dnl deny that it is GNU libtool. Just ignore it. AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[ if test -n "$LIBTOOL" && test "$LIBTOOL" != none then AC_MSG_CHECKING(version of $LIBTOOL) CF_LIBTOOL_VERSION AC_MSG_RESULT($cf_cv_libtool_version) - if test -z "$cf_cv_libtool_version" ; then - AC_MSG_ERROR(This is not GNU libtool) + if test -n "$cf_cv_libtool_version" + then + cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[[()]],...,g' -e 's,[[ ]],-,g' -e '2,$d'` + case "x$cf_check_libtool_version" in + (*...GNU-libtool...*) + ;; + (*) + AC_MSG_ERROR(This is not GNU libtool) + ;; + esac + else + AC_MSG_ERROR(No version found for $LIBTOOL) fi else AC_MSG_ERROR(GNU libtool has not been found) @@ -5094,7 +5107,7 @@ AC_SUBST(BROKEN_LINKER) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LINK_FUNCS version: 10 updated: 2021/04/03 15:45:02 +dnl CF_LINK_FUNCS version: 11 updated: 2021/04/18 14:08:47 dnl ------------- dnl Most Unix systems have both link and symlink, a few don't have symlink. dnl A few non-Unix systems implement symlink, but not link. @@ -5120,6 +5133,7 @@ else cf_cv_link_funcs= for cf_func in link symlink ; do AC_TRY_RUN([ +#include #include #include #ifdef HAVE_UNISTD_H @@ -5128,27 +5142,26 @@ else int main(void) { int fail = 0; - char *src = "config.log"; + char *src = "conftest.tmp"; char *dst = "conftest.chk"; - struct stat src_sb; - struct stat dst_sb; - - stat(src, &src_sb); - if ($cf_func("config.log", "conftest.chk") < 0) { - fail = 1; - } else if (stat(dst, &dst_sb) < 0) { - fail = 2; - } else { - long diff = (dst_sb.st_mtime - src_sb.st_mtime); - if (diff < 0) - diff = -diff; - if (diff > 2) - fail = 3; + struct stat src_sb, dst_sb; + FILE *fp = fopen(src, "w"); + if (fp == 0) { fail = 3; } else { + fclose(fp); stat(src, &src_sb); + if ($cf_func(src, dst) < 0) { + fail = 1; + } else if (stat(dst, &dst_sb) < 0) { + fail = 2; + } else { + long diff = (dst_sb.st_mtime - src_sb.st_mtime); + if (diff < 0) diff = -diff; + if (diff > 2) fail = 3; + } } #ifdef HAVE_UNLINK - unlink(dst); + unlink(dst); unlink(src); #else - remove(dst); + remove(dst); remove(src); #endif ${cf_cv_main_return:-return} (fail); } @@ -9430,7 +9443,7 @@ fi AC_SUBST(no_x11_rgb) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 57 updated: 2021/01/01 16:53:59 +dnl CF_XOPEN_SOURCE version: 58 updated: 2021/05/01 17:49:36 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, @@ -9495,7 +9508,15 @@ case "$host_os" in (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; -(openbsd[[4-9]]*) +(openbsd[[6-9]]*) + # OpenBSD 6.x has broken locale support, both compile-time and runtime. + # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html + # Abusing the conformance level is a workaround. + AC_MSG_WARN(this system does not provide usable locale support) + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=700 + ;; +(openbsd[[4-5]]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600