Skip to content
This repository
Browse code

Merge pull request #203 from lpinca/master

Build improvements
  • Loading branch information...
commit c5468473d38155db7211ea4c4a212a81ed9df944 2 parents 718e868 + 25234db
TJ Holowaychuk authored August 14, 2012
7  src/init.cc
@@ -51,9 +51,16 @@ init (Handle<Object> target) {
51 51
   }
52 52
   target->Set(String::New("jpegVersion"), String::New(jpeg_version));
53 53
 #endif
  54
+
54 55
 #ifdef HAVE_GIF
  56
+#ifndef GIF_LIB_VERSION
  57
+  char gif_version[10];
  58
+  snprintf(gif_version, 10, "%d.%d.%d", GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE);
  59
+  target->Set(String::New("gifVersion"), String::New(gif_version));
  60
+#else
55 61
   target->Set(String::New("gifVersion"), String::New(GIF_LIB_VERSION));
56 62
 #endif
  63
+#endif
57 64
 }
58 65
 
59 66
 NODE_MODULE(canvas,init);
6  util/has_lib.sh
... ...
@@ -1,15 +1,15 @@
1 1
 #!/usr/bin/env bash
2 2
 has_lib() {
3  
-  local regex="lib$1.+(so|dylib)(?!\.)"
  3
+  local regex="lib$1.+(so|dylib)$"
4 4
 
5 5
   # Try using ldconfig on linux systems
6  
-  for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -P $regex`; do
  6
+  for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do
7 7
     return 0
8 8
   done
9 9
 
10 10
   # Try just checking common library locations
11 11
   for dir in /lib /usr/lib /usr/local/lib /opt/local/lib; do
12  
-    test -d $dir && ls $dir | grep -P $regex && return 0
  12
+    test -d $dir && ls $dir | grep -E $regex && return 0
13 13
   done
14 14
 
15 15
   return 1

0 notes on commit c546847

Please sign in to comment.
Something went wrong with that request. Please try again.