Commit 03b96a57 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Improve check for static lzma/zlib

Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent b9031e08
......@@ -114,6 +114,8 @@ LIBVIRT_SANDBOX_SELINUX
LIBVIRT_SANDBOX_XDR
LIBVIRT_SANDBOX_STATIC_LIBC
LIBVIRT_SANDBOX_STATIC_LZMA
LIBVIRT_SANDBOX_STATIC_ZLIB
dnl search for LDD path
AC_PATH_PROG([LDD_PATH], [ldd])
......
......@@ -30,3 +30,28 @@ AC_DEFUN([LIBVIRT_SANDBOX_STATIC_LIBC], [
[#include <stdio.h>],
[printf("bar");])
])
AC_DEFUN([LIBVIRT_SANDBOX_STATIC_LZMA], [
old_LIBS="$LIBS"
LIBS="-llzma"
LIBVIRT_SANDBOX_STATIC_LIB(
[LZMA],
[],
[],
[#include <lzma.h>
#include <stdio.h>],
[lzma_code(NULL, 0);])
LIBS="$old_LIBS"
])
AC_DEFUN([LIBVIRT_SANDBOX_STATIC_ZLIB], [
old_LIBS="$LIBS"
LIBS="-lz"
LIBVIRT_SANDBOX_STATIC_LIB(
[ZLIB],
[],
[],
[#include <zlib.h>
#include <stdio.h>],
[gzread(NULL, NULL, 0);])
LIBS="$old_LIBS"
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment