diff options
author | Damien Miller <djm@mindrot.org> | 2013-03-15 10:23:07 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-03-15 10:23:07 +1100 |
commit | a2438bbd28eb35a8968d193ac89b30a90e96f719 (patch) | |
tree | 48c1fd6e43568f9447d58c091863c71ec7b38d30 | |
parent | aa97d13fa22d410ad155d23b230fd3cce989ce25 (diff) |
- (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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 40 |
2 files changed, 42 insertions, 3 deletions
@@ -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 diff --git a/configure.ac b/configure.ac index a49de84e..bf161b25 100644 --- a/configure.ac +++ b/configure.ac @@ -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" |