Blob Blame Raw
--- ./src/system.c.orig	2013-12-01 03:27:41.000000000 -0700
+++ ./src/system.c	2014-01-13 22:00:00.000000000 -0700
@@ -1757,6 +1757,7 @@ void InitSystem (
     Char *              argv [] )
 {
     Char *              *ptrlist;
+    Char *              envvar;
     UInt                i;             /* loop variable                   */
     Int res;                       /* return from option processing function */
 
@@ -1880,6 +1881,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;