]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
configure: Avoid bashisms
authorLars Wendler <polynomial-c@gmx.de>
Thu, 30 Oct 2025 06:31:59 +0000 (07:31 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 6 Nov 2025 14:29:52 +0000 (15:29 +0100)
or else configure check doesn't succeed with non-bash shell (e.g. dash):

  checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
  no

and later build fails with

  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
    252 |       result |= HWF_INTEL_CPU;
        |                 ^~~~~~~~~~~~~

and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
erroneously not defined by configure script.

Signed-off-by: Lars Wendler <polynomial-c@gmx.de>
Reviewed-by: Gary Lin <glin@suse.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index 8a72c078eb7160704ecea09a481dd3cc5be5f170..17937baf444a345aa3326454e41907cb8adf5de2 100644 (file)
@@ -1150,7 +1150,7 @@ fi
 
 # Implementation of the --disable-amd64-as-feature-detection switch.
 AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
-if test x$target_cpu == xx86_64 -a x$platform == xefi; then
+if test x$target_cpu = xx86_64 -a x$platform = xefi; then
   CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
   AC_ARG_ENABLE(amd64-as-feature-detection,
     AS_HELP_STRING([--disable-amd64-as-feature-detection],