diff options
author | Emil Velikov | 2017-03-30 12:01:12 -0500 |
---|---|---|
committer | Emil Velikov | 2017-04-03 12:01:49 -0500 |
commit | 63120172668610cebfd01e89f67e73037037dfd9 (patch) | |
tree | 6c8ca0ce36347fd68ad02df7434d26e19feecd4c | |
parent | 6796859fcce7b9d7157f066a8b0dac3ede6438dd (diff) | |
download | external-libdrm-63120172668610cebfd01e89f67e73037037dfd9.tar.gz external-libdrm-63120172668610cebfd01e89f67e73037037dfd9.tar.xz external-libdrm-63120172668610cebfd01e89f67e73037037dfd9.zip |
configure.ac: bring back pthread-stubs check
Accidentally removed with earlier commit. Although rather than simply
adding the check for all platforms, use the same heuristics as we do in
mesa.
Namely: pthread-stubs is a thing only for BSD platforms. Everyone else
should have lightweight pthread API in their C runtime library.
Fixes: 4ecd1ef010b ("xf86drm: fix null termination of string buffer")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
-rw-r--r-- | configure.ac | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 6a60ffc6..f1a13090 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -61,10 +61,22 @@ AC_CHECK_HEADERS([sys/sysctl.h sys/select.h]) | |||
61 | LT_PREREQ([2.2]) | 61 | LT_PREREQ([2.2]) |
62 | LT_INIT([disable-static]) | 62 | LT_INIT([disable-static]) |
63 | 63 | ||
64 | 64 | dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the | |
65 | 65 | dnl project. Even then there's a notable issue as described in the project README | |
66 | AC_SUBST(PTHREADSTUBS_CFLAGS) | 66 | case "$host_os" in |
67 | AC_SUBST(PTHREADSTUBS_LIBS) | 67 | linux* | cygwin* | darwin* | solaris* | gnu*) |
68 | pthread_stubs_possible="no" | ||
69 | ;; | ||
70 | * ) | ||
71 | pthread_stubs_possible="yes" | ||
72 | ;; | ||
73 | esac | ||
74 | |||
75 | if test "x$pthread_stubs_possible" = xyes; then | ||
76 | PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs >= 0.4) | ||
77 | AC_SUBST(PTHREADSTUBS_CFLAGS) | ||
78 | AC_SUBST(PTHREADSTUBS_LIBS) | ||
79 | fi | ||
68 | 80 | ||
69 | pkgconfigdir=${libdir}/pkgconfig | 81 | pkgconfigdir=${libdir}/pkgconfig |
70 | AC_SUBST(pkgconfigdir) | 82 | AC_SUBST(pkgconfigdir) |