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