[Groonga-commit] groonga/groonga [master] remove -fno-exceptions not adding -fexceptions.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 12日 (土) 22:51:01 JST


Kouhei Sutou	2011-11-12 13:51:01 +0000 (Sat, 12 Nov 2011)

  New Revision: eb30398b03ca0fab089bfab846c76a66bf26bc4c

  Log:
    remove -fno-exceptions not adding -fexceptions.

  Modified files:
    configure.ac

  Modified: configure.ac (+12 -1)
===================================================================
--- configure.ac    2011-11-12 13:30:11 +0000 (5e9d66e)
+++ configure.ac    2011-11-12 13:51:01 +0000 (4e1f19c)
@@ -99,6 +99,17 @@ AC_DEFUN([CHECK_CXXFLAG], [
   AC_MSG_RESULT([$check_cxxflag])
 ])
 
+AC_DEFUN([REMOVE_CXXFLAG], [
+  AC_MSG_CHECKING([whether g++ option $1 is needed to be removed])
+  if echo "$CXXFLAGS" | grep -q -- "$1"; then
+    CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's,$1,,'`
+    remove_cxxflag=yes
+  else
+    remove_cxxflag=no
+  fi
+  AC_MSG_RESULT([$remove_cxxflag])
+])
+
 if test "$GCC" = "yes"; then
   CHECK_CFLAG([-Wall])
   CHECK_CFLAG([-Wextra])
@@ -128,7 +139,7 @@ if test "$GCC" = "yes"; then
 #  CHECK_CFLAG([-Wwrite-strings])
 #  CHECK_CFLAG([-Winline])
 
-  CHECK_CXXFLAG([-fexceptions])
+  REMOVE_CXXFLAG([-fno-exceptions])
 fi
 
 AC_LIBTOOL_WIN32_DLL




Groonga-commit メーリングリストの案内
Back to archive index