configure: two levels of quoting needed with AC_CONFIG_COMMANDS.

So it seems that [[]] are needed to quote the command part of
AC_CONFIG_COMMANDS(), in particular when square brackets are used inside
the command (which is our case since we used sed with regex classes []).
It is not even in the docs of AC_CONFIG_COMMANDS() but I found this
information in the docs of the deprecated AC_OUTPUT_COMMANDS()!
https://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fOUTPUT_005fCOMMANDS-2135

> Conversely, where one level of quoting was enough for literal strings
> with AC_OUTPUT_COMMANDS, you need two with AC_CONFIG_COMMANDS. The
> following lines are equivalent:
>    AC_OUTPUT_COMMANDS([echo "Square brackets: []"])
>    AC_CONFIG_COMMANDS([default], [[echo "Square brackets: []"]])
This commit is contained in:
Jehan 2017-12-28 16:16:24 +01:00
parent bccaf39dc9
commit c99ac02d34
1 changed files with 2 additions and 2 deletions

View File

@ -2702,7 +2702,7 @@ m4_define([generate_po_makefile], [
AC_MSG_NOTICE([Generating POTFILES and Makefile for $1])
AC_CONFIG_COMMANDS([$1/stamp-it],
[
[[
if ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ; then
as_fn_error $? "$1/Makefile.in.in was not created by intltoolize." "$LINENO" 5
fi
@ -2716,7 +2716,7 @@ m4_define([generate_po_makefile], [
-e "d" -e "}" \
"$1/Makefile.in" >"$1/Makefile" && \
touch "$1/stamp-it"
])
]])
])
generate_po_makefile([po-libgimp])