configure: use canonical paths when comparing prefixes

A user reported in the mailing list [1] to be advised to use
`/usr/lib64/pkgconfig/../..` as a prefix. This path is too
convoluted, could give problems, and also shouldn't be the
one to be compared against the prefix flag used, so use
readlink -m to follow '..' subfolders to transform it, in
this example, to simply `/usr`

[1] http://lists.ximian.com/pipermail/gtk-sharp-list/2014-May/011436.html
This commit is contained in:
Andrés G. Aragoneses 2014-05-23 20:49:09 +02:00 committed by Bertrand Lorentz
parent b1215d430a
commit 3495ca286d

View File

@ -301,9 +301,10 @@ echo "---"
if test "x$has_mono" = "xtrue"; then
mono_prefix=`pkg-config --variable=prefix mono`
if test "x$mono_prefix" != "x$prefix"; then
AC_MSG_WARN(Prefix to use ($prefix) is not the same as Mono's ($mono_prefix).
Consider using ./configure --prefix=$mono_prefix
mono_prefix_canonical=`readlink -m $mono_prefix`
if test "x$mono_prefix_canonical" != "x$prefix"; then
AC_MSG_WARN(Prefix to use ($prefix) is not the same as Mono's ($mono_prefix_canonical).
Consider using ./configure --prefix=$mono_prefix_canonical
See the README for more information.
)
fi