ref: 56b46ba923c2aa4d150bbb28de29fa57c3adbef6
parent: 19a835847c826572f6cff45852d496276b772056
author: James Turner <james@calminferno.net>
date: Mon Jun 3 17:40:51 EDT 2013
Allow the defining of an init file at build time Since OpenBSD is unable to determine the pathname of a running process, this allows us to specify the full path to flisp.boot. This will also come in handy for system wide installs where you want flisp to live in bin and flisp.boot to live in share or a similar location.
--- a/flmain.c
+++ b/flmain.c
@@ -38,6 +38,9 @@
fl_init(512*1024);
fname_buf[0] = '\0';
+#ifdef INITFILE
+ strcat(fname_buf, INITFILE);
+#else
value_t str = symbol_value(symbol("*install-dir*"));
char *exedir = (str == UNBOUND ? NULL : cvalue_data(str));
if (exedir != NULL) {
@@ -45,6 +48,7 @@
strcat(fname_buf, PATHSEPSTRING);
}
strcat(fname_buf, "flisp.boot");
+#endif
value_t args[2];
fl_gc_handle(&args[0]);