bf1d82
#!/bin/bash
bf1d82
bf1d82
set -e
bf1d82
[ ! -z "$SRC_DIR" ] || (echo "env was not set" && false)
bf1d82
bf1d82
NAME="json-c-0.12.1"
bf1d82
cp --remove-destination -rup "$SRC_DIR/$NAME" "$BUILD_DIR/"
bf1d82
cd "$BUILD_DIR/$NAME"
bf1d82
set -e
bf1d82
bf1d82
export CFLAGS="-Wno-error=unknown-pragmas $CFLAGS"
bf1d82
export LIBS="-ladvapi32 -lintl"
bf1d82
bf1d82
./configure --host="$HOST" --prefix="$PREFIX" --enable-shared --disable-static
bf1d82
make || true
bf1d82
echo "#undef malloc" >> config.h
bf1d82
echo "#undef realloc" >> config.h
bf1d82
make -j8
bf1d82
make install
bf1d82
bf1d82
echo ""
bf1d82
echo "success"
bf1d82
echo ""