From e4fe084619abee17b83be26e68f355e5c0ce6899 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sat, 2 May 2009 17:58:38 +0200 Subject: [PATCH] Use embedded evhttp --- configure.in | 8 ++++---- src/Makefile.am | 2 ++ src/httpd.c | 2 +- src/httpd.h | 2 +- src/httpd_daap.c | 2 +- src/httpd_daap.h | 2 +- src/httpd_rsp.c | 2 +- src/httpd_rsp.h | 2 +- src/transcode.c | 2 +- src/transcode.h | 2 +- 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 3b194e8c..3f1e27ec 100644 --- a/configure.in +++ b/configure.in @@ -60,10 +60,10 @@ PKG_CHECK_MODULES(MINIXML, [ mxml ]) AC_CHECK_HEADER(event.h, , AC_MSG_ERROR([event.h not found])) AC_CHECK_LIB([event_core], [event_init], [LIBEVENT_LIBS="-levent_core"], AC_MSG_ERROR([libevent not found])) AC_CHECK_HEADER(evhttp.h, , AC_MSG_ERROR([evhttp.h not found])) -save_LIBS="$LIBS" -LIBS=-levent_core -AC_CHECK_LIB([event_extra], [evhttp_new], [LIBEVENT_LIBS="$LIBEVENT_LIBS -levent_extra"], AC_MSG_ERROR([libevent not found])) -LIBS="$save_LIBS" +dnl save_LIBS="$LIBS" +dnl LIBS=-levent_core +dnl AC_CHECK_LIB([event_extra], [evhttp_new], [LIBEVENT_LIBS="$LIBEVENT_LIBS -levent_extra"], AC_MSG_ERROR([libevent not found])) +dnl LIBS="$save_LIBS" AC_SUBST(LIBEVENT_LIBS) AC_CHECK_HEADER(avl.h, , AC_MSG_ERROR([avl.h not found])) diff --git a/src/Makefile.am b/src/Makefile.am index cebc4084..6808f106 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,6 +20,8 @@ mt_daapd_SOURCES = main.c daapd.h webserver.c \ filescanner.c filescanner.h \ filescanner_ffmpeg.c filescanner_urlfile.c filescanner_m3u.c \ mdns_avahi.c mdns_avahi.h \ + evhttp/http.c evhttp/evhttp.h evhttp/strlcpy.c evhttp/log.c \ + evhttp/http-internal.h evhttp/log.h evhttp/strlcpy-internal.h \ httpd.c httpd.h \ httpd_rsp.c httpd_rsp.h \ httpd_daap.c httpd_daap.h \ diff --git a/src/httpd.c b/src/httpd.c index f6d272b5..3e57902f 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -32,7 +32,7 @@ #include #include -#include +#include "evhttp/evhttp.h" #include "daapd.h" #include "err.h" diff --git a/src/httpd.h b/src/httpd.h index f7826617..142e117e 100644 --- a/src/httpd.h +++ b/src/httpd.h @@ -3,7 +3,7 @@ #define __HTTPD_H__ #include -#include +#include "evhttp/evhttp.h" void diff --git a/src/httpd_daap.c b/src/httpd_daap.c index 1d225d81..0240622f 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -35,7 +35,7 @@ #include #include -#include +#include "evhttp/evhttp.h" #include #include "daapd.h" diff --git a/src/httpd_daap.h b/src/httpd_daap.h index 4b96cee4..2a1f2ed5 100644 --- a/src/httpd_daap.h +++ b/src/httpd_daap.h @@ -3,7 +3,7 @@ #define __HTTPD_DAAP_H__ #include -#include +#include "evhttp/evhttp.h" int daap_init(void); diff --git a/src/httpd_rsp.c b/src/httpd_rsp.c index 45c38c34..4531db31 100644 --- a/src/httpd_rsp.c +++ b/src/httpd_rsp.c @@ -33,7 +33,7 @@ #include #include -#include +#include "evhttp/evhttp.h" #include diff --git a/src/httpd_rsp.h b/src/httpd_rsp.h index f887ed32..3c746d4e 100644 --- a/src/httpd_rsp.h +++ b/src/httpd_rsp.h @@ -3,7 +3,7 @@ #define __HTTPD_RSP_H__ #include -#include +#include "evhttp/evhttp.h" int rsp_init(void); diff --git a/src/transcode.c b/src/transcode.c index e85a4cd3..a3e7822e 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -34,7 +34,7 @@ #include #include -#include +#include "evhttp/evhttp.h" #include #include diff --git a/src/transcode.h b/src/transcode.h index b0a94c2c..6a3ccab5 100644 --- a/src/transcode.h +++ b/src/transcode.h @@ -2,7 +2,7 @@ #ifndef __TRANSCODE_H__ #define __TRANSCODE_H__ -#include +#include "evhttp/evhttp.h" struct transcode_ctx;