diff --git a/dist-script.sh b/dist-script.sh index 0bf762d8..48533453 100755 --- a/dist-script.sh +++ b/dist-script.sh @@ -18,9 +18,9 @@ require_cmd() { # Protocol buffers: ipc.proto and ctl.proto # -------------------------------------------------------------------------- -PROTOC=$(command -v protoc-c 2>/dev/null || command -v protoc 2>/dev/null || true) +PROTOC=$(command -v protoc 2>/dev/null || command -v protoc-c 2>/dev/null || true) if [ -z "$PROTOC" ]; then - echo "dist-script: ERROR: protoc-c/protoc not found; install it to create a dist tarball" >&2 + echo "dist-script: ERROR: protoc/protoc-c not found; install it to create a dist tarball" >&2 exit 1 fi "$PROTOC" --c_out="$DISTROOT/src" \ diff --git a/meson.build b/meson.build index 0cf58c5f..cf7d9ccb 100644 --- a/meson.build +++ b/meson.build @@ -38,9 +38,9 @@ endif # Required tools # -------------------------------------------------------------------------- -gperf = find_program('gperf', required: false) -protoc_c = find_program('protoc-c', required: false) -ipcalc = find_program(['ipcalc', 'ipcalc-ng'], required: false) +gperf = find_program('gperf', required: false) +protoc = find_program(['protoc', 'protoc-c'], required: false) +ipcalc = find_program(['ipcalc', 'ipcalc-ng'], required: false) # Firewall script selection _fw_opt = get_option('firewall-script') diff --git a/src/meson.build b/src/meson.build index e1bbbdcf..3f67bddd 100644 --- a/src/meson.build +++ b/src/meson.build @@ -55,25 +55,25 @@ version_inc = configure_file( ) # Protocol buffers -if protoc_c.found() +if protoc.found() ipc_proto = custom_target('ipc-proto', input: 'ipc.proto', output: ['ipc.pb-c.c', 'ipc.pb-c.h'], - command: [protoc_c, '--c_out=@OUTDIR@', + command: [protoc, '--c_out=@OUTDIR@', '--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'], ) ctl_proto = custom_target('ctl-proto', input: 'ctl.proto', output: ['ctl.pb-c.c', 'ctl.pb-c.h'], depends: ipc_proto, - command: [protoc_c, '--c_out=@OUTDIR@', + command: [protoc, '--c_out=@OUTDIR@', '--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'], ) cfg_proto = custom_target('cfg-proto', input: 'cfg.proto', output: ['cfg.pb-c.c', 'cfg.pb-c.h'], depends: ipc_proto, - command: [protoc_c, '--c_out=@OUTDIR@', + command: [protoc, '--c_out=@OUTDIR@', '--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'], ) elif fs.exists('ipc.pb-c.c') and fs.exists('ctl.pb-c.c') and fs.exists('cfg.pb-c.c')