Merge branch 'master' of github.com:sahlberg/libsmb2
[libsmb2.git] / configure.ac
index ac5d2017acd27df10feae7c33a490a5b0c5deb54..286c65635ba28773f2597e5456a85795febe11c5 100644 (file)
@@ -49,12 +49,12 @@ AC_ARG_ENABLE([werror],
               [AS_HELP_STRING([--disable-werror],
               [Disables building with -Werror by default])])
 
-if test "$GCC" = yes; then
-   WARN_CFLAGS="-Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing"
-   if test "x$enable_werror" != "xno"; then
-       WARN_CFLAGS="$WARN_CFLAGS -Werror"
-   fi
-fi
+AS_IF([test "$GCC" = "yes"], [
+    WARN_CFLAGS="-Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing"
+    AS_IF([test "$enable_werror" != "no"], [
+        WARN_CFLAGS="${WARN_CFLAGS} -Werror"
+    ])
+])
 AC_SUBST([WARN_CFLAGS])
 
 LIBSOCKET=