From 8584912684a5509f6fe82b1ec9e170921023ffd2 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Oct 2007 15:13:24 +0000 Subject: integrated patch by varmojfekoj to tweak build system even further --- configure.ac | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index da0aac81..3de829d2 100644 --- a/configure.ac +++ b/configure.ac @@ -254,17 +254,23 @@ if test "x$enable_mysql" = "xyes"; then [mysql/mysql.h],, [AC_MSG_FAILURE([MySQL is missing])] ) - AC_SUBST(LIBS_TMP,[$LIBS]) - AC_SEARCH_LIBS( - [mysql_init], + AC_CHECK_PROG( + [HAVE_MYSQL_CONFIG], + [mysql_config], + [yes],,, + ) + if test "x${HAVE_MYSQL_CONFIG}" != "xyes"; then + AC_MSG_FAILURE([mysql_config not found in PATH]) + fi + AC_CHECK_LIB( [mysqlclient], + [mysql_init], [mysql_cflags=`mysql_config --cflags` mysql_libs=`mysql_config --libs` ], [AC_MSG_FAILURE([MySQL library is missing])], [`mysql_config --libs`] ) - AC_SUBST(LIBS,[$LIBS_TMP]) fi AM_CONDITIONAL(ENABLE_MYSQL, test x$enable_mysql = xyes) AC_SUBST(mysql_cflags) -- cgit