blob: d42ea1a398239a367a1b742554de6758511c071e [file] [log] [blame]
# Exit with status 0 if a supported version of libpthread is found (NPTL or
# non-Linux libpthread) and exit with status 1 if a non-supported version of
# libpthread is found (LinuxThreads).
if [ "$(uname)" = "Linux" ]; then
if [ ! -x /usr/bin/getconf ]; then
echo "Error: could not find the program /usr/bin/getconf."
echo "Please install the glibc-common package."
# Assume NPTL.
exit 0
libpthread_version="$(/usr/bin/getconf GNU_LIBPTHREAD_VERSION 2>/dev/null)"
if [ "${libpthread_version#NPTL}" != "${libpthread_version}" ]; then
exit 0
# configuration string is empty or does start with "linuxthreads".
exit 1
# Another OS than Linux, which is also fine.
exit 0