diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-03-17 19:19:44 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-05-29 07:44:03 -0400 |
commit | 3082cb339fb51b156db66516a80599b958dabbf4 (patch) | |
tree | 04eaa9f3ef4ae68c320aad81bd38e2e4fa3570bd /tools/perf/config | |
parent | 58cabf6ab1f68f4a44e88bee5d578f68d8a39b38 (diff) |
perf tools: Move libperl check config into config/Makefile
Moving libperl check config into config/Makefile.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1369398928-9809-12-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config')
-rw-r--r-- | tools/perf/config/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 8cf0958c6daa..a42c7b8e071d 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -240,3 +240,24 @@ ifndef NO_GTK2 | |||
240 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) | 240 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) |
241 | endif | 241 | endif |
242 | endif | 242 | endif |
243 | |||
244 | grep-libs = $(filter -l%,$(1)) | ||
245 | strip-libs = $(filter-out -l%,$(1)) | ||
246 | |||
247 | ifdef NO_LIBPERL | ||
248 | BASIC_CFLAGS += -DNO_LIBPERL | ||
249 | else | ||
250 | PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) | ||
251 | PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) | ||
252 | PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) | ||
253 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` | ||
254 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) | ||
255 | |||
256 | ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED),perl),y) | ||
257 | BASIC_CFLAGS += -DNO_LIBPERL | ||
258 | NO_LIBPERL := 1 | ||
259 | else | ||
260 | ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS) | ||
261 | EXTLIBS += $(PERL_EMBED_LIBADD) | ||
262 | endif | ||
263 | endif | ||