summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-06-21 16:30:17 -0700
committerPavel Roskin <plroskin@gmail.com>2016-07-08 04:29:40 +0000
commita680d46edf747ec17456b6b8e69c95bc4e4407cb (patch)
tree5a5426164cada48254fdbf06fa1caaca00f4b895 /configure.ac
parent951e6327576988251a9a479494e20d605efaad71 (diff)
downloadxrdp-proprietary-a680d46edf747ec17456b6b8e69c95bc4e4407cb.tar.gz
xrdp-proprietary-a680d46edf747ec17456b6b8e69c95bc4e4407cb.zip
Use -Wwrite-strings compiler flag if supported, add required macros
String literals are const in C++. Using this warnings moves us closer to the stated goal of C++ compatibility, makes the code cleaner and lets compilers optimize the code better. Add m4/ax_append_compile_flags.m4 from Autoconf Archives for the AX_APPEND_COMPILE_FLAGS macro and m4/ax_check_compile_flag.m4 as its dependency.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 50eff683..63a82d57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,7 @@ PKG_PROG_PKG_CONFIG
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AX_CFLAGS_WARN_ALL
+AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
AX_GCC_FUNC_ATTRIBUTE([format])
case $host_os in