Skip to content

Commit bbb2e71

Browse files
committed
build: Fix message when pkg-config not found
Fix a bug in the autoconf macro that runs pkg-config so that it properly evaluates the action-if-not-found when pkg-config itself is not found. Because of the way the tests were setup, this bug's only impact was a missing answer to an AC_MSG_CHECKING, rather than generating wrong build options. Signed-off-by: Brian Barrett <[email protected]>
1 parent 4265e24 commit bbb2e71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

config/oac_check_package.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,15 @@ dnl 3 -> result assignment string
423423
dnl 4 -> action if found
424424
dnl 5 -> action if not found
425425
AC_DEFUN([_OAC_CHECK_PACKAGE_PKGCONFIG_RUN], [
426+
check_package_pkgconfig_run_happy=no
426427
AS_IF([test -n "${PKG_CONFIG}"],
427428
[OAC_LOG_COMMAND([check_package_pkgconfig_run_results=`${PKG_CONFIG} $2 $1 2>&1`],
428429
[AS_VAR_COPY([$3], [check_package_pkgconfig_run_results])
429-
$4],
430-
[$5])
430+
check_package_pkgconfig_run_happy=yes])
431431
OAC_LOG_MSG([pkg-config output: ${check_package_pkgconfig_run_results}], [1])])
432+
AS_IF([test "${check_package_pkgconfig_run_happy}" = "yes"], [$4], [$5])
432433
AS_UNSET([check_package_pkgconfig_run_results])
434+
AS_UNSET([check_package_pkgconfig_run_happy])
433435
])
434436

435437

0 commit comments

Comments
 (0)