# HG changeset patch # User Max Brister # Date 1336431477 21600 # Node ID 82429f3c100592cb7f02a0e6481aae1274b2c1b9 # Parent f25d2224fa02a074a5f4e3c64c5568f72f111b1f# Parent 34f067bcac1230469205f7f211456fd8f7feaf4c maint: periodic merge of default to jit diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -193,7 +193,7 @@ [if test "$enableval" = no; then DOCDIR= warn_docs="building documentation disabled; make dist will fail" - AC_MSG_WARN([$warn_docs]) + OCTAVE_CONFIGURE_WARNING([warn_docs]) fi], []) AC_SUBST(DOCDIR) @@ -217,12 +217,12 @@ AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long]) else warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features" - AC_MSG_WARN([$warn_64_bit]) + OCTAVE_CONFIGURE_WARNING([warn_64_bit]) USE_64_BIT_IDX_T=false fi else warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features" - AC_MSG_WARN([$warn_64_bit]) + OCTAVE_CONFIGURE_WARNING([warn_64_bit]) USE_64_BIT_IDX_T=false fi fi @@ -286,7 +286,7 @@ case "$gcc_version" in [12].*) warn_gcc_version="gcc version $gcc_version is likely to cause problems" - AC_MSG_WARN([$warn_gcc_version]) + OCTAVE_CONFIGURE_WARNING([warn_gcc_version]) ;; esac @@ -886,13 +886,15 @@ ## libraries needed for native graphics renderer warn_freetype="" +native_graphics=true check_opengl=false AC_ARG_WITH([opengl], [AS_HELP_STRING([--without-opengl], [don't use OpenGL libraries, disable native graphics])], [if test "x$withval" = xno; then warn_opengl="--without-opengl specified. Native graphics will be disabled." - AC_MSG_WARN([$warn_opengl]) + OCTAVE_CONFIGURE_WARNING([warn_opengl]) + native_graphics=false else check_opengl=true fi], @@ -908,6 +910,8 @@ if test -z "$OPENGL_LIBS"; then if $check_opengl; then warn_fltk_opengl="OpenGL libs (GL and GLU) not found. Native graphics will be disabled." + OCTAVE_CONFIGURE_WARNING([warn_fltk_opengl]) + native_graphics=false fi fi @@ -920,6 +924,11 @@ XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"], [warn_freetype="FreeType library not found. Native graphics will be disabled."]) + if test -n "$warn_freetype"; then + OCTAVE_CONFIGURE_WARNING([warn_freetype]) + native_graphics=false + fi + ## fontconfig library warn_fontconfig="" @@ -933,6 +942,11 @@ warn_fontconfig="Fontconfig library not found. Native graphics will be disabled."]) fi + if test -n "$warn_fontconfig"; then + OCTAVE_CONFIGURE_WARNING([warn_fontconfig]) + native_graphics=false + fi + ## fltk (www.fltk.org) AC_ARG_WITH([fltk-prefix], [ @@ -968,6 +982,8 @@ if test "$FLTK_CONFIG" = "no" ; then warn_fltk_config="FLTK config script not found. Native graphics will be disabled." + OCTAVE_CONFIGURE_WARNING([warn_fltk_config]) + native_graphics=false else FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`" FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`" @@ -994,6 +1010,9 @@ if test -z "$warn_fltk_opengl"; then GRAPHICS_CFLAGS="$FLTK_CFLAGS" GRAPHICS_LIBS="$FLTK_LDFLAGS" + else + OCTAVE_CONFIGURE_WARNING([warn_fltk_opengl]) + native_graphics=false fi CFLAGS="$save_CFLAGS" fi @@ -1958,7 +1977,7 @@ if test -n "$DOCDIR" && test -n "$warn_gnuplot"; then DOCDIR= warn_docs="building documentation disabled because gnuplot was not found; make dist will fail" - AC_MSG_WARN([$warn_docs]) + OCTAVE_CONFIGURE_WARNING([warn_docs]) fi AM_CONDITIONAL([AMCOND_BUILD_DOCS], [test -n "$DOCDIR"]) @@ -2312,6 +2331,8 @@ warn_msg_printed=false +OCTAVE_CONFIGURE_WARNING_SUMMARY + if $ENABLE_DYNAMIC_LINKING; then if $SHARED_LIBS; then true @@ -2322,6 +2343,7 @@ fi fi +<<<<<<< local if test -n "$gxx_only"; then AC_MSG_WARN([$gxx_only]) warn_msg_printed=true @@ -2477,6 +2499,8 @@ warn_msg_printed=true fi +======= +>>>>>>> other if $USE_64_BIT_IDX_T; then AC_MSG_WARN([]) AC_MSG_WARN([You used the EXPERIMENTAL --enable-64 option.]) @@ -2507,37 +2531,6 @@ warn_msg_printed=true fi -native_graphics=true -if test -n "$warn_opengl"; then - AC_MSG_WARN([$warn_opengl]) - native_graphics=false - warn_msg_printed=true -fi - -if test -n "$warn_freetype"; then - AC_MSG_WARN([$warn_freetype]) - native_graphics=false - warn_msg_printed=true -fi - -if test -n "$warn_fontconfig"; then - AC_MSG_WARN([$warn_fontconfig]) - native_graphics=false - warn_msg_printed=true -fi - -if test -n "$warn_fltk_config"; then - AC_MSG_WARN([$warn_fltk_config]) - native_graphics=false - warn_msg_printed=true -fi - -if test -n "$warn_fltk_opengl"; then - AC_MSG_WARN([$warn_fltk_opengl]) - native_graphics=false - warn_msg_printed=true -fi - if $native_graphics; then true; else diff --git a/libcruft/blas-xtra/cconv2.f b/libcruft/blas-xtra/cconv2.f --- a/libcruft/blas-xtra/cconv2.f +++ b/libcruft/blas-xtra/cconv2.f @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call caxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) + call caxpy(ma-mb+1,b(i,j),a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/libcruft/blas-xtra/csconv2.f b/libcruft/blas-xtra/csconv2.f --- a/libcruft/blas-xtra/csconv2.f +++ b/libcruft/blas-xtra/csconv2.f @@ -76,7 +76,7 @@ do j = 1,nb do i = 1,mb btmp = b(i,j) - call caxpy(ma-mb+1,btmp,a(mb+1-i,k+j-1),1,c(1,k),1) + call caxpy(ma-mb+1,btmp,a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/libcruft/blas-xtra/dconv2.f b/libcruft/blas-xtra/dconv2.f --- a/libcruft/blas-xtra/dconv2.f +++ b/libcruft/blas-xtra/dconv2.f @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call daxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) + call daxpy(ma-mb+1,b(i,j),a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/libcruft/blas-xtra/sconv2.f b/libcruft/blas-xtra/sconv2.f --- a/libcruft/blas-xtra/sconv2.f +++ b/libcruft/blas-xtra/sconv2.f @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call saxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) + call saxpy(ma-mb+1,b(i,j),a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/libcruft/blas-xtra/zconv2.f b/libcruft/blas-xtra/zconv2.f --- a/libcruft/blas-xtra/zconv2.f +++ b/libcruft/blas-xtra/zconv2.f @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call zaxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) + call zaxpy(ma-mb+1,b(i,j),a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/libcruft/blas-xtra/zdconv2.f b/libcruft/blas-xtra/zdconv2.f --- a/libcruft/blas-xtra/zdconv2.f +++ b/libcruft/blas-xtra/zdconv2.f @@ -76,7 +76,7 @@ do j = 1,nb do i = 1,mb btmp = b(i,j) - call zaxpy(ma-mb+1,btmp,a(mb+1-i,k+j-1),1,c(1,k),1) + call zaxpy(ma-mb+1,btmp,a(mb+1-i,k+nb-j),1,c(1,k),1) end do end do end do diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -406,6 +406,25 @@ ]) dnl dnl +dnl Adds warnings to final summary +dnl +AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [ + AC_MSG_WARN([$][$1]) + m4_set_add([summary_warning_list], [$1]) +]) +dnl +dnl +dnl Prints final summary +dnl +AC_DEFUN([OCTAVE_CONFIGURE_WARNING_SUMMARY], [ + m4_set_foreach([summary_warning_list], [elt], [ + if test -n "[$]elt"; then + AC_MSG_WARN([$]elt) + warn_msg_printed=true + fi]) +]) +dnl +dnl dnl dnl OCTAVE_CHECK_LIBRARY(LIBRARY, DOC-NAME, WARN-MSG, HEADER, FUNC, dnl LANG, DOC-STRING, EXTRA-CHECK) @@ -446,6 +465,8 @@ [TEXINFO_]m4_toupper([$1])= warn_$1="$3" + m4_set_add([summary_warning_list], [warn_$1]) + if test -n "$m4_toupper([$1])_LIBS"; then octave_check_library_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$m4_toupper([$1])_CPPFLAGS $CPPFLAGS" diff --git a/src/DLD-FUNCTIONS/conv2.cc b/src/DLD-FUNCTIONS/conv2.cc --- a/src/DLD-FUNCTIONS/conv2.cc +++ b/src/DLD-FUNCTIONS/conv2.cc @@ -262,9 +262,18 @@ %% Test cases from Bug #34893 %!assert (conv2 ([1:5;1:5], [1:2], "same"), [4 7 10 13 10; 4 7 10 13 10]) %!assert (conv2 ([1:5;1:5]', [1:2]', "same"), [4 7 10 13 10; 4 7 10 13 10]') -%!#assert (conv2 ([1:5;1:5], [1:2], "valid"), [4 7 10 13; 4 7 10 13]) +%!assert (conv2 ([1:5;1:5], [1:2], "valid"), [4 7 10 13; 4 7 10 13]) %!assert (conv2 ([1:5;1:5]', [1:2]', "valid"), [4 7 10 13; 4 7 10 13]') +%!test +%! rand ("seed", 42); +%! x = rand (100); +%! y = ones (5); +%! A = conv2 (x, y)(5:end-4,5:end-4); +%! B = conv2 (x, y, "valid"); +%! assert (B, A); ## Yes, this test is for *exact* equivalence. + + %% Test input validation %!error conv2 () %!error conv2 (1)