Commit b9498b50 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

tools/perf/build: Split out feature check: 'libslang'

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-FGmpkydfwqlkaw7yy8ewjpza@git.kernel.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d795a658
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ FEATURE_TESTS = \
	libelf-getphdrnum		\
	libunwind			\
	libaudit			\
	libslang			\
	libnuma

$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
@@ -280,8 +281,7 @@ ifdef NO_NEWT
endif

ifndef NO_SLANG
  FLAGS_SLANG=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) -I/usr/include/slang -lslang
  ifneq ($(call try-cc,$(SOURCE_SLANG),$(FLAGS_SLANG),libslang),y)
  ifneq ($(feature-libslang), 1)
    msg := $(warning slang not found, disables TUI support. Please install slang-devel or libslang-dev);
    NO_SLANG := 1
  else
+4 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ FILES= \
	test-libelf-getphdrnum		\
	test-libunwind			\
	test-libaudit			\
	test-libslang			\
	test-libnuma

CC := $(CC) -MD
@@ -65,6 +66,9 @@ test-libunwind:
test-libaudit:
	$(BUILD) -laudit

test-libslang:
	$(BUILD) -I/usr/include/slang -lslang

-include *.d */*.d

###############################
+6 −0
Original line number Diff line number Diff line
#include <slang.h>

int main(void)
{
	return SLsmg_init_smg();
}