Disable LZMA support when --disable-sys-libs is used

It seems better to disable LZMA rather than silently building the
binaries depending on an external library when we were explicitly
requested not to do it.
This commit is contained in:
Vadim Zeitlin
2019-06-27 16:18:20 +02:00
parent 789d374650
commit 906fc891c8
2 changed files with 21 additions and 27 deletions

28
configure vendored
View File

@@ -1026,7 +1026,6 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1450,7 +1449,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1703,15 +1701,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1849,7 +1838,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir runstatedir
libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -2002,7 +1991,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -23333,15 +23321,16 @@ fi
if test "$wxUSE_LIBLZMA" != "no"; then
ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
if test "$wxUSE_SYS_LIBS" != "no"; then
ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
if test "x$ac_cv_header_lzma_h" = xyes; then :
fi
if test "$ac_cv_header_lzma_h" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
if test "$ac_cv_header_lzma_h" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
$as_echo_n "checking for lzma_code in -llzma... " >&6; }
if ${ac_cv_lib_lzma_lzma_code+:} false; then :
$as_echo_n "(cached) " >&6
@@ -23379,13 +23368,14 @@ fi
$as_echo "$ac_cv_lib_lzma_lzma_code" >&6; }
if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then :
LZMA_LINK="-llzma"
LIBS="$LZMA_LINK $LIBS"
$as_echo "#define wxUSE_LIBLZMA 1" >>confdefs.h
LZMA_LINK="-llzma"
LIBS="$LZMA_LINK $LIBS"
$as_echo "#define wxUSE_LIBLZMA 1" >>confdefs.h
fi
fi
fi
if test -z "$LZMA_LINK"; then

View File

@@ -2569,15 +2569,19 @@ dnl Check for lzma library
dnl ------------------------------------------------------------------------
if test "$wxUSE_LIBLZMA" != "no"; then
AC_CHECK_HEADER(lzma.h,,,[])
dnl We shouldn't depend on the external liblzma if system libraries are
dnl explicitly disabled.
if test "$wxUSE_SYS_LIBS" != "no"; then
AC_CHECK_HEADER(lzma.h,,,[])
if test "$ac_cv_header_lzma_h" = "yes"; then
AC_CHECK_LIB(lzma, lzma_code,
[
LZMA_LINK="-llzma"
LIBS="$LZMA_LINK $LIBS"
AC_DEFINE(wxUSE_LIBLZMA)
])
if test "$ac_cv_header_lzma_h" = "yes"; then
AC_CHECK_LIB(lzma, lzma_code,
[
LZMA_LINK="-llzma"
LIBS="$LZMA_LINK $LIBS"
AC_DEFINE(wxUSE_LIBLZMA)
])
fi
fi
if test -z "$LZMA_LINK"; then