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
133 cross_prefix=${cross_prefix-${CROSS_COMPILE}}
134 cc="${CC-${cross_prefix}gcc}"
143 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
145 --cpu=*) cpu="$optarg"
149 --extra-cflags=*) CFLAGS="$CFLAGS $optarg"
151 --build-32bit-win) build_32bit_win="yes"
156 --disable-numa) disable_numa="yes"
162 echo "Bad option $opt"
168 if test "$show_help" = "yes" ; then
169 echo "--cpu= Specify target CPU if auto-detect fails"
170 echo "--cc= Specify compiler to use"
171 echo "--extra-cflags= Specify extra CFLAGS to pass to compiler"
172 echo "--build-32bit-win Enable 32-bit build on Windows"
173 echo "--enable-gfio Enable building of gtk gfio"
174 echo "--disable-numa Disable libnuma even if found"
178 if check_define __ANDROID__ ; then
180 elif check_define __linux__ ; then
182 elif check_define __OpenBSD__ ; then
184 elif check_define __sun__ ; then
186 CFLAGS="$CFLAGS -D_REENTRANT"
191 echo "# Automatically generated by configure - do not modify" > $config_host_mak
192 printf "# Configured with:" >> $config_host_mak
193 printf " '%s'" "$0" "$@" >> $config_host_mak
194 echo >> $config_host_mak
195 echo "CONFIG_TARGET_OS=$targetos" >> $config_host_mak
197 # Some host OSes need non-standard checks for which CPU to use.
198 # Note that these checks are broken for cross-compilation: if you're
199 # cross-compiling to one of these OSes then you'll need to specify
200 # the correct CPU with the --cpu option.
203 # on Leopard most of the system is 32-bit, so we have to ask the kernel if
204 # we can run 64-bit userspace code.
205 # If the user didn't specify a CPU explicitly and the kernel says this is
206 # 64 bit hw, then assume x86_64. Otherwise fall through to the usual
208 if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
213 # `uname -m` returns i86pc even on an x86_64 box, so default based on isainfo
214 if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
217 LIBS="-lnsl -lsocket"
220 echo "Forcing known good options on Windows"
221 if test -z "$CC" ; then
222 if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
223 CC="i686-w64-mingw32-gcc"
225 CC="x86_64-w64-mingw32-gcc"
228 output_sym "CONFIG_LITTLE_ENDIAN"
229 if test ! -z "$build_32bit_win" && test "$build_32bit_win" = "yes"; then
230 output_sym "CONFIG_32BIT"
232 output_sym "CONFIG_64BIT_LLP64"
234 output_sym "CONFIG_FADVISE"
235 output_sym "CONFIG_SOCKLEN_T"
236 output_sym "CONFIG_FADVISE"
237 output_sym "CONFIG_SFAA"
238 output_sym "CONFIG_RUSAGE_THREAD"
239 output_sym "CONFIG_WINDOWSAIO"
240 output_sym "CONFIG_FDATASYNC"
241 output_sym "CONFIG_CLOCK_MONOTONIC"
242 output_sym "CONFIG_GETTIMEOFDAY"
243 output_sym "CONFIG_CLOCK_GETTIME"
244 output_sym "CONFIG_SCHED_IDLE"
245 output_sym "CONFIG_TCP_NODELAY"
246 output_sym "CONFIG_TLS_THREAD"
247 output_sym "CONFIG_IPV6"
248 echo "CC=$CC" >> $config_host_mak
249 echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
254 if test ! -z "$cpu" ; then
255 # command line argument
257 elif check_define __i386__ ; then
259 elif check_define __x86_64__ ; then
261 elif check_define __sparc__ ; then
262 if check_define __arch64__ ; then
267 elif check_define _ARCH_PPC ; then
268 if check_define _ARCH_PPC64 ; then
273 elif check_define __mips__ ; then
275 elif check_define __ia64__ ; then
277 elif check_define __s390__ ; then
278 if check_define __s390x__ ; then
283 elif check_define __arm__ ; then
285 elif check_define __hppa__ ; then
291 # Normalise host CPU name and set ARCH.
293 ia64|ppc|ppc64|s390|s390x|sparc64)
296 i386|i486|i586|i686|i86pc|BePC)
305 hppa|parisc|parisc64)
319 if test -z "$CC" ; then
320 if test "$targetos" = "FreeBSD"; then
329 cc="${CC-${cross_prefix}gcc}"
331 ##########################################
332 # check cross compile
341 if compile_prog "" "" "cross"; then
342 $TMPE 2>/dev/null || cross_compile="yes"
344 fatal "compile test failed"
347 ##########################################
350 if test "$cross_compile" = "no" ; then
352 #include <inttypes.h>
355 volatile uint32_t i=0x01234567;
356 return (*((uint8_t*)(&i))) == 0x67;
359 if compile_prog "" "" "endian"; then
360 $TMPE && bigendian="yes"
363 # If we're cross compiling, try our best to work it out and rely on the
364 # run-time check to fail if we get it wrong.
369 #if __BYTE_ORDER != __BIG_ENDIAN
370 # error "Unknown endianness"
374 compile_prog "" "" "endian" && bigendian="yes"
375 check_define "__ARMEB__" && bigendian="yes"
376 check_define "__MIPSEB__" && bigendian="yes"
380 echo "Operating system $targetos"
382 echo "Big endian $bigendian"
384 echo "Cross compile $cross_compile"
387 ##########################################
392 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
395 BUILD_BUG_ON(sizeof(long)*CHAR_BIT != WORDSIZE);
399 if compile_prog "-DWORDSIZE=32" "" "wordsize"; then
401 elif compile_prog "-DWORDSIZE=64" "" "wordsize"; then
404 fatal "Unknown wordsize"
406 echo "Wordsize $wordsize"
408 ##########################################
416 if (inflateInit(&stream) != Z_OK)
421 if compile_prog "" "-lz" "zlib" ; then
427 ##########################################
439 if compile_prog "" "-laio" "libaio" ; then
443 if test "$libaio" = "yes" ; then
444 feature_not_found "linux AIO" "libaio-dev or libaio-devel"
448 echo "Linux AIO support $libaio"
450 ##########################################
463 if compile_prog "" "" "posixaio" ; then
465 elif compile_prog "" "-lrt" "posixaio"; then
470 echo "POSIX AIO support $posix_aio"
471 echo "POSIX AIO support needs -lrt $posix_aio_lrt"
473 ##########################################
474 # posix aio fsync probe
476 if test "$posix_aio" = "yes" ; then
483 return aio_fsync(O_SYNC, &cb);
487 if compile_prog "" "$LIBS" "posix_aio_fsync" ; then
491 echo "POSIX AIO fsync $posix_aio_fsync"
493 ##########################################
497 #include <sys/types.h>
498 #include <sys/asynch.h>
503 return aioread(0, NULL, 0, 0, SEEK_SET, &res);
507 if compile_prog "" "-laio" "solarisaio" ; then
511 echo "Solaris AIO support $solaris_aio"
513 ##########################################
514 # __sync_fetch_and_and test
517 static int sfaa(int *ptr)
519 return __sync_fetch_and_add(ptr, 0);
522 int main(int argc, char **argv)
529 if compile_prog "" "" "__sync_fetch_and_add()" ; then
532 echo "__sync_fetch_and_add $sfaa"
534 ##########################################
539 #include <infiniband/arch.h>
540 int main(int argc, char **argv)
542 struct ibv_pd *pd = ibv_alloc_pd(NULL);
546 if compile_prog "" "-libverbs" "libverbs" ; then
548 LIBS="-libverbs $LIBS"
550 echo "libverbs $libverbs"
552 ##########################################
557 #include <rdma/rdma_cma.h>
558 int main(int argc, char **argv)
560 rdma_destroy_qp(NULL);
564 if compile_prog "" "-lrdmacm" "rdma"; then
566 LIBS="-lrdmacm $LIBS"
568 echo "rdmacm $rdmacm"
570 ##########################################
571 # Linux fallocate probe
576 #include <linux/falloc.h>
577 int main(int argc, char **argv)
579 int r = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 1024);
583 if compile_prog "" "" "linux_fallocate"; then
584 linux_fallocate="yes"
586 echo "Linux fallocate $linux_fallocate"
588 ##########################################
589 # POSIX fadvise probe
594 int main(int argc, char **argv)
596 int r = posix_fadvise(0, 0, 0, POSIX_FADV_NORMAL);
600 if compile_prog "" "" "posix_fadvise"; then
603 echo "POSIX fadvise $posix_fadvise"
605 ##########################################
606 # POSIX fallocate probe
611 int main(int argc, char **argv)
613 int r = posix_fallocate(0, 0, 1024);
617 if compile_prog "" "" "posix_fallocate"; then
618 posix_fallocate="yes"
620 echo "POSIX fallocate $posix_fallocate"
622 ##########################################
623 # sched_set/getaffinity 2 or 3 argument test
624 linux_2arg_affinity="no"
625 linux_3arg_affinity="no"
628 int main(int argc, char **argv)
631 return sched_setaffinity(0, sizeof(mask), &mask);
634 if compile_prog "" "" "sched_setaffinity(,,)"; then
635 linux_3arg_affinity="yes"
639 int main(int argc, char **argv)
642 return sched_setaffinity(0, &mask);
645 if compile_prog "" "" "sched_setaffinity(,)"; then
646 linux_2arg_affinity="yes"
649 echo "sched_setaffinity(3 arg) $linux_3arg_affinity"
650 echo "sched_setaffinity(2 arg) $linux_2arg_affinity"
652 ##########################################
653 # clock_gettime probe
658 int main(int argc, char **argv)
660 return clock_gettime(0, NULL);
663 if compile_prog "" "" "clock_gettime"; then
665 elif compile_prog "" "-lrt" "clock_gettime"; then
669 echo "clock_gettime $clock_gettime"
671 ##########################################
672 # CLOCK_MONOTONIC probe
674 if test "$clock_gettime" = "yes" ; then
678 int main(int argc, char **argv)
680 return clock_gettime(CLOCK_MONOTONIC, NULL);
683 if compile_prog "" "$LIBS" "clock monotonic"; then
684 clock_monotonic="yes"
687 echo "CLOCK_MONOTONIC $clock_monotonic"
689 ##########################################
690 # CLOCK_MONOTONIC_PRECISE probe
691 clock_monotonic_precise="no"
692 if test "$clock_gettime" = "yes" ; then
696 int main(int argc, char **argv)
698 return clock_gettime(CLOCK_MONOTONIC_PRECISE, NULL);
701 if compile_prog "" "$LIBS" "clock monotonic precise"; then
702 clock_monotonic_precise="yes"
705 echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
707 ##########################################
708 # gettimeofday() probe
711 #include <sys/time.h>
713 int main(int argc, char **argv)
716 return gettimeofday(&tv, NULL);
719 if compile_prog "" "" "gettimeofday"; then
722 echo "gettimeofday $gettimeofday"
724 ##########################################
730 int main(int argc, char **argv)
735 if compile_prog "" "" "fdatasync"; then
738 echo "fdatasync $fdatasync"
740 ##########################################
741 # sync_file_range() probe
747 #include <linux/fs.h>
748 int main(int argc, char **argv)
750 unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE |
751 SYNC_FILE_RANGE_WAIT_AFTER;
752 return sync_file_range(0, 0, 0, flags);
755 if compile_prog "" "" "sync_file_range"; then
756 sync_file_range="yes"
758 echo "sync_file_range $sync_file_range"
760 ##########################################
761 # ext4 move extent probe
765 #include <sys/ioctl.h>
766 int main(int argc, char **argv)
768 struct move_extent me;
769 return ioctl(0, EXT4_IOC_MOVE_EXT, &me);
772 if compile_prog "" "" "ext4 move extent" ; then
774 elif test $targetos = "Linux" ; then
775 # On Linux, just default to it on and let it error at runtime if we really
776 # don't have it. None of my updated systems have it defined, but it does
777 # work. Takes a while to bubble back.
780 echo "EXT4 move extent $ext4_me"
782 ##########################################
788 int main(int argc, char **argv)
790 return splice(0, NULL, 0, NULL, 0, SPLICE_F_NONBLOCK);
793 if compile_prog "" "" "linux splice"; then
796 echo "Linux splice(2) $linux_splice"
798 ##########################################
803 #include <guasi_syscalls.h>
804 int main(int argc, char **argv)
806 guasi_t ctx = guasi_create(0, 0, 0);
810 if compile_prog "" "" "guasi"; then
815 ##########################################
819 #include <nvm/nvm_primitives.h>
820 int main(int argc, char **argv)
822 nvm_version_t ver_info;
825 handle = nvm_get_handle(0, &ver_info);
826 return nvm_atomic_write(handle, 0, 0, 0);
829 if compile_prog "" "-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -lvsl -ldl" "fusion-aw"; then
830 LIBS="-L/usr/lib/fio -L/usr/lib/nvm -lnvm-primitives -lvsl -ldl $LIBS"
833 echo "Fusion-io atomic engine $fusion_aw"
835 ##########################################
840 int main(int argc, char **argv)
842 return numa_available();
845 if test "$disable_numa" != "yes" && compile_prog "" "-lnuma" "libnuma"; then
849 echo "libnuma $libnuma"
851 ##########################################
852 # libnuma 2.x version API
853 if test "$libnuma" = "yes" ; then
857 int main(int argc, char **argv)
859 struct bitmask *mask = numa_parse_nodestring(NULL);
863 if compile_prog "" "" "libnuma api"; then
866 echo "libnuma v2 $libnuma_v2"
869 ##########################################
874 int main(int argc, char **argv)
880 if compile_prog "" "" "strsep"; then
883 echo "strsep $strsep"
885 ##########################################
890 int main(int argc, char **argv)
892 return strcasestr(argv[0], argv[1]) != NULL;
895 if compile_prog "" "" "strcasestr"; then
898 echo "strcasestr $strcasestr"
900 ##########################################
901 # getopt_long_only() probe
902 getopt_long_only="no"
907 int main(int argc, char **argv)
909 int c = getopt_long_only(argc, argv, NULL, NULL, NULL);
913 if compile_prog "" "" "getopt_long_only"; then
914 getopt_long_only="yes"
916 echo "getopt_long_only() $getopt_long_only"
918 ##########################################
922 #include <sys/socket.h>
923 #include <arpa/inet.h>
925 int main(int argc, char **argv)
928 return inet_aton(NULL, &in);
931 if compile_prog "" "" "inet_aton"; then
934 echo "inet_aton $inet_aton"
936 ##########################################
940 #include <sys/socket.h>
941 int main(int argc, char **argv)
947 if compile_prog "" "" "socklen_t"; then
950 echo "socklen_t $socklen_t"
952 ##########################################
953 # Whether or not __thread is supported for TLS
957 static __thread int ret;
958 int main(int argc, char **argv)
963 if compile_prog "" "" "__thread"; then
966 echo "__thread $tls_thread"
968 ##########################################
969 # Check if we have required gtk/glib support for gfio
970 if test "$gfio" = "yes" ; then
980 printf("%d", GTK_CHECK_VERSION(2, 18, 0));
983 GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0)
984 if test "$?" != "0" ; then
985 echo "configure: gtk and gthread not found"
988 GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0)
989 if test "$?" != "0" ; then
990 echo "configure: gtk and gthread not found"
993 if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then
995 if test "$r" != "0" ; then
997 LIBS="$LIBS $GTK_LIBS"
998 CFLAGS="$CFLAGS $GTK_CFLAGS"
1000 echo "GTK found, but need version 2.18 or higher"
1004 echo "Please install gtk and gdk libraries"
1009 echo "gtk 2.18 or higher $gfio"
1011 # Check whether we have getrusage(RUSAGE_THREAD)
1014 #include <sys/time.h>
1015 #include <sys/resource.h>
1016 int main(int argc, char **argv)
1019 getrusage(RUSAGE_THREAD, &ru);
1023 if compile_prog "" "" "RUSAGE_THREAD"; then
1026 echo "RUSAGE_THREAD $rusage_thread"
1028 ##########################################
1029 # Check whether we have SCHED_IDLE
1033 int main(int argc, char **argv)
1035 struct sched_param p;
1036 return sched_setscheduler(0, SCHED_IDLE, &p);
1039 if compile_prog "" "" "SCHED_IDLE"; then
1042 echo "SCHED_IDLE $sched_idle"
1044 ##########################################
1045 # Check whether we have TCP_NODELAY
1049 #include <sys/types.h>
1050 #include <sys/socket.h>
1051 #include <netinet/tcp.h>
1052 int main(int argc, char **argv)
1054 return getsockopt(0, 0, TCP_NODELAY, NULL, NULL);
1057 if compile_prog "" "" "TCP_NODELAY"; then
1060 echo "TCP_NODELAY $tcp_nodelay"
1062 ##########################################
1063 # Check whether we have RLIMIT_MEMLOCK
1066 #include <sys/time.h>
1067 #include <sys/resource.h>
1068 int main(int argc, char **argv)
1071 return getrlimit(RLIMIT_MEMLOCK, &rl);
1074 if compile_prog "" "" "RLIMIT_MEMLOCK"; then
1075 rlimit_memlock="yes"
1077 echo "RLIMIT_MEMLOCK $rlimit_memlock"
1079 ##########################################
1080 # Check whether we have pwritev/preadv
1084 #include <sys/uio.h>
1085 int main(int argc, char **argv)
1087 return pwritev(0, NULL, 1, 0) + preadv(0, NULL, 1, 0);
1090 if compile_prog "" "" "pwritev"; then
1093 echo "pwritev/preadv $pwritev"
1095 ##########################################
1096 # Check whether we have the required functions for ipv6
1099 #include <sys/types.h>
1100 #include <sys/socket.h>
1101 #include <netinet/in.h>
1104 int main(int argc, char **argv)
1106 struct addrinfo hints;
1107 struct in6_addr addr;
1110 ret = getaddrinfo(NULL, NULL, &hints, NULL);
1112 printf("%s\n", gai_strerror(ret));
1117 if compile_prog "" "" "ipv6"; then
1120 echo "IPv6 helpers $ipv6"
1122 ##########################################
1126 #include <rbd/librbd.h>
1128 int main(int argc, char **argv)
1132 rados_ioctx_t io_ctx;
1133 const char pool[] = "rbd";
1135 int major, minor, extra;
1136 rbd_version(&major, &minor, &extra);
1138 rados_ioctx_create(cluster, pool, &io_ctx);
1142 if compile_prog "" "-lrbd -lrados" "rbd"; then
1143 LIBS="-lrbd -lrados $LIBS"
1146 echo "Rados Block Device engine $rbd"
1149 #############################################################################
1151 if test "$wordsize" = "64" ; then
1152 output_sym "CONFIG_64BIT"
1153 elif test "$wordsize" = "32" ; then
1154 output_sym "CONFIG_32BIT"
1156 fatal "Unknown wordsize!"
1158 if test "$bigendian" = "yes" ; then
1159 output_sym "CONFIG_BIG_ENDIAN"
1161 output_sym "CONFIG_LITTLE_ENDIAN"
1163 if test "$zlib" = "yes" ; then
1164 output_sym "CONFIG_ZLIB"
1166 if test "$libaio" = "yes" ; then
1167 output_sym "CONFIG_LIBAIO"
1169 if test "$posix_aio" = "yes" ; then
1170 output_sym "CONFIG_POSIXAIO"
1172 if test "$posix_aio_fsync" = "yes" ; then
1173 output_sym "CONFIG_POSIXAIO_FSYNC"
1175 if test "$linux_fallocate" = "yes" ; then
1176 output_sym "CONFIG_LINUX_FALLOCATE"
1178 if test "$posix_fallocate" = "yes" ; then
1179 output_sym "CONFIG_POSIX_FALLOCATE"
1181 if test "$fdatasync" = "yes" ; then
1182 output_sym "CONFIG_FDATASYNC"
1184 if test "$sync_file_range" = "yes" ; then
1185 output_sym "CONFIG_SYNC_FILE_RANGE"
1187 if test "$sfaa" = "yes" ; then
1188 output_sym "CONFIG_SFAA"
1190 if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then
1191 output_sym "CONFIG_RDMA"
1193 if test "$clock_gettime" = "yes" ; then
1194 output_sym "CONFIG_CLOCK_GETTIME"
1196 if test "$clock_monotonic" = "yes" ; then
1197 output_sym "CONFIG_CLOCK_MONOTONIC"
1199 if test "$clock_monotonic_precise" = "yes" ; then
1200 output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE"
1202 if test "$gettimeofday" = "yes" ; then
1203 output_sym "CONFIG_GETTIMEOFDAY"
1205 if test "$posix_fadvise" = "yes" ; then
1206 output_sym "CONFIG_POSIX_FADVISE"
1208 if test "$linux_3arg_affinity" = "yes" ; then
1209 output_sym "CONFIG_3ARG_AFFINITY"
1210 elif test "$linux_2arg_affinity" = "yes" ; then
1211 output_sym "CONFIG_2ARG_AFFINITY"
1213 if test "$strsep" = "yes" ; then
1214 output_sym "CONFIG_STRSEP"
1216 if test "$strcasestr" = "yes" ; then
1217 output_sym "CONFIG_STRCASESTR"
1219 if test "$getopt_long_only" = "yes" ; then
1220 output_sym "CONFIG_GETOPT_LONG_ONLY"
1222 if test "$inet_aton" = "yes" ; then
1223 output_sym "CONFIG_INET_ATON"
1225 if test "$socklen_t" = "yes" ; then
1226 output_sym "CONFIG_SOCKLEN_T"
1228 if test "$ext4_me" = "yes" ; then
1229 output_sym "CONFIG_LINUX_EXT4_MOVE_EXTENT"
1231 if test "$linux_splice" = "yes" ; then
1232 output_sym "CONFIG_LINUX_SPLICE"
1234 if test "$guasi" = "yes" ; then
1235 output_sym "CONFIG_GUASI"
1237 if test "$fusion_aw" = "yes" ; then
1238 output_sym "CONFIG_FUSION_AW"
1240 if test "$libnuma_v2" = "yes" ; then
1241 output_sym "CONFIG_LIBNUMA"
1243 if test "$solaris_aio" = "yes" ; then
1244 output_sym "CONFIG_SOLARISAIO"
1246 if test "$tls_thread" = "yes" ; then
1247 output_sym "CONFIG_TLS_THREAD"
1249 if test "$rusage_thread" = "yes" ; then
1250 output_sym "CONFIG_RUSAGE_THREAD"
1252 if test "$gfio" = "yes" ; then
1253 echo "CONFIG_GFIO=y" >> $config_host_mak
1255 if test "$sched_idle" = "yes" ; then
1256 output_sym "CONFIG_SCHED_IDLE"
1258 if test "$tcp_nodelay" = "yes" ; then
1259 output_sym "CONFIG_TCP_NODELAY"
1261 if test "$rlimit_memlock" = "yes" ; then
1262 output_sym "CONFIG_RLIMIT_MEMLOCK"
1264 if test "$pwritev" = "yes" ; then
1265 output_sym "CONFIG_PWRITEV"
1267 if test "$ipv6" = "yes" ; then
1268 output_sym "CONFIG_IPV6"
1270 if test "$rbd" = "yes" ; then
1271 output_sym "CONFIG_RBD"
1274 echo "LIBS+=$LIBS" >> $config_host_mak
1275 echo "CFLAGS+=$CFLAGS" >> $config_host_mak
1276 echo "CC=$cc" >> $config_host_mak
1277 echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak