# Default CFLAGS
CFLAGS="-D_GNU_SOURCE -include config-host.h $CFLAGS"
+CONFIGURE_CFLAGS="-Werror-implicit-function-declaration"
BUILD_CFLAGS=""
# Print a helpful header at the top of config.log
}
compile_object() {
- do_cc $CFLAGS -Werror-implicit-function-declaration -c -o $TMPO $TMPC
+ do_cc $CFLAGS $CONFIGURE_CFLAGS -c -o $TMPO $TMPC
}
compile_prog() {
local_cflags="$1"
local_ldflags="$2 $LIBS"
echo "Compiling test case $3" >> config.log
- do_cc $CFLAGS -Werror-implicit-function-declaration $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
+ do_cc $CFLAGS $CONFIGURE_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
}
feature_not_found() {
libiscsi="no"
libnbd="no"
libzbc=""
+dfs=""
dynamic_engines="no"
prefix=/usr/local
;;
--dynamic-libengines) dynamic_engines="yes"
;;
+ --disable-dfs) dfs="no"
+ ;;
--help)
show_help="yes"
;;
echo "--disable-libzbc Disable libzbc even if found"
echo "--disable-tcmalloc Disable tcmalloc support"
echo "--dynamic-libengines Lib-based ioengines as dynamic libraries"
+ echo "--disable-dfs Disable DAOS File System support even if found"
exit $exit_val
fi
if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
cpu="x86_64"
fi
- # Error at compile time linking of weak/partial symbols if possible...
+ # Avoid configure feature detection of features provided by weak symbols
cat > $TMPC <<EOF
int main(void)
{
return 0;
}
EOF
- if compile_prog "" "-Wl,-no_weak_imports" "disable weak symbols"; then
- echo "Disabling weak symbols"
- LDFLAGS="$LDFLAGS -Wl,-no_weak_imports"
+ if compile_prog "" "-Werror=partial-availability" "error on weak symbols"; then
+ CONFIGURE_CFLAGS="$CONFIGURE_CFLAGS -Werror=partial-availability"
fi
;;
SunOS)
clock_gettime="yes" # clock_monotonic probe has dependency on this
clock_monotonic="yes"
sched_idle="yes"
+ pthread_condattr_setclock="no"
;;
esac
##########################################
# POSIX pthread_condattr_setclock() probe
-if test "$pthread_condattr_setclock" != "yes" ; then
- pthread_condattr_setclock="no"
-fi
-cat > $TMPC <<EOF
+if test "$pthread_condattr_setclock" != "no" ; then
+ cat > $TMPC <<EOF
#include <pthread.h>
int main(void)
{
return 0;
}
EOF
-if compile_prog "" "$LIBS" "pthread_condattr_setclock" ; then
- pthread_condattr_setclock=yes
-elif compile_prog "" "$LIBS -lpthread" "pthread_condattr_setclock" ; then
- pthread_condattr_setclock=yes
- LIBS="$LIBS -lpthread"
+ if compile_prog "" "$LIBS" "pthread_condattr_setclock" ; then
+ pthread_condattr_setclock=yes
+ elif compile_prog "" "$LIBS -lpthread" "pthread_condattr_setclock" ; then
+ pthread_condattr_setclock=yes
+ LIBS="$LIBS -lpthread"
+ fi
fi
print_config "pthread_condattr_setclock()" "$pthread_condattr_setclock"
int main(int argc, char **argv)
{
int rc;
- rc = pmem_is_pmem(NULL, NULL);
+ rc = pmem_is_pmem(NULL, 0);
return 0;
}
EOF
fi
print_config "NBD engine" "$libnbd"
+##########################################
+# check for dfs (DAOS File System)
+if test "$dfs" != "no" ; then
+ cat > $TMPC << EOF
+#include <fcntl.h>
+#include <daos.h>
+#include <daos_fs.h>
+
+int main(int argc, char **argv)
+{
+ daos_handle_t poh;
+ daos_handle_t coh;
+ dfs_t *dfs;
+
+ (void) dfs_mount(poh, coh, O_RDWR, &dfs);
+
+ return 0;
+}
+EOF
+ if compile_prog "" "-luuid -ldfs -ldaos" "dfs"; then
+ dfs="yes"
+ else
+ dfs="no"
+ fi
+fi
+print_config "DAOS File System (dfs) Engine" "$dfs"
+
##########################################
# Check if we have lex/yacc available
yacc="no"
##########################################
# check for timerfd support
timerfd_create="no"
+if test "$esx" != "yes" ; then
cat > $TMPC << EOF
#include <sys/time.h>
#include <sys/timerfd.h>
return timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
}
EOF
-if compile_prog "" "" "timerfd_create"; then
- timerfd_create="yes"
+ if compile_prog "" "" "timerfd_create"; then
+ timerfd_create="yes"
+ fi
fi
print_config "timerfd_create" "$timerfd_create"
if test "$clock_monotonic" = "yes" ; then
output_sym "CONFIG_CLOCK_MONOTONIC"
fi
-if test "$clock_monotonic_raw" = "yes" ; then
- output_sym "CONFIG_CLOCK_MONOTONIC_RAW"
-fi
-if test "$clock_monotonic_precise" = "yes" ; then
- output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE"
-fi
if test "$clockid_t" = "yes"; then
output_sym "CONFIG_CLOCKID_T"
fi
if test "$libcufile" = "yes" ; then
output_sym "CONFIG_LIBCUFILE"
fi
+if test "$dfs" = "yes" ; then
+ output_sym "CONFIG_DFS"
+fi
if test "$march_set" = "no" && test "$build_native" = "yes" ; then
output_sym "CONFIG_BUILD_NATIVE"
fi