From 978398cbc47e9e41a31b963bf30d51a741233e1c Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Wed, 11 Jan 2012 17:29:07 +0100 Subject: [PATCH] ncurses without config --- m4/external.ncurses | 37 ++++++++++++++++++++++--------------- m4/external.v8 | 1 + 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/m4/external.ncurses b/m4/external.ncurses index 9c5394bc8f..b95bf5c9c7 100644 --- a/m4/external.ncurses +++ b/m4/external.ncurses @@ -34,27 +34,34 @@ if test "x$tr_NCURSES" = xyes; then if test -n "$NCURSES_CONFIG"; then NCURSES_LIBS="`$NCURSES_CONFIG --libs`" NCURSES_CPPFLAGS="`$NCURSES_CONFIG --cflags`" + + TR_ABSOLUTE_LIBRARIES([ncurses], [NCURSES_LIBS]) + + if test "x$tr_libraries_found" != xyes; then + AC_MSG_ERROR([Please install the ncurses library]) + fi + + TRI_NCURSES_VERSION="`$NCURSES_CONFIG --version`" else - AC_MSG_WARN([Please install the ncurses library]) - tr_NCURSES="no" + AC_CHECK_HEADERS(curses.h, [tr_NCURSES="yes"], [tr_NCURSES="no"]) + + if test "x$tr_NCURSES" = xyes; then + TR_FIND_C_LIBRARY([ncurses], [ncurses], [NCURSES_LIBS], [setupterm]) + tr_NCURSES=$tr_library_found + fi + + TRI_NCURSES_VERSION="ncurses" fi fi -if test "x$tr_NCURSES" = xyes; then - TR_ABSOLUTE_LIBRARIES([ncurses], [NCURSES_LIBS]) - - if test "x$tr_libraries_found" != xyes; then - AC_MSG_ERROR([Please install the ncurses library]) - fi +if test "x$tr_NCURSES" != xyes; then + AC_MSG_ERROR([Please install the ncurses library]) fi -if test "x$tr_NCURSES" = xyes; then - AC_MSG_CHECKING([NCURSES version]) - TRI_NCURSES_VERSION="`$NCURSES_CONFIG --version`" - AC_MSG_RESULT([$TRI_NCURSES_VERSION]) - CPPFLAGS="$CPPFLAGS -DHAVE_NCURSES=1" - NCURSES_CPPFLAGS="${NCURSES_CPPFLAGS} -DTRI_NCURSES_VERSION='\"${TRI_NCURSES_VERSION}\"'" -fi +AC_MSG_CHECKING([NCURSES version]) +AC_MSG_RESULT([$TRI_NCURSES_VERSION]) +CPPFLAGS="$CPPFLAGS -DHAVE_NCURSES=1" +NCURSES_CPPFLAGS="${NCURSES_CPPFLAGS} -DTRI_NCURSES_VERSION='\"${TRI_NCURSES_VERSION}\"'" dnl ----------------------------------------------------------------------------------------- dnl fix include and static libraries diff --git a/m4/external.v8 b/m4/external.v8 index dd19f804d0..2f3feac09f 100644 --- a/m4/external.v8 +++ b/m4/external.v8 @@ -72,6 +72,7 @@ dnl grep libev version number dnl ----------------------------------------------------------------------------------------- if test "$cross_compiling" = yes; then : + TRI_V8_VERSION="V8" AC_MSG_WARN([cannot compute V8 version number when cross compiling]) else cat confdefs.h - <<_ACEOF >conftest.$ac_ext