X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=63aa02ddf6a42d53121407588a97830a454ef82a;hp=78a6ccb7e746aa2e272a68bccd96c8c821084034;hb=c0c4b1d42e39c2ea4cb2d58e5a17aec4b00263d9;hpb=ef07baa127a08a3de16f843c4dc3bd187bbd0af3 diff --git a/configure b/configure index 78a6ccb7..63aa02dd 100755 --- a/configure +++ b/configure @@ -130,9 +130,6 @@ output_sym() { targetos="" cpu="" -cross_prefix=${cross_prefix-${CROSS_COMPILE}} -cc="${CC-${cross_prefix}gcc}" - # default options show_help="no" exit_val=0 @@ -175,6 +172,9 @@ if test "$show_help" = "yes" ; then exit $exit_val fi +cross_prefix=${cross_prefix-${CROSS_COMPILE}} +cc="${CC-${cross_prefix}gcc}" + if check_define __ANDROID__ ; then targetos="Android" elif check_define __linux__ ; then @@ -184,6 +184,8 @@ elif check_define __OpenBSD__ ; then elif check_define __sun__ ; then targetos='SunOS' CFLAGS="$CFLAGS -D_REENTRANT" +elif check_define _WIN32 ; then + targetos='CYGWIN' else targetos=`uname -s` fi @@ -649,6 +651,22 @@ fi echo "sched_setaffinity(3 arg) $linux_3arg_affinity" echo "sched_setaffinity(2 arg) $linux_2arg_affinity" +########################################## +# CPU_COUNT test +cpu_count="no" +cat > $TMPC << EOF +#include +int main(int argc, char **argv) +{ + cpu_set_t mask; + return CPU_COUNT(&mask); +} +EOF +if compile_prog "" "" "cpu_count"; then + cpu_count="yes" +fi +echo "CPU_COUNT $cpu_count" + ########################################## # clock_gettime probe clock_gettime="no" @@ -1098,6 +1116,7 @@ ipv6="no" cat > $TMPC << EOF #include #include +#include #include #include int main(int argc, char **argv) @@ -1118,6 +1137,33 @@ if compile_prog "" "" "ipv6"; then fi echo "IPv6 helpers $ipv6" +########################################## +# check for rbd +rbd="no" +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + + rados_t cluster; + rados_ioctx_t io_ctx; + const char pool[] = "rbd"; + + int major, minor, extra; + rbd_version(&major, &minor, &extra); + + rados_ioctx_create(cluster, pool, &io_ctx); + return 0; +} +EOF +if compile_prog "" "-lrbd -lrados" "rbd"; then + LIBS="-lrbd -lrados $LIBS" + rbd="yes" +fi +echo "Rados Block Device engine $rbd" + + ############################################################################# if test "$wordsize" = "64" ; then @@ -1239,6 +1285,12 @@ fi if test "$ipv6" = "yes" ; then output_sym "CONFIG_IPV6" fi +if test "$rbd" = "yes" ; then + output_sym "CONFIG_RBD" +fi +if test "$cpu_count" = "yes" ; then + output_sym "CONFIG_CPU_COUNT" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "CFLAGS+=$CFLAGS" >> $config_host_mak