getloadavg: don't define SVR4 on cygwin
authorEric Blake <eblake@redhat.com>
Tue, 24 Aug 2010 16:52:07 +0000 (10:52 -0600)
committerIan Beckwith <ianb@erislabs.net>
Sun, 29 Aug 2010 16:21:36 +0000 (17:21 +0100)
* m4/getloadavg.m4 (gl_GETLOADAVG): Sync with autoconf fix, to
only define SVR4 when -lkvm is required.
Reported by Yaakov Selkowitz.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 667277daf47d0661d15dd959605a6bbc6f24e548)

ChangeLog
m4/getloadavg.m4

index 298b537..ef7a7c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-24  Eric Blake  <eblake@redhat.com>
+
+       getloadavg: don't define SVR4 on cygwin
+       * m4/getloadavg.m4 (gl_GETLOADAVG): Sync with autoconf fix, to
+       only define SVR4 when -lkvm is required.
+       Reported by Yaakov Selkowitz.
+
 2010-08-24  Bruno Haible  <bruno@clisp.org>
 
        priv-set: fix comment
index 0a731c4..805fbca 100644 (file)
@@ -7,6 +7,8 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+#serial 2
+
 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
 # New applications should use gl_GETLOADAVG instead.
 
@@ -144,7 +146,8 @@ AC_CHECK_HEADER([sys/dg_sys_info.h],
 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
 # uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
 # Irix 4.0.5F has the header but not the library.
-if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
+if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \
+    && test "$ac_cv_lib_kvm_kvm_open" = yes; then
   gl_have_func=yes
   AC_DEFINE([SVR4], [1], [Define to 1 on System V Release 4.])
 fi