commit 68c667f88b985191a21a308c92d72a7dad172bf2
parent 745673d704c48aaa719d57132abf2039bcd0169d
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 19 Feb 2014 06:47:35 +0000
move headers to src/include, build w32functions.c as static library (untested) to make 'make distclean' work cleanly
Diffstat:
8 files changed, 74 insertions(+), 53 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -223,7 +223,7 @@ AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/
AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false))
-# Check for pipe/socketpair signaling
+# Check for pipe/socketpair signaling
AC_MSG_CHECKING([[whether to disable pipes signaling]])
AC_ARG_ENABLE([[pipes]],
[AS_HELP_STRING([[--disable-pipes]], [[disable internal singalling by pipes and use socket pair instead]])],
@@ -231,7 +231,7 @@ AC_ARG_ENABLE([[pipes]],
AS_IF([[test "x$os_is_windows" = "xyes"]], [disable_pipes=yes
AC_MSG_RESULT([[yes, forced on W32]])],
[[test "x$enable_pipes" != "xno"]], [disable_pipes=no
- AC_MSG_RESULT([[$disable_pipes]])],
+ AC_MSG_RESULT([[$disable_pipes]])],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -242,8 +242,8 @@ AS_IF([[test "x$os_is_windows" = "xyes"]], [disable_pipes=yes
]],[[
int sv[2];
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) != 0) return 1
-
- ]])],
+
+ ]])],
[disable_pipes=yes
AC_MSG_RESULT([[yes, socketpair in available]])],
[disable_pipes=no
@@ -623,6 +623,7 @@ doc/examples/Makefile
m4/Makefile
src/Makefile
src/include/Makefile
+src/platform/Makefile
src/microhttpd/Makefile
src/microspdy/Makefile
src/spdy2http/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -18,7 +18,7 @@ microspdy += testspdy
endif
endif
-SUBDIRS = include microhttpd $(microspdy) examples $(curltests) $(zzuftests) .
+SUBDIRS = include platform microhttpd $(microspdy) examples $(curltests) $(zzuftests) .
EXTRA_DIST = \
datadir/cert-and-key.pem \
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
@@ -6,4 +6,4 @@ endif
include_HEADERS = microhttpd.h $(microspdy)
-EXTRA_DIST = platform.h
+EXTRA_DIST = platform.h platform_interface.h w32functions.h
diff --git a/src/platform/platform_interface.h b/src/include/platform_interface.h
diff --git a/src/platform/w32functions.h b/src/include/w32functions.h
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
@@ -1,11 +1,6 @@
-if HAVE_W32
- W32FUNC_SRC = ../platform/w32functions.c ../platform/w32functions.h
-endif
-
AM_CPPFLAGS = \
-I$(top_srcdir)/src/include \
- -I$(top_srcdir)/src/microhttpd \
- -I$(top_srcdir)/src/platform
+ -I$(top_srcdir)/src/microhttpd
AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
@LIBGCRYPT_CFLAGS@
@@ -21,13 +16,19 @@ libmicrohttpd_la_SOURCES = \
internal.c internal.h \
memorypool.c memorypool.h \
response.c response.h \
- ../platform/platform_interface.h $(W32FUNC_SRC)
libmicrohttpd_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DBUILDING_MHD_LIB=1
+libmicrohttpd_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ -DBUILDING_MHD_LIB=1
libmicrohttpd_la_LDFLAGS = \
$(MHD_LIB_LDFLAGS) \
-version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
+if HAVE_W32
+libmicrohttpd_LDADD =
+ $(top_builddir)/src/platform/libmicrohttpd_w32.la
+endif
if USE_COVERAGE
AM_CFLAGS += --coverage
diff --git a/src/platform/Makefile.am b/src/platform/Makefile.am
@@ -0,0 +1,21 @@
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/include \
+ -I$(top_srcdir)/src/microhttpd
+
+AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
+ @LIBGCRYPT_CFLAGS@
+
+if USE_COVERAGE
+ AM_CFLAGS += --coverage
+endif
+
+if HAVE_W32
+lib_LIBRARIES = \
+ libmicrohttpd_w32.a
+libmicrohttpd_w32_a_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -DBUILDING_MHD_LIB=1
+libmicrohttpd_w32_a_SOURCES = \
+ w32functions.c
+endif
+
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
@@ -12,7 +12,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/src/microhttpd \
-I$(top_srcdir)/src/include \
--I$(top_srcdir)/src/platform \
$(LIBCURL_CPPFLAGS)
if !HAVE_W32
@@ -57,7 +56,7 @@ if HAVE_POSTPROCESSOR
test_post_loop \
test_post11 \
test_postform11 \
- test_post_loop11
+ test_post_loop11
endif
noinst_PROGRAMS = \
@@ -90,33 +89,33 @@ test_get_SOURCES = \
test_get.c
test_get_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_quiesce_SOURCES = \
test_quiesce.c
test_quiesce_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_callback_SOURCES = \
test_callback.c
test_callback_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
perf_get_SOURCES = \
perf_get.c \
gauger.h
perf_get_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
perf_get_concurrent_SOURCES = \
perf_get_concurrent.c \
gauger.h
perf_get_concurrent_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_digestauth_SOURCES = \
test_digestauth.c
@@ -131,56 +130,55 @@ test_digestauth_with_arguments_LDADD = \
@LIBCURL@ @LIBGCRYPT_LIBS@
test_get_sendfile_SOURCES = \
- test_get_sendfile.c \
- ../platform/platform_interface.h
-if HAVE_W32
-test_get_sendfile_SOURCES += \
- ../platform/w32functions.h ../platform/w32functions.c
-endif
+ test_get_sendfile.c
test_get_sendfile_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
+if HAVE_W32
+test_get_sendfile_LDADD +=
+ $(top_builddir)/src/platform/libmicrohttpd_w32.la
+endif
test_urlparse_SOURCES = \
test_urlparse.c
test_urlparse_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_get_response_cleanup_SOURCES = \
test_get_response_cleanup.c
test_get_response_cleanup_LDADD = \
- $(top_builddir)/src/microhttpd/libmicrohttpd.la
+ $(top_builddir)/src/microhttpd/libmicrohttpd.la
test_get_chunked_SOURCES = \
test_get_chunked.c
test_get_chunked_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_post_SOURCES = \
test_post.c
test_post_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_process_headers_SOURCES = \
test_process_headers.c
test_process_headers_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_parse_cookies_SOURCES = \
test_parse_cookies.c
test_parse_cookies_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_process_arguments_SOURCES = \
test_process_arguments.c
test_process_arguments_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_postform_SOURCES = \
test_postform.c
@@ -192,41 +190,41 @@ test_post_loop_SOURCES = \
test_post_loop.c
test_post_loop_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_put_SOURCES = \
test_put.c
test_put_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_put_chunked_SOURCES = \
test_put_chunked.c
test_put_chunked_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_get11_SOURCES = \
test_get.c
test_get11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_get_sendfile11_SOURCES = \
test_get_sendfile.c
-if HAVE_W32
-test_get_sendfile11_SOURCES += \
- ../platform/w32functions.h ../platform/w32functions.c
-endif
test_get_sendfile11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
+if HAVE_W32
+test_get_sendfile11_LDADD += \
+ $(top_builddir)/src/platform/libmicrohttpd_w32.la
+endif
test_post11_SOURCES = \
test_post.c
test_post11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_postform11_SOURCES = \
test_postform.c
@@ -238,53 +236,53 @@ test_post_loop11_SOURCES = \
test_post_loop.c
test_post_loop11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_put11_SOURCES = \
test_put.c
test_put11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_large_put_SOURCES = \
test_large_put.c
test_large_put_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_large_put11_SOURCES = \
test_large_put.c
test_large_put11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_long_header_SOURCES = \
test_long_header.c
test_long_header_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_long_header11_SOURCES = \
test_long_header.c
test_long_header11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_iplimit11_SOURCES = \
test_iplimit.c
test_iplimit11_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_termination_SOURCES = \
test_termination.c
test_termination_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@
test_timeout_SOURCES = \
test_timeout.c
test_timeout_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
- @LIBCURL@
+ @LIBCURL@