[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] _movie module build problem in Debian: ffmpeg headers
Hi,
In Debian Linux the libavcodec, libavformat, etc header subdirectories
are all in /usr/include/ffmpeg. This causes problems with
config_unix.py, which doesn't find the avformat.h and swscale.h headers.
Adding '/include/ffmpeg/libavformat' and '/include/ffmpeg/libswscale' to
the subdirectories searched fixes the library search problem, generating
the following Setup file entries:
AVFORMAT = -I/usr/include/ffmpeg/libavformat -L/usr/lib -lavformat
SWSCALE = -I/usr/include/ffmpeg/libswscale -L/usr/lib -lswscale
But then setup.py gives this compiler error message for _gsound.c:
/usr/include/ffmpeg/libavformat/avformat.h:40:32: error:
libavcodec/avcodec.h: No such file or directory
As can be seen, the header convention used in ffmpeg is
"libavcodec/avcodec.h", "libavformat/avformat.h", etc.
By changing the _movie module to use the same ffmpeg header convention,
config_unix.py only needs to add /usr/include/ffmpeg to the header
search path,
AVFORMAT = -I/usr/include/ffmpeg -L/usr/lib -lavformat
SWSCALE = -I/usr/include/ffmpeg -L/usr/lib -lswscale
and everything compiles. If this will not cause problems on other
platforms I can commit the changes to svn.
Lenard