$NetBSD: patch-cl,v 1.2 2002/06/25 19:38:30 skrll Exp $

--- admin/am_edit.orig	Wed May  8 19:28:50 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;
