From 5658b628b9bf1c1e0bd5856736332ce8b9c51517 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 26 Mar 2016 20:17:17 +0000 Subject: [PATCH] Look for utempter_add_record to be sure we have the new utempter API, the old utempter API was also using utempter.h. --- configure.ac | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 82e8a452..8ce20632 100644 --- a/configure.ac +++ b/configure.ac @@ -167,10 +167,17 @@ if test "x$found_curses" = xno; then fi # Look for utempter. -AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no) -if test "x$have_utempter" = xyes; then - AC_DEFINE(HAVE_UTEMPTER) - LIBS="$LIBS -lutempter" +AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no) +if test "x$found_utempter" = xyes; then + AC_SEARCH_LIBS( + utempter_add_record, + utempter, + found_utempter=yes, + found_utempter=no + ) + if test "x$found_utempter" = xyes; then + AC_DEFINE(HAVE_UTEMPTER) + fi fi # Check for b64_ntop.