X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=configure.ac;h=29e982775c2fb6663d8917e8e6f710097339a6ba;hp=4275959d2caf16b73054236bb343d5bfcd31e588;hb=HEAD;hpb=2487ad21511a08b1b29c28aeb893155cb779a8f8 diff --git a/configure.ac b/configure.ac index 4275959..29e9827 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,13 @@ AC_FUNC_MALLOC AC_CHECK_FUNCS([usleep select socket inet_pton inet_ntop]) AC_CHECK_HEADERS([fcntl.h sys/socket.h sys/select.h sys/time.h sys/types.h unistd.h windows.h winsock2.h errno.h sys/epoll.h sys/event.h]) -AC_CHECK_LIB(ws2_32, main, [ LIBS="$LIBS -lws2_32" ], []) +AC_CHECK_LIB(ws2_32, main, [ + LIBS="$LIBS -lws2_32" + is_win32="yes" +], [ + is_win32="no" +]) + have_gnutls="no" AC_CHECK_LIB(gnutls, gnutls_init, [ AC_CHECK_HEADERS(gnutls/gnutls.h, [ @@ -44,14 +50,16 @@ AC_CHECK_LIB(gnutls, gnutls_init, [ ]) ]) if test x"$have_gnutls" = xno; then - AC_CHECK_LIB(ssl, SSL_read, [ - AC_CHECK_LIB(crypto, X509_new, [ - AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [ - LIBS="$LIBS -lssl -lcrypto" - ]) - ]) - ]) + if test x$is_win32 = xyes ; then + openssl_deps="-lcrypto -lgdi32" + else + openssl_deps="-lcrypto" + fi + AC_CHECK_LIB([ssl],[SSL_library_init], [ + LIBS="$LIBS -lssl $openssl_deps" + ], [AC_MSG_ERROR([OpenSSL libraries required])], $openssl_deps) fi + AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_HEADERS(pthread.h, [ LIBS="$LIBS -lpthread" @@ -63,6 +71,7 @@ AC_CHECK_LIB(cares, ares_init, [ ]) ]) + AC_CONFIG_FILES([ Makefile src/Makefile @@ -72,6 +81,7 @@ AC_CONFIG_FILES([ src/IOHandler_test/client/Makefile src/IOHandler_test/client++/Makefile src/IOHandler_test/client_ssl/Makefile + src/IOHandler_test/server/Makefile src/IOHandler_test/server_ssl/Makefile src/IOHandler_test/timer/Makefile src/IOHandler_test/timer++/Makefile