Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
654c709b
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看板
提交
654c709b
编写于
9月 20, 2012
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert yajl check to use LIBVIRT_CHECK_LIB_ALT
Signed-off-by:
N
Daniel P. Berrange
<
berrange@redhat.com
>
上级
49a1c160
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
55 addition
and
85 deletion
+55
-85
configure.ac
configure.ac
+3
-84
m4/virt-yajl.m4
m4/virt-yajl.m4
+51
-0
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.c
+1
-1
未找到文件。
configure.ac
浏览文件 @
654c709b
...
...
@@ -155,6 +155,8 @@ AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
LIBVIRT_COMPILE_WARNINGS
LIBVIRT_CHECK_YAJL
AC_MSG_CHECKING([for CPUID instruction])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
...
...
@@ -1140,85 +1142,6 @@ AC_SUBST([SASL_CFLAGS])
AC_SUBST([SASL_LIBS])
dnl YAJL JSON library http://lloyd.github.com/yajl/
AC_ARG_WITH([yajl],
AC_HELP_STRING([--with-yajl], [use YAJL for JSON parsing/formatting @<:@default=check@:>@]),
[],
[with_yajl=check])
if test "$with_qemu:$with_yajl" = yes:check; then
dnl Some versions of qemu require the use of yajl; try to detect them
dnl here, although we do not require qemu to exist in order to compile.
dnl This check mirrors src/qemu/qemu_capabilities.c
AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64],
[], [$PATH:/usr/bin:/usr/libexec])
if test -x "$QEMU"; then
if `$QEMU -help | grep libvirt` >/dev/null; then
with_yajl=yes
else
[qemu_version_sed='s/.*ersion \([0-9.,]*\).*/\1/']
qemu_version=`$QEMU -version | sed "$qemu_version_sed"`
case $qemu_version in
[[1-9]].* | 0.15.* ) with_yajl=yes ;;
0.* | '' ) ;;
*) AC_MSG_ERROR([Unexpected qemu version string]) ;;
esac
fi
fi
fi
YAJL_CFLAGS=
YAJL_LIBS=
with_yajl2=no
if test "x$with_yajl" != "xno"; then
if test "x$with_yajl" != "xyes" && test "x$with_yajl" != "xcheck"; then
YAJL_CFLAGS="-I$with_yajl/include"
YAJL_LIBS="-L$with_yajl/lib"
fi
fail=0
old_cppflags="$CPPFLAGS"
old_libs="$LIBS"
CPPFLAGS="$CPPFLAGS $YAJL_CFLAGS"
LIBS="$LIBS $YAJL_LIBS"
AC_CHECK_HEADER([yajl/yajl_common.h],[],[
if test "x$with_yajl" = "xcheck" ; then
with_yajl=no
else
fail=1
fi])
if test "x$with_yajl" != "xno" ; then
AC_CHECK_LIB([yajl], [yajl_parse],[
YAJL_LIBS="$YAJL_LIBS -lyajl"
with_yajl=yes
AC_CHECK_LIB([yajl], [yajl_tree_parse],[
with_yajl2=yes
],[])
],[
if test "x$with_yajl" = "xcheck" ; then
with_yajl=no
else
fail=1
fi
])
fi
test $fail = 1 &&
AC_MSG_ERROR([You must install the YAJL development package in order to compile libvirt])
CPPFLAGS="$old_cppflags"
LIBS="$old_libs"
if test "x$with_yajl" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_YAJL], 1,
[whether YAJL is available for JSON parsing/formatting])
fi
if test "x$with_yajl2" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_YAJL2], 1,
[whether YAJL has API version 2])
fi
fi
AM_CONDITIONAL([WITH_YAJL], [test "x$with_yajl" = "xyes"])
AC_SUBST([YAJL_CFLAGS])
AC_SUBST([YAJL_LIBS])
dnl SANLOCK https://fedorahosted.org/sanlock/
AC_ARG_WITH([sanlock],
AC_HELP_STRING([--with-sanlock], [build Sanlock plugin for lock management @<:@default=check@:>@]),
...
...
@@ -3185,6 +3108,7 @@ fi
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Libraries])
AC_MSG_NOTICE([])
LIBVIRT_RESULT_YAJL
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
AC_MSG_NOTICE([ dlopen: $DLOPEN_LIBS])
if test "$have_curl" = "yes" ; then
...
...
@@ -3212,11 +3136,6 @@ AC_MSG_NOTICE([ sasl: $SASL_CFLAGS $SASL_LIBS])
else
AC_MSG_NOTICE([ sasl: no])
fi
if test "$with_yajl" != "no" ; then
AC_MSG_NOTICE([ yajl: $YAJL_CFLAGS $YAJL_LIBS])
else
AC_MSG_NOTICE([ yajl: no])
fi
if test "$with_sanlock" != "no" ; then
AC_MSG_NOTICE([ sanlock: $SANLOCK_CFLAGS $SANLOCK_LIBS])
else
...
...
m4/virt-yajl.m4
0 → 100644
浏览文件 @
654c709b
dnl The libyajl.so library
dnl
dnl Copyright (C) 2012-2013 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_CHECK_YAJL],[
dnl YAJL JSON library http://lloyd.github.com/yajl/
if test "$with_qemu:$with_yajl" = yes:check; then
dnl Some versions of qemu require the use of yajl; try to detect them
dnl here, although we do not require qemu to exist in order to compile.
dnl This check mirrors src/qemu/qemu_capabilities.c
AC_PATH_PROGS([QEMU], [qemu-kvm qemu kvm qemu-system-x86_64],
[], [$PATH:/usr/bin:/usr/libexec])
if test -x "$QEMU"; then
if `$QEMU -help | grep libvirt` >/dev/null; then
with_yajl=yes
else
[qemu_version_sed='s/.*ersion \([0-9.,]*\).*/\1/']
qemu_version=`$QEMU -version | sed "$qemu_version_sed"`
case $qemu_version in
[[1-9]].* | 0.15.* ) with_yajl=yes ;;
0.* | '' ) ;;
*) AC_MSG_ERROR([Unexpected qemu version string]) ;;
esac
fi
fi
fi
LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl],
[yajl_parse_complete], [yajl/yajl_common.h],
[YAJL2], [yajl],
[yajl_tree_parse], [yajl/yajl_common.h])
])
AC_DEFUN([LIBVIRT_RESULT_YAJL],[
LIBVIRT_RESULT_LIB([YAJL])
])
src/qemu/qemu_capabilities.c
浏览文件 @
654c709b
...
...
@@ -1160,7 +1160,7 @@ qemuCapsComputeCmdFlags(const char *help,
* libvirt but is targetting a newer qemu, we are better off
* telling them to recompile (the spec file includes the
* dependency, so distros won't hit this). This check is
* also in
configure.ac
(see $with_yajl). */
* also in
m4/virt-yajl.m4
(see $with_yajl). */
if
(
version
>=
15000
||
(
version
>=
12000
&&
strstr
(
help
,
"libvirt"
)))
{
if
(
check_yajl
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录