X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=6e549cdc859d63346c8009a9fa6e1055827af5fe;hp=5490e26ea70f2db55f86c2e49ec2f9f362568767;hb=9781c080385364d24ac18a95544484864a27611a;hpb=9a0ac6c7b69355ea095f06c6b0a08115c946dd61 diff --git a/configure b/configure index 5490e26e..6e549cdc 100755 --- a/configure +++ b/configure @@ -2272,6 +2272,60 @@ if test "$disable_native" = "no" && test "$disable_opt" != "yes" && \ fi print_config "Build march=native" "$build_native" +########################################## +# check for -lcunit +if test "$cunit" != "yes" ; then + cunit="no" +fi +cat > $TMPC << EOF +#include +#include +int main(void) +{ + if (CU_initialize_registry() != CUE_SUCCESS) + return CU_get_error(); + CU_basic_set_mode(CU_BRM_VERBOSE); + CU_basic_run_tests(); + CU_cleanup_registry(); + return CU_get_error(); +} +EOF +if compile_prog "" "-lcunit" "CUnit"; then + cunit="yes" +fi +print_config "CUnit" "$cunit" + +########################################## +# check for __kernel_rwf_t +__kernel_rwf_t="no" +cat > $TMPC << EOF +#include +int main(int argc, char **argv) +{ + __kernel_rwf_t x; + x = 0; + return x; +} +EOF +if compile_prog "" "" "__kernel_rwf_t"; then + __kernel_rwf_t="yes" +fi +print_config "__kernel_rwf_t" "$__kernel_rwf_t" + +########################################## +# check if gcc has -Wimplicit-fallthrough +fallthrough="no" +cat > $TMPC << EOF +int main(int argc, char **argv) +{ + return 0; +} +EOF +if compile_prog "-Wimplicit-fallthrough" "" "-Wimplicit-fallthrough"; then + fallthrough="yes" +fi +print_config "-Wimplicit-fallthrough" "$fallthrough" + ############################################################################# if test "$wordsize" = "64" ; then @@ -2537,6 +2591,15 @@ fi if test "$march_set" = "no" && test "$build_native" = "yes" ; then output_sym "CONFIG_BUILD_NATIVE" fi +if test "$cunit" = "yes" ; then + output_sym "CONFIG_HAVE_CUNIT" +fi +if test "$__kernel_rwf_t" = "yes"; then + output_sym "CONFIG_HAVE_KERNEL_RWF_T" +fi +if test "$fallthrough" = "yes"; then + CFLAGS="$CFLAGS -Wimplicit-fallthrough" +fi echo "LIBS+=$LIBS" >> $config_host_mak echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak