This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libgfortran,patch] C99 complex cleanup


>> AC_CHECK_LIB([m],[clogf],[AC_DEFINE([HAVE_CLOGF],[1],[libm includes clogf])])
>
> Either configure needs to explicitly test for __clog or the
> configure tests for complex functionality needs to include the complex.h
> header file.

It's even more subtle than that: AC_CHECK_LIB does only check the
presence of the symbol in the lib, by trying to link a small program
like:

char clog (void); int main (void) { char x = clog(); return 0; }

So, not only should the test include complex.h, but it would need to
be provided the correct prototype for each function checked. I don't
think that's really possible...

Perhaps the good solution would be to use AC_CHECK_FUNC. Can someone
who knows autoconf stuff tell us if it would be fine here?

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]