Commit 71054ada authored by Emmanuel Thomé's avatar Emmanuel Thomé

workaround for freebsd not having clog() -- it can't use crtalgsqrt

parent 8c7ccb02
......@@ -23,6 +23,7 @@
#cmakedefine HAVE_ALLOCA_H
#cmakedefine HAVE_CABSL
#cmakedefine HAVE_LOG2
#cmakedefine HAVE_CLOG
#cmakedefine HAVE_EXP2
#cmakedefine HAVE_RESOURCE_H
#cmakedefine HAVE_UTSNAME_H
......
......@@ -7,4 +7,8 @@ search_for_function(exp2 HAVE_EXP2)
search_for_function(cabsl HAVE_CABSL)
# clog is c99, but freebsd-11.1 (released in 2017) does not have it.
# https://www.freebsd.org/cgi/man.cgi?query=complex&manpath=FreeBSD+11.1-RELEASE
search_for_function(clog HAVE_CLOG)
set(math_libs ${CMAKE_REQUIRED_LIBRARIES_EXTRA})
......@@ -15,7 +15,7 @@ install(TARGETS sqrt RUNTIME DESTINATION ${LIBSUFFIX}/sqrt)
if(${WITH_PTHREADS})
add_definitions(-DWITH_PTHREADS)
if (HAVE_CABSL)
if (HAVE_CABSL AND HAVE_CLOG)
add_executable(crtalgsqrt ${EXCLUDE_FROM_RELEASE_BUILD} crtalgsqrt.c powers_of_p.cpp
polyroots.c knapsack.c)
target_link_libraries(crtalgsqrt utils ${pthread_libs})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment