ext/jsonnet/extconf.rb in jsonnet-0.5.0 vs ext/jsonnet/extconf.rb in jsonnet-0.5.1
- old
+ new
@@ -74,9 +74,16 @@
recipe.cook
# I tried using recipe.activate here but that caused this file to build ok
# but the makefile to fail. These commands add the necessary paths to do both
$LIBPATH = ["#{recipe.path}/lib"] | $LIBPATH
$CPPFLAGS << " -I#{recipe.path}/include"
+
+ # jsonnet_wrap extension must be linked with c++ stdlib because
+ # the C++ library Rapid YAML is being statically linked.
+ rbconfig = RbConfig::MAKEFILE_CONFIG
+ if rbconfig['LDSHAREDXX']
+ rbconfig['LDSHARED'] = rbconfig['LDSHAREDXX']
+ end
end
abort 'libjsonnet.h not found' unless have_header('libjsonnet.h')
abort 'libjsonnet not found' unless have_library('jsonnet')
have_header('libjsonnet_fmt.h')