From efdf6463bbeffacc210ac289b5331f0f9061e400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Tue, 22 Oct 2013 17:36:21 +0200 Subject: [PATCH] Simplify instructions about choosing the installation prefix Clarify the README thanks to the use of pkg-config, and add a configure-time warning so people notice about the problem without having to read the README. --- README | 6 +----- configure.ac | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README b/README index 228c79f64..c4fc25d2c 100644 --- a/README +++ b/README @@ -21,14 +21,10 @@ Building & Installing Gtk#: to make it so mono (and mint) can find your assemblies. In other words, doing something like: - ./configure --prefix=/the/path/that/was/used/for/mono + ./configure --prefix=`pkg-config --variable=prefix mono` make make install - (Of course, replace "/the/path/that/was/used/for/mono" with whatever path - which was used for Mono. This might have been "/usr", "/usr/local", or - something similar.) - If you are compiling from GIT, you will need libtool and the auto* tools and will need to replace the configure above with autogen.sh. diff --git a/configure.ac b/configure.ac index 9bcfc2a5c..ac486426b 100644 --- a/configure.ac +++ b/configure.ac @@ -292,3 +292,10 @@ if test "x$enable_monodoc" = "xyes" -a "x$doc_sources_dir" != "x$prefix/lib/mono fi echo "---" +mono_prefix=`pkg-config --variable=prefix mono` +if test "x$mono_prefix" != "x$prefix"; then + AC_WARN(Prefix to use ($prefix) is not the same as Mono's ($mono_prefix). Consider using + ./configure --prefix=$mono_prefix + See the README for more information. + ) +fi