1redirect = dependency('systemd', required: get_option('http-redirect')) 2 3 4if redirect.found() 5 install_data( 6 'http-redirect.awk', 7 install_mode: 'rwxr-xr-x', 8 install_dir: get_option('bindir'), 9 ) 10 11 unit_files = [ 12 'http-redirect.socket', 13 'http-redirect@.service' 14 ] 15 16 foreach unit : unit_files 17 configure_file( 18 input: unit, 19 output: unit, 20 copy: true, 21 install_dir: 22 redirect.get_variable('systemdsystemunitdir'), 23 ) 24 endforeach 25endif 26