From 25c216cbdf0a5db739bdf0551db16a510e8ac4a1 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:13:17 +0200 Subject: configure.in: sort some lists (templates, output, ...) --- configure.in | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 52435fd4..7a15b2ba 100644 --- a/configure.in +++ b/configure.in @@ -25,17 +25,17 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # -- Templates for config.h -- AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled]) +AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists]) AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists]) +AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests]) +AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used]) +AH_TEMPLATE([PAM], [Define if PAM should be used]) AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled]) AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant]) AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging]) -AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled]) AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used]) -AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used]) AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled]) -AH_TEMPLATE([IDENTAUTH], [Define if the server should do IDENT requests]) -AH_TEMPLATE([PAM], [Define if PAM should be used]) -AH_TEMPLATE([HAVE_sockaddr_in_len], [Define if sockaddr_in.sin_len exists]) +AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled]) AH_TEMPLATE([TARGET_OS], [Target operating system name]) AH_TEMPLATE([TARGET_VENDOR], [Target system vendor]) @@ -57,9 +57,9 @@ AC_PROG_RANLIB # -- Compiler Features -- -AM_C_PROTOTYPES AC_C_CONST AC_C_INLINE +AM_C_PROTOTYPES # -- Hard coded system and compiler dependencies/features/options ... -- @@ -101,8 +101,8 @@ CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'" # -- Headers -- AC_HEADER_STDC -AC_HEADER_TIME AC_HEADER_SYS_WAIT +AC_HEADER_TIME AC_CHECK_HEADERS([ \ ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \ @@ -544,21 +544,21 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END" AC_OUTPUT([ \ Makefile \ + contrib/Anope/Makefile \ + contrib/Debian/Makefile \ + contrib/MacOSX/Makefile \ + contrib/MacOSX/ngIRCd.pmdoc/Makefile \ + contrib/MacOSX/ngIRCd.xcodeproj/Makefile \ + contrib/Makefile \ doc/Makefile \ doc/src/Makefile \ - src/Makefile \ - src/portab/Makefile \ + man/Makefile \ src/ipaddr/Makefile \ - src/tool/Makefile \ + src/Makefile \ src/ngircd/Makefile \ + src/portab/Makefile \ src/testsuite/Makefile \ - man/Makefile \ - contrib/Makefile \ - contrib/Anope/Makefile \ - contrib/Debian/Makefile \ - contrib/MacOSX/Makefile \ - contrib/MacOSX/ngIRCd.xcodeproj/Makefile \ - contrib/MacOSX/ngIRCd.pmdoc/Makefile \ + src/tool/Makefile \ ]) type dpkg >/dev/null 2>&1 -- cgit 1.4.1 From 67e882d4bbda97fb65ed4d58ae44e6c79d4cb708 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:30:49 +0200 Subject: configure.in: require autoconf 2.67 and automake 1.11 And use newer features such as bug reporting address and project URL. --- configure.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 7a15b2ba..0f0cac02 100644 --- a/configure.in +++ b/configure.in @@ -13,12 +13,15 @@ define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d # -- Initialisation -- -AC_PREREQ(2.50) -AC_INIT(ngircd, VERSION_ID) -AC_CONFIG_SRCDIR(src/ngircd/ngircd.c) +AC_PREREQ([2.67]) +AC_INIT([ngIRCd], VERSION_ID, + [ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/]) + +AC_CONFIG_SRCDIR([src/ngircd/ngircd.c]) +AC_CONFIG_HEADER([src/config.h]) AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE(1.6) -AC_CONFIG_HEADER(src/config.h) + +AM_INIT_AUTOMAKE([1.11]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- cgit 1.4.1 From 47ad9afcf38d91059dd23dc2e6f6c2d9d4c3ad80 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:32:17 +0200 Subject: configure.in: Update checks for required and optional features Update checks for required and optional header files, data types, and functions. --- configure.in | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 0f0cac02..c7265964 100644 --- a/configure.in +++ b/configure.in @@ -107,25 +107,17 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME +# Required header files AC_CHECK_HEADERS([ \ - ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \ - stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \ + fcntl.h inttypes.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h \ + string.h strings.h sys/socket.h sys/time.h unistd.h \ ],,AC_MSG_ERROR([required C header missing!])) +# Optional header files AC_CHECK_HEADERS([ \ - arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \ - ],[],[],[[ - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_NETINET_IN_H - #include - #endif - ]] -) + arpa/inet.h malloc.h netinet/ip.h stdbool.h stddef.h stdint.h \ + varargs.h \ + ]) # -- Datatypes -- @@ -142,8 +134,14 @@ AC_TRY_COMPILE([ AC_MSG_RESULT(no) ]) +AC_TYPE_PID_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT8_T AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, [#include ]) @@ -159,16 +157,22 @@ AC_CHECK_LIB(socket,bind) # -- Functions -- AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_REALLOC AC_FUNC_STRFTIME +# Required functions AC_CHECK_FUNCS([ \ - bind gethostbyaddr gethostbyname gethostname inet_ntoa \ - setsid setsockopt socket strcasecmp waitpid],, + alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \ + gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \ + strchr strcspn strerror strncasecmp strrchr strspn strstr \ + ],, AC_MSG_ERROR([required function missing!])) +# Optional functions AC_CHECK_FUNCS([ \ - gai_strerror getaddrinfo getnameinfo inet_aton sigaction \ - sigprocmask snprintf vsnprintf strdup strlcpy strlcat strtok_r]) + gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \ + snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid]) # -- Configuration options -- -- cgit 1.4.1 From 2478c5816bca01c73b7c832945ddbeb815922ce0 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:34:30 +0200 Subject: configure.in: Don't use AC_C_PROTOTYPES Don't use AC_C_PROTOTYPES, AM_C_PROTOTYPES is already used. --- configure.in | 1 - 1 file changed, 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index c7265964..d3cc86b6 100644 --- a/configure.in +++ b/configure.in @@ -48,7 +48,6 @@ AH_TEMPLATE([TARGET_CPU], [Target CPU name]) AC_PROG_CC AC_PROG_CC_STDC -AC_C_PROTOTYPES # -- Helper programs -- -- cgit 1.4.1 From 2e13e821f89d38ebb3b6b90d44f1a40f9c61fb31 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 11 Sep 2012 14:36:02 +0200 Subject: configure.in: Use AC_CONFIG_FILES macro --- configure.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index d3cc86b6..20102d4e 100644 --- a/configure.in +++ b/configure.in @@ -548,7 +548,7 @@ test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END" # -- Generate files -- -AC_OUTPUT([ \ +AC_CONFIG_FILES([ \ Makefile \ contrib/Anope/Makefile \ contrib/Debian/Makefile \ @@ -567,6 +567,8 @@ AC_OUTPUT([ \ src/tool/Makefile \ ]) +AC_OUTPUT + type dpkg >/dev/null 2>&1 if test $? -eq 0; then # Generate debian/ link if the dpkg command exists -- cgit 1.4.1 From d53d58fff21a306ac0de20153a215121547bcd84 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 12 Sep 2012 16:01:11 +0200 Subject: configure.in: inttypes.h is an optional header file --- configure.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 20102d4e..b65d1558 100644 --- a/configure.in +++ b/configure.in @@ -108,14 +108,14 @@ AC_HEADER_TIME # Required header files AC_CHECK_HEADERS([ \ - fcntl.h inttypes.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h \ - string.h strings.h sys/socket.h sys/time.h unistd.h \ + fcntl.h netdb.h netinet/in.h netinet/in_systm.h stdlib.h string.h \ + strings.h sys/socket.h sys/time.h unistd.h \ ],,AC_MSG_ERROR([required C header missing!])) # Optional header files AC_CHECK_HEADERS([ \ - arpa/inet.h malloc.h netinet/ip.h stdbool.h stddef.h stdint.h \ - varargs.h \ + arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \ + stdint.h varargs.h \ ]) # -- Datatypes -- -- cgit 1.4.1 From 82bf4eb0591631e638120e0540fbbb7ceb4e19a9 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 13 Sep 2012 00:06:08 +0200 Subject: configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET) See the autoconf manual for details: http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets --- configure.in | 19 +++++++++---------- src/ngircd/login.c | 4 ++-- src/ngircd/ngircd.c | 6 +++--- src/portab/portab.h | 14 +++++++------- 4 files changed, 21 insertions(+), 22 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b65d1558..0f6af2a0 100644 --- a/configure.in +++ b/configure.in @@ -19,7 +19,7 @@ AC_INIT([ngIRCd], VERSION_ID, AC_CONFIG_SRCDIR([src/ngircd/ngircd.c]) AC_CONFIG_HEADER([src/config.h]) -AC_CANONICAL_TARGET +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([1.11]) @@ -40,9 +40,9 @@ AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used]) AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled]) AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled]) -AH_TEMPLATE([TARGET_OS], [Target operating system name]) -AH_TEMPLATE([TARGET_VENDOR], [Target system vendor]) -AH_TEMPLATE([TARGET_CPU], [Target CPU name]) +AH_TEMPLATE([HOST_OS], [Target operating system name]) +AH_TEMPLATE([HOST_VENDOR], [Target system vendor]) +AH_TEMPLATE([HOST_CPU], [Target CPU name]) # -- C Compiler -- @@ -87,7 +87,7 @@ if test "$GCC" = "yes"; then GCC_STACK_PROTECT_CC fi -case "$target_os" in +case "$host_os" in hpux*) # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED # (tested with HP/UX 11.11) @@ -538,9 +538,9 @@ AC_ARG_ENABLE(strict-rfc, # -- Definitions -- -AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" ) -AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" ) -AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" ) +AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" ) +AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" ) +AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" ) # Add additional CFLAGS, eventually specified on the command line, but after # running this configure script. Useful for "-Werror" for example. @@ -590,8 +590,7 @@ C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}` M=`eval echo ${mandir}` ; M=`eval echo ${M}` D=`eval echo ${docdir}` ; D=`eval echo ${D}` -echo " Target: ${target}" -test "$target" != "$host" && echo " Host: ${host}" +echo " Host: ${host}" echo " Compiler: ${CC}" test -n "$CFLAGS" && echo " Compiler flags: ${CFLAGS}" test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}" diff --git a/src/ngircd/login.c b/src/ngircd/login.c index 460fcd1e..d79344b5 100644 --- a/src/ngircd/login.c +++ b/src/ngircd/login.c @@ -163,8 +163,8 @@ Login_User_PostAuth(CLIENT *Client) return false; if (!IRC_WriteStrClient (Client, RPL_YOURHOST_MSG, Client_ID(Client), - Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU, - TARGET_VENDOR, TARGET_OS)) + Client_ID(Client_ThisServer()), PACKAGE_VERSION, HOST_CPU, + HOST_VENDOR, HOST_OS)) return false; if (!IRC_WriteStrClient (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr)) diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 67bc4df4..44c4ca79 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -405,11 +405,11 @@ Fill_Version( void ) if( NGIRCd_VersionAddition[0] ) strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition )); + strlcat( NGIRCd_VersionAddition, HOST_CPU, sizeof( NGIRCd_VersionAddition )); strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition )); + strlcat( NGIRCd_VersionAddition, HOST_VENDOR, sizeof( NGIRCd_VersionAddition )); strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition )); - strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition )); + strlcat( NGIRCd_VersionAddition, HOST_OS, sizeof( NGIRCd_VersionAddition )); snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s", PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition); diff --git a/src/portab/portab.h b/src/portab/portab.h index 90f36a0e..1c6e3f85 100644 --- a/src/portab/portab.h +++ b/src/portab/portab.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2010 Alexander Barton (alex@barton.de) + * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. * * 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 @@ -120,16 +120,16 @@ typedef unsigned char bool; /* target constants */ -#ifndef TARGET_OS -#define TARGET_OS "unknown" +#ifndef HOST_OS +#define HOST_OS "unknown" #endif -#ifndef TARGET_CPU -#define TARGET_CPU "unknown" +#ifndef HOST_CPU +#define HOST_CPU "unknown" #endif -#ifndef TARGET_VENDOR -#define TARGET_VENDOR "unknown" +#ifndef HOST_VENDOR +#define HOST_VENDOR "unknown" #endif -- cgit 1.4.1 From a451cb22f1906de2c0ed354b1e79eaae654b3abd Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 13 Sep 2012 00:25:09 +0200 Subject: configure.in: use AS_HELP_STRING macro --- configure.in | 51 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 17 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 0f6af2a0..5be4a541 100644 --- a/configure.in +++ b/configure.in @@ -179,7 +179,8 @@ AC_CHECK_FUNCS([ \ x_syslog_on=no AC_ARG_WITH(syslog, - [ --without-syslog disable syslog (autodetected by default)], + AS_HELP_STRING([--without-syslog], + [disable syslog (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -206,7 +207,8 @@ fi x_zlib_on=no AC_ARG_WITH(zlib, - [ --without-zlib disable zlib compression (autodetected by default)], + AS_HELP_STRING([--without-zlib], + [disable zlib compression (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -233,7 +235,8 @@ fi x_io_backend=none AC_ARG_WITH(select, - [ --without-select disable select IO support (autodetected by default)], + AS_HELP_STRING([--without-select], + [disable select IO support (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -251,7 +254,8 @@ AC_ARG_WITH(select, ) AC_ARG_WITH(poll, - [ --without-poll disable poll support (autodetected by default)], + AS_HELP_STRING([--without-poll], + [disable poll support (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -277,7 +281,8 @@ AC_ARG_WITH(poll, ) AC_ARG_WITH(devpoll, - [ --without-devpoll disable /dev/poll IO support (autodetected by default)], + AS_HELP_STRING([--without-devpoll], + [disable /dev/poll IO support (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -294,7 +299,8 @@ AC_ARG_WITH(devpoll, ) AC_ARG_WITH(epoll, - [ --without-epoll disable epoll IO support (autodetected by default)], + AS_HELP_STRING([--without-epoll], + [disable epoll IO support (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -312,7 +318,8 @@ AC_ARG_WITH(epoll, ) AC_ARG_WITH(kqueue, - [ --without-kqueue disable kqueue IO support (autodetected by default)], + AS_HELP_STRING([--without-kqueue], + [disable kqueue IO support (autodetected by default)]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -352,7 +359,8 @@ fi # use SSL? AC_ARG_WITH(openssl, - [ --with-openssl enable SSL support using OpenSSL], + AS_HELP_STRING([--with-openssl], + [enable SSL support using OpenSSL]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -369,7 +377,8 @@ AC_ARG_WITH(openssl, ) AC_ARG_WITH(gnutls, - [ --with-gnutls enable SSL support using gnutls], + AS_HELP_STRING([--with-gnutls], + [enable SSL support using gnutls]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -399,7 +408,8 @@ fi x_tcpwrap_on=no AC_ARG_WITH(tcp-wrappers, - [ --with-tcp-wrappers enable TCP wrappers support], + AS_HELP_STRING([--with-tcp-wrappers], + [enable TCP wrappers support]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -430,7 +440,8 @@ int deny_severity = 0; x_identauth_on=no AC_ARG_WITH(ident, - [ --with-ident enable "IDENT" ("AUTH") protocol support], + AS_HELP_STRING([--with-ident], + [enable "IDENT" ("AUTH") protocol support]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -453,7 +464,8 @@ fi x_pam_on=no AC_ARG_WITH(pam, - [ --with-pam enable user authentication using PAM], + AS_HELP_STRING([--with-pam], + [enable user authentication using PAM]), [ if test "$withval" != "no"; then if test "$withval" != "yes"; then CFLAGS="-I$withval/include $CFLAGS" @@ -480,7 +492,8 @@ fi x_ircplus_on=yes AC_ARG_ENABLE(ircplus, - [ --disable-ircplus disable IRC+ protocol], + AS_HELP_STRING([--disable-ircplus], + [disable IRC+ protocol]), if test "$enableval" = "no"; then x_ircplus_on=no; fi ) if test "$x_ircplus_on" = "yes"; then @@ -490,7 +503,8 @@ fi # enable support for IPv6? x_ipv6_on=no AC_ARG_ENABLE(ipv6, - [ --enable-ipv6 enable IPv6 protocol support], + AS_HELP_STRING([--enable-ipv6], + [enable IPv6 protocol support]), if test "$enableval" = "yes"; then x_ipv6_on=yes; fi ) if test "$x_ipv6_on" = "yes"; then @@ -506,7 +520,8 @@ fi x_sniffer_on=no; x_debug_on=no AC_ARG_ENABLE(sniffer, - [ --enable-sniffer enable IRC traffic sniffer (enables debug mode)], + AS_HELP_STRING([--enable-sniffer], + [enable IRC traffic sniffer (enables debug mode)]), if test "$enableval" = "yes"; then AC_DEFINE(SNIFFER, 1) x_sniffer_on=yes; x_debug_on=yes @@ -516,7 +531,8 @@ AC_ARG_ENABLE(sniffer, # enable additional debugging code? AC_ARG_ENABLE(debug, - [ --enable-debug show additional debug output], + AS_HELP_STRING([--enable-debug], + [show additional debug output]), if test "$enableval" = "yes"; then x_debug_on=yes; fi ) if test "$x_debug_on" = "yes"; then @@ -529,7 +545,8 @@ fi x_strict_rfc_on=no AC_ARG_ENABLE(strict-rfc, - [ --enable-strict-rfc strict RFC conformance -- may break clients!], + AS_HELP_STRING([--enable-strict-rfc], + [strict RFC conformance -- may break clients!]), if test "$enableval" = "yes"; then AC_DEFINE(STRICT_RFC, 1) x_strict_rfc_on=yes -- cgit 1.4.1 From ebf2f991b58372e01e018e0f769762b85360ed3e Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 13 Sep 2012 16:40:04 +0200 Subject: configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB) Use the AC_SEARCH_LIBS macro to test for "sometimes but not always" required libraries, not AC_CHECK_LIB. --- configure.in | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 5be4a541..468e927b 100644 --- a/configure.in +++ b/configure.in @@ -147,11 +147,18 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),, # -- Libraries -- -# A/UX needs this. -AC_CHECK_LIB(UTIL,memmove) -# needed on solaris. GNU libc also has a libnsl, but we do not need it. -AC_SEARCH_LIBS(gethostbyname,nsl) -AC_CHECK_LIB(socket,bind) +# memmove: A/UX libUTIL +AC_SEARCH_LIBS([memmove], [UTIL], [], [ + AC_MSG_ERROR([unable to find the memmove() function]) +]) +# gethostbyname: Solaris libnsl +AC_SEARCH_LIBS([gethostbyname], [nsl], [], [ + AC_MSG_ERROR([unable to find the gethostbyname() function]) +]) +# bind: SVR4 libsocket +AC_SEARCH_LIBS([bind], [socket], [], [ + AC_MSG_ERROR([unable to find the bind() function]) +]) # -- Functions -- @@ -187,15 +194,12 @@ AC_ARG_WITH(syslog, CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" fi - AC_CHECK_LIB(be, syslog) - AC_CHECK_FUNCS(syslog, x_syslog_on=yes, + AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes], [ AC_MSG_ERROR([Can't enable syslog!]) - ) + ]) fi ], - [ - AC_CHECK_LIB(be, syslog) - AC_CHECK_FUNCS(syslog, x_syslog_on=yes) + [ AC_SEARCH_LIBS([syslog], [be], [x_syslog_on=yes]) ] ) if test "$x_syslog_on" = "yes"; then -- cgit 1.4.1 From 005ffeaa8c27d29efd3037d52a26a948b71cbc0c Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 13 Sep 2012 18:48:25 +0200 Subject: configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 468e927b..23b50cd7 100644 --- a/configure.in +++ b/configure.in @@ -113,7 +113,7 @@ AC_CHECK_HEADERS([ \ ],,AC_MSG_ERROR([required C header missing!])) # Optional header files -AC_CHECK_HEADERS([ \ +AC_CHECK_HEADERS_ONCE([ \ arpa/inet.h inttypes.h malloc.h netinet/ip.h stdbool.h stddef.h \ stdint.h varargs.h \ ]) @@ -176,7 +176,7 @@ AC_CHECK_FUNCS([ \ AC_MSG_ERROR([required function missing!])) # Optional functions -AC_CHECK_FUNCS([ \ +AC_CHECK_FUNCS_ONCE([ \ gai_strerror getaddrinfo getnameinfo inet_aton sigaction sigprocmask \ snprintf vsnprintf strdup strlcpy strlcat strtok_r waitpid]) -- cgit 1.4.1 From fe3bef55b75c5fbfbf87b098cbc61453b718435e Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 15 Sep 2012 20:26:59 +0200 Subject: Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC We don't expect the GNU'ish behaviour of of malloc() and realloc() and never implemented the replacement functions rpl_malloc()/rpl_realloc() -- so these test result in linking failues on systems that don't have a GNU'ish malloc() and realloc() even though we don't require it! Introduced by commit 47ad9afc. --- configure.in | 2 -- 1 file changed, 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 23b50cd7..949a383a 100644 --- a/configure.in +++ b/configure.in @@ -163,8 +163,6 @@ AC_SEARCH_LIBS([bind], [socket], [], [ # -- Functions -- AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_REALLOC AC_FUNC_STRFTIME # Required functions -- cgit 1.4.1