]> granicus.if.org Git - pdns/commitdiff
Check the whole $PATH for mysql_config
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 26 Dec 2014 12:43:16 +0000 (13:43 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 26 Dec 2014 12:43:59 +0000 (13:43 +0100)
Fixes building in Buildroot

m4/pdns_with_mysql.m4

index b8c087a417217c4622f54c3146f74f3223e15bc8..10b22890ab9c5ad4f2164e1822f1d7be6dcb3a24 100644 (file)
@@ -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])