The PHP_ADD_LIBPATH configure macro starts like this:
AC_DEFUN(PHP_ADD_LIBPATH,[
if test $1 != /usr/lib; then
And we also have a PHP_REMOVE_USR_LIB macro which is called on the
generated LDPATH string, so even if I do manage to sneak in my /usr/lib
directory somewhere it is removed.
This is
Hrm... Removing this does produce an amazingly ugly link line. After
playing a bit and getting frustrated that pre-setting LDFLAGS and even
PHP_LDFLAGS in my env resulted in /usr/lib getting stripped out of those
again I figured out that setting EXTRA_LDFLAGS to -L/usr/lib in my env
lets me