@@ -19,6 +19,17 @@ AM_INIT_AUTOMAKE([check-news dist-bzip2 gnu no-define foreign subdir-objects])
1919m4_ifdef ( [ AM_SILENT_RULES ] , [ AM_SILENT_RULES ([ yes] )] )
2020AM_MAINTAINER_MODE
2121
22+ # Check for system-specific stuff
23+ case "${host_os}" in
24+ *linux*)
25+ ;;
26+ *darwin*)
27+ CPPFLAGS="${CPPFLAGS} -D_DARWIN_C_SOURCE"
28+ ;;
29+ *)
30+ ;;
31+ esac
32+
2233# Checks for programs
2334
2435# We can't do anything without a working MPI
@@ -39,7 +50,7 @@ AC_CHECK_HEADERS([fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/
3950AC_TYPE_SIZE_T
4051
4152# Checks for library functions.
42- AC_CHECK_FUNCS ( [ getpagesize gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname statfs statvfs] )
53+ AC_CHECK_FUNCS ( [ sysconf gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname statfs statvfs] )
4354AC_SEARCH_LIBS ( [ sqrt] , [ m] , [ ] ,
4455 [ AC_MSG_ERROR ( [ Math library not found] ) ] )
4556
@@ -65,19 +76,33 @@ AS_IF([test "$ac_cv_header_gpfs_h" = "yes" -o "$ac_cv_header_gpfs_fcntl_h" = "ye
6576# Check for system capabilities
6677AC_SYS_LARGEFILE
6778
79+ AC_DEFINE ( [ _XOPEN_SOURCE] , [ 700] , [ C99 compatibility] )
80+
6881# Check for lustre availability
6982AC_ARG_WITH ( [ lustre] ,
7083 [ AS_HELP_STRING ( [ --with-lustre] ,
7184 [ support configurable Lustre striping values @<:@ default=check@:>@ ] ) ] ,
7285 [ ] , [ with_lustre=check] )
73- AS_IF ( [ test "x$with_lustre" != xno ] , [
86+ AS_IF ( [ test "x$with_lustre" = xyes ] , [
7487 AC_CHECK_HEADERS ( [ linux/lustre/lustre_user.h lustre/lustre_user.h] , break , [
7588 if test "x$with_lustre" != xcheck -a \
7689 "x$ac_cv_header_linux_lustre_lustre_user_h" = "xno" -a \
7790 "x$ac_cv_header_lustre_lustre_user_h" = "xno" ; then
7891 AC_MSG_FAILURE ( [ --with-lustre was given, <lustre/lustre_user.h> not found] )
7992 fi
8093 ] )
94+ AC_CHECK_HEADERS ( [ linux/lustre/lustreapi.h lustre/lustreapi.h] ,
95+ [ AC_DEFINE ( [ HAVE_LUSTRE_LUSTREAPI] , [ ] , [ Lustre user API available in some shape or form] ) ] , [
96+ if test "x$with_lustre" != xcheck -a \
97+ "x$ac_cv_header_linux_lustre_lustreapi_h" = "xno" -a \
98+ "x$ac_cv_header_lustre_lustreapi_h" = "xno" ; then
99+ AC_MSG_FAILURE ( [ --with-lustre was given, <lustre/lustreapi.h> not found] )
100+ fi
101+ ] )
102+ ] )
103+ AM_CONDITIONAL([ WITH_LUSTRE] , [ test x$with_lustre = xyes] )
104+ AM_COND_IF([ WITH_LUSTRE] ,[
105+ AC_DEFINE ( [ WITH_LUSTRE] , [ ] , [ Build wth LUSTRE backend] )
81106] )
82107
83108# IME (DDN's Infinite Memory Engine) support
@@ -172,7 +197,75 @@ AM_COND_IF([USE_RADOS_AIORI],[
172197 AC_DEFINE ( [ USE_RADOS_AIORI] , [ ] , [ Build RADOS backend AIORI] )
173198] )
174199
200+ # CEPHFS support
201+ AC_ARG_WITH ( [ cephfs] ,
202+ [ AS_HELP_STRING ( [ --with-cephfs] ,
203+ [ support IO with libcephfs backend @<:@ default=no@:>@ ] ) ] ,
204+ [ ] ,
205+ [ with_cephfs=no] )
206+ AS_IF ( [ test "x$with_cephfs" != xno] , [
207+ CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -std=gnu11"
208+ ] )
209+ AM_CONDITIONAL([ USE_CEPHFS_AIORI] , [ test x$with_cephfs = xyes] )
210+ AM_COND_IF([ USE_CEPHFS_AIORI] ,[
211+ AC_DEFINE ( [ USE_CEPHFS_AIORI] , [ ] , [ Build CEPHFS backend AIORI] )
212+ ] )
175213
214+ # DAOS Backends (DAOS and DFS) IO support require DAOS and CART/GURT
215+ AC_ARG_WITH ( [ cart] ,
216+ [ AS_HELP_STRING ( [ --with-cart] ,
217+ [ support IO with DAOS backends @<:@ default=no@:>@ ] ) ] ,
218+ [ ] , [ with_daos=no] )
219+
220+ AS_IF ( [ test "x$with_cart" != xno] , [
221+ CART="yes"
222+ LDFLAGS="$LDFLAGS -L$with_cart/lib64 -Wl,--enable-new-dtags -Wl,-rpath=$with_cart/lib64"
223+ LDFLAGS="$LDFLAGS -L$with_cart/lib -Wl,--enable-new-dtags -Wl,-rpath=$with_cart/lib"
224+ CPPFLAGS="$CPPFLAGS -I$with_cart/include/"
225+ AC_CHECK_HEADERS ( gurt/common.h ,, [ unset CART] )
226+ AC_CHECK_LIB ( [ gurt] , [ d_hash_murmur64] ,, [ unset CART] )
227+ ] )
228+
229+ AC_ARG_WITH ( [ daos] ,
230+ [ AS_HELP_STRING ( [ --with-daos] ,
231+ [ support IO with DAOS backends @<:@ default=no@:>@ ] ) ] ,
232+ [ ] , [ with_daos=no] )
233+
234+ AS_IF ( [ test "x$with_daos" != xno] , [
235+ DAOS="yes"
236+ LDFLAGS="$LDFLAGS -L$with_daos/lib64 -Wl,--enable-new-dtags -Wl,-rpath=$with_daos/lib64"
237+ CPPFLAGS="$CPPFLAGS -I$with_daos/include"
238+ AC_CHECK_HEADERS ( daos_types.h ,, [ unset DAOS] )
239+ AC_CHECK_LIB ( [ uuid] , [ uuid_generate] ,, [ unset DAOS] )
240+ AC_CHECK_LIB ( [ daos_common] , [ daos_sgl_init] ,, [ unset DAOS] )
241+ AC_CHECK_LIB ( [ daos] , [ daos_init] ,, [ unset DAOS] )
242+ AC_CHECK_LIB ( [ dfs] , [ dfs_mkdir] ,, [ unset DAOS] )
243+ ] )
244+
245+ AM_CONDITIONAL([ USE_DAOS_AIORI] , [ test x$DAOS = xyes] )
246+ AM_COND_IF([ USE_DAOS_AIORI] ,[
247+ AC_DEFINE ( [ USE_DAOS_AIORI] , [ ] , [ Build DAOS backends AIORI] )
248+ ] )
249+
250+ # Gfarm support
251+ AC_MSG_CHECKING ( [ for Gfarm file system] )
252+ AC_ARG_WITH ( [ gfarm] ,
253+ [ AS_HELP_STRING ( [ --with-gfarm=GFARM_ROOT] ,
254+ [ support IO with Gfarm backend @<:@ default=no@:>@ ] ) ] ,
255+ [ ] , [ with_gfarm=no] )
256+ AC_MSG_RESULT ( [ $with_gfarm] )
257+ AM_CONDITIONAL([ USE_GFARM_AIORI] , [ test x$with_gfarm != xno] )
258+ if test x$with_gfarm != xno; then
259+ AC_DEFINE ( [ USE_GFARM_AIORI] , [ ] , [ Build Gfarm backend AIORI] )
260+ case x$with_gfarm in
261+ xyes) ;;
262+ *)
263+ CPPFLAGS="$CPPFLAGS -I$with_gfarm/include"
264+ LDFLAGS="$LDFLAGS -L$with_gfarm/lib" ;;
265+ esac
266+ AC_CHECK_LIB ( [ gfarm] , [ gfarm_initialize] ,, [ AC_MSG_ERROR ( [ libgfarm not found] ) ] )
267+ AC_CHECK_MEMBERS ( [ struct stat.st_mtim.tv_nsec] )
268+ fi
176269
177270# aws4c is needed for the S3 backend (see --with-S3, below).
178271# Version 0.5.2 of aws4c is available at https://github.com/jti-lanl/aws4c.git
@@ -245,12 +338,6 @@ Consider --with-aws4c=, CPPFLAGS, LDFLAGS, etc])
245338] )
246339
247340
248-
249-
250-
251-
252-
253-
254341# Enable building "IOR", in all capitals
255342AC_ARG_ENABLE ( [ caps] ,
256343 [ AS_HELP_STRING ( [ --enable-caps] ,
@@ -261,6 +348,7 @@ AM_CONDITIONAL([USE_CAPS], [test x$enable_caps = xyes])
261348
262349AC_CONFIG_FILES ( [ Makefile
263350 src/Makefile
351+ src/test/Makefile
264352 contrib/Makefile
265353 doc/Makefile] )
266354AC_OUTPUT
0 commit comments