diff options
Diffstat (limited to 'make/utilities.pm')
-rw-r--r-- | make/utilities.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/make/utilities.pm b/make/utilities.pm index a227be3a4..3c0f76188 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -6,12 +6,21 @@ use Exporter 'import'; # such as pcre_config, take out the -L # directive and return an rpath for it. +# \033[1;32msrc/Makefile\033[0m + +my %already_added = (); + sub make_rpath($) { my ($executable) = @_; chomp($data = `$executable`); $data =~ /-L(\S+)\s/; $libpath = $1; + if (!exists $already_added{$libpath}) + { + print "Adding extra library path \033[1;32m$libpath\033[0m ...\n"; + $already_added{$libpath} = 1; + } return "-Wl,--rpath -Wl,$libpath -L$libpath"; } @@ -32,6 +41,8 @@ sub pkgconfig_get_include_dirs($$$) my ($packagename, $headername, $defaults) = @_; extend_pkg_path(); + print "Locating include directory for package \033[1;32m$packagename\033[0m ... "; + $ret = `pkg-config --cflags $packagename 2>/dev/null`; if ((!defined $ret) || ($ret eq "")) { @@ -52,6 +63,8 @@ sub pkgconfig_get_include_dirs($$$) $ret = "$foo " . $defaults; } chomp($ret); + + print "\033[1;32m$ret\033[0m\n"; return $ret; } @@ -60,6 +73,8 @@ sub pkgconfig_get_lib_dirs($$$) my ($packagename, $libname, $defaults) = @_; extend_pkg_path(); + print "Locating library directory for package \033[1;32m$packagename\033[0m ... "; + $ret = `pkg-config --libs $packagename 2>/dev/null`; if ((!defined $ret) || ($ret eq "")) { @@ -81,6 +96,7 @@ sub pkgconfig_get_lib_dirs($$$) $ret = "$foo " . $defaults; } chomp($ret); + print "\033[1;32m$ret\033[0m\n"; return $ret; } |