Enable symbol visibility on Linux, bringing a shared libfltk on par with Windows.

Also drops the size of libfltk.so nicely.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10236 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Lauri Kasanen 2014-08-21 12:29:48 +00:00
parent fc71f3d1ca
commit 64dd5df141
4 changed files with 7 additions and 2 deletions

View File

@ -29,6 +29,8 @@
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
# elif __GNUC__ >= 4
# define FL_EXPORT __attribute__ ((visibility ("default")))
# else
# define FL_EXPORT
# endif /* FL_DLL */

View File

@ -255,6 +255,8 @@ if test x$enable_shared = xyes; then
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
OPTIM="$OPTIM -fvisibility=hidden"
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
DSOLINK="-Wl,-rpath,$libdir"
fi

View File

@ -36,6 +36,7 @@
# include <FL/Fl_Paged_Device.H>
# include <FL/Fl_Shared_Image.H>
# include <FL/fl_ask.H>
# include <FL/filename.H>
# include <stdio.h>
# include <stdlib.h>
# include "flstring.h"

View File

@ -39,10 +39,10 @@
# include <ndir.h>
# endif /* HAVE_NDIR_H */
# endif /* HAVE_DIRENT_H */
#else /* For WIN32 variants */
# include <FL/filename.H>
#endif /* !WIN32 || __CYGWIN__ */
#include <FL/filename.H>
/*
* 'numericsort()' - Compare two directory entries, possibly with
* a case-insensitive comparison...