X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=8c47efd247e97563150f7b356e6d21abe9876836;hp=3888b6c1712bd90260ed9628dbf5136914adda61;hb=634674af078ad40d46e9a55d6b4438d44f90ba4c;hpb=3e800f58ddf476b6f98de80c486e6adae38ec030 diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 3888b6c1..8c47efd2 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.49 2012/04/01 00:15:53 tom Exp $ +dnl $Id: aclocal.m4,v 1.52 2012/08/04 18:12:47 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -668,6 +668,39 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39 +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 not ignore some gcc options. +dnl +dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to +dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from +dnl the wrappers for gcc and g++ warnings. +dnl +dnl $1 = GCC (default) or GXX +dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS +dnl $3 = CFLAGS (default) or CXXFLAGS +AC_DEFUN([CF_CLANG_COMPILER],[ +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 +]) +dnl --------------------------------------------------------------------------- dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common @@ -739,7 +772,7 @@ AC_SUBST(SHOW_CC) AC_SUBST(ECHO_CC) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ENABLE_PC_FILES version: 7 updated: 2011/12/10 18:58:47 +dnl CF_ENABLE_PC_FILES version: 9 updated: 2012/08/04 13:59:54 dnl ------------------ dnl This is the "--enable-pc-files" option, which is available if there is a dnl pkg-config configuration on the local machine. @@ -748,16 +781,15 @@ AC_REQUIRE([CF_PKG_CONFIG]) AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR]) if test "$PKG_CONFIG" != none ; then - if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then - AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG) - AC_ARG_ENABLE(pc-files, - [ --enable-pc-files generate and install .pc files for pkg-config], - [enable_pc_files=$enableval], - [enable_pc_files=no]) - AC_MSG_RESULT($enable_pc_files) - elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then - enable_pc_files=no - AC_MSG_WARN(did not find $PKG_CONFIG library) + AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG) + AC_ARG_ENABLE(pc-files, + [ --enable-pc-files generate and install .pc files for pkg-config], + [enable_pc_files=$enableval], + [enable_pc_files=no]) + AC_MSG_RESULT($enable_pc_files) + if test "$enable_pc_files" != no + then + CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR) fi else enable_pc_files=no @@ -1087,7 +1119,7 @@ if test "$GCC" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_WARNINGS version: 28 updated: 2012/03/31 20:10:46 +dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: @@ -1110,6 +1142,7 @@ AC_DEFUN([CF_GCC_WARNINGS], [ AC_REQUIRE([CF_GCC_VERSION]) CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS) +CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS) cat > conftest.$ac_ext <