aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-02 19:48:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-02 19:48:04 +0100
commit9adc999d2a927123d4b37a2a0c6eeb0d37c12cef (patch)
treee6c059ffdbd227437299b6bde81952eccf210c65
parent68b8e21b8bac7eac5d8b7263806e29d2c8b3b2d4 (diff)
parent6c96aa06066db2a62667b6c537a38db7eab25f7f (diff)
downloadffmpeg-9adc999d2a927123d4b37a2a0c6eeb0d37c12cef.tar.gz
Merge remote-tracking branch 'cigaes/master'
* cigaes/master: configure: add a note about pkg-config --static. configure: add optional pkg-config helper and use it. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure20
1 files changed, 13 insertions, 7 deletions
diff --git a/configure b/configure
index d4a86c0abb..c046e3484d 100755
--- a/configure
+++ b/configure
@@ -1203,13 +1203,17 @@ require_cpp(){
check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
}
-require_pkg_config(){
+use_pkg_config(){
pkg="$1"
- check_pkg_config "$@" || die "ERROR: $pkg not found"
+ check_pkg_config "$@" || return 1
add_cflags $(get_safe ${pkg}_cflags)
add_extralibs $(get_safe ${pkg}_libs)
}
+require_pkg_config(){
+ use_pkg_config "$@" || die "ERROR: $pkg not found using pkg-config$pkg_config_fail_message"
+}
+
require_libfreetype(){
log require_libfreetype "$@"
pkg="freetype2"
@@ -3066,9 +3070,13 @@ set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
enabled cross_compile || host_cc_default=$cc
set_default host_cc
+pkg_config_fail_message=""
if ! $pkg_config --version >/dev/null 2>&1; then
warn "$pkg_config not found, library detection may fail."
pkg_config=false
+elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config $pkg_config_flags; then
+ pkg_config_fail_message="
+Note: When building a static binary, add --pkg-config-flags=\"--static\"."
fi
if test $doxygen != $doxygen_default && \
@@ -4875,9 +4883,8 @@ enabled libquvi && require_pkg_config libquvi quvi/quvi.h quvi_init
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer
-enabled libsmbclient && { { check_pkg_config smbclient libsmbclient.h smbc_init &&
- require_pkg_config smbclient libsmbclient.h smbc_init; } ||
- require smbclient libsmbclient.h smbc_init -lsmbclient; }
+enabled libsmbclient && { check_pkg_config smbclient libsmbclient.h smbc_init ||
+ require smbclient libsmbclient.h smbc_init -lsmbclient; }
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config speex speex/speex.h speex_decoder_init -lspeex
@@ -4903,8 +4910,7 @@ enabled libvpx && {
enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } }
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
enabled libwebp && require_pkg_config "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
-enabled libx264 && { { check_pkg_config x264 "stdint.h x264.h" x264_encoder_encode &&
- require_pkg_config x264 "stdint.h x264.h" x264_encoder_encode; } ||
+enabled libx264 && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
{ require libx264 x264.h x264_encoder_encode -lx264 &&
warn "using libx264 without pkg-config"; } } &&
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||