10 usage: $0 [-F] [-b build-type] [-O] [mudir]
13 -b: MuPDF's build type [default native]
14 -O: use ocamlfind for lablGL discovery
16 build-type = debug|release|native
17 mudir = path to MuPDF's git checkout
22 while getopts eFb
:O opt
; do
24 F
) fontconfig
=true
; cflags
="$cflags -DUSE_FONTCONFIG";;
25 b
) buildtype
="$OPTARG";;
33 test -e "$mupdf" || usage
"Don't know where to find MuPDF's git checkout" 1
35 pkgs
="freetype2 zlib openssl" # j(peg|big2dec)?
36 test $fontconfig && pkgs
="$pkgs fontconfig" || true
39 expr >/dev
/null
"$0" : "/.*" && {
42 helpcmdl
=" -f $(dirname $path)/build.ninja"
49 builddir
=$
(cd $builddir >/dev
/null
$builddir && pwd -P)
51 libs
="$(pkg-config --libs $pkgs) -ljpeg -ljbig2dec -lopenjpeg"
54 lablgldir
="$(ocamlfind query lablgl)" ||
exit 1
55 lablglcflags
="-I $lablgldir"
57 lablglcflags
="-I +lablGL"
61 cflags=$cflags $(pkg-config --cflags $pkgs)
63 srcdir=$(cd >/dev/null $(dirname $0) && pwd -P)
67 lablglcflags=$lablglcflags
69 test $
(uname
-m) = "x86_64" && {
70 echo 'cflags=$cflags -fPIC'
75 Configuration results are saved in $(pwd -P)/.config
76 To build - type: ninja$helpcmdl