Jerry James b72b28
--- ./src/system.c.orig	2012-07-16 11:27:25.000000000 -0600
Jerry James b72b28
+++ ./src/system.c	2012-08-14 16:40:19.470468141 -0600
Jerry James b72b28
@@ -1752,6 +1752,7 @@ void InitSystem (
Jerry James b72b28
     Char *              argv [] )
Jerry James b72b28
 {
574c35
     Char *              *ptrlist;
574c35
+    Char *              envvar;
574c35
     UInt                i;             /* loop variable                   */
574c35
     Int res;                       /* return from option processing function */
Jerry James b72b28
 
Jerry James b72b28
@@ -1875,6 +1876,16 @@ void InitSystem (
574c35
 
574c35
 #endif
574c35
 
574c35
+    /* process environment variables */
574c35
+    envvar = getenv("GAP_DIR");
574c35
+    if (envvar == NULL)
Jerry James b72b28
+      envvar = "/usr/lib/gap";
574c35
+    setGapRootPath(&envvar, NULL);
574c35
+    envvar = getenv("GAP_MEM");
574c35
+    if (envvar == NULL)
Jerry James b72b28
+      envvar = "32m";
574c35
+    storeMemory2(&envvar, &SyStorMin);
574c35
+
Jerry James b72b28
     /* save the original command line for export to GAP */
Jerry James b72b28
     SyOriginalArgc = argc;
Jerry James b72b28
     SyOriginalArgv = argv;