cmake: Match AC_DEFINE more precisely, respecting [] quoting
authorSimon McVittie <smcv@collabora.com>
Tue, 25 Jul 2017 12:37:52 +0000 (13:37 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 7 Feb 2018 07:34:35 +0000 (07:34 +0000)
commit97d480c09c66ad7860f6c0e0a3d56fdf3a0d56a8
tree04c4445e607b76cbdf30b8e458039aae7cc3ff4e
parentd4d6cdab994f99d4e9613a1ee0c8ec6bebec3f1c
cmake: Match AC_DEFINE more precisely, respecting [] quoting

The regular expression previously used here to select the second
comma-delimited argument won't work when we introduce an argument
containing a comma, which I need to do now. We can address this by
recognising Autoconf's quoting mechanism (which uses square
brackets).

This is not 100% right (it doesn't understand nested square brackets),
but it's good enough in practice.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Acked-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354
(cherry picked from commit 83b439f7b4c6a946e0fe9a0287910ba4f6318143)
cmake/modules/MacrosAutotools.cmake
configure.ac