diff --git a/c/heappath.h.in b/c/heappath.h.in new file mode 100644 index 0000000000..54638ddd3a --- /dev/null +++ b/c/heappath.h.in @@ -0,0 +1,12 @@ +#ifdef WIN32 +/* by default, look in executable directory or in parallel boot directory */ +#define defaultsystemheappath "%x;%x\\..\\..\\boot\\%m" +#define SEARCHPATHSEP ';' + +#else /* not WIN32: */ +#define SEARCHPATHSEP ':' +/* keep in sync with scheme.1 */ +#define defaultsystemheappath "INSTALLPREFIX/lib/csv%v/%m" + +#endif + diff --git a/c/scheme.c b/c/scheme.c index fa7bf66edf..e325d173ee 100644 --- a/c/scheme.c +++ b/c/scheme.c @@ -403,11 +403,10 @@ static const char *path_last(p) const char *p; { return p; } +#include "heappath.h" + #define SEARCHPATHMAXSIZE 8192 #ifdef WIN32 -/* by default, look in executable directory or in parallel boot directory */ -#define defaultsystemheappath "%x;%x\\..\\..\\boot\\%m" -#define SEARCHPATHSEP ';' static char *get_defaultheapdirs() { char *result; @@ -419,10 +418,6 @@ static char *get_defaultheapdirs() { return result; } #else /* not WIN32: */ -#define SEARCHPATHSEP ':' -/* keep in sync with scheme.1 */ -#define defaultsystemheappath "/usr/lib/csv%v/%m:/usr/local/lib/csv%v/%m" - static char *get_defaultheapdirs() { static char defaultheapdirs[SEARCHPATHMAXSIZE]; const char *home; diff --git a/configure b/configure index 1493aaab76..19ac91c3f9 100755 --- a/configure +++ b/configure @@ -255,3 +255,6 @@ sed -e "s;^m=none\$;m=$m;"\ -e "s;^TempRoot=.*;TempRoot=$temproot;"\ -e "s;^GzipManPages=.*$;GzipManPages=$gzipmanpages;"\ makefiles/Mf-install.in > $w/Mf-install + +sed -e "s;INSTALLPREFIX;$installprefix;" c/heappath.h.in > $w/c/heappath.h + diff --git a/makefiles/Mf-install.in b/makefiles/Mf-install.in index 3cfc4dfc83..c9952407ac 100644 --- a/makefiles/Mf-install.in +++ b/makefiles/Mf-install.in @@ -130,9 +130,9 @@ libbininstall: ${LibBin} maninstall: scheme.1 petite.1 ${Man} $I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1 - if [ ${GzipManPages} = yes ] ; then gzip ${Man}/${InstallSchemeName}.1 ; fi + if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallSchemeName}.1 ; fi $I -m 444 petite.1 ${Man}/${InstallPetiteName}.1 - if [ ${GzipManPages} = yes ] ; then gzip ${Man}/${InstallPetiteName}.1 ; fi + if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallPetiteName}.1 ; fi liblibinstall: ${LibLib} $I -m 444 ../examples/* ${LibLib}