]> granicus.if.org Git - transmission/commitdiff
use pkg-config to get the zlib cflags/libs; remove obsolete zlib.m4 macro
authorJordan Lee <jordan@transmissionbt.com>
Sun, 13 Jul 2014 21:54:56 +0000 (21:54 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 13 Jul 2014 21:54:56 +0000 (21:54 +0000)
cli/Makefile.am
configure.ac
daemon/Makefile.am
gtk/Makefile.am
libtransmission/Makefile.am
m4/zlib.m4 [deleted file]
utils/Makefile.am

index 7c2bc72bc2d207be0949d510f25583d17ab91995..fb77a391b3e2b3851cac50136c5f89825215ae24 100644 (file)
@@ -7,9 +7,6 @@ AM_CFLAGS = \
     @ZLIB_CFLAGS@ \
     @PTHREAD_CFLAGS@
 
-AM_LDFLAGS = \
-    @ZLIB_LDFLAGS@
-
 bin_PROGRAMS = transmission-cli
 
 dist_man_MANS = transmission-cli.1
index 733d7ebc9f9d54f05d7074d61b356bf07a62705e..6ea9d8a0d25312e9f02437fa96e3582bb1048760 100644 (file)
@@ -42,6 +42,8 @@ LIBEVENT_MINIMUM=2.0.10
 AC_SUBST(LIBEVENT_MINIMUM)
 OPENSSL_MINIMUM=0.9.4
 AC_SUBST(OPENSSL_MINIMUM)
+ZLIB_MINIMUM=1.2.5
+AC_SUBST(ZLIB_MINIMUM)
 
 ##
 ##
@@ -112,7 +114,7 @@ AC_SEARCH_LIBS([quotacursor_skipidtype], [quota])
 PKG_CHECK_MODULES(OPENSSL, [openssl >= $OPENSSL_MINIMUM], , [CHECK_SSL()])
 PKG_CHECK_MODULES(LIBCURL, [libcurl >= $CURL_MINIMUM])
 PKG_CHECK_MODULES(LIBEVENT, [libevent >= $LIBEVENT_MINIMUM])
-AC_PATH_ZLIB
+PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_MINIMUM])
 
 AC_SYS_LARGEFILE
 AC_CHECK_FUNCS([lseek64])
index 88b61a40722a96b95bf06a3bf4896d112f8af24c..7f1ee907addfc42dd86efacf0efb89c7d99c4ea9 100644 (file)
@@ -8,9 +8,6 @@ AM_CFLAGS = \
     @ZLIB_CFLAGS@ \
     @PTHREAD_CFLAGS@
 
-AM_LDFLAGS = \
-    @ZLIB_LDFLAGS@
-
 EXTRA_DIST = \
     transmission-daemon.service
 
index d5929a9dd51cb561b7769a6f61e38c99f04b585b..f292482750d888124d079cb58d743658f41d5149 100644 (file)
@@ -25,9 +25,6 @@ AM_CFLAGS = \
     @ZLIB_CFLAGS@ \
     @PTHREAD_CFLAGS@
 
-AM_LDFLAGS = \
-    @ZLIB_LDFLAGS@
-
 noinst_HEADERS = \
     actions.h \
     conf.h \
index e841a2d2bc384467d05a34c5aeef4afaed6027d9..0fd422a2c6345d62382c548a658a845ebbe516af 100644 (file)
@@ -161,9 +161,6 @@ TESTS = \
 
 noinst_PROGRAMS = $(TESTS)
 
-apps_ldflags = \
-  @ZLIB_LDFLAGS@
-
 apps_ldadd = \
   ./libtransmission.a  \
   @LIBUPNP_LIBS@ \
diff --git a/m4/zlib.m4 b/m4/zlib.m4
deleted file mode 100644 (file)
index b9c3a55..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
- AC_DEFUN([AC_PATH_ZLIB], [
-       AC_ARG_WITH(zlib,
-                    AC_HELP_STRING([--with-zlib=DIR],
-                                 [search for ZLIB in DIR/include and DIR/lib]),
-                    [for dir in `echo "$withval" | tr : ' '`; do
-    if test -d $dir/include; then
-      ZLIB_CFLAGS="$ZLIB_CFLAGS -I$dir/include"
-    fi
-    if test -d $dir/lib; then
-      ZLIB_LDFLAGS="$ZLIB_LDFLAGS -L$dir/lib"
-    fi
-  done[]])
-
-        AC_ARG_WITH(zlib-includes,
-                    AC_HELP_STRING([--with-zlib-includes=DIR],
-                                  [search for ZLIB includes in DIR]),
-                   [for dir in `echo "$withval" | tr : ' '`; do
-    if test -d $dir; then
-      ZLIB_CFLAGS="$ZLIB_CFLAGS -I$dir"
-    fi
-  done[]])
-
-ac_zlib_saved_CFLAGS="$CFLAGS"
-ac_zlib_saved_LDFLAGS="$LDFLAGS"
-ac_zlib_saved_LIBS="$LIBS"
-CFLAGS="$CFLAGS $ZLIB_CFLAGS"
-LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
-ac_have_zlibh=no
-ac_have_zlib=no
-       touch /tmp/dummy1_zlib.h
-        AC_CHECK_HEADERS([/tmp/dummy1_zlib.h], [ac_have_zlibh=yes], [ac_have_zlibh=no],
-               [#include "zlib.h"])
-       rm /tmp/dummy1_zlib.h
-       if test $ac_have_zlibh = yes; then
-               AC_SEARCH_LIBS(gzopen, [z], [ac_have_zlib=yes], [ac_have_zlib=no])
-       fi
-# List of places to try
-testdirs="$HOME/opt/zlib $OBITINSTALL/other"
-for dir in $testdirs; do
-       if test $ac_have_zlib = no; then
-               if  test -f $dir/include/zlib.h; then
-                       ZLIB_CFLAGS="-I$dir/include"
-                       CPPFLAGS="$ac_zlib_saved_CPPFLAGS $ZLIB_CFLAGS"
-                       ZLIB_LDFLAGS="-L$dir/lib"
-                       LDFLAGS="$ac_zlib_saved_LDFLAGS $ZLIB_LDFLAGS"
-                       touch /tmp/dummy3_zlib.h
-                       AC_CHECK_HEADERS([/tmp/dummy3_zlib.h], [ac_have_zlibh=yes], [ac_have_zlibh=no],
-                               [#include "zlib.h"])
-                       rm /tmp/dummy3_zlib.h
-                       if test $ac_have_zlibh = yes; then
-                               # Force check
-                               ac_cv_search_gzopen="  "
-                               AC_SEARCH_LIBS(gzopen, [z], [ac_have_zlib=yes], [ac_have_zlib=no])
-                       fi
-                       if test $ac_have_zlib = yes ; then
-                               if test $ac_have_zlibh = yes ; then
-                                       break;
-                               fi
-                       fi
-               fi
-       fi
-done[]
-if test $ac_have_zlib = no; then
-       AC_MSG_WARN([cannot find ZLIB library])
-fi
-if test $ac_have_zlibh = no; then
-       AC_MSG_WARN([cannot find ZLIB headers])
-       ac_have_zlib=no
-fi
-if test $ac_have_zlib = yes; then
-       AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if ZLIB is available.])
-fi
-ZLIB_LIBS="$LIBS"
-CFLAGS="$ac_zlib_saved_CFLAGS"
-LDFLAGS="$ac_zlib_saved_LDFLAGS"
-LIBS="$ac_zlib_saved_LIBS"
-       AC_SUBST(ZLIB_CFLAGS)
-       AC_SUBST(ZLIB_LDFLAGS)
-       AC_SUBST(ZLIB_LIBS)
-])
index 1e710fc8e1a2f39c08071c7c51f9919109803354..ad4023f240f53e249bb7c66fb2f64bf0bd20775e 100644 (file)
@@ -7,9 +7,6 @@ AM_CFLAGS = \
     @ZLIB_CFLAGS@ \
     @PTHREAD_CFLAGS@
 
-AM_LDFLAGS = \
-    @ZLIB_LDFLAGS@
-
 bin_PROGRAMS = \
     transmission-create \
     transmission-edit \