X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=225dc220881f97a8ccc52d0635eb0439ff3a9be8;hp=b9982e77a6d65ffcef193705c9c369a1b060878a;hb=5079dc1dbbaa5128ac761358dcf81c8b606983c4;hpb=2ba352d86b57bddd1dd2a6e20892f380c34180b7 diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index b9982e77..225dc220 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.161 2020/08/29 13:18:29 tom Exp $ +dnl $Id: aclocal.m4,v 1.162 2020/09/26 23:08:42 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -978,9 +978,15 @@ fi AC_SUBST(BROKEN_LINKER) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ENABLE_WARNINGS version: 6 updated: 2020/08/28 04:10:22 +dnl CF_ENABLE_WARNINGS version: 7 updated: 2020/08/29 09:05:21 dnl ------------------ dnl Configure-option to enable gcc warnings +dnl +dnl $1 = extra options to add, if supported +dnl $2 = option for checking attributes. By default, this is done when +dnl warnings are enabled. For other values: +dnl yes: always do this, e.g., to use in generated library-headers +dnl no: never do this AC_DEFUN([CF_ENABLE_WARNINGS],[ if ( test "$GCC" = yes || test "$GXX" = yes ) then @@ -995,9 +1001,10 @@ CF_ARG_ENABLE(warnings, AC_MSG_RESULT($with_warnings) if test "$with_warnings" = "yes" then - CF_GCC_ATTRIBUTES + ifelse($2,,[CF_GCC_ATTRIBUTES]) CF_GCC_WARNINGS($1) fi +ifelse($2,yes,[CF_GCC_ATTRIBUTES]) fi ])dnl dnl --------------------------------------------------------------------------- @@ -1235,14 +1242,14 @@ fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47 +dnl CF_GCC_ATTRIBUTES version: 19 updated: 2020/08/29 09:05:21 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], [ -if test "$GCC" = yes +if ( test "$GCC" = yes || test "$GXX" = yes ) then cat > conftest.i <