comparison oct-conf-post.in.h @ 29313:6dea3b384846

Optionally disable building libraries with visibility attributes (bug #59820). * configure.ac: Add argument --disable-lib-visibility-flags to manually disable building and linking Octave libraries with visibility attributes. * Makefile.am: Use compiler flags for symbol visibility according to configure result. * oct-conf-post.in.h, build-aux/mk-octave-config-h.sh: Set preprocessor macros with visibility attributes to empty optionally.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 23 Jan 2021 10:54:47 +0100
parents f6058c6e1b18
children 7854d5752dd2
comparison
equal deleted inserted replaced
29312:875d799ab0b3 29313:6dea3b384846
168 # endif 168 # endif
169 #endif 169 #endif
170 170
171 /* oct-dlldefs.h */ 171 /* oct-dlldefs.h */
172 172
173 #if defined (_WIN32) || defined (__CYGWIN__) 173 #if defined (OCTAVE_ENABLE_LIB_VISIBILITY_FLAGS)
174 # if defined (__GNUC__) 174 # if defined (_WIN32) || defined (__CYGWIN__)
175 /* GCC */ 175 # if defined (__GNUC__)
176 # define OCTAVE_EXPORT __attribute__ ((dllexport)) 176 /* GCC */
177 # define OCTAVE_IMPORT __attribute__ ((dllimport)) 177 # define OCTAVE_EXPORT __attribute__ ((dllexport))
178 # else 178 # define OCTAVE_IMPORT __attribute__ ((dllimport))
179 /* MSVC */ 179 # else
180 # define OCTAVE_EXPORT __declspec(dllexport) 180 /* MSVC */
181 # define OCTAVE_IMPORT __declspec(dllimport) 181 # define OCTAVE_EXPORT __declspec(dllexport)
182 # endif 182 # define OCTAVE_IMPORT __declspec(dllimport)
183 #else 183 # endif
184 /* All other platforms. */ 184 # else
185 # define OCTAVE_EXPORT __attribute__ ((visibility ("default"))) 185 /* All other platforms. */
186 # define OCTAVE_EXPORT __attribute__ ((visibility ("default")))
187 # define OCTAVE_IMPORT
188 # endif
189 #else
190 # define OCTAVE_EXPORT
186 # define OCTAVE_IMPORT 191 # define OCTAVE_IMPORT
187 #endif 192 #endif
188 193
189 /* API macro for liboctave */ 194 /* API macro for liboctave */
190 #if defined (OCTAVE_DLL) 195 #if defined (OCTAVE_DLL)