From ec132fe84d7cef2b44e044c2267ea8905c52e04c Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Mon, 15 Mar 2004 20:06:06 +0000 Subject: [PATCH] Support Darwin ".dylib". --- tools/winegcc/utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 5c4fa5dd27..3929ebc307 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -220,6 +220,7 @@ file_type get_file_type(const char* filename) if (strendswith(filename, ".a")) return file_arh; if (strendswith(filename, ".res")) return file_res; if (strendswith(filename, ".so")) return file_so; + if (strendswith(filename, ".dylib")) return file_so; if (strendswith(filename, ".def")) return file_dll; if (strendswith(filename, ".rc")) return file_rc; @@ -247,6 +248,10 @@ static file_type guess_lib_type(const char* dir, const char* library, char** fil /* Unix shared object */ if ((*file = try_lib_path(dir, "lib", library, ".so", file_so))) return file_so; + + /* Mach-O (Darwin/Mac OS X) Dynamic Library behaves mostly like .so */ + if ((*file = try_lib_path(dir, "lib", library, ".dylib", file_so))) + return file_so; /* Windows DLL */ if ((*file = try_lib_path(dir, "lib", library, ".def", file_dll))) -- 2.32.0.93.g670b81a890