build: meson: fix pppd path
Allow specifying a non-existent path.
(cherry picked from commit 794e499ab8
)
This commit is contained in:
13
meson.build
13
meson.build
@@ -505,11 +505,14 @@ enable_ppp = get_option('ppp')
|
|||||||
if enable_ppp
|
if enable_ppp
|
||||||
assert(cc.has_header('pppd/pppd.h'), 'couldn\'t find pppd.h. pppd development headers are required')
|
assert(cc.has_header('pppd/pppd.h'), 'couldn\'t find pppd.h. pppd development headers are required')
|
||||||
|
|
||||||
locations = get_option('pppd')
|
pppd_path = get_option('pppd')
|
||||||
pppd = find_program(locations, required: false)
|
if pppd_path == ''
|
||||||
assert(pppd.found(), 'pppd required but not found, please provide a valid pppd path or use -Dppp=false to disable it')
|
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')
|
pppd_plugin_dir = get_option('pppd_plugin_dir')
|
||||||
if 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 += ' iwd: ' + enable_iwd.to_string() + '\n'
|
||||||
output += ' pppd: ' + enable_ppp.to_string()
|
output += ' pppd: ' + enable_ppp.to_string()
|
||||||
if enable_ppp
|
if enable_ppp
|
||||||
output += ' ' + pppd.path()
|
output += ' ' + pppd_path
|
||||||
endif
|
endif
|
||||||
output += '\n'
|
output += '\n'
|
||||||
output += ' modemmanager-1: ' + enable_modem_manager.to_string() + '\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('wifi', type: 'boolean', value: true, description: 'enable Wi-Fi support')
|
||||||
option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)')
|
option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)')
|
||||||
option('ppp', type: 'boolean', value: true, description: 'enable PPP/PPPoE support')
|
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('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('modem_manager', type: 'boolean', value: true, description: 'Enable new ModemManager1 interface support')
|
||||||
option('ofono', type: 'boolean', value: false, description: 'Enable oFono support (experimental)')
|
option('ofono', type: 'boolean', value: false, description: 'Enable oFono support (experimental)')
|
||||||
|
Reference in New Issue
Block a user