aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-28 14:33:53 +0100
committerMax <msuraev@sysmocom.de>2017-12-28 14:33:53 +0100
commit0bd729f3add48a4b8f6a7f21a8a7daa34a0ad32d (patch)
treec9cd50f6fe5ecd408225dc65ba06e6d01843486a /configure.ac
parentad1e3cdd6c93b9f47d13785ed0966de8019a5e1e (diff)
Add optional profiling support
This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 97b2e2f33..433e3bff3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,6 +113,15 @@ if test "$enable_coverage" = "yes"; then
AC_SUBST([COVERAGE_LDFLAGS])
fi
+AC_ARG_ENABLE(profile,
+ [AS_HELP_STRING([--enable-profile], [Compile with profiling support enabled], )],
+ [profile=$enableval], [profile="no"])
+if test x"$profile" = x"yes"
+then
+ CFLAGS="$CFLAGS -pg"
+ CPPFLAGS="$CPPFLAGS -pg"
+fi
+
AC_ARG_ENABLE([vty_tests],
AC_HELP_STRING([--enable-vty-tests],
[Include the VTY/CTRL tests in make check (deprecated)