summaryrefslogtreecommitdiffstats
path: root/aclocal/libpthread.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 06:03:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 06:03:02 +0000
commit4897093455a2bf08f3db3a1132cc2f6f5484d77c (patch)
tree9e6373544263f003139431fb4b08f9766e1ed530 /aclocal/libpthread.m4
parentInitial commit. (diff)
downloadnfs-utils-4897093455a2bf08f3db3a1132cc2f6f5484d77c.tar.xz
nfs-utils-4897093455a2bf08f3db3a1132cc2f6f5484d77c.zip
Adding upstream version 1:2.6.4.upstream/1%2.6.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclocal/libpthread.m4')
-rw-r--r--aclocal/libpthread.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/aclocal/libpthread.m4 b/aclocal/libpthread.m4
new file mode 100644
index 0000000..55e046e
--- /dev/null
+++ b/aclocal/libpthread.m4
@@ -0,0 +1,14 @@
+dnl Checks for pthreads library and headers
+dnl
+AC_DEFUN([AC_LIBPTHREAD], [
+
+ dnl Check for library, but do not add -lpthreads to LIBS
+ AC_CHECK_LIB([pthread], [pthread_create],
+ [AC_DEFINE([HAVE_LIBPTHREAD], [1],
+ [Define to 1 if you have libpthread.])
+ AC_CHECK_HEADERS([pthread.h], [],
+ [AC_MSG_ERROR([libpthread headers not found.])])
+ AC_SUBST([LIBPTHREAD],[-lpthread])],
+ [$1])
+
+])dnl