summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2010-04-26 09:27:40 -0700
committerDaniel Burrows <dburrows@debian.org>2010-04-26 09:27:40 -0700
commit3ba31ce5395eadc40a13de09bb0387f70b25be46 (patch)
treed725e517ecf7c0b4c6a0365bea09fce619459d4c
parent15c0973a814904c16761fddf8d19032cdaf5910a (diff)
downloadaptitude-3ba31ce5395eadc40a13de09bb0387f70b25be46.tar.gz
Support explicitly setting the variable name in MakeCheckForExecutable.
-rw-r--r--site_scons/aptitude_configure_checks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/site_scons/aptitude_configure_checks.py b/site_scons/aptitude_configure_checks.py
index a5327f51..f0fd2db4 100644
--- a/site_scons/aptitude_configure_checks.py
+++ b/site_scons/aptitude_configure_checks.py
@@ -146,14 +146,15 @@ its absolute path."""
context.Result(location)
return True
-def MakeCheckForExecutable(name):
+def MakeCheckForExecutable(name, var_name = None):
"""Register a configure method named CheckForName that checks for
the given executable and sets NAME to its location."""
# This won't cover every case, but it will cut down on code
# duplication in a lot of them.
method_name = 'CheckFor%s' % name.capitalize()
- var_name = name.upper()
+ if var_name is None:
+ var_name = name.upper()
def check(context):
"""Look for %s in $PATH and set $%s to its location.""" % (name, var_name)