Changed configure test for zlib from compress2() to compressBound()

This commit is contained in:
Thomas Schmitt 2010-01-07 09:03:46 +00:00
parent 581caf1007
commit 25ba888769
2 changed files with 44 additions and 5 deletions

View File

@ -163,15 +163,36 @@ AC_ARG_ENABLE(zlib,
if test x$enable_zlib = xyes; then if test x$enable_zlib = xyes; then
dnl Check whether there is the header for zlib. dnl Check whether there is the header for zlib.
dnl If not, erase this macro which would enable use of compress2() and others. dnl If not, erase this macro which would enable use of compress2() and others.
dnl The empty parameter after "compress2" causes -lz. dnl Linking fails on SuSE 9.0 because zlib has compress2() but lacks
dnl compressBound(). So compressBound is the more modern thing to test.
dnl The empty parameter after "compressBound" causes -lz.
ZLIB_DEF="-DLibisofs_with_zliB" ZLIB_DEF="-DLibisofs_with_zliB"
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compress2, , ZLIB_DEF= ), ZLIB_DEF= ) AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
else else
ZLIB_DEF= ZLIB_DEF=
fi fi
AC_SUBST(ZLIB_DEF) AC_SUBST(ZLIB_DEF)
dnl ts B00107
dnl Just for the case that it is necessary to give link option -lcdio not only
dnl with libburn but also with libburn apps like xorriso.
dnl On SuSE 10.2 this is not needed. libburn finds libcdio on its own.
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio Enable EXPERIMENTAL use of libcdio as system adapter, default=no],
, enable_libcdio=no)
if test x$enable_libcdio = xyes; then
dnl Check whether there is libcdio-devel and libcdio-runtime.
dnl If not, erase this macro
LIBCDIO_DEF="-DLibburn_use_libcdiO"
dnl The empty yes case obviously causes -lcdio to be linked
AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= )
else
LIBCDIO_DEF=
fi
AC_SUBST(LIBCDIO_DEF)
AC_ARG_ENABLE(external-filters, AC_ARG_ENABLE(external-filters,
[ --enable-external-filters Enable use of external filter programs by xorriso, default=yes], [ --enable-external-filters Enable use of external filter programs by xorriso, default=yes],
, enable_external_filters=yes) , enable_external_filters=yes)
@ -218,6 +239,22 @@ LIBISOFS_REQUIRED=0.6.24
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED) PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED) PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)
if test x$LIBCDIO_DEF = x
then
if test x$enable_libcdio = xyes
then
echo "WARNING: could not enable use of libcdio as system adapter"
fi
fi
else
echo "enabled EXPERIMENTAL use of libcdio as system adapter"
dnl For some reason this check may not be done earlier or else pkg-config
dnl is not found.
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
fi
dnl Add compiler-specific flags dnl Add compiler-specific flags
dnl See if the user wants aggressive optimizations of the code dnl See if the user wants aggressive optimizations of the code

View File

@ -171,9 +171,11 @@ AC_ARG_ENABLE(zlib,
if test x$enable_zlib = xyes; then if test x$enable_zlib = xyes; then
dnl Check whether there is the header for zlib. dnl Check whether there is the header for zlib.
dnl If not, erase this macro which would enable use of compress2() and others. dnl If not, erase this macro which would enable use of compress2() and others.
dnl The empty parameter after "compress2" causes -lz. dnl Linking fails on SuSE 9.0 because zlib has compress2() but lacks
dnl compressBound(). So compressBound is the more modern thing to test.
dnl The empty parameter after "compressBound" causes -lz.
ZLIB_DEF="-DLibisofs_with_zliB" ZLIB_DEF="-DLibisofs_with_zliB"
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compress2, , ZLIB_DEF= ), ZLIB_DEF= ) AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
else else
ZLIB_DEF= ZLIB_DEF=
fi fi
@ -187,7 +189,7 @@ if test x$enable_libcdio = xyes; then
dnl Check whether there is libcdio-devel and libcdio-runtime. dnl Check whether there is libcdio-devel and libcdio-runtime.
dnl If not, erase this macro dnl If not, erase this macro
LIBCDIO_DEF="-DLibburn_use_libcdiO" LIBCDIO_DEF="-DLibburn_use_libcdiO"
dnl The empty yes case obviously causes -lacl to be linked dnl The empty yes case obviously causes -lcdio to be linked
AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= ) AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= )
else else
LIBCDIO_DEF= LIBCDIO_DEF=