diff options
author | Max <msuraev@sysmocom.de> | 2017-12-28 14:18:02 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-12-28 14:18:02 +0100 |
commit | effdec6e13550f89469c2f9da95895cc5c474dd0 (patch) | |
tree | ff2401fcfcda85e12b858b83ed90ada2dcd62c4d /configure.ac | |
parent | 20c7c46bceac4969e420f2b0dd89448327914971 (diff) |
Add optional profiling support
This facilitates the use of programs like uftrace. It's disabled by
default due to associated overhead.
Change-Id: I5c16988cefa46e0b958030c0f3bff9efc5b4979d
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5867cbe5..8a8b93c8 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,15 @@ then CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" 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 + dnl checks for libraries PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.10.1) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty) |