From: Nuno Lopes Date: Sat, 6 Jan 2007 19:26:32 +0000 (+0000) Subject: MFB: fix build with libming 0.3 X-Git-Tag: RELEASE_1_0_0RC1~377 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=726dfb08373e73b2e2cf5caf9a714532a2c35b66;p=php MFB: fix build with libming 0.3 --- 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 d2bcf18428..07e1c1f9ef 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; @@ -2190,6 +2193,7 @@ PHP_METHOD(swfmovie, labelFrame) } /* }}} */ +#ifdef HAVE_SWFMOVIE_NAMEDANCHOR /* {{{ proto void swfmovie::namedanchor(string name) */ PHP_METHOD(swfmovie, namedAnchor) @@ -2205,6 +2209,7 @@ PHP_METHOD(swfmovie, namedAnchor) SWFMovie_namedAnchor(getMovie(getThis() TSRMLS_CC), Z_STRVAL_PP(name)); } /* }}} */ +#endif /* {{{ proto void swfmovie::protect([ string pasword]) */ @@ -2784,8 +2789,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 62235daa38..5d1c66c2d4 100644 --- a/ext/ming/php_ming.h +++ b/ext/ming/php_ming.h @@ -78,7 +78,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); @@ -265,6 +267,8 @@ PHP_FUNCTION(ming_useSWFVersion); #ifdef HAVE_NEW_MING PHP_FUNCTION(ming_useConstants); +#endif +#ifdef HAVE_MING_SETSWFCOMPRESSION PHP_FUNCTION(ming_setSWFCompression); #endif