1
1
mirror of https://github.com/tstack/lnav.git synced 2024-09-11 13:05:51 +03:00

[build] fix os x build issues

This commit is contained in:
Timothy Stack 2013-10-23 07:01:32 -07:00
parent 879c1059aa
commit 7f08e46920
9 changed files with 60 additions and 30 deletions

View File

@ -83,8 +83,8 @@ AC_DEFUN([AX_LIB_SQLITE3],
if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
&& test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
ac_sqlite3_path=$ac_sqlite3_path_tmp
ac_sqlite3_ldflags="-I$ac_sqlite3_path_tmp/include"
ac_sqlite3_cppflags="-L$ac_sqlite3_path_tmp/lib"
ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include"
ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib"
break;
fi
done

53
configure vendored
View File

@ -6640,6 +6640,51 @@ _ACEOF
LIBS="-lpcre $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE in -lpcrecpp" >&5
$as_echo_n "checking for _ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE in -lpcrecpp... " >&6; }
if ${ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcrecpp $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char _ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE ();
int
main ()
{
return _ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE=yes
else
ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE" >&5
$as_echo "$ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE" >&6; }
if test "x$ac_cv_lib_pcrecpp__ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPCRECPP 1
_ACEOF
LIBS="-lpcrecpp $LIBS"
fi
for ac_header in pcre.h pcre/pcre.h
@ -6656,7 +6701,7 @@ fi
done
if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
PCRE_LIBS="-lpcre"
PCRE_LIBS="-lpcre -lpcrecpp"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lib pcre" >&5
$as_echo_n "checking lib pcre... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCRE_LIBS" >&5
@ -6716,7 +6761,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: .setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&5
$as_echo ".setting PCRE_LIBS -L$with_pcre/lib -lpcre" >&6; }
PCRE_LDFLAGS="-L$with_pcre/lib"
PCRE_LIBS="-lpcre"
PCRE_LIBS="-lpcre -lpcrecpp"
test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lib pcre" >&5
$as_echo_n "checking lib pcre... " >&6; }
@ -6897,8 +6942,8 @@ $as_echo_n "checking for SQLite3 library >= $sqlite3_version_req... " >&6; }
if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
&& test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
ac_sqlite3_path=$ac_sqlite3_path_tmp
ac_sqlite3_ldflags="-I$ac_sqlite3_path_tmp/include"
ac_sqlite3_cppflags="-L$ac_sqlite3_path_tmp/lib"
ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include"
ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib"
break;
fi
done

View File

@ -9,9 +9,10 @@ if test ".$with_pcre" = ".no" ; then
else
AC_MSG_RESULT([(testing)])
AC_CHECK_LIB(pcre, pcre_study)
AC_CHECK_LIB(pcrecpp, _ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE)
AC_CHECK_HEADERS(pcre.h pcre/pcre.h)
if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
PCRE_LIBS="-lpcre"
PCRE_LIBS="-lpcre -lpcrecpp"
AC_MSG_CHECKING([lib pcre])
AC_MSG_RESULT([$PCRE_LIBS])
m4_ifval($1,$1)
@ -24,7 +25,7 @@ else
if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre)
PCRE_LDFLAGS="-L$with_pcre/lib"
PCRE_LIBS="-lpcre"
PCRE_LIBS="-lpcre -lpcrecpp"
test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
AC_MSG_CHECKING([lib pcre])
AC_MSG_RESULT([$PCRE_LIBS])

View File

@ -24,6 +24,9 @@
/* Define to 1 if you have the `pcre' library (-lpcre). */
#undef HAVE_LIBPCRE
/* Define to 1 if you have the `pcrecpp' library (-lpcrecpp). */
#undef HAVE_LIBPCRECPP
/* Define to 1 if you have the `readline' library (-lreadline). */
#undef HAVE_LIBREADLINE

View File

@ -2736,12 +2736,7 @@ public:
LB_MODE_DRAG
};
lnav_behavior()
: lb_selection_start(-1),
lb_selection_last(-1),
lb_scrollbar_y(-1),
lb_scroll_repeat(0),
lb_mode(LB_MODE_NONE) {};
lnav_behavior() {};
int scroll_polarity(int button)
{
@ -2789,17 +2784,6 @@ public:
};
private:
struct timeval lb_last_event_time;
vis_line_t lb_selection_start;
vis_line_t lb_selection_last;
bool lb_selection_cleared;
int lb_scrollbar_y;
struct timeval lb_last_scroll_time;
int lb_scroll_repeat;
lb_mode_t lb_mode;
};
static void looper(void)

View File

@ -205,7 +205,6 @@ public:
};
private:
int ldt_column;
const content_line_t ldt_template_line;
data_parser::schema_id_t ldt_schema_id;
std::string ldt_current_line;

View File

@ -67,7 +67,7 @@ static int write_timestamp(int fd, off_t woff)
}
piper_proc::piper_proc(int pipefd, bool timestamp, const char *filename)
: pp_fd(-1), pp_timestamp(timestamp), pp_child(-1)
: pp_fd(-1), pp_child(-1)
{
assert(pipefd >= 0);

View File

@ -78,9 +78,6 @@ private:
/** A file descriptor that refers to the temporary file. */
int pp_fd;
/** Indicates whether timestamps should be added to the input. */
bool pp_timestamp;
/** The child process' pid. */
pid_t pp_child;
};

View File

@ -35,6 +35,7 @@
#include <stdlib.h>
#include <curses.h>
#include <string.h>
#include <unistd.h>
#include <string>