CMakeLists.txt
changeset 9414 669bf9fb901e
parent 9411 6810478a60e9
child 9431 a9c73f29a15e
equal deleted inserted replaced
9413:eb50f63a5777 9414:669bf9fb901e
   594     check_library_exists(m pow "" HAVE_LIBM)
   594     check_library_exists(m pow "" HAVE_LIBM)
   595     if(HAVE_LIBM)
   595     if(HAVE_LIBM)
   596       set(CMAKE_REQUIRED_LIBRARIES m)
   596       set(CMAKE_REQUIRED_LIBRARIES m)
   597       foreach(_FN
   597       foreach(_FN
   598               atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
   598               atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
   599               sinf sqrt sqrtf tan tanf)
   599               sinf sqrt sqrtf tan tanf acos asin)
   600         string(TOUPPER ${_FN} _UPPER)
   600         string(TOUPPER ${_FN} _UPPER)
   601         set(_HAVEVAR "HAVE_${_UPPER}")
   601         set(_HAVEVAR "HAVE_${_UPPER}")
   602         check_function_exists("${_FN}" ${_HAVEVAR})
   602         check_function_exists("${_FN}" ${_HAVEVAR})
   603       endforeach()
   603       endforeach()
   604       set(CMAKE_REQUIRED_LIBRARIES)
   604       set(CMAKE_REQUIRED_LIBRARIES)
   606     endif()
   606     endif()
   607 
   607 
   608     check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
   608     check_library_exists(iconv iconv_open "" HAVE_LIBICONV)
   609     if(HAVE_LIBICONV)
   609     if(HAVE_LIBICONV)
   610       list(APPEND EXTRA_LIBS iconv)
   610       list(APPEND EXTRA_LIBS iconv)
       
   611       set(HAVE_ICONV 1)
       
   612     endif()
       
   613 
       
   614     if(NOT APPLE)
       
   615       check_include_file(alloca.h HAVE_ALLOCA_H)
       
   616       check_function_exists(alloca HAVE_ALLOCA)
       
   617     else()
       
   618       set(HAVE_ALLOCA_H 1)
       
   619       set(HAVE_ALLOCA 1)
   611     endif()
   620     endif()
   612 
   621 
   613     check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
   622     check_struct_has_member("struct sigaction" "sa_sigaction" "signal.h" HAVE_SA_SIGACTION)
   614   endif()
   623   endif()
   615 else()
   624 else()