From 59aecb1d88f18aab94e33a9a57f5ac9d4afd6472 Mon Sep 17 00:00:00 2001 From: foobar Date: Wed, 21 Dec 2005 21:44:15 +0000 Subject: [PATCH] MFH:- Fixed bug #35461 (Ming extension fails to compile with ming 0.3beta1) --- NEWS | 1 + ext/ming/config.m4 | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 5247e4148d..a09168be92 100644 --- a/NEWS +++ b/NEWS @@ -72,6 +72,7 @@ PHP NEWS - Fixed bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper init). (Ilia) - Fixed bug #35490 (socket_sendto() unable to handle IPv6 addresses). (Tony) +- Fixed bug #35461 (Ming extension fails to compile with ming 0.3beta1). (Jani) - Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4). (Dmitry) - Fixed bug #35470 (Assigning global using variable name from array doesn't function). (Dmitry) diff --git a/ext/ming/config.m4 b/ext/ming/config.m4 index 94186491f0..bc92e239a9 100644 --- a/ext/ming/config.m4 +++ b/ext/ming/config.m4 @@ -40,6 +40,10 @@ if test "$PHP_MING" != "no"; then PHP_ADD_INCLUDE($MING_INC_DIR) PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/$PHP_LIBDIR, MING_SHARED_LIBADD) + PHP_CHECK_LIBRARY(ming, SWFPrebuiltClip, [ AC_DEFINE(HAVE_SWFPREBUILTCLIP, 1, [ ]) ], [], []) + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$MING_INC_DIR AC_MSG_CHECKING([for destroySWFBlock]) AC_TRY_RUN([ #include "ming.h" @@ -58,11 +62,7 @@ int main() { AC_MSG_RESULT([unknown]) ]) - PHP_CHECK_LIBRARY(ming, SWFPrebuiltClip, [ AC_DEFINE(HAVE_SWFPREBUILTCLIP, 1, [ ]) ], [], []) - dnl Check Ming version (FIXME: if/when ming has some better way to detect the version..) - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$MING_INC_DIR AC_EGREP_CPP(yes, [ #include #ifdef SWF_SOUND_COMPRESSION @@ -72,14 +72,16 @@ yes AC_DEFINE(HAVE_NEW_MING, 1, [ ]) dnl FIXME: This is now unconditional..better check coming later. AC_DEFINE(HAVE_MING_ZLIB, 1, [ ]) - - AC_TRY_COMPILE([#include ], - [ -int main(int,void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; } - ], [ - AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ]) - ], []) ]) + + dnl Check if SWFMovie_output() accepts the 4th parameter + AC_TRY_COMPILE([ +#include + ], [ +int main(void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; } + ], [ + AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ]) + ], []) CPPFLAGS=$old_CPPFLAGS PHP_NEW_EXTENSION(ming, ming.c, $ext_shared) -- 2.40.0