X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Faclocal.m4;h=eef6e1905e8fcca562bd09629795ee26b9f981d9;hp=ad31a6434faa4cad4b2287abdcc1f2a724d973d8;hb=e506fcb22913defb36b205cd5e84257c915d0e5e;hpb=c2650100f80134924eda8f22cd7cc1d1d919ee3d diff --git a/test/aclocal.m4 b/test/aclocal.m4 index ad31a643..eef6e190 100644 --- a/test/aclocal.m4 +++ b/test/aclocal.m4 @@ -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.191 2021/03/20 16:33:11 tom Exp $ +dnl $Id: aclocal.m4,v 1.193 2021/04/03 20:48:45 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -390,24 +390,35 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 1 updated: 2021/03/20 12:00:25 +dnl CF_C11_NORETURN version: 3 updated: 2021/03/28 11:36:23 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ +AC_MSG_CHECKING(if you want to use C11 _Noreturn feature) +CF_ARG_ENABLE(stdnoreturn, + [ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics], + [enable_stdnoreturn=yes], + [enable_stdnoreturn=no]) +AC_MSG_RESULT($enable_stdnoreturn) + +if test $enable_stdnoreturn = yes; then AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, [AC_TRY_COMPILE([ #include #include #include -static void giveup(void) { exit(0); } +static _Noreturn void giveup(void) { exit(0); } ], [if (feof(stdin)) giveup()], cf_cv_c11_noreturn=yes, cf_cv_c11_noreturn=no) ]) +else + cf_cv_c11_noreturn=no, +fi if test "$cf_cv_c11_noreturn" = yes; then - AC_DEFINE(HAVE_STDNORETURN_H, 1) + AC_DEFINE(HAVE_STDNORETURN_H, 1,[Define if header is available and working]) AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported]) HAVE_STDNORETURN_H=1 else @@ -415,6 +426,7 @@ else fi AC_SUBST(HAVE_STDNORETURN_H) +AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CC_ENV_FLAGS version: 10 updated: 2020/12/31 18:40:20 @@ -1287,7 +1299,7 @@ AC_SUBST(SHOW_CC) AC_SUBST(ECHO_CC) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_LEAKS version: 8 updated: 2021/01/05 20:05:09 +dnl CF_DISABLE_LEAKS version: 9 updated: 2021/04/03 16:41:50 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. @@ -1300,9 +1312,9 @@ AC_REQUIRE([CF_WITH_VALGRIND]) AC_MSG_CHECKING(if you want to perform memory-leak testing) AC_ARG_ENABLE(leaks, [ --disable-leaks test: free permanent memory, analyze leaks], - [enable_leaks=no], + [enable_leaks=$enableval], [enable_leaks=yes]) -dnl TODO - drop with_no_leaks +dnl with_no_leaks is more readable... if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi AC_MSG_RESULT($with_no_leaks)