From 3f71d1f39a7984748759354902d3eae66bb78758 Mon Sep 17 00:00:00 2001
From: Kinsey Moore <kinsey.moore@oarcorp.com>
Date: Wed, 31 Jan 2024 13:02:03 -0600
Subject: [PATCH] configure: Correctly handle gdbus_codegen
When gdbus_codegen is retrieved via pkg-config, it is not guaranteed to
have an absolute path. This patch resolves the absolute path before
checking to see whether it's executable. This also omits emission of
GDBUS_CODEGEN to config-host.mak when gdbus_codegen is empty.
---
configure | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 4cef321d9d..261f3fbeb8 100755
a
|
b
|
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then |
3506 | 3506 | gio_cflags=$($pkg_config --cflags gio-2.0) |
3507 | 3507 | gio_libs=$($pkg_config --libs gio-2.0) |
3508 | 3508 | gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0) |
| 3509 | gdbus_codegen=$(which $gdbus_codegen) |
3509 | 3510 | if [ ! -x "$gdbus_codegen" ]; then |
3510 | 3511 | gdbus_codegen= |
3511 | 3512 | fi |
… |
… |
if test "$gio" = "yes" ; then |
6168 | 6169 | echo "CONFIG_GIO=y" >> $config_host_mak |
6169 | 6170 | echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak |
6170 | 6171 | echo "GIO_LIBS=$gio_libs" >> $config_host_mak |
6171 | | echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak |
| 6172 | if test "x$GDBUS_CODEGEN" != "x" ; then |
| 6173 | echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak |
| 6174 | fi |
6172 | 6175 | fi |
6173 | 6176 | echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak |
6174 | 6177 | if test "$gnutls" = "yes" ; then |