aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-09-30 09:08:30 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 02:48:42 -0400
commitc7a79e96dc166a1bdadca1367a39c84887e73de3 (patch)
tree7b31c8d509e8f8f92ab4c46d9cbe212f6ac9ba08
parent7ef9e055ce1d8ad93f636bde1bf050eef26c798b (diff)
tools/perf/build: Split out feature check: 'gtk2-infobar'
Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-oumjyVjonjvgH8ts4mftagel@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--tools/perf/config/Makefile3
-rw-r--r--tools/perf/config/feature-checks/Makefile4
-rw-r--r--tools/perf/config/feature-checks/test-gtk2-infobar.c10
3 files changed, 16 insertions, 1 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index b3bf931dd2a0..3d3d435b41fa 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -117,6 +117,7 @@ FEATURE_TESTS = \
117 libaudit \ 117 libaudit \
118 libslang \ 118 libslang \
119 gtk2 \ 119 gtk2 \
120 gtk2-infobar \
120 libnuma 121 libnuma
121 122
122$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) 123$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -299,7 +300,7 @@ ifndef NO_GTK2
299 msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); 300 msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
300 NO_GTK2 := 1 301 NO_GTK2 := 1
301 else 302 else
302 ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR_SUPPORT),y) 303 ifeq ($(feature-gtk2-infobar), 1)
303 CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT 304 CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT
304 endif 305 endif
305 CFLAGS += -DHAVE_GTK2_SUPPORT 306 CFLAGS += -DHAVE_GTK2_SUPPORT
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 920958c83ce8..017918f809ff 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -15,6 +15,7 @@ FILES= \
15 test-libaudit \ 15 test-libaudit \
16 test-libslang \ 16 test-libslang \
17 test-gtk2 \ 17 test-gtk2 \
18 test-gtk2-infobar \
18 test-libnuma 19 test-libnuma
19 20
20CC := $(CC) -MD 21CC := $(CC) -MD
@@ -73,6 +74,9 @@ test-libslang:
73test-gtk2: 74test-gtk2:
74 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) 75 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
75 76
77test-gtk2-infobar:
78 $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
79
76-include *.d */*.d 80-include *.d */*.d
77 81
78############################### 82###############################
diff --git a/tools/perf/config/feature-checks/test-gtk2-infobar.c b/tools/perf/config/feature-checks/test-gtk2-infobar.c
new file mode 100644
index 000000000000..eebcfbc45120
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-gtk2-infobar.c
@@ -0,0 +1,10 @@
1#pragma GCC diagnostic ignored "-Wstrict-prototypes"
2#include <gtk/gtk.h>
3#pragma GCC diagnostic error "-Wstrict-prototypes"
4
5int main(void)
6{
7 gtk_info_bar_new();
8
9 return 0;
10}