summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-27 17:12:44 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-27 17:12:44 +0300
commitad6d95d3cb420557cfc7efa658181a8d20b4c154 (patch)
tree984bb45ca187a6cc38c7132a9600d91515df564e /config
parent9bc9855c16f815e71223398ef17cd6052becc44e (diff)
parent7909541953de43c7b7d16513c8d612cfe405af67 (diff)
downloadmariadb-git-ad6d95d3cb420557cfc7efa658181a8d20b4c154.tar.gz
Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue - Faster for short unaligneed strings than memcmp() - Bettern when using valgrind - Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems - Changed code to use MariaDB version of select->skip_record() - Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/maintainer.m464
1 files changed, 64 insertions, 0 deletions
diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4
new file mode 100644
index 00000000000..1b7df75d6f7
--- /dev/null
+++ b/config/ac-macros/maintainer.m4
@@ -0,0 +1,64 @@
+#
+# Control aspects of the development environment which are
+# specific to MySQL maintainers and developers.
+#
+AC_DEFUN([MY_MAINTAINER_MODE], [
+ AC_MSG_CHECKING([whether to enable the maintainer-specific development environment])
+ AC_ARG_ENABLE([mysql-maintainer-mode],
+ [AS_HELP_STRING([--enable-mysql-maintainer-mode],
+ [Enable a MySQL maintainer-specific development environment])],
+ [USE_MYSQL_MAINTAINER_MODE=$enableval],
+ [USE_MYSQL_MAINTAINER_MODE=no])
+ AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
+])
+
+# Set warning options required under maintainer mode.
+AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
+ # Setup GCC warning options.
+ AS_IF([test "$GCC" = "yes"], [
+ C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
+ CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
+ ])
+
+ # Test whether the warning options work.
+ # Test C options
+ AS_IF([test -n "$C_WARNINGS"], [
+ save_CFLAGS="$CFLAGS"
+ AC_MSG_CHECKING([whether to use C warning options ${C_WARNINGS}])
+ AC_LANG_PUSH(C)
+ CFLAGS="$CFLAGS ${C_WARNINGS}"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_c_warning_flags=yes],
+ [myac_c_warning_flags=no])
+ AC_LANG_POP()
+ AC_MSG_RESULT([$myac_c_warning_flags])
+ CFLAGS="$save_CFLAGS"
+ ])
+
+ # Test C++ options
+ AS_IF([test -n "$CXX_WARNINGS"], [
+ save_CXXFLAGS="$CXXFLAGS"
+ AC_MSG_CHECKING([whether to use C++ warning options ${CXX_WARNINGS}])
+ AC_LANG_PUSH(C++)
+ CXXFLAGS="$CXXFLAGS ${CXX_WARNINGS}"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_cxx_warning_flags=yes],
+ [myac_cxx_warning_flags=no])
+ AC_LANG_POP()
+ AC_MSG_RESULT([$myac_cxx_warning_flags])
+ CXXFLAGS="$save_CXXFLAGS"
+ ])
+
+ # Set compile flag variables.
+ AS_IF([test "$myac_c_warning_flags" = "yes"], [
+ AM_CFLAGS="${AM_CFLAGS} ${C_WARNINGS}"
+ AC_SUBST([AM_CFLAGS])])
+ AS_IF([test "$myac_cxx_warning_flags" = "yes"], [
+ AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS}"
+ AC_SUBST([AM_CXXFLAGS])])
+])
+
+
+# Set compiler flags required under maintainer mode.
+AC_DEFUN([MY_MAINTAINER_MODE_SETUP], [
+ AS_IF([test "$USE_MYSQL_MAINTAINER_MODE" = "yes"],
+ [MY_MAINTAINER_MODE_WARNINGS])
+])