From a3bdb2355dcd34f5a76e83a72e87ec0a9a18599d Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Thu, 26 Mar 2015 18:51:48 -0700 Subject: [PATCH 1/2] [build] Fix the check for editline in readline macro. --- m4/lnav_with_readline.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]) From a903873f1ba3abd4047b5bc5252a068173f516d7 Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Thu, 26 Mar 2015 20:40:41 -0700 Subject: [PATCH 2/2] [build] Add '-pthread' to sqlite macro. On some systems, sqlite3 requires pthread libraries to be linked in. Add the flag so that autoconf can successfully compile and look for 'sqlite3_open'. --- m4/lnav_with_sqlite3.m4 | 3 +++ 1 file changed, 3 insertions(+) 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])