>From 1912cc869552eeec396c3363b1f094dda34ad366 Mon Sep 17 00:00:00 2001 From: Bernhard R. Link Date: Sun, 15 Jun 2008 15:40:37 +0200 Subject: [PATCH] ignore non-existing libhistory unless --enable-history --- configure.in | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index df323ca..dc45b15 100644 --- a/configure.in +++ b/configure.in @@ -95,21 +95,25 @@ fi dnl Those who do not learn the lessons of history dnl are doomed to delete it... yuk yuk. --ttn -AC_ARG_ENABLE(history,AC_HELP_STRING([--disable-history],[ignore libhistory (default: use it)]), +AC_ARG_ENABLE(history,AC_HELP_STRING([--disable-history],[ignore libhistory (default: use it if available, only used for ! expansion)]), [ if test x${enableval} = xyes ; then check_for_libhistory=yes else check_for_libhistory=no - fi],[check_for_libhistory=yes]) + fi],[check_for_libhistory=default]) HISTORY_LIBS="" -if test x$check_for_libhistory = xyes ; then +if test x$check_for_libhistory != xno ; then AC_CHECK_HEADERS([readline/history.h], AC_CHECK_LIB(history, add_history, [HISTORY_LIBS="-lhistory" AC_DEFINE_UNQUOTED(HAVE_HISTORY, 1, Define this to enable history)], - AC_MSG_WARN([*** Can't find History lib. Install readline dev libs for history.])), - AC_MSG_WARN([*** Can't find History header. Install readline dev libs for history.])) + if test x$check_for_libhistory = xyes ; then + AC_MSG_ERROR([*** Can't find History lib. Install readline dev libs for history expansion.]) + fi), + if test x$check_for_libhistory = xyes ; then + AC_MSG_ERROR([*** Can't find History header. Install readline dev libs for history expansion.]) + fi) fi AC_SUBST(HISTORY_LIBS) -- 1.4.4.4