Avoid requiring 'mkmf' and relying on MakeMakefile
Overview
I was investigating a bug in a spec I'm writing, which prompt me to search for an alternative to the find_executable
we rely today from the mkmf
folder.
Searching on StackOverflow, I found this thread: https://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
and https://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby#comment61909626_19938871 it says its not advised to require that file outside of its intended use, as it can have some side effects: https://bugs.ruby-lang.org/issues/12370#note-4
Considering our use is limited to an "equivalent of which
command", we should re-implement that part of the logic and remove any use of mkmf
.