configure.ac: Fix checks for cross-compiles.

When checking architecture-specific things, always check $host, i.e. the
architecture we're building _for_, not the one we happen to build _on_.

E.g. when cross-compiling _for_ Android (or Windows or others) it's important
to check for Android in $host; whether we happen to cross-compile _on_ a Linux
or Windows or OpenBSD or FreeBSD machine ($build) doesn't matter, only the
fact that we compile _for_ Android is important for most checks.
This commit is contained in:
Uwe Hermann 2013-04-09 19:52:38 +02:00
parent bbe6e336b3
commit 2e542814cb
1 changed files with 2 additions and 2 deletions

View File

@ -209,7 +209,7 @@ PKG_CHECK_MODULES([libzip], [libzip >= 0.8],
# libusb-1.0 is only needed for some hardware drivers. Disable the respective # libusb-1.0 is only needed for some hardware drivers. Disable the respective
# drivers if it is not found. # drivers if it is not found.
case "$build" in case "$host" in
*freebsd*) *freebsd*)
# FreeBSD comes with an "integrated" libusb-1.0-style USB API. # FreeBSD comes with an "integrated" libusb-1.0-style USB API.
# This means libusb-1.0 is always available, no need to check for it, # This means libusb-1.0 is always available, no need to check for it,
@ -266,7 +266,7 @@ AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
# The Rigol DS1xx2 driver currently uses the Linux kernel usbtmc module # The Rigol DS1xx2 driver currently uses the Linux kernel usbtmc module
# (though it is planned to rewrite the driver to be portable later). # (though it is planned to rewrite the driver to be portable later).
# Thus, it will be disabled for non-Linux builds for now. # Thus, it will be disabled for non-Linux builds for now.
case "$build" in case "$host" in
*linux*) *linux*)
# Do nothing. Whether the driver is enabled is determined by the # Do nothing. Whether the driver is enabled is determined by the
# previous --enable-all-drivers/--disable-all-drivers and/or any # previous --enable-all-drivers/--disable-all-drivers and/or any