Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ SPEC = Gem::Specification.new do |s|
s.license = "LGPLv2"
end

if RUBY_PLATFORM =~ /universal.x86_64-darwin/
ENV['ARCHFLAGS'] = '-arch x86_64'
end

Gem::PackageTask.new(SPEC) do |pkg|
pkg.need_tar = true
pkg.need_zip = true
Expand Down
4 changes: 3 additions & 1 deletion ext/libvirt/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'mkmf'

$defs.push("-DHAVE_VIRDOMAINQEMUMONITORCOMMAND")

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
RbConfig::MAKEFILE_CONFIG['CCDLFLAGS'] = ENV['CFLAGS'] if ENV['CFLAGS']
RbConfig::MAKEFILE_CONFIG['EXTDLDFLAGS'] = ENV['CFLAGS'] if ENV['CFLAGS']
Expand Down Expand Up @@ -479,7 +481,7 @@ def have_const(const, headers = nil, opt = "", &b)
libvirt_consts.each { |c| have_const(c, ["libvirt/libvirt.h"]) }
virterror_consts.each { |c| have_const(c, ["libvirt/virterror.h"]) }
if find_header("libvirt/libvirt-qemu.h")
have_library("virt-qemu", "virDomainQemuMonitorCommand")
have_library("virt-qemu", "virDomainQemuMonitorCommand", "libvirt/libvirt-qemu.h")
libvirt_qemu_funcs.each { |f| have_func(f, "libvirt/libvirt-qemu.h") }
libvirt_qemu_consts.each { |c| have_const(c, ["libvirt/libvirt-qemu.h"]) }
end
Expand Down