Explorar el Código

build: Split libps and libkvm detection into their own macros and variables

Do not tie these libraries in a single variable for start-stop-daemon,
instead move the usage to the Makefile.am.
Guillem Jover hace 10 años
padre
commit
e2e1d11a13
Se han modificado 4 ficheros con 24 adiciones y 9 borrados
  1. 2 1
      configure.ac
  2. 1 0
      debian/changelog
  3. 18 7
      m4/dpkg-libs.m4
  4. 3 1
      utils/Makefile.am

+ 2 - 1
configure.ac

@@ -81,7 +81,8 @@ if test "x$build_dselect" = "xyes"; then
    DPKG_LIB_CURSES
 fi
 if test "x$build_start_stop_daemon" = "xyes"; then
-   DPKG_LIB_SSD
+   DPKG_LIB_PS
+   DPKG_LIB_KVM
 fi
 
 # Checks for header files.

+ 1 - 0
debian/changelog

@@ -73,6 +73,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
   * Build system:
     - Fix building development documentation.
     - Remove unused UA_LIBS variable.
+    - Split libps and libkvm detection into their own macros and variables.
   * Test suite:
     - Add a unit test to compile perl code with warnings.
     - Add a unit test for the trigger deferred parser.

+ 18 - 7
m4/dpkg-libs.m4

@@ -153,11 +153,22 @@ if test "x$have_curses_header" != "xyes"; then
 fi
 ])# DPKG_LIB_CURSES
 
-# DPKG_LIB_SSD
+# DPKG_LIB_PS
+# -----------
+# Check for GNU/Hurd ps library
+AC_DEFUN([DPKG_LIB_PS], [
+  AC_ARG_VAR([PS_LIBS], [linker flags for ps library])dnl
+  AC_CHECK_LIB([ps], [proc_stat_list_create], [
+    PS_LIBS="-lps"
+  ])
+])# DPKG_LIB_PS
+
+# DPKG_LIB_KVM
 # ------------
-# Check for start-stop-daemon libraries.
-AC_DEFUN([DPKG_LIB_SSD],
-[AC_ARG_VAR([SSD_LIBS], [linker flags for start-stop-daemon])dnl
-AC_CHECK_LIB([ps], [proc_stat_list_create], [SSD_LIBS="${SSD_LIBS:+$SSD_LIBS }-lps"])
-AC_CHECK_LIB([kvm], [kvm_openfiles], [SSD_LIBS="${SSD_LIBS:+$SSD_LIBS }-lkvm"])
-])# DPKG_LIB_SSD
+# Check for BSD kvm library
+AC_DEFUN([DPKG_LIB_KVM], [
+  AC_ARG_VAR([KVM_LIBS], [linker flags for kvm library])dnl
+  AC_CHECK_LIB([kvm], [kvm_openfiles], [
+    KVM_LIBS="-lkvm"
+  ])
+])# DPKG_LIB_KVM

+ 3 - 1
utils/Makefile.am

@@ -44,7 +44,9 @@ start_stop_daemon_SOURCES = \
 
 start_stop_daemon_LDADD = \
 	../lib/compat/libcompat.la \
-	$(SSD_LIBS)
+	$(PS_LIBS) \
+	$(KVM_LIBS) \
+	$(nil)
 endif
 
 install-data-local: