--- mcs/tools/gacutil/driver.cs~ 2011-02-23 20:21:01.000000000 +0100 +++ mcs/tools/gacutil/driver.cs 2011-02-27 11:46:39.000000000 +0100 @@ -808,7 +808,7 @@ private static string EnsureLib (string dir) { DirectoryInfo d = new DirectoryInfo (dir); - if (d.Name == "lib") + if (d.Name == "lib" || d.Name == "@MONOLIBDIR@") return dir; return Path.Combine (dir, "lib"); } --- mono/metadata/assembly.c~ 2011-02-23 20:21:01.000000000 +0100 +++ mono/metadata/assembly.c 2011-02-27 11:49:38.000000000 +0100 @@ -597,7 +597,7 @@ } config = g_build_filename (base, "etc", NULL); - lib = g_build_filename (base, "lib", NULL); + lib = g_build_filename (base, "@MONOLIBDIR@", NULL); mono = g_build_filename (lib, "mono/2.0", NULL); if (stat (mono, &buf) == -1) fallback (); @@ -652,7 +652,7 @@ bindir = g_path_get_dirname (resolvedname); installdir = g_path_get_dirname (bindir); - root = g_build_path (G_DIR_SEPARATOR_S, installdir, "lib", NULL); + root = g_build_path (G_DIR_SEPARATOR_S, installdir, "@MONOLIBDIR@", NULL); config = g_build_filename (root, "..", "etc", NULL); #ifdef HOST_WIN32 @@ -2155,7 +2155,7 @@ if (extra_gac_paths) { paths = extra_gac_paths; while (!res && *paths) { - gacpath = g_build_path (G_DIR_SEPARATOR_S, *paths, "lib", "mono", "gac", aname->name, NULL); + gacpath = g_build_path (G_DIR_SEPARATOR_S, *paths, "@MONOLIBDIR@", "mono", "gac", aname->name, NULL); res = probe_for_partial_name (gacpath, fullname, aname, status); g_free (gacpath); paths++; @@ -2206,7 +2206,7 @@ if (*gp != G_DIR_SEPARATOR) continue; gp++; - if (strncmp (gp, "lib", 3)) + if (strncmp (gp, "@MONOLIBDIR@", 3)) continue; gp += 3; if (*gp != G_DIR_SEPARATOR) @@ -2285,7 +2285,7 @@ paths = extra_gac_paths; while (!image && *paths) { fullpath = g_build_path (G_DIR_SEPARATOR_S, *paths, - "lib", "mono", "gac", subpath, NULL); + "@MONOLIBDIR@", "mono", "gac", subpath, NULL); image = mono_image_open (fullpath, NULL); g_free (fullpath); paths++; @@ -2591,7 +2591,7 @@ if (extra_gac_paths) { paths = extra_gac_paths; while (!result && *paths) { - fullpath = g_build_path (G_DIR_SEPARATOR_S, *paths, "lib", "mono", "gac", subpath, NULL); + fullpath = g_build_path (G_DIR_SEPARATOR_S, *paths, "@MONOLIBDIR@", "mono", "gac", subpath, NULL); result = mono_assembly_open_full (fullpath, status, refonly); g_free (fullpath); paths++;