diff --git a/espgs/src/configure.ac b/espgs/src/configure.ac index 29c5a97..06f6506 100644 --- a/espgs/src/configure.ac +++ b/espgs/src/configure.ac @@ -791,7 +791,7 @@ AC_ARG_ENABLE(dynamic, [ --enable-dynamic enable dynamically loaded driv [ case `uname` in Linux*) INSTALL_SHARED="install-shared" - DYNAMIC_CFLAGS="-fPIC" + DYNAMIC_CFLAGS="-fPIC -fvisibility=hidden -D_Linux" if test "x$X_DEVS" != x; then DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so" else diff --git a/espgs/src/iapi.h b/espgs/src/iapi.h index ca49da3..e2ee08e 100644 --- a/espgs/src/iapi.h +++ b/espgs/src/iapi.h @@ -82,6 +82,12 @@ extern "C" { # pragma export on #endif +#ifdef _Linux +# ifndef GSDLLEXPORT +# define GSDLLEXPORT __attribute__((__visibility__("default"))) +# endif +#endif /* _Linux */ + #ifndef GSDLLEXPORT # define GSDLLEXPORT #endif