diff options
author | unknown <msvensson@neptunus.(none)> | 2006-06-12 13:07:40 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-06-12 13:07:40 +0200 |
commit | d93ec9ee84de8b1c37fa0996a4c6ef6d2f94e033 (patch) | |
tree | ae02ad57959a095875f4ac4195bc20a506b07167 /configure.in | |
parent | 2dd1dc62462a9b7348d1c815acacddedb5a62d88 (diff) | |
download | mariadb-git-d93ec9ee84de8b1c37fa0996a4c6ef6d2f94e033.tar.gz |
Bug#19517 No simple way to detect wether server was compiled with libdbug
- Define DBUG_ON and DBUG_OFF in config.h
configure.in:
Define DBUG_ON and DBUG_OFF in config.h instead of in compiler flags
dbug/dbug.c:
Undef DBUG_OFF if defined when compiling dbug.c, this is done as we always compile dbug.c even when DBUG_OFF is selected.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 3c335089688..8755fd1a3bb 100644 --- a/configure.in +++ b/configure.in @@ -1651,17 +1651,20 @@ AC_ARG_WITH(debug, if test "$with_debug" = "yes" then # Medium debug. - CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS" - CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DDBUG_ON -DSAFE_MUTEX $CXXFLAGS" + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) + CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS" + CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS" elif test "$with_debug" = "full" then # Full debug. Very slow in some cases - CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" - CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) + CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" + CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" else # Optimized version. No debug - CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS" - CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS" + AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug]) + CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS" + CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS" fi # Force static compilation to avoid linking problems/get more speed |