diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2015-04-21 03:27:04 +0800 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-04-21 21:53:46 +0200 |
commit | 8d9c8f162b6cc71ae217ddeef2cef522060bc85e (patch) | |
tree | 060c481865f89823ccb9ec7f58325e8d6b1f3a4b /m4/ax_compiler_flags_cxxflags.m4 | |
parent | 93fbfa0accb463edc300c1d52bcccb8696934cf7 (diff) | |
download | autoconf-archive-8d9c8f162b6cc71ae217ddeef2cef522060bc85e.tar.gz |
ax_compiler_flags: Prevent using bash substring expansion
Substring expansion such as ${flag:5} is not supported by POSIX, and
it can cause error for systems not using bash as their default shell.
Diffstat (limited to 'm4/ax_compiler_flags_cxxflags.m4')
-rw-r--r-- | m4/ax_compiler_flags_cxxflags.m4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m4/ax_compiler_flags_cxxflags.m4 b/m4/ax_compiler_flags_cxxflags.m4 index dd3b583..112cb76 100644 --- a/m4/ax_compiler_flags_cxxflags.m4 +++ b/m4/ax_compiler_flags_cxxflags.m4 @@ -29,6 +29,7 @@ #serial 5 AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ + AC_REQUIRE([AC_PROG_SED]) AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) @@ -115,7 +116,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ AS_CASE([$flag], [-Wno-*=*],[], [-Wno-*],[ - AX_APPEND_COMPILE_FLAGS([-Wno-error=${flag:5}], + AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], ax_warn_cxxflags_variable, [$ax_compiler_flags_test]) ]) |