From: Guido Günther Date: Thu, 25 Oct 2012 17:37:44 +0000 (+0200) Subject: stop configure if '--with-system-bz2' was passed, but no libbz2 is around X-Git-Tag: archive/raspbian/1%68.6.0-1_deb10u1+rpi1^2^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=849c088e455b14fc9cc9db118c43f9d42e9dce9e;p=thunderbird.git stop configure if '--with-system-bz2' was passed, but no libbz2 is around Gbp-Pq: Topic debian-hacks Gbp-Pq: Name stop-configure-if-with-system-bz2-was-passed-but-no-.patch --- diff --git a/old-configure.in b/old-configure.in index ec1fae7da4..5981adf293 100644 --- a/old-configure.in +++ b/old-configure.in @@ -1557,6 +1557,34 @@ dnl ======================================================== MOZ_ZLIB_CHECK([1.2.3]) if test -z "$SKIP_LIBRARY_CHECKS"; then +dnl system BZIP2 Support +dnl ======================================================== +MOZ_ARG_WITH_STRING(system-bz2, +[ --with-system-bz2[=PFX] + Use system libbz2 [installed at prefix PFX]], + BZ2_DIR=$withval) + +_SAVE_CFLAGS=$CFLAGS +_SAVE_LDFLAGS=$LDFLAGS +_SAVE_LIBS=$LIBS +if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then + CFLAGS="-I${BZ2_DIR}/include $CFLAGS" + LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS" +fi +if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then + MOZ_SYSTEM_BZ2= +else + AC_CHECK_LIB(bz2, BZ2_bzread, [MOZ_SYSTEM_BZ2=1 MOZ_BZ2_LIBS="-lbz2"], + [AC_MSG_ERROR([You have run configure with --with-system-bz2, but there is no libbz2 around!])]) +fi +CFLAGS=$_SAVE_CFLAGS +LDFLAGS=$_SAVE_LDFLAGS +LIBS=$_SAVE_LIBS + +if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_SYSTEM_BZ2" = 1; then + MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include" + MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}" +fi dnl ======================================================== dnl system PNG Support