]> git.sur5r.net Git - openldap/commitdiff
Define library version/release in version.var to avoid regenerating
authorRalf Haferkamp <ralf@openldap.org>
Mon, 23 Jun 2008 14:09:38 +0000 (14:09 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Mon, 23 Jun 2008 14:09:38 +0000 (14:09 +0000)
Makefile.in with every release. (works similar to OpenLDAP's main
version.sh/version.var)

contrib/ldapc++/Makefile.am
contrib/ldapc++/configure.in
contrib/ldapc++/src/Makefile.am
contrib/ldapc++/version.sh [new file with mode: 0755]
contrib/ldapc++/version.var [new file with mode: 0644]

index 7a1bc26eed769e10707fc1279abca3fa7daacfd5..db530e7b82e6ea13b55fbde22a5a732ae7544d84 100644 (file)
@@ -5,6 +5,5 @@
 # COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 ##
 
-EXTRA_DIST = BUGS
 SUBDIRS = src examples
 
index 57c030dc9999be3935b45adc3454d50181b4b17c..6f149b6cdc93360e807ae77db6d50e7184997563 100644 (file)
@@ -13,6 +13,15 @@ AC_CONFIG_SRCDIR(src/LDAPConnection.h)
 AM_INIT_AUTOMAKE(foreign)
 AM_CONFIG_HEADER(src/config.h)
 
+eval `$ac_aux_dir/version.sh`
+if test -z "$OL_CPP_API_RELEASE"; then
+        AC_MSG_ERROR([could not determine version])
+fi
+
+VERSION=$OL_CPP_API_RELEASE
+OPENLDAP_CPP_API_VERSION=$OL_CPP_API_VERSION
+AC_SUBST(VERSION)
+AC_SUBST(OPENLDAP_CPP_API_VERSION)
 dnl Checks for programs.
 AC_PROG_INSTALL
 dnl AC_PROG_CC
@@ -24,9 +33,7 @@ dnl AC_PROG_MAKE_SET
 AC_ARG_ENABLE(debug,[  --enable-debug],[
        CXXFLAGS="-g -O0 -Wall"
     AC_DEFINE(WITH_DEBUG,[],[Define to 1 ot enable debug logging])
-       ],[
-       CXXFLAGS="-O0"
-    ]
+       ],
 )
 
 AC_ARG_WITH(libldap,[  --with-libldap=DIR          Path to the libldap library [/usr/local/lib]],[
index dcc242f3f027648dea1362d65405e5ab68d17eee..6586d1ef9be61bea113f4c17811cea8e665d2e53 100644 (file)
@@ -1,7 +1,7 @@
 # $OpenLDAP$
 
 ###
-# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
+# Copyright 2000-2008, OpenLDAP Foundation, All Rights Reserved.
 # COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 ##
 
@@ -95,5 +95,5 @@ noinst_HEADERS = LDAPAddRequest.h \
                 LDAPSearchRequest.h 
 
 libldapcpp_la_LIBADD = -lldap -llber
-libldapcpp_la_LDFLAGS = -version-info 0:5:0
+libldapcpp_la_LDFLAGS = -version-info @OPENLDAP_CPP_API_VERSION@
 
diff --git a/contrib/ldapc++/version.sh b/contrib/ldapc++/version.sh
new file mode 100755 (executable)
index 0000000..7a5e4c3
--- /dev/null
@@ -0,0 +1,10 @@
+#! /bin/sh
+# $OpenLDAP$
+#
+# Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
+# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+DIR=`dirname $0`
+. $DIR/version.var
+
+echo OL_CPP_API_VERSION=$ol_cpp_api_current:$ol_cpp_api_revision:$ol_cpp_api_age
+echo OL_CPP_API_RELEASE=$ol_cpp_api_rel_major.$ol_cpp_api_rel_minor.$ol_cpp_api_rel_patch
diff --git a/contrib/ldapc++/version.var b/contrib/ldapc++/version.var
new file mode 100644 (file)
index 0000000..a03fa4d
--- /dev/null
@@ -0,0 +1,13 @@
+#! /bin/sh
+# $OpenLDAP$
+#
+# Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
+# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+
+ol_cpp_api_rel_major=0
+ol_cpp_api_rel_minor=0
+ol_cpp_api_rel_patch=0
+
+ol_cpp_api_current=0
+ol_cpp_api_revision=0
+ol_cpp_api_age=0