xorriso compilation detects availability of libacl and of Linux listxattr call

This commit is contained in:
Thomas Schmitt 2009-01-23 17:27:04 +00:00
parent 21adcfc5b3
commit 5e1adef785
5 changed files with 67 additions and 6 deletions

View File

@ -46,9 +46,11 @@ bin_PROGRAMS = \
# cat xorriso/xorriso_buildstamp.h # cat xorriso/xorriso_buildstamp.h
xorriso_xorriso_CPPFLAGS = -Ilibisoburn xorriso_xorriso_CPPFLAGS = -Ilibisoburn
xorriso_xorriso_CFLAGS = -DXorriso_with_maiN $(READLINE_DEF) xorriso_xorriso_CFLAGS = -DXorriso_with_maiN \
$(READLINE_DEF) $(LIBACL_DEF) $(XATTR_DEF)
xorriso_xorriso_LDADD = libisoburn/libisoburn.la -lisofs -lburn \ xorriso_xorriso_LDADD = libisoburn/libisoburn.la -lisofs -lburn \
$(THREAD_LIBS) -lacl $(THREAD_LIBS)
xorriso_xorriso_SOURCES = \ xorriso_xorriso_SOURCES = \
xorriso/xorriso.h \ xorriso/xorriso.h \

View File

@ -102,12 +102,41 @@ else
fi fi
AC_SUBST(READLINE_DEF) AC_SUBST(READLINE_DEF)
AC_ARG_ENABLE(libacl,
[ --enable-libacl Enable use of libacl by libisofs, default=yes],
, enable_libacl=yes)
if test x$enable_libacl = xyes; then
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
LIBACL_DEF="-DLibisofs_with_aaip_acL"
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= )
else
LIBACL_DEF=
fi
AC_SUBST(LIBACL_DEF)
AC_ARG_ENABLE(xattr,
[ --enable-xattr Enable use of xattr by libisofs, default=yes],
, enable_xattr=yes)
if test x$enable_xattr = xyes; then
dnl Check whether there is the header for Linux xattr.
dnl If not, erase this macro which would enable use of listxattr and others
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= , XATTR_DEF= ), XATTR_DEF= )
else
XATTR_DEF=
fi
AC_SUBST(XATTR_DEF)
AC_CHECK_HEADER(libburn/libburn.h) AC_CHECK_HEADER(libburn/libburn.h)
AC_CHECK_HEADER(libisofs/libisofs.h) AC_CHECK_HEADER(libisofs/libisofs.h)
dnl Check for proper library versions dnl Check for proper library versions
LIBBURN_REQUIRED=0.6.0 LIBBURN_REQUIRED=0.6.0
LIBISOFS_REQUIRED=0.6.12 LIBISOFS_REQUIRED=0.6.13
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)

View File

@ -112,6 +112,35 @@ fi
AC_SUBST(READLINE_DEF) AC_SUBST(READLINE_DEF)
AC_ARG_ENABLE(libacl,
[ --enable-libacl Enable use of libacl by libisofs, default=yes],
, enable_libacl=yes)
if test x$enable_libacl = xyes; then
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
LIBACL_DEF="-DLibisofs_with_aaip_acL"
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= )
else
LIBACL_DEF=
fi
AC_SUBST(LIBACL_DEF)
AC_ARG_ENABLE(xattr,
[ --enable-xattr Enable use of xattr by libisofs, default=yes],
, enable_xattr=yes)
if test x$enable_xattr = xyes; then
dnl Check whether there is the header for Linux xattr.
dnl If not, erase this macro which would enable use of listxattr and others
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= , XATTR_DEF= ), XATTR_DEF= )
else
XATTR_DEF=
fi
AC_SUBST(XATTR_DEF)
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
version.h version.h

View File

@ -16,9 +16,10 @@ xorriso_xorriso_CPPFLAGS = -I./libburn -I./libisofs -I./libisoburn -I./xorriso
# No readline in the vanilla version because the necessary headers # No readline in the vanilla version because the necessary headers
# are in a separate readline-development package. # are in a separate readline-development package.
xorriso_xorriso_CFLAGS = -DXorriso_standalonE -DXorriso_with_maiN $(READLINE_DEF) xorriso_xorriso_CFLAGS = -DXorriso_standalonE -DXorriso_with_maiN \
$(READLINE_DEF) $(LIBACL_DEF) $(XATTR_DEF)
xorriso_xorriso_LDADD = $(THREAD_LIBS) -lacl xorriso_xorriso_LDADD = $(THREAD_LIBS)
# This looks quite ugly with make install: xorriso.c is compiled twice again # This looks quite ugly with make install: xorriso.c is compiled twice again

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.01.23.140824" #define Xorriso_timestamP "2009.01.23.172652"