summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-03-15 10:23:07 +1100
committerDamien Miller <djm@mindrot.org>2013-03-15 10:23:07 +1100
commita2438bbd28eb35a8968d193ac89b30a90e96f719 (patch)
tree48c1fd6e43568f9447d58c091863c71ec7b38d30 /configure.ac
parentaa97d13fa22d410ad155d23b230fd3cce989ce25 (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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 37 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index a49de84e1..bf161b257 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.514 2013/03/12 00:31:05 dtucker Exp $ 1# $Id: configure.ac,v 1.515 2013/03/14 23:23:07 djm Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) 17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
18AC_REVISION($Revision: 1.514 $) 18AC_REVISION($Revision: 1.515 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
@@ -4439,7 +4439,6 @@ if test -n "$conf_wtmp_location"; then
4439 [Define if you want to specify the path to your wtmp file]) 4439 [Define if you want to specify the path to your wtmp file])
4440fi 4440fi
4441 4441
4442
4443dnl wtmpx detection 4442dnl wtmpx detection
4444AC_MSG_CHECKING([if your system defines WTMPX_FILE]) 4443AC_MSG_CHECKING([if your system defines WTMPX_FILE])
4445AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 4444AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -4471,6 +4470,41 @@ if test ! -z "$blibpath" ; then
4471 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile]) 4470 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
4472fi 4471fi
4473 4472
4473AC_CHECK_MEMBER([struct lastlog.ll_line], [], [
4474 AC_DEFINE([DISABLE_LASTLOG])
4475 ], [
4476#ifdef HAVE_SYS_TYPES_H
4477#include <sys/types.h>
4478#endif
4479#ifdef HAVE_UTMP_H
4480#include <utmp.h>
4481#endif
4482#ifdef HAVE_UTMPX_H
4483#include <utmpx.h>
4484#endif
4485#ifdef HAVE_LASTLOG_H
4486#include <lastlog.h>
4487#endif
4488 ])
4489
4490AC_CHECK_MEMBER([struct utmp.ut_line], [], [
4491 AC_DEFINE([DISABLE_UTMP])
4492 AC_DEFINE([DISABLE_WTMP])
4493 ], [
4494#ifdef HAVE_SYS_TYPES_H
4495#include <sys/types.h>
4496#endif
4497#ifdef HAVE_UTMP_H
4498#include <utmp.h>
4499#endif
4500#ifdef HAVE_UTMPX_H
4501#include <utmpx.h>
4502#endif
4503#ifdef HAVE_LASTLOG_H
4504#include <lastlog.h>
4505#endif
4506 ])
4507
4474dnl Adding -Werror to CFLAGS early prevents configure tests from running. 4508dnl Adding -Werror to CFLAGS early prevents configure tests from running.
4475dnl Add now. 4509dnl Add now.
4476CFLAGS="$CFLAGS $werror_flags" 4510CFLAGS="$CFLAGS $werror_flags"