summaryrefslogtreecommitdiffstats
path: root/tdeioslave/svn/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-01-27 01:05:39 -0600
committerTimothy Pearson <[email protected]>2013-01-27 01:05:39 -0600
commitff94d46e423398804d2ae63faeb114c2cf604fc4 (patch)
tree4481ffd491d15ac15081cea46d7cc298ef6351a4 /tdeioslave/svn/ConfigureChecks.cmake
parentb9553cef2a3cd9f5b89c8aca6f4b7781a079dbb7 (diff)
downloadtdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.tar.gz
tdesdk-ff94d46e423398804d2ae63faeb114c2cf604fc4.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdeioslave/svn/ConfigureChecks.cmake')
-rw-r--r--tdeioslave/svn/ConfigureChecks.cmake54
1 files changed, 54 insertions, 0 deletions
diff --git a/tdeioslave/svn/ConfigureChecks.cmake b/tdeioslave/svn/ConfigureChecks.cmake
new file mode 100644
index 00000000..3d46c748
--- /dev/null
+++ b/tdeioslave/svn/ConfigureChecks.cmake
@@ -0,0 +1,54 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+pkg_search_module( APR apr-1 )
+if( APR_FOUND )
+ set( HAVE_APR 1 )
+else( )
+ tde_message_fatal( "apr-1 is required, but was not found on your system" )
+endif( )
+
+
+# check for subversion library
+
+check_library_exists( "svn_client-1" "svn_pool_create_ex" "${SVN_LIBRARY_DIR}" HAVE_SVN_POOL_CREATE_EX_SVN_CLIENT )
+if( HAVE_SVN_POOL_CREATE_EX_SVN_CLIENT )
+ set( SVN_LIBRARIES "svn_client-1;svn_subr-1;svn_ra-1" )
+else( )
+ check_library_exists( "svn_subr-1" "svn_pool_create_ex" "${SVN_LIBRARY_DIR}" HAVE_SVN_POOL_CREATE_EX_SUBR )
+ if( HAVE_SVN_POOL_CREATE_EX_SUBR )
+ set( SVN_LIBRARIES "svn_client-1;svn_subr-1;svn_ra-1" )
+ else( )
+ tde_message_fatal( "svn_client-1 or svn_subr-1 library was not found on your system.\n Subversion is installed?\n Try to set SVN_LIBRARY_DIR to subversion library directory." )
+ endif( )
+endif( )
+
+
+# check for subversion headers
+
+tde_save_and_set( CMAKE_REQUIRED_FLAGS "-I${APR_INCLUDE_DIRS}" )
+tde_save_and_set( CMAKE_REQUIRED_DEFINITIONS "${APR_CFLAGS}" )
+
+if( SVN_INCLUDE_DIR )
+ set_and_save( CMAKE_REQUIRED_INCLUDES "${SVN_INCLUDE_DIR}" )
+ check_include_file( "svn_types.h" HAVE_SVN_TYPES_H )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+else( )
+ # FIXME must be improved
+ check_include_file( "/usr/include/subversion-1/svn_types.h" HAVE_SVN_TYPES_H )
+ set( SVN_INCLUDE_DIR "/usr/include/subversion-1" )
+endif( )
+
+tde_restore( CMAKE_REQUIRED_FLAGS CMAKE_REQUIRED_DEFINITIONS )
+
+if( NOT HAVE_SVN_TYPES_H )
+ tde_message_fatal( "svn_types.h file was not found on your system.\n Subversion devel files are installed?\n Try to set SVN_INCLUDE_DIR to subversion include directory." )
+endif( )