Commit d08163b4fe4e74f02b74a1fb69484b00950a149f

Guillem Jover 2023-04-18T03:56:16

build: Check whether we need libperfstat on AIX The getentropy() implementation makes use of this library on AIX.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/configure.ac b/configure.ac
index 93e3b36..db33043 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,15 @@ AS_CASE([$host_os],
     ])
     LIBS="$saved_LIBS"
   ],
+  [aix*], [
+    saved_LIBS="$LIBS"
+    AC_SEARCH_LIBS([perfstat_cpu_total], [perfstat], [
+      AS_IF([test "x$ac_cv_search_perfstat_cpu_total" != "xnone required"], [
+        LIBBSD_LIBS="$LIBBSD_LIBS $ac_cv_search_perfstat_cpu_total"
+      ])
+    ])
+    LIBS="$saved_LIBS"
+  ],
 )
 
 # Checks for header files.