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

[Libvir] [PATCH] Remote 8/8: Build system



8 Build system
--------------

M .cvsignore
M configure.in
A libvirtd.conf
M src/Makefile.am
A RENAMES

These are the changes to make it build.

libvirtd.conf is a suggested configuration file. I'm not really sure if we should include this.

RENAMES is my collection of file renames that we might want to carry out to make the naming scheme of things like drivers in the libvirt source more consistent (particularly after xen-unified went it).

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421

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. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David
Owens (Ireland)
Index: .cvsignore
===================================================================
RCS file: /data/cvs/libvirt/.cvsignore,v
retrieving revision 1.7
diff -u -r1.7 .cvsignore
--- .cvsignore	15 Mar 2007 17:24:56 -0000	1.7
+++ .cvsignore	5 May 2007 11:42:36 -0000
@@ -28,3 +28,8 @@
 coverage
 results.log
 libvirt-*.tar.gz
+INSTALL
+compile
+depcomp
+install-sh
+missing
\ No newline at end of file
Index: configure.in
===================================================================
RCS file: /data/cvs/libvirt/configure.in,v
retrieving revision 1.70
diff -u -r1.70 configure.in
--- configure.in	17 Apr 2007 09:33:51 -0000	1.70
+++ configure.in	5 May 2007 11:42:36 -0000
@@ -67,13 +67,15 @@
             [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
 AC_SUBST(HTML_DIR)
 
-dnl Allow to build without Xen, QEMU/KVM or test driver
+dnl Allow to build without Xen, QEMU/KVM, test or remote driver
 AC_ARG_WITH(xen,
 [  --with-xen              add XEN support (on)])
 AC_ARG_WITH(qemu,
 [  --with-qemu             add QEMU/KVM support (on)])
 AC_ARG_WITH(test,
 [  --with-test             add test driver support (on)])
+AC_ARG_WITH(remote,
+[  --with-remote           add remote driver support (on)])
 
 dnl
 dnl specific tests to setup DV devel environments with debug etc ...
@@ -108,6 +110,18 @@
 AC_SUBST(QEMUD_PID_FILE)
 AC_MSG_RESULT($QEMUD_PID_FILE)
 
+AC_MSG_CHECKING([where to write libvirtd PID file])
+AC_ARG_WITH(remote-pid-file, AC_HELP_STRING([--with-remote-pid-file=[pidfile|none]], [PID file for libvirtd]))
+if test "x$with_remote_pid_file" == "x" ; then
+   REMOTE_PID_FILE="$localstatedir/run/libvirtd.pid"
+elif test "x$with_remote_pid_file" == "xnone" ; then
+   REMOTE_PID_FILE=""
+else
+   REMOTE_PID_FILE="$with_remote_pid_file"
+fi
+AC_SUBST(REMOTE_PID_FILE)
+AC_MSG_RESULT($REMOTE_PID_FILE)
+
 dnl
 dnl init script flavor
 dnl
@@ -183,6 +197,12 @@
     LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_TEST"
 fi
 
+if test "$with_remote" = "no" ; then
+    echo "Disabling remote driver support"
+else
+    LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_REMOTE"
+fi
+
 if test "$with_depends" != "no"
 then
 
@@ -264,6 +284,22 @@
 AC_SUBST(LIBXML_CONFIG)
 AC_SUBST(LIBXML_MIN_VERSION)
 
+dnl xmlURI structure has query_raw?
+old_cflags="$CFLAGS"
+CFLAGS="$CFLAGS $LIBXML_CFLAGS"
+AC_CHECK_MEMBER(struct _xmlURI.query_raw,
+		[AC_DEFINE(HAVE_XMLURI_QUERY_RAW, [], [Have query_raw field in libxml2 xmlURI structure])],,
+		[#include <libxml/uri.h>])
+CFLAGS="$old_cflags"
+
+dnl GnuTLS library
+AC_CHECK_HEADER([gnutls/gnutls.h],
+       [],
+       AC_MSG_ERROR([You must install the GnuTLS development package in order to compile libvirt]))
+AC_CHECK_LIB(gnutls, gnutls_handshake,
+       [],
+       [AC_MSG_ERROR([You must install the GnuTLS library in order to compile and run libvirt])])
+
 dnl virsh libraries
 AC_CHECK_LIB(curses, initscr, 
 	[VIRSH_LIBS="$VIRSH_LIBS -lcurses"],
Index: src/Makefile.am
===================================================================
RCS file: /data/cvs/libvirt/src/Makefile.am,v
retrieving revision 1.37
diff -u -r1.37 Makefile.am
--- src/Makefile.am	4 Apr 2007 14:19:49 -0000	1.37
+++ src/Makefile.am	5 May 2007 11:42:36 -0000
@@ -1,9 +1,16 @@
 ## Process this file with automake to produce Makefile.in
 
-INCLUDES = -I$(top_builddir)/include -I top_srcdir@/include @LIBXML_CFLAGS@ -I top_srcdir@/qemud \
-	   -DBINDIR=\""$(libexecdir)"\" -DSBINDIR=\""$(sbindir)"\" -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
+INCLUDES = -I$(top_builddir)/include \
+	   -I top_srcdir@/include \
+	   -I top_srcdir@/qemud \
+	   @LIBXML_CFLAGS@ \
+	   -DBINDIR=\""$(libexecdir)"\" \
+	   -DSBINDIR=\""$(sbindir)"\" \
+	   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
            -DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-           -DGETTEXT_PACKAGE=\"$(PACKAGE)\" $(WARN_CFLAGS) $(LIBVIRT_FEATURES)
+           -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
+	   $(WARN_CFLAGS) \
+	   $(LIBVIRT_FEATURES)
 DEPS = libvirt.la
 LDADDS = @STATIC_BINARIES@ libvirt.la
 VIRSH_LIBS = @VIRSH_LIBS@
@@ -31,7 +38,10 @@
 		proxy_internal.c proxy_internal.h		\
 		conf.c conf.h                                   \
 		xm_internal.c xm_internal.h                     \
-		qemu_internal.c qemu_internal.h
+		../qemud/protocol.h ../qemud/protocol.c		\
+		qemu_internal.c qemu_internal.h			\
+		../qemud/remote_protocol.c ../qemud/remote_protocol.h \
+		remote_internal.c remote_internal.h
 
 bin_PROGRAMS = virsh
 
# Example /etc/libvirt/libvirtd.conf file.

tls_no_verify_certificate = 1
# Suggested list of file renames.
#
# File renames don't normally go into patches because they make
# the patches much harder to read, so list them here instead.
#
# $Id$

# Clearer naming scheme after Xen-unified patch went in.
src/xen_internal.c	src/xen_internal_hv.c
src/xen_internal.h	src/xen_internal_hv.h
src/proxy_internal.c	src/xen_internal_proxy.c
src/proxy_internal.h	src/xen_internal_proxy.h
src/xend_internal.c	src/xen_internal_xend.c
src/xend_internal.h	src/xen_internal_xend.h
src/xm_internal.c	src/xen_internal_inactive.c
src/xm_internal.h	src/xen_internal_inactive.h
src/xs_internal.c	src/xen_internal_xenstore.c
src/xs_internal.h	src/xen_internal_xenstore.h
src/xen_unified.c	src/xen_internal.c
src/xen_unified.h	src/xen_internal.h

# Test driver should really be called test_internal.
src/test.c		src/test_internal.c
src/test.h		src/test_internal.h

# This would be better:
src/*_internal*.c	src/*_driver*.c
src/*_internal*.h	src/*_driver*.h

# Qemud is now the qemud + remote driver.
qemud/protocol.x	qemud/qemud_protocol.x
qemud/*			remote/*

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


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