diff --git a/meson.build b/meson.build index 7806c5308..40e1b1066 100644 --- a/meson.build +++ b/meson.build @@ -505,11 +505,14 @@ enable_ppp = get_option('ppp') if enable_ppp assert(cc.has_header('pppd/pppd.h'), 'couldn\'t find pppd.h. pppd development headers are required') - locations = get_option('pppd') - pppd = find_program(locations, required: false) - assert(pppd.found(), 'pppd required but not found, please provide a valid pppd path or use -Dppp=false to disable it') + pppd_path = get_option('pppd') + if pppd_path == '' + pppd = find_program('pppd', '/sbin/pppd', '/usr/sbin/pppd', required: false) + assert(pppd.found(), 'pppd required but not found, please provide a valid pppd path or use -Dppp=false to disable it') + pppd_path = pppd.path() + endif - config_h.set_quoted('PPPD_PATH', pppd.path()) + config_h.set_quoted('PPPD_PATH', pppd_path) pppd_plugin_dir = get_option('pppd_plugin_dir') if pppd_plugin_dir == '' @@ -984,7 +987,7 @@ output += ' wifi: ' + enable_wifi.to_string() + '\n' output += ' iwd: ' + enable_iwd.to_string() + '\n' output += ' pppd: ' + enable_ppp.to_string() if enable_ppp - output += ' ' + pppd.path() + output += ' ' + pppd_path endif output += '\n' output += ' modemmanager-1: ' + enable_modem_manager.to_string() + '\n' diff --git a/meson_options.txt b/meson_options.txt index 6bd1eec3c..82971e552 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -30,7 +30,7 @@ option('wext', type: 'boolean', value: true, description: 'Enable or disable Lin option('wifi', type: 'boolean', value: true, description: 'enable Wi-Fi support') option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)') option('ppp', type: 'boolean', value: true, description: 'enable PPP/PPPoE support') -option('pppd', type: 'array', value: ['pppd', '/sbin/pppd', '/usr/sbin/pppd'], description: 'path to pppd binary') +option('pppd', type: 'string', value: '', description: 'path to pppd binary') option('pppd_plugin_dir', type: 'string', value: '', description: 'path to the pppd plugins directory') option('modem_manager', type: 'boolean', value: true, description: 'Enable new ModemManager1 interface support') option('ofono', type: 'boolean', value: false, description: 'Enable oFono support (experimental)')