From b180eb0d3b5bd8b24613ebf5e27274c231a68eb8 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 26 Dec 2014 13:43:16 +0100 Subject: [PATCH] Check the whole $PATH for mysql_config Fixes building in Buildroot --- m4/pdns_with_mysql.m4 | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/m4/pdns_with_mysql.m4 b/m4/pdns_with_mysql.m4 index b8c087a417..10b22890ab 100644 --- a/m4/pdns_with_mysql.m4 +++ b/m4/pdns_with_mysql.m4 @@ -38,25 +38,13 @@ AC_DEFUN([PDNS_WITH_MYSQL],[ MYSQL_config="" if test "x$MYSQL_config_check" != "xskip"; then - AC_MSG_CHECKING([for mysql_config]) if test "x$MYSQL_config_check" == "x"; then - # check if it's in path - for m in /bin /usr/bin /usr/local/bin /opt/csw/bin; do - if test -x $m/mysql_config; then - MYSQL_config=$m/mysql_config - break - fi - done - - if test "x$MYSQL_config" == "x"; then - AC_MSG_RESULT([not found]) - else - AC_MSG_RESULT([$MYSQL_config]) - fi + AC_PATH_PROG([MYSQL_config], [mysql_config]) else + AC_MSG_CHECKING([for $MYSQL_config_check]) if test -x $MYSQL_config_check; then MYSQL_config="$MYSQL_config_check" - AC_MSG_RESULT([$MYSQL_config]) + AC_MSG_RESULT([yes]) else MYSQL_config="" AC_MSG_ERROR([not found]) -- 2.47.2