mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Switch to use pkg-config to find gnutls
This commit is contained in:
parent
e04914328d
commit
27b4293285
@ -1,3 +1,9 @@
|
||||
Wed Sep 19 13:39:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.in: Use pkg-config to locate gnutls if pkg-config
|
||||
is available. Add $(GNUTLS_LIBS) $(GNUTLS_CFLAGS) to all the
|
||||
relevant make targets
|
||||
|
||||
Wed Sep 19 09:48:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* configure.in: Make sure we use pkg-config for libxml, where
|
||||
|
24
configure.in
24
configure.in
@ -23,6 +23,7 @@ AC_SUBST(LIBVIRT_VERSION_NUMBER)
|
||||
|
||||
dnl Required minimum versions of all libs we depend on
|
||||
LIBXML_REQUIRED="2.5.0"
|
||||
GNUTLS_REQUIRED="1.2.0"
|
||||
AVAHI_REQUIRED="0.6.0"
|
||||
|
||||
dnl Checks for programs.
|
||||
@ -292,20 +293,38 @@ CFLAGS="$old_cflags"
|
||||
LDFLAGS="$old_ldflags"
|
||||
|
||||
dnl GnuTLS library
|
||||
AC_CHECK_HEADER([gnutls/gnutls.h],
|
||||
GNUTLS_CFLAGS=
|
||||
GNUTLS_LIBS=
|
||||
if test "x$PKG_CONFIG" != "x" ; then
|
||||
PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED)
|
||||
else
|
||||
AC_CHECK_HEADER([gnutls/gnutls.h],
|
||||
[],
|
||||
AC_MSG_ERROR([You must install the GnuTLS development package in order to compile libvirt]))
|
||||
AC_CHECK_LIB(gnutls, gnutls_handshake,
|
||||
old_libs="$LIBS"
|
||||
AC_CHECK_LIB(gnutls, gnutls_handshake,
|
||||
[],
|
||||
[AC_MSG_ERROR([You must install the GnuTLS library in order to compile and run libvirt])])
|
||||
GNUTLS_LIBS=$LIBS
|
||||
LIBS="$old_libs"
|
||||
fi
|
||||
|
||||
AC_SUBST(GNUTLS_CFLAGS)
|
||||
AC_SUBST(GNUTLS_LIBS)
|
||||
|
||||
dnl Old versions of GnuTLS uses types like 'gnutls_session' instead
|
||||
dnl of 'gnutls_session_t'. Try to detect this type if defined so
|
||||
dnl that we can offer backwards compatibility.
|
||||
old_cflags="$CFLAGS"
|
||||
old_ldflags="$LDFLAGS"
|
||||
CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $GNUTLS_LIBS"
|
||||
AC_CHECK_TYPE(gnutls_session,
|
||||
AC_DEFINE(GNUTLS_1_0_COMPAT,[],
|
||||
[enable GnuTLS 1.0 compatibility macros]),,
|
||||
[#include <gnutls/gnutls.h>])
|
||||
CFLAGS="$old_cflags"
|
||||
LDFLAGS="$old_ldflags"
|
||||
|
||||
|
||||
dnl Avahi library
|
||||
@ -513,6 +532,7 @@ AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Libraries])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
|
||||
AC_MSG_NOTICE([ gnutls: $GNUTLS_CFLAGS $GNUTLS_LIBS])
|
||||
if test "$with_avahi" = "yes" ; then
|
||||
AC_MSG_NOTICE([ avahi: $AVAHI_CFLAGS $AVAHI_LIBS])
|
||||
else
|
||||
|
@ -1,6 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = @LIBXML_CFLAGS@
|
||||
UUID=$(shell uuidgen)
|
||||
|
||||
sbin_PROGRAMS = libvirtd
|
||||
@ -26,14 +25,15 @@ libvirtd_SOURCES = \
|
||||
|
||||
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
||||
libvirtd_CFLAGS = \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include $(LIBXML_CFLAGS) \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include \
|
||||
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) \
|
||||
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
|
||||
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
||||
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\"" \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
|
||||
libvirtd_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS)
|
||||
libvirtd_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS)
|
||||
libvirtd_DEPENDENCIES = ../src/libvirt.la
|
||||
libvirtd_LDADD = ../src/libvirt.la
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I@top_srcdir@/include \
|
||||
-I@top_srcdir@/qemud \
|
||||
@LIBXML_CFLAGS@ \
|
||||
$(LIBXML_CFLAGS) \
|
||||
$(GNUTLS_CFLAGS) \
|
||||
-DBINDIR=\""$(libexecdir)"\" \
|
||||
-DSBINDIR=\""$(sbindir)"\" \
|
||||
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
||||
@ -19,7 +20,7 @@ VIRSH_LIBS = @VIRSH_LIBS@
|
||||
EXTRA_DIST = libvirt_sym.version
|
||||
|
||||
lib_LTLIBRARIES = libvirt.la
|
||||
libvirt_la_LIBADD = @LIBXML_LIBS@
|
||||
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS)
|
||||
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
|
||||
-version-info @LIBVIRT_VERSION_INFO@ \
|
||||
$(COVERAGE_CFLAGS:-f%=-Wc,-f%)
|
||||
|
@ -15,7 +15,8 @@ INCLUDES = \
|
||||
-I$(top_builddir)/src \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src \
|
||||
@LIBXML_CFLAGS@ \
|
||||
$(LIBXML_CFLAGS) \
|
||||
$(GNUTLS_CFLAGS) \
|
||||
-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
|
||||
$(COVERAGE_CFLAGS) \
|
||||
@ -24,7 +25,8 @@ INCLUDES = \
|
||||
|
||||
LDADDS = \
|
||||
@STATIC_BINARIES@ \
|
||||
@LIBXML_LIBS@ \
|
||||
$(LIBXML_LIBS) \
|
||||
$(GNUTLS_LIBS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(LIBVIRT) \
|
||||
$(COVERAGE_LDFLAGS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user