X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=configure.ac;h=e75bc48a9bcb19ff480853ff11a681f5e7959252;hb=8a990d2c87f8f8a6ca26dd2c6afef161dab2eb9e;hp=95d0bdd0afa00fcf59a1539a542d51f125f3c35e;hpb=003f6906aeb911cce26ee25b48a818d0d1c4aea5;p=NeonServV5.git diff --git a/configure.ac b/configure.ac index 95d0bdd..e75bc48 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,14 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([NeonServ], [5.2], [bugs@pk910.de], [neonserv], [http://neonserv.krypton-bouncer.de]) +AC_INIT([NeonServ], [5.3], [bugs@pk910.de], [neonserv], [http://neonserv.krypton-bouncer.de]) AC_PREFIX_DEFAULT([~/neonserv]) +AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_CONFIG_HEADERS([config.h]) +LT_INIT([disable-static]) + # Checks for programs. AC_PROG_CC AC_PROG_AWK @@ -31,15 +34,51 @@ AC_ARG_WITH([winsock], [WINSOCK_LIBS='']) AC_SUBST([WINSOCK_LIBS]) +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, [ - LIBS="$LIBS -lssl -lcrypto" - AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL]) + do_have_ssl="yes"; ]) ]) ]) +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, [ + do_have_threads="yes" + ]) +]) + +AC_ARG_ENABLE([threads], + [AS_HELP_STRING([--enable-threads], [use threads if possible])], + [ + if test x"$do_have_threads" = xyes; then + LIBS="$LIBS -lpthread" + AC_DEFINE([HAVE_THREADS], 1, [Define if you have Threads]) + fi + ], + []) + +AC_ARG_ENABLE([memory-debug], + [AS_HELP_STRING([--enable-memory-debug], [run memory debugger])], + [ + AC_DEFINE([ENABLE_MEMORY_DEBUG], 1, [Define if you enable memoryDebug.c]) + ], + []) + +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], [debug mode (compile using -O0 -Wall -Wshadow -Werror)])], + [CFLAGS='-g -O0 -Wall -Wshadow -Werror'], + [CFLAGS='-g -O2']) + +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]) @@ -49,5 +88,7 @@ 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]) -AC_CONFIG_FILES([Makefile]) +MY_SUBDIRS="src" +AC_SUBST(MY_SUBDIRS) +AC_CONFIG_FILES(Makefile src/Makefile src/modules/Makefile) AC_OUTPUT \ No newline at end of file