From: Paul Eggert Date: Sun, 11 Aug 2013 22:58:47 +0000 (-0700) Subject: Add --with-zlib to 'configure'. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~320 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8d28d0ac2af6f38abb588efb9f673d0e74768e8a;p=emacs.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2384178e82c..e061b6ad4a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-08-11 Paul Eggert + + 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 * configure.ac: Test for zlib. diff --git a/configure.ac b/configure.ac index ca30b38dab4..8b565320df5 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,7 @@ OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) 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 @@ AC_SUBST(LIBPNG) 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 -lfreetype? ${HAVE_FREETYPE} 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