- echo "--prefix= Use this directory as installation prefix"
- echo "--cpu= Specify target CPU if auto-detect fails"
- echo "--cc= Specify compiler to use"
- echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
- echo "--build-32bit-win Enable 32-bit build on Windows"
- echo "--build-static Build a static fio"
- echo "--esx Configure build options for esx"
- echo "--enable-gfio Enable building of gtk gfio"
- echo "--disable-numa Disable libnuma even if found"
- echo "--disable-gfapi Disable gfapi"
- echo "--enable-libhdfs Enable hdfs support"
- echo "--disable-lex Disable use of lex/yacc for math"
- echo "--disable-pmem Disable pmem based engines even if found"
- echo "--enable-lex Enable use of lex/yacc for math"
- echo "--disable-shm Disable SHM support"
+ echo "--prefix= Use this directory as installation prefix"
+ echo "--cpu= Specify target CPU if auto-detect fails"
+ echo "--cc= Specify compiler to use"
+ echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
+ echo "--build-32bit-win Enable 32-bit build on Windows"
+ echo "--build-static Build a static fio"
+ echo "--esx Configure build options for esx"
+ echo "--enable-gfio Enable building of gtk gfio"
+ echo "--disable-numa Disable libnuma even if found"
+ echo "--disable-gfapi Disable gfapi"
+ echo "--enable-libhdfs Enable hdfs support"
+ echo "--disable-lex Disable use of lex/yacc for math"
+ echo "--disable-pmem Disable pmem based engines even if found"
+ echo "--enable-lex Enable use of lex/yacc for math"
+ echo "--disable-shm Disable SHM support"
- output_sym "CONFIG_FADVISE"
- output_sym "CONFIG_SOCKLEN_T"
- output_sym "CONFIG_FADVISE"
- output_sym "CONFIG_SFAA"
- output_sym "CONFIG_RUSAGE_THREAD"
+ # We need this to be output_sym'd here because this is Windows specific.
+ # The regular configure path never sets this config.
- output_sym "CONFIG_FDATASYNC"
- output_sym "CONFIG_CLOCK_MONOTONIC"
- output_sym "CONFIG_GETTIMEOFDAY"
- output_sym "CONFIG_CLOCK_GETTIME"
- output_sym "CONFIG_SCHED_IDLE"
- output_sym "CONFIG_TCP_NODELAY"
- output_sym "CONFIG_TLS_THREAD"
- output_sym "CONFIG_STATIC_ASSERT"
- output_sym "CONFIG_IPV6"
+ # We now take the regular configuration path without having exit 0 here.
+ # Flags below are still necessary mostly for MinGW.
+ socklen_t="yes"
+ sfaa="yes"
+ rusage_thread="yes"
+ fdatasync="yes"
+ clock_gettime="yes" # clock_monotonic probe has dependency on this
+ clock_monotonic="yes"
+ gettimeofday="yes"
+ sched_idle="yes"
+ tcp_nodelay="yes"
+ tls_thread="yes"
+ static_assert="yes"
+ ipv6="yes"
echo "CC=$CC" >> $config_host_mak
echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
echo "CC=$CC" >> $config_host_mak
echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
+##########################################
+# POSIX pshared attribute probe
+posix_pshared="no"
+cat > $TMPC <<EOF
+#include <unistd.h>
+int main(void)
+{
+#if defined(_POSIX_THREAD_PROCESS_SHARED) && ((_POSIX_THREAD_PROCESS_SHARED + 0) > 0)
+# if defined(__CYGWIN__)
+# error "_POSIX_THREAD_PROCESS_SHARED is buggy on Cygwin"
+# elif defined(__APPLE__)
+# include <AvailabilityMacros.h>
+# include <TargetConditionals.h>
+# if TARGET_OS_MAC && MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+# error "_POSIX_THREAD_PROCESS_SHARED is buggy/unsupported prior to OSX 10.7"
+# endif
+# endif
+#else
+# error "_POSIX_THREAD_PROCESS_SHARED is unsupported"
+#endif
+ return 0;
+}
+EOF
+if compile_prog "" "$LIBS" "posix_pshared" ; then
+ posix_pshared=yes
+fi
+echo "POSIX pshared support $posix_pshared"
+
-linux_2arg_affinity="no"
-linux_3arg_affinity="no"
+if test "$linux_2arg_affinity" != "yes" ; then
+ linux_2arg_affinity="no"
+fi
+if test "$linux_3arg_affinity" != "yes" ; then
+ linux_3arg_affinity="no"
+fi
cat > $TMPC << EOF
#include <nvm/nvm_primitives.h>
int main(int argc, char **argv)
cat > $TMPC << EOF
#include <nvm/nvm_primitives.h>
int main(int argc, char **argv)
cat > $TMPC << EOF
#define STFLE_BITS_Z196 45 /* various z196 facilities ... */
int main(int argc, char **argv)
cat > $TMPC << EOF
#define STFLE_BITS_Z196 45 /* various z196 facilities ... */
int main(int argc, char **argv)
##########################################
# Check whether we have libpmemblk
# libpmem is a prerequisite
##########################################
# Check whether we have libpmemblk
# libpmem is a prerequisite
# getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD.
# Note that NetBSD needs -Werror to catch warning as error.
# getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD.
# Note that NetBSD needs -Werror to catch warning as error.
if test "$zlib" = "no" ; then
echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."
if test "$zlib" = "no" ; then
echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."