summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-14 12:48:01 +0200
committerBruno Haible <bruno@clisp.org>2023-04-14 12:48:01 +0200
commite8bbebe5b5cc672aa28e5b4fb91e3624415d0e00 (patch)
treee5ad74ef2922c257cd3953ad944c14091d5387c0 /m4
parent90c477e69abf6e6414d9099b265dce0e7986c703 (diff)
downloadgnulib-e8bbebe5b5cc672aa28e5b4fb91e3624415d0e00.tar.gz
sys_sem: New module.
* lib/sys_sem.in.h: New file. * m4/sys_sem_h.m4: New file. * modules/sys_sem: New file. * doc/posix-headers/sys_sem.texi: Mention the new module.
Diffstat (limited to 'm4')
-rw-r--r--m4/sys_sem_h.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/sys_sem_h.m4 b/m4/sys_sem_h.m4
new file mode 100644
index 0000000000..20510f1fbe
--- /dev/null
+++ b/m4/sys_sem_h.m4
@@ -0,0 +1,20 @@
+# sys_sem_h.m4 serial 1
+dnl Copyright (C) 2023 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.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN_ONCE([gl_SYS_SEM_H],
+[
+ AC_CHECK_HEADERS_ONCE([sys/sem.h])
+ dnl For now, we provide a <sys/sem.h> wrapper only if the system already has
+ dnl a <sys/sem.h>.
+ if test $ac_cv_header_sys_sem_h = yes; then
+ GL_GENERATE_SYS_SEM_H=true
+ gl_CHECK_NEXT_HEADERS([sys/sem.h])
+ else
+ GL_GENERATE_SYS_SEM_H=false
+ fi
+])