Jelajahi Sumber

Merge branch 'maint'

* maint:
  Fix TCL version detection with recent gawk
  Tweak cflags to not drop usefule flags in debug
  Fix m4 quoting / clang 10 recognition
Bryan Drewery 6 tahun lalu
induk
melakukan
b0145fdb5e
3 mengubah file dengan 10 tambahan dan 12 penghapusan
  1. 3 4
      build/autotools/includes/depend.m4
  2. 2 2
      build/autotools/includes/libtcl.m4
  3. 5 6
      configure

+ 3 - 4
build/autotools/includes/depend.m4

@@ -7,13 +7,12 @@ dnl
 AC_DEFUN([EGG_CHECK_DEPMODE],
 [
 CCDEPMODE=gcc
-num=`$CXX -dumpversion | sed "s/^\\\(.\\\).*/\\\1/"`
-if test $num -ge "3"; then
+num=`$CXX -dumpversion | [ sed "s/^\([^.]*\).*/\1/" ]`
+if [[ "$num" -ge "3" ]]; then
   CCDEPMODE=gcc3
-#  GCC3="-Wpadded -Wpacked -Wno-unused-parameter -Wmissing-format-attribute -Wdisabled-optimization"
   GCC3_CFLAGS="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -Wno-format-y2k"
   GCC3_CXXFLAGS="-Woverloaded-virtual"
-  GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
+  GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute -Wwrite-strings -Wformat-security"
 fi
 AC_SUBST(CCDEPMODE)dnl
 AC_SUBST(GCC3_CFLAGS)dnl

+ 2 - 2
build/autotools/includes/libtcl.m4

@@ -368,7 +368,7 @@ AC_DEFUN([EGG_TCL_CHECK_VERSION],
 
       AC_MSG_CHECKING([for Tcl version])
       AC_CACHE_VAL(egg_cv_var_tcl_version, [
-        egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`
+        egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/"/, "", [$]3); print [$]3}'`
       ])
 
       if test "x$egg_cv_var_tcl_version" != x; then
@@ -384,7 +384,7 @@ AC_DEFUN([EGG_TCL_CHECK_VERSION],
       fi
       AC_MSG_CHECKING([for Tcl patch level])
       AC_CACHE_VAL(egg_cv_var_tcl_patch_level, [
-        eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`"
+        eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/"/, "", [$]3); print [$]3}'`"
       ])
 
       if test "x$egg_cv_var_tcl_patch_level" != x; then

+ 5 - 6
configure

@@ -4599,13 +4599,12 @@ fi
 
 
 CCDEPMODE=gcc
-num=`$CXX -dumpversion | sed "s/^\\\(.\\\).*/\\\1/"`
-if test $num -ge "3"; then
+num=`$CXX -dumpversion |  sed "s/^\([^.]*\).*/\1/" `
+if [ "$num" -ge "3" ]; then
   CCDEPMODE=gcc3
-#  GCC3="-Wpadded -Wpacked -Wno-unused-parameter -Wmissing-format-attribute -Wdisabled-optimization"
   GCC3_CFLAGS="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -Wno-format-y2k"
   GCC3_CXXFLAGS="-Woverloaded-virtual"
-  GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
+  GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute -Wwrite-strings -Wformat-security"
 fi
 
 
@@ -7073,7 +7072,7 @@ $as_echo_n "checking for Tcl version... " >&6; }
   $as_echo_n "(cached) " >&6
 else
 
-        egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
+        egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/"/, "", $3); print $3}'`
 
 fi
 
@@ -7097,7 +7096,7 @@ $as_echo_n "checking for Tcl patch level... " >&6; }
   $as_echo_n "(cached) " >&6
 else
 
-        eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/\"/, "", $3); print $3}'`"
+        eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | $HEAD_1 | $AWK '{gsub(/"/, "", $3); print $3}'`"
 
 fi