1# $OpenBSD: Util.pm,v 1.7 2023/07/08 08:15:32 espie Exp $ 2 3# Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> 4# Copyright (c) 2012 Marc Espie <espie@openbsd.org> 5# 6# Permission to use, copy, modify, and distribute this software for any 7# purpose with or without fee is hereby granted, provided that the above 8# copyright notice and this permission notice appear in all copies. 9# 10# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 18use v5.36; 19package LT::Util; 20require Exporter; 21our @ISA = qw(Exporter); 22our @EXPORT = qw(abs_dir $ltdir $version shortdie); 23use File::Basename; 24use Cwd; 25 26our $ltdir = '.libs'; 27our $version = '1.5.26'; # pretend to be this version of libtool 28 29sub abs_dir($a) 30{ 31 return dirname(Cwd::abs_path($a)); 32} 33 34sub shortdie(@p) 35{ 36 $SIG{__DIE__} = 'DEFAULT'; 37 die @p; 38} 39 401; 41