#!/bin/bash
# Copyright (c) 2000-2015 Synology Inc. All rights reserved.

case ${MakeClean} in
	[Yy][Ee][Ss])
		make distclean
		;;
esac

case ${CleanOnly} in
	[Yy][Ee][Ss])
		return
		;;
esac

env	CC=${CC} AR=${AR} LD=${LD} NM=${NM} RANLIB=${RANLIB} STRIP=${STRIP} \
	CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
	./configure ${ConfigOpt} \
		--prefix=/usr \
		--exec-prefix=/usr \
		--enable-libgdbm-compat \
		--disable-nls \
		--disable-rpath \
		--with-sysroot=${ToolChainSysRoot} \
		--without-libiconv-prefix \
		--without-libintl-prefix \
		--with-readline

make ${MAKE_FLAGS}
