[experimental-ims] c2e5ccb Look for ncurses/curses.h before curses.h
Geoff Simmons
geoff at varnish-cache.org
Mon Jan 9 21:52:00 CET 2012
commit c2e5ccb1325922975eeb2ee1dadaeb6c069e790e
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Wed Sep 21 13:41:58 2011 +0200
Look for ncurses/curses.h before curses.h
Solaris puts the ncurses header in /usr/include/ncurses, and we need
that to compile with -Werror.
Fixes: #889
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index d0db9f0..22d21fc 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -34,7 +34,11 @@
#include <sys/time.h>
+#ifdef HAVE_NCURSES_CURSES_H
+#include <ncurses/curses.h>
+#elif HAVE_CURSES_H
#include <curses.h>
+#endif
#include <errno.h>
#include <signal.h>
#include <stdio.h>
diff --git a/configure.ac b/configure.ac
index c8b61e5..ef7d76c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,7 @@ AC_SUBST(CURSES_LIBS)
if test "$have_curses" = no; then
AC_MSG_WARN([curses not found; some tools will not be built])
fi
+AC_CHECK_HEADERS([ncurses/curses.h curses.h])
AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes])
save_LIBS="${LIBS}"
More information about the varnish-commit
mailing list