Search code examples
phpluapecl

How can you override the defaults configure options for a pecl installed package


I'm currently having issues installing the PECL LUA package due to a configure failure with:

pecl install channel://pecl.php.net/lua-0.9.4

Giving

...
checking for lua support... yes, shared
checking for lua in default path... not found
configure: error: Please reinstall the lua distribution - lua.h should be in <lua-   dir>/include/
ERROR: `/tmp/pear/temp/lua/configure' failed

Having looked at the tarball it seems the configure script will accept a "--with-lua" override to pass the known location of the lua headers. However it's entirely non-obvious how you can pass this information down using the pecl installer.


Solution

  • Well it seems there is broken configure magic in the package. In the end I had to hardwire a few paths:

    ln -s /usr/include/lua /usr/include/lua5.1
    ln -s /usr/lib/liblua5.1.a liblua.a
    ln -s /usr/include/lua/* /usr/include
    

    Was enough to get the compiler through.