]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
OVT: detect procps-ng
authorVMware, Inc <>
Wed, 17 Apr 2013 19:22:13 +0000 (12:22 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Wed, 17 Apr 2013 21:30:28 +0000 (14:30 -0700)
Newer Linux distributions started packaging procps-ng, which
supports pkg-config, so hopefully our days of chasing after
new procps versions are over.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/configure.ac

index 19335a37e4fb15d8377a46b214bde4a0377b5068..0fb3dc918602537b5a7a082c46d0fdfa0c9efa6d 100644 (file)
@@ -599,35 +599,55 @@ else
 fi
 
 if test "$with_procps" = "yes"; then
-   if test -z "$CUSTOM_PROCPS_NAME"; then
-      CUSTOM_PROCPS_NAME=proc
-   fi
 
-   # XXX: no pkg-config and no procps-config means we need to
-   # hard-code a sensible default.
-   if test -z "$CUSTOM_PROCPS_LIBS"; then
-      CUSTOM_PROCPS_LIBS="-L/lib"
+   have_procps=no
+
+   if test -z "$CUSTOM_PROCPS_NAME" && test -z "$CUSTOM_PROCPS_LIBS"; then
+      # See if we have procps-ng (that finally supports pkg-config).
+      AC_VMW_CHECK_LIB([procps-ng],
+                       [PROCPS],
+                       [libprocps],
+                       [],
+                       [],
+                       [],
+                       [],
+                       [
+                        have_procps=yes;
+                       ],
+                       [])
    fi
 
-   # Some distros provide libproc-${version}.so only, others provide the
-   # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7
-   # and 3.2.8 versions - adding every possible version here would be a mess).
-   #
-   # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if
-   # necessary.
-   have_procps=no
+   if test "$have_procps" = "no"; then
+      # Let's see if there is an older procps version, one that does not
+      # support pkg-config.
+      if test -z "$CUSTOM_PROCPS_NAME"; then
+         CUSTOM_PROCPS_NAME=proc
+      fi
 
-   AC_VMW_CHECK_LIB([$CUSTOM_PROCPS_NAME],
-                    [PROCPS],
-                    [],
-                    [],
-                    [],
-                    [],
-                    [getstat],
-                    [
-                     have_procps=yes;
-                    ],
-                    [])
+      # XXX: no pkg-config and no procps-config means we need to
+      # hard-code a sensible default.
+      if test -z "$CUSTOM_PROCPS_LIBS"; then
+         CUSTOM_PROCPS_LIBS="-L/lib"
+      fi
+
+      # Some distros provide libproc-${version}.so only, others provide the
+      # libproc.so symlink. Try both to see what sticks (but only try the 3.2.7
+      # and 3.2.8 versions - adding every possible version here would be a mess).
+      #
+      # Users can help by providing CUSTOM_PROCPS_NAME / CUSTOM_PROCPS_LIBS if
+      # necessary.
+      AC_VMW_CHECK_LIB([$CUSTOM_PROCPS_NAME],
+                       [PROCPS],
+                       [],
+                       [],
+                       [],
+                       [],
+                       [getstat],
+                       [
+                        have_procps=yes;
+                       ],
+                       [])
+   fi
 
    if test "$have_procps" = "no"; then
       AC_VMW_CHECK_LIB([proc-3.2.8],