71 lines
2.1 KiB
Diff
71 lines
2.1 KiB
Diff
![]() |
Index: configure.in
|
||
|
===================================================================
|
||
|
--- configure.in.orig 2009-09-25 20:34:39.000000000 +0200
|
||
|
+++ configure.in 2009-10-13 00:29:22.000000000 +0200
|
||
|
@@ -297,6 +297,44 @@ Linux)
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
+dnl ************************************************************
|
||
|
+dnl Enable hiding of internal symbols in library to reduce its size and
|
||
|
+dnl speed dynamic linking of applications. This currently is only supported
|
||
|
+dnl on gcc >= 4.0 and SunPro C.
|
||
|
+dnl
|
||
|
+AC_MSG_CHECKING([whether to enable hidden symbols in the library])
|
||
|
+AC_ARG_ENABLE(hidden-symbols,
|
||
|
+AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
|
||
|
+AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
|
||
|
+[ case "$enableval" in
|
||
|
+ no)
|
||
|
+ AC_MSG_RESULT(no)
|
||
|
+ ;;
|
||
|
+ *)
|
||
|
+ AC_MSG_CHECKING([whether $CC supports it])
|
||
|
+ if test "$GCC" = yes ; then
|
||
|
+ if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
||
|
+ AC_MSG_RESULT(yes)
|
||
|
+ AC_DEFINE(M_EXPORT, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
|
||
|
+ CFLAGS="$CFLAGS -fvisibility=hidden"
|
||
|
+ else
|
||
|
+ AC_MSG_RESULT(no)
|
||
|
+ fi
|
||
|
+
|
||
|
+ else
|
||
|
+ dnl Test for SunPro cc
|
||
|
+ if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
|
||
|
+ AC_MSG_RESULT(yes)
|
||
|
+ AC_DEFINE(M_EXPORT, [__global], [to make a symbol visible])
|
||
|
+ CFLAGS="$CFLAGS -xldscope=hidden"
|
||
|
+ else
|
||
|
+ AC_MSG_RESULT(no)
|
||
|
+ fi
|
||
|
+ fi
|
||
|
+ ;;
|
||
|
+ esac ],
|
||
|
+ AC_MSG_RESULT(no)
|
||
|
+)
|
||
|
AC_CONFIG_FILES([Makefile])
|
||
|
AC_OUTPUT
|
||
|
|
||
|
Index: monetra.h
|
||
|
===================================================================
|
||
|
--- monetra.h.orig 2009-02-12 17:37:49.000000000 +0100
|
||
|
+++ monetra.h 2009-10-13 00:28:06.000000000 +0200
|
||
|
@@ -55,10 +55,14 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
# else
|
||
|
# define M_SPEC __cdecl
|
||
|
# endif
|
||
|
-#else /* !WIN32 */
|
||
|
+#endif /* !WIN32 */
|
||
|
+
|
||
|
+#ifndef M_EXPORT
|
||
|
# define M_EXPORT
|
||
|
+#endif
|
||
|
+#ifndef M_SPEC
|
||
|
# define M_SPEC
|
||
|
-#endif /* !WIN32 */
|
||
|
+#endif
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|