#! /bin/sh /usr/share/dpatch/dpatch-run
## 034_apxs2_libtool_fixtastic by Peter Samuelson <peter@p12n.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make libtool happier

--- a/support/apxs.in
+++ b/support/apxs.in
@@ -410,7 +410,7 @@
         $la =~ s|\.c$|.la|;
         my $o = $s;
         $o =~ s|\.c$|.o|;
-        push(@cmds, "$libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $apr_includedir $apu_includedir $opt -c -o $lo $s && touch $slo");
+        push(@cmds, "$libtool $ltflags --mode=compile --tag=disable-static $CFG_CC $cflags -I$CFG_INCLUDEDIR $apr_includedir $apu_includedir $opt -c -o $lo $s && touch $slo");
         unshift(@objs, $lo);
     }
 
@@ -447,7 +447,7 @@
         $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags";
     }
 
-    push(@cmds, "$libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");
+    push(@cmds, "$libtool $ltflags --mode=link --tag=disable-static $CFG_CC -o $dso_file $opt $lo");
 
     #   execute the commands
     &execute_cmds(@cmds);
