libtool: link: cannot find the library `/lib/libgcrypt.la'
I'm trying to compile PHP, but the compile fails with the error:
I have libgcrypt installed in a non-standard location, but I am specifying the location with the LDFLAGS and CPPFLAGS in configure. When I make I get the error above.
libtool: link: cannot find the library `/lib/libgcrypt.la' or unhandled argument `/lib/libgcrypt.la'
make: *** [sapi/cli/php] Error 1
This is my configure line:
I have opened this as a bug on php.net, but I'm not sure whether it is actually a bug with PHP, or I'm missing something else I need to do to make libtool look in the right place for the gcrypt lib?
LDFLAGS=-L$HOME/apps/libgcrypt/lib CPPFLAGS=-I$HOME/apps/libgcrypt/include ./configure --prefix=$HOME/apps/$PHP \
Libtool version is libtool (GNU libtool) 2.4.2, PHP I'm trying to compile is 5.4.8 but I also get the same error with older versions, libgcrypt version is 1.5.0.
The directory $HOME/apps/libgcrypt is a symlink to $HOME/apps/libgcrypt-1.5.0. The file $HOME/apps/libgcrypt-1.5.0/lib/libgcrypt.la exists and the symlink isn't broken or anything.