X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=129410f8bd2f31b60d86a6074aa1687dbcb513c8;hp=5992306746396c905a424b18d2e9010a2f0e697d;hb=96592d717179f99c8fe1c5a63fc4a26c24867288;hpb=56f1e8cd80dfb926f74e1739bf969489b0cfa56f;ds=inline diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 59923067..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.111 2016/05/21 22:23:56 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 @@ -514,12 +514,15 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 3 updated: 2016/05/21 18:10:17 +dnl CF_CC_ENV_FLAGS version: 4 updated: 2016/06/25 16:23:40 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler with dnl options, but eliminates a more common category of user confusion. dnl +dnl In particular, it addresses the problem of being able to run the C +dnl preprocessor in a consistent manner. +dnl dnl Caveat: this also disallows blanks in the pathname for the compiler, but dnl the nuisance of having inconsistent settings for compiler and preprocessor dnl outweighs that limitation. @@ -535,7 +538,7 @@ case "$CC" in AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]][[ ]]*//'` - CC=`echo "$CC" | sed -e 's/[[ ]].*//'` + CC=`echo "$CC " | sed -e 's/[[ ]]-[[IUD]][[^ ]][[^ ]]*//g' -e 's/[[ ]]*$//'` CF_ADD_CFLAGS($cf_flags) CF_VERBOSE(resulting CC: '$CC') CF_VERBOSE(resulting CFLAGS: '$CFLAGS') @@ -1463,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 @@ -1490,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