comparison configure @ 23183:82cfeb375358

libdvdnav now depends on our fork of the library; only the version without the dvdread code will be used (libdvdnavmini); move the dvdnav check code at the bottom of the list to prevent _ld_extra to contain references to -ldvdnavmini that would make all the following tests fail (because of the missing dvdread symbols).
author nicodvb
date Tue, 01 May 2007 19:54:13 +0000
parents f1fedd147362
children 4db54976dc43
comparison
equal deleted inserted replaced
23182:8749e6b047ef 23183:82cfeb375358
5196 _res_comment="not supported on this OS" 5196 _res_comment="not supported on this OS"
5197 _vcd="no" 5197 _vcd="no"
5198 fi 5198 fi
5199 echores "$_vcd" 5199 echores "$_vcd"
5200 5200
5201 echocheck "DVD support (libdvdnav)"
5202 if test "$_dvdnav" = auto ; then
5203 $_dvdnavconfig --version >> $TMPLOG 2>&1 || _dvdnav=no
5204 fi
5205 if test "$_dvdnav" = auto ; then
5206 cat > $TMPC <<EOF
5207 #include <inttypes.h>
5208 #include <dvdnav.h>
5209 int main(void) { dvdnav_t *dvd=0; return 0; }
5210 EOF
5211 _dvdnav=no
5212 _dvdnavdir=`$_dvdnavconfig --cflags`
5213 _dvdnavlibs=`$_dvdnavconfig --libs`
5214 _dvdnavvsn=`$_dvdnavconfig --version | sed "s/\.//g"`
5215 _dvdnavmajor=`echo $_dvdnavvsn | cut -d. -f2`
5216 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
5217 cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
5218 fi
5219 if test "$_dvdnav" = yes ; then
5220 _largefiles=yes
5221 _def_dvdnav='#define USE_DVDNAV 1'
5222 _ld_extra="$_ld_extra `$_dvdnavconfig --libs`"
5223 _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
5224 _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
5225 _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
5226 _inputmodules="dvdnav $_inputmodules"
5227
5228 #disable dvdread checks: dvdread will be enabled using dvdnav's version of dvdread
5229 _dvdread_internal=no
5230 _dvdread=yes
5231 else
5232 _def_dvdnav='#undef USE_DVDNAV'
5233 _noinputmodules="dvdnav $_noinputmodules"
5234 fi
5235 echores "$_dvdnav"
5236 5201
5237 5202
5238 echocheck "dvdread" 5203 echocheck "dvdread"
5239 if test "$_dvdread_internal" = auto ; then 5204 if test "$_dvdread_internal" = auto ; then
5240 _dvdread_internal=no 5205 _dvdread_internal=no
5268 _inputmodules="dvdread(internal) $_inputmodules" 5233 _inputmodules="dvdread(internal) $_inputmodules"
5269 _largefiles=yes 5234 _largefiles=yes
5270 elif test "$_dvdread" = yes; then 5235 elif test "$_dvdread" = yes; then
5271 _def_dvdread='#define USE_DVDREAD 1' 5236 _def_dvdread='#define USE_DVDREAD 1'
5272 _largefiles=yes 5237 _largefiles=yes
5273 if test "$_dvdnav" != yes; then
5274 _ld_extra="$_ld_extra -ldvdread" 5238 _ld_extra="$_ld_extra -ldvdread"
5275 _inputmodules="dvdread(external) $_inputmodules" 5239 _inputmodules="dvdread(external) $_inputmodules"
5276 _res_comment="external" 5240 _res_comment="external"
5277 else
5278 _inputmodules="dvdread(from dvdnav) $_inputmodules"
5279 _res_comment="from dvdnav"
5280 fi
5281 else 5241 else
5282 _def_dvdread_internal="#undef USE_DVDREAD_INTERNAL" 5242 _def_dvdread_internal="#undef USE_DVDREAD_INTERNAL"
5283 _def_dvdread='#undef USE_DVDREAD' 5243 _def_dvdread='#undef USE_DVDREAD'
5284 _noinputmodules="dvdread $_noinputmodules" 5244 _noinputmodules="dvdread $_noinputmodules"
5285 fi 5245 fi
7517 EOF 7477 EOF
7518 if cc_check -Wdeclaration-after-statement ; then 7478 if cc_check -Wdeclaration-after-statement ; then
7519 CFLAGS="-Wdeclaration-after-statement $CFLAGS" 7479 CFLAGS="-Wdeclaration-after-statement $CFLAGS"
7520 fi 7480 fi
7521 7481
7482
7483 #this must be the last test to be performed or the ones following it will likely fail
7484 #because libdvdnavmini is intentionally not linked against libdvdread (to permit mplayer
7485 # to use its own copy of the library)
7486 echocheck "DVD support (libdvdnav)"
7487 if test "$_dvdnav" = auto ; then
7488 $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
7489 fi
7490 if test "$_dvdnav" = auto ; then
7491 cat > $TMPC <<EOF
7492 #include <inttypes.h>
7493 #include <dvdnav.h>
7494 int main(void) { dvdnav_t *dvd=0; return 0; }
7495 EOF
7496 _dvdnav=no
7497 _dvdnavdir=`$_dvdnavconfig --cflags`
7498 _dvdnavlibs=`$_dvdnavconfig --libs`
7499 _dvdnavvsn=`$_dvdnavconfig --version | sed "s/\.//g"`
7500 _dvdnavmajor=`echo $_dvdnavvsn | cut -d. -f2`
7501 test "$_dvdnavmajor" -ge 2 -o "$_dvdnavvsn" -ge 0110 && \
7502 cc_check $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
7503 fi
7504 if test "$_dvdnav" = yes ; then
7505 _largefiles=yes
7506 _def_dvdnav='#define USE_DVDNAV 1'
7507 _dvdnav_version=`$_dvdnavconfig --version | sed "s/\.//g"`
7508 _def_dvdnav_version="#define DVDNAVVERSION $_dvdnav_version"
7509 _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
7510 _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
7511 _inputmodules="dvdnav $_inputmodules"
7512 else
7513 _def_dvdnav='#undef USE_DVDNAV'
7514 _noinputmodules="dvdnav $_noinputmodules"
7515 fi
7516 echores "$_dvdnav"
7522 7517
7523 ############################################################################# 7518 #############################################################################
7524 echo "Creating config.mak" 7519 echo "Creating config.mak"
7525 cat > config.mak << EOF 7520 cat > config.mak << EOF
7526 # -------- Generated by configure ----------- 7521 # -------- Generated by configure -----------