I have to install a C compiler
with cilkplus
branch which is recently added to the GCC
. Since it is recent so I ave to install it manually and there are no direct methods available to that. I plan to install it at custom location. I installed it on a redhat 6
and ubuntu 12.04
successfully but I found that the settings of environment variables are different on both operating systems ( not a surprise ).
For example to install the compiler on ubuntu 12.04
you would need C_INCLUDE_PATH=/usr/lib/x86_64-linux-gnu
a directory which does not exist on redhat 6
.
I plan to write a single script for installation of this compiler on many systems(different distributions of linux). How can I do it.
One way I can think of is to check which OS and version you are running and set environment variables
accordingly but here also I do not know how to do it.
Any other suggestions are also valueable. Thanks