1python3 = find_program('python3', required : false) 2if python3.found() 3 python3_config = find_program('python3-config', required : false) 4 if python3_config.found() 5 subdir('python') 6 else 7 message('python3-config not found, skipping Python wrappers.') 8 endif 9 10 java_home = run_command(python3, '-c', 'import os; print(os.environ["JAVA_HOME"])').stdout().strip() 11 if java_home != '' 12 subdir('java') 13 else 14 message('JAVA_HOME environment variable not set, skipping Java wrappers.') 15 endif 16else 17 message('python3 not found, skipping Python and Java wrappers.') 18endif 19