libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 3e2d1f25f2885bf726ea4f510b6ccdd519532eb4
parent 53abf68000b42f425b4e2d668f55ea6836febf6a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 26 Feb 2014 17:55:27 +0000

Remove global dependency on PTHREAD_LIBS and use it only where it's required

Diffstat:
Mconfigure.ac | 2--
Msrc/examples/Makefile.am | 10++++++----
Msrc/microhttpd/Makefile.am | 4+++-
Msrc/testcurl/Makefile.am | 4+++-
Msrc/testcurl/https/Makefile.am | 8++++++--
5 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -82,8 +82,6 @@ AC_SUBST([PACKAGE_VERSION_SUBMINOR]) AC_CONFIG_FILES([src/microhttpd/microhttpd_dll_res.rc]) AX_PTHREAD(,[AC_MSG_ERROR([[Compiling libmicrohttpd requires pthread support]])]) -LIBS="$PTHREAD_LIBS $LIBS" -CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" # set GCC options diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am @@ -42,10 +42,10 @@ noinst_PROGRAMS += https_fileserver_example endif if HAVE_POSTPROCESSOR noinst_PROGRAMS += \ - post_example + post_example if HAVE_MAGIC bin_PROGRAMS = \ - demo + demo endif endif @@ -69,10 +69,12 @@ minimal_example_LDADD = \ $(top_builddir)/src/microhttpd/libmicrohttpd.la demo_SOURCES = \ - demo.c + demo.c +demo_CFLAGS = \ + $(PTHREAD_CFLAGS) $(AM_CFLAGS) demo_LDADD = \ $(top_builddir)/src/microhttpd/libmicrohttpd.la \ - -lmagic + $(PTHREAD_LIBS) -lmagic mhd2spdy_SOURCES = \ mhd2spdy.c \ diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am @@ -66,12 +66,14 @@ libmicrohttpd_la_SOURCES = \ libmicrohttpd_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DBUILDING_MHD_LIB=1 +libmicrohttpd_la_CFLAGS = \ + $(PTHREAD_CFLAGS) $(AM_CFLAGS) libmicrohttpd_la_LDFLAGS = \ $(MHD_LIB_LDFLAGS) \ $(W32_MHD_LIB_LDFLAGS) \ -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ libmicrohttpd_la_LIBADD = \ - $(MHD_W32_LIB) + $(MHD_W32_LIB) $(PTHREAD_LIBS) if HAVE_W32 MHD_DLL_RES_SRC = microhttpd_dll_res.rc diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am @@ -93,9 +93,11 @@ test_get_LDADD = \ test_quiesce_SOURCES = \ test_quiesce.c +test_quiesce_CFLAGS = \ + $(PTHREAD_CFLAGS) $(AM_CFLAGS) test_quiesce_LDADD = \ $(top_builddir)/src/microhttpd/libmicrohttpd.la \ - @LIBCURL@ + $(PTHREAD_LIBS) @LIBCURL@ test_callback_SOURCES = \ test_callback.c diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am @@ -59,10 +59,12 @@ test_tls_options_LDADD = \ test_https_get_parallel_SOURCES = \ test_https_get_parallel.c \ tls_test_common.c +test_https_get_parallel_CFLAGS = \ + $(PTHREAD_CFLAGS) $(AM_CFLAGS) test_https_get_parallel_LDADD = \ $(top_builddir)/src/testcurl/libcurl_version_check.a \ $(top_builddir)/src/microhttpd/libmicrohttpd.la \ - @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ + $(PTHREAD_LIBS) @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ test_empty_response_SOURCES = \ test_empty_response.c \ @@ -75,10 +77,12 @@ test_empty_response_LDADD = \ test_https_get_parallel_threads_SOURCES = \ test_https_get_parallel_threads.c \ tls_test_common.c +test_https_get_parallel_threads_CFLAGS = \ + $(PTHREAD_CFLAGS) $(AM_CFLAGS) test_https_get_parallel_threads_LDADD = \ $(top_builddir)/src/testcurl/libcurl_version_check.a \ $(top_builddir)/src/microhttpd/libmicrohttpd.la \ - @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ + $(PTHREAD_LIBS) @LIBCURL@ -lgnutls @LIBGCRYPT_LIBS@ test_tls_authentication_SOURCES = \ test_tls_authentication.c \