+1 for me as well.
Here is how I am doing this in the meantime:
-----
use ExtUtils::CppGuess;
use Devel::CheckLib;
my $guess = ExtUtils::CppGuess->new;
my %mb_opts = $guess->module_build_options; # even though not using Module::Build
...
check_lib_or_exit(
lib => 'mylibname',
header => 'mylibheader.h',
ccflags => $mb_opts{extra_compiler_flags},
ldflags => $mb_opts{extra_linker_flags}
...);
-----
This seems to work ok.
Alternatively you can use $guess->_get_cflags() and $guess->_get_lflags() to get the compiler/linker flags. However since those start with an underscore it seems they are not meant to be used outside of EU::CppGuess. Perhaps the author of EU::CppGuess would be willing rename those as get_cflags() and get_lflags().
--
Regards,
Michael Schout