blob: 8fd0dca443ea52ded5737ef879ca639ad18e8e49 [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From 8fe25b30b6fbb3170705f4468eb4c92eef3a968f Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 4 Jan 2016 01:44:04 -0500
Andrew Geisslerc5535c92023-01-27 16:10:19 -06004Subject: [PATCH] Avoid searching host dirs
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6Don't search the hardcoded host dirs to avoid
7host contamination.
8
Andrew Geisslerc5535c92023-01-27 16:10:19 -06009Upstream-Status: Inappropriate [embedded specific]
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010
11Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Andrew Geisslerc5535c92023-01-27 16:10:19 -060012Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013---
14 acinclude.m4 | 4 ++--
15 src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++--
16 src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++--
17 src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++--
18 src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++---
19 src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +-
20 src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
21 src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++--
22 8 files changed, 16 insertions(+), 16 deletions(-)
23
24diff --git a/acinclude.m4 b/acinclude.m4
Andrew Geisslerc5535c92023-01-27 16:10:19 -060025index a953d0e1b6..ede143d3c2 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026--- a/acinclude.m4
27+++ b/acinclude.m4
Andrew Geisslerc5535c92023-01-27 16:10:19 -060028@@ -115,7 +115,7 @@ dnl #
29 dnl # Try to guess possible locations.
30 dnl #
31 if test "x$smart_lib" = "x"; then
32- for try in /usr/local/lib /opt/lib; do
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033+ for try in $smart_lib_dir; do
34 AC_MSG_CHECKING([for $2 in -l$1 in $try])
35 LIBS="-l$1 $old_LIBS"
36 CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
Andrew Geisslerc5535c92023-01-27 16:10:19 -060037@@ -155,7 +155,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 old_CPPFLAGS="$CPPFLAGS"
39 smart_include=
40 dnl # The default directories we search in (in addition to the compilers search path)
41-smart_include_dir="/usr/local/include /opt/include"
42+smart_include_dir=
43
44 dnl # Our local versions
45 _smart_try_dir=
46diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060047index 44f84aa27e..23a1899591 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050048--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
49+++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060050@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051 esac])
52
53 dnl Check for SQLConnect in -ldb2
54- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
55+ smart_try_dir="$ibmdb2_lib_dir"
56 FR_SMART_CHECK_LIB(db2, SQLConnect)
57 if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
58 fail="$fail libdb2"
59 fi
60
61 dnl Check for sqlcli.h
62- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
63+ smart_try_dir="$ibmdb2_include_dir"
64 FR_SMART_CHECK_INCLUDE(sqlcli.h)
65 if test "x$ac_cv_header_sqlcli_h" != xyes; then
66 fail="$fail sqlcli.h"
67diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060068index 4c2fd7ba9e..10c864def5 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050069--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
70+++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060071@@ -60,14 +60,14 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -050072 esac])
73
74 dnl Check for isc_attach_database in -lfbclient
75- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
76+ smart_try_dir="$firebird_lib_dir"
77 FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
78 if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
79 fail="$fail libfbclient"
80 fi
81
82 dnl Check for ibase.h
83- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
84+ smart_try_dir="$firebird_include_dir"
85 FR_SMART_CHECK_INCLUDE(ibase.h)
86 if test "x$ac_cv_header_ibase_h" != xyes; then
87 fail="$fail ibase.h"
88diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060089index d26ac9c431..6e4500e948 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050090--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
91+++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060092@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -050093 esac])
94
95 dnl Check for SQLConnect in -liodbc
96- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
97+ smart_try_dir="$iodbc_lib_dir"
98 FR_SMART_CHECK_LIB(iodbc, SQLConnect)
99 if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
100 fail="$fail libiodbc"
101 fi
102
103 dnl Check for isql.h
104- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
105+ smart_try_dir="$iodbc_include_dir"
106 FR_SMART_CHECK_INCLUDE(isql.h)
107 if test "x$ac_cv_header_isql_h" != xyes; then
108 fail="$fail isql.h"
109diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600110index df36da77bf..31359041c7 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500111--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
112+++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600113@@ -140,7 +140,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500114
115 dnl # Check for libmysqlclient_r
116 if test "x$have_a_libmysqlclient" != "xyes"; then
117- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
118+ smart_try_dir="$mysql_lib_dir"
119 FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
120 if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
121 have_a_libmysqlclient='yes'
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600122@@ -149,7 +149,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500123
124 dnl # Check for libmysqlclient
125 if test "x$have_a_libmysqlclient" != "xyes"; then
126- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
127+ smart_try_dir="$mysql_lib_dir"
128 FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
129 if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
130 have_a_libmysqlclient='yes'
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600131@@ -243,7 +243,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500132 fi
133
134 if test "x$have_mysql_h" != "xyes"; then
135- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
136+ smart_try_dir="$mysql_include_dir"
137 FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
138 if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
139 AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
140diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600141index 3b45da582a..03e6607d2b 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500142--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
143+++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600144@@ -68,7 +68,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500145 dnl # Check for header files
146 dnl ############################################################
147
148- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
149+ smart_try_dir="$oracle_include_dir"
150
151 if test "x$ORACLE_HOME" != "x"; then
152 smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
153diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600154index 8ac1022e89..d46c0f66bf 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500155--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
156+++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600157@@ -45,7 +45,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500158 esac ]
159 )
160
161- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
162+ smart_try_dir="$rlm_sql_postgresql_include_dir"
163 FR_SMART_CHECK_INCLUDE(libpq-fe.h)
164 if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
165 fail="$fail libpq-fe.h"
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600166@@ -94,7 +94,7 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500167 ])
168 fi
169
170- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
171+ smart_try_dir="$rlm_sql_postgresql_lib_dir"
172 FR_SMART_CHECK_LIB(pq, PQconnectdb)
173 if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
174 fail="$fail libpq"
175diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600176index f10279fe1f..0081a338c8 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500177--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
178+++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600179@@ -61,14 +61,14 @@ if test x$with_[]modname != xno; then
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500180 esac])
181
182 dnl Check for SQLConnect in -lodbc
183- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
184+ smart_try_dir="$unixodbc_lib_dir"
185 FR_SMART_CHECK_LIB(odbc, SQLConnect)
186 if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
187 fail="$fail libodbc"
188 fi
189
190 dnl Check for sql.h
191- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
192+ smart_try_dir="$unixodbc_include_dir"
193 FR_SMART_CHECK_INCLUDE(sql.h)
194 if test "x$ac_cv_header_sql_h" != xyes; then
195 fail="$fail sql.h"
196--
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001972.25.1
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500198