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 <math.h>
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'').
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)