summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
commit08359be858ae9e4595dab1f4a7718017d9af7663 (patch)
treebbe033fd134cfda5943dff96ef2a7f5f10d743e9 /configure.ac
parent55822485c64197a6c2c4a623824fcdcd10a57d31 (diff)
downloadhdf5-08359be858ae9e4595dab1f4a7718017d9af7663.zip
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.gz
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.bz2
[svn-r23347] ported revision 23248:23346 from the trunk
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac185
1 files changed, 101 insertions, 84 deletions
diff --git a/configure.ac b/configure.ac
index 6b6d3a3..e8ede42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.144], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.148], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -1616,9 +1616,10 @@ AC_ARG_WITH([dmalloc],
case $withval in
yes)
HAVE_DMALLOC="yes"
- AC_CHECK_HEADERS([dmalloc.h])
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC])
-
+ AC_CHECK_HEADERS([dmalloc.h],, [unset HAVE_DMALLOC])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [unset HAVE_DMALLOC])
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find dmalloc library])
fi
@@ -1662,14 +1663,16 @@ case $withval in
AM_CPPFLAGS="$AM_CPPFLAGS -I$dmalloc_inc"
fi
- AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ AC_CHECK_HEADERS([dmalloc.h],,[CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_DMALLOC])
- if test -n "$dmalloc_lib"; then
- LDFLAGS="$LDFLAGS -L$dmalloc_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
- fi
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$dmalloc_lib"; then
+ LDFLAGS="$LDFLAGS -L$dmalloc_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$dmalloc_lib"
+ fi
- AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC])
+ AC_CHECK_LIB([dmalloc], [dmalloc_shutdown],, [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_DMALLOC])
+ fi
if test -z "$HAVE_DMALLOC" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find dmalloc library])
@@ -1693,12 +1696,16 @@ AC_ARG_WITH([zlib],
case $withval in
yes)
HAVE_ZLIB="yes"
- AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"])
- AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
- AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
-
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find zlib library])
+ AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H="yes"], [unset HAVE_ZLIB])
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+ fi
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find zlib library])
+ fi
+ else
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
fi
;;
no)
@@ -1710,8 +1717,8 @@ case $withval in
HAVE_ZLIB="yes"
case "$withval" in
*,*)
- zlib_inc="`echo $withval |cut -f1 -d,`"
- zlib_lib="`echo $withval |cut -f2 -d, -s`"
+ zlib_inc="`echo $withval | cut -f1 -d,`"
+ zlib_lib="`echo $withval | cut -f2 -d, -s`"
;;
*)
if test -n "$withval"; then
@@ -1742,32 +1749,37 @@ case $withval in
AC_CHECK_HEADERS([zlib.h],
[HAVE_ZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_ZLIB])
if test -n "$zlib_lib"; then
LDFLAGS="$LDFLAGS -L$zlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$zlib_lib"
fi
- AC_CHECK_LIB([z], [compress2],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB])
- AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
+ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([z], [compress2],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_ZLIB])
+ fi
- if test -z "$HAVE_ZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
- AC_MSG_ERROR([couldn't find zlib library])
+ if test -z "$HAVE_ZLIB"; then
+ if test -n "$HDF5_CONFIG_ABORT"; then
+ AC_MSG_ERROR([couldn't find zlib library])
+ fi
+ else
+ AC_CHECK_FUNC([compress2], [HAVE_COMPRESS2="yes"])
fi
;;
esac
if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2" = "xyes"; then
- AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled])
- USE_FILTER_DEFLATE="yes"
+ AC_DEFINE([HAVE_FILTER_DEFLATE], [1], [Define if support for deflate (zlib) filter is enabled])
+ USE_FILTER_DEFLATE="yes"
- ## Add "deflate" to external filter list
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ ## Add "deflate" to external filter list
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -1787,9 +1799,10 @@ AC_ARG_WITH([szlib],
case $withval in
yes)
HAVE_SZLIB="yes"
- AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"])
- AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
-
+ AC_CHECK_HEADERS([szlib.h], [HAVE_SZLIB_H="yes"], [unset HAVE_SZLIB])
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZLIB])
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find szlib library])
fi
@@ -1835,15 +1848,17 @@ case $withval in
AC_CHECK_HEADERS([szlib.h],
[HAVE_SZLIB_H="yes"],
- [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"])
+ [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"] [unset HAVE_SZIP])
if test -n "$szlib_lib"; then
LDFLAGS="$LDFLAGS -L$szlib_lib"
AM_LDFLAGS="$AM_LDFLAGS -L$szlib_lib"
fi
- AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
+ AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_SZLIB])
+ fi
if test -z "$HAVE_SZLIB" -a -n "$HDF5_CONFIG_ABORT"; then
AC_MSG_ERROR([couldn't find szlib library])
@@ -1852,21 +1867,21 @@ case $withval in
esac
if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
- ## SZLIB library is available. Check if it can encode
- AC_MSG_CHECKING([for szlib encoder])
+ ## SZLIB library is available. Check if it can encode
+ AC_MSG_CHECKING([for szlib encoder])
- ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
- ## Also add LL_PATH substitution to Makefiles so they can use the
- ## path as well, for testing examples.
- if test -z "$LD_LIBRARY_PATH"; then
+ ## Set LD_LIBRARY_PATH so encoder test can find the library and run.
+ ## Also add LL_PATH substitution to Makefiles so they can use the
+ ## path as well, for testing examples.
+ if test -z "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$szlib_lib"
- else
+ else
export LD_LIBRARY_PATH="$szlib_lib:$LD_LIBRARY_PATH"
- fi
+ fi
- AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH"
+ AC_SUBST([LL_PATH]) LL_PATH="$LD_LIBRARY_PATH"
- AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
+ AC_CACHE_VAL([hdf5_cv_szlib_can_encode],
[AC_TRY_RUN([
#include <szlib.h>
@@ -1880,31 +1895,30 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
}
], [hdf5_cv_szlib_can_encode=yes], [hdf5_cv_szlib_can_encode=no],)])
- AC_DEFINE([HAVE_FILTER_SZIP], [1],
+ AC_DEFINE([HAVE_FILTER_SZIP], [1],
[Define if support for szip filter is enabled])
- USE_FILTER_SZIP="yes"
+ USE_FILTER_SZIP="yes"
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- AC_MSG_RESULT([yes])
- fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- AC_MSG_RESULT([no])
- fi
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ AC_MSG_RESULT([yes])
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ AC_MSG_RESULT([no])
+ fi
- ## Add "szip" to external filter list
- if test ${hdf5_cv_szlib_can_encode} = "yes"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
- fi
- if test ${hdf5_cv_szlib_can_encode} = "no"; then
- if test "X$EXTERNAL_FILTERS" != "X"; then
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
- fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ ## Add "szip" to external filter list
+ if test ${hdf5_cv_szlib_can_encode} = "yes"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
-
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ fi
+ if test ${hdf5_cv_szlib_can_encode} = "no"; then
+ if test "X$EXTERNAL_FILTERS" != "X"; then
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
+ fi
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ fi
fi
AM_CONDITIONAL([BUILD_SHARED_SZIP_CONDITIONAL], [test "X$USE_FILTER_SZIP" = "Xyes" && test "X$LL_PATH" != "X"])
@@ -1919,7 +1933,7 @@ AC_CACHE_SAVE
## and/or a library path. If the library path is specified then it must
## be preceded by a comma.
##
-AC_SUBST([PTHREAD]) PTHREAD=yes
+AC_SUBST([HAVE_PTHREAD]) HAVE_PTHREAD=yes
AC_ARG_WITH([pthread],
[AS_HELP_STRING([--with-pthread=DIR],
[Use the Pthreads library [default=no]])],,
@@ -1927,13 +1941,15 @@ AC_ARG_WITH([pthread],
case "$withval" in
yes)
- AC_CHECK_HEADERS([pthread.h])
- AC_CHECK_LIB([pthread], [pthread_self],, [unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD])
+ fi
;;
no)
AC_MSG_CHECKING([for pthread])
AC_MSG_RESULT([suppressed])
- unset PTHREAD
+ unset HAVE_PTHREAD
;;
*)
case "$withval" in
@@ -1963,21 +1979,22 @@ case "$withval" in
saved_AM_CPPFLAGS="$AM_CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$pthread_inc"
AM_CPPFLAGS="$AM_CPPFLAGS -I$pthread_inc"
- AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; AM_CPPFLAGS="$saved_AM_CPPFLAGS"; unset HAVE_PTHREAD])
else
- AC_CHECK_HEADERS([pthread.h],, [unset PTHREAD])
+ AC_CHECK_HEADERS([pthread.h],, [unset HAVE_PTHREAD])
fi
- if test -n "$pthread_lib"; then
- saved_LDFLAGS="$LDFLAGS"
- saved_AM_LDFLAGS="$AM_LDFLAGS"
- LDFLAGS="$LDFLAGS -L$pthread_lib"
- AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
- AC_CHECK_LIB([pthread], [pthread_self],,
- [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset PTHREAD])
-
- else
- AC_CHECK_LIB([pthread], [pthread_self],, [unset PTHREAD])
+ if test "x$HAVE_DMALLOC" = "xyes"; then
+ if test -n "$pthread_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ saved_AM_LDFLAGS="$AM_LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$pthread_lib"
+ AM_LDFLAGS="$AM_LDFLAGS -L$pthread_lib"
+ AC_CHECK_LIB([pthread], [pthread_self],,
+ [LDFLAGS="$saved_LDFLAGS"; AM_LDFLAGS="$saved_AM_LDFLAGS"; unset HAVE_PTHREAD])
+ else
+ AC_CHECK_LIB([pthread], [pthread_self],, [unset HAVE_PTHREAD])
+ fi
fi
;;
esac