From bac9b21145a510e46acc2823ac1c1285873de642 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Thu, 10 Feb 2022 18:16:00 +0500 Subject: [PATCH] Main: fix default args --- configure.ac | 62 ++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index e01d809..21c9757 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,39 @@ AC_ARG_WITH( [libc-strnlen], AS_HELP_STRING([--with-libc-strnlen], [with strn +################ +# Default args # +################ + +AC_DEFUN([do_without_all], +[ +if test -z "$with_cmdline"; then with_cmdline=no; fi +if test -z "$with_console"; then with_console=no; fi +if test -z "$with_elf"; then with_elf=no; fi +if test -z "$with_framebuffer"; then with_framebuffer=no; fi +if test -z "$with_mbr"; then with_mbr=no; fi +if test -z "$with_multiboot2"; then with_multiboot2=no; fi +if test -z "$with_ntoa"; then with_ntoa=no; fi +if test -z "$with_pfa"; then with_pfa=no; fi +if test -z "$with_printf"; then with_printf=no; fi +if test -z "$with_units"; then with_units=no; fi +]) +AS_IF([test "$with_all" = no], do_without_all) + +AC_DEFUN([do_with_libc], +[ +if test -z "$with_libc_atoi"; then with_libc_atoi=yes; fi +if test -z "$with_libc_isdigit"; then with_libc_isdigit=yes; fi +if test -z "$with_libc_isspace"; then with_libc_isspace=yes; fi +if test -z "$with_libc_memset"; then with_libc_memset=yes; fi +if test -z "$with_libc_strcpy"; then with_libc_strcpy=yes; fi +if test -z "$with_libc_strlen"; then with_libc_strlen=yes; fi +if test -z "$with_libc_strnlen"; then with_libc_strnlen=yes; fi +]) +AS_IF([test "$with_libc" = yes], do_with_libc) + + + ################## # Normalize args # ################## @@ -89,35 +122,6 @@ AS_IF([test "$with_libc_strnlen" = yes], [with_libc_strnlen=yes], [with_libc_str -AC_DEFUN([do_without_all], -[ -if test -z "$with_cmdline"; then with_cmdline=no; fi -if test -z "$with_console"; then with_console=no; fi -if test -z "$with_elf"; then with_elf=no; fi -if test -z "$with_framebuffer"; then with_framebuffer=no; fi -if test -z "$with_mbr"; then with_mbr=no; fi -if test -z "$with_multiboot2"; then with_multiboot2=no; fi -if test -z "$with_ntoa"; then with_ntoa=no; fi -if test -z "$with_pfa"; then with_pfa=no; fi -if test -z "$with_printf"; then with_printf=no; fi -if test -z "$with_units"; then with_units=no; fi -]) -AS_IF([test "$with_all" = no], do_without_all) - -AC_DEFUN([do_with_libc], -[ -if test -z "$with_libc_atoi"; then with_libc_atoi=yes; fi -if test -z "$with_libc_isdigit"; then with_libc_isdigit=yes; fi -if test -z "$with_libc_isspace"; then with_libc_isspace=yes; fi -if test -z "$with_libc_memset"; then with_libc_memset=yes; fi -if test -z "$with_libc_strcpy"; then with_libc_strcpy=yes; fi -if test -z "$with_libc_strlen"; then with_libc_strlen=yes; fi -if test -z "$with_libc_strnlen"; then with_libc_strnlen=yes; fi -]) -AS_IF([test "$with_libc" = yes], do_with_libc) - - - AS_IF([test "$host_cpu" != "$build_cpu" -a "$enable_tests" = yes], AC_MSG_ERROR([can not build cross-platform tests])) AS_IF([test "$with_ntoa" = no -a "$with_printf" = yes], AC_MSG_ERROR([package `printf' requires package `ntoa']))