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

* configure.in: Bumped version to 0.9.9.

Added --with-lib-path option, RPATH handling, and checks for
libutil.h, ut_name and ut_user. Fixed gmp check to recognize
gmp-3.x.

Rev: configure.in:1.70
parent 70cc2175
......@@ -4,7 +4,7 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/lsh_types.h)
AM_INIT_AUTOMAKE(lsh, 0.9.8)
AM_INIT_AUTOMAKE(lsh, 0.9.9)
dnl No real versioning yet, use dated snapshots instead.
dnl AM_INIT_AUTOMAKE(lsh, esyscmd([date +snapshot-%Y-%m-%d]))
......@@ -37,6 +37,7 @@ CPPFLAGS="$CPPFLAGS -I$srcdir -I$srcdir/src -I$srcdir/src/symmetric/include -DLS
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
dnl Check options
AC_ARG_ENABLE(debug_alloc,
[--disable-debug-alloc Disable memory allocation sanity checks],,
......@@ -145,6 +146,21 @@ if test x$enable_utmp = xyes ; then
AC_DEFINE(WITH_UTMP)
fi
AC_ARG_WITH(lib-path,
[--with-lib-path A colon-separated list of directories to search for libraries.],,
[with_lib_path=''])
if test x$with_lib_path != x ; then
LIBS="-L `echo $with_lib_path | sed 's/:/ -L /g'`"
fi
LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \
`echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
/usr/local/lib /sw/local/lib /sw/lib \
/usr/gnu/lib /opt/gnu/lib /sw/gnu/lib /usr/freeware/lib /usr/pkg/lib])
dnl echo RPATH_CANDIDATE_DIRS = $RPATH_CANDIDATE_DIRS
dnl Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
......@@ -208,6 +224,7 @@ if test x$with_zlib = xyes; then
AC_CHECK_HEADERS(zlib.h,, [with_zlib=no])
fi
AC_CHECK_HEADERS(poll.h sys/poll.h)
AC_CHECK_HEADERS(libutil.h)
AC_CHECK_HEADERS(crypt.h)
AC_CHECK_HEADERS(pty.h)
AC_CHECK_HEADERS(stropts.h)
......@@ -218,6 +235,8 @@ AC_CHECK_HEADERS(utmp.h, [have_utmp_h=yes], [have_utmp_h=no])
if test x$have_utmp_h = xyes; then
AC_CHECK_MEMBER([#include <utmp.h>], [utmp], [ut_host])
AC_CHECK_MEMBER([#include <utmp.h>], [utmp], [ut_name])
AC_CHECK_MEMBER([#include <utmp.h>], [utmp], [ut_user])
AC_CHECK_MEMBER([#include <utmp.h>], [utmp], [ut_addr])
AC_CHECK_MEMBER([#include <utmp.h>], [utmp], [ut_addr_v6])
fi
......@@ -230,15 +249,17 @@ dnl uses size_t. Falling back to int will cause some warnings.
dnl AC_CHECK_TYPE doesn't work, probably because the type in
dnl question is not defined in sys/types.h.
AC_CACHE_CHECK([for socklen_t in sys/socket.h],
lsh_cv_type_socklen_t,
[ AC_EGREP_HEADER(socklen_t, sys/socket.h,
lsh_cv_type_socklen_t=yes,
lsh_cv_type_socklen_t=no]))
AC_TYPE_SOCKLEN_T
if test x$lsh_cv_type_socklen_t = xno ; then
AC_DEFINE(socklen_t, int)
fi
dnl AC_CACHE_CHECK([for socklen_t in sys/socket.h],
dnl lsh_cv_type_socklen_t,
dnl [ AC_EGREP_HEADER(socklen_t, sys/socket.h,
dnl lsh_cv_type_socklen_t=yes,
dnl lsh_cv_type_socklen_t=no]))
dnl if test x$lsh_cv_type_socklen_t = xno ; then
dnl AC_DEFINE(socklen_t, int)
dnl fi
dnl Find the SSH1 daemon; try 'sshd1' first; if it fails, look for 'sshd'
......@@ -284,15 +305,23 @@ dnl ## fi
dnl Checks for libraries.
AC_CHECK_LIBGMP(gmp,,
dnl Some debian systems have both gmp1 and gmp2.
[AC_CHECK_LIBGMP(gmp2,,
AC_ERROR([GMP is missing (ftp://ftp.gnu.org/pub/gnu/gmp/gmp-2.0.2.tar.gz)]))])
dnl AC_CHECK_LIBGMP(gmp,,
dnl dnl Some debian systems have both gmp1 and gmp2.
dnl [AC_CHECK_LIBGMP(gmp2,,
dnl AC_ERROR([GMP is missing (ftp://ftp.gnu.org/pub/gnu/gmp/gmp-2.0.2.tar.gz)]))])
AC_SEARCH_LIBGMP(gmp gmp2,
LSH_RPATH_FIX,
[AC_ERROR([GMP is missing (ftp://ftp.gnu.org/pub/gnu/gmp/gmp-3.0.1.tar.gz)]) ])
if test x$with_zlib = xyes; then
AC_CHECK_LIB(z, inflate,, [with_zlib=no])
fi
if test x$with_zlib = xyes; then
LSH_RPATH_FIX
fi
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(xnet, inet_addr)
AC_CHECK_LIB(nsl, gethostbyname)
......
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