summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng-src/configure.ac
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-06-07 13:05:59 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-06-07 13:05:59 +0000
commit4859eef09993c3228d2dce3482106067dad0ced4 (patch)
tree711b97a9dfa593ed7ee76239ed5d37ee0c755e7e /Build/source/libs/libpng/libpng-src/configure.ac
parent4ac79aab0522833ab7dba2a5a0833a9c34847286 (diff)
libpng 1.6.22
git-svn-id: svn://tug.org/texlive/trunk@41311 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/libpng-src/configure.ac')
-rw-r--r--Build/source/libs/libpng/libpng-src/configure.ac38
1 files changed, 35 insertions, 3 deletions
diff --git a/Build/source/libs/libpng/libpng-src/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac
index 8af866d266c..d4121b1a79c 100644
--- a/Build/source/libs/libpng/libpng-src/configure.ac
+++ b/Build/source/libs/libpng/libpng-src/configure.ac
@@ -1,5 +1,12 @@
# configure.ac
+# Copyright (c) 2004-2015 Glenn Randers-Pehrson
+# Last changed in libpng 1.6.22 [May 26, 2016]
+
+# This code is released under the libpng license.
+# For conditions of distribution and use, see the disclaimer
+# and license in png.h
+
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Minor upgrades (compatible ABI): increment the package version
@@ -18,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
-AC_INIT([libpng],[1.6.21],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.22],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -39,10 +46,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
-PNGLIB_VERSION=1.6.21
+PNGLIB_VERSION=1.6.22
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=21
+PNGLIB_RELEASE=22
dnl End of version number stuff
@@ -107,6 +114,25 @@ AC_ARG_ENABLE(werror,
CFLAGS="$sav_CFLAGS"
fi],)
+# For GCC 5 the default mode for C is -std=gnu11 instead of -std=gnu89
+# In pngpriv.h we request just the POSIX 1003.1 and C89 APIs by defining _POSIX_SOURCE to 1
+# This is incompatible with the new default mode, so we test for that and force the
+# "-std=c89" compiler option:
+AC_MSG_CHECKING([if we need to force back C standard to C89])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ [#define _POSIX_SOURCE 1]
+ [#include <stdio.h>]
+ ])],
+ AC_MSG_RESULT(no),[
+ if test "x$GCC" != "xyes"; then
+ AC_MSG_ERROR(
+ [Forcing back to C89 is required but the flags are only known for GCC])
+ fi
+ AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -std=c89"
+])
+
# Checks for header files.
AC_HEADER_STDC
@@ -120,6 +146,12 @@ AC_C_RESTRICT
AC_FUNC_STRTOD
AC_CHECK_FUNCS([memset], , AC_MSG_ERROR(memset not found in libc))
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)) )
+
+# Some later POSIX 1003.1 functions are required for test programs, failure here
+# is soft (the corresponding test program is not built).
+AC_CHECK_FUNC([clock_gettime],,[AC_MSG_WARN([not building timepng])])
+AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "$ac_cv_func_clock_gettime" = "yes"])
+
AC_ARG_WITH(zlib-prefix,
AS_HELP_STRING([[[--with-zlib-prefix]]],
[prefix that may have been used in installed zlib]),