#!/bin/sh

. config/options

$SCRIPTS/build toolchain
$SCRIPTS/build zlib
$SCRIPTS/build openssl

# link against librt because of undefined reference to 'clock_gettime'
  LDFLAGS="$LDFLAGS -lrt"

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --disable-static \
            --enable-shared \
            --disable-debug \
            --enable-http \
            --enable-ftp \
            --enable-file \
            --disable-ldap \
            --enable-proxy \
            --disable-ipv6 \
            --enable-thread \
            --with-random=/dev/urandom \

make

$MAKEINSTALL
