From 0571c43c1cdbbfbdeaa61150a66b41b1ef77fc1e Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 26 Feb 2021 19:18:48 +0000 Subject: [PATCH 1/3] avoid strtonum (a GNU AWK extension) this drops the requirements on strtonum, making the script (AFAIK) POSIX compliant. This (ab)uses the fact that `+' will cast its operator to numbers. Tested with GNU AWK and "The One True AWK" on OpenBSD. --- compare_version.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compare_version.awk b/compare_version.awk index 0baf3ee..5fdfa52 100644 --- a/compare_version.awk +++ b/compare_version.awk @@ -24,7 +24,7 @@ BEGIN { function split_version_number (version, parsed) { split(version, parsed, VERSION_SEP); for (i in parsed) { - parsed[i] = strtonum(parsed[i]); + parsed[i] = parsed[i] + 0; } } From 8d99118dc5b7d86c23a20a9eedc1055badd566d6 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 26 Feb 2021 19:19:44 +0000 Subject: [PATCH 2/3] use autoconf' ${AWK} instead of looking for gawk This also fixes an instance of `awk' that should be ${AWK} --- configure.ac | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index f9ecc21..31e2888 100644 --- a/configure.ac +++ b/configure.ac @@ -50,11 +50,10 @@ if test "$BASH" = "no" ; then exit 1; fi -AC_PATH_PROG([GAWK],[gawk],[no]) - -if test "$GAWK" = "no" ; then - AC_MSG_ERROR([Can not find GNU AWK (gawk).]) - exit 1; +dnl autoconf has an automatic test for AWK +if test -z "${AWK}"; then + AC_MSG_ERROR([Can not find AWK.]) + exit 1 fi AC_PATH_PROGS([XDG_OPEN],[xdg-open open],[no]) @@ -75,14 +74,14 @@ AC_PROG_MKDIR_P dnl check sbcl version SBCL_MIN_VERSION="1.4.16"; -SBCL_VERSION=`${LISP_COMPILER} --version | ${GAWK} -- '// {print $2}'` +SBCL_VERSION=`${LISP_COMPILER} --version | ${AWK} -- '// {print $2}'` CHECK_COMPILER_VERSION_P="yes" AC_ARG_ENABLE([check-sbcl-version], [AS_HELP_STRING([--disable-check-sbcl-version], [Disable checks for minimum supported SBCL version])], [], []) if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then - SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | awk -f compare_version.awk` + SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | ${AWK} -f compare_version.awk` AC_MSG_CHECKING([if the compiler is too old]) AC_MSG_NOTICE([To Disable this tests use type './configure --disable-check-sbcl-version.]) From 3292d26067f68a7df054e1553dda044eae645f0a Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 26 Feb 2021 19:41:05 +0000 Subject: [PATCH 3/3] GNU AWK is no more a requirement --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 6559312..cdc6f26 100644 --- a/README.org +++ b/README.org @@ -41,7 +41,7 @@ + to install the package, including running the script to install lisp libraries (~quick_quicklisp.sh~): - - GNU AWK (Gawk); + - AWK; - BASH shell. + to run the program: