<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,67 +0,0 @@
-
-
-#### MODIFIED VERSION FOR OROCOS ####
-
-# - Check if the include file exists.
-#  CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE)
-#
-#  INCLUDE  - name of include file
-#  VARIABLE - variable to return result
-#  
-# An optional third argument is the CFlags to add to the compile line 
-# or you can use CMAKE_REQUIRED_FLAGS.
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
-#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-#  CMAKE_REQUIRED_INCLUDES = list of include directories
-#
-MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
-  IF( &quot;${${VARIABLE}}&quot; MATCHES &quot;^$&quot;)
-    IF(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS &quot;-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}&quot;)
-    ELSE(CMAKE_REQUIRED_INCLUDES)
-      SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS)
-    ENDIF(CMAKE_REQUIRED_INCLUDES)
-    SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
-    CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
-    MESSAGE(STATUS &quot;Looking for C++ include ${INCLUDE}&quot;)
-    IF(${ARGC} EQUAL 3)
-      SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
-      SET(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${ARGV2}&quot;)
-    ENDIF(${ARGC} EQUAL 3)
-
-    TRY_COMPILE(${VARIABLE}
-      ${CMAKE_BINARY_DIR}
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
-      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      CMAKE_FLAGS 
-      -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
-      &quot;${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}&quot;
-      OUTPUT_VARIABLE OUTPUT) 
-
-    IF(${ARGC} EQUAL 3)
-      SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE})
-    ENDIF(${ARGC} EQUAL 3)
-
-    IF(${VARIABLE})
-      MESSAGE(STATUS &quot;Looking for C++ include ${INCLUDE} - found&quot;)
-      SET(${VARIABLE} 1 CACHE INTERNAL &quot;Have include ${INCLUDE}&quot;)
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
-        &quot;Determining if the include file ${INCLUDE} &quot;
-        &quot;exists passed with the following output:\n&quot;
-        &quot;${OUTPUT}\n\n&quot;)
-    ELSE(${VARIABLE})
-      MESSAGE(STATUS &quot;Looking for C++ include ${INCLUDE} - not found&quot;)
-      SET(${VARIABLE} &quot;&quot; CACHE INTERNAL &quot;Have include ${INCLUDE}&quot;)
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
-        &quot;Determining if the include file ${INCLUDE} &quot;
-        &quot;exists failed with the following output:\n&quot;
-        &quot;${OUTPUT}\n\n&quot;)
-    ENDIF(${VARIABLE})
-  ENDIF( &quot;${${VARIABLE}}&quot; MATCHES &quot;^$&quot;)
-ENDMACRO(CHECK_INCLUDE_FILE_CXX)</diff>
      <filename>config/CheckIncludeFileCXX.cmake</filename>
    </modified>
    <modified>
      <diff>@@ -4,25 +4,15 @@
 #                                                         #
 ###########################################################
 
-# The cmake version is f*cked up, i.e. the spirit of cmake.
-INCLUDE( config/CheckIncludeFileCXX.cmake )
-
 # Look for boost
 IF (NOT CMAKE_CROSS_COMPILE)
-
-SET(BOOST_INSTALL &quot;&quot; CACHE STRING &quot;Specify the location (e.g. /opt/include) in which the Boost/C++ headers have been installed.&quot;)
-
-# This is the Orocos version of the macro:
-IF( BOOST_INSTALL )
-MESSAGE(&quot;-- Looking for Boost/C++ headers in ${BOOST_INSTALL}&quot;)
-SET(CMAKE_REQUIRED_INCLUDES ${BOOST_INSTALL})
-SET( RTT_CFLAGS &quot;${RTT_CFLAGS} -I${BOOST_INSTALL}&quot; )
-ENDIF( BOOST_INSTALL )
-CHECK_INCLUDE_FILE_CXX( boost/shared_ptr.hpp BOOST)
-CHECK_INCLUDE_FILE_CXX( boost/spirit.hpp BOOST_SPIRIT)
-CHECK_INCLUDE_FILE_CXX( boost/graph/adjacency_list.hpp BOOST_GRAPH)
+MESSAGE(&quot;-- Looking for Boost/C++ headers --&quot;)
+FIND_PATH( BOOST boost/shared_ptr.hpp )
+FIND_PATH( BOOST_SPIRIT boost/spirit.hpp )
+FIND_PATH( BOOST_GRAPH boost/graph/adjacency_list.hpp )
 IF(BOOST AND BOOST_GRAPH AND BOOST_SPIRIT)
   MESSAGE(&quot;-- Looking for Boost headers - found&quot;)
+  SET( RTT_CFLAGS &quot;${RTT_CFLAGS} -I${BOOST}&quot; )
   SET(ORO_SUPPORT_BOOST TRUE CACHE INTERNAL &quot;&quot; FORCE)
 ELSE(BOOST AND BOOST_GRAPH AND BOOST_SPIRIT)
   MESSAGE(&quot;-- Looking for Boost headers - not found&quot;)
@@ -35,11 +25,9 @@ ENDIF (NOT CMAKE_CROSS_COMPILE)
 IF (NOT CMAKE_CROSS_COMPILE )
   FIND_LIBRARY(XERCES NAMES xerces-c 
     PATHS /usr/local/lib /usr/lib )
-  CHECK_INCLUDE_FILE_CXX( xercesc/util/PlatformUtils.hpp XERCES_HEADERS)
+  FIND_PATH( XERCES_HEADERS xercesc/util/PlatformUtils.hpp)
 ELSE (NOT CMAKE_CROSS_COMPILE )
-  FIND_LIBRARY(XERCES NAMES xerces-c 
-    NO_DEFAULT_PATH
-    )
+  FIND_LIBRARY(XERCES NAMES xerces-c NO_DEFAULT_PATH )
 ENDIF (NOT CMAKE_CROSS_COMPILE )
 IF ( XERCES AND XERCES_HEADERS)
   MESSAGE(&quot;-- Looking for Xerces - found&quot;)
@@ -62,7 +50,7 @@ ELSE ( XERCES AND XERCES_HEADERS )
   SET(OROCLS_CORELIB_PROPERTIES_DEMARSHALLING_DRIVER &quot;TinyDemarshaller&quot;)
 ENDIF ( XERCES AND XERCES_HEADERS )
 
-SET( OROCOS_TARGET gnulinux CACHE STRING &quot;The Operating System target. One of [lxrt gnulinux xenomai]&quot;)
+SET( OROCOS_TARGET gnulinux CACHE STRING &quot;The Operating System target. One of [lxrt gnulinux xenomai macosx]&quot;)
 STRING(TOUPPER ${OROCOS_TARGET} OROCOS_TARGET_CAP)
 
 SET(LINUX_SOURCE_DIR ${LINUX_SOURCE_DIR} CACHE PATH &quot;path to linux source dir&quot; FORCE)
@@ -145,6 +133,15 @@ ELSE(OROCOS_TARGET STREQUAL &quot;gnulinux&quot;)
   SET(OROPKG_OS_GNULINUX FALSE CACHE INTERNAL &quot;&quot; FORCE)
 ENDIF(OROCOS_TARGET STREQUAL &quot;gnulinux&quot;)
 
+IF(OROCOS_TARGET STREQUAL &quot;macosx&quot;)
+  SET(OROPKG_OS_MACOSX TRUE CACHE INTERNAL &quot;&quot; FORCE)
+  SET(RTT_LINKFLAGS &quot;${RTT_LINKFLAGS} -lpthread&quot; CACHE INTERNAL &quot;&quot;)
+  LINK_LIBRARIES(pthread dl)
+ELSE(OROCOS_TARGET STREQUAL &quot;macosx&quot;)
+  SET(OROPKG_OS_MACOSX FALSE CACHE INTERNAL &quot;&quot; FORCE)
+ENDIF(OROCOS_TARGET STREQUAL &quot;macosx&quot;)
+
+
 IF(OROCOS_TARGET STREQUAL &quot;ecos&quot;)
 
   # Look for Ecos</diff>
      <filename>config/check_depend.cmake</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ OPTION( ENABLE_TESTS &quot;Turn me off to disable compilation of all tests&quot; ON )
 IF( ENABLE_TESTS )
   IF (NOT CMAKE_CROSS_COMPILE )
     FIND_LIBRARY(CPPUNIT NAMES cppunit PATHS /usr/local/lib /usr/lib )
-    CHECK_INCLUDE_FILE_CXX( cppunit/TestRunner.h CPPUNIT_HEADERS)
+    FIND_PATH( CPPUNIT_HEADERS cppunit/TestRunner.h)
   ELSE (NOT CMAKE_CROSS_COMPILE )
     FIND_LIBRARY(CPPUNIT NAMES cppunit NO_DEFAULT_PATH )
   ENDIF (NOT CMAKE_CROSS_COMPILE )</diff>
      <filename>config/global_setup.cmake</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 #!/bin/bash
 
-echo &quot;Orocos configure script.&quot;
+echo &quot;Orocos configure script.  WARNING: ONLY WORKS FOR GNULINUX INSTALLATIONS&quot;
 
 function usage
 {</diff>
      <filename>configure</filename>
    </modified>
    <modified>
      <diff>@@ -75,6 +75,12 @@
 	&lt;revremark&gt;Improved/fixed Debian/Ubuntu package install instructions.&lt;/revremark&gt;
       &lt;/revision&gt;
     &lt;/revhistory&gt;
+    &lt;revnumber&gt;1.5.0&lt;/revnumber&gt;
+	&lt;date&gt;02 Aug 2008&lt;/date&gt;
+	&lt;authorinitials&gt;kg&lt;/authorinitials&gt;
+	&lt;revremark&gt;Added Mac OS X install instructions.&lt;/revremark&gt;
+      &lt;/revision&gt;
+    &lt;/revhistory&gt;
 
     &lt;legalnotice&gt;
       &lt;para&gt;
@@ -104,10 +110,12 @@
 	  &amp;orocos; was designed with portability in mind. Currently, we support RTAI/LXRT
 	  (&lt;ulink url=&quot;http://www.rtai.org&quot;&gt;http://www.rtai.org&lt;/ulink&gt;), GNU/Linux
 	  userspace, Xenomai (&lt;ulink
-	    url=&quot;http://www.xenomai.org&quot;&gt;Xenomai.org&lt;/ulink&gt;). So,
-	  you can first write your software as a normal Linux program, using the framework
-	  for testing and debugging purposes in plain userspace Linux and recompile
-	  later to another real-time target.
+	    url=&quot;http://www.xenomai.org&quot;&gt;Xenomai.org&lt;/ulink&gt;) and Mac OS X (&lt;ulink
+	    url=&quot;http://www.apple.com/macosx/&quot;&gt;apple.com&lt;/ulink&gt;). So,
+	  you can first write your software as a normal Linux/Mac OS X
+	  program, using the framework for testing and debugging
+	  purposes in plain userspace (Linux/Mac OS X) and recompile
+	  later to a real-time target.
 	&lt;/para&gt;
       &lt;/section&gt;
       &lt;section id=&quot;vers-scheme&quot;&gt;
@@ -186,7 +194,10 @@
 	  &lt;/tgroup&gt;
 	&lt;/table&gt;
 	&lt;para&gt;
-	  All these packages are provided by most Linux distributions.
+	  All these packages are provided by most Linux distributions.  In Mac OS X, 
+	  you can install them easily using &lt;ulink 
+	  url=&quot;http://www.finkproject.org&quot;&gt;fink&lt;/ulink&gt; or &lt;ulink 
+	  url=&quot;http://www.macports.org/&quot;&gt;macports&lt;/a&gt;.
 	  Take also a look on the Orocos.org &lt;ulink
 	  url=&quot;http://www.orocos.org/rtt/source&quot;&gt;RTT download&lt;/ulink&gt; page
 	  for the latest information.
@@ -266,6 +277,7 @@
 	&lt;title&gt;Orocos Build and Configuration Tools &lt;/title&gt;
 	&lt;para&gt;
 	  The tool you will need is &lt;command&gt;cmake&lt;/command&gt;
+	  Most linux distros have a cmake package, and so do fink/macports in OS X.
 	  In Debian, you can use the official Debian version using
 	  &lt;screen&gt;  apt-get install cmake&lt;/screen&gt;
 	  If this does not work for you, you can download cmake from
@@ -273,15 +285,25 @@
 	&lt;/para&gt;
       &lt;/section&gt;
       &lt;section&gt;
-	&lt;title&gt;Quick Installation Instructions&lt;/title&gt; 
-	&lt;para&gt; 
+	&lt;para&gt;
+	&lt;title&gt;Download and extract the RTT packages&lt;/title&gt;
 	  Download the &lt;filename&gt;orocos-rtt-&amp;oversion;-src.tar.bz2&lt;/filename&gt; package from the
 	  Orocos webpage.
 	&lt;/para&gt;
 	&lt;para&gt;
 	  Extract it using :
 	  &lt;screen&gt;&lt;command&gt;  tar -xvjf orocos-rtt-&amp;oversion;-src.tar.bz2&lt;/command&gt;&lt;/screen&gt;
-	  Then proceed as in:
+        &lt;/para&gt;
+	&lt;para&gt;
+	  The next section provides quick installation instructions if you
+	  want to install the RTT on GNU/Linux.  Please check out
+	  section FIXME for installation on other OSes and/or if you
+	  want to change the default configuration settings.
+	&lt;/para&gt;
+      &lt;/section&gt;
+      &lt;section&gt;
+	&lt;title&gt;Quick Installation Instructions for GNU/Linux&lt;/title&gt; 
+	&lt;para&gt;
 	  &lt;screen&gt;&lt;command&gt; 
   mkdir orocos-rtt-&amp;oversion;/build 
   cd orocos-rtt-&amp;oversion;/build
@@ -317,11 +339,14 @@
       &lt;section&gt;
 	&lt;title&gt;Real-Time Toolkit Configuration&lt;/title&gt;
 	&lt;para&gt;
-	  The RTT can be configured depending on you target. 
+	  The RTT can be configured depending on your target. 
 	  For embedded targets, the large scripting infrastructure and
 	  use of exceptions can be left out. When CORBA is available,
 	  an additional library is built which allows components to
 	  communicate over a network.
+	  
+	  Also, when building for another OS than GNU/Linux, you will have to 
+	  build the RTT using cmake.
 	&lt;/para&gt;
 	&lt;para&gt;
 	  In order to configure the RTT in detail, you
@@ -426,6 +451,21 @@
   &lt;section id=&quot;install-configure&quot;&gt;
     &lt;title&gt;Detailed Configuration using 'CMake'&lt;/title&gt;
       &lt;para&gt;
+	If you have some of the orocos dependencies installed in
+	non-standard locations, you have to specify
+	this using cmake variables &lt;emphasis&gt;before&lt;/emphasis&gt; running
+	the cmake configuration.  Specify header locations using
+	the &lt;option&gt;CMAKE_INCLUDE_PATH&lt;/option&gt; variable (e.g. using
+	bash and fink in Mac OS X, the boost library headers are
+	installed in /sw/include, so you would specify &lt;screen&gt;export
+	CMAKE_INCLUDE_PATH=/sw/include&lt;/screen&gt;. 
+	For libraries in none default locations, use
+	the &lt;option&gt;CMAKE_LIBRARY_PATH&lt;/option&gt; variable.  For more
+	information,
+	see &lt;ulink url=&quot;http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables&quot;&gt;cmake
+	useful variables&lt;/ulink&gt; link.
+      &lt;/para&gt;
+      &lt;para&gt;
 	In order to start cmake configuration, in your build
 	directory, run &lt;command&gt;ccmake ..&lt;/command&gt; .  Press 'c' (from
 	'c'onfigure), watch the output, press 'e' (from 'e'xit) and
@@ -441,6 +481,7 @@
 	on of the following supported targets (all in lowercase):
 	&lt;itemizedlist&gt;
 	  &lt;listitem&gt;&lt;para&gt;gnulinux&lt;/para&gt;&lt;/listitem&gt;
+	  &lt;listitem&gt;&lt;para&gt;macosx&lt;/para&gt;&lt;/listitem&gt;
 	  &lt;listitem&gt;&lt;para&gt;xenomai&lt;/para&gt;&lt;/listitem&gt;
 	  &lt;listitem&gt;&lt;para&gt;lxrt&lt;/para&gt;&lt;/listitem&gt;
 	&lt;/itemizedlist&gt;</diff>
      <filename>doc/xml/orocos-installation.xml</filename>
    </modified>
    <modified>
      <diff>@@ -75,12 +75,14 @@ namespace RTT
                 count.wait();
             }
         }
+#ifndef OROPKG_OS_MACOSX
         void reset( int c ) {
             while( c &gt; count.value() )
                 count.signal();
             while( c &lt; count.value() )
                 count.wait();
         }
+#endif
     private:
         OS::Semaphore count;
     };</diff>
      <filename>src/BufferPolicy.hpp</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@ ADD_SUBDIRECTORY( gnulinux )
 ADD_SUBDIRECTORY( lxrt )
 ADD_SUBDIRECTORY( xenomai )
 ADD_SUBDIRECTORY( ecos )
+ADD_SUBDIRECTORY( macosx )
 
 # Supported Hardware
 ADD_SUBDIRECTORY( oro_i386 )</diff>
      <filename>src/os/CMakeLists.txt</filename>
    </modified>
    <modified>
      <diff>@@ -141,10 +141,12 @@ namespace RTT
         /**
          * Return the current count of this semaphore.
          */
+#ifndef OROPKG_OS_MACOSX
         int value()
         {
             return rtos_sem_value( &amp;sem );
         }
+#endif
     };
 }}
 </diff>
      <filename>src/os/Semaphore.hpp</filename>
    </modified>
    <modified>
      <diff>@@ -280,8 +280,10 @@ namespace RTT
     {
         // just signal if already active.
         if ( isActive() ) {
+#ifndef OROPKG_OS_MACOSX
             if ( rtos_sem_value(&amp;sem) &gt; 0 )
                 return false;
+#endif
             rtos_sem_signal(&amp;sem);
             return true;
         }</diff>
      <filename>src/os/SingleThread.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -54,3 +54,7 @@
 #ifdef OROPKG_OS_ECOS
  #include &quot;ecos/fosi.h&quot;
 #endif
+
+#ifdef OROPKG_OS_MACOSX
+  #include &quot;macosx/fosi.h&quot;
+#endif</diff>
      <filename>src/os/fosi.h</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@ IF (ENABLE_TESTS)
 
     # Copy over CPF files.
     ADD_CUSTOM_TARGET(prep-cpf
-      cp -a &quot;${CMAKE_CURRENT_SOURCE_DIR}/*.cpf&quot; &quot;${CMAKE_CURRENT_BINARY_DIR}&quot;
+      cp -R &quot;${CMAKE_CURRENT_SOURCE_DIR}/*.cpf&quot; &quot;${CMAKE_CURRENT_BINARY_DIR}&quot;
       )
 
     # repeat for each test</diff>
      <filename>tests/CMakeLists.txt</filename>
    </modified>
    <modified>
      <diff>@@ -649,10 +649,11 @@ void Generic_TaskTest_3::testPorts()
 
     dp.disconnect();
     dp2.disconnect();
+#ifndef OROPKG_OS_MACOSX
     dp = new DataObject&lt;double&gt;(&quot;Data&quot;,10.0);
     CPPUNIT_ASSERT( dp.connected() );
     CPPUNIT_ASSERT( dp.Get() == 10.0 );
-
+#endif
     // Test buffer transfer
     double val;
     CPPUNIT_ASSERT( wbp.Push( 5.0 ) );
@@ -686,10 +687,11 @@ void Generic_TaskTest_3::testPorts()
 
     bp.disconnect();
     bp2.disconnect();
+#ifndef OROPKG_OS_MACOSX
     bp = new BufferLockFree&lt;double&gt;(10);
     CPPUNIT_ASSERT( bp.connected() );
     CPPUNIT_ASSERT( bp.buffer()-&gt;capacity() == 10 );
-
+#endif
 
 }
 </diff>
      <filename>tests/generictask_test_3.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>27761c05467eb2881f9e1108983544a2d854f9bb</id>
    </parent>
  </parents>
  <author>
    <name>psoetens</name>
    <email>psoetens@ce417995-dfc9-0310-95a0-acdaff106893</email>
  </author>
  <url>http://github.com/doudou/orocos-rtt/commit/190921cca336f40d43870f75ba79c8ed34fdcea0</url>
  <id>190921cca336f40d43870f75ba79c8ed34fdcea0</id>
  <committed-date>2008-09-08T04:16:56-07:00</committed-date>
  <authored-date>2008-09-08T04:16:56-07:00</authored-date>
  <message>Merge patch #355 from bug #533: Mac OS X port.
Seems to work. Well done.


git-svn-id: https://svn.mech.kuleuven.be/repos/orocos/trunk/rtt@29594 ce417995-dfc9-0310-95a0-acdaff106893</message>
  <tree>a93cb7ef1f4bdeb014752739fb05a2742a093023</tree>
  <committer>
    <name>psoetens</name>
    <email>psoetens@ce417995-dfc9-0310-95a0-acdaff106893</email>
  </committer>
</commit>
