You can use the os.popen call to open a pipe inside the script to call the
following command:
result1 = os.popen('which g++-4');
result2 = os.popen('which g++4');
(a similar command called "locate" or "slocate" seems to be broken on cygwin..."
If result2 is empty, then use the path in result1 for the compiler, etc.
This is how detect whether to use curl or wget inside fl-build. But what might be
more ideal is to make another script called "fl-setup" that basically setups the
system once to find all these variables (instead of fl-build looking up these
on the fly) to cut down the build time; this is how CMake works.
--
Dongryeol Lee
Ph.D. Student, College of Computing
Georgia Institute of Technology