Skip to content
Snippets Groups Projects
Commit 89cbec68 authored by Danny Auble's avatar Danny Auble
Browse files

Minor formatting and removing/adding variables for easier compiling

parent b7f75ccb
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,13 @@
# X_AC_HDF5
#
# DESCRIPTION:
# Determine if the HDF5 libraries exists and if they support PCI data.
# Determine if the HDF5 libraries exists.
##*****************************************************************************
AC_DEFUN([X_AC_HDF5],
[
_x_ac_hdf5_dirs="/usr /usr/local"
_x_ac_hdf5_libs="lib64 lib"
x_ac_cv_hdf5_pci="no"
AC_ARG_WITH(
[hdf5],
......@@ -34,14 +33,11 @@ AC_DEFUN([X_AC_HDF5],
test -d "$d/$bit" || continue
_x_ac_hdf5_cppflags_save="$CPPFLAGS"
CPPFLAGS="-I$d/include $CPPFLAGS"
_x_ac_hdf5_libs_save="$LIBS"
_x_ac_hdf5_libs_save="$LIBS"
LIBS="-L$d/$bit -lhdf5 $LIBS"
AC_LINK_IFELSE(
[AC_LANG_CALL([], H5close)],
AS_VAR_SET(x_ac_cv_hdf5_dir, $d))
AC_TRY_LINK([#include <hdf5.h>],
[int i = HDF5_OBJ_PCI_DEVICE;],
[x_ac_cv_hdf5_pci="yes"], [])
CPPFLAGS="$_x_ac_hdf5_cppflags_save"
LIBS="$_x_ac_hdf5_libs_save"
test -n "$x_ac_cv_hdf5_dir" && break
......@@ -55,13 +51,11 @@ AC_DEFUN([X_AC_HDF5],
HDF5_CPPFLAGS="-I$x_ac_cv_hdf5_dir/include"
HDF5_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_hdf5_dir/$bit -L$x_ac_cv_hdf5_dir/$bit"
HDF5_LIBS="-lhdf5"
AC_DEFINE(HAVE_HDF5, 1, [Define to 1 if hdf5 library found])
if test "$x_ac_cv_hdf5_pci" = "yes"; then
AC_DEFINE(HAVE_HDF5_PCI, 1, [Define to 1 if hdf5 library supports PCI devices])
fi
fi
AC_SUBST(HDF5_LIBS)
AC_SUBST(HDF5_CPPFLAGS)
AC_SUBST(HDF5_LDFLAGS)
AM_CONDITIONAL(BUILD_HDF5, test -n "$x_ac_cv_hdf5_dir")
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment