]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
* AUTHORS NEWS README autogen.sh configure.in: allow autogen.sh and
authorDaniel Veillard <veillard@redhat.com>
Wed, 2 Nov 2005 13:19:10 +0000 (13:19 +0000)
committerDaniel Veillard <veillard@redhat.com>
Wed, 2 Nov 2005 13:19:10 +0000 (13:19 +0000)
  configure to start working
* src/Makefile.am src/internal.h src/libxen.c: make the first compile
Daniel

AUTHORS [new file with mode: 0644]
ChangeLog
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.in
src/Makefile.am
src/internal.h [new file with mode: 0644]
src/libxen.c

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..410def3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
index 3d4bf1d5864bde1de9439d6028d02fab833e2ab1..0a1f7f104549cfb57c2e7ff717e24c93219c3f1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Nov  2 14:17:50 CET 2005 Daniel Veillard <veillard@redhat.com>
+
+       * AUTHORS NEWS README autogen.sh configure.in: allow autogen.sh and
+         configure to start working
+       * src/Makefile.am src/internal.h src/libxen.c: make the first compile
+
 Wed Nov  2 13:44:47 CET 2005 Daniel Veillard <veillard@redhat.com>
 
        * src/libxen.c src/Makefile.am include/libxen.h configure.in
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..656ec62
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,2 @@
+Wed Nov 2 2005
+   - the very first work was checked in a CVS on veillard.com
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..94c569f
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
+
+         LibXen : simple library to use the Xen hypervisor
+
+  As of Wed Nov 2 2005, this is a completely new project, it is not
+usable in any way yet.
+
+Daniel Veillard <veillard@redhat.com>
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..60e36c6
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=. 
+
+THEDIR=`pwd`
+cd $srcdir
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have autoconf installed to compile libxen."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/autoconf"
+       DIE=1
+}
+
+(libtool --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have libtool installed to compile libxen."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/libtool"
+       DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       DIE=1
+       echo "You must have automake installed to compile libxen."
+       echo "Download the appropriate package for your distribution,"
+       echo "or see http://www.gnu.org/software/automake"
+}
+
+if test "$DIE" -eq 1; then
+       exit 1
+fi
+
+test -f src/libxen.c || {
+       echo "You must run this script in the top-level libxen directory"
+       exit 1
+}
+
+if test -z "$*"; then
+       echo "I am going to run ./configure with no arguments - if you wish "
+        echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+libtoolize --copy --force
+aclocal $ACLOCAL_FLAGS
+automake --add-missing
+autoconf
+
+cd $THEDIR
+
+if test x$OBJ_DIR != x; then
+    mkdir -p "$OBJ_DIR"
+    cd "$OBJ_DIR"
+fi
+
+$srcdir/configure "$@"
+
+echo 
+echo "Now type 'make' to compile libxen."
index 5b5c9c92b1ccd139439e49aeeb332ebc9c2955cb..6178060ec7522e914dcb43e0ac7066c828fe5cbf 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(entities.c)
+AC_INIT(src/libxen.c)
 AM_CONFIG_HEADER(config.h)
 AC_CANONICAL_HOST
 
@@ -33,3 +33,21 @@ VERSION=${LIBXEN_VERSION}
 
 AM_INIT_AUTOMAKE(libxen, $VERSION)
 
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_CPP
+AC_PATH_PROG(RM, rm, /bin/rm)
+AC_PATH_PROG(MV, mv, /bin/mv)
+AC_PATH_PROG(TAR, tar, /bin/tar)
+
+dnl Make sure we have an ANSI compiler
+AM_C_PROTOTYPES
+test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
+
+AM_PROG_LIBTOOL
+
+dnl search for the low level Xen library
+AC_SEARCH_LIBS(xc_domain_create, [xenctrl])
+
+AC_OUTPUT(Makefile src/Makefile)
index c848c79d0fb8dc8474cfc4173bb816a607b4450f..14b7902cd7fba20230d3722e9a2d3ad65595a955 100644 (file)
@@ -4,5 +4,5 @@ INCLUDES = -I$(top_builddir)/include -I@srcdir@/include
 
 lib_LTLIBRARIES = libxen.la
 libxen_la_LIBADD = 
-libxen_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
+libxen_la_LDFLAGS = -version-info @LIBXEN_VERSION_INFO@
 libxen_la_SOURCES = libxen.c
diff --git a/src/internal.h b/src/internal.h
new file mode 100644 (file)
index 0000000..ca13e36
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * internal.h: internal definitions just used by code from the library
+ */
+
+#ifndef __XEN_INTERNAL_H__
+#define __XEN_INTERNAL_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __XEN_INTERNAL_H__ */
index e7d56088b9ec45c5d5a230204ae474e80e9ded13..941fbbde0293090e6dcb206c3feaa482dee1a690 100644 (file)
@@ -11,7 +11,8 @@
 
 #include "libxen.h"
 
-#include "memory.h"
+#include <stdio.h>
+
 #include "internal.h"
 
 /*
@@ -29,7 +30,7 @@
 struct _xenConnect {
     unsigned int magic;                /* specific value to check */
     int                 handle;        /* internal handle used for hypercall */
-}
+};
 
 /**
  * xenGetConnect:
@@ -41,7 +42,7 @@ struct _xenConnect {
  * Returns a pointer to the hypervisor connection or NULL in case of error
  */
 xenConnectPtr
-xenOpenConnect(const char *name ATTRIBUTE_UNUSED) {
+xenOpenConnect(const char *name) {
     return(NULL);
 }
 
@@ -74,3 +75,4 @@ xenCloseConnect(xenConnectPtr conn) {
  * @conn: pointer to the hypervisor connection
  *
  * Get the version level of the Hypervisor running
+ */