Browse Source

Add pango build support and improve configure library detection.

v1.x
c-spencer 12 years ago
parent
commit
2140de6b24
  1. 14
      binding.gyp
  2. 11
      configure

14
binding.gyp

@ -2,7 +2,8 @@
'variables': {
'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle
'with_jpeg%': 'false',
'with_gif%': 'false'
'with_gif%': 'false',
'with_pango%': 'false'
},
'targets': [
{
@ -34,7 +35,18 @@
'libraries': [
'-lpixman-1',
'-lcairo'
]
}],
['with_pango=="true"', {
'defines': [
'HAVE_PANGO'
],
'include_dirs': [ # tried to pass through cflags but failed
'<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)'
],
'libraries': [
'<!@(pkg-config pangocairo --libs)'
]
}],
['with_jpeg=="true"', {
'defines': [

11
configure

@ -12,9 +12,17 @@ cppflags=
has_lib() {
local lib=$1
# Try using ldconfig on linux systems
for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep lib$lib`; do
return 0
done
# Try just checking common library locations
for dir in /lib /usr/lib /usr/local/lib /opt/local/lib; do
test -d $dir && ls $dir | grep $lib && return 0
done
return 1
}
@ -41,7 +49,7 @@ has() {
has_pkg_config() {
local lib=$1
check $lib
pkg-config --libs cairo > /dev/null
pkg-config --libs $1 > /dev/null 2> /dev/null
if test $? -eq 0; then
found $lib
else
@ -80,6 +88,7 @@ echo
has gif
has jpeg
has_pkg_config cairo
has_pkg_config pangocairo
echo
# TODO: output flags and get npm "install" script working

Loading…
Cancel
Save