diff mbox series

[v4,1/7] example: add basic papi configuration option

Message ID 1517911222-3896-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/7] example: add basic papi configuration option | expand

Commit Message

Github ODP bot Feb. 6, 2018, 10 a.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Add configuration options to enable code instrumentation.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 443 (bogdanPricope:master_benchmark_pr)
 ** https://github.com/Linaro/odp/pull/443
 ** Patch: https://github.com/Linaro/odp/pull/443.patch
 ** Base sha: 27a7923236030fed0272cc9072f0cde62496e91d
 ** Merge commit sha: 34bd4730244cef8aa4ef2778135e469012c66768
 **/
 configure.ac            |  1 +
 example/m4/configure.m4 | 10 ++++++++++
 2 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 7b90b2127..6e9edc372 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,4 +410,5 @@  AC_MSG_RESULT([
 	test_helper:		${test_helper}
 	test_example:		${test_example}
 	user_guides:		${user_guides}
+	code instrumentation:   ${code_instrumentation}
 ])
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index 1ce0cb11d..2fcf596ca 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -7,6 +7,16 @@  AC_ARG_ENABLE([test-example],
     [test_example=yes])
 AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
 
+code_instrumentation=no
+AC_ARG_ENABLE([code-instrum],
+    [AS_HELP_STRING([--enable-code-instrum], [enable code instrumentation support])],
+    [if test x$enableval = xyes; then
+        code_instrumentation=yes
+        PKG_CHECK_MODULES([PAPI], [papi-5])
+    fi])
+
+AM_CONDITIONAL([CODE_INSTRUM], [test x$code_instrumentation = xyes ])
+
 AC_CONFIG_FILES([example/classifier/Makefile
 		 example/generator/Makefile
 		 example/hello/Makefile