2010-02-14 15:14:30 +00:00
# configure.ac stems from xorriso/configure_ac.txt and leads to ./configure
2025-03-01 16:10:44 +01:00
# Copyright (c) 2007 - 2025 Thomas Schmitt <scdbackup@gmx.net>
2010-02-14 15:14:30 +00:00
# Provided under GPL version 2 or later.
2023-06-07 22:46:21 +02:00
AC_INIT([xorriso], [1.5.7], [http://libburnia-project.org])
2008-01-16 20:13:18 +00:00
AC_PREREQ([2.50])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
2010-02-04 08:25:31 +00:00
LIBBURNIA_SET_FLAGS
2008-01-16 20:13:18 +00:00
AM_INIT_AUTOMAKE([subdir-objects])
2011-06-08 19:43:18 +00:00
AC_CONFIG_MACRO_DIR([./])
2008-01-16 20:13:18 +00:00
2010-05-17 14:28:30 +00:00
dnl Let autoheader produce config.h.in and let configure produce config.h
dnl This saves about 500 characters of compile message per source file.
AC_CONFIG_HEADER(config.h)
AH_TEMPLATE([Xorriso_standalonE], [Define to prepare sources for statically linked xorriso])
AC_DEFINE([Xorriso_standalonE], [])
2011-01-16 18:27:08 +00:00
BURN_MAJOR_VERSION=1
2018-09-15 15:58:10 +02:00
BURN_MINOR_VERSION=5
2023-06-07 22:46:21 +02:00
BURN_MICRO_VERSION=7
2008-01-16 20:13:18 +00:00
AC_SUBST(BURN_MAJOR_VERSION)
AC_SUBST(BURN_MINOR_VERSION)
AC_SUBST(BURN_MICRO_VERSION)
2011-01-16 18:27:08 +00:00
LIBISOFS_MAJOR_VERSION=1
2018-09-15 15:58:10 +02:00
LIBISOFS_MINOR_VERSION=5
2023-06-07 22:46:21 +02:00
LIBISOFS_MICRO_VERSION=7
2008-01-26 14:01:19 +00:00
AC_SUBST(LIBISOFS_MAJOR_VERSION)
AC_SUBST(LIBISOFS_MINOR_VERSION)
AC_SUBST(LIBISOFS_MICRO_VERSION)
2008-02-15 21:19:24 +00:00
dnl The API version codes are defined in libisoburn/libisoburn.h
2008-01-29 18:44:54 +00:00
dnl #define isoburn_header_version_*
2008-01-26 14:01:19 +00:00
2008-01-16 20:13:18 +00:00
AC_PREFIX_DEFAULT([/usr/local])
test "$prefix" = "NONE" && prefix=$ac_default_prefix
2019-04-07 10:28:19 +02:00
dnl ts B90405 : Disabled on advise of Ross Burton
dnl AM_MAINTAINER_MODE
2008-01-16 20:13:18 +00:00
AM_PROG_CC_C_O
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
dnl Large file support
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
AC_CHECK_FUNC([fseeko])
if test ! $ac_cv_func_fseeko; then
AC_ERROR([Libburn requires largefile support.])
fi
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([ICONV_CONST], [Whether to apply const qualifier to iconv inbuf])
2010-04-10 15:09:18 +00:00
if test x$XORRISO_OLD_ICONV_CONFIGURE = x
then
dnl ts B00410 : To detect the need for -liconv and const argument of iconv()
LIBBURNIA_CHECK_ICONV
2010-04-11 12:24:54 +00:00
dnl ts B00411 : To abort configuration if iconv() still cannot be compiled
LIBBURNIA_ASSERT_ICONV
2010-04-10 15:09:18 +00:00
else
dnl Outdated: produces double -liconv and warnings about parameter mismatch
2009-02-04 20:06:56 +00:00
dnl If iconv(3) is in an extra libiconv, then it gets added to variable LIBS.
dnl If not, then no -liconv will be added.
AC_CHECK_LIB(iconv, iconv, , )
2009-06-30 12:03:09 +00:00
dnl GNU iconv has no function iconv() but libiconv() and a macro iconv()
AC_CHECK_LIB(iconv, libiconv, , )
2010-04-10 15:09:18 +00:00
fi
2008-01-16 20:13:18 +00:00
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
2016-04-27 14:40:50 +00:00
dnl LIBTOOL="$LIBTOOL --silent"
2008-01-16 20:13:18 +00:00
AC_PROG_INSTALL
2025-04-08 23:12:15 +02:00
dnl GNU libtool checks stdint.h inttypes.h stdlib.h by default/unconditionally, dnl but slibtool does not. So accept the ugly double check and -DHAVE_*_H
dnl arguments with GNU libtool.
dnl select.h seems to be ubiquitous, but was not used in libisoburn before 2025
AC_CHECK_HEADERS(stdint.h inttypes.h stdlib.h sys/select.h)
2008-01-16 20:13:18 +00:00
2008-01-22 11:45:09 +00:00
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
[Define this if tm structure includes a tm_gmtoff entry.])],
,
[#include <time.h>])
2008-01-29 18:44:54 +00:00
dnl Check if non standard timegm() function is available
AC_CHECK_DECL([timegm],
[AC_DEFINE(HAVE_TIMEGM, 1, [Define this if timegm function is available])],
,
[#include <time.h>])
2014-11-26 13:48:43 +00:00
dnl Whether timezone is an integer variable
AH_TEMPLATE([Libburnia_timezonE], [Either timezone or 0])
LIBBURNIA_TRY_TIMEZONE
if test x$LIBBURNIA_TIMEZONE = xtimezone
then
AC_DEFINE([Libburnia_timezonE], [timezone])
else
AC_DEFINE([Libburnia_timezonE], [0])
fi
2008-01-29 18:44:54 +00:00
dnl Check if non standard eaccess() function is available
AC_CHECK_DECL([eaccess],
[AC_DEFINE(HAVE_EACCESS, 1, [Define this if eaccess function is available])],
,
[#include <unistd.h>])
2008-01-16 20:13:18 +00:00
THREAD_LIBS=-lpthread
AC_SUBST(THREAD_LIBS)
TARGET_SHIZZLE
AC_SUBST(ARCH)
2009-03-18 10:40:25 +00:00
AC_SUBST(LIBBURNIA_PKGCONFDIR)
2008-01-16 20:13:18 +00:00
AC_SUBST(LIBBURN_ARCH_LIBS)
2009-03-03 10:37:20 +00:00
dnl Check the preconditions for using statvfs() in sg-dummy
dnl (sg-linux and sg-freebsd use statvfs() unconditionally)
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Libburn_os_has_statvfS], [Define to use statvfs() with libburn stdio])
2009-03-03 10:37:20 +00:00
STATVFS_DEF=-DLibburn_os_has_statvfS
AC_CHECK_HEADER(sys/statvfs.h, X=, STATVFS_DEF=)
AC_CHECK_FUNC([statvfs], X=, STATVFS_DEF=)
2010-05-17 14:28:30 +00:00
if test x$STATVFS_DEF = x-DLibburn_os_has_statvfS
then
AC_DEFINE([Libburn_os_has_statvfS], [])
fi
2009-03-03 10:37:20 +00:00
2019-12-07 18:58:44 +01:00
dnl xorriso-dd-target is addicted to the Linux kernel and util-linux lsblk
if uname -s | grep '^Linux' >/dev/null
then
XORRISO_DD_TARGET=xorriso-dd-target/xorriso-dd-target
XORRISO_DD_TARGET_MAN=xorriso-dd-target/xorriso-dd-target.1
XORRISO_DD_TARGET_TEXI=xorriso-dd-target/xorriso-dd-target.texi
echo "enabled installation of xorriso-dd-target/xorriso-dd-target"
else
XORRISO_DD_TARGET=
XORRISO_DD_TARGET_MAN=
XORRISO_DD_TARGET_TEXI=
echo "disabled installation of xorriso-dd-target/xorriso-dd-target"
fi
AC_SUBST(XORRISO_DD_TARGET)
AC_SUBST(XORRISO_DD_TARGET_MAN)
AC_SUBST(XORRISO_DD_TARGET_TEXI)
2009-03-03 10:37:20 +00:00
2008-01-16 20:13:18 +00:00
dnl Add compiler-specific flags
dnl See if the user wants aggressive optimizations of the code
AC_ARG_ENABLE(debug,
[ --enable-debug Disable aggressive optimizations [default=yes]],
, enable_debug=yes)
if test x$enable_debug != xyes; then
if test x$GCC = xyes; then
2010-12-13 12:32:33 +00:00
CFLAGS="-O3 $CFLAGS"
CFLAGS="-fexpensive-optimizations $CFLAGS"
2008-01-16 20:13:18 +00:00
fi
2010-12-13 12:32:33 +00:00
CFLAGS="-DNDEBUG $CFLAGS"
2008-01-16 20:13:18 +00:00
else
if test x$GCC = xyes; then
2015-06-24 16:27:08 +00:00
CFLAGS="-g -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-char-subscripts -Wno-strict-aliasing $CFLAGS"
2008-01-16 20:13:18 +00:00
fi
2010-12-13 12:32:33 +00:00
CFLAGS="-DDEBUG $CFLAGS"
2008-01-16 20:13:18 +00:00
fi
2009-07-07 19:39:35 +00:00
dnl Determine target directory for libisoburn-*.pc
dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl
LIBBURNIA_SET_PKGCONFIG
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Xorriso_with_readlinE], [Define to use libreadline])
2008-10-02 10:55:28 +00:00
AC_ARG_ENABLE(libreadline,
2008-10-02 11:09:20 +00:00
[ --enable-libreadline Enable use of libreadline by xorriso, default=yes],
2008-10-02 10:55:28 +00:00
, enable_libreadline=yes)
if test x$enable_libreadline = xyes; then
2008-01-16 23:36:17 +00:00
dnl Check whether there is readline-devel and readline-runtime.
dnl If not, erase this macro which would enable use of readline(),add_history()
2008-10-02 10:55:28 +00:00
READLINE_DEF="-DXorriso_with_readlinE"
2010-04-13 15:43:58 +00:00
if test x$XORRISO_OLD_READLINE_CONFIGURE = x
then
dnl ts B00411 : To disable readline if not all needed functions are present
LIBBURNIA_ASSERT_READLINE
else
2008-01-16 23:36:17 +00:00
dnl The empty yes case obviously causes -lreadline to be linked
2010-04-13 15:43:58 +00:00
AC_CHECK_HEADER(readline/readline.h, AC_CHECK_LIB(readline, readline, , READLINE_DEF= ), READLINE_DEF= )
2008-01-16 23:36:17 +00:00
dnl The X= in the yes case prevents that -lreadline gets linked twice
2010-04-13 15:43:58 +00:00
AC_CHECK_HEADER(readline/history.h, AC_CHECK_LIB(readline, add_history, X= , READLINE_DEF= ), READLINE_DEF= )
fi
2008-10-02 10:55:28 +00:00
else
READLINE_DEF=
2014-06-15 12:56:43 +00:00
echo "disabled libreadline"
2008-10-02 10:55:28 +00:00
fi
2014-06-14 19:22:41 +00:00
if test x$READLINE_DEF = x; then
AH_TEMPLATE([Xorriso_with_editlinE],
[Define to use libedit if not libreadline])
2014-06-15 12:56:43 +00:00
if test x$enable_libreadline = xyes; then
libedit_deflt=yes
else
libedit_deflt=no
fi
2014-06-14 19:22:41 +00:00
AC_ARG_ENABLE(libedit,
2014-06-15 12:56:43 +00:00
[ --enable-libedit Enable use of libedit by xorriso if not libreadline, default= setting of --enable-libreadline],
, enable_libedit=$libedit_deflt)
2014-06-14 19:22:41 +00:00
if test x$enable_libedit = xyes; then
READLINE_DEF="-DXorriso_with_editlinE"
LIBBURNIA_ASSERT_EDITLINE
else
READLINE_DEF=
2014-06-15 12:56:43 +00:00
echo "disabled libedit"
2014-06-14 19:22:41 +00:00
fi
fi
2010-05-17 14:28:30 +00:00
if test x$READLINE_DEF = x-DXorriso_with_readlinE
then
AC_DEFINE([Xorriso_with_readlinE], [])
2014-06-14 19:22:41 +00:00
elif test x$READLINE_DEF = x-DXorriso_with_editlinE
then
AC_DEFINE([Xorriso_with_editlinE], [])
2010-05-17 14:28:30 +00:00
fi
2008-01-16 23:36:17 +00:00
2015-12-15 10:10:55 +00:00
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Libisofs_with_aaip_acL], [Define to use ACL capabilities])
2009-01-23 17:27:04 +00:00
AC_ARG_ENABLE(libacl,
2011-09-03 19:48:50 +00:00
[ --enable-libacl Enable use of ACL functions by libisofs, default=yes],
2009-01-23 17:27:04 +00:00
, enable_libacl=yes)
2015-12-15 10:10:55 +00:00
LIBACL_DEF=
has_acl_h_but_no_func=0
if test x$LIBBURNIA_SUPP_ACL = xlibacl
then
if test x$enable_libacl = xyes; then
2009-01-23 17:27:04 +00:00
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
2015-12-15 10:10:55 +00:00
LIBACL_DEF="-DLibisofs_with_aaip_acL"
2009-01-23 17:27:04 +00:00
dnl The empty yes case obviously causes -lacl to be linked
2015-12-15 10:10:55 +00:00
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
2011-09-03 19:48:50 +00:00
fi
2009-01-23 17:27:04 +00:00
fi
2010-05-17 14:28:30 +00:00
if test x$LIBACL_DEF = x-DLibisofs_with_aaip_acL
then
AC_DEFINE([Libisofs_with_aaip_acL], [])
2015-12-15 10:10:55 +00:00
if test x$has_acl_h_but_no_libacl = x1
then
echo "enabled local processing of ACL"
else
echo "enabled libacl, local processing of ACL"
fi
else
echo "disabled local processing of ACL"
2010-05-17 14:28:30 +00:00
fi
2009-01-23 17:27:04 +00:00
2015-12-15 10:10:55 +00:00
AH_TEMPLATE([Libisofs_with_aaip_xattR],
[Define to use Linux xattr capabilities])
2018-05-18 17:21:50 +02:00
AH_TEMPLATE([Libisofs_with_sys_xattR],
[Define to include Linux sys/xattr.h instead of attr/xattr.h])
2015-12-15 10:10:55 +00:00
AH_TEMPLATE([Libisofs_with_freebsd_extattR],
[Define to use FreeBSD extattr capabilities])
2009-01-23 17:27:04 +00:00
AC_ARG_ENABLE(xattr,
2015-12-15 10:10:55 +00:00
[ --enable-xattr Enable use of extended file attributes by libisofs, default=yes],
, enable_xattr=yes)
2024-07-23 17:04:12 +02:00
AC_ARG_ENABLE(xattr-h-pref-attr,
2018-05-18 17:21:50 +02:00
[ --enable-xattr-h-pref-attr Prefer include file attr/xattr.h over sys/xattr.h, default=no],
, enable_xattr_h_pref_attr=no)
2015-12-15 10:10:55 +00:00
XATTR_DEF=
if test x"$LIBBURNIA_SUPP_FATTR" = xxattr
then
if test "x$enable_xattr" = xyes; then
dnl Check whether there is the header for Linux xattr.
2009-01-23 17:27:04 +00:00
dnl If not, erase this macro which would enable use of listxattr and others
2018-05-18 17:21:50 +02:00
XATTR_A_DEF=
XATTR_S_DEF=
if test x"$enable_xattr_h_pref_attr" = xyes
then
echo "prefering include file attr/xattr.h over sys/attr.h"
XATTR_A_DEF=1
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_A_DEF= ), XATTR_A_DEF= )
if test x"$XATTR_A_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
else
XATTR_S_DEF=1
AC_CHECK_HEADER(sys/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_S_DEF= ), XATTR_S_DEF= )
if test x"$XATTR_S_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_DEFINE([Libisofs_with_sys_xattR], [])
fi
fi
else
XATTR_S_DEF=1
AC_CHECK_HEADER(sys/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_S_DEF= ), XATTR_S_DEF= )
if test x"$XATTR_S_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_DEFINE([Libisofs_with_sys_xattR], [])
else
XATTR_A_DEF=1
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_A_DEF= ), XATTR_A_DEF= )
if test x"$XATTR_A_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
fi
fi
fi
if test x"$XATTR_S_DEF" = x1
then
echo "decided to include file sys/attr.h"
elif test x"$XATTR_A_DEF" = x1
then
echo "decided to include file attr/xattr.h"
fi
2015-12-15 10:10:55 +00:00
fi
elif test x"$LIBBURNIA_SUPP_FATTR" = xextattr
then
if test "x$enable_xattr" = xyes; 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= )
2011-09-03 19:48:50 +00:00
fi
2009-01-23 17:27:04 +00:00
fi
2015-12-15 10:10:55 +00:00
2010-05-17 14:28:30 +00:00
if test x$XATTR_DEF = x-DLibisofs_with_aaip_xattR
then
AC_DEFINE([Libisofs_with_aaip_xattR], [])
2015-12-15 10:10:55 +00:00
echo "enabled xattr, local processing of extended file attributes Linux style"
elif test x$XATTR_DEF = x-DLibisofs_with_freebsd_extattR
2011-09-03 19:48:50 +00:00
then
AC_DEFINE([Libisofs_with_freebsd_extattR], [])
2015-12-15 10:10:55 +00:00
echo "enabled extattr, local processing of extended file attributes FreeBSD style"
else
echo "disabled local processing of extended file attributes"
2011-09-03 19:48:50 +00:00
fi
2009-01-23 17:27:04 +00:00
2024-07-22 23:44:14 +02:00
dnl ts C40722
AH_TEMPLATE([Libisofs_with_aaip_lfa_flagS],
[Define to use Linux chattr capabilities])
LFA_DEF=
2024-07-23 17:04:12 +02:00
AC_ARG_ENABLE(lfa-flags,
[ --enable-lfa-flags Enable processing of Linux chattr(1) flags, default=yes],
, enable_lfa_flags=yes)
if test x"$enable_lfa_flags" = xyes; then
2024-07-22 23:44:14 +02:00
AC_CHECK_HEADER(linux/fs.h, LFA_DEF="-DLibisofs_with_aaip_lfa_flagS",
LFA_DEF=)
fi
if test x"$LFA_DEF" = x-DLibisofs_with_aaip_lfa_flagS
then
AC_DEFINE([Libisofs_with_aaip_lfa_flagS], [])
echo "enabled Linux chattr(1) flags"
else
echo "disabled Linux chattr(1) flags"
fi
2009-01-23 17:27:04 +00:00
2024-11-03 20:04:54 +01:00
dnl ts C41009
AH_TEMPLATE([Libisofs_with_aaip_projiD],
[Define to use XFS-style project id capabilities])
PROJID_DEF=
AC_ARG_ENABLE(projid,
[ --enable-projid Enable processing of XFS-style project id, default=yes],
, enable_projid=yes)
if test x"$enable_projid" = xyes; then
AC_CHECK_HEADER(linux/fs.h, PROJID_DEF="-DLibisofs_with_aaip_projiD",
PROJID_DEF=)
fi
if test x"$PROJID_DEF" = x; then
echo "disabled XFS-style project id"
else
AC_DEFINE([Libisofs_with_aaip_projiD], [])
echo "enabled XFS-style project id"
fi
2010-10-15 12:16:12 +00:00
AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via zlib])
AH_TEMPLATE([LIBJTE_WITH_ZLIB], [Allow libjte to use zlib])
2009-04-10 10:25:58 +00:00
AC_ARG_ENABLE(zlib,
2009-07-07 17:57:26 +00:00
[ --enable-zlib Enable use of zlib by libisofs, default=yes],
2009-04-10 10:25:58 +00:00
, enable_zlib=yes)
if test x$enable_zlib = xyes; then
dnl Check whether there is the header for zlib.
dnl If not, erase this macro which would enable use of compress2() and others.
2010-01-07 09:03:46 +00:00
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.
2010-10-15 12:16:12 +00:00
ZLIB_DEF=yes
2010-01-07 09:03:46 +00:00
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
2009-04-10 10:25:58 +00:00
else
2020-10-27 12:21:04 +01:00
echo "disabled use of zlib"
2009-04-10 10:25:58 +00:00
ZLIB_DEF=
fi
2010-10-15 12:16:12 +00:00
if test x$ZLIB_DEF = xyes
2010-05-17 14:28:30 +00:00
then
AC_DEFINE([Libisofs_with_zliB], [])
2010-10-15 12:16:12 +00:00
AC_DEFINE([LIBJTE_WITH_ZLIB], [])
2010-05-17 14:28:30 +00:00
fi
2009-04-10 10:25:58 +00:00
2017-01-27 12:10:52 +01:00
# There are Linuxes with no public generic SCSI interface
LIBBURNIA_CHECK_LINUX_SCSI
2009-04-10 10:25:58 +00:00
2010-10-15 12:16:12 +00:00
# libjte source is included in GNU xorriso. Enable it if zlib is enabled.
2010-09-29 09:25:59 +00:00
AH_TEMPLATE([Xorriso_with_libjtE],
[Define to use Jigdo Template Extraction via libjte])
AH_TEMPLATE([Libisofs_with_libjtE],
[Define to use Jigdo Template Extraction via libjte])
2010-10-15 12:16:12 +00:00
if test x$ZLIB_DEF = xyes
then
AC_DEFINE([Xorriso_with_libjtE], [])
AC_DEFINE([Libisofs_with_libjtE], [])
2010-09-29 09:25:59 +00:00
LIBJTE_DEF=yes
2010-10-15 12:16:12 +00:00
echo "enabled built-in libjte"
2010-09-29 09:25:59 +00:00
else
LIBJTE_DEF=
2010-10-15 12:16:12 +00:00
echo "disabled libjte because zlib not enabled or not available"
2010-09-29 09:25:59 +00:00
fi
2010-10-15 12:16:12 +00:00
2025-03-01 16:10:44 +01:00
dnl ts C50224
AH_TEMPLATE([Libisofs_dir_rec_size_checK], [Define to enable detailed check of directory size prediction])
AC_ARG_ENABLE(dir-rec-size-check,
[ --enable-dir-rec-size-check Detailed check of directory size prediction, default=no],
, dir_rec_size_check=no)
if test x$enable_dir_rec_size_check = xyes; then
DIR_REC_SIZE_CHECK="-DLibisofs_dir_rec_size_checK"
echo "enabled detailed check of directory size prediction"
else
DIR_REC_SIZE_CHECK=
echo "disabled detailed check of directory size prediction"
fi
if test x$DIR_REC_SIZE_CHECK = x-DLibisofs_dir_rec_size_checK
then
AC_DEFINE([Libisofs_dir_rec_size_checK], [])
fi
2010-10-15 12:16:12 +00:00
AH_TEMPLATE([THREADED_CHECKSUMS],
[Define to use multi-threading in built-in libjte])
AC_ARG_ENABLE(jtethreads,
[ --enable-jtethreads Enable multi-threading in libjte, default=yes],
, enable_jtethreads=yes)
2010-09-29 09:25:59 +00:00
if test x$LIBJTE_DEF = xyes
then
2017-01-27 16:20:04 +01:00
if test "x$enable_jtethreads" = xyes; then
2017-04-25 15:50:22 +02:00
mem_LDFLAGS="$LDFLAGS"
2017-01-27 16:20:04 +01:00
LDFLAGS="$LDFLAGS $THREAD_LIBS"
AC_MSG_CHECKING([for pthread_cancel()])
AC_TRY_LINK([#include <pthread.h>],
[pthread_cancel((pthread_t) NULL);],
[],
[enable_jtethreads=no])
AC_MSG_RESULT([$enable_jtethreads])
LDFLAGS="$mem_LDFLAGS"
fi
2010-10-15 12:16:12 +00:00
if test "x$enable_jtethreads" = xyes; then
AC_DEFINE([THREADED_CHECKSUMS], [])
echo "enabled multi-threading in libjte"
else
echo "disabled multi-threading in libjte"
fi
fi
AH_TEMPLATE([LIBJTE_WITH_LIBBZ2],
[Define to use libbz2 by built-in libjte])
AC_ARG_ENABLE(libbz2,
[ --enable-libbz2 Enable use of libbz2 by libjte, default=yes],
, enable_libbz2=yes)
if test "x$enable_libbz2" = xyes -a x$LIBJTE_DEF = xyes ; then
dnl Check whether there is the header for libbz2.
BZIP2_DEF=yes
AC_CHECK_HEADER(bzlib.h, AC_CHECK_LIB(bz2, BZ2_bzCompressInit, , BZIP2_DEF= ), BZIP2_DEF= )
else
BZIP2_DEF=
fi
if test x$BZIP2_DEF = xyes
then
AC_DEFINE([LIBJTE_WITH_LIBBZ2], [])
BZIP2_DEF="-DLIBJTE_WITH_LIBBZ2"
2010-09-29 09:25:59 +00:00
fi
2012-10-02 13:47:05 +00:00
case $host_os in
cygwin*|mingw*)
default_libcdio=yes
;;
*)
default_libcdio=no
;;
esac
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Libburn_use_libcdiO], [Define to use libcdio as system adapter])
2009-12-26 23:10:07 +00:00
AC_ARG_ENABLE(libcdio,
2012-10-02 13:47:05 +00:00
[ --enable-libcdio Enable use of libcdio as system adapter, default=no (except on MSWindows)],
, enable_libcdio=$default_libcdio)
2009-12-26 23:10:07 +00:00
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"
2010-01-07 09:03:46 +00:00
dnl The empty yes case obviously causes -lcdio to be linked
2009-12-26 23:10:07 +00:00
AC_CHECK_HEADER(cdio/cdio.h, AC_CHECK_LIB(cdio, mmc_last_cmd_sense, , LIBCDIO_DEF= ), LIBCDIO_DEF= )
else
LIBCDIO_DEF=
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
2017-05-05 09:05:27 +02:00
if echo " $CFLAGS $LDFLAGS " | grep ' -static ' >/dev/null
then
echo "WARNING : found option -static in CFLAGS or LDFLAGS"
echo "WARNING : libcdio API conflicts with inner symbols of xorriso"
echo "WARNING : use of libcdio as system adapter disabled"
LIBCDIO_DEF=
else
echo "enabled use of libcdio as system adapter"
fi
2009-12-26 23:10:07 +00:00
fi
2010-05-17 14:28:30 +00:00
if test x$LIBCDIO_DEF = x-DLibburn_use_libcdiO
then
AC_DEFINE([Libburn_use_libcdiO], [])
fi
2009-12-26 23:10:07 +00:00
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Xorriso_allow_external_filterS], [Define to allow xorriso to start external filter processes])
2009-04-04 14:42:41 +00:00
AC_ARG_ENABLE(external-filters,
2009-07-07 17:57:26 +00:00
[ --enable-external-filters Enable use of external filter programs by xorriso, default=yes],
2009-04-04 14:42:41 +00:00
, enable_external_filters=yes)
if test x"$enable_external_filters" = xyes; then
EXTF_DEF="-DXorriso_allow_external_filterS"
echo "enabled xorriso external filter programs"
else
EXTF_DEF=
echo "disabled xorriso external filter programs"
fi
2010-05-17 14:28:30 +00:00
if test x$EXTF_DEF = x-DXorriso_allow_external_filterS
then
AC_DEFINE([Xorriso_allow_external_filterS], [])
fi
2009-04-04 14:42:41 +00:00
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Xorriso_allow_extf_suiD], [Define to allow external filters to xorriso when running under setuid])
2009-04-04 14:42:41 +00:00
AC_ARG_ENABLE(external-filters-setuid,
2009-07-07 17:57:26 +00:00
[ --enable-external-filters-setuid Enable xorriso external filter programs under setuid, default=no],
2009-04-04 14:42:41 +00:00
, enable_external_filters_setuid=no)
if test x$enable_external_filters_setuid = xyes; then
EXTF_SUID_DEF="-DXorriso_allow_extf_suiD"
echo "enabled xorriso external filter programs under setuid"
else
EXTF_SUID_DEF=
echo "disabled xorriso external filter programs under setuid"
fi
2010-05-17 14:28:30 +00:00
if test x$EXTF_SUID_DEF = x-DXorriso_allow_extf_suiD
then
AC_DEFINE([Xorriso_allow_extf_suiD], [])
fi
2012-12-20 20:22:58 +00:00
AH_TEMPLATE([Xorriso_allow_launch_frontenD], [Define to allow xorriso command -launch_frontend])
AC_ARG_ENABLE(launch-frontend,
[ --enable-launch-frontend Enable start of piped frontend program by xorriso, default=yes],
, enable_launch_frontend=yes)
if test x"$enable_launch_frontend" = xyes; then
LFRONT_DEF="-DXorriso_allow_launch_frontenD"
echo "enabled xorriso command -launch_frontend"
else
LFRONT_DEF=
echo "disabled xorriso command -launch_frontend"
fi
if test x$LFRONT_DEF = x-DXorriso_allow_launch_frontenD
then
AC_DEFINE([Xorriso_allow_launch_frontenD], [])
fi
AH_TEMPLATE([Xorriso_allow_extf_suiD], [Define to allow xorriso command -launch_frontend when running under setuid])
AC_ARG_ENABLE(launch-frontend-setuid,
[ --enable-launch-frontend-setuid Enable start of piped frontend program under setuid, default=no],
, enable_launch_frontend_setuid=no)
if test x$enable_launch_frontend_setuid = xyes; then
LFRONT_SUID_DEF="-DXorriso_allow_extf_suiD"
echo "enabled xorriso command -launch_frontend under setuid"
else
LFRONT_SUID_DEF=
echo "disabled xorriso command -launch_frontend under setuid"
fi
if test x$LFRONT_SUID_DEF = x-DXorriso_allow_extf_suiD
then
AC_DEFINE([Xorriso_allow_extf_suiD], [])
fi
2009-04-04 14:42:41 +00:00
2013-08-04 10:13:53 +00:00
AH_TEMPLATE([Xorriso_dvd_obs_default_64K], [Define to make 64 KB default size for DVD writing])
2009-11-17 14:23:28 +00:00
AC_ARG_ENABLE(dvd-obs-64k,
2013-08-04 10:13:53 +00:00
[ --enable-dvd-obs-64k 64 KB default size for DVD writing, default=no],
2009-12-10 12:08:32 +00:00
, enable_dvd_obs=no)
2009-11-17 14:23:28 +00:00
if test x$enable_dvd_obs_64k = xyes; then
XORRISO_DVD_OBS_64K="-DXorriso_dvd_obs_default_64K"
2013-08-04 10:13:53 +00:00
echo "enabled xorriso write size default 64 KB on DVD"
2009-11-17 14:23:28 +00:00
else
XORRISO_DVD_OBS_64K=
2013-08-04 10:13:53 +00:00
echo "disabled xorriso write size default 64 KB on DVD"
2009-11-17 14:23:28 +00:00
fi
2010-05-17 14:28:30 +00:00
if test x$XORRISO_DVD_OBS_64K = x-DXorriso_dvd_obs_default_64K
then
AC_DEFINE([Xorriso_dvd_obs_default_64K], [])
fi
2009-04-04 14:42:41 +00:00
2010-05-17 14:28:30 +00:00
AH_TEMPLATE([Libburn_read_o_direcT], [Define to use O_DIRECT with -as cdrskin])
2009-11-28 12:41:16 +00:00
AC_ARG_ENABLE(track-src-odirect,
[ --enable-track-src-odirect Enable use of O_DIRECT with -as cdrskin, default=no],
, enable_track_src_odirect=no)
if test x$enable_track_src_odirect = xyes; then
LIBBURN_O_DIRECT_DEF="-DLibburn_read_o_direcT"
echo "enabled use of O_DIRECT with input of -as cdrskin"
else
LIBBURN_O_DIRECT_DEF=
echo "disabled use of O_DIRECT with input of -as cdrskin"
fi
2010-05-17 14:28:30 +00:00
if test x$LIBBURN_O_DIRECT_DEF = x-DLibburn_read_o_direcT
then
AC_DEFINE([Libburn_read_o_direcT], [])
fi
2015-12-10 19:33:16 +00:00
# Check for system dependent mandatory libraries (LIBBURN_ARCH_LIBS)
LIBBURNIA_CHECK_ARCH_LIBS(mandatory)
2009-04-04 14:42:41 +00:00
2011-09-03 19:48:50 +00:00
# ------- 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
2008-01-16 20:13:18 +00:00
AC_CONFIG_FILES([
Makefile
version.h
])
AC_OUTPUT
2009-06-13 12:40:17 +00:00
# xorriso.pc
2010-05-17 14:28:30 +00:00