Commit d9a11951 authored by Niels Möller's avatar Niels Möller

* configure.in: Replaced many calls to AC_ARG_WITH with

AC_ARG_ENABLE. Added --disable-ipv6 and --disable-utmp flags.

Rev: configure.in:1.66
parent 2798d8c1
......@@ -38,34 +38,34 @@ CPPFLAGS="$CPPFLAGS -I$srcdir -I$srcdir/src -I$srcdir/src/symmetric/include -DLS
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
dnl Check options
AC_ARG_WITH(debug_alloc,
[--without-debug-alloc sanity check memory allocation and casts],,
[with_debug_alloc=yes])
if test x$with_debug_alloc = xyes ; then
AC_ARG_ENABLE(debug_alloc,
[--disable-debug-alloc Disable memory allocation sanity checks],,
[enable_debug_alloc=yes])
if test x$enable_debug_alloc = xyes ; then
AC_DEFINE(DEBUG_ALLOC)
fi
AC_ARG_WITH(debug_trace,
[--without-debug-trace support for tracing],,
[with_debug_trace=yes])
AC_ARG_ENABLE(debug_trace,
[--disable-debug-trace Disable tracing support],,
[enable_debug_trace=yes])
if test x$with_debug_trace = xyes ; then
if test x$enable_debug_trace = xyes ; then
AC_DEFINE(DEBUG_TRACE)
fi
AC_ARG_WITH(zlib,
[--without-zlib use zlib compression],,
[--without-zlib Don't use zlib compression],,
[with_zlib=yes])
dnl Checking this variable is delayed until we have checked if zlib is
dnl actually available.
AC_ARG_WITH(pty,
[--without-pty disable pty support],,
[with_pty=yes])
AC_ARG_ENABLE(pty,
[--without-pty Disable pty support],,
[enable_pty=yes])
if test x$with_pty = xyes ; then
if test x$enable_pty = xyes ; then
AC_DEFINE(WITH_PTY_SUPPORT)
fi
......@@ -83,43 +83,43 @@ if test x$with_sshd1 != xno ; then
AC_DEFINE_UNQUOTED(SSHD1,"$with_sshd1")
fi
AC_ARG_WITH(idea,
[--with-idea support the patent-encumbered IDEA algorithm],,
[with_idea=no])
AC_ARG_ENABLE(idea,
[--enable-idea Support the patent-encumbered IDEA algorithm],,
[enable_idea=no])
if test x$with_idea = xyes ; then
if test x$enable_idea = xyes ; then
AC_DEFINE(WITH_IDEA)
fi
AC_ARG_WITH(datafellows_workarounds,
[--without-datafellows-workarounds Bug-compatibility with DataFellows ssh2 clients and servers],,
[with_datafellows_workarounds=yes])
AC_ARG_ENABLE(datafellows_workarounds,
[--disable-datafellows-workarounds Disable bug-compatibility with SSH Inc's clients and servers],,
[enable_datafellows_workarounds=yes])
if test x$with_datafellows_workarounds = xyes ; then
if test x$enable_datafellows_workarounds = xyes ; then
AC_DEFINE(DATAFELLOWS_WORKAROUNDS)
fi
AC_ARG_WITH(tcp_forward,
[--without-tcp-forward Disable tcp forwarding],,
[with_tcp_forward=yes])
AC_ARG_ENABLE(tcp_forward,
[--disable-tcp-forward Disable tcp forwarding],,
[enable_tcp_forward=yes])
if test x$with_tcp_forward = xyes ; then
if test x$enable_tcp_forward = xyes ; then
AC_DEFINE(WITH_TCP_FORWARD)
fi
AC_ARG_WITH(x11_forward,
[--without-x11-forward Support x11 forwarding (proxy only)],,
[with_x11_forward=yes])
AC_ARG_ENABLE(x11_forward,
[--disable-x11-forward Disable x11 forwarding (proxy only)],,
[eanble_x11_forward=yes])
if test x$with_x11_forward = xyes ; then
if test x$enable_x11_forward = xyes ; then
AC_DEFINE(WITH_X11_FORWARD)
fi
AC_ARG_WITH(agent_forward,
[--without-agent-forward Support auth-agent forwarding (proxy only)],,
AC_ARG_ENABLE(agent_forward,
[--disable-agent-forward Disable auth-agent forwarding (proxy only)],,
[with_agent_forward=yes])
if test x$with_agent_forward = xyes ; then
if test x$disable_agent_forward = xyes ; then
AC_DEFINE(WITH_AGENT_FORWARD)
fi
......@@ -128,9 +128,23 @@ AC_ARG_WITH(scheme,
[with_scheme=])
AC_ARG_WITH(system-argp,
[--without-system-argp Don't use the system's argp.],,
[--without-system-argp Don't use the system's argp],,
[with_system_argp=yes])
dnl IPv6 support
AC_ARG_ENABLE(ipv6,
[--disable-ipv6 Disable IPv6 support],,
[enable_ipv6=yes])
dnl utmp/wtmp logging
AC_ARG_ENABLE(utmp,
[--disable-utmp Disable utmp and wtmp support],,
[enable_utmp=yes])
if test x$enable_utmp = xyes ; then
AC_DEFINE(WITH_UTMP)
fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
......@@ -312,6 +326,8 @@ AC_CHECK_FUNCS(getspnam)
AC_CHECK_FUNCS(vsnprintf inet_aton)
AC_CHECK_FUNCS(openpty)
AC_CHECK_FUNCS(cfmakeraw)
AC_CHECK_FUNCS(logwtmp login logout)
AC_CHECK_FUNCS(getaddrinfo getnameinfo)
AC_FUNC_GETPGRP
AC_CHECK_FUNCS(syslog)
AC_REPLACE_FUNCS(memxor)
......@@ -553,6 +569,29 @@ dnl FIXME: How can we test if the bsd scheme is likely to work?
AC_DEFINE(PTY_BSD_SCHEME)
AC_MSG_RESULT([done])
dnl IPv6 support
if test x$enableipv6 = xyes ; then
AC_CACHE_CHECK([if ipv6 is supported],
lsh_cv_sys_ipv6,
[AC_TRY_RUN([/* AF_INET6 avalable check */
#include <sys/types.h>
#include <sys/socket.h>
int main(int argc, char **argv)
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
exit(0);
}
], lsh_cv_sys_ipv6=yes,
lsh_cv_sys_ipv6=no,
lsh_cv_sys_ipv6=no)])
if test x$lsh_cv_sys_ipv6 = xyes ; then
AC_DEFINE(WITH_IPV6)
fi
fi
# Set these flags *last*, or else the test programs won't compile
if test x$GCC = xyes ; then
CFLAGS="$CFLAGS -ggdb3 -Wall -W \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment