Skip to contentSkip to conversation

ulogd: fix cross compilation errors with mysql_config

PATCH Applied Helmut Schaa 2 participants 2 messages Mar 18, 2016 – Mar 31, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ulogd: fix cross compilation errors with mysql_config

When cross-compiling ulogd, mysql_config and pg_config will return build host configuration not build target configuration. This leads to build failures if mysql_config is installed on the host system but mysql is not available on the build target.

Fix this by not using mysql_config and pg_config for cross-compilation.

---
 acinclude.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
acinclude.m4 +2 -2
index 56d47b8..bd21255 100644
@@ -35,7 +35,7 @@ if test "$pg_prefix" != "no"; then
 AC_MSG_CHECKING([for PostgreSQL pg_config program])
 for d in $pg_prefix/bin /usr/bin /usr/local/bin /usr/local/pgsql/bin /opt/pgsql/bin /opt/packages/pgsql/bin
 do
-	if test -x $d/pg_config
+	if test -x $d/pg_config -a "$cross_compiling" = "no";
 	then
 		AC_MSG_RESULT(found pg_config in $d)
 		PQINCPATH=`$d/pg_config --includedir`
@@ -130,7 +130,7 @@ if test "$my_prefix" != "no"; then
 AC_MSG_CHECKING([for MySQL mysql_config program])
 for d in $my_prefix/bin /usr/bin /usr/local/bin /usr/local/mysql/bin /opt/mysql/bin /opt/packages/mysql/bin
 do
-	if test -x $d/mysql_config
+	if test -x $d/mysql_config -a "$cross_compiling" = "no";
 	then
 		AC_MSG_RESULT(found mysql_config in $d)
 		MYSQL_INC=`$d/mysql_config --include`
Signature · 1 line
1.8.4.5
Applied
#1 lore raw

Hello Helmut,

Quoted 10 lines · Helmut Schaa

When cross-compiling ulogd, mysql_config and pg_config will return build host
configuration not build target configuration. This leads to build failures
if mysql_config is installed on the host system but mysql is not available
on the build target.

Fix this by not using mysql_config and pg_config for cross- compilation.

Applied, thanks!

BR,

Quoted 29 lines

---
 acinclude.m4 | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
acinclude.m4 +0 -0
index 56d47b8..bd21255 100644
@@ -35,7 +35,7 @@ if test "$pg_prefix" != "no"; then
  AC_MSG_CHECKING([for PostgreSQL pg_config program])

 for d in $pg_prefix/bin /usr/bin /usr/local/bin /usr/local/pgsql/bin /opt/pgsql/bin /opt/packages/pgsql/bin
 do

acinclude.m4 +1 -1
-	if test -x $d/pg_config
+	if test -x $d/pg_config -a "$cross_compiling" = "no";

  then
  AC_MSG_RESULT(found pg_config in $d) PQINCPATH=$d/pg_config --includedir

acinclude.m4 +0 -0
@@ -130,7 +130,7 @@ if test "$my_prefix" != "no"; then
  AC_MSG_CHECKING([for MySQL mysql_config program])

 for d in $my_prefix/bin /usr/bin /usr/local/bin /usr/local/mysql/bin /opt/mysql/bin /opt/packages/mysql/bin
 do

acinclude.m4 +1 -1
-	if test -x $d/mysql_config
+	if test -x $d/mysql_config -a "$cross_compiling" = "no";

  then
  AC_MSG_RESULT(found mysql_config in $d) MYSQL_INC=$d/mysql_config --include

Signature · 7 lines
Eric Leblond <[email protected]>


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html