need help with shell / configure

Stephan Bergmann sbergman at redhat.com
Sun Mar 24 15:34:34 PDT 2013


On 03/23/2013 09:25 PM, Mat M wrote:
> When working on it, I found that:
> AC_PATH_PROG(BASH, bash)
> if test -z "$BASH"; then
>      AC_MSG_ERROR([bash not found in \$PATH])
> fi
> AC_SUBST(BASH)
>
> and then,
> $ git grep BASH
> bin/bash-completion.in:@BASH_COMPLETION_SUFFIXES_CHECKS@
> bin/bash-completion.in:@BASH_COMPLETION_OOO_APPS@
> bin/generate-bash-completion:    if ($line =~
> m/\@BASH_COMPLETION_SUFFIXES_CHECKS\@/) {
> bin/generate-bash-completion:    } elsif ($line =~
> m/\@BASH_COMPLETION_OOO_APPS\@/) {
> config_host.mk.in:export OOO_SHELL=@BASH@
> configure.ac:AC_PATH_PROG(BASH, bash)
> configure.ac:if test -z "$BASH"; then
> configure.ac:AC_SUBST(BASH)
>
> and
>
> $ git grep OOO_SHELL
> config_host.mk.in:export OOO_SHELL=@BASH@
>
> So, is it still useful or could we remove BASH check and OOO_SHELL as
> well ?

I'm not sure I understand your question.  The LO build system requires 
Bash in places, esp. as the shell used to execute makefile recipe lines. 
  But that is unrelated to the fact that Autotools translates LO's 
configure.ac into a "#! /bin/sh" configure script, so that it should not 
use Bashisms.

(That said, it looks like OOO_SHELL is actually unused since we got rid 
of the old dmake-based build system, and could be dropped.  The use of 
Bash in gbuild is enforced via "SHELL=/usr/bin/env bash" in Makefile.mk, 
which should arguably be replaced with "SHELL=@BASH@".)

Stephan


More information about the LibreOffice mailing list