summarylogtreecommitdiffstats
path: root/barnyard2-1.13-libdir.patch
blob: 5d3c7e37aa38f2fd881ebc5a0489d90cf7641156 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
--- a/configure.in
+++ b/configure.in
@@ -570,53 +570,7 @@
       fi
   done
 
-  for i in $mysql_lib_directory; do
-      if test -z "$MYSQL_LIB_DIR"; then
-        str="$i/libmysqlclient.*"
-        for j in `echo $str`; do
-          if test -r $j; then
-            MYSQL_LIB_DIR=$i
-            break 2
-          fi
-        done
-      fi
-      if test -z "$MYSQL_LIB_DIR"; then
-        str="$i/lib/libmysqlclient.*"
-        for j in `echo $str`; do
-          if test -r "$j"; then
-            MYSQL_LIB_DIR="$i/lib"
-            break 2
-          fi
-        done
-      fi
-      if test -z "$MYSQL_LIB_DIR"; then
-        str="$i/mysql/libmysqlclient.*"
-        for j in `echo $str`; do
-          if test -r "$j"; then
-            MYSQL_LIB_DIR="$i/mysql"
-            break 2
-          fi
-        done 
-      fi
-      if test -z "$MYSQL_LIB_DIR"; then
-        str="$i/mysql/lib/libmysqlclient.*"
-        for j in `echo $str`; do
-          if test -r "$j"; then
-            MYSQL_LIB_DIR="$i/mysql/lib"
-            break 2
-          fi
-        done
-      fi
-      if test -z "$MYSQL_LIB_DIR"; then
-        str="$i/lib/mysql/libmysqlclient.*"
-        for j in `echo $str`; do
-          if test -r "$j"; then
-            MYSQL_LIB_DIR="$i/lib/mysql"
-            break 2
-          fi
-        done
-      fi
-  done
+  AC_CHECK_LIB([mysqlclient],[mysql_query],[MYSQL_LIB_DIR="$libdir"])
 
   if test -z "$MYSQL_INC_DIR"; then
     if test "x$mysql_fail" != "xno"; then
@@ -760,13 +714,7 @@
     fi
   else
 
-    str="$ODBC_DIR/lib/libodbc.*"
-    for j in `echo $str`; do
-      if test -r "$j"; then 
-        ODBC_LIB_DIR="$ODBC_DIR/lib"
-        ODBC_LIB="odbc"
-      fi
-    done
+    AC_CHECK_LIB([odbc],[SQLAllocHandle],[ODBC_LIB_DIR="$libdir";ODBC_LIB="odbc"])
 
 dnl    if test -z "$ODBC_LIB_DIR"; then
 dnl      str="$ODBC_DIR/lib/libiodbc.*"
@@ -786,7 +734,6 @@
       fi
     else
       AC_MSG_RESULT(yes)
-      LDFLAGS="${LDFLAGS} -L${ODBC_LIB_DIR}"
       CPPFLAGS="${CPPFLAGS} -I${ODBC_INC_DIR} -DENABLE_ODBC"
       LIBS="${LIBS} -l$ODBC_LIB"
     fi
@@ -863,21 +810,7 @@
   fi
 
 
-  if test -z "$POSTGRESQL_DIR"; then
-    for dir in $postgresql_directory; do
-       for i in "lib" "lib/pgsql"; do
-         str="$dir/$i/libpq.*"
-         for j in `echo $str`; do
-           if test -r $j; then
-  	     POSTGRESQL_LIB_DIR="$dir/$i"
-             break 2
-           fi
-         done
-       done
-   done
-  else
-   POSTGRESQL_LIB_DIR="$POSTGRESQL_DIR/lib"
-  fi
+  AC_CHECK_LIB([pq],[PQexec],[POSTGRESQL_LIB_DIR="$libdir"])
 
   if test -z "$POSTGRESQL_LIB_DIR"; then
      if test "$postgresql_fail" != "no"; then
@@ -892,7 +825,7 @@
      CPPFLAGS="${CPPFLAGS} -I${POSTGRESQL_INC_DIR} -DENABLE_POSTGRESQL"
      AC_CHECK_LIB(pq, PQexec,, PQLIB="no")
      if test "x$PQLIB" != "xno"; then
-        LIBS="${LIBS} -lpq"
+        :
      else
         echo
         echo "   ERROR!  libpq (postgresql) not found!"