Made compilation of GNU xorriso less verbous by use of autoheader config.h

This commit is contained in:
Thomas Schmitt 2010-05-17 14:28:30 +00:00
parent 8b560cd82a
commit c8d7b2147e
5 changed files with 83 additions and 22 deletions

View File

@ -5,7 +5,6 @@
AC_INIT([xorriso], [0.5.7], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
@ -14,6 +13,13 @@ LIBBURNIA_SET_FLAGS
AM_INIT_AUTOMAKE([subdir-objects])
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], [])
BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=8
BURN_MICRO_VERSION=1
@ -50,6 +56,7 @@ if test ! $ac_cv_func_fseeko; then
AC_ERROR([Libburn requires largefile support.])
fi
AH_TEMPLATE([ICONV_CONST], [Whether to apply const qualifier to iconv inbuf])
if test x$XORRISO_OLD_ICONV_CONFIGURE = x
then
@ -103,13 +110,16 @@ AC_SUBST(ARCH)
AC_SUBST(LIBBURNIA_PKGCONFDIR)
AC_SUBST(LIBBURN_ARCH_LIBS)
dnl ts A90303
dnl Check the preconditions for using statvfs() in sg-dummy
dnl (sg-linux and sg-freebsd use statvfs() unconditionally)
AH_TEMPLATE([Libburn_os_has_statvfS], [Define to use statvfs() with libburn stdio])
STATVFS_DEF=-DLibburn_os_has_statvfS
AC_CHECK_HEADER(sys/statvfs.h, X=, STATVFS_DEF=)
AC_CHECK_FUNC([statvfs], X=, STATVFS_DEF=)
CFLAGS="$CFLAGS $STATVFS_DEF"
if test x$STATVFS_DEF = x-DLibburn_os_has_statvfS
then
AC_DEFINE([Libburn_os_has_statvfS], [])
fi
dnl Add compiler-specific flags
@ -138,6 +148,7 @@ dnl
LIBBURNIA_SET_PKGCONFIG
AH_TEMPLATE([Xorriso_with_readlinE], [Define to use libreadline])
AC_ARG_ENABLE(libreadline,
[ --enable-libreadline Enable use of libreadline by xorriso, default=yes],
, enable_libreadline=yes)
@ -162,9 +173,12 @@ dnl The X= in the yes case prevents that -lreadline gets linked twice
else
READLINE_DEF=
fi
AC_SUBST(READLINE_DEF)
if test x$READLINE_DEF = x-DXorriso_with_readlinE
then
AC_DEFINE([Xorriso_with_readlinE], [])
fi
AH_TEMPLATE([Libisofs_with_aaip_acL], [Define to use ACL capabilities])
AC_ARG_ENABLE(libacl,
[ --enable-libacl Enable use of libacl by libisofs, default=yes],
, enable_libacl=yes)
@ -177,9 +191,13 @@ dnl The empty yes case obviously causes -lacl to be linked
else
LIBACL_DEF=
fi
AC_SUBST(LIBACL_DEF)
if test x$LIBACL_DEF = x-DLibisofs_with_aaip_acL
then
AC_DEFINE([Libisofs_with_aaip_acL], [])
fi
AH_TEMPLATE([Libisofs_with_aaip_xattR], [Define to use xattr capabilities])
AC_ARG_ENABLE(xattr,
[ --enable-xattr Enable use of xattr by libisofs, default=yes],
, enable_xattr=yes)
@ -191,9 +209,13 @@ dnl If not, erase this macro which would enable use of listxattr and others
else
XATTR_DEF=
fi
AC_SUBST(XATTR_DEF)
if test x$XATTR_DEF = x-DLibisofs_with_aaip_xattR
then
AC_DEFINE([Libisofs_with_aaip_xattR], [])
fi
AH_TEMPLATE([Libisofs_with_zliB], [Define to use compression via libz])
AC_ARG_ENABLE(zlib,
[ --enable-zlib Enable use of zlib by libisofs, default=yes],
, enable_zlib=yes)
@ -208,9 +230,13 @@ dnl The empty parameter after "compressBound" causes -lz.
else
ZLIB_DEF=
fi
AC_SUBST(ZLIB_DEF)
if test x$ZLIB_DEF = x-DLibisofs_with_zliB
then
AC_DEFINE([Libisofs_with_zliB], [])
fi
AH_TEMPLATE([Libburn_use_libcdiO], [Define to use libcdio as system adapter])
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio Enable EXPERIMENTAL use of libcdio as system adapter, default=no],
, enable_libcdio=no)
@ -235,9 +261,13 @@ else
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
fi
AC_SUBST(LIBCDIO_DEF)
if test x$LIBCDIO_DEF = x-DLibburn_use_libcdiO
then
AC_DEFINE([Libburn_use_libcdiO], [])
fi
AH_TEMPLATE([Xorriso_allow_external_filterS], [Define to allow xorriso to start external filter processes])
AC_ARG_ENABLE(external-filters,
[ --enable-external-filters Enable use of external filter programs by xorriso, default=yes],
, enable_external_filters=yes)
@ -248,8 +278,13 @@ else
EXTF_DEF=
echo "disabled xorriso external filter programs"
fi
AC_SUBST(EXTF_DEF)
if test x$EXTF_DEF = x-DXorriso_allow_external_filterS
then
AC_DEFINE([Xorriso_allow_external_filterS], [])
fi
AH_TEMPLATE([Xorriso_allow_extf_suiD], [Define to allow external filters to xorriso when running under setuid])
AC_ARG_ENABLE(external-filters-setuid,
[ --enable-external-filters-setuid Enable xorriso external filter programs under setuid, default=no],
, enable_external_filters_setuid=no)
@ -260,8 +295,13 @@ else
EXTF_SUID_DEF=
echo "disabled xorriso external filter programs under setuid"
fi
AC_SUBST(EXTF_SUID_DEF)
if test x$EXTF_SUID_DEF = x-DXorriso_allow_extf_suiD
then
AC_DEFINE([Xorriso_allow_extf_suiD], [])
fi
AH_TEMPLATE([Xorriso_dvd_obs_default_64K], [Define to make 64 KB default size for DVD/BD writing])
AC_ARG_ENABLE(dvd-obs-64k,
[ --enable-dvd-obs-64k 64 KB default size for DVD/BD writing, default=no],
, enable_dvd_obs=no)
@ -272,8 +312,13 @@ else
XORRISO_DVD_OBS_64K=
echo "disabled xorriso write size default 64 KB on DVD and BD"
fi
AC_SUBST(XORRISO_DVD_OBS_64K)
if test x$XORRISO_DVD_OBS_64K = x-DXorriso_dvd_obs_default_64K
then
AC_DEFINE([Xorriso_dvd_obs_default_64K], [])
fi
AH_TEMPLATE([Libburn_read_o_direcT], [Define to use O_DIRECT with -as cdrskin])
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)
@ -284,12 +329,16 @@ else
LIBBURN_O_DIRECT_DEF=
echo "disabled use of O_DIRECT with input of -as cdrskin"
fi
AC_SUBST(LIBBURN_O_DIRECT_DEF)
if test x$LIBBURN_O_DIRECT_DEF = x-DLibburn_read_o_direcT
then
AC_DEFINE([Libburn_read_o_direcT], [])
fi
AC_CONFIG_FILES([
Makefile
version.h
])
AC_OUTPUT
# xorriso.pc

View File

@ -114,6 +114,8 @@ copy_files \
\
"$lone_dir"
copy_files xorriso/xorriso_bootstrap.txt "$lone_dir"/bootstrap
copy_files xorriso/configure_ac.txt "$lone_dir"/configure.ac
copy_files xorriso/xorriso_makefile_am.txt "$lone_dir"/Makefile.am

View File

@ -0,0 +1,10 @@
#!/bin/sh -x
aclocal
libtoolize --copy --force
autoconf
autoheader
automake --foreign --add-missing --copy --include-deps

View File

@ -21,13 +21,13 @@ bin_PROGRAMS = \
xorriso_xorriso_CPPFLAGS = -I./libburn -I./libisofs -I./libisoburn -I./xorriso
# No readline in the vanilla version because the necessary headers
# are in a separate readline-development package.
xorriso_xorriso_CFLAGS = -DXorriso_standalonE \
$(READLINE_DEF) $(LIBACL_DEF) $(XATTR_DEF) \
$(EXTF_DEF) $(EXTF_SUID_DEF) $(ZLIB_DEF) \
$(LIBCDIO_DEF) \
$(XORRISO_DVD_OBS_64K) $(LIBBURN_O_DIRECT_DEF)
# ts B00518 : The configuration macros are now transmitted via config.h
# xorriso_xorriso_CFLAGS = -DXorriso_standalonE \
# $(READLINE_DEF) $(LIBACL_DEF) $(XATTR_DEF) \
# $(EXTF_DEF) $(EXTF_SUID_DEF) $(ZLIB_DEF) \
# $(LIBCDIO_DEF) \
# $(XORRISO_DVD_OBS_64K) $(LIBBURN_O_DIRECT_DEF)
xorriso_xorriso_CFLAGS =
xorriso_xorriso_LDADD = $(THREAD_LIBS) $(LIBBURN_ARCH_LIBS)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.05.16.171056"
#define Xorriso_timestamP "2010.05.17.142656"