- (djm) [configure.ac] Disable utmp, wtmp and/or lastlog if the platform

is unable to successfully compile them. Based on patch from des AT
    des.no
This commit is contained in:
Damien Miller 2013-03-15 10:23:07 +11:00
parent aa97d13fa2
commit a2438bbd28
2 changed files with 42 additions and 3 deletions

View File

@ -1,3 +1,8 @@
20120316
- (djm) [configure.ac] Disable utmp, wtmp and/or lastlog if the platform
is unable to successfully compile them. Based on patch from des AT
des.no
20120312
- (dtucker) [regress/Makefile regress/cipher-speed.sh regress/test-exec.sh]
Improve portability of cipher-speed test, based mostly on a patch from

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.514 2013/03/12 00:31:05 dtucker Exp $
# $Id: configure.ac,v 1.515 2013/03/14 23:23:07 djm Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
AC_REVISION($Revision: 1.514 $)
AC_REVISION($Revision: 1.515 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_LANG([C])
@ -4439,7 +4439,6 @@ if test -n "$conf_wtmp_location"; then
[Define if you want to specify the path to your wtmp file])
fi
dnl wtmpx detection
AC_MSG_CHECKING([if your system defines WTMPX_FILE])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@ -4471,6 +4470,41 @@ if test ! -z "$blibpath" ; then
AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
fi
AC_CHECK_MEMBER([struct lastlog.ll_line], [], [
AC_DEFINE([DISABLE_LASTLOG])
], [
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
#ifdef HAVE_LASTLOG_H
#include <lastlog.h>
#endif
])
AC_CHECK_MEMBER([struct utmp.ut_line], [], [
AC_DEFINE([DISABLE_UTMP])
AC_DEFINE([DISABLE_WTMP])
], [
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
#ifdef HAVE_LASTLOG_H
#include <lastlog.h>
#endif
])
dnl Adding -Werror to CFLAGS early prevents configure tests from running.
dnl Add now.
CFLAGS="$CFLAGS $werror_flags"