[MPlayer-dev-eng] Re: Huge batch of compiler warning fixes

Andriy N. Gritsenko andrej at lucky.net
Tue Nov 5 10:04:30 CET 2002


    Hi, Arpi!

Sometime (on Monday, November  4 at 19:21) I've received something...
>also i remember that the icc patch removed some of the -Wall's as icc has no
>such option

I think we can just test for this flag in configure script. For example,
I have these lines in my own project:

--- acinclude.m4 ---
AC_DEFUN(AC_CHECK_LDFLAG,
[
$3=no
echo 'int main(){return 0;}' > conftest.c
if test -z "$1 $2 -o conftest conftest.c 2>&1"; then
  $3=yes
else
  $3=no
fi
rm -f conftest*
])
--------------------
--- configure.in ---
AC_CACHE_CHECK([for '-Wall' option], fe_cv_add_wall,
    [AC_CHECK_LDFLAG("$CC", "-Wall", fe_cv_add_wall)
])
if test "$fe_cv_add_wall" = yes; then CFLAGS="-Wall ${CFLAGS}"; fi
--------------------

With best wishes.
Andriy.



More information about the MPlayer-dev-eng mailing list