X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=462d5383d4b2a3106278011ed9a0d2a8b1aec692;hp=3237ea839244d23a7fef6b7c86010a07c302db51;hb=11d10ad0a17342a8e773a8f1948a9cc4c5f32ce7;hpb=bd0d93918c967f71d8e287fd6714f0b88da820da diff --git a/configure.in b/configure.in index 3237ea83..462d5383 100644 --- a/configure.in +++ b/configure.in @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.582 2014/06/01 14:05:06 tom Exp $ +dnl $Id: configure.in,v 1.584 2014/09/14 00:21:22 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20030208) -AC_REVISION($Revision: 1.582 $) +AC_REVISION($Revision: 1.584 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -92,6 +92,37 @@ else cf_with_cxx=no; CXX=""; GXX="";])dnl AC_PROG_CXX popdef([AC_MSG_ERROR])dnl + + AC_LANG_PUSH(C++) + if test "x$cf_with_cxx" != xno + then + # Several of the C++ configurations do not work, particularly when + # cross-compiling (20140913 -TD) + AC_MSG_CHECKING(if $CXX works) + + save_CPPFLAGS="$CPPFLAGS" + eval cf_includedir=${includedir} + CPPFLAGS="$CPPFLAGS -I${cf_includedir}" + AC_TRY_COMPILE([ +#include +#include +], + [ + printf("Hello world!\n") + ], + [cf_cxx_works=yes], + [cf_cxx_works=no]) + CPPFLAGS="$save_CPPFLAGS" + + AC_MSG_RESULT($cf_cxx_works) + if test "x$cf_cxx_works" = xno + then + AC_MSG_WARN([Ignore $CXX, since it cannot compile hello-world.]) + cf_with_cxx=no; CXX=""; GXX=""; + fi + fi + AC_LANG_POP + # autoconf 2.5x removed the error (hardcoding it to g++, or just blank) if test "$CXX" = "g++" ; then AC_PATH_PROG(CXX,g++) @@ -1358,6 +1389,7 @@ CF_DISABLE_GNAT_PROJECTS ### Checks for libraries. case $cf_cv_system_name in #(vi *mingw32*) #(vi + CPPFLAGS="$CPPFLAGS -DWINVER=0x0501" LIBS=" -lpsapi $LIBS" ;; *) @@ -1620,6 +1652,8 @@ dnl At the moment we support no other Ada95 compiler. CF_ADD_ADAFLAGS(-gnatpn) CF_FIXUP_ADAFLAGS + CF_GNATPREP_OPT_T + CF_GNAT_GENERICS CF_GNAT_SIGINT CF_GNAT_PROJECTS