diff --git a/config.m4 b/config.m4 index f475bf7..5131c50 100644 --- a/config.m4 +++ b/config.m4 @@ -15,7 +15,12 @@ if test $PHP_ZBARCODE != "no"; then # # ImageMagick macros # - m4_include([imagemagick.m4]) + + if test "$ext_shared" != "yes" && test "$ext_shared" != "shared"; then + define('PHP_ZBARCODE_STATIC', 1) + PHP_ZBARCODE_STATIC=yes + fi + m4_include(ifdef('PHP_ZBARCODE_STATIC',PHP_EXT_BUILDDIR(zbarcode)[/],)[imagemagick.m4]) IM_FIND_IMAGEMAGICK(6002004, $PHP_ZBARCODE_IMAGEMAGICK_DIR) AC_MSG_CHECKING(zbar installation) diff --git a/php_zbarcode.h b/php_zbarcode.h index 8847391..18db567 100644 --- a/php_zbarcode.h +++ b/php_zbarcode.h @@ -66,4 +66,7 @@ typedef struct _php_zbarcode_image_object { } php_zbarcode_image_object; /* }}} */ +extern zend_module_entry zbarcode_module_entry; +#define phpext_zbarcode_ptr &zbarcode_module_entry + #endif