Haiku: Several fixes to platform module

* Do not define BEOS anymore (this includes workarounds which we don't
  need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
  cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
  HAIKU (there is still a number of things we don't do like the
  average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
  what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
  This used to be an Haiku extension to gcc, and is equivalent to
  -shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
  implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
  and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
  pick the right headers and libraries according to the currently
  selected one.
* With the adoption of the package manager, the directory layout was
  changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
  for HAIKU as well. This is the lack of a libm (it is part of the
  implicitly linked in libroot)

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Haiku: Remove use of B_COMMON_DIRECTORY

The common directory was removed in Haiku. Applications are now
installed in the system directory.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Haiku: Remove outdated preprocessor checks

* Haiku does not define __BEOS__ anymore, so there is no need to guard
  these BeOS specific workaround for Haiku.
* The workaround themselves are not needed for Haiku as it has much
  better POSIX compatibility than BeOS did.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Haiku: Include files cleanup in cmCTest

* No need to use a different path from the BeOS one, which still works.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Revert "FindSDL: Fix broken include paths"

This reverts commit eac2adb5b46277be16ac2e577e369bdcd4c93339.

As explained in commit 7cb51739 (FindSDL: Restore accidentally dropped
search paths (#13651), 2012-11-05) the include/SDL* path suffixes are
for looking in the ENV{SDLDIR} location.  We can add both path suffixes
in s separate topic.
Merge topic 'haiku-updates' into next

b3ccaed Revert "FindSDL: Fix broken include paths"
Merge topic 'haiku-updates' into next

54ef2be Haiku: Include files cleanup in cmCTest
38d5555 Haiku: Remove outdated preprocessor checks
1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY
7ebc1cb Haiku: Several fixes to platform module
FindSDL: Add path suffixes for <prefix>/include/(SDL|SDL12|SDL11)

Also add a comment explaining the purpose of the include/SDL* path
suffixes.  As explained in commit 7cb51739 (FindSDL: Restore
accidentally dropped search paths (#13651), 2012-11-05) the include/SDL*
path suffixes are for looking in the ENV{SDLDIR} location.

Inspired-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Merge topic 'FindSDL-path-suffixes' into next

c5c217c FindSDL: Add path suffixes for <prefix>/include/(SDL|SDL12|SDL11)