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

case ${MakeClean} in
	[Yy][Ee][Ss])
		if [ -f Makefile.conf ]; then
			make clean
		fi
		;;
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="${CFLAGS}" LDFLAGS="${LDFLAGS} -Wl,-rpath,/usr/syno/lib" \
	./configure.syno ${ConfigOpt} \
	--prefix="${SynoDir}" \
	--libexecdir="${SynoDir}/bin" \
	--with-xml=/source/expat-2.x \
	--enable-inotify \
	--with-dbus-user=root \
	--disable-doxygen-docs \
	ac_cv_have_abstract_sockets=yes \
	--enable-abstract-sockets

make ${MAKE_FLAGS}
