summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2012-07-09 18:40:54 +0000
committerMarc Espie <espie@cvs.openbsd.org>2012-07-09 18:40:54 +0000
commit2bd6db1b203faf14a30c65d29ab133b54c2b2086 (patch)
treed419834c8a7c3808c7118c11956cabd4dfc19cf2 /usr.bin
parent426f76d6f2eb5c8a6ac675448a1a0168c4948748 (diff)
more compat shit for libtool1/libtool2 schizophrenia
should fix print/pdflib found out by jasper@
Diffstat (limited to 'usr.bin')
-rwxr-xr-xusr.bin/libtool/libtool15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/libtool/libtool b/usr.bin/libtool/libtool
index 2e5337b869e..d0535f74ff3 100755
--- a/usr.bin/libtool/libtool
+++ b/usr.bin/libtool/libtool
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $OpenBSD: libtool,v 1.30 2012/07/09 17:52:21 espie Exp $
+# $OpenBSD: libtool,v 1.31 2012/07/09 18:40:53 espie Exp $
# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org>
# Copyright (c) 2012 Marc Espie <espie@openbsd.org>
@@ -290,6 +290,14 @@ my $mode;
my $verbose = 1;
my $help = 0;
+
+# XXX compat game to satisfy both libtool 1 and libtool 2
+unless ($ARGV[0] eq 'install' && $ARGV[1] =~ m/^-[bcCdpSsBfgmo]/) {
+ if ($mode = LT::Options->is_abreviated_mode($ARGV[0])) {
+ shift @ARGV;
+ }
+}
+
# just to be clear:
# when building a library:
# * -R libdir records libdir in dependency_libs
@@ -298,10 +306,6 @@ my $help = 0;
# * both -R libdir and -rpath libdir add libdir to the run-time path
# -Wl,-rpath,libdir will bypass libtool.
-if ($mode = LT::Options->is_abreviated_mode($ARGV[0])) {
- shift @ARGV;
-}
-
my $gp = LT::Options->new;
$gp->handle_options(
'-config' => \&config,
@@ -371,6 +375,7 @@ tsay {"ltprog = \"@$ltprog\""};
if (@$ltprog == 0 && defined $mode && $mode->{origin} eq 'install') {
$ltprog = [ 'install' ];
}
+
if (@$ltprog == 0) { die "No libtool command given.\n" .
"Use `libtool --help' for more information.\n" };
# make ltprog a list of elements without whitespace (prevent exec errors)