X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=e886bdc8c0705c4a7e2a69fd162977b49e64ae46;hp=2f5ac91fb45387b6f6139b2582c266996eca7214;hb=cffe80a41cbf9b26446c803177a27f7695f94a31;hpb=1487c122c651191b34d8f0b2ac1c6ee5cd343874 diff --git a/configure b/configure index 2f5ac91f..e886bdc8 100755 --- a/configure +++ b/configure @@ -142,7 +142,7 @@ check_min_lib_version() { fi : "${_feature:=${1}}" if "${cross_prefix}"pkg-config --version > /dev/null 2>&1; then - if eval "echo \$$_feature" = "yes" ; then + if test "$(eval echo \"\$$_feature\")" = "yes" ; then feature_not_found "$_feature" "$1 >= $2" fi else @@ -418,6 +418,7 @@ CYGWIN*) clock_monotonic="yes" sched_idle="yes" pthread_condattr_setclock="no" + pthread_affinity="no" ;; esac @@ -803,6 +804,29 @@ elif compile_prog "" "$LIBS -lpthread" "pthread_sigmask" ; then fi print_config "pthread_sigmask()" "$pthread_sigmask" +########################################## +# pthread_getaffinity_np() probe +if test "$pthread_getaffinity" != "yes" ; then + pthread_getaffinity="no" +fi +cat > $TMPC < /* NULL */ +#include /* pthread_sigmask() */ +#include +int main(void) +{ + cpu_set_t set; + return pthread_getaffinity_np(pthread_self(), sizeof(set), &set); +} +EOF +if compile_prog "" "$LIBS" "pthread_getaffinity" ; then + pthread_getaffinity="yes" +elif compile_prog "" "$LIBS -lpthread" "pthread_getaffinity" ; then + pthread_getaffinity="yes" + LIBS="$LIBS -lpthread" +fi +print_config "pthread_getaffinity_np()" "$pthread_getaffinity" + ########################################## # solaris aio probe if test "$solaris_aio" != "yes" ; then @@ -2823,6 +2847,9 @@ fi if test "$pthread_sigmask" = "yes" ; then output_sym "CONFIG_PTHREAD_SIGMASK" fi +if test "$pthread_getaffinity" = "yes" ; then + output_sym "CONFIG_PTHREAD_GETAFFINITY" +fi if test "$have_asprintf" = "yes" ; then output_sym "CONFIG_HAVE_ASPRINTF" fi