[dependencies/arts] GSL_HAVE_OGGVORBIS_RC3 and GSL_HAVE_MUTEXATTR_SETTYPE tests have been embedded into CMakeLists.txt

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1182888 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
samelian 14 years ago
parent 36bb41f5be
commit 38a9ae9da6

@ -9,6 +9,9 @@
#
#################################################
include( CheckCSourceCompiles )
##### check for ogg/vorbis ######################
set( GSL_HAVE_OGGVORBIS 0 )
@ -24,12 +27,17 @@ if( WITH_VORBIS )
set( GSL_HAVE_OGGVORBIS 1 )
try_compile(
GSL_HAVE_OGGVORBIS_RC3
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_ov_read_float.c
CMAKE_FLAGS "-DLINK_LIBRARIES=${VORBISFILE_LIBRARIES}"
)
set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
set( CMAKE_REQUIRED_LIBRARIES ${VORBISFILE_LIBRARIES} )
check_c_source_compiles(
"#include <vorbis/vorbisfile.h>
int main() { ov_read_float(0,0,0); return 0; } "
GSL_HAVE_OGGVORBIS_RC3 )
if( NOT GSL_HAVE_OGGVORBIS_RC3 )
set( GSL_HAVE_OGGVORBIS_RC3 0 )
endif( NOT GSL_HAVE_OGGVORBIS_RC3 )
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
else( VORBISFILE_FOUND )
message(FATAL_ERROR "\nOgg/Vorbis support are requested, but `libvorbisfile` not found" )
@ -69,12 +77,22 @@ check_type_size( pthread_mutex_t GSL_SIZEOF_PTH_MUTEX_T )
check_type_size( pthread_cond_t GSL_SIZEOF_PTH_COND_T )
check_type_size( intmax_t GSL_SIZEOF_STD_INTMAX_T )
try_compile(
GSL_HAVE_MUTEXATTR_SETTYPE
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_pthread_mutexattr_settype.c
CMAKE_FLAGS "-DLINK_LIBRARIES=${CMAKE_THREAD_LIBS_INIT}"
)
set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} )
check_c_source_compiles(
"#define _XOPEN_SOURCE 500
#include <pthread.h>
int main()
{
int (*attr_settype) (pthread_mutexattr_t *__attr, int __kind) = pthread_mutexattr_settype;
int val = PTHREAD_MUTEX_RECURSIVE; attr_settype = 0; val = 0;
return 0;
}"
GSL_HAVE_MUTEXATTR_SETTYPE )
if( NOT GSL_HAVE_MUTEXATTR_SETTYPE )
set( GSL_HAVE_MUTEXATTR_SETTYPE 0 )
endif( NOT GSL_HAVE_MUTEXATTR_SETTYPE )
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
set( GSL_USE_GSL_GLIB 1 )
set( GSL_USE_ARTS_THREADS 1 )
@ -82,7 +100,7 @@ set( GSL_USE_ARTS_THREADS 1 )
##### write configuration #######################
configure_file( gslconfig.h.in gslconfig.h )
configure_file( gslconfig.h.in gslconfig.h @ONLY )
##### compile ###################################

Loading…
Cancel
Save