#!/bin/sh

. config/options $1

CFLAGS_FOR_BUILD="$HOST_CFLAGS"
CXXFLAGS_FOR_BUILD="$HOST_CXXFLAGS"
CPPFLAGS_FOR_BUILD="$HOST_CPPFLAGS"
LDFLAGS_FOR_BUILD="$HOST_LDFLAGS"

cd $PKG_BUILD
libblkid_is_recent="yes" \
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --disable-static \
            --enable-shared \
            --with-sysroot="$SYSROOT_PREFIX/usr" \
            --enable-nfsv3 \
            --enable-nfsv4 \
            --disable-nfsv41 \
            --disable-gss \
            --disable-kprefix \
            --enable-uuid \
            --enable-mount \
            --disable-tirpc \
            --disable-ipv6 \
            --enable-mountconfig \
            --without-tcp-wrappers \
            --without-krb5 \
            --disable-caps \
            --enable-largefile \
            --with-mountfile=/etc/nfsmounts.conf \
            --with-gnu-ld

make
