$NetBSD: patch-bw,v 1.1 2002/06/27 07:10:15 skrll Exp $

--- admin/am_edit.orig	Wed Jun 26 08:27:56 2002
+++ admin/am_edit
@@ -384,7 +384,16 @@
     # all modules are installed.  automake doesn't know this, so we need to move
     # this here from install-data to install-exec.
     if ($MakefileData =~ m/\nkde_module_LTLIBRARIES\s*=/) {
-      $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES";
+      my $lookup2 = 'install-exec-am:\s*([^\n]*)';
+      if ($MakefileData =~ /\n$lookup2\n/) {
+        my $newdeps = $1;
+        if ($newdeps =~ m/\s*install-libLTLIBRARIES\s*/) {
+	  $newdeps =~ s/(install-libLTLIBRARIES)/$1 install-kde_moduleLTLIBRARIES/g;
+	  substituteLine($lookup2, "install-exec-am: " . $newdeps);
+        } else {
+          $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES";
+        }
+      }
       my $lookup = 'install-data-am:\s*(.*)';
       if ($MakefileData =~ /\n$lookup\n/) {
         my $newdeps = $1;
