[MPlayer-dev-eng] [patch 2/2] check pkg-config first for libdvd{nav, read}
Mike Frysinger
vapier at gentoo.org
Sun Apr 8 23:10:29 CEST 2012
managing pkg-config files is a lot easier when cross-compiling then a variety of
config scripts. the libdvd{nav,read} packages install .pc files now, so check
those first before falling back to the config scripts.
(please cc me as i'm not on the list)
-mike
--- configure (revision 34835)
+++ configure (working copy)
@@ -5740,8 +5740,13 @@ if test "$_dvdread_internal" = auto ; th
elif test "$_dvdread" = auto ; then
_dvdread=no
if test "$_dl" = yes; then
- _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
- _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
+ if ! $_pkg_config --exists dvdread ; then
+ _dvdreadcflags=$($_pkgconfig dvdread --cflags)
+ _dvdreadlibs=$($_pkgconfig dvdread --libs)
+ else
+ _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
+ _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
+ fi
if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then
_dvdread=yes
extra_cflags="$extra_cflags $_dvdreadcflags"
@@ -7721,13 +7726,20 @@ if test "$_dvdnav" = auto ; then
dvdnav_internal=yes
res_comment="internal"
else
- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
+ if ! $_pkg_config --exists dvdnavmini ; then
+ $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
+ fi
fi
fi
if test "$_dvdnav" = auto ; then
_dvdnav=no
- _dvdnavdir=$($_dvdnavconfig --cflags)
- _dvdnavlibs=$($_dvdnavconfig --libs)
+ if $_pkg_config --exists dvdnavmini ; then
+ _dvdnavdir=$($_pkg_config --cflags dvdnavmini)
+ _dvdnavlibs=$($_pkg_config --libs dvdnavmini)
+ else
+ _dvdnavdir=$($_dvdnavconfig --cflags)
+ _dvdnavlibs=$($_dvdnavconfig --libs)
+ fi
statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread &&
_dvdnav=yes
fi
if test "$_dvdnav" = yes ; then
@@ -7736,8 +7748,13 @@ if test "$_dvdnav" = yes ; then
cflags_libdvdnav="-Ilibdvdnav"
inputmodules="dvdnav(internal) $inputmodules"
else
- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
+ if $_pkg_config --exists dvdnavmini ; then
+ extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnavmini)"
+ extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnavmini)"
+ else
+ extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
+ extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
+ fi
inputmodules="dvdnav $inputmodules"
fi
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20120408/b15363f7/attachment.asc>
More information about the MPlayer-dev-eng
mailing list