Ticket #518: plugin-evo2-wall.diff

File plugin-evo2-wall.diff, 1.2 kB (added by HaltonHuo, 1 year ago)

patch for this bug, check whether is gcc, otherwise do not use -Wall

  • evolution2/configure.in

    old new  
    1515 
    1616PKG_CHECK_MODULES(PACKAGE, [$pkg_modules], , AC_MSG_ERROR(GLib >= 2.0 and opensync >= 1.0 required)) 
    1717 
     18AC_ARG_ENABLE(warnings, 
     19              AC_HELP_STRING([--disable-warnings], [disable GCC warnings]),, 
     20              [enable_warnings=yes]) 
     21 
     22dnl Only use -Wall if we have gcc 
     23dnl Please remove '-Wno-return-type' when Evo fixes the warning in their headers. 
     24if test "x$GCC" = "xyes"; then 
     25  if test "x$enable_warnings" = "xyes"; then 
     26     PACKAGE_CFLAGS ="\ 
     27     -Wall \ 
     28     -Werror \ 
     29     -Wno-return-type \ 
     30     $CFLAGS" 
     31  fi 
     32fi 
     33 
    1834AC_SUBST(PACKAGE_CFLAGS) 
    1935AC_SUBST(PACKAGE_LIBS) 
    2036 
  • evolution2/src/Makefile.am

    old new  
    44 
    55INCLUDES = @PACKAGE_CFLAGS@ @EPACKAGE_CFLAGS@ 
    66 
    7 # Please remove '-Wno-return-type' when Evo fixes the warning in their headers. 
    8 AM_CFLAGS = -Wall -Werror -Wno-return-type 
    9  
    107config_DATA = evo2-sync 
    118 
    129opensyncheader_HEADERS = evo2_sync.h