Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use $PKG_CONFIG instead of pkg-config
This allows to use prefixed versions of pkg-config for cross-compilation.
  • Loading branch information
olesalscheider authored and perexg committed Apr 9, 2015
1 parent d000264 commit 098213f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configure
Expand Up @@ -328,7 +328,7 @@ else
if enabled_or_auto libav; then
has_libav=true

ffmpeg=$(pkg-config --modversion libavcodec | cut -d '.' -f 3)
ffmpeg=$(${PKG_CONFIG} --modversion libavcodec | cut -d '.' -f 3)
test -z "$ffmpeg" && ffmpeg=0
printf "$TAB" "checking for ffmpeg libraries ..."
if test $ffmpeg -lt 100; then
Expand Down
10 changes: 5 additions & 5 deletions support/configure.inc
Expand Up @@ -204,11 +204,11 @@ check_pkg ()

printf "$TAB" "checking for pkg $pkg $ver ..."

dver=$(pkg-config --modversion $pkg 2> /dev/null)
dver=$(${PKG_CONFIG} --modversion $pkg 2> /dev/null)
test -z "$dver" && dver="<none>"

# Check for package
if pkg-config $pkg $cver; then
if ${PKG_CONFIG} $pkg $cver; then
echo "ok (detected ${dver})"
enable_pkg $pkg
else
Expand Down Expand Up @@ -416,7 +416,7 @@ print_config ()
# Packages
echo "Packages:"
for pkg in ${PACKAGES[*]}; do
printf "$fmt" "${pkg}" "$(pkg-config --modversion $pkg)"
printf "$fmt" "${pkg}" "$(${PKG_CONFIG} --modversion $pkg)"
done
echo ""

Expand Down Expand Up @@ -478,8 +478,8 @@ EOF
# Add package config
for pkg in ${PACKAGES[*]}; do
cat >>"${CONFIG_MK}" <<EOF
LDFLAGS += $(pkg-config --libs $pkg)
CFLAGS += $(pkg-config --cflags $pkg)
LDFLAGS += $(${PKG_CONFIG} --libs $pkg)
CFLAGS += $(${PKG_CONFIG} --cflags $pkg)
EOF
done

Expand Down

0 comments on commit 098213f

Please sign in to comment.