perf tools: Move gtk2 check config into config/Makefile
authorJiri Olsa <jolsa@redhat.com>
Sun, 17 Mar 2013 23:09:24 +0000 (00:09 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 29 May 2013 11:42:26 +0000 (14:42 +0300)
Moving gtk2 check config into config/Makefile.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1369398928-9809-11-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile
tools/perf/config/Makefile

index f0c23ce6f9572f5f29e1d696decc011b60eeebd1..8e59a4d40b4eddf47448b13c71c73966160e1f75 100644 (file)
@@ -521,24 +521,13 @@ ifndef NO_SLANG
 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
+       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 NO_LIBPERL
index 06634be35581022eb50b6cadc77c8cbb69d5118a..8cf0958c6daa4138e6e70c7ac89f8e15e506c42a 100644 (file)
@@ -225,3 +225,18 @@ ifndef NO_SLANG
                EXTLIBS += -lslang
        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);
+               NO_GTK2 := 1
+       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)
+       endif
+endif