libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Access configure options from within libmicrohttpd


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Access configure options from within libmicrohttpd
Date: Tue, 8 Feb 2011 14:22:10 +0100
User-agent: KMail/1.13.5 (Linux/2.6.32-trunk-vserver-amd64; KDE/4.4.5; x86_64; ; )

On Monday 07 February 2011 14:48:28 Michael Wiegand wrote:
> Hello,
> 
> I am one of the authors of the Greenbone Security Assistant (GSA) module of
> the Open Vulnerability Assessment System (OpenVAS) which relies heavily on
> libmicrohttpd. I finally subscribed to this list and would like to thank
> Christian and all other contributors for this very useful and ever
> improving library! :)
> 
> Now to my question: Is it possible to access the options the library has
> been configured with from within libmicrohttpd? In my case, I would like
> to know if MHD was compiled with messages enabled or not.

Short answer: no.  


Medium answer: *unless* you are on an embedded platform where space is 
critical and someone who really, really cares about code size and knows 
exactly what is necessary (for the entire system), it should be safe to assume 
that everything is on (in terms of --enable-messages,dauth,etc.).  At least, 
that's the basic assumption MHD makes for library versioning (binary 
compatibility) and the only sane choice for packagers for generic 
distributions. 

The one exception to this rule is HTTPS support (which may simply be off 
because libgcrypt was not available at configure time).  HTTPS support can be 
queried simply by trying to start an HTTPS daemon and getting NULL back.


Long answer: you can find out by being tricky (& ugly & not recommended); for 
example, you can install an external logger and trigger one of the code paths 
that would log an error message.  For features like dauth, you could try 
'dlsym' and check if the symbol resolves.  I'm sure you can find other ugly 
hacks to test for almost anything, but please don't do that ;-).


I hope this helps!


Happy hacking!

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]