X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=7d00bf7131df0cd63df2726ab2adae69e024450d;hp=703300c8a2471aa2e2c5236065e862fcaeef9606;hb=d30f99439fcc8d4bb4c38e5c4afb4f6555fc6ad4;hpb=152c5a605234b7ea36ba3a03ec07e124bb6aac75 diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 703300c8..7d00bf71 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.171 2021/01/06 01:29:44 tom Exp $ +dnl $Id: aclocal.m4,v 1.174 2021/04/03 20:46:10 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -550,6 +550,45 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- +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 _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,[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 + HAVE_STDNORETURN_H=0 +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 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content @@ -1274,13 +1313,14 @@ fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 23 updated: 2021/01/03 18:30:50 +dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. AC_DEFUN([CF_GCC_ATTRIBUTES], [AC_REQUIRE([AC_PROG_FGREP])dnl +AC_REQUIRE([CF_C11_NORETURN])dnl if test "$GCC" = yes || test "$GXX" = yes then @@ -1317,8 +1357,8 @@ cat > "conftest.$ac_ext" <