X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Faclocal.m4;h=f7ddb9a991f9bd4665dcb8102283164f44760790;hp=ad31a6434faa4cad4b2287abdcc1f2a724d973d8;hb=6830dca51a4e50d41e7bd114bdbaa857b42a46f4;hpb=c2650100f80134924eda8f22cd7cc1d1d919ee3d;ds=sidebyside diff --git a/test/aclocal.m4 b/test/aclocal.m4 index ad31a643..f7ddb9a9 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.192 2021/03/23 00:37:21 tom Exp $ dnl dnl Author: Thomas E. Dickey dnl @@ -390,10 +390,18 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_C11_NORETURN version: 1 updated: 2021/03/20 12:00:25 +dnl CF_C11_NORETURN version: 2 updated: 2021/03/22 20:37:21 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 @@ -405,6 +413,9 @@ static void giveup(void) { exit(0); } 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)