summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2019-01-09 14:12:12 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2019-01-09 14:12:12 +0000
commit2eba7096b9ea04eda551d65ef9eff315641cc9d8 (patch)
tree2d7c43cd584a1a077da960c80c1bd669a2529827 /configure.ac
parent7c1dc602cb7b18372f793234c6dba8965685c447 (diff)
downloadmpfr-2eba7096b9ea04eda551d65ef9eff315641cc9d8.tar.gz
Moved the compatibility test of the configure options even earlier, from
acinclude.m4 to configure.ac, just after the code that defines them. Also added an associated AC_MSG_CHECKING message for better clarity. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13396 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 412f85fb8..9eaaaa3ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -228,6 +228,30 @@ AC_ARG_ENABLE(tune-for-coverage,
dnl Makefile.am files can use "if MINI_GMP" / ... / "endif".
AM_CONDITIONAL([MINI_GMP], [test -n "$mini_gmp_path"])
+dnl First, detect incompatibilities between the above configure options.
+AC_MSG_CHECKING([whether configure options are compatible])
+if test "$enable_logging" = yes; then
+ if test "$enable_thread_safe" = yes; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([enable either logging or thread-safe, not both])
+ fi
+dnl The following test is done only to output a specific error message,
+dnl as there would otherwise be an error due to enable_thread_safe=no.
+ if test "$enable_shared_cache" = yes; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([shared cache does not work with logging support])
+ fi
+ enable_thread_safe=no
+fi
+if test "$enable_shared_cache" = yes; then
+ if test "$enable_thread_safe" = no; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([shared cache needs thread-safe support])
+ fi
+ enable_thread_safe=yes
+fi
+AC_MSG_RESULT([yes])
+
dnl
dnl Setup CC and CFLAGS