mirror of
https://github.com/tstack/lnav.git
synced 2024-09-11 13:05:51 +03:00
[build] some more build tweaks
This commit is contained in:
parent
22dbcf7796
commit
de374e68f6
5
configure
vendored
5
configure
vendored
@ -3809,6 +3809,8 @@ fi
|
||||
|
||||
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_ISOC99_SOURCE"
|
||||
|
||||
# CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
|
||||
# CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
|
||||
|
||||
@ -7000,9 +7002,6 @@ case "$host_os" in
|
||||
|
||||
$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -35,6 +35,8 @@ AC_SUBST(abssrcdir)
|
||||
|
||||
AC_PROG_CXX
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_ISOC99_SOURCE"
|
||||
|
||||
# CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
|
||||
# CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
|
||||
|
||||
@ -95,7 +97,6 @@ case "$host_os" in
|
||||
*)
|
||||
# AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread])
|
||||
AC_DEFINE([_BSD_SOURCE], [1], [Need pread])
|
||||
AC_DEFINE([_ISOC99_SOURCE], [1], [Needed for LLONG_MAX])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -131,6 +131,3 @@
|
||||
|
||||
/* Need pread */
|
||||
#undef _BSD_SOURCE
|
||||
|
||||
/* Needed for LLONG_MAX */
|
||||
#undef _ISOC99_SOURCE
|
||||
|
@ -3312,6 +3312,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
setlocale(LC_NUMERIC, "");
|
||||
|
||||
ensure_dotlnav();
|
||||
|
||||
load_formats(loader_errors);
|
||||
if (!loader_errors.empty()) {
|
||||
for (std::vector<std::string>::iterator iter = loader_errors.begin();
|
||||
@ -3329,8 +3331,6 @@ int main(int argc, char *argv[])
|
||||
*/
|
||||
setenv("TERMINFO_DIRS", "/usr/share/terminfo", 0);
|
||||
|
||||
ensure_dotlnav();
|
||||
|
||||
if (sqlite3_open(":memory:", lnav_data.ld_db.out()) != SQLITE_OK) {
|
||||
fprintf(stderr, "error: unable to create sqlite memory database\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -85,4 +85,9 @@ void ensure_dotlnav(void)
|
||||
if (!path.empty()) {
|
||||
mkdir(path.c_str(), 0755);
|
||||
}
|
||||
|
||||
path = dotlnav_path("formats/default");
|
||||
if (!path.empty()) {
|
||||
mkdir(path.c_str(), 0755);
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void load_formats(std::vector<std::string> &errors)
|
||||
yajl_handle handle;
|
||||
|
||||
{
|
||||
string sample_path = dotlnav_path("formats/default-formats.json.sample");
|
||||
string sample_path = dotlnav_path("formats/default/default-formats.json.sample");
|
||||
auto_fd sample_fd;
|
||||
|
||||
if ((sample_fd = open(sample_path.c_str(),
|
||||
@ -250,7 +250,7 @@ void load_formats(std::vector<std::string> &errors)
|
||||
yajl_complete_parse(handle);
|
||||
yajl_free(handle);
|
||||
|
||||
string format_path = dotlnav_path("formats/*.json");
|
||||
string format_path = dotlnav_path("formats/*/*.json");
|
||||
static_root_mem<glob_t, globfree> gl;
|
||||
|
||||
if (glob(format_path.c_str(), 0, NULL, gl.inout()) == 0) {
|
||||
|
@ -39,7 +39,8 @@ check_PROGRAMS = \
|
||||
|
||||
AM_LDFLAGS = \
|
||||
$(STATIC_LDFLAGS) \
|
||||
$(SQLITE3_LDFLAGS)
|
||||
$(SQLITE3_LDFLAGS) \
|
||||
-pthread
|
||||
|
||||
LDADD = -lz
|
||||
|
||||
@ -102,7 +103,7 @@ drive_vt52_curses_SOURCES = drive_vt52_curses.cc
|
||||
drive_vt52_curses_LDADD = ../src/libdiag.a $(CURSES_LIB)
|
||||
|
||||
drive_readline_curses_SOURCES = drive_readline_curses.cc
|
||||
drive_readline_curses_LDADD = ../src/libdiag.a $(CURSES_LIB) $(READLINE_LIBS)
|
||||
drive_readline_curses_LDADD = ../src/libdiag.a $(READLINE_LIBS) $(CURSES_LIB)
|
||||
|
||||
drive_sql_SOURCES = \
|
||||
drive_sql.cc
|
||||
|
@ -610,7 +610,8 @@ AM_CPPFLAGS = \
|
||||
|
||||
AM_LDFLAGS = \
|
||||
$(STATIC_LDFLAGS) \
|
||||
$(SQLITE3_LDFLAGS)
|
||||
$(SQLITE3_LDFLAGS) \
|
||||
-pthread
|
||||
|
||||
LDADD = -lz
|
||||
test_ansi_scrubber_SOURCES = test_ansi_scrubber.cc
|
||||
@ -656,7 +657,7 @@ drive_view_colors_LDADD = ../src/libdiag.a $(CURSES_LIB)
|
||||
drive_vt52_curses_SOURCES = drive_vt52_curses.cc
|
||||
drive_vt52_curses_LDADD = ../src/libdiag.a $(CURSES_LIB)
|
||||
drive_readline_curses_SOURCES = drive_readline_curses.cc
|
||||
drive_readline_curses_LDADD = ../src/libdiag.a $(CURSES_LIB) $(READLINE_LIBS)
|
||||
drive_readline_curses_LDADD = ../src/libdiag.a $(READLINE_LIBS) $(CURSES_LIB)
|
||||
drive_sql_SOURCES = \
|
||||
drive_sql.cc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user