projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
59aa092
)
enable -Wall -Wno-parentheses for all compilers that understand them
author
Arun Persaud
<arun@nubati.net>
Tue, 17 Apr 2012 02:08:10 +0000 (19:08 -0700)
committer
Arun Persaud
<arun@nubati.net>
Tue, 17 Apr 2012 02:08:10 +0000 (19:08 -0700)
configure.ac
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index
ddd71d3
..
119f002
100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-110,6
+110,15
@@
AC_CHECK_FUNC(setlocale, [],
AC_CHECK_LIB(seq, getpseudotty)
+dnl | add compiler warnings only if compiler understands them
+AC_MSG_CHECKING(whether compiler understands -Wall -Wno-parentheses)
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall -Wno-parentheses"
+AC_TRY_COMPILE([],[],
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ CFLAGS="$SAVE_CFLAGS")
+
dnl | check for X-libraries
AC_PATH_XTRA