ncurses 6.2 - patch 20210323
[ncurses.git] / test / aclocal.m4
index ad31a6434faa4cad4b2287abdcc1f2a724d973d8..f7ddb9a991f9bd4665dcb8102283164f44760790 100644 (file)
@@ -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 <stdio.h>
@@ -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)