rubinius/rubinius — pull request #1708 by jstepien (2012-05-06 17:31:41+00:00)
Title: Don't assume that llvm-config is a Perl script

As of the upcoming LLVM 3.1 release llvm-config has been rewritten as a
[native executable][1]. Executing it with Perl causes the configure script
to fail with a message

Unrecognized character \x7F; marked by <-- HERE after
<-- HERE near column 1 at llvm-config line 1.

This commit makes the configure script detect whether llvm-config is a Perl
script using a simple regular expression. If it's a Perl script it's
invoked the old way, otherwise it's invoked directly. As a result it works
correctly with LLVM 3.0 and fails with a more friendly error message when
encountering newer versions of LLVM.

[1]: https://llvm.org/svn/llvm-project/llvm/branches/release_31/tools/llvm-config/?r=156062