diff --git a/configure.ac b/configure.ac index 0712d6b46..b7c046f1c 100644 --- a/configure.ac +++ b/configure.ac @@ -294,10 +294,12 @@ 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. - ) +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 + See the README for more information. + ) + fi fi