X-Git-Url: https://svn.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/b4b6f2ea75b9f0f3ca918f5b84016610bf7a4d4f..8214a6043950b3aad0457895abc981d2cfe933b2:/interpretor/preprocessor/faust-0.9.47mr3/compiler/parser/enrobage.cpp diff --git a/interpretor/preprocessor/faust-0.9.47mr3/compiler/parser/enrobage.cpp b/interpretor/preprocessor/faust-0.9.47mr3/compiler/parser/enrobage.cpp index e001b72..59e6fb5 100644 --- a/interpretor/preprocessor/faust-0.9.47mr3/compiler/parser/enrobage.cpp +++ b/interpretor/preprocessor/faust-0.9.47mr3/compiler/parser/enrobage.cpp @@ -184,6 +184,33 @@ ifstream* open_arch_stream(const char* filename) f->open(filename, ifstream::in); if (f->good()) return f; else delete f; } + + /* Faustine directories (Karim Barkati 09/2013) */ + +#ifdef INSTALL_PREFIX + err = chdir(old); + if (chdir(INSTALL_PREFIX "/lib/faustine")==0) { + ifstream* f = new ifstream(); + f->open(filename); + if (f->good()) return f; else delete f; + } +#endif + err = chdir(old); + if (chdir("/usr/local/lib/faustine")==0) { + ifstream* f = new ifstream(); + f->open(filename); + if (f->good()) return f; else delete f; + } + err = chdir(old); + if (chdir("/usr/lib/faustine")==0) { + ifstream* f = new ifstream(); + f->open(filename); + if (f->good()) return f; else delete f; + } + + /* End of Faustine directories */ + + #ifdef INSTALL_PREFIX err = chdir(old); if (chdir(INSTALL_PREFIX "/lib/faust")==0) { @@ -379,6 +406,23 @@ FILE* fopensearch(const char* filename, string& fullpath) if ((f = fopenat(fullpath, gFaustSuperSuperDirectory, "architecture", filename))) { return f; } + + /* Faustine directories (Haisheng WANG 09/2013) */ + +#ifdef INSTALL_PREFIX + if ((f = fopenat(fullpath, INSTALL_PREFIX "/lib/faustine", filename))) { + return f; + } +#endif + if ((f = fopenat(fullpath, "/usr/local/lib/faustine", filename))) { + return f; + } + if ((f = fopenat(fullpath, "/usr/lib/faustine", filename))) { + return f; + } + + /* End of Faustine directories */ + #ifdef INSTALL_PREFIX if ((f = fopenat(fullpath, INSTALL_PREFIX "/lib/faust", filename))) { return f;