]> err.no Git - varnish/commitdiff
Disable tools that require curses if no curses library was found.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 13 Feb 2008 14:58:48 +0000 (14:58 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 13 Feb 2008 14:58:48 +0000 (14:58 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2456 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/Makefile.am
varnish-cache/configure.ac

index 8e27812d185c61e5771eca4e939008b905a5eabe..2a7a646df63a4cd6a134c55ec88166002a355514 100644 (file)
@@ -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
index 204124fb4806df94b77f1f4f013b9b425ccfb741..ec36bda7af1af23833c71e6cd127866a423a9aa3 100644 (file)
@@ -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=""