X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=test%2Faclocal.m4;h=f39f5e846e5353c14bdeb83329348ebff9674ad7;hb=2632b47fdcf4dcd101962c92acafaac69630388f;hp=fac04b27c487c83f09d107849640811f57b062be;hpb=17db5dfb5e91dbd31058d78c9c23efead6f822ea;p=ncurses.git diff --git a/test/aclocal.m4 b/test/aclocal.m4 index fac04b27..f39f5e84 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright 2018-2021,2022 Thomas E. Dickey * +dnl Copyright 2018-2022,2023 Thomas E. Dickey * dnl Copyright 2003-2017,2018 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,7 +27,7 @@ dnl sale, use or other dealings in this Software without prior written * dnl authorization. * dnl*************************************************************************** dnl -dnl $Id: aclocal.m4,v 1.207 2022/09/10 19:31:11 tom Exp $ +dnl $Id: aclocal.m4,v 1.209 2023/01/07 17:54:26 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -939,7 +939,7 @@ if (foo + 1234L > 5678L) done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30 +dnl CF_CURSES_HEADER version: 6 updated: 2022/12/02 20:06:52 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. @@ -953,7 +953,7 @@ for cf_header in \ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], - [initscr(); tgoto("?", 0,0)], + [initscr(); endwin()], [cf_cv_ncurses_header=$cf_header; break],[]) done ]) @@ -966,7 +966,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 44 updated: 2021/01/02 09:31:20 +dnl CF_CURSES_LIBS version: 45 updated: 2022/12/02 20:06:52 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -975,7 +975,7 @@ AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto("?", 0,0)], + [initscr(); endwin()], cf_result=yes, cf_result=no) AC_MSG_RESULT($cf_result) @@ -1076,7 +1076,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], - [initscr(); tgoto((char *)0, 0, 0);], + [initscr(); endwin();], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" @@ -1658,7 +1658,7 @@ fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_FUNC_CURSES_VERSION version: 8 updated: 2021/01/02 09:31:20 +dnl CF_FUNC_CURSES_VERSION version: 9 updated: 2023/01/05 18:06:10 dnl ---------------------- dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS. dnl It's a character string "SVR4", not documented. @@ -1666,11 +1666,14 @@ AC_DEFUN([CF_FUNC_CURSES_VERSION], [ AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[ AC_TRY_RUN([ +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> + int main(void) { char temp[1024]; - sprintf(temp, "%s\\n", curses_version()); + sprintf(temp, "%.999s\\n", curses_version()); ${cf_cv_main_return:-return}(0); }] ,[cf_cv_func_curses_version=yes] @@ -1738,6 +1741,7 @@ then AC_CHECKING([for $CC __attribute__ directives]) cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -2973,7 +2977,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_VERSION version: 16 updated: 2020/12/31 20:19:42 +dnl CF_NCURSES_VERSION version: 17 updated: 2023/01/05 18:54:02 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use @@ -2986,8 +2990,10 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_tempfile=out$$ rm -f "$cf_tempfile" AC_TRY_RUN([ +$ac_includes_default + #include <${cf_cv_ncurses_header:-curses.h}> -#include + int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); @@ -4347,7 +4353,7 @@ esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 60 updated: 2022/09/10 15:16:16 +dnl CF_XOPEN_SOURCE version: 63 updated: 2022/12/29 10:10:26 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, @@ -4398,7 +4404,7 @@ case "$host_os" in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) +(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) CF_GNU_SOURCE($cf_XOPEN_SOURCE) ;; (minix*) @@ -4450,10 +4456,12 @@ case "$host_os" in cf_save_xopen_cppflags="$CPPFLAGS" CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) # Some of these niche implementations use copy/paste, double-check... - CF_VERBOSE(checking if _POSIX_C_SOURCE inteferes) - AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ - AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) - CPPFLAGS="$cf_save_xopen_cppflags"]) + if test "$cf_cv_xopen_source" != no ; then + CF_VERBOSE(checking if _POSIX_C_SOURCE inteferes) + AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ + AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) + CPPFLAGS="$cf_save_xopen_cppflags"]) + fi ;; esac