mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Mac OS X: Fix configure-time tests for Ruby.
For ARCHFLAGS change, see: http://www.ruby-forum.com/topic/129717#579065 We also add a test for the <guestfs.h> header and include that header when testing the library.
This commit is contained in:
@@ -38,7 +38,7 @@ CLOBBER.include [ "@builddir@/config.save", "@builddir@/ext/**/mkmf.log",
|
||||
# Build locally
|
||||
|
||||
file MAKEFILE => EXT_CONF do |t|
|
||||
unless sh "top_srcdir=$(pwd)/@top_srcdir@; top_builddir=$(pwd)/@top_builddir@; cd #{File::dirname(EXT_CONF)}; ruby #{File::basename(EXT_CONF)} --with-_guestfs-include=$top_srcdir/src --with-_guestfs-lib=$top_builddir/src/.libs"
|
||||
unless sh "top_srcdir=$(pwd)/@top_srcdir@; top_builddir=$(pwd)/@top_builddir@; export ARCHFLAGS=\"-arch $(uname -m)\"; cd #{File::dirname(EXT_CONF)}; ruby #{File::basename(EXT_CONF)} --with-_guestfs-include=$top_srcdir/src --with-_guestfs-lib=$top_builddir/src/.libs"
|
||||
$stderr.puts "Failed to run extconf"
|
||||
break
|
||||
end
|
||||
|
||||
@@ -22,7 +22,10 @@ extension_name = '_guestfs'
|
||||
|
||||
dir_config(extension_name)
|
||||
|
||||
unless have_library("guestfs", "guestfs_create")
|
||||
unless have_header ("guestfs.h")
|
||||
raise "<guestfs.h> not found"
|
||||
end
|
||||
unless have_library("guestfs", "guestfs_create", "guestfs.h")
|
||||
raise "libguestfs not found"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user