Navigation Menu

Skip to content

Commit

Permalink
Don't enable RTTI and exception except MySQL 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 16, 2015
1 parent 2e2b233 commit 57821b5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion configure.ac
Expand Up @@ -195,6 +195,16 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[
MYSQL_VERSION="$($ac_mysql_config --version)"
AC_SUBST(MYSQL_VERSION)
MYSQL_CXXFLAGS="-fno-implicit-templates -felide-constructors"
case "$MYSQL_MAJOR_MINOR_VERSION" in
5.7)
:
;;
*)
MYSQL_CXXFLAGS="$MYSQL_CXXFLAGS -fno-exceptions -fno-rtti"
;;
esac
if test "${with_libmysqlservices_compat}" = "no"; then
MYSQL_MAJOR_MINOR_VERSION=["$(echo $MYSQL_VERSION | sed -e 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*[a-z]*\)$/\1.\2/')"]
case "$MYSQL_MAJOR_MINOR_VERSION" in
Expand Down Expand Up @@ -455,7 +465,7 @@ AC_SUBST(DOCUMENT_VERSION)
AC_SUBST(DOCUMENT_VERSION_FULL)

CFLAGS="$CFLAGS"
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -felide-constructors"
CXXFLAGS="$CXXFLAGS $MYSQL_CXXFLAGS"

AC_CONFIG_FILES([
Makefile
Expand Down

0 comments on commit 57821b5

Please sign in to comment.