]> granicus.if.org Git - apache/commitdiff
Add -p option to apxs to allow unbundled modules (such as mod_mbox) to
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 01:06:17 +0000 (01:06 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 19 Sep 2002 01:06:17 +0000 (01:06 +0000)
compile and link helper programs that use apr/apr-util.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96900 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
support/apxs.in

diff --git a/CHANGES b/CHANGES
index a934a306484dd18f4fb4ea1a6e643f3ed27b62ec..141c800fe64a25afc707af379b1d5520b49a7bb2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.42
 
+  *) Add -p option to apxs to allow programs to be compiled with apxs.
+     [Justin Erenkrantz]
+
 Changes with Apache 2.0.41
 
   *) The protocol version (eg: HTTP/1.1) in the request line parsing
index 19e8aa0b3fb4f5bd00fe510de5ecc2613bca43fe..9782c89f4508aeeac4f9bc34f8ace5e8fc3455af 100644 (file)
@@ -112,6 +112,7 @@ my $opt_a = 0;
 my $opt_A = 0;
 my $opt_q = 0;
 my $opt_h = 0;
+my $opt_p = 0;
 
 #   this subroutine is derived from Perl's getopts.pl with the enhancement of
 #   the "+" metacharacter at the format string to allow a list to be built by
@@ -182,7 +183,7 @@ sub usage {
     print STDERR "       apxs -q [-S <var>=<val>] <query> ...\n";
     print STDERR "       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]\n";
     print STDERR "               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]\n";
-    print STDERR "               [-Wl,<flags>] <files> ...\n";
+    print STDERR "               [-Wl,<flags>] [-p] <files> ...\n";
     print STDERR "       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
     print STDERR "       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
     exit(1);
@@ -190,7 +191,7 @@ sub usage {
 
 #   option handling
 my $rc;
-($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaA", @ARGV);
+($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaAp", @ARGV);
 &usage if ($rc == 0);
 &usage if ($#ARGV == -1 and not $opt_g);
 &usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c and not $opt_e);
@@ -448,7 +449,14 @@ if ($opt_c) {
         $opt .= " -l$opt_l";
     }
 
-    push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file -rpath $CFG_LIBEXECDIR -module -avoid-version $opt $lo");
+    if ($opt_p == 1) {
+      $opt .= " ".get_vars("EXTRA_LDFLAGS")." ".get_vars("AP_LIBS");
+    }
+    else {
+      $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version";
+    }
+
+    push(@cmds, "$installbuilddir/libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");
 
     #   execute the commands
     &execute_cmds(@cmds);