-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure
executable file
·65 lines (53 loc) · 1.85 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
cat <<MSG
-------------------------------------------------------------------------------
| This configure file is provided in order for you to be able to build |
| liquidsoap without having to install all the dependencies. |
| If you want to use the libraries, use the configure of the subdirectories. |
| This script will build liquidsoap with features indicated in PACKAGES. |
| Edit it or build manually if you need something more specific. |
-------------------------------------------------------------------------------
MSG
OPTS=""
error=""
LIQDIR=`ls -d liquidsoap* | head -1`
BASEDIR=`dirname $0`
PWD=`cd ${BASEDIR} && pwd`
if [ ! -f PACKAGES ]; then
echo "Please copy PACKAGES.default to PACKAGES";
echo "and edit it to enable the packages you";
echo "want to enable.";
exit 1;
fi;
if [ ! -f $LIQDIR/configure ]; then
echo "You don't seem to have bootstraped yet. I'm doing it for you.";
./bootstrap;
fi;
packages=`grep -v '\#' PACKAGES`
liqdir=`ls -d liquidsoap* | head -n 1`
OPTS=""
for p in `for i in $packages ; do ls -d $i* | head -1 ; done` ; do
echo
echo "****** Configuring $p"
echo
if test "$p" = "$liqdir" ; then
if [ -f $p/dune-project ]; then
cd $p && dune build @install && cd ..
else
echo ./configure $OPTS $* > $liqdir/configure-with-options
cd $p && ./configure $OPTS $* && cd ..
fi
else
base=`echo $p | sed -e 's/ocaml-//' | sed -e 's/-.*//'`
LIBPATH=`cd $p && pwd`
if [ -f $p/dune-project ]; then
export OCAMLPATH="${LIBPATH}/_build/install/default/lib:$OCAMLPATH"
cd $p && dune clean && dune build @install && cd ..
else
OPTS="$OPTS --with-$base-dir=${LIBPATH}/src"
cd $p && OCAMLPATH="$OCAMLPATH" ./configure $OPTS && cd ..
fi
echo "current options: $OPTS"
fi
done
echo "${OCAMLPATH}" > .ocamlpath