Navigation Menu

Skip to content

Commit

Permalink
fix -Wno- compiler flag detection.
Browse files Browse the repository at this point in the history
This change is based on a patch by Arnaud Fontaine.

Reported by Kazuhiko. Thanks!!!
  • Loading branch information
kou committed Dec 7, 2011
1 parent 6653b32 commit 2b4d0a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Expand Up @@ -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])
Expand All @@ -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],
Expand Down

0 comments on commit 2b4d0a4

Please sign in to comment.