Permalink
Browse files

Merge pull request #203 from lpinca/master

Build improvements
  • Loading branch information...
2 parents 718e868 + 25234db commit c5468473d38155db7211ea4c4a212a81ed9df944 @tj tj committed Aug 14, 2012
Showing with 10 additions and 3 deletions.
  1. +7 −0 src/init.cc
  2. +3 −3 util/has_lib.sh
View
@@ -51,9 +51,16 @@ init (Handle<Object> target) {
}
target->Set(String::New("jpegVersion"), String::New(jpeg_version));
#endif
+
#ifdef HAVE_GIF
+#ifndef GIF_LIB_VERSION
+ char gif_version[10];
+ snprintf(gif_version, 10, "%d.%d.%d", GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE);
+ target->Set(String::New("gifVersion"), String::New(gif_version));
+#else
target->Set(String::New("gifVersion"), String::New(GIF_LIB_VERSION));
#endif
+#endif
}
NODE_MODULE(canvas,init);
View
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
has_lib() {
- local regex="lib$1.+(so|dylib)(?!\.)"
+ local regex="lib$1.+(so|dylib)$"
# Try using ldconfig on linux systems
- for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -P $regex`; do
+ for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; 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 -P $regex && return 0
+ test -d $dir && ls $dir | grep -E $regex && return 0
done
return 1

0 comments on commit c546847

Please sign in to comment.