aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog6
-rw-r--r--NEWS2
-rw-r--r--README7
-rwxr-xr-xautogen.sh64
-rw-r--r--configure.in20
-rw-r--r--src/Makefile.am2
-rw-r--r--src/internal.h27
-rw-r--r--src/libxen.c8
9 files changed, 132 insertions, 5 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 000000000..410def36a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
diff --git a/ChangeLog b/ChangeLog
index 3d4bf1d58..0a1f7f104 100644
--- 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
index 000000000..656ec62c2
--- /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
index 000000000..94c569fda
--- /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
index 000000000..60e36c64f
--- /dev/null
+++ b/autogen.sh
@@ -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."
diff --git a/configure.in b/configure.in
index 5b5c9c92b..6178060ec 100644
--- a/configure.in
+++ b/configure.in
@@ -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)
diff --git a/src/Makefile.am b/src/Makefile.am
index c848c79d0..14b7902cd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
index 000000000..ca13e360c
--- /dev/null
+++ b/src/internal.h
@@ -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__ */
diff --git a/src/libxen.c b/src/libxen.c
index e7d56088b..941fbbde0 100644
--- a/src/libxen.c
+++ b/src/libxen.c
@@ -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
+ */