configure: remember to output CC for windows
[fio.git] / configure
index 27cfb4d119390d69248d3b000f6dc426c1499792..e45ae394256a8eca2ea3f77f25336fd4e4c42783 100755 (executable)
--- a/configure
+++ b/configure
@@ -102,11 +102,22 @@ cpu=""
 
 cc="${CC-${cross_prefix}gcc}"
 
+# parse options
+for opt do
+  optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
+  case "$opt" in
+  --cc=*) CC="$optarg"
+  ;;
+  *)
+  echo "Bad option $opt"
+  exit 1
+  esac
+done
+
 if check_define __linux__ ; then
   targetos="Linux"
-elif test `uname -o` = Cygwin ; then
+elif check_define _WIN32 ; then
   echo "Forcing known good options on Windows"
-  echo "CC=x86_64-w64-mingw32-gcc" >> $config_host_mak
   echo "CONFIG_64BIT_LLP64=y"      >> $config_host_mak
   echo "CONFIG_CLOCK_GETTIME=y"    >> $config_host_mak
   echo "CONFIG_CLOCK_MONOTONIC=y"  >> $config_host_mak
@@ -117,6 +128,7 @@ elif test `uname -o` = Cygwin ; then
   echo "CONFIG_POSIX_FALLOCATE=y"  >> $config_host_mak
   echo "CONFIG_FADVISE=y"          >> $config_host_mak
   echo "CONFIG_SFAA=y"             >> $config_host_mak
+  echo "CC=$cc"                           >> $config_host_mak
   exit 0
 elif check_define __OpenBSD__ ; then
   targetos='OpenBSD'
@@ -643,14 +655,15 @@ echo "GUASI                         $guasi"
 # fusion-aw probe
 fusion_aw="no"
 cat > $TMPC << EOF
-#include <vsl_dp_experimental/vectored_write.h>
+#include <nvm/vectored_write.h>
 int main(int argc, char **argv)
 {
   struct vsl_iovec iov;
   return vsl_vectored_write(0, &iov, 0, O_ATOMIC);
 }
 EOF
-if compile_prog "" "" "fusion-aw"; then
+if compile_prog "" "-L/usr/lib/fio -lnvm-primitives" "fusion-aw"; then
+  LIBS="-L/usr/lib/fio -lnvm-primitives $LIBS"
   fusion_aw="yes"
 fi
 echo "Fusion-io atomic engine       $fusion_aw"