summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1fb8c01)
This allow a little bit more flexibility and won't require the same level of code quality in configure tests (is that a plus?).
CFLAGS="${CFLAGS_save}"
RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast cast-align write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
CFLAGS="${CFLAGS_save}"
RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast cast-align write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
-RDC_PROG_CC_FLAGS_IFELSE([-pipe])
+RDC_PROG_CC_FLAGS([-pipe])
AC_ARG_ENABLE(warnings-as-error,
AS_HELP_STRING([--enable-warnings-as-error],[Treat acceptable warnings as error (default in debug)]),, [enable_warnings_as_error="$enable_debug"])
AC_ARG_ENABLE(warnings-as-error,
AS_HELP_STRING([--enable-warnings-as-error],[Treat acceptable warnings as error (default in debug)]),, [enable_warnings_as_error="$enable_debug"])
missing-braces nonnull parentheses uninitialized address enum-compare undef comment switch \
bad-function-cast ignored])
])
missing-braces nonnull parentheses uninitialized address enum-compare undef comment switch \
bad-function-cast ignored])
])
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
])
ac_res=`eval echo '${'$as_ac_var'}'`
])
ac_res=`eval echo '${'$as_ac_var'}'`
- AS_IF([test "${ac_res}" != "no"], [
- CFLAGS="${CFLAGS_save} $1"
- $2
- ], [
- CFLAGS="${CFLAGS_save}"
- $3
- ])
+ CFLAGS="${CFLAGS_save}"
+ AS_IF([test "${ac_res}" != "no"], [$2], [$3])
+])
+
+AC_DEFUN([RDC_PROG_CC_FLAGS],
+[AC_LANG_ASSERT(C)
+ RDC_PROG_CC_FLAGS_IFELSE([$1], [CFLAGS="${CFLAGS} $1"])
])
AC_DEFUN([RDC_PROG_CC_WERRORFLAGS],
[ for a in $1; do
])
AC_DEFUN([RDC_PROG_CC_WERRORFLAGS],
[ for a in $1; do
- RDC_PROG_CC_FLAGS_IFELSE([-Werror=$a])
+ RDC_PROG_CC_FLAGS_IFELSE([-Werror=$a], [CFLAGS_WERROR="${CFLAGS_WERROR} -Werror=${a}"])
done
])
AC_DEFUN([RDC_PROG_CC_WFLAGS],
[ for a in $1; do
done
])
AC_DEFUN([RDC_PROG_CC_WFLAGS],
[ for a in $1; do
- RDC_PROG_CC_FLAGS_IFELSE([-W$a])
+ RDC_PROG_CC_FLAGS([-W$a])
+AC_DEFUN([VLC_SET_CFLAGS_WERROR], [
+ for element in [$1]; do
+ eval "CFLAGS_WERROR_${element}="'"'"$2"''"'
+ done
+])
+
dnl ===========================================================================
dnl Macros to save and restore default flags
dnl ===========================================================================
dnl Macros to save and restore default flags
if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then
echo " libs=\"\${libs} `eval echo '$'LIBS_${x}`\""
fi
if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then
echo " libs=\"\${libs} `eval echo '$'LIBS_${x}`\""
fi
+ if test "`eval echo @'$'LIBS_${x}@`" != "@@"; then
+ echo " CFLAGS_WERROR=\"`eval echo '$'CFLAGS_WERROR_${x}`\""
+ fi
echo " ;;"
] done >> vlc-config.in
echo " ;;"
] done >> vlc-config.in