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

if checkPlatformFunction SYNO_SKIP_VIRTUAL_32; then
	SkipThisProject
	return
fi

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

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


ConfigOpt="$ConfigOpt --prefix=/usr --sysconfdir=/usr/syno/etc"
env CC="${CC}" LD="${LD}" AR="${AR}" STRIP="${STRIP}" RANLIB="${RANLIB}" NM="${NM}" CXX="${CXX}" \
	CFLAGS="-DSYNO -DSYNO_VIRTUAL_32 -I./ -I../ -I./include -I../include -I../../include -I../../../include ${CFLAGS}" \
	LDFLAGS="${LDFLAGS} " \
	CPPFLAGS="-DURANDOM_DEVICE=\\\"/dev/urandom\\\" -I./ -I../ -I./include -I../include -I../../include -P" \
	./configure ${ConfigOpt} \
		--with-threads \
		--disable-debug \
		--enable-syslog \
		--without-cyrus-sasl \
		--with-tls \
		--enable-crypt \
		--with-yielding-select=yes \
		--enable-overlays \
		--enable-ldap

echo "make depend"
make depend
echo "make"
make ${MAKE_FLAGS}


# vim:ft=sh
