configure: Add missing $val != "yes" test to override compile_prog() result
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 1 May 2017 18:48:19 +0000 (21:48 +0300)
committerJens Axboe <axboe@fb.com>
Mon, 1 May 2017 20:47:16 +0000 (14:47 -0600)
Since it's possible for some platforms to use statically configured
configurations (e.g. see around L350 for Cygwin), it should test if
the variable hasn't been set to "yes" before initializing the variable
with "no", so that compile_prog() result can be safely ignored when
the platform knows it's supported.

ca205a75 (configure: Make Cygwin take regular configure path) started
this due to a major change in the configuration path, which changed
Cygwin to take the normal path taken by all other platforms, and
these two were added after that change.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
configure

index 4ca7d52b4006bf30065ef2d4e4ed05e6fa75635a..21bcaf46604980a27ccfbe0f32acceead6067c4e 100755 (executable)
--- a/configure
+++ b/configure
@@ -612,7 +612,9 @@ echo "POSIX AIO fsync               $posix_aio_fsync"
 
 ##########################################
 # POSIX pshared attribute probe
-posix_pshared="no"
+if test "$posix_pshared" != "yes" ; then
+  posix_pshared="no"
+fi
 cat > $TMPC <<EOF
 #include <unistd.h>
 int main(void)
@@ -1997,7 +1999,9 @@ echo "march_armv8_a_crc_crypto      $march_armv8_a_crc_crypto"
 
 ##########################################
 # cuda probe
-cuda="no"
+if test "$cuda" != "yes" ; then
+  cuda="no"
+fi
 cat > $TMPC << EOF
 #include <cuda.h>
 int main(int argc, char **argv)