]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix documentation flag and re-enable -Wall for GCC
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Feb 2021 12:25:37 +0000 (12:25 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Feb 2021 12:25:37 +0000 (12:25 +0000)
configure
configure.ac

index 6247c4c6fde2af55c1c6852a6c91654a349d0791..371081aa3dac31ca328d428662038d3ea4162f64 100755 (executable)
--- a/configure
+++ b/configure
@@ -13039,60 +13039,6 @@ if test "x$developer" = "xyes"; then
 $as_echo "$as_me: Setting additional developer CFLAGS" >&6;}
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
-$as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
-if ${ax_cv_cc_wdocumentation_flag+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
-    CFLAGS_SAVED=$CFLAGS
-    CFLAGS="$CFLAGS -Werror -Wdocumentation"
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ax_cv_cc_wdocumentation_flag="yes"
-else
-  ax_cv_cc_wdocumentation_flag="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-    CFLAGS="$CFLAGS_SAVED"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
-$as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
-
-  if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
-    devcflags="-Wdocumentation"
-
-$as_echo "#define HAVE_WDOCUMENTATION 1" >>confdefs.h
-
-  fi
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Weverything\"" >&5
 $as_echo_n "checking for the compiler flag \"-Weverything\"... " >&6; }
 if ${ax_cv_cc_weverything_flag+:} false; then :
@@ -13194,6 +13140,60 @@ $as_echo "$ax_cv_cc_weverything_flag" >&6; }
   fi
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wdocumentation\"" >&5
+$as_echo_n "checking for the compiler flag \"-Wdocumentation\"... " >&6; }
+if ${ax_cv_cc_wdocumentation_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+    CFLAGS_SAVED=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -Wdocumentation"
+
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ax_cv_cc_wdocumentation_flag="yes"
+else
+  ax_cv_cc_wdocumentation_flag="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+    CFLAGS="$CFLAGS_SAVED"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_wdocumentation_flag" >&5
+$as_echo "$ax_cv_cc_wdocumentation_flag" >&6; }
+
+  if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
+    devcflags="$devcflags -Wdocumentation"
+
+$as_echo "#define HAVE_WDOCUMENTATION 1" >>confdefs.h
+
+  fi
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the compiler flag \"-Wimplicit-fallthrough\"" >&5
 $as_echo_n "checking for the compiler flag \"-Wimplicit-fallthrough\"... " >&6; }
 if ${ax_cv_cc_wimplicit_fallthrough_flag+:} false; then :
index da8228bb2402830a9a0943022a59ebae77b1fde5..2b9c6ebe0914354d4b8135d1778c0590abe18d09 100644 (file)
@@ -1692,15 +1692,6 @@ AC_SUBST(LIBPREFIX)
 if test "x$developer" = "xyes"; then
   AC_MSG_NOTICE([Setting additional developer CFLAGS])
 
-  dnl #
-  dnl #  Tell the compiler to parse doxygen documentation and verify it against function and variable declarations
-  dnl #
-  AX_CC_WDOCUMENTATION_FLAG
-  if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
-    devcflags="-Wdocumentation"
-    AC_DEFINE([HAVE_WDOCUMENTATION],1,[Define if the compiler supports -Wdocumentation])
-  fi
-
   dnl #
   dnl #  If we have -Weverything, it really means *everything* unlike -Wall
   dnl #  It's so verbose we need to turn off warnings which aren't useful.
@@ -1736,6 +1727,7 @@ if test "x$developer" = "xyes"; then
     if test "x$GCC" = "xyes"; then
       devcflags="$devcflags \
        -W \
+       -Wall \
        -Wcast-align \
        -Wcast-qual \
        -Wformat-nonliteral \
@@ -1760,6 +1752,15 @@ if test "x$developer" = "xyes"; then
     fi
   fi
 
+  dnl #
+  dnl #  Tell the compiler to parse doxygen documentation and verify it against function and variable declarations
+  dnl #
+  AX_CC_WDOCUMENTATION_FLAG
+  if test "x$ax_cv_cc_wdocumentation_flag" = "xyes"; then
+    devcflags="$devcflags -Wdocumentation"
+    AC_DEFINE([HAVE_WDOCUMENTATION],1,[Define if the compiler supports -Wdocumentation])
+  fi
+
   dnl #
   dnl #  Older versions of GCC don't support this, but 7 seems to
   dnl #