Blob Blame Raw
--- ./src/system.c.orig	2014-11-15 13:13:16.000000000 -0700
+++ ./src/system.c	2014-12-09 20:00:00.000000000 -0700
@@ -1766,6 +1766,7 @@ void InitSystem (
     Char *              argv [] )
 {
     Char *              *ptrlist;
+    Char *              envvar;
     UInt                i;             /* loop variable                   */
     Int res;                       /* return from option processing function */
 
@@ -1889,6 +1890,16 @@ void InitSystem (
 
 #endif
 
+    /* process environment variables */
+    envvar = getenv("GAP_DIR");
+    if (envvar == NULL)
+      envvar = "/usr/lib/gap";
+    setGapRootPath(&envvar, NULL);
+    envvar = getenv("GAP_MEM");
+    if (envvar == NULL)
+      envvar = "32m";
+    storeMemory2(&envvar, &SyStorMin);
+
     /* save the original command line for export to GAP */
     SyOriginalArgc = argc;
     SyOriginalArgv = argv;