]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 6.2 - patch 20210320
[ncurses.git] / aclocal.m4
index c9f547ef0f5e73563729bfa5fd647a397a80460d..ffa2515d9f5f4fecdd2b3e4c24e327579a54ef5d 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.951 2021/03/06 00:13:35 tom Exp $
+dnl $Id: aclocal.m4,v 1.954 2021/03/20 16:02:03 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -794,6 +794,33 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_C11_NORETURN version: 1 updated: 2021/03/20 12:00:25
+dnl ---------------
+AC_DEFUN([CF_C11_NORETURN],
+[
+AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn,
+       [AC_TRY_COMPILE([
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdnoreturn.h>
+static void giveup(void) { exit(0); }
+       ],
+       [if (feof(stdin)) giveup()],
+       cf_cv_c11_noreturn=yes,
+       cf_cv_c11_noreturn=no)
+       ])
+
+if test "$cf_cv_c11_noreturn" = yes; then
+       AC_DEFINE(HAVE_STDNORETURN_H, 1)
+       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)
+])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
@@ -2669,13 +2696,14 @@ esac
 
 ])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
@@ -2712,8 +2740,8 @@ cat > "conftest.$ac_ext" <<EOF
 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
 #endif
 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
-extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
-extern void foo(void) GCC_NORETURN;
+extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
+extern GCC_NORETURN void foo(void);
 int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
 EOF
        cf_printf_attribute=no
@@ -4249,7 +4277,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
        AC_SUBST(LIB_PREFIX)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 94 updated: 2021/01/23 15:37:41
+dnl CF_LIB_RULES version: 95 updated: 2021/03/20 12:00:25
 dnl ------------
 dnl Append definitions and rules for the given models to the subdirectory
 dnl Makefiles, and the recursion rule for the top-level Makefile.  If the
@@ -4658,9 +4686,9 @@ install.includes \\
 uninstall.includes \\
 CF_EOF
                fi
-if test "$cf_dir" != "c++" ; then
+
 echo 'lint \' >> Makefile
-fi
+
 cat >> Makefile <<CF_EOF
 libs \\
 lintlib \\