~mirabilos/mksh/MAIN

« back to all changes in this revision

Viewing changes to Build.sh

  • Committer: tg
  • Date: 2024-08-17 23:33:47 UTC
  • Revision ID: tg-20240817233347-mo5oyipxuj2fg7c1
further portability fixes etm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.857 2024/07/08 16:16:55 tg Exp $'
 
2
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.858 2024/08/17 23:33:47 tg Exp $'
3
3
set +evx
4
4
#-
5
5
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
53
53
 
54
54
        test x"$y" = x"0" && test x"$x" = x"$4" && return
55
55
        echo >&2 "E: your $1 does not work correctly!"
56
 
        echo >&2 "N: 'echo $2 | $3' exited $y and returned '$x' instead of '$4'"
57
 
        echo >&2 'N: install a better one and prepend e.g. /usr/local/bin to $PATH'
 
56
        echo >&2 "N: 'echo $2 | $3' exited $y and returned '$x'; expected '$4'"
 
57
        echo >&2 'N: install a better one and prepend its location to $PATH'
58
58
        exit 1
59
59
}
60
60
test_tool grep foobarbaz 'grep bar' foobarbaz
343
343
                        shift
344
344
                fi
345
345
                eval ft=\$HAVE_`upper $2`
 
346
                if test_z "$ft"; then
 
347
                        echo >&2
 
348
                        echo >&2 "E: test $f depends on $2 which is not defined yet"
 
349
                        exit 255
 
350
                fi
346
351
                shift
347
352
        fi
348
353
        fd=${3-$f}
2019
2024
#
2020
2025
# Compiler: check for stuff that only generates warnings
2021
2026
#
 
2027
: "${HAVE_ATTRIBUTE_EXTENSION=1}" # not a separate test but a dependency
2022
2028
ac_test attribute_bounded attribute_extension 0 'for __attribute__((__bounded__))' <<-'EOF'
2023
2029
        #include <string.h>
2024
2030
        #undef __attribute__