8 echo "usage: $0 [-e] [-b build-type] [path-to-git-checkout-of-mupdf]"
10 echo -- " -e: use EGL"
11 echo -- " -b: mupdf build type [default native]"
15 while getopts eb
: opt
; do
17 e
) egl
="egl"; cflags
="-DUSE_EGL";;
18 b
) buildtype
="$OPTARG";;
22 shift $
(($OPTIND - 1))
26 echo "Don't know where to find mupdf's git checkout"
29 pkgs
="freetype2 fontconfig zlib x11 openssl libopenjp2" # j(peg|big2dec)?
30 test -z "$egl" || pkgs
="$pkgs egl"
33 expr "$0" : "/.*" >/dev
/null
&& {
36 helpcmdl
=" -f $(dirname $path)/build.ninja"
42 absbuilddir
=$
(cd $builddir && pwd -P)
44 (echo "cflags=$cflags $(pkg-config --cflags $pkgs)"
45 echo "lflags=$(pkg-config --libs $pkgs) -ljbig2dec -ljpeg -lz"
46 echo "srcdir=$(dirname $path)"
47 echo "buildtype=$buildtype"
49 echo "builddir=$builddir"
50 echo "absbuilddir=$absbuilddir"
51 test $
(uname
-m) = "x86_64" && {
52 echo "cflags=\$cflags -fPIC"
56 echo "To build - type: ninja$helpcmdl"