From 6a7a336d53416631d90f9f24f0c5a16de7c574d9 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 9 Oct 2024 03:53:21 +0000 Subject: [PATCH] macos use Homebrew HDF5 if there --- Makefile.PL | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index 945cde4..e34f357 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,8 +7,16 @@ use Config; ## Search for hdf5 library and include file $ENV{HDF5_PATH} ||= ''; +sub macos_get_lib_path { + return if $^O ne 'darwin'; + my $pref = `brew --prefix hdf5`; + return if !$pref; + chomp $pref; + "$pref/lib"; +} sub get_lib_paths { permutate(grep $_, ( + macos_get_lib_path(), $ENV{HDF5_PATH}."/lib", $ENV{HDF5_PATH}."/lib64", $ENV{HDF5_LIBDIR},