Menu

#56 Fix Bashism in configure

None
closed-accepted
nobody
None
5
2022-09-26
2022-09-23
Sam James
No

configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.

Fixes configure warnings/errors like:

configure: WARNING: tcpd.h not found
./configure: 8453: test: X: unexpected operator
checking that generated files are newer than configure... done

Patch attached, thanks!

1 Attachments

Discussion

  • Jan Kara

    Jan Kara - 2022-09-23

    Thanks for the patch! It looks good. Can you please provide your attribution (Signed-off-by line) so that I can include it in the repository? Thanks!

     
  • Sam James

    Sam James - 2022-09-25

    Sure, thanks!

    Signed-off-by: Sam James <sam@gentoo.org>

     
  • Jan Kara

    Jan Kara - 2022-09-26
    • status: open --> closed-accepted
    • Group: -->
     
  • Jan Kara

    Jan Kara - 2022-09-26

    Thanks. Applied!

     
  • Sam James

    Sam James - 2022-09-26

    Thank you very much!

     

Anonymous
Anonymous

Add attachments
Cancel