This was making the regex non-functional, as the square brackets were being removed when generating the output file, thus making the --disable-compiler-optimisations and --disable-linker-optimisations non-functional.
@@ -36,7 +36,7 @@ AC_DEFUN([DPKG_COMPILER_OPTIMISATIONS],
AS_HELP_STRING([--disable-compiler-optimisations],
[Disable compiler optimisations]),
[if test "x$enable_compiler_optimisations" = "xno"; then
- [CFLAGS=$(echo "$CFLAGS" | sed -e "s/ -O[1-9]*\b/ -O0/g")]
+ [CFLAGS=$(echo "$CFLAGS" | sed -e "s/ -O[[1-9]]*\b/ -O0/g")]
fi])dnl
])
@@ -8,7 +8,7 @@ AC_DEFUN([DPKG_LINKER_OPTIMISATIONS],
AS_HELP_STRING([--disable-linker-optimisations],
[Disable linker optimisations]),
[if test "x$enable_linker_optimisations" = "xno"; then
- [LDFLAGS=$(echo "$LDFLAGS" | sed -e "s/ -Wl,-O[0-9]*\b//g")]
+ [LDFLAGS=$(echo "$LDFLAGS" | sed -e "s/ -Wl,-O[[0-9]]*\b//g")]
else
[LDFLAGS="$LDFLAGS -Wl,-O1"]
fi], [LDFLAGS="$LDFLAGS -Wl,-O1"])dnl