Skip to content

Commit 65971c1

Browse files
committed
Follow-up to r1926044.
* SConstruct: GetSConsVersion() was added in SCons 4.8, add a fallback. git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1926045 13f79535-47bb-0310-9956-ffa450edef68
1 parent 155bd36 commit 65971c1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

SConstruct

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ import re
2828
EnsureSConsVersion(2,3,0)
2929

3030
# SCons 4.7 introduced the arugment list parameter to CheckFunc.
31-
if GetSConsVersion() >= (4, 7):
32-
def CheckFunc(conf, name, code, lang='C', args=''):
33-
return conf.CheckFunc(name, code, lang, args)
34-
else:
31+
# Of course, GetSConsVersion() was added in 4.8, it's more fun that way.
32+
try:
33+
if GetSConsVersion() >= (4, 7):
34+
def CheckFunc(conf, name, code, lang='C', args=''):
35+
return conf.CheckFunc(name, code, lang, args)
36+
have_check_func = True
37+
except NameError:
38+
have_check_func = False
39+
if not have_check_func:
3540
def CheckFunc(conf, name, code, lang='C', _=''):
3641
return conf.CheckFunc(name, code, lang)
3742

0 commit comments

Comments
 (0)