[systemd-commits] 2 commits - configure.ac
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Feb 8 02:48:28 PST 2011
configure.ac | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 591622d7efbc828f00f190d91b6608148b967ff5
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Feb 8 11:44:38 2011 +0100
build-sys: ensure selinux configure check follows logic of other optional features
diff --git a/configure.ac b/configure.ac
index c0789de..08f3646 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,15 +115,18 @@ PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
-PKG_CHECK_MODULES(SELINUX, libselinux,
- have_selinux=yes,
- have_selinux=no)
-if test "x$have_selinux" = "xyes" ; then
- AC_DEFINE(HAVE_SELINUX, [], [Define if SELINUX is available])
+have_selinux=no
+AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
+if test "x$enable_selinux" != "xno"; then
+ PKG_CHECK_MODULES(SELINUX, [ libselinux ],
+ [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
+ AC_SUBST(SELINUX_CFLAGS)
+ AC_SUBST(SELINUX_LIBS)
+ if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
+ AC_MSG_ERROR([*** SELinux support requested but libraries not found])
+ fi
fi
-AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
-AC_SUBST(SELINUX_CFLAGS)
-AC_SUBST(SELINUX_LIBS)
+AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
AC_ARG_ENABLE([tcpwrap],
AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
@@ -230,7 +233,7 @@ if test "x$enable_libcryptsetup" != "xno"; then
AC_SUBST(LIBCRYPTSETUP_CFLAGS)
AC_SUBST(LIBCRYPTSETUP_LIBS)
if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
- AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
+ AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
commit 990d8b885badec2e0398b5f69457af2c7c84e518
Author: Alexey Shabalin <a.shabalin at gmail.com>
Date: Thu Jan 27 15:44:39 2011 +0300
build-sys: autodetect and use pkg-config for libselinux
Hi!
libselinux has a pkg-config file:
$ rpm -qf /usr/lib64/pkgconfig/libselinux.pc
libselinux-devel-2.0.98-alt1
$ cat /usr/lib64/pkgconfig/libselinux.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=/usr/include
Name: libselinux
Description: SELinux utility library
Version: 2.0.98
URL: http://userspace.selinuxproject.org/
Libs.private: -lsepol
Libs: -lselinux
Cflags:
Patch for use pkg-config in attach.
--
Alexey Shabalin
diff --git a/configure.ac b/configure.ac
index 1879dd9..c0789de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,21 +115,15 @@ PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
-have_selinux=no
-AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
-if test "x$enable_selinux" != "xno"; then
- # not using PKG_CHECK_MODULES as for some reason libselinux didn't
- # install any pkg-config modules here
- AC_SEARCH_LIBS([getcon], [selinux],
- [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELINUX is available]) have_selinux=yes],
- have_selinux=no)
- AC_SUBST(SELINUX_CFLAGS)
- AC_SUBST(SELINUX_LIBS)
- if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
- AC_MSG_ERROR([*** selinux support requested but libraries not found])
- fi
+PKG_CHECK_MODULES(SELINUX, libselinux,
+ have_selinux=yes,
+ have_selinux=no)
+if test "x$have_selinux" = "xyes" ; then
+ AC_DEFINE(HAVE_SELINUX, [], [Define if SELINUX is available])
fi
-AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
+AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
+AC_SUBST(SELINUX_CFLAGS)
+AC_SUBST(SELINUX_LIBS)
AC_ARG_ENABLE([tcpwrap],
AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
More information about the systemd-commits
mailing list