blob: 9131d70be663bbe69b08bc58ae19d416ad2aa968 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From 8ca6b0c72b6b933642ec7c4ebb83734244fec46f Mon Sep 17 00:00:00 2001
2From: "Song.Li" <Song.Li@windriver.com>
3Date: Tue, 5 Sep 2017 10:24:10 +0800
Patrick Williamsddad1a12017-02-23 20:36:32 -06004Subject: [PATCH] remove some checks for cross-compiling
5
6some lib check is not suitable for
7cross-compiling, so remove them.
8
9Upstream-Status: Inappropriate [not a real bug,just for cross-compiling]
10
11Signed-off-by: Song.Li <Song.Li@windriver.com>
12Signed-off-by: Kai Kang <kai.kang@windriver.com>
13Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Andrew Geissler87f5cff2022-09-30 13:13:31 -050014
Patrick Williamsddad1a12017-02-23 20:36:32 -060015---
Andrew Geissler87f5cff2022-09-30 13:13:31 -050016 configure.ac | 80 +++++-----------------------------------------------
17 1 file changed, 7 insertions(+), 73 deletions(-)
Patrick Williamsddad1a12017-02-23 20:36:32 -060018
19diff --git a/configure.ac b/configure.ac
Andrew Geissler87f5cff2022-09-30 13:13:31 -050020index 7f79563..00b359e 100644
Patrick Williamsddad1a12017-02-23 20:36:32 -060021--- a/configure.ac
22+++ b/configure.ac
Andrew Geissler87f5cff2022-09-30 13:13:31 -050023@@ -57,71 +57,20 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas
Patrick Williamsddad1a12017-02-23 20:36:32 -060024 if test "$with_iodbc" != no; then
25 with_unixodbc=no
26 AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support])
27- if test "$with_iodbc" = yes; then
28- AC_PATH_PROGS(ODBC_CONFIG, iodbc-config)
29- else
30- ODBC_CONFIG=$with_iodbc
31- fi
32- if test ! -x "${ODBC_CONFIG}/bin/iodbc-config"; then
33- if test ! -x "${ODBC_CONFIG}"; then
34- AC_MSG_ERROR([iodbc-config not found (required for iODBC build)])
35- fi
36- else
37- ODBC_CONFIG=${ODBC_CONFIG}/bin/iodbc-config
38- fi
39 fi
40
Andrew Geissler87f5cff2022-09-30 13:13:31 -050041 wo_odbc_config=__without_odbc_config
Patrick Williamsddad1a12017-02-23 20:36:32 -060042 if test "$with_unixodbc" != no; then
43 AC_DEFINE(WITH_UNIXODBC, 1,
44 [Define to 1 to build with unixODBC support])
45- if test "$with_unixodbc" = yes; then
46- AC_PATH_PROGS(ODBC_CONFIG, odbc_config)
47- else
48- ODBC_CONFIG=$with_unixodbc
49- fi
Andrew Geissler87f5cff2022-09-30 13:13:31 -050050- if test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then
51- :
52- elif test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then
Patrick Williamsddad1a12017-02-23 20:36:32 -060053- if test ! -x "${ODBC_CONFIG}"; then
54- AC_MSG_ERROR([odbc_config not found (required for unixODBC build)])
55- fi
56- else
57- ODBC_CONFIG=${ODBC_CONFIG}/bin/odbc_config
58- fi
59 fi
60
61 #
62 # ODBC include and library
63 #
64-
65-if test "$ODBC_CONFIG" != ""; then
66- if test "$with_iodbc" != no; then
67- ODBC_INCLUDE=`${ODBC_CONFIG} --cflags`
68- CPPFLAGS="$CPPFLAGS ${ODBC_INCLUDE}"
69- # Linking libiodoc is rather problematic
70- [ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`]
71- LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050072- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test
73- elif test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then
74- ODBC_INCLUDE=/usr/include
75- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}"
76- ODBC_LIBDiR=""
77- LIBODBC="-lodbc" # for regression test
Patrick Williamsddad1a12017-02-23 20:36:32 -060078- else
79- ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix`
80- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050081- # Linking libodbc is rather problematic
Patrick Williamsddad1a12017-02-23 20:36:32 -060082- ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix`
Andrew Geissler87f5cff2022-09-30 13:13:31 -050083- if test "${ODBC_LIBDIR}" != ""; then
84- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}"
85- fi
86- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test
Patrick Williamsddad1a12017-02-23 20:36:32 -060087- fi
88- AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR])
Andrew Geissler87f5cff2022-09-30 13:13:31 -050089- AC_MSG_NOTICE([using $LIBODBC for regression test])
Patrick Williamsddad1a12017-02-23 20:36:32 -060090-fi
Andrew Geissler87f5cff2022-09-30 13:13:31 -050091-AC_SUBST(LIBODBC)
Patrick Williamsddad1a12017-02-23 20:36:32 -060092+ODBC_LIBS="-lodbcinst"
93+LIBS="$LIBS ${ODBC_LIBS}"
94+AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS])
95
96 #
97 # SQLCOLATTRIBUTE_SQLLEN check
Andrew Geissler87f5cff2022-09-30 13:13:31 -050098@@ -190,19 +139,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes,
Patrick Williamsddad1a12017-02-23 20:36:32 -060099 # Find libpq headers and libraries
100 #
101
102-if test -z "$PG_CONFIG"; then
103- AC_PATH_PROGS(PG_CONFIG, pg_config)
104-fi
105-
106-if test -n "$PG_CONFIG"; then
107- pg_includedir=`"$PG_CONFIG" --includedir`
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500108- pg_pkg_includedir=`"$PG_CONFIG" --pkgincludedir`
Patrick Williamsddad1a12017-02-23 20:36:32 -0600109- pg_libdir=`"$PG_CONFIG" --libdir`
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500110- CPPFLAGS="$CPPFLAGS -I$pg_includedir -I$pg_pkg_includedir/internal"
Patrick Williamsddad1a12017-02-23 20:36:32 -0600111- LDFLAGS="$LDFLAGS -L$pg_libdir"
112-fi
113-
114-
115+pg_includedir=""
116+pg_libdir=""
117+CPPFLAGS="$CPPFLAGS"
118+LDFLAGS="$LDFLAGS"
119
120 # 1. Programs
121
Andrew Geissler87f5cff2022-09-30 13:13:31 -0500122@@ -226,12 +166,6 @@ if test "$with_iodbc" != no; then
Patrick Williamsddad1a12017-02-23 20:36:32 -0600123 [AC_MSG_ERROR([iODBC library "iodbcinst" not found])])
124 fi
125
126-if test "$enable_pthreads" = yes; then
127- AC_CHECK_LIB(pthreads, pthread_create,
128- [],
129- [AC_CHECK_LIB(pthread, pthread_create)])
130-fi
131-
132 AC_CHECK_LIB(pq, PQsetSingleRowMode, [],
133 [AC_MSG_ERROR([libpq library version >= 9.2 is required])])
134