Try running:
brew info libpng
to see where libpng
is installed.
Sample Output
libpng: stable 1.6.17 (bottled)
Library for manipulating PNG images
http://www.libpng.org/pub/png/libpng.html
/usr/local/Cellar/libpng/1.6.16 (17 files, 1.3M)
Poured from bottle
/usr/local/Cellar/libpng/1.6.17 (17 files, 1.2M) *
Then try running
./configure --help
to see how to add a parameter to ./configure
to tell it where to find libpng
now that you know that from the first step. As a pure guess, you'll probably need something along the lines of
./configure --libdir=/usr/local/Cellar/libpng/1.6.16/lib