texlive[46308] Build/source/libs/libpng: reinstate -stdc=c89 check
commits+karl at tug.org
commits+karl at tug.org
Sun Jan 14 18:25:28 CET 2018
Revision: 46308
http://tug.org/svn/texlive?view=revision&revision=46308
Author: karl
Date: 2018-01-14 18:25:27 +0100 (Sun, 14 Jan 2018)
Log Message:
-----------
reinstate -stdc=c89 check
Modified Paths:
--------------
trunk/Build/source/libs/libpng/ChangeLog
trunk/Build/source/libs/libpng/configure
trunk/Build/source/libs/libpng/configure.ac
Modified: trunk/Build/source/libs/libpng/ChangeLog
===================================================================
--- trunk/Build/source/libs/libpng/ChangeLog 2018-01-14 06:16:36 UTC (rev 46307)
+++ trunk/Build/source/libs/libpng/ChangeLog 2018-01-14 17:25:27 UTC (rev 46308)
@@ -1,3 +1,8 @@
+2018-01-14 Karl Berry <karl at freefriends.org>
+
+ * configure.ac (-std=c89): reinstate check, now copying configure
+ block from upstream; reautoconf.
+
2017-12-02 Karl Berry <karl at freefriends.org>
Import ARM support from upstream to TL configure.
Modified: trunk/Build/source/libs/libpng/configure
===================================================================
--- trunk/Build/source/libs/libpng/configure 2018-01-14 06:16:36 UTC (rev 46307)
+++ trunk/Build/source/libs/libpng/configure 2018-01-14 17:25:27 UTC (rev 46308)
@@ -4025,6 +4025,9 @@
+ac_config_headers="$ac_config_headers config.h"
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5039,20 +5042,18 @@
-ac_config_headers="$ac_config_headers config.h"
-
-
-if false; then
# 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:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to force back C standard to C89" >&5
$as_echo_n "checking if we need to force back C standard to C89... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#define _POSIX_SOURCE 1
-#include <stdio.h>
+ #define _POSIX_SOURCE 1
+ #include <stdio.h>
+
int
main ()
{
@@ -5066,16 +5067,15 @@
$as_echo "no" >&6; }
else
-if test "x$GCC" != "xyes"; then
- as_fn_error $? "Forcing back to C89 is required but the flags are unknown for other compilers than GCC" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ if test "x$GCC" != "xyes"; then
+ as_fn_error $? "Forcing back to C89 is required but the flags are only known for GCC" "$LINENO" 5
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-CFLAGS="$CFLAGS -std=c89"
+ CFLAGS="$CFLAGS -std=c89"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
# Checks for header files.
ac_ext=c
Modified: trunk/Build/source/libs/libpng/configure.ac
===================================================================
--- trunk/Build/source/libs/libpng/configure.ac 2018-01-14 06:16:36 UTC (rev 46307)
+++ trunk/Build/source/libs/libpng/configure.ac 2018-01-14 17:25:27 UTC (rev 46308)
@@ -17,6 +17,8 @@
KPSE_BASIC([libpng])
+AC_CONFIG_HEADERS([config.h])
+
AC_PROG_CC
AM_PROG_AS
AC_PROG_RANLIB
@@ -24,23 +26,24 @@
KPSE_COMPILER_VISIBILITY
-AC_CONFIG_HEADERS([config.h])
-
-if false; then
# 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 unknown for other compilers than GCC])
-fi
-AC_MSG_RESULT(yes)
-CFLAGS="$CFLAGS -std=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"
])
-fi
# Checks for header files.
AC_HEADER_STDC
More information about the tex-live-commits
mailing list