Unify (well almost) --enable-build-warnings configuration option

across GDB and SIM directories.
This commit is contained in:
Andrew Cagney
1998-10-28 02:01:32 +00:00
parent 32dc84ef55
commit b9a9cde40b
11 changed files with 2370 additions and 665 deletions

View File

@@ -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