summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-07-22 01:54:16 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-07-22 01:54:16 (GMT)
commit26c80ab54a638de1befc27a42085c04c4bf0f9d6 (patch)
tree04d9389b5cd0ee41b54a81699f74e6954ff68ad0 /configure.in
parent946083cb9b1d482c790f486a922a2ba8fa66e3fc (diff)
downloadhdf5-26c80ab54a638de1befc27a42085c04c4bf0f9d6.zip
hdf5-26c80ab54a638de1befc27a42085c04c4bf0f9d6.tar.gz
hdf5-26c80ab54a638de1befc27a42085c04c4bf0f9d6.tar.bz2
[svn-r1525] configure.in:
Added the checking for zlib and jpeg libraries when doing the -with-hdf4 option. HDF4 applications in general needs lib mfhdf, df, z, and jpeg. Removed the earlier alone test for jpeg. It conflicted with the hdf4 tests. Also, moved the hdf5-own library test for zlib after the hdf4 tests so that when hdf4 is used, the results would cover the zlib test. configure: derived from configure.in by autoconf. Platforms tested: IRIX 6.5, IRIX64 6.5, Solaris 2.6 (with default gcc, tested h5toh4 tool). Comments: This still generates compile commands that listed the "-lmfhdf ..." library list before the -L/usr/ncsa/lib. I traced the problem to the libtool. (I stopped at the door and dared not to enter this libtool cave. :-) Most compilers, except solaris' cc, tolerate the "duplicated" library list.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in84
1 files changed, 44 insertions, 40 deletions
diff --git a/configure.in b/configure.in
index 7aaf7c8..cf4a7e7 100644
--- a/configure.in
+++ b/configure.in
@@ -167,7 +167,6 @@ dnl
AC_CHECK_LIB(m,ceil)
AC_CHECK_LIB(nsl,xdr_int) dnl ...for Solaris and hdf4
AC_CHECK_LIB(coug,main) dnl ...for ASCI/Red
-AC_CHECK_LIB(jpeg,main) dnl ...required for linking hdf4 apps
dnl ----------------------------------------------------------------------
dnl Check for system header files.
@@ -268,45 +267,6 @@ case $HSIZET in
esac
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 `--enable-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 "X" != "$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 "X" != "$zlb_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 Is HDF4 present? If so then we can compile the h5toh4 converter. We
dnl assume h5toh4 can be compiled and then prove otherwise when we don't find
dnl a header file or library.
@@ -320,6 +280,8 @@ AC_ARG_WITH(hdf4,[ --with-hdf4=INC,LIB Use the HDF4 library],,withval=[/usr
case $withval in
yes)
AC_CHECK_HEADERS(mfhdf.h,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(z,main,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(jpeg,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
;;
@@ -345,15 +307,57 @@ case $withval in
if test "X" != "$hdf4_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$hdf4_lib"
+ AC_CHECK_LIB(z,main,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(jpeg,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
else
+ AC_CHECK_LIB(z,main,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(jpeg,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main)
AC_CHECK_LIB(mfhdf,main)
fi
;;
esac
+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 `--enable-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 "X" != "$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 "X" != "$zlb_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 How does one figure out the local time zone? Anyone know of a