From 10f6678a244b702386a760d16a61f13be1042817 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Fri, 22 Jan 2016 14:41:40 +0100 Subject: [PATCH] NetBSD: Detect copysign(3) properly on NetBSD inside the math library The copysing(3) function is a part of the libm library on NetBSD. This is also true for other POSIX platforms. NAME copysign, copysignf, copysignl - functions to manipulate signs LIBRARY Math Library (libm, -lm) SYNOPSIS #include double copysign(double x, double y); float copysignf(float x, float y); long double copysignl(long double x, long double y); STANDARDS The described functions conform to ISO/IEC 9899:1999 (``ISO C99''). --- src/pal/src/configure.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake index 7d40d81..c5db338 100644 --- a/src/pal/src/configure.cmake +++ b/src/pal/src/configure.cmake @@ -46,7 +46,9 @@ check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP) check_library_exists(pthread pthread_sigqueue "" HAVE_PTHREAD_SIGQUEUE) check_function_exists(sigreturn HAVE_SIGRETURN) check_function_exists(_thread_sys_sigreturn HAVE__THREAD_SYS_SIGRETURN) +set(CMAKE_REQUIRED_LIBRARIES m) check_function_exists(copysign HAVE_COPYSIGN) +set(CMAKE_REQUIRED_LIBRARIES) check_function_exists(fsync HAVE_FSYNC) check_function_exists(futimes HAVE_FUTIMES) check_function_exists(utimes HAVE_UTIMES) -- 2.7.4