2011-10-27 21:46:40 +04:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2011-11-30 01:09:54 +04:00
|
|
|
AC_PREREQ([2.62])
|
2017-05-31 19:50:49 +03:00
|
|
|
|
|
|
|
AC_INIT([META_PACKAGE_NAME],[META_PACKAGE_VERSION],[],[META_PACKAGE_NAME])
|
2017-11-22 22:27:18 +03:00
|
|
|
AC_CONFIG_MACRO_DIR([config])
|
2017-05-31 19:50:49 +03:00
|
|
|
|
2011-10-28 04:44:28 +04:00
|
|
|
X_AC_META
|
2017-05-31 19:50:49 +03:00
|
|
|
|
2011-10-27 21:46:40 +04:00
|
|
|
AC_CONFIG_AUX_DIR([config])
|
2011-10-28 04:23:36 +04:00
|
|
|
AC_CONFIG_SRCDIR([src/ior.c])
|
2011-10-28 04:44:28 +04:00
|
|
|
AC_CONFIG_HEADER([src/config.h])
|
2011-10-27 21:46:40 +04:00
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
# Automake support
|
2018-07-07 10:41:33 +03:00
|
|
|
AM_INIT_AUTOMAKE([check-news dist-bzip2 gnu no-define foreign subdir-objects])
|
2018-07-14 08:50:55 +03:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2011-10-27 21:46:40 +04:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2018-10-08 23:47:28 +03:00
|
|
|
# Check for system-specific stuff
|
|
|
|
case "${host_os}" in
|
|
|
|
*linux*)
|
|
|
|
;;
|
|
|
|
*darwin*)
|
|
|
|
CPPFLAGS="${CPPFLAGS} -D_DARWIN_C_SOURCE"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2017-11-22 23:13:53 +03:00
|
|
|
# Checks for programs
|
|
|
|
|
|
|
|
# We can't do anything without a working MPI
|
|
|
|
AX_PROG_CC_MPI(,,[
|
|
|
|
AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.])
|
|
|
|
])
|
2011-10-27 21:46:40 +04:00
|
|
|
|
2018-07-14 12:27:31 +03:00
|
|
|
AC_PROG_RANLIB
|
2017-10-20 00:26:52 +03:00
|
|
|
# No reason not to require modern C at this point
|
|
|
|
AC_PROG_CC_C99
|
|
|
|
|
2011-10-27 21:46:40 +04:00
|
|
|
# Checks for libraries.
|
|
|
|
|
|
|
|
# Checks for header files.
|
2017-10-20 00:10:42 +03:00
|
|
|
AC_CHECK_HEADERS([fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/statfs.h sys/statvfs.h sys/time.h sys/param.h sys/mount.h unistd.h wchar.h hdfs.h beegfs/beegfs.h])
|
2011-10-27 21:46:40 +04:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
2018-10-28 21:34:22 +03:00
|
|
|
AC_CHECK_FUNCS([sysconf gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname statfs statvfs])
|
2011-11-03 04:49:43 +04:00
|
|
|
AC_SEARCH_LIBS([sqrt], [m], [],
|
|
|
|
[AC_MSG_ERROR([Math library not found])])
|
2011-10-27 21:46:40 +04:00
|
|
|
|
2017-04-28 19:12:41 +03:00
|
|
|
# Check for gpfs availability
|
|
|
|
AC_ARG_WITH([gpfs],
|
|
|
|
[AS_HELP_STRING([--with-gpfs],
|
|
|
|
[support configurable GPFS @<:@default=check@:>@])],
|
|
|
|
[], [with_gpfs=check])
|
|
|
|
|
|
|
|
AS_IF([test "x$with_gpfs" != xno], [
|
|
|
|
AC_CHECK_HEADERS([gpfs.h gpfs_fcntl.h], [], [
|
|
|
|
if test "x$with_gpfs" != xcheck; then
|
|
|
|
AC_MSG_FAILURE([--with-gpfs was given, <gpfs.h> and <gpfs_fcntl.h> not found])
|
|
|
|
fi
|
|
|
|
])
|
2013-12-11 23:34:30 +04:00
|
|
|
AS_IF([test "$ac_cv_header_gpfs_h" = "yes" -o "$ac_cv_header_gpfs_fcntl_h" = "yes"], [
|
2017-04-28 19:12:41 +03:00
|
|
|
AC_SEARCH_LIBS([gpfs_fcntl], [gpfs], [],
|
|
|
|
[AC_MSG_ERROR([Library containing gpfs_fcntl symbols not found])
|
|
|
|
])
|
|
|
|
])
|
2013-12-11 23:34:30 +04:00
|
|
|
])
|
|
|
|
|
2011-10-28 03:50:05 +04:00
|
|
|
# Check for system capabilities
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
2018-10-28 21:34:22 +03:00
|
|
|
AC_DEFINE([_XOPEN_SOURCE], [700], [C99 compatibility])
|
|
|
|
|
2011-11-10 02:14:14 +04:00
|
|
|
# Check for lustre availability
|
|
|
|
AC_ARG_WITH([lustre],
|
|
|
|
[AS_HELP_STRING([--with-lustre],
|
|
|
|
[support configurable Lustre striping values @<:@default=check@:>@])],
|
|
|
|
[], [with_lustre=check])
|
|
|
|
AS_IF([test "x$with_lustre" != xno], [
|
2018-08-29 00:27:21 +03:00
|
|
|
AC_CHECK_HEADERS([linux/lustre/lustre_user.h lustre/lustre_user.h], break, [
|
2011-11-10 02:14:14 +04:00
|
|
|
if test "x$with_lustre" != xcheck; then
|
|
|
|
AC_MSG_FAILURE([--with-lustre was given, <lustre/lustre_user.h> not found])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2018-08-06 13:04:26 +03:00
|
|
|
# IME (DDN's Infinite Memory Engine) support
|
|
|
|
AC_ARG_WITH([ime],
|
|
|
|
[AS_HELP_STRING([--with-ime],
|
|
|
|
[support IO with IME backend @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[with_ime=no])
|
|
|
|
AM_CONDITIONAL([USE_IME_AIORI], [test x$with_ime = xyes])
|
|
|
|
AM_COND_IF([USE_IME_AIORI],[
|
|
|
|
AC_DEFINE([USE_IME_AIORI], [], [Build IME backend AIORI])
|
|
|
|
])
|
|
|
|
|
2014-08-14 02:53:24 +04:00
|
|
|
# HDF5 support
|
|
|
|
AC_ARG_WITH([hdf5],
|
|
|
|
[AS_HELP_STRING([--with-hdf5],
|
|
|
|
[support IO with HDF5 backend @<:@default=no@:>@])],
|
2011-10-28 03:50:05 +04:00
|
|
|
[],
|
2014-08-14 02:53:24 +04:00
|
|
|
[with_hdf5=no])
|
|
|
|
AM_CONDITIONAL([USE_HDF5_AIORI], [test x$with_hdf5 = xyes])
|
|
|
|
AM_COND_IF([USE_HDF5_AIORI],[
|
|
|
|
AC_DEFINE([USE_HDF5_AIORI], [], [Build HDF5 backend AIORI])
|
2018-09-20 18:43:41 +03:00
|
|
|
AC_SEARCH_LIBS([H5Pset_all_coll_metadata_ops], [hdf5])
|
|
|
|
AC_CHECK_FUNCS([H5Pset_all_coll_metadata_ops])
|
2014-08-14 02:53:24 +04:00
|
|
|
])
|
|
|
|
|
2018-09-20 18:43:41 +03:00
|
|
|
|
|
|
|
|
2014-08-14 02:53:24 +04:00
|
|
|
# HDFS support
|
|
|
|
AC_ARG_WITH([hdfs],
|
|
|
|
[AS_HELP_STRING([--with-hdfs],
|
|
|
|
[support IO with HDFS backend @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[with_hdfs=no])
|
|
|
|
AM_CONDITIONAL([USE_HDFS_AIORI], [test x$with_hdfs = xyes])
|
|
|
|
AM_COND_IF([USE_HDFS_AIORI],[
|
|
|
|
AC_DEFINE([USE_HDFS_AIORI], [], [Build HDFS backend AIORI])
|
2011-10-28 03:50:05 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
# MPIIO support
|
|
|
|
AC_ARG_WITH([mpiio],
|
|
|
|
[AS_HELP_STRING([--with-mpiio],
|
|
|
|
[support IO with MPI-IO backend @<:@default=yes@:>@])],
|
|
|
|
[],
|
|
|
|
[with_mpiio=yes])
|
|
|
|
AM_CONDITIONAL([USE_MPIIO_AIORI], [test x$with_mpiio = xyes])
|
|
|
|
AM_COND_IF([USE_MPIIO_AIORI],[
|
|
|
|
AC_DEFINE([USE_MPIIO_AIORI], [], [Build MPIIO backend AIORI])
|
|
|
|
])
|
|
|
|
|
|
|
|
# NCMPI (Parallel netcdf) support
|
|
|
|
AC_ARG_WITH([ncmpi],
|
|
|
|
[AS_HELP_STRING([--with-ncmpi],
|
|
|
|
[support IO with NCMPI backend @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[with_ncmpi=no])
|
|
|
|
AM_CONDITIONAL([USE_NCMPI_AIORI], [test x$with_ncmpi = xyes])
|
|
|
|
AM_COND_IF([USE_NCMPI_AIORI],[
|
|
|
|
AC_DEFINE([USE_NCMPI_AIORI], [], [Build NCMPI backend AIORI])
|
2014-08-14 02:53:24 +04:00
|
|
|
])
|
|
|
|
|
2018-05-08 14:08:29 +03:00
|
|
|
# MMAP IO support
|
|
|
|
AC_ARG_WITH([mmap],
|
|
|
|
[AS_HELP_STRING([--with-mmap],
|
|
|
|
[support IO with MMAP backend @<:@default=yes@:>@])],
|
|
|
|
[],
|
|
|
|
[with_mmap=yes])
|
|
|
|
AM_CONDITIONAL([USE_MMAP_AIORI], [test x$with_mmap = xyes])
|
|
|
|
AM_COND_IF([USE_MMAP_AIORI],[
|
|
|
|
AC_DEFINE([USE_MMAP_AIORI], [], [Build MMAP backend AIORI])
|
2014-08-14 02:53:24 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
# POSIX IO support
|
|
|
|
AC_ARG_WITH([posix],
|
|
|
|
[AS_HELP_STRING([--with-posix],
|
|
|
|
[support IO with POSIX backend @<:@default=yes@:>@])],
|
|
|
|
[],
|
|
|
|
[with_posix=yes])
|
|
|
|
AM_CONDITIONAL([USE_POSIX_AIORI], [test x$with_posix = xyes])
|
|
|
|
AM_COND_IF([USE_POSIX_AIORI],[
|
|
|
|
AC_DEFINE([USE_POSIX_AIORI], [], [Build POSIX backend AIORI])
|
|
|
|
])
|
|
|
|
|
2018-02-23 19:38:24 +03:00
|
|
|
# RADOS support
|
|
|
|
AC_ARG_WITH([rados],
|
|
|
|
[AS_HELP_STRING([--with-rados],
|
|
|
|
[support IO with librados backend @<:@default=no@:>@])],
|
|
|
|
[],
|
|
|
|
[with_rados=no])
|
|
|
|
AM_CONDITIONAL([USE_RADOS_AIORI], [test x$with_rados = xyes])
|
|
|
|
AM_COND_IF([USE_RADOS_AIORI],[
|
|
|
|
AC_DEFINE([USE_RADOS_AIORI], [], [Build RADOS backend AIORI])
|
|
|
|
])
|
2015-05-19 18:36:28 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# aws4c is needed for the S3 backend (see --with-S3, below).
|
|
|
|
# Version 0.5.2 of aws4c is available at https://github.com/jti-lanl/aws4c.git
|
|
|
|
# Install it something like this:
|
|
|
|
#
|
|
|
|
# cd $my_install_dir
|
|
|
|
# git clone https://github.com/jti-lanl/aws4c.git
|
|
|
|
# cd aws4c
|
|
|
|
# make
|
|
|
|
#
|
|
|
|
# Then:
|
|
|
|
# --with-S3 --with-aws4c=$my_install_dir/aws4c
|
|
|
|
|
|
|
|
aws4c_dir=
|
|
|
|
AC_ARG_WITH([aws4c],
|
|
|
|
[AS_HELP_STRING([--with-aws4c=DIR],
|
|
|
|
[aws4c library is needed for Amazon S3 backend])],
|
|
|
|
[aws4c_dir="$withval"])
|
|
|
|
AM_CONDITIONAL([AWS4C_DIR], [test x$aws4c_dir != x])
|
|
|
|
|
|
|
|
# AC_SUBST([AWS4C_DIR],[$aws4c_dir])
|
|
|
|
AM_COND_IF([AWS4C_DIR],[
|
|
|
|
AC_SUBST([AWS4C_CPPFLAGS],[-I$aws4c_dir])
|
|
|
|
AC_SUBST([AWS4C_LDFLAGS], [-L$aws4c_dir])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
# Amazon S3 support [see also: --with-aws4c]
|
S3 with Multi-Part Upload for N:1 is working.
Testing on our EMC ViPR installation. Therefore, we also have available
some EMC extensions. For example, EMC supports a special "byte-range"
header-option ("Range: bytes=-1-") which allows appending to an object.
This is not needed for N:1 (where every write creates an independent part),
but is vital for N:N (where every write is considered an append, unless
"transfer-size" is the same as "block-size").
We also use a LANL-extended implementation of aws4c 0.5, which provides
some special features, and allows greater efficiency. That is included in
this commit as a tarball. Untar it somewhere else and build it, to produce
a library, which is linked with IOR. (configure with --with-S3).
TBD: EMC also supports a simpler alternative to Multi-Part Upload, which
appears to have several advantages. We'll add that in next, but wanted to
capture this as is, before I break it.
2014-10-27 22:16:20 +03:00
|
|
|
AC_ARG_WITH([S3],
|
|
|
|
[AS_HELP_STRING([--with-S3],
|
2015-05-19 18:36:28 +03:00
|
|
|
[support IO with Amazon S3 backend @<:@default=no@:>@])],
|
S3 with Multi-Part Upload for N:1 is working.
Testing on our EMC ViPR installation. Therefore, we also have available
some EMC extensions. For example, EMC supports a special "byte-range"
header-option ("Range: bytes=-1-") which allows appending to an object.
This is not needed for N:1 (where every write creates an independent part),
but is vital for N:N (where every write is considered an append, unless
"transfer-size" is the same as "block-size").
We also use a LANL-extended implementation of aws4c 0.5, which provides
some special features, and allows greater efficiency. That is included in
this commit as a tarball. Untar it somewhere else and build it, to produce
a library, which is linked with IOR. (configure with --with-S3).
TBD: EMC also supports a simpler alternative to Multi-Part Upload, which
appears to have several advantages. We'll add that in next, but wanted to
capture this as is, before I break it.
2014-10-27 22:16:20 +03:00
|
|
|
[],
|
2015-05-19 18:36:28 +03:00
|
|
|
[with_S3=no])
|
S3 with Multi-Part Upload for N:1 is working.
Testing on our EMC ViPR installation. Therefore, we also have available
some EMC extensions. For example, EMC supports a special "byte-range"
header-option ("Range: bytes=-1-") which allows appending to an object.
This is not needed for N:1 (where every write creates an independent part),
but is vital for N:N (where every write is considered an append, unless
"transfer-size" is the same as "block-size").
We also use a LANL-extended implementation of aws4c 0.5, which provides
some special features, and allows greater efficiency. That is included in
this commit as a tarball. Untar it somewhere else and build it, to produce
a library, which is linked with IOR. (configure with --with-S3).
TBD: EMC also supports a simpler alternative to Multi-Part Upload, which
appears to have several advantages. We'll add that in next, but wanted to
capture this as is, before I break it.
2014-10-27 22:16:20 +03:00
|
|
|
AM_CONDITIONAL([USE_S3_AIORI], [test x$with_S3 = xyes])
|
|
|
|
AM_COND_IF([USE_S3_AIORI],[
|
|
|
|
AC_DEFINE([USE_S3_AIORI], [], [Build Amazon-S3 backend AIORI])
|
|
|
|
])
|
|
|
|
|
2015-05-19 18:36:28 +03:00
|
|
|
err=0
|
|
|
|
AS_IF([test "x$with_S3" != xno], [
|
|
|
|
AC_MSG_NOTICE([beginning of S3-related checks])
|
|
|
|
|
|
|
|
# save user's values, while we use AC_CHECK_HEADERS with $AWS4C_DIR
|
|
|
|
ORIG_CPPFLAGS=$CPPFLAGS
|
|
|
|
ORIG_LDFLAGS=$LDFLAGS
|
|
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS $AWS4C_CPPFLAGS"
|
|
|
|
LDFLAGS=" $LDFLAGS $AWS4C_LDFLAGS"
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS([aws4c.h], [], [err=1])
|
|
|
|
AC_CHECK_HEADERS([libxml/parser.h], [], [err=1])
|
|
|
|
|
|
|
|
# Autotools thinks searching for a library means I want it added to LIBS
|
|
|
|
ORIG_LIBS=$LIBS
|
|
|
|
AC_CHECK_LIB([curl], [curl_easy_init], [], [err=1])
|
|
|
|
AC_CHECK_LIB([xml2], [xmlDocGetRootElement], [], [err=1])
|
|
|
|
AC_CHECK_LIB([aws4c], [s3_get], [], [err=1], [-lcurl -lxml2 -lcrypto])
|
|
|
|
LIBS=$ORIG_LIBS
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([end of S3-related checks])
|
|
|
|
if test "$err" == 1; then
|
|
|
|
AC_MSG_FAILURE([S3 support is missing. dnl
|
|
|
|
Make sure you have access to libaws4c, libcurl, libxml2, and libcrypto. dnl
|
|
|
|
Consider --with-aws4c=, CPPFLAGS, LDFLAGS, etc])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# restore user's values
|
|
|
|
CPPFLAGS=$ORIG_CPPFLAGS
|
|
|
|
LDFLAGS=$ORIG_LDFLAGS
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2011-11-10 05:38:34 +04:00
|
|
|
# Enable building "IOR", in all capitals
|
|
|
|
AC_ARG_ENABLE([caps],
|
|
|
|
[AS_HELP_STRING([--enable-caps],
|
|
|
|
[build "IOR" binary (name is in all-caps) @<:@default=no@:>@])],
|
|
|
|
[], [enable_caps=no])
|
|
|
|
AM_CONDITIONAL([USE_CAPS], [test x$enable_caps = xyes])
|
|
|
|
|
2011-10-28 03:50:05 +04:00
|
|
|
|
2011-10-27 21:46:40 +04:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
src/Makefile
|
2011-11-03 04:36:32 +04:00
|
|
|
contrib/Makefile
|
2011-10-28 06:07:59 +04:00
|
|
|
doc/Makefile])
|
2011-10-27 21:46:40 +04:00
|
|
|
AC_OUTPUT
|