X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=129410f8bd2f31b60d86a6074aa1687dbcb513c8;hp=95471b2dd5ce890dd14d72cfd6b3d3cc70412f79;hb=96592d717179f99c8fe1c5a63fc4a26c24867288;hpb=aa70bf3c762c5b6407bf34812d63c20f7ac8ffdd diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 95471b2d..129410f8 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.112 2016/06/25 20:30:41 tom Exp $ +dnl $Id: aclocal.m4,v 1.113 2016/08/06 23:41:47 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1466,7 +1466,7 @@ case $cf_gnat_version in esac ]) dnl --------------------------------------------------------------------------- -dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07 +dnl CF_GNU_SOURCE version: 7 updated: 2016/08/05 05:15:37 dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect @@ -1493,7 +1493,20 @@ make an error CPPFLAGS="$cf_save" ]) ]) -test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + +if test "$cf_cv_gnu_source" = yes +then +AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ +CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + AC_TRY_COMPILE([#include ],[ +#ifdef _DEFAULT_SOURCE +make an error +#endif], + [cf_cv_default_source=no], + [cf_cv_default_source=yes]) + ]) +test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE" +fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_HEADER_PATH version: 13 updated: 2015/04/15 19:08:48