Author: cazfi
Date: Sat Nov 21 10:48:37 2015
New Revision: 30723

URL: http://svn.gna.org/viewcvs/freeciv?rev=30723&view=rev
Log:
Fixed configure check if compiler knows "-Wno-tautological-compare" commandline 
option.
This makes sure it doesn't end up to compile command line, sometimes resulting 
in

cc1: error: unrecognized command line option "-Wno-tautological-compare"

Reported anonymously

See bug #23448

Modified:
    trunk/m4/compiler.m4

Modified: trunk/m4/compiler.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/compiler.m4?rev=30723&r1=30722&r2=30723&view=diff
==============================================================================
--- trunk/m4/compiler.m4        (original)
+++ trunk/m4/compiler.m4        Sat Nov 21 10:48:37 2015
@@ -39,7 +39,9 @@
 
 for flag in $3
 do
-  $2="$flags_save $existing_flags $accepted_flags $flag $4"
+  dnl We need -Werror to test any flags (it can't be tested itself)
+  dnl Without it, illegal flag will not give an error for us to detect
+  $2="-Werror $flags_save $existing_flags $accepted_flags $flag $4"
   AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])],
                     [FC_ADD_WORDS_TO_VAR([accepted_flags], [$flag])])
 done


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to