Branch: Tag:

2001-11-15

2001-11-15 13:21:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added configure check for mysql_real_connect().

Rev: src/modules/Mysql/acconfig.h:1.5
Rev: src/modules/Mysql/configure.in:1.28

1:   # - # $Id: configure.in,v 1.27 2001/02/27 18:52:25 grubba Exp $ + # $Id: configure.in,v 1.28 2001/11/15 13:21:22 grubba Exp $   #   # Configure script for the mysql-module   #
169:      define([AC_CHECK_SQLLIB],   [ + AC_MSG_CHECKING(for mysql_real_connect in $1) + AC_CACHE_VAL(ac_cv_pike_lib_$1_mysql_real_connect, + [ +  ac_save_LIBS="$LIBS" + LIBS="-l$1 $LIBS" +  AC_TRY_LINK( + [ + #ifdef HAVE_WINSOCK_H + #include <winsock.h> + #endif +  + #ifdef HAVE_MYSQL_H + #include <mysql.h> + #else + #ifdef HAVE_MYSQL_MYSQL_H + #include <mysql/mysql.h> + #endif + #endif + ],[ +  mysql_real_connect(0,0,0,0,0,0,0,0); + ],ac_cv_pike_lib_$1_mysql_real_connect=yes, +  ac_cv_pike_lib_$1_mysql_real_connect=no) + LIBS="$ac_save_LIBS" + ]) +  + if test "x$ac_cv_pike_lib_$1_mysql_real_connect" = xyes ; then +  PIKE_FEATURE(Mysql,[yes (lib$1)]) +  AC_MSG_RESULT(yes) +  AC_DEFINE(HAVE_MYSQL_REAL_CONNECT) +  $2 + else +  AC_MSG_RESULT(no) +    AC_MSG_CHECKING(for mysql_connect in $1)   AC_CACHE_VAL(ac_cv_pike_lib_$1_mysql_connect,   [
189:   #endif   ],[    mysql_connect(0,0,0,0); - ],ac_cv_pike_lib_$1_mysql_connect=yes,ac_cv_pike_lib_$1_mysql_connect=no) + ],ac_cv_pike_lib_$1_mysql_connect=yes, +  ac_cv_pike_lib_$1_mysql_connect=no)   LIBS="$ac_save_LIBS"   ])   
201:    AC_MSG_RESULT(no)    $3   fi + fi   ])       AC_CHECK_SQLLIB(mysqlclient, [