|
51 | 51 | valid_mips_fpu = ('fp32', 'fp64', 'fpxx')
|
52 | 52 | valid_mips_float_abi = ('soft', 'hard')
|
53 | 53 | valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
|
| 54 | +with open ('tools/icu/icu_versions.json') as f: |
| 55 | + icu_versions = json.load(f) |
54 | 56 |
|
55 | 57 | # create option groups
|
56 | 58 | shared_optgroup = optparse.OptionGroup(parser, "Shared libraries",
|
|
425 | 427 | intl_optgroup.add_option('--with-icu-source',
|
426 | 428 | action='store',
|
427 | 429 | dest='with_icu_source',
|
428 |
| - help='Intl mode: optional local path to icu/ dir, or path/URL of icu source archive.') |
| 430 | + help='Intl mode: optional local path to icu/ dir, or path/URL of ' |
| 431 | + 'the icu4c source archive. ' |
| 432 | + 'v%d.x or later recommended.' % icu_versions["minimum_icu"]) |
429 | 433 |
|
430 | 434 | parser.add_option('--with-ltcg',
|
431 | 435 | action='store_true',
|
@@ -1452,6 +1456,9 @@ def write_config(data, name):
|
1452 | 1456 | icu_ver_major = m.group(1)
|
1453 | 1457 | if not icu_ver_major:
|
1454 | 1458 | error('Could not read U_ICU_VERSION_SHORT version from %s' % uvernum_h)
|
| 1459 | + elif int(icu_ver_major) < icu_versions["minimum_icu"]: |
| 1460 | + error('icu4c v%d.x is too old, v%d.x or later is required.' % (int(icu_ver_major), |
| 1461 | + icu_versions["minimum_icu"])) |
1455 | 1462 | icu_endianness = sys.byteorder[0];
|
1456 | 1463 | o['variables']['icu_ver_major'] = icu_ver_major
|
1457 | 1464 | o['variables']['icu_endianness'] = icu_endianness
|
|
0 commit comments