New linux flavour, new issues...
While building gdal (from svn, combined with a home-brewn hdf4) I came accross the following problem:
libtool: compile: g++ -g -O2 -Wall -I/usr/local/src/tmp/gdal/port -I/usr/local/src/tmp/gdal/gcore -I/usr/local/src/tmp/gdal/alg -I/usr/local/src/tmp/gdal/ogr -I/usr/local/src/tmp/gdal/ogr/ogrsf_frmts -I/usr/local/src/tmp/gdal/ogr -Ihdf-eos -DOGR_ENABLED -I/usr/local/src/tmp/gdal/port -c hdf4dataset.cpp -fPIC -DPIC -o ../o/.libs/hdf4dataset.o
In file included from hdf4dataset.cpp:39:
hdf4dataset.h:54: error: conflicting declaration 'UNKNOWN'
/usr/include/mfhdfi.h:25: error: 'UNKNOWN' has a previous declaration as 'hdf_vartype_t UNKNOWN'
hdf4dataset.cpp: In static member function 'static GDALDataset* HDF4Dataset::Open(GDALOpenInfo*)':
hdf4dataset.cpp:743: error: cannot convert 'hdf_vartype_t' to 'HDF4SubdatasetType' in assignment
make[2]: *** ../o/hdf4dataset.o Error 1
Which can be solved by changing the 'UNKNOWN' in the gdal enum (and references thereof) to some other name, like 'UNKNOWNPRODUCT'.
Attached is a patch that does the above, which fixes the issue for me.