Pass -version-info for libtool to set soname
diff --git a/configure.ac b/configure.ac
index a4f68f7..e564301 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,16 @@
 AX_SWIG_ENABLE_CXX
 SWIG_PYTHON
 
+dnl libtool versioning
+# +1 : 0 : +1  == adds new functions to the interface
+# +1 : 0 : 0   == changes or removes functions (changes include both
+#                 changes to the signature and the semantic)
+#  ? :+1 : ?   == just internal changes
+# CURRENT : REVISION : AGE
+LIBIMOBILEDEVICE_SO_VERSION=0:0:0
+
+AC_SUBST(LIBIMOBILEDEVICE_SO_VERSION)
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
diff --git a/src/Makefile.am b/src/Makefile.am
index 69bbd9b..b0093fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,7 @@
 AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) $(libplist_LIBS) $(libusbmuxd_LIBS) $(libgcrypt_LIBS)
 
 lib_LTLIBRARIES = libimobiledevice.la
+libimobiledevice_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIMOBILEDEVICE_SO_VERSION) -no-undefined
 libimobiledevice_la_SOURCES = idevice.c idevice.h \
 		       debug.c debug.h\
 		       userpref.c userpref.h\