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.112 2016/06/25 20:30:41 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
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.
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')