dnl Version number stuff here:
-AC_INIT([libpng], [1.5.4], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.5.12], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
-PNGLIB_VERSION=1.5.4
+PNGLIB_VERSION=1.5.12
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
-PNGLIB_RELEASE=4
+PNGLIB_RELEASE=12
dnl End of version number stuff
# Checks for programs.
AC_LANG([C])
AC_PROG_CC
+AM_PROG_AS
AC_PROG_LD
AC_PROG_CPP
AC_CHECK_TOOL(SED, sed, :)
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
+AC_C_RESTRICT
# Checks for library functions.
AC_FUNC_STRTOD
AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
AC_ERROR([zlib not installed])))
+# The following is for pngvalid, to ensure it catches FP errors even on
+# platforms that don't enable FP exceptions, the function appears in the math
+# library (typically), it's not an error if it is not found.
+AC_CHECK_LIB([m], [feenableexcept])
+AC_CHECK_FUNCS([feenableexcept])
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
LIBPNG_DEFINES=$LIBPNG_DEFINES
AC_SUBST(LIBPNG_DEFINES)
+AC_MSG_CHECKING([if using Solaris linker])
+SLD=`$LD --version 2>&1 | grep Solaris`
+if test "$SLD"; then
+ have_solaris_ld=yes
+ AC_MSG_RESULT(yes)
+else
+ have_solaris_ld=no
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_SOLARIS_LD, test "$have_solaris_ld" = "yes")
+
AC_MSG_CHECKING([if libraries can be versioned])
# Special case for PE/COFF platforms: ld reports
# support for version-script, but doesn't actually
AC_MSG_RESULT(no)
;;
* )
-GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+
+if test "$have_solaris_ld" = "yes"; then
+ GLD=`$LD --help < /dev/null 2>&1 | grep 'M mapfile'`
+else
+ GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
+fi
+
if test "$GLD"; then
have_ld_version_script=yes
AC_MSG_RESULT(yes)
if test "$have_ld_version_script" = "yes"; then
AC_MSG_CHECKING([for symbol prefix])
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} "s:^PREFIX=::"`
+ | ${CPP-${CC-gcc} -E} - 2>&1 \
+ | ${EGREP-grep} "^PREFIX=" \
+ | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
AC_SUBST(SYMBOL_PREFIX)
AC_MSG_RESULT($SYMBOL_PREFIX)
fi
[binconfigs='${binconfigs}'])
AC_SUBST([binconfigs])
+# Because GCC by default assembles code with an executable stack, even though it
+# compiles C code with a non-executable stack, it is necessary to do a fixup
+# here (this may by GCC specific)
+AC_SUBST([AM_CCASFLAGS], [-Wa,--noexecstack])
+
+AC_ARG_ENABLE([arm-neon],
+ AC_HELP_STRING([--enable-arm-neon], [Enable ARM NEON optimizations]),
+ [if test "${enableval}" = yes; then
+ AC_DEFINE([PNG_ARM_NEON], [1], [Enable ARM NEON optimizations])
+ AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [1], [Align row buffers])
+ fi])
+AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" = yes])
+
# Config files, substituting as above
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
AC_CONFIG_FILES([libpng-config:libpng-config.in],