bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more m4 quoting


From: Simon Josefsson
Subject: Re: more m4 quoting
Date: Thu, 15 Jan 2009 11:39:38 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

Jim Meyering <address@hidden> writes:

>>  AC_DEFUN([_AC_LANG_OPENMP],
>> -[_AC_LANG_DISPATCH([$0], [_AC_LANG], address@hidden)])
>> +[_AC_LANG_DISPATCH([$0], _AC_LANG, address@hidden)])
>
> This one makes sense.
> It fails on etch because it has autoconf < 2.62,
> so the otherwise if'd out definition in openmp.m4 is used.
> The tests passed for me because I used 2.63+, and then it
> uses the definition of AC_OPENMP from autoconf.

Ok.

>>  # _AC_LANG_OPENMP(C)
>>  # ------------------
>> -m4_define([_AC_LANG_OPENMP([C])],
>> +m4_define([_AC_LANG_OPENMP(C)],
>
> Is this change really necessary?

Yes, otherwise I get:

address@hidden:~$ gnulib-tool --test --with-tests openmp
Module list with included dependencies:
  openmp
File list:
  lib/dummy.c
  m4/gnulib-common.m4
  m4/onceonly.m4
  m4/openmp.m4
executing aclocal -I glm4
configure.ac:101: error: _AC_LANG_OPENMP: unknown language: C
glm4/openmp.m4:11: _AC_LANG_OPENMP is expanded from...
../../lib/autoconf/lang.m4:217: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2405: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:516: AS_IF is expanded from...
../../lib/autoconf/general.m4:1898: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1911: AC_CACHE_CHECK is expanded from...
glm4/openmp.m4:11: AC_OPENMP is expanded from...
configure.ac:27: gl_INIT is expanded from...
configure.ac:101: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
address@hidden:~$ 

>>  [
>>  #ifndef _OPENMP
>>   choke me
>> @@ -30,7 +30,7 @@ int main () { return omp_get_num_threads (); }
>>
>>  # _AC_LANG_OPENMP(C++)
>>  # --------------------
>> -m4_copy([_AC_LANG_OPENMP([C])], [_AC_LANG_OPENMP([C++])])
>> +m4_copy([_AC_LANG_OPENMP(C)], [_AC_LANG_OPENMP([C++])])
>
> And this?

Without it I get:

address@hidden:~$ gnulib-tool --test --with-tests openmp
Module list with included dependencies:
  openmp
File list:
  lib/dummy.c
  m4/gnulib-common.m4
  m4/onceonly.m4
  m4/openmp.m4
executing aclocal -I glm4
glm4/openmp.m4:11: error: m4_defn: undefined macro: _AC_LANG_OPENMP([C])
glm4/openmp.m4:11: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
address@hidden:~$ 

> If "C" must not be quoted, then shouldn't the quotes
> around "C++" be dropped, too?

I suppose, but I cannot trigger a problem.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]