From 75b2c1693e66d624ef0c012b3b811d08a42ba722 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 3 Apr 2016 23:55:38 +0100 Subject: Add --disable-utempter to build without it. --- configure.ac | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8ce20632..ad44899f 100644 --- a/configure.ac +++ b/configure.ac @@ -167,16 +167,24 @@ if test "x$found_curses" = xno; then fi # Look for utempter. -AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no) +AC_ARG_ENABLE( + utempter, + AC_HELP_STRING(--enable-utempter, use utempter if it is installed), + found_utempter=$enable_utempter, + found_utempter=yes +) if test "x$found_utempter" = xyes; then - AC_SEARCH_LIBS( - utempter_add_record, - utempter, - found_utempter=yes, - found_utempter=no - ) + AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no) if test "x$found_utempter" = xyes; then - AC_DEFINE(HAVE_UTEMPTER) + 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 fi -- cgit