X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=38706a9263d289d7ae06592fdb26bd176d72f690;hp=ddf03a6b8e1b12faddb1f4a9310d30d45214dac7;hb=4fe721ac83e84df7c6be07394d1963fd1ec5d9a6;hpb=d3d378218e9e03411749b65451b32d7a7466ff61 diff --git a/configure b/configure index ddf03a6b..38706a92 100755 --- a/configure +++ b/configure @@ -600,7 +600,7 @@ int main(void) EOF if compile_prog "" "" "posixaio" ; then posix_aio="yes" -elif compile_prog "" "-lrt" "posixaio"; then +elif compile_prog "" "-lrt" "posixaio -lrt"; then posix_aio="yes" posix_aio_lrt="yes" LIBS="-lrt $LIBS" @@ -783,6 +783,40 @@ if test "$disable_rdma" != "yes" && compile_prog "" "-lrdmacm" "rdma"; then fi print_config "rdmacm" "$rdmacm" +########################################## +# asprintf() and vasprintf() probes +if test "$have_asprintf" != "yes" ; then + have_asprintf="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + return asprintf(NULL, "%s", "str") == 0; +} +EOF +if compile_prog "" "" "have_asprintf"; then + have_asprintf="yes" +fi +print_config "asprintf()" "$have_asprintf" + +if test "$have_vasprintf" != "yes" ; then + have_vasprintf="no" +fi +cat > $TMPC << EOF +#include + +int main(int argc, char **argv) +{ + return vasprintf(NULL, "%s", NULL) == 0; +} +EOF +if compile_prog "" "" "have_vasprintf"; then + have_vasprintf="yes" +fi +print_config "vasprintf()" "$have_vasprintf" + ########################################## # Linux fallocate probe if test "$linux_fallocate" != "yes" ; then @@ -2074,18 +2108,23 @@ if test "$march_armv8_a_crc_crypto" != "yes" ; then fi if test "$cpu" = "arm64" ; then cat > $TMPC < #include #include +#include int main(void) { - return 0; + /* Can we also do a runtime probe? */ +#if __linux__ + return getauxval(AT_HWCAP); +#else +# error "Don't know how to do runtime probe for ARM CRC32c" +#endif } EOF - if compile_prog "-march=armv8-a+crc+crypto" "" ""; then + if compile_prog "-march=armv8-a+crc+crypto" "" "ARM CRC32c"; then march_armv8_a_crc_crypto="yes" - CFLAGS="$CFLAGS -march=armv8-a+crc+crypto -DARCH_HAVE_CRC_CRYPTO" + CFLAGS="$CFLAGS -march=armv8-a+crc+crypto" march_set="yes" fi fi @@ -2169,6 +2208,12 @@ fi if test "$posix_pshared" = "yes" ; then output_sym "CONFIG_PSHARED" fi +if test "$have_asprintf" = "yes" ; then + output_sym "HAVE_ASPRINTF" +fi +if test "$have_vasprintf" = "yes" ; then + output_sym "HAVE_VASPRINTF" +fi if test "$linux_fallocate" = "yes" ; then output_sym "CONFIG_LINUX_FALLOCATE" fi @@ -2381,6 +2426,9 @@ if test "$zlib" = "no" ; then echo "Note that some distros have separate packages for static libraries." fi fi +if test "$march_armv8_a_crc_crypto" = "yes" ; then + output_sym "ARCH_HAVE_CRC_CRYPTO" +fi if test "$cuda" = "yes" ; then output_sym "CONFIG_CUDA" fi