Commit bda3bb93 authored by Beniamino Galvani's avatar Beniamino Galvani

build: meson: fix pppd path

Allow specifying a non-existent path.

(cherry picked from commit 794e499a)
parent e860a2e0
......@@ -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'
......
......@@ -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)')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment