]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 5.9 - patch 20120602
[ncurses.git] / configure.in
index 53515f95f5e7ef9526af110c05e2d603f8655811..43a8e10ab4a6656f38e840d5f24097d8e8ebe86c 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.543 2012/02/18 21:31:19 tom Exp $
+dnl $Id: configure.in,v 1.550 2012/05/05 20:54:32 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.13.20020210)
-AC_REVISION($Revision: 1.543 $)
+AC_REVISION($Revision: 1.550 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -58,7 +58,18 @@ cf_user_CFLAGS="$CFLAGS"
 CF_CFG_DEFAULTS
 
 ###    Checks for programs.
-AC_PROG_CC
+AC_ARG_WITH(ada,
+       [  --without-ada           suppress check for Ada95, don't build demo],
+       [cf_with_ada=$withval],
+       [cf_with_ada=yes])
+if test x"$cf_with_ada" = xyes
+then
+       cf_PROG_CC="gnatgcc gcc cc"
+else
+       cf_PROG_CC="gcc cc"
+fi
+
+AC_PROG_CC($cf_PROG_CC)
 CF_GCC_VERSION
 
 AC_PROG_CPP
@@ -89,14 +100,16 @@ else
                cf_with_cxx=no; CXX=""; GXX="";])dnl
        AC_PROG_CXX
        popdef([AC_MSG_ERROR])dnl
-       # autoconf 2.5x removed the error - by hardcoding it to g++.
+       # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
        if test "$CXX" = "g++" ; then
                AC_PATH_PROG(CXX,g++)
        fi
-       if test "$CXX" = "g++" ; then
-               AC_MSG_WARN(ignoring hardcoded g++)
+       case "x$CXX" in #(vi
+       x|xg++)
+               AC_MSG_WARN([You don't have any C++ compiler, too bad])
                cf_with_cxx=no; CXX=""; GXX="";
-       fi
+               ;;
+       esac
 fi
 
 CF_GXX_VERSION
@@ -116,10 +129,6 @@ AC_ARG_WITH(cxx-binding,
 AC_MSG_RESULT($cf_with_cxx_binding)
 
 AC_MSG_CHECKING(if you want to build with Ada95)
-AC_ARG_WITH(ada,
-       [  --without-ada           suppress check for Ada95, don't build demo],
-       [cf_with_ada=$withval],
-       [cf_with_ada=yes])
 AC_MSG_RESULT($cf_with_ada)
 
 AC_MSG_CHECKING(if you want to install manpages)
@@ -1215,19 +1224,14 @@ test "$with_wgetch_events" = yes && AC_DEFINE(NCURSES_WGETCH_EVENTS)
 CF_HELP_MESSAGE(Testing/development Options:)
 
 ###    use option --disable-echo to suppress full display compiling commands
-AC_MSG_CHECKING(if you want to display full commands during build)
-AC_ARG_ENABLE(echo,
-       [  --enable-echo           build: display "compiling" commands (default)],
-       [with_echo=$enableval],
-       [with_echo=yes])
-if test "$with_echo" = yes; then
+CF_DISABLE_ECHO
+if test "$enable_echo" = yes; then
        ECHO_LINK=
 else
        ECHO_LINK='@ echo linking $@ ... ;'
        test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
        test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
 fi
-AC_MSG_RESULT($with_echo)
 AC_SUBST(ECHO_LINK)
 
 ###    use option --enable-warnings to turn on all gcc warnings
@@ -1245,6 +1249,7 @@ if test "x$with_warnings" = "xyes"; then
        fi
 fi
 CF_GCC_ATTRIBUTES
+CF_ENABLE_STRING_HACKS
 
 ###    use option --enable-assertions to turn on generation of assertion code
 AC_MSG_CHECKING(if you want to enable runtime assertions)
@@ -1257,7 +1262,6 @@ if test -n "$GCC"
 then
        if test "$with_assertions" = no
        then
-               AC_DEFINE(NDEBUG)
                CPPFLAGS="$CPPFLAGS -DNDEBUG"
        else
                CF_ADD_ADAFLAGS(-gnata)
@@ -1566,18 +1570,7 @@ dnl At the moment we support no other Ada95 compiler.
                CF_PROG_GNAT
                if test "$cf_cv_prog_gnat_correct" = yes; then
                        CF_ADD_ADAFLAGS(-gnatpn)
-
-                       # make ADAFLAGS consistent with CFLAGS
-                       case "$CFLAGS" in
-                       *-g*)
-                               CF_ADD_ADAFLAGS(-g)
-                               ;;
-                       esac
-                       case "$CFLAGS" in
-                       *-O*)
-                               CF_ADD_ADAFLAGS(-O3)
-                               ;;
-                       esac
+                       CF_FIXUP_ADAFLAGS
 
                        CF_GNAT_GENERICS
                        CF_GNAT_SIGINT
@@ -1913,7 +1906,7 @@ AC_OUTPUT( \
        $SUB_MAKEFILES \
        Makefile,[
 if test "x$cf_with_tests" != xno ; then
-       CF_PRG_RULES([$srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK"], test)
+       CF_PRG_RULES([$srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD"], test)
 fi
 CF_LIB_RULES($SRC_SUBDIRS)
 
@@ -1929,7 +1922,7 @@ fi
 AWK="$AWK"
 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
 DFT_LWR_MODEL="$DFT_LWR_MODEL"
-ECHO_LINK="$ECHO_LINK"
+ECHO_LD="$ECHO_LD"
 LDCONFIG="$LDCONFIG"
 LIBTOOL_VERSION="$LIBTOOL_VERSION"
 LIB_NAME="$LIB_NAME"