--- /dev/null
+# ld-version-script.m4 serial 3
+dnl Copyright (C) 2008-2014 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# FIXME: The test below returns a false positive for mingw
+# cross-compiles, 'local:' statements does not reduce number of
+# exported symbols in a DLL. Use --disable-ld-version-script to work
+# around the problem.
+
+# gl_LD_VERSION_SCRIPT
+# --------------------
+# Check if LD supports linker scripts, and define automake conditional
+# HAVE_LD_VERSION_SCRIPT if so.
+AC_DEFUN([gl_LD_VERSION_SCRIPT],
+[
+ AC_ARG_ENABLE([ld-version-script],
+ AS_HELP_STRING([--enable-ld-version-script],
+ [enable linker version script (default is enabled when possible)]),
+ [have_ld_version_script=$enableval], [])
+ if test -z "$have_ld_version_script"; then
+ AC_MSG_CHECKING([if LD -Wl,--version-script works])
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ cat > conftest.map <<EOF
+foo
+EOF
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [accepts_syntax_errors=yes], [accepts_syntax_errors=no])
+ if test "$accepts_syntax_errors" = no; then
+ cat > conftest.map <<EOF
+VERS_1 {
+ global: sym;
+};
+
+VERS_2 {
+ global: sym;
+} VERS_1;
+EOF
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [have_ld_version_script=yes], [have_ld_version_script=no])
+ else
+ have_ld_version_script=no
+ fi
+ rm -f conftest.map
+ LDFLAGS="$save_LDFLAGS"
+ AC_MSG_RESULT($have_ld_version_script)
+ fi
+ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+])
atoms/interface.c atoms/med.c atoms/mgmt.c atoms/port.c \
atoms/custom.c
liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
-liblldpctl_la_LDFLAGS = $(AM_LDFLAGS) -export-symbols-regex '^lldpctl_' -version-info 10:0:6
# -version-info format is `current`:`revision`:`age`. For more details, see:
# http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
+#
+# -version-number could be computed from -version-info, mostly major
+# is `current` - `age`, minor is `age` and revision is `revision' and
+# major.minor should be used when updaing lldpctl.map.
+liblldpctl_la_LDFLAGS = $(AM_LDFLAGS) -version-info 10:0:6
+liblldpctl_la_DEPENDENCIES = libfixedpoint.la
+
+if HAVE_LD_VERSION_SCRIPT
+liblldpctl_la_DEPENDENCIES += lldpctl.map
+liblldpctl_la_LDFLAGS += -Wl,--version-script=$(srcdir)/lldpctl.map
+else
+liblldpctl_la_LDFLAGS += -export-symbols-regex '^lldpctl_'
+endif
pkgconfig_DATA = lldpctl.pc
--- /dev/null
+LIBLLDPCTL_4.6 {
+ global:
+ lldpctl_atom_create;
+ lldpctl_atom_dec_ref;
+ lldpctl_atom_get;
+ lldpctl_atom_get_buffer;
+ lldpctl_atom_get_connection;
+ lldpctl_atom_get_int;
+ lldpctl_atom_get_str;
+ lldpctl_atom_inc_ref;
+ lldpctl_atom_iter;
+ lldpctl_atom_iter_next;
+ lldpctl_atom_iter_value;
+ lldpctl_atom_set;
+ lldpctl_atom_set_buffer;
+ lldpctl_atom_set_int;
+ lldpctl_atom_set_str;
+ lldpctl_get_configuration;
+ lldpctl_get_default_transport;
+ lldpctl_get_interfaces;
+ lldpctl_get_port;
+ lldpctl_key_get_map;
+ lldpctl_last_error;
+ lldpctl_log_callback;
+ lldpctl_log_level;
+ lldpctl_new;
+ lldpctl_new_name;
+ lldpctl_process_conn_buffer;
+ lldpctl_recv;
+ lldpctl_release;
+ lldpctl_send;
+ lldpctl_strerror;
+ lldpctl_watch;
+ lldpctl_watch_callback;
+
+ local:
+ *;
+};