--- ./src/system.c.orig 2008-12-15 06:08:32.000000000 -0700 +++ ./src/system.c 2011-12-30 16:42:48.444607336 -0700 @@ -2042,6 +2042,7 @@ void InitSystem ( /* Char * ptr; */ /* pointer to the pre'malloc'ated */ /* Char * ptr1; */ /* more pre'malloc'ated */ Char * *ptrlist; + Char * envvar; UInt i; /* loop variable */ Int res; /* return from option processing function */ #if SYS_MAC_MWC @@ -2299,6 +2300,16 @@ void InitSystem ( #endif + /* process environment variables */ + envvar = getenv("GAP_DIR"); + if (envvar == NULL) + envvar = "/usr/share/gap"; + setGapRootPath(&envvar, NULL); + envvar = getenv("GAP_MEM"); + if (envvar == NULL) + envvar = "32m"; + storeMemory2(&envvar, &SyStorMin); + /* scan the command line for options */ while ( argc > 1 && argv[1][0] == '-' ) {