Commit b9031e08 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Search for standalone xdr library

Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent e5e9cc99
......@@ -111,6 +111,7 @@ LIBVIRT_SANDBOX_WIN32
LIBVIRT_SANDBOX_COVERAGE
LIBVIRT_SANDBOX_RPCGEN
LIBVIRT_SANDBOX_SELINUX
LIBVIRT_SANDBOX_XDR
LIBVIRT_SANDBOX_STATIC_LIBC
......
......@@ -157,6 +157,7 @@ libvirt_sandbox_1_0_la_CFLAGS = \
$(LIBVIRT_GLIB_CFLAGS) \
$(LIBVIRT_GOBJECT_CFLAGS) \
$(SELINUX_CFLAGS) \
$(XDR_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
libvirt_sandbox_1_0_la_LIBADD = \
......@@ -165,6 +166,7 @@ libvirt_sandbox_1_0_la_LIBADD = \
$(LIBVIRT_GOBJECT_LIBS) \
$(SELINUX_LIBS) \
$(CYGWIN_EXTRA_LIBADD) \
$(XDR_LIBS) \
$(NULL)
libvirt_sandbox_1_0_la_DEPENDENCIES = \
libvirt-sandbox.sym
......@@ -194,6 +196,7 @@ libvirt_sandbox_init_common_CFLAGS = \
$(GIO_UNIX_CFLAGS) \
$(CAPNG_CFLAGS) \
$(SELINUX_CFLAGS) \
$(XDR_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)
libvirt_sandbox_init_common_LDFLAGS = \
......@@ -203,6 +206,7 @@ libvirt_sandbox_init_common_LDFLAGS = \
$(LIBVIRT_GCONFIG_LIBS) \
$(CAPNG_LIBS) \
$(SELINUX_LIBS) \
$(XDR_LIBS) \
$(WARN_CFLAGS) \
$(NULL)
libvirt_sandbox_init_common_LDADD = \
......
AC_DEFUN([LIBVIRT_SANDBOX_XDR], [
old_LIBS="$LIBS"
AC_SEARCH_LIBS([xdrmem_create], [portablexdr rpc xdr nsl tirpc], [
XDR_LIBS="$ac_cv_search_xdrmem_create"
],[
AC_MSG_ERROR([Cannot find a XDR library])
])
LIBS="$old_LIBS"
AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [
for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do
if test x"$add_CFLAGS" = xmissing; then
lv_cv_xdr_cflags=missing; break
fi
CFLAGS="$old_CFLAGS $add_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <rpc/rpc.h>
]])], [lv_cv_xdr_cflags=${add_CFLAGS:-none}; break])
done
])
CFLAGS=$old_CFLAGS
case $lv_cv_xdr_cflags in
none) XDR_CFLAGS= ;;
missing) AC_MSG_ERROR([Unable to find <rpc/rpc.h>]) ;;
*) XDR_CFLAGS=$lv_cv_xdr_cflags ;;
esac
AC_SUBST([XDR_LIBS])
AC_SUBST([XDR_CFLAGS])
])
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