],,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 \
])
# -- 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 --
AC_FUNC_FORK
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_FUNC_STRFTIME
# Required functions
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])
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"
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
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"
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"
)
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"
)
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"
)
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"
)
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"
# 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"
)
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"
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"
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"
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"
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
# 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
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
# 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
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