diff options
| author | mpeterv <mpeterval@gmail.com> | 2015-12-06 21:53:59 +0300 |
|---|---|---|
| committer | mpeterv <mpeterval@gmail.com> | 2015-12-06 21:57:32 +0300 |
| commit | 515db853f6631e92b5950bcedf392db2d35e919a (patch) | |
| tree | 651d49faf53dad4c837bad5bae9dbfc5e7392c4b | |
| parent | bf12327a64400884b2be50c88cc8b223db57260c (diff) | |
| download | luarocks-515db853f6631e92b5950bcedf392db2d35e919a.tar.gz luarocks-515db853f6631e92b5950bcedf392db2d35e919a.tar.bz2 luarocks-515db853f6631e92b5950bcedf392db2d35e919a.zip | |
Fix find_program() in configure
which returns path to the program, not to the directory containing it.
That causes errors when configuring without --with-lua.
The fix is to apply 'dirname' if 'command -v' was a success.
| -rwxr-xr-x | configure | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -71,7 +71,11 @@ EOF | |||
| 71 | # Helper functions | 71 | # Helper functions |
| 72 | 72 | ||
| 73 | find_program() { | 73 | find_program() { |
| 74 | command -v "$1" 2>/dev/null | 74 | prog=`command -v "$1" 2>/dev/null` |
| 75 | if [ -n "$prog" ] | ||
| 76 | then | ||
| 77 | dirname "$prog" | ||
| 78 | fi | ||
| 75 | } | 79 | } |
| 76 | 80 | ||
| 77 | die() { | 81 | die() { |
