From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#36995: 27.0.50; configure enables HAVE_JPEG in spite of --without-X Date: Sun, 11 Aug 2019 11:39:09 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="179928"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 36995@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 11 11:40:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hwkKf-000kds-DG for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 11:40:09 +0200 Original-Received: from localhost ([::1]:39574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwkKe-0001IO-FV for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 05:40:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41694) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwkKZ-0001I6-R1 for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 05:40:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwkKY-00025j-Nv for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 05:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hwkKY-00025c-KR for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 05:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hwkKY-00022C-Er for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 05:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Aug 2019 09:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36995 X-GNU-PR-Package: emacs Original-Received: via spool by 36995-submit@debbugs.gnu.org id=B36995.15655163637756 (code B ref 36995); Sun, 11 Aug 2019 09:40:02 +0000 Original-Received: (at 36995) by debbugs.gnu.org; 11 Aug 2019 09:39:23 +0000 Original-Received: from localhost ([127.0.0.1]:44705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwkJv-000212-0N for submit@debbugs.gnu.org; Sun, 11 Aug 2019 05:39:23 -0400 Original-Received: from smtp.gentoo.org ([140.211.166.183]:54362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwkJr-00020k-Oy for 36995@debbugs.gnu.org; Sun, 11 Aug 2019 05:39:21 -0400 Original-Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 76F3D3498B7; Sun, 11 Aug 2019 09:39:12 +0000 (UTC) In-Reply-To: (Ulrich Mueller's message of "Sat, 10 Aug 2019 13:52:30 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164876 Archived-At: Tags: patch The patch included below fixes the problem for me. (It really adds a test for HAVE_X11||HAVE_W32 only, the rest are indentation changes.) >From 9fd108e4dd121f9cbe95397cdc743fca6c63b0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Sun, 11 Aug 2019 11:24:07 +0200 Subject: [PATCH] * configure.ac (HAVE_JPEG): Test for window system. (Bug#36995) --- configure.ac | 78 +++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index c093d8650d..401eb04160 100644 --- a/configure.ac +++ b/configure.ac @@ -3606,44 +3606,46 @@ HAVE_JPEG=no LIBJPEG= if test "${NS_IMPL_COCOA}" = yes; then : # Cocoa provides its own jpeg support, so do nothing. -elif test "${with_jpeg}" != "no"; then - AC_CACHE_CHECK([for jpeglib 6b or later], - [emacs_cv_jpeglib], - [OLD_LIBS=$LIBS - for emacs_cv_jpeglib in yes -ljpeg no; do - case $emacs_cv_jpeglib in - yes) ;; - no) break;; - *) LIBS="$LIBS $emacs_cv_jpeglib";; - esac - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision. */ - #include /* jpeglib.h needs FILE and size_t. */ - #include - #include - char verify[JPEG_LIB_VERSION < 62 ? -1 : 1]; - struct jpeg_decompress_struct cinfo; - ]], - [[ - jpeg_create_decompress (&cinfo); - WARNMS (&cinfo, JWRN_JPEG_EOF); - jpeg_destroy_decompress (&cinfo); - ]])], - [emacs_link_ok=yes], - [emacs_link_ok=no]) - LIBS=$OLD_LIBS - test $emacs_link_ok = yes && break - done]) - if test "$emacs_cv_jpeglib" != no; then - HAVE_JPEG=yes - AC_DEFINE([HAVE_JPEG], 1, - [Define to 1 if you have the jpeg library (typically -ljpeg).]) - ### mingw32 doesn't use -ljpeg, since it loads the library - ### dynamically when needed, and doesn't want a run-time - ### dependency on the jpeglib DLL. - test "$emacs_cv_jpeglib" != yes && test "${opsys}" != "mingw32" \ - && LIBJPEG=$emacs_cv_jpeglib +elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then + if test "${with_jpeg}" != "no"; then + AC_CACHE_CHECK([for jpeglib 6b or later], + [emacs_cv_jpeglib], + [OLD_LIBS=$LIBS + for emacs_cv_jpeglib in yes -ljpeg no; do + case $emacs_cv_jpeglib in + yes) ;; + no) break;; + *) LIBS="$LIBS $emacs_cv_jpeglib";; + esac + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision. */ + #include /* jpeglib.h needs FILE and size_t. */ + #include + #include + char verify[JPEG_LIB_VERSION < 62 ? -1 : 1]; + struct jpeg_decompress_struct cinfo; + ]], + [[ + jpeg_create_decompress (&cinfo); + WARNMS (&cinfo, JWRN_JPEG_EOF); + jpeg_destroy_decompress (&cinfo); + ]])], + [emacs_link_ok=yes], + [emacs_link_ok=no]) + LIBS=$OLD_LIBS + test $emacs_link_ok = yes && break + done]) + if test "$emacs_cv_jpeglib" != no; then + HAVE_JPEG=yes + AC_DEFINE([HAVE_JPEG], 1, + [Define to 1 if you have the jpeg library (typically -ljpeg).]) + ### mingw32 doesn't use -ljpeg, since it loads the library + ### dynamically when needed, and doesn't want a run-time + ### dependency on the jpeglib DLL. + test "$emacs_cv_jpeglib" != yes && test "${opsys}" != "mingw32" \ + && LIBJPEG=$emacs_cv_jpeglib + fi fi fi AC_SUBST(LIBJPEG) -- 2.22.0