]> Savannah Git Hosting - gnulib.git/commitdiff
getloadavg: Don't use /usr/local when cross-compiling on AIX.
authorBruno Haible <bruno@clisp.org>
Mon, 24 Feb 2020 20:19:28 +0000 (21:19 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 24 Feb 2020 20:19:28 +0000 (21:19 +0100)
Reported by Jens Rehsack <sno@netbsd.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.

* m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
cross-compiling.

ChangeLog
m4/getloadavg.m4

index b3856c29371bc2f1980609b1ec91855c80184d35..067e41956fa69e2364030465e5fc4f49a46f27d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-24  Bruno Haible  <bruno@clisp.org>
+
+       getloadavg: Don't use /usr/local when cross-compiling on AIX.
+       Reported by Jens Rehsack <sno@netbsd.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.
+       * m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
+       cross-compiling.
+
 2020-02-24  Bruno Haible  <bruno@clisp.org>
 
        fcntl: Add witness of gnulib override.
index 3bd2a142e73df7a8bd92e054e4e7bfc052fa2c3a..8e96965d8284b4dd228d3616ac16fed0205070d5 100644 (file)
@@ -7,7 +7,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 8
+#serial 9
 
 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
 # New applications should use gl_GETLOADAVG instead.
@@ -45,7 +45,9 @@ AC_CHECK_FUNC([getloadavg], [],
      # There is a commonly available library for RS/6000 AIX.
      # Since it is not a standard part of AIX, it might be installed locally.
      gl_getloadavg_LIBS=$LIBS
-     LIBS="-L/usr/local/lib $LIBS"
+     if test $cross_compiling != yes; then
+       LIBS="-L/usr/local/lib $LIBS"
+     fi
      AC_CHECK_LIB([getloadavg], [getloadavg],
                   [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
                   [LIBS=$gl_getloadavg_LIBS])