Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
9dcfa182
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9dcfa182
编写于
12月 12, 2016
作者:
P
Pavel Hrdina
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
configure: move libxl driver check to its own file
Signed-off-by:
N
Pavel Hrdina
<
phrdina@redhat.com
>
上级
10ecd902
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
109 addition
and
80 deletion
+109
-80
configure.ac
configure.ac
+4
-80
m4/virt-driver-libxl.m4
m4/virt-driver-libxl.m4
+105
-0
未找到文件。
configure.ac
浏览文件 @
9dcfa182
...
...
@@ -404,7 +404,7 @@ LIBVIRT_DRIVER_ARG_OPENVZ
LIBVIRT_DRIVER_ARG_VMWARE
LIBVIRT_ARG_WITH([PHYP], [PHYP], [check])
LIBVIRT_ARG_WITH([XENAPI], [XenAPI], [check])
LIBVIRT_
ARG_WITH([LIBXL], [libxenlight], [check])
LIBVIRT_
DRIVER_ARG_LIBXL
LIBVIRT_ARG_WITH([VBOX], [VirtualBox XPCOMC], [yes])
LIBVIRT_DRIVER_ARG_LXC
LIBVIRT_ARG_WITH([ESX], [ESX], [check])
...
...
@@ -539,79 +539,7 @@ fi
AC_SUBST([LIBXENSERVER_CFLAGS])
AC_SUBST([LIBXENSERVER_LIBS])
old_LIBS="$LIBS"
old_CFLAGS="$CFLAGS"
LIBXL_LIBS=""
LIBXL_CFLAGS=""
LIBXL_FIRMWARE_DIR=""
LIBXL_EXECBIN_DIR=""
dnl search for libxl, aka libxenlight
dnl Xen > 4.5 introduced a pkgconfig file, check for it first
fail=0
if test "$with_libxl" != "no" ; then
PKG_CHECK_MODULES([LIBXL], [xenlight], [
LIBXL_FIRMWARE_DIR=`$PKG_CONFIG --variable xenfirmwaredir xenlight`
LIBXL_EXECBIN_DIR=`$PKG_CONFIG --variable libexec_bin xenlight`
with_libxl=yes
], [LIBXL_FOUND=no])
if test "$LIBXL_FOUND" = "no"; then
dnl No xenlight pkg-config file
if test "$with_libxl" != "yes" && test "$with_libxl" != "check" ; then
LIBXL_CFLAGS="-I$with_libxl/include"
LIBXL_LIBS="-L$with_libxl"
fi
CFLAGS="$CFLAGS $LIBXL_CFLAGS"
LIBS="$LIBS $LIBXL_LIBS"
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
with_libxl=yes
LIBXL_LIBS="$LIBXL_LIBS -lxenlight"
],[
if test "$with_libxl" = "yes"; then
fail=1
fi
with_libxl=no
])
fi
fi
# LIBXL_API_VERSION 4.4.0 introduced a new parameter to
# libxl_domain_create_restore for specifying restore parameters.
# The libxl driver will make use of this new parameter for specifying
# the Xen migration stream version.
LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040400"
LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS"
if test $fail = 1; then
AC_MSG_ERROR([You must install the libxl Library from Xen >= 4.2 to compile libxenlight driver with -lxl])
fi
if test "$with_libxl" = "yes"; then
dnl If building with libxl, use the libxl utility header and lib too
AC_CHECK_HEADERS([libxlutil.h])
LIBXL_LIBS="$LIBXL_LIBS -lxlutil"
AC_DEFINE_UNQUOTED([WITH_LIBXL], 1, [whether libxenlight driver is enabled])
if test "x$LIBXL_FIRMWARE_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_FIRMWARE_DIR], ["$LIBXL_FIRMWARE_DIR"], [directory containing Xen firmware blobs])
fi
if test "x$LIBXL_EXECBIN_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_EXECBIN_DIR], ["$LIBXL_EXECBIN_DIR"], [directory containing Xen libexec binaries])
fi
dnl Check if the xtl_* infrastructure is in libxentoollog
dnl (since Xen 4.7) if not then assume it is in libxenctrl
dnl (as it was for 4.6 and earler)
AC_CHECK_LIB([xentoollog], [xtl_createlogger_stdiostream], [
LIBXL_LIBS="$LIBXL_LIBS -lxentoollog"
],[
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
])
fi
AM_CONDITIONAL([WITH_LIBXL], [test "$with_libxl" = "yes"])
AC_SUBST([LIBXL_CFLAGS])
AC_SUBST([LIBXL_LIBS])
LIBVIRT_DRIVER_CHECK_LIBXL
LIBVIRT_DRIVER_CHECK_XEN
AM_CONDITIONAL([WITH_XENCONFIG], [test "$with_libxl" = "yes" || test "$with_xen" = "yes"])
...
...
@@ -1505,7 +1433,7 @@ LIBVIRT_DRIVER_RESULT_OPENVZ
LIBVIRT_DRIVER_RESULT_VMWARE
AC_MSG_NOTICE([ VBox: $with_vbox])
AC_MSG_NOTICE([ XenAPI: $with_xenapi])
AC_MSG_NOTICE([ xenlight: $with_libxl])
LIBVIRT_DRIVER_RESULT_LIBXL
LIBVIRT_DRIVER_RESULT_LXC
AC_MSG_NOTICE([ PHYP: $with_phyp])
AC_MSG_NOTICE([ ESX: $with_esx])
...
...
@@ -1561,6 +1489,7 @@ LIBVIRT_RESULT_HAL
LIBVIRT_RESULT_LIBNL
LIBVIRT_RESULT_LIBPCAP
LIBVIRT_RESULT_LIBSSH
LIBVIRT_RESULT_LIBXL
LIBVIRT_RESULT_LIBXML
LIBVIRT_RESULT_MACVTAP
LIBVIRT_RESULT_NETCF
...
...
@@ -1585,11 +1514,6 @@ AC_MSG_NOTICE([ xenapi: $LIBXENSERVER_CFLAGS $LIBXENSERVER_LIBS])
else
AC_MSG_NOTICE([ xenapi: no])
fi
if test "$with_libxl" = "yes" ; then
AC_MSG_NOTICE([xenlight: $LIBXL_CFLAGS $LIBXL_LIBS])
else
AC_MSG_NOTICE([xenlight: no])
fi
if test "$with_storage_rbd" = "yes" ; then
AC_MSG_NOTICE([ rbd: $LIBRBD_LIBS])
else
...
...
m4/virt-driver-libxl.m4
0 → 100644
浏览文件 @
9dcfa182
dnl The libxl driver
dnl
dnl Copyright (C) 2016 Red Hat, Inc.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
dnl
AC_DEFUN([LIBVIRT_DRIVER_ARG_LIBXL], [
LIBVIRT_ARG_WITH([LIBXL], [libxenlight], [check])
])
AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBXL], [
old_LIBS="$LIBS"
old_CFLAGS="$CFLAGS"
LIBXL_LIBS=""
LIBXL_CFLAGS=""
LIBXL_FIRMWARE_DIR=""
LIBXL_EXECBIN_DIR=""
dnl search for libxl, aka libxenlight
dnl Xen > 4.5 introduced a pkgconfig file, check for it first
fail=0
if test "$with_libxl" != "no" ; then
PKG_CHECK_MODULES([LIBXL], [xenlight], [
LIBXL_FIRMWARE_DIR=`$PKG_CONFIG --variable xenfirmwaredir xenlight`
LIBXL_EXECBIN_DIR=`$PKG_CONFIG --variable libexec_bin xenlight`
with_libxl=yes
], [LIBXL_FOUND=no])
if test "$LIBXL_FOUND" = "no"; then
dnl No xenlight pkg-config file
if test "$with_libxl" != "yes" && test "$with_libxl" != "check" ; then
LIBXL_CFLAGS="-I$with_libxl/include"
LIBXL_LIBS="-L$with_libxl"
fi
CFLAGS="$CFLAGS $LIBXL_CFLAGS"
LIBS="$LIBS $LIBXL_LIBS"
AC_CHECK_LIB([xenlight], [libxl_ctx_alloc], [
with_libxl=yes
LIBXL_LIBS="$LIBXL_LIBS -lxenlight"
],[
if test "$with_libxl" = "yes"; then
fail=1
fi
with_libxl=no
])
fi
fi
dnl LIBXL_API_VERSION 4.4.0 introduced a new parameter to
dnl libxl_domain_create_restore for specifying restore parameters.
dnl The libxl driver will make use of this new parameter for specifying
dnl the Xen migration stream version.
LIBXL_CFLAGS="$LIBXL_CFLAGS -DLIBXL_API_VERSION=0x040400"
LIBS="$old_LIBS"
CFLAGS="$old_CFLAGS"
if test $fail = 1; then
AC_MSG_ERROR([You must install the libxl Library from Xen >= 4.2 to compile libxenlight driver with -lxl])
fi
if test "$with_libxl" = "yes"; then
dnl If building with libxl, use the libxl utility header and lib too
AC_CHECK_HEADERS([libxlutil.h])
LIBXL_LIBS="$LIBXL_LIBS -lxlutil"
AC_DEFINE_UNQUOTED([WITH_LIBXL], 1, [whether libxenlight driver is enabled])
if test "x$LIBXL_FIRMWARE_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_FIRMWARE_DIR], ["$LIBXL_FIRMWARE_DIR"], [directory containing Xen firmware blobs])
fi
if test "x$LIBXL_EXECBIN_DIR" != "x"; then
AC_DEFINE_UNQUOTED([LIBXL_EXECBIN_DIR], ["$LIBXL_EXECBIN_DIR"], [directory containing Xen libexec binaries])
fi
dnl Check if the xtl_* infrastructure is in libxentoollog
dnl (since Xen 4.7) if not then assume it is in libxenctrl
dnl (as it was for 4.6 and earler)
AC_CHECK_LIB([xentoollog], [xtl_createlogger_stdiostream], [
LIBXL_LIBS="$LIBXL_LIBS -lxentoollog"
],[
LIBXL_LIBS="$LIBXL_LIBS -lxenctrl"
])
fi
AM_CONDITIONAL([WITH_LIBXL], [test "$with_libxl" = "yes"])
AC_SUBST([LIBXL_CFLAGS])
AC_SUBST([LIBXL_LIBS])
])
AC_DEFUN([LIBVIRT_RESULT_LIBXL], [
LIBVIRT_RESULT_LIB([LIBXL])
])
AC_DEFUN([LIBVIRT_DRIVER_RESULT_LIBXL], [
LIBVIRT_RESULT([libxl], [$with_libxl])
])
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录