X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=configure.ac;h=f0bc9a63c1f518594b344704a7db2ebf6f054824;hp=aa5b500c48416c132aef6208d20914ec46576a36;hb=981be1f880efeca4ecac1156317f6dbebf707087;hpb=4ec553e7da1550129721795a95d9cfaa4166d28d diff --git a/configure.ac b/configure.ac index aa5b500..f0bc9a6 100644 --- a/configure.ac +++ b/configure.ac @@ -35,15 +35,23 @@ 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(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" - ]) - ]) +AC_CHECK_LIB(ws2_32, main, [ + LIBS="$LIBS -lws2_32" + is_win32="yes" +], [ + is_win32="no" ]) + +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) + AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_HEADERS(pthread.h, [ LIBS="$LIBS -lpthread"