On Monday, April 4, 2022, mat <mnieuw@zap.a2000.nl> wrote:
On Mon, 2022-04-04 at 16:18 +0300, Andrew Randrianasulu wrote:


On Monday, April 4, 2022, <mnieuw@zap.a2000.nl> wrote:
Hi Andrew,

In configure.ac is a test for Android with "uname -o" .

The -o option is not available in macOS. On Linux and macOS, simply
"uname" returns the OS name (Linux or Darwin). Does this work for
Termux too (returning Android or at least something where you can act
on)?

yeah, 'uname -o' also does not work on netbsd. 

on termux I have

$ uname -o
Android
$ uname
Linux
$

Ok, then a test first with "uname" seems best, if it does not return "Darwin" then "uname -o" . I can test freeBSD too.


anyway, on some linux systems (void linux) default shell also dislikes += constructs, and I hand-edit configure as created by ./autogen.sh  there.. 

thing  is, bash can be for example in/usr/pkg/bin, (netbsd) or in some other location. not sure how to convince autotools to search for bash and put this (non-default) interpreter at very first line in our configure...

I think many of the thirdparty stuff only works properly with bash too.
So we should detect which system we're running on and make sure bash is the shell.
Or, if there is no /bin/bash, stop the process. If /bin/bash is missing, then probably more too.

thing is, bash can be instalked by default in some other place. some say to use '/usr/bin/env bash' instead.. 

https://stackoverflow.com/questions/16365130/what-is-the-difference-between-usr-bin-env-bash-and-usr-bin-bash


MatN