summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite-engine/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/graphite-engine/configure.ac')
-rw-r--r--Build/source/libs/graphite-engine/configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/libs/graphite-engine/configure.ac b/Build/source/libs/graphite-engine/configure.ac
index 993f268edbd..de30af569dc 100644
--- a/Build/source/libs/graphite-engine/configure.ac
+++ b/Build/source/libs/graphite-engine/configure.ac
@@ -25,6 +25,9 @@ AC_ARG_ENABLE(final,
AC_HELP_STRING([--disable-final],
[build without optimizations and no debugging.]))
test "x$enable_final" != xno && enable_final=yes
+AC_ARG_ENABLE(strict,
+ AC_HELP_STRING([--enable-strict],
+ [treat warnings as errors, check for as much as we can]))
AC_ARG_ENABLE(profile,
AC_HELP_STRING([--enable-profile],
@@ -56,11 +59,14 @@ AC_CHECK_FUNCS(fabsf)
# Setup the build compiler flags and linker flags.
# Enable debug
+# (note: the flags here are gcc-specific and may fail with other compilers)
build_flags=""
if test "$enable_debug" = yes; then
build_flags="$build_flags -O0 -g -Wall -Wno-unknown-pragmas -Wparentheses -Werror"
-else
+elif test "$enable_strict" = yes; then
build_flags="$build_flags -DNDEBUG -Wall -Wno-unknown-pragmas -Wparentheses -Werror"
+else
+ build_flags="$build_flags -DNDEBUG"
fi
# Enable Graphite Trace logs - these are only used if a