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" ], [])
24 AC_CHECK_LIB(ssl, SSL_read, [
25 AC_CHECK_LIB(crypto, X509_new, [
26 AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
27 LIBS="$LIBS -lssl -lcrypto"
31 AC_CHECK_LIB(pthread, pthread_create, [
32 AC_CHECK_HEADERS(pthread.h, [
33 LIBS="$LIBS -lpthread"
36 AC_CHECK_LIB(cares, ares_init, [
37 AC_CHECK_HEADERS(ares.h, [
42 // configure config file
43 #include "../../config.h"
45 #define IOHANDLER_MAX_SOCKETS 1024
46 #define IOHANDLER_LOOP_MAXTIME 100000 /* 100ms */
48 #define IOSOCKET_PARSE_DELIMITERS_COUNT 5
49 #define IOSOCKET_PARSE_LINE_LIMIT 1024
50 #define IOSOCKET_PRINTF_LINE_LEN 1024
52 //#define IODNS_USE_THREADS
54 #define IOGC_TIMEOUT 60