[ccan] Using ccan with a C python extension

Rusty Russell rusty at rustcorp.com.au
Tue Jun 23 21:56:20 AEST 2015


Naveen Nathan <naveen at lastninja.net> writes:
>> >         I think you should use autoconf, as it's the standard.  I keep
>> > hoping someone will write the autotools stuff for CCAN for me :)
>
> Yep, autotools for ccan makes sense, certainly a lot easier to work with
> than the current ad-hoc configure program which also needs compilation.
> I want to explore this option further.

It would be possible to make the current config.h use #ifdef tests for
most things.  The problem is that it would only work on Linux + glibc,
since I don't test on anything else.

And even that's problematic.  For GCC defines it's easy.  For glibc
detection, you need to include <features.h>.  But you need to know if
that exists first.  Though uclibc on linux seems to have it, so maybe
testing __linux would work...

If I had an active community on different platforms, we could have fun
trying to create the ultimate config.h.  But without that I fear we'd
end up less portable than the current "try it" approach of configurator,
and then have even fewer non-Linux users :(

IOW, please send autoconf macros to create config.h.  You can skip
CCAN_COMPILER and CCAN_CFLAGS: they're hacks for ccanlint which should
die.

Thanks,
Rusty.


More information about the ccan mailing list