X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=8232bf869f2fb1a5c660dea6c0cbf970609a1f74;hp=22627d4492c9ebe299eb0c95a5a1f3578664bd8d;hb=5461fc336d03fbfea6b85ac21c6d49c528f6752d;hpb=96592d717179f99c8fe1c5a63fc4a26c24867288 diff --git a/aclocal.m4 b/aclocal.m4 index 22627d44..8232bf86 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.792 2016/08/06 23:41:12 tom Exp $ +dnl $Id: aclocal.m4,v 1.803 2016/12/31 17:09:35 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -711,11 +711,11 @@ AC_SUBST(BUILD_EXEEXT) AC_SUBST(BUILD_OBJEXT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 4 updated: 2016/06/25 16:23:40 +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 with -dnl options, but eliminates a more common category of user confusion. +dnl into CC. This will not help with broken scripts that wrap the compiler +dnl with 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. @@ -734,9 +734,19 @@ case "$CC" in 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/^[[^ ]]*[[ ]][[ ]]*//'` - CC=`echo "$CC " | sed -e 's/[[ ]]-[[IUD]][[^ ]][[^ ]]*//g' -e 's/[[ ]]*$//'` - CF_ADD_CFLAGS($cf_flags) + cf_flags=`echo "$CC" | sed -e 's/^.*[[ ]]\(-[[^ ]]\)/\1/'` + CC=`echo "$CC " | sed -e 's/[[ ]]-[[^ ]].*$//' -e 's/[[ ]]*$//'` + 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: 5 updated: 2016/10/08 17:34:11 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,16 @@ 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_DEFINE(HAVE_STRLCAT,1,[Define to 1 if we have strlcat function]) + ],[ + 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 --------------------------------------------------------------------------- @@ -7232,7 +7251,7 @@ if test "$with_gpm" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 33 updated: 2015/10/17 19:03:33 +dnl CF_WITH_LIBTOOL version: 34 updated: 2016/12/31 12:04:57 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -7315,7 +7334,7 @@ ifdef([AC_PROG_LIBTOOL],[ AC_MSG_ERROR(Cannot find libtool) fi ])dnl - LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o' + LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o' LIB_OBJECT='${OBJECTS:.o=.lo}' LIB_SUFFIX=.la LIB_CLEAN='${LIBTOOL} --mode=clean' @@ -7828,7 +7847,7 @@ AC_SUBST(VERSIONED_SYMS) AC_SUBST(WILDCARD_SYMS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33 +dnl CF_XOPEN_SOURCE version: 52 updated: 2016/08/27 12:21:42 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -7848,7 +7867,7 @@ case $host_os in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; -(cygwin|msys) +(msys) cf_XOPEN_SOURCE=600 ;; (darwin[[0-8]].*) @@ -7876,7 +7895,7 @@ case $host_os in cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; -(linux*|gnu*|mint*|k*bsd*-gnu) +(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin) CF_GNU_SOURCE ;; (minix*) @@ -7898,9 +7917,6 @@ case $host_os in (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; -(os2*) - cf_XOPEN_SOURCE= - ;; (osf[[45]]*) cf_xopen_source="-D_OSF_SOURCE" ;;