libhttpserver icon indicating copy to clipboard operation
libhttpserver copied to clipboard

Some build suggestions

Open kuraga opened this issue 9 years ago • 5 comments

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 of 0.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 for libmicrohttpd using. But what if I want to use a static version of libmicrohttpd 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 that USE_CPP_11 flag isn't used.

I would appreciate an answer for each of them. Thanks very much.

kuraga avatar Jan 30 '15 09:01 kuraga

  1. 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.
  2. 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.
  3. 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?

etr avatar Feb 01 '15 23:02 etr

  1. The problem is not to pay for features. The problem is: I have undefined reference errors and can't compile libhttpserver at all if libmicrohttpd has been compiled using --disable-bauth or --disable-dauth. Note: I has been switched to static linking of libmicrohttpd in makefile manually.

kuraga avatar Feb 02 '15 06:02 kuraga

@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.

kuraga avatar Feb 02 '15 06:02 kuraga

I will be more than happy to discuss and merge :)

etr avatar Feb 03 '15 01:02 etr

  1. The problem is not to pay for features. The problem is: I have undefined reference errors and can't compile libhttpserver at all if libmicrohttpd has been compiled using --disable-bauth or --disable-dauth. Note: I has been switched to static linking of libmicrohttpd in makefile manually.

Looks like I rediscovered that problem years later and reported it with #232? 😄

LeSpocky avatar Jan 19 '22 17:01 LeSpocky