From 16faeae0573a65437afa304a14226bc63996224d Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sun, 15 Nov 2009 09:27:32 +0000 Subject: [PATCH] Check in configure if selinux libraries are required in static version. git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@140 36d66b0a-2a48-0410-832c-cd162a569da5 --- ChangeLog | 1 + configure.in | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index ac0798c..387a9ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2009-11-14 Milan Broz * Add CRYPT_ prefix to enum defined in libcryptsetup.h. * Fix status call to fail when running as non-root user. + * Check in configure if selinux libraries are required in static version. 2009-09-30 Milan Broz * Fix exported symbols and versions in libcryptsetup. diff --git a/configure.in b/configure.in index 75fe7a5..6a07903 100644 --- a/configure.in +++ b/configure.in @@ -88,7 +88,18 @@ if test "x$enable_selinux" != xno; then LIBS=$saved_LIBS2 fi fi + +if test x$enable_static = xyes; then + saved_LIBS2=$LIBS + LIBS="$LIBS -static" + # Check if it there is still not some missing dependency like static selinux libs + AC_SEARCH_LIBS([dm_set_selinux_context], [devmapper],, + [AC_MSG_ERROR([Your system requires SElinux libraries for static compilation.])]) + LIBS=$saved_LIBS2 +fi + LIBS=$saved_LIBS + DEVMAPPER_LIBS="$DEVMAPPER_LIBS $LIB_PTHREAD" AC_SUBST(DEVMAPPER_LIBS) AC_SUBST(SELINUX_STATIC_LIBS) -- 2.7.4