How to change the shebang in 'configure' to require Bash

2018-03-18 Thread R. Diez
Hi all: I find it hard to write POSIX-compliant shell scripts. The lack of the 'pipefail' flag is specially problematic. I have described this issue here: http://rdiez.shoutwiki.com/wiki/Error_Handling_in_General_and_C%2B%2B_Exceptions_in_Particular#Set_the_pipefail_flag Therefore, I write mo

Re: How to change the shebang in 'configure' to require Bash

2018-03-20 Thread R. Diez
d over many years. But trying to change the shell requirement now is probably a big nightmare. Requiring a POSIX shell in the next version is an improvement, but POSIX is too limiting to really help. It is 2018. No wonder so many people want to ditch Autoconf!

Accelerate the 'configure' script

2022-04-27 Thread R. Diez
Hi all: I have this cross-compiling Autoconf project: https://github.com/rdiez/JtagDue/tree/master/Project I am not using Autoconf for portability, but mainly for handling C/C++ dependencies, so that not everything is rebuilt when I change one source file. This is just an example project, I h

How to prevent warning "The macro `AC_PROG_CC_C99' is obsolete"

2022-06-18 Thread R. Diez
Hi all: Macro AC_PROG_CC_C99 is obsolete as of Autoconf version 2.70 . Projects like OpenOCD are resorting to this kind of workaround: m4_version_prereq([2.70],[],[AC_PROG_CC_C99]) You can see it here: https://sourceforge.net/p/openocd/code/ci/master/tree/configure.ac Other projects are doi

Re: How to prevent warning "The macro `AC_PROG_CC_C99' is obsolete"

2022-06-18 Thread R. Diez
Actually, the trouble is that OpenOCD is not consistently using the m4_version_prereq solution. You're getting the message from the unprotected call to AC_PROG_CC_C99 in openocd-code/src/jtag/drivers/libjaylink/configure.ac. I hadn't realised, many thanks for your help. That file actually

Enabling shell error handling in configure.ac

2024-11-20 Thread R. Diez
Hi all: I normally enable the following options in my shell scripts: set -o errexit # Alias set -e set -o nounset # Alias set -u set -o pipefail # Now part of the POSIX/IEEE Std 1003.1-2024 specification too I tried enabling them in my configure.ac, and I got weird errors. I gather that most

Re: Enabling shell error handling in configure.ac

2024-11-30 Thread R. Diez
27;s actually the way to go in Autoconf: From 4f0ee11990ad794b61c8499f0a4e3777c9edc282 Mon Sep 17 00:00:00 2001 From: R. Diez Date: Sat, 30 Nov 2024 21:55:05 +0100 Subject: [PATCH] Enable "set -u" in bootstrap. Signed-off-by: R. Diez --- bootstrap | 5 - 1 file changed, 4 inserti

Re: Strange behaviour of AC_ARG_ENABLE with ./configure --help

2025-05-26 Thread R. Diez
First of all, thanks for your help. M4 macros are fine but as documented, AS_HELP_STRING does not expand its second argument, so you need to be careful about quoting when you use it. [...] If the defaults can be determined by m4 then you can use m4 to generate the help string. [...] All the he

Strange behaviour of AC_ARG_ENABLE with ./configure --help

2025-05-24 Thread R. Diez
Hi all: I am trying to change the default of an AC_ARG_ENABLE option depending on the host architecture. I am using the Autoconf 2.71 which comes with Ubuntu 22.04. I want to understand how Autoconf works, so let's not question for a moment whether changing an option's default this way actual