diff mbox series

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

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

Commit Message

Github ODP bot Jan. 31, 2018, 2 p.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Add configuration options to enable code instrumentation and set
PAPI installation folder.

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

---
/** Email created from pull request 406 (bogdanPricope:cat_benchmark_pr)
 ** https://github.com/Linaro/odp/pull/406
 ** Patch: https://github.com/Linaro/odp/pull/406.patch
 ** Base sha: 079b524277414f57411d3223563353bbdbc1a536
 ** Merge commit sha: c25517810ea3389a28c0adb2fdde601eae684851
 **/
 configure.ac            |  1 +
 example/m4/configure.m4 | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 3f5092320..bd0fbf3ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,4 +411,5 @@  AC_MSG_RESULT([
 	test_example:		${test_example}
 	user_guides:		${user_guides}
 	mdev:			${mdev_support}
+	code instrumentation:	${code_instrumentation}
 ])
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index 208c5d6d7..5122d19b6 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -7,6 +7,22 @@  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],
+    [  --enable-code-instrum   enable code instrumentation support],
+    [if test x$enableval = xyes; then
+        code_instrumentation=yes
+    fi])
+
+PAPI_PATH=""
+AC_ARG_WITH([papi-path],
+AS_HELP_STRING([--with-papi-path=DIR   path to papi install directory]),
+    [PAPI_PATH="$withval"
+    code_instrumentation=yes],[])
+
+AC_SUBST([PAPI_PATH])
+AM_CONDITIONAL([CODE_INSTRUM], [test x$code_instrumentation = xyes ])
+
 AC_CONFIG_FILES([example/classifier/Makefile
 		 example/generator/Makefile
 		 example/hello/Makefile