Index: libevent/test/regress.h =================================================================== --- libevent/test/regress.h (revision 456) +++ libevent/test/regress.h (working copy) @@ -31,13 +31,17 @@ extern "C" { #endif +#ifdef HAVE_EVENT_HTTP void http_suite(void); void http_basic_test(void); void rpc_suite(void); +#endif +#ifdef HAVE_EVENT_DNS void dns_suite(void); - +#endif + #ifdef __cplusplus } #endif Index: libevent/test/Makefile.am =================================================================== --- libevent/test/Makefile.am (revision 456) +++ libevent/test/Makefile.am (working copy) @@ -12,9 +12,20 @@ test_eof_SOURCES = test-eof.c test_weof_SOURCES = test-weof.c test_time_SOURCES = test-time.c -regress_SOURCES = regress.c regress.h regress_http.c regress_dns.c \ - regress_rpc.c \ - regress.gen.c regress.gen.h +if BUILD_EVENT_HTTP +REGRESS_HTTP_SRC = regress_http.c +REGRESS_RPC_SRC = regress_rpc.c regress.gen.c regress.gen.h +endif +if BUILD_EVENT_DNS +REGRESS_DNS_SRC = regress_dns.c +endif + +regress_SOURCES = \ + $(REGRESS_HTTP_SRC) \ + $(REGRESS_RPC_SRC) \ + $(REGRESS_DNS_SRC) \ + $(REGRESS_BEVENTS_SRC) \ + regress.c regress.h bench_SOURCES = bench.c regress.gen.c regress.gen.h: regress.rpc Index: libevent/test/regress.c =================================================================== --- libevent/test/regress.c (revision 456) +++ libevent/test/regress.c (working copy) @@ -60,7 +60,10 @@ #include "log.h" #include "regress.h" + +#ifdef HAVE_EVENT_HTTP #include "regress.gen.h" +#endif int pair[2]; int test_ok; @@ -583,6 +586,7 @@ cleanup_test(); } +#ifdef HAVE_EVENT_BEVENTS void test_evbuffer(void) { @@ -707,6 +711,7 @@ cleanup_test(); } +#endif struct test_pri_event { struct event ev; @@ -816,7 +821,9 @@ cleanup_test(); } +#ifdef HAVE_EVENT_BEVENTS int decode_int(uint32_t *pnumber, struct evbuffer *evbuf); +#endif void read_once_cb(int fd, short event, void *arg) @@ -861,6 +868,8 @@ cleanup_test(); } +#ifdef HAVE_EVENT_BEVENTS + #define TEST_MAX_INT 6 void @@ -957,7 +966,10 @@ fprintf(stdout, "OK\n"); } +#endif +#ifdef HAVE_EVENT_HTTP + void rpc_test(void) { @@ -1030,6 +1042,7 @@ fprintf(stdout, "OK\n"); } +#endif int main (int argc, char **argv) @@ -1054,16 +1067,22 @@ test_priorities(2); test_priorities(3); +#ifdef HAVE_EVENT_BEVENTS test_evbuffer(); test_evbuffer_find(); test_bufferevent(); +#endif +#ifdef HAVE_EVENT_HTTP http_suite(); rpc_suite(); +#endif +#ifdef HAVE_EVENT_DNS dns_suite(); +#endif test_simpleread(); @@ -1086,9 +1105,13 @@ test_want_only_once(); +#ifdef HAVE_EVENT_BEVENTS evtag_test(); +#endif +#ifdef HAVE_EVENT_HTTP rpc_test(); +#endif #ifndef WIN32 test_signal_dealloc();