aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch
blob: 1d988182e7858c0d6588a014e8a1fa1c2a4f7e30 (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
113
114
115
116
117
118
Subject: [PATCH] remove some checks for cross-compiling

some lib check is not suitable for
cross-compiling, so remove them.

Upstream-Status: Inappropriate [not a real bug,just for cross-compiling]

Signed-off-by: Song.Li <Song.Li@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 configure.ac | 66 +++++++-----------------------------------------------------
 1 file changed, 7 insertions(+), 59 deletions(-)

diff --git a/configure.ac b/configure.ac
index df5ad7a..b72bd4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,57 +46,19 @@ AC_ARG_WITH(iodbc, [  --with-iodbc[[=DIR]]	  [[default=no]] DIR is the iODBC bas
 if test "$with_iodbc" != no; then
 	with_unixodbc=no
 	AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support])
-	if test "$with_iodbc" = yes; then
-		AC_PATH_PROGS(ODBC_CONFIG, iodbc-config)
-	else
-		ODBC_CONFIG=$with_iodbc
-	fi
-	if test ! -x "${ODBC_CONFIG}/bin/iodbc-config"; then
-		if test ! -x "${ODBC_CONFIG}"; then
-			AC_MSG_ERROR([iodbc-config not found (required for iODBC build)])
-		fi
-	else
-		ODBC_CONFIG=${ODBC_CONFIG}/bin/iodbc-config
-	fi
 fi
 
 if test "$with_unixodbc" != no; then
 	AC_DEFINE(WITH_UNIXODBC, 1,
             [Define to 1 to build with unixODBC support])
-	if test "$with_unixodbc" = yes; then
-		AC_PATH_PROGS(ODBC_CONFIG, odbc_config)
-	else
-		ODBC_CONFIG=$with_unixodbc
-	fi
-	if test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then
-		if test ! -x "${ODBC_CONFIG}"; then
-			AC_MSG_ERROR([odbc_config not found (required for unixODBC build)])
-		fi
-	else
-		ODBC_CONFIG=${ODBC_CONFIG}/bin/odbc_config
-	fi
 fi
 
 #
 # ODBC include and library
 #
-
-if test "$ODBC_CONFIG" != ""; then
-	if test "$with_iodbc" != no; then
-		ODBC_INCLUDE=`${ODBC_CONFIG} --cflags`
-		CPPFLAGS="$CPPFLAGS ${ODBC_INCLUDE}"
-		# Linking libiodoc is rather problematic
-		[ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`]
-		LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}"
-	else
-		ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix`
-		CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}"
-		# Linking libodoc is rather problematic
-		ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix`
-		LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}"
-	fi
-	AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR])
-fi
+ODBC_LIBS="-lodbcinst"
+LIBS="$LIBS ${ODBC_LIBS}"
+AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS])
 
 #
 # SQLCOLATTRIBUTE_SQLLEN check
@@ -176,18 +138,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes,
 # Find libpq headers and libraries
 #
 
-if test -z "$PG_CONFIG"; then
-  AC_PATH_PROGS(PG_CONFIG, pg_config)
-fi
-
-if test -n "$PG_CONFIG"; then
-  pg_includedir=`"$PG_CONFIG" --includedir`
-  pg_libdir=`"$PG_CONFIG" --libdir`
-  CPPFLAGS="$CPPFLAGS -I$pg_includedir"
-  LDFLAGS="$LDFLAGS -L$pg_libdir"
-fi
-
-
+pg_includedir=""
+pg_libdir=""
+CPPFLAGS="$CPPFLAGS"
+LDFLAGS="$LDFLAGS"
 
 # 1. Programs
 
@@ -211,12 +165,6 @@ if test "$with_iodbc" != no; then
                  [AC_MSG_ERROR([iODBC library "iodbcinst" not found])])
 fi
 
-if test "$enable_pthreads" = yes; then
-  AC_CHECK_LIB(pthreads, pthread_create,
-               [],
-	       [AC_CHECK_LIB(pthread, pthread_create)])
-fi
-
 AC_CHECK_LIB(pq, PQsetSingleRowMode, [],
 	      [AC_MSG_ERROR([libpq library version >= 9.2 is required])])
 
-- 
2.8.1