mirror of
https://github.com/mpv-player/mpv
synced 2025-01-07 07:30:09 +00:00
configure: Make the special dvdnav test the last one again
The libdvdnav linker flag handling is hacky and can add flags that make any compile attempt using them fail unless MPlayer's internal dvdread has been compiled and is linked as a part of the resulting binary. For this reason no more tests using the common flags can be performed after the flags from the dvdnav test have been added. However the dvdnav test was no longer the last one despite some warning comments. Move it back to the last position and make the warnings a bit more explicit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28703 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ee50536b74
commit
9aa9e86517
90
configure
vendored
90
configure
vendored
@ -7873,49 +7873,6 @@ fi
|
||||
echores "$_maemo"
|
||||
fi
|
||||
|
||||
#this must be the last test to be performed or the ones following it will likely fail
|
||||
#because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
|
||||
# to use its own copy of the library)
|
||||
echocheck "DVD support (libdvdnav)"
|
||||
dvdnav_internal=no
|
||||
if test "$_dvdnav" = auto ; then
|
||||
if test "$_dvdread_internal" = yes ; then
|
||||
_dvdnav=yes
|
||||
dvdnav_internal=yes
|
||||
_res_comment="internal"
|
||||
else
|
||||
$_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
|
||||
fi
|
||||
fi
|
||||
if test "$_dvdnav" = auto ; then
|
||||
cat > $TMPC <<EOF
|
||||
#include <inttypes.h>
|
||||
#include <dvdnav/dvdnav.h>
|
||||
int main(void) { dvdnav_t *dvd=0; return 0; }
|
||||
EOF
|
||||
_dvdnav=no
|
||||
_dvdnavdir=`$_dvdnavconfig --cflags`
|
||||
_dvdnavlibs=`$_dvdnavconfig --libs`
|
||||
cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
|
||||
fi
|
||||
if test "$_dvdnav" = yes ; then
|
||||
_largefiles=yes
|
||||
def_dvdnav='#define CONFIG_DVDNAV 1'
|
||||
if test "$dvdnav_internal" = yes ; then
|
||||
_inc_extra="$_inc_extra -Ilibdvdnav"
|
||||
_inputmodules="dvdnav(internal) $_inputmodules"
|
||||
else
|
||||
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
|
||||
_ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
|
||||
_inputmodules="dvdnav $_inputmodules"
|
||||
fi
|
||||
else
|
||||
def_dvdnav='#undef CONFIG_DVDNAV'
|
||||
_noinputmodules="dvdnav $_noinputmodules"
|
||||
fi
|
||||
echores "$_dvdnav"
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
||||
# On OS/2 nm supports only a.out. So the -Zomf compiler option to generate
|
||||
@ -7981,6 +7938,53 @@ fi
|
||||
|
||||
cc_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer"
|
||||
|
||||
# This must be the last test to be performed. Any other tests following it
|
||||
# could fail due to linker errors. libdvdnavmini is intentionally not linked
|
||||
# against libdvdread (to permit MPlayer to use its own copy of the library).
|
||||
# So any compilation using the flags added here but not linking against
|
||||
# libdvdread can fail.
|
||||
echocheck "DVD support (libdvdnav)"
|
||||
dvdnav_internal=no
|
||||
if test "$_dvdnav" = auto ; then
|
||||
if test "$_dvdread_internal" = yes ; then
|
||||
_dvdnav=yes
|
||||
dvdnav_internal=yes
|
||||
_res_comment="internal"
|
||||
else
|
||||
$_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
|
||||
fi
|
||||
fi
|
||||
if test "$_dvdnav" = auto ; then
|
||||
cat > $TMPC <<EOF
|
||||
#include <inttypes.h>
|
||||
#include <dvdnav/dvdnav.h>
|
||||
int main(void) { dvdnav_t *dvd=0; return 0; }
|
||||
EOF
|
||||
_dvdnav=no
|
||||
_dvdnavdir=`$_dvdnavconfig --cflags`
|
||||
_dvdnavlibs=`$_dvdnavconfig --libs`
|
||||
cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
|
||||
fi
|
||||
if test "$_dvdnav" = yes ; then
|
||||
_largefiles=yes
|
||||
def_dvdnav='#define CONFIG_DVDNAV 1'
|
||||
if test "$dvdnav_internal" = yes ; then
|
||||
_inc_extra="$_inc_extra -Ilibdvdnav"
|
||||
_inputmodules="dvdnav(internal) $_inputmodules"
|
||||
else
|
||||
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
|
||||
_ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
|
||||
_inputmodules="dvdnav $_inputmodules"
|
||||
fi
|
||||
else
|
||||
def_dvdnav='#undef CONFIG_DVDNAV'
|
||||
_noinputmodules="dvdnav $_noinputmodules"
|
||||
fi
|
||||
echores "$_dvdnav"
|
||||
|
||||
# DO NOT ADD ANY TESTS THAT USE LINKER FLAGS HERE (like cc_check).
|
||||
# Read dvdnav comment above.
|
||||
|
||||
#############################################################################
|
||||
echo "Creating config.mak"
|
||||
cat > config.mak << EOF
|
||||
|
Loading…
Reference in New Issue
Block a user