]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 6.0 - patch 20160521
[ncurses.git] / aclocal.m4
index da166ca8c82cce969b4296f45d249fcf6e9a7bad..49fa1cb51d58c9ef166ac57e88196a582ad4bd7c 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
 dnl***************************************************************************
-dnl Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2015,2016 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.786 2015/12/19 22:52:18 tom Exp $
+dnl $Id: aclocal.m4,v 1.789 2016/05/21 22:12:40 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -711,11 +711,15 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
 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 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
 AC_DEFUN([CF_CC_ENV_FLAGS],
 [
 # This should have been defined by AC_PROG_CC
@@ -723,13 +727,16 @@ AC_DEFUN([CF_CC_ENV_FLAGS],
 
 AC_MSG_CHECKING(\$CC variable)
 case "$CC" in
 
 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...
        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)
        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)
        ;;
 (*)
        AC_MSG_RESULT(ok)
@@ -3268,7 +3275,7 @@ AC_SUBST(LDFLAGS_STATIC)
 AC_SUBST(LDFLAGS_SHARED)
 ])
 dnl ---------------------------------------------------------------------------
 AC_SUBST(LDFLAGS_SHARED)
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 6 updated: 2015/04/12 15:39:00
+dnl CF_LD_RPATH_OPT version: 7 updated: 2016/02/20 18:01:19
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
@@ -3286,13 +3293,13 @@ case $cf_cv_system_name in
                LD_RPATH_OPT="-rpath "
        fi
        ;;
                LD_RPATH_OPT="-rpath "
        fi
        ;;
-(linux*|gnu*|k*bsd*-gnu)
+(linux*|gnu*|k*bsd*-gnu|freebsd*)
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 (openbsd[[2-9]].*|mirbsd*)
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 (openbsd[[2-9]].*|mirbsd*)
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-(dragonfly*|freebsd*)
+(dragonfly*)
        LD_RPATH_OPT="-rpath "
        ;;
 (netbsd*)
        LD_RPATH_OPT="-rpath "
        ;;
 (netbsd*)
@@ -5311,7 +5318,7 @@ CF_ACVERSION_CHECK(2.52,
 CF_CC_ENV_FLAGS
 ])dnl
 dnl ---------------------------------------------------------------------------
 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
 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
@@ -5319,13 +5326,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 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 <<CF_EOF
 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 <<CF_EOF
-#include <stdio.h>
 int main()
 {
        ${cf_cv_main_return:-return}(0);
 int main()
 {
        ${cf_cv_main_return:-return}(0);
@@ -5333,7 +5342,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.
 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
 if AC_TRY_EVAL(ac_try) &&
   test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try);
 then