From 625ab8a064f07f9af94e9c658425b6a6e61cbcca Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 25 Mar 2006 13:38:37 +0100 Subject: [PATCH] configure.in: AC_ARG_WITH inside "if" sometimes gives unexpected result, --with-fast-mutexes was not ignored when --with-debug given --- configure.in | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/configure.in b/configure.in index 34562ce7df1..e1595c380ef 100644 --- a/configure.in +++ b/configure.in @@ -1608,18 +1608,20 @@ else CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS" fi -if test "$with_debug" = "no" -then - AC_ARG_WITH([fast-mutexes], - AC_HELP_STRING([--with-fast-mutexes], - [Compile with fast mutexes (default is disabled)]), - [with_fast_mutexes=$withval], [with_fast_mutexes=no]) -fi +AC_ARG_WITH([fast-mutexes], + AC_HELP_STRING([--with-fast-mutexes], + [Compile with fast mutexes (default is disabled)]), + [with_fast_mutexes=$withval], [with_fast_mutexes=no]) -if test "$with_fast_mutexes" = "yes" +if test "$with_fast_mutexes" != "no" then - AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], - [Define to 1 if you want to use fast mutexes]) + if test "$with_debug" != "no" + then + AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given]) + else + AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], + [Define to 1 if you want to use fast mutexes]) + fi fi # Force static compilation to avoid linking problems/get more speed