summaryrefslogtreecommitdiffstats
path: root/c++/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-03-30 19:40:29 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-03-30 19:40:29 (GMT)
commit9ccb328997fd699004390efc9644fd6bcdade9d1 (patch)
tree369329d9d46f624c063eb9c4e8adc478ecd9a2ff /c++/configure.in
parent067806e5070d3503b76db91ce6201c26b44c12e5 (diff)
downloadhdf5-9ccb328997fd699004390efc9644fd6bcdade9d1.zip
hdf5-9ccb328997fd699004390efc9644fd6bcdade9d1.tar.gz
hdf5-9ccb328997fd699004390efc9644fd6bcdade9d1.tar.bz2
[svn-r3740] Purpose:
Bug Fix Description: If the user specifies where to look for a library (like the zlib) on the commandline, then we add that directory to the LDFLAGS macro. Solution: Copied the code which checks for this from the C configure.in. Also added code which checks for the --with-zlib flag since that wasn't in there. Platforms tested: Linux
Diffstat (limited to 'c++/configure.in')
-rw-r--r--c++/configure.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/c++/configure.in b/c++/configure.in
index 92580a8..0fd100a 100644
--- a/c++/configure.in
+++ b/c++/configure.in
@@ -318,6 +318,45 @@ int main(void) {
])
dnl ----------------------------------------------------------------------
+dnl Is the GNU zlib present? It has a header file `zlib.h' and a library
+dnl `-lz' and their locations might be specified with the `--with-zlib'
+dnl command-line switch. The value is an include path and/or a library path.
+dnl If the library path is specified then it must be preceded by a comma.
+dnl
+
+AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression],
+ ,withval=yes)
+case $withval in
+ yes)
+ AC_CHECK_HEADERS(zlib.h)
+ AC_CHECK_LIB(z, compress)
+ ;;
+ no)
+ AC_MSG_CHECKING(for GNU zlib)
+ AC_MSG_RESULT(suppressed)
+ ;;
+ *)
+ zlib_inc="`echo $withval |cut -f1 -d,`"
+ if test -n "$zlib_inc"; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$zlib_inc"
+ AC_CHECK_HEADERS(zlib.h,,CPPFLAGS="$saved_CPPFLAGS")
+ else
+ AC_CHECK_HEADERS(zlib.h)
+ fi
+
+ zlib_lib="`echo $withval |cut -f2 -d, -s`"
+ if test -n "$zlib_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$zlib_lib"
+ AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS")
+ else
+ AC_CHECK_LIB(z, compress)
+ fi
+ ;;
+esac
+
+dnl ----------------------------------------------------------------------
dnl Checks for header files.
dnl