]> granicus.if.org Git - php/commitdiff
- MFH Fix dependency from Phar to hash
authorMarcus Boerger <helly@php.net>
Tue, 4 Nov 2008 01:27:52 +0000 (01:27 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 4 Nov 2008 01:27:52 +0000 (01:27 +0000)
ext/phar/config.m4
ext/phar/util.c

index 5e32c5b6f28fe426159f88eb6e3ba28ba11a85d6..2ac7f3dd81324bdac1fd5710fee22861419797e6 100644 (file)
@@ -8,7 +8,9 @@ if test "$PHP_PHAR" != "no"; then
   PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared)
   AC_MSG_CHECKING([for phar openssl support])
   if test "$PHP_HASH_SHARED" != "yes"; then
-    AC_DEFINE(PHAR_HASH_OK,1,[ ])
+    if test "$PHP_HASH" != "no"; then
+      AC_DEFINE(PHAR_HASH_OK,1,[ ])
+    fi
   else
     AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash is built shared])
   fi
@@ -22,6 +24,7 @@ if test "$PHP_PHAR" != "no"; then
       AC_MSG_RESULT([no])
     fi
   fi
+  PHP_ADD_EXTENSION_DEP(phar, hash, true)
   PHP_ADD_EXTENSION_DEP(phar, spl, true)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
index 5c57e72e41825962fd17d55556f95f64aa51cb17..cf4fa11e2b288861e54c73c831f214a6b8a6baec 100644 (file)
@@ -21,6 +21,9 @@
 /* $Id$ */
 
 #include "phar_internal.h"
+#ifdef PHAR_HASH_OK
+#include "ext/hash/php_hash_sha.h"
+#endif
 
 #ifdef PHAR_HAVE_OPENSSL
 /* OpenSSL includes */