diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Posix/Fl_Posix_System_Driver.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index 6e90cb5eb..63d5d6101 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -216,17 +216,21 @@ void *Fl_Posix_System_Driver::dlopen_or_dlsym(const char *lib_name, const char * #endif if (func_ptr) return func_ptr; } -#ifdef __APPLE_CC__ // allows testing on Darwin + XQuartz + fink +#ifdef __APPLE_CC__ // allows using on Darwin + XQuartz + (homebrew or fink) if (lib_name) { char path[FL_PATH_MAX]; snprintf(path, FL_PATH_MAX, "/opt/X11/lib/%s.dylib", lib_name); lib_address = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); if (!lib_address) { - snprintf(path, FL_PATH_MAX, "/opt/sw/lib/%s.dylib", lib_name); + snprintf(path, FL_PATH_MAX, "/opt/homebrew/lib/%s.dylib", lib_name); lib_address = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); if (!lib_address) { - snprintf(path, FL_PATH_MAX, "/sw/lib/%s.dylib", lib_name); + snprintf(path, FL_PATH_MAX, "/opt/sw/lib/%s.dylib", lib_name); lib_address = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); + if (!lib_address) { + snprintf(path, FL_PATH_MAX, "/sw/lib/%s.dylib", lib_name); + lib_address = dlopen(path, RTLD_LAZY | RTLD_GLOBAL); + } } } } |
