Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] MNG detection fails with libjpeg-turbo




Hi!

On 2017-11-26 15:36 -0500, The Wanderer wrote:
>
> Index: configure
> ===================================================================
> --- configure	(revision 38007)
> +++ configure	(working copy)
> @@ -177,6 +177,16 @@
>    compile_check $TMPC $@
>  }
>  
> +return_statement_check_broken() {
> +  cat > $TMPC << EOF
> +#include <$1>
> +#include <$2>
> +int main(void) { $3; return $4; }
> +EOF
> +  shift 4
> +  compile_check $TMPC $@
> +}
> +

It has nothing to do with your patch, because the scheme is already
established in MPlayer's configure. Anyway FWIW I really dislike the
*_check_broken naming.


>  yasm_check() {
>    echo >> "$TMPLOG"
>    cat "$TMPS" >> "$TMPLOG"
> @@ -5303,7 +5313,7 @@
>  if test "$_mng" = auto ; then
>    _mng=no
>    for mnglibs in '-lmng -lz' '-lmng -ljpeg -lz' ; do
> -    return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' $mnglibs && _mng=yes
> +    return_statement_check_broken stdio.h libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' $mnglibs && _mng=yes

Would you be OK with omitting the function defined in the previous hunk
and changing this to use statement_check_broken ?

I have done the changes locally and everything seems to work as well.

I don't think the return part adds any value, because the built
executable is never run and thus its exit status isn't evaluated.

If it was added because of fear that linking could be spared because
of some compiler optimizations, I don't think it will happen in this
case. Also lots of other checks don't use the return_statement_check.
So if there is a problem, it would better be fixed for all checks.

>    done
>  fi
>  echores "$_mng"
> Index: libvo/vo_mng.c
> ===================================================================
> --- libvo/vo_mng.c	(revision 38007)
> +++ libvo/vo_mng.c	(working copy)
> @@ -20,6 +20,7 @@
>   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>   */
>  
> +#include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
>  #include <unistd.h>


LGTM otherwise.

I intent to commit my local version with the modified configure check
if I hear no objections.

Thank you for looking into this. I am not using vo mng and I didn't
notice it won't build on many systems.


  Alexander
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng