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

* configure.in: Added AH_TEMPLATE calls. Deleted test for

offsetof.
* configure.in: Deleted IDEA support.

Rev: configure.in:1.119
parent 4047f718
......@@ -2,20 +2,26 @@ dnl -*- mode: shell-script; sh-indentation: 2; -*-
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT([lsh], [1.3.1], [bug-lshbug-lsh@gnu.org])
AC_INIT([lsh], [1.3.1], [bug-lsh@gnu.org])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([src/lsh_types.h])
# FIXME: requirements
AM_INIT_AUTOMAKE(lsh, 1.3.2)
AM_CONFIG_HEADER(config.h)
# AC_CONFIG_HEADERS(config.h)
AH_TEMPLATE([PACKAGE], [The name of this software distribution])
AH_TEMPLATE([VERSION], [The version of this software distribution])
# FIXME: Move this to the Makefile, as recommended by the autoconf manual.
AH_TEMPLATE([PREFIX], [The installation prefix])
AC_DEFINE_UNQUOTED(PREFIX, "`echo $prefix | sed "s@^NONE@$ac_default_prefix@"`")
AH_TEMPLATE([SBINDIR], [sbin directory])
# NOTE: The definition below is broken.
AC_DEFINE_UNQUOTED(SBINDIR, "`echo $sbindir | sed "s@^NONE@$prefix/sbin@" | sed "s@^NONE@$ac_default_prefix@"`")
......@@ -52,7 +58,9 @@ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
AC_ARG_ENABLE(debug_alloc,
AC_HELP_STRING([--enable-debug-alloc], [Enable memory allocation sanity checks]),,
[enable_debug_alloc=no])
AH_TEMPLATE([DEBUG_ALLOC],
[Define to enable sanity checking on memory allocation and casting])
if test x$enable_debug_alloc = xyes ; then
AC_DEFINE(DEBUG_ALLOC)
fi
......@@ -61,6 +69,7 @@ AC_ARG_ENABLE(debug_trace,
AC_HELP_STRING([--enable-debug-trace], [Enable tracing support]),,
[enable_debug_trace=no])
AH_TEMPLATE([DEBUG_TRACE], [Define to enable tracing])
if test x$enable_debug_trace = xyes ; then
AC_DEFINE(DEBUG_TRACE)
fi
......@@ -80,6 +89,7 @@ AC_ARG_ENABLE(pty,
AC_HELP_STRING([--without-pty], [Disable pty support]),,
[enable_pty=yes])
AH_TEMPLATE([WITH_PTY_SUPPORT], [Define to enable pty support])
if test x$enable_pty = xyes ; then
AC_DEFINE(WITH_PTY_SUPPORT)
fi
......@@ -93,19 +103,13 @@ if test x$with_sshd1 = xyes ; then
with_sshd1=/usr/local/sbin/sshd1
fi
AH_TEMPLATE([SSHD1], [Location of the SSH1 daemon])
AH_TEMPLATE([WITH_SSH1_FALLBACK], [Define to enable fallback to SSH1])
if test x$with_sshd1 != xno ; then
AC_DEFINE(WITH_SSH1_FALLBACK)
AC_DEFINE_UNQUOTED(SSHD1,"$with_sshd1")
fi
AC_ARG_ENABLE(idea,
AC_HELP_STRING([--enable-idea], [Support the patent-encumbered IDEA algorithm]),,
[enable_idea=no])
if test x$enable_idea = xyes ; then
AC_DEFINE(WITH_IDEA)
fi
AC_ARG_ENABLE(srp,
AC_HELP_STRING([--disable-srp], [Disable the (experimental) support for SRP]),,
[enable_srp=yes])
......@@ -113,7 +117,8 @@ AC_ARG_ENABLE(srp,
AC_ARG_ENABLE(kerberos,
AC_HELP_STRING([--disable-kerberos], [Don't support kerberos]),,
[enable_kerberos=yes])
AH_TEMPLATE([WITH_SRP], [Define if SRP should be supported])
if test x$enable_srp = xyes ; then
AC_DEFINE(WITH_SRP)
SRP_PROGRAM=srp-gen
......@@ -122,9 +127,12 @@ fi
AC_SUBST(SRP_PROGRAM)
AC_ARG_ENABLE(datafellows_workarounds,
AC_HELP_STRING([--disable-datafellows-workarounds], [Disable bug-compatibility with SSH Inc's clients and servers]),,
AC_HELP_STRING([--disable-datafellows-workarounds],
[Disable bug-compatibility with SSH Inc's clients and servers]),,
[enable_datafellows_workarounds=yes])
AH_TEMPLATE([DATAFELLOWS_WORKAROUNDS],
[Define to support non-standard packets of ssh2])
if test x$enable_datafellows_workarounds = xyes ; then
AC_DEFINE(DATAFELLOWS_WORKAROUNDS)
fi
......@@ -133,6 +141,7 @@ AC_ARG_ENABLE(tcp_forward,
AC_HELP_STRING([--disable-tcp-forward], [Disable tcp forwarding]),,
[enable_tcp_forward=yes])
AH_TEMPLATE([WITH_TCP_FORWARD], [Define to enable tcp forwarding])
if test x$enable_tcp_forward = xyes ; then
AC_DEFINE(WITH_TCP_FORWARD)
fi
......@@ -141,6 +150,7 @@ AC_ARG_ENABLE(x11_forward,
AC_HELP_STRING([--disable-x11-forward], [Disable x11 forwarding (proxy only)]),,
[eanble_x11_forward=yes])
AH_TEMPLATE([WITH_X11_FORWARD], [Define to enable x11 forwarding])
if test x$enable_x11_forward = xyes ; then
AC_DEFINE(WITH_X11_FORWARD)
fi
......@@ -149,6 +159,8 @@ AC_ARG_ENABLE(agent_forward,
AC_HELP_STRING([--disable-agent-forward], [Disable auth-agent forwarding (proxy only)]),,
[with_agent_forward=yes])
AH_TEMPLATE([WITH_AGENT_FORWARD],
[Define to enable authentication agent forwarding])
if test x$disable_agent_forward = xyes ; then
AC_DEFINE(WITH_AGENT_FORWARD)
fi
......@@ -171,6 +183,7 @@ AC_ARG_ENABLE(utmp,
AC_HELP_STRING([--disable-utmp], [Disable utmp and wtmp support]),,
[enable_utmp=yes])
AH_TEMPLATE([WITH_UTMP], [For utmp support])
if test x$enable_utmp = xyes ; then
AC_DEFINE(WITH_UTMP)
fi
......@@ -259,6 +272,7 @@ fi
AC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h)
AC_CHECK_HEADERS(shadow.h)
if test x$with_zlib = xyes; then
AC_CHECK_HEADERS(zlib.h,, [with_zlib=no])
fi
......@@ -320,9 +334,11 @@ AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, setsockopt)
# logwtmp is also in libutil
AC_CHECK_LIB(util, openpty)
# This macro is new in autoconf-2.13
AC_SEARCH_LIBS(syslog, bsd socket inet, [AC_DEFINE(HAVE_SYSLOG)])
AH_TEMPLATE([WITH_ZLIB], [Define if zlib should be used])
# Should we use zlib?
if test x$with_zlib = xyes ; then
AC_DEFINE(WITH_ZLIB)
......@@ -340,6 +356,7 @@ if test x$enable_kerberos = xyes; then
AC_CHECK_KRB_LIB(krb5, krb5_cc_gen_new,, [enable_kerberos=no])
fi
AH_TEMPLATE([WITH_KERBEROS], [For kerberos])
if test x$enable_kerberos = xyes; then
AC_DEFINE(WITH_KERBEROS)
KRB_PROGRAM=lsh-krb-checkpw
......@@ -348,6 +365,7 @@ fi
AC_SUBST(KRB_LIBS)
AC_SUBST(KRB_PROGRAM)
AH_TEMPLATE([WITH_GCOV], [Use gcov])
if test "x$enable_gcov" = "xyes"; then
CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
AC_DEFINE(WITH_GCOV)
......@@ -395,6 +413,8 @@ AC_CACHE_CHECK([if netdb.h defines AI_NUMERICHOST],
#endif
], lsh_cv_sys_ai_numerichost=yes,
lsh_cv_sys_ai_numerichost=no)])
AH_TEMPLATE([HAVE_AI_NUMERICHOST], [Define if AI_NUMERICHOST exists])
if test x$lsh_cv_sys_ai_numerichost = xyes ; then
AC_DEFINE(HAVE_AI_NUMERICHOST)
fi
......@@ -492,6 +512,8 @@ int main(int argc, char **argv)
lsh_cv_func_shutdown_works_on_unix_sockets=no,
lsh_cv_func_shutdown_works_on_unix_sockets=yes)])
AH_TEMPLATE([SHUTDOWN_WORKS_WITH_UNIX_SOCKETS],
[Define to indicate that shutdown seems to work properly])
if test x$lsh_cv_func_shutdown_works_on_unix_sockets = xyes ; then
AC_DEFINE(SHUTDOWN_WORKS_WITH_UNIX_SOCKETS)
fi
......@@ -557,6 +579,8 @@ AC_CACHE_CHECK(
# Pessimistic default for cross compilation.
[lsh_cv_sys_unix98_ptys=no]))
AH_TEMPLATE([HAVE_UNIX98_PTYS],
[Define if a we have working UNIX98 pty handling])
if test x$lsh_cv_sys_unix98_ptys = xyes; then
AC_DEFINE(HAVE_UNIX98_PTYS)
fi
......@@ -579,6 +603,7 @@ foo(void)
lsh_cv_c_attribute=yes,
lsh_cv_c_attribute=no)])
AH_TEMPLATE([HAVE_GCC_ATTRIBUTE], [Define if the compiler understands __attribute__])
if test "x$lsh_cv_c_attribute" = "xyes"; then
AC_DEFINE(HAVE_GCC_ATTRIBUTE)
fi
......@@ -591,33 +616,25 @@ AC_CACHE_CHECK(for __FUNCTION__,
lsh_cv_c_FUNCTION=yes,
lsh_cv_c_FUNCTION=no)])
AH_TEMPLATE([HAVE_GCC_FUNCTION],
[Define if the compiler understands __FUNCTION__])
if test "x$lsh_cv_c_FUNCTION" = "xyes"; then
AC_DEFINE(HAVE_GCC_FUNCTION)
fi
# Check for the offsetof macro
# FIXME: This is usually defined in stddef.h
AC_CACHE_CHECK(for offsetof,
lsh_cv_c_offsetof,
[ AC_TRY_COMPILE(,
[ #include <stddef.h>
struct s { int a; int b; };
int foo(void) { return offsetof(struct s, b); } ],
lsh_cv_c_offsetof=yes,
lsh_cv_c_offsetof=no)])
if test "x$lsh_cv_c_offsetof" = "xyes"; then
AC_DEFINE(HAVE_C_OFFSETOF)
fi
AC_MSG_CHECKING(for BSD pty names)
AH_TEMPLATE([PTY_BSD_SCHEME_FIRST_CHARS],
[Possible first characters in a /dev/ptyXX name])
AH_TEMPLATE([PTY_BSD_SCHEME_SECOND_CHARS],
[Possible second characters in a /dev/ptyXX name])
# FIXME: What is most portable, tr -d '\n' or tr -d '\012' ?
AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | uniq | tr -d '\n'`")
AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 | sort | uniq | tr -d '\n'`")
# FIXME: How can we test if the bsd scheme is likely to work?
AH_TEMPLATE([PTY_BSD_SCHEME], [Traditional BSD pty handling])
AC_DEFINE(PTY_BSD_SCHEME)
AC_MSG_RESULT([done])
......@@ -654,6 +671,7 @@ if test x$enable_ipv6 = xyes ; then
fi
fi
AH_TEMPLATE([WITH_IPV6], [For Ipv6 support])
if test x$enable_ipv6 = xyes ; then
AC_DEFINE(WITH_IPV6)
fi
......
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