Re: autoconf-2.69c released [beta]

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

 



On Sun, Sep 27, 2020 at 01:56:06PM -0500, Bob Friesenhahn wrote:
> On Sun, 27 Sep 2020, Gavin Smith wrote:
> > 
> > It might help if you could post what the AC_TRY_COMPILE statements were
> > changed into.  If I understand correctly the definition in
> > autoconf/general.m4
> 
> That would certainly help and it is perhaps likely that there is some syntax
> weakness in the original.  See below.
> 
> Since the problem also occurs with Autoconf 2.69 autoupdate, that is what I
> use for the test case.
> 
> Input:
> 
> # Test for C compiler __func__ support
> if test "$ac_cv_have_C__func__" != 'yes' ; then
> AC_CACHE_CHECK(for C compiler __func__ support, ac_cv_have_C__func__,
> [AC_TRY_COMPILE(
> ,
> changequote(<<, >>)dnl
> <<
> const char *func=__func__;
> return (func != 0 ? 0 : 1);
> > > ,

For some reason there is an extra space in your email but I replicated 
the problem by deleting the space.

> changequote([, ])dnl
> ac_cv_have_C__func__='yes',
> ac_cv_have_C__func__='no')])
> 
> if test "$ac_cv_have_C__func__" = 'yes' ; then
>  AC_DEFINE(HAS_C__func__,1,Define if C compiler supports __func__)
> fi
> fi
> 
> After Autoconf 2.69 autoupdate:
> 
> # Test for C compiler __func__ support
> if test "$ac_cv_have_C__func__" != 'yes' ; then
> AC_CACHE_CHECK(for C compiler __func__ support, ac_cv_have_C__func__,
> [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[changequote(<<, >>)dnl
> <<
> const char *func=__func__;
> return (func != 0 ? 0 : 1);
> > > ]])],[changequote(, )dnl
> ac_cv_have_C__func__='yes'],[ac_cv_have_C__func__='no'])])
> 
> if test "$ac_cv_have_C__func__" = 'yes' ; then
>  AC_DEFINE(HAS_C__func__,1,Define if C compiler supports __func__)
> fi
> fi

Maybe it is a problem with changequote being used inside an argument to 
a macro.  Does it work OK when you remove the changequote lines?

if test "$ac_cv_have_C__func__" != 'yes' ; then
AC_CACHE_CHECK(for C compiler __func__ support, ac_cv_have_C__func__,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
<<
const char *func=__func__;
return (func != 0 ? 0 : 1);
>> ]])],
[ac_cv_have_C__func__='yes'],
[ac_cv_have_C__func__='no']])])

if test "$ac_cv_have_C__func__" = 'yes' ; then
 AC_DEFINE(HAS_C__func__,1,Define if C compiler supports __func__)
fi
fi


Perhaps you could revert autoupdate's changes, try removing the 
changequote lines, check that the script still works, and then try 
autoupdate again and see if you have better results.




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux