6 REQUIRED="core datafile"
7 CFLAGS="-Iinclude `pkg-config --cflags sigc++-2.0`"
8 LIBS="`pkg-config --libs sigc++-2.0` -lpthread"
10 if [ "$MACHINE" = "x86_64" ]; then
11 MULTIARCH="x86_64-linux-gnu"
13 MULTIARCH="i386-linux-gnu"
15 if [ -e /usr/lib/libdl.so -o -e /usr/lib/$MULTIARCH/libdl.so ]; then
18 if [ -z "$LIBPATH" -o "${LIBPATH%%/*}" ]; then
19 LIBPATH=`pwd`/${LIBPATH:-..}
28 for i in $REQUIRED; do
29 path=`ls -1d $LIBPATH/*$i* 2>/dev/null | head -n1`
30 if [ -z "$path" -o ! -d "$path/source" ]; then
31 missing="$missing msp$i"
33 if [ $i = "core" ]; then
34 ln -sf $path/source/* include/msp/
36 ln -sf $path/source include/msp/$i
38 sources="$sources `find $path/source -name '*.cpp'`"
42 if [ ! -z "$missing" ]; then
43 echo "The following libraries were not found:$missing"
44 echo "I looked for them in $LIBPATH"
45 echo "If they are somewhere else, please adjust the LIBPATH environment variable."
49 echo "Compiling builder-stage1. This may take several minutes."
50 g++ $sources -o builder-stage1 $CFLAGS $LIBS
51 echo "Using builder-stage1 to compile builder."