configure: remember to output CC for windows
[fio.git] / configure
CommitLineData
67bf9823
JA
1#!/bin/sh
2#
3# Fio configure script. Heavily influenced by the manual qemu configure
4# script. Sad this this is easier than autoconf and enemies.
5#
6
7# set temporary file name
8if test ! -z "$TMPDIR" ; then
9 TMPDIR1="${TMPDIR}"
10elif test ! -z "$TEMPDIR" ; then
11 TMPDIR1="${TEMPDIR}"
12else
13 TMPDIR1="/tmp"
14fi
15
16TMPC="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.c"
17TMPO="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.o"
18TMPE="${TMPDIR1}/fio-conf-${RANDOM}-$$-${RANDOM}.exe"
19
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>
22trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
23
24rm -rf config.log
25
26config_host_mak="config-host.mak"
27config_host_ld="config-host.ld"
28
29# Print a helpful header at the top of config.log
30echo "# FIO configure log $(date)" >> config.log
31printf "# Configured with:" >> config.log
32printf " '%s'" "$0" "$@" >> config.log
33echo >> config.log
34echo "#" >> config.log
35
36do_cc() {
37 # Run the compiler, capturing its output to the log.
38 echo $cc "$@" >> config.log
39 $cc "$@" >> config.log 2>&1 || return $?
40 # Test passed. If this is an --enable-werror build, rerun
41 # the test with -Werror and bail out if it fails. This
42 # makes warning-generating-errors in configure test code
43 # obvious to developers.
44 if test "$werror" != "yes"; then
45 return 0
46 fi
47 # Don't bother rerunning the compile if we were already using -Werror
48 case "$*" in
49 *-Werror*)
50 return 0
51 ;;
52 esac
53 echo $cc -Werror "$@" >> config.log
54 $cc -Werror "$@" >> config.log 2>&1 && return $?
55 echo "ERROR: configure test passed without -Werror but failed with -Werror."
56 echo "This is probably a bug in the configure script. The failing command"
57 echo "will be at the bottom of config.log."
58 echo "You can run configure with --disable-werror to bypass this check."
59 exit 1
60}
61
62compile_object() {
63 do_cc $CFLAGS -c -o $TMPO $TMPC
64}
65
66compile_prog() {
67 local_cflags="$1"
68 local_ldflags="$2"
69 echo "Compiling test case $3" >> config.log
70 do_cc $CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
71}
72
73feature_not_found() {
74 feature=$1
75
76 echo "ERROR"
77 echo "ERROR: User requested feature $feature"
78 echo "ERROR: configure was not able to find it"
79 echo "ERROR"
80 exit 1;
81}
82
83has() {
84 type "$1" >/dev/null 2>&1
85}
86
87check_define() {
88 cat > $TMPC <<EOF
89#if !defined($1)
90#error $1 not defined
91#endif
92int main(void)
93{
94 return 0;
95}
96EOF
97 compile_object
98}
99
100targetos=""
101cpu=""
102
103cc="${CC-${cross_prefix}gcc}"
104
cb1125b0
JA
105# parse options
106for opt do
107 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
108 case "$opt" in
109 --cc=*) CC="$optarg"
110 ;;
111 *)
112 echo "Bad option $opt"
113 exit 1
114 esac
115done
116
67bf9823
JA
117if check_define __linux__ ; then
118 targetos="Linux"
cb1125b0 119elif check_define _WIN32 ; then
9793a6de 120 echo "Forcing known good options on Windows"
9793a6de
BC
121 echo "CONFIG_64BIT_LLP64=y" >> $config_host_mak
122 echo "CONFIG_CLOCK_GETTIME=y" >> $config_host_mak
123 echo "CONFIG_CLOCK_MONOTONIC=y" >> $config_host_mak
124 echo "CONFIG_GETTIMEOFDAY=y" >> $config_host_mak
125 echo "CONFIG_FADVISE=y" >> $config_host_mak
126 echo "CONFIG_STRSEP=y" >> $config_host_mak
127 echo "CONFIG_SOCKLEN_T=y" >> $config_host_mak
128 echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak
129 echo "CONFIG_FADVISE=y" >> $config_host_mak
130 echo "CONFIG_SFAA=y" >> $config_host_mak
c9e55aee 131 echo "CC=$cc" >> $config_host_mak
51e00d7a 132 exit 0
67bf9823
JA
133elif check_define __OpenBSD__ ; then
134 targetos='OpenBSD'
135elif check_define __sun__ ; then
136 targetos='SunOS'
137else
138 targetos=`uname -s`
139fi
140
141# Some host OSes need non-standard checks for which CPU to use.
142# Note that these checks are broken for cross-compilation: if you're
143# cross-compiling to one of these OSes then you'll need to specify
144# the correct CPU with the --cpu option.
145case $targetos in
146Darwin)
147 # on Leopard most of the system is 32-bit, so we have to ask the kernel if
148 # we can run 64-bit userspace code.
149 # If the user didn't specify a CPU explicitly and the kernel says this is
150 # 64 bit hw, then assume x86_64. Otherwise fall through to the usual
151 # detection code.
152 if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
153 cpu="x86_64"
154 fi
155 ;;
156SunOS)
157 # `uname -m` returns i86pc even on an x86_64 box, so default based on isainfo
158 if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
159 cpu="x86_64"
160 fi
161esac
162
163if test ! -z "$cpu" ; then
164 # command line argument
165 :
166elif check_define __i386__ ; then
167 cpu="i386"
168elif check_define __x86_64__ ; then
169 cpu="x86_64"
170elif check_define __sparc__ ; then
171 if check_define __arch64__ ; then
172 cpu="sparc64"
173 else
174 cpu="sparc"
175 fi
176elif check_define _ARCH_PPC ; then
177 if check_define _ARCH_PPC64 ; then
178 cpu="ppc64"
179 else
180 cpu="ppc"
181 fi
182elif check_define __mips__ ; then
183 cpu="mips"
184elif check_define __ia64__ ; then
185 cpu="ia64"
186elif check_define __s390__ ; then
187 if check_define __s390x__ ; then
188 cpu="s390x"
189 else
190 cpu="s390"
191 fi
192elif check_define __arm__ ; then
193 cpu="arm"
194elif check_define __hppa__ ; then
195 cpu="hppa"
196else
197 cpu=`uname -m`
198fi
199
200# Normalise host CPU name and set ARCH.
201case "$cpu" in
202 ia64|ppc|ppc64|s390|s390x|sparc64)
203 cpu="$cpu"
204 ;;
205 i386|i486|i586|i686|i86pc|BePC)
206 cpu="i386"
207 ;;
208 x86_64|amd64)
209 cpu="x86_64"
210 ;;
211 armv*b|armv*l|arm)
212 cpu="arm"
213 ;;
214 hppa|parisc|parisc64)
215 cpu="hppa"
216 ;;
217 mips*)
218 cpu="mips"
219 ;;
220 sparc|sun4[cdmuv])
221 cpu="sparc"
222 ;;
223 *)
224 echo "Unknown CPU"
225 exit 1;
226 ;;
227esac
228
229if test -z $CC; then
230 if test "$targetos" = "FreeBSD"; then
231 if has clang; then
232 CC=clang
233 else
234 CC=gcc
235 fi
67bf9823
JA
236 fi
237fi
238
239cc="${CC-${cross_prefix}gcc}"
240
241echo "Operating system $targetos"
242echo "CPU $cpu"
243echo "Compiler $cc"
244echo
245
246##########################################
247# check for wordsize
248wordsize="0"
249cat > $TMPC <<EOF
250#include <stdio.h>
251int main(void)
252{
253 unsigned int wsize = sizeof(long) * 8;
254 printf("%d\n", wsize);
255 return 0;
256}
257EOF
258if compile_prog "" "" "wordsize"; then
259 wordsize=$($TMPE)
260fi
261echo "Wordsize $wordsize"
262
263##########################################
264# linux-aio probe
265libaio="no"
266cat > $TMPC <<EOF
267#include <libaio.h>
268#include <stddef.h>
269int main(void)
270{
271 io_setup(0, NULL);
272 return 0;
273}
274EOF
275if compile_prog "" "-laio" "libaio" ; then
276 libaio=yes
277 LIBS="-laio $LIBS"
278else
279 if test "$libaio" = "yes" ; then
280 feature_not_found "linux AIO"
281 fi
282 libaio=no
283fi
284echo "Linux AIO support $libaio"
285
286##########################################
287# posix aio probe
288posix_aio="no"
289posix_aio_lrt="no"
290cat > $TMPC <<EOF
291#include <aio.h>
292int main(void)
293{
294 struct aiocb cb;
295 aio_read(&cb);
296 return 0;
297}
298EOF
299if compile_prog "" "" "posixaio" ; then
300 posix_aio="yes"
301elif compile_prog "" "-lrt" "posixaio"; then
302 posix_aio="yes"
303 posix_aio_lrt="yes"
304 LIBS="-lrt $LIBS"
305fi
306echo "POSIX AIO support $posix_aio"
307echo "POSIX AIO support needs -lrt $posix_aio_lrt"
308
309##########################################
310# posix aio fsync probe
311posix_aio_fsync="no"
312if test "$posix_aio" = "yes" ; then
313 cat > $TMPC <<EOF
314#include <fcntl.h>
315#include <aio.h>
316int main(void)
317{
318 struct aiocb cb;
319 return aio_fsync(O_SYNC, &cb);
320 return 0;
321}
322EOF
323 if compile_prog "" "$LIBS" "posix_aio_fsync" ; then
324 posix_aio_fsync=yes
325 fi
326fi
327echo "POSIX AIO fsync $posix_aio_fsync"
328
329##########################################
330# solaris aio probe
331solaris_aio="no"
332cat > $TMPC <<EOF
333#include <sys/types.h>
334#include <sys/asynch.h>
335#include <unistd.h>
336int main(void)
337{
338 aio_result_t res;
339 return aioread(0, NULL, 0, 0, SEEK_SET, &res);
340 return 0;
341}
342EOF
343if compile_prog "" "-laio" "solarisaio" ; then
344 solaris_aio=yes
345 LIBS="-laio $LIBS"
346fi
347echo "Solaris AIO support $solaris_aio"
348
349##########################################
350# __sync_fetch_and_and test
351sfaa="no"
352cat > $TMPC << EOF
353static int sfaa(int *ptr)
354{
355 return __sync_fetch_and_and(ptr, 0);
356}
357
358int main(int argc, char **argv)
359{
360 int val = 42;
361 sfaa(&val);
362 return val;
363}
364EOF
365if compile_prog "" "" "__sync_fetch_and_add()" ; then
366 sfaa="yes"
367fi
368echo "__sync_fetch_and add $sfaa"
369
370##########################################
371# libverbs probe
372libverbs="no"
373cat > $TMPC << EOF
374#include <stdio.h>
375#include <infiniband/arch.h>
376int main(int argc, char **argv)
377{
378 struct ibv_pd *pd = ibv_alloc_pd(NULL);
379 return 0;
380}
381EOF
382if compile_prog "" "-libverbs" "libverbs" ; then
383 libverbs="yes"
384 LIBS="-libverbs $LIBS"
385fi
386echo "libverbs $libverbs"
387
388##########################################
389# rdmacm probe
390rdmacm="no"
391cat > $TMPC << EOF
392#include <stdio.h>
393#include <rdma/rdma_cma.h>
394int main(int argc, char **argv)
395{
396 rdma_destroy_qp(NULL);
397 return 0;
398}
399EOF
400if compile_prog "" "-lrdmacm" "rdma"; then
401 rdmacm="yes"
402 LIBS="-lrdmacm $LIBS"
403fi
404echo "rdmacm $rdmacm"
405
406##########################################
407# Linux fallocate probe
408linux_fallocate="no"
409cat > $TMPC << EOF
410#include <stdio.h>
411#include <linux/falloc.h>
412int main(int argc, char **argv)
413{
414 int r = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 1024);
415 return r;
416}
417EOF
418if compile_prog "" "" "linux_fallocate"; then
419 linux_fallocate="yes"
420fi
421echo "Linux fallocate $linux_fallocate"
422
423##########################################
424# POSIX fadvise probe
425posix_fadvise="no"
426cat > $TMPC << EOF
427#include <stdio.h>
428#include <fcntl.h>
429int main(int argc, char **argv)
430{
431 int r = posix_fadvise(0, 0, 0, POSIX_FADV_NORMAL);
432 return r;
433}
434EOF
435if compile_prog "" "" "posix_fadvise"; then
436 posix_fadvise="yes"
437fi
438echo "POSIX fadvise $posix_fadvise"
439
440##########################################
441# POSIX fallocate probe
442posix_fallocate="no"
443cat > $TMPC << EOF
444#include <stdio.h>
445#include <fcntl.h>
446int main(int argc, char **argv)
447{
448 int r = posix_fallocate(0, 0, 1024);
449 return r;
450}
451EOF
452if compile_prog "" "" "posix_fallocate"; then
453 posix_fallocate="yes"
454fi
455echo "POSIX fallocate $posix_fallocate"
456
457##########################################
458# sched_set/getaffinity 2 or 3 argument test
459linux_2arg_affinity="no"
460linux_3arg_affinity="no"
461cat > $TMPC << EOF
462#define _GNU_SOURCE
463#include <sched.h>
464int main(int argc, char **argv)
465{
466 cpu_set_t mask;
467 return sched_setaffinity(0, sizeof(mask), &mask);
468}
469EOF
470if compile_prog "" "" "sched_setaffinity(,,)"; then
471 linux_3arg_affinity="yes"
472else
473 cat > $TMPC << EOF
474#define _GNU_SOURCE
475#include <sched.h>
476int main(int argc, char **argv)
477{
478 cpu_set_t mask;
479 return sched_setaffinity(0, &mask);
480}
481EOF
482 if compile_prog "" "" "sched_setaffinity(,)"; then
483 linux_2arg_affinity="yes"
484 fi
485fi
486echo "sched_setaffinity(3 arg) $linux_3arg_affinity"
487echo "sched_setaffinity(2 arg) $linux_2arg_affinity"
488
489##########################################
490# clock_gettime probe
491clock_gettime="no"
492cat > $TMPC << EOF
493#include <stdio.h>
494#include <time.h>
495int main(int argc, char **argv)
496{
497 return clock_gettime(0, NULL);
498}
499EOF
500if compile_prog "" "" "clock_gettime"; then
501 clock_gettime="yes"
502elif compile_prog "" "-lrt" "clock_gettime"; then
503 clock_gettime="yes"
504 LIBS="-lrt $LIBS"
505fi
506echo "clock_gettime $clock_gettime"
507
508##########################################
509# CLOCK_MONOTONIC probe
510clock_monotonic="no"
511if test "$clock_gettime" = "yes" ; then
512 cat > $TMPC << EOF
513#include <stdio.h>
514#include <time.h>
515int main(int argc, char **argv)
516{
517 return clock_gettime(CLOCK_MONOTONIC, NULL);
518}
519EOF
520 if compile_prog "" "$LIBS" "clock monotonic"; then
521 clock_monotonic="yes"
522 fi
523fi
524echo "CLOCK_MONOTONIC $clock_monotonic"
525
526##########################################
527# CLOCK_MONOTONIC_PRECISE probe
528clock_monotonic_precise="no"
529if test "$clock_gettime" = "yes" ; then
530 cat > $TMPC << EOF
531#include <stdio.h>
532#include <time.h>
533int main(int argc, char **argv)
534{
535 return clock_gettime(CLOCK_MONOTONIC_PRECISE, NULL);
536}
537EOF
538 if compile_prog "" "$LIBS" "clock monotonic precise"; then
539 clock_monotonic_precise="yes"
540 fi
541fi
542echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
543
544##########################################
545# gettimeofday() probe
546gettimeofday="no"
547cat > $TMPC << EOF
548#include <sys/time.h>
549#include <stdio.h>
550int main(int argc, char **argv)
551{
552 struct timeval tv;
553 return gettimeofday(&tv, NULL);
554}
555EOF
556if compile_prog "" "" "gettimeofday"; then
557 gettimeofday="yes"
558fi
559echo "gettimeofday $gettimeofday"
560
561##########################################
562# fdatasync() probe
563fdatasync="no"
564cat > $TMPC << EOF
565#include <stdio.h>
566#include <unistd.h>
567int main(int argc, char **argv)
568{
569 return fdatasync(0);
570}
571EOF
572if compile_prog "" "" "fdatasync"; then
573 fdatasync="yes"
574fi
575echo "fdatasync $fdatasync"
576
577##########################################
578# sync_file_range() probe
579sync_file_range="no"
580cat > $TMPC << EOF
581#include <stdio.h>
582#include <unistd.h>
583#define _GNU_SOURCE
584#include <fcntl.h>
585#include <linux/fs.h>
586int main(int argc, char **argv)
587{
588 unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE |
589 SYNC_FILE_RANGE_WAIT_AFTER;
590 return sync_file_range(0, 0, 0, flags);
591}
592EOF
593if compile_prog "" "" "sync_file_range"; then
594 sync_file_range="yes"
595fi
596echo "sync_file_range $sync_file_range"
597
598##########################################
599# ext4 move extent probe
600ext4_me="no"
601cat > $TMPC << EOF
602#include <fcntl.h>
603#include <sys/ioctl.h>
604int main(int argc, char **argv)
605{
606 struct move_extent me;
607 return ioctl(0, EXT4_IOC_MOVE_EXT, &me);
608}
609EOF
c7165b8d
JA
610if compile_prog "" "" "ext4 move extent" ; then
611 ext4_me="yes"
612elif test $targetos = "Linux" ; then
613 # On Linux, just default to it on and let it error at runtime if we really
614 # don't have it. None of my updated systems have it defined, but it does
615 # work. Takes a while to bubble back.
67bf9823
JA
616 ext4_me="yes"
617fi
618echo "EXT4 move extent $ext4_me"
619
620##########################################
621# splice probe
622linux_splice="no"
623cat > $TMPC << EOF
624#define _GNU_SOURCE
625#include <stdio.h>
626#include <fcntl.h>
627int main(int argc, char **argv)
628{
629 return splice(0, NULL, 0, NULL, 0, SPLICE_F_NONBLOCK);
630}
631EOF
632if compile_prog "" "" "linux splice"; then
633 linux_splice="yes"
634fi
635echo "Linux splice(2) $linux_splice"
636
637##########################################
638# GUASI probe
639guasi="no"
640cat > $TMPC << EOF
641#include <guasi.h>
642#include <guasi_syscalls.h>
643int main(int argc, char **argv)
644{
645 guasi_t ctx = guasi_create(0, 0, 0);
646 return 0;
647}
648EOF
649if compile_prog "" "" "guasi"; then
650 guasi="yes"
651fi
652echo "GUASI $guasi"
653
654##########################################
655# fusion-aw probe
656fusion_aw="no"
657cat > $TMPC << EOF
99db6564 658#include <nvm/vectored_write.h>
67bf9823
JA
659int main(int argc, char **argv)
660{
661 struct vsl_iovec iov;
662 return vsl_vectored_write(0, &iov, 0, O_ATOMIC);
663}
664EOF
99db6564
JA
665if compile_prog "" "-L/usr/lib/fio -lnvm-primitives" "fusion-aw"; then
666 LIBS="-L/usr/lib/fio -lnvm-primitives $LIBS"
67bf9823
JA
667 fusion_aw="yes"
668fi
669echo "Fusion-io atomic engine $fusion_aw"
670
671##########################################
672# libnuma probe
673libnuma="no"
674cat > $TMPC << EOF
675#include <numa.h>
676int main(int argc, char **argv)
677{
678 return numa_available();
679}
680EOF
681if compile_prog "" "-lnuma" "libnuma"; then
682 libnuma="yes"
683 LIBS="-lnuma $LIBS"
684fi
685echo "libnuma $libnuma"
686
687##########################################
688# strsep() probe
689strsep="no"
690cat > $TMPC << EOF
691#include <string.h>
692int main(int argc, char **argv)
693{
694 strsep(NULL, NULL);
695 return 0;
696}
697EOF
698if compile_prog "" "" "strsep"; then
699 strsep="yes"
700fi
701echo "strsep $strsep"
702
703##########################################
704# getopt_long_only() probe
705getopt_long_only="no"
706cat > $TMPC << EOF
707#include <unistd.h>
708#include <stdio.h>
709int main(int argc, char **argv)
710{
711 int c = getopt_long_only(argc, argv, NULL, NULL, NULL);
712 return c;
713}
714EOF
715if compile_prog "" "" "getopt_long_only"; then
716 getopt_long_only="yes"
717fi
718echo "getopt_long_only() $getopt_long_only"
719
720##########################################
721# inet_aton() probe
722inet_aton="no"
723cat > $TMPC << EOF
724#include <sys/socket.h>
725#include <arpa/inet.h>
726#include <stdio.h>
727int main(int argc, char **argv)
728{
729 struct in_addr in;
730 return inet_aton(NULL, &in);
731}
732EOF
733if compile_prog "" "" "inet_aton"; then
734 inet_aton="yes"
735fi
736echo "inet_aton $inet_aton"
737
738##########################################
739# socklen_t probe
740socklen_t="no"
741cat > $TMPC << EOF
742#include <string.h>
743#include <netinet/in.h>
744int main(int argc, char **argv)
745{
746 socklen_t len = 0;
747 return len;
748}
749EOF
750if compile_prog "" "" "socklen_t"; then
751 socklen_t="yes"
752fi
753echo "socklen_t $socklen_t"
754
755##########################################
756# Whether or not __thread is supported for TLS
757tls_thread="no"
758cat > $TMPC << EOF
759#include <stdio.h>
760static int __thread ret;
761int main(int argc, char **argv)
762{
763 return ret;
764}
765EOF
766if compile_prog "" "" "__thread"; then
767 tls_thread="yes"
768fi
769echo "__thread $tls_thread"
770
771#############################################################################
772
773echo "# Automatically generated by configure - do not modify" > $config_host_mak
774printf "# Configured with:" >> $config_host_mak
775printf " '%s'" "$0" "$@" >> $config_host_mak
776echo >> $config_host_mak
777
778if test "$wordsize" = "64" ; then
779 echo "CONFIG_64BIT=y" >> $config_host_mak
780elif test "$wordsize" = "32" ; then
781 echo "CONFIG_32BIT=y" >> $config_host_mak
782else
783 echo "Unknown wordsize!"
784 exit 1
785fi
786if test "$libaio" = "yes" ; then
787 echo "CONFIG_LIBAIO=y" >> $config_host_mak
788fi
789if test "$posix_aio" = "yes" ; then
790 echo "CONFIG_POSIXAIO=y" >> $config_host_mak
791fi
792if test "$posix_aio_fsync" = "yes" ; then
793 echo "CONFIG_POSIXAIO_FSYNC=y" >> $config_host_mak
794fi
795if test "$linux_fallocate" = "yes" ; then
796 echo "CONFIG_LINUX_FALLOCATE=y" >> $config_host_mak
797fi
798if test "$posix_fallocate" = "yes" ; then
799 echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak
800fi
801if test "$fdatasync" = "yes" ; then
802 echo "CONFIG_FDATASYNC=y" >> $config_host_mak
803fi
804if test "$sync_file_range" = "yes" ; then
805 echo "CONFIG_SYNC_FILE_RANGE=y" >> $config_host_mak
806fi
807if test "$sfaa" = "yes" ; then
808 echo "CONFIG_SFAA=y" >> $config_host_mak
809fi
810if test "$libverbs" = "yes" -o "rdmacm" = "yes" ; then
811 echo "CONFIG_RDMA=y" >> $config_host_mak
812fi
813if test "$clock_gettime" = "yes" ; then
814 echo "CONFIG_CLOCK_GETTIME=y" >> $config_host_mak
815fi
816if test "$clock_monotonic" = "yes" ; then
817 echo "CONFIG_CLOCK_MONOTONIC=y" >> $config_host_mak
818fi
819if test "$clock_monotonic_precise" = "yes" ; then
820 echo "CONFIG_CLOCK_MONOTONIC_PRECISE=y" >> $config_host_mak
821fi
822if test "$gettimeofday" = "yes" ; then
823 echo "CONFIG_GETTIMEOFDAY=y" >> $config_host_mak
824fi
825if test "$posix_fadvise" = "yes" ; then
826 echo "CONFIG_POSIX_FADVISE=y" >> $config_host_mak
827fi
828if test "$linux_3arg_affinity" = "yes" ; then
829 echo "CONFIG_3ARG_AFFINITY=y" >> $config_host_mak
830elif test "$linux_2arg_affinity" = "yes" ; then
831 echo "CONFIG_2ARG_AFFINITY=y" >> $config_host_mak
832fi
833if test "$strsep" = "yes" ; then
834 echo "CONFIG_STRSEP=y" >> $config_host_mak
835fi
836if test "$getopt_long_only" = "yes" ; then
837 echo "CONFIG_GETOPT_LONG_ONLY=y" >> $config_host_mak
838fi
839if test "$inet_aton" = "yes" ; then
840 echo "CONFIG_INET_ATON=y" >> $config_host_mak
841fi
842if test "$socklen_t" = "yes" ; then
843 echo "CONFIG_SOCKLEN_T=y" >> $config_host_mak
844fi
845if test "$ext4_me" = "yes" ; then
846 echo "CONFIG_LINUX_EXT4_MOVE_EXTENT=y" >> $config_host_mak
847fi
848if test "$linux_splice" = "yes" ; then
849 echo "CONFIG_LINUX_SPLICE=y" >> $config_host_mak
850fi
851if test "$guasi" = "yes" ; then
852 echo "CONFIG_GUASI=y" >> $config_host_mak
853fi
854if test "$fusion_aw" = "yes" ; then
855 echo "CONFIG_FUSION_AW=y" >> $config_host_mak
856fi
857if test "$libnuma" = "yes" ; then
858 echo "CONFIG_LIBNUMA=y" >> $config_host_mak
859fi
860if test "$solaris_aio" = "yes" ; then
861 echo "CONFIG_SOLARISAIO=y" >> $config_host_mak
862fi
863if test "$tls_thread" = "yes" ; then
864 echo "CONFIG_TLS_THREAD=y" >> $config_host_mak
865fi
866
867echo "LIBS+=$LIBS" >> $config_host_mak
868echo "CC=$cc" >> $config_host_mak