From 7c7d9a51ab765ac4cc1bcea802369bd7d20165bc Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 15 Mar 2014 00:24:55 +0100 Subject: [PATCH] [IOMultiplexerV2] updated configure.ac to link against c-ares if required --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 09c3ada..dfd4bc6 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ CFLAGS="$CFLAGS -D_GNU_SOURCE" 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 ares.h]) +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, [ @@ -48,6 +48,11 @@ AC_CHECK_LIB(pthread, pthread_create, [ 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++/Makefile src/IOHandler_test/Makefile src/IOHandler_test/socket/Makefile src/IOHandler_test/socket++/Makefile src/IOHandler_test/timer/Makefile]) AC_OUTPUT -- 2.20.1