1From dc41591d5ceb18900ec85894f8f7b7bb44bb3bd9 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 4 Jan 2016 01:44:04 -0500
4Subject: [PATCH] avoid searching host dirs
5
6Don't search the hardcoded host dirs to avoid
7host contamination.
8
9Upstream-Status: Inappropriate [cross-compile specific]
10
11Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
12---
13 acinclude.m4                                                | 4 ++--
14 src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac        | 4 ++--
15 src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac   | 4 ++--
16 src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac      | 4 ++--
17 src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac      | 6 +++---
18 src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac     | 2 +-
19 src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++--
20 src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac   | 4 ++--
21 8 files changed, 16 insertions(+), 16 deletions(-)
22
23diff --git a/acinclude.m4 b/acinclude.m4
24index da48acc..b513ae1 100644
25--- a/acinclude.m4
26+++ b/acinclude.m4
27@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then
28   FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
29   FR_LOCATE_DIR(smart_lib_dir,[lib$1.a])
30
31-  for try in $smart_lib_dir /usr/local/lib /opt/lib; do
32+  for try in $smart_lib_dir; do
33     AC_MSG_CHECKING([for $2 in -l$1 in $try])
34     LIBS="-l$1 $old_LIBS"
35     CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
36@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
37 old_CPPFLAGS="$CPPFLAGS"
38 smart_include=
39 dnl #  The default directories we search in (in addition to the compilers search path)
40-smart_include_dir="/usr/local/include /opt/include"
41+smart_include_dir=
42
43 dnl #  Our local versions
44 _smart_try_dir=
45diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
46index 75c851a..a262d71 100644
47--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
48+++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
49@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
50 		esac])
51
52 	dnl Check for SQLConnect in -ldb2
53-	smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
54+	smart_try_dir="$ibmdb2_lib_dir"
55 	FR_SMART_CHECK_LIB(db2, SQLConnect)
56 	if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
57 		fail="$fail libdb2"
58 	fi
59
60 	dnl Check for sqlcli.h
61-	smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
62+	smart_try_dir="$ibmdb2_include_dir"
63 	FR_SMART_CHECK_INCLUDE(sqlcli.h)
64 	if test "x$ac_cv_header_sqlcli_h" != xyes; then
65 		fail="$fail sqlcli.h"
66diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
67index 4da57b3..752b043 100644
68--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
69+++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
70@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then
71 		esac])
72
73 	dnl Check for isc_attach_database in -lfbclient
74-	smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
75+	smart_try_dir="$firebird_lib_dir"
76 	FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
77 	if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
78 		fail="$fail libfbclient"
79 	fi
80
81 	dnl Check for ibase.h
82-	smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
83+	smart_try_dir="$firebird_include_dir"
84 	FR_SMART_CHECK_INCLUDE(ibase.h)
85 	if test "x$ac_cv_header_ibase_h" != xyes; then
86 		fail="$fail ibase.h"
87diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
88index ba6304f..3393557 100644
89--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
90+++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
91@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
92 		esac])
93
94 	dnl Check for SQLConnect in -liodbc
95-	smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc"
96+	smart_try_dir="$iodbc_lib_dir"
97 	FR_SMART_CHECK_LIB(iodbc, SQLConnect)
98 	if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then
99 		fail="$fail libiodbc"
100 	fi
101
102 	dnl Check for isql.h
103-	smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include"
104+	smart_try_dir="$iodbc_include_dir"
105 	FR_SMART_CHECK_INCLUDE(isql.h)
106 	if test "x$ac_cv_header_isql_h" != xyes; then
107 		fail="$fail isql.h"
108diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
109index 1401677..2e7db44 100644
110--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
111+++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
112@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then
113
114 	dnl # Check for libmysqlclient_r
115 	if test "x$have_a_libmysqlclient" != "xyes"; then
116-	    smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
117+	    smart_try_dir="$mysql_lib_dir"
118 	    FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
119 	    if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
120 			have_a_libmysqlclient='yes'
121@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then
122
123 	dnl # Check for libmysqlclient
124 	if test "x$have_a_libmysqlclient" != "xyes"; then
125-	    smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
126+	    smart_try_dir="$mysql_lib_dir"
127 	    FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
128 	    if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
129 			have_a_libmysqlclient='yes'
130@@ -189,7 +189,7 @@ if test x$with_[]modname != xno; then
131     fi
132
133     if test "x$have_mysql_h" != "xyes"; then
134-		smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
135+		smart_try_dir="$mysql_include_dir"
136 		FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
137 		if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
138 	    	AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
139diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
140index 3178462..5cbc8c2 100644
141--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
142+++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
143@@ -63,7 +63,7 @@ if test x$with_[]modname != xno; then
144     dnl # Check for header files
145     dnl ############################################################
146
147-    smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
148+    smart_try_dir="$oracle_include_dir"
149
150     if test "x$ORACLE_HOME" != "x"; then
151 	smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
152diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
153index 4f9a890..e1cf811 100644
154--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
155+++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
156@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then
157 	  esac ]
158 	)
159
160-	smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
161+	smart_try_dir="$rlm_sql_postgresql_include_dir"
162 	FR_SMART_CHECK_INCLUDE(libpq-fe.h)
163 	if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
164 		fail="$fail libpq-fe.h"
165@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then
166 		  ])
167 	fi
168
169-	smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
170+	smart_try_dir="$rlm_sql_postgresql_lib_dir"
171 	FR_SMART_CHECK_LIB(pq, PQconnectdb)
172 	if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
173 		fail="$fail libpq"
174diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
175index 3545387..c543ed4 100644
176--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
177+++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
178@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then
179 		esac])
180
181 	dnl Check for SQLConnect in -lodbc
182-	smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
183+	smart_try_dir="$unixodbc_lib_dir"
184 	FR_SMART_CHECK_LIB(odbc, SQLConnect)
185 	if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
186 		fail="$fail libodbc"
187 	fi
188
189 	dnl Check for sql.h
190-	smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
191+	smart_try_dir="$unixodbc_include_dir"
192 	FR_SMART_CHECK_INCLUDE(sql.h)
193 	if test "x$ac_cv_header_sql_h" != xyes; then
194 		fail="$fail sql.h"
195--
1961.9.1
197
198