--- CMakeLists.txt.orig	2012-06-13 06:56:48.000000000 +0200
+++ CMakeLists.txt	2012-06-22 10:45:57.000000000 +0200
@@ -39,6 +39,10 @@
   SET(LINUX "${CMAKE_SYSTEM}")
 ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 
+IF("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
+    SET(FREEBSD "${CMAKE_SYSTEM}")
+ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
+
 # custom ctest options
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
 
@@ -317,14 +321,21 @@
 ENDIF(WIN32)
 
 #
+# execinfo
+#
+IF(FREEBSD)
+   SET(requiredlibs ${requiredlibs} "/usr/lib/libexecinfo.so")
+ENDIF(FREEBSD)
+
+#
 # SWIG
 #
 IF (NOT ZORBA_SUPPRESS_SWIG)
   FIND_PACKAGE (SWIG)
 
-  COMPARE_VERSION_STRINGS("${SWIG_VERSION}" "1.3.40" result)
+  COMPARE_VERSION_STRINGS("${SWIG_VERSION}" "2.0.7" result)
   IF(result LESS 0)
-    MESSAGE(WARNING "You need at least SWIG version 1.3.40")
+    MESSAGE(WARNING "You need at least SWIG version 2.0.7")
   ENDIF(result LESS 0)
 
 
@@ -504,7 +515,7 @@
   SET(ZORBA_CMAKE_DIR "cmake" CACHE STRING
     "Relative path to CMake files in Zorba installation")
 ELSE (WIN32)
-  SET(ZORBA_CMAKE_DIR "share/cmake/zorba-${ZORBA_VERSION}" CACHE STRING
+  SET(ZORBA_CMAKE_DIR "share/cmake/Modules/zorba-${ZORBA_VERSION}" CACHE STRING
     "Relative path to CMake files in Zorba installation")
 ENDIF (WIN32)
 
