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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 most of my shell scripts exclusively for Bash. I also find some bashisms very convenient. I only test my scripts against Bash anyway, as I haven't got the time nor the inclination for more extensive testing. I never had a big problem in this respect, as the Bash shell is everywhere.

I find configure.ac scripts even harder to write than normal Bash scripts. Furthermore, ShellCheck cannot analyse them. Therefore, I want to limit my Autoconf 'configure' scripts to Bash.

I realise that this decision goes against Autoconf's portability principle. But even as a humble user, I am entitled to some freedom of choice. 8-)

I could write some code in configure.ac to detect the current shell. But is there any way to tell Autoconf to output a Bash shebang in the generated 'configure' script, instead of the standard "#! /bin/sh".

I read about variable CONFIG_SHELL, but that looks like it's meant for the user. Or can I set that variable inside configure.ac?

Please copy me on all the answers, as I am not subscribed to this mailing list.

Thanks in advance,
  rdiez

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux