Commit 89cb5538 authored by Christian Persch's avatar Christian Persch
Browse files

Vary termcap file into for gtk2/3 builds

parent 89c61bb5
......@@ -96,6 +96,7 @@ libvte@VTE_LIBRARY_SUFFIX_U@_la_CPPFLAGS = \
-DDATADIR='"$(datadir)"' \
-DLIBEXECDIR='"$(libexecdir)"' \
-DLOCALEDIR='"$(localedir)"' \
-DTERMCAPDIR='"$(pkgdatadir)/termcap-$(VTE_API_VERSION)"' \
-DVTE_COMPILATION \
$(AM_CPPFLAGS)
......@@ -240,7 +241,7 @@ interpret_SOURCES = \
interpret.c
interpret_CPPFLAGS = \
-DINTERPRET_MAIN \
-DDATADIR='"$(datadir)"'
-DTERMCAPDIR='"$(pkgdatadir)/termcap-$(VTE_API_VERSION)"'
interpret_CFLAGS = $(GTK_CFLAGS)
interpret_LDADD = $(GTK_LIBS)
......
......@@ -72,8 +72,7 @@ main(int argc, char **argv)
g_type_init();
terminal = argv[1];
termcap = _vte_termcap_new(g_strdup_printf(DATADIR "/" PACKAGE
"/termcap/%s", terminal));
termcap = _vte_termcap_new(g_build_filename(TERMCAPDIR, terminal, NULL));
if (termcap == NULL) {
termcap = _vte_termcap_new("/etc/termcap");
}
......
......@@ -8035,10 +8035,11 @@ vte_terminal_set_termcap(VteTerminal *terminal, const char *path,
char *wpath;
if (path == NULL) {
wpath = g_strdup_printf(DATADIR "/" PACKAGE "/termcap/%s",
terminal->pvt->emulation ?
terminal->pvt->emulation :
vte_terminal_get_default_emulation(terminal));
wpath = g_build_filename(TERMCAPDIR,
terminal->pvt->emulation ?
terminal->pvt->emulation :
vte_terminal_get_default_emulation(terminal),
NULL);
if (g_stat(wpath, &st) != 0) {
g_free(wpath);
wpath = g_strdup("/etc/termcap");
......
EXTRA_DIST = xterm xterm.baseline
termcapdir = $(pkgdatadir)/termcap
termcapdir = $(pkgdatadir)/termcap-$(VTE_API_VERSION)
termcap_DATA = xterm
if VTE_DEFAULT_EMULATION
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment