summaryrefslogtreecommitdiff
path: root/make/utilities.pm
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-20 21:41:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-20 21:41:29 +0000
commit5784c4396975b75809613b9cddb93dafc22a5517 (patch)
treee82d855a01f3f3e62349315141450debd2f0e126 /make/utilities.pm
parentbcdacaac9b1c345acb0b93039c34d3ab29a278a4 (diff)
Fixes to make ./configure prompt for libs if all else fails (discussed earlier with w00t).
The values prompted for are cached, so if you specify them then ./configure -update wont prompt again for them git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6408 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make/utilities.pm')
-rw-r--r--make/utilities.pm25
1 files changed, 23 insertions, 2 deletions
diff --git a/make/utilities.pm b/make/utilities.pm
index 34d7b8c86..1285a7193 100644
--- a/make/utilities.pm
+++ b/make/utilities.pm
@@ -1,5 +1,6 @@
package make::utilities;
use Exporter 'import';
+use make::configure;
use POSIX;
@EXPORT = qw(make_rpath pkgconfig_get_include_dirs pkgconfig_get_lib_dirs translate_functions);
@@ -71,7 +72,17 @@ sub pkgconfig_get_include_dirs($$$;$)
chomp($ret);
if (($ret eq " ") || (!defined $ret))
{
- print "\033[1;32mUsing defaults\033[0m\n";
+ my $key = "default_includedir_$packagename";
+ if (exists $config{$key})
+ {
+ $ret = $config{$key};
+ }
+ else
+ {
+ $headername =~ s/^\///;
+ promptstring("path to the directory containing $headername", $key, "/usr/include");
+ $ret = $config{$key};
+ }
}
else
{
@@ -110,7 +121,17 @@ sub pkgconfig_get_lib_dirs($$$;$)
chomp($ret);
if (($ret eq " ") || (!defined $ret))
{
- print "\033[1;32mUsing defaults\033[0m\n";
+ my $key = "default_libdir_$packagename";
+ if (exists $config{$key})
+ {
+ $ret = $config{$key};
+ }
+ else
+ {
+ $libname =~ s/^\///;
+ promptstring("path to the directory containing $libname", $key, "/usr/lib");
+ $ret = $config{$key};
+ }
}
else
{