libhttpserver
libhttpserver copied to clipboard
Some build suggestions
Good day, @etr !
Thanks for your work! I would use libhttpserver
in my ARM-uClibc-Linux embedded system.
I haven't used the library yet but I have been compiled it. And I have some suggestions and notes.
- [x] 1. Your last released Git tag is
v0.7.1
(on 21 Mar 2014). Release new tags, please because of0.8.0
version is pointed in docs. - [x] 2. Suggestion: to introduce
--disable-doc
flag as a shortcut for--disable-doxygen-doc --disable-doxygen-dot --disable-doxygen-man --disable-doxygen-html
flags collection. - [x] 3. Suggestion: to introduce
--disable-examples
flag to disable examples compilation. - [x] 4. Suggestion: to introduce
--disable-tests
(and--disable-unit-tests
,--disable-integ-tests
?) flag to disable tests compilation. - [x] 5. You use
PKG_CHECK_MODULES
autoconf
's macros and-lmicrohttpd
linker's flag forlibmicrohttpd
using. But what if I want to use a static version oflibmicrohttpd
library or its source code instead? - [ ] 6.
libmicrohttpd
library can be compiled without some features. dauth and bauth is just examples. But your library reference to these functions in code. I think we should use conditional compilation (and configuration flag) instead. It's some lines of code for dauth and bauth only. -
7.
./configure
checks C++11 but it seems thatUSE_CPP_11
flag isn't used.
I would appreciate an answer for each of them. Thanks very much.
- Definitely right - I am working on a refactor of some of the api. A new tag will come out pretty soon then. 2),3),4) Good Ideas. I like in general the approach to allow people to disable features from compilation that they are not interested into.
- The current version comes from my habit of dynamic link everything I build - get the point that it might be useful to be able to compile the lib against static libmicrohttpd versions or source code.
- As per the compilation options, I believe that people should not pay for features they do not want to use - so I think this is a good idea.
This said, my current priority for the library (and what I am spending my time on) is to improve the readability of the code, eliminating some over-complicated code and simplifying logical branches and secondary to improve the test coverage.
All you suggested seems really useful though - would you be happy to implement it?
- The problem is not to pay for features. The problem is: I have
undefined reference
errors and can't compilelibhttpserver
at all iflibmicrohttpd
has been compiled using--disable-bauth
or--disable-dauth
. Note: I has been switched to static linking oflibmicrohttpd
in makefile manually.
@etr , thanks for the replies! Some things are 'really useful' but needless for my project (well I really can write four flags instead of one :smile: ). Sure I would be happy to implement this (and other) but if you will discuss and merge.
I will be more than happy to discuss and merge :)
- The problem is not to pay for features. The problem is: I have
undefined reference
errors and can't compilelibhttpserver
at all iflibmicrohttpd
has been compiled using--disable-bauth
or--disable-dauth
. Note: I has been switched to static linking oflibmicrohttpd
in makefile manually.
Looks like I rediscovered that problem years later and reported it with #232? 😄