2015-03-23 Andreas Schwab * configure.ac: Fix jpeg version check to work with gcc >= 5. Index: emacs-24.4/configure =================================================================== --- emacs-24.4.orig/configure +++ emacs-24.4/configure @@ -13858,11 +13858,13 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - version=JPEG_LIB_VERSION + #if JPEG_LIB_VERSION >= 62 + version 6b or later + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : + $EGREP "version 6b or later" >/dev/null 2>&1; then : $as_echo "#define HAVE_JPEG 1" >>confdefs.h else @@ -13928,11 +13930,13 @@ fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - version=JPEG_LIB_VERSION + #if JPEG_LIB_VERSION >= 62 + version 6b or later + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then : + $EGREP "version 6b or later" >/dev/null 2>&1; then : $as_echo "#define HAVE_JPEG 1" >>confdefs.h else Index: emacs-24.4/configure.ac =================================================================== --- emacs-24.4.orig/configure.ac +++ emacs-24.4/configure.ac @@ -3074,10 +3074,12 @@ if test "${opsys}" = "mingw32"; then AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl if test "${HAVE_JPEG}" = "yes"; then AC_DEFINE(HAVE_JPEG) - AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])], + AC_EGREP_CPP([version 6b or later], [#include - version=JPEG_LIB_VERSION -], + #if JPEG_LIB_VERSION >= 62 + version 6b or later + #endif + ], [AC_DEFINE(HAVE_JPEG)], [AC_MSG_WARN([libjpeg found, but not version 6b or later]) HAVE_JPEG=no]) @@ -3093,10 +3095,12 @@ elif test "${HAVE_X11}" = "yes" || test AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl if test "${HAVE_JPEG}" = "yes"; then AC_DEFINE(HAVE_JPEG) - AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])], - [#include - version=JPEG_LIB_VERSION -], + AC_EGREP_CPP([version 6b or later], + [#include + #if JPEG_LIB_VERSION >= 62 + version 6b or later + #endif + ], [AC_DEFINE(HAVE_JPEG)], [AC_MSG_WARN([libjpeg found, but not version 6b or later]) HAVE_JPEG=no])