1 /* IOHanlder_config.h - IOMultiplexer
2 * Copyright (C) 2014 Philipp Kreil (pk910)
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 /* required configure script checks
20 AC_CHECK_FUNCS([usleep select socket inet_pton inet_ntop])
21 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])
23 AC_CHECK_LIB(ws2_32, main, [ LIBS="$LIBS -lws2_32" ], [])
25 AC_CHECK_LIB(gnutls, gnutls_init, [
26 AC_CHECK_HEADERS(gnutls/gnutls.h, [
31 if test x"$have_gnutls" = xno; then
32 AC_CHECK_LIB(ssl, SSL_read, [
33 AC_CHECK_LIB(crypto, X509_new, [
34 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
35 LIBS="$LIBS -lssl -lcrypto"
40 AC_CHECK_LIB(pthread, pthread_create, [
41 AC_CHECK_HEADERS(pthread.h, [
42 LIBS="$LIBS -lpthread"
45 AC_CHECK_LIB(cares, ares_init, [
46 AC_CHECK_HEADERS(ares.h, [
51 // configure config file
52 #include "../../config.h"
54 #define IOHANDLER_MAX_SOCKETS 1024
55 #define IOHANDLER_LOOP_MAXTIME 100000 /* 100ms */
57 #define IOSOCKET_PARSE_DELIMITERS_COUNT 5
58 #define IOSOCKET_PARSE_LINE_LIMIT 1024
59 #define IOSOCKET_PRINTF_LINE_LEN 1024
61 //#define IODNS_USE_THREADS
63 #define IOGC_TIMEOUT 60