Made PKG_CHECK_MODULES with --enable-libcdio conditional

This commit is contained in:
Thomas Schmitt 2011-09-03 19:48:50 +00:00
parent ec68760f17
commit 09f845adc4
3 changed files with 68 additions and 28 deletions

View File

@ -224,6 +224,15 @@ dnl The empty yes case obviously causes -lcdio to be linked
else else
LIBCDIO_DEF= LIBCDIO_DEF=
fi fi
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
else
echo "enabled EXPERIMENTAL use of libcdio as system adapter"
fi
AC_SUBST(LIBCDIO_DEF) AC_SUBST(LIBCDIO_DEF)
@ -309,36 +318,31 @@ AC_ARG_ENABLE(pkg-check-modules,
, enable_pkg_check_modules=no) , enable_pkg_check_modules=no)
if test x$enable_pkg_check_modules = xyes; then if test x$enable_pkg_check_modules = xyes; then
dnl if PKG_CHECK_MODULES is to be used after this if-block, dnl If PKG_CHECK_MODULES is to be used after this if-block,
dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block. dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
LIBBURN_REQUIRED=1.1.4 LIBBURN_REQUIRED=1.1.4
LIBISOFS_REQUIRED=1.1.5 LIBISOFS_REQUIRED=1.1.5
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
dummy=dummy
else
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
fi
else else
echo "checking for LIBBURN... skipped, no --enable-pkg-check-modules" echo "checking for LIBBURN... skipped, no --enable-pkg-check-modules"
echo "checking for LIBISOFS... skipped, no --enable-pkg-check-modules" echo "checking for LIBISOFS... skipped, no --enable-pkg-check-modules"
if test x$LIBCDIO_DEF = x; then
dummy=dummy
else
echo "checking for LIBCDIO... skipped, no --enable-pkg-check-modules"
fi
fi fi
# ------- Visible mark in configure : End of library check # ------- Visible mark in configure : End of library check
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
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

@ -181,14 +181,19 @@ fi
AH_TEMPLATE([Libisofs_with_aaip_acL], [Define to use ACL capabilities]) AH_TEMPLATE([Libisofs_with_aaip_acL], [Define to use ACL capabilities])
AC_ARG_ENABLE(libacl, AC_ARG_ENABLE(libacl,
[ --enable-libacl Enable use of libacl by libisofs, default=yes], [ --enable-libacl Enable use of ACL functions by libisofs, default=yes],
, enable_libacl=yes) , enable_libacl=yes)
if test x$enable_libacl = xyes; then if test x$enable_libacl = xyes; then
dnl Check whether there is libacl-devel and libacl-runtime. dnl Check whether there is libacl-devel and libacl-runtime.
dnl If not, erase this macro which would enable use of acl_to_text and others dnl If not, erase this macro which would enable use of acl_to_text and others
LIBACL_DEF="-DLibisofs_with_aaip_acL" LIBACL_DEF="-DLibisofs_with_aaip_acL"
dnl The empty yes case obviously causes -lacl to be linked dnl The empty yes case obviously causes -lacl to be linked
AC_CHECK_HEADER(sys/acl.h, AC_CHECK_LIB(acl, acl_to_text, , LIBACL_DEF= ), LIBACL_DEF= ) has_acl_h_but_no_func=0
AC_CHECK_HEADER(sys/acl.h, AC_CHECK_LIB(acl, acl_to_text, , has_acl_h_but_no_libacl=1 ), LIBACL_DEF= )
if test "$has_acl_h_but_no_libacl" = 1
then
AC_CHECK_LIB(c, acl_to_text, X= , LIBACL_DEF= )
fi
else else
LIBACL_DEF= LIBACL_DEF=
fi fi
@ -199,6 +204,7 @@ fi
AH_TEMPLATE([Libisofs_with_aaip_xattR], [Define to use xattr capabilities]) AH_TEMPLATE([Libisofs_with_aaip_xattR], [Define to use xattr capabilities])
AH_TEMPLATE([Libisofs_with_freebsd_extattR], [Define to use extattr capabilities])
AC_ARG_ENABLE(xattr, AC_ARG_ENABLE(xattr,
[ --enable-xattr Enable use of xattr by libisofs, default=yes], [ --enable-xattr Enable use of xattr by libisofs, default=yes],
, enable_xattr=yes) , enable_xattr=yes)
@ -207,6 +213,11 @@ dnl Check whether there is the header for GNU/Linux xattr.
dnl If not, erase this macro which would enable use of listxattr and others dnl If not, erase this macro which would enable use of listxattr and others
XATTR_DEF="-DLibisofs_with_aaip_xattR" XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= , XATTR_DEF= ), XATTR_DEF= ) AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= , XATTR_DEF= ), XATTR_DEF= )
if test "x$XATTR_DEF" = x
then
XATTR_DEF="-DLibisofs_with_freebsd_extattR"
AC_CHECK_HEADER(sys/extattr.h, AC_CHECK_LIB(c, extattr_list_file, X=, XATTR_DEF= ), XATTR_DEF= )
fi
else else
XATTR_DEF= XATTR_DEF=
fi fi
@ -214,6 +225,10 @@ if test x$XATTR_DEF = x-DLibisofs_with_aaip_xattR
then then
AC_DEFINE([Libisofs_with_aaip_xattR], []) AC_DEFINE([Libisofs_with_aaip_xattR], [])
fi fi
if test x$XATTR_DEF = x-DLibisofs_with_freebsd_extattR
then
AC_DEFINE([Libisofs_with_freebsd_extattR], [])
fi
AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib]) AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib])
@ -313,14 +328,6 @@ then
fi fi
else else
echo "enabled EXPERIMENTAL use of libcdio as system adapter" echo "enabled EXPERIMENTAL use of libcdio as system adapter"
# ------- Visible mark in configure : Start of library check
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
# ------- Visible mark in configure : End of library check
fi fi
if test x$LIBCDIO_DEF = x-DLibburn_use_libcdiO if test x$LIBCDIO_DEF = x-DLibburn_use_libcdiO
then then
@ -396,6 +403,35 @@ then
fi fi
# ------- Visible mark in configure : Start of library check
# Check for proper library versions if this is desired.
# (It fails too often on too many systems.)
AC_ARG_ENABLE(pkg-check-modules,
[ --enable-pkg-check-modules Enable pkg-config check for libburn and libisofs , default=no],
, enable_pkg_check_modules=no)
if test x$enable_pkg_check_modules = xyes; then
dnl If PKG_CHECK_MODULES is to be used after this if-block,
dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
if test x$LIBCDIO_DEF = x; then
dummy=dummy
else
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
fi
else
if test x$LIBCDIO_DEF = x; then
dummy=dummy
else
echo "checking for LIBCDIO... skipped, no --enable-pkg-check-modules"
fi
fi
# ------- Visible mark in configure : End of library check
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
version.h version.h

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.08.25.185950" #define Xorriso_timestamP "2011.09.03.194744"