[PATCH] Use pkg-config for x264
Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com> --- configure | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 844133b..31e289a 100755 --- a/configure +++ b/configure @@ -2377,7 +2377,8 @@ enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) && enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg -enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm && +enabled libx264 && add_cflags $(pkg-config --cflags x264) && + require libx264 x264.h x264_encoder_encode $(pkg-config --libs x264) && { check_cpp_condition x264.h "X264_BUILD >= 78" || die "ERROR: libx264 version must be >= 0.78."; } enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore -- 1.6.5.3
Felipe Contreras wrote:
Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com> --- configure | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/configure b/configure index 844133b..31e289a 100755 --- a/configure +++ b/configure @@ -2377,7 +2377,8 @@ enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) && enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg -enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm && +enabled libx264 && add_cflags $(pkg-config --cflags x264) && + require libx264 x264.h x264_encoder_encode $(pkg-config --libs x264) && { check_cpp_condition x264.h "X264_BUILD >= 78" || die "ERROR: libx264 version must be >= 0.78."; } enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
If I remember well, the build system maintainers prefer to avoid pkg-config when possible. Does it fix any bugs? -Vitor
On Sat, Nov 21, 2009 at 7:39 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
If I remember well, the build system maintainers prefer to avoid pkg-config when possible. Does it fix any bugs?
Well, I see at least two occurrences already. If I have libx264 installed into /opt/x264 it's very easy to just use pkg-config to figure out the right flags to make use of it. -- Felipe Contreras
Felipe Contreras <felipe.contreras at gmail.com> writes:
On Sat, Nov 21, 2009 at 7:39 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
If I remember well, the build system maintainers prefer to avoid pkg-config when possible. Does it fix any bugs?
Well, I see at least two occurrences already. If I have libx264 installed into /opt/x264 it's very easy to just use pkg-config to figure out the right flags to make use of it.
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed. -- M?ns Rullg?rd mans at mansr.com
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
Felipe Contreras <felipe.contreras at gmail.com> writes:
On Sat, Nov 21, 2009 at 7:39 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
If I remember well, the build system maintainers prefer to avoid pkg-config when possible. Does it fix any bugs?
Well, I see at least two occurrences already. If I have libx264 installed into /opt/x264 it's very easy to just use pkg-config to figure out the right flags to make use of it.
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to? -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
pross at xvid.org writes:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
Felipe Contreras <felipe.contreras at gmail.com> writes:
On Sat, Nov 21, 2009 at 7:39 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
If I remember well, the build system maintainers prefer to avoid pkg-config when possible. Does it fix any bugs?
Well, I see at least two occurrences already. If I have libx264 installed into /opt/x264 it's very easy to just use pkg-config to figure out the right flags to make use of it.
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
It guesses. Wrongly. -- M?ns Rullg?rd mans at mansr.com
On Sun, Nov 22, 2009 at 2:45 PM, <pross at xvid.org> wrote:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
I don't know why that would be needed. Anyway, what makes libdirac and libschroedinger different so that they use pkg-config? -- Felipe Contreras
Felipe Contreras wrote:
On Sun, Nov 22, 2009 at 2:45 PM, <pross at xvid.org> wrote:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed. Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
I don't know why that would be needed.
For cross-compiling I suppose.
Anyway, what makes libdirac and libschroedinger different so that they use pkg-config?
The short story: it is the _only_ sane way of linking against them. The long story: this thread http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/047043.html . -Vitor
On Sun, Nov 22, 2009 at 3:56 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
Anyway, what makes libdirac and libschroedinger different so that they use pkg-config?
The short story: it is the _only_ sane way of linking against them. The long story: this thread http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/047043.html .
Thanks, I finally managed to read the thread and I agree with the final decision. -- Felipe Contreras
On Sun, Nov 22, 2009 at 03:41:05PM +0200, Felipe Contreras wrote:
On Sun, Nov 22, 2009 at 2:45 PM, <pross at xvid.org> wrote:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
I don't know why that would be needed.
Anyway, what makes libdirac and libschroedinger different so that they use pkg-config?
They are broken. Diego
On Sun, Nov 22, 2009 at 11:59 PM, Diego Biurrun <diego at biurrun.de> wrote:
On Sun, Nov 22, 2009 at 03:41:05PM +0200, Felipe Contreras wrote:
On Sun, Nov 22, 2009 at 2:45 PM, ?<pross at xvid.org> wrote:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
I don't know why that would be needed.
Anyway, what makes libdirac and libschroedinger different so that they use pkg-config?
They are broken.
No they are not. In *your* opinion their organization is suboptimal, but that's on your opinion. -- Felipe Contreras
Felipe Contreras <felipe.contreras at gmail.com> writes:
On Sun, Nov 22, 2009 at 11:59 PM, Diego Biurrun <diego at biurrun.de> wrote:
On Sun, Nov 22, 2009 at 03:41:05PM +0200, Felipe Contreras wrote:
On Sun, Nov 22, 2009 at 2:45 PM, ?<pross at xvid.org> wrote:
On Sun, Nov 22, 2009 at 12:28:16PM +0000, M?ns Rullg?rd wrote:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
Agree. Also how does the pkg-config magic determine which target arch/os you are compiling to?
I don't know why that would be needed.
Anyway, what makes libdirac and libschroedinger different so that they use pkg-config?
They are broken.
No they are not. In *your* opinion their organization is suboptimal, but that's on your opinion.
Anything function at less than 10% of reasonable is by definition broken. -- M?ns Rullg?rd mans at mansr.com
2010/2/3 M?ns Rullg?rd <mans at mansr.com>:
Felipe Contreras <felipe.contreras at gmail.com> writes:
No they are not. In *your* opinion their organization is suboptimal, but that's on your opinion.
Anything function at less than 10% of reasonable is by definition broken.
Which is not the case for 99% of the people. -- Felipe Contreras
2009/11/22 M?ns Rullg?rd <mans at mansr.com>:
You could also set C_INCLUDE_PATH and LIBRARY_PATH and be done with it, no change needed.
export PKG_CONFIG_PATH=/tmp/x264/lib/pkg-config is easier than: export C_INCLUDE_PATH=/tmp/x264/include LIBRARY_PATH=/tmp/x264/lib But I guess it's not that bad. -- Felipe Contreras
Felipe Contreras <felipe.contreras <at> gmail.com> writes:
-enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm && +enabled libx264 && add_cflags $(pkg-config --cflags x264) && + require libx264 x264.h x264_encoder_encode $(pkg-config --libs x264) && { check_cpp_condition x264.h "X264_BUILD >= 78" || die "ERROR: libx264 version must be >= 0.78."; } enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
Apart from the question which problem this fixes: Wouldn't this break using a non-installed libx264 (which is currently no problem with --extra-cflags and --extra-ldflags, iirc)? Carl Eugen
participants (6)
-
cehoyos@ag.or.at -
diego@biurrun.de -
felipe.contreras@gmail.com -
mans@mansr.com -
pross@xvid.org -
vitor1001@gmail.com