diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index b3ced0509..45a9be6e4 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -1112,21 +1112,26 @@ AC_SUBST([wl]) AC_SUBST([build_libtool_libs]) -# changing LDFLAGS value should only be done after -# lt_cv_prog_compiler_static_works test +# We cannot use alternation (`\|`) in the `sed` regexp since it is not +# portable. ftoption_set() { - regexp="-e \\\"s|.*#.*def.*$1\>.*|#define $1|\\\"" + regexp="-e \\\"s|.*#.*def.*$1 .*|#define $1|\\\" \ + -e \\\"s|.*#.*def.*$1\$|#define $1|\\\"" FTOPTION_H_SED="$FTOPTION_H_SED $regexp" } ftoption_unset() { - regexp="-e \\\"s|.*#.*def.*$1\>.*|/* #undef $1 */|\\\"" + regexp="-e \\\"s|.*#.*def.*$1 .*|/* #undef $1 */|\\\" \ + -e \\\"s|.*#.*def.*$1\$|/* #undef $1 */|\\\"" FTOPTION_H_SED="$FTOPTION_H_SED $regexp" } +# Changing the `LDFLAGS` value should only be done after the +# `lt_cv_prog_compiler_static_works` test. + if test "$have_zlib" != no; then CFLAGS="$CFLAGS $ZLIB_CFLAGS" LDFLAGS="$LDFLAGS $ZLIB_LIBS"