Commit 7ef9e055 authored by Ingo Molnar's avatar Ingo Molnar

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.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent b9498b50
...@@ -116,6 +116,7 @@ FEATURE_TESTS = \ ...@@ -116,6 +116,7 @@ FEATURE_TESTS = \
libunwind \ libunwind \
libaudit \ libaudit \
libslang \ libslang \
gtk2 \
libnuma libnuma
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
...@@ -294,7 +295,7 @@ endif ...@@ -294,7 +295,7 @@ endif
ifndef NO_GTK2 ifndef NO_GTK2
FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y) ifneq ($(feature-gtk2), 1)
msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
NO_GTK2 := 1 NO_GTK2 := 1
else else
......
...@@ -14,6 +14,7 @@ FILES= \ ...@@ -14,6 +14,7 @@ FILES= \
test-libunwind \ test-libunwind \
test-libaudit \ test-libaudit \
test-libslang \ test-libslang \
test-gtk2 \
test-libnuma test-libnuma
CC := $(CC) -MD CC := $(CC) -MD
...@@ -69,6 +70,9 @@ test-libaudit: ...@@ -69,6 +70,9 @@ test-libaudit:
test-libslang: test-libslang:
$(BUILD) -I/usr/include/slang -lslang $(BUILD) -I/usr/include/slang -lslang
test-gtk2:
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
-include *.d */*.d -include *.d */*.d
############################### ###############################
......
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#include <gtk/gtk.h>
#pragma GCC diagnostic error "-Wstrict-prototypes"
int main(int argc, char *argv[])
{
gtk_init(&argc, &argv);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment