#!/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

ConfigOpt="$ConfigOpt --prefix=/usr"

striped_CFLAGS="${CFLAGS} -DSYNO_DOMAIN_USER"
env CC="${CC}" RANLIB=${RANLIB} STRIP=${STRIP} NM=${NM} LDFLAGS="${LDFLAGS}" \
	CFLAGS="${striped_CFLAGS}" \
	./configure ${ConfigOpt} \
	--with-saslauthd="/var/run/saslauthd" --enable-static \
	--enable-plain --enable-login --enable-ntlm --disable-gssapi
make ${MAKE_FLAGS}

