Check in configure if selinux libraries are required in static version.
authorMilan Broz <gmazyland@gmail.com>
Sun, 15 Nov 2009 09:27:32 +0000 (09:27 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sun, 15 Nov 2009 09:27:32 +0000 (09:27 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@140 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
configure.in

index ac0798c..387a9ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-11-14  Milan Broz  <mbroz@redhat.com>
        * 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  <mbroz@redhat.com>
        * Fix exported symbols and versions in libcryptsetup.
index 75fe7a5..6a07903 100644 (file)
@@ -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)