aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-02-19 06:47:35 +0000
committerChristian Grothoff <christian@grothoff.org>2014-02-19 06:47:35 +0000
commit68c667f88b985191a21a308c92d72a7dad172bf2 (patch)
treef46b3e532359e24b4678159cfadd35f6951b6021
parent745673d704c48aaa719d57132abf2039bcd0169d (diff)
downloadlibmicrohttpd-68c667f88b985191a21a308c92d72a7dad172bf2.tar.gz
libmicrohttpd-68c667f88b985191a21a308c92d72a7dad172bf2.zip
move headers to src/include, build w32functions.c as static library (untested) to make 'make distclean' work cleanly
-rw-r--r--configure.ac9
-rw-r--r--src/Makefile.am2
-rw-r--r--src/include/Makefile.am2
-rw-r--r--src/include/platform_interface.h (renamed from src/platform/platform_interface.h)0
-rw-r--r--src/include/w32functions.h (renamed from src/platform/w32functions.h)0
-rw-r--r--src/microhttpd/Makefile.am15
-rw-r--r--src/platform/Makefile.am21
-rw-r--r--src/testcurl/Makefile.am78
8 files changed, 74 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index 07897639..0321ff9f 100644
--- 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/
223 223
224AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false)) 224AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false))
225 225
226# Check for pipe/socketpair signaling 226# Check for pipe/socketpair signaling
227AC_MSG_CHECKING([[whether to disable pipes signaling]]) 227AC_MSG_CHECKING([[whether to disable pipes signaling]])
228AC_ARG_ENABLE([[pipes]], 228AC_ARG_ENABLE([[pipes]],
229 [AS_HELP_STRING([[--disable-pipes]], [[disable internal singalling by pipes and use socket pair instead]])], 229 [AS_HELP_STRING([[--disable-pipes]], [[disable internal singalling by pipes and use socket pair instead]])],
@@ -231,7 +231,7 @@ AC_ARG_ENABLE([[pipes]],
231AS_IF([[test "x$os_is_windows" = "xyes"]], [disable_pipes=yes 231AS_IF([[test "x$os_is_windows" = "xyes"]], [disable_pipes=yes
232 AC_MSG_RESULT([[yes, forced on W32]])], 232 AC_MSG_RESULT([[yes, forced on W32]])],
233 [[test "x$enable_pipes" != "xno"]], [disable_pipes=no 233 [[test "x$enable_pipes" != "xno"]], [disable_pipes=no
234 AC_MSG_RESULT([[$disable_pipes]])], 234 AC_MSG_RESULT([[$disable_pipes]])],
235 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 235 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
236 #ifdef HAVE_SYS_TYPES_H 236 #ifdef HAVE_SYS_TYPES_H
237 #include <sys/types.h> 237 #include <sys/types.h>
@@ -242,8 +242,8 @@ AS_IF([[test "x$os_is_windows" = "xyes"]], [disable_pipes=yes
242 ]],[[ 242 ]],[[
243 int sv[2]; 243 int sv[2];
244 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) != 0) return 1 244 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) != 0) return 1
245 245
246 ]])], 246 ]])],
247 [disable_pipes=yes 247 [disable_pipes=yes
248 AC_MSG_RESULT([[yes, socketpair in available]])], 248 AC_MSG_RESULT([[yes, socketpair in available]])],
249 [disable_pipes=no 249 [disable_pipes=no
@@ -623,6 +623,7 @@ doc/examples/Makefile
623m4/Makefile 623m4/Makefile
624src/Makefile 624src/Makefile
625src/include/Makefile 625src/include/Makefile
626src/platform/Makefile
626src/microhttpd/Makefile 627src/microhttpd/Makefile
627src/microspdy/Makefile 628src/microspdy/Makefile
628src/spdy2http/Makefile 629src/spdy2http/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 9808c479..d01c622a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@ microspdy += testspdy
18endif 18endif
19endif 19endif
20 20
21SUBDIRS = include microhttpd $(microspdy) examples $(curltests) $(zzuftests) . 21SUBDIRS = include platform microhttpd $(microspdy) examples $(curltests) $(zzuftests) .
22 22
23EXTRA_DIST = \ 23EXTRA_DIST = \
24 datadir/cert-and-key.pem \ 24 datadir/cert-and-key.pem \
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 66761396..728bee83 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -6,4 +6,4 @@ endif
6 6
7include_HEADERS = microhttpd.h $(microspdy) 7include_HEADERS = microhttpd.h $(microspdy)
8 8
9EXTRA_DIST = platform.h 9EXTRA_DIST = platform.h platform_interface.h w32functions.h
diff --git a/src/platform/platform_interface.h b/src/include/platform_interface.h
index 22f78166..22f78166 100644
--- a/src/platform/platform_interface.h
+++ b/src/include/platform_interface.h
diff --git a/src/platform/w32functions.h b/src/include/w32functions.h
index 7a25803b..7a25803b 100644
--- a/src/platform/w32functions.h
+++ b/src/include/w32functions.h
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index b88e6fa9..3eecb12d 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -1,11 +1,6 @@
1if HAVE_W32
2 W32FUNC_SRC = ../platform/w32functions.c ../platform/w32functions.h
3endif
4
5AM_CPPFLAGS = \ 1AM_CPPFLAGS = \
6 -I$(top_srcdir)/src/include \ 2 -I$(top_srcdir)/src/include \
7 -I$(top_srcdir)/src/microhttpd \ 3 -I$(top_srcdir)/src/microhttpd
8 -I$(top_srcdir)/src/platform
9 4
10AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \ 5AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
11 @LIBGCRYPT_CFLAGS@ 6 @LIBGCRYPT_CFLAGS@
@@ -21,13 +16,19 @@ libmicrohttpd_la_SOURCES = \
21 internal.c internal.h \ 16 internal.c internal.h \
22 memorypool.c memorypool.h \ 17 memorypool.c memorypool.h \
23 response.c response.h \ 18 response.c response.h \
24 ../platform/platform_interface.h $(W32FUNC_SRC)
25libmicrohttpd_la_CPPFLAGS = \ 19libmicrohttpd_la_CPPFLAGS = \
26 $(AM_CPPFLAGS) \ 20 $(AM_CPPFLAGS) \
27 -DBUILDING_MHD_LIB=1 21 -DBUILDING_MHD_LIB=1
22libmicrohttpd_la_CFLAGS = \
23 $(AM_CFLAGS) \
24 -DBUILDING_MHD_LIB=1
28libmicrohttpd_la_LDFLAGS = \ 25libmicrohttpd_la_LDFLAGS = \
29 $(MHD_LIB_LDFLAGS) \ 26 $(MHD_LIB_LDFLAGS) \
30 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ 27 -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@
28if HAVE_W32
29libmicrohttpd_LDADD =
30 $(top_builddir)/src/platform/libmicrohttpd_w32.la
31endif
31 32
32if USE_COVERAGE 33if USE_COVERAGE
33 AM_CFLAGS += --coverage 34 AM_CFLAGS += --coverage
diff --git a/src/platform/Makefile.am b/src/platform/Makefile.am
new file mode 100644
index 00000000..e1cdffec
--- /dev/null
+++ b/src/platform/Makefile.am
@@ -0,0 +1,21 @@
1AM_CPPFLAGS = \
2 -I$(top_srcdir)/src/include \
3 -I$(top_srcdir)/src/microhttpd
4
5AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) \
6 @LIBGCRYPT_CFLAGS@
7
8if USE_COVERAGE
9 AM_CFLAGS += --coverage
10endif
11
12if HAVE_W32
13lib_LIBRARIES = \
14 libmicrohttpd_w32.a
15libmicrohttpd_w32_a_CPPFLAGS = \
16 $(AM_CPPFLAGS) \
17 -DBUILDING_MHD_LIB=1
18libmicrohttpd_w32_a_SOURCES = \
19 w32functions.c
20endif
21
diff --git a/src/testcurl/Makefile.am b/src/testcurl/Makefile.am
index 934587d7..892ffceb 100644
--- a/src/testcurl/Makefile.am
+++ b/src/testcurl/Makefile.am
@@ -12,7 +12,6 @@ AM_CPPFLAGS = \
12-I$(top_srcdir) \ 12-I$(top_srcdir) \
13-I$(top_srcdir)/src/microhttpd \ 13-I$(top_srcdir)/src/microhttpd \
14-I$(top_srcdir)/src/include \ 14-I$(top_srcdir)/src/include \
15-I$(top_srcdir)/src/platform \
16$(LIBCURL_CPPFLAGS) 15$(LIBCURL_CPPFLAGS)
17 16
18if !HAVE_W32 17if !HAVE_W32
@@ -57,7 +56,7 @@ if HAVE_POSTPROCESSOR
57 test_post_loop \ 56 test_post_loop \
58 test_post11 \ 57 test_post11 \
59 test_postform11 \ 58 test_postform11 \
60 test_post_loop11 59 test_post_loop11
61endif 60endif
62 61
63noinst_PROGRAMS = \ 62noinst_PROGRAMS = \
@@ -90,33 +89,33 @@ test_get_SOURCES = \
90 test_get.c 89 test_get.c
91test_get_LDADD = \ 90test_get_LDADD = \
92 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 91 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
93 @LIBCURL@ 92 @LIBCURL@
94 93
95test_quiesce_SOURCES = \ 94test_quiesce_SOURCES = \
96 test_quiesce.c 95 test_quiesce.c
97test_quiesce_LDADD = \ 96test_quiesce_LDADD = \
98 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 97 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
99 @LIBCURL@ 98 @LIBCURL@
100 99
101test_callback_SOURCES = \ 100test_callback_SOURCES = \
102 test_callback.c 101 test_callback.c
103test_callback_LDADD = \ 102test_callback_LDADD = \
104 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 103 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
105 @LIBCURL@ 104 @LIBCURL@
106 105
107perf_get_SOURCES = \ 106perf_get_SOURCES = \
108 perf_get.c \ 107 perf_get.c \
109 gauger.h 108 gauger.h
110perf_get_LDADD = \ 109perf_get_LDADD = \
111 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 110 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
112 @LIBCURL@ 111 @LIBCURL@
113 112
114perf_get_concurrent_SOURCES = \ 113perf_get_concurrent_SOURCES = \
115 perf_get_concurrent.c \ 114 perf_get_concurrent.c \
116 gauger.h 115 gauger.h
117perf_get_concurrent_LDADD = \ 116perf_get_concurrent_LDADD = \
118 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 117 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
119 @LIBCURL@ 118 @LIBCURL@
120 119
121test_digestauth_SOURCES = \ 120test_digestauth_SOURCES = \
122 test_digestauth.c 121 test_digestauth.c
@@ -131,56 +130,55 @@ test_digestauth_with_arguments_LDADD = \
131 @LIBCURL@ @LIBGCRYPT_LIBS@ 130 @LIBCURL@ @LIBGCRYPT_LIBS@
132 131
133test_get_sendfile_SOURCES = \ 132test_get_sendfile_SOURCES = \
134 test_get_sendfile.c \ 133 test_get_sendfile.c
135 ../platform/platform_interface.h
136if HAVE_W32
137test_get_sendfile_SOURCES += \
138 ../platform/w32functions.h ../platform/w32functions.c
139endif
140test_get_sendfile_LDADD = \ 134test_get_sendfile_LDADD = \
141 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 135 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
142 @LIBCURL@ 136 @LIBCURL@
137if HAVE_W32
138test_get_sendfile_LDADD +=
139 $(top_builddir)/src/platform/libmicrohttpd_w32.la
140endif
143 141
144test_urlparse_SOURCES = \ 142test_urlparse_SOURCES = \
145 test_urlparse.c 143 test_urlparse.c
146test_urlparse_LDADD = \ 144test_urlparse_LDADD = \
147 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 145 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
148 @LIBCURL@ 146 @LIBCURL@
149 147
150test_get_response_cleanup_SOURCES = \ 148test_get_response_cleanup_SOURCES = \
151 test_get_response_cleanup.c 149 test_get_response_cleanup.c
152test_get_response_cleanup_LDADD = \ 150test_get_response_cleanup_LDADD = \
153 $(top_builddir)/src/microhttpd/libmicrohttpd.la 151 $(top_builddir)/src/microhttpd/libmicrohttpd.la
154 152
155test_get_chunked_SOURCES = \ 153test_get_chunked_SOURCES = \
156 test_get_chunked.c 154 test_get_chunked.c
157test_get_chunked_LDADD = \ 155test_get_chunked_LDADD = \
158 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 156 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
159 @LIBCURL@ 157 @LIBCURL@
160 158
161test_post_SOURCES = \ 159test_post_SOURCES = \
162 test_post.c 160 test_post.c
163test_post_LDADD = \ 161test_post_LDADD = \
164 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 162 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
165 @LIBCURL@ 163 @LIBCURL@
166 164
167test_process_headers_SOURCES = \ 165test_process_headers_SOURCES = \
168 test_process_headers.c 166 test_process_headers.c
169test_process_headers_LDADD = \ 167test_process_headers_LDADD = \
170 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 168 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
171 @LIBCURL@ 169 @LIBCURL@
172 170
173test_parse_cookies_SOURCES = \ 171test_parse_cookies_SOURCES = \
174 test_parse_cookies.c 172 test_parse_cookies.c
175test_parse_cookies_LDADD = \ 173test_parse_cookies_LDADD = \
176 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 174 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
177 @LIBCURL@ 175 @LIBCURL@
178 176
179test_process_arguments_SOURCES = \ 177test_process_arguments_SOURCES = \
180 test_process_arguments.c 178 test_process_arguments.c
181test_process_arguments_LDADD = \ 179test_process_arguments_LDADD = \
182 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 180 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
183 @LIBCURL@ 181 @LIBCURL@
184 182
185test_postform_SOURCES = \ 183test_postform_SOURCES = \
186 test_postform.c 184 test_postform.c
@@ -192,41 +190,41 @@ test_post_loop_SOURCES = \
192 test_post_loop.c 190 test_post_loop.c
193test_post_loop_LDADD = \ 191test_post_loop_LDADD = \
194 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 192 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
195 @LIBCURL@ 193 @LIBCURL@
196 194
197test_put_SOURCES = \ 195test_put_SOURCES = \
198 test_put.c 196 test_put.c
199test_put_LDADD = \ 197test_put_LDADD = \
200 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 198 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
201 @LIBCURL@ 199 @LIBCURL@
202 200
203test_put_chunked_SOURCES = \ 201test_put_chunked_SOURCES = \
204 test_put_chunked.c 202 test_put_chunked.c
205test_put_chunked_LDADD = \ 203test_put_chunked_LDADD = \
206 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 204 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
207 @LIBCURL@ 205 @LIBCURL@
208 206
209test_get11_SOURCES = \ 207test_get11_SOURCES = \
210 test_get.c 208 test_get.c
211test_get11_LDADD = \ 209test_get11_LDADD = \
212 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 210 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
213 @LIBCURL@ 211 @LIBCURL@
214 212
215test_get_sendfile11_SOURCES = \ 213test_get_sendfile11_SOURCES = \
216 test_get_sendfile.c 214 test_get_sendfile.c
217if HAVE_W32
218test_get_sendfile11_SOURCES += \
219 ../platform/w32functions.h ../platform/w32functions.c
220endif
221test_get_sendfile11_LDADD = \ 215test_get_sendfile11_LDADD = \
222 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 216 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
223 @LIBCURL@ 217 @LIBCURL@
218if HAVE_W32
219test_get_sendfile11_LDADD += \
220 $(top_builddir)/src/platform/libmicrohttpd_w32.la
221endif
224 222
225test_post11_SOURCES = \ 223test_post11_SOURCES = \
226 test_post.c 224 test_post.c
227test_post11_LDADD = \ 225test_post11_LDADD = \
228 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 226 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
229 @LIBCURL@ 227 @LIBCURL@
230 228
231test_postform11_SOURCES = \ 229test_postform11_SOURCES = \
232 test_postform.c 230 test_postform.c
@@ -238,53 +236,53 @@ test_post_loop11_SOURCES = \
238 test_post_loop.c 236 test_post_loop.c
239test_post_loop11_LDADD = \ 237test_post_loop11_LDADD = \
240 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 238 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
241 @LIBCURL@ 239 @LIBCURL@
242 240
243test_put11_SOURCES = \ 241test_put11_SOURCES = \
244 test_put.c 242 test_put.c
245test_put11_LDADD = \ 243test_put11_LDADD = \
246 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 244 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
247 @LIBCURL@ 245 @LIBCURL@
248 246
249test_large_put_SOURCES = \ 247test_large_put_SOURCES = \
250 test_large_put.c 248 test_large_put.c
251test_large_put_LDADD = \ 249test_large_put_LDADD = \
252 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 250 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
253 @LIBCURL@ 251 @LIBCURL@
254 252
255test_large_put11_SOURCES = \ 253test_large_put11_SOURCES = \
256 test_large_put.c 254 test_large_put.c
257test_large_put11_LDADD = \ 255test_large_put11_LDADD = \
258 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 256 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
259 @LIBCURL@ 257 @LIBCURL@
260 258
261test_long_header_SOURCES = \ 259test_long_header_SOURCES = \
262 test_long_header.c 260 test_long_header.c
263test_long_header_LDADD = \ 261test_long_header_LDADD = \
264 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 262 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
265 @LIBCURL@ 263 @LIBCURL@
266 264
267test_long_header11_SOURCES = \ 265test_long_header11_SOURCES = \
268 test_long_header.c 266 test_long_header.c
269test_long_header11_LDADD = \ 267test_long_header11_LDADD = \
270 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 268 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
271 @LIBCURL@ 269 @LIBCURL@
272 270
273test_iplimit11_SOURCES = \ 271test_iplimit11_SOURCES = \
274 test_iplimit.c 272 test_iplimit.c
275test_iplimit11_LDADD = \ 273test_iplimit11_LDADD = \
276 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 274 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
277 @LIBCURL@ 275 @LIBCURL@
278 276
279test_termination_SOURCES = \ 277test_termination_SOURCES = \
280 test_termination.c 278 test_termination.c
281test_termination_LDADD = \ 279test_termination_LDADD = \
282 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 280 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
283 @LIBCURL@ 281 @LIBCURL@
284 282
285test_timeout_SOURCES = \ 283test_timeout_SOURCES = \
286 test_timeout.c 284 test_timeout.c
287test_timeout_LDADD = \ 285test_timeout_LDADD = \
288 $(top_builddir)/src/microhttpd/libmicrohttpd.la \ 286 $(top_builddir)/src/microhttpd/libmicrohttpd.la \
289 @LIBCURL@ 287 @LIBCURL@
290 288