Here is a patch to fix detection of the AmtecM5 library for controlling the Amtec (Schunk) Powercube robotic arms.
The detection of the header was not working correctly, mainly because CMAKE was trying to compile the test using gcc instead of g++. To fix it, I added a CMAKE macro called PLAYERDRIVER_REQUIRE_HEADER_CPP, and modified the CMakeLists.txt file of the actarray directory to include the correct CFLAGS and definitions.
I also ran into a linking problem, because the external libraries needed by the drivers were being set into a property called LINK_FLAGS instead of being appended to the TARGET_LINK_LIBRARIES for the player executable. This was putting the "-lsomething" flags at the beginning of the linking command, and they are needed at the end, so that all the symbols can be found correctly. (GCC's manual indicates that they follow that linking order). This problem mainly shows up with static libraries.
The solution is to simply append the libraries from the drivers to the TARGET_LINK_LIBRARIES of player. It works fine in my local tests now.
Please let me know if there was a special reason for using the property LINK_FLAGS that I did not see.
The patch also includes a small change to make the phidgetRFID driver compile under CMAKE, and a temporary solution for the switch of the amtecM5 driver to dynamic arrays, a better one will come soon.