Re: tcc 0.9.28rc testing: bug in autoconf 2.71 with AC_CHECK_DEFINE

Detlef Riekenberg <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.general,gmane.comp.compilers.tinycc.devel,gmane.comp.compilers.tinycc.devel
Message-ID <trinity-28eab9b9-6795-4cc9-8d24-76b098bdac05-1695860354524@3c-app-webde-bap07>
Thanks Nick and Peter for your analysis.

Yes, the "AC_" prefix fooled me, that AC_CHECK_DEFINE belongs to autoconf.


> On 2023-09-23, Nick Bowler <[email protected]> wrote:
> > On 2023-09-23, Detlef Riekenberg <[email protected]> wrote:
> >> AC_CHECK_DEFINE(__unix, CFLAGS="-DFOUND__unix $CFLAGS")
> >> AC_CHECK_DEFINE(__unix__, CFLAGS="-DFOUND__unix__ $CFLAGS")
> >> AC_CHECK_DEFINE(__linux__, CFLAGS="-DFOUND__linux__ $CFLAGS")
> [...]
> > So it sounds like there must be some third party code involved which
> > is defining this macro (and this code is defining macros in the AC_*
> > namespace to make it look like it came from Autoconf when in fact it
> > did not).

I can confirm, that i have the "autoconf-archive" package insalled.
The installed "/usr/share/aclocal/ax_check_define.m4"
contains AC_CHECK_DEFINE and AX_CHECK_DEFINE

> Just to add, you don't need any third party macros to check for typical
> C predefined macros including __unix, etc.  I would write such checks
> something like this (untested):
>
>   AC_COMPUTE_INT([unix_val], [__unix], [@&t@], [unix_val=0])
>   AS_IF([test $unix_val -ne 0],
>     [put code here to run when __unix is defined and is non-zero])

Learned something new. Thanks
The magic "[@&t@]" is really strange.

> Hope that helps,

Sure.
Thanks


--
Regards ... Detlef
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.