|
|
@ -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 |
|
|
|