apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r747623 - in /apr/apr-util/trunk: build/dbd.m4 dbd/apr_dbd_mysql.c
Date Wed, 25 Feb 2009 00:24:36 GMT
Author: bojan
Date: Wed Feb 25 00:24:36 2009
New Revision: 747623

URL: http://svn.apache.org/viewvc?rev=747623&view=rev
Log:
Use of my_init() requires my_global.h and my_sys.h.

Modified:
    apr/apr-util/trunk/build/dbd.m4
    apr/apr-util/trunk/dbd/apr_dbd_mysql.c

Modified: apr/apr-util/trunk/build/dbd.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/build/dbd.m4?rev=747623&r1=747622&r2=747623&view=diff
==============================================================================
--- apr/apr-util/trunk/build/dbd.m4 (original)
+++ apr/apr-util/trunk/build/dbd.m4 Wed Feb 25 00:24:36 2009
@@ -176,9 +176,15 @@
         APR_ADDTO(LIBS, [$mysql_LIBS])
       fi
 
-      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+      AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+                       AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
+                       [apu_have_mysql=0; break],
+                       [#include <my_global.h>])
       if test "$apu_have_mysql" = "0"; then
-        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+        AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+                         AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
+                         [apu_have_mysql=0; break],
+                         [#include <mysql/my_global.h>])
       fi
       if test "$apu_have_mysql" != "0" && test "x$MYSQL_CONFIG" != 'x'; then
         APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS])
@@ -201,10 +207,16 @@
       APR_ADDTO(LIBS, [$mysql_LIBS])
 
       AC_MSG_NOTICE(checking for mysql in $withval)
-      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+      AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+                       AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
+                       [apu_have_mysql=0; break],
+                       [#include <my_global.h>])
 
       if test "$apu_have_mysql" != "1"; then
-        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+        AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+                         AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
+                         [apu_have_mysql=0; break],
+                         [#include <mysql/my_global.h>])
       fi
       if test "$apu_have_mysql" != "0"; then
         APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$mysql_CPPFLAGS])

Modified: apr/apr-util/trunk/dbd/apr_dbd_mysql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_mysql.c?rev=747623&r1=747622&r2=747623&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_mysql.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_mysql.c Wed Feb 25 00:24:36 2009
@@ -25,6 +25,16 @@
 #include <ctype.h>
 #include <stdlib.h>
 
+#ifdef HAVE_MY_GLOBAL_H
+#include <my_global.h>
+#elif defined(HAVE_MYSQL_MY_GLOBAL_H)
+#include <mysql/my_global.h>
+#endif
+#ifdef HAVE_MY_SYS_H
+#include <my_sys.h>
+#elif defined(HAVE_MYSQL_MY_SYS_H)
+#include <mysql/my_sys.h>
+#endif
 #ifdef HAVE_MYSQL_H
 #include <mysql.h>
 #include <errmsg.h>



Mime
View raw message