From 6d689998b03e0ba81258d7258f4b1942bbca764e Mon Sep 17 00:00:00 2001 From: Alexander Tsoy Date: Wed, 1 Jul 2015 23:33:45 +0300 Subject: [m4] Don't use bash "let" builtin Fixes the following configure error: checking for --with-log-level=7... ./configure: 12691: ./configure.lineno: let: not found Signed-off-by: Alexander Tsoy --- m4/log.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/log.m4 b/m4/log.m4 index a258a58..276e7f1 100644 --- a/m4/log.m4 +++ b/m4/log.m4 @@ -27,7 +27,7 @@ AC_DEFUN([_DLEYNA_LOG_LEVEL_CHECK_VALUE], [ AC_MSG_ERROR(["Log levels 0, 7 and 8 cannot be combined with other values"], 1) ]) - let log_level_count++ + : $((log_level_count++)) ], [0|7|8], [AS_IF([test ${log_level_count} -ne 0], @@ -60,7 +60,7 @@ AC_DEFUN([DLEYNA_LOG_LEVEL_CHECK], IFS="," log_name=LOG_LEVEL_${log_level} eval log_value=\$${log_name} - let "LOG_LEVEL |= ${log_value}" + : $((LOG_LEVEL |= ${log_value})) done IFS=${old_IFS} -- cgit v1.2.1 From cb8c73bc582c038c56b053cd7b3c51dbb6bad039 Mon Sep 17 00:00:00 2001 From: Alexander Tsoy Date: Thu, 2 Jul 2015 01:17:10 +0300 Subject: [m4] Use AS_VAR_APPEND macro instead of "+=" Also get rid of unnecessary subshells. Signed-off-by: Alexander Tsoy --- m4/compiler-flags.m4 | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/m4/compiler-flags.m4 b/m4/compiler-flags.m4 index 9a88f3d..a711eda 100644 --- a/m4/compiler-flags.m4 +++ b/m4/compiler-flags.m4 @@ -21,36 +21,36 @@ dnl Regis Merlino dnl AC_DEFUN_ONCE([DLEYNA_CORE_COMPILER_FLAGS], [ - if (test x"${CFLAGS}" = x""); then + if test x"${CFLAGS}" = x""; then CFLAGS="-Wall" - CFLAGS+=" -O2" - CFLAGS+=" -D_FORTIFY_SOURCE=2" + AS_VAR_APPEND([CFLAGS], [" -O2"]) + AS_VAR_APPEND([CFLAGS], [" -D_FORTIFY_SOURCE=2"]) fi - if (test x"$USE_MAINTAINER_MODE" = x"yes"); then - CFLAGS+=" -Wextra" - CFLAGS+=" -Wno-unused-parameter" - CFLAGS+=" -Wno-missing-field-initializers" - CFLAGS+=" -Wdeclaration-after-statement" - CFLAGS+=" -Wmissing-declarations" - CFLAGS+=" -Wredundant-decls" - CFLAGS+=" -Wcast-align" + if test x"$USE_MAINTAINER_MODE" = x"yes"; then + AS_VAR_APPEND([CFLAGS], [" -Wextra"]) + AS_VAR_APPEND([CFLAGS], [" -Wno-unused-parameter"]) + AS_VAR_APPEND([CFLAGS], [" -Wno-missing-field-initializers"]) + AS_VAR_APPEND([CFLAGS], [" -Wdeclaration-after-statement"]) + AS_VAR_APPEND([CFLAGS], [" -Wmissing-declarations"]) + AS_VAR_APPEND([CFLAGS], [" -Wredundant-decls"]) + AS_VAR_APPEND([CFLAGS], [" -Wcast-align"]) - CFLAGS+=" -Wstrict-prototypes" - CFLAGS+=" -Wmissing-prototypes" - CFLAGS+=" -Wnested-externs" - CFLAGS+=" -Wshadow" - CFLAGS+=" -Wformat=2" - CFLAGS+=" -Winit-self" + AS_VAR_APPEND([CFLAGS], [" -Wstrict-prototypes"]) + AS_VAR_APPEND([CFLAGS], [" -Wmissing-prototypes"]) + AS_VAR_APPEND([CFLAGS], [" -Wnested-externs"]) + AS_VAR_APPEND([CFLAGS], [" -Wshadow"]) + AS_VAR_APPEND([CFLAGS], [" -Wformat=2"]) + AS_VAR_APPEND([CFLAGS], [" -Winit-self"]) - CFLAGS+=" -std=gnu99" - CFLAGS+=" -pedantic" - CFLAGS+=" -Wno-overlength-strings" + AS_VAR_APPEND([CFLAGS], [" -std=gnu99"]) + AS_VAR_APPEND([CFLAGS], [" -pedantic"]) + AS_VAR_APPEND([CFLAGS], [" -Wno-overlength-strings"]) - CFLAGS+=" -DG_DISABLE_DEPRECATED" - CFLAGS+=" -DGLIB_DISABLE_DEPRECATION_WARNINGS" + AS_VAR_APPEND([CFLAGS], [" -DG_DISABLE_DEPRECATED"]) + AS_VAR_APPEND([CFLAGS], [" -DGLIB_DISABLE_DEPRECATION_WARNINGS"]) fi - CFLAGS+=" -Wno-format-extra-args" - CFLAGS+=" -Wl,--no-undefined" + AS_VAR_APPEND([CFLAGS], [" -Wno-format-extra-args"]) + AS_VAR_APPEND([CFLAGS], [" -Wl,--no-undefined"]) ]) -- cgit v1.2.1