summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-07-27 18:32:42 +0400
committerKonstantin Osipov <kostja@sun.com>2010-07-27 18:32:42 +0400
commitc4c678f653077f6ca93bd8b50906410e29d4b127 (patch)
treef5b4dd56c20ccff8f87fcf2ff244d4be368ac972 /BUILD
parent740c0d3a87c07dd5f482db5705449143993e7385 (diff)
parent8ee568cde7bef3893f5500d07ef45cb58107cff3 (diff)
downloadmariadb-git-c4c678f653077f6ca93bd8b50906410e29d4b127.tar.gz
Merge trunk-bugfixing -> trunk-runtime.
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh30
1 files changed, 18 insertions, 12 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index b5f1c7b200e..afb8eca08f2 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -15,7 +15,7 @@ Usage: $0 [-h|-n] [configure-options]
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
--with-debug=full Build with full debug.
- --warning-mode=[old|pedantic]
+ --warning-mode=[old|pedantic|maintainer]
Influences the debug flags. Old is default.
--prefix=path Build with prefix 'path'.
@@ -62,6 +62,7 @@ just_print=
just_configure=
full_debug=
warning_mode=
+maintainer_mode=
parse_options "$@"
@@ -88,7 +89,21 @@ AM_MAKEFLAGS="-j 6"
# Ex --with-ssl=/usr
SSL_LIBRARY=--with-ssl
-if [ "x$warning_mode" != "xpedantic" ]; then
+if [ "x$warning_mode" = "xpedantic" ]; then
+ warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
+ c_warnings="$warnings"
+ cxx_warnings="$warnings -std=c++98"
+# NOTE: warning mode should not influence optimize/debug mode.
+# Please feel free to add a separate option if you don't feel it's an overkill.
+ debug_extra_cflags="-O0"
+# Reset CPU flags (-mtune), they don't work in -pedantic mode
+ check_cpu_cflags=""
+elif [ "x$warning_mode" = "xmaintainer" ]; then
+ c_warnings="-Wall -Wextra"
+ cxx_warnings="$c_warnings -Wno-unused-parameter"
+ maintainer_mode="--enable-mysql-maintainer-mode"
+ debug_extra_cflags="-g3"
+else
# Both C and C++ warnings
warnings="-Wall -Wextra -Wunused -Wwrite-strings"
@@ -103,15 +118,6 @@ if [ "x$warning_mode" != "xpedantic" ]; then
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
debug_extra_cflags="-O0 -g3 -gdwarf-2"
-else
- warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
- c_warnings="$warnings"
- cxx_warnings="$warnings -std=c++98"
-# NOTE: warning mode should not influence optimize/debug mode.
-# Please feel free to add a separate option if you don't feel it's an overkill.
- debug_extra_cflags="-O0"
-# Reset CPU flags (-mtune), they don't work in -pedantic mode
- check_cpu_cflags=""
fi
# Set flags for various build configurations.
@@ -147,7 +153,7 @@ fi
base_configs="--prefix=$prefix --enable-assembler "
base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
-base_configs="$base_configs --with-big-tables"
+base_configs="$base_configs --with-big-tables $maintainer_mode"
if test -d "$path/../cmd-line-utils/readline"
then