X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=467350a9ba3b3cfd2e7bf2f5f51f171e43f2b368;hp=b83176eff1a0e33a397555617ceb0a2630a398fe;hb=89175dffb0245ffaa1ffec80373cb9990f8dc7fe;hpb=4d01f5de859abce88a97e91460db7f3769eedbc1 diff --git a/aclocal.m4 b/aclocal.m4 index b83176ef..467350a9 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.794 2016/08/27 16:24:33 tom Exp $ +dnl $Id: aclocal.m4,v 1.800 2016/09/10 19:33:21 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -711,7 +711,7 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 5 updated: 2016/08/27 11:24:46 +dnl CF_CC_ENV_FLAGS version: 6 updated: 2016/08/29 20:57:00 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 @@ -736,7 +736,17 @@ case "$CC" in # humor him... cf_flags=`echo "$CC" | sed -e 's/^.*[[ ]]\(-[[^ ]]\)/\1/'` CC=`echo "$CC " | sed -e 's/[[ ]]-[[^ ]].*$//' -e 's/[[ ]]*$//'` - CF_ADD_CFLAGS($cf_flags) + for cf_arg in $cf_flags + do + case "x$cf_arg" in + (x-[[IUDfgOW]]*) + CF_ADD_CFLAGS($cf_flags) + ;; + (*) + CC="$CC $cf_arg" + ;; + esac + done CF_VERBOSE(resulting CC: '$CC') CF_VERBOSE(resulting CFLAGS: '$CFLAGS') CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS') @@ -1582,7 +1592,7 @@ AC_ARG_ENABLE(rpath, AC_MSG_RESULT($cf_cv_enable_rpath) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ENABLE_STRING_HACKS version: 3 updated: 2013/01/26 16:26:12 +dnl CF_ENABLE_STRING_HACKS version: 4 updated: 2016/09/10 15:33:21 dnl ---------------------- dnl On a few platforms, the compiler and/or loader nags with untruthful dnl comments stating that "most" uses of strcat/strcpy/sprintf are incorrect, @@ -1609,7 +1619,14 @@ AC_MSG_RESULT($with_string_hacks) if test "x$with_string_hacks" = "xyes"; then AC_DEFINE(USE_STRING_HACKS,1,[Define to 1 to work around bogus compiler/loader warnings]) AC_MSG_WARN(enabling string-hacks to work around bogus compiler/loader warnings) - AC_CHECK_FUNCS( strlcat strlcpy snprintf ) + AC_CHECK_FUNC(strlcat,,[ + AC_CHECK_LIB(bsd,strlcat,[ + CF_ADD_LIB(bsd) + AC_CHECK_HEADERS(bsd/string.h) + AC_DEFINE(HAVE_STRLCAT,1,[Define to 1 if we have strlcat function]) + ]) + ]) + AC_CHECK_FUNCS( strlcpy snprintf ) fi ])dnl dnl ---------------------------------------------------------------------------