From ffebbcd2dee04b8c06e90432618e0e013ac5b7dc Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sun, 30 Mar 2014 13:42:48 -0400 Subject: unrpyc -> ast2json --- configure | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 configure (limited to 'configure') 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 -- cgit v1.2.3-70-g09d2