[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] libvirt on OS X Leopard 10.5.1



Attached is as far as I got over the weekend.

As you can see the main problems (apart from the lack of hyper which is a showstopper) are:

* Minor header tweaks

* PKG_CHECK_EXISTS macro doesn't exist and has to be commented out everywhere. This is despite the fact that I have pkg-config from Macports installed.

* --version-script not supported by the linker

It's actually very close to working, and I think it will be considerably simpler to port and maintain a Mac OS X port than the wretched Windows port.

The OCaml bindings & tools built first time on Mac OS X, but obviously I couldn't finish the final link since there wasn't a libvirt.dylib.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: configure.in
===================================================================
RCS file: /data/cvs/libvirt/configure.in,v
retrieving revision 1.121
diff -u -r1.121 configure.in
--- configure.in	19 Jan 2008 18:36:01 -0000	1.121
+++ configure.in	22 Jan 2008 12:24:37 -0000
@@ -301,9 +301,10 @@
     AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED)
     AC_MSG_ERROR(libxml2 >= $LIBXML_REQUIRED is required for libvirt)
 elif test "z$with_libxml" = "z" -a "x$PKG_CONFIG" != "x" ; then
-    PKG_CHECK_EXISTS(libxml-2.0,[LIBXML_FOUND=yes])
+    dnl PKG_CHECK_EXISTS(libxml-2.0,[LIBXML_FOUND=yes])
     if test "$LIBXML_FOUND" != "no" ; then
-        PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
+        dnl PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
+	:
     fi
 fi
 if test "z$LIBXML_FOUND" = "zno" ; then
@@ -344,7 +345,8 @@
 GNUTLS_CFLAGS=
 GNUTLS_LIBS=
 if test "x$PKG_CONFIG" != "x" ; then
-  PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED)
+  dnl PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED)
+  :
 else
   AC_CHECK_HEADER([gnutls/gnutls.h],
        [],
@@ -417,11 +419,12 @@
   [with_polkit=check])
 
 if test "$with_polkit" = "check"; then
-  PKG_CHECK_EXISTS(polkit-dbus >= $POLKIT_REQUIRED, [with_polkit=yes], [with_polkit=no])
+  dnl PKG_CHECK_EXISTS(polkit-dbus >= $POLKIT_REQUIRED, [with_polkit=yes], [with_polkit=no])
+  :
 fi
 
 if test "$with_polkit" = "yes"; then
-  PKG_CHECK_MODULES(POLKIT, polkit-dbus >= $POLKIT_REQUIRED)
+  dnl PKG_CHECK_MODULES(POLKIT, polkit-dbus >= $POLKIT_REQUIRED)
   AC_DEFINE_UNQUOTED(HAVE_POLKIT, 1, [use PolicyKit for UNIX socket access checks])
 fi
 AM_CONDITIONAL(HAVE_POLKIT, [test "$with_polkit" = "yes"])
@@ -435,13 +438,14 @@
   [with_avahi=check])
 
 if test "$with_avahi" = "check" -a "x$PKG_CONFIG" != "x" ; then
-  PKG_CHECK_EXISTS(avahi-client >= $AVAHI_REQUIRED, [with_avahi=yes], [with_avahi=no])
+  dnl PKG_CHECK_EXISTS(avahi-client >= $AVAHI_REQUIRED, [with_avahi=yes], [with_avahi=no])
+  :
 fi
 
 AVAHI_CFLAGS=
 AVAHI_LIBS=
 if test "$with_avahi" = "yes"; then
-  PKG_CHECK_MODULES(AVAHI, avahi-client >= $AVAHI_REQUIRED)
+  dnl PKG_CHECK_MODULES(AVAHI, avahi-client >= $AVAHI_REQUIRED)
   AC_DEFINE_UNQUOTED(HAVE_AVAHI, 1, [whether Avahi is used to broadcast server presense])
 fi
 AM_CONDITIONAL(HAVE_AVAHI, [test "$with_avahi" = "yes"])
Index: src/Makefile.am
===================================================================
RCS file: /data/cvs/libvirt/src/Makefile.am,v
retrieving revision 1.62
diff -u -r1.62 Makefile.am
--- src/Makefile.am	5 Jan 2008 16:06:36 -0000	1.62
+++ src/Makefile.am	22 Jan 2008 12:24:37 -0000
@@ -66,7 +66,7 @@
 libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
 libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
 		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
-libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
+libvirt_la_LDFLAGS = \
                      -version-info @LIBVIRT_VERSION_INFO@ \
                     $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
 		    @CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
Index: src/sexpr.c
===================================================================
RCS file: /data/cvs/libvirt/src/sexpr.c,v
retrieving revision 1.12
diff -u -r1.12 sexpr.c
--- src/sexpr.c	21 Jan 2008 14:22:15 -0000	1.12
+++ src/sexpr.c	22 Jan 2008 12:24:37 -0000
@@ -13,7 +13,7 @@
 #include "config.h"
 
 #include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
Index: src/socketcompat.h
===================================================================
RCS file: /data/cvs/libvirt/src/socketcompat.h,v
retrieving revision 1.1
diff -u -r1.1 socketcompat.h
--- src/socketcompat.h	5 Jan 2008 16:06:36 -0000	1.1
+++ src/socketcompat.h	22 Jan 2008 12:24:37 -0000
@@ -28,6 +28,7 @@
 #ifndef HAVE_WINSOCK2_H		/* Unix & Cygwin. */
 
 #include <sys/socket.h>
+#include <sys/un.h>
 #include <net/if.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]