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

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

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

CFLAGS="${CFLAGS} -DSYNO"
GSSAPI_PATH="no"

if [ "${PLATFORM_FAMILY}" == "SYNOPLAT_F_X86_64" ]; then
    GSSAPI_PATH="/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr"
fi

env CC="${CC}" CFLAGS="${CFLAGS}" BUILD_CC=gcc \
	./configure ${ConfigOpt} \
	--prefix=/ \
	--enable-largefile \
	--enable-epoll \
	--with-gssapi=${GSSAPI_PATH} \
	--with-dlopen=yes \
	--with-maxminddb=no \
	--disable-auto-validation \
	--disable-geoip

make ${MAKE_FLAGS}

