|
|
commit 51e9b28f394d1c1d4b74f24a5e9c9163f6162bd7
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Aug 24 15:09:30 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Aug 24 15:09:30 2022 +0200
Add FL_EXPORT directives to support building shared libs with -no-undefined
configure.ac | 26 +++++++++-------------
.../Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 2 +-
src/drivers/Wayland/Fl_Wayland_Screen_Driver.H | 2 +-
src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 2 +-
4 files changed, 14 insertions(+), 18 deletions(-)
diff --git configure.ac configure.ac
index 8b2b95e..7b4b0d6 100644
--- configure.ac
+++ configure.ac
@@ -1406,21 +1406,17 @@ AS_IF([test -n "$GCC"], [
[AC_MSG_RESULT(no)])
CFLAGS="$OLDCFLAGS"
- AS_IF([test x$enable_wayland = xyes],[
- DSOFLAGS="$DSOFLAGS -Wl,--allow-shlib-undefined"
- ] , [
- dnl Make sure that shared libraries don't have undefined references
- # See if ld supports -no-undefined...
- AC_MSG_CHECKING([if ld supports -no-undefined])
- OLDLDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,-no-undefined"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [DSOFLAGS="$DSOFLAGS -Wl,-no-undefined"
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)])
- LDFLAGS="$OLDLDFLAGS"
- ])
+ dnl Make sure that shared libraries don't have undefined references
+ # See if ld supports -no-undefined...
+ AC_MSG_CHECKING([if ld supports -no-undefined])
+ OLDLDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-no-undefined"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [DSOFLAGS="$DSOFLAGS -Wl,-no-undefined"
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+ LDFLAGS="$OLDLDFLAGS"
# See if ld supports -Bsymbolic-functions...
AC_MSG_CHECKING([if ld supports -Bsymbolic-functions])
diff --git src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index db42a71..598a412 100644
--- src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
@@ -71,7 +71,7 @@ Fl_Wayland_Gl_Window_Driver::Fl_Wayland_Gl_Window_Driver(Fl_Gl_Window *win) : Fl
void Fl_Wayland_Gl_Window_Driver::init() {
EGLint major, minor;
- if (!Fl_Wayland_Screen_Driver::wl_display) Fl::screen_driver()->open_display();
+ if (!Fl_Wayland_Screen_Driver::wl_display) fl_open_display();
egl_display = eglGetDisplay((EGLNativeDisplayType) Fl_Wayland_Screen_Driver::wl_display);
if (egl_display == EGL_NO_DISPLAY) {
Fl::fatal("Can't create egl display\n");
diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.H src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
index 196f07d..0dbdb08 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.H
@@ -63,7 +63,7 @@ class Fl_Wayland_Screen_Driver : public Fl_Screen_Driver
static int insertion_point_height;
static bool insertion_point_location_is_valid;
public:
- static struct wl_display *wl_display;
+ static FL_EXPORT struct wl_display *wl_display;
static void insertion_point_location(int x, int y, int height);
static bool insertion_point_location(int *px, int *py, int *pwidth, int *pheight);
int get_mouse_unscaled(int &xx, int &yy);
diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.H src/drivers/Wayland/Fl_Wayland_Window_Driver.H
index a419fa5..fc84bf1 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.H
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.H
@@ -84,7 +84,7 @@ public:
struct xdg_toplevel *xdg_toplevel();
Fl_Wayland_Window_Driver(Fl_Window*);
virtual ~Fl_Wayland_Window_Driver();
- static struct wld_window *wld_window;
+ static FL_EXPORT struct wld_window *wld_window;
static void redraw(struct wld_window *window);
static inline Fl_Wayland_Window_Driver* driver(const Fl_Window *w) {return (Fl_Wayland_Window_Driver*)Fl_Window_Driver::driver(w);}
[ Direct Link to Message ] | |
|
| |