psqlodbc-remove-some-checks-for-cross-compiling.patch 3.3 KB

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