PKGNAME=libpng
PKGSEC=libs
PKGDEP="zlib"
BUILDDEP="libpng"
PKGDES="Library and programs for reading and writing PNG files"

ABTYPE=autotools
# Note: --disable-hardware-optimizations
# We do not always enable SIMD optimizations due to differing port policies.
AUTOTOOLS_AFTER=(
	"--enable-tools"
	"--disable-hardware-optimizations"
)
AUTOTOOLS_AFTER__AMD64=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-intel-sse=yes"
)
# Intrinsics not available.
AUTOTOOLS_AFTER__ARMV4=(
	'--disable-arm-neon'
)
AUTOTOOLS_AFTER__ARM=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-arm-neon=yes"
)
AUTOTOOLS_AFTER__ARM64=(
	"${AUTOTOOLS_AFTER__ARM[@]}"
)
AUTOTOOLS_AFTER__ARMV7HF=(
	"${AUTOTOOLS_AFTER__ARM[@]}"
)
AUTOTOOLS_AFTER__LOONGARCH64=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-loongarch-lsx=yes"
)
AUTOTOOLS_AFTER__LOONGARCH64_NOSIMD=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-loongarch-lsx=no"
)
AUTOTOOLS_AFTER__LOONGISA=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-mips-mmi=yes"
)
AUTOTOOLS_AFTER__LOONGSON2F=(
	"${AUTOTOOLS_AFTER__LOONGISA[@]}"
)
AUTOTOOLS_AFTER__LOONGSON3=(
	"${AUTOTOOLS_AFTER__LOONGISA[@]}"
)
AUTOTOOLS_AFTER__PPC64EL=(
	"${AUTOTOOLS_AFTER[@]}"
	"--enable-powerpc-vsx=yes"
)

# FIXME: autogen.sh is intended only to generate 'configure' on systems
# that do not have it.  You have a complete 'configure', if you
# need to change Makefile.am or configure.ac you also need to
# run configure with the --enable-maintainer-mode option.
RECONF=0

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
