mirror of https://github.com/odrling/Aegisub
Use -Werror for compiler flag support checks so that they actually work
This commit is contained in:
parent
a433a3f5e4
commit
fc63df571b
|
@ -1,12 +1,14 @@
|
|||
AC_DEFUN([AC_C_FLAG], [{
|
||||
AC_LANG_PUSH(C)
|
||||
ac_c_flag_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
CFLAGS="$CFLAGS -Werror $1"
|
||||
AC_MSG_CHECKING([[whether $CC supports $1]])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[
|
||||
CFLAGS="$ac_c_flag_save $1"
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
CFLAGS="$ac_c_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
$2
|
||||
|
@ -16,11 +18,14 @@ AC_DEFUN([AC_C_FLAG], [{
|
|||
AC_DEFUN([AC_CXX_FLAG], [{
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_cxx_flag_save="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $1"
|
||||
CXXFLAGS="$CXXFLAGS -Werror $1"
|
||||
AC_MSG_CHECKING([[whether $CXX supports $1]])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[
|
||||
CXXFLAGS="$ac_cxx_flag_save $1"
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
CXXFLAGS="$ac_cxx_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
|
|
Loading…
Reference in New Issue