From 9073fd5cccbca93ba03487fac0863228ad93f6ee Mon Sep 17 00:00:00 2001 From: des Date: Wed, 13 Feb 2008 14:58:48 +0000 Subject: [PATCH] Disable tools that require curses if no curses library was found. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2456 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/Makefile.am | 7 +++++-- varnish-cache/configure.ac | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/varnish-cache/bin/Makefile.am b/varnish-cache/bin/Makefile.am index 8e27812d..2a7a646d 100644 --- a/varnish-cache/bin/Makefile.am +++ b/varnish-cache/bin/Makefile.am @@ -1,4 +1,7 @@ # $Id$ -SUBDIRS = varnishadm varnishd varnishhist varnishlog varnishncsa \ - varnishreplay varnishstat varnishtop +SUBDIRS = varnishadm varnishd varnishlog varnishncsa varnishreplay + +if HAVE_CURSES +SUBDIRS += varnishhist varnishstat varnishtop +endif diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 204124fb..ec36bda7 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -38,15 +38,15 @@ AC_SUBST(DL_LIBS) save_LIBS="${LIBS}" LIBS="" -AC_SEARCH_LIBS(initscr, [curses ncurses]) +AC_SEARCH_LIBS(initscr, [curses ncurses], + [have_curses=yes], [have_curses=no]) CURSES_LIBS="${LIBS}" LIBS="${save_LIBS}" AC_SUBST(CURSES_LIBS) - -# people tend to forget about curses until the build breaks -if test "$ac_cv_search_initscr" = no; then - AC_MSG_ERROR([curses or ncurses is required]) +if test "$have_curses" = no; then + AC_MSG_WARN([curses not found; some tools will not be built]) fi +AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes]) save_LIBS="${LIBS}" LIBS="" -- 2.39.5