[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 ###################### ##### check for ogg/vorbis ######################
set( GSL_HAVE_OGGVORBIS 0 ) set( GSL_HAVE_OGGVORBIS 0 )
@ -24,12 +27,17 @@ if( WITH_VORBIS )
set( GSL_HAVE_OGGVORBIS 1 ) set( GSL_HAVE_OGGVORBIS 1 )
try_compile( set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
GSL_HAVE_OGGVORBIS_RC3 set( CMAKE_REQUIRED_LIBRARIES ${VORBISFILE_LIBRARIES} )
${CMAKE_CURRENT_BINARY_DIR} check_c_source_compiles(
${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_ov_read_float.c "#include <vorbis/vorbisfile.h>
CMAKE_FLAGS "-DLINK_LIBRARIES=${VORBISFILE_LIBRARIES}" 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 ) else( VORBISFILE_FOUND )
message(FATAL_ERROR "\nOgg/Vorbis support are requested, but `libvorbisfile` not 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( pthread_cond_t GSL_SIZEOF_PTH_COND_T )
check_type_size( intmax_t GSL_SIZEOF_STD_INTMAX_T ) check_type_size( intmax_t GSL_SIZEOF_STD_INTMAX_T )
try_compile( set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
GSL_HAVE_MUTEXATTR_SETTYPE set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} )
${CMAKE_CURRENT_BINARY_DIR} check_c_source_compiles(
${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_for_pthread_mutexattr_settype.c "#define _XOPEN_SOURCE 500
CMAKE_FLAGS "-DLINK_LIBRARIES=${CMAKE_THREAD_LIBS_INIT}" #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_GSL_GLIB 1 )
set( GSL_USE_ARTS_THREADS 1 ) set( GSL_USE_ARTS_THREADS 1 )
@ -82,7 +100,7 @@ set( GSL_USE_ARTS_THREADS 1 )
##### write configuration ####################### ##### write configuration #######################
configure_file( gslconfig.h.in gslconfig.h ) configure_file( gslconfig.h.in gslconfig.h @ONLY )
##### compile ################################### ##### compile ###################################

Loading…
Cancel
Save