From bc6eb66d3b5ecfdd31486e8541d79d99e31d0037 Mon Sep 17 00:00:00 2001 From: pk910 Date: Mon, 13 Aug 2012 16:37:38 +0200 Subject: [PATCH] changed Makefile.am to compile IOMultiplexer files --- Makefile.am | 6 ++++++ configure.ac | 19 +++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index f1cf173..8a5caf6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -172,6 +172,12 @@ libNeonFun_la_LDFLAGS = -module -rpath /nowhere -avoid-version -no-undefined libNeonFun_la_LIBADD = $(MYSQL_LIBS) neonserv_SOURCES = src/version.c \ + src/IOEngine_epoll.c \ + src/IOEngine_kevent.c \ + src/IOEngine_select.c \ + src/IOEngine_win32.c \ + src/IOHandler.c \ + src/IOHandler_SSL.c \ src/EventLogger.c \ src/IRCEvents.c \ src/main.c \ diff --git a/configure.ac b/configure.ac index 4ba0fac..6a52e3c 100644 --- a/configure.ac +++ b/configure.ac @@ -29,26 +29,21 @@ AC_ARG_WITH([mysql-lib], [MYSQL_LIBS='-lmysqlclient']) AC_SUBST([MYSQL_LIBS]) -AC_ARG_WITH([winsock], - [AS_HELP_STRING([--with-winsock], [use winsock (WIN32 systems)])], - [SYSTEM_LIBS='-lws2_32'], - [SYSTEM_LIBS='-ldl']) -AC_SUBST([SYSTEM_LIBS]) +AC_CHECK_LIB([ws2_32], [_head_libws2_32_a], [LIBS="$LIBS -lws2_32"]) +AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS -ldl"]) +AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS -lpthread"]) +AC_CHECK_LIB([ssl], [SSL_read], [LIBS="$LIBS -lssl"]) +AC_CHECK_LIB([crypto], [X509_new], [LIBS="$LIBS -lcrypto"]) do_have_ssl="no"; AC_CHECK_LIB(ssl, SSL_read, [ AC_CHECK_LIB(crypto, X509_new, [ AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [ - do_have_ssl="yes"; + AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL]) ]) ]) ]) -if test x"$do_have_ssl" = xyes; then - LIBS="$LIBS -lssl -lcrypto" - AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL]) -fi - do_have_threads="no"; AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_HEADERS(pthread.h, [ @@ -81,7 +76,7 @@ AC_ARG_ENABLE([debug], CFLAGS="$CFLAGS -D_GNU_SOURCE" # Checks for header files. -AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h]) +AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h pthread.h sys/epoll.h sys/kevent.h openssl/ssl.h openssl/err.h openssl/rand.h]) # Checks for typedefs, structures, and compiler characteristics. -- 2.20.1