[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] [patch] fix cross-compile logic in configure.ac



the current configure script runs `uname` which just plain doesnt work in a 
cross-compile setup ... attached patch rewrites it using proper autotool 
macros/variables
-mike

Attachment: pgpPZSzafPE95.pgp
Description: PGP signature

Index: configure.ac
===================================================================
--- configure.ac	(revision 227)
+++ configure.ac	(working copy)
@@ -49,6 +49,7 @@ fi
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
+AC_CANONICAL_HOST
 AC_C_BIGENDIAN
 AC_C_INLINE
 AC_C_CONST
@@ -60,9 +61,9 @@ AC_CHECK_FUNCS([llseek alarm gethostbyna
 AC_FUNC_FORK
 AC_FUNC_SETVBUF_REVERSED
 AC_MSG_CHECKING(whether client should be built)
-case "`uname`" in
-     *Linux*) sbin_PROGRAMS=nbd-client
-	      AC_MSG_RESULT(yes)
+case $host_os in
+     linux*) sbin_PROGRAMS=nbd-client
+              AC_MSG_RESULT(yes)
               ;;
      *) AC_MSG_RESULT(no) ;;
 esac

Reply to: