From 3b8e6bf4b727f90b0109e41cafabf60bb8bf20ac Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 7 Dec 2020 09:27:19 +0500 Subject: [PATCH] Stop portability to ancient shells https://stackoverflow.com/a/64436192/10598455 https://mywiki.wooledge.org/BashPitfalls#pf4 --- configure.ac | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 43a2646..47e5d7d 100644 --- a/configure.ac +++ b/configure.ac @@ -15,17 +15,17 @@ AC_ARG_ENABLE([console], AS_HELP_STRING([--disable-console], [disable seri AC_ARG_ENABLE([multiboot2], AS_HELP_STRING([--disable-multiboot2], [disable Multiboot 2 information parser])) AC_ARG_ENABLE([pfa], AS_HELP_STRING([--disable-pfa], [disable Page Frame Allocator])) -AM_CONDITIONAL([ARCH_X86], [test x"$host_cpu" = x"x86"]) -AM_CONDITIONAL([ENABLE_CMDLINE], [test x"$enable_cmdline" != x"no"]) -AM_CONDITIONAL([ENABLE_CONSOLE], [test x"$enable_console" != x"no"]) -AM_CONDITIONAL([ENABLE_MULTIBOOT2], [test x"$enable_multiboot2" != x"no"]) -AM_CONDITIONAL([ENABLE_PFA], [test x"$enable_pfa" != x"no"]) +AM_CONDITIONAL([ARCH_X86], [test "$host_cpu" = x86]) +AM_CONDITIONAL([ENABLE_CMDLINE], [test "$enable_cmdline" != no]) +AM_CONDITIONAL([ENABLE_CONSOLE], [test "$enable_console" != no]) +AM_CONDITIONAL([ENABLE_MULTIBOOT2], [test "$enable_multiboot2" != no]) +AM_CONDITIONAL([ENABLE_PFA], [test "$enable_pfa" != no]) -AS_IF([test x"$host_cpu" = x"x86"], [AC_DEFINE([ARCH_X86], [1], [architecture is x86])]) -AS_IF([test x"$enable_cmdline" != x"no"], [AC_DEFINE([ENABLE_CMDLINE], [1], [enabled command line parser])]) -AS_IF([test x"$enable_console" != x"no"], [AC_DEFINE([ENABLE_CONSOLE], [1], [enabled serial console])]) -AS_IF([test x"$enable_multiboot2" != x"no"], [AC_DEFINE([ENABLE_MULTIBOOT2], [1], [enabled Multiboot 2 information parser])]) -AS_IF([test x"$enable_pfa" != x"no"], [AC_DEFINE([ENABLE_PFA], [1], [enabled Page Frame Allocator])]) +AS_IF([test "$host_cpu" = x86], [AC_DEFINE([ARCH_X86], [1], [architecture is x86])]) +AS_IF([test "$enable_cmdline" != no], [AC_DEFINE([ENABLE_CMDLINE], [1], [enabled command line parser])]) +AS_IF([test "$enable_console" != no], [AC_DEFINE([ENABLE_CONSOLE], [1], [enabled serial console])]) +AS_IF([test "$enable_multiboot2" != no], [AC_DEFINE([ENABLE_MULTIBOOT2], [1], [enabled Multiboot 2 information parser])]) +AS_IF([test "$enable_pfa" != no], [AC_DEFINE([ENABLE_PFA], [1], [enabled Page Frame Allocator])]) AM_INIT_AUTOMAKE([1.9 subdir-objects -Wall -Werror])