X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=5992306746396c905a424b18d2e9010a2f0e697d;hp=a51d642739e2ca1e693ce6bf0956cbd5feb70b85;hb=56f1e8cd80dfb926f74e1739bf969489b0cfa56f;hpb=5dbe81a41e3c75806996cd762b9e55dcc9edb835 diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index a51d6427..59923067 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.110 2016/02/20 23:51:03 tom Exp $ +dnl $Id: aclocal.m4,v 1.111 2016/05/21 22:23:56 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -514,11 +514,15 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00 +dnl CF_CC_ENV_FLAGS version: 3 updated: 2016/05/21 18:10:17 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 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. AC_DEFUN([CF_CC_ENV_FLAGS], [ # This should have been defined by AC_PROG_CC @@ -526,13 +530,16 @@ AC_DEFUN([CF_CC_ENV_FLAGS], AC_MSG_CHECKING(\$CC variable) case "$CC" in -(*[[\ \ ]]-[[IUD]]*) +(*[[\ \ ]]-*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... - cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'` + cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]][[ ]]*//'` CC=`echo "$CC" | sed -e 's/[[ ]].*//'` CF_ADD_CFLAGS($cf_flags) + CF_VERBOSE(resulting CC: '$CC') + CF_VERBOSE(resulting CFLAGS: '$CFLAGS') + CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS') ;; (*) AC_MSG_RESULT(ok) @@ -2725,7 +2732,7 @@ CF_ACVERSION_CHECK(2.52, CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37 +dnl CF_PROG_CC_C_O version: 4 updated: 2016/05/21 18:08:09 dnl -------------- dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that dnl the output file can be renamed, and allows for a shell variable that can @@ -2733,13 +2740,15 @@ dnl be used later. The parameter is either CC or CXX. The result is the dnl cache variable: dnl $cf_cv_prog_CC_c_o dnl $cf_cv_prog_CXX_c_o +dnl +dnl $1 = compiler +dnl $2 = compiler options, if any AC_DEFUN([CF_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])dnl AC_MSG_CHECKING([whether [$]$1 understands -c and -o together]) AC_CACHE_VAL(cf_cv_prog_$1_c_o, [ cat > conftest.$ac_ext < int main() { ${cf_cv_main_return:-return}(0); @@ -2747,7 +2756,7 @@ int main() CF_EOF # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. -ac_try='[$]$1 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC' +ac_try='[$]$1 $2 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC' if AC_TRY_EVAL(ac_try) && test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try); then