X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=configure.in;h=3d4c6404aa64642407248f51b63793af175122fc;hp=221875dc4c7bd68cb30d7ba907619cfb2e2ea67a;hb=c414d0bd3ae670fdcc5d1b81c4e01b486bca91d8;hpb=68835a1d1acb36a5e38870a83a261a969b1878e4 diff --git a/configure.in b/configure.in index 221875dc..3d4c6404 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2008 Alexander Barton +# Copyright (c)2001-2009 Alexander Barton # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,12 +12,14 @@ # -- Initialisation -- AC_PREREQ(2.50) -AC_INIT(ngircd, 14) +AC_INIT(ngircd, 15) AC_CONFIG_SRCDIR(src/ngircd/ngircd.c) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(1.6) AM_CONFIG_HEADER(src/config.h) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + # -- Templates for config.h -- AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled]) @@ -31,6 +33,7 @@ AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used]) AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled]) AH_TEMPLATE([ZEROCONF], [Define if support for Zeroconf should be included]) AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests]) +AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists]) AH_TEMPLATE([TARGET_OS], [Target operating system name]) AH_TEMPLATE([TARGET_VENDOR], [Target system vendor]) @@ -71,7 +74,6 @@ AC_DEFUN([GCC_STACK_PROTECT_CC],[ fi ]) - if test "$GCC" = "yes"; then # We are using the GNU C compiler. Good! CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes" @@ -123,6 +125,8 @@ AC_TRY_COMPILE([ AC_TYPE_SIGNAL AC_TYPE_SIZE_T +AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, + [#include ]) # -- Libraries -- @@ -139,7 +143,8 @@ AC_CHECK_FUNCS([ \ bind gethostbyaddr gethostbyname gethostname inet_ntoa \ setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!])) -AC_CHECK_FUNCS(inet_aton isdigit sigaction snprintf vsnprintf strdup strlcpy strlcat strtok_r) +AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton isdigit sigaction snprintf \ + vsnprintf strdup strlcpy strlcat strtok_r) # -- Configuration options -- @@ -313,7 +318,7 @@ fi AC_ARG_WITH(openssl, [ --with-openssl enable SSL support using OpenSSL], - [ if test "$withval" = "yes"; then + [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS" @@ -330,7 +335,7 @@ AC_ARG_WITH(openssl, AC_ARG_WITH(gnutls, [ --with-gnutls enable SSL support using gnutls], - [ if test "$withval" = "yes"; then + [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS" @@ -477,6 +482,8 @@ AC_ARG_ENABLE(ipv6, if test "$enableval" = "yes"; then x_ipv6_on=yes; fi ) if test "$x_ipv6_on" = "yes"; then + # getaddrinfo() and getnameinfo() are optional when not compiling + # with IPv6 support, but are required for IPv6 to work! AC_CHECK_FUNCS([ \ getaddrinfo getnameinfo \ ],,AC_MSG_ERROR([required function missing for IPv6 support!]))