Changeset 6509 for trunk/admin

Show
Ignore:
Timestamp:
09/07/08 22:58:04 (3 months ago)
Author:
flynd
Message:

Let configure check whether -Wextra is usable so we can get the extra warnings if compiler supports it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/acinclude.m4.in

    r6441 r6509  
    124124  CFLAGS="$CFLAGS -g" 
    125125fi 
     126]) 
     127 
     128dnl Check if we should use -Wextra or -W to get extra warnings 
     129AC_DEFUN([LICQ_CXX_WEXTRA], 
     130[ 
     131  AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl 
     132    old_CFLAGS="$CFLAGS" 
     133    CFLAGS="$CFLAGS -Wextra" 
     134    AC_COMPILE_IFELSE([void foo (void) { }], ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) 
     135    CFLAGS="$old_CFLAGS"]) 
     136  AC_SUBST(WEXTRA) 
     137  AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) 
    126138]) 
    127139