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>
This commit is contained in:
parent
7ef9e055ce
commit
c7a79e96dc
3 changed files with 16 additions and 1 deletions
|
@ -117,6 +117,7 @@ FEATURE_TESTS = \
|
||||||
libaudit \
|
libaudit \
|
||||||
libslang \
|
libslang \
|
||||||
gtk2 \
|
gtk2 \
|
||||||
|
gtk2-infobar \
|
||||||
libnuma
|
libnuma
|
||||||
|
|
||||||
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
|
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
|
||||||
|
@ -299,7 +300,7 @@ ifndef NO_GTK2
|
||||||
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
|
||||||
ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR_SUPPORT),y)
|
ifeq ($(feature-gtk2-infobar), 1)
|
||||||
CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT
|
CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT
|
||||||
endif
|
endif
|
||||||
CFLAGS += -DHAVE_GTK2_SUPPORT
|
CFLAGS += -DHAVE_GTK2_SUPPORT
|
||||||
|
|
|
@ -15,6 +15,7 @@ FILES= \
|
||||||
test-libaudit \
|
test-libaudit \
|
||||||
test-libslang \
|
test-libslang \
|
||||||
test-gtk2 \
|
test-gtk2 \
|
||||||
|
test-gtk2-infobar \
|
||||||
test-libnuma
|
test-libnuma
|
||||||
|
|
||||||
CC := $(CC) -MD
|
CC := $(CC) -MD
|
||||||
|
@ -73,6 +74,9 @@ test-libslang:
|
||||||
test-gtk2:
|
test-gtk2:
|
||||||
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
|
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
|
||||||
|
|
||||||
|
test-gtk2-infobar:
|
||||||
|
$(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
|
||||||
|
|
||||||
-include *.d */*.d
|
-include *.d */*.d
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
|
|
10
tools/perf/config/feature-checks/test-gtk2-infobar.c
Normal file
10
tools/perf/config/feature-checks/test-gtk2-infobar.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#pragma GCC diagnostic error "-Wstrict-prototypes"
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
gtk_info_bar_new();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue