added UserBot rejoin system
[NeonServV5.git] / configure.ac
index e75bc48a9bcb19ff480853ff11a681f5e7959252..6a52e3c9abb083e4a731c73ec010ba1791f54c55 100644 (file)
@@ -1,10 +1,11 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.67])
-AC_INIT([NeonServ], [5.3], [bugs@pk910.de], [neonserv], [http://neonserv.krypton-bouncer.de])
+AC_INIT([NeonServ], [5.5], [bugs@pk910.de], [neonserv], [http://neonserv.krypton-bouncer.de])
 AC_PREFIX_DEFAULT([~/neonserv])
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_SILENT_RULES([yes])
 AC_CONFIG_HEADERS([config.h])
 
 LT_INIT([disable-static])
@@ -28,26 +29,21 @@ AC_ARG_WITH([mysql-lib],
   [MYSQL_LIBS='-lmysqlclient'])
 AC_SUBST([MYSQL_LIBS])
 
-AC_ARG_WITH([winsock],
-  [AS_HELP_STRING([--with-winsock], [use winsock (WIN32 systems)])],
-  [WINSOCK_LIBS='-lws2_32'],
-  [WINSOCK_LIBS=''])
-AC_SUBST([WINSOCK_LIBS])
+AC_CHECK_LIB([ws2_32], [_head_libws2_32_a], [LIBS="$LIBS -lws2_32"])
+AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS -ldl"])
+AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS -lpthread"])
+AC_CHECK_LIB([ssl], [SSL_read], [LIBS="$LIBS -lssl"])
+AC_CHECK_LIB([crypto], [X509_new], [LIBS="$LIBS -lcrypto"])
 
 do_have_ssl="no";
 AC_CHECK_LIB(ssl, SSL_read, [
   AC_CHECK_LIB(crypto, X509_new, [
     AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
-      do_have_ssl="yes";
+      AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL])
     ])
   ])
 ])
 
-if test x"$do_have_ssl" = xyes; then
-  LIBS="$LIBS -lssl -lcrypto"
-  AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL])
-fi
-
 do_have_threads="no";
 AC_CHECK_LIB(pthread, pthread_create, [
   AC_CHECK_HEADERS(pthread.h, [
@@ -80,7 +76,7 @@ AC_ARG_ENABLE([debug],
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
 
 # Checks for header files.
-AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h])
+AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h pthread.h sys/epoll.h sys/kevent.h openssl/ssl.h openssl/err.h openssl/rand.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 
@@ -88,7 +84,5 @@ AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([gethostbyname memset select socket strchr strdup strstr])
 
-MY_SUBDIRS="src"
-AC_SUBST(MY_SUBDIRS)
-AC_CONFIG_FILES(Makefile src/Makefile src/modules/Makefile)
+AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
\ No newline at end of file