Package: g++-4.6
Version: 4.6.0-10
Severity: normal

I did a recent apt-get update+apt-get upgrade and they brought in g++-4.6.0-10,
among others.

I was working through a solution for bug
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629498
which required modifying several of my packages, v3c, treedb, meta-treedb, with
more to follow.

One single meta-treedb test in a sub-test-run of 22 failed

 v3c/1-comet/cxx-string-list-test

Its form is very similiar to lots of other tests that passed, leading me to
conclude that this one tripped up g++ while the others did not.

The problem line appears to be
  206: const char * p = context.data((PCVOID)node);

it doesn't appear to be called in the release build.
The following line

  207: cout << "[" << n << "] " << p << "\n";

is where it crashes.

I added in a sigsegv handler that flushes stdout+stderr and it shows the "[0] "
right before trying to print the invalid "p" pointer, where it segfaults.

Please find the patches for these packages attahed, along with a helper script,
build.sh.

The easiest way to get to the problem is to run

  bash build.sh

it will
 download
 unpack
 patch
 set up a sandbox directory called "sandbox" for the build
 do a release build and install v3c and treedb into the sandbox
 do a make release check on meta-treedb

This last step will report 1 test failure

To see that a debug build works,
  bash sandbox/enter-env
  cd meta-treedb-1.2.2-01
  make debug check

In the debug build, all meta-treedb tests pass.



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages g++-4.6 depends on:
ii  gcc-4.6                 4.6.0-10         The GNU C compiler
ii  gcc-4.6-base            4.6.0-10         The GNU Compiler Collection (base 
ii  libc6                   2.13-4           Embedded GNU C Library: Shared lib
ii  libcloog-ppl0           0.15.9-3         the Chunky Loop Generator (runtime
ii  libgmp10                2:5.0.1+dfsg-7   Multiprecision arithmetic library
ii  libgmpxx4ldbl           2:5.0.1+dfsg-7   Multiprecision arithmetic library 
ii  libmpc2                 0.9-3            multiple precision complex floatin
ii  libmpfr4                3.0.1-3          multiple precision floating-point 
ii  libppl-c4               0.11.2-3         Parma Polyhedra Library (C interfa
ii  libppl9                 0.11.2-3         Parma Polyhedra Library (runtime l
ii  libstdc++6-4.6-dev      4.6.0-10         The GNU Standard C++ Library v3 (d
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

g++-4.6 recommends no packages.

Versions of packages g++-4.6 suggests:
pn  g++-4.6-multilib              <none>     (no description available)
pn  gcc-4.6-doc                   <none>     (no description available)
pn  libstdc++6-4.6-dbg            <none>     (no description available)

-- no debconf information
 ChangeLog   |    6 ++++++
 NEWS        |    4 ++++
 makefile    |    2 +-
 v3c/v3c.cpp |   13 ++++++-------
 4 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2dafda9..e1ac676 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-14  Philip Ashmore <cont...@philipashmore.com>
+
+        * Version 1.8.2-03
+
+        * changes to v3c.cpp for gcc-4.6
+
 2011-06-07  Philip Ashmore <cont...@philipashmore.com>
 
         * Version 1.8.2-02
diff --git a/NEWS b/NEWS
index 6ed6e33..bf5351c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 Please send v3c bug reports via <http://sourceforge.net/projects/v3c/support>
 
+Version 1.8.2-03
+
+* changes to v3c.cpp for gcc-4.6
+
 Version 1.8.2-02
 
 * changes to header files required for gcc-4.5.3 / g++-4.5.3
diff --git a/makefile b/makefile
index c47fbc1..bc88f7b 100644
--- a/makefile
+++ b/makefile
@@ -10,7 +10,7 @@ export package_description=v3c utility toolkit
 export package_major_version=1
 export package_minor_version=8
 export package_micro_version=2
-export 
package_version=$(package_major_version).$(package_minor_version).$(package_micro_version)-02
+export 
package_version=$(package_major_version).$(package_minor_version).$(package_micro_version)-03
 # increase the interface age by 2 for each release;
 # if the API changes, set to 0
 export package_interface_age=0
diff --git a/v3c/v3c.cpp b/v3c/v3c.cpp
index 7c9ca4b..eef84e3 100755
--- a/v3c/v3c.cpp
+++ b/v3c/v3c.cpp
@@ -1645,7 +1645,6 @@ int v3c_sort(IWriter * out, int argc, char *argv[])
                        items.insert(item);
        }
        set< string >::const_iterator i = items.begin();
-       set< string >::const_iterator j = items.end();
        unsigned int count = items.size();
        for(unsigned int n = 0; n < count; ++i, ++n) {
                if(n && (n <= (count - 1)))
@@ -2173,27 +2172,27 @@ int v3c_automake(IWriter * out, int, char *[])
                }
        }
        close(pipe);
-       int failed = 0;
+       ret = 0;
        if(WIFSIGNALED(status)) {
-               failed = 1;
+               ret = 1;
                cout << "[FAIL] : \"" << cmd << "\" was signalled with signal "
                        << strsignal(WTERMSIG(status)) << '('
                        << WTERMSIG(status) << ").\n";
        }
        if(WIFSTOPPED(status)) {
-               failed = 1;
+               ret = 1;
                cout << "[FAIL] : \"" << cmd << "\" was stopped with stop 
signal "
                        << strsignal(WSTOPSIG(status)) << '('
                        << WSTOPSIG(status) << ").\n";
        }
        if(!WIFEXITED(status)) {
-               failed = 1;
+               ret = 1;
                cout << "[FAIL] : \"" << cmd << "\" exited abnormally.\n";
        }
        ret = WEXITSTATUS(status);
        if(ret != 0) {
-               failed = 1;
+               ret = 1;
                cout << "[FAIL] : \"" << cmd << "\" returned " << ret << ".\n";
        }
-       return 0;
+       return ret;
 }
 ChangeLog                             |   25 ++++++++++++++++++++++++-
 NEWS                                  |   25 +++++++++++++++++++++++--
 configure.ac.in                       |   27 +++++++++++++++++----------
 makefile                              |    8 ++++----
 treedb.pc.in                          |    5 ++---
 v3c/1-andromeda/Makefile.am           |    9 +++++++++
 v3c/3-comet/resizing-strings-test.cpp |    1 +
 v3c/Makefile.am                       |   21 +++++----------------
 v3c/l2list-impl.h                     |    1 +
 v3c/treedb.m4.in                      |    4 ++--
 10 files changed, 88 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 64d3fdb..55b80e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2011-06-14  Philip Ashmore <cont...@philipashmore.com>
+
+        * Version 1.0.0-01
+
+        * Re-jig for GNU gcc/g++ linker-related changes for Wheezy
+          http://lists.debian.org/debian-devel-announce/2011/02/msg00011.html
+
+          This required dropping the wrapper treedb libs with their dependents.
+          Pkg-config, m4 and automake can do this transparently, so unless you
+          make explicit library references instead of going through a symbolic
+          route, all should be good.
+
+          Since this required renaming libraries, I went ahead and dropped the
+          "RELEASE" part of the library definitions, so you now have 
treedb_LIBS
+          (was treedb_RELEASE_LIBS) and treedb_DEVEL_LIBS.
+          Since the wrapper libs went, the "bare" libs have dropped the "bare"
+          part since they're all that's left and anything else would be (more)
+          confusing.
+
+         These are link-time changes, requiring a large version bump.
+         They are also incompatible changes requiring that I update to the
+         next major version 1.0.0, and not 0.9.3.
+
 2011-04-18  Philip Ashmore <cont...@philipashmore.com>
 
         * Version 0.9.2-01
@@ -115,7 +138,7 @@
           node_index() gets the index of a node, node_at_index() gets the node
           at the index.
 
-        * Substancial cleanup of macro names + examples
+        * Substantial cleanup of macro names + examples
           Although this doesn't affect library versioning, I thought it
           warranted a large version increase as it makes treedb a lot easier to
           read and use.
diff --git a/NEWS b/NEWS
index 5817204..d89cc41 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,28 @@
 Please send treedb bug reports via
 <http://sourceforge.net/projects/treedb/support>
 
-* Version 0.9.2-01
+Version 1.0.0-01
+
+* Re-jig for GNU gcc/g++ linker-related changes for Wheezy
+  http://lists.debian.org/debian-devel-announce/2011/02/msg00011.html
+
+  This required dropping the wrapper treedb libs with their dependents.
+  Pkg-config, m4 and automake can do this transparently, so unless you
+  make explicit library references instead of going through a symbolic
+  route, all should be good.
+
+  Since this required renaming libraries, I went ahead and dropped the
+  "RELEASE" part of the library definitions, so you now have treedb_LIBS
+  (was treedb_RELEASE_LIBS) and treedb_DEVEL_LIBS.
+  Since the wrapper libs went, the "bare" libs have dropped the "bare"
+  part since they're all that's left and anything else would be (more)
+  confusing.
+
+  These are link-time changes, requiring a large version bump.
+  They are also incompatible changes requiring that I update to the
+  next major version 1.0.0, and not 0.9.3.
+
+Version 0.9.2-01
 
 * Builds static and shared libraries by default, like v3c does
   Client projects may require this, hence the version bump.
@@ -100,7 +121,7 @@ Version 0.8.0-01
 
 * Added multi-varray + test
 
-* Substancial cleanup of macro names + examples
+* Substantial cleanup of macro names + examples
   Although this doesn't affect library versioning, I thought it
   warranted a large version increase as it makes treedb a lot easier to
   read and use.
diff --git a/configure.ac.in b/configure.ac.in
index 4661b98..367e0ad 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -137,14 +137,15 @@ AC_SUBST([PACKAGE_CXXFLAGS],["$CXXFLAGS"])
 AC_SUBST([CPPFLAGS],["$CPPFLAGS -isystem \${top_srcdir}"])
 
 # Library abbreviations.
-AC_SUBST([treedb_LIBS],
-[\${top_builddir}/v3c/libtreedb-package_api_version.la])
-AC_SUBST([treedb_DEVEL_LIBS],
-[\${top_builddir}/v3c/libtreedb-package_api_version-d.la])
 AC_SUBST([treedb_BARE_LIBS],
-[\${top_builddir}/v3c/libtreedb-package_api_version-bare.la])
+[\${top_builddir}/v3c/libtreedb-package_api_version.la])
 AC_SUBST([treedb_BARE_DEVEL_LIBS],
-[\${top_builddir}/v3c/libtreedb-package_api_version-bare-d.la])
+[\${top_builddir}/v3c/libtreedb-d-package_api_version.la])
+
+treedb_LIBS="$treedb_BARE_LIBS $v3c_LIBS"
+treedb_DEVEL_LIBS="$treedb_BARE_DEVEL_LIBS $v3c_DEVEL_LIBS"
+AC_SUBST([treedb_LIBS])
+AC_SUBST([treedb_DEVEL_LIBS])
 
 
#-------------------------------------------------------------------------------
 # Location customization
@@ -173,10 +174,16 @@ AC_SUBST([PACKAGE_INSTALLDOX_TAGS],["$v3c_INSTALLDOX_TAGS 
-l package_name.tag@$d
 AC_SUBST([PACKAGE_CFLAGS])
 AC_SUBST([PACKAGE_CPPFLAGS])
 AC_SUBST([PACKAGE_CXXFLAGS])
-AC_SUBST([PACKAGE_DEVEL_LIBS],["-ltreedb-package_api_version-d"])
-AC_SUBST([PACKAGE_RELEASE_LIBS],["-ltreedb-package_api_version"])
-AC_SUBST([PACKAGE_BARE_DEVEL_LIBS],["-ltreedb-package_api_version-bare-d"])
-AC_SUBST([PACKAGE_BARE_RELEASE_LIBS],["-ltreedb-package_api_version-bare"])
+
+PACKAGE_BARE_DEVEL_LIBS="-ltreedb-d-package_api_version"
+PACKAGE_BARE_LIBS="-ltreedb-package_api_version"
+PACKAGE_DEVEL_LIBS="-ltreedb-d-package_api_version $v3c_DEVEL_LIBS"
+PACKAGE_LIBS="-ltreedb-package_api_version $v3c_LIBS"
+
+AC_SUBST([PACKAGE_BARE_DEVEL_LIBS])
+AC_SUBST([PACKAGE_BARE_LIBS])
+AC_SUBST([PACKAGE_DEVEL_LIBS])
+AC_SUBST([PACKAGE_LIBS])
 
 AC_SUBST([PACKAGE_LDFLAGS],["$LDFLAGS"])
 
diff --git a/makefile b/makefile
index 9f3ab96..16cf253 100644
--- a/makefile
+++ b/makefile
@@ -7,9 +7,9 @@ export package_description=tree db is a C library that 
implements on-disk memory
 # The package version number, (as distinct from shared library version)
 # An odd micro number indicates in-progress development, (eg. from GIT)
 # An even micro number indicates a released version.
-export package_major_version=0
-export package_minor_version=9
-export package_micro_version=2
+export package_major_version=1
+export package_minor_version=0
+export package_micro_version=0
 export 
package_version=$(package_major_version).$(package_minor_version).$(package_micro_version)-01
 # increase the interface age by 2 for each release;
 # if the API changes, set to 0
@@ -17,7 +17,7 @@ export package_interface_age=0
 
 # This is the version clients will need to re-code for.
 export package_next_major_version=1
-export package_next_minor_version=0
+export package_next_minor_version=1
 export package_next_micro_version=0
 export 
package_next_version=$(package_next_major_version).$(package_next_minor_version).$(package_next_micro_version)
 
diff --git a/treedb.pc.in b/treedb.pc.in
index e20b8bc..2f20856 100644
--- a/treedb.pc.in
+++ b/treedb.pc.in
@@ -37,12 +37,11 @@ CFLAGS=@PACKAGE_CFLAGS@
 CXXFLAGS=@PACKAGE_CXXFLAGS@
 
 DEVEL_LIBS=@PACKAGE_DEVEL_LIBS@
-RELEASE_LIBS=@PACKAGE_RELEASE_LIBS@
+LIBS=@PACKAGE_LIBS@
 
 BARE_DEVEL_LIBS=@PACKAGE_BARE_DEVEL_LIBS@
-BARE_RELEASE_LIBS=@PACKAGE_BARE_RELEASE_LIBS@
+BARE_LIBS=@PACKAGE_BARE_LIBS@
 
-LIBS=${RELEASE_LIBS}
 LDFLAGS=@PACKAGE_LDFLAGS@
 
 Name: @PACKAGE@-${apiversion}
diff --git a/v3c/1-andromeda/Makefile.am b/v3c/1-andromeda/Makefile.am
index fbd068e..be94735 100644
--- a/v3c/1-andromeda/Makefile.am
+++ b/v3c/1-andromeda/Makefile.am
@@ -26,10 +26,19 @@ pointer_int_tree_c_SOURCES           = pointer-int-tree.c
 pointer_int_tree_cxx_SOURCES         = pointer-int-tree.c
 pointer_int_tree_cxx_CPPFLAGS        = $(AM_CPPFLAGS) -x c++
 
+pointer_int_tree_cxx_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+       $(pointer_int_tree_cxx_LDFLAGS) $(LDFLAGS) -o $@
+
 pointer_string_tree_c_SOURCES        = pointer-string-tree.c
 
 pointer_string_tree_cxx_SOURCES      = pointer-string-tree.c
 pointer_string_tree_cxx_CPPFLAGS     = $(AM_CPPFLAGS) -x c++
+#pointer_string_tree_cxx_LDFLAGS      = $(LDFLAGS) $(AM_LDFLAGS) -x c++
+
+pointer_string_tree_cxx_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+       $(pointer_string_tree_cxx_LDFLAGS) $(LDFLAGS) -o $@
 
 offset_fixed_int_tree_c_SOURCES      = offset-fixed-int-tree-c.c
 offset_fixed_int_tree_cxx_SOURCES    = offset-fixed-int-tree-cxx.cpp
diff --git a/v3c/3-comet/resizing-strings-test.cpp 
b/v3c/3-comet/resizing-strings-test.cpp
index 9ad2e89..1e99637 100644
--- a/v3c/3-comet/resizing-strings-test.cpp
+++ b/v3c/3-comet/resizing-strings-test.cpp
@@ -130,6 +130,7 @@ int resize_node(TREEDB_NS(context_ptr_t) context
        unsigned int n;
        for(n = 0; node; ++n) {
                TREEDB_NSA(node_ptr_t) p = TREEDB_ALLOC_addr_to_nodeptr(node);
+               (void)p; /* -Wunused-but-set-variable */
                TREEDB_printf("[%u] resize_node [%zu : %zu] [%zu : %s]\n"
                        , n
                        , (size_t)TREEDB_pack_pointer(p)
diff --git a/v3c/Makefile.am b/v3c/Makefile.am
index 856bb6e..53c61c6 100644
--- a/v3c/Makefile.am
+++ b/v3c/Makefile.am
@@ -12,28 +12,17 @@ SUBDIRS                              = . \
 AM_CPPFLAGS                          = -I$(srcdir)/.. \
                                        -D_GNU_SOURCE
 
-lib_LTLIBRARIES                      = libtreedb-@package_api_vers...@-bare.la 
\
-                                       
libtreedb-@package_api_vers...@-bare-d.la \
-                                       libtreedb-@PACKAGE_API_VERSION@.la \
-                                       libtreedb-@package_api_vers...@-d.la
+lib_LTLIBRARIES                      = libtreedb-@PACKAGE_API_VERSION@.la \
+                                       libtreedb-d-@PACKAGE_API_VERSION@.la
 
 aclocaldir                           = $(datadir)/aclocal
 aclocal_DATA                         = @PACKAGE@.m4
 
-libtreedb_@PACKAGE_API_VERSION@_bare_la_SOURCES = treedb.c
-libtreedb_@PACKAGE_API_VERSION@_bare_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
-
-libtreedb_@PACKAGE_API_VERSION@_bare_d_la_SOURCES = treedb.c
-libtreedb_@PACKAGE_API_VERSION@_bare_d_la_CPPFLAGS = $(AM_CPPFLAGS) 
-DTREEDB_DEBUG
-
-libtreedb_@PACKAGE_API_VERSION@_la_SOURCES =
+libtreedb_@PACKAGE_API_VERSION@_la_SOURCES = treedb.c
 libtreedb_@PACKAGE_API_VERSION@_la_LDFLAGS = -no-undefined @PACKAGE_LT_LDFLAGS@
-libtreedb_@PACKAGE_API_VERSION@_la_LIBADD = @treedb_BARE_LIBS@ @v3c_LIBS@
 
-libtreedb_@PACKAGE_API_VERSION@_d_la_SOURCES =
-libtreedb_@PACKAGE_API_VERSION@_d_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
-libtreedb_@PACKAGE_API_VERSION@_d_la_LIBADD = @treedb_BARE_DEVEL_LIBS@ \
-                                       @v3c_DEVEL_LIBS@
+libtreedb_d_@PACKAGE_API_VERSION@_la_SOURCES = treedb.c
+libtreedb_d_@PACKAGE_API_VERSION@_la_CPPFLAGS = $(AM_CPPFLAGS) -DTREEDB_DEBUG
 
 includedir                           = $(prefix)/include/v3c
 include_HEADERS                      = avl-checkdefs.h \
diff --git a/v3c/l2list-impl.h b/v3c/l2list-impl.h
index 1e9cd23..96b3b53 100644
--- a/v3c/l2list-impl.h
+++ b/v3c/l2list-impl.h
@@ -202,6 +202,7 @@ L2LIST_prefix void L2LIST_NS(clear)
        L2LIST_node_ptr_t node
                = L2LIST_unpack_node(L2LIST_unpack_list(hl)->L2LIST_head);
        L2LIST_packed_node_ptr_t next, pknode;
+       (void)pknode; /* Its usage depends on the macros - keep the compiler 
happy*/
        for(; node; node = L2LIST_unpack_node(next)) {
                next = node->L2LIST_next;
                /* Store the offset as the memory may move. */
diff --git a/v3c/treedb.m4.in b/v3c/treedb.m4.in
index cdf3fb1..fde1c1f 100644
--- a/v3c/treedb.m4.in
+++ b/v3c/treedb.m4.in
@@ -13,9 +13,9 @@ export @PACKAGE@_DOXYGEN_BUILTIN_STL="@BUILTIN_STL@"
 export @PACKAGE@_CPPFLAGS="@PACKAGE_CPPFLAGS@"
 export @PACKAGE@_CXXFLAGS="@PACKAGE_CXXFLAGS@"
 export @PACKAGE@_CFLAGS="@PACKAGE_CFLAGS@"
-export @PACKAGE@_LIBS="@PACKAGE_RELEASE_LIBS@"
+export @PACKAGE@_LIBS="@PACKAGE_LIBS@"
 export @PACKAGE@_DEVEL_LIBS="@PACKAGE_DEVEL_LIBS@"
-export @PACKAGE@_BARE_LIBS="@PACKAGE_BARE_RELEASE_LIBS@"
+export @PACKAGE@_BARE_LIBS="@PACKAGE_BARE_LIBS@"
 export @PACKAGE@_BARE_DEVEL_LIBS="@PACKAGE_BARE_DEVEL_LIBS@"
 
 export @PACKAGE@_package_requires="$(pkg-config --variable=package_requires 
@PACKAGE@)"
 ChangeLog                            |   25 ++++++++++++
 NEWS                                 |   23 +++++++++++
 configure.ac.in                      |   71 ++++++++++++++++++++--------------
 makefile                             |    6 +-
 meta-treedb.pc.in                    |    5 +-
 setup_kdbg                           |   35 ++++++++++-------
 v3c/1-comet/Makefile.am              |   38 ++++--------------
 v3c/1-comet/cxx-string-list-test.cpp |    9 ++++
 v3c/Makefile.am                      |   52 +++++++------------------
 v3c/meta-treedb.m4.in                |    4 +-
 10 files changed, 149 insertions(+), 119 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aac7c7d..8728b91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2011-06-14  Philip Ashmore <cont...@philipashmore.com>
+
+        * Version 1.3.0-01
+
+        * Re-jig for GNU gcc/g++ linker-related changes for Wheezy
+          http://lists.debian.org/debian-devel-announce/2011/02/msg00011.html
+
+          This required dropping the wrapper meta-treedb libs with their
+          dependents.
+          Pkg-config, m4 and automake can do this transparently, so unless you
+          make explicit library references instead of going through a symbolic
+          route, all should be good.
+
+          Since this required renaming libraries, I went ahead and dropped the
+          "RELEASE" part of the library definitions, so you now have
+          meta_treedb_LIBS (was meta_treedb_RELEASE_LIBS) and
+          meta_treedb_DEVEL_LIBS.
+          Since the wrapper libs went, the "bare" libs have dropped the "bare"
+          part since they're all that's left and anything else would be (more)
+          confusing.
+
+         These are link-time changes, requiring a large version bump.
+         They are also incompatible changes requiring that I update to the
+         next major version 1.3.0, and not 1.2.3.
+
 2011-04-18  Philip Ashmore <cont...@philipashmore.com>
 
         * Version 1.2.2-01
diff --git a/NEWS b/NEWS
index 57375a0..1fdbe71 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,29 @@
 Please send treedb bug reports via
 <http://sourceforge.net/projects/meta-treedb/support>
 
+Version 1.3.0-01
+
+* Re-jig for GNU gcc/g++ linker-related changes for Wheezy
+  http://lists.debian.org/debian-devel-announce/2011/02/msg00011.html
+
+  This required dropping the wrapper meta-treedb libs with their
+  dependents.
+  Pkg-config, m4 and automake can do this transparently, so unless you
+  make explicit library references instead of going through a symbolic
+  route, all should be good.
+
+  Since this required renaming libraries, I went ahead and dropped the
+  "RELEASE" part of the library definitions, so you now have
+  meta_treedb_LIBS (was meta_treedb_RELEASE_LIBS) and
+  meta_treedb_DEVEL_LIBS.
+  Since the wrapper libs went, the "bare" libs have dropped the "bare"
+  part since they're all that's left and anything else would be (more)
+  confusing.
+
+  These are link-time changes, requiring a large version bump.
+  They are also incompatible changes requiring that I update to the
+  next major version 1.3.0, and not 1.2.3.
+
 Version 1.2.2-01
 
 * Builds static and shared libraries by default, like v3c does
diff --git a/configure.ac.in b/configure.ac.in
index 8e3649a..a736007 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -39,8 +39,8 @@ AC_DEFINE_UNQUOTED([POINTER_SIZE],[$MOST_BYTES],[Pointer 
size])
 
#-------------------------------------------------------------------------------
 # treedb
 
#-------------------------------------------------------------------------------
-if ! pkg-config --exists 'treedb >= 0.9.2' ; then
-       AC_MSG_ERROR([treedb version 0.9.2 or later is required.
+if ! pkg-config --exists 'treedb >= 1.0.0' ; then
+       AC_MSG_ERROR([treedb version 1.0.0 or later is required.
 You can download it from http://sourceforge.net/projects/treedb.
 ])
 fi
@@ -48,7 +48,7 @@ ACX_TREEDB
 echo "Libs before: $LIBS"
 export LIBS="$(echo -n "$LIBS" | sed -r -e 's/-l.+//g' -e 's| +| |g')$(echo 
"$LIBS" | sed -r -e 's/-W[[^ ]]+//g' -e 's| +| |g' | xargs v3c reverse )"
 echo "Libs after: $LIBS"
-export LIBS="$(echo -n "$LIBS" | sed -r -e 's/ 
?-l(treedb|v3c)-[[0-9]]+\.[[0-9]]+d?//g')"
+export LIBS="$(echo -n "$LIBS" | sed -r -e 's/ 
?-l(treedb|v3c)(-d)?-[0-9]+\.[0-9]+//g')"
 echo "Libs with v3c and treedb removed: $LIBS"
 
################################################################################
 # 64 bits.
@@ -119,27 +119,31 @@ AC_SUBST([PACKAGE_CPPFLAGS],["$CPPFLAGS"])
 AC_SUBST([CPPFLAGS],["$CPPFLAGS -isystem \${top_srcdir}"])
 
 # Library abbreviations.
-AC_SUBST([meta_treedb_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version.la])
-AC_SUBST([meta_treedb_DEVEL_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version-d.la])
-AC_SUBST([meta_treedb_DEVEL2_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version-d2.la])
 AC_SUBST([meta_treedb_BARE_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version-bare.la])
+[\${top_builddir}/v3c/libmeta-treedb-package_api_version.la])
 AC_SUBST([meta_treedb_BARE_DEVEL_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version-bare-d.la])
+[\${top_builddir}/v3c/libmeta-treedb-d-package_api_version.la])
 AC_SUBST([meta_treedb_BARE_DEVEL2_LIBS],
-[\${top_builddir}/v3c/libmeta-treedb-package_api_version-bare-d2.la])
+[\${top_builddir}/v3c/libmeta-treedb-d2-package_api_version.la])
+
+meta_treedb_LIBS="$meta_treedb_BARE_LIBS $treedb_LIBS"
+meta_treedb_DEVEL_LIBS="$meta_treedb_BARE_DEVEL_LIBS $treedb_DEVEL_LIBS"
+meta_treedb_DEVEL2_LIBS="$meta_treedb_BARE_DEVEL2_LIBS $treedb_DEVEL_LIBS"
+AC_SUBST([meta_treedb_LIBS])
+AC_SUBST([meta_treedb_DEVEL_LIBS])
+AC_SUBST([meta_treedb_DEVEL2_LIBS])
 
-AC_SUBST([meta_comet_LIBS],
-[\${top_builddir}/v3c/1-comet/libmeta-comet-package_api_version.la])
-AC_SUBST([meta_comet_DEVEL_LIBS],
-[\${top_builddir}/v3c/1-comet/libmeta-comet-package_api_version-d.la])
 AC_SUBST([meta_comet_BARE_LIBS],
-[\${top_builddir}/v3c/1-comet/libmeta-comet-package_api_version-bare.la])
+[\${top_builddir}/v3c/1-comet/libmeta-comet-package_api_version.la])
 AC_SUBST([meta_comet_BARE_DEVEL_LIBS],
-[\${top_builddir}/v3c/1-comet/libmeta-comet-package_api_version-bare-d.la])
+[\${top_builddir}/v3c/1-comet/libmeta-comet-d-package_api_version.la])
+
+meta_comet_LIBS="$meta_comet_BARE_LIBS $meta_treedb_LIBS"
+meta_comet_DEVEL_LIBS="$meta_comet_BARE_DEVEL_LIBS $meta_treedb_DEVEL_LIBS"
+
+AC_SUBST([meta_comet_LIBS])
+AC_SUBST([meta_comet_DEVEL_LIBS])
+
 
#-------------------------------------------------------------------------------
 # Location customization
 
#-------------------------------------------------------------------------------
@@ -163,17 +167,26 @@ AC_SUBST([PACKAGE_CXXFLAGS],["$CXXFLAGS"])
 AC_SUBST([PACKAGE_CFLAGS],["$CFLAGS"])
 AC_SUBST([PACKAGE_CPPFLAGS],["$PACKAGE_CPPFLAGS"])
 
-AC_SUBST([PACKAGE_DEVEL_LIBS],["-l%package_name%-package_api_version-d"])
-AC_SUBST([PACKAGE_DEVEL2_LIBS],["-l%package_name%-package_api_version-d2"])
-AC_SUBST([PACKAGE_RELEASE_LIBS],["-l%package_name%-package_api_version"])
-AC_SUBST([PACKAGE_BARE_DEVEL_LIBS],["-l%package_name%-package_api_version-bare-d"])
-AC_SUBST([PACKAGE_BARE_DEVEL2_LIBS],["-l%package_name%-package_api_version-bare-d2"])
-AC_SUBST([PACKAGE_BARE_RELEASE_LIBS],["-l%package_name%-package_api_version-bare"])
-
-AC_SUBST([COMET_DEVEL_LIBS],["-lmeta-comet-package_api_version-d"])
-AC_SUBST([COMET_LIBS],["-lmeta-comet-package_api_version"])
-AC_SUBST([COMET_BARE_DEVEL_LIBS],["-lmeta-comet-package_api_version-bare-d"])
-AC_SUBST([COMET_BARE_LIBS],["-lmeta-comet-package_api_version-bare"])
+AC_SUBST([PACKAGE_BARE_DEVEL_LIBS],["-l%package_name%-d-package_api_version"])
+AC_SUBST([PACKAGE_BARE_DEVEL2_LIBS],["-l%package_name%-d2-package_api_version"])
+AC_SUBST([PACKAGE_BARE_LIBS],["-l%package_name%-package_api_version"])
+
+PACKAGE_DEVEL_LIBS="$PACKAGE_BARE_DEVEL_LIBS $treedb_DEVEL_LIBS"
+PACKAGE_DEVEL2_LIBS="$PACKAGE_BARE_DEVEL2_LIBS $treedb_DEVEL_LIBS"
+PACKAGE_LIBS="$PACKAGE_LIBS $treedb_LIBS"
+
+AC_SUBST([PACKAGE_DEVEL_LIBS])
+AC_SUBST([PACKAGE_DEVEL2_LIBS])
+AC_SUBST([PACKAGE_LIBS])
+
+COMET_BARE_DEVEL_LIBS="-lmeta-comet-d-package_api_version"
+COMET_BARE_LIBS="-lmeta-comet-package_api_version"
+
+COMET_DEVEL_LIBS="$COMET_BARE_DEVEL2_LIBS $PACKAGE_DEVEL_LIBS"
+COMET_LIBS="$COMET_BARE_LIBS $PACKAGE_LIBS"
+
+AC_SUBST([COMET_DEVEL_LIBS])
+AC_SUBST([COMET_LIBS])
 
 AC_SUBST([PACKAGE_LDFLAGS],["$LDFLAGS"])
 
diff --git a/makefile b/makefile
index 782df89..d5fa407 100644
--- a/makefile
+++ b/makefile
@@ -8,8 +8,8 @@ export package_description=meta-treedb implements on-disk 
memory using meta-data
 # An odd micro number indicates in-progress development, (eg. from GIT)
 # An even micro number indicates a released version.
 export package_major_version=1
-export package_minor_version=2
-export package_micro_version=2
+export package_minor_version=3
+export package_micro_version=0
 export 
package_version=$(package_major_version).$(package_minor_version).$(package_micro_version)-01
 # increase the interface age by 2 for each release;
 # if the API changes, set to 0
@@ -17,7 +17,7 @@ export package_interface_age=0
 
 # This is the version clients may need to re-code for.
 export package_next_major_version=1
-export package_next_minor_version=3
+export package_next_minor_version=4
 export package_next_micro_version=0
 export 
package_next_version=$(package_next_major_version).$(package_next_minor_version).$(package_next_micro_version)
 
diff --git a/meta-treedb.pc.in b/meta-treedb.pc.in
index da90b07..08b6a22 100644
--- a/meta-treedb.pc.in
+++ b/meta-treedb.pc.in
@@ -38,17 +38,16 @@ CXXFLAGS=@PACKAGE_CXXFLAGS@
 
 DEVEL_LIBS=@PACKAGE_DEVEL_LIBS@
 DEVEL2_LIBS=@PACKAGE_DEVEL2_LIBS@
-RELEASE_LIBS=@PACKAGE_RELEASE_LIBS@
+LIBS=@PACKAGE_LIBS@
 BARE_DEVEL_LIBS=@PACKAGE_BARE_DEVEL_LIBS@
 BARE_DEVEL2_LIBS=@PACKAGE_BARE_DEVEL2_LIBS@
-BARE_RELEASE_LIBS=@PACKAGE_BARE_RELEASE_LIBS@
+BARE_LIBS=@PACKAGE_BARE_LIBS@
 
 meta_comet_LIBS=@COMET_LIBS@
 meta_comet_DEVEL_LIBS=@COMET_DEVEL_LIBS@
 meta_comet_BARE_LIBS=@COMET_BARE_LIBS@
 meta_comet_BARE_DEVEL_LIBS=@COMET_BARE_DEVEL_LIBS@
 
-LIBS=${RELEASE_LIBS}
 LDFLAGS=@PACKAGE_LDFLAGS@
 
 Name: @PACKAGE@-${apiversion}
diff --git a/setup_kdbg b/setup_kdbg
index ce34ee6..e4f7563 100755
--- a/setup_kdbg
+++ b/setup_kdbg
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright (C) 2009  Philip Ashmore (cont...@philipashmore.com)
 # License: LPGLv3.  See LICENSE.txt for the full license.
@@ -25,6 +25,10 @@
 #set -e
 root=$(readlink -f ${0%/*})
 
+ECHO()
+{
+       true;#echo $1 $2 $3 $4 $5 $6 $7 $8 $9
+}
 process_kdbg()
 {
        cat > .kdbgrc.$1 <<EOF
@@ -44,12 +48,12 @@ EOF
 }
 process()
 {
-       #echo -e "\t\t$name"
+       ECHO -e "\t\t$name"
        if test -f $1 && test ! -h $1 ; then
-               echo "$1 exists and is not a symbolic link!"
+               ECHO "$1 exists and is not a symbolic link!"
                exit 1
        fi
-       #echo -e "\t\tln -fs $pdir/$1 $2"
+       ECHO -e "\t\tln -fs $pdir/$1 $2"
        ln -fs $pdir/$1 $2
        process_kdbg $2
 }
@@ -58,11 +62,11 @@ process()
 link_program()
 {
        if test -f $pdir/$1 ; then
-               #echo -e "\t$pdir/$1 -> $2"
+               ECHO -e "\t$pdir/$1 -> $2"
                process $1 $2
                return 0
-       #else
-       #       echo -e "\t$pdir/$1 doesn't exist."
+       else
+               ECHO -e "\t$pdir/$1 doesn't exist."
        fi
        return 1
 }
@@ -86,7 +90,7 @@ esac
 # 1: directory
 link_programs()
 {
-       #echo -e "\tlooking at $1"
+       ECHO -e "\tlooking at $1"
        local found=1
        for a in 16 32 64; do
                if link_program .libs/${1}_$a ${1}_$a ; then
@@ -99,13 +103,13 @@ link_programs()
                                if link_program .libs/${p}${c}${1} ${p}${c}${1} 
; then
                                        found=0
                                else
-                                       true; #echo -e 
"\t$pdir/.libs/${p}${c}${1} -> X"
+                                       ECHO -e "\t$pdir/.libs/${p}${c}${1} -> 
X"
                                fi
                                for a in 16 32 64; do
                                        if link_program 
.libs/${p}${c}${1}${dash}$a ${p}${c}${1}${dash}$a ; then
                                                found=0
                                        else
-                                               true; #echo -e 
"\t$pdir/.libs/${p}${c}${1}${dash}$a -> X"
+                                               ECHO -e 
"\t$pdir/.libs/${p}${c}${1}${dash}$a -> X"
                                        fi
                                done
                        done
@@ -114,7 +118,10 @@ link_programs()
                        fi
                done
        done
-       if test $found -eq 0; then return; fi
+       if test $found -eq 0; then
+               ECHO "Not found."
+               return
+       fi
        if link_program .libs/$1 $1 ; then
                return
        fi
@@ -128,12 +135,12 @@ link_programs()
 cd v3c
 for sdir in $(find . -mindepth 1 -maxdepth 1 -type d | sort) ; do
        sdir="${sdir#*/}"
-       #echo "$sdir"
+       ECHO "$sdir"
        pdir="../../build/v3c/$sdir"
        #sdir=$(readlink -f $sdir)
-       #echo -e "\tsdir = $sdir"
-       #echo -e "\tpdir = $pdir"
+       ECHO -e "[$(pwd)] \tsdir = $sdir"
        ( cd $sdir;
+       pwd
        rm .kdbgrc.* 2>/dev/null || true
        for a in $(ls *.{c,cpp} 2>/dev/null); do
                a=${a%.*}
diff --git a/v3c/1-comet/Makefile.am b/v3c/1-comet/Makefile.am
index 1a71c94..db0eecc 100644
--- a/v3c/1-comet/Makefile.am
+++ b/v3c/1-comet/Makefile.am
@@ -7,15 +7,7 @@ export POINTER_SIZE                 := @MOST_BITS@
 
 # This doesn't work on Debian GNU/Linux 5.0.7 (lenny).
 #LDADD = @meta_comet_LIBS@
-LDADD                                = libmeta-comet-@PACKAGE_API_VERSION@.la \
-                                       @meta_treedb_BARE_LIBS@ \
-                                       @treedb_BARE_LIBS@ \
-                                       @v3c_LIBS@
-
-x                                = libmeta-comet-@package_api_vers...@-d.la \
-                                       @meta_treedb_BARE_DEVEL2_LIBS@ \
-                                       @treedb_BARE_LIBS@ \
-                                       @v3c_DEVEL_LIBS@
+LDADD                                = @meta_comet_LIBS@
 
 CXXLDADD =
 AM_CPPFLAGS                          = -I$(top_srcdir)/v3c \
@@ -24,41 +16,27 @@ AM_CPPFLAGS                          = -I$(top_srcdir)/v3c \
 #                                       -DMETA_TREEDB_DEBUG
 #                                       -D_GNU_SOURCE -DTREEDB_DEBUG=2
 
-lib_LTLIBRARIES                      = 
libmeta-comet-@package_api_vers...@-bare.la \
-                                       
libmeta-comet-@package_api_vers...@-bare-d.la \
-                                       libmeta-comet-@PACKAGE_API_VERSION@.la \
-                                       libmeta-comet-@package_api_vers...@-d.la
+lib_LTLIBRARIES                      = libmeta-comet-@PACKAGE_API_VERSION@.la \
+                                       libmeta-comet-d-@PACKAGE_API_VERSION@.la
 
 bin_PROGRAMS                         = v3c-meta-comet
 
-libmeta_comet_@PACKAGE_API_VERSION@_bare_la_SOURCES = \
+libmeta_comet_@PACKAGE_API_VERSION@_la_SOURCES = \
                                        int-tree.c \
                                        string-tree.c \
                                        int-list.c \
                                        string-list.c
-libmeta_comet_@PACKAGE_API_VERSION@_bare_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
+libmeta_comet_@PACKAGE_API_VERSION@_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
 
-libmeta_comet_@PACKAGE_API_VERSION@_bare_d_la_SOURCES = \
+libmeta_comet_d_@PACKAGE_API_VERSION@_la_SOURCES = \
                                        int-tree.c \
                                        string-tree.c \
                                        int-list.c \
                                        string-list.c
-libmeta_comet_@PACKAGE_API_VERSION@_bare_d_la_CPPFLAGS = \
+libmeta_comet_d_@PACKAGE_API_VERSION@_la_CPPFLAGS = \
                                        $(AM_CPPFLAGS) \
                                        -DMETA_TREEDB_DEBUG=2
-libmeta_comet_@PACKAGE_API_VERSION@_bare_d_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
-
-libmeta_comet_@PACKAGE_API_VERSION@_la_SOURCES =
-libmeta_comet_@PACKAGE_API_VERSION@_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
-libmeta_comet_@PACKAGE_API_VERSION@_la_LIBADD = @meta_comet_BARE_LIBS@ \
-                                       @meta_treedb_LIBS@
-
-libmeta_comet_@PACKAGE_API_VERSION@_d_la_SOURCES =
-libmeta_comet_@PACKAGE_API_VERSION@_d_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
-libmeta_comet_@PACKAGE_API_VERSION@_d_la_LIBADD = @meta_comet_BARE_DEVEL_LIBS@ 
\
-                                       @meta_treedb_BARE_DEVEL2_LIBS@ \
-                                       @treedb_BARE_LIBS@ \
-                                       @v3c_DEVEL_LIBS@
+libmeta_comet_d_@PACKAGE_API_VERSION@_la_LDFLAGS = -no-undefined 
@PACKAGE_LT_LDFLAGS@
 
 check_PROGRAMS                       = fork-test \
                                        fork-test-d \
diff --git a/v3c/1-comet/cxx-string-list-test.cpp 
b/v3c/1-comet/cxx-string-list-test.cpp
index a9adaff..598f37f 100644
--- a/v3c/1-comet/cxx-string-list-test.cpp
+++ b/v3c/1-comet/cxx-string-list-test.cpp
@@ -245,8 +245,17 @@ int test(uint16_t abytes, uint16_t aflags, uint16_t 
xbytes, uint16_t xflags)
        }
        return 0;
 }
+#include <signal.h>
+void sigsegv_handler(int signum)
+{
+       fflush(stdout);
+       fflush(stderr);
+       raise(signum); // Does nothing?
+       exit(1);
+}
 int main(int argc, char *argv[])
 {
+       signal(SIGSEGV, & sigsegv_handler);
        (void)argc;
        (void)argv;
        unsigned int aflags[] =
diff --git a/v3c/Makefile.am b/v3c/Makefile.am
index 8958a0d..2464dc5 100644
--- a/v3c/Makefile.am
+++ b/v3c/Makefile.am
@@ -14,12 +14,9 @@ AM_CPPFLAGS                          = -I$(srcdir)/.. \
 #                                       -DMETA_TREEDB_DEBUG
 #                                       -D_GNU_SOURCE -DTREEDB_DEBUG=2
 
-lib_LTLIBRARIES                      = 
libmeta-treedb-@package_api_vers...@-bare.la \
-                                       
libmeta-treedb-@package_api_vers...@-bare-d.la \
-                                       
libmeta-treedb-@package_api_vers...@-bare-d2.la \
-                                       libmeta-treedb-@PACKAGE_API_VERSION@.la 
\
-                                       
libmeta-treedb-@package_api_vers...@-d.la \
-                                       
libmeta-treedb-@package_api_vers...@-d2.la
+lib_LTLIBRARIES                      = libmeta-treedb-@PACKAGE_API_VERSION@.la 
\
+                                       
libmeta-treedb-d-@PACKAGE_API_VERSION@.la \
+                                       
libmeta-treedb-d2-@PACKAGE_API_VERSION@.la
 
 check_PROGRAMS                       = critter-test
 TESTS                                = $(check_PROGRAMS)
@@ -27,7 +24,7 @@ TESTS                                = $(check_PROGRAMS)
 aclocaldir                           = $(datadir)/aclocal
 aclocal_DATA                         = @PACKAGE@.m4
 
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_la_SOURCES = \
+libmeta_treedb_@PACKAGE_API_VERSION@_la_SOURCES = \
                                        meta-treedb.c \
                                        meta-treedb-array.c \
                                        meta-treedb-handle-array.c \
@@ -37,12 +34,12 @@ libmeta_treedb_@PACKAGE_API_VERSION@_bare_la_SOURCES = \
                                        meta-avl-allocator.c \
                                        meta-tree-dump.c \
                                        meta-treedb-file.c
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_la_CPPFLAGS = \
+libmeta_treedb_@PACKAGE_API_VERSION@_la_CPPFLAGS = \
                                        $(CPPFLAGS) $(AM_CPPFLAGS)
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_la_LDFLAGS = \
+libmeta_treedb_@PACKAGE_API_VERSION@_la_LDFLAGS = \
                                        -no-undefined @PACKAGE_LT_LDFLAGS@
 
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d_la_SOURCES = \
+libmeta_treedb_d_@PACKAGE_API_VERSION@_la_SOURCES = \
                                        meta-treedb.c \
                                        meta-treedb-array.c \
                                        meta-treedb-handle-array.c \
@@ -52,15 +49,15 @@ libmeta_treedb_@PACKAGE_API_VERSION@_bare_d_la_SOURCES = \
                                        meta-avl-allocator.c \
                                        meta-tree-dump.c \
                                        meta-treedb-file.c
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d_la_LDFLAGS = \
+libmeta_treedb_d_@PACKAGE_API_VERSION@_la_LDFLAGS = \
                                        -no-undefined @PACKAGE_LT_LDFLAGS@
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d_la_CPPFLAGS = \
+libmeta_treedb_d_@PACKAGE_API_VERSION@_la_CPPFLAGS = \
                                        $(CPPFLAGS) $(AM_CPPFLAGS) \
                                        -DV3C_DEBUG \
                                        -DTREEDB_DEBUG \
                                        -DMETA_TREEDB_DEBUG
 
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_SOURCES = \
+libmeta_treedb_d2_@PACKAGE_API_VERSION@_la_SOURCES = \
                                        meta-treedb.c \
                                        meta-treedb-array.c \
                                        meta-treedb-handle-array.c \
@@ -70,41 +67,20 @@ libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_SOURCES = \
                                        meta-avl-allocator.c \
                                        meta-tree-dump.c \
                                        meta-treedb-file.c
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_LDFLAGS = \
+libmeta_treedb_d2_@PACKAGE_API_VERSION@_la_LDFLAGS = \
                                        -no-undefined @PACKAGE_LT_LDFLAGS@
 
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_CPPFLAGS = \
+libmeta_treedb_d2_@PACKAGE_API_VERSION@_la_CPPFLAGS = \
                                        $(CPPFLAGS) $(AM_CPPFLAGS) \
                                        -DV3C_DEBUG \
                                        -DTREEDB_DEBUG \
                                        -DMETA_TREEDB_DEBUG
 
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_CFLAGS = $(CFLAGS) \
+libmeta_treedb_d2_@PACKAGE_API_VERSION@_la_CFLAGS = $(CFLAGS) \
                                        -fstack-protector-all
-libmeta_treedb_@PACKAGE_API_VERSION@_bare_d2_la_CXXFLAGS = $(CXXFLAGS) \
+libmeta_treedb_d2_@PACKAGE_API_VERSION@_la_CXXFLAGS = $(CXXFLAGS) \
                                        -fstack-protector-all
 
-libmeta_treedb_@PACKAGE_API_VERSION@_la_SOURCES =
-libmeta_treedb_@PACKAGE_API_VERSION@_la_LDFLAGS = \
-                                       -no-undefined @PACKAGE_LT_LDFLAGS@
-libmeta_treedb_@PACKAGE_API_VERSION@_la_LIBADD = \
-                                       @meta_treedb_BARE_LIBS@ \
-                                       @treedb_LIBS@
-
-libmeta_treedb_@PACKAGE_API_VERSION@_d_la_SOURCES =
-libmeta_treedb_@PACKAGE_API_VERSION@_d_la_LDFLAGS = \
-                                       -no-undefined @PACKAGE_LT_LDFLAGS@
-libmeta_treedb_@PACKAGE_API_VERSION@_d_la_LIBADD = \
-                                       @meta_treedb_BARE_DEVEL_LIBS@ \
-                                       @treedb_DEVEL_LIBS@
-
-libmeta_treedb_@PACKAGE_API_VERSION@_d2_la_SOURCES =
-libmeta_treedb_@PACKAGE_API_VERSION@_d2_la_LDFLAGS = \
-                                       -no-undefined @PACKAGE_LT_LDFLAGS@
-libmeta_treedb_@PACKAGE_API_VERSION@_d2_la_LIBADD = \
-                                       @meta_treedb_BARE_DEVEL2_LIBS@ \
-                                       @treedb_DEVEL_LIBS@
-
 critter_test_SOURCES                 = critter.cpp
 
 includedir                           = $(prefix)/include/v3c
diff --git a/v3c/meta-treedb.m4.in b/v3c/meta-treedb.m4.in
index 791084b..6de5b47 100644
--- a/v3c/meta-treedb.m4.in
+++ b/v3c/meta-treedb.m4.in
@@ -13,10 +13,10 @@ export @PACKAGE_CAN@_DOXYGEN_BUILTIN_STL="@BUILTIN_STL@"
 export @PACKAGE_CAN@_CPPFLAGS="@PACKAGE_CPPFLAGS@"
 export @PACKAGE_CAN@_CXXFLAGS="@PACKAGE_CXXFLAGS@"
 export @PACKAGE_CAN@_CFLAGS="@PACKAGE_CFLAGS@"
-export @PACKAGE_CAN@_LIBS="@PACKAGE_RELEASE_LIBS@"
+export @PACKAGE_CAN@_LIBS="@PACKAGE_LIBS@"
 export @PACKAGE_CAN@_DEVEL_LIBS="@PACKAGE_DEVEL_LIBS@"
 export @PACKAGE_CAN@_DEVEL2_LIBS="@PACKAGE_DEVEL2_LIBS@"
-export @PACKAGE_CAN@_BARE_LIBS="@PACKAGE_BARE_RELEASE_LIBS@"
+export @PACKAGE_CAN@_BARE_LIBS="@PACKAGE_BARE_LIBS@"
 export @PACKAGE_CAN@_BARE_DEVEL_LIBS="@PACKAGE_BARE_DEVEL_LIBS@"
 export @PACKAGE_CAN@_BARE_DEVEL2_LIBS="@PACKAGE_BARE_DEVEL2_LIBS@"
 
#!/bin/bash
set -e
if test ! -f v3c-1.8.2-02.tar.gz; then
	wget http://downloads.sourceforge.net/project/v3c/v3c-1.8.2-02.tar.gz
fi
if test ! -f treedb-0.9.2-01.tar.gz; then
	wget http://downloads.sourceforge.net/project/v3c/treedb-0.9.2-01.tar.gz
fi
if test ! -f meta-treedb-1.2.2-01.tar.gz; then
	wget http://downloads.sourceforge.net/project/v3c/meta-treedb-1.2.2-01.tar.gz
fi

for a in `ls *.gz`; do b="${a%.tar.gz}"; rm -fr "$b" 2>/dev/null || true; tar xf $a; done

mkdir sandbox 2>/dev/null || true

opt_prefix="$(readlink -f sandbox)"

.. v3c-1.8.2-02/v3c/v3c-functions
new_PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w [<sandbox>] "
write_sandbox_env "$opt_prefix" "sandbox" "$new_PS1"

.. sandbox/setup-env
ln -fs ../v3c-1.8.2-02 sandbox/v3c-1.8.2-02
ln -fs ../treedb-0.9.2-01 sandbox/treedb-0.9.2-01
ln -fs ../meta-treedb-1.2.2-01 sandbox/meta-treedb-1.2.2-01

build_install_v3c()
{
	cd v3c-1.8.2-02; patch -p1 < ../v3c-1.8.2-03.patch
	make release
	make install
}
build_install_treedb()
{
	cd treedb-0.9.2-01; patch -p1 < ../treedb-1.0.0-01.patch
	make release
	make install
}
build_test_meta_treedb()
{
	cd meta-treedb-1.2.2-01; patch -p1 < ../meta-treedb-1.3.0-01.patch
	make release check
}
( build_install_v3c )
( build_install_treedb )
( build_test_meta_treedb )

Reply via email to