summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-30 13:42:48 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-30 14:03:21 -0400
commitffebbcd2dee04b8c06e90432618e0e013ac5b7dc (patch)
tree7d7d0125b38c67592eb3252b580ecadb6b752512 /configure
parent3adce8c047fb433702223e3fca1c5463f98e4805 (diff)
downloadhtml5ks-ffebbcd2dee04b8c06e90432618e0e013ac5b7dc.tar.xz
html5ks-ffebbcd2dee04b8c06e90432618e0e013ac5b7dc.zip
unrpyc -> ast2json
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure55
1 files changed, 55 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000..e5c7fe7
--- /dev/null
+++ b/configure
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+set -e
+
+OUT=Makefile.inc
+
+> "${OUT}"
+
+checking() {
+ printf "checking for %s... " "$1" >&2
+}
+
+check() {
+ checking="$1"
+ shift
+ var="${VAR:-${checking^^}}"
+ cmd="${!var}"
+ varflags="${var}FLAGS"
+ varflags="$@ ${!varflags}"
+ if [[ -z "${cmd}" ]]; then
+ cmd="${checking}"
+ fi
+ get=$(command -v "${cmd}")
+ e=$?
+ if [[ -n "$get" ]]; then
+ echo ${get}
+ echo ${var} := ${get} ${varflags} >> "${OUT}"
+ fi
+ return $e
+}
+
+rcheck() {
+ checking "$1"
+ if ! check "$@"; then
+ echo no
+ return 1
+ fi
+}
+
+ocheck() {
+ rcheck "$@" || true
+}
+
+checking "zopfli or gzip"
+VAR=GZIP check zopfli || check gzip -9
+
+rcheck apngasm
+rcheck convert
+rcheck cwebp -quiet -alpha_cleanup -m 6
+rcheck ffmpeg -v warning -y
+rcheck npm --quiet
+rcheck webpmux
+ocheck defluff
+ocheck pngquant
+ocheck zopflipng