Installing wget on mac

How to guide:
(Current version is 1.18)

I got an error saying:
configure: error: in `/Users/end/Downloads/Sources/wget-1.16.3′:
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

I resolved it with this command:
./configure –with-ssl=openssl –with-libssl-prefix=/usr/local/ssl
(I found it here