From bccf1cd6b43030950bd4b297396c6d29feee4b49 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Sun, 16 Oct 2022 18:02:27 +0900 Subject: [PATCH] [build] use AC_CHECK_PROG() macro for libpng-config detection * builds/unix/configure.raw: use AC_CHECK_PROG() instead of `which` to find `libpng-config`. --- builds/unix/configure.raw | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw index fb943fd2a..43a76568c 100644 --- a/builds/unix/configure.raw +++ b/builds/unix/configure.raw @@ -406,16 +406,12 @@ if test x"$with_png" = xyes -o x"$with_png" = xauto; then have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)" else # fall back to config script - AC_MSG_CHECKING([for libpng-config]) - if which libpng-config > /dev/null 2>&1; then + AC_CHECK_PROG(have_libpng, [libpng-config], [yes (libpng-config)], [no]) + if test "$have_libpng" != no; then LIBPNG_CFLAGS=`libpng-config --cflags` LIBPNG_LIBS=`libpng-config --ldflags` libpng_libspriv=`libpng-config --static --ldflags` libpng_libsstaticconf="$libpng_libspriv" - have_libpng="yes (libpng-config)" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) fi fi fi