configure: fixed logic when "--enable-error" is specified
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 2 Sep 2015 04:07:37 +0000 (13:07 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 2 Sep 2015 04:07:37 +0000 (13:07 +0900)
If "--enable-error" is specified, "configure" had not tried to set
CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE.
To fixed this problem "configure" should skip setting "werror" only.

Change-Id: I6d204ca25d242aa8b2e9c12fd8f1f1f85dcad9f4
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
configure

index 8e90b04..e61a4a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -4336,10 +4336,10 @@ int main(void) {
     return 0;
 }
 EOF
-if test "$force_werror" != "yes"; then
-  if compile_prog "-Werror" "" ; then
-    pragma_diagnostic_available=yes
-  else
+if compile_prog "-Werror" "" ; then
+  pragma_diagnostic_available=yes
+else
+  if test "$force_werror" != "yes"; then
     werror=no
   fi
 fi