libiscsi-1.9.0-0001-Allow-users-to-disable-Werror-at-configure-time.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 2d43a056a9e7b57bc03d580a850a8dca534e61d5 Mon Sep 17 00:00:00 2001
  2. From: Doug Goldstein <doug.goldstein@pikewerks.com>
  3. Date: Wed, 5 Jun 2013 14:28:48 -0500
  4. Subject: [PATCH] Allow users to disable -Werror at configure time
  5. Some users and distro packagers might not want to build with -Werror,
  6. this allows them to disable using -Werror but enables it in the default
  7. case so as to maintain the current behavior.
  8. ---
  9. configure.ac | 8 +++++++-
  10. 1 file changed, 7 insertions(+), 1 deletion(-)
  11. diff --git a/configure.ac b/configure.ac
  12. index 9d06e3a..6dce230 100644
  13. --- a/configure.ac
  14. +++ b/configure.ac
  15. @@ -11,8 +11,14 @@ AC_CANONICAL_HOST
  16. AM_CONDITIONAL(LD_ISCSI,
  17. [expr "$host_os" : linux > /dev/null 2>&1])
  18. +AC_ARG_ENABLE([werror], [AS_HELP_STRING([--disable-werror],
  19. + [Disables building with -Werror by default])])
  20. +
  21. if test "$ac_cv_prog_gcc" = yes; then
  22. - WARN_CFLAGS="-Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Werror -Wno-strict-aliasing"
  23. + WARN_CFLAGS="-Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-strict-aliasing"
  24. + if test "x$enable_werror" != "xno"; then
  25. + WARN_CFLAGS="$WARN_CFLAGS -Werror"
  26. + fi
  27. fi
  28. AC_SUBST(WARN_CFLAGS)
  29. --
  30. 1.8.2.1