SHARE
TWEET

Build libmicrohttpd on Windows - full HTTP(S), msgs, auth.

silvioprog Jun 12th, 2016 (edited) 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :: Script for building libmicrohttpd on Windows (HTTPS, messages, auth etc., full HTTP(S) server)
  2. ::
  3. :: Authors: silvioprog and karlson2k
  4. ::
  5. :: Topic: http://lists.gnu.org/archive/html/libmicrohttpd/2016-06/msg00023.html
  6.  
  7. :: Get and install MinGW-w64: http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-i686-20150916.exe
  8.  
  9. :: Open the Command Prompt:
  10. cd C:\msys32 & mingw32_shell.bat
  11.  
  12. :: Installing tools:
  13. pacman -S mingw-w64-i686-gcc make wget tar mingw-w64-i686-curl mingw-w64-i686-libgcrypt mingw-w64-i686-gnutls
  14.  
  15. :: Downloading MHD and upacking MHD ...
  16. cd ~ && wget -c http://ftpmirror.gnu.org/libmicrohttpd/libmicrohttpd-0.9.50.tar.gz && tar -zxvf libmicrohttpd-0.9.50.tar.gz
  17.  
  18. :: Configuring MHD build:
  19. mkdir build && cd build && ../libmicrohttpd-0.9.50/configure CFLAGS='-Os -s'
  20. :: You will see a report like:
  21. :: ...
  22. :: configure: libmicrohttpd 0.9.50 Configuration Summary:
  23. ::   Cross-compiling:   no
  24. ::   Operating System:  mingw32
  25. ::   Threading lib:     w32
  26. ::   libcurl (testing): yes
  27. ::   Target directory:  /usr/local
  28. ::   Messages:          yes
  29. ::   Basic auth.:       yes
  30. ::   Digest auth.:      yes
  31. ::   Postproc:          yes
  32. ::   HTTPS support:     yes (using libgnutls and libgcrypt)
  33. ::   poll support:      no
  34. ::   epoll support:     no
  35. ::   build docs:        yes
  36. ::   build examples:    yes
  37. ::
  38. :: configure: HTTPS subsystem configuration:
  39. ::   License         :  LGPL only
  40.  
  41. :: Making and installing MHD:
  42. make && make install-strip
  43.  
  44. :: Finally, get compiled shared library at "C:\msys32\usr\local\bin\" and enjoy it! :-)
  45.  
  46. :: If you want to rebuild MHD, do:
  47. ::
  48. :: make clean
  49. :: ./configure CFLAGS='-Os -s'
  50. :: make -j $NUMBER_OF_PROCESSORS
  51. :: make install-strip
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top