| 37 | #include <dlfcn.h> |
| 38 | |
| 39 | static bool |
| 40 | tryLib(const os::String &path, bool verbose) |
| 41 | { |
| 42 | void *handle = dlopen(path.str(), RTLD_LAZY); |
| 43 | bool exists = (handle != NULL); |
| 44 | if (verbose) { |
| 45 | if (exists) { |
| 46 | std::cerr << "info: found " << path.str() << "\n"; |
| 47 | } else { |
| 48 | std::cerr << "info: did not find " << dlerror() << "\n"; |
| 49 | } |
| 50 | } |
| 51 | if (exists) |
| 52 | dlclose(handle); |
| 53 | return exists; |
| 54 | } |
| 55 | #endif |
| 56 | |
| 57 | static bool |
no test coverage detected