Advertisement
silvioprog

Build libmicrohttpd on Windows - no HTTPS, messages, auth.

Jun 12th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.78 KB | None | 0 0
  1. :: Script for building libmicrohttpd on Windows (no HTTPS, messages, auth etc., just HTTP 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
  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 --disable-doc --disable-examples --disable-messages --enable-https=no --disable-bauth --disable-dauth --disable-curl 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): no, many unit tests will not run
  27. ::   Target directory:  /usr/local
  28. ::   Messages:          no
  29. ::   Basic auth.:       no
  30. ::   Digest auth.:      no
  31. ::   Postproc:          yes
  32. ::   HTTPS support:     no (disabled)
  33. ::   poll support:      no
  34. ::   epoll support:     no
  35. ::   build docs:        no
  36. ::   build examples:    no
  37.  
  38. :: Making and installing MHD:
  39. make && make install-strip
  40.  
  41. :: Finally, get compiled shared library at "C:\msys32\usr\local\bin\" and enjoy it! :-)
  42.  
  43. :: If you want to rebuild MHD:
  44. ::
  45. :: make clean
  46. :: ./configure --disable-doc --disable-examples --disable-messages --enable-https=no --disable-bauth --disable-dauth --disable-curl CFLAGS='-Os -s'
  47. :: make -j $NUMBER_OF_PROCESSORS
  48. :: make install-strip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement