From aa04a9009a2add3f7d6d07dfc6d799139fa72ed1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 17 Sep 2010 04:09:33 +0200 Subject: [PATCH] login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD. * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether login_tty exists. Reported by Mats Erik Andersson . --- ChangeLog | 7 +++++++ m4/pty.m4 | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9a60cd2ec..63524d88e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-09-16 Bruno Haible + + login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD. + * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether + login_tty exists. + Reported by Mats Erik Andersson . + 2010-09-16 Bruno Haible login_tty: Make the replacement code work on BSD systems. diff --git a/m4/pty.m4 b/m4/pty.m4 index 7fc91caaef..d2966bc94a 100644 --- a/m4/pty.m4 +++ b/m4/pty.m4 @@ -1,4 +1,4 @@ -# pty.m4 serial 8 +# pty.m4 serial 9 dnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -142,7 +142,10 @@ AC_DEFUN([gl_FUNC_LOGIN_TTY], [ AC_REQUIRE([gl_PTY_LIB]) - AC_CHECK_FUNCS_ONCE([login_tty]) + gl_saved_libs="$LIBS" + LIBS="$LIBS $PTY_LIB" + AC_CHECK_FUNCS([login_tty]) + LIBS="$gl_saved_LIBS" if test $ac_cv_func_login_tty = no; then AC_LIBOBJ([login_tty]) fi -- 2.30.2