6

I'm trying to install GTK-DFB and cairo is a requirement. When I try to build it from source, it throws:

checking for cairo's PNG functions feature... 
configure: WARNING: Could not find libpng in the pkg-config search path
checking whether cairo's PNG functions feature could be enabled... no
configure: error: recommended PNG functions feature could not be enabled

Ideas?

Thanks

Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288

3 Answers3

7

For me it helped to export the following variable in the shell:

export png_REQUIRES="libpng"

Credit to this post

AS1
  • 1,115
  • 1
  • 9
  • 7
5

You need to have the libpng development packages installed; Installation is distribution dependent, but for debian derivatives following should be enough:

apt-get install libpng12-dev
azatoth
  • 2,379
  • 15
  • 18
2

If you're on Ubuntu, another much faster solution is to do:

apt-get build-dep gtk+2.0
bratsche
  • 2,666
  • 20
  • 23