In short, my question is "why doesn't $libdir work on my PSQL installation."
CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d
AS '$libdir/liblwgeom', 'BOX2DFLOAT4_in'
LANGUAGE c IMMUTABLE STRICT;
yields an error
could not access file "$libdir/liblwgeom": No such file or directory
while
CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d
AS '/usr/local/pgsql/lib/liblwgeom', 'BOX2DFLOAT4_in'
LANGUAGE c IMMUTABLE STRICT;
works correctly.
The output of
% pg_config --pkglibdir
/usr/local/pgsql/lib
appears to be correct.