$(PKG)_DEPENDS_ON += zlib

$(PKG)_CONFIGURE_ENV += \
	ac_cv_file__proc_sys_kernel_core_pattern=yes \
	ac_cv_path_PYTHON="" \
	fu_cv_sys_stat_statvfs64=yes \
	libreplace_cv_HAVE_C99_VSNPRINTF=yes \
	libreplace_cv_HAVE_GETADDRINFO=no \
	libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes \
	libreplace_cv_HAVE_IFACE_AIX=no \
	libreplace_cv_HAVE_IFACE_GETIFADDRS=no \
	libreplace_cv_HAVE_IFACE_IFCONF=yes \
	libreplace_cv_HAVE_IPV6=$(if $(FREETZ_TARGET_IPV6_SUPPORT),yes,no) \
	libreplace_cv_HAVE_MMAP=yes \
	libreplace_cv_HAVE_SECURE_MKSTEMP=yes \
	libreplace_cv_REPLACE_INET_NTOA=no \
	LINUX_LFS_SUPPORT=yes \
	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
	samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \
	samba_cv_HAVE_BROKEN_GETGROUPS=no \
	samba_cv_HAVE_BROKEN_READDIR_NAME=no \
	samba_cv_HAVE_BROKEN_READLINK=no \
	samba_cv_HAVE_DEV64_T=no \
	samba_cv_HAVE_DEVICE_MAJOR_FN=yes \
	samba_cv_HAVE_DEVICE_MINOR_FN=yes \
	samba_cv_HAVE_errwarn=no \
	samba_cv_HAVE_FCNTL_LOCK=yes \
	samba_cv_HAVE_FTRUNCATE_EXTEND=yes \
	samba_cv_HAVE_INO64_T=no \
	samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no \
	samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
	samba_cv_HAVE_KERNEL_SHARE_MODES=yes \
	samba_cv_have_longlong=yes \
	samba_cv_HAVE_MAKEDEV=yes \
	samba_cv_HAVE_OFF64_T=no \
	samba_cv_HAVE_qhalt=no \
	samba_cv_have_setresgid=yes \
	samba_cv_have_setresuid=yes \
	samba_cv_HAVE_STRUCT_FLOCK64=yes \
	samba_cv_HAVE_TRUNCATED_SALT=no \
	samba_cv_HAVE_UNSIGNED_CHAR=no \
	samba_cv_HAVE_w2=no \
	samba_cv_HAVE_Wdeclaration_after_statement=yes \
	samba_cv_HAVE_Werror_implicit_function_declaration=yes \
	samba_cv_HAVE_Werror=yes \
	samba_cv_HAVE_WRFILE_KEYTAB=no \
	samba_cv_linux_getgrouplist_ok=no \
	samba_cv_REALPATH_TAKES_NULL=yes \
	samba_cv_SIZEOF_DEV_T=yes \
	samba_cv_SIZEOF_INO_T=yes \
	samba_cv_SIZEOF_OFF_T=yes \
	samba_cv_SIZEOF_TIME_T=no \
	samba_cv_TIME_T_MAX=no \
	samba_cv_USE_SETRESUID=yes \
	samba_cv_USE_SETREUID=yes \
	vfsfileid_cv_statfs=yes

$(PKG)_CONFIGURE_OPTIONS += \
	--exec-prefix=/usr \
	--prefix=/ \
	--disable-avahi \
	--disable-cups \
	--disable-pie \
	--disable-relro \
	--disable-shared-libs \
	--disable-static \
	--disable-swat \
	--with-codepagedir=$(SAMBA_CODEPAGES_DIR) \
	--with-configdir=/mod/etc/samba \
	--with-included-iniparser \
	--with-included-popt=no \
	--with-lockdir=/var/lock \
	--with-logfilebase=/var/log \
	--with-nmbdsocketdir=/var/nmbd \
	--with-piddir=/var/run \
	--with-privatedir=/mod/etc/samba \
	--with-sendfile-support \
	--with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain \
	--with-syslog \
	--without-ads \
	--without-cluster-support \
	--without-krb5 \
	--without-ldap \
	--without-libaddns \
	--without-libnetapi \
	--without-libsmbclient \
	--without-libsmbsharemodes \
	--without-libtalloc \
	--without-libtevent \
	--without-libtdb \
	--without-pam \
	--without-winbind
