Handle relocatable libMonoPosixHelper.so when --libdir= isn't lib/
authorJo Shields <jo.shields@xamarin.com>
Tue, 20 Sep 2016 15:08:23 +0000 (16:08 +0100)
committerJo Shields <jo.shields@xamarin.com>
Tue, 20 Sep 2016 16:02:36 +0000 (17:02 +0100)
commit41a1c19ec88a59eb46fdea5e14e9edf4cb181dcb
tree7a3937c6a56bbbb746286085c73014a3ed8d95d5
parenta1ffb48bdfa2b294d977e58933d4c4a3a980e455
Handle relocatable libMonoPosixHelper.so when --libdir= isn't lib/

Right now, we use a special token in mono/config which replaces $mono_libdir with the runtime-detected assemblies lib dir - e.g. /usr/lib

Unfortunately, this does not handle cases where a --libdir= value is passed to configure, such as on Red Hat where they use --libdir=/usr/lib64 on AMD64

We already have a variable from configure - reloc_libdir - so introduce some helpers to use it in the $mono_libdir replacement.

This assumes the value of --libdir is a subdirectory of --prefix, but I doubt we have ever worked at all when that is not the case.

Fixes: #41953
configure.ac
mono/metadata/Makefile.am
mono/metadata/assembly.c
mono/metadata/assembly.h
mono/metadata/mono-config-dirs.c
mono/metadata/mono-config-dirs.h
mono/metadata/mono-config.c