ossec/ossec-hids — pull request #132 by cgzones (2014-03-10 11:22:19+00:00)
Title: enable full clang support and remove gcc dependencies

This pull request changes two things:

* The complete ossec code can now be compiled with clang.
Therefore the external openssl was changed according to http://www.andric.com/freebsd/clang/clang-bootstrap-r210374-1.txt.
You can verify the unchanged crypto results by using the test binaries, e.g. by:
```
cd src/
make all
cd os_crypto/md5/
make main
echo "next line should be 'MD5Sum for \"test\" is: 098f6bcd4621d373cade4e832627b4f6'"
./main str test
cd ../sha1/
make main
echo "next line should be 'SHA1Sum for \"main.c\" is: 4b35e3f3e19d9861db9eeb7827f8bdf46fe4b89c'"
./main main.c
```

* The install and make script does search and set gcc as the default compiler.
Instead ossec relies on either a properly set "CC" environment variable or on a reachable "cc" binary.
So for debian/red hat respectively freebsd based systems cc is a symlink to gcc respectively clang.
If you want to use a different compiler (e.g. clang on debian) you can set the CC environment variable before running the install script (export CC=/path/to/clang) or use the maketarget setclang (which sets the CC environment variable to clang).