~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Kristian Nielsen
  • Date: 2008-10-24 20:09:46 UTC
  • mto: This revision was merged to the branch mainline in revision 561.
  • Revision ID: knielsen@odin-20081024200946-6o6w49djl84xs6cs
Fix a few problems with the -Wredundant-decls configure check.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1495
1495
  if test "$ac_warn_pedantic" = "yes"
1496
1496
  then
1497
1497
  save_CXXFLAGS="${CXXFLAGS}"
1498
 
  CXXFLAGS="${CXXFLAGS} ${BASE_WARNINGS}"
 
1498
  CXXFLAGS="${CXXFLAGS} ${W_FAIL} -Wredundant-decls"
1499
1499
  AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls],
1500
1500
    [ac_cv_safe_to_use_Wredundant_decls_],
1501
1501
    [AC_LANG_PUSH(C++)
1504
1504
template <typename E> struct C { void foo(); };
1505
1505
template <typename E> void C<E>::foo() { }
1506
1506
template <> void C<int>::foo();
1507
 
 
1508
 
template <> void C<int>::foo() { }
1509
 
 
1510
 
void bar(C<int> &e) { e.foo(); }
1511
1507
          AC_INCLUDES_DEFAULT])],
1512
1508
       [ac_cv_safe_to_use_Wredundant_decls_=yes],
1513
1509
       [ac_cv_safe_to_use_Wredundant_decls_=no])
1514
1510
     AC_LANG_POP()])
1515
 
    if test $ac_cv_safe_to_define___extensions__ = yes
 
1511
    if test $ac_cv_safe_to_use_Wredundant_decls_ = yes
1516
1512
    then
1517
 
      W_REDUNDANT_DECLS="-Wredundant-decls"
 
1513
      GXX_W_REDUNDANT_DECLS="-Wredundant-decls"
1518
1514
    else
1519
 
      W_REDUNDANT_DECLS="-Wno-redundant-decls"
 
1515
      GXX_W_REDUNDANT_DECLS="-Wno-redundant-decls"
1520
1516
    fi
1521
 
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations ${W_REDUNDANT_DECLS} ${W_STRICT_ALIASING}"
1522
 
    GXX_PEDANTIC="-pedantic -Wundef ${W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
 
1517
    GCC_PEDANTIC="-pedantic -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls ${W_STRICT_ALIASING}"
 
1518
    GXX_PEDANTIC="-pedantic -Wundef ${GXX_W_REDUNDANT_DECLS} ${W_LONGLONG} ${W_STRICT_ALIASING}"
1523
1519
    CXXFLAGS="${save_CXXFLAGS}"
1524
1520
  fi
1525
1521