perf tools: Add mode to build without newt support
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 May 2010 21:18:11 +0000 (18:18 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 17 May 2010 21:18:11 +0000 (18:18 -0300)
make NO_NEWT=1

Will avoid building the newt (tui) support.

Suggested-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile

index e2729fcfaf300c7f38959e4dc3d8c63906c4ecdb..3d8f31ed771df18770b1e31361485d39400b5476 100644 (file)
@@ -558,6 +558,9 @@ else
 endif # PERF_HAVE_DWARF_REGS
 endif # NO_DWARF
 
+ifdef NO_NEWT
+       BASIC_CFLAGS += -DNO_NEWT_SUPPORT
+else
 ifneq ($(shell sh -c "(echo '\#include <newt.h>'; echo 'int main(void) { newtInit(); newtCls(); return newtFinished(); }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -lnewt -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
        msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
        BASIC_CFLAGS += -DNO_NEWT_SUPPORT
@@ -567,6 +570,7 @@ else
        EXTLIBS += -lnewt -lslang
        LIB_OBJS += $(OUTPUT)util/newt.o
 endif
+endif # NO_NEWT
 
 ifndef NO_LIBPERL
 PERL_EMBED_LDOPTS = `perl -MExtUtils::Embed -e ldopts 2>/dev/null`