[libbluray-devel] [PATCH] add symbol versioning to shared library
Sean McGovern
gseanmcg at gmail.com
Mon Sep 1 16:29:08 CEST 2014
---
configure.ac | 16 ++++++++++
src/Makefile.am | 11 +++++++
src/libbluray.ver | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 113 insertions(+)
create mode 100644 src/libbluray.ver
diff --git a/configure.ac b/configure.ac
index fdeb70a..24fc2c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,6 +105,12 @@ AC_ARG_WITH([bdj-bootclasspath],
[BDJ_BOOTCLASSPATH=$withval],
[BDJ_BOOTCLASSPATH=])
+AC_ARG_WITH([symbol-versioning],
+ [AS_HELP_STRING([--without-symbol-versioning],
+ [build with shared library symbol versioning @<:@default=yes (if supported)@:>@])],
+ [use_symver=$enableval],
+ [use_symver=yes])
+
dnl required programs
AC_PROG_CC
AM_PROG_CC_C_O
@@ -155,6 +161,15 @@ AS_IF([test "x$with_freetype" != "xno"], [
[with_freetype=yes; AC_DEFINE([HAVE_FT2], 1, [Define this if you have FreeType2 library])])
])
+dnl shared library symbol versioning
+if [[ $use_symver != "no" ]]; then
+ case $host_os in
+ linux*|solaris*) use_symver="yes" ;;
+ *) use_symver="no (not supported)" ;;
+ esac
+fi
+AM_CONDITIONAL([USING_SYMVER], [ test $use_symver = "yes" ])
+
CC_CHECK_CFLAGS_APPEND([-Wall -Wdisabled-optimization -Wpointer-arith ]dnl
[-Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef ]dnl
[-Wmissing-prototypes -Wshadow])
@@ -265,5 +280,6 @@ fi
fi
echo " Font support (freetype2): $with_freetype"
echo " Metadata support (libxml2): $with_libxml2"
+echo " Versioned symbols: $use_symver"
echo " Build examples: $use_examples"
diff --git a/src/Makefile.am b/src/Makefile.am
index 65b5665..8d765eb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,4 @@
+SUFFIXES =
SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT $(LFS_CFLAGS)
SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibbluray -Ilibbluray/bdnav $(BDJAVA_CFLAGS)
@@ -177,6 +178,16 @@ clean-local:
clean
endif
+if USING_SYMVER
+SUFFIXES += .ver
+libbluray_la_SOURCES += libbluray.ver
+if HAVE_SOLARIS
+libbluray_la_LDFLAGS += -Wl,-M,$(top_srcdir)/src/libbluray.ver
+else
+libbluray_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libbluray.ver
+endif
+endif
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libbluray.pc
diff --git a/src/libbluray.ver b/src/libbluray.ver
new file mode 100644
index 0000000..8995938
--- /dev/null
+++ b/src/libbluray.ver
@@ -0,0 +1,86 @@
+LIBBLURAY_1.6 {
+ global:
+bd_read_mpls;
+bd_free_mpls;
+} LIBBLURAY_1.5;
+
+LIBBLURAY_1.5 {
+ global:
+bd_get_main_title;
+} LIBBLURAY_1.4;
+
+LIBBLURAY_1.4 {
+ global:
+bd_read_clpi;
+bd_select_stream;
+} LIBBLURAY_1.3;
+
+LIBBLURAY_1.3 {
+ global:
+bd_seek_playitem;
+bd_set_scr;
+} LIBBLURAY_1.2;
+
+LIBBLURAY_1.2 {
+ global:
+bd_chapter_pos;
+bd_close;
+bd_free_clpi;
+bd_free_title_info;
+bd_get_clpi;
+bd_get_current_angle;
+bd_get_current_chapter;
+bd_get_current_title;
+bd_get_debug_mask;
+bd_get_disc_info;
+bd_get_event;
+bd_get_meta;
+bd_get_playlist_info;
+bd_get_sound_effect;
+bd_get_title_info;
+bd_get_title_size;
+bd_get_titles;
+bd_get_version;
+bd_gpr_read;
+bd_gpr_write;
+bd_menu_call;
+bd_mouse_select;
+bd_open;
+bd_play;
+bd_play_title;
+bd_psr_lock;
+bd_psr_read;
+bd_psr_register_cb;
+bd_psr_reset_backup_registers;
+bd_psr_restore_state;
+bd_psr_save_state;
+bd_psr_setting_write;
+bd_psr_unlock;
+bd_psr_unregister_cb;
+bd_psr_write;
+bd_read;
+bd_read_ext;
+bd_read_skip_still;
+bd_register_argb_overlay_proc;
+bd_register_dir;
+bd_register_file;
+bd_register_overlay_proc;
+bd_seamless_angle_change;
+bd_seek;
+bd_seek_chapter;
+bd_seek_mark;
+bd_seek_time;
+bd_select_angle;
+bd_select_playlist;
+bd_select_title;
+bd_set_debug_handler;
+bd_set_debug_mask;
+bd_set_player_setting;
+bd_set_player_setting_str;
+bd_start_bdj;
+bd_stop_bdj;
+bd_tell;
+bd_tell_time;
+bd_user_input;
+ local: *;
+};
--
1.7.9.2
More information about the libbluray-devel
mailing list