Signed-off-by: David Ahern <dsah...@gmail.com>
Cc: Arnaldo Carvalho de Melo <a...@ghostprotocols.net>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Ingo Molnar <mi...@kernel.org>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Namhyung Kim <namhy...@kernel.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@google.com>
---
 tools/perf/Makefile                 |   39 ++++++++++++++++-------------------
 tools/perf/Pconfig                  |    3 +++
 tools/perf/config/feature-tests.mak |    2 +-
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 2225c3d..01e2abf 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -36,8 +36,6 @@ include config/utilities.mak
 #
 # Define NO_NEWT if you do not want TUI support.
 #
-# Define NO_GTK2 if you do not want GTK+ GUI support.
-#
 # Define NO_DEMANGLE if you do not want C++ symbol demangling.
 #
 # Define NO_LIBELF if you do not want libelf dependency (e.g. cross-builds)
@@ -693,25 +691,24 @@ ifndef NO_NEWT
        endif
 endif
 
-ifndef NO_GTK2
-       FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config 
--libs --cflags gtk+-2.0 2>/dev/null)
-       ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y)
-               msg := $(warning GTK2 not found, disables GTK2 support. Please 
install gtk2-devel or libgtk2.0-dev);
-       else
-               ifeq ($(call 
try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y)
-                       BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
-               endif
-               BASIC_CFLAGS += -DGTK2_SUPPORT
-               BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 
2>/dev/null)
-               EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
-               LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/hists.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/util.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/progress.o
-               LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
-       endif
+ifdef CONFIG_GTK2
+    FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config 
--libs --cflags gtk+-2.0 2>/dev/null)
+    ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y)
+        $(error GTK2 not found. Please install gtk2-devel or libgtk2.0-dev or 
unset CONFIG_GTK2)
+    endif
+    ifeq ($(call 
try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y)
+        BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
+    endif
+    BASIC_CFLAGS += -DGTK2_SUPPORT
+    BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null)
+    EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
+    LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/hists.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/util.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/progress.o
+    LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
 endif
 
 ifdef CONFIG_LIBPERL
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index 67ae110..79e1fc3 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -1,3 +1,6 @@
+config GTK2
+    bool "Enable GTK-based UI"
+
 config LIBPERL
     bool "Enable support for perl scripting engine"
 
diff --git a/tools/perf/config/feature-tests.mak 
b/tools/perf/config/feature-tests.mak
index 2a2fa3b..bf906e8 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -74,7 +74,7 @@ int main(void)
 endef
 endif
 
-ifndef NO_GTK2
+ifdef CONFIG_GTK2
 define SOURCE_GTK2
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #include <gtk/gtk.h>
-- 
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to