Commit d795a658 authored by Ingo Molnar's avatar Ingo Molnar

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

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-orhejqtjao3vf4wxwBUdzhaz@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 058f952d
...@@ -114,6 +114,7 @@ FEATURE_TESTS = \ ...@@ -114,6 +114,7 @@ FEATURE_TESTS = \
libelf-mmap \ libelf-mmap \
libelf-getphdrnum \ libelf-getphdrnum \
libunwind \ libunwind \
libaudit \
libnuma libnuma
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test))) $(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
...@@ -265,8 +266,7 @@ ifndef NO_LIBUNWIND ...@@ -265,8 +266,7 @@ ifndef NO_LIBUNWIND
endif endif
ifndef NO_LIBAUDIT ifndef NO_LIBAUDIT
FLAGS_LIBAUDIT = $(CFLAGS) $(LDFLAGS) -laudit ifneq ($(feature-libaudit), 1)
ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT),libaudit),y)
msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev);
NO_LIBAUDIT := 1 NO_LIBAUDIT := 1
else else
......
...@@ -12,6 +12,7 @@ FILES= \ ...@@ -12,6 +12,7 @@ FILES= \
test-libelf-mmap \ test-libelf-mmap \
test-libelf-getphdrnum \ test-libelf-getphdrnum \
test-libunwind \ test-libunwind \
test-libaudit \
test-libnuma test-libnuma
CC := $(CC) -MD CC := $(CC) -MD
...@@ -61,6 +62,9 @@ test-libnuma: ...@@ -61,6 +62,9 @@ test-libnuma:
test-libunwind: test-libunwind:
$(BUILD) -lunwind -lunwind-x86_64 -lelf $(BUILD) -lunwind -lunwind-x86_64 -lelf
test-libaudit:
$(BUILD) -laudit
-include *.d */*.d -include *.d */*.d
############################### ###############################
......
#include <libaudit.h>
int main(void)
{
printf("error message: %s\n", audit_errno_to_name(0));
return audit_open();
}
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