diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-30 09:01:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:41 -0400 |
commit | 7ef9e055ce1d8ad93f636bde1bf050eef26c798b (patch) | |
tree | 2cff956b5e0d6e00b0eb7cfc42331cac4fd7c74e | |
parent | b9498b508a0d601029f1040a51e9a5a4aecbb926 (diff) |
tools/perf/build: Split out feature check: 'gtk2'
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-gfwzurn7wywiviLp7Swyyqsy@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/perf/config/Makefile | 3 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/Makefile | 4 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/test-gtk2.c | 10 |
3 files changed, 16 insertions, 1 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 43713c641600..b3bf931dd2a0 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -116,6 +116,7 @@ FEATURE_TESTS = \ | |||
116 | libunwind \ | 116 | libunwind \ |
117 | libaudit \ | 117 | libaudit \ |
118 | libslang \ | 118 | libslang \ |
119 | gtk2 \ | ||
119 | libnuma | 120 | libnuma |
120 | 121 | ||
121 | $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) | 122 | $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) |
@@ -294,7 +295,7 @@ endif | |||
294 | 295 | ||
295 | ifndef NO_GTK2 | 296 | ifndef NO_GTK2 |
296 | FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | 297 | FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) |
297 | ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y) | 298 | ifneq ($(feature-gtk2), 1) |
298 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); | 299 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); |
299 | NO_GTK2 := 1 | 300 | NO_GTK2 := 1 |
300 | else | 301 | else |
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index c9b15b0a819b..920958c83ce8 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile | |||
@@ -14,6 +14,7 @@ FILES= \ | |||
14 | test-libunwind \ | 14 | test-libunwind \ |
15 | test-libaudit \ | 15 | test-libaudit \ |
16 | test-libslang \ | 16 | test-libslang \ |
17 | test-gtk2 \ | ||
17 | test-libnuma | 18 | test-libnuma |
18 | 19 | ||
19 | CC := $(CC) -MD | 20 | CC := $(CC) -MD |
@@ -69,6 +70,9 @@ test-libaudit: | |||
69 | test-libslang: | 70 | test-libslang: |
70 | $(BUILD) -I/usr/include/slang -lslang | 71 | $(BUILD) -I/usr/include/slang -lslang |
71 | 72 | ||
73 | test-gtk2: | ||
74 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | ||
75 | |||
72 | -include *.d */*.d | 76 | -include *.d */*.d |
73 | 77 | ||
74 | ############################### | 78 | ############################### |
diff --git a/tools/perf/config/feature-checks/test-gtk2.c b/tools/perf/config/feature-checks/test-gtk2.c new file mode 100644 index 000000000000..1ac6d8a1fb14 --- /dev/null +++ b/tools/perf/config/feature-checks/test-gtk2.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 | |||
5 | int main(int argc, char *argv[]) | ||
6 | { | ||
7 | gtk_init(&argc, &argv); | ||
8 | |||
9 | return 0; | ||
10 | } | ||