Attached are the code contributions I mentioned in prior postings. These include:
1. a diff that modifies your configure.in, including updates for autoconf 2.68 plus extended options that are really helpful for folks like us that build our code against yours.
2. a .m4 file that checks compiler attribute support in general, and then specifically for visibility
3. a .m4 file that checks for a new --enable-visibility option, ensures the compiler can support it, and does all the good things if it does.
Feel free to use/abuse in any way you like - these are just freely offered to you folks in gratitude for all you do.
Ralph
Configure diff
Thanks again; tagging this for 2.1
Whoa, this is big. It does a lot of things, some good and some unsuitable for inclusion in a general libevent. Let me break it down:
* It requires autoconf 2.64 where previously we worked with 2.59. Not sure how this is a win; what does it buy us?
* It switches from AC_TRY_COMPILE to AC_COMPILE_IFELSE and AC_LANG_PROGRAM. Yes, good idea.
* It adds AC_LANG([C]). Yes, good idea.
* It adds more quoting to AC_COMPILE_IFELSE+AC_LANG_PROGRAM. Yes, that's probably smart.
* It adds --disable-X arguments to disable evdns, evhttp, evrpc, and most of the backends. That's a good idea, though I'd like to rename some of the arguments. In particular, I'd prefer each of the backend ones to be --disable-X-backend rather than just --disable-X. I don't see the point of disabling evhttp and evdns and rpc: If you don't want those, why not just link against libevent_core?
* It uses AS_IF in a few places; I'd better check out what that does.
* It switches to use AM_SILENT_RULES where available. I don't see the point here, honestly.
* It disables poll on osx; not sure why that's needed; it passes all the unit tests for me on my laptop.
* It disables kqueue on older OSX for the crime of not supporting ptys. There's no way I'm merging that: should every application that uses libevent only for sockets get slower on OSX because of the missing pty support that they never actually wanted? This should get folded into a feature-check at event_base creation time.
* It uses a more complicated check for epoll, to work around some header and compiler issues. Some of this looks smart; must investigate further.
Also, I think there might be a Makefile.am diff missing here?
The new m4 files add checks for __attribute__ behavior and for -fvisibility stuff, but I can't see how they're actually getting used in the configure.in
As it stands, I think my likeliest course is to merge the stuff that looks like clearly a good idea above, then to back off on the other stuff unless somebody can explain it to me.