]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/aclocal.m4
ncurses 6.2 - patch 20201128
[ncurses.git] / Ada95 / aclocal.m4
index 24bf486c5c384658d9797be074fbfba73841fa34..9821881b6c5e086a61d9fd4c0f04c7aa5b52bd6c 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.165 2020/11/20 23:52:27 tom Exp $
+dnl $Id: aclocal.m4,v 1.166 2020/11/26 22:37:55 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -719,7 +719,7 @@ case $cf_cv_gnat_version in
 esac
 ])
 dnl ---------------------------------------------------------------------------
 esac
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_CLANG_COMPILER version: 5 updated: 2020/11/20 18:52:27
+dnl CF_CLANG_COMPILER version: 6 updated: 2020/11/26 17:37:55
 dnl -----------------
 dnl Check if the given compiler is really clang.  clang's C driver defines
 dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
 dnl -----------------
 dnl Check if the given compiler is really clang.  clang's C driver defines
 dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
@@ -749,7 +749,22 @@ make an error
        AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
 fi
 
        AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
 fi
 
+CLANG_VERSION=none
+
 if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
 if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then
+       case "$CC" in
+       (c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]])
+               AC_MSG_WARN(replacing broken compiler alias $CC)
+               CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
+               CC=clang
+               ;;
+       esac
+
+       AC_MSG_CHECKING(version of $CC)
+       CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+       test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
+       AC_MSG_RESULT($CLANG_VERSION)
+
        for cf_clang_opt in \
                -Qunused-arguments \
                -Wno-error=implicit-function-declaration
        for cf_clang_opt in \
                -Qunused-arguments \
                -Wno-error=implicit-function-declaration