summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-09-07 16:52:59 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-09-13 11:49:25 +0200
commit794e499ab8b8825d9794d7c2e320b10909fc3ba3 (patch)
tree05ab6f9d3e4f289c6807b6b93339b9a5817393bd /meson.build
parent220dea0948a22dfbdddb91ed76a23ae20d2c5810 (diff)
downloadNetworkManager-794e499ab8b8825d9794d7c2e320b10909fc3ba3.tar.gz
build: meson: fix pppd path
Allow specifying a non-existent path.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 8 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 0f9fe088aa..cfc82cad88 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'