diff options
author | Alexander Tsoy <alexander@tsoy.me> | 2015-07-02 01:14:38 +0300 |
---|---|---|
committer | Alexander Tsoy <alexander@tsoy.me> | 2015-07-02 01:15:23 +0300 |
commit | b520d3cad82c05d8af06e0cd62d436dc6161edb1 (patch) | |
tree | 3c906f0f59769ae7af8960a4d0c6cc0009fbe8fc | |
parent | 824cfa589973a624f49e08f597bf81d0d5ce4a87 (diff) | |
download | dleyna-connector-dbus-b520d3cad82c05d8af06e0cd62d436dc6161edb1.tar.gz |
[m4] Use AS_VAR_APPEND macro instead of "+="
Also get rid of unnecessary subshells.
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
-rw-r--r-- | m4/compiler-flags.m4 | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/m4/compiler-flags.m4 b/m4/compiler-flags.m4 index 5158ec4..dfbaa3b 100644 --- a/m4/compiler-flags.m4 +++ b/m4/compiler-flags.m4 @@ -21,35 +21,35 @@ dnl Regis Merlino <regis.merlino@intel.com> dnl AC_DEFUN_ONCE([DLEYNA_CONNECTOR_DBUS_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" + AS_VAR_APPEND([CFLAGS], [" -Wno-format-extra-args"]) ]) |