summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 18:41:23 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 18:41:23 +0000
commit329c558c5d9d77d59034a73f4a898ef0187b0dcd (patch)
tree436cdcf28067dc47453cd4178bf886fa146eea52 /configure.ac
parent1a15b8749113f023bc14d980196df2ae6cae29d1 (diff)
performance: allow limiting the maximum log level at compile time.
Although eina_log is not that harmful, allowing the user to remove debug/info messages for production is good, it reduces the overhead and also allows removing the strings from the final binary. I'd recommend production builds with: ./configure --with-maximum-log-level=2 SVN revision: 72311
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bd519bb..5226202 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,22 @@ PKG_CHECK_MODULES([TERMINOLOGY], [${requirements}])
32 32
33EFL_WITH_BIN([edje], [edje-cc], [edje_cc]) 33EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
34 34
35with_max_log_level="<unset>"
36AC_ARG_WITH(maximum-log-level,
37 [AC_HELP_STRING([--with-maximum-log-level=NUMBER],
38 [limit terminology log level to the given number, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
39 [
40 if test "x${withval}" != "xno"; then
41 if echo "${withval}" | grep -E '^[[0-9]]+$' >/dev/null 2>/dev/null; then
42 AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
43 AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
44 with_max_log_level="${withval}"
45 else
46 AC_MSG_ERROR([--with-maximum-log-level takes a decimal number, got "${withval}" instead.])
47 fi
48 fi
49 ], [:])
50
35AC_CONFIG_FILES([ 51AC_CONFIG_FILES([
36Makefile 52Makefile
37src/Makefile 53src/Makefile