INN commit: trunk (7 files)
INN Commit
rra at isc.org
Sun Jan 17 21:32:02 UTC 2021
Date: Sunday, January 17, 2021 @ 13:32:02
Author: iulius
Revision: 10515
Use AS_ECHO instead of echo in Autoconf macros
AS_ECHO is more portable. The echo shell function may not be reliable
in the calls we do, with variables containing "-" or other characters.
Modified:
trunk/configure.ac
trunk/m4/cc-flags.m4
trunk/m4/krb5-config.m4
trunk/m4/lib-pathname.m4
trunk/m4/modes.m4
trunk/m4/perl.m4
trunk/m4/python.m4
--------------------+
configure.ac | 14 +++++++-------
m4/cc-flags.m4 | 2 +-
m4/krb5-config.m4 | 4 ++--
m4/lib-pathname.m4 | 2 +-
m4/modes.m4 | 2 +-
m4/perl.m4 | 10 +++++-----
m4/python.m4 | 4 ++--
7 files changed, 19 insertions(+), 19 deletions(-)
Modified: configure.ac
===================================================================
--- configure.ac 2021-01-15 22:35:44 UTC (rev 10514)
+++ configure.ac 2021-01-17 21:32:02 UTC (rev 10515)
@@ -224,10 +224,10 @@
inn_perl_core_flags=" $PERL_CPPFLAGS "
AS_IF([test x"$inn_enable_largefiles" != xyes],
[for f in -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES ; do
- inn_perl_core_flags=`echo "$inn_perl_core_flags" | sed "s/ $f / /"`
+ inn_perl_core_flags=`AS_ECHO(["$inn_perl_core_flags"]) | sed "s/ $f / /"`
done])
- inn_perl_core_flags=`echo "$inn_perl_core_flags" | sed 's/^ *//'`
- inn_perl_core_flags=`echo "$inn_perl_core_flags" | sed 's/ *$//'`
+ inn_perl_core_flags=`AS_ECHO(["$inn_perl_core_flags"]) | sed 's/^ *//'`
+ inn_perl_core_flags=`AS_ECHO(["$inn_perl_core_flags"]) | sed 's/ *$//'`
PERL_CPPFLAGS="$inn_perl_core_flags"
INN_PROG_CC_FLAG([-Wno-extra], [PERL_WARNINGS=-Wno-extra],
[PERL_WARNINGS=''])
@@ -698,7 +698,7 @@
dnl On OpenBSD, the system headers contain many redundant declarations.
AS_CASE([$host],
[*-openbsd*],
- [CC_WARNINGS=`echo "$CC_WARNINGS" | sed 's/-Wredundant-decls //'`])
+ [CC_WARNINGS=`AS_ECHO(["${CC_WARNINGS}"]) | sed 's/-Wredundant-decls //'`])
dnl Add hardening build flags, if supported by the compiler.
dnl Solaris has a separate libssp, so -fstack-protector-strong also has
@@ -716,8 +716,8 @@
[])
INN_PROG_LD_FLAG([-fstack-protector-strong],
[LDFLAGS="${LDFLAGS} -fstack-protector-strong"],
- [CFLAGS=`echo "${CFLAGS}" | sed 's/ -fstack-protector-strong//'`
- CC_WARNINGS=`echo "${CC_WARNINGS}" | sed 's/ -fstack-protector-strong//'`])
+ [CFLAGS=`AS_ECHO(["${CFLAGS}"]) | sed 's/ -fstack-protector-strong//'`
+ CC_WARNINGS=`AS_ECHO(["${CC_WARNINGS}"]) | sed 's/ -fstack-protector-strong//'`])
INN_PROG_LD_FLAG([-Wl,-z,relro],
[LDFLAGS="${LDFLAGS} -Wl,-z,relro"], [])
INN_PROG_LD_FLAG([-Wl,-z,now],
@@ -724,7 +724,7 @@
[LDFLAGS="${LDFLAGS} -Wl,-z,now"], [])])
dnl Clean up our LIBS, just for grins.
-LIBS=`echo "$LIBS" | sed 's/^ *//' | sed 's/ */ /g' | sed 's/ *$//'`
+LIBS=`AS_ECHO(["$LIBS"]) | sed 's/^ *//' | sed 's/ */ /g' | sed 's/ *$//'`
dnl Configure our output files. Try to keep this as limited as possible,
dnl since it directly affects how long it takes configure to complete.
Modified: m4/cc-flags.m4
===================================================================
--- m4/cc-flags.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/cc-flags.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -41,7 +41,7 @@
AC_CACHE_VAL([_INN_PROG_CC_FLAG_CACHE([$1])],
[save_CFLAGS=$CFLAGS
AS_CASE([$1],
- [-Wno-*], [CFLAGS="$CFLAGS `echo "$1" | sed 's/-Wno-/-W/'`"],
+ [-Wno-*], [CFLAGS="$CFLAGS `AS_ECHO(["$1"]) | sed 's/-Wno-/-W/'`"],
[*], [CFLAGS="$CFLAGS $1"])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [int foo = 0;])],
[_INN_PROG_CC_FLAG_CACHE([$1])=yes],
Modified: m4/krb5-config.m4
===================================================================
--- m4/krb5-config.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/krb5-config.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -99,7 +99,7 @@
$3[]_LIBS=`"$inn_krb5_config_$3" --libs $2 2>/dev/null`
inn_krb5_config_$3[]_ok=yes])])])
AS_IF([test x"$inn_krb5_config_$3[]_ok" = xyes],
- [$3[]_CPPFLAGS=`echo "$$3[]_CPPFLAGS" | sed 's%-I/usr/include %%'`
- $3[]_CPPFLAGS=`echo "$$3[]_CPPFLAGS" | sed 's%-I/usr/include$%%'`
+ [$3[]_CPPFLAGS=`AS_ECHO(["$$3[]_CPPFLAGS"]) | sed 's%-I/usr/include %%'`
+ $3[]_CPPFLAGS=`AS_ECHO(["$$3[]_CPPFLAGS"]) | sed 's%-I/usr/include$%%'`
$4],
[$5])])
Modified: m4/lib-pathname.m4
===================================================================
--- m4/lib-pathname.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/lib-pathname.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -54,7 +54,7 @@
[AS_IF([test x"$3" = x],
[$1="[$]$1 -L$2/lib"],
[$1="[$]$1 -L$2/lib/$3"])])
- $1=`echo "[$]$1" | sed -e 's/^ *//'`])
+ $1=`AS_ECHO(["[$]$1"]) | sed -e 's/^ *//'`])
dnl Set libdir to PREFIX/lib{,32,64} as appropriate.
AC_DEFUN([INN_SET_LIBDIR],
Modified: m4/modes.m4
===================================================================
--- m4/modes.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/modes.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -16,7 +16,7 @@
RUNDIRMODE=0770
AC_ARG_WITH([news-umask],
[AS_HELP_STRING([--with-news-umask=UMASK], [umask for news files [002]])],
- with_news_umask=`echo "$with_news_umask" | sed 's/^0*//'`
+ with_news_umask=`AS_ECHO(["$with_news_umask"]) | sed 's/^0*//'`
if test "x$with_news_umask" = x22 ; then
NEWSUMASK=022
FILEMODE=0644
Modified: m4/perl.m4
===================================================================
--- m4/perl.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/perl.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -93,16 +93,16 @@
inn_perl_core_flags=`"$PERL" -MExtUtils::Embed -e ccopts`
inn_perl_core_libs=`"$PERL" -MExtUtils::Embed -e ldopts 2>&1 | tail -n 1`
inn_perl_core_libs=" $inn_perl_core_libs "
- inn_perl_core_libs=`echo "$inn_perl_core_libs" | sed 's/ -lc / /'`
+ inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/ -lc / /'`
AS_CASE([$host],
[*-linux*],
- [inn_perl_core_libs=`echo "$inn_perl_core_libs" | sed 's/ -lgdbm / /'`],
+ [inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/ -lgdbm / /'`],
[*-cygwin*],
[inn_perl_libname=`"$PERL" -MConfig -e 'print $Config{libperl}'`
- inn_perl_libname=`echo "$inn_perl_libname" | sed 's/^lib//; s/\.a$//'`
+ inn_perl_libname=`AS_ECHO(["$inn_perl_libname"]) | sed 's/^lib//; s/\.a$//'`
inn_perl_core_libs="${inn_perl_core_libs}-l$inn_perl_libname"])
- inn_perl_core_libs=`echo "$inn_perl_core_libs" | sed 's/^ *//'`
- inn_perl_core_libs=`echo "$inn_perl_core_libs" | sed 's/ *$//'`
+ inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/^ *//'`
+ inn_perl_core_libs=`AS_ECHO(["$inn_perl_core_libs"]) | sed 's/ *$//'`
PERL_CPPFLAGS="$inn_perl_core_flags"
PERL_LIBS="$inn_perl_core_libs"
AC_MSG_RESULT([$PERL_LIBS])
Modified: m4/python.m4
===================================================================
--- m4/python.m4 2021-01-15 22:35:44 UTC (rev 10514)
+++ m4/python.m4 2021-01-17 21:32:02 UTC (rev 10515)
@@ -129,9 +129,9 @@
print(" ".join(distutils.sysconfig.get_config_vars( \
"LIBS", "LIBC", "LIBM", "LOCALMODLIBS", "BASEMODLIBS", \
"LINKFORSHARED", "LDFLAGS")))'`
- py_libpython=`echo $py_ldlibrary | sed "s/^lib//" | sed "s/\.@<:@a-z@:>@*$//"`
+ py_libpython=`AS_ECHO(["$py_ldlibrary"]) | sed "s/^lib//" | sed "s/\.@<:@a-z@:>@*$//"`
PYTHON_LIBS="-L$py_libdir -l$py_libpython $py_linkage"
- PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'`
+ PYTHON_LIBS=`AS_ECHO(["$PYTHON_LIBS"]) | sed -e 's/[ \\t]*/ /g'`
AC_MSG_RESULT([$PYTHON_LIBS])
inn_python_save_CPPFLAGS="$CPPFLAGS"
inn_python_save_LIBS="$LIBS"
More information about the inn-committers
mailing list