This makes existing pkg-config uses as well as the libsdl checks
use the new pkg-config helper functions, which should be more
robust against broken systems.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -2870,9 +2870,9 @@ check_mathfunc truncf |
2870 | 2870 |
# these are off by default, so fail if requested and not available |
2871 | 2871 |
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32 |
2872 | 2872 |
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } |
2873 |
-enabled libdirac && add_cflags $(pkg-config --cflags dirac) && |
|
2874 |
- require libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) && |
|
2875 |
- require libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac) |
|
2873 |
+enabled libdirac && require_pkg_config dirac \ |
|
2874 |
+ "libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \ |
|
2875 |
+ "dirac_decoder_init dirac_encoder_init" |
|
2876 | 2876 |
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac |
2877 | 2877 |
enabled libfreetype && add_cflags $(pkg-config --cflags freetype2) && require libfreetype ft2build.h FT_Init_FreeType -lfreetype |
2878 | 2878 |
enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm |
... | ... |
@@ -2880,13 +2880,10 @@ enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_q |
2880 | 2880 |
enabled libnut && require libnut libnut.h nut_demuxer_init -lnut |
2881 | 2881 |
enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb |
2882 | 2882 |
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb |
2883 |
-enabled libopencv && { check_lib opencv/cv.h cvCreateImageHeader $(pkg-config --libs opencv) || |
|
2884 |
- die "ERROR: libopencv not found"; } |
|
2883 |
+enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader |
|
2885 | 2884 |
enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg |
2886 |
-enabled librtmp && { check_lib librtmp/rtmp.h RTMP_Socket $(pkg-config --libs librtmp) || |
|
2887 |
- die "ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f"; } |
|
2888 |
-enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) && |
|
2889 |
- require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0) |
|
2885 |
+enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket |
|
2886 |
+enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init |
|
2890 | 2887 |
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex |
2891 | 2888 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
2892 | 2889 |
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg |