summaryrefslogtreecommitdiffstats
path: root/m4/arc4random.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /m4/arc4random.m4
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/arc4random.m4')
-rw-r--r--m4/arc4random.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/arc4random.m4 b/m4/arc4random.m4
new file mode 100644
index 0000000..babbcbd
--- /dev/null
+++ b/m4/arc4random.m4
@@ -0,0 +1,15 @@
+AC_DEFUN([DOVECOT_ARC4RANDOM], [
+ AC_ARG_WITH([libbsd], AS_HELP_STRING(
+ [--with-libbsd],
+ [Use libbsd (default is no)]
+ ), [want_libbsd=$withval], [want_libbsd=no])
+ AC_CHECK_FUNC([arc4random_buf], AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define this if you have arc4random_buf()]), [
+ if test "$want_libbsd" = yes; then
+ AC_CHECK_LIB([bsd], [arc4random_buf], [
+ LIBS="$LIBS -lbsd"
+ AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define this if you have arc4random_buf()])
+ AC_DEFINE([HAVE_LIBBSD], [1], [Define this if you have libbsd])
+ ])
+ fi
+ ])
+])