]> granicus.if.org Git - php/commitdiff
MFB: fix build with libming 0.3
authorNuno Lopes <nlopess@php.net>
Sat, 6 Jan 2007 19:26:32 +0000 (19:26 +0000)
committerNuno Lopes <nlopess@php.net>
Sat, 6 Jan 2007 19:26:32 +0000 (19:26 +0000)
ext/ming/config.m4
ext/ming/ming.c
ext/ming/php_ming.h

index bc92e239a99c0e37c66f2cd48072111d3b2aac23..f0c1013c3f899b74059e0b4485fb2395e19472f0 100644 (file)
@@ -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
index d2bcf1842857cc4adab1101e9bc2d98b37366e69..07e1c1f9ef3816b1272e3345d096554e5dbe1c27 100644 (file)
@@ -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 }
 };
index 62235daa38b70d76b6b1682704114ce8256ba29d..5d1c66c2d4159901f23a2e3cf0fd25668a4af5d1 100644 (file)
@@ -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