blob: d6f06d8400be72eb57073cb60ed0165ea1cfd502 [file] [log] [blame]
From a9b07220b986500cfee7777a543494d360964306 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 2 Jan 2024 21:39:24 +0100
Subject: [PATCH] add musl.m4
Add musl.m4 (retrieved from
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=m4/musl.m4;h=34d2c1ff22a148eeb76936410ac497d68b228f59;hb=HEAD)
musl.m4 is needed for gl_MUSL_LIBC since
https://git.savannah.gnu.org/gitweb/?p=libsigsegv.git;a=commit;h=a6ff69873110c0a8ba6f7fd90532dbc11224828c
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: sent to Bruno Haible <bruno@clisp.org>
---
m4/musl.m4 | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 m4/musl.m4
diff --git a/m4/musl.m4 b/m4/musl.m4
new file mode 100644
index 0000000..34d2c1f
--- /dev/null
+++ b/m4/musl.m4
@@ -0,0 +1,20 @@
+# musl.m4 serial 4
+dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for musl libc, despite the musl libc authors don't like it
+# <https://wiki.musl-libc.org/faq.html>
+# <https://lists.gnu.org/archive/html/bug-gnulib/2018-02/msg00079.html>.
+# From Bruno Haible.
+
+AC_DEFUN_ONCE([gl_MUSL_LIBC],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ *-musl* | midipix*)
+ AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.])
+ ;;
+ esac
+])
--
2.43.0