Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | From 8ca6b0c72b6b933642ec7c4ebb83734244fec46f Mon Sep 17 00:00:00 2001 |
| 2 | From: "Song.Li" <Song.Li@windriver.com> |
| 3 | Date: Tue, 5 Sep 2017 10:24:10 +0800 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 4 | Subject: [PATCH] remove some checks for cross-compiling |
| 5 | |
| 6 | some lib check is not suitable for |
| 7 | cross-compiling, so remove them. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [not a real bug,just for cross-compiling] |
| 10 | |
| 11 | Signed-off-by: Song.Li <Song.Li@windriver.com> |
| 12 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 13 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 14 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 15 | --- |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 16 | configure.ac | 80 +++++----------------------------------------------- |
| 17 | 1 file changed, 7 insertions(+), 73 deletions(-) |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 18 | |
| 19 | diff --git a/configure.ac b/configure.ac |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 20 | index 7f79563..00b359e 100644 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 21 | --- a/configure.ac |
| 22 | +++ b/configure.ac |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 23 | @@ -57,71 +57,20 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 24 | 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 41 | wo_odbc_config=__without_odbc_config |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 42 | 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 50 | - if test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then |
| 51 | - : |
| 52 | - elif test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 53 | - 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 72 | - 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 Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 78 | - else |
| 79 | - ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix` |
| 80 | - CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 81 | - # Linking libodbc is rather problematic |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 82 | - ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix` |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 83 | - if test "${ODBC_LIBDIR}" != ""; then |
| 84 | - LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" |
| 85 | - fi |
| 86 | - LIBODBC=`${ODBC_CONFIG} --libs` # for regression test |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 87 | - fi |
| 88 | - AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR]) |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 89 | - AC_MSG_NOTICE([using $LIBODBC for regression test]) |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 90 | -fi |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 91 | -AC_SUBST(LIBODBC) |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 92 | +ODBC_LIBS="-lodbcinst" |
| 93 | +LIBS="$LIBS ${ODBC_LIBS}" |
| 94 | +AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS]) |
| 95 | |
| 96 | # |
| 97 | # SQLCOLATTRIBUTE_SQLLEN check |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 98 | @@ -190,19 +139,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 99 | # 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 108 | - pg_pkg_includedir=`"$PG_CONFIG" --pkgincludedir` |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 109 | - pg_libdir=`"$PG_CONFIG" --libdir` |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 110 | - CPPFLAGS="$CPPFLAGS -I$pg_includedir -I$pg_pkg_includedir/internal" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 111 | - 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 122 | @@ -226,12 +166,6 @@ if test "$with_iodbc" != no; then |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 123 | [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 | |