summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-03-06 05:13:47 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-03-06 05:13:47 (GMT)
commit76d509dd6f454de8b01d0116dc73e56ea5949aa8 (patch)
treebd3291ac545e0ab332624aed7b6435899b13d4ef /configure
parent50c38a5733bf39c2ba2cdb0de4d03e4aa78b1814 (diff)
downloadhdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.zip
hdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.tar.gz
hdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.tar.bz2
[svn-r26378] Bring revisions #26220 - #26324 from trunk to revise_chunks. h5committested.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure684
1 files changed, 127 insertions, 557 deletions
diff --git a/configure b/configure
index 65f8407..7daf063 100755
--- a/configure
+++ b/configure
@@ -921,7 +921,6 @@ enable_using_memchecker
enable_parallel
with_mpe
enable_filters
-with_default_vfd
enable_direct_vfd
with_default_plugindir
enable_dconv_exception
@@ -1617,8 +1616,9 @@ Optional Features:
--enable-filters=all Turn on all internal I/O filters. One may also
specify a comma-separated list of filters or the
word no. The default is all internal I/O filters.
- --enable-direct-vfd Build the Direct I/O Virtual File Driver
- [default=yes]
+ --enable-direct-vfd Build the direct I/O virtual file driver (VFD). This
+ is based on the POSIX (sec2) VFD and requires the
+ open() call to take the O_DIRECT flag. [default=no]
--enable-dconv-exception
if exception handling functions is checked during
data conversions [default=yes]
@@ -1659,8 +1659,6 @@ Optional Packages:
--with-pthread=DIR Specify alternative path to Pthreads library when
thread-safe capability is built
--with-mpe=DIR Use MPE instrumentation [default=no]
- --with-default-vfd=driver
- Specify default file driver [default=sec2]
--with-default-plugindir=location
Specify default location for plugins
[default="/usr/local/hdf5/lib/plugin"]
@@ -2682,79 +2680,6 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
-
-# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
-# ----------------------------------------------------
-# Tries to find if the field MEMBER exists in type AGGR, after including
-# INCLUDES, setting cache variable VAR accordingly.
-ac_fn_c_check_member ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
-$as_echo_n "checking for $2.$3... " >&6; }
-if eval \${$4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$5
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-static $2 ac_aggr;
-if (ac_aggr.$3)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$4=yes"
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$5
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-static $2 ac_aggr;
-if (sizeof ac_aggr.$3)
-return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$4=yes"
-else
- eval "$4=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$4
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_member
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -6695,13 +6620,13 @@ $as_echo_n "checking if Fortran compiler version compatible with Fortran 2003 HD
program main
- USE iso_c_binding
- IMPLICIT NONE
- TYPE(C_PTR) :: ptr
- TYPE(C_FUNPTR) :: funptr
- CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
+ USE iso_c_binding
+ IMPLICIT NONE
+ TYPE(C_PTR) :: ptr
+ TYPE(C_FUNPTR) :: funptr
+ CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
- ptr = C_LOC(ichr(1:1))
+ ptr = C_LOC(ichr(1:1))
end
@@ -22540,113 +22465,6 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
-## ----------------------------------------------------------------------
-## Check for these two functions before the time headers are checked
-## for, otherwise they are not detected correctly on Solaris (the
-## configure test will fail due to multiply-defined symbols).
-##
-for ac_func in difftime
-do :
- ac_fn_c_check_func "$LINENO" "difftime" "ac_cv_func_difftime"
-if test "x$ac_cv_func_difftime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DIFFTIME 1
-_ACEOF
-
-fi
-done
-
-for ac_func in gettimeofday
-do :
- ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
-if test "x$ac_cv_func_gettimeofday" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETTIMEOFDAY 1
-_ACEOF
- have_gettime="yes"
-else
- have_gettime="no"
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if ${ac_cv_search_clock_gettime+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return clock_gettime ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' rt posix4; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_clock_gettime=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_clock_gettime+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_clock_gettime+:} false; then :
-
-else
- ac_cv_search_clock_gettime=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-for ac_func in clock_gettime
-do :
- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-if test "x$ac_cv_func_clock_gettime" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOCK_GETTIME 1
-_ACEOF
- have_clock_gettime="yes"
-else
- have_clock_gettime="no"
-fi
-done
-
-
## Unix
for ac_header in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h
do :
@@ -23102,19 +22920,28 @@ case "$host_cpu-$host_vendor-$host_os" in
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
## defined correctly in <stdio.h>.
+ ##
## This flag was removed from h5cc as of 2009-10-17 when it was found
## that the flag broke compiling netCDF-4 code with h5cc, but kept in
## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen
## is used only by H5_debug_mask which is used only when debugging in
## H5_init_library (all in H5.c). When the flag was removed this was
## the only compile failure noted.
+ ##
## This was originally defined as _POSIX_SOURCE which was updated to
## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
## functionality so clock_gettime and CLOCK_MONOTONIC are defined
- ## correctly.
+ ## correctly. This was later updated to 200112L so that
+ ## posix_memalign() is visible for the direct VFD code on Linux
+ ## systems.
+ ##
## POSIX feature information can be found in the gcc manual at:
## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS"
+ H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS"
+
+ ## Need to add this so that O_DIRECT is visible for the direct
+ ## VFD on Linux systems.
+ AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS"
## Also add BSD support on Linux systems, so <features.h> defines
## __USE_BSD, which is required to get the prototype for strdup
@@ -26328,42 +26155,6 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-## check if `struct tm' has a `__tm_gmtoff' member.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tm_gmtoff in struct tm" >&5
-$as_echo_n "checking for __tm_gmtoff in struct tm... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/time.h>
- #include <time.h>
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-struct tm tm; tm.__tm_gmtoff=0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE___TM_GMTOFF 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
## Check whether the global variable `timezone' is defined.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for global timezone variable" >&5
$as_echo_n "checking for global timezone variable... " >&6; }
@@ -26410,217 +26201,6 @@ rm -f core conftest.err conftest.$ac_objext \
;;
esac
-## Check whether `struct timezone' is defined.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if ${ac_cv_struct_tm+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <time.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-struct tm tm;
- int *p = &tm.tm_sec;
- return !p;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_struct_tm=time.h
-else
- ac_cv_struct_tm=sys/time.h
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
-
-fi
-
-ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
-#include <$ac_cv_struct_tm>
-
-"
-if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_TM_TM_ZONE 1
-_ACEOF
-
-
-fi
-
-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
-
-$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
-
-else
- ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
-"
-if test "x$ac_cv_have_decl_tzname" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_TZNAME $ac_have_decl
-_ACEOF
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
-$as_echo_n "checking for tzname... " >&6; }
-if ${ac_cv_var_tzname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <time.h>
-#if !HAVE_DECL_TZNAME
-extern char *tzname[];
-#endif
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return tzname[0][0];
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_var_tzname=yes
-else
- ac_cv_var_tzname=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
-$as_echo "$ac_cv_var_tzname" >&6; }
- if test $ac_cv_var_tzname = yes; then
-
-$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
-
- fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone" >&5
-$as_echo_n "checking for struct timezone... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-struct timezone tz; tz.tz_minuteswest=0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h
-
- have_struct_tz="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-## If gettimeofday() is going to be used, make sure it uses the timezone struct
-
-if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday() gives timezone" >&5
-$as_echo_n "checking whether gettimeofday() gives timezone... " >&6; }
- if ${hdf5_cv_gettimeofday_tz+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <time.h>
- #include <sys/time.h>
- int main(void)
- {
- struct timeval tv;
- struct timezone tz;
- tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */
- tz.tz_dsttime = 7;
- gettimeofday(&tv, &tz);
- /* Check whether the function returned any value at all */
- if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7)
- exit(1);
- else exit (0);
- }
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- hdf5_cv_gettimeofday_tz=yes
-else
- hdf5_cv_gettimeofday_tz=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
-
- if test ${hdf5_cv_gettimeofday_tz} = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define GETTIMEOFDAY_GIVES_TZ 1" >>confdefs.h
-
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
-fi
## ----------------------------------------------------------------------
## Does the struct stat have the st_blocks field? This field is not Posix.
@@ -26840,7 +26420,73 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
## ----------------------------------------------------------------------
## Check for functions.
##
-for ac_func in alarm BSDgettimeofday fork frexpf frexpl
+## NOTE: clock_gettime may require linking to the rt or posix4 library
+## so we'll search for it before calling AC_CHECK_FUNCS.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt posix4; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_clock_gettime+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+for ac_func in alarm clock_gettime difftime fork frexpf frexpl
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -26852,7 +26498,7 @@ _ACEOF
fi
done
-for ac_func in gethostname getpwuid getrusage lstat
+for ac_func in gethostname getpwuid getrusage gettimeofday
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -26864,7 +26510,7 @@ _ACEOF
fi
done
-for ac_func in rand_r random setsysinfo
+for ac_func in lstat rand_r random setsysinfo
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -27833,7 +27479,7 @@ $as_echo_n "checking whether a simple MPI-IO Fortran program can be linked... "
cat > conftest.$ac_ext <<_ACEOF
PROGRAM main
- USE mpi
+ INCLUDE 'mpif.h'
INTEGER :: comm, amode, info, fh, ierror
CHARACTER(LEN=1) :: filename
CALL MPI_File_open( comm, filename, amode, info, fh, ierror)
@@ -28267,6 +27913,7 @@ $as_echo "#define HAVE_MPE 1" >>confdefs.h
fi
fi
+
## ----------------------------------------------------------------------
## Turn on internal I/O filters by setting macros in header files
## Internal I/O filters are contained entirely within the library and do
@@ -28340,147 +27987,70 @@ $as_echo "#define HAVE_FILTER_SCALEOFFSET 1" >>confdefs.h
done
fi
-## ----------------------------------------------------------------------
-## This is defined only when we're using CodeWarrior, since it has a
-## broken "open()" call.
-#
-if test 1 = 2; then
-
-$as_echo "#define NO_SHARED_WRITING 1" >>confdefs.h
-
-fi
-## --------------------------------------------------------------------------
-## Should the Default Virtual File Driver be compiled?
+## ----------------------------------------------------------------------
+## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Default Virtual File Driver definition" >&5
-$as_echo_n "checking for Default Virtual File Driver definition... " >&6; }
+## Check these regardless. If the checks are moved inside the main
+## direct VFD block, the output is nested.
-# Check whether --with-default-vfd was given.
-if test "${with_default_vfd+set}" = set; then :
- withval=$with_default_vfd;
+if ${hdf5_cv_direct_io+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- withval=sec2
+ ac_fn_c_check_decl "$LINENO" "O_DIRECT" "ac_cv_have_decl_O_DIRECT" "#include <fcntl.h>
+"
+if test "x$ac_cv_have_decl_O_DIRECT" = xyes; then :
+ hdf5_cv_direct_io=yes
+else
+ hdf5_cv_direct_io=no
fi
+fi
-if test "X$withval" = "Xsec2"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- default_vfd=yes
- vfd_define=H5FD_SEC2
-elif test "X$withval" = "Xstdio"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- default_vfd=yes
- vfd_define=H5FD_STDIO
+if ${hdf5_cv_posix_memalign+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- default_vfd=no
+ ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign"
+if test "x$ac_cv_func_posix_memalign" = xyes; then :
+ hdf5_cv_posix_memalign=yes
+else
+ hdf5_cv_posix_memalign=no
fi
-if test "X$default_vfd" = "Xyes"; then
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_VFD $vfd_define
-_ACEOF
-
fi
-## ----------------------------------------------------------------------
-## Check if Direct I/O driver is enabled by --enable-direct-vfd
-##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Direct Virtual File Driver support" >&5
-$as_echo_n "checking for Direct Virtual File Driver support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the direct I/O virtual file driver (VFD) is enabled" >&5
+$as_echo_n "checking if the direct I/O virtual file driver (VFD) is enabled... " >&6; }
# Check whether --enable-direct-vfd was given.
if test "${enable_direct_vfd+set}" = set; then :
enableval=$enable_direct_vfd; DIRECT_VFD=$enableval
else
- DIRECT_VFD=yes
+ DIRECT_VFD=no
fi
-if test "$DIRECT_VFD" = "yes"; then
- if ${hdf5_cv_direct_io+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- int main(void)
- {
- int fid;
- if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
- exit(1);
- close(fid);
- remove("tst_file");
- exit (0);
- }
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-posix_memalign()
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- hdf5_cv_direct_io=yes
-else
- hdf5_cv_direct_io=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-else
- hdf5_cv_direct_io=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
-
- if test ${hdf5_cv_direct_io} = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+if test "X$DIRECT_VFD" = "Xyes"; then
+ if test ${hdf5_cv_direct_io} = "yes" && test ${hdf5_cv_posix_memalign} = "yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_DIRECT 1" >>confdefs.h
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- DIRECT_VFD=no
- fi
+ DIRECT_VFD=no
+ as_fn_error $? "The direct VFD was requested but cannot be built. This is either
+ due to O_DIRECT not being found in fcntl.h or a lack of
+ posix_memalign() on your system. Please re-configure without
+ specifying --enable-direct-vfd." "$LINENO" 5
+ fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: suppressed" >&5
-$as_echo "suppressed" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "X$DIRECT_VFD" = "Xyes"; then