Have maude search in datadir for its files. --- a/src/Main/main.cc +++ b/src/Main/main.cc @@ -350,6 +350,11 @@ { if (directoryManager.searchPath(MAUDE_LIB, directory, fileName, R_OK)) return true; + if (directoryManager.checkAccess(DATADIR, fileName, R_OK)) + { + directory = DATADIR; + return true; + } if (!(executableDirectory.empty()) && directoryManager.checkAccess(executableDirectory, fileName, R_OK)) { --- a/src/Mixfix/global.cc +++ b/src/Mixfix/global.cc @@ -116,6 +116,9 @@ // if (directoryManager.searchPath(MAUDE_LIB, directory, fileName, R_OK, ext)) return true; + directory = DATADIR; + if (directoryManager.checkAccess(directory, fileName, R_OK, ext)) + return true; // // Last hope is the directory containing the Maude executable. // --- a/src/Mixfix/global.hh +++ b/src/Mixfix/global.hh @@ -36,6 +36,7 @@ #define PRELUDE_NAME "prelude.maude" #define MAUDE_LIB "MAUDE_LIB" +#define DATADIR "/usr/share/maude" bool findPrelude(string& directory, string& fileName);