b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/wscript_configure_embedded_heimdal |
| 2 | +++ b/wscript_configure_embedded_heimdal |
| 3 | @@ -2,3 +2,14 @@ if not conf.env['FLEX']: |
| 4 | conf.fatal("Embedded Heimdal build requires flex but it was not found. Install flex or use --with-system-mitkrb5 or --with-system-heimdalkrb5") |
| 5 | |
| 6 | conf.RECURSE('source4/heimdal_build') |
| 7 | + |
| 8 | +def check_system_heimdal_binary(name): |
| 9 | + if conf.LIB_MAY_BE_BUNDLED(name): |
| 10 | + return False |
| 11 | + if not conf.find_program(name, var=name.upper()): |
| 12 | + return False |
| 13 | + conf.define('USING_SYSTEM_%s' % name.upper(), 1) |
| 14 | + return True |
| 15 | + |
| 16 | +check_system_heimdal_binary("compile_et") |
| 17 | +check_system_heimdal_binary("asn1_compile") |
| 18 | --- a/wscript_configure_system_heimdal |
| 19 | +++ b/wscript_configure_system_heimdal |
| 20 | @@ -37,14 +37,6 @@ def check_system_heimdal_lib(name, funct |
| 21 | conf.define('USING_SYSTEM_%s' % name.upper(), 1) |
| 22 | return True |
| 23 | |
| 24 | -def check_system_heimdal_binary(name): |
| 25 | - if conf.LIB_MAY_BE_BUNDLED(name): |
| 26 | - return False |
| 27 | - if not conf.find_program(name, var=name.upper()): |
| 28 | - return False |
| 29 | - conf.define('USING_SYSTEM_%s' % name.upper(), 1) |
| 30 | - return True |
| 31 | - |
| 32 | check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h") |
| 33 | |
| 34 | if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"): |
| 35 | @@ -96,7 +88,4 @@ finally: |
| 36 | #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'): |
| 37 | # conf.define('USING_SYSTEM_TOMMATH', 1) |
| 38 | |
| 39 | -check_system_heimdal_binary("compile_et") |
| 40 | -check_system_heimdal_binary("asn1_compile") |
| 41 | - |
| 42 | conf.define('USING_SYSTEM_KRB5', 1) |