X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=462d5383d4b2a3106278011ed9a0d2a8b1aec692;hp=d8fe13fdf23e4ee42d636d8f05641253d8525494;hb=11d10ad0a17342a8e773a8f1948a9cc4c5f32ce7;hpb=34d602f272c394e9a980438e636e1ce4d355f83b diff --git a/configure.in b/configure.in index d8fe13fd..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.580 2014/05/24 21:23:43 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.580 $) +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++) @@ -1353,9 +1384,12 @@ fi AC_SUBST(ADA_TRACE) +CF_DISABLE_GNAT_PROJECTS + ### Checks for libraries. case $cf_cv_system_name in #(vi *mingw32*) #(vi + CPPFLAGS="$CPPFLAGS -DWINVER=0x0501" LIBS=" -lpsapi $LIBS" ;; *) @@ -1618,8 +1652,11 @@ 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 CF_WITH_ADA_COMPILER @@ -2017,8 +2054,10 @@ fi CF_LIB_RULES($SRC_SUBDIRS) if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then +if test -z "$USE_OLD_MAKERULES" ; then $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile fi +fi ],[ ### Special initialization commands, used to pass information from the ### configuration-run into config.status @@ -2050,6 +2089,7 @@ TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" TINFO_NAME="$TINFO_NAME" TINFO_SUFFIX="$TINFO_SUFFIX" +USE_OLD_MAKERULES="$USE_OLD_MAKERULES" WITH_CURSES_H="$with_curses_h" WITH_ECHO="${enable_echo:=yes}" WITH_OVERWRITE="$with_overwrite"