X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=144abc99a1bfe7941dc66024db51bb5092f78e41;hp=9808061a1a91c632829534b862aee48f853879f1;hb=61790aa3ac9e0dff2b443ac567b174fc4d235b86;hpb=7884aa084f9440fd964f14fe31853a5f85db5104 diff --git a/aclocal.m4 b/aclocal.m4 index 9808061a..144abc99 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.935 2020/10/24 23:49:51 tom Exp $ +dnl $Id: aclocal.m4,v 1.942 2020/12/05 21:43:15 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1480,7 +1480,7 @@ main(void) ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CLANG_COMPILER version: 3 updated: 2020/08/28 04:10:22 +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 @@ -1499,21 +1499,52 @@ ifelse([$2],,CLANG_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler) cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" - ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments" AC_TRY_COMPILE([],[ #ifdef __clang__ #else make an error #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes -cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" ],[]) ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2])) fi -if test "x$CLANG_COMPILER" = "xyes" ; then - CF_APPEND_TEXT(CFLAGS,-Wno-error=implicit-function-declaration) +CLANG_VERSION=none + +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 + do + AC_MSG_CHECKING(if option $cf_clang_opt works) + cf_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cf_clang_opt" + AC_TRY_LINK([ + #include ],[ + printf("hello!\n");],[ + cf_clang_optok=yes],[ + cf_clang_optok=no]) + AC_MSG_RESULT($cf_clang_optok) + CFLAGS="$cf_save_CFLAGS" + if test $cf_clang_optok = yes; then + CF_VERBOSE(adding option $cf_clang_opt) + CF_APPEND_TEXT(CFLAGS,$cf_clang_opt) + fi + done fi ]) dnl --------------------------------------------------------------------------- @@ -2938,7 +2969,7 @@ AC_SUBST(cf_compile_generics) AC_SUBST(cf_generic_objects) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_PROJECTS version: 10 updated: 2019/12/31 08:53:54 +dnl CF_GNAT_PROJECTS version: 11 updated: 2020/12/05 16:42:18 dnl ---------------- dnl GNAT projects are configured with ".gpr" project files. dnl GNAT libraries are a further development, using the project feature. @@ -3022,13 +3053,24 @@ then AC_MSG_RESULT($cf_gnat_libraries) fi +USE_OLD_MAKERULES="" +USE_GNAT_PROJECTS="#" +USE_GNAT_MAKE_GPR="#" +USE_GNAT_GPRBUILD="#" + if test "$cf_gnat_projects" = yes then USE_OLD_MAKERULES="#" USE_GNAT_PROJECTS="" -else - USE_OLD_MAKERULES="" - USE_GNAT_PROJECTS="#" + if test "$cf_cv_VERSION_GPRBUILD" != no + then + USE_GNAT_GPRBUILD="" + elif test "$cf_cv_VERSION_GNATMAKE" != no + then + USE_GNAT_MAKE_GPR="" + else + AC_MSG_WARN(use old makefile rules since tools are missing) + fi fi if test "$cf_gnat_libraries" = yes @@ -3041,6 +3083,8 @@ fi AC_SUBST(USE_OLD_MAKERULES) AC_SUBST(USE_GNAT_PROJECTS) AC_SUBST(USE_GNAT_LIBRARIES) +AC_SUBST(USE_GNAT_MAKE_GPR) +AC_SUBST(USE_GNAT_GPRBUILD) ])dnl dnl --------------------------------------------------------------------------- dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 @@ -5710,7 +5754,7 @@ ifelse($1,,[ fi ]) dnl --------------------------------------------------------------------------- -dnl CF_MIXEDCASE_FILENAMES version: 7 updated: 2015/04/12 15:39:00 +dnl CF_MIXEDCASE_FILENAMES version: 8 updated: 2020/11/14 10:12:15 dnl ---------------------- dnl Check if the file-system supports mixed-case filenames. If we're able to dnl create a lowercase name and see it as uppercase, it doesn't support that. @@ -5719,7 +5763,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES], AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[ if test "$cross_compiling" = yes ; then case $target_alias in - (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) + (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*) cf_cv_mixedcase=no ;; (*)