diff options
author | Mark Jonas <mark.jonas@de.bosch.com> | 2018-08-09 10:59:05 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-08-13 13:19:41 +0200 |
commit | b217774ca825ba449ddb27e2bc9be6f3b8cad9b1 (patch) | |
tree | bb1ebfc23e06b998770f8782697b92e687285328 /configure.ac | |
parent | 15af38a25c679d3ed0f72bbc1109c6b34a959c39 (diff) | |
download | libsocketcan-b217774ca825ba449ddb27e2bc9be6f3b8cad9b1.tar.gz libsocketcan-b217774ca825ba449ddb27e2bc9be6f3b8cad9b1.tar.xz |
Add configure switch for error logging
For keeping backwards compatibility the configure switch
--enable-error-log is enabled by default. To disable error logging
use --enable-error-log=no.
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 492da2c..9a807ec 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,23 @@ else fi +# +# Error logging +# +AC_MSG_CHECKING([whether to enable error logging]) +AC_ARG_ENABLE(error-log, + AS_HELP_STRING([--enable-error-log], [enable error log @<:@default=yes@:>@]), + [case "$enableval" in + y | yes) CONFIG_ERROR_LOG=yes ;; + *) CONFIG_ERROR_LOG=no ;; + esac], + [CONFIG_ERROR_LOG=yes]) +AC_MSG_RESULT([${CONFIG_ERROR_LOG}]) +if test "${CONFIG_ERROR_LOG}" = "no"; then + AC_DEFINE(DISABLE_ERROR_LOG, 1, [disable error logging]) +fi + + AC_CONFIG_FILES([ GNUmakefile config/libsocketcan.pc |