aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-13 15:23:35 +0000
committerRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-13 15:23:35 +0000
commit65da4913214120ddc95bd846cb3649a29f87146a (patch)
tree0184962f72ff86a39430e6a0958ee15fcbcfb977 /tools/xenstat
parent77b8dfec88acdc71138e3af7e2603ad8d72eb926 (diff)
downloadxen-65da4913214120ddc95bd846cb3649a29f87146a.tar.gz
xen-65da4913214120ddc95bd846cb3649a29f87146a.tar.bz2
xen-65da4913214120ddc95bd846cb3649a29f87146a.zip
autoconf: add check for curses library
Check for a curses compatible library (curses or ncurses basically). One of those is needed to compile Xen tools (gtraceview and xentop). Modify Makefiles/sources to use configure output (fetch CURSES_LIBS from tools/Tools.mk and header to include from tools/config.h) Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r--tools/xenstat/xentop/Makefile3
-rw-r--r--tools/xenstat/xentop/xentop.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
index fb025d4106..afed0d190d 100644
--- a/tools/xenstat/xentop/Makefile
+++ b/tools/xenstat/xentop/Makefile
@@ -22,6 +22,9 @@ CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat)
LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS)
CFLAGS += -DHOST_$(XEN_OS)
+# Include configure output (config.h) to headers search path
+CFLAGS += -I$(XEN_ROOT)/tools
+
.PHONY: all
all: xentop
diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
index b890829459..60cf607794 100644
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -18,7 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <curses.h>
+
+/* Include output from configure */
+#include <config.h>
+
+/* get curses header from configure */
+#include INCLUDE_CURSES_H
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>