Skip to content

Commit

Permalink
Merge pull request lxc#2263 from ffontaine/master
Browse files Browse the repository at this point in the history
Fix compilation with static libcap and shared gnutls
  • Loading branch information
Christian Brauner authored Apr 9, 2018
2 parents 5eda487 + 49bc916 commit 4e256f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ AM_CONDITIONAL([ENABLE_GNUTLS], [test "x$enable_gnutls" = "xyes"])

AM_COND_IF([ENABLE_GNUTLS],
[AC_CHECK_HEADER([gnutls/gnutls.h],[],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])])
AC_CHECK_LIB([gnutls], [gnutls_hash_fast],[],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])])
AC_CHECK_LIB([gnutls], [gnutls_hash_fast],[true],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])])
AC_SUBST([GNUTLS_LIBS], [-lgnutls])])

# SELinux
Expand Down
8 changes: 6 additions & 2 deletions src/lxc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ if ENABLE_APPARMOR
AM_CFLAGS += -DHAVE_APPARMOR
endif

if ENABLE_GNUTLS
AM_CFLAGS += -DHAVE_LIBGNUTLS
endif

if ENABLE_SELINUX
AM_CFLAGS += -DHAVE_SELINUX
endif
Expand All @@ -196,7 +200,7 @@ liblxc_la_LDFLAGS = \
-Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \
-version-info @LXC_ABI_MAJOR@

liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)
liblxc_la_LIBADD = $(CAP_LIBS) $(GNUTLS_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS)

bin_SCRIPTS=

Expand Down Expand Up @@ -243,7 +247,7 @@ AM_LDFLAGS = -Wl,-E
if ENABLE_RPATH
AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
endif
LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
LDADD=liblxc.la @CAP_LIBS@ @GNUTLS_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@

if ENABLE_TOOLS
lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c tools/tool_utils.c
Expand Down

0 comments on commit 4e256f6

Please sign in to comment.