r2456 - in trunk/varnish-cache: . bin

des at projects.linpro.no des at projects.linpro.no
Wed Feb 13 15:58:48 CET 2008


Author: des
Date: 2008-02-13 15:58:48 +0100 (Wed, 13 Feb 2008)
New Revision: 2456

Modified:
   trunk/varnish-cache/bin/Makefile.am
   trunk/varnish-cache/configure.ac
Log:
Disable tools that require curses if no curses library was found.


Modified: trunk/varnish-cache/bin/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/Makefile.am	2008-02-13 13:55:39 UTC (rev 2455)
+++ trunk/varnish-cache/bin/Makefile.am	2008-02-13 14:58:48 UTC (rev 2456)
@@ -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

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2008-02-13 13:55:39 UTC (rev 2455)
+++ trunk/varnish-cache/configure.ac	2008-02-13 14:58:48 UTC (rev 2456)
@@ -38,15 +38,15 @@
 
 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=""




More information about the varnish-commit mailing list