diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-04-26 11:45:54 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-04-26 11:45:54 +0100 |
commit | 30d9711f860351eedbc80edaf513c18ea9c6dd28 (patch) | |
tree | bd88fb869709a412e6662f0fe98e73e33e244bb1 /configure | |
parent | bb97e8aaa15217afe1f3fcdc93662ab03b8ae9d9 (diff) | |
download | luiml-master.tar.gz luiml-master.tar.xz luiml-master.zip |
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 43 |
1 files changed, 21 insertions, 22 deletions
@@ -4,30 +4,29 @@ libs=(luajit sdl2 pangoft2) CFLAGS+=(-std=c11 -fPIC) LDFLAGS+=(-shared) -usage () { - echo "Usage: $0 [-h|options...]" -} +usage () { echo "Usage: $0 [-h|options...]"; } + help () { - echo "Options:" - echo " -B ldlib Append ldlib to LDLIBS" - echo " -C cflag Append cflag to CFLAGS" - echo " -L ldflag Append ldflag to LDFLAGS" - echo " -P cppflag Append cppflag to CPPFLAGS" - echo " -c when Enable compiler colours (always|auto|off) [default: auto]" - echo " -d Enable debugging flags" - echo " -e Enable -Werror" - echo " -h Show this help" - echo " -o Enable optimisation flags" - echo " -v Print results of configuration" - echo " -w Enable warning flags" - echo "Environment:" - echo " CC C compiler" - echo " PKG_CONFIG pkg-config" + cat <<EOF +Options: + -B ldlib Append ldlib to LDLIBS + -C cflag Append cflag to CFLAGS + -L ldflag Append ldflag to LDFLAGS + -P cppflag Append cppflag to CPPFLAGS + -c when Enable compiler colours (always|auto|off) [default: auto] + -d Enable debugging flags + -e Enable -Werror + -h Show this help + -o Enable optimisation flags + -v Print results of configuration + -w Enable warning flags +Environment: + CC C compiler + PKG_CONFIG pkg-config +EOF } -exists() { - command -v "$1" >/dev/null 2>&1 -} +exists() { command -v "$1" >/dev/null 2>&1; } check() { what=$1 @@ -76,7 +75,7 @@ while getopts B:C:L:P:c:dehovw opt; do ?) usage >&2; exit 1;; esac done -if [[ $colour == auto ]] && exists tput && (( $(tput colors) >= 8 )); then +if [[ $colour == auto && -t 1 ]]; then colour=always fi if [[ $colour == always ]]; then |