diff --git a/CMakeLists.txt b/CMakeLists.txt
index 489be89c..9374a3ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,8 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
option(SIMGEAR_HEADLESS "Set to ON to build SimGear with GUI/graphics support" OFF)
option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
+option(ENABLE_LIBSVN "Set to ON to build SimGear with libsvnclient support" OFF)
+
set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
if (MSVC AND MSVC_3RDPARTY_ROOT)
@@ -67,6 +69,16 @@ if(JPEG_FACTORY)
include_directories(${JPEG_INCLUDE_DIR})
endif()
+if(ENABLE_LIBSVN)
+ find_package(SvnClient)
+
+ if(LIBSVN_FOUND)
+ message(STATUS "libsvn found, enabling in SimGear")
+ set(HAVE_SVN_CLIENT_H 1)
+ set(HAVE_LIBSVN_CLIENT_1 1)
+ endif(LIBSVN_FOUND)
+endif(ENABLE_LIBSVN)
+
check_include_file(sys/time.h HAVE_SYS_TIME_H)
check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
check_include_file(unistd.h HAVE_UNISTD_H)
diff --git a/configure.ac b/configure.ac
index 9a9b2bb5..28e846cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -540,6 +540,39 @@ if test "x$ac_cv_header_zlib_h" != "xyes"; then
echo
fi
+dnl Check for Subversion library support
+# libsvn support defaults to yes
+save_LIBS=$LIBS
+save_CPPFLAGS=$CPPFLAGS
+AC_ARG_WITH(libsvn, [ --without-libsvn Do not use built-in subversion (libsvn) for simgear [default=no]], [], [with_libsvn=yes])
+if test "x$with_libsvn" = "xyes"; then
+ LIBS="`apr-1-config --link-ld`"
+ CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes --cppflags`"
+ AC_CHECK_HEADERS([svn_client.h])
+ if test "x$ac_cv_header_svn_client_h" = "xyes"; then
+ echo "Using built-in subversion (libsvn) for scenery downloads."
+ AC_SEARCH_LIBS(svn_client_checkout, svn_client-1,
+ [AC_DEFINE([HAVE_LIBSVN_CLIENT_1], [1], [Define to 1 if you have libsvn_client-1])],
+ [AC_MSG_ERROR(svn_client-1 library not found.)],)
+ AC_SEARCH_LIBS(svn_cmdline_init, svn_subr-1, , [AC_MSG_ERROR(svn_subr-1 library not found.)],)
+ AC_SEARCH_LIBS(svn_ra_initialize, svn_ra-1, , [AC_MSG_ERROR(svn_ra-1 library not found.)],)
+ svn_LIBS=$LIBS
+ svn_CPPFLAGS=$CPPFLAGS
+ AC_SUBST(svn_LIBS)
+ AC_SUBST(svn_CPPFLAGS)
+ else
+ echo "Libsvn not found. Will use command line subversion for scenery downloads."
+ svn_LIBS=""
+ svn_CPPFLAGS=""
+ fi
+else
+echo "Libsvn explicitly disabled. Will use command line subversion for scenery downloads."
+ svn_LIBS=""
+ svn_CPPFLAGS=""
+fi
+LIBS=$save_LIBS
+CPPFLAGS=$save_CPPFLAGS
+
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
@@ -596,6 +629,7 @@ AC_CONFIG_FILES([ \
simgear/scene/sky/Makefile \
simgear/scene/tgdb/Makefile \
simgear/scene/util/Makefile \
+ simgear/scene/tsync/Makefile \
simgear/screen/Makefile \
simgear/serial/Makefile \
simgear/sound/Makefile \
diff --git a/projects/VC90/SimGear.vcproj b/projects/VC90/SimGear.vcproj
index 28eaa8b8..144b5123 100644
--- a/projects/VC90/SimGear.vcproj
+++ b/projects/VC90/SimGear.vcproj
@@ -1459,6 +1459,18 @@
RelativePath="..\..\simgear\scene\tgdb\userdata.hxx"
>
+
+
+
+
+
+
+// Copyright (C) 2011 Thorsten Brehm
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
@@ -22,9 +23,11 @@
// $Id$
#ifdef HAVE_CONFIG_H
-#include
+# include
#endif
+#include
+
#ifdef HAVE_WINDOWS_H
#include
#endif
@@ -43,20 +46,24 @@
#include // atoi() atof() abs() system()
#include // signal()
-#include
-
#include
#include
#include
-#include
#include