Hello
I am trying to package ffmpeg-php and use rpmfusion's ffmpeg
package. My package compiles (and works ) fine on centos 5 when using
the package from rpmforge. However, when using fedora + rpmfusion (or
centos + rpmfusion), mock build fails because it does seem to not be
able to locate the ffmpeg headers.
Excerpt from working (rpmforge) build log:
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers... ...found in /usr/include/libavcodec
checking for ffmpeg libavcodec.so... ...found in /usr/lib
checking for ffmpeg swscale support... yes
checking for ld used by gcc... /usr/bin/ld
Same when using rpmfusion:
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers...
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled
as shared libraries using the --enable-shared option
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.38650 (%build)
Bad exit status from /var/tmp/rpm-tmp.38650 (%build)
The config.m4 contains:
dnl Determine path to ffmpeg libs
if test "$PHP_FFMPEG" != "no"; then
dnl Default directories to check for ffmpeg headers
INC_CHECK_DIRS="/usr/local /usr"
dnl User has specified using --with=ffmpeg=[dir] a directory where we
should
dnl look for ffmpeg headers. Prepend this directory to the default
dirs so it
dnl gets checked first.
if test "$PHP_FFMPEG" != "yes"; then
INC_CHECK_DIRS="$PHP_FFMPEG $INC_CHECK_DIRS"
fi
AC_MSG_CHECKING(for ffmpeg headers)
for i in $INC_CHECK_DIRS ; do
if test -f $i/include/ffmpeg/avcodec.h; then
PHP_ADD_INCLUDE($i/include/ffmpeg)
FFMPEG_INC_FOUND=$i/include/ffmpeg
break
elif test -f $i/include/avcodec.h; then
PHP_ADD_INCLUDE($i/include)
FFMPEG_INC_FOUND=$i/include
break
elif test -f $i/include/libavcodec/avcodec.h; then
dnl ffmpeg svn revision 12194 and newer put each header in its own dir
dnl so we have to include them all.
PHP_ADD_INCLUDE($i/include/libavcodec/)
PHP_ADD_INCLUDE($i/include/libavformat/)
PHP_ADD_INCLUDE($i/include/libavutil/)
PHP_ADD_INCLUDE($i/include/libswscale/)
PHP_ADD_INCLUDE($i/include/libavfilter/)
PHP_ADD_INCLUDE($i/include/libavdevice/)
FFMPEG_INC_FOUND=$i/include/libavcodec
break
fi
done
if test -z "$FFMPEG_INC_FOUND"; then
AC_MSG_RESULT()
AC_MSG_ERROR([ffmpeg headers not found. Make sure ffmpeg is
compiled as shared libraries using the --enable-shared option])
else
AC_MSG_RESULT(...found in $FFMPEG_INC_FOUND)
fi
If I am not mistaken, these checks should accommodate the different
directory structure (rpmforge uses a single directory for all headers,
our package seems to have the headers split as described above under
the "svn revision 12194" section"). I have tried passing different
"--with-ffmpeg=" variants, but none was successful.
My current attempts are available at
http://wolfy.fedorapeople.org/ffmpeg-php/
Any ideas, please ?
TIA
wolfy