]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
build: Check whether we need libperfstat on AIX
authorGuillem Jover <guillem@hadrons.org>
Tue, 18 Apr 2023 01:56:16 +0000 (03:56 +0200)
committerGuillem Jover <guillem@hadrons.org>
Sat, 22 Apr 2023 17:30:15 +0000 (19:30 +0200)
The getentropy() implementation makes use of this library on AIX.

configure.ac

index 93e3b365632214c87f1a6cf13a24b1e5afda51f8..db3304344a2b157604e0da82153e650488819678 100644 (file)
@@ -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.