Opened 8 years ago
Last modified 8 years ago
#5826 new Bug
automake zlib configuration check is broken in FreeBSD
Reported by: | missionsix | Owned by: | |
---|---|---|---|
Priority: | High | Milestone: | None Set |
Component: | Transmission | Version: | 2.84+ |
Severity: | Critical | Keywords: | configure freebsd |
Cc: |
Description
The following configure error happens on trunk.
build% ../Transmission/autogen.sh --disable-nls creating libtransmission/version.h libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' Creating aclocal.m4 ... Running glib-gettextize... Ignore non-fatal messages. Copying file po/Makefile.in.in ... checking pkg-config is at least version 0.9.0... yes checking for OPENSSL... no checking for OpenSSL... /usr checking for LIBCURL... yes checking for LIBEVENT... yes checking for ZLIB... configure: error: Package requirements (zlib >= 1.2.3) were not met: Package zlib was not found in the pkg-config search path. Perhaps you should add the directory containing `zlib.pc' to the PKG_CONFIG_PATH environment variable Package 'zlib', required by 'world', not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables ZLIB_CFLAGS and ZLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
zlib is not part of pkg-config on FreeBSD.
It's part of the base distribution, and as such, CHECK_MODULES will fail to find zlib.
PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_MINIMUM])
The proposed solution is to failback to a lib check if the zlib module is not found in pkg-config.
Checking for libz and zlib.h check will be sufficient in making sure the system has zlib.
Some care was taken to preserve the version check with in the failback case.
Attachments (1)
Change History (4)
comment:1 Changed 8 years ago by missionsix
comment:2 Changed 8 years ago by missionsix
The issue was introduced by this well intentioned commit:
comment:3 Changed 8 years ago by mike.dld
Should it be ZLIBS_LIBS='-lz' instead?
Note: See
TracTickets for help on using
tickets.
Proposed patch: