Shortly, running configure with --with-libz=internal disables (or might disable) HDF4 support if there is external installation of the library in the system.
Here is the story in longer version:
- I use Mac OS X 10.4 with GCC 4.0.1.
- I have built and installed HDF4 libraries (with jpeg-b6 and szip dependencies)
First test is to configure with HDF4 only support:
./configure --with-hdf4
...
checking for deflateInit_ in -lz... yes
using pre-installed libz
...
checking for SDreaddata in -lmfhdf... yes
checking for H5Fopen in -lhdf5... no
...
LIBZ support: external
...
HDF4 support: yes
HDF5 support: no
Second test includes selection of internal libz version:
./configure --with-hdf4 --with-libz=internal
...
using internal libz code.
...
checking for SDreaddata in -lmfhdf... no
checking for H5Fopen in -lhdf5... no
...
LIBZ support: internal
...
HDF4 support: no
HDF5 support: no
The config.log file gives clear explanation what's the reason of disappearing HDF4 support:
configure:21236: checking for SDreaddata in -lmfhdf
configure:21266: gcc -o conftest -g -O2 conftest.c -lmfhdf -ldf -ljpeg -lnetcdf -ldl >&5
/usr/bin/ld: Undefined symbols:
_deflate
_deflateEnd
_deflateInit_
_inflate
_inflateEnd
_inflateInit_
collect2: ld returned 1 exit status
I believe this problem is not specific to Mac OS X but is probably on other Unix systems.