}
check_min_lib_version() {
- local feature=$3
+ _feature=$3
- if ${cross_prefix}pkg-config --atleast-version=$2 $1 > /dev/null 2>&1; then
+ if "${cross_prefix}"pkg-config --atleast-version="$2" "$1" > /dev/null 2>&1; then
return 0
fi
- : ${feature:=${1}}
- if ${cross_prefix}pkg-config --version > /dev/null 2>&1; then
- if test ${!feature} = "yes" ; then
- feature_not_found "$feature" "$1 >= $2"
+ : "${_feature:=${1}}"
+ if "${cross_prefix}"pkg-config --version > /dev/null 2>&1; then
+ if eval "echo \$$_feature" = "yes" ; then
+ feature_not_found "$_feature" "$1 >= $2"
fi
else
- print_config "$1" "missing pkg-config, can't check $feature version"
+ print_config "$1" "missing pkg-config, can't check $_feature version"
fi
return 1
}
return 0;
}
EOF
-if compile_prog "" "" "guasi"; then
+if compile_prog "" "-lguasi" "guasi"; then
guasi="yes"
fi
print_config "GUASI" "$guasi"
fi
cat > $TMPC << EOF
#include <libpmem.h>
+#include <stdlib.h>
int main(int argc, char **argv)
{
int rc;
- rc = pmem_is_pmem(0, 0);
+ rc = pmem_is_pmem(NULL, NULL);
return 0;
}
EOF
fi
print_config "libpmem" "$libpmem"
+##########################################
+# Check whether libpmem's version >= 1.5
+if test "$libpmem1_5" != "yes" ; then
+ libpmem1_5="no"
+fi
+if test "$libpmem" = "yes"; then
+ cat > $TMPC << EOF
+#include <libpmem.h>
+#include <stdlib.h>
+int main(int argc, char **argv)
+{
+ pmem_memcpy(NULL, NULL, NULL, NULL);
+ return 0;
+}
+EOF
+ if compile_prog "" "-lpmem" "libpmem1_5"; then
+ libpmem1_5="yes"
+ fi
+fi
+print_config "libpmem1_5" "$libpmem1_5"
+
##########################################
# Check whether we have libpmemblk
# libpmem is a prerequisite
fi
print_config "libpmemblk" "$libpmemblk"
-# Choose the ioengines
+# Choose libpmem-based ioengines
if test "$libpmem" = "yes" && test "$disable_pmem" = "no"; then
- pmem="yes"
devdax="yes"
+ if test "$libpmem1_5" = "yes"; then
+ pmem="yes"
+ fi
if test "$libpmemblk" = "yes"; then
pmemblk="yes"
fi