Signed-off-by: David Ahern <dsah...@gmail.com> Cc: Arnaldo Carvalho de Melo <a...@ghostprotocols.net> Cc: Borislav Petkov <b...@alien8.de> Cc: Frederic Weisbecker <fweis...@gmail.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Jiri Olsa <jo...@redhat.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Stephane Eranian <eran...@google.com> --- tools/perf/Makefile | 16 +++++++--------- tools/perf/Pconfig | 5 +++++ tools/perf/config/feature-tests.mak | 2 +- tools/perf/perf.c | 3 ++- 4 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 0baa19b..62c10b8 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -644,15 +644,13 @@ ifdef CONFIG_LIBUNWIND LIB_OBJS += $(OUTPUT)util/unwind.o endif -ifndef NO_LIBAUDIT - FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit - 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); - else - BASIC_CFLAGS += -DLIBAUDIT_SUPPORT - BUILTIN_OBJS += $(OUTPUT)builtin-trace.o - EXTLIBS += -laudit - endif +ifdef CONFIG_LIBAUDIT + FLAGS_LIBAUDIT = $(ALL_CFLAGS) $(ALL_LDFLAGS) -laudit + ifneq ($(call try-cc,$(SOURCE_LIBAUDIT),$(FLAGS_LIBAUDIT),libaudit),y) + $(error No libaudit.h found, please install audit-libs-devel or libaudit-dev or disable CONFIG_LIBAUDIT) + endif + BUILTIN_OBJS += $(OUTPUT)builtin-trace.o + EXTLIBS += -laudit endif ifdef CONFIG_NEWT diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig index b03881c..4cfccf3 100644 --- a/tools/perf/Pconfig +++ b/tools/perf/Pconfig @@ -45,6 +45,11 @@ config LIBPERL config LIBPYTHON bool "Enable support for python scripting engine" +config LIBAUDIT + bool "Enable support for libaudit" + help + Used for perf trace tool. + config LIBNUMA bool "Enable support for libnuma" help diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak index 1d16481..6e3ba0f 100644 --- a/tools/perf/config/feature-tests.mak +++ b/tools/perf/config/feature-tests.mak @@ -206,7 +206,7 @@ int main(void) endef endif -ifndef NO_LIBAUDIT +ifdef CONFIG_LIBAUDIT define SOURCE_LIBAUDIT #include <libaudit.h> diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 095b882..f7fcf78 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -14,6 +14,7 @@ #include "util/run-command.h" #include "util/parse-events.h" #include "util/debugfs.h" +#include <linux/kconfig.h> #include <pthread.h> const char perf_usage_string[] = @@ -56,7 +57,7 @@ static struct cmd_struct commands[] = { { "lock", cmd_lock, 0 }, { "kvm", cmd_kvm, 0 }, { "test", cmd_test, 0 }, -#ifdef LIBAUDIT_SUPPORT +#ifdef CONFIG_LIBAUDIT { "trace", cmd_trace, 0 }, #endif { "inject", cmd_inject, 0 }, -- 1.7.10.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/