diff --git a/m4/lnav_with_readline.m4 b/m4/lnav_with_readline.m4 index e89a87f6..7b842012 100644 --- a/m4/lnav_with_readline.m4 +++ b/m4/lnav_with_readline.m4 @@ -77,8 +77,8 @@ AC_DEFUN([AX_PATH_LIB_READLINE], dnl i.e. We haven't picked up editline. AC_SEARCH_LIBS([history_set_history_state], [readline], [], - AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.]) - [$CURSES] + AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.]), + [$CURSES_LIB] ) AC_SUBST([READLINE_LIBS]) diff --git a/m4/lnav_with_sqlite3.m4 b/m4/lnav_with_sqlite3.m4 index 785bdda1..d5d77c33 100644 --- a/m4/lnav_with_sqlite3.m4 +++ b/m4/lnav_with_sqlite3.m4 @@ -32,10 +32,13 @@ AC_DEFUN([LNAV_WITH_SQLITE3], ] ) + AS_VAR_SET([saved_LDFLAGS], [$LDFLAGS]) + LNAV_ADDTO([LDFLAGS], [-pthread]) AC_SEARCH_LIBS([sqlite3_open], [sqlite3], AS_VAR_SET([SQLITE3_LIBS], ["-lsqlite3"]), AC_MSG_ERROR([sqlite3 library not found]) ) + AS_VAR_SET([LDFLAGS], [$saved_LDFLAGS]) AC_CHECK_HEADERS([sqlite3.h], [], AC_MSG_ERROR([sqlite3 headers not found])