10 usage: $0 [-F] [-b build-type] [mudir]
13 -b: MuPDF's build type [default native]
15 build-type = debug|release|native
16 mudir = path to MuPDF's git checkout
21 while getopts eFb
: opt
; do
23 F
) fontconfig
=true
; cflags
="$cflags -DUSE_FONTCONFIG";;
24 b
) buildtype
="$OPTARG";;
31 test -e "$mupdf" || usage
"Don't know where to find MuPDF's git checkout" 1
33 pkgs
="freetype2 zlib openssl" # j(peg|big2dec)?
34 test $fontconfig && pkgs
="$pkgs fontconfig" || true
37 expr >/dev
/null
"$0" : "/.*" && {
40 helpcmdl
=" -f $(dirname $path)/build.ninja"
47 builddir
=$
(cd $builddir >/dev
/null
$builddir && pwd -P)
49 libs
="$(pkg-config --libs $pkgs) -ljpeg -ljbig2dec -lopenjpeg"
52 cflags=$cflags $(pkg-config --cflags $pkgs)
54 srcdir=$(cd >/dev/null $(dirname $0) && pwd -P)
59 test $
(uname
-m) = "x86_64" && {
60 echo 'cflags=$cflags -fPIC'
65 Configuration results are saved in $(pwd -P)/.config
66 To build - type: ninja$helpcmdl