~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_warnings.m4

Merge Monty - Updates to pandora-build to support features of gcc 4.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
          [ac_cv_warnings_as_errors=yes],
35
35
          [ac_cv_warnings_as_errors=no]))
36
36
 
 
37
  AC_ARG_ENABLE([gcc-profile-mode],
 
38
      [AS_HELP_STRING([--enable-gcc-profile-mode],
 
39
         [Toggle gcc profile mode @<:@default=off@:>@])],
 
40
      [ac_gcc_profile_mode="$enableval"],
 
41
      [ac_gcc_profile_mode="no"])
 
42
 
37
43
  AC_ARG_ENABLE([profiling],
38
44
      [AS_HELP_STRING([--enable-profiling],
39
45
         [Toggle profiling @<:@default=off@:>@])],
87
93
            F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
88
94
          ])
89
95
 
 
96
    AC_CACHE_CHECK([whether it is safe to use -floop-parallelize-all],
 
97
      [ac_cv_safe_to_use_floop_parallelize_all_],
 
98
      [save_CFLAGS="$CFLAGS"
 
99
       CFLAGS="-floop-parallelize-all ${AM_CFLAGS} ${CFLAGS}"
 
100
       AC_COMPILE_IFELSE(
 
101
         [AC_LANG_PROGRAM([],[])],
 
102
         [ac_cv_safe_to_use_floop_parallelize_all_=yes],
 
103
         [ac_cv_safe_to_use_floop_parallelize_all_=no])
 
104
       CFLAGS="$save_CFLAGS"])
 
105
 
 
106
    AS_IF([test "$ac_cv_safe_to_use_floop_parallelize_all_" = "yes"],
 
107
          [
 
108
            F_LOOP_PARALLELIZE_ALL="-floop-parallelize-all"
 
109
          ])
 
110
 
90
111
    NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing"
91
112
    NO_SHADOW="-Wno-shadow"
92
113
 
132
153
        [ac_cv_safe_to_use_Wextra_=no])
133
154
      CFLAGS="$save_CFLAGS"])
134
155
 
135
 
      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${BASE_WARNINGS_FULL}"
 
156
      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
136
157
      AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
137
158
            [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
138
159
            [BASE_WARNINGS="${BASE_WARNINGS} -W"])