aboutsummaryrefslogtreecommitdiff
path: root/support/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'support/configure.in')
-rw-r--r--support/configure.in1519
1 files changed, 1519 insertions, 0 deletions
diff --git a/support/configure.in b/support/configure.in
new file mode 100644
index 0000000..3d425e5
--- /dev/null
+++ b/support/configure.in
@@ -0,0 +1,1519 @@
+dnl configure.in for irc-2.10.1
+dnl Matthew Green (mrg@mame.mu.oz.au), Alain Nissen (Alain.Nissen@ulg.ac.be)
+dnl using portions of Avalon's Config and GNU Autoconf 1.12.
+
+dnl ---------
+dnl new tests
+dnl ---------
+
+AC_DEFUN(IRC_PATH_ZLIB,
+[AC_MSG_CHECKING(for zlib package)
+AC_ARG_WITH(zlib, [ --with-zlib checks for zlib; if found, enables compressed links])
+AC_ARG_WITH(zlib, [ --without-zlib does not check for zlib; disables compressed links])
+if test "x$with_zlib" = xno; then
+ no_zlib=yes
+else
+AC_CACHE_VAL(irc_cv_path_zlib,
+[no_zlib=yes
+no_zlib_include=yes
+no_zlib_library=yes
+AC_TRY_CPP([#include <zlib.h>],
+[no_zlib_include=
+irc_zlib_include=],
+[for irc_dir in "$irc_zlib_include" \
+ `test -z "$irc_zlib_prefix" || echo "$irc_zlib_prefix/include"` \
+ `echo "$irc_zlib_library" | sed s/lib/include/` \
+ /usr/include /usr/local/include /usr/unsupported/include \
+ /usr/share/include /usr/local/share/include /include \
+ /usr/zlib/include /usr/local/zlib/include \
+ /usr/include/zlib /usr/local/include/zlib \
+ /usr/unsupported/include/zlib /usr/share/include/zlib \
+ /usr/local/share/include/zlib /include/zlib \
+ /usr/zlib/include/zlib /usr/local/zlib/include/zlib; \
+ do
+ if test -r "$irc_dir/zlib.h"; then
+ no_zlib_include=
+ irc_zlib_include=$irc_dir
+ break
+ fi
+ done
+])
+irc_save_LIBS="$LIBS"
+LIBS="-lz $LIBS"
+AC_TRY_LINK(,
+[inflate()],
+[no_zlib_library=
+irc_zlib_library=
+LIBS="$irc_save_LIBS"],
+[LIBS="$irc_save_LIBS"
+for irc_dir in "$irc_zlib_library" \
+ `test -z "$irc_zlib_prefix" || echo "$irc_zlib_prefix/lib"` \
+ `echo "$irc_zlib_include" | sed s/include/lib/` \
+ /usr/lib /usr/local/lib /usr/unsupported/lib \
+ /usr/share/lib /usr/local/share/lib /lib /usr/zlib/lib \
+ /usr/local/zlib/lib /usr/lib/zlib /usr/local/lib/zlib \
+ /usr/unsupported/lib/zlib /usr/share/lib/zlib \
+ /usr/local/share/lib/zlib /lib/zlib \
+ /usr/zlib/lib/zlib /usr/local/zlib/lib/zlib; \
+do
+ for irc_extension in a so sl; do
+ if test -r $irc_dir/libz.$irc_extension; then
+ no_zlib_library=
+ irc_zlib_library=$irc_dir
+ break 2
+ fi
+ done
+done
+])
+if test "x$no_zlib_include" = x && test "x$no_zlib_library" = x; then
+ no_zlib=
+fi
+if test "$no_zlib" = yes; then
+ irc_cv_path_zlib="no_zlib=yes"
+else
+ irc_cv_path_zlib="no_zlib= irc_zlib_include=$irc_zlib_include irc_zlib_library=$irc_zlib_library"
+fi])
+ eval "$irc_cv_path_zlib"
+fi
+if test "$no_zlib" = yes; then
+ IRC_ZLIB_LIBRARY=
+ IRC_ZLIB_INCLUDE=
+ AC_MSG_RESULT(no)
+else
+ AC_DEFINE(USE_ZLIB)
+ if test "x$irc_zlib_library" = x; then
+ irc_zlib_library_message="found by the linker"
+ IRC_ZLIB_LIBRARY=-lz
+ else
+ irc_zlib_library_message="in $irc_zlib_library"
+ IRC_ZLIB_LIBRARY=-L$irc_zlib_library
+ if test ! "$irc_cv_solaris_2" = no; then
+ IRC_ZLIB_LIBRARY="$IRC_ZLIB_LIBRARY -R$irc_zlib_library"
+ fi
+ IRC_ZLIB_LIBRARY="$IRC_ZLIB_LIBRARY -lz"
+ fi
+ if test "x$irc_zlib_include" = x; then
+ irc_zlib_include_message="found by the compiler"
+ IRC_ZLIB_INCLUDE=
+ else
+ irc_zlib_include_message="in $irc_zlib_include"
+ IRC_ZLIB_INCLUDE=-I$irc_zlib_include
+ fi
+ AC_MSG_RESULT([])
+ AC_MSG_RESULT([ library $irc_zlib_library_message])
+ AC_MSG_RESULT([ header $irc_zlib_include_message])
+fi
+AC_SUBST(IRC_ZLIB_INCLUDE)
+AC_SUBST(IRC_ZLIB_LIBRARY)
+])
+
+
+AC_DEFUN(IRC_CURSES_TERMCAP,
+[AC_MSG_CHECKING([which curses or termcap library will be used])
+AC_ARG_WITH(ncurses, [ --without-ncurses does not look for ncurses library, will not use it])
+AC_ARG_WITH(cursesX, [ --without-cursesX does not look for cursesX library, will not use it])
+AC_ARG_WITH(curses, [ --without-curses does not look for curses library, will not use it])
+AC_ARG_WITH(termcap, [ --without-termcap does not look for termcap library, will not use it])
+AC_CACHE_VAL(irc_cv_curses_termcap,
+[irc_save_LIBS="$LIBS"
+LIBS="-lncurses $irc_save_LIBS"
+AC_TRY_LINK(,
+[initscr()],
+irc_ncurses=yes,
+irc_ncurses=no)
+LIBS="-lcursesX $irc_save_LIBS"
+AC_TRY_LINK(,
+[initscr()],
+irc_cursesX=yes,
+irc_cursesX=no)
+LIBS="-lcurses $irc_save_LIBS"
+AC_TRY_LINK(,
+[initscr()],
+irc_curses=yes,
+irc_curses=no)
+LIBS="-lcurses -ltermcap $irc_save_LIBS"
+AC_TRY_LINK(,
+[initscr()],
+irc_curses_termcap=yes,
+irc_curses_termcap=no)
+LIBS="-ltermcap $irc_save_LIBS"
+AC_TRY_LINK(,
+[tgetent()],
+irc_termcap=yes,
+irc_termcap=no)
+LIBS="$irc_save_LIBS"
+irc_cv_curses_termcap="irc_ncurses=$irc_ncurses irc_curses=$irc_curses irc_cursesX=$irc_cursesX irc_curses_termcap=$irc_curses_termcap irc_termcap=$irc_termcap"
+])
+eval $irc_cv_curses_termcap
+if test "x$with_ncurses" = xno; then
+ irc_ncurses=no
+fi
+if test "x$with_cursesX" = xno; then
+ irc_cursesX=no
+fi
+if test "x$with_curses" = xno; then
+ irc_curses=no
+ irc_curses_termcap=no
+fi
+if test "x$with_termcap" = xno; then
+ irc_termcap=no
+fi
+if test $irc_ncurses = yes; then
+ AC_MSG_RESULT(ncurses)
+ AC_DEFINE(USE_NCURSES)
+ IRC_CURSES_TERMCAP_LIBRARY="-lncurses"
+elif test $irc_cursesX = yes; then
+ AC_MSG_RESULT(cursesX)
+ AC_DEFINE(USE_CURSESX)
+ IRC_CURSES_TERMCAP_LIBRARY="-lcursesX"
+elif test $irc_curses = yes; then
+ AC_MSG_RESULT(curses)
+ AC_DEFINE(USE_CURSES)
+ IRC_CURSES_TERMCAP_LIBRARY="-lcurses"
+elif test $irc_curses_termcap = yes; then
+ AC_MSG_RESULT(curses over termcap)
+ AC_DEFINE(USE_CURSES)
+ IRC_CURSES_TERMCAP_LIBRARY="-lcurses -ltermcap"
+elif test $irc_termcap = yes; then
+ AC_MSG_RESULT(termcap)
+ AC_DEFINE(USE_TERMCAP)
+ IRC_CURSES_TERMCAP_LIBRARY="-ltermcap"
+else
+ AC_MSG_RESULT(none)
+ AC_MSG_WARN([I can't find either ncurses, cursesX, curses or termcap library.])
+ IRC_CURSES_TERMCAP_LIBRARY=
+fi
+AC_SUBST(IRC_CURSES_TERMCAP_LIBRARY)
+])
+
+
+AC_DEFUN(IRC_UNION_WAIT,
+[AC_MSG_CHECKING(whether an union wait * is mandatory in waitpid)
+AC_CACHE_VAL(irc_cv_type_union_wait,
+AC_TRY_COMPILE([
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif],
+[
+int status;
+waitpid(-1, &status, 0);
+],
+irc_cv_type_union_wait=no,
+AC_TRY_COMPILE([
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif],
+[
+union wait status;
+waitpid(-1, &status, 0);
+],
+irc_cv_type_union_wait=yes,
+irc_cv_type_union_wait=no)))
+if test $irc_cv_type_union_wait = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_UNION_WAIT)
+else
+ AC_MSG_RESULT(no)
+fi
+])
+
+
+AC_DEFUN(IRC_SUN,
+[AC_MSG_CHECKING([for SunOS])
+AC_CACHE_VAL(irc_cv_sun,
+[if test "x`(uname) 2>/dev/null`" = "xSunOS"; then
+ irc_cv_sun="`uname -r`"
+else
+ irc_cv_sun=no
+fi
+])
+irc_cv_solaris_2=no
+if test "$irc_sun" = no; then
+ AC_MSG_RESULT(no)
+else
+ if uname -r 2>/dev/null | grep "^5" >/dev/null; then
+ irc_cv_solaris_2="`uname -r | sed -e \"s/^5/2/g\"`"
+ AC_MSG_RESULT([yes, Solaris $irc_cv_solaris_2])
+ AC_DEFINE(SOLARIS_2)
+ if echo "$irc_cv_solaris_2" | egrep "^2\.(0|1|2)" >/dev/null; then
+ AC_DEFINE(SOLARIS_2_0_2_1_2_2)
+ elif echo "$irc_cv_solaris_2" | grep "^2\.3" >/dev/null; then
+ AC_DEFINE(SOLARIS_2_3)
+ fi
+ else
+ AC_MSG_RESULT([yes, SunOS $irc_cv_sun])
+ fi
+fi
+])
+
+
+AC_DEFUN(IRC_DECL_SYS_ERRLIST,
+[AC_CACHE_CHECK([for sys_errlist declaration in stdio.h, errno.h or sys/errno.h],
+ irc_cv_decl_sys_errlist,
+[AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_ERRNO_H
+#include <sys/errno.h>
+#endif],
+[char *msg = sys_errlist[0];],
+ irc_cv_decl_sys_errlist=yes, irc_cv_decl_sys_errlist=no)])
+if test $irc_cv_decl_sys_errlist = yes; then
+ AC_DEFINE(SYS_ERRLIST_DECLARED)
+fi
+])
+
+
+AC_DEFUN(IRC_DECL_SYS_NERR,
+[AC_CACHE_CHECK([for sys_nerr declaration in stdio.h, errno.h or sys/errno.h],
+ irc_cv_decl_sys_nerr,
+[AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_ERRNO_H
+#include <sys/errno.h>
+#endif],
+[int num = sys_nerr;],
+ irc_cv_decl_sys_nerr=yes, irc_cv_decl_sys_nerr=no)])
+if test $irc_cv_decl_sys_nerr = yes; then
+ AC_DEFINE(SYS_NERR_DECLARED)
+fi
+])
+
+
+AC_DEFUN(IRC_DECL_ERRNO,
+[AC_CACHE_CHECK([for errno declaration in errno.h or sys/errno.h],
+ irc_cv_decl_errno,
+[AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_ERRNO_H
+#include <sys/errno.h>
+#endif],
+[int num = errno;],
+ irc_cv_decl_errno=yes, irc_cv_decl_errno=no)])
+if test $irc_cv_decl_errno = yes; then
+ AC_DEFINE(ERRNO_DECLARED)
+fi
+])
+
+
+AC_DEFUN(IRC_DECL_H_ERRNO,
+[AC_CACHE_CHECK([for h_errno declaration in errno.h, sys/errno.h or netdb.h],
+ irc_cv_decl_h_errno,
+[AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_SYS_ERRNO_H
+#include <sys/errno.h>
+#endif
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif],
+[int num = h_errno;],
+ irc_cv_decl_h_errno=yes, irc_cv_decl_h_errno=no)])
+if test $irc_cv_decl_h_errno = yes; then
+ AC_DEFINE(H_ERRNO_DECLARED)
+fi
+])
+
+
+AC_DEFUN(IRC_SGI_CC,
+[AC_MSG_CHECKING([for SGI's cc])
+AC_EGREP_CPP(yes,
+[#ifdef sgi
+yes
+#endif],
+if test x$CC = xcc; then
+ AC_MSG_RESULT(yes)
+ CC="$CC -cckr"
+else
+ AC_MSG_RESULT(no)
+fi,
+AC_MSG_RESULT(no))
+])
+
+
+AC_DEFUN(IRC_HPUX_CC,
+[AC_MSG_CHECKING([for HPUX's cc])
+AC_EGREP_CPP(yes,
+[#ifdef hpux
+yes
+#endif],
+if test x$CC = xcc; then
+ AC_MSG_RESULT(yes)
+ CC="$CC -Ae"
+else
+ AC_MSG_RESULT(no)
+fi,
+AC_MSG_RESULT(no))
+])
+
+
+AC_DEFUN(IRC_ALPHA_BETA,
+[AC_MSG_CHECKING(whether this is an alpha/beta release)
+AC_CACHE_VAL(irc_cv_alpha_beta,
+[AC_EGREP_CPP(^\"......00,
+[#include "../common/patchlevel.h"
+#ifdef PATCHLEVEL
+PATCHLEVEL
+#else
+"0000000000"
+#endif
+],irc_cv_alpha_beta=,
+irc_cv_alpha_beta=yes)
+])
+if test x$irc_cv_alpha_beta = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_WARN([
+
+This is a development version of the package,
+it is not intended to be used in a production environment.
+])
+# if test ! "$ac_test_CFLAGS" = set; then
+# if test x$ac_cv_prog_cc_g = xyes -o x$GCC = x; then
+# CFLAGS="$CFLAGS -g"
+# fi
+# fi
+else
+ AC_MSG_RESULT(no)
+# if test ! "${LDFLAGS+set}" = set; then
+# LDFLAGS="-s"
+# fi
+fi
+
+if test ! "$ac_test_CFLAGS" = set; then
+ if test x$ac_cv_prog_cc_g = xyes -o x$GCC = x; then
+ CFLAGS="$CFLAGS -g"
+ fi
+fi
+])
+
+
+AC_DEFUN(IRC_SELECT_POLL,
+[AC_MSG_CHECKING([whether select or poll system call will be used])
+AC_CACHE_VAL(irc_cv_select_poll,
+[if test "$irc_cv_sun" != "no" && test "x$irc_cv_solaris_2" = "xno"; then
+ # we don't like SunOS' poll() function
+ irc_cv_select_poll=select
+else
+ if test "$ac_cv_func_poll" = "yes"; then
+ irc_cv_select_poll=poll
+ else
+ irc_cv_select_poll=select
+ fi
+fi])
+
+if test "$irc_cv_select_poll" = "poll"; then
+ AC_MSG_RESULT(poll)
+ AC_DEFINE(USE_POLL)
+ if test ! "$irc_cv_linux" = "no"; then
+ AC_MSG_WARN([Aiiie.. This is linux. poll() is known to be broken for some releases (2.0.x with libc6?). You may want to edit setup.h to undefine USE_POLL])
+ fi
+else
+ AC_MSG_RESULT(select)
+fi
+])
+
+
+AC_DEFUN(IRC_SIGNAL_IMPLEMENTATION,
+[AC_MSG_CHECKING([for signal implementation])
+AC_CACHE_VAL(irc_cv_signal_implementation,
+[if test x$ac_cv_func_sigaction = xyes; then
+ irc_cv_signal_implementation=posix_sigaction
+elif test x$ac_cv_func_sigset = xyes; then
+ irc_cv_signal_implementation=bsd_sigset
+else
+ AC_TRY_RUN([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifndef SIGCHLD
+#define SIGCHLD SIGCLD
+#endif
+
+int got = 0;
+
+RETSIGTYPE hand()
+{
+ got++;
+}
+
+main()
+{
+ (void)signal(SIGCHLD, hand);
+ kill(getpid(), SIGCHLD);
+ kill(getpid(), SIGCHLD);
+ if (got < 2)
+ exit(1);
+ exit(0);
+}
+],
+ irc_cv_signal_implementation=bsd_signal,
+ irc_cv_signal_implementation=sysv_signal)
+fi
+])
+if test $irc_cv_signal_implementation = posix_sigaction; then
+ AC_MSG_RESULT([using POSIX sigaction])
+ AC_DEFINE(POSIX_SIGNALS)
+elif test $irc_cv_signal_implementation = bsd_sigset; then
+ AC_MSG_RESULT([using BSD sigset])
+ AC_DEFINE(BSD_RELIABLE_SIGNALS)
+ AC_DEFINE(signal, sigset)
+elif test $irc_cv_signal_implementation = bsd_signal; then
+ AC_MSG_RESULT([using reliable BSD signal])
+ AC_DEFINE(BSD_RELIABLE_SIGNALS)
+else
+ AC_MSG_RESULT([using unreliable SystemV signal])
+ AC_DEFINE(SYSV_UNRELIABLE_SIGNALS)
+fi
+])
+
+
+AC_DEFUN(IRC_NON_BLOCKING_SYSTEM,
+[AC_MSG_CHECKING([for a working non-blocking system])
+AC_CACHE_VAL(irc_cv_non_blocking_system,
+[
+changequote(<<, >>)dnl
+irc_precode='#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#if HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+#if HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+RETSIGTYPE alarmed()
+{
+ exit(1);
+}
+
+main()
+{
+ char b[12];
+ struct sockaddr_in x;
+ int f, l = sizeof(x);
+ f = socket(AF_INET, SOCK_DGRAM, 0);
+ if (f >= 0 && !(fcntl(f, F_SETFL, '
+irc_postcode=')))
+ {
+ signal(SIGALRM, alarmed);
+ alarm(3);
+ recvfrom(f, b, 12, 0, &x, &l);
+ alarm(0);
+ exit(0);
+ }
+ exit(1);
+}'
+changequote([, ])dnl
+irc_code_posix="${irc_precode}O_NONBLOCK${irc_postcode}"
+irc_code_bsd="${irc_precode}O_NDELAY${irc_postcode}"
+irc_code_sysv="${irc_precode}FIONBIO${irc_postcode}"
+AC_TRY_RUN($irc_code_posix,
+ irc_cv_non_blocking_system=posix,
+ AC_TRY_RUN($irc_code_bsd,
+ irc_cv_non_blocking_system=bsd,
+ AC_TRY_RUN($irc_code_sysv,
+ irc_cv_non_blocking_system=sysv,
+ irc_cv_non_blocking_system=none)))
+])
+if test $irc_cv_non_blocking_system = posix; then
+ AC_MSG_RESULT([using POSIX O_NONBLOCK])
+ AC_DEFINE(NBLOCK_POSIX)
+elif test $irc_cv_non_blocking_system = bsd; then
+ AC_MSG_RESULT([using BSD O_NDELAY])
+ AC_DEFINE(NBLOCK_BSD)
+elif test $irc_cv_non_blocking_system = sysv; then
+ AC_MSG_RESULT([using SystemV FIONBIO])
+ AC_DEFINE(NBLOCK_SYSV)
+else
+ AC_MSG_RESULT([using none])
+ AC_MSG_WARN([I can't find a working non-blocking system.])
+fi
+])
+
+
+AC_DEFUN(IRC_STDARG,
+[AC_MSG_CHECKING([for working stdarg])
+AC_CACHE_VAL(irc_cv_stdarg,
+AC_TRY_RUN(
+[
+changequote(<<, >>)dnl
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+
+char buf1[256];
+
+int level1(char *data, char *format, va_list ap)
+{
+ return vsprintf(data, format, ap);
+}
+
+int level2(char *data, int rounds, char *format, va_list ap)
+{
+ if(!--rounds)
+ return level1(data, format, ap);
+ else {
+ if(rounds == 2) {
+ va_list ap2 = ap;
+ char *arg = va_arg(ap2, char *);
+ strcpy(buf1, arg);
+ }
+ return level2(data, rounds, format, ap);
+ }
+}
+
+int level3(char *data, char *format, va_list ap)
+{
+ return level2(data, 5, format, ap);
+}
+
+int dotest(int size, char *val, char *data)
+{
+ if(size != strlen(val))
+ return 0;
+ if(strcmp(data, val))
+ return 0;
+ if(strcmp(buf1, "was"))
+ return 0;
+ return 1;
+}
+
+int base(char *val, char *format, ...)
+{
+ int res = 1;
+ char data[256];
+
+ {
+ va_list ap;
+ data[0]=0;
+ va_start(ap, format);
+ res = dotest(level3(data, format, ap), val, data);
+ va_end(ap);
+ }
+
+ {
+ va_list ap;
+ data[0]=0;
+ va_start(ap, format);
+ res = res && dotest(level3(data, format, ap), val, data);
+ va_end(ap);
+ }
+
+ return res;
+}
+
+int main(void)
+{
+ int res = base("toto was here ! 42", "toto %s here ! %d", "was", 42);
+
+ exit(res ? 0 : 1);
+}
+changequote([, ])dnl
+],
+irc_cv_stdarg=yes,
+irc_cv_stdarg=no)
+)
+if test $irc_cv_stdarg = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_STDARG)
+else
+ AC_MSG_RESULT(no)
+fi
+])
+
+
+AC_DEFUN(IRC_PATH_RESCONF,
+[AC_MSG_CHECKING([for resolver configuration file])
+AC_CACHE_VAL(irc_cv_path_resconf,
+[if test -z "$irc_resconf"; then
+ irc_cv_path_resconf="/etc/resolv.conf";
+ else
+ irc_cv_path_resconf="$irc_resconf";
+ fi
+])
+AC_MSG_RESULT($irc_cv_path_resconf)
+AC_DEFINE_UNQUOTED(IRC_RESCONF, "$irc_cv_path_resconf")
+if test ! -r "$irc_cv_path_resconf"; then
+ AC_MSG_WARN([Unable to read \"$irc_cv_path_resconf\"! Without resolver configuration file, the server won't work.])
+fi
+])
+
+
+AC_DEFUN(IRC_EGREP_RMLF_CPP,
+[cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$2]
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
+ $AWK "{if (NR > 1) printf(\" \"); printf(\[$]0)}" |
+changequote(, )dnl
+ egrep "$1" >/dev/null 2>&1; then
+changequote([, ])dnl
+ ifelse([$3], , :, [rm -rf conftest*
+ $3])
+ifelse([$4], , , [else
+ rm -rf conftest*
+ $4
+])dnl
+fi
+rm -f conftest*
+])
+
+
+AC_DEFUN(IRC_LINUX,
+[AC_MSG_CHECKING(for Linux)
+AC_CACHE_VAL(irc_cv_linux,
+[if test "x`(uname) 2>/dev/null`" = "xLinux"; then
+ IRC_EGREP_RMLF_CPP(
+ [struct( | )+hostent( | )+\{.*const.*h_name],
+ [#include <netdb.h>],
+ irc_cv_linux=bad,
+ irc_cv_linux=good)
+else
+ irc_cv_linux=no
+fi
+])
+if test "$irc_cv_linux" = no; then
+ AC_MSG_RESULT(no)
+elif test "$irc_cv_linux" = good; then
+ AC_MSG_RESULT([yes, with a good <netdb.h> file])
+else
+ AC_MSG_RESULT([yes, with a bad <netdb.h> file])
+ AC_DEFINE(BAD___CONST_NETDB_H)
+fi
+])
+
+
+AC_DEFUN(IRC_IP6,
+[AC_ARG_ENABLE(ip6, [ --enable-ip6 enables IPv6])
+if test "x$enable_ip6" != x; then
+ AC_DEFINE(INET6)
+ dnl be smart about it
+ AC_MSG_CHECKING([IPv6 system type])
+ AC_CACHE_VAL(irc_cv_v6type, [
+ if test -d /usr/inet6; then
+ irc_cv_v6type=linux
+ else
+ AC_EGREP_CPP(yes, [dnl
+#include <netinet/in.h>
+#ifdef IPV6_INRIA_VERSION
+yes
+#endif], irc_cv_v6type=inria,
+ AC_EGREP_CPP(yes, [dnl
+#include <netinet/in.h>
+#ifdef __KAME__
+yes
+#endif], irc_cv_v6type=kame,
+ AC_EGREP_CPP(yes, [dnl
+#include <sys/param.h>
+#ifdef _TOSHIBA_INET6
+yes
+#endif], irc_cv_v6type=toshiba,
+ AC_EGREP_CPP(yes, [dnl
+#include </usr/local/v6/include/sys/types.h>
+#ifdef __V6D__
+yes
+#endif], irc_cv_v6type=v6d,
+ AC_EGREP_CPP(yes, [dnl
+#include <sys/param.h>
+#ifdef _ZETA_MINAMI_INET6
+yes
+#endif], irc_cv_v6type=zeta)))))
+ fi])
+ AC_MSG_RESULT($irc_cv_v6type)
+
+ dnl eventually update LIBS
+ case $irc_cv_v6type in
+ kame)
+ LIBS="-L/usr/local/v6/lib -linet6 $LIBS"
+ CFLAGS="$CFLAGS -I/usr/local/v6/include"
+ ;;
+ linux)
+ LIBS="-L/usr/inet6/lib -linet6 $LIBS"
+ CFLAGS="$CFLAGS -I/usr/inet6/include"
+ ;;
+ toshiba)
+ LIBS="-L/usr/local/v6/lib -linet6 $LIBS"
+ CFLAGS="$CFLAGS -I/usr/local/v6/include"
+ ;;
+ v6d)
+ LIBS="-L/usr/local/v6/lib -lv6 $LIBS"
+ CFLAGS="$CFLAGS -I/usr/local/v6/include"
+ ;;
+ zeta)
+ LIBS="-L/usr/local/v6/lib -linet6 $LIBS"
+ CFLAGS="$CFLAGS -I/usr/local/v6/include"
+ ;;
+ esac
+
+ dnl /etc/resolv.conf check
+ AC_MSG_CHECKING(for IPv6 name server addresses in resolv.conf ($irc_cv_path_resconf))
+ if grep nameserver $irc_cv_path_resconf | grep ':' >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_WARN([$irc_cv_path_resconf is not setup correctly.])
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+])
+
+
+AC_DEFUN(IRC_SHAREDMODULES,
+[AC_ARG_ENABLE(dsm, [ --enable-dsm enables dynamically shared modules for iauth])
+if test "x$enable_dsm" != x; then
+ AC_DEFINE(USE_DSM)
+dnl AC_CONFIG_HEADER(dl.h)
+ AC_CHECK_HEADERS(dlfcn.h)
+ AC_CHECK_LIB(dl, dlclose, IRC_DLIB="-ldl")
+ AC_SUBST(IRC_DLIB)
+fi
+])
+
+
+dnl -------------------------------------------------------------------
+dnl modified Autoconf tests; their names begin with IRC_ instead of AC_
+dnl -------------------------------------------------------------------
+
+AC_DEFUN(IRC_INIT_PARSE_ARGS,
+[
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+zlib_include=NONE
+zlib_library=NONE
+dnl Installation directory options.
+dnl These are left unexpanded so users can "make install exec_prefix=/foo"
+dnl and all the variables that are supposed to be based on exec_prefix
+dnl by default will actually change.
+dnl Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+logdir='${prefix}/var/log/ircd'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+changequote(, )dnl
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+changequote([, ])dnl
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_feature: invalid feature name)
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_feature: invalid feature name)
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+changequote(, )dnl
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR[PREFIX/var/run]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --logdir=DIR log files in DIR [PREFIX/var/log/ircd]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --resconf=FILE use FILE as resolver config file [/etc/resolv.conf]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --zlib-prefix=ZDIR zlib installation prefix is ZDIR
+ --zlib-include=ZIDIR zlib include files are in ZIDIR [ZDIR/include]
+ --zlib-library=ZLDIR zlib library files are in ZLDIR [ZDIR/lib]
+changequote([, ])dnl
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -logdir | --logdir | --logdi | --logd)
+ ac_prev=logdir ;;
+ -logdir=* | --logdir=* | --logdi=* | --logd=*)
+ logdir="$ac_optarg/" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -resconf | --resconf | --rescon | --resco | --resc | --res \
+ | --re | --r)
+ ac_prev=irc_resconf ;;
+ -resconf=* | --resconf=* | --rescon=* | --resco=* | --resc=* \
+ | --res=* | --re=* | --r=*)
+ irc_resconf="$ac_optarg" ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version AC_ACVERSION"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_package: invalid package name)
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_package: invalid package name)
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ -zlib-prefix | --zlib-prefix | --zlib-prefi | --zlib-pref \
+ | --zlib-pre | --zlib-pr | --zlib-p)
+ ac_prev=irc_zlib_prefix ;;
+ -zlib-prefix=* | --zlib-prefix=* | --zlib-prefi=* | --zlib-pref=* \
+ | --zlib-pre=* | --zlib-pr=* | --zlib-p=*)
+ irc_zlib_prefix="$ac_optarg" ;;
+
+ -zlib-include | --zlib-include | --zlib-includ | --zlib-inclu \
+ | --zlib-incl | --zlib-inc | --zlib-in | --zlib-i)
+ ac_prev=irc_zlib_include ;;
+ -zlib-include=* | --zlib-include=* | --zlib-includ=* | --zlib-inclu=* \
+ | --zlib-incl=* | --zlib-inc=* | --zlib-in=* | --zlib-i=*)
+ irc_zlib_include="$ac_optarg" ;;
+
+ -zlib-library | --zlib-library | --zlib-librar | --zlib-libra | --zlib-libr \
+ | --zlib-lib | --zlib-li | --zlib-l)
+ ac_prev=irc_zlib_library ;;
+ -zlib-library=* | --zlib-library=* | --zlib-librar=* | --zlib-libra=* \
+ | --zlib-libr=* | --zlib-lib=* | --zlib-li=* | --zlib-l=*)
+ irc_zlib_library="$ac_optarg" ;;
+
+ -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
+ ;;
+
+ *)
+changequote(, )dnl
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_WARN($ac_option: invalid host type)
+ fi
+ if test "x$nonopt" != xNONE; then
+ AC_MSG_ERROR(can only configure for one host and one target at a time)
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
+fi
+
+AC_SUBST(logdir)
+])
+
+
+AC_DEFUN(IRC_INIT,
+[sinclude(acsite.m4)dnl
+sinclude(./aclocal.m4)dnl
+AC_REQUIRE([AC_INIT_BINSH])dnl
+AC_INIT_NOTICE
+AC_DIVERT_POP()dnl to NORMAL
+AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
+IRC_INIT_PARSE_ARGS
+AC_INIT_PREPARE($1)dnl
+AC_DIVERT_POP()dnl to NORMAL
+])
+
+
+AC_DEFUN(IRC_PROG_INSTALL,
+[define(AC_PROVIDE_AC_PROG_INSTALL)
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX v4 /usr/bin/installbsd, which does not work if the user is not root
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+AC_MSG_CHECKING(for a BSD compatible install)
+if test -z "$INSTALL"; then
+AC_CACHE_VAL(ac_cv_path_install,
+[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ elif test $ac_prog = installbsd -a "x`(uname -sv) 2>/dev/null`" = "xAIX 4"; then
+ # AIX v4 installbsd. Does not work if the user is not root.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+])dnl
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+dnl We do special magic for INSTALL instead of AC_SUBST, to get
+dnl relative paths right.
+AC_MSG_RESULT($INSTALL)
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+AC_SUBST(INSTALL_PROGRAM)dnl
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+AC_SUBST(INSTALL_DATA)dnl
+])
+
+AC_DEFUN(IRC_CYGWIN,
+[AC_CYGWIN
+if test ! -z "$CYGWIN"; then
+ if test ! -x /bin/mv || test ! -x /bin/rm || test ! -x /bin/sh; then
+ AC_MSG_ERROR([mv, rm and/or sh is missing from /bin])
+ fi
+ AC_MSG_WARN([The IRC client and the iauth program do not work under the CYGWIN environment.])
+fi
+])
+
+AC_DEFUN(IRC_PROG_CC,
+[define(AC_PROVIDE_AC_PROG_CC)
+AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_CHECK_PROG(CC, gcc, gcc)
+if test -z "$CC"; then
+ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+AC_PROG_CC_WORKS
+AC_PROG_CC_GNU
+ac_test_CFLAGS="${CFLAGS+set}"
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ AC_PROG_CC_G
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+fi
+])
+
+
+AC_DEFUN(IRC_AIX,
+[AC_MSG_CHECKING(for AIX)
+AC_CACHE_VAL(irc_cv_aix,
+[if test "x`(uname) 2>/dev/null`" = "xAIX"; then
+ irc_cv_aix="`uname -rv`"
+else
+ irc_cv_aix=no
+fi
+])
+if test "$irc_cv_aix" = no; then
+ AC_MSG_RESULT(no)
+else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(_ALL_SOURCE)
+ if test "x$irc_cv_aix" = "x2 3"; then
+ AC_DEFINE(AIX_3_2)
+ fi
+ if test x$CC = xcc; then
+ CFLAGS="$CFLAGS -O3 -qstrict"
+ fi
+fi
+])
+
+
+AC_DEFUN(IRC_CHECK_TYPE,
+[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(ac_cv_type_$1,
+[AC_EGREP_CPP(dnl
+changequote(<<,>>)dnl
+<<$1[^a-zA-Z_0-9]>>dnl
+changequote([,]), [
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
+AC_MSG_RESULT($ac_cv_type_$1)
+if test $ac_cv_type_$1 = no; then
+ AC_DEFINE($1, $2)
+fi
+])
+
+
+AC_DEFUN(IRC_FUNC_MEMCMP,
+[AC_CACHE_CHECK(for 8-bit clean memcmp, irc_cv_func_memcmp_clean,
+[AC_TRY_RUN([
+main()
+{
+ char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+ exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+}
+], irc_cv_func_memcmp_clean=yes, irc_cv_func_memcmp_clean=no,
+irc_cv_func_memcmp_clean=no)])
+if test $irc_cv_func_memcmp_clean = no; then
+ AC_DEFINE(MEMCMP_BROKEN)
+fi
+])
+
+
+dnl ----
+dnl main
+dnl ----
+
+AC_REVISION([$Id: configure.in,v 1.46 1999/08/13 17:18:23 kalt Exp $])
+AC_PREREQ(2.13)
+IRC_INIT(../ircd/ircd.c)
+AC_CONFIG_HEADER(setup.h:../support/setup.h.in)
+AC_CONFIG_AUX_DIR(../support)
+AC_VALIDATE_CACHED_SYSTEM_TUPLE()
+
+IRC_PROG_CC
+AC_PROG_CPP
+AC_PROG_AWK
+IRC_PROG_INSTALL
+AC_PATH_PROGS(SUM, md5sum sum cksum, true)
+AC_PROG_GCC_TRADITIONAL
+
+IRC_AIX
+AC_ISC_POSIX
+AC_MINIX
+IRC_SGI_CC
+IRC_HPUX_CC
+IRC_SUN
+IRC_LINUX
+IRC_CYGWIN
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS(stdio.h stdlib.h sys/types.h sys/bitypes.h stddef.h stdarg.h unistd.h ctype.h memory.h ncurses.h curses.h cursesX.h term.h sgtty.h errno.h sys/errno.h sys/syscall.h pwd.h math.h utmp.h fcntl.h signal.h sys/ioctl.h sys/file.h sys/filio.h sys/socket.h sys/stat.h sys/resource.h sys/select.h sys/poll.h stropts.h netdb.h netinet/in.h sys/un.h arpa/inet.h sys/param.h syslog.h sys/syslog.h string.h strings.h sys/time.h time.h sys/times.h netinet/in_systm.h netinfo/ni.h resolv.h arpa/nameser.h)
+IRC_DECL_SYS_ERRLIST
+IRC_DECL_SYS_NERR
+IRC_DECL_ERRNO
+IRC_DECL_H_ERRNO
+AC_HEADER_STAT
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_UID_T
+IRC_UNION_WAIT
+IRC_CHECK_TYPE(int8_t, char)
+IRC_CHECK_TYPE(u_int8_t, unsigned char)
+IRC_CHECK_TYPE(int16_t, short)
+IRC_CHECK_TYPE(u_int16_t, unsigned short)
+IRC_CHECK_TYPE(int32_t, int)
+IRC_CHECK_TYPE(u_int32_t, unsigned int)
+IRC_CHECK_TYPE(u_char, unsigned char)
+IRC_CHECK_TYPE(u_short, unsigned short)
+IRC_CHECK_TYPE(u_int, unsigned int)
+IRC_CHECK_TYPE(u_long, unsigned long)
+
+AC_C_BIGENDIAN
+AC_C_CONST
+
+AC_CHECK_LIB(crypt, crypt)
+AC_CHECK_LIB(socket, socket)
+AC_CHECK_LIB(nsl, socket)
+
+IRC_PATH_ZLIB
+IRC_CURSES_TERMCAP
+
+AC_FUNC_SETPGRP
+AC_FUNC_SETVBUF_REVERSED
+AC_FUNC_VFORK
+AC_CHECK_FUNCS(setpgrp strchr strrchr memcmp memset memmove memcpy index rindex bcmp bcopy bzero select inet_ntoa inet_aton inet_addr inet_netof getrusage times strerror strtoken strtok sigaction sigset truncate poll vsyslog)
+dnl ---
+dnl Note: additional tests should be performed and used inside the source code
+dnl for the following functions:
+dnl gethostname gettimeofday lrand48 mkdir socket
+dnl ---
+IRC_FUNC_MEMCMP
+IRC_SELECT_POLL
+
+IRC_SIGNAL_IMPLEMENTATION
+IRC_NON_BLOCKING_SYSTEM
+IRC_STDARG
+IRC_PATH_RESCONF
+IRC_IP6
+IRC_SHAREDMODULES
+IRC_ALPHA_BETA
+
+AC_OUTPUT(Makefile:../support/Makefile.in version.c.SH:../ircd/version.c.SH.in sums:../support/sums.in tkconf.h:../support/tkconf.h.dist)
+AC_OUTPUT_COMMANDS(chmod a+x version.c.SH)