From: Nuno Lopes Date: Sat, 6 Jan 2007 19:25:33 +0000 (+0000) Subject: fix build with libming 0.3 and older X-Git-Tag: php-5.2.1RC3~90 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b253882fcf108f7d54c88db4c047f5861a93463;p=php fix build with libming 0.3 and older --- diff --git a/ext/ming/config.m4 b/ext/ming/config.m4 index bc92e239a9..f0c1013c3f 100644 --- a/ext/ming/config.m4 +++ b/ext/ming/config.m4 @@ -41,6 +41,8 @@ if test "$PHP_MING" != "no"; then PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/$PHP_LIBDIR, MING_SHARED_LIBADD) PHP_CHECK_LIBRARY(ming, SWFPrebuiltClip, [ AC_DEFINE(HAVE_SWFPREBUILTCLIP, 1, [ ]) ], [], []) + PHP_CHECK_LIBRARY(ming, SWFMovie_namedAnchor, [ AC_DEFINE(HAVE_SWFMOVIE_NAMEDANCHOR, 1, [ ]) ], [], []) + PHP_CHECK_LIBRARY(ming, Ming_setSWFCompression, [ AC_DEFINE(HAVE_MING_SETSWFCOMPRESSION, 1, [ ]) ], [], []) old_CPPFLAGS=$CPPFLAGS CPPFLAGS=-I$MING_INC_DIR diff --git a/ext/ming/ming.c b/ext/ming/ming.c index 49361b17bc..578a6e73c1 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -52,6 +52,8 @@ static zend_function_entry ming_functions[] = { PHP_FALIAS(ming_keypress, ming_keypress, NULL) #ifdef HAVE_NEW_MING PHP_FALIAS(ming_useconstants, ming_useConstants, NULL) +#endif +#ifdef HAVE_MING_SETSWFCOMPRESSION PHP_FALIAS(ming_setswfcompression, ming_setSWFCompression, NULL) #endif { NULL, NULL, NULL } @@ -142,7 +144,9 @@ PHP_FUNCTION(ming_useConstants) Ming_useConstants(Z_LVAL_PP(num)); } /* }}} */ +#endif +#ifdef HAVE_MING_SETSWFCOMPRESSION /* {{{ set output compression */ PHP_FUNCTION(ming_setSWFCompression) { @@ -154,7 +158,6 @@ PHP_FUNCTION(ming_setSWFCompression) Ming_setSWFCompression(Z_LVAL_PP(num)); } /* }}} */ - #endif static int le_swfmoviep; @@ -2192,6 +2195,7 @@ PHP_METHOD(swfmovie, labelFrame) } /* }}} */ +#ifdef HAVE_SWFMOVIE_NAMEDANCHOR /* {{{ proto void swfmovie::namedanchor(string name) */ PHP_METHOD(swfmovie, namedAnchor) @@ -2207,6 +2211,7 @@ PHP_METHOD(swfmovie, namedAnchor) SWFMovie_namedAnchor(getMovie(getThis() TSRMLS_CC), Z_STRVAL_PP(name)); } /* }}} */ +#endif /* {{{ proto void swfmovie::protect([ string pasword]) */ @@ -2786,8 +2791,10 @@ static zend_function_entry swfmovie_functions[] = { PHP_ME(swfmovie, importChar, NULL, 0) PHP_ME(swfmovie, importFont, NULL, 0) PHP_ME(swfmovie, addFont, NULL, 0) - PHP_ME(swfmovie, namedAnchor, NULL, 0) PHP_ME(swfmovie, protect, NULL, 0) +#endif +#ifdef HAVE_SWFMOVIE_NAMEDANCHOR + PHP_ME(swfmovie, namedAnchor, NULL, 0) #endif { NULL, NULL, NULL } }; diff --git a/ext/ming/php_ming.h b/ext/ming/php_ming.h index e27ad79867..1c639f5157 100644 --- a/ext/ming/php_ming.h +++ b/ext/ming/php_ming.h @@ -79,7 +79,9 @@ PHP_METHOD(swfmovie, add); PHP_METHOD(swfmovie, remove); PHP_METHOD(swfmovie, nextFrame); PHP_METHOD(swfmovie, labelFrame); +#ifdef HAVE_SWFMOVIE_NAMEDANCHOR PHP_METHOD(swfmovie, namedAnchor); +#endif PHP_METHOD(swfmovie, setBackground); PHP_METHOD(swfmovie, setRate); PHP_METHOD(swfmovie, setDimension); @@ -266,6 +268,8 @@ PHP_FUNCTION(ming_useSWFVersion); #ifdef HAVE_NEW_MING PHP_FUNCTION(ming_useConstants); +#endif +#ifdef HAVE_MING_SETSWFCOMPRESSION PHP_FUNCTION(ming_setSWFCompression); #endif