summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac19
-rw-r--r--libusb/Makefile.am1
2 files changed, 12 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 2fa8dc9..7e544f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,17 @@ AC_SUBST([LIBUSB_VERSION_MINOR], [LIBUSB_MINOR])
AC_SUBST([LIBUSB_VERSION_MICRO], [LIBUSB_MICRO])
AC_SUBST([LIBUSB_VERSION_NANO], [LIBUSB_NANO])
+# Library versioning
+# These numbers should be tweaked on every release. Read carefully:
+# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+# http://sourceware.org/autobook/autobook/autobook_91.html
+lt_current="1"
+lt_revision="0"
+lt_age="1"
+AC_SUBST(lt_current)
+AC_SUBST(lt_revision)
+AC_SUBST(lt_age)
+
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([libusb/core.c])
AC_CONFIG_MACRO_DIR([m4])
@@ -87,14 +98,6 @@ AM_CONDITIONAL([OS_WINDOWS], [test "x$backend" = "xwindows"])
AM_CONDITIONAL([THREADS_POSIX], [test "x$threads" = "xposix"])
AM_CONDITIONAL([CREATE_IMPORT_LIB], [test "x$create_import_lib" = "xyes"])
-# Library versioning
-lt_major="0"
-lt_revision="0"
-lt_age="0"
-AC_SUBST(lt_major)
-AC_SUBST(lt_revision)
-AC_SUBST(lt_age)
-
# timerfd
AC_CHECK_HEADER([sys/timerfd.h], [timerfd_h=1], [timerfd_h=0])
AC_ARG_ENABLE([timerfd],
diff --git a/libusb/Makefile.am b/libusb/Makefile.am
index 60ab752..38e196a 100644
--- a/libusb/Makefile.am
+++ b/libusb/Makefile.am
@@ -34,6 +34,7 @@ endif
endif
libusb_1_0_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) $(THREAD_CFLAGS)
+libusb_1_0_la_LDFLAGS = -version-info $(lt_current):$(lt_revision):$(lt_age)
libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC) \
os/linux_usbfs.h os/darwin_usb.h os/windows_usb.h \
os/threads_posix.h os/threads_windows.h \