Added
Link Here
|
1 |
--- config.m4.orig 2011-09-07 10:27:21.000000000 +0200 |
2 |
+++ config.m4 2014-05-17 13:31:39.000000000 +0200 |
3 |
@@ -53,7 +53,7 @@ |
4 |
|
5 |
if test "$PHP_SNAPPY_INCLUDEDIR" != "no" && test "$PHP_SNAPPY_INCLUDEDIR" != "yes"; then |
6 |
if test -r "$PHP_SNAPPY_INCLUDEDIR/snappy.h"; then |
7 |
- SNAPPY_DIR="$PHP_SNAPPY_INCLUDEDIR" |
8 |
+ SNAPPY_DIR="$(dirname $PHP_SNAPPY_INCLUDEDIR)" |
9 |
else |
10 |
AC_MSG_ERROR([Can't find snappy headers under "$PHP_SNAPPY_INCLUDEDIR"]) |
11 |
fi |
12 |
@@ -61,12 +61,12 @@ |
13 |
SEARCH_PATH="/usr/local /usr" # you might want to change this |
14 |
SEARCH_FOR="/include/snappy-c.h" # you most likely want to change this |
15 |
if test -r $PHP_SNAPPY/$SEARCH_FOR; then # path given as parameter |
16 |
- SNAPPY_DIR="$PHP_SNAPPY/include" |
17 |
+ SNAPPY_DIR="$PHP_SNAPPY" |
18 |
else # search default path list |
19 |
AC_MSG_CHECKING([for snappy files in default path]) |
20 |
for i in $SEARCH_PATH ; do |
21 |
if test -r $i/$SEARCH_FOR; then |
22 |
- SNAPPY_DIR="$i/include" |
23 |
+ SNAPPY_DIR="$i" |
24 |
AC_MSG_RESULT(found in $i) |
25 |
fi |
26 |
done |
27 |
@@ -80,7 +80,7 @@ |
28 |
|
29 |
dnl # add include path |
30 |
|
31 |
- PHP_ADD_INCLUDE($SNAPPY_DIR) |
32 |
+ PHP_ADD_INCLUDE([$SNAPPY_DIR/include]) |
33 |
|
34 |
dnl # check for lib |
35 |
|
36 |
@@ -90,7 +90,7 @@ |
37 |
AC_LANG_CPLUSPLUS |
38 |
AC_TRY_COMPILE( |
39 |
[ |
40 |
- #include "$SNAPPY_DIR/snappy-c.h" |
41 |
+ #include "$SNAPPY_DIR/include/snappy-c.h" |
42 |
],[ |
43 |
snappy_max_compressed_length(1); |
44 |
],[ |