aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPhilip Tricca <flihp@twobit.org>2018-11-04 19:53:12 -0800
committerAndreas Fuchs <andreas.fuchs@sit.fraunhofer.de>2018-11-08 14:27:44 +0100
commitfeae8b16048acedbce9cf4c1285327d8caaf1be6 (patch)
treea0e2c912d62c14019d9fe3fccc87123ff721c5c7 /configure.ac
parent6d5985bf5f61f15a20f00ace5600901ec1d6ce23 (diff)
downloadtpm2-tss-feae8b16048acedbce9cf4c1285327d8caaf1be6.tar.gz
build: Replace chain of AS_IF calls with one AS_CASE.
No functional changes in this commit, just using more of the available tools to save a few characters. Signed-off-by: Philip Tricca <flihp@twobit.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 14 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index f9ed099a..c4e4592e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -207,19 +207,20 @@ AC_ARG_WITH([maxloglevel],
[sets the maximum log level (default is trace)])],
[],
[with_maxloglevel=trace])
-AS_IF([test "x$with_maxloglevel" = "xnone"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [0], ["Logging disabled"]),
-AS_IF([test "x$with_maxloglevel" = "xerror"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [2], ["Error log level"]),
-AS_IF([test "x$with_maxloglevel" = "xwarning"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [3], ["Warning log level"]),
-AS_IF([test "x$with_maxloglevel" = "xinfo"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [4], ["Info log level"]),
-AS_IF([test "x$with_maxloglevel" = "xdebug"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [5], ["Debug log level"]),
-AS_IF([test "x$with_maxloglevel" = "xtrace"],
- AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [6], ["Trace log level"]),
-AC_MSG_ERROR([Bad value for --with-maxloglevel])))))))
+AS_CASE(["x$with_maxloglevel"],
+ ["xnone"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [0], ["Logging disabled"])],
+ ["xerror"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [2], ["Error log level"])],
+ ["xwarning"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [3], ["Warning log level"])],
+ ["xinfo"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [4], ["Info log level"])],
+ ["xdebug"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [5], ["Debug log level"])],
+ ["xtrace"],
+ [AC_DEFINE_UNQUOTED([MAXLOGLEVEL], [6], ["Trace log level"])],
+ [AC_MSG_ERROR([Bad value for --with-maxloglevel])])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],