config.sh.in 1.16 KB
Newer Older
Andrei Paskevich's avatar
Andrei Paskevich committed
1
#!/bin/sh
2

3
config=src/util/config.ml
4
makefileconfig=share/Makefile.config
5

6 7 8 9
bindir="$BINDIR"
libdir="$LIBDIR/why3"
datadir="$DATADIR/why3"
ocamllib="@OCAMLINSTALLLIB@/why3"
10 11
localdir="None"

12 13 14 15 16 17 18
if [ "@enable_relocation@" = "yes" ]; then
    libdir='Filename.concat (Filename.concat (Filename.dirname
        (Filename.dirname Sys.executable_name)) "lib") "why3"'
    datadir='Filename.concat (Filename.concat (Filename.dirname
        (Filename.dirname Sys.executable_name)) "share") "why3"'
    localdir="None"
elif [ "@enable_local@" = "yes" ]; then
19 20 21 22
    bindir="@LOCALDIR@/bin"
    libdir="@LOCALDIR@/lib"
    datadir="@LOCALDIR@/share"
    ocamllib="$libdir/why3"
23 24 25
    localdir="Some \"@LOCALDIR@\""
fi

26
echo "
27 28
let version   = \"@VERSION@\"

29 30
let libdir    = \"$libdir\"
let datadir   = \"$datadir\"
MARCHE Claude's avatar
MARCHE Claude committed
31
let localdir  = $localdir
32
" > $config
33 34 35 36

echo "
OCAMLBEST   = @OCAMLBEST@
BIGINTLIB   = @BIGINTLIB@
37 38
INCLUDE     = @BIGINTINCLUDE@ -I \"$ocamllib\"
INCLUDEALL  = @BIGINTINCLUDE@ @ZIPINCLUDE@ @MENHIRINCLUDE@ -I \"$ocamllib\"
39 40
" > $makefileconfig

MARCHE Claude's avatar
MARCHE Claude committed
41 42 43
if [ "@enable_relocation@" = "no" ]; then

echo "
44 45 46
BINDIR      = \"$bindir\"
LIBDIR      = \"$libdir\"
DATADIR     = \"$datadir\"
MARCHE Claude's avatar
MARCHE Claude committed
47 48
" >> $makefileconfig

49
fi