X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=af15142f5a0fd77f9287796d98e492ce4e11ff4e;hp=b229618c4bc78105719a5052dfb2e9c93e6d20eb;hb=6434e809cb70f93cc76d0f833e74447e32c99f54;hpb=73b54c0812e4b8dfddcf87f59c7488bb3c10e10d diff --git a/configure.in b/configure.in index b229618c..af15142f 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.583 2014/08/02 20:35:31 tom Exp $ +dnl $Id: configure.in,v 1.586 2014/09/23 22:18:46 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.583 $) +AC_REVISION($Revision: 1.586 $) 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++) @@ -1448,6 +1479,7 @@ AC_CHECK_FUNCS( \ getcwd \ getegid \ geteuid \ +getopt \ getttynam \ issetugid \ poll \ @@ -1466,6 +1498,12 @@ tcgetpgrp \ times \ vsnprintf \ ) + +if test "x$ac_cv_func_getopt" = xno && + test "x$cf_with_progs$cf_with_tests" != xnono; then + AC_MSG_ERROR(getopt is required for building programs) +fi + if test "x$with_getcap" = "xyes" ; then CF_CGETENT fi @@ -2006,6 +2044,19 @@ xshort|xint|xlong) ;; esac +# substitute into misc/Makefile to suppress +# (un)install.data from the +# (un)install rules. +if test "x$cf_with_db_install" = "xno"; then + MISC_INSTALL_DATA= + MISC_UNINSTALL_DATA= +else + MISC_INSTALL_DATA=install.data + MISC_UNINSTALL_DATA=uninstall.data +fi +AC_SUBST(MISC_INSTALL_DATA) +AC_SUBST(MISC_UNINSTALL_DATA) + SUB_SCRIPTS= AC_OUTPUT( \