Author: Damyan Ivanov <dmn@debian.org>
Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
Subject: Linking with dbm is unnecessary and causes issues
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621415
Last-Update: 2011-04-10
Forwarded: not-needed
--- a/lib/Apache2/Build.pm
+++ b/lib/Apache2/Build.pm
@@ -1175,6 +1175,8 @@ sub apru_link_flags {
     # resolve the symbols right during linking
     for ($self->apu_config_path, $self->apr_config_path) {
         my $flags = '--link-ld --libs';
+        # we don't use dbm
+        $flags =~ s/--libs/--avoid-dbm --libs/ if $_ eq $self->apu_config_path;
         $flags .= ' --ldflags' unless (WIN32);
         if (my $link = $_ && -x $_ && qx{$_ $flags}) {
             chomp $link;
