x86: 0.957 device: 0.868 files: 0.846 kernel: 0.820 graphic: 0.803 architecture: 0.786 performance: 0.775 i386: 0.774 network: 0.748 mistranslation: 0.745 PID: 0.733 KVM: 0.732 hypervisor: 0.724 register: 0.720 risc-v: 0.703 debug: 0.701 socket: 0.687 boot: 0.687 TCG: 0.685 VMM: 0.649 permissions: 0.624 peripherals: 0.614 arm: 0.605 ppc: 0.604 vnc: 0.602 semantic: 0.557 assembly: 0.522 user-level: 0.493 virtual: 0.300 8.1.0rc0: Build failure when building static binaries, auto config incorrectly mark bzip2 as supported on my machine Description of problem: 8.1.0rc0 fails to build when I build static binaries. ``` Jul 24 20:28:22 clang-13: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] Jul 24 20:28:22 ld.lld: error: attempted static link of dynamic object /usr/bin/../lib/libbz2.so Jul 24 20:28:22 clang-13: error: linker command failed with exit code 1 (use -v to see invocation) ``` It seems that `./configure` mistaken my dynamic library of bzip2 as able to compile under static compilation. Steps to reproduce: 1. `./configure --target-list=x86_64-softmmu --static` with bzip2 only dynamicly installed and static library not installed 2. see output You can see ``` snappy support : NO bzip2 support : YES lzfse support : NO ``` which is wrong. Additionally, the compilation fails because the system only have bzip2 dynamicly but not staticly. Additional information: