gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (b1b3301a -> 5368cd9c)


From: gnunet
Subject: [libmicrohttpd] branch master updated (b1b3301a -> 5368cd9c)
Date: Thu, 06 Jan 2022 17:07:23 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from b1b3301a Additional doxy corrections.
     new 5e90bb92 doc/Makefile: added phony target to force update timestamp
     new 510f7991 Configure: do not define unused var in Makefiles
     new 3dc7d585 automake: use right automake options
     new acbe5098 Removed unused config.rpath from the root directory
     new a95b0941 doc/Makefile: reordered targets and dependencies
     new 1413f6ed doc/Makefile: fixed *-local rules
     new 2ebde2cb Removed unused acinclude.m4
     new a50dd9cc Makefile: added trick to use pre-dist-hook
     new ab82bab0 root/.gitignore: cleanup
     new fc9824a7 root/.gitignore: updated
     new 895542a1 Makefile: added force update of doc version stamps before 
'dist' target
     new cbd62cc2 Autotools refactoring: better follow GNU coding standards
     new 88b7523e Fixed compiler warning in examples
     new 5368cd9c Doxygen: changed description of make targets

The 14 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                     |  12 +-
 Makefile.am                    |  21 +-
 acinclude.m4                   |   1 -
 config.rpath                   | 690 -----------------------------------------
 configure.ac                   | 203 ++++++------
 doc/Makefile.am                |  27 +-
 doc/doxygen/Makefile.am        |   2 +-
 doc/examples/Makefile.am       |   7 +-
 doc/examples/sessions.c        |   4 +-
 src/examples/Makefile.am       |   5 +-
 src/microhttpd/Makefile.am     |   6 +-
 src/testcurl/Makefile.am       |  19 +-
 src/testcurl/https/Makefile.am |  21 +-
 src/testzzuf/Makefile.am       |  56 +---
 14 files changed, 193 insertions(+), 881 deletions(-)
 delete mode 100644 acinclude.m4
 delete mode 100755 config.rpath

diff --git a/.gitignore b/.gitignore
index f6c2a684..06d52d4a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@ Makefile.in
 Makefile
 .deps
 .libs
-config.rpath
 /test-driver
 /INSTALL
 /libmicrohttpd.pc
@@ -22,6 +21,7 @@ config.rpath
 /build-aux/mdate-sh
 /build-aux/test-driver
 /build-aux/config.guess
+/build-aux/config.rpath
 /build-aux/compile
 /build-aux/missing
 /exclude
@@ -29,24 +29,15 @@ config.rpath
 /scripts
 /keys
 /doc.tmp
-/config.h
 /.project
-/config.guess
 /.cproject
 /.tgitconfig
 /configure
 /libtool
-/install-sh
 /aclocal.m4
-/missing
-/config.sub
 /config.status
-/compile
 /stamp-h1
 /.pydevproject
-/config.h.in
-/ltmain.sh
-/depcomp
 /.autotools
 /.vscode
 /.settings
@@ -64,3 +55,4 @@ uncrustify.cfg
 **.t2d
 src/microhttpd_ws/test_websocket
 .texlipse
+/po/remove-potcdate.sed
diff --git a/Makefile.am b/Makefile.am
index bf4e422c..72c8b864 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,9 +42,26 @@ W32VSAV = w32/VS-Any-Version/libmicrohttpd.vcxproj 
w32/VS-Any-Version/libmicroht
   w32/VS-Any-Version/libmicrohttpd.sln
 
 EXTRA_DIST = \
-  acinclude.m4 \
   libmicrohttpd.pc.in \
-  $(W32COMMON) $(W32VS2013) $(W32VS2015) $(W32VS2017) $(W32VS2019) 
$(W32VS2022) $(W32VSAV)
+  $(W32COMMON) $(W32VS2013) $(W32VS2015) $(W32VS2017) \
+  $(W32VS2019) $(W32VS2022) $(W32VSAV)
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libmicrohttpd.pc
+
+EXTRA_DIST += pre-dist-hook-dummy
+MOSTLYCLEANFILES = pre-dist-hook-dummy
+
+pre-dist-hook-dummy: pre-dist-hook Makefile
+       @echo "dummy" > $@
+
+dist-hook:
+       @chmod u+w '$(distdir)/pre-dist-hook-dummy' && \
+         rm -f '$(distdir)/pre-dist-hook-dummy'
+       @rm -f pre-dist-hook-dummy
+
+pre-dist-hook:
+       @echo "Preparing to make dist"
+       @$(am__cd) doc && $(MAKE) $(AM_MAKEFLAGS) update-stamp
+
+.PHONY: pre-dist-hook
\ No newline at end of file
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index 8b137891..00000000
--- a/acinclude.m4
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/config.rpath b/config.rpath
deleted file mode 100755
index c38b914d..00000000
--- a/config.rpath
+++ /dev/null
@@ -1,690 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-#   Copyright 1996-2013 Free Software Foundation, Inc.
-#   Taken from GNU libtool, 2001
-#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-#   This file is free software; the Free Software Foundation gives
-#   unlimited permission to copy and/or distribute it, with or without
-#   modifications, as long as this notice is preserved.
-#
-# The first argument passed to this file is the canonical host specification,
-#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-#   than 256 bytes, otherwise the compiler driver will dump core. The only
-#   known workaround is to choose shorter directory names for the build
-#   directory and/or the installation directory.
-
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's _LT_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
-  wl='-Wl,'
-else
-  case "$host_os" in
-    aix*)
-      wl='-Wl,'
-      ;;
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      ;;
-    hpux9* | hpux10* | hpux11*)
-      wl='-Wl,'
-      ;;
-    irix5* | irix6* | nonstopux*)
-      wl='-Wl,'
-      ;;
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
-      case $cc_basename in
-        ecc*)
-          wl='-Wl,'
-          ;;
-        icc* | ifort*)
-          wl='-Wl,'
-          ;;
-        lf95*)
-          wl='-Wl,'
-          ;;
-        nagfor*)
-          wl='-Wl,-Wl,,'
-          ;;
-        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-          wl='-Wl,'
-          ;;
-        ccc*)
-          wl='-Wl,'
-          ;;
-        xl* | bgxl* | bgf* | mpixl*)
-          wl='-Wl,'
-          ;;
-        como)
-          wl='-lopt='
-          ;;
-        *)
-          case `$CC -V 2>&1 | sed 5q` in
-            *Sun\ F* | *Sun*Fortran*)
-              wl=
-              ;;
-            *Sun\ C*)
-              wl='-Wl,'
-              ;;
-          esac
-          ;;
-      esac
-      ;;
-    newsos6)
-      ;;
-    *nto* | *qnx*)
-      ;;
-    osf3* | osf4* | osf5*)
-      wl='-Wl,'
-      ;;
-    rdos*)
-      ;;
-    solaris*)
-      case $cc_basename in
-        f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-          wl='-Qoption ld '
-          ;;
-        *)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
-    sunos4*)
-      wl='-Qoption ld '
-      ;;
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      wl='-Wl,'
-      ;;
-    sysv4*MP*)
-      ;;
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      wl='-Wl,'
-      ;;
-    unicos*)
-      wl='-Wl,'
-      ;;
-    uts4*)
-      ;;
-  esac
-fi
-
-# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # Set some defaults for GNU ld with shared library support. These
-  # are reset later if shared libraries are not supported. Putting them
-  # here allows them to be overridden if necessary.
-  # Unlike libtool, we use -rpath here, not --rpath, since the documented
-  # option of GNU ld is called -rpath, not --rpath.
-  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-  case "$host_os" in
-    aix[3-9]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-        ld_shlibs=no
-      fi
-      ;;
-    amigaos*)
-      case "$host_cpu" in
-        powerpc)
-          ;;
-        m68k)
-          hardcode_libdir_flag_spec='-L$libdir'
-          hardcode_minus_L=yes
-          ;;
-      esac
-      ;;
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    cygwin* | mingw* | pw32* | cegcc*)
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    haiku*)
-      ;;
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      ;;
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    netbsd*)
-      ;;
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-        ld_shlibs=no
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-          ld_shlibs=no
-          ;;
-        *)
-          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; 
then
-            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-rpath,$libdir`'
-          else
-            ld_shlibs=no
-          fi
-          ;;
-      esac
-      ;;
-    sunos4*)
-      hardcode_direct=yes
-      ;;
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-  esac
-  if test "$ld_shlibs" = no; then
-    hardcode_libdir_flag_spec=
-  fi
-else
-  case "$host_os" in
-    aix3*)
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes; then
-        # Neither direct hardcoding nor static linking is supported with a
-        # broken collect2.
-        hardcode_direct=unsupported
-      fi
-      ;;
-    aix[4-9]*)
-      if test "$host_cpu" = ia64; then
-        # On IA64, the linker does run time linking by default, so we don't
-        # have to do anything special.
-        aix_use_runtimelinking=no
-      else
-        aix_use_runtimelinking=no
-        # Test if we are trying to use run time linking or normal
-        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-        # need to do runtime linking.
-        case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-          for ld_flag in $LDFLAGS; do
-            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-              aix_use_runtimelinking=yes
-              break
-            fi
-          done
-          ;;
-        esac
-      fi
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      if test "$GCC" = yes; then
-        case $host_os in aix4.[012]|aix4.[012].*)
-          collect2name=`${CC} -print-prog-name=collect2`
-          if test -f "$collect2name" && \
-            strings "$collect2name" | grep resolve_lib_name >/dev/null
-          then
-            # We have reworked collect2
-            :
-          else
-            # We have old collect2
-            hardcode_direct=unsupported
-            hardcode_minus_L=yes
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_libdir_separator=
-          fi
-          ;;
-        esac
-      fi
-      # Begin _LT_AC_SYS_LIBPATH_AIX.
-      echo 'int main () { return 0; }' > conftest.c
-      ${CC} ${LDFLAGS} conftest.c -o conftest
-      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      if test -z "$aix_libpath"; then
-        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File 
Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      fi
-      if test -z "$aix_libpath"; then
-        aix_libpath="/usr/lib:/lib"
-      fi
-      rm -f conftest.c conftest
-      # End _LT_AC_SYS_LIBPATH_AIX.
-      if test "$aix_use_runtimelinking" = yes; then
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-      else
-        if test "$host_cpu" = ia64; then
-          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-        else
-          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        fi
-      fi
-      ;;
-    amigaos*)
-      case "$host_cpu" in
-        powerpc)
-          ;;
-        m68k)
-          hardcode_libdir_flag_spec='-L$libdir'
-          hardcode_minus_L=yes
-          ;;
-      esac
-      ;;
-    bsdi[45]*)
-      ;;
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      libext=lib
-      ;;
-    darwin* | rhapsody*)
-      hardcode_direct=no
-      if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; 
then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    dgux*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    freebsd2.2*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    freebsd2*)
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    freebsd* | dragonfly*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    hpux9*)
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      ;;
-    hpux10*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        hardcode_direct=yes
-        # hardcode_minus_L: Not really in the search PATH,
-        # but as the default location of the library.
-        hardcode_minus_L=yes
-      fi
-      ;;
-    hpux11*)
-      if test "$with_gnu_ld" = no; then
-        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator=:
-        case $host_cpu in
-          hppa*64*|ia64*)
-            hardcode_direct=no
-            ;;
-          *)
-            hardcode_direct=yes
-            # hardcode_minus_L: Not really in the search PATH,
-            # but as the default location of the library.
-            hardcode_minus_L=yes
-            ;;
-        esac
-      fi
-      ;;
-    irix5* | irix6* | nonstopux*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    netbsd*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    newsos6)
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    *nto* | *qnx*)
-      ;;
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-        hardcode_direct=yes
-        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test 
"$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-        else
-          case "$host_os" in
-            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-              hardcode_libdir_flag_spec='-R$libdir'
-              ;;
-            *)
-              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-              ;;
-          esac
-        fi
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      ;;
-    osf3*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    osf4* | osf5*)
-      if test "$GCC" = yes; then
-        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-        # Both cc and cxx compiler support -rpath directly
-        hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
-    solaris*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      ;;
-    sunos4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    sysv4)
-      case $host_vendor in
-        sni)
-          hardcode_direct=yes # is this really true???
-          ;;
-        siemens)
-          hardcode_direct=no
-          ;;
-        motorola)
-          hardcode_direct=no #Motorola manual says yes, but my tests say they 
lie
-          ;;
-      esac
-      ;;
-    sysv4.3*)
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-        ld_shlibs=yes
-      fi
-      ;;
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | 
sco3.2v5.0.[024]*)
-      ;;
-    sysv5* | sco3.2v5* | sco5v6*)
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo 
${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      ;;
-    uts4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    *)
-      ld_shlibs=no
-      ;;
-  esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec=      # the last element of library_names_spec in libtool.m4
-libname_spec='lib$name'
-case "$host_os" in
-  aix3*)
-    library_names_spec='$libname.a'
-    ;;
-  aix[4-9]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  amigaos*)
-    case "$host_cpu" in
-      powerpc*)
-        library_names_spec='$libname$shrext' ;;
-      m68k)
-        library_names_spec='$libname.a' ;;
-    esac
-    ;;
-  beos*)
-    library_names_spec='$libname$shrext'
-    ;;
-  bsdi[45]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  cygwin* | mingw* | pw32* | cegcc*)
-    shrext=.dll
-    library_names_spec='$libname.dll.a $libname.lib'
-    ;;
-  darwin* | rhapsody*)
-    shrext=.dylib
-    library_names_spec='$libname$shrext'
-    ;;
-  dgux*)
-    library_names_spec='$libname$shrext'
-    ;;
-  freebsd* | dragonfly*)
-    case "$host_os" in
-      freebsd[123]*)
-        library_names_spec='$libname$shrext$versuffix' ;;
-      *)
-        library_names_spec='$libname$shrext' ;;
-    esac
-    ;;
-  gnu*)
-    library_names_spec='$libname$shrext'
-    ;;
-  haiku*)
-    library_names_spec='$libname$shrext'
-    ;;
-  hpux9* | hpux10* | hpux11*)
-    case $host_cpu in
-      ia64*)
-        shrext=.so
-        ;;
-      hppa*64*)
-        shrext=.sl
-        ;;
-      *)
-        shrext=.sl
-        ;;
-    esac
-    library_names_spec='$libname$shrext'
-    ;;
-  interix[3-9]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  irix5* | irix6* | nonstopux*)
-    library_names_spec='$libname$shrext'
-    case "$host_os" in
-      irix5* | nonstopux*)
-        libsuff= shlibsuff=
-        ;;
-      *)
-        case $LD in
-          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
-          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 
shlibsuff=N32 ;;
-          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
-          *) libsuff= shlibsuff= ;;
-        esac
-        ;;
-    esac
-    ;;
-  linux*oldld* | linux*aout* | linux*coff*)
-    ;;
-  linux* | k*bsd*-gnu | kopensolaris*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  knetbsd*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  netbsd*)
-    library_names_spec='$libname$shrext'
-    ;;
-  newsos6)
-    library_names_spec='$libname$shrext'
-    ;;
-  *nto* | *qnx*)
-    library_names_spec='$libname$shrext'
-    ;;
-  openbsd*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  os2*)
-    libname_spec='$name'
-    shrext=.dll
-    library_names_spec='$libname.a'
-    ;;
-  osf3* | osf4* | osf5*)
-    library_names_spec='$libname$shrext'
-    ;;
-  rdos*)
-    ;;
-  solaris*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sunos4*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  sysv4 | sysv4.3*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv4*MP*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-    library_names_spec='$libname$shrext'
-    ;;
-  tpf*)
-    library_names_spec='$libname$shrext'
-    ;;
-  uts4*)
-    library_names_spec='$libname$shrext'
-    ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e 
"$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 
's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
diff --git a/configure.ac b/configure.ac
index 0d9ab850..c779667e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_PREREQ([2.64])
 LT_PREREQ([2.4.0])
 AC_INIT([GNU Libmicrohttpd],[0.9.75],[libmicrohttpd@gnu.org])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([silent-rules] [subdir-objects])
+AM_INIT_AUTOMAKE([gnu] [check-news] [filename-length-max=99] [tar-v7] 
[silent-rules] [subdir-objects])
 AC_CONFIG_HEADERS([MHD_config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -76,7 +76,17 @@ AC_PROG_CC
 AC_PROG_CC_STDC
   ]
 )
-MHD_SYS_EXT
+
+user_CFLAGS="$CFLAGS"
+user_LDFLAGS="$LDFLAGS"
+user_CPPFLAGS="$CPPFLAGS"
+
+CFLAGS_ac=""
+LDFLAGS_ac=""
+CPPFLAGS_ac=""
+
+MHD_SYS_EXT([CPPFLAGS_ac])
+CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
 LT_INIT([win32-dll])
 LT_LANG([Windows Resource])
 
@@ -183,10 +193,12 @@ AM_CONDITIONAL([HAVE_PO], [ test "$have_po" = yes ])
 AC_ARG_ENABLE([gcc-hardening],
    [AS_HELP_STRING([--enable-gcc-hardening], [enable compiler security 
checks])],
 [AS_IF([test x$enableval = xyes],[
-    CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 
-fstack-protector-all"
-    CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
-    CFLAGS="$CFLAGS --param ssp-buffer-size=1"
-    LDFLAGS="$LDFLAGS -pie"
+    CFLAGS_ac="${CFLAGS_ac} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 
-fstack-protector-all"
+    CFLAGS_ac="${CFLAGS_ac} -fwrapv -fPIE -Wstack-protector"
+    CFLAGS_ac="${CFLAGS_ac} --param ssp-buffer-size=1"
+    CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+    LDFLAGS_ac="${LDFLAGS_ac} -pie"
+    LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
  ])])
 
 # Linker hardening options
@@ -194,7 +206,8 @@ AC_ARG_ENABLE([gcc-hardening],
 AC_ARG_ENABLE([linker-hardening],
   [AS_HELP_STRING([--enable-linker-hardening], [enable linker security 
fixups])],
 [AS_IF([test x$enableval = xyes],
-   [LDFLAGS="$LDFLAGS -z relro -z now"])])
+   [LDFLAGS_ac="${LDFLAGS_ac} -z relro -z now"])])
+LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
 
 
 # Workaround for libgcrypt
@@ -316,9 +329,8 @@ AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]], 
[[:]],
 
 AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
   [
-   save_CFLAGS="$CFLAGS"
-   CFLAGS="$CFLAGS -Werror=attributes"
    AC_MSG_CHECKING([[whether -Werror=attributes actually works]])
+   CFLAGS="${CFLAGS_ac} ${user_CFLAGS} -Werror=attributes"
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
        [[__attribute__((non_existing_attrb_dummy)) int SimpleFunc(void) 
{return 3;}]], [[int r = SimpleFunc(); if (r) return r;]])],
      [
@@ -328,12 +340,11 @@ AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
        AC_MSG_RESULT([[yes]])
        errattr_CFLAGS="-Werror=attributes"
      ])
-   CFLAGS="$save_CFLAGS"
+   CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
   ],
                       [[errattr_CFLAGS=""]], [], [])
 AC_MSG_CHECKING([[for function inline keywords supported by $CC]])
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $errattr_CFLAGS"
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS} $errattr_CFLAGS"
 inln_prfx="none"
 # Prefer always inline functions
 for inln_prfx_chk in InlineWithAttr __forceinline inline __inline__ __inline 
_inline _Inline
@@ -382,7 +393,7 @@ AS_IF([[test "x$inln_prfx" != "xnone"]],
        AC_DEFINE([_MHD_static_inline],[static],[Define to prefix which will be 
used with MHD static inline functions.])
       ])
 AC_MSG_RESULT([[$inln_prfx]])
-CFLAGS="$save_CFLAGS"
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
 
 AC_CHECK_HEADERS([stdalign.h], [], [], [AC_INCLUDES_DEFAULT])
 AC_CACHE_CHECK([[for C11 'alignof()' support]], [[mhd_cv_c_alignof]],
@@ -433,7 +444,7 @@ AC_MSG_CHECKING([[for target host OS]])
 AS_CASE(["$host_os"],
  [*darwin* | *rhapsody* | *macosx*],
  [AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
-     CFLAGS="-no-cpp-precomp -fno-common $CFLAGS"
+     CFLAGS_ac="-no-cpp-precomp -fno-common $CFLAGS_ac"
      mhd_host_os='Darwin'
      AC_MSG_RESULT([[$mhd_host_os]])],
  [freebsd*],
@@ -456,13 +467,13 @@ AS_CASE(["$host_os"],
      AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno does not 
work])
      mhd_host_os='Solaris'
      AC_MSG_RESULT([[$mhd_host_os]])
-     AC_SEARCH_LIBS(gethostbyname, nsl)
-     AC_SEARCH_LIBS(socket, socket)],
+     AC_SEARCH_LIBS([gethostbyname], [nsl])
+     AC_SEARCH_LIBS([socket], [socket])],
   [*arm-linux*],
   [AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
      mhd_host_os='ARM Linux'
      AC_MSG_RESULT([[$mhd_host_os]])
-     CFLAGS="-fPIC -pipe $CFLAGS"],
+     CFLAGS_ac="-fPIC -pipe $CFLAGS_ac"],
   [*linux*],
   [AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
      mhd_host_os='Linux'
@@ -478,7 +489,7 @@ AS_CASE(["$host_os"],
      AC_DEFINE([WINDOWS],[1],[This is a Windows system])
      mhd_host_os='Windows/MinGW'
      AC_MSG_RESULT([[$mhd_host_os]])
-     LIBS="$LIBS -lws2_32"
+     LIBS="-lws2_32 ${LIBS}"
      AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([[Winsock2 
headers are required for W32]])], [AC_INCLUDES_DEFAULT])
      AC_CACHE_CHECK([for MS lib utility], [ac_cv_use_ms_lib_tool],
        [mslibcheck=`lib 2>&1`
@@ -654,7 +665,8 @@ choke me now;
      ], [
        mhd_w32_ver="Vista"
        mhd_w32_ver_msg="Vista (default, override by 
CPPFLAGS=-D_WIN32_WINNT=0xNNNN)"
-       CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600"
+       CPPFLAGS_ac="${CPPFLAGS_ac} -D_WIN32_WINNT=0x0600"
+       CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
        AC_MSG_CHECKING([[whether headers accept _WIN32_WINNT=0x0600]])
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_SDKDDKVER_H
@@ -711,13 +723,14 @@ int main(void)
     mhd_host_os="${mhd_host_os}-${mhd_cv_wctr_type}"
     AS_VAR_IF([mhd_cv_wctr_type], ["msvcrt"],
       [
-        AX_APPEND_COMPILE_FLAGS([-U__USE_MINGW_ANSI_STDIO 
-D__USE_MINGW_ANSI_STDIO=0], [CPPFLAGS])
+        # Use CFLAGS here to override user-supplied wrong CPPFLAGS. Durty 
trick, but choice is limited.
+        AX_APPEND_COMPILE_FLAGS([-U__USE_MINGW_ANSI_STDIO 
-D__USE_MINGW_ANSI_STDIO=0], [CFLAGS_ac])
         AC_SUBST([W32CRT], [MSVCRT])
       ], [AC_SUBST([W32CRT], [UCRT])]
     )
   ]
 )
-
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
 
 
 AC_ARG_WITH([threads],
@@ -743,9 +756,8 @@ AX_PTHREAD(
        AC_CACHE_CHECK([[whether pthread_sigmask(3) is available]],
          [[mhd_cv_func_pthread_sigmask]], [dnl
          save_LIBS="$LIBS"
-         save_CFLAGS="$CFLAGS"
          LIBS="$PTHREAD_LIBS $LIBS"
-         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+         CFLAGS="${CFLAGS_ac} ${PTHREAD_CFLAGS} ${user_CFLAGS}"
          AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
            [[
              sigset_t nset, oset;
@@ -755,7 +767,7 @@ AX_PTHREAD(
            ]])],
            
[[mhd_cv_func_pthread_sigmask="yes"]],[[mhd_cv_func_pthread_sigmask="no"]])
          LIBS="${save_LIBS}"
-         CFLAGS="${save_CFLAGS}"
+      CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
        ])
        AS_VAR_IF([mhd_cv_func_pthread_sigmask],["yes"],
          [AC_DEFINE([[HAVE_PTHREAD_SIGMASK]],[[1]],[Define to 1 if you have 
the pthread_sigmask(3) function.])])
@@ -827,9 +839,8 @@ AS_IF([test "x$enable_thread_names" != "xno" && test 
"x$USE_THREADS" = "xposix"]
   # Check for thread name function
   HAVE_THREAD_NAME_FUNC="no"
   SAVE_LIBS="$LIBS"
-  SAVE_CFLAGS="$CFLAGS"
   LIBS="$PTHREAD_LIBS $LIBS"
-  CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+  CFLAGS="${CFLAGS_ac} $PTHREAD_CFLAGS ${user_CFLAGS}"
   AC_CHECK_HEADERS([pthread_np.h],[],[],
     [
 AC_INCLUDES_DEFAULT
@@ -978,7 +989,7 @@ AC_INCLUDES_DEFAULT
     ])
 
   LIBS="$SAVE_LIBS"
-  CFLAGS="$SAVE_CFLAGS"
+  CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
 ])
 
 AS_IF([[test "x$enable_thread_names" != "xno"]],
@@ -1066,7 +1077,8 @@ AC_CHECK_FUNCS([writev])
 # use '-fno-strict-aliasing', but only if the compiler
 # and linker can take it
 AX_CHECK_LINK_FLAG([-fno-strict-aliasing],
-  [AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing])])
+  [AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing], [CFLAGS_ac])])
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
 
 AC_C_BIGENDIAN
 AC_C_VARARRAYS
@@ -1207,8 +1219,7 @@ fd = epoll_create1(EPOLL_CLOEXEC);]])],
 AC_CACHE_CHECK([for suported 'noreturn' keyword], [mhd_cv_decl_noreturn],
   [
     mhd_cv_decl_noreturn="none"
-    save_CFLAGS="${CFLAGS}"
-    CFLAGS="${CFLAGS} ${errattr_CFLAGS}"
+    CFLAGS="${CFLAGS_ac} ${user_CFLAGS} ${errattr_CFLAGS}"
     for decl_noret in '_Noreturn' '__attribute__((__noreturn__))' 
'__declspec(noreturn)'
     do
       AC_LINK_IFELSE([AC_LANG_SOURCE(
@@ -1238,7 +1249,7 @@ int main (int argc, char *const *argv)
       )
       AS_IF([test "x${mhd_cv_decl_noreturn}" != "xnone"], [break])
     done
-    CFLAGS="${save_CFLAGS}"
+   CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
   ]
 )
 AS_VAR_IF([mhd_cv_decl_noreturn], ["none"],
@@ -1975,7 +1986,7 @@ AS_CASE(["$host"],
                                        [defines how to decorate public symbols 
while building])
                             HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])])
    ])
-AC_SUBST(HIDDEN_VISIBILITY_CFLAGS)
+AC_SUBST([HIDDEN_VISIBILITY_CFLAGS])
 
 # libcurl (required for testing)
 AC_ARG_ENABLE([curl],
@@ -2002,7 +2013,7 @@ AM_CONDITIONAL([HAVE_CURL], [test "x$enable_curl" = 
"xyes"])
 
 mhd_have_libmagic="no"
 SAVE_LIBS="$LIBS"
-LIBS="$LIBS -lmagic"
+LIBS="-lmagic $LIBS"
 AC_MSG_CHECKING([[for suitable libmagic]])
 AC_LINK_IFELSE(
   [AC_LANG_PROGRAM(
@@ -2172,7 +2183,7 @@ AS_VAR_IF([[found_sendfile]], [["no"]],
   [
    AC_MSG_CHECKING([[for Solaris-style sendfile(3)]])
    SAVE_LIBS="$LIBS"
-   LIBS="$LIBS -lsendfile"
+   LIBS="-lsendfile $LIBS"
    AC_LINK_IFELSE(
      [AC_LANG_PROGRAM(
        [[
@@ -2286,12 +2297,9 @@ AC_ARG_WITH([[gnutls]],
       ],
       [
         AC_MSG_RESULT([[-I$with_gnutls/include -L$with_gnutls/lib -lgnutls]])
-        SAVE_LDFLAGS="$LDFLAGS"
-        SAVE_CPPFLAGS="$CPPFLAGS"
-        SAVE_CFLAGS="$CFLAGS"
         SAVE_LIBS="$LIBS"
-        LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
-        CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
+        LDFLAGS="${LDFLAGS_ac} -L$with_gnutls/lib ${user_LDFLAGS}"
+        CPPFLAGS="${CPPFLAGS_ac} -I$with_gnutls/include ${user_CPPFLAGS}"
         have_gnutls_pkgcfg=no
           AC_CHECK_HEADERS([gnutls/gnutls.h],
             [AC_CHECK_LIB([gnutls], [gnutls_priority_set],
@@ -2302,9 +2310,9 @@ AC_ARG_WITH([[gnutls]],
                 have_gnutls=yes
               ])], [], [AC_INCLUDES_DEFAULT])
         AS_IF([test "x$have_gnutls" != "xyes"], [AC_MSG_ERROR([can't find 
usable libgnutls at specified prefix $with_gnutls])])
-        CPPFLAGS="$SAVE_CPPFLAGS"
-        CFLAGS="$SAVE_CFLAGS"
-        LDFLAGS="$SAVE_LDFLAGS"
+        CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+        CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+        LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
         LIBS="$SAVE_LIBS"
       ])
    ],
@@ -2357,12 +2365,9 @@ choke me now
     PKG_CHECK_MODULES(GNUTLS, [[gnutls]],
       [
        have_gnutls_pkgcfg='yes'
-       SAVE_CPPFLAGS="$CPPFLAGS"
-       SAVE_CFLAGS="$CFLAGS"
-       SAVE_LDFLAGS="$LDFLAGS"
        SAVE_LIBS="$LIBS"
-       CFLAGS="$GNUTLS_CFLAGS $CFLAGS"
-       LIBS="$LIBS $GNUTLS_LIBS"
+       CFLAGS="${CFLAGS_ac} $GNUTLS_CFLAGS ${user_CFLAGS}"
+       LIBS="$GNUTLS_LIBS $LIBS"
        AC_MSG_CHECKING([[whether GnuTLS is usable]])
        AC_LINK_IFELSE([
          AC_LANG_PROGRAM([[
@@ -2380,7 +2385,7 @@ choke me now
            have_gnutls=yes
            # GNUTLS_CFLAGS is actually CPPFLAGS
            GNUTLS_CPPFLAGS="$GNUTLS_CFLAGS"
-           # GNUTLS_CFLAGS is combination of LDFLAGS and LIBS
+           # GNUTLS_LDFLAGS is a combination of LDFLAGS and LIBS
            GNUTLS_LDFLAGS="$GNUTLS_LIBS"
           ],
           [
@@ -2397,9 +2402,9 @@ choke me now
           AS_UNSET([GNUTLS_LIBS])
          ]
        )
-       CPPFLAGS="$SAVE_CPPFLAGS"
-       CFLAGS="$SAVE_CFLAGS"
-       LDFLAGS="$SAVE_LDFLAGS"
+       CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+       CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+       LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
        LIBS="$SAVE_LIBS"
       ],
       [
@@ -2420,16 +2425,13 @@ AS_IF([test "x$with_gnutls" != "xno" && test 
"x$have_gnutls" != "xyes"],
    AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no])
    AS_IF([[test "x$have_gcrypt" = "xyes"]],
      [
-       SAVE_CPPFLAGS="$CPPFLAGS"
-       SAVE_CFLAGS="$CFLAGS"
        SAVE_LIBS="$LIBS"
-       SAVE_LDFLAGS="$LDFLAGS"
-       CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
+       CFLAGS="${CFLAGS_ac} $LIBGCRYPT_CFLAGS ${user_CFLAGS}"
        # LIBGCRYPT_CFLAGS can be actually a CPPFLAGS, so check them both
-       CPPFLAGS="$CPPFLAGS $LIBGCRYPT_CFLAGS"
+       CPPFLAGS="${CPPFLAGS_ac} $LIBGCRYPT_CFLAGS ${user_CPPFLAGS}"
        AC_CHECK_HEADERS([gcrypt.h], [], [have_gcrypt=no], 
[AC_INCLUDES_DEFAULT])
        # Check for GnuTLS with gcrypt flags
-       LDFLAGS="$LDFLAGS $LIBGCRYPT_LIBS"
+       LDFLAGS="${LDFLAGS_ac} ${LIBGCRYPT_LIBS} ${user_LDFLAGS}"
        # A bit of hack: unset cache variable to force recheck
        AS_UNSET([ac_cv_header_gnutls_gnutls_h])
        AC_CHECK_HEADERS([gnutls/gnutls.h],
@@ -2442,9 +2444,9 @@ AS_IF([test "x$with_gnutls" != "xno" && test 
"x$have_gnutls" != "xyes"],
             GNUTLS_LIBS="-lgnutls"
             have_gnutls=yes
           ])], [], [AC_INCLUDES_DEFAULT])
-       CPPFLAGS="$SAVE_CPPFLAGS"
-       CFLAGS="$SAVE_CFLAGS"
-       LDFLAGS="$SAVE_LDFLAGS"
+       CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+       CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+       LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
        LIBS="$SAVE_LIBS"
      ]
    )
@@ -2455,14 +2457,11 @@ AS_IF([test "x$have_gnutls" != "xyes" && test 
"x$with_gnutls" = "xyes"],
 
   AS_IF([test "x$have_gnutls" = "xyes"],
     [
-     SAVE_CPPFLAGS="$CPPFLAGS"
-     SAVE_CFLAGS="$CFLAGS"
-     SAVE_LDFLAGS="$LDFLAGS"
      SAVE_LIBS="$LIBS"
-     CPPFLAGS="$GNUTLS_CPPFLAGS $CPPFLAGS"
-     CFLAGS="$GNUTLS_CFLAGS $CFLAGS"
-     LDFLAGS="$GNUTLS_LDFLAGS $LDFLAGS"
-     LIBS="$LIBS $GNUTLS_LIBS"
+     CPPFLAGS="${CPPFLAGS_ac} ${GNUTLS_CPPFLAGS} ${user_CPPFLAGS}"
+     CFLAGS="${CFLAGS_ac} ${GNUTLS_CFLAGS} ${user_CFLAGS}"
+     LDFLAGS="${LDFLAGS_ac} ${GNUTLS_LDFLAGS} ${user_LDFLAGS}"
+     LIBS="$GNUTLS_LIBS $LIBS"
      AC_MSG_CHECKING([[for gnutls_privkey_import_x509_raw()]])
      AC_LINK_IFELSE([
        AC_LANG_PROGRAM([[
@@ -2502,9 +2501,9 @@ choke me now
         )
        ]
      )
-     CPPFLAGS="$SAVE_CPPFLAGS"
-     CFLAGS="$SAVE_CFLAGS"
-     LDFLAGS="$SAVE_LDFLAGS"
+     CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+     CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+     LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
      LIBS="$SAVE_LIBS"
     ],
     [
@@ -2518,14 +2517,12 @@ choke me now
      AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no])
      AS_IF([[test "x$have_gcrypt" = "xyes"]],
        [
-         SAVE_CPPFLAGS="$CPPFLAGS"
-         SAVE_CFLAGS="$CFLAGS"
-         CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
+         CFLAGS="${CFLAGS_ac} ${LIBGCRYPT_CFLAGS} ${user_CFLAGS}"
          # LIBGCRYPT_CFLAGS can be actually a CPPFLAGS, so check them both
-         CPPFLAGS="$CPPFLAGS $LIBGCRYPT_CFLAGS"
+         CPPFLAGS="${CPPFLAGS_ac} ${LIBGCRYPT_CFLAGS} ${user_CPPFLAGS}"
          AC_CHECK_HEADERS([gcrypt.h], [], [have_gcrypt=no], 
[AC_INCLUDES_DEFAULT])
-         CPPFLAGS="$SAVE_CPPFLAGS"
-         CFLAGS="$SAVE_CFLAGS"
+         CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+         CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
        ]
      )
     ]
@@ -2975,11 +2972,10 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
  [
    AS_UNSET([san_FLAGS]) # the sanitizer flags to be added to both CFLAGS and 
LDFLAGS
    AS_UNSET([san_CFLAGS]) # the sanitizer flags to be added to CFLAGS
-   saved_CFLAGS="$CFLAGS"
    AC_CACHE_CHECK([whether '-fsanitize=' works for $CC],
      [mhd_cv_cc_sanitizer_works],
      [
-       CFLAGS="${saved_CFLAGS} -fsanitize=wrongFeatureName"
+       CFLAGS="${CFLAGS_ac} -fsanitize=wrongFeatureName ${user_CFLAGS}"
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
          [mhd_cv_cc_sanitizer_works=no], [mhd_cv_cc_sanitizer_works=yes])
      ]
@@ -2990,7 +2986,7 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
          [
            AC_CACHE_CHECK([for address sanitizer], 
[mhd_cv_cc_sanitizer_address],
              [
-               CFLAGS="${saved_CFLAGS} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=address"
+               CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=address ${user_CFLAGS}"
                AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
                 [mhd_cv_cc_sanitizer_address=yes], 
[mhd_cv_cc_sanitizer_address=no])
              ]
@@ -3004,7 +3000,7 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
                  [
                    AC_CACHE_CHECK([whether leak detect is not rejected by 
address sanitizer], [mhd_cv_cc_sanitizer_address_leak],
                      [
-                       CFLAGS="${saved_CFLAGS} ${san_CFLAGS} ${san_FLAGS}"
+                       CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
${user_CFLAGS}"
                        
ASAN_OPTIONS="exitcode=88:detect_leaks=1:halt_on_error=1"
                        export ASAN_OPTIONS
                        AC_RUN_IFELSE([AC_LANG_PROGRAM([],[])],
@@ -3021,7 +3017,7 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
                )
                AC_CACHE_CHECK([for pointer compare sanitizer], 
[mhd_cv_cc_sanitizer_pointer_compare],
                  [
-                   CFLAGS="${saved_CFLAGS} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=pointer-compare"
+                   CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=pointer-compare ${user_CFLAGS}"
                    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
                     [mhd_cv_cc_sanitizer_pointer_compare=yes], 
[mhd_cv_cc_sanitizer_pointer_compare=no])
                  ]
@@ -3034,7 +3030,7 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
                )
                AC_CACHE_CHECK([for pointer subtract sanitizer], 
[mhd_cv_cc_sanitizer_pointer_subtract],
                  [
-                   CFLAGS="${saved_CFLAGS} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=pointer-subtract"
+                   CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
-fsanitize=pointer-subtract ${user_CFLAGS}"
                    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
                     [mhd_cv_cc_sanitizer_pointer_subtract=yes], 
[mhd_cv_cc_sanitizer_pointer_subtract=no])
                  ]
@@ -3054,7 +3050,7 @@ AS_VAR_IF([enable_sanitizers], ["no"], [:],
                          [
                            
ASAN_OPTIONS="exitcode=88:detect_invalid_pointer_pairs=3:halt_on_error=1"
                            export ASAN_OPTIONS
-                           CFLAGS="${saved_CFLAGS} ${san_CFLAGS} ${san_FLAGS} 
${errattr_CFLAGS}"
+                           CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
${errattr_CFLAGS} ${user_CFLAGS}"
                            AC_RUN_IFELSE(
                              [
                                AC_LANG_PROGRAM(
@@ -3100,7 +3096,7 @@ int ptr_process(void *ptr1, void *ptr2)
                              [
                                
ASAN_OPTIONS="exitcode=88:detect_invalid_pointer_pairs=3:halt_on_error=1"
                                export ASAN_OPTIONS
-                               CFLAGS="${saved_CFLAGS} ${san_CFLAGS} 
${san_FLAGS} ${errattr_CFLAGS}"
+                               CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} 
${errattr_CFLAGS} ${user_CFLAGS}"
                                AC_RUN_IFELSE(
                                  [
                                    AC_LANG_PROGRAM(
@@ -3194,7 +3190,7 @@ int main(void)
            ]
            AC_CACHE_CHECK([for undefined behavior sanitizer], 
[mhd_cv_cc_sanitizer_undefined],
              [
-               CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined"
+               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined ${user_CFLAGS}"
                AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
                 [mhd_cv_cc_sanitizer_undefined=yes], 
[mhd_cv_cc_sanitizer_undefined=no])
              ]
@@ -3207,7 +3203,7 @@ int main(void)
              [
                AC_CACHE_CHECK([for undefined behavior sanitizer with 
'-fsanitize-undefined-trap-on-error'], [mhd_cv_cc_sanitizer_undefined_trap],
                  [
-                   CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-undefined-trap-on-error"
+                   CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-undefined-trap-on-error ${user_CFLAGS}"
                    AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
                     [mhd_cv_cc_sanitizer_undefined_trap=yes], 
[mhd_cv_cc_sanitizer_undefined_trap=no])
                  ]
@@ -3225,7 +3221,7 @@ int main(void)
                        # Last resort
                        AC_CACHE_CHECK([for undefined behavior sanitizer with 
'-fsanitize-trap=all'], [mhd_cv_cc_sanitizer_undefined_trap_all],
                          [
-                           CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all"
+                           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
                            
AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
                             [mhd_cv_cc_sanitizer_undefined_trap_all=yes], 
[mhd_cv_cc_sanitizer_undefined_trap_all=no])
                          ]
@@ -3234,7 +3230,7 @@ int main(void)
                          [
                            AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
                            AX_APPEND_FLAG([-fsanitize-trap=all], [san_FLAGS])
-                           CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all"
+                           CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
                            
enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
                            AC_MSG_WARN([Enabled sanitizer without run-time 
library, error reporting will be limited])
                          ]
@@ -3251,12 +3247,12 @@ int main(void)
                  [
                    # A workaround for broken clang which is trying to use 
UBSan lib
                    # even when instructed to not use it
-                   CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS}"
+                   CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} 
${user_CFLAGS}"
                    AX_APPEND_LINK_FLAGS([-fsanitize-trap=implicit-conversion],
                      [san_FLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
                  ]
                )
-               CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS}"
+               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
                AX_APPEND_LINK_FLAGS([-fsanitize=bounds-strict 
-fsanitize=local-bounds -fsanitize=implicit-conversion 
-fsanitize=nullability-arg],
                  [san_CFLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
              ]
@@ -3275,7 +3271,7 @@ int main(void)
          [
            AC_CACHE_CHECK([for leak sanitizer], [mhd_cv_cc_sanitizer_leak],
              [
-               CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS} 
-fsanitize=leak"
+               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=leak 
${user_CFLAGS}"
                AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
                 [mhd_cv_cc_sanitizer_leak=yes], [mhd_cv_cc_sanitizer_leak=no])
              ]
@@ -3320,14 +3316,14 @@ int main(void)
            AS_VAR_IF([mhd_cv_cc_sanitizer_address],["yes"],
              [
                AX_APPEND_FLAG([-D_FORTIFY_SOURCE=0], [san_CFLAGS])
-               CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS}"
+               CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
                AX_APPEND_COMPILE_FLAGS([-Wp,-U_FORTIFY_SOURCE], [san_CFLAGS])
              ],
              [AC_MSG_WARN([$CC does not support address sanitizer])]
            )
          ]
        )
-       CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS}"
+       CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
        # Always stop on sanitizer error
        AX_APPEND_COMPILE_FLAGS([-fno-sanitize-recover=all], [san_CFLAGS])
        # Get a better output for sanitizers error reporting
@@ -3358,8 +3354,8 @@ UBSAN_OPTIONS="$(AM_UBSAN_OPTIONS)" ; export 
UBSAN_OPTIONS ; \
 LSAN_OPTIONS="$(AM_LSAN_OPTIONS)" ; export LSAN_OPTIONS ;'
      ]
    )
-   CFLAGS="${saved_CFLAGS} ${san_FLAGS} ${san_CFLAGS}"
-   AS_UNSET([saved_CFLAGS])
+   CFLAGS_ac="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS}"
+   CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
  ]
 )
 AM_CONDITIONAL([USE_SANITIZERS],
@@ -3373,6 +3369,7 @@ MHD_LIB_LDFLAGS="$MHD_LIB_LDFLAGS -export-dynamic 
-no-undefined"
 
 AC_SUBST([CPU_COUNT])
 AC_SUBST([HEAVY_TESTS_NOTPARALLEL])
+AM_SUBST_NOTMAKE([HEAVY_TESTS_NOTPARALLEL])
 AC_SUBST(MHD_LIB_CPPFLAGS)
 AC_SUBST(MHD_LIB_CFLAGS)
 AC_SUBST(MHD_LIB_LDFLAGS)
@@ -3386,9 +3383,19 @@ AC_SUBST(MHD_TLS_LIBDEPS)
 AC_SUBST([MHD_REQ_PRIVATE])
 AC_SUBST([MHD_LIBDEPS_PKGCFG])
 
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LIBS)
-AC_SUBST(LDFLAGS)
+# Restore flags as set by the user
+CFLAGS="${user_CFLAGS}"
+LDFLAGS="${user_LDFLAGS}"
+CPPFLAGS="${user_CPPFLAGS}"
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([CPPFLAGS])
+AC_SUBST([LIBS])
+
+# Configure-defined flags
+AC_SUBST([CFLAGS_ac])
+AC_SUBST([LDFLAGS_ac])
+AC_SUBST([CPPFLAGS_ac])
 
 # Used for 'po' directory staff
 AC_SUBST([ac_configure_args])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e3a5d748..fe39fd0b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
 # This Makefile.am is in the public domain
-man_MANS = libmicrohttpd.3
+dist_man_MANS = libmicrohttpd.3
 
 SUBDIRS = . doxygen
 
@@ -17,6 +17,11 @@ info_TEXINFOS = \
   libmicrohttpd.texi \
   libmicrohttpd-tutorial.texi
 microhttpd_TEXINFOS = \
+  lgpl.texi \
+  ecos.texi \
+  gpl-2.0.texi \
+  fdl-1.3.texi
+microhttpd_tutorial_TEXINFOS = \
   chapters/basicauthentication.inc \
   chapters/bibliography.inc \
   chapters/exploringrequests.inc \
@@ -26,15 +31,10 @@ microhttpd_TEXINFOS = \
   chapters/processingpost.inc \
   chapters/responseheaders.inc \
   chapters/tlsauthentication.inc \
-  chapters/sessions.inc \
-  fdl-1.3.texi \
-  gpl-2.0.texi \
-  lgpl.texi \
-  ecos.texi
+  chapters/sessions.inc
 
 EXTRA_DIST = \
-  $(man_MANS) \
-  $(microhttpd_TEXINFOS) \
+  $(microhttpd_TEXINFOS) $(microhttpd_tutorial_TEXINFOS) \
   libmicrohttpd_performance_data.png \
   libmicrohttpd_performance_data.eps
 
@@ -42,14 +42,14 @@ install-info-local:
        @echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
        $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
        echo " $(INSTALL_DATA) libmicrohttpd_performance_data.png 
'$(DESTDIR)$(infodir)'"; \
-       $(INSTALL_DATA) $(srcdir)/libmicrohttpd_performance_data.png 
"$(DESTDIR)$(infodir)" || exit 1;
+       $(INSTALL_DATA) '$(srcdir)/libmicrohttpd_performance_data.png' 
"$(DESTDIR)$(infodir)" || exit 1;
 
 install-html-local:
        @if test -n "$(htmldir)"; then \
          echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/libmicrohttpd.html'"; \
          $(MKDIR_P) "$(DESTDIR)$(htmldir)/libmicrohttpd.html" || exit 1; \
          echo " $(INSTALL_DATA) libmicrohttpd_performance_data.png 
'$(DESTDIR)$(htmldir)/libmicrohttpd.html'"; \
-         $(INSTALL_DATA) $(srcdir)/libmicrohttpd_performance_data.png 
"$(DESTDIR)$(htmldir)/libmicrohttpd.html" || exit 1; \
+         $(INSTALL_DATA) '$(srcdir)/libmicrohttpd_performance_data.png' 
"$(DESTDIR)$(htmldir)/libmicrohttpd.html" || exit 1; \
        else : ; fi
 
 uninstall-local:
@@ -58,4 +58,9 @@ uninstall-local:
          rm -f "$(DESTDIR)$(infodir)/libmicrohttpd_performance_data.png" \
        else : ; fi
 
-# end of 'if BUILD_DOC'
+update-stamp:
+       @rm -f '$(srcdir)/stamp-vti' '$(srcdir)/version.texi' && \
+         $(MAKE) $(AM_MAKEFLAGS) '$(srcdir)/version.texi'
+
+.PHONY: update-stamp
+
diff --git a/doc/doxygen/Makefile.am b/doc/doxygen/Makefile.am
index 6f132dd8..52da05bb 100644
--- a/doc/doxygen/Makefile.am
+++ b/doc/doxygen/Makefile.am
@@ -1,7 +1,7 @@
 # This Makefile.am is in the public domain
 all:
        @echo -e \
-"Generate documentation:\n" \
+"Generate doxygen additional documentation:\n" \
 "\tmake full - full documentation with dependency graphs (slow)\n" \
 "\tmake fast - fast mode without dependency graphs"
 
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index ee4c3ce6..1dc1b1d1 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -2,9 +2,12 @@
 SUBDIRS  = .
 
 AM_CPPFLAGS = \
-  -I$(top_srcdir)/src/include
+  -I$(top_srcdir)/src/include \
+  $(CPPFLAGS_ac)
 
-AM_CFLAGS = @LIBGCRYPT_CFLAGS@
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
 
 if USE_COVERAGE
   AM_CFLAGS += --coverage
diff --git a/doc/examples/sessions.c b/doc/examples/sessions.c
index 6d6cf5ba..db311bd4 100644
--- a/doc/examples/sessions.c
+++ b/doc/examples/sessions.c
@@ -2,7 +2,9 @@
    you see fit (Public Domain) */
 
 /* needed for asprintf */
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 5098a1ce..c222b5db 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -3,9 +3,12 @@ SUBDIRS  = .
 
 AM_CPPFLAGS = \
   -I$(top_srcdir)/src/include \
+  $(CPPFLAGS_ac) \
   -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
 
-AM_CFLAGS = @LIBGCRYPT_CFLAGS@
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
 
 MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT)
 
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 18691572..ba52b740 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -2,9 +2,11 @@
 
 AM_CPPFLAGS = \
   -I$(top_srcdir)/src/include \
-  -I$(top_srcdir)/src/microhttpd
+  $(CPPFLAGS_ac)
 
-AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS)
+AM_CFLAGS = $(CFLAGS_ac) $(HIDDEN_VISIBILITY_CFLAGS)
+
+AM_LDFLAGS = $(LDFLAGS_ac)
 
 lib_LTLIBRARIES = \
   libmicrohttpd.la
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
index 40a9fb13..5d7839f1 100644
--- a/src/testcurl/Makefile.am
+++ b/src/testcurl/Makefile.am
@@ -5,21 +5,24 @@ EMPTY_ITEM =
 
 SUBDIRS = .
 
+AM_CPPFLAGS = \
+  -I$(top_srcdir)/src/include \
+  -I$(top_srcdir)/src/microhttpd \
+  -DMHD_CPU_COUNT=$(CPU_COUNT) \
+  $(CPPFLAGS_ac) $(LIBCURL_CPPFLAGS)
+
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
+
 if USE_COVERAGE
-  AM_CFLAGS = -fprofile-arcs -ftest-coverage
+  AM_CFLAGS += -fprofile-arcs -ftest-coverage
 endif
 
 if ENABLE_HTTPS
   SUBDIRS += https
 endif
 
-AM_CPPFLAGS = \
--DMHD_CPU_COUNT=$(CPU_COUNT) \
--I$(top_srcdir) \
--I$(top_srcdir)/src/microhttpd \
--I$(top_srcdir)/src/include \
-$(LIBCURL_CPPFLAGS)
-
 LDADD = \
   $(top_builddir)/src/microhttpd/libmicrohttpd.la \
   @LIBCURL@
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am
index 6c2134dc..203cddac 100644
--- a/src/testcurl/https/Makefile.am
+++ b/src/testcurl/https/Makefile.am
@@ -3,18 +3,21 @@ EMPTY_ITEM =
 
 SUBDIRS = .
 
-if USE_COVERAGE
-  AM_CFLAGS = --coverage
-endif
-
 .NOTPARALLEL:
 
-MHD_CPU_COUNT_DEF = -DMHD_CPU_COUNT=$(CPU_COUNT)
-
 AM_CPPFLAGS = \
   -I$(top_srcdir)/src/include \
   -I$(top_srcdir)/src/microhttpd \
-  $(LIBCURL_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS)
+  -DMHD_CPU_COUNT=$(CPU_COUNT) \
+  $(CPPFLAGS_ac) $(LIBCURL_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS)
+
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
+
+if USE_COVERAGE
+  AM_CFLAGS += --coverage
+endif
 
 LDADD = \
   $(top_builddir)/src/microhttpd/libmicrohttpd.la \
@@ -83,8 +86,6 @@ test_https_get_parallel_SOURCES = \
   tls_test_keys.h \
   tls_test_common.h \
   tls_test_common.c
-test_https_get_parallel_CPPFLAGS = \
-  $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
 test_https_get_parallel_CFLAGS = \
   $(PTHREAD_CFLAGS) $(AM_CFLAGS)
 test_https_get_parallel_LDADD = \
@@ -101,8 +102,6 @@ test_https_get_parallel_threads_SOURCES = \
   tls_test_keys.h \
   tls_test_common.h \
   tls_test_common.c
-test_https_get_parallel_threads_CPPFLAGS = \
-  $(AM_CPPFLAGS) $(MHD_CPU_COUNT_DEF)
 test_https_get_parallel_threads_CFLAGS = \
   $(PTHREAD_CFLAGS) $(AM_CFLAGS)
 test_https_get_parallel_threads_LDADD = \
diff --git a/src/testzzuf/Makefile.am b/src/testzzuf/Makefile.am
index c657f34e..db85c679 100644
--- a/src/testzzuf/Makefile.am
+++ b/src/testzzuf/Makefile.am
@@ -1,13 +1,22 @@
 # This Makefile.am is in the public domain
 SUBDIRS  = .
 
+AM_CPPFLAGS = \
+  -I$(top_srcdir)/src/include \
+  -DMHD_CPU_COUNT=$(CPU_COUNT) \
+  $(LIBCURL_CPPFLAGS)
+
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
+
 if USE_COVERAGE
-  AM_CFLAGS = -fprofile-arcs -ftest-coverage
+  AM_CFLAGS += -fprofile-arcs -ftest-coverage
 endif
 
-
-AM_CPPFLAGS = -I$(top_srcdir)/src/include \
-  $(LIBCURL_CPPFLAGS)
+LDADD = \
+  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
+  @LIBCURL@
 
 EXTRA_DIST = README socat.c
 
@@ -45,80 +54,41 @@ TESTS = $(check_PROGRAMS)
 
 test_get_SOURCES = \
   test_get.c
-test_get_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_get_chunked_SOURCES = \
   test_get_chunked.c
-test_get_chunked_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_post_SOURCES = \
   test_post.c
-test_post_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_post_form_SOURCES = \
   test_post_form.c
-test_post_form_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_put_SOURCES = \
   test_put.c
-test_put_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_put_chunked_SOURCES = \
   test_put_chunked.c
-test_put_chunked_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_put_large_SOURCES = \
   test_put_large.c
-test_put_large_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 
 
 test_get11_SOURCES = \
   test_get.c
-test_get11_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_post11_SOURCES = \
   test_post.c
-test_post11_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_post_form11_SOURCES = \
   test_post_form.c
-test_post_form11_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_put11_SOURCES = \
   test_put.c
-test_put11_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_put_large11_SOURCES = \
   test_put_large.c
-test_put_large11_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@
 
 test_long_header_SOURCES = \
   test_long_header.c
-test_long_header_LDADD = \
-  $(top_builddir)/src/microhttpd/libmicrohttpd.la \
-  @LIBCURL@

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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