Use -version-info arg to libtool on OpenBSD, not -version-number
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 12 Nov 2012 23:38:04 +0000 (23:38 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 12 Nov 2012 23:38:04 +0000 (23:38 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Makefile.am
configure.ac

index d6e5281..463df52 100644 (file)
@@ -32,7 +32,15 @@ endif
 libopenconnect_la_SOURCES = version.c $(library_srcs)
 libopenconnect_la_CFLAGS = $(SSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) $(P11KIT_CFLAGS) $(TSS_CFLAGS) $(LIBSTOKEN_CFLAGS)
 libopenconnect_la_LIBADD = $(SSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(LIBINTL) $(P11KIT_LIBS) $(TSS_LIBS) $(LIBSTOKEN_LIBS)
-libopenconnect_la_LDFLAGS = -version-number @APIMAJOR@:@APIMINOR@
+if OPENBSD_LIBTOOL
+# OpenBSD's libtool doesn't have -version-number, but its -version-info arg
+# does what GNU libtool's -version-number does. Which arguably is what the
+# GNU -version-info arg ought to do too. I hate libtool.
+LT_VER_ARG = -version-info
+else
+LT_VER_ARG = -version-number
+endif
+libopenconnect_la_LDFLAGS = $(LT_VER_ARG) @APIMAJOR@:@APIMINOR@
 noinst_HEADERS = openconnect-internal.h openconnect.h gnutls.h
 include_HEADERS = openconnect.h
 if HAVE_SYMBOL_VERSIONING
index c19fba6..b042da8 100644 (file)
@@ -392,6 +392,8 @@ if test "$use_openbsd_libtool" = "true" && test -x /usr/bin/libtool; then
        echo using OpenBSD libtool
        LIBTOOL=/usr/bin/libtool
 fi
+AM_CONDITIONAL(OPENBSD_LIBTOOL, [ test "$use_openbsd_libtool" = "true" ])
+
 # Ick. This seems like it's likely to be very fragile, but I can't see a better
 # way. I shall console myself with the observation that the failure mode isn't
 # particularly horrible — you just don't get symbol versioning if it fails.