From 2eba7096b9ea04eda551d65ef9eff315641cc9d8 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 9 Jan 2019 14:12:12 +0000 Subject: 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 --- configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.1