3 # Fio configure script. Heavily influenced by the manual qemu configure
4 # script. Sad this this is easier than autoconf and enemies.
7 # set temporary file name
8 if test ! -z "$TMPDIR" ; then
10 elif test ! -z "$TEMPDIR" ; then
16 TMPC="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.c"
17 TMPO="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.o"
18 TMPE="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.exe"
20 # NB: do not call "exit" in the trap handler; this is buggy with some shells;
21 # see <1285349658-3122-1-git-send-email-loic.minier@linaro.org>
22 trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
26 config_host_mak="config-host.mak"
27 config_host_h="config-host.h"
29 rm -rf $config_host_mak
34 echo "Configure failed, check config.log and/or the above output"
35 rm -rf $config_host_mak
41 CFLAGS="-D_GNU_SOURCE -include config-host.h"
44 # Print a helpful header at the top of config.log
45 echo "# FIO configure log $(date)" >> config.log
46 printf "# Configured with:" >> config.log
47 printf " '%s'" "$0" "$@" >> config.log
49 echo "#" >> config.log
51 # Print configure header at the top of $config_host_h
52 echo "/*" > $config_host_h
53 echo " * Automatically generated by configure - do not modify" >> $config_host_h
54 printf " * Configured with:" >> $config_host_h
55 printf " * '%s'" "$0" "$@" >> $config_host_h
56 echo "" >> $config_host_h
57 echo " */" >> $config_host_h
60 # Run the compiler, capturing its output to the log.
61 echo $cc "$@" >> config.log
62 $cc "$@" >> config.log 2>&1 || return $?
63 # Test passed. If this is an --enable-werror build, rerun
64 # the test with -Werror and bail out if it fails. This
65 # makes warning-generating-errors in configure test code
66 # obvious to developers.
67 if test "$werror" != "yes"; then
70 # Don't bother rerunning the compile if we were already using -Werror
76 echo $cc -Werror "$@" >> config.log
77 $cc -Werror "$@" >> config.log 2>&1 && return $?
78 echo "ERROR: configure test passed without -Werror but failed with -Werror."
79 echo "This is probably a bug in the configure script. The failing command"
80 echo "will be at the bottom of config.log."
81 fatal "You can run configure with --disable-werror to bypass this check."
85 do_cc $CFLAGS -c -o $TMPO $TMPC
90 local_ldflags="$2 $LIBS"
91 echo "Compiling test case $3" >> config.log
92 do_cc $CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
100 echo "ERROR: User requested feature $feature"
101 if test ! -z "$packages" ; then
102 echo "ERROR: That feature needs $packages installed"
104 echo "ERROR: configure was not able to find it"
109 type "$1" >/dev/null 2>&1
115 #error $1 not defined
126 echo "$1=y" >> $config_host_mak
127 echo "#define $1" >> $config_host_h
146 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
148 --prefix=*) prefix="$optarg"
150 --cpu=*) cpu="$optarg"
152 # esx is cross compiled and cannot be detect through simple uname calls
158 --extra-cflags=*) CFLAGS="$CFLAGS $optarg"
160 --build-32bit-win) build_32bit_win="yes"
162 --build-static) build_static="yes"
167 --disable-numa) disable_numa="yes"
169 --disable-rbd) disable_rbd="yes"
171 --disable-rbd-blkin) disable_rbd_blkin="yes"
173 --disable-gfapi) disable_gfapi="yes"
175 --enable-libhdfs) libhdfs="yes"
177 --disable-lex) disable_lex="yes"
179 --enable-lex) disable_lex="no"
181 --disable-shm) no_shm="yes"
183 --disable-optimizations) disable_opt="yes"
185 --disable-pmem) disable_pmem="yes"
191 echo "Bad option $opt"
197 if test "$show_help" = "yes" ; then
198 echo "--prefix= Use this directory as installation prefix"
199 echo "--cpu= Specify target CPU if auto-detect fails"
200 echo "--cc= Specify compiler to use"
201 echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
202 echo "--build-32bit-win Enable 32-bit build on Windows"
203 echo "--build-static Build a static fio"
204 echo "--esx Configure build options for esx"
205 echo "--enable-gfio Enable building of gtk gfio"
206 echo "--disable-numa Disable libnuma even if found"
207 echo "--disable-gfapi Disable gfapi"
208 echo "--enable-libhdfs Enable hdfs support"
209 echo "--disable-lex Disable use of lex/yacc for math"
210 echo "--disable-pmem Disable pmem based engines even if found"
211 echo "--enable-lex Enable use of lex/yacc for math"
212 echo "--disable-shm Disable SHM support"
213 echo "--disable-optimizations Don't enable compiler optimizations"
217 cross_prefix=${cross_prefix-${CROSS_COMPILE}}
218 cc="${CC-${cross_prefix}gcc}"
220 if check_define __ANDROID__ ; then
222 elif check_define __linux__ ; then
224 elif check_define __OpenBSD__ ; then
226 elif check_define __sun__ ; then
228 CFLAGS="$CFLAGS -D_REENTRANT"
229 elif check_define _WIN32 ; then
235 echo "# Automatically generated by configure - do not modify" > $config_host_mak
236 printf "# Configured with:" >> $config_host_mak
237 printf " '%s'" "$0" "$@" >> $config_host_mak
238 echo >> $config_host_mak
239 echo "CONFIG_TARGET_OS=$targetos" >> $config_host_mak
241 if test "$no_shm" = "yes" ; then
242 output_sym "CONFIG_NO_SHM"
245 if test "$disable_opt" = "yes" ; then
246 output_sym "CONFIG_FIO_NO_OPT"
249 # Some host OSes need non-standard checks for which CPU to use.
250 # Note that these checks are broken for cross-compilation: if you're
251 # cross-compiling to one of these OSes then you'll need to specify
252 # the correct CPU with the --cpu option.
255 # Unless explicitly enabled, turn off lex.
256 if test -z "$disable_lex" ; then
263 # on Leopard most of the system is 32-bit, so we have to ask the kernel if
264 # we can run 64-bit userspace code.
265 # If the user didn't specify a CPU explicitly and the kernel says this is
266 # 64 bit hw, then assume x86_64. Otherwise fall through to the usual
268 if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
271 # Error at compile time linking of weak/partial symbols if possible...
278 if compile_prog "" "-Wl,-no_weak_imports" "disable weak symbols"; then
279 echo "Disabling weak symbols"
280 LDFLAGS="$LDFLAGS -Wl,-no_weak_imports"
284 # `uname -m` returns i86pc even on an x86_64 box, so default based on isainfo
285 if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
288 LIBS="-lnsl -lsocket"
291 # We still force some options, so keep this message here.
292 echo "Forcing some known good options on Windows"
293 if test -z "$CC" ; then
294 if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
295 CC="i686-w64-mingw32-gcc"
296 if test -e "../zlib/contrib/vstudio/vc14/x86/ZlibStatReleaseWithoutAsm/zlibstat.lib"; then
297 echo "Building with zlib support"
298 output_sym "CONFIG_ZLIB"
299 echo "LIBS=../zlib/contrib/vstudio/vc14/x86/ZlibStatReleaseWithoutAsm/zlibstat.lib" >> $config_host_mak
302 CC="x86_64-w64-mingw32-gcc"
303 if test -e "../zlib/contrib/vstudio/vc14/x64/ZlibStatReleaseWithoutAsm/zlibstat.lib"; then
304 echo "Building with zlib support"
305 output_sym "CONFIG_ZLIB"
306 echo "LIBS=../zlib/contrib/vstudio/vc14/x64/ZlibStatReleaseWithoutAsm/zlibstat.lib" >> $config_host_mak
310 if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
311 output_sym "CONFIG_32BIT"
313 output_sym "CONFIG_64BIT_LLP64"
315 # We need this to be output_sym'd here because this is Windows specific.
316 # The regular configure path never sets this config.
317 output_sym "CONFIG_WINDOWSAIO"
318 # We now take the regular configuration path without having exit 0 here.
319 # Flags below are still necessary mostly for MinGW.
324 clock_gettime="yes" # clock_monotonic probe has dependency on this
325 clock_monotonic="yes"
332 echo "CC=$CC" >> $config_host_mak
333 echo "BUILD_CFLAGS=$CFLAGS -I../zlib -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
337 if test ! -z "$cpu" ; then
338 # command line argument
340 elif check_define __i386__ ; then
342 elif check_define __x86_64__ ; then
344 elif check_define __sparc__ ; then
345 if check_define __arch64__ ; then
350 elif check_define _ARCH_PPC ; then
351 if check_define _ARCH_PPC64 ; then
356 elif check_define __mips__ ; then
358 elif check_define __ia64__ ; then
360 elif check_define __s390__ ; then
361 if check_define __s390x__ ; then
366 elif check_define __arm__ ; then
368 elif check_define __aarch64__ ; then
370 elif check_define __hppa__ ; then
376 # Normalise host CPU name and set ARCH.
378 ia64|ppc|ppc64|s390|s390x|sparc64)
381 i386|i486|i586|i686|i86pc|BePC)
393 hppa|parisc|parisc64)
407 if test -z "$CC" ; then
408 if test "$targetos" = "FreeBSD"; then
417 cc="${CC-${cross_prefix}gcc}"
419 ##########################################
420 # check cross compile
422 if test "$cross_compile" != "yes" ; then
431 if compile_prog "" "" "cross"; then
432 $TMPE 2>/dev/null || cross_compile="yes"
434 fatal "compile test failed"
437 ##########################################
439 if test "$bigendian" != "yes" ; then
442 if test "$cross_compile" = "no" ; then
444 #include <inttypes.h>
447 volatile uint32_t i=0x01234567;
448 return (*((uint8_t*)(&i))) == 0x67;
451 if compile_prog "" "" "endian"; then
452 $TMPE && bigendian="yes"
455 # If we're cross compiling, try our best to work it out and rely on the
456 # run-time check to fail if we get it wrong.
461 #if __BYTE_ORDER != __BIG_ENDIAN
462 # error "Unknown endianness"
466 compile_prog "" "" "endian" && bigendian="yes"
467 check_define "__ARMEB__" && bigendian="yes"
468 check_define "__MIPSEB__" && bigendian="yes"
472 echo "Operating system $targetos"
474 echo "Big endian $bigendian"
476 echo "Cross compile $cross_compile"
479 ##########################################
480 # See if we need to build a static build
481 if test "$build_static" = "yes" ; then
482 CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
483 LDFLAGS="$LDFLAGS -static -Wl,--gc-sections"
487 echo "Static build $build_static"
489 ##########################################
494 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
497 BUILD_BUG_ON(sizeof(long)*CHAR_BIT != WORDSIZE);
501 if compile_prog "-DWORDSIZE=32" "" "wordsize"; then
503 elif compile_prog "-DWORDSIZE=64" "" "wordsize"; then
506 fatal "Unknown wordsize"
508 echo "Wordsize $wordsize"
510 ##########################################
512 if test "$zlib" != "yes" ; then
520 if (inflateInit(&stream) != Z_OK)
525 if compile_prog "" "-lz" "zlib" ; then
531 ##########################################
533 if test "$libaio" != "yes" ; then
536 if test "$esx" != "yes" ; then
546 if compile_prog "" "-laio" "libaio" ; then
550 if test "$libaio" = "yes" ; then
551 feature_not_found "linux AIO" "libaio-dev or libaio-devel"
556 echo "Linux AIO support $libaio"
558 ##########################################
560 if test "$posix_aio" != "yes" ; then
563 if test "$posix_aio_lrt" != "yes" ; then
575 if compile_prog "" "" "posixaio" ; then
577 elif compile_prog "" "-lrt" "posixaio"; then
582 echo "POSIX AIO support $posix_aio"
583 echo "POSIX AIO support needs -lrt $posix_aio_lrt"
585 ##########################################
586 # posix aio fsync probe
587 if test "$posix_aio_fsync" != "yes" ; then
590 if test "$posix_aio" = "yes" ; then
597 return aio_fsync(O_SYNC, &cb);
601 if compile_prog "" "$LIBS" "posix_aio_fsync" ; then
605 echo "POSIX AIO fsync $posix_aio_fsync"
607 ##########################################
609 if test "$solaris_aio" != "yes" ; then
613 #include <sys/types.h>
614 #include <sys/asynch.h>
619 return aioread(0, NULL, 0, 0, SEEK_SET, &res);
623 if compile_prog "" "-laio" "solarisaio" ; then
627 echo "Solaris AIO support $solaris_aio"
629 ##########################################
630 # __sync_fetch_and_add test
631 if test "$sfaa" != "yes" ; then
635 #include <inttypes.h>
636 static int sfaa(uint64_t *ptr)
638 return __sync_fetch_and_add(ptr, 0);
641 int main(int argc, char **argv)
648 if compile_prog "" "" "__sync_fetch_and_add()" ; then
651 echo "__sync_fetch_and_add $sfaa"
653 ##########################################
655 if test "$libverbs" != "yes" ; then
660 #include <infiniband/arch.h>
661 int main(int argc, char **argv)
663 struct ibv_pd *pd = ibv_alloc_pd(NULL);
667 if compile_prog "" "-libverbs" "libverbs" ; then
669 LIBS="-libverbs $LIBS"
671 echo "libverbs $libverbs"
673 ##########################################
675 if test "$rdmacm" != "yes" ; then
680 #include <rdma/rdma_cma.h>
681 int main(int argc, char **argv)
683 rdma_destroy_qp(NULL);
687 if compile_prog "" "-lrdmacm" "rdma"; then
689 LIBS="-lrdmacm $LIBS"
691 echo "rdmacm $rdmacm"
693 ##########################################
694 # Linux fallocate probe
695 if test "$linux_fallocate" != "yes" ; then
701 #include <linux/falloc.h>
702 int main(int argc, char **argv)
704 int r = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 1024);
708 if compile_prog "" "" "linux_fallocate"; then
709 linux_fallocate="yes"
711 echo "Linux fallocate $linux_fallocate"
713 ##########################################
714 # POSIX fadvise probe
715 if test "$posix_fadvise" != "yes" ; then
721 int main(int argc, char **argv)
723 int r = posix_fadvise(0, 0, 0, POSIX_FADV_NORMAL);
727 if compile_prog "" "" "posix_fadvise"; then
730 echo "POSIX fadvise $posix_fadvise"
732 ##########################################
733 # POSIX fallocate probe
734 if test "$posix_fallocate" != "yes" ; then
740 int main(int argc, char **argv)
742 int r = posix_fallocate(0, 0, 1024);
746 if compile_prog "" "" "posix_fallocate"; then
747 posix_fallocate="yes"
749 echo "POSIX fallocate $posix_fallocate"
751 ##########################################
752 # sched_set/getaffinity 2 or 3 argument test
753 if test "$linux_2arg_affinity" != "yes" ; then
754 linux_2arg_affinity="no"
756 if test "$linux_3arg_affinity" != "yes" ; then
757 linux_3arg_affinity="no"
761 int main(int argc, char **argv)
764 return sched_setaffinity(0, sizeof(mask), &mask);
767 if compile_prog "" "" "sched_setaffinity(,,)"; then
768 linux_3arg_affinity="yes"
772 int main(int argc, char **argv)
775 return sched_setaffinity(0, &mask);
778 if compile_prog "" "" "sched_setaffinity(,)"; then
779 linux_2arg_affinity="yes"
782 echo "sched_setaffinity(3 arg) $linux_3arg_affinity"
783 echo "sched_setaffinity(2 arg) $linux_2arg_affinity"
785 ##########################################
786 # clock_gettime probe
787 if test "$clock_gettime" != "yes" ; then
793 int main(int argc, char **argv)
795 return clock_gettime(0, NULL);
798 if compile_prog "" "" "clock_gettime"; then
800 elif compile_prog "" "-lrt" "clock_gettime"; then
804 echo "clock_gettime $clock_gettime"
806 ##########################################
807 # CLOCK_MONOTONIC probe
808 if test "$clock_monotonic" != "yes" ; then
811 if test "$clock_gettime" = "yes" ; then
815 int main(int argc, char **argv)
817 return clock_gettime(CLOCK_MONOTONIC, NULL);
820 if compile_prog "" "$LIBS" "clock monotonic"; then
821 clock_monotonic="yes"
824 echo "CLOCK_MONOTONIC $clock_monotonic"
826 ##########################################
827 # CLOCK_MONOTONIC_RAW probe
828 if test "$clock_monotonic_raw" != "yes" ; then
829 clock_monotonic_raw="no"
831 if test "$clock_gettime" = "yes" ; then
835 int main(int argc, char **argv)
837 return clock_gettime(CLOCK_MONOTONIC_RAW, NULL);
840 if compile_prog "" "$LIBS" "clock monotonic"; then
841 clock_monotonic_raw="yes"
844 echo "CLOCK_MONOTONIC_RAW $clock_monotonic_raw"
846 ##########################################
847 # CLOCK_MONOTONIC_PRECISE probe
848 if test "$clock_monotonic_precise" != "yes" ; then
849 clock_monotonic_precise="no"
851 if test "$clock_gettime" = "yes" ; then
855 int main(int argc, char **argv)
857 return clock_gettime(CLOCK_MONOTONIC_PRECISE, NULL);
860 if compile_prog "" "$LIBS" "clock monotonic precise"; then
861 clock_monotonic_precise="yes"
864 echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
866 ##########################################
868 if test "$clockid_t" != "yes" ; then
873 int main(int argc, char **argv)
875 volatile clockid_t cid;
876 memset(&cid, 0, sizeof(cid));
880 if compile_prog "" "$LIBS" "clockid_t"; then
883 echo "clockid_t $clockid_t"
885 ##########################################
886 # gettimeofday() probe
887 if test "$gettimeofday" != "yes" ; then
891 #include <sys/time.h>
893 int main(int argc, char **argv)
896 return gettimeofday(&tv, NULL);
899 if compile_prog "" "" "gettimeofday"; then
902 echo "gettimeofday $gettimeofday"
904 ##########################################
906 if test "$fdatasync" != "yes" ; then
912 int main(int argc, char **argv)
917 if compile_prog "" "" "fdatasync"; then
920 echo "fdatasync $fdatasync"
922 ##########################################
923 # sync_file_range() probe
924 if test "$sync_file_range" != "yes" ; then
931 #include <linux/fs.h>
932 int main(int argc, char **argv)
934 unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE |
935 SYNC_FILE_RANGE_WAIT_AFTER;
936 return sync_file_range(0, 0, 0, flags);
939 if compile_prog "" "" "sync_file_range"; then
940 sync_file_range="yes"
942 echo "sync_file_range $sync_file_range"
944 ##########################################
945 # ext4 move extent probe
946 if test "$ext4_me" != "yes" ; then
951 #include <sys/ioctl.h>
952 int main(int argc, char **argv)
954 struct move_extent me;
955 return ioctl(0, EXT4_IOC_MOVE_EXT, &me);
958 if compile_prog "" "" "ext4 move extent" ; then
960 elif test $targetos = "Linux" ; then
961 # On Linux, just default to it on and let it error at runtime if we really
962 # don't have it. None of my updated systems have it defined, but it does
963 # work. Takes a while to bubble back.
966 echo "EXT4 move extent $ext4_me"
968 ##########################################
970 if test "$linux_splice" != "yes" ; then
976 int main(int argc, char **argv)
978 return splice(0, NULL, 0, NULL, 0, SPLICE_F_NONBLOCK);
981 if compile_prog "" "" "linux splice"; then
984 echo "Linux splice(2) $linux_splice"
986 ##########################################
988 if test "$guasi" != "yes" ; then
993 #include <guasi_syscalls.h>
994 int main(int argc, char **argv)
996 guasi_t ctx = guasi_create(0, 0, 0);
1000 if compile_prog "" "" "guasi"; then
1005 ##########################################
1007 if test "$fusion_aw" != "yes" ; then
1011 #include <nvm/nvm_primitives.h>
1012 int main(int argc, char **argv)
1014 nvm_version_t ver_info;
1015 nvm_handle_t handle;
1017 handle = nvm_get_handle(0, &ver_info);
1018 return nvm_atomic_write(handle, 0, 0, 0);
1021 if compile_prog "" "-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -ldl -lpthread" "fusion-aw"; then
1022 LIBS="-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -ldl -lpthread $LIBS"
1025 echo "Fusion-io atomic engine $fusion_aw"
1027 ##########################################
1029 if test "$libnuma" != "yes" ; then
1034 int main(int argc, char **argv)
1036 return numa_available();
1039 if test "$disable_numa" != "yes" && compile_prog "" "-lnuma" "libnuma"; then
1043 echo "libnuma $libnuma"
1045 ##########################################
1046 # libnuma 2.x version API, initialize with "no" only if $libnuma is set to "yes"
1047 if test "$libnuma" = "yes" ; then
1051 int main(int argc, char **argv)
1053 struct bitmask *mask = numa_parse_nodestring(NULL);
1054 return mask->size == 0;
1057 if compile_prog "" "" "libnuma api"; then
1060 echo "libnuma v2 $libnuma_v2"
1063 ##########################################
1065 if test "$strsep" != "yes" ; then
1070 int main(int argc, char **argv)
1072 static char *string = "This is a string";
1073 strsep(&string, "needle");
1077 if compile_prog "" "" "strsep"; then
1080 echo "strsep $strsep"
1082 ##########################################
1083 # strcasestr() probe
1084 if test "$strcasestr" != "yes" ; then
1089 int main(int argc, char **argv)
1091 return strcasestr(argv[0], argv[1]) != NULL;
1094 if compile_prog "" "" "strcasestr"; then
1097 echo "strcasestr $strcasestr"
1099 ##########################################
1101 if test "$strlcat" != "yes" ; then
1106 int main(int argc, char **argv)
1108 static char dst[64];
1109 static char *string = "This is a string";
1110 memset(dst, 0, sizeof(dst));
1111 strlcat(dst, string, sizeof(dst));
1115 if compile_prog "" "" "strlcat"; then
1118 echo "strlcat $strlcat"
1120 ##########################################
1121 # getopt_long_only() probe
1122 if test "$getopt_long_only" != "yes" ; then
1123 getopt_long_only="no"
1129 int main(int argc, char **argv)
1131 int c = getopt_long_only(argc, argv, NULL, NULL, NULL);
1135 if compile_prog "" "" "getopt_long_only"; then
1136 getopt_long_only="yes"
1138 echo "getopt_long_only() $getopt_long_only"
1140 ##########################################
1142 if test "$inet_aton" != "yes" ; then
1146 #include <sys/socket.h>
1147 #include <arpa/inet.h>
1149 int main(int argc, char **argv)
1152 return inet_aton(NULL, &in);
1155 if compile_prog "" "" "inet_aton"; then
1158 echo "inet_aton $inet_aton"
1160 ##########################################
1162 if test "$socklen_t" != "yes" ; then
1166 #include <sys/socket.h>
1167 int main(int argc, char **argv)
1173 if compile_prog "" "" "socklen_t"; then
1176 echo "socklen_t $socklen_t"
1178 ##########################################
1179 # Whether or not __thread is supported for TLS
1180 if test "$tls_thread" != "yes" ; then
1185 static __thread int ret;
1186 int main(int argc, char **argv)
1191 if compile_prog "" "" "__thread"; then
1194 echo "__thread $tls_thread"
1196 ##########################################
1197 # Check if we have required gtk/glib support for gfio
1198 if test "$gfio" != "yes" ; then
1201 if test "$gfio_check" = "yes" ; then
1205 #include <gtk/gtk.h>
1208 gdk_threads_enter();
1209 gdk_threads_leave();
1211 printf("%d", GTK_CHECK_VERSION(2, 18, 0));
1214 GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0)
1215 ORG_LDFLAGS=$LDFLAGS
1216 LDFLAGS=$(echo $LDFLAGS | sed s/"-static"//g)
1217 if test "$?" != "0" ; then
1218 echo "configure: gtk and gthread not found"
1221 GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0)
1222 if test "$?" != "0" ; then
1223 echo "configure: gtk and gthread not found"
1226 if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then
1228 if test "$r" != "0" ; then
1230 GFIO_LIBS="$LIBS $GTK_LIBS"
1231 CFLAGS="$CFLAGS $GTK_CFLAGS"
1233 echo "GTK found, but need version 2.18 or higher"
1237 echo "Please install gtk and gdk libraries"
1240 LDFLAGS=$ORG_LDFLAGS
1243 if test "$gfio_check" = "yes" ; then
1244 echo "gtk 2.18 or higher $gfio"
1247 # Check whether we have getrusage(RUSAGE_THREAD)
1248 if test "$rusage_thread" != "yes" ; then
1252 #include <sys/time.h>
1253 #include <sys/resource.h>
1254 int main(int argc, char **argv)
1257 getrusage(RUSAGE_THREAD, &ru);
1261 if compile_prog "" "" "RUSAGE_THREAD"; then
1264 echo "RUSAGE_THREAD $rusage_thread"
1266 ##########################################
1267 # Check whether we have SCHED_IDLE
1268 if test "$sched_idle" != "yes" ; then
1273 int main(int argc, char **argv)
1275 struct sched_param p;
1276 return sched_setscheduler(0, SCHED_IDLE, &p);
1279 if compile_prog "" "" "SCHED_IDLE"; then
1282 echo "SCHED_IDLE $sched_idle"
1284 ##########################################
1285 # Check whether we have TCP_NODELAY
1286 if test "$tcp_nodelay" != "yes" ; then
1291 #include <sys/types.h>
1292 #include <sys/socket.h>
1293 #include <netinet/tcp.h>
1294 int main(int argc, char **argv)
1296 return getsockopt(0, 0, TCP_NODELAY, NULL, NULL);
1299 if compile_prog "" "" "TCP_NODELAY"; then
1302 echo "TCP_NODELAY $tcp_nodelay"
1304 ##########################################
1305 # Check whether we have SO_SNDBUF
1306 if test "$window_size" != "yes" ; then
1311 #include <sys/types.h>
1312 #include <sys/socket.h>
1313 #include <netinet/tcp.h>
1314 int main(int argc, char **argv)
1316 setsockopt(0, SOL_SOCKET, SO_SNDBUF, NULL, 0);
1317 setsockopt(0, SOL_SOCKET, SO_RCVBUF, NULL, 0);
1320 if compile_prog "" "" "SO_SNDBUF"; then
1323 echo "Net engine window_size $window_size"
1325 ##########################################
1326 # Check whether we have TCP_MAXSEG
1327 if test "$mss" != "yes" ; then
1332 #include <sys/types.h>
1333 #include <sys/socket.h>
1334 #include <netinet/tcp.h>
1335 #include <arpa/inet.h>
1336 #include <netinet/in.h>
1337 int main(int argc, char **argv)
1339 return setsockopt(0, IPPROTO_TCP, TCP_MAXSEG, NULL, 0);
1342 if compile_prog "" "" "TCP_MAXSEG"; then
1345 echo "TCP_MAXSEG $mss"
1347 ##########################################
1348 # Check whether we have RLIMIT_MEMLOCK
1349 if test "$rlimit_memlock" != "yes" ; then
1353 #include <sys/time.h>
1354 #include <sys/resource.h>
1355 int main(int argc, char **argv)
1358 return getrlimit(RLIMIT_MEMLOCK, &rl);
1361 if compile_prog "" "" "RLIMIT_MEMLOCK"; then
1362 rlimit_memlock="yes"
1364 echo "RLIMIT_MEMLOCK $rlimit_memlock"
1366 ##########################################
1367 # Check whether we have pwritev/preadv
1368 if test "$pwritev" != "yes" ; then
1373 #include <sys/uio.h>
1374 int main(int argc, char **argv)
1376 return pwritev(0, NULL, 1, 0) + preadv(0, NULL, 1, 0);
1379 if compile_prog "" "" "pwritev"; then
1382 echo "pwritev/preadv $pwritev"
1384 ##########################################
1385 # Check whether we have pwritev2/preadv2
1386 if test "$pwritev2" != "yes" ; then
1391 #include <sys/uio.h>
1392 int main(int argc, char **argv)
1394 return pwritev2(0, NULL, 1, 0, 0) + preadv2(0, NULL, 1, 0, 0);
1397 if compile_prog "" "" "pwritev2"; then
1400 echo "pwritev2/preadv2 $pwritev2"
1402 ##########################################
1403 # Check whether we have the required functions for ipv6
1404 if test "$ipv6" != "yes" ; then
1408 #include <sys/types.h>
1409 #include <sys/socket.h>
1410 #include <netinet/in.h>
1413 int main(int argc, char **argv)
1415 struct addrinfo hints;
1416 struct in6_addr addr;
1419 ret = getaddrinfo(NULL, NULL, &hints, NULL);
1421 printf("%s\n", gai_strerror(ret));
1426 if compile_prog "" "" "ipv6"; then
1429 echo "IPv6 helpers $ipv6"
1431 ##########################################
1433 if test "$rbd" != "yes" ; then
1437 #include <rbd/librbd.h>
1439 int main(int argc, char **argv)
1443 rados_ioctx_t io_ctx;
1444 const char pool[] = "rbd";
1446 int major, minor, extra;
1447 rbd_version(&major, &minor, &extra);
1449 rados_ioctx_create(cluster, pool, &io_ctx);
1453 if test "$disable_rbd" != "yes" && compile_prog "" "-lrbd -lrados" "rbd"; then
1454 LIBS="-lrbd -lrados $LIBS"
1457 echo "Rados Block Device engine $rbd"
1459 ##########################################
1460 # check for rbd_poll
1461 if test "$rbd_poll" != "yes" ; then
1464 if test "$rbd" = "yes"; then
1466 #include <rbd/librbd.h>
1467 #include <sys/eventfd.h>
1469 int main(int argc, char **argv)
1472 rbd_completion_t comp;
1474 int fd = eventfd(0, EFD_NONBLOCK);
1475 rbd_set_image_notification(image, fd, EVENT_TYPE_EVENTFD);
1476 rbd_poll_io_events(image, comp, 1);
1481 if compile_prog "" "-lrbd -lrados" "rbd"; then
1484 echo "rbd_poll $rbd_poll"
1487 ##########################################
1488 # check for rbd_invaidate_cache()
1489 if test "$rbd_inval" != "yes" ; then
1492 if test "$rbd" = "yes"; then
1494 #include <rbd/librbd.h>
1496 int main(int argc, char **argv)
1500 return rbd_invalidate_cache(image);
1503 if compile_prog "" "-lrbd -lrados" "rbd"; then
1506 echo "rbd_invalidate_cache $rbd_inval"
1509 ##########################################
1511 if test "$rbd_blkin" != "yes" ; then
1515 #include <rbd/librbd.h>
1516 #include <zipkin_c.h>
1518 int main(int argc, char **argv)
1521 struct blkin_trace_info t_info;
1522 blkin_init_trace_info(&t_info);
1523 rbd_completion_t completion;
1528 r = rbd_aio_write_traced(image, off, len, buf, completion, &t_info);
1532 if test "$disable_rbd" != "yes" && test "$disable_rbd_blkin" != "yes" \
1533 && compile_prog "" "-lrbd -lrados -lblkin" "rbd_blkin"; then
1534 LIBS="-lblkin $LIBS"
1537 echo "rbd blkin tracing $rbd_blkin"
1539 ##########################################
1540 # Check whether we have setvbuf
1541 if test "$setvbuf" != "yes" ; then
1546 int main(int argc, char **argv)
1550 setvbuf(f, buf, _IOFBF, sizeof(buf));
1554 if compile_prog "" "" "setvbuf"; then
1557 echo "setvbuf $setvbuf"
1560 if test "$gfapi" != "yes" ; then
1564 #include <glusterfs/api/glfs.h>
1566 int main(int argc, char **argv)
1569 glfs_t *g = glfs_new("foo");
1574 if test "$disable_gfapi" != "yes" && compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
1575 LIBS="-lgfapi -lglusterfs $LIBS"
1578 echo "Gluster API engine $gfapi"
1580 ##########################################
1581 # check for gfapi fadvise support, initialize with "no" only if $gfapi is set to "yes"
1582 if test "$gfapi" = "yes" ; then
1585 #include <glusterfs/api/glfs.h>
1587 int main(int argc, char **argv)
1590 int ret = glfs_fadvise(fd, 0, 0, 1);
1595 if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
1598 echo "Gluster API use fadvise $gf_fadvise"
1601 ##########################################
1602 # check for gfapi trim support
1603 if test "$gf_trim" != "yes" ; then
1606 if test "$gfapi" = "yes" ; then
1608 #include <glusterfs/api/glfs.h>
1610 int main(int argc, char **argv)
1612 return glfs_discard_async(NULL, 0, 0);
1615 if compile_prog "" "-lgfapi -lglusterfs" "gf trim"; then
1618 echo "Gluster API trim support $gf_trim"
1621 ##########################################
1622 # Check if we support stckf on s390
1623 if test "$s390_z196_facilities" != "yes" ; then
1624 s390_z196_facilities="no"
1627 #define STFLE_BITS_Z196 45 /* various z196 facilities ... */
1628 int main(int argc, char **argv)
1630 /* We want just 1 double word to be returned. */
1631 register unsigned long reg0 asm("0") = 0;
1632 unsigned long stfle_bits;
1633 asm volatile(".machine push" "\n\t"
1634 ".machine \"z9-109\"" "\n\t"
1637 : "=QS" (stfle_bits), "+d" (reg0)
1640 if ((stfle_bits & (1UL << (63 - STFLE_BITS_Z196))) != 0)
1646 if compile_prog "" "" "s390_z196_facilities"; then
1648 if [[ $? -eq 0 ]]; then
1649 s390_z196_facilities="yes"
1652 echo "s390_z196_facilities $s390_z196_facilities"
1654 ##########################################
1655 # Check if we have required environment variables configured for libhdfs
1656 if test "$libhdfs" = "yes" ; then
1658 if test "$JAVA_HOME" = "" ; then
1659 echo "configure: JAVA_HOME should be defined to jdk/jvm path"
1662 if test "$FIO_LIBHDFS_INCLUDE" = "" ; then
1663 echo "configure: FIO_LIBHDFS_INCLUDE should be defined to libhdfs inlude path"
1666 if test "$FIO_LIBHDFS_LIB" = "" ; then
1667 echo "configure: FIO_LIBHDFS_LIB should be defined to libhdfs library path"
1670 if test "$hdfs_conf_error" = "1" ; then
1674 if test "$FIO_HDFS_CPU" = "x86_64" ; then
1675 FIO_HDFS_CPU="amd64"
1678 echo "HDFS engine $libhdfs"
1680 ##########################################
1681 # Check whether we have MTD
1682 if test "$mtd" != "yes" ; then
1687 #include <mtd/mtd-user.h>
1688 #include <sys/ioctl.h>
1689 int main(int argc, char **argv)
1691 struct mtd_write_req ops;
1692 struct mtd_info_user info;
1693 memset(&ops, 0, sizeof(ops));
1694 info.type = MTD_MLCNANDFLASH;
1695 return ioctl(0, MEMGETINFO, &info);
1698 if compile_prog "" "" "mtd"; then
1703 ##########################################
1704 # Check whether we have libpmem
1705 if test "$libpmem" != "yes" ; then
1709 #include <libpmem.h>
1710 int main(int argc, char **argv)
1713 rc = pmem_is_pmem(0, 0);
1717 if compile_prog "" "-lpmem" "libpmem"; then
1721 echo "libpmem $libpmem"
1723 ##########################################
1724 # Check whether we have libpmemblk
1725 # libpmem is a prerequisite
1726 if test "$libpmemblk" != "yes" ; then
1729 if test "$libpmem" = "yes"; then
1731 #include <libpmemblk.h>
1732 int main(int argc, char **argv)
1735 pbp = pmemblk_open("", 0);
1739 if compile_prog "" "-lpmemblk" "libpmemblk"; then
1741 LIBS="-lpmemblk $LIBS"
1744 echo "libpmemblk $libpmemblk"
1746 # Choose the ioengines
1747 if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then
1749 if test "$libpmemblk" = "yes"; then
1754 ##########################################
1755 # Report whether pmemblk engine is enabled
1756 echo "NVML pmemblk engine $pmemblk"
1758 ##########################################
1759 # Report whether dev-dax engine is enabled
1760 echo "NVML dev-dax engine $devdax"
1762 # Check if we have lex/yacc available
1767 if test "$disable_lex" = "no" || test -z "$disable_lex" ; then
1768 if test "$targetos" != "SunOS" ; then
1769 LEX=$(which lex 2> /dev/null)
1770 if test -x "$LEX" ; then
1773 YACC=$(which bison 2> /dev/null)
1774 if test -x "$YACC" ; then
1778 YACC=$(which yacc 2> /dev/null)
1779 if test -x "$YACC" ; then
1783 if test "$yacc" = "yes" && test "$lex" = "yes" ; then
1787 if test "$arith" = "yes" ; then
1789 extern int yywrap(void);
1791 int main(int argc, char **argv)
1797 if compile_prog "" "-ll" "lex"; then
1806 # Check if lex fails using -o
1807 if test "$arith" = "yes" ; then
1808 if test "$force_no_lex_o" = "yes" ; then
1811 $LEX -o lex.yy.c exp/expression-parser.l 2> /dev/null
1812 if test "$?" = "0" ; then
1820 echo "lex/yacc for arithmetic $arith"
1822 ##########################################
1823 # Check whether we have setmntent/getmntent
1824 if test "$getmntent" != "yes" ; then
1830 int main(int argc, char **argv)
1832 FILE *mtab = setmntent(NULL, "r");
1833 struct mntent *mnt = getmntent(mtab);
1838 if compile_prog "" "" "getmntent"; then
1841 echo "getmntent $getmntent"
1843 ##########################################
1844 # Check whether we have getmntinfo
1845 # These are originally added for BSDs, but may also work
1846 # on other operating systems with getmntinfo(3).
1848 # getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD.
1849 # Note that NetBSD needs -Werror to catch warning as error.
1850 if test "$getmntinfo" != "yes" ; then
1855 #include <sys/param.h>
1856 #include <sys/mount.h>
1857 int main(int argc, char **argv)
1860 return getmntinfo(&st, MNT_NOWAIT);
1863 if compile_prog "-Werror" "" "getmntinfo"; then
1866 echo "getmntinfo $getmntinfo"
1868 # getmntinfo(3) for NetBSD.
1869 if test "$getmntinfo_statvfs" != "yes" ; then
1870 getmntinfo_statvfs="no"
1874 #include <sys/statvfs.h>
1875 int main(int argc, char **argv)
1878 return getmntinfo(&st, MNT_NOWAIT);
1881 # Skip the test if the one with statfs arg is detected.
1882 if test "$getmntinfo" != "yes" && compile_prog "-Werror" "" "getmntinfo_statvfs"; then
1883 getmntinfo_statvfs="yes"
1884 echo "getmntinfo_statvfs $getmntinfo_statvfs"
1887 ##########################################
1888 # Check whether we have _Static_assert
1889 if test "$static_assert" != "yes" ; then
1896 #ifdef __compiler_offsetof
1897 #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
1899 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
1902 #define container_of(ptr, type, member) ({ \
1903 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
1904 (type *)( (char *)__mptr - offsetof(type,member) );})
1910 int main(int argc, char **argv)
1912 _Static_assert(offsetof(struct foo, a) == 0 , "Check");
1916 if compile_prog "" "" "static_assert"; then
1919 echo "Static Assert $static_assert"
1921 ##########################################
1922 # Check whether we have bool / stdbool.h
1923 if test "$have_bool" != "yes" ; then
1927 #include <stdbool.h>
1928 int main(int argc, char **argv)
1931 return var != false;
1934 if compile_prog "" "" "bool"; then
1937 echo "bool $have_bool"
1939 ##########################################
1940 # check march=armv8-a+crc+crypto
1941 if test "$march_armv8_a_crc_crypto" != "yes" ; then
1942 march_armv8_a_crc_crypto="no"
1944 if test "$cpu" = "arm64" ; then
1946 #include <sys/auxv.h>
1947 #include <arm_acle.h>
1948 #include <arm_neon.h>
1955 if compile_prog "-march=armv8-a+crc+crypto" "" ""; then
1956 march_armv8_a_crc_crypto="yes"
1957 CFLAGS="$CFLAGS -march=armv8-a+crc+crypto -DARCH_HAVE_CRC_CRYPTO"
1960 echo "march_armv8_a_crc_crypto $march_armv8_a_crc_crypto"
1963 #############################################################################
1965 if test "$wordsize" = "64" ; then
1966 output_sym "CONFIG_64BIT"
1967 elif test "$wordsize" = "32" ; then
1968 output_sym "CONFIG_32BIT"
1970 fatal "Unknown wordsize!"
1972 if test "$bigendian" = "yes" ; then
1973 output_sym "CONFIG_BIG_ENDIAN"
1975 output_sym "CONFIG_LITTLE_ENDIAN"
1977 if test "$zlib" = "yes" ; then
1978 output_sym "CONFIG_ZLIB"
1980 if test "$libaio" = "yes" ; then
1981 output_sym "CONFIG_LIBAIO"
1983 if test "$posix_aio" = "yes" ; then
1984 output_sym "CONFIG_POSIXAIO"
1986 if test "$posix_aio_fsync" = "yes" ; then
1987 output_sym "CONFIG_POSIXAIO_FSYNC"
1989 if test "$linux_fallocate" = "yes" ; then
1990 output_sym "CONFIG_LINUX_FALLOCATE"
1992 if test "$posix_fallocate" = "yes" ; then
1993 output_sym "CONFIG_POSIX_FALLOCATE"
1995 if test "$fdatasync" = "yes" ; then
1996 output_sym "CONFIG_FDATASYNC"
1998 if test "$sync_file_range" = "yes" ; then
1999 output_sym "CONFIG_SYNC_FILE_RANGE"
2001 if test "$sfaa" = "yes" ; then
2002 output_sym "CONFIG_SFAA"
2004 if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then
2005 output_sym "CONFIG_RDMA"
2007 if test "$clock_gettime" = "yes" ; then
2008 output_sym "CONFIG_CLOCK_GETTIME"
2010 if test "$clock_monotonic" = "yes" ; then
2011 output_sym "CONFIG_CLOCK_MONOTONIC"
2013 if test "$clock_monotonic_raw" = "yes" ; then
2014 output_sym "CONFIG_CLOCK_MONOTONIC_RAW"
2016 if test "$clock_monotonic_precise" = "yes" ; then
2017 output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE"
2019 if test "$clockid_t" = "yes"; then
2020 output_sym "CONFIG_CLOCKID_T"
2022 if test "$gettimeofday" = "yes" ; then
2023 output_sym "CONFIG_GETTIMEOFDAY"
2025 if test "$posix_fadvise" = "yes" ; then
2026 output_sym "CONFIG_POSIX_FADVISE"
2028 if test "$linux_3arg_affinity" = "yes" ; then
2029 output_sym "CONFIG_3ARG_AFFINITY"
2030 elif test "$linux_2arg_affinity" = "yes" ; then
2031 output_sym "CONFIG_2ARG_AFFINITY"
2033 if test "$strsep" = "yes" ; then
2034 output_sym "CONFIG_STRSEP"
2036 if test "$strcasestr" = "yes" ; then
2037 output_sym "CONFIG_STRCASESTR"
2039 if test "$strlcat" = "yes" ; then
2040 output_sym "CONFIG_STRLCAT"
2042 if test "$getopt_long_only" = "yes" ; then
2043 output_sym "CONFIG_GETOPT_LONG_ONLY"
2045 if test "$inet_aton" = "yes" ; then
2046 output_sym "CONFIG_INET_ATON"
2048 if test "$socklen_t" = "yes" ; then
2049 output_sym "CONFIG_SOCKLEN_T"
2051 if test "$ext4_me" = "yes" ; then
2052 output_sym "CONFIG_LINUX_EXT4_MOVE_EXTENT"
2054 if test "$linux_splice" = "yes" ; then
2055 output_sym "CONFIG_LINUX_SPLICE"
2057 if test "$guasi" = "yes" ; then
2058 output_sym "CONFIG_GUASI"
2060 if test "$fusion_aw" = "yes" ; then
2061 output_sym "CONFIG_FUSION_AW"
2063 if test "$libnuma_v2" = "yes" ; then
2064 output_sym "CONFIG_LIBNUMA"
2066 if test "$solaris_aio" = "yes" ; then
2067 output_sym "CONFIG_SOLARISAIO"
2069 if test "$tls_thread" = "yes" ; then
2070 output_sym "CONFIG_TLS_THREAD"
2072 if test "$rusage_thread" = "yes" ; then
2073 output_sym "CONFIG_RUSAGE_THREAD"
2075 if test "$gfio" = "yes" ; then
2076 echo "CONFIG_GFIO=y" >> $config_host_mak
2078 if test "$esx" = "yes" ; then
2079 output_sym "CONFIG_ESX"
2080 output_sym "CONFIG_NO_SHM"
2082 if test "$sched_idle" = "yes" ; then
2083 output_sym "CONFIG_SCHED_IDLE"
2085 if test "$tcp_nodelay" = "yes" ; then
2086 output_sym "CONFIG_TCP_NODELAY"
2088 if test "$window_size" = "yes" ; then
2089 output_sym "CONFIG_NET_WINDOWSIZE"
2091 if test "$mss" = "yes" ; then
2092 output_sym "CONFIG_NET_MSS"
2094 if test "$rlimit_memlock" = "yes" ; then
2095 output_sym "CONFIG_RLIMIT_MEMLOCK"
2097 if test "$pwritev" = "yes" ; then
2098 output_sym "CONFIG_PWRITEV"
2100 if test "$pwritev2" = "yes" ; then
2101 output_sym "CONFIG_PWRITEV2"
2103 if test "$ipv6" = "yes" ; then
2104 output_sym "CONFIG_IPV6"
2106 if test "$rbd" = "yes" ; then
2107 output_sym "CONFIG_RBD"
2109 if test "$rbd_poll" = "yes" ; then
2110 output_sym "CONFIG_RBD_POLL"
2112 if test "$rbd_inval" = "yes" ; then
2113 output_sym "CONFIG_RBD_INVAL"
2115 if test "$rbd_blkin" = "yes" ; then
2116 output_sym "CONFIG_RBD_BLKIN"
2118 if test "$setvbuf" = "yes" ; then
2119 output_sym "CONFIG_SETVBUF"
2121 if test "$s390_z196_facilities" = "yes" ; then
2122 output_sym "CONFIG_S390_Z196_FACILITIES"
2123 CFLAGS="$CFLAGS -march=z9-109"
2125 if test "$gfapi" = "yes" ; then
2126 output_sym "CONFIG_GFAPI"
2128 if test "$gf_fadvise" = "yes" ; then
2129 output_sym "CONFIG_GF_FADVISE"
2131 if test "$gf_trim" = "yes" ; then
2132 output_sym "CONFIG_GF_TRIM"
2134 if test "$libhdfs" = "yes" ; then
2135 output_sym "CONFIG_LIBHDFS"
2136 echo "FIO_HDFS_CPU=$FIO_HDFS_CPU" >> $config_host_mak
2137 echo "JAVA_HOME=$JAVA_HOME" >> $config_host_mak
2138 echo "FIO_LIBHDFS_INCLUDE=$FIO_LIBHDFS_INCLUDE" >> $config_host_mak
2139 echo "FIO_LIBHDFS_LIB=$FIO_LIBHDFS_LIB" >> $config_host_mak
2141 if test "$mtd" = "yes" ; then
2142 output_sym "CONFIG_MTD"
2144 if test "$pmemblk" = "yes" ; then
2145 output_sym "CONFIG_PMEMBLK"
2147 if test "$devdax" = "yes" ; then
2148 output_sym "CONFIG_LINUX_DEVDAX"
2150 if test "$arith" = "yes" ; then
2151 output_sym "CONFIG_ARITHMETIC"
2152 if test "$yacc_is_bison" = "yes" ; then
2153 echo "YACC=$YACC -y" >> $config_host_mak
2155 echo "YACC=$YACC" >> $config_host_mak
2157 if test "$lex_use_o" = "yes" ; then
2158 echo "CONFIG_LEX_USE_O=y" >> $config_host_mak
2161 if test "$getmntent" = "yes" ; then
2162 output_sym "CONFIG_GETMNTENT"
2164 if test "$getmntinfo" = "yes" ; then
2165 output_sym "CONFIG_GETMNTINFO"
2167 if test "$getmntinfo_statvfs" = "yes" ; then
2168 output_sym "CONFIG_GETMNTINFO_STATVFS"
2170 if test "$static_assert" = "yes" ; then
2171 output_sym "CONFIG_STATIC_ASSERT"
2173 if test "$have_bool" = "yes" ; then
2174 output_sym "CONFIG_HAVE_BOOL"
2176 if test "$disable_opt" = "yes" ; then
2177 output_sym "CONFIG_DISABLE_OPTIMIZATIONS"
2180 if test "$zlib" = "no" ; then
2181 echo "Consider installing zlib-dev (zlib-devel), some fio features depend on it."
2184 echo "LIBS+=$LIBS" >> $config_host_mak
2185 echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak
2186 echo "CFLAGS+=$CFLAGS" >> $config_host_mak
2187 echo "LDFLAGS+=$LDFLAGS" >> $config_host_mak
2188 echo "CC=$cc" >> $config_host_mak
2189 echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
2190 echo "INSTALL_PREFIX=$prefix" >> $config_host_mak
2192 if [ `dirname $0` != "." -a ! -e Makefile ]; then
2193 cat > Makefile <<EOF
2194 SRCDIR:=`dirname $0`
2195 include \$(SRCDIR)/Makefile