This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d5fdea66ca6e20ed2c28a96e782587244b7ec902 commit d5fdea66ca6e20ed2c28a96e782587244b7ec902 Author: Guillem Jover <guil...@debian.org> AuthorDate: Tue Dec 21 17:06:24 2021 +0100 build: Make AS_TR_* calls more clear Include the entire token within the AS_TR_* calls, instead of only the variable to expand, which makes it more obvious what the resulting token might look like. --- m4/dpkg-build.m4 | 16 ++++++++-------- m4/dpkg-libs.m4 | 6 +++--- m4/dpkg-types.m4 | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4 index 51ec2731f..89ff8aa67 100644 --- a/m4/dpkg-build.m4 +++ b/m4/dpkg-build.m4 @@ -27,16 +27,16 @@ AC_DEFUN([DPKG_BUILD_PROG], [ AC_MSG_CHECKING([whether to build $1]) AC_ARG_ENABLE([$1], [AS_HELP_STRING([--disable-$1], [do not build or use $1])], - [build_]AS_TR_SH([$1])[=$enable_]AS_TR_SH([$1]), - [build_]AS_TR_SH([$1])[=yes]) - AM_CONDITIONAL([BUILD_]AS_TR_CPP([$1]), - [test "x$build_]AS_TR_SH([$1])[" = "xyes"]) - AS_IF([test "x$build_]AS_TR_SH([$1])[" = "xyes"], [ - AC_DEFINE([BUILD_]AS_TR_CPP([$1]), [1], [Define to 1 if $1 is compiled.]) + [AS_TR_SH([build_$1])=$AS_TR_SH([enable_$1])], + [AS_TR_SH([build_$1])=yes]) + AM_CONDITIONAL(AS_TR_CPP([BUILD_$1]), + [test "x$AS_TR_SH([build_$1])" = "xyes"]) + AS_IF([test "x$AS_TR_SH([build_$1])" = "xyes"], [ + AC_DEFINE(AS_TR_CPP([BUILD_$1]), [1], [Define to 1 if $1 is compiled.]) ], [ - AC_DEFINE([BUILD_]AS_TR_CPP([$1]), [0]) + AC_DEFINE(AS_TR_CPP([BUILD_$1]), [0]) ]) - AC_MSG_RESULT([$build_]AS_TR_SH([$1])) + AC_MSG_RESULT([$AS_TR_SH([build_$1])]) ])# DPKG_BUILD_PROG # DPKG_BUILD_DEVEL_DOCS() diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4 index a2402a5d9..6159199a7 100644 --- a/m4/dpkg-libs.m4 +++ b/m4/dpkg-libs.m4 @@ -36,7 +36,7 @@ AC_DEFUN([DPKG_LIB_MD], [ # ------------------------------------------------- # Check for availability of a compression library. AC_DEFUN([DPKG_WITH_COMPRESS_LIB], [ - AC_ARG_VAR(AS_TR_CPP($1)[_LIBS], [linker flags for $1 library]) + AC_ARG_VAR(AS_TR_CPP([$1_LIBS]), [linker flags for $1 library]) AC_ARG_WITH([lib$1], [AS_HELP_STRING([--with-lib$1], [use $1 library for compression and decompression])], @@ -51,14 +51,14 @@ AC_DEFUN([DPKG_WITH_COMPRESS_LIB], [ AS_IF([test "x$with_lib$1" != "xno"], [ AS_IF([test "x$have_lib$1" = "xyes"], [ - AC_DEFINE([WITH_LIB]AS_TR_CPP($1), 1, + AC_DEFINE(AS_TR_CPP([WITH_LIB$1]), 1, [Define to 1 to use $1 library rather than console tool]) AS_IF([test "x$with_lib$1" = "xstatic"], [ dpkg_$1_libs="-Wl,-Bstatic -l$1 -Wl,-Bdynamic" ], [ dpkg_$1_libs="-l$1" ]) - AS_TR_CPP($1)_LIBS="${AS_TR_CPP($1)_LIBS:+$AS_TR_CPP($1)_LIBS }$dpkg_$1_libs" + AS_TR_CPP([$1_LIBS])="${AS_TR_CPP([$1_LIBS]):+$AS_TR_CPP([$1_LIBS]) }$dpkg_$1_libs" ], [ AS_IF([test "x$with_lib$1" != "xcheck"], [ AC_MSG_FAILURE([lib$1 library or header not found]) diff --git a/m4/dpkg-types.m4 b/m4/dpkg-types.m4 index f6553112f..a17a34568 100644 --- a/m4/dpkg-types.m4 +++ b/m4/dpkg-types.m4 @@ -46,7 +46,7 @@ AC_DEFUN([DPKG_DECL_SYS_ERRLIST], [ # Define HAVE_DECL to 1 if declared in HEADER AC_DEFUN([DPKG_CHECK_DECL], [ AC_CHECK_DECL([$1], [ - AC_DEFINE([HAVE_]AS_TR_CPP($1), [1], + AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if ']$1[' is declared in <$2>]) ], [], [[#include <$2>]]) ])# DPKG_CHECK_DECL -- Dpkg.Org's dpkg