1Subject: [PATCH] remove some checks for cross-compiling 2 3some lib check is not suitable for 4cross-compiling, so remove them. 5 6Upstream-Status: Inappropriate [not a real bug,just for cross-compiling] 7 8Signed-off-by: Song.Li <Song.Li@windriver.com> 9Signed-off-by: Kai Kang <kai.kang@windriver.com> 10Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 11--- 12 configure.ac | 66 +++++++----------------------------------------------------- 13 1 file changed, 7 insertions(+), 59 deletions(-) 14 15diff --git a/configure.ac b/configure.ac 16index df5ad7a..b72bd4c 100644 17--- a/configure.ac 18+++ b/configure.ac 19@@ -46,57 +46,19 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas 20 if test "$with_iodbc" != no; then 21 with_unixodbc=no 22 AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support]) 23- if test "$with_iodbc" = yes; then 24- AC_PATH_PROGS(ODBC_CONFIG, iodbc-config) 25- else 26- ODBC_CONFIG=$with_iodbc 27- fi 28- if test ! -x "${ODBC_CONFIG}/bin/iodbc-config"; then 29- if test ! -x "${ODBC_CONFIG}"; then 30- AC_MSG_ERROR([iodbc-config not found (required for iODBC build)]) 31- fi 32- else 33- ODBC_CONFIG=${ODBC_CONFIG}/bin/iodbc-config 34- fi 35 fi 36 37 if test "$with_unixodbc" != no; then 38 AC_DEFINE(WITH_UNIXODBC, 1, 39 [Define to 1 to build with unixODBC support]) 40- if test "$with_unixodbc" = yes; then 41- AC_PATH_PROGS(ODBC_CONFIG, odbc_config) 42- else 43- ODBC_CONFIG=$with_unixodbc 44- fi 45- if test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then 46- if test ! -x "${ODBC_CONFIG}"; then 47- AC_MSG_ERROR([odbc_config not found (required for unixODBC build)]) 48- fi 49- else 50- ODBC_CONFIG=${ODBC_CONFIG}/bin/odbc_config 51- fi 52 fi 53 54 # 55 # ODBC include and library 56 # 57- 58-if test "$ODBC_CONFIG" != ""; then 59- if test "$with_iodbc" != no; then 60- ODBC_INCLUDE=`${ODBC_CONFIG} --cflags` 61- CPPFLAGS="$CPPFLAGS ${ODBC_INCLUDE}" 62- # Linking libiodoc is rather problematic 63- [ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`] 64- LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}" 65- else 66- ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix` 67- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" 68- # Linking libodoc is rather problematic 69- ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix` 70- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" 71- fi 72- AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR]) 73-fi 74+ODBC_LIBS="-lodbcinst" 75+LIBS="$LIBS ${ODBC_LIBS}" 76+AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS]) 77 78 # 79 # SQLCOLATTRIBUTE_SQLLEN check 80@@ -176,18 +138,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, 81 # Find libpq headers and libraries 82 # 83 84-if test -z "$PG_CONFIG"; then 85- AC_PATH_PROGS(PG_CONFIG, pg_config) 86-fi 87- 88-if test -n "$PG_CONFIG"; then 89- pg_includedir=`"$PG_CONFIG" --includedir` 90- pg_libdir=`"$PG_CONFIG" --libdir` 91- CPPFLAGS="$CPPFLAGS -I$pg_includedir" 92- LDFLAGS="$LDFLAGS -L$pg_libdir" 93-fi 94- 95- 96+pg_includedir="" 97+pg_libdir="" 98+CPPFLAGS="$CPPFLAGS" 99+LDFLAGS="$LDFLAGS" 100 101 # 1. Programs 102 103@@ -211,12 +165,6 @@ if test "$with_iodbc" != no; then 104 [AC_MSG_ERROR([iODBC library "iodbcinst" not found])]) 105 fi 106 107-if test "$enable_pthreads" = yes; then 108- AC_CHECK_LIB(pthreads, pthread_create, 109- [], 110- [AC_CHECK_LIB(pthread, pthread_create)]) 111-fi 112- 113 AC_CHECK_LIB(pq, PQsetSingleRowMode, [], 114 [AC_MSG_ERROR([libpq library version >= 9.2 is required])]) 115 116-- 1172.8.1 118 119