X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=configure.ac;h=318b98b476dc710695024b0d2f19d7dfe7377e82;hb=db1e9413159cdfd975bf9ebcd5f43b665b13ab0b;hp=bd831bc0777bf82c978632fbfc855649a1a8d6aa;hpb=9e6045c7b6d7afc774eeb59fa5f5c4e02fe1f037;p=NextIRCd.git diff --git a/configure.ac b/configure.ac index bd831bc..318b98b 100644 --- a/configure.ac +++ b/configure.ac @@ -5,10 +5,10 @@ AC_INIT([IOMultiplexer], [2.0], [iohandler@pk910.de], [pk910], [http://pk910.de] AC_PREFIX_DEFAULT([~/iotest]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) -#AM_SILENT_RULES([yes]) +AM_SILENT_RULES([yes]) AC_CONFIG_HEADERS([config.h]) -#LT_INIT([disable-static]) +LT_INIT([disable-static]) AC_MSG_RESULT($MODULES) AC_SUBST(MODULES) @@ -16,9 +16,10 @@ AC_SUBST(MODULES) # Checks for programs. AC_PROG_AWK AC_PROG_CC +AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET -AC_PROG_RANLIB +AC_PROG_LIBTOOL AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [debug mode (compile using -O0 -Wall -Wshadow -Werror)])], @@ -35,18 +36,44 @@ 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" - ]) +have_gnutls="no" +AC_CHECK_LIB(gnutls, gnutls_init, [ + AC_CHECK_HEADERS(gnutls/gnutls.h, [ + LIBS="$LIBS -lgnutls" + have_gnutls="yes" ]) ]) +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" + ]) + ]) + ]) +fi AC_CHECK_LIB(pthread, pthread_create, [ AC_CHECK_HEADERS(pthread.h, [ LIBS="$LIBS -lpthread" ]) ]) +AC_CHECK_LIB(cares, ares_init, [ + AC_CHECK_HEADERS(ares.h, [ + LIBS="$LIBS -lcares" + ]) +]) -AC_CONFIG_FILES([Makefile src/Makefile src/IOHandler/Makefile src/IOHandler_test/Makefile src/IOHandler_test/socket/Makefile src/IOHandler_test/timer/Makefile]) +AC_CONFIG_FILES([ + Makefile + src/Makefile + src/IOHandler/Makefile + src/IOHandler++/Makefile + src/IOHandler_test/Makefile + src/IOHandler_test/client/Makefile + src/IOHandler_test/client++/Makefile + src/IOHandler_test/client_ssl/Makefile + src/IOHandler_test/server_ssl/Makefile + src/IOHandler_test/timer/Makefile + src/IOHandler_test/resolv/Makefile +]) AC_OUTPUT