@@ -60,6 +60,7 @@ fn run_command(cmd: &str, args: &[&str]) -> Option<String> {
6060#[ allow( dead_code) ]
6161fn is_inc_dir < P : AsRef < Path > > ( path : P ) -> bool {
6262 path. as_ref ( ) . join ( "H5pubconf.h" ) . is_file ( )
63+ || path. as_ref ( ) . join ( "H5pubconf-64.h" ) . is_file ( )
6364}
6465
6566#[ allow( dead_code) ]
@@ -166,7 +167,8 @@ pub struct Header {
166167impl Header {
167168 pub fn parse < P : AsRef < Path > > ( inc_dir : P ) -> Self {
168169 let inc_dir = inc_dir. as_ref ( ) ;
169- let header = inc_dir. join ( "H5pubconf.h" ) ;
170+
171+ let header = get_conf_header ( inc_dir) ;
170172 println ! ( "Parsing HDF5 config from:\n {:?}" , header) ;
171173
172174 let contents = fs:: read_to_string ( header) . unwrap ( ) ;
@@ -207,6 +209,18 @@ impl Header {
207209 }
208210}
209211
212+ fn get_conf_header < P : AsRef < Path > > ( inc_dir : P ) -> PathBuf {
213+ let inc_dir = inc_dir. as_ref ( ) ;
214+
215+ if inc_dir. join ( "H5pubconf.h" ) . is_file ( ) {
216+ inc_dir. join ( "H5pubconf.h" )
217+ } else if inc_dir. join ( "H5pubconf-64.h" ) . is_file ( ) {
218+ inc_dir. join ( "H5pubconf-64.h" )
219+ } else {
220+ panic ! ( "H5pubconf header not found in include directory" ) ;
221+ }
222+ }
223+
210224#[ derive( Clone , Debug , Default ) ]
211225pub struct LibrarySearcher {
212226 pub version : Option < Version > ,
@@ -262,6 +276,7 @@ mod unix {
262276 for ( inc_dir, lib_dir) in & [
263277 ( "/usr/include/hdf5/serial" , "/usr/lib/x86_64-linux-gnu/hdf5/serial" ) ,
264278 ( "/usr/include" , "/usr/lib/x86_64-linux-gnu" ) ,
279+ ( "/usr/include" , "/usr/lib64" ) ,
265280 ] {
266281 if is_inc_dir ( inc_dir) {
267282 println ! ( "Found HDF5 headers at:\n {:?}" , inc_dir) ;
0 commit comments