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

#. ${ScriptsDir}/include/exports

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

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

env CC="${CC}" CXX="${CXX}" LD="${LD}" AR=${AR} STRIP=${STRIP} RANLIB=${RANLIB} NM=${NM} \
	CFLAGS="${CFLAGS}" CXXFLAGS="$CXXFLAGS $CFLAGS" LDFLAGS="$LDFLAGS" \
	./configure ${ConfigOpt} \
	--disable-clients \
	--disable-servers \
	--enable-telnet \
	--enable-authentication \
	--with-krb5=${SysRootPrefix} \
	--bindir=/bin \
	--sysconfdir=/etc

make ${MAKE_FLAGS}
