[MPlayer-dev-eng] [PATCH] configure cleanup

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Oct 3 11:44:28 CEST 2005


Hi,
On Sun, Oct 02, 2005 at 10:02:59PM +0200, Diego Biurrun wrote:
> > -cc_check -lsocket && _ld_sock="-lsocket"
> > -cc_check -lnsl && _ld_sock="-lnsl"
> > -cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl"
> > -cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet"
> > -cc_check -lsocket -lbind && _ld_sock="-lsocket -lbind"
> > -if test $_winsock2 = auto && not cygwin ; then
> > +for _ld_tmp in "-lsocket" "-lnsl" "-lsocket -lnsl" "-lsocket -ldnet" "-lsocket -lbind" ; do
> > +  cc_check $_ld_tmp && _ld_sock="$_ld_tmp" && break
> > +done
> > +if test -z "$_ld_sock" && test $_winsock2 = auto && not cygwin ; then
> 
> Why are you testing if _ld_sock got set here?  This was not done
> before...

Yes, you're right, but does it make sense to check for and use winsock
when another socket library is available? Dunno.

> >    _winsock2=no
> >    cat > $TMPC << EOF
> >  #include <winsock2.h>
> >  int main(void) { (void) gethostbyname(0); return 0; }
> >  EOF
> > -  cc_check -lws2_32 && _ld_sock="-lws2_32" && _winsock2=yes
> > +  cc_check -lws2_32 && _winsock2=yes
> >  fi
> >  if test "$_ld_sock" ; then
> >    echores "yes (using $_ld_sock)"
> 
> Sure about this last hunk?  It looks fishy to me...

Yes and no. There is this hunk below:
if test $_winsock2 = yes ; then
  _ld_sock="-lws2_32

But since _ld_sock is used for output befor I guess it was the wrong
place to change.

> >  echocheck "DPMS"
> >  _xdpms3=no
> > +_xdpms4=no
> 
> Hmm, why?  I think the variable is unnecessary in any case.

Huh? It is used in several places, and it is my opinion that all
variables should be either "yes" or "no" after configure.
Anyway, I just moved this up from a few lines below, so I could get rid
of one test "$_x11" = yes check.

> _jack was set to no 5 lines above, why not set it to yes in the
> beginnning?

Fixed.

> > @@ -5513,7 +5446,10 @@
> >    fi
> >    # internal faad: check if our dear gcc is able to compile it...
> >    cp "`pwd`/libfaad2/cfft.c" $TMPC
> > -  if ( cc_check -c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer -D_GNU_SOURCE $_inc_faad ); then
> > +  if test "$_lrintf" = yes ; then
> > +    _faad_extra=-DHAVE_LRINTF
> > +  fi
> > +  if ( cc_check -c -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer -D_GNU_SOURCE $_inc_faad $_faad_extra); then
> 
> Hmm, why?

Sorry, slipped in from my internal-faad-update.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list