From: VMware, Inc <> Date: Wed, 17 Apr 2013 19:22:13 +0000 (-0700) Subject: OVT: detect procps-ng X-Git-Tag: 2013.04.16-1098359~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb8de35d8d2266aa335070544ee21bef7218d04a;p=thirdparty%2Fopen-vm-tools.git OVT: detect procps-ng 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 --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 19335a37e..0fb3dc918 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -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],