The kernel now builds with -std=gnu11, so let's make xfsprogs do that by
default too. Distributions can still override the parameters by passing
CFLAGS= and BUILD_CFLAGS= to configure, just as they always have.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
AC_CONFIG_SRCDIR([include/libxfs.h])
AC_PREFIX_DEFAULT(/usr)
+# Default CFLAGS if nobody specifies anything else
+if test "${CFLAGS+set}" != "set"; then
+ CFLAGS="-g -O2 -std=gnu11"
+fi
+
AC_PROG_INSTALL
LT_INIT
if test $cross_compiling = no; then
BUILD_CFLAGS="$CFLAGS"
else
- BUILD_CFLAGS="-g -O2"
+ BUILD_CFLAGS="-g -O2 -std=gnu11"
fi
fi