From 803bf93dbee1000f4607cc12e8d09f0ec6527bd6 Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Thu, 19 Sep 2002 01:06:17 +0000 Subject: [PATCH] Add -p option to apxs to allow unbundled modules (such as mod_mbox) to 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 | 3 +++ support/apxs.in | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index a934a30648..141c800fe6 100644 --- 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 diff --git a/support/apxs.in b/support/apxs.in index 19e8aa0b3f..9782c89f45 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -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 =] ...\n"; print STDERR " apxs -c [-S =] [-o ] [-D [=]]\n"; print STDERR " [-I ] [-L ] [-l ] [-Wc,]\n"; - print STDERR " [-Wl,] ...\n"; + print STDERR " [-Wl,] [-p] ...\n"; print STDERR " apxs -i [-S =] [-a] [-A] [-n ] ...\n"; print STDERR " apxs -e [-S =] [-a] [-A] [-n ] ...\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); -- 2.50.1