diff -Naur mono-9999.bak/mono/mcs/tools/gacutil/driver.cs mono-9999/mono/mcs/tools/gacutil/driver.cs --- mono-9999.bak/mono/mcs/tools/gacutil/driver.cs 2010-07-03 04:58:15.000000000 +1200 +++ mono-9999/mono/mcs/tools/gacutil/driver.cs 2010-07-03 05:13:01.000000000 +1200 @@ -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"); } diff -Naur mono-9999.bak/mono/mono/metadata/assembly.c mono-9999/mono/mono/metadata/assembly.c --- mono-9999.bak/mono/mono/metadata/assembly.c 2010-07-03 04:58:14.000000000 +1200 +++ mono-9999/mono/mono/metadata/assembly.c 2010-07-03 05:11:47.000000000 +1200 @@ -542,7 +542,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/1.0", NULL); if (stat (mono, &buf) == -1) fallback (); @@ -595,7 +595,7 @@ bindir = g_path_get_dirname (name); 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 @@ -2066,7 +2066,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++; @@ -2117,7 +2117,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) @@ -2196,7 +2196,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++; @@ -2488,7 +2488,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++;