From b08d5e7dad907493bc6946ab708640b567e2dffe Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 15 Feb 2013 05:26:16 +0100 Subject: install standard macros into special standard library path (pkgdatadir/lib) * SCITECOPATH environment variable defaults to this directory * manpage updated * default teco.ini updated: no need to generate it anymore --- src/Makefile.am | 2 +- src/main.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 9f40524..60cb387 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/bootstrap.am AM_CFLAGS = -Wall -std=c99 AM_CXXFLAGS = -Wall -AM_CPPFLAGS = +AM_CPPFLAGS = -D'DEFAULT_SCITECOPATH="@scitecopathdir@"' if NEED_COMPAT AM_CPPFLAGS += -I@top_srcdir@/compat endif diff --git a/src/main.cpp b/src/main.cpp index c1da584..2834709 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -168,7 +168,11 @@ process_options(int &argc, char **&argv) static inline void initialize_environment(void) { - gchar **environ = g_get_environ(); + gchar **environ; + + g_setenv("SCITECOPATH", DEFAULT_SCITECOPATH, FALSE); + + environ = g_get_environ(); for (gchar **p = environ; *p; p++) { gchar *value = strchr(*p, '=') + 1; -- cgit v1.2.3