On 7 August 2017 at 17:21, Reuben Thomas <r...@sc3d.org> wrote:

> On 7 August 2017 at 17:16, Reuben Thomas <r...@sc3d.org> wrote:
>
>> On 7 August 2017 at 17:11, Reuben Thomas <r...@sc3d.org> wrote:
>>
>>> On 7 August 2017 at 16:42, Bruno Haible <br...@clisp.org> wrote:
>>>
>>>>
>>>> > Currently in my configure.ac, I have:
>>>> >
>>>> >   AC_LANG_PUSH([C++])
>>>> >   gl_MANYWARN_ALL_GCC([cxx_warnings])
>>>> >
>>>> >   dnl Enable all G++ warnings not in this list.
>>>> >   gl_MANYWARN_COMPLEMENT([cxx_warnings], [$cxx_warnings], [$nw])
>>>> >   for w in $cxx_warnings; do
>>>> >     gl_WARN_ADD([$w])
>>>> >   done
>>>> >   AC_LANG_POP
>>>> >
>>>> > which seems to work.
>>>>
>>>> Yes, this is how the multi-language facilities are supposed to be used.
>>>>
>>>
>>> ​OK, now that some of the code is in a new file, I get:
>>>
>>> configure.ac:90: error: gl_MANYWARN_ALL_GCC: unknown language: C++
>>> m4/manywarnings.m4:38: gl_MANYWARN_ALL_GCC is expanded from...
>>> configure.ac:90: the top level
>>>
>>> Line 90 is the call of gl_MANYWARN_ALL_GCC in the code extract above.​
>>>
>>
>> ​many​warnings-c++.m4 is not referenced in aclocal.m4, though it has been
>> symlinked into the project's m4 directory by bootstrap.
>>
> ​
> Is this because aclocal finds gl_MANYWARN_ALL_GCC defined in
> manywarnings.m4, so doesn't bother looking in manywarnings-c++.m4
> ​.
>

​So as a workaround, I tried replacing the line

gl_MANYWARN_ALL_GCC([cxx_warnings])

by

m4_indir([gl_MANYWARN_ALL_GCC(C++)], [cxx_warnings])

​but now I get a straightforward error from aclocal:​

/usr/bin/m4:configure.ac:90: undefined macro `gl_MANYWARN_ALL_GCC(C++)'

​I guess because aclocal doesn't scan for macros called via m4_indir??​

-- 
https://rrt.sc3d.org <http://rrt.sc3d.org>

Reply via email to