2003-08-15 00:50:58 +00:00
|
|
|
|
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
AC_DEFUN([AC_CHECK_MYSQL],[
|
|
|
|
AC_ARG_VAR([MYSQL_CONFIG], [mysql_config program])
|
2004-06-29 08:51:54 +00:00
|
|
|
|
2003-08-15 00:50:58 +00:00
|
|
|
if test -z "$MYSQL_CONFIG"; then
|
2004-06-29 08:51:54 +00:00
|
|
|
AC_PATH_PROG(MYSQL_CONFIG,mysql_config,,[$PATH:/usr/local/mysql/bin])
|
2003-08-15 00:50:58 +00:00
|
|
|
fi
|
2004-06-29 08:51:54 +00:00
|
|
|
|
|
|
|
if test -z "$MYSQL_CONFIG"; then
|
|
|
|
AC_MSG_ERROR([mysql_config executable not found. To build only the client, specify --disable-server])
|
2003-08-15 00:50:58 +00:00
|
|
|
else
|
|
|
|
AC_MSG_CHECKING(mysql libraries)
|
|
|
|
MYSQL_LIBS=`${MYSQL_CONFIG} --libs`
|
|
|
|
AC_MSG_RESULT($MYSQL_LIBS)
|
|
|
|
AC_MSG_CHECKING(mysql includes)
|
|
|
|
MYSQL_CFLAGS=`${MYSQL_CONFIG} --cflags`
|
|
|
|
AC_MSG_RESULT($MYSQL_CFLAGS)
|
|
|
|
fi
|
|
|
|
AC_SUBST(MYSQL_LIBS)
|
|
|
|
AC_SUBST(MYSQL_CFLAGS)
|
2004-06-29 08:51:54 +00:00
|
|
|
|
2003-08-15 00:50:58 +00:00
|
|
|
])
|