forked from Imagelibrary/binutils-gdb
Unify (well almost) --enable-build-warnings configuration option
across GDB and SIM directories.
This commit is contained in:
@@ -294,17 +294,23 @@ if test "${enable_netrom}" = "yes"; then
|
||||
CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(warnings,
|
||||
[ --enable-build-warnings Enable compiler warnings if gcc is used],
|
||||
[case "${enableval}" in
|
||||
yes) enable_build_warnings=yes ;;
|
||||
no) enable_build_warnings=no ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} given for warnings options) ;;
|
||||
esac])
|
||||
AC_ARG_ENABLE(build-warnings,
|
||||
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
|
||||
[build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
|
||||
case "${enableval}" in
|
||||
yes) ;;
|
||||
no) build_warnings="-w";;
|
||||
dnl ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||
dnl build_warnings="${build_warnings} ${t}";;
|
||||
dnl *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
|
||||
dnl build_warnings="${t} ${build_warnings}";;
|
||||
dnl *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
|
||||
*) ;;
|
||||
esac],[build_warnings=""])dnl
|
||||
|
||||
if test "x$enable_build_warnings" = xyes -a "x$GCC" = xyes
|
||||
if test "x${build_warnings}" != x -a "x$GCC" = xyes
|
||||
then
|
||||
WARN_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes"
|
||||
WARN_CFLAGS="${build_warnings}"
|
||||
else
|
||||
WARN_CFLAGS=""
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user