[Groonga-mysql-commit] mroonga/mroonga [master] fix -Wno- compiler flag detection.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 7日 (水) 10:21:57 JST


Kouhei Sutou	2011-12-07 01:21:57 +0000 (Wed, 07 Dec 2011)

  New Revision: 2b4d0a46fb3c5272498a62bfe2bf0d5e40ab8f2b

  Log:
    fix -Wno- compiler flag detection.
    
    This change is based on a patch by Arnaud Fontaine.
    
    Reported by Kazuhiko. Thanks!!!

  Modified files:
    configure.ac

  Modified: configure.ac (+4 -2)
===================================================================
--- configure.ac    2011-12-04 11:08:05 +0000 (481d0de)
+++ configure.ac    2011-12-07 01:21:57 +0000 (a606341)
@@ -27,7 +27,8 @@ AC_PROG_LIBTOOL
 AC_DEFUN([CHECK_CFLAG], [
   AC_MSG_CHECKING([if gcc supports $1])
   old_CFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS $1 -Werror"
+  flag=`echo '$1' | sed -e 's,^-Wno-,-W,'`
+  CFLAGS="$CFLAGS $flag -Werror"
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
     [check_cflag=yes],
     [check_cflag=no])
@@ -41,7 +42,8 @@ AC_DEFUN([CHECK_CFLAG], [
 AC_DEFUN([CHECK_CXXFLAG], [
   AC_MSG_CHECKING([if g++ supports $1])
   old_CXXFLAGS=$CXXFLAGS
-  CXXFLAGS="$CXXFLAGS $1 -Werror"
+  flag=`echo '$1' | sed -e 's,^-Wno-,-W,'`
+  CXXFLAGS="$CXXFLAGS $flag -Werror"
   AC_LANG_PUSH([C++])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
     [check_cxxflag=yes],




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