emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113803: Add --with-zlib to 'configure'.


From: Paul Eggert
Subject: [Emacs-diffs] trunk r113803: Add --with-zlib to 'configure'.
Date: Sun, 11 Aug 2013 22:58:50 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113803
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2013-08-11 15:58:47 -0700
message:
  Add --with-zlib to 'configure'.
  
  * configure.ac: Add --with-zlib option to 'configure', so that Emacs
  can be built without zlib.  Don't assume that -lz is needed on
  non-PNG hosts.  Mention zlib configuration status in 'configure' output.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-08-11 19:43:36 +0000
+++ b/ChangeLog 2013-08-11 22:58:47 +0000
@@ -1,3 +1,10 @@
+2013-08-11  Paul Eggert  <address@hidden>
+
+       Add --with-zlib to 'configure'.
+       * configure.ac: Add --with-zlib option to 'configure', so that Emacs
+       can be built without zlib.  Don't assume that -lz is needed on
+       non-PNG hosts.  Mention zlib configuration status in 'configure' output.
+
 2013-08-11  Lars Magne Ingebrigtsen  <address@hidden>
 
        * configure.ac: Test for zlib.

=== modified file 'configure.ac'
--- a/configure.ac      2013-08-11 19:43:36 +0000
+++ b/configure.ac      2013-08-11 22:58:47 +0000
@@ -211,6 +211,7 @@
 OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
 OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
 OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
+OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
 
 AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
  [use a file notification library (LIB one of: yes, gfile, inotify, w32, 
no)])],
@@ -2944,19 +2945,23 @@
 
 HAVE_ZLIB=no
 LIBZ=
-if test "${HAVE_PNG}" = "yes"; then
-  ### PNG depends on zlib, so if we have PNG, we have zlib.
-  HAVE_ZLIB=yes
-  AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if you have the zlib library (-lz).])
-else
-  ### No PNG, so check zlib ourselves.
-  LIBS="-lz $LIBS"
-  AC_CHECK_LIB(z, inflateEnd, HAVE_ZLIB=yes, HAVE_ZLIB=no)
-  if test "${HAVE_ZLIB}" = "yes"; then
-    AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if you have the zlib library (-lz).])
-    LIBZ=-lz
+if test "${with_zlib}" != "no"; then
+  if test "${HAVE_PNG}" = "yes"; then
+    ### PNG depends on zlib, so if we have PNG, we have zlib.
+    HAVE_ZLIB=yes
+  else
+    ### No PNG, so check zlib ourselves.
+    OLIBS=$LIBS
+    AC_SEARCH_LIBS([inflateEnd], [z], [HAVE_ZLIB=yes])
+    LIBS=$OLIBS
+    case $ac_cv_search_inflateEnd in
+      -*) LIBZ=$ac_cv_search_inflateEnd ;;
+    esac
   fi
 fi
+if test "${HAVE_ZLIB}" = "yes"; then
+  AC_DEFINE([HAVE_ZLIB], 1, [Define to 1 if you have the zlib library (-lz).])
+fi
 AC_SUBST(LIBZ)
 
 
@@ -4812,6 +4817,7 @@
 echo "  Does Emacs use -lm17n-flt?                              
${HAVE_M17N_FLT}"
 echo "  Does Emacs use -lotf?                                   ${HAVE_LIBOTF}"
 echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
+echo "  Does Emacs directly use zlib?                           ${HAVE_ZLIB}"
 
 echo "  Does Emacs use toolkit scroll bars?                     
${USE_TOOLKIT_SCROLL_BARS}"
 echo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]