File: support_mariadb.patch

package info (click to toggle)
apr-util 1.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,912 kB
  • sloc: ansic: 39,055; sh: 10,713; makefile: 288; perl: 154; xml: 36
file content (44 lines) | stat: -rw-r--r-- 2,085 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- apr-util.orig/build/dbd.m4
+++ apr-util/build/dbd.m4
@@ -176,10 +176,15 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [
         APR_ADDTO(LIBS, [$mysql_LIBS])
       fi
 
+      AC_LINK_IFELSE([#include <my_global.h>
+                      int main(int a, char **b) { mysql_init(); return 0; }],
+                     [apu_have_mysql=1], [apu_have_mysql=0])
+      if test "$apu_have_mysql" = "0"; then
       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>])
+      fi
       if test "$apu_have_mysql" = "0"; then
         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]),
@@ -207,11 +212,16 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [
       APR_ADDTO(LIBS, [$mysql_LIBS])
 
       AC_MSG_NOTICE(checking for mysql in $withval)
+      AC_LINK_IFELSE([#include <my_global.h>
+                      int main(int a, char **b) { mysql_init(); return 0; }],
+                     [apu_have_mysql=1], [apu_have_mysql=0])
+      if test "$apu_have_mysql" != "1"; then
       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>])
 
+      fi
       if test "$apu_have_mysql" != "1"; then
         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]),
@@ -229,7 +239,7 @@ AC_DEFUN([APU_CHECK_DBD_MYSQL], [
   dnl Since we have already done the AC_CHECK_LIB tests, if we have it, 
   dnl we know the library is there.
   if test "$apu_have_mysql" = "1"; then
-    APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS])
+    APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS $mysql_LIBS])
   fi
   AC_SUBST(LDADD_dbd_mysql)