# HG changeset patch # User Markus Mützel # Date 1639772853 -3600 # Node ID e0e22183ffcaeed5ef7e1fc119ea2abf01176499 # Parent 838e73617671e8fd0f9f6b1bb3979c958d7fdda0 Restore building with visibility flags for Windows. * configure.ac: Windows uses a dllexport/dllimport mechanism instead of visibility attributes. Don't deactivate visibility flags on that platform if HAVE_VISIBILITY is 0 (which it will always be). * build-aux/mk-octave-config-h.sh: Add missing flag to octave-config.h. diff -r 838e73617671 -r e0e22183ffca build-aux/mk-octave-config-h.sh --- a/build-aux/mk-octave-config-h.sh Fri Dec 17 19:13:04 2021 +0100 +++ b/build-aux/mk-octave-config-h.sh Fri Dec 17 21:27:33 2021 +0100 @@ -181,6 +181,13 @@ # define octave_unused_parameter(param) (void) param; # endif +/* Defined to 1 if Octave libraries were built with visibility flags */ +EOF + +$SED -n 's/#\(\(undef\|define\) OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS.*$\)/# \1/p' $config_h_file + +cat << EOF + # if defined (OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS) # if defined (_WIN32) || defined (__CYGWIN__) # if defined (__GNUC__) diff -r 838e73617671 -r e0e22183ffca configure.ac --- a/configure.ac Fri Dec 17 19:13:04 2021 +0100 +++ b/configure.ac Fri Dec 17 21:27:33 2021 +0100 @@ -2665,10 +2665,17 @@ *) AC_MSG_ERROR([bad value $enableval for --enable-lib-visibility-flags]) ;; esac]) -if test $ENABLE_LIB_VISIBILITY_FLAGS = yes && test $HAVE_VISIBILITY = 0; then - AC_MSG_NOTICE([cannot build with visibility flags on this platform]) - ENABLE_LIB_VISIBILITY_FLAGS=no -fi +case $host_os in + msdosmsvc | mingw* | cygwin*) + # Assume that symbol export is working on that platform + ;; + *) + if test $ENABLE_LIB_VISIBILITY_FLAGS = yes && test $HAVE_VISIBILITY = 0; then + AC_MSG_NOTICE([cannot build with visibility flags on this platform]) + ENABLE_LIB_VISIBILITY_FLAGS=no + fi + ;; +esac if test $ENABLE_LIB_VISIBILITY_FLAGS = yes; then AC_DEFINE(OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS, 1,